From 42e2f2b21d98731235826a7f891c3adb111976d0 Mon Sep 17 00:00:00 2001 From: puriphatt <162551324+puriphatt@users.noreply.github.com> Date: Tue, 12 Nov 2024 15:33:15 +0700 Subject: [PATCH] feat: workflow template properties (#70) * feat: add i18n * refactor/feat: workflow attributes type * refactor: workflow => gray stat card * refactor: select menu with search => separator * feat: workflow => workflow step properties * fix: workflow type * fix: dialog properties component => model data * fix: form flow => prevent toggle expansion with keyboard * refactor: workflow step data & change status * fix: form flow properties btn * refactor: side menu => hide sub index * feat: workflow => avatar & status on table * refactor: workflow => drawer id and dialog id * feat: workflow => card * fix: agencies => format address --- .../04_flow-management/FormFlow.vue | 316 ++++---- src/components/SideMenu.vue | 7 +- src/components/StatCardComponent.vue | 7 +- src/components/dialog/DialogProperties.vue | 688 ++++++++++++++++++ .../shared/SelectMenuWithSearch.vue | 7 + src/i18n/eng.ts | 3 + src/i18n/tha.ts | 3 + src/pages/04_flow-managment/FlowDialog.vue | 63 +- src/pages/04_flow-managment/MainPage.vue | 311 ++++++-- src/pages/07_agencies-management/MainPage.vue | 39 +- src/stores/product-service/types.ts | 8 +- src/stores/workflow-template/types.ts | 30 +- 12 files changed, 1257 insertions(+), 225 deletions(-) create mode 100644 src/components/dialog/DialogProperties.vue diff --git a/src/components/04_flow-management/FormFlow.vue b/src/components/04_flow-management/FormFlow.vue index deb80bcc..ac28041d 100644 --- a/src/components/04_flow-management/FormFlow.vue +++ b/src/components/04_flow-management/FormFlow.vue @@ -1,7 +1,8 @@ + + diff --git a/src/components/shared/SelectMenuWithSearch.vue b/src/components/shared/SelectMenuWithSearch.vue index 631a2609..788b1e62 100644 --- a/src/components/shared/SelectMenuWithSearch.vue +++ b/src/components/shared/SelectMenuWithSearch.vue @@ -11,12 +11,14 @@ const props = withDefaults( option: Record[]; optionLabel?: string; + separatorIndex?: number[]; }>(), { readonly: false, option: () => [], optionLabel: 'label', offset: () => [0, 12], + separatorIndex: () => [], }, ); @@ -88,6 +90,7 @@ defineEmits<{ dense :key="i" class="flex items-center" + :class="{ 'bordered-t': separatorIndex.includes(i) }" clickable @click.stop="$emit('select', opt)" > @@ -100,6 +103,10 @@ defineEmits<{ + + diff --git a/src/i18n/eng.ts b/src/i18n/eng.ts index 8e817e70..9f26d2be 100644 --- a/src/i18n/eng.ts +++ b/src/i18n/eng.ts @@ -122,6 +122,7 @@ export default { company: 'Company', agencies: 'Agencies', form: 'Form', + properties: 'Properties', designForm: 'Design Form', }, @@ -818,6 +819,8 @@ export default { step: 'Step', stepNo: 'Step no {msg}', responsiblePerson: 'Responsible Person', + customer: 'Customer', + officer: 'Officer', }, agencies: { diff --git a/src/i18n/tha.ts b/src/i18n/tha.ts index 83936e57..07a85896 100644 --- a/src/i18n/tha.ts +++ b/src/i18n/tha.ts @@ -123,6 +123,7 @@ export default { agencies: 'หน่วยงาน', form: 'แบบฟอร์ม', designForm: 'ออกแบบฟอร์ม', + properties: 'คุณสมบัติ', }, menu: { @@ -811,6 +812,8 @@ export default { step: 'ขั้นตอน', stepNo: 'ขั้นตอนที่ {msg}', responsiblePerson: 'ผู้รับผิดชอบ', + customer: 'ลูกค้า', + officer: 'เจ้าหน้าที่', }, agencies: { diff --git a/src/pages/04_flow-managment/FlowDialog.vue b/src/pages/04_flow-managment/FlowDialog.vue index fc2593e0..f2287655 100644 --- a/src/pages/04_flow-managment/FlowDialog.vue +++ b/src/pages/04_flow-managment/FlowDialog.vue @@ -1,11 +1,13 @@