tie catalog info ui to vuex catalog data
This commit is contained in:
@ -25,17 +25,18 @@
|
||||
</v-layout>
|
||||
|
||||
<v-layout row>
|
||||
<!-- TODO only if admin! -->
|
||||
<v-flex d-flex shrink>
|
||||
<v-checkbox v-model="ispublic" label="Public"></v-checkbox>
|
||||
<v-checkbox v-model="master" label="Region master"></v-checkbox>
|
||||
</v-flex>
|
||||
<v-flex d-flex shrink>
|
||||
<v-checkbox v-model="ispublic" label="Show prices"></v-checkbox>
|
||||
<v-checkbox v-model="isPublic" label="Public"></v-checkbox>
|
||||
</v-flex>
|
||||
<v-flex d-flex shrink>
|
||||
<v-checkbox v-model="ispublic" label="Region master"></v-checkbox>
|
||||
<v-checkbox v-model="prices" label="Show prices"></v-checkbox>
|
||||
</v-flex>
|
||||
<v-flex d-flex shrink>
|
||||
<v-checkbox v-model="ispublic" label="I forget"></v-checkbox>
|
||||
<v-checkbox v-model="utility" label="Is Utility?"></v-checkbox>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
@ -53,25 +54,68 @@ export default {
|
||||
data: () => ({
|
||||
seasons: seasons,
|
||||
regions: regions,
|
||||
name: null,
|
||||
ispublic: true
|
||||
}),
|
||||
computed: {
|
||||
name: {
|
||||
get() {
|
||||
return this.$store.getters.catalogProperty('name')
|
||||
},
|
||||
set(name) {
|
||||
this.$store.dispatch('setCatalogProperty', { key: 'name', value: name })
|
||||
}
|
||||
},
|
||||
|
||||
season: {
|
||||
get() {
|
||||
return this.$store.getters.catalogSeason
|
||||
return this.$store.getters.catalogProperty('season')
|
||||
},
|
||||
set(season) {
|
||||
this.$store.dispatch('setCatalogSeason', season)
|
||||
this.$store.dispatch('setCatalogProperty', { key: 'season', value: season })
|
||||
}
|
||||
},
|
||||
|
||||
region: {
|
||||
get() {
|
||||
return this.$store.getters.catalogRegion
|
||||
return this.$store.getters.catalogProperty('region')
|
||||
},
|
||||
set(region) {
|
||||
this.$store.dispatch('setCatalogRegion', region)
|
||||
this.$store.dispatch('setCatalogProperty', { key: 'region', value: region })
|
||||
}
|
||||
},
|
||||
|
||||
master: {
|
||||
get() {
|
||||
return this.$store.getters.catalogProperty('master')
|
||||
},
|
||||
set(master) {
|
||||
this.$store.dispatch('setCatalogProperty', { key: 'master', value: master })
|
||||
}
|
||||
},
|
||||
|
||||
isPublic: {
|
||||
get() {
|
||||
return this.$store.getters.catalogProperty('public')
|
||||
},
|
||||
set(isPublic) {
|
||||
this.$store.dispatch('setCatalogProperty', { key: 'public', value: isPublic })
|
||||
}
|
||||
},
|
||||
|
||||
prices: {
|
||||
get() {
|
||||
return this.$store.getters.catalogProperty('show_prices')
|
||||
},
|
||||
set(showPrices) {
|
||||
this.$store.dispatch('setCatalogProperty', { key: 'show_prices', value: showPrices })
|
||||
}
|
||||
},
|
||||
|
||||
utility: {
|
||||
get() {
|
||||
return this.$store.getters.catalogProperty('is_utility')
|
||||
},
|
||||
set(isUtility) {
|
||||
this.$store.dispatch('setCatalogProperty', { key: 'is_utility', value: isUtility })
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user