From 4c8ba7a8a590bcb783360782f13113c8ddc3190f Mon Sep 17 00:00:00 2001 From: Bingji Guo Date: Mon, 4 Apr 2022 22:39:20 -0500 Subject: [PATCH 1/6] chore: add template for venue object --- pages/venue/_id.vue | 80 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 pages/venue/_id.vue diff --git a/pages/venue/_id.vue b/pages/venue/_id.vue new file mode 100644 index 0000000..9bd63f8 --- /dev/null +++ b/pages/venue/_id.vue @@ -0,0 +1,80 @@ + + + + + + \ No newline at end of file From 5ad86c568e8171cf9ad949a0efbf05511f9ba947 Mon Sep 17 00:00:00 2001 From: Bingji Guo Date: Mon, 4 Apr 2022 23:28:29 -0500 Subject: [PATCH 2/6] feat: venue object page scaffolding --- pages/venue/_id.vue | 80 ---------------------------- pages/venue/index.vue | 120 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+), 80 deletions(-) delete mode 100644 pages/venue/_id.vue create mode 100644 pages/venue/index.vue diff --git a/pages/venue/_id.vue b/pages/venue/_id.vue deleted file mode 100644 index 9bd63f8..0000000 --- a/pages/venue/_id.vue +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/pages/venue/index.vue b/pages/venue/index.vue new file mode 100644 index 0000000..bcf2b42 --- /dev/null +++ b/pages/venue/index.vue @@ -0,0 +1,120 @@ + + + + + + \ No newline at end of file From ebab4a930ed28052282063f30d394c330e9591ee Mon Sep 17 00:00:00 2001 From: Bingji Guo Date: Tue, 21 Mar 2023 13:34:26 -0500 Subject: [PATCH 3/6] feat: add recurring venue pages & venue session page --- components/ArtifactChips.vue | 6 +- components/RecurringVenueChip.vue | 48 ++++++ components/RecurringVenueList.vue | 33 ++++ components/RecurringVenueSearchCard.vue | 180 +++++++++++++++++++++ components/RecurringVenueShort.vue | 93 +++++++++++ layouts/default.vue | 7 +- pages/index.vue | 2 +- pages/recurringvenue/_id.vue | 98 +++++++++++ pages/{search.vue => search/artifacts.vue} | 2 +- pages/search/recurringvenues.vue | 72 +++++++++ plugins/repository.js | 6 + store/venues.js | 91 +++++++++++ 12 files changed, 632 insertions(+), 6 deletions(-) create mode 100644 components/RecurringVenueChip.vue create mode 100644 components/RecurringVenueList.vue create mode 100644 components/RecurringVenueSearchCard.vue create mode 100644 components/RecurringVenueShort.vue create mode 100644 pages/recurringvenue/_id.vue rename pages/{search.vue => search/artifacts.vue} (98%) create mode 100644 pages/search/recurringvenues.vue create mode 100644 store/venues.js diff --git a/components/ArtifactChips.vue b/components/ArtifactChips.vue index a98fe19..04de227 100644 --- a/components/ArtifactChips.vue +++ b/components/ArtifactChips.vue @@ -168,15 +168,15 @@ export default { if (this.link) { switch (this.type) { case 'keyword': - return '/search?keywords=' + item + return '/search/artifacts?keywords=' + item case 'role': - return '/search?author_keywords=' + item.affiliation.person.name + return '/search/artifacts?author_keywords=' + item.affiliation.person.name case 'relation': return '/artifact/' + item.related_artifact_group_id case 'reverse-relation': return '/artifact/' + item.artifact_group_id case 'venue': - return '/search?venue_ids=' + item.id + return '/search/artifacts?venue_ids=' + item.id } } return null diff --git a/components/RecurringVenueChip.vue b/components/RecurringVenueChip.vue new file mode 100644 index 0000000..9bb535d --- /dev/null +++ b/components/RecurringVenueChip.vue @@ -0,0 +1,48 @@ + + + diff --git a/components/RecurringVenueList.vue b/components/RecurringVenueList.vue new file mode 100644 index 0000000..bd5e505 --- /dev/null +++ b/components/RecurringVenueList.vue @@ -0,0 +1,33 @@ + + + diff --git a/components/RecurringVenueSearchCard.vue b/components/RecurringVenueSearchCard.vue new file mode 100644 index 0000000..24faa0c --- /dev/null +++ b/components/RecurringVenueSearchCard.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/components/RecurringVenueShort.vue b/components/RecurringVenueShort.vue new file mode 100644 index 0000000..3f37afb --- /dev/null +++ b/components/RecurringVenueShort.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/layouts/default.vue b/layouts/default.vue index e51f380..11ccae0 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -188,7 +188,12 @@ export default { { icon: 'mdi-cloud-search', title: 'Search Artifacts', - to: '/search' + to: '/search/artifacts' + }, + { + icon: 'mdi-cloud-search', + title: 'Artifact Venues', + to: '/search/recurringvenues' } ] if (this.$auth.loggedIn) { diff --git a/pages/index.vue b/pages/index.vue index e412a87..aa0dbbe 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -72,7 +72,7 @@ - + Continue + + + + Back +
+

+ {{ venue.title }} + + mdi-link-variant + +

+
+ + + + +
Loading...
+ +
+

Oops...

+ No published artifacts for this venue session yet... : ( +
+
+ +
+
Description: {{ venue.description }} + +
Publisher Url: {{ venue.publisher_url || 'N/A' }} + +
+ + + + + +
+
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/pages/search.vue b/pages/search/artifacts.vue similarity index 98% rename from pages/search.vue rename to pages/search/artifacts.vue index f92dffd..c38f3bf 100644 --- a/pages/search.vue +++ b/pages/search/artifacts.vue @@ -4,7 +4,7 @@

- Search + Search Artifacts + + diff --git a/plugins/repository.js b/plugins/repository.js index df9c82f..a7e1cdb 100644 --- a/plugins/repository.js +++ b/plugins/repository.js @@ -63,6 +63,12 @@ export default (ctx, inject) => { // venues inject('venuesEndpoint', repositoryWithAxios('kg/' + 'venues')) + // Recurring Venues + inject('recurringVenuesEndpoint', repositoryWithAxios('kg/' + 'recurringvenues')) + + // Recurring Venue + inject('recurringVenueEndpoint', repositoryWithAxios('kg/' + 'recurringvenue')) + // licenses inject('licenseEndpoint', repositoryWithAxios('kg/' + 'licenses')) diff --git a/store/venues.js b/store/venues.js new file mode 100644 index 0000000..279dcd4 --- /dev/null +++ b/store/venues.js @@ -0,0 +1,91 @@ +export const state = () => ({ + recurringVenues: { + recurring_venues: [], + }, + currentVenue: {}, + artifacts: { + artifacts: [], + pages: 0, + total: 0 + }, + recurrenceId: null, + loading: false, + artifactsLoading: false +}) + +export const getters = { + recurringVenues: state => { + return state.recurringVenues + }, + currentVenue: state => { + return state.currentVenue + }, + loading: state => { + return state.loading + }, + artifactsLoading: state => { + return state.artifactsLoading + }, + artifacts: state => { + return state.artifacts + }, + recurrenceId: state => { + return state.recurrenceId + } +} + +export const mutations = { + SET_RECURRING_VENUES(state, recurringVenues) { + state.recurringVenues = recurringVenues + }, + RESET_RECURRING_VENUES(state) { + state.recurringVenues = { + recurring_venues: [], + } + }, + SET_LOADING(state, loading) { + state.loading = loading + }, + SET_ARTIFACTS_LOADING(state, loading) { + state.artifactsLoading = loading + }, + SET_ARTIFACTS(state, artifacts) { + state.artifacts = artifacts + }, + RESET_ARTIFACTS(state) { + state.artifacts = { + artifacts: [], + pages: 0, + total: 0 + } + }, + SET_RECURRENCE_ID(state, recurrenceId) { + state.recurrenceId = recurrenceId + }, + SET_CURRENT_VENUE(state, currentVenue) { + state.currentVenue = currentVenue + } +} + +export const actions = { + async fetchRecurringVenues({ commit, state }) { + commit('SET_LOADING', true) + let payload = { + all_recurring_venues: true, + verified: true, + } + let response = await this.$recurringVenuesEndpoint.index(payload) + if (typeof response !== 'undefined') { + commit('SET_RECURRING_VENUES', response) + } + commit('SET_LOADING', false) + }, + async fetchArtifacts({ commit, state }, payload) { + commit('SET_ARTIFACTS_LOADING', true) + let response = await this.$artifactSearchEndpoint.index(payload) + if (typeof response !== 'undefined') { + commit('SET_ARTIFACTS', response) + } + commit('SET_ARTIFACTS_LOADING', false) + }, +} From 06a0f65b8e9c965b41bac0c192354cfd8ee85bf8 Mon Sep 17 00:00:00 2001 From: Bingji Guo Date: Tue, 21 Mar 2023 13:37:18 -0500 Subject: [PATCH 4/6] fix: remove unnecessary file --- pages/venue/index.vue | 120 ------------------------------------------ 1 file changed, 120 deletions(-) delete mode 100644 pages/venue/index.vue diff --git a/pages/venue/index.vue b/pages/venue/index.vue deleted file mode 100644 index bcf2b42..0000000 --- a/pages/venue/index.vue +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - \ No newline at end of file From 03155c5abdcc5df2172b124d86a3702a9a9c91e6 Mon Sep 17 00:00:00 2001 From: Bingji Guo Date: Thu, 23 Mar 2023 13:05:28 -0500 Subject: [PATCH 5/6] fix: revert url path change --- components/ArtifactChips.vue | 6 +++--- components/RecurringVenueShort.vue | 2 +- components/SearchCard.vue | 1 - layouts/default.vue | 4 ++-- pages/index.vue | 2 +- pages/{search/artifacts.vue => search.vue} | 0 pages/{recurringvenue => venue}/_id.vue | 0 pages/{search/recurringvenues.vue => venues.vue} | 0 8 files changed, 7 insertions(+), 8 deletions(-) rename pages/{search/artifacts.vue => search.vue} (100%) rename pages/{recurringvenue => venue}/_id.vue (100%) rename pages/{search/recurringvenues.vue => venues.vue} (100%) diff --git a/components/ArtifactChips.vue b/components/ArtifactChips.vue index 04de227..a98fe19 100644 --- a/components/ArtifactChips.vue +++ b/components/ArtifactChips.vue @@ -168,15 +168,15 @@ export default { if (this.link) { switch (this.type) { case 'keyword': - return '/search/artifacts?keywords=' + item + return '/search?keywords=' + item case 'role': - return '/search/artifacts?author_keywords=' + item.affiliation.person.name + return '/search?author_keywords=' + item.affiliation.person.name case 'relation': return '/artifact/' + item.related_artifact_group_id case 'reverse-relation': return '/artifact/' + item.artifact_group_id case 'venue': - return '/search/artifacts?venue_ids=' + item.id + return '/search?venue_ids=' + item.id } } return null diff --git a/components/RecurringVenueShort.vue b/components/RecurringVenueShort.vue index 3f37afb..b29d858 100644 --- a/components/RecurringVenueShort.vue +++ b/components/RecurringVenueShort.vue @@ -54,7 +54,7 @@ export default { methods: { onRelatedArtifactsClicked() { this.$store.commit('venues/SET_RECURRENCE_ID', this.recurringVenue.recurrences[0].id) - this.$router.push('/recurringvenue/' + this.recurringVenue.id) + this.$router.push('/venue/' + this.recurringVenue.id) }, } } diff --git a/components/SearchCard.vue b/components/SearchCard.vue index 676b912..3d593dc 100644 --- a/components/SearchCard.vue +++ b/components/SearchCard.vue @@ -233,7 +233,6 @@