1
0
Fork 0
mirror of synced 2024-07-29 10:05:55 +12:00

fix issue with automation setting sync

This commit is contained in:
Peter Clement 2024-01-30 15:39:12 +00:00
parent 84b2a36fda
commit 9c47671032
4 changed files with 5 additions and 5 deletions

View file

@ -158,6 +158,7 @@ export const getFrontendStore = () => {
...INITIAL_FRONTEND_STATE.features, ...INITIAL_FRONTEND_STATE.features,
...application.features, ...application.features,
}, },
automations: application.automations || {},
icon: application.icon || {}, icon: application.icon || {},
initialised: true, initialised: true,
})) }))

View file

@ -292,7 +292,6 @@
loopBlockCount++ loopBlockCount++
continue continue
} }
console.log(schema)
Object.entries(schema).forEach(([name, value]) => Object.entries(schema).forEach(([name, value]) =>
addBinding(name, value, icon, idx, isLoopBlock, bindingName) addBinding(name, value, icon, idx, isLoopBlock, bindingName)
) )

View file

@ -36,15 +36,12 @@
let status = null let status = null
let timeRange = null let timeRange = null
let loaded = false let loaded = false
$: app = $apps.find(app => $store.appId?.includes(app.appId))
$: app = $apps.find(app => app.devId === $store.appId?.includes(app.appId))
$: licensePlan = $auth.user?.license?.plan $: licensePlan = $auth.user?.license?.plan
$: page = $pageInfo.page $: page = $pageInfo.page
$: fetchLogs(automationId, status, page, timeRange) $: fetchLogs(automationId, status, page, timeRange)
$: isCloud = $admin.cloud $: isCloud = $admin.cloud
$: chainAutomations = app?.automations?.chainAutomations ?? !isCloud $: chainAutomations = app?.automations?.chainAutomations ?? !isCloud
const timeOptions = [ const timeOptions = [
{ value: "90-d", label: "Past 90 days" }, { value: "90-d", label: "Past 90 days" },
{ value: "30-d", label: "Past 30 days" }, { value: "30-d", label: "Past 30 days" },

View file

@ -445,6 +445,9 @@ export async function update(ctx: UserCtx) {
name: app.name, name: app.name,
url: app.url, url: app.url,
icon: app.icon, icon: app.icon,
automations: {
chainAutomations: app.automations?.chainAutomations,
},
}) })
} }