diff --git a/lerna.json b/lerna.json index 5fe9a6b261..587a678788 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.15.1", + "version": "2.15.5", "npmClient": "yarn", "packages": [ "packages/*", diff --git a/packages/account-portal b/packages/account-portal index 11469c40d7..05c90ce551 160000 --- a/packages/account-portal +++ b/packages/account-portal @@ -1 +1 @@ -Subproject commit 11469c40d73ea58f2aec80c12c1946289b67c6f2 +Subproject commit 05c90ce55144e260da6688335c16783eab79bf96 diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte index a5a3165aeb..af54e4d2da 100644 --- a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte +++ b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte @@ -184,8 +184,9 @@ } if ( - (idx === 0 && automation.trigger?.event === "row:update") || - automation.trigger?.event === "row:save" + idx === 0 && + (automation.trigger?.event === "row:update" || + automation.trigger?.event === "row:save") ) { if (name !== "id" && name !== "revision") return `trigger.row.${name}` } diff --git a/packages/builder/src/components/backend/DataTable/modals/ManageAccessModal.svelte b/packages/builder/src/components/backend/DataTable/modals/ManageAccessModal.svelte index 161757c570..09553c1bcd 100644 --- a/packages/builder/src/components/backend/DataTable/modals/ManageAccessModal.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/ManageAccessModal.svelte @@ -13,6 +13,7 @@ Icon, } from "@budibase/bbui" import { capitalise } from "helpers" + import { getFormattedPlanName } from "helpers/planTitle" import { get } from "svelte/store" export let resourceId @@ -99,7 +100,9 @@ {#if requiresPlanToModify} - {capitalise(requiresPlanToModify)} + {getFormattedPlanName(requiresPlanToModify)} {/if} diff --git a/packages/builder/src/helpers/planTitle.js b/packages/builder/src/helpers/planTitle.js new file mode 100644 index 0000000000..dc07e8be2f --- /dev/null +++ b/packages/builder/src/helpers/planTitle.js @@ -0,0 +1,11 @@ +import { PlanType } from "@budibase/types" + +export function getFormattedPlanName(userPlanType) { + let planName = "Free" + if (userPlanType === PlanType.PREMIUM_PLUS) { + planName = "Premium" + } else if (userPlanType === PlanType.ENTERPRISE_BASIC) { + planName = "Enterprise" + } + return `${planName} Plan` +} diff --git a/packages/builder/src/pages/builder/app/[application]/settings/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/settings/_layout.svelte index 899b58ecf0..65a13f0bd9 100644 --- a/packages/builder/src/pages/builder/app/[application]/settings/_layout.svelte +++ b/packages/builder/src/pages/builder/app/[application]/settings/_layout.svelte @@ -15,9 +15,9 @@ app.devId === $store.appId?.includes(app.appId)) $: licensePlan = $auth.user?.license?.plan $: page = $pageInfo.page $: fetchLogs(automationId, status, page, timeRange) + $: isCloud = $admin.cloud + + $: chainAutomations = app?.automations?.chainAutomations ?? !isCloud const timeOptions = [ { value: "90-d", label: "Past 90 days" }, @@ -124,6 +130,18 @@ sidePanel.open() } + async function save({ detail }) { + try { + await apps.update($store.appId, { + automations: { + chainAutomations: detail, + }, + }) + } catch (error) { + notifications.error("Error updating automation chaining setting") + } + } + onMount(async () => { await automationStore.actions.fetch() const params = new URLSearchParams(window.location.search) @@ -150,11 +168,30 @@ - Automation History - View the automations your app has executed + Automations + See your automation history and edit advanced settings + + Chain automations + Allow automations to trigger from other automations + + { + save(e) + }} + value={chainAutomations} + /> + + + + + + History + Free plan stores up to 1 day of automation history + @@ -237,6 +274,9 @@ {/if}