1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-05-18 06:41:02 +00:00
bramw_baserow/web-frontend/modules/automation/pages/automationWorkflow.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.6 KiB
Vue
Raw Permalink Normal View History

2025-03-27 16:07:22 +00:00
<template>
<div class="automation-app">
<AutomationHeader :automation="automation" />
<div class="layout__col-2-2 automation-app__content">
<div class="automation-app__content-header">
<div class="automation-app__title">{{ currentWorkflow.name }}</div>
2025-03-27 16:07:22 +00:00
</div>
</div>
</div>
</template>
<script>
import AutomationHeader from '@baserow/modules/automation/components/AutomationHeader'
export default {
name: 'AutomationWorkflow',
2025-03-27 16:07:22 +00:00
components: { AutomationHeader },
provide() {
return {
workspace: this.workspace,
automation: this.automation,
currentWorkflow: this.currentWorkflow,
}
},
2025-03-27 16:07:22 +00:00
layout: 'app',
async asyncData({ store, params, error, $registry }) {
const automationId = parseInt(params.automationId)
const workflowId = parseInt(params.workflowId)
2025-03-27 16:07:22 +00:00
const data = {}
try {
const automation = await store.dispatch(
'application/selectById',
automationId
)
const workspace = await store.dispatch(
'workspace/selectById',
automation.workspace.id
)
const workflow = store.getters['automationWorkflow/getById'](
automation,
workflowId
)
await store.dispatch('automationWorkflow/selectById', {
automation,
workflowId,
})
2025-03-27 16:07:22 +00:00
data.workspace = workspace
data.automation = automation
data.currentWorkflow = workflow
2025-03-27 16:07:22 +00:00
} catch (e) {
return error({
statusCode: 404,
message: 'Automation workflow not found.',
})
2025-03-27 16:07:22 +00:00
}
return data
},
}
</script>