diff --git a/packages/builder/src/analytics.js b/packages/builder/src/analytics.js index c68f228c12..df91c16e00 100644 --- a/packages/builder/src/analytics.js +++ b/packages/builder/src/analytics.js @@ -125,7 +125,12 @@ export default { requestFeedbackOnDeploy, submitFeedback, highlightFeedbackIcon, - disabled: ifAnalyticsEnabled(disabled), + disabled: () => { + if (analyticsEnabled == null) { + return true + } + return ifAnalyticsEnabled(disabled) + }, optIn: ifAnalyticsEnabled(optIn), optOut: ifAnalyticsEnabled(optOut), } diff --git a/packages/builder/src/builderStore/store/frontend.js b/packages/builder/src/builderStore/store/frontend.js index 7edc378900..19987764e5 100644 --- a/packages/builder/src/builderStore/store/frontend.js +++ b/packages/builder/src/builderStore/store/frontend.js @@ -290,7 +290,7 @@ export const getFrontendStore = () => { ...extras, } }, - create: (componentName, presetProps) => { + create: async (componentName, presetProps) => { const selected = get(selectedComponent) const asset = get(currentAsset) const state = get(store) @@ -346,7 +346,7 @@ export const getFrontendStore = () => { parentComponent._children.push(componentInstance) // Save components and update UI - store.actions.preview.saveSelected() + await store.actions.preview.saveSelected() store.update(state => { state.currentView = "component" state.selectedComponentId = componentInstance._id @@ -360,7 +360,7 @@ export const getFrontendStore = () => { return componentInstance }, - delete: component => { + delete: async component => { if (!component) { return } @@ -375,7 +375,7 @@ export const getFrontendStore = () => { ) store.actions.components.select(parent) } - store.actions.preview.saveSelected() + await store.actions.preview.saveSelected() }, copy: (component, cut = false) => { const selectedAsset = get(currentAsset) @@ -487,7 +487,7 @@ export const getFrontendStore = () => { selected._styles = { normal: {}, hover: {}, active: {} } await store.actions.preview.saveSelected() }, - updateProp: (name, value) => { + updateProp: async (name, value) => { let component = get(selectedComponent) if (!name || !component) { return @@ -497,7 +497,7 @@ export const getFrontendStore = () => { state.selectedComponentId = component._id return state }) - store.actions.preview.saveSelected() + await store.actions.preview.saveSelected() }, links: { save: async (url, title) => { diff --git a/packages/builder/src/components/backend/DataTable/Table.svelte b/packages/builder/src/components/backend/DataTable/Table.svelte index fa04829634..1878e63b02 100644 --- a/packages/builder/src/components/backend/DataTable/Table.svelte +++ b/packages/builder/src/components/backend/DataTable/Table.svelte @@ -15,7 +15,7 @@ import TableLoadingOverlay from "./TableLoadingOverlay" import TableHeader from "./TableHeader" import "@budibase/svelte-ag-grid/dist/index.css" - import { TableNames } from "constants" + import { TableNames, UNEDITABLE_USER_FIELDS } from "constants" export let schema = {} export let data = [] @@ -53,6 +53,7 @@ if (isUsersTable) { schema.email.displayFieldName = "Email" schema.roleId.displayFieldName = "Role" + schema.status.displayFieldName = "Status" } } @@ -83,7 +84,7 @@ if (!allowEditing) { return false } - return !(isUsersTable && ["email", "roleId"].includes(key)) + return !(isUsersTable && UNEDITABLE_USER_FIELDS.includes(key)) } for (let [key, value] of Object.entries(schema || {})) { diff --git a/packages/builder/src/components/backend/DataTable/ViewDataTable.svelte b/packages/builder/src/components/backend/DataTable/ViewDataTable.svelte index 4ac5ec80a8..365f9aee9e 100644 --- a/packages/builder/src/components/backend/DataTable/ViewDataTable.svelte +++ b/packages/builder/src/components/backend/DataTable/ViewDataTable.svelte @@ -53,6 +53,7 @@