1
0
Fork 0
mirror of synced 2024-06-30 20:10:54 +12:00

fix auto screens issue

This commit is contained in:
Martin McKeaveney 2020-11-09 15:55:36 +00:00
parent 88d698bb71
commit 14003d03df
2 changed files with 6 additions and 15 deletions

View file

@ -234,12 +234,12 @@ export const getFrontendStore = () => {
},
},
preview: {
// _saveCurrentPreviewItem
saveSelected: () => {
saveSelected: async () => {
const state = get(store)
state.currentFrontEndType === "page"
? store.actions.pages.save()
: store.actions.screens.save(state.currentPreviewItem)
if (state.currentFrontEndType !== "page") {
await store.actions.screens.save(state.currentPreviewItem)
}
await store.actions.pages.save()
},
},
pages: {

View file

@ -55,16 +55,7 @@
for (let screen of screens) {
// Record the table that created this screen so we can link it later
screen.autoTableId = table._id
try {
await store.actions.screens.create(screen)
} catch (_) {
// TODO: this is temporary
// a cypress test is failing, because I added the
// NewRow component. So - this throws an exception
// because the currently released standard-components (on NPM)
// does not have NewRow
// we should remove this after this has been released
}
await store.actions.screens.create(screen)
}
// Create autolink to newly created list page