Updates key names

This commit is contained in:
Alicia Sykes 2021-10-28 23:40:27 +01:00
parent e4ea1c802d
commit 229e67aca8
3 changed files with 9 additions and 5 deletions

View File

@ -71,7 +71,7 @@ export default {
/* When form submitteed, update VueX store with new appConfig, and close modal */
saveToState() {
const processedFormData = this.removeUndefinedValues(this.formData);
this.$store.commit(StoreKeys.UPDATE_APP_CONFIG, processedFormData);
this.$store.commit(StoreKeys.SET_APP_CONFIG, processedFormData);
this.$modal.hide(this.modalName);
this.$store.commit(StoreKeys.SET_MODAL_OPEN, false);
this.$store.commit(StoreKeys.SET_EDIT_MODE, true);

View File

@ -55,7 +55,7 @@ export default {
methods: {
/* When form submitteed, update VueX store with new pageInfo, and close modal */
saveToState() {
this.$store.commit(StoreKeys.UPDATE_PAGE_INFO, this.formData);
this.$store.commit(StoreKeys.SET_PAGE_INFO, this.formData);
this.$modal.hide(this.modalName);
this.$store.commit(StoreKeys.SET_MODAL_OPEN, false);
this.$store.commit(StoreKeys.SET_EDIT_MODE, true);

View File

@ -1,20 +1,24 @@
// A list of mutation names
const KEY_NAMES = [
'INITIALIZE_CONFIG',
'UPDATE_CONFIG',
'SET_CONFIG',
'SET_MODAL_OPEN',
'SET_LANGUAGE',
'SET_EDIT_MODE',
'SET_ITEM_LAYOUT',
'SET_ITEM_SIZE',
'SET_THEME',
'UPDATE_ITEM',
'UPDATE_PAGE_INFO',
'UPDATE_APP_CONFIG',
'SET_PAGE_INFO',
'SET_APP_CONFIG',
'SET_SECTIONS',
'UPDATE_SECTION',
'INSERT_SECTION',
'REMOVE_SECTION',
'COPY_ITEM',
'REMOVE_ITEM',
'INSERT_ITEM',
'UPDATE_CUSTOM_CSS',
];
// Convert array of key names into an object, and export