This commit is contained in:
parent
701b90d89a
commit
58231aa936
3 changed files with 10 additions and 2 deletions
|
|
@ -27,6 +27,7 @@ import { QField } from 'quasar';
|
||||||
defineProps<{
|
defineProps<{
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
onDrawer?: boolean;
|
onDrawer?: boolean;
|
||||||
|
hideAction?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
@ -201,6 +202,7 @@ onMounted(async () => {
|
||||||
:class="{ 'q-ml-lg': $q.screen.gt.xs, 'q-mt-sm': $q.screen.lt.sm }"
|
:class="{ 'q-ml-lg': $q.screen.gt.xs, 'q-mt-sm': $q.screen.lt.sm }"
|
||||||
>
|
>
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
|
:disable="hideAction"
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
two-way
|
two-way
|
||||||
:model-value="flowData.status !== 'INACTIVE'"
|
:model-value="flowData.status !== 'INACTIVE'"
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
isEdit?: boolean;
|
isEdit?: boolean;
|
||||||
|
hideAction?: boolean;
|
||||||
}>(),
|
}>(),
|
||||||
{ readonly: false, isEdit: false },
|
{ readonly: false, isEdit: false },
|
||||||
);
|
);
|
||||||
|
|
@ -207,7 +208,7 @@ function triggerPropertiesDialog(step: WorkFlowPayloadStep) {
|
||||||
style="position: absolute; z-index: 999; top: 0; right: 0"
|
style="position: absolute; z-index: 999; top: 0; right: 0"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
v-if="flowData.status !== 'INACTIVE'"
|
v-if="flowData.status !== 'INACTIVE' && !hideAction"
|
||||||
class="surface-1 row rounded"
|
class="surface-1 row rounded"
|
||||||
>
|
>
|
||||||
<UndoButton
|
<UndoButton
|
||||||
|
|
@ -287,6 +288,7 @@ function triggerPropertiesDialog(step: WorkFlowPayloadStep) {
|
||||||
>
|
>
|
||||||
<template v-slot:btn-form-flow-step-drawer>
|
<template v-slot:btn-form-flow-step-drawer>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
v-if="!hideAction"
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
icon="mdi-plus"
|
icon="mdi-plus"
|
||||||
|
|
@ -315,6 +317,7 @@ function triggerPropertiesDialog(step: WorkFlowPayloadStep) {
|
||||||
<FormFlow
|
<FormFlow
|
||||||
:readonly
|
:readonly
|
||||||
onDrawer
|
onDrawer
|
||||||
|
:hide-action="hideAction"
|
||||||
v-model:user-in-table="userInTable"
|
v-model:user-in-table="userInTable"
|
||||||
v-model:flow-data="flowData"
|
v-model:flow-data="flowData"
|
||||||
v-model:register-branch-id="registerBranchId"
|
v-model:register-branch-id="registerBranchId"
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import {
|
||||||
} from 'src/stores/workflow-template/types';
|
} from 'src/stores/workflow-template/types';
|
||||||
import { useWorkflowTemplate } from 'src/stores/workflow-template';
|
import { useWorkflowTemplate } from 'src/stores/workflow-template';
|
||||||
import { useNavigator } from 'src/stores/navigator';
|
import { useNavigator } from 'src/stores/navigator';
|
||||||
import { dialog } from 'src/stores/utils';
|
import { dialog, canAccess } from 'src/stores/utils';
|
||||||
|
|
||||||
import FloatingActionButton from 'components/FloatingActionButton.vue';
|
import FloatingActionButton from 'components/FloatingActionButton.vue';
|
||||||
import StatCardComponent from 'src/components/StatCardComponent.vue';
|
import StatCardComponent from 'src/components/StatCardComponent.vue';
|
||||||
|
|
@ -682,6 +682,7 @@ watch(
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
<KebabAction
|
<KebabAction
|
||||||
|
v-if="canAccess('workflow', 'edit')"
|
||||||
:id-name="props.row.name"
|
:id-name="props.row.name"
|
||||||
:status="props.row.status"
|
:status="props.row.status"
|
||||||
@view="
|
@view="
|
||||||
|
|
@ -763,6 +764,7 @@ watch(
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
<KebabAction
|
<KebabAction
|
||||||
|
v-if="canAccess('workflow', 'edit')"
|
||||||
:id-name="props.row.name"
|
:id-name="props.row.name"
|
||||||
:status="props.row.status"
|
:status="props.row.status"
|
||||||
@view="
|
@view="
|
||||||
|
|
@ -846,6 +848,7 @@ watch(
|
||||||
@drawer-undo="undo"
|
@drawer-undo="undo"
|
||||||
@close="resetForm"
|
@close="resetForm"
|
||||||
@submit="submit"
|
@submit="submit"
|
||||||
|
:hide-action="!canAccess('workflow', 'edit')"
|
||||||
:readonly="!pageState.isDrawerEdit"
|
:readonly="!pageState.isDrawerEdit"
|
||||||
:isEdit="pageState.isDrawerEdit"
|
:isEdit="pageState.isDrawerEdit"
|
||||||
v-model="pageState.addModal"
|
v-model="pageState.addModal"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue