tie catalog info ui to vuex catalog data

This commit is contained in:
Seth Ladygo
2019-05-03 00:03:12 -07:00
parent 732159f055
commit 1ed6b4f24b
2 changed files with 138 additions and 89 deletions

View File

@ -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 })
}
},