Skip to content

Commit

Permalink
Added default pin for CE #337
Browse files Browse the repository at this point in the history
  • Loading branch information
jlpereira committed Dec 13, 2018
1 parent 81e10d1 commit 7ee0009
Showing 1 changed file with 24 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,18 @@
type="CollectingEvent"/>
</div>
<div slot="body">
<smart-selector
name="collection-event"
v-model="view"
:add-option="staticOptions"
:options="tabs"/>
<div class="horizontal-left-content">
<smart-selector
name="collection-event"
v-model="view"
:add-option="staticOptions"
:options="tabs"/>
<pin-default
class="separate-left"
section="CollectingEvents"
@getId="getCollectingEvent"
type="CollectingEvent"/>
</div>
<component
:is="actualComponent"
:list="lists[view]"/>
Expand All @@ -43,8 +50,10 @@
import BlockLayout from 'components/blockLayout.vue'
import RadialAnnotator from 'components/annotator/annotator.vue'
import { GetterNames } from '../../store/getters/getters.js'
import { MutationNames } from '../../store/mutations/mutations.js'
import PinComponent from 'components/pin.vue'
import { GetCollectingEventsSmartSelector } from '../../request/resources.js'
import PinDefault from 'components/getDefaultPin'
import { GetCollectingEventsSmartSelector, GetCollectionEvent } from '../../request/resources.js'
import SearchComponent from './components/smart/search.vue'
Expand All @@ -66,7 +75,8 @@
SearchComponent,
RecentComponent,
PinboardComponent,
QuickComponent
QuickComponent,
PinDefault
},
computed: {
collectingEvent() {
Expand All @@ -89,6 +99,13 @@
this.tabs = Object.keys(response)
this.lists = response
})
},
methods: {
getCollectingEvent(id) {
GetCollectionEvent(id).then(response => {
this.$store.commit(MutationNames.SetCollectionEvent, response)
})
}
}
}
</script>

0 comments on commit 7ee0009

Please sign in to comment.