catalog editor: load catalog, region, season data
This commit is contained in:
@ -49,14 +49,18 @@ export default {
|
||||
CatalogContents
|
||||
},
|
||||
data: () => ({
|
||||
/* seasons: [ 'SS19', 'FW19', 'SS20' ],
|
||||
* regions: [ 'US', 'Canada', 'Mexico' ],
|
||||
* season: null,
|
||||
* region: null,
|
||||
* name: null, */
|
||||
/* ispublic: true, */
|
||||
step: 1
|
||||
})
|
||||
step: 1,
|
||||
}),
|
||||
mounted: function() {
|
||||
// catalogID is set by django
|
||||
// in a script block in our parent page.
|
||||
var catalogID = JSON.parse(document.getElementById('catalogID').textContent)
|
||||
if (catalogID > 0) {
|
||||
this.$store.dispatch('loadCatalog', catalogID)
|
||||
} else {
|
||||
this.$store.dispatch('newCatalog')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user