diff --git a/lerna.json b/lerna.json index 6663aebfe6..587a678788 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.15.3", + "version": "2.15.5", "npmClient": "yarn", "packages": [ "packages/*", 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/helpers/planTitle.js b/packages/builder/src/helpers/planTitle.js index dc07e8be2f..098bfb4529 100644 --- a/packages/builder/src/helpers/planTitle.js +++ b/packages/builder/src/helpers/planTitle.js @@ -1,11 +1,27 @@ 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" + let planName + switch (userPlanType) { + case PlanType.PRO: + planName = "Pro" + break + case PlanType.TEAM: + planName = "Team" + break + case PlanType.PREMIUM: + case PlanType.PREMIUM_PLUS: + planName = "Premium" + break + case PlanType.BUSINESS: + planName = "Business" + break + case PlanType.ENTERPRISE_BASIC: + case PlanType.ENTERPRISE: + planName = "Enterprise" + break + default: + planName = "Free" // Default to "Free" if the type is not explicitly handled } 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 +