catalog editor: load catalog, region, season data

This commit is contained in:
Seth Ladygo
2019-04-28 02:46:37 -07:00
parent 6fc247c426
commit 28651477e3
7 changed files with 140 additions and 42 deletions

View File

@ -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>