diff --git a/packages/builder/src/builderStore/store/backend.js b/packages/builder/src/builderStore/store/backend.js index a28be5d982..a7bb363f09 100644 --- a/packages/builder/src/builderStore/store/backend.js +++ b/packages/builder/src/builderStore/store/backend.js @@ -80,15 +80,4 @@ export const createDatabaseForApp = store => appInstance => { state.appInstances.push(appInstance) return state }) -} - -export const saveBackend = async state => { - await api.post(`/_builder/api/${state.appname}/backend`, { - appDefinition: { - hierarchy: state.hierarchy, - actions: state.actions, - triggers: state.triggers, - }, - accessLevels: state.accessLevels, - }) -} +} \ No newline at end of file diff --git a/packages/builder/src/builderStore/store/index.js b/packages/builder/src/builderStore/store/index.js index d1d4aa3e6d..3baaa2558f 100644 --- a/packages/builder/src/builderStore/store/index.js +++ b/packages/builder/src/builderStore/store/index.js @@ -24,7 +24,6 @@ export const getStore = () => { const initial = { apps: [], appname: "", - hierarchy: {}, pages: DEFAULT_PAGES_OBJECT, mainUi: {}, unauthenticatedUi: {}, @@ -44,14 +43,7 @@ export const getStore = () => { store.setPackage = setPackage(store, initial) - // store.saveLevel = backendStoreActions.saveLevel(store) - // store.deleteLevel = backendStoreActions.deleteLevel(store) store.createDatabaseForApp = backendStoreActions.createDatabaseForApp(store) - // store.saveAction = backendStoreActions.saveAction(store) - // store.deleteAction = backendStoreActions.deleteAction(store) - // store.saveTrigger = backendStoreActions.saveTrigger(store) - // store.deleteTrigger = backendStoreActions.deleteTrigger(store) - // store.importAppDefinition = importAppDefinition(store) store.saveScreen = saveScreen(store) store.renameScreen = renameScreen(store) @@ -364,7 +356,7 @@ const addChildComponent = store => (componentToAdd, presetName) => { : state.components[componentToAdd] const presetProps = presetName ? component.presets[presetName] : {} - const newComponent = createProps(component, presetProps) + const newComponent = createProps(component, presetProps, state) state.currentComponentInfo._children = state.currentComponentInfo._children.concat( newComponent.props diff --git a/packages/builder/src/components/database/ModelDataTable/ModelDataTable.svelte b/packages/builder/src/components/database/ModelDataTable/ModelDataTable.svelte index b84bd319ee..7729bb23d3 100644 --- a/packages/builder/src/components/database/ModelDataTable/ModelDataTable.svelte +++ b/packages/builder/src/components/database/ModelDataTable/ModelDataTable.svelte @@ -80,15 +80,6 @@ currentPage * ITEMS_PER_PAGE + ITEMS_PER_PAGE ) - function drillIntoRecord(record) { - backendUiStore.update(state => { - state.breadcrumbs = [...state.breadcrumbs, record.type, record.id] - state.selectedRecord = record - state.selectedView = childViewsForRecord($store.hierarchy)[0] - return state - }) - } - onMount(() => { if (views.length) { backendUiStore.actions.views.select(views[0]) diff --git a/packages/builder/src/components/database/ModelDataTable/modals/CreateEditRecord.svelte b/packages/builder/src/components/database/ModelDataTable/modals/CreateEditRecord.svelte index 53cbe5e45c..183c7b3f6e 100644 --- a/packages/builder/src/components/database/ModelDataTable/modals/CreateEditRecord.svelte +++ b/packages/builder/src/components/database/ModelDataTable/modals/CreateEditRecord.svelte @@ -20,10 +20,6 @@ $: instanceId = $backendUiStore.selectedDatabase.id - $: models = $backendUiStore.selectedRecord - ? childModelsForModel($store.hierarchy) - : $store.hierarchy.children - $: modelSchema = $backendUiStore.selectedModel ? Object.entries($backendUiStore.selectedModel.schema) : [] @@ -65,16 +61,6 @@