Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix: ui corrections

DarkPhoenix2704d62f0a1ffe38
diff --git a/packages/nc-gui/components/dashboard/MiniSidebar/CreateNewActionMenu.vue b/packages/nc-gui/components/dashboard/MiniSidebar/CreateNewActionMenu.vue
index 255afd9b51..b8456f01a3 100644
--- a/packages/nc-gui/components/dashboard/MiniSidebar/CreateNewActionMenu.vue
+++ b/packages/nc-gui/components/dashboard/MiniSidebar/CreateNewActionMenu.vue
@@ -15,6 +15,8 @@ const { activeTable } = storeToRefs(tablesStore)
const { openNewScriptModal } = useScriptStore()
+const { openNewWorkflowModal } = useWorkflowStore()
+
const { openNewDashboardModal } = useDashboardStore()
const viewsStore = useViewsStore()
@@ -126,6 +128,12 @@ const hasScriptCreateAccess = computed(() => {
return isUIAllowed('scriptCreateOrEdit')
})
+const hasWorkflowCreateAccess = computed(() => {
+ if (!base.value || !isBaseHomePage.value) return true
+
+ return isUIAllowed('workflowCreateOrEdit')
+})
+
const hasDashboardCreateAccess = computed(() => {
if (!base.value || !isBaseHomePage.value) return true
@@ -275,6 +283,24 @@ const hasDashboardCreateAccess = computed(() => {
{{ $t('general.script') }}
</NcMenuItem>
</NcTooltip>
+ <NcTooltip
+ :title="
+ hasWorkflowCreateAccess
+ ? $t('tooltip.navigateToBaseToCreateWorkflow')
+ : $t('tooltip.youDontHaveAccessToCreateNewWorkflow')
+ "
+ :disabled="!(!isBaseHomePage || !hasWorkflowCreateAccess)"
+ placement="right"
+ >
+ <NcMenuItem
+ data-testid="mini-sidebar--workflow-create"
+ :disabled="!isBaseHomePage || !hasWorkflowCreateAccess"
+ @click="openNewWorkflowModal({ baseId: openedProject?.id })"
+ >
+ <GeneralIcon icon="ncAutomation" />
+ {{ $t('general.workflow') }}
+ </NcMenuItem>
+ </NcTooltip>
</template>
<!-- <NcDivider />
<NcTooltip title="Navigate to a view to a create record" :disabled="!!activeView" placement="right">
diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json
index c41e24e111..7e184596a1 100644
--- a/packages/nc-gui/lang/en.json
+++ b/packages/nc-gui/lang/en.json
@@ -2092,11 +2092,13 @@
"filteredByCurrentUser": "Filtered by current user",
"navigateToBaseToCreateTable": "Navigate to a base to create a table",
"navigateToBaseToCreateScript": "Navigate to a base to create a script",
+ "navigateToBaseToCreateWorkflow": "Navigate to a base to create a workflow",
"navigateToBaseToCreateDashboard": "Navigate to a base to create a dashboard",
"navigateToTableToCreateView": "Navigate to a table to create a view",
"youDontHaveAccessToCreateNewTable": "You don't have access to create new table",
"youDontHaveAccessToCreateNewView": "You don't have access to create new view",
"youDontHaveAccessToCreateNewScript": "You don't have access to create new script",
+ "youDontHaveAccessToCreateNewWorkflow": "You don't have access to create new workflow",
"youDontHaveAccessToCreateNewDashboard": "You don't have access to create new dashboard",
"formViewCreationNotSupportedForSyncedTable": "Form view creation is not supported for synced table",
"dataInThisFieldCantBeManuallyEdited": "Data in this field can't be manually edited",