@rytass/bpm-core-react 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/dist/chunks/{FormBuilderView-BVKY1j_0.js → FormBuilderView-Djlm3y4S.js} +485 -481
- package/dist/chunks/FormBuilderView-Djlm3y4S.js.map +1 -0
- package/dist/chunks/FormBuilderView-G6uRSywl.cjs +3 -0
- package/dist/chunks/FormBuilderView-G6uRSywl.cjs.map +1 -0
- package/dist/chunks/{FormRendererView-BsTwZkqU.js → FormRendererView-DHfVgbo6.js} +511 -274
- package/dist/chunks/FormRendererView-DHfVgbo6.js.map +1 -0
- package/dist/chunks/FormRendererView-DwfFbaip.cjs +6 -0
- package/dist/chunks/FormRendererView-DwfFbaip.cjs.map +1 -0
- package/dist/chunks/admin-pickers-BjbkBpSJ.cjs +2 -0
- package/dist/chunks/admin-pickers-BjbkBpSJ.cjs.map +1 -0
- package/dist/chunks/{admin-pickers-Djq3h-UR.js → admin-pickers-DfGxsjpp.js} +42 -42
- package/dist/chunks/admin-pickers-DfGxsjpp.js.map +1 -0
- package/dist/chunks/{approval-instance-list-page-CPXMP3PL.js → approval-instance-list-page-BnI4t5mD.js} +7 -8
- package/dist/chunks/{approval-instance-list-page-CPXMP3PL.js.map → approval-instance-list-page-BnI4t5mD.js.map} +1 -1
- package/dist/chunks/{approval-instance-list-page-ax0pm8bt.cjs → approval-instance-list-page-fqvmkBlg.cjs} +2 -2
- package/dist/chunks/{approval-instance-list-page-ax0pm8bt.cjs.map → approval-instance-list-page-fqvmkBlg.cjs.map} +1 -1
- package/dist/chunks/auth-provider-4BeCw7cI.cjs.map +1 -1
- package/dist/chunks/{auth-provider-B5oPmvk2.js → auth-provider-C2b-5mGt.js} +2 -3
- package/dist/chunks/{auth-provider-B5oPmvk2.js.map → auth-provider-C2b-5mGt.js.map} +1 -1
- package/dist/chunks/{bpm-form-field-Cao0rMol.js → bpm-form-field-9B-Det0u.js} +2 -3
- package/dist/chunks/{bpm-form-field-Cao0rMol.js.map → bpm-form-field-9B-Det0u.js.map} +1 -1
- package/dist/chunks/bpm-form-field-Bc6k4ZEO.cjs.map +1 -1
- package/dist/chunks/{categories-riC33J_j.js → categories-BAdxjNSA.js} +14 -15
- package/dist/chunks/{categories-riC33J_j.js.map → categories-BAdxjNSA.js.map} +1 -1
- package/dist/chunks/{categories-AxxhqjLZ.cjs → categories-DQUtVEiV.cjs} +2 -2
- package/dist/chunks/{categories-AxxhqjLZ.cjs.map → categories-DQUtVEiV.cjs.map} +1 -1
- package/dist/chunks/{compose-B1GlrZW9.js → compose-D6zBIc2Z.js} +131 -148
- package/dist/chunks/compose-D6zBIc2Z.js.map +1 -0
- package/dist/chunks/compose-NH6dsFXD.cjs +2 -0
- package/dist/chunks/compose-NH6dsFXD.cjs.map +1 -0
- package/dist/chunks/{dashboard-page-DdBvV6YI.js → dashboard-page-BoqNhjT_.js} +5 -6
- package/dist/chunks/{dashboard-page-DdBvV6YI.js.map → dashboard-page-BoqNhjT_.js.map} +1 -1
- package/dist/chunks/{dashboard-page-BWQBSGDq.cjs → dashboard-page-D7YJ3udk.cjs} +2 -2
- package/dist/chunks/{dashboard-page-BWQBSGDq.cjs.map → dashboard-page-D7YJ3udk.cjs.map} +1 -1
- package/dist/chunks/{delegations-MxF3uJGW.js → delegations-BfhCDz5e.js} +15 -16
- package/dist/chunks/{delegations-MxF3uJGW.js.map → delegations-BfhCDz5e.js.map} +1 -1
- package/dist/chunks/{delegations-Ckf03icM.cjs → delegations-BmFGcuhA.cjs} +2 -2
- package/dist/chunks/{delegations-Ckf03icM.cjs.map → delegations-BmFGcuhA.cjs.map} +1 -1
- package/dist/chunks/{delegations-V9HIe3_P.cjs → delegations-CcS0SHbf.cjs} +2 -2
- package/dist/chunks/{delegations-V9HIe3_P.cjs.map → delegations-CcS0SHbf.cjs.map} +1 -1
- package/dist/chunks/{delegations-xUt1tj8d.js → delegations-DBh5TT6G.js} +16 -17
- package/dist/chunks/{delegations-xUt1tj8d.js.map → delegations-DBh5TT6G.js.map} +1 -1
- package/dist/chunks/designer-Be9UI9Tg.cjs +65 -0
- package/dist/chunks/designer-Be9UI9Tg.cjs.map +1 -0
- package/dist/chunks/{designer-BCLrjb4H.js → designer-uhC_7m2i.js} +1791 -1407
- package/dist/chunks/designer-uhC_7m2i.js.map +1 -0
- package/dist/chunks/detail-6uw5dmTi.cjs +5 -0
- package/dist/chunks/detail-6uw5dmTi.cjs.map +1 -0
- package/dist/chunks/{detail-4F39ggBn.js → detail-_GeKqNC-.js} +1012 -972
- package/dist/chunks/detail-_GeKqNC-.js.map +1 -0
- package/dist/chunks/{format-date-time-CB-LxzqT.js → format-date-time-B0LdmWg4.js} +2 -3
- package/dist/chunks/{format-date-time-CB-LxzqT.js.map → format-date-time-B0LdmWg4.js.map} +1 -1
- package/dist/chunks/format-date-time-D-cx5M8z.cjs.map +1 -1
- package/dist/chunks/{format-member-label-DudVI55w.js → format-member-label-C73FuP-d.js} +2 -3
- package/dist/chunks/{format-member-label-DudVI55w.js.map → format-member-label-C73FuP-d.js.map} +1 -1
- package/dist/chunks/format-member-label-t7ANTF62.cjs.map +1 -1
- package/dist/chunks/{approver-filled-form-Dm3Iw7iw.cjs → instance-error-message-DTARGbGo.cjs} +2 -2
- package/dist/chunks/instance-error-message-DTARGbGo.cjs.map +1 -0
- package/dist/chunks/{approver-filled-form-ZEwpmsHJ.js → instance-error-message-q6gy5evy.js} +50 -38
- package/dist/chunks/instance-error-message-q6gy5evy.js.map +1 -0
- package/dist/chunks/language-provider-Bdnx3Gxl.cjs.map +1 -1
- package/dist/chunks/{language-provider-B3cEbLe4.js → language-provider-phkWOapf.js} +2 -3
- package/dist/chunks/{language-provider-B3cEbLe4.js.map → language-provider-phkWOapf.js.map} +1 -1
- package/dist/chunks/{login-C6qlTC6F.js → login-D6cc3bo7.js} +4 -5
- package/dist/chunks/{login-C6qlTC6F.js.map → login-D6cc3bo7.js.map} +1 -1
- package/dist/chunks/{login-AtVxZBsC.cjs → login-uvVcltrS.cjs} +2 -2
- package/dist/chunks/{login-AtVxZBsC.cjs.map → login-uvVcltrS.cjs.map} +1 -1
- package/dist/chunks/notifications-Bc4mgSds.cjs.map +1 -1
- package/dist/chunks/{notifications-DJ5wzCye.js → notifications-Cvme5Qbl.js} +2 -3
- package/dist/chunks/{notifications-DJ5wzCye.js.map → notifications-Cvme5Qbl.js.map} +1 -1
- package/dist/chunks/orgs-B_2J2tLX.cjs +2 -0
- package/dist/chunks/{orgs-BeeDDWL1.cjs.map → orgs-B_2J2tLX.cjs.map} +1 -1
- package/dist/chunks/{orgs-8hje_l2n.js → orgs-DqxMds26.js} +48 -49
- package/dist/chunks/{orgs-8hje_l2n.js.map → orgs-DqxMds26.js.map} +1 -1
- package/dist/chunks/{providers-B_d5tbCL.js → providers-BbCs23sk.js} +21 -25
- package/dist/chunks/{providers-B_d5tbCL.js.map → providers-BbCs23sk.js.map} +1 -1
- package/dist/chunks/{providers-chuJvMgv.cjs → providers-D_KAgOOu.cjs} +2 -2
- package/dist/chunks/{providers-chuJvMgv.cjs.map → providers-D_KAgOOu.cjs.map} +1 -1
- package/dist/chunks/router-adapter--gYs13E8.cjs.map +1 -1
- package/dist/chunks/{router-adapter-DftlFTOd.js → router-adapter-CkxCyzf5.js} +2 -3
- package/dist/chunks/{router-adapter-DftlFTOd.js.map → router-adapter-CkxCyzf5.js.map} +1 -1
- package/dist/chunks/{routes-config-yZbESPlw.js → routes-config-BcNaWJWJ.js} +2 -3
- package/dist/chunks/{routes-config-yZbESPlw.js.map → routes-config-BcNaWJWJ.js.map} +1 -1
- package/dist/chunks/routes-config-C1j_vFKo.cjs.map +1 -1
- package/dist/chunks/task-decision-3d17ZvZE.js +29 -0
- package/dist/chunks/task-decision-3d17ZvZE.js.map +1 -0
- package/dist/chunks/task-decision-CqZ4WQOC.cjs +2 -0
- package/dist/chunks/task-decision-CqZ4WQOC.cjs.map +1 -0
- package/dist/chunks/{use-bpm-member-D57LKe_u.js → use-bpm-member-BPzcNU1g.js} +3 -4
- package/dist/chunks/{use-bpm-member-D57LKe_u.js.map → use-bpm-member-BPzcNU1g.js.map} +1 -1
- package/dist/chunks/use-bpm-member-DpNAQtNC.cjs.map +1 -1
- package/dist/chunks/{users-Pl6hY5Y5.js → users-BBtiZ9QQ.js} +22 -25
- package/dist/chunks/{users-Pl6hY5Y5.js.map → users-BBtiZ9QQ.js.map} +1 -1
- package/dist/chunks/{users-O2L_M3BK.cjs → users-EqSzDhuj.cjs} +2 -2
- package/dist/chunks/{users-O2L_M3BK.cjs.map → users-EqSzDhuj.cjs.map} +1 -1
- package/dist/components/admin-picker-options.d.cts +11 -0
- package/dist/components/admin-picker-options.d.ts +11 -0
- package/dist/components/admin-pickers.d.cts +2 -11
- package/dist/components/admin-pickers.d.ts +2 -11
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -19
- package/dist/index.js.map +1 -1
- package/dist/lib/task-decision.d.cts +16 -0
- package/dist/lib/task-decision.d.ts +16 -0
- package/dist/lib/use-org-unit-names.d.cts +10 -0
- package/dist/lib/use-org-unit-names.d.ts +10 -0
- package/dist/next/index.cjs +1 -1
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.js +7 -8
- package/dist/next/index.js.map +1 -1
- package/dist/next/workflow-chat-route.cjs +19 -1
- package/dist/next/workflow-chat-route.cjs.map +1 -1
- package/dist/next/workflow-chat-route.js +2 -3
- package/dist/next/workflow-chat-route.js.map +1 -1
- package/dist/pages/admin/delegations/index.cjs +1 -1
- package/dist/pages/admin/delegations/index.cjs.map +1 -1
- package/dist/pages/admin/delegations/index.js +2 -3
- package/dist/pages/admin/orgs/index.cjs +1 -1
- package/dist/pages/admin/orgs/index.cjs.map +1 -1
- package/dist/pages/admin/orgs/index.js +2 -3
- package/dist/pages/admin/users/index.cjs +1 -1
- package/dist/pages/admin/users/index.cjs.map +1 -1
- package/dist/pages/admin/users/index.js +2 -3
- package/dist/pages/admin/webhook-endpoints/index.cjs.map +1 -1
- package/dist/pages/admin/webhook-endpoints/index.js +1 -2
- package/dist/pages/cc/index.cjs.map +1 -1
- package/dist/pages/cc/index.js +1 -2
- package/dist/pages/dashboard/index.cjs.map +1 -1
- package/dist/pages/dashboard/index.js +1 -2
- package/dist/pages/delegations/index.cjs +1 -1
- package/dist/pages/delegations/index.cjs.map +1 -1
- package/dist/pages/delegations/index.js +2 -3
- package/dist/pages/inbox/index.cjs.map +1 -1
- package/dist/pages/inbox/index.js +1 -2
- package/dist/pages/instances/detail/index.cjs +1 -1
- package/dist/pages/instances/detail/index.cjs.map +1 -1
- package/dist/pages/instances/detail/index.js +2 -3
- package/dist/pages/instances/new/index.cjs.map +1 -1
- package/dist/pages/instances/new/index.js +1 -2
- package/dist/pages/login/index.cjs +1 -1
- package/dist/pages/login/index.cjs.map +1 -1
- package/dist/pages/login/index.js +2 -3
- package/dist/pages/root/index.cjs.map +1 -1
- package/dist/pages/root/index.js +1 -2
- package/dist/pages/search/index.cjs.map +1 -1
- package/dist/pages/search/index.js +1 -2
- package/dist/pages/sent/index.cjs.map +1 -1
- package/dist/pages/sent/index.js +1 -2
- package/dist/pages/settings/notifications/index.cjs.map +1 -1
- package/dist/pages/settings/notifications/index.js +2 -3
- package/dist/pages/templates/categories/index.cjs +1 -1
- package/dist/pages/templates/categories/index.cjs.map +1 -1
- package/dist/pages/templates/categories/index.js +2 -3
- package/dist/pages/templates/compose/index.cjs +1 -1
- package/dist/pages/templates/compose/index.cjs.map +1 -1
- package/dist/pages/templates/compose/index.js +2 -3
- package/dist/pages/templates/designer/index.cjs +1 -1
- package/dist/pages/templates/designer/index.cjs.map +1 -1
- package/dist/pages/templates/designer/index.js +2 -3
- package/dist/pages/templates/index.cjs.map +1 -1
- package/dist/pages/templates/index.js +1 -2
- package/dist/pages/templates/versions/index.cjs.map +1 -1
- package/dist/pages/templates/versions/index.js +1 -2
- package/dist/views/admin/delegations/index.cjs +1 -1
- package/dist/views/admin/delegations/index.js +1 -1
- package/dist/views/admin/index.cjs +1 -1
- package/dist/views/admin/index.js +3 -3
- package/dist/views/admin/orgs/index.cjs +1 -1
- package/dist/views/admin/orgs/index.js +1 -1
- package/dist/views/admin/users/index.cjs +1 -1
- package/dist/views/admin/users/index.js +1 -1
- package/dist/views/admin/webhook-endpoints/index.cjs +1 -1
- package/dist/views/admin/webhook-endpoints/index.cjs.map +1 -1
- package/dist/views/admin/webhook-endpoints/index.js +52 -53
- package/dist/views/admin/webhook-endpoints/index.js.map +1 -1
- package/dist/views/cc/index.cjs +1 -1
- package/dist/views/cc/index.cjs.map +1 -1
- package/dist/views/cc/index.js +2 -3
- package/dist/views/dashboard/index.cjs +1 -1
- package/dist/views/dashboard/index.cjs.map +1 -1
- package/dist/views/dashboard/index.js +2 -3
- package/dist/views/delegations/index.cjs +1 -1
- package/dist/views/delegations/index.js +1 -1
- package/dist/views/forms/builder/index.cjs +1 -1
- package/dist/views/forms/builder/index.js +1 -1
- package/dist/views/forms/renderer/FormRendererView.d.cts +24 -1
- package/dist/views/forms/renderer/FormRendererView.d.ts +24 -1
- package/dist/views/forms/renderer/file-upload-field.d.cts +84 -0
- package/dist/views/forms/renderer/file-upload-field.d.ts +84 -0
- package/dist/views/forms/renderer/form-value-readers.d.cts +7 -0
- package/dist/views/forms/renderer/form-value-readers.d.ts +7 -0
- package/dist/views/forms/renderer/index.cjs +1 -1
- package/dist/views/forms/renderer/index.d.cts +1 -0
- package/dist/views/forms/renderer/index.d.ts +1 -0
- package/dist/views/forms/renderer/index.js +1 -1
- package/dist/views/forms/renderer/org-unit-field-options.d.cts +44 -0
- package/dist/views/forms/renderer/org-unit-field-options.d.ts +44 -0
- package/dist/views/forms/renderer/org-unit-field.d.cts +23 -0
- package/dist/views/forms/renderer/org-unit-field.d.ts +23 -0
- package/dist/views/inbox/index.cjs +1 -1
- package/dist/views/inbox/index.cjs.map +1 -1
- package/dist/views/inbox/index.js +133 -137
- package/dist/views/inbox/index.js.map +1 -1
- package/dist/views/instances/approver-filled-form.d.cts +9 -2
- package/dist/views/instances/approver-filled-form.d.ts +9 -2
- package/dist/views/instances/detail/index.cjs +1 -1
- package/dist/views/instances/detail/index.js +1 -1
- package/dist/views/instances/detail/sections/InstanceFormSection.d.cts +19 -2
- package/dist/views/instances/detail/sections/InstanceFormSection.d.ts +19 -2
- package/dist/views/instances/detail/sections/InstanceHistorySection.d.cts +8 -1
- package/dist/views/instances/detail/sections/InstanceHistorySection.d.ts +8 -1
- package/dist/views/instances/detail/sections/container-helpers.d.cts +0 -1
- package/dist/views/instances/detail/sections/container-helpers.d.ts +0 -1
- package/dist/views/instances/detail/sections/shared.d.cts +3 -4
- package/dist/views/instances/detail/sections/shared.d.ts +3 -4
- package/dist/views/instances/instance-error-message.d.cts +5 -0
- package/dist/views/instances/instance-error-message.d.ts +5 -0
- package/dist/views/instances/new/index.cjs +1 -1
- package/dist/views/instances/new/index.cjs.map +1 -1
- package/dist/views/instances/new/index.js +78 -77
- package/dist/views/instances/new/index.js.map +1 -1
- package/dist/views/login/index.cjs +1 -1
- package/dist/views/login/index.js +1 -1
- package/dist/views/search/index.cjs +1 -1
- package/dist/views/search/index.cjs.map +1 -1
- package/dist/views/search/index.js +2 -3
- package/dist/views/sent/index.cjs +1 -1
- package/dist/views/sent/index.cjs.map +1 -1
- package/dist/views/sent/index.js +2 -3
- package/dist/views/settings/index.js +1 -1
- package/dist/views/settings/notifications/index.js +1 -1
- package/dist/views/templates/categories/index.cjs +1 -1
- package/dist/views/templates/categories/index.js +1 -1
- package/dist/views/templates/compose/index.cjs +1 -1
- package/dist/views/templates/compose/index.js +1 -1
- package/dist/views/templates/designer/approver-resolver-model.d.cts +211 -0
- package/dist/views/templates/designer/approver-resolver-model.d.ts +211 -0
- package/dist/views/templates/designer/dry-run-assignee-label.d.cts +2 -0
- package/dist/views/templates/designer/dry-run-assignee-label.d.ts +2 -0
- package/dist/views/templates/designer/dry-run-sample-data.d.cts +6 -0
- package/dist/views/templates/designer/dry-run-sample-data.d.ts +6 -0
- package/dist/views/templates/designer/dynamic-form-resolver-options.d.cts +25 -0
- package/dist/views/templates/designer/dynamic-form-resolver-options.d.ts +25 -0
- package/dist/views/templates/designer/index.cjs +1 -1
- package/dist/views/templates/designer/index.js +1 -1
- package/dist/views/templates/designer/node-actor-resolver-options.d.cts +38 -0
- package/dist/views/templates/designer/node-actor-resolver-options.d.ts +38 -0
- package/dist/views/templates/index.cjs +1 -1
- package/dist/views/templates/index.cjs.map +1 -1
- package/dist/views/templates/index.js +50 -51
- package/dist/views/templates/index.js.map +1 -1
- package/dist/views/templates/versions/index.cjs +1 -1
- package/dist/views/templates/versions/index.cjs.map +1 -1
- package/dist/views/templates/versions/index.js +7 -8
- package/dist/views/templates/versions/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunks/FormBuilderView-BVKY1j_0.js.map +0 -1
- package/dist/chunks/FormBuilderView-SrGltzFT.cjs +0 -3
- package/dist/chunks/FormBuilderView-SrGltzFT.cjs.map +0 -1
- package/dist/chunks/FormRendererView-BsTwZkqU.js.map +0 -1
- package/dist/chunks/FormRendererView-GpsE03np.cjs +0 -4
- package/dist/chunks/FormRendererView-GpsE03np.cjs.map +0 -1
- package/dist/chunks/admin-pickers-BRHk3qKq.cjs +0 -2
- package/dist/chunks/admin-pickers-BRHk3qKq.cjs.map +0 -1
- package/dist/chunks/admin-pickers-Djq3h-UR.js.map +0 -1
- package/dist/chunks/approver-filled-form-Dm3Iw7iw.cjs.map +0 -1
- package/dist/chunks/approver-filled-form-ZEwpmsHJ.js.map +0 -1
- package/dist/chunks/compose-B1GlrZW9.js.map +0 -1
- package/dist/chunks/compose-DZk-SfHT.cjs +0 -2
- package/dist/chunks/compose-DZk-SfHT.cjs.map +0 -1
- package/dist/chunks/designer-BCLrjb4H.js.map +0 -1
- package/dist/chunks/designer-BYYxEN9L.cjs +0 -65
- package/dist/chunks/designer-BYYxEN9L.cjs.map +0 -1
- package/dist/chunks/detail-4F39ggBn.js.map +0 -1
- package/dist/chunks/detail-BkMtA_0K.cjs +0 -2
- package/dist/chunks/detail-BkMtA_0K.cjs.map +0 -1
- package/dist/chunks/orgs-BeeDDWL1.cjs +0 -2
- package/dist/chunks/task-node-label-BF6UllxP.cjs +0 -2
- package/dist/chunks/task-node-label-BF6UllxP.cjs.map +0 -1
- package/dist/chunks/task-node-label-CWZgOBj0.js +0 -9
- package/dist/chunks/task-node-label-CWZgOBj0.js.map +0 -1
|
@@ -1,27 +1,42 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { n as e } from "./auth-provider-B5oPmvk2.js";
|
|
3
|
-
import { t } from "./format-date-time-CB-LxzqT.js";
|
|
4
|
-
import { t as n } from "./bpm-form-field-Cao0rMol.js";
|
|
5
|
-
import { t as r } from "./use-bpm-member-D57LKe_u.js";
|
|
6
|
-
import { t as i } from "./format-member-label-DudVI55w.js";
|
|
7
|
-
import { t as a } from "./task-node-label-CWZgOBj0.js";
|
|
8
|
-
import { a as o, c as s, i as c, l, n as u, o as d, r as f, s as p, t as ee, u as te } from "./approver-filled-form-ZEwpmsHJ.js";
|
|
9
|
-
import { o as m, t as ne } from "./FormRendererView-BsTwZkqU.js";
|
|
10
2
|
import '../style.css';import '../detail.css';/* empty css */
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import
|
|
24
|
-
|
|
3
|
+
import { t as e } from "./bpm-form-field-9B-Det0u.js";
|
|
4
|
+
import { t } from "./format-date-time-B0LdmWg4.js";
|
|
5
|
+
import { n } from "./auth-provider-C2b-5mGt.js";
|
|
6
|
+
import { t as r } from "./use-bpm-member-BPzcNU1g.js";
|
|
7
|
+
import { l as i, n as a, o, t as s } from "./FormRendererView-DHfVgbo6.js";
|
|
8
|
+
import { a as c, n as l, o as u, r as d, t as f } from "./task-decision-3d17ZvZE.js";
|
|
9
|
+
import { t as p } from "./format-member-label-C73FuP-d.js";
|
|
10
|
+
import { a as m, c as h, d as g, f as ee, i as te, l as ne, n as re, o as ie, r as ae, s as oe, t as _, u as v } from "./instance-error-message-q6gy5evy.js";
|
|
11
|
+
import { Fragment as y, forwardRef as b, useCallback as se, useEffect as ce, useImperativeHandle as le, useMemo as x, useRef as ue, useState as S } from "react";
|
|
12
|
+
import { AutoComplete as de, Badge as fe, Button as C, Description as w, DescriptionContent as pe, InlineMessage as me, Input as he, Message as ge, Modal as T, PageHeader as _e, Section as E, SectionGroup as ve, Select as ye, Stepper as be, Table as xe, Textarea as Se, Tooltip as Ce, Typography as D } from "@mezzanine-ui/react";
|
|
13
|
+
import { Fragment as we, jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
14
|
+
import { cancelAdhocDirective as Te, cancelApprovalInstance as Ee, configureAdhocCompletionNotification as De, configureAdhocStageNotification as Oe, decideTask as ke, listAdhocDirectives as Ae, listAttachments as je, listTaskDecisions as A, listWorkflowWebhookDeliveries as Me, readApprovalInstance as Ne, readAttachmentDownloadUrl as Pe, readAttachmentPreviewUrl as Fe, readInstanceSignatures as Ie, requestAdhocCountersign as Le, requestAdhocPreApproval as Re, resolveMemberProfiles as ze, resubmitApprovalInstance as Be, retryWorkflowWebhookDelivery as Ve, searchMembers as He, uploadAttachment as Ue } from "@rytass/bpm-core-client/workflow";
|
|
15
|
+
import We from "@mezzanine-ui/react/ContentHeader";
|
|
16
|
+
import { CheckedIcon as Ge, ChevronLeftIcon as Ke, ChevronRightIcon as qe, DangerousOutlineIcon as j, DownloadIcon as M, FileSearchIcon as Je, NotificationUnreadIcon as Ye, PlusIcon as Xe, RefreshCcwIcon as Ze, ResetIcon as Qe, ShareIcon as $e, UserIcon as et, ZoomInIcon as tt, ZoomOutIcon as N } from "@mezzanine-ui/icons";
|
|
17
|
+
import { readNodeFillableFieldKeys as nt, readRevealedFieldKeys as rt, readTopLevelFieldKey as P, resolveFieldAccess as F } from "@rytass/bpm-core-shared";
|
|
18
|
+
import { buildFormRendererValues as it, focusFormRendererField as at, validateFormRendererValuesInWorker as ot } from "@rytass/bpm-core-client/form";
|
|
19
|
+
import { resolveOrgUnitOptions as st } from "@rytass/bpm-core-client/organization";
|
|
20
|
+
import { Background as ct, Controls as lt, Handle as ut, Position as I, ReactFlow as dt } from "@xyflow/react";
|
|
21
|
+
import * as ft from "dagre";
|
|
22
|
+
import { Document as pt, Page as mt } from "react-pdf";
|
|
23
|
+
import { readSelectableReturnTargetNodeIds as L } from "@rytass/bpm-core-shared/workflow-graph";
|
|
24
|
+
import { stepClasses as R } from "@mezzanine-ui/core/stepper";
|
|
25
|
+
function ht(e) {
|
|
26
|
+
let [t, n] = S(/* @__PURE__ */ new Map()), r = e.join("\n");
|
|
27
|
+
return ce(() => {
|
|
28
|
+
let e = r ? [...new Set(r.split("\n"))].filter((e) => !t.has(e)) : [], i = !1;
|
|
29
|
+
return e.length === 0 ? () => void 0 : (st(e).then((e) => e.map(a)).catch(() => []).then((t) => {
|
|
30
|
+
i || n((n) => new Map([...n, ...e.map((e) => [e, t.find((t) => t.id.toLowerCase() === e.toLowerCase())?.name ?? null])]));
|
|
31
|
+
}), () => {
|
|
32
|
+
i = !0;
|
|
33
|
+
});
|
|
34
|
+
}, [r, t]), x(() => new Map((r ? [...new Set(r.split("\n"))] : []).flatMap((e) => {
|
|
35
|
+
let n = t.get(e);
|
|
36
|
+
return n === null ? [] : [[e, n ?? "讀取中…"]];
|
|
37
|
+
})), [r, t]);
|
|
38
|
+
}
|
|
39
|
+
var z = {
|
|
25
40
|
root: "bpm_root_ehm7w",
|
|
26
41
|
toolbar: "bpm_toolbar_R-tis",
|
|
27
42
|
pageControls: "bpm_pageControls_jM-rC",
|
|
@@ -30,10 +45,10 @@ var L = {
|
|
|
30
45
|
viewport: "bpm_viewport_DQXms",
|
|
31
46
|
page: "bpm_page_Cv5Rg",
|
|
32
47
|
state: "bpm_state_bpgp3"
|
|
33
|
-
},
|
|
34
|
-
function
|
|
35
|
-
let r =
|
|
36
|
-
|
|
48
|
+
}, gt = 760, _t = 920, vt = 320, yt = 32, bt = .75, xt = 1.75, St = .25;
|
|
49
|
+
function Ct({ filename: e, fileUrl: t, onDownload: n }) {
|
|
50
|
+
let r = ue(null), [i, a] = S(null), [o, s] = S(1), [c, l] = S(1), [u, d] = S(gt);
|
|
51
|
+
ce(() => {
|
|
37
52
|
let e = r.current;
|
|
38
53
|
if (!e || typeof ResizeObserver > "u") return;
|
|
39
54
|
let t = new ResizeObserver((e) => {
|
|
@@ -41,45 +56,45 @@ function ht({ filename: e, fileUrl: t, onDownload: n }) {
|
|
|
41
56
|
t && d(t);
|
|
42
57
|
});
|
|
43
58
|
return t.observe(e), () => t.disconnect();
|
|
44
|
-
}, []),
|
|
59
|
+
}, []), ce(() => {
|
|
45
60
|
a(null), s(1), l(1);
|
|
46
61
|
}, [t]);
|
|
47
|
-
let f =
|
|
48
|
-
let e = Math.max(
|
|
49
|
-
return Math.round(Math.min(
|
|
50
|
-
}, [c, u]), p =
|
|
62
|
+
let f = x(() => {
|
|
63
|
+
let e = Math.max(vt, u - yt);
|
|
64
|
+
return Math.round(Math.min(_t, e) * c);
|
|
65
|
+
}, [c, u]), p = se((e) => {
|
|
51
66
|
a(e.numPages), s(1);
|
|
52
|
-
}, []),
|
|
53
|
-
return /* @__PURE__ */
|
|
67
|
+
}, []), m = o > 1, h = i !== null && o < i, g = c > bt, ee = c < xt, te = i === null ? `第 ${o} 頁` : `第 ${o} / ${i} 頁`, ne = `${Math.round(c * 100)}%`;
|
|
68
|
+
return /* @__PURE__ */ k("section", {
|
|
54
69
|
"aria-label": `${e} PDF 預覽`,
|
|
55
|
-
className:
|
|
56
|
-
children: [/* @__PURE__ */
|
|
57
|
-
className:
|
|
70
|
+
className: z.root,
|
|
71
|
+
children: [/* @__PURE__ */ k("div", {
|
|
72
|
+
className: z.toolbar,
|
|
58
73
|
children: [
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
className:
|
|
74
|
+
/* @__PURE__ */ k("div", {
|
|
75
|
+
className: z.pageControls,
|
|
61
76
|
"aria-label": "頁面切換",
|
|
62
77
|
children: [
|
|
63
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ O(C, {
|
|
64
79
|
"aria-label": "上一頁",
|
|
65
|
-
disabled: !
|
|
66
|
-
icon:
|
|
80
|
+
disabled: !m,
|
|
81
|
+
icon: Ke,
|
|
67
82
|
onClick: () => {
|
|
68
83
|
s((e) => Math.max(1, e - 1));
|
|
69
84
|
},
|
|
70
85
|
size: "minor",
|
|
71
86
|
variant: "base-secondary"
|
|
72
87
|
}),
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
className:
|
|
88
|
+
/* @__PURE__ */ O(D, {
|
|
89
|
+
className: z.counter,
|
|
75
90
|
component: "span",
|
|
76
91
|
variant: "body",
|
|
77
|
-
children:
|
|
92
|
+
children: te
|
|
78
93
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ O(C, {
|
|
80
95
|
"aria-label": "下一頁",
|
|
81
|
-
disabled: !
|
|
82
|
-
icon:
|
|
96
|
+
disabled: !h,
|
|
97
|
+
icon: qe,
|
|
83
98
|
onClick: () => {
|
|
84
99
|
s((e) => i === null ? e : Math.min(i, e + 1));
|
|
85
100
|
},
|
|
@@ -88,40 +103,40 @@ function ht({ filename: e, fileUrl: t, onDownload: n }) {
|
|
|
88
103
|
})
|
|
89
104
|
]
|
|
90
105
|
}),
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
className:
|
|
106
|
+
/* @__PURE__ */ k("div", {
|
|
107
|
+
className: z.zoomControls,
|
|
93
108
|
"aria-label": "縮放",
|
|
94
109
|
children: [
|
|
95
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ O(C, {
|
|
96
111
|
"aria-label": "縮小",
|
|
97
|
-
disabled: !
|
|
98
|
-
icon:
|
|
112
|
+
disabled: !g,
|
|
113
|
+
icon: N,
|
|
99
114
|
onClick: () => {
|
|
100
|
-
l((e) => Math.max(
|
|
115
|
+
l((e) => Math.max(bt, e - St));
|
|
101
116
|
},
|
|
102
117
|
size: "minor",
|
|
103
118
|
variant: "base-secondary"
|
|
104
119
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
-
className:
|
|
120
|
+
/* @__PURE__ */ O(D, {
|
|
121
|
+
className: z.counter,
|
|
107
122
|
component: "span",
|
|
108
123
|
variant: "body",
|
|
109
|
-
children:
|
|
124
|
+
children: ne
|
|
110
125
|
}),
|
|
111
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ O(C, {
|
|
112
127
|
"aria-label": "放大",
|
|
113
|
-
disabled: !
|
|
114
|
-
icon:
|
|
128
|
+
disabled: !ee,
|
|
129
|
+
icon: tt,
|
|
115
130
|
onClick: () => {
|
|
116
|
-
l((e) => Math.min(
|
|
131
|
+
l((e) => Math.min(xt, e + St));
|
|
117
132
|
},
|
|
118
133
|
size: "minor",
|
|
119
134
|
variant: "base-secondary"
|
|
120
135
|
})
|
|
121
136
|
]
|
|
122
137
|
}),
|
|
123
|
-
n ? /* @__PURE__ */
|
|
124
|
-
icon:
|
|
138
|
+
n ? /* @__PURE__ */ O(C, {
|
|
139
|
+
icon: M,
|
|
125
140
|
iconType: "leading",
|
|
126
141
|
onClick: n,
|
|
127
142
|
size: "minor",
|
|
@@ -129,19 +144,19 @@ function ht({ filename: e, fileUrl: t, onDownload: n }) {
|
|
|
129
144
|
children: "下載"
|
|
130
145
|
}) : null
|
|
131
146
|
]
|
|
132
|
-
}), /* @__PURE__ */
|
|
133
|
-
className:
|
|
147
|
+
}), /* @__PURE__ */ O("div", {
|
|
148
|
+
className: z.viewport,
|
|
134
149
|
ref: r,
|
|
135
|
-
children: /* @__PURE__ */
|
|
136
|
-
error: /* @__PURE__ */
|
|
150
|
+
children: /* @__PURE__ */ O(pt, {
|
|
151
|
+
error: /* @__PURE__ */ O(B, { message: "PDF 無法載入。" }),
|
|
137
152
|
file: t,
|
|
138
|
-
loading: /* @__PURE__ */
|
|
139
|
-
noData: /* @__PURE__ */
|
|
153
|
+
loading: /* @__PURE__ */ O(B, { message: "正在載入 PDF..." }),
|
|
154
|
+
noData: /* @__PURE__ */ O(B, { message: "沒有可預覽的 PDF。" }),
|
|
140
155
|
onLoadSuccess: p,
|
|
141
156
|
suspense: !1,
|
|
142
|
-
children: /* @__PURE__ */
|
|
143
|
-
className:
|
|
144
|
-
loading: /* @__PURE__ */
|
|
157
|
+
children: /* @__PURE__ */ O(mt, {
|
|
158
|
+
className: z.page,
|
|
159
|
+
loading: /* @__PURE__ */ O(B, { message: "正在載入頁面..." }),
|
|
145
160
|
pageNumber: o,
|
|
146
161
|
renderAnnotationLayer: !0,
|
|
147
162
|
renderTextLayer: !0,
|
|
@@ -151,132 +166,127 @@ function ht({ filename: e, fileUrl: t, onDownload: n }) {
|
|
|
151
166
|
})]
|
|
152
167
|
});
|
|
153
168
|
}
|
|
154
|
-
function
|
|
155
|
-
return /* @__PURE__ */
|
|
156
|
-
className:
|
|
157
|
-
children: /* @__PURE__ */
|
|
169
|
+
function B({ message: e }) {
|
|
170
|
+
return /* @__PURE__ */ O("div", {
|
|
171
|
+
className: z.state,
|
|
172
|
+
children: /* @__PURE__ */ O(D, {
|
|
158
173
|
color: "text-neutral",
|
|
159
174
|
variant: "body",
|
|
160
175
|
children: e
|
|
161
176
|
})
|
|
162
177
|
});
|
|
163
178
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
function _t({ initiatorMemberId: e, submittedByMemberId: t }) {
|
|
179
|
+
// src/views/instances/detail/submitted-by.ts
|
|
180
|
+
function wt({ initiatorMemberId: e, submittedByMemberId: t }) {
|
|
167
181
|
return t && t !== e ? t : null;
|
|
168
182
|
}
|
|
169
|
-
function
|
|
170
|
-
let n =
|
|
183
|
+
function Tt(e, t) {
|
|
184
|
+
let n = wt(e);
|
|
171
185
|
if (!n || !e.initiatorMemberId) return null;
|
|
172
186
|
let r = (e) => t.get(e)?.name ?? e;
|
|
173
187
|
return `由 ${r(n)} 代 ${r(e.initiatorMemberId)} 送出`;
|
|
174
188
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
let t = z(e, "from"), n = z(e, "to"), r = z(e, "reason");
|
|
189
|
+
// src/views/instances/detail/sections/shared.ts
|
|
190
|
+
function Et(e) {
|
|
191
|
+
let t = V(e, "from"), n = V(e, "to"), r = V(e, "reason");
|
|
179
192
|
return !t || !n || !r ? null : {
|
|
180
193
|
from: t,
|
|
181
194
|
reason: r,
|
|
182
|
-
ruleId:
|
|
195
|
+
ruleId: V(e, "ruleId"),
|
|
183
196
|
to: n
|
|
184
197
|
};
|
|
185
198
|
}
|
|
186
|
-
function
|
|
199
|
+
function Dt(e) {
|
|
187
200
|
try {
|
|
188
201
|
let t = JSON.parse(e);
|
|
189
|
-
return Array.isArray(t) ? t.map((e) =>
|
|
202
|
+
return Array.isArray(t) ? t.map((e) => U(e) ? Et(e) : null).filter((e) => e !== null) : [];
|
|
190
203
|
} catch {
|
|
191
204
|
return [];
|
|
192
205
|
}
|
|
193
206
|
}
|
|
194
|
-
function
|
|
207
|
+
function V(e, t) {
|
|
195
208
|
let n = e[t];
|
|
196
209
|
return typeof n == "string" ? n : null;
|
|
197
210
|
}
|
|
198
|
-
function
|
|
211
|
+
function Ot(e, t) {
|
|
199
212
|
let n = e[t];
|
|
200
213
|
return Array.isArray(n) ? n.filter((e) => typeof e == "string") : [];
|
|
201
214
|
}
|
|
202
|
-
function
|
|
215
|
+
function kt(e, t) {
|
|
203
216
|
let n = e[t];
|
|
204
217
|
return typeof n == "number" ? n : null;
|
|
205
218
|
}
|
|
206
|
-
function
|
|
219
|
+
function H(e) {
|
|
207
220
|
return typeof e == "string" && e.trim().length > 0;
|
|
208
221
|
}
|
|
209
|
-
function
|
|
222
|
+
function U(e) {
|
|
210
223
|
return typeof e == "object" && !!e;
|
|
211
224
|
}
|
|
212
|
-
function
|
|
225
|
+
function At(e) {
|
|
213
226
|
return e.status === "PENDING" || e.status === "IN_PROGRESS";
|
|
214
227
|
}
|
|
215
|
-
function
|
|
216
|
-
return M(e) || (e instanceof Error ? e.message : "發生未知錯誤");
|
|
217
|
-
}
|
|
218
|
-
function wt(e) {
|
|
228
|
+
function jt(e) {
|
|
219
229
|
return !Number.isFinite(e) || e <= 0 ? "-" : e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1024 / 1024).toFixed(1)} MB`;
|
|
220
230
|
}
|
|
221
|
-
function
|
|
231
|
+
function Mt(e) {
|
|
222
232
|
return e.length > 16 ? `${e.slice(0, 12)}...` : e;
|
|
223
233
|
}
|
|
224
|
-
function
|
|
234
|
+
function Nt(e) {
|
|
225
235
|
return e === "APPROVED" ? "已同意" : e === "CANCELLED" ? "已取消" : e === "DRAFT" ? "草稿" : e === "EXPIRED" ? "已逾期" : e === "REJECTED" ? "已拒絕" : e === "RETURNED" ? "已退回" : e === "RUNNING" ? "進行中" : e;
|
|
226
236
|
}
|
|
227
|
-
function
|
|
237
|
+
function W(e) {
|
|
228
238
|
return e === "PENDING" ? "待處理" : e === "IN_PROGRESS" ? "處理中" : e === "COMPLETED" ? "已完成" : e === "CANCELLED" ? "已取消" : e === "TRANSFERRED" ? "已轉派" : e;
|
|
229
239
|
}
|
|
230
|
-
function
|
|
240
|
+
function G(e) {
|
|
231
241
|
return e === "APPROVED" ? "同意" : e === "REJECTED" ? "拒絕" : e === "RETURNED" ? "退回" : e === "TRANSFERRED" ? "轉派" : e;
|
|
232
242
|
}
|
|
233
|
-
function
|
|
243
|
+
function Pt(e) {
|
|
234
244
|
return e === "startEvent" ? "開始" : e === "endEvent" ? "完成" : e === "userTask" ? "簽核節點" : e === "serviceTask" ? "知會節點" : e === "exclusiveGateway" ? "條件分流" : "平行處理";
|
|
235
245
|
}
|
|
236
|
-
function
|
|
246
|
+
function Ft(e, t) {
|
|
237
247
|
return t?.nodes.find((t) => t.id === e)?.data.label ?? e;
|
|
238
248
|
}
|
|
239
|
-
function
|
|
249
|
+
function K(e, t) {
|
|
240
250
|
if (!e) return "-";
|
|
241
251
|
let n = t.get(e);
|
|
242
|
-
return n ?
|
|
252
|
+
return n ? p(n.name, n.email, "fullwidth") : e;
|
|
243
253
|
}
|
|
244
|
-
function
|
|
245
|
-
let n =
|
|
246
|
-
if (!e.assigneeMemberId) return e.candidateMemberIds.length ? `候選 ${e.candidateMemberIds.map((e) =>
|
|
247
|
-
let r =
|
|
254
|
+
function It(e, t = /* @__PURE__ */ new Map()) {
|
|
255
|
+
let n = Dt(e.delegationChainJson);
|
|
256
|
+
if (!e.assigneeMemberId) return e.candidateMemberIds.length ? `候選 ${e.candidateMemberIds.map((e) => K(e, t)).join("、")}` : "未指定";
|
|
257
|
+
let r = K(e.assigneeMemberId, t), i = K(e.originalAssigneeMemberId, t);
|
|
248
258
|
return n.length === 0 || e.originalAssigneeMemberId === e.assigneeMemberId ? r : `${r}(原:${i})`;
|
|
249
259
|
}
|
|
250
|
-
function
|
|
260
|
+
function Lt(e, t) {
|
|
251
261
|
return t ? e.assigneeMemberId === t || (e.openCandidateMemberIds ?? e.candidateMemberIds).includes(t) : !1;
|
|
252
262
|
}
|
|
253
|
-
function
|
|
254
|
-
let n = e.filter((e) =>
|
|
263
|
+
function Rt(e, t) {
|
|
264
|
+
let n = e.filter((e) => Lt(e, t) && (e.status === "PENDING" || e.status === "IN_PROGRESS"));
|
|
255
265
|
return n.find((e) => !e.isAdhoc) ?? n[0] ?? null;
|
|
256
266
|
}
|
|
257
|
-
function
|
|
267
|
+
function zt(e, t) {
|
|
258
268
|
if (t.type !== "userTask" || !t.data.returnBehavior.allowReturn) return [];
|
|
259
269
|
if (t.data.returnBehavior.allowedTargets === "ANY") {
|
|
260
|
-
let n =
|
|
270
|
+
let n = L(e, t.id);
|
|
261
271
|
return e.nodes.filter((e) => n.includes(e.id)).map((e) => ({
|
|
262
272
|
id: e.id,
|
|
263
|
-
name: `${e.data.label}(${
|
|
273
|
+
name: `${e.data.label}(${Pt(e.type)})`
|
|
264
274
|
}));
|
|
265
275
|
}
|
|
266
276
|
let n = t.data.returnBehavior.allowedTargets === "INITIATOR" ? e.nodes.find((e) => e.type === "startEvent")?.id : e.edges.find((e) => e.target === t.id)?.source, r = e.nodes.find((e) => e.id === n);
|
|
267
277
|
return r ? [{
|
|
268
278
|
id: r.id,
|
|
269
|
-
name: `${r.data.label}(${
|
|
279
|
+
name: `${r.data.label}(${Pt(r.type)})`
|
|
270
280
|
}] : [];
|
|
271
281
|
}
|
|
272
|
-
function
|
|
282
|
+
function Bt(e) {
|
|
273
283
|
return {
|
|
274
284
|
email: e.email,
|
|
275
285
|
id: e.memberId,
|
|
276
|
-
name:
|
|
286
|
+
name: p(e.name, e.email, "dot")
|
|
277
287
|
};
|
|
278
288
|
}
|
|
279
|
-
function
|
|
289
|
+
function Vt({ memberIds: e, useWebhookTarget: t, webhookUrl: n }) {
|
|
280
290
|
if (t) {
|
|
281
291
|
let e = n.trim();
|
|
282
292
|
return e ? {
|
|
@@ -301,11 +311,11 @@ function Nt({ memberIds: e, useWebhookTarget: t, webhookUrl: n }) {
|
|
|
301
311
|
valid: !1
|
|
302
312
|
};
|
|
303
313
|
}
|
|
304
|
-
function
|
|
314
|
+
function q(e) {
|
|
305
315
|
return !!e;
|
|
306
316
|
}
|
|
307
|
-
function
|
|
308
|
-
if (!
|
|
317
|
+
function Ht(e) {
|
|
318
|
+
if (!U(e)) return null;
|
|
309
319
|
let t = e.email, n = e.id, r = e.name;
|
|
310
320
|
return typeof n == "string" && typeof r == "string" ? {
|
|
311
321
|
email: typeof t == "string" ? t : null,
|
|
@@ -313,7 +323,7 @@ function Ft(e) {
|
|
|
313
323
|
name: r
|
|
314
324
|
} : null;
|
|
315
325
|
}
|
|
316
|
-
function
|
|
326
|
+
function Ut(e, t) {
|
|
317
327
|
let n = e.trim().toLocaleLowerCase();
|
|
318
328
|
if (!n) return null;
|
|
319
329
|
let r = t.filter((e) => [
|
|
@@ -323,21 +333,21 @@ function It(e, t) {
|
|
|
323
333
|
].some((e) => e.toLocaleLowerCase().includes(n)));
|
|
324
334
|
return r.length === 1 ? r[0] ?? null : null;
|
|
325
335
|
}
|
|
326
|
-
function
|
|
327
|
-
return
|
|
336
|
+
function J(e) {
|
|
337
|
+
return H(e) ? {
|
|
328
338
|
text: e,
|
|
329
339
|
type: "text"
|
|
330
340
|
} : null;
|
|
331
341
|
}
|
|
332
|
-
function
|
|
333
|
-
return
|
|
342
|
+
function Wt(e, t, n = "neutral") {
|
|
343
|
+
return H(t) ? {
|
|
334
344
|
label: e,
|
|
335
345
|
text: t,
|
|
336
346
|
tone: n,
|
|
337
347
|
type: "comment"
|
|
338
348
|
} : null;
|
|
339
349
|
}
|
|
340
|
-
function
|
|
350
|
+
function Gt(e, t, n, r) {
|
|
341
351
|
let i = t ? n.get(t) : null;
|
|
342
352
|
return {
|
|
343
353
|
email: i?.email ?? null,
|
|
@@ -350,40 +360,40 @@ function Lt(e, t, n, r) {
|
|
|
350
360
|
function Y(e) {
|
|
351
361
|
return !!e;
|
|
352
362
|
}
|
|
353
|
-
function
|
|
363
|
+
function Kt(e) {
|
|
354
364
|
let t = e.findIndex((e) => e.id.startsWith("pending-task-") || e.id.startsWith("future-node-"));
|
|
355
365
|
return t === -1 ? e.length : t;
|
|
356
366
|
}
|
|
357
|
-
function
|
|
358
|
-
return e.eventType === "INSTANCE_STARTED" || e.eventType === "INSTANCE_CANCELLED" || e.eventType === "INSTANCE_EXPIRED" || e.eventType === "INSTANCE_RESUBMITTED" || e.eventType === "TASK_DECIDED" || e.eventType === "SLA_TRIGGERED" || e.eventType === "TASK_CANDIDATE_ACTIVATED" || e.eventType === "TASK_REASSIGNED" ||
|
|
367
|
+
function qt(e) {
|
|
368
|
+
return e.eventType === "INSTANCE_STARTED" || e.eventType === "INSTANCE_CANCELLED" || e.eventType === "INSTANCE_EXPIRED" || e.eventType === "INSTANCE_RESUBMITTED" || e.eventType === "TASK_DECIDED" || e.eventType === "SLA_TRIGGERED" || e.eventType === "TASK_CANDIDATE_ACTIVATED" || e.eventType === "TASK_REASSIGNED" || X(e) || Jt(e.eventType, Qt(e));
|
|
359
369
|
}
|
|
360
|
-
function
|
|
361
|
-
return e.eventType === "TASK_CREATED" &&
|
|
370
|
+
function X(e) {
|
|
371
|
+
return e.eventType === "TASK_CREATED" && Ot(Qt(e), "sequentialCandidateMemberIds").length > 0;
|
|
362
372
|
}
|
|
363
|
-
function
|
|
373
|
+
function Z(e) {
|
|
364
374
|
if (e.eventType !== "TASK_CANDIDATE_ACTIVATED" && e.eventType !== "TASK_CREATED") return [];
|
|
365
|
-
let t =
|
|
375
|
+
let t = Qt(e);
|
|
366
376
|
return [
|
|
367
|
-
...
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
].filter(
|
|
377
|
+
...Ot(t, "sequentialCandidateMemberIds"),
|
|
378
|
+
V(t, "candidateMemberId"),
|
|
379
|
+
V(t, "previousMemberId")
|
|
380
|
+
].filter(H);
|
|
371
381
|
}
|
|
372
|
-
var
|
|
382
|
+
var Q = /* @__PURE__ */ new Set([
|
|
373
383
|
"SERVICE_TASK_EXECUTED",
|
|
374
384
|
"SERVICE_TASK_FAILED",
|
|
375
385
|
"WEBHOOK_DELIVERY_RETRIED"
|
|
376
386
|
]);
|
|
377
|
-
function
|
|
378
|
-
return
|
|
387
|
+
function Jt(e, t) {
|
|
388
|
+
return Q.has(e) && V(t, "action") === "NOTIFY_WEBHOOK";
|
|
379
389
|
}
|
|
380
|
-
function
|
|
381
|
-
return
|
|
390
|
+
function Yt(e) {
|
|
391
|
+
return V(e, "endpointLabel") ?? V(e, "endpointKey") ?? "外部系統";
|
|
382
392
|
}
|
|
383
|
-
function
|
|
393
|
+
function Xt(e) {
|
|
384
394
|
return e === "APPROVED" ? "已同意" : e === "REJECTED" ? "已拒絕" : e === "RETURNED" ? "已退回" : e === "TRANSFERRED" ? "已轉派" : "簽核已決議";
|
|
385
395
|
}
|
|
386
|
-
function
|
|
396
|
+
function Zt(e, t) {
|
|
387
397
|
if (e === "INSTANCE_STARTED") return "案件已發起";
|
|
388
398
|
if (e === "INSTANCE_CANCELLED") return "案件已取消";
|
|
389
399
|
if (e === "INSTANCE_EXPIRED") return "案件逾期,已由系統終止";
|
|
@@ -393,85 +403,102 @@ function Ut(e, t) {
|
|
|
393
403
|
if (e === "TOKEN_ADVANCED") return "流程已前進";
|
|
394
404
|
if (e === "TASK_CREATED") return "待簽任務已建立";
|
|
395
405
|
if (e === "TASK_CANDIDATE_ACTIVATED") return "輪到下一位簽核";
|
|
396
|
-
if (e === "TASK_DECIDED") return
|
|
406
|
+
if (e === "TASK_DECIDED") return Xt(V(t, "action"));
|
|
397
407
|
if (e === "SLA_TRIGGERED") return "時限提醒已觸發";
|
|
398
408
|
if (e === "TASK_REASSIGNED") return "管理者改派待辦";
|
|
399
|
-
if (
|
|
400
|
-
let n =
|
|
409
|
+
if (Jt(e, t)) {
|
|
410
|
+
let n = Yt(t);
|
|
401
411
|
return e === "SERVICE_TASK_EXECUTED" ? `已通知外部系統:${n}` : e === "SERVICE_TASK_FAILED" ? `通知外部系統失敗:${n}` : `管理者重新傳送外部系統通知:${n}`;
|
|
402
412
|
}
|
|
403
413
|
return e;
|
|
404
414
|
}
|
|
405
|
-
function
|
|
415
|
+
function Qt(e) {
|
|
406
416
|
try {
|
|
407
417
|
let t = JSON.parse(e.payloadJson);
|
|
408
|
-
return
|
|
418
|
+
return U(t) ? t : {};
|
|
409
419
|
} catch {
|
|
410
420
|
return {};
|
|
411
421
|
}
|
|
412
422
|
}
|
|
413
|
-
function
|
|
414
|
-
return e.eventType === "SLA_TRIGGERED" || e.eventType === "INSTANCE_EXPIRED" || e.eventType === "SERVICE_TASK_FAILED" &&
|
|
423
|
+
function $t(e, t) {
|
|
424
|
+
return e.eventType === "SLA_TRIGGERED" || e.eventType === "INSTANCE_EXPIRED" || e.eventType === "SERVICE_TASK_FAILED" && Jt(e.eventType, t) || V(t, "action") === "REJECTED" || V(t, "instanceState") === "REJECTED";
|
|
415
425
|
}
|
|
416
|
-
function
|
|
426
|
+
function en(e) {
|
|
417
427
|
return t(e);
|
|
418
428
|
}
|
|
419
|
-
function
|
|
420
|
-
if (e.eventType === "INSTANCE_STARTED") return
|
|
429
|
+
function tn(e, t, n, r) {
|
|
430
|
+
if (e.eventType === "INSTANCE_STARTED") return Tt({
|
|
421
431
|
initiatorMemberId: e.actorMemberId,
|
|
422
|
-
submittedByMemberId:
|
|
432
|
+
submittedByMemberId: V(t, "submittedByMemberId")
|
|
423
433
|
}, r);
|
|
424
434
|
if (e.eventType === "TASK_CANDIDATE_ACTIVATED") {
|
|
425
|
-
let e =
|
|
435
|
+
let e = V(t, "candidateMemberId"), n = V(t, "previousMemberId");
|
|
426
436
|
if (!e) return null;
|
|
427
|
-
let i =
|
|
428
|
-
return n ? `輪到:${i}(前一位:${
|
|
437
|
+
let i = K(e, r);
|
|
438
|
+
return n ? `輪到:${i}(前一位:${K(n, r)})` : `輪到:${i}`;
|
|
429
439
|
}
|
|
430
440
|
if (e.eventType === "TASK_CREATED") {
|
|
431
|
-
let e =
|
|
432
|
-
if (e.length) return `簽核順序:${e.map((e) =>
|
|
433
|
-
let n =
|
|
441
|
+
let e = Ot(t, "sequentialCandidateMemberIds");
|
|
442
|
+
if (e.length) return `簽核順序:${e.map((e) => K(e, r)).join(" → ")}`;
|
|
443
|
+
let n = V(t, "assigneeMemberId"), i = V(t, "originalAssigneeMemberId");
|
|
434
444
|
if (!n) {
|
|
435
|
-
let e =
|
|
436
|
-
return e.length ? `候選簽核人:${e.map((e) =>
|
|
445
|
+
let e = Ot(t, "candidateMemberIds");
|
|
446
|
+
return e.length ? `候選簽核人:${e.map((e) => K(e, r)).join("、")}` : null;
|
|
437
447
|
}
|
|
438
|
-
let a =
|
|
448
|
+
let a = K(n, r), o = K(i, r);
|
|
439
449
|
return i && i !== n ? `待簽人:${a}(原簽核人:${o})` : `待簽人:${a}`;
|
|
440
450
|
}
|
|
441
451
|
if (e.eventType === "TASK_DECIDED") {
|
|
442
|
-
let e =
|
|
443
|
-
return e === "REJECTED" && n ? [i, `拒絕原因:${n}`].filter(
|
|
452
|
+
let e = V(t, "action"), n = V(t, "comment"), i = e ? `決議:${G(e)}` : null, a = V(t, "transferToMemberId");
|
|
453
|
+
return e === "REJECTED" && n ? [i, `拒絕原因:${n}`].filter(H).join(" · ") : e === "APPROVED" && n ? [i, `同意說明:${n}`].filter(H).join(" · ") : e === "TRANSFERRED" ? [i, `轉派給:${K(a, r)}`].filter(H).join(" · ") : i;
|
|
444
454
|
}
|
|
445
455
|
if (e.eventType === "TOKEN_ADVANCED") {
|
|
446
|
-
let e =
|
|
447
|
-
if (e) return `流程結果:${
|
|
448
|
-
let r =
|
|
456
|
+
let e = V(t, "action");
|
|
457
|
+
if (e) return `流程結果:${G(e)}`;
|
|
458
|
+
let r = kt(t, "arrivedCount"), i = kt(t, "requiredCount");
|
|
449
459
|
if (r !== null && i !== null) return `等待匯合:${r}/${i}`;
|
|
450
|
-
let a =
|
|
451
|
-
if (a && o) return `由 ${
|
|
460
|
+
let a = V(t, "fromNodeId"), o = V(t, "toNodeId");
|
|
461
|
+
if (a && o) return `由 ${Ft(a, n)} 前進至 ${Ft(o, n)}`;
|
|
452
462
|
}
|
|
453
463
|
if (e.eventType === "ENGINE_PROCESS_REQUESTED") {
|
|
454
|
-
let e =
|
|
455
|
-
return e ? `案件狀態:${
|
|
464
|
+
let e = V(t, "state");
|
|
465
|
+
return e ? `案件狀態:${Nt(e)}` : null;
|
|
456
466
|
}
|
|
457
467
|
return null;
|
|
458
468
|
}
|
|
459
|
-
function
|
|
460
|
-
if (e.eventType === "INSTANCE_RESUBMITTED") return [
|
|
461
|
-
if (e.eventType !== "TASK_DECIDED") return [
|
|
462
|
-
let
|
|
469
|
+
function nn(e, t, n, r, i, a, o, s = null, c = null) {
|
|
470
|
+
if (e.eventType === "INSTANCE_RESUBMITTED") return [Wt("簽核意見", V(t, "comment"))].filter(Y);
|
|
471
|
+
if (e.eventType !== "TASK_DECIDED") return [J(tn(e, t, n, o))].filter(Y);
|
|
472
|
+
let l = rn(e, t, r, c), u = V(t, "action") ?? l?.action ?? null, d = V(t, "comment") ?? l?.comment ?? null, f = V(t, "transferToMemberId") ?? l?.transferToMemberId ?? null, p = V(t, "signatureId") ?? l?.signatureId ?? null, m = p ? i.get(p) : null;
|
|
463
473
|
return [
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
474
|
+
J(u ? `決議:${G(u)}` : null),
|
|
475
|
+
u === "REJECTED" ? Wt("拒絕原因", d ?? "-", "danger") : null,
|
|
476
|
+
u === "APPROVED" ? Wt("同意說明", d) : null,
|
|
477
|
+
u === "RETURNED" ? Wt("退回說明", d ?? "-") : null,
|
|
478
|
+
u === "TRANSFERRED" ? J(`轉派給:${K(f, o)}`) : null,
|
|
479
|
+
u === "TRANSFERRED" ? Wt("轉派說明", d ?? "-") : null,
|
|
480
|
+
J(on(t, s)),
|
|
481
|
+
m ? J(a?.valid ? `簽章:已驗證(${Mt(m.signedPayloadHash)})` : `簽章:待檢查(${Mt(m.signedPayloadHash)})`) : null
|
|
472
482
|
].filter(Y);
|
|
473
483
|
}
|
|
474
|
-
function
|
|
484
|
+
function rn(e, t, n, r) {
|
|
485
|
+
let i = e.taskId;
|
|
486
|
+
if (!i) return null;
|
|
487
|
+
let a = V(t, "decisionId"), o = (t) => a ? t.id === a : t.decidedByMemberId === e.actorMemberId;
|
|
488
|
+
if (!r) {
|
|
489
|
+
let e = n.get(i) ?? null;
|
|
490
|
+
return e && o(e) ? e : null;
|
|
491
|
+
}
|
|
492
|
+
return an(r.filter((e) => e.taskId === i && o(e)), new Date(e.createdAt).getTime());
|
|
493
|
+
}
|
|
494
|
+
function an(e, t) {
|
|
495
|
+
let n = (e) => Math.abs(d(e) - t), r = (e, t) => {
|
|
496
|
+
let r = n(e) - n(t);
|
|
497
|
+
return r < 0 || !(r > 0) && f(e, t) < 0;
|
|
498
|
+
};
|
|
499
|
+
return e.reduce((e, t) => !e || r(t, e) ? t : e, null);
|
|
500
|
+
}
|
|
501
|
+
function on(e, t) {
|
|
475
502
|
let n = e.changedFieldKeys;
|
|
476
503
|
if (!Array.isArray(n)) return null;
|
|
477
504
|
let r = n.filter((e) => typeof e == "string" && e !== "");
|
|
@@ -479,94 +506,94 @@ function Yt(e, t) {
|
|
|
479
506
|
let i = r.map((e) => t?.fields.find((t) => t.fieldKey === e)?.label || e);
|
|
480
507
|
return `補填 ${r.length} 個欄位:${i.join("、")}`;
|
|
481
508
|
}
|
|
482
|
-
function
|
|
509
|
+
function sn(e, t, n, r, i) {
|
|
483
510
|
if (e.type === "startEvent" || i.has(e.id)) return !1;
|
|
484
511
|
if (r === "REJECTED") return !0;
|
|
485
|
-
let a =
|
|
512
|
+
let a = _n(e, t, n, r);
|
|
486
513
|
return a.tone === "neutral" || a.tone === "waiting";
|
|
487
514
|
}
|
|
488
|
-
function
|
|
515
|
+
function cn(e, t, n, r, i) {
|
|
489
516
|
if (r !== "RUNNING" && r !== "REJECTED") return [];
|
|
490
|
-
let a = e.nodes.filter((e) =>
|
|
517
|
+
let a = e.nodes.filter((e) => sn(e, t, n, r, i)), o = ln(e, a, t, n, i), s = new Map(e.nodes.map((e, t) => [e.id, t]));
|
|
491
518
|
return a.filter((e) => o.has(e.id)).sort((e, t) => {
|
|
492
519
|
let n = o.get(e.id) ?? 0, r = o.get(t.id) ?? 0;
|
|
493
520
|
return n === r ? e.position.x === t.position.x ? e.position.y === t.position.y ? (s.get(e.id) ?? 0) - (s.get(t.id) ?? 0) : e.position.y - t.position.y : e.position.x - t.position.x : n - r;
|
|
494
521
|
});
|
|
495
522
|
}
|
|
496
|
-
function
|
|
523
|
+
function ln(e, t, n, r, i) {
|
|
497
524
|
let a = new Set(t.map((e) => e.id)), o = e.edges.reduce((e, t) => {
|
|
498
525
|
let n = [...e.get(t.source) ?? [], t.target];
|
|
499
526
|
return new Map(e).set(t.source, n);
|
|
500
527
|
}, /* @__PURE__ */ new Map());
|
|
501
|
-
return
|
|
528
|
+
return un(e, n, r, i).reduce((e, t) => pn(e, dn(t, o, a)), /* @__PURE__ */ new Map());
|
|
502
529
|
}
|
|
503
|
-
function
|
|
504
|
-
let i = n.filter((e) => e.status === "ACTIVE" || e.status === "WAITING").map((e) => e.currentNodeId), a = t.filter(
|
|
530
|
+
function un(e, t, n, r) {
|
|
531
|
+
let i = n.filter((e) => e.status === "ACTIVE" || e.status === "WAITING").map((e) => e.currentNodeId), a = t.filter(At).map((e) => e.nodeId), o = e.nodes.filter((e) => r.has(e.id)).map((e) => e.id), s = [.../* @__PURE__ */ new Set([
|
|
505
532
|
...i,
|
|
506
533
|
...a,
|
|
507
534
|
...o
|
|
508
535
|
])], c = e.nodes.filter((e) => e.type === "startEvent").map((e) => e.id);
|
|
509
536
|
return s.length > 0 ? s : c;
|
|
510
537
|
}
|
|
511
|
-
function
|
|
512
|
-
return
|
|
538
|
+
function dn(e, t, n) {
|
|
539
|
+
return fn([{
|
|
513
540
|
distance: 0,
|
|
514
541
|
nodeId: e
|
|
515
542
|
}], t, n);
|
|
516
543
|
}
|
|
517
|
-
function
|
|
544
|
+
function fn(e, t, n, r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map()) {
|
|
518
545
|
let [a, ...o] = e;
|
|
519
546
|
if (!a) return i;
|
|
520
|
-
if (r.has(a.nodeId)) return
|
|
547
|
+
if (r.has(a.nodeId)) return fn(o, t, n, r, i);
|
|
521
548
|
let s = new Set(r).add(a.nodeId), c = n.has(a.nodeId) ? new Map(i).set(a.nodeId, Math.min(i.get(a.nodeId) ?? a.distance, a.distance)) : i;
|
|
522
|
-
return
|
|
549
|
+
return fn([...o, ...(t.get(a.nodeId) ?? []).map((e) => ({
|
|
523
550
|
distance: a.distance + 1,
|
|
524
551
|
nodeId: e
|
|
525
552
|
}))], t, n, s, c);
|
|
526
553
|
}
|
|
527
|
-
function
|
|
554
|
+
function pn(e, t) {
|
|
528
555
|
return [...t.entries()].reduce((e, [t, n]) => new Map(e).set(t, Math.min(e.get(t) ?? n, n)), e);
|
|
529
556
|
}
|
|
530
|
-
function
|
|
557
|
+
function mn(e) {
|
|
531
558
|
return e.type === "userTask" ? `未來簽核:${e.data.label}` : e.type === "serviceTask" ? `未來知會:${e.data.label}` : e.type === "exclusiveGateway" ? `未來分流:${e.data.label}` : e.type === "parallelGateway" ? `未來匯合:${e.data.label}` : e.type === "endEvent" ? `流程完成:${e.data.label}` : `未來節點:${e.data.label}`;
|
|
532
559
|
}
|
|
533
|
-
function
|
|
534
|
-
let
|
|
535
|
-
let t =
|
|
560
|
+
function hn(e, t, n, r, i, a, o, s, c, u = null, d = null) {
|
|
561
|
+
let f = d ? l(d) : null, p = e.filter(qt).map((e) => {
|
|
562
|
+
let t = Qt(e), n = e.nodeId ? Ft(e.nodeId, r) : null;
|
|
536
563
|
return {
|
|
537
564
|
descriptionParts: [
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
...
|
|
565
|
+
J(n ? `節點:${n}` : "節點:全流程"),
|
|
566
|
+
Gt("操作者", e.actorMemberId, a, "系統"),
|
|
567
|
+
J(`時間:${en(e.createdAt)}`),
|
|
568
|
+
...nn(e, t, r, o, s, c, a, u, f ? f.get(e.taskId ?? "") ?? [] : null)
|
|
542
569
|
].filter(Y),
|
|
543
|
-
error:
|
|
570
|
+
error: $t(e, t),
|
|
544
571
|
id: e.id,
|
|
545
|
-
title:
|
|
572
|
+
title: Zt(e.eventType, t)
|
|
546
573
|
};
|
|
547
|
-
}),
|
|
574
|
+
}), m = t.filter(At).map((e) => ({
|
|
548
575
|
descriptionParts: [
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
576
|
+
J(`節點:${Ft(e.nodeId, r)}`),
|
|
577
|
+
Gt("處理者", e.assigneeMemberId, a, "未指定"),
|
|
578
|
+
J(`建立時間:${en(e.createdAt)}`)
|
|
552
579
|
].filter(Y),
|
|
553
580
|
error: !1,
|
|
554
581
|
id: `pending-task-${e.id}`,
|
|
555
582
|
title: e.status === "IN_PROGRESS" ? "簽核處理中" : "等待簽核處理"
|
|
556
|
-
})),
|
|
557
|
-
descriptionParts: [
|
|
583
|
+
})), h = new Set([...e.filter(qt).map((e) => e.nodeId), ...t.map((e) => e.nodeId)].filter(H)), g = r ? cn(r, t, n, i, h).map((e) => ({
|
|
584
|
+
descriptionParts: [J(`${Pt(e.type)} · 尚未抵達`)].filter(Y),
|
|
558
585
|
error: !1,
|
|
559
586
|
forcePending: !0,
|
|
560
587
|
id: `future-node-${e.id}`,
|
|
561
|
-
title:
|
|
588
|
+
title: mn(e)
|
|
562
589
|
})) : [];
|
|
563
590
|
return [
|
|
564
|
-
...
|
|
565
|
-
...
|
|
566
|
-
...
|
|
591
|
+
...p,
|
|
592
|
+
...m,
|
|
593
|
+
...g
|
|
567
594
|
];
|
|
568
595
|
}
|
|
569
|
-
var
|
|
596
|
+
var gn = {
|
|
570
597
|
APPROVED: {
|
|
571
598
|
statusLabel: "已完成",
|
|
572
599
|
tone: "completed"
|
|
@@ -584,20 +611,20 @@ var on = {
|
|
|
584
611
|
tone: "cancelled"
|
|
585
612
|
}
|
|
586
613
|
};
|
|
587
|
-
function
|
|
614
|
+
function _n(e, t, n, r) {
|
|
588
615
|
let i = t.filter((t) => t.nodeId === e.id), a = i.find((e) => e.status === "PENDING" || e.status === "IN_PROGRESS"), o = i.find((e) => e.status === "CANCELLED"), s = i.find((e) => e.status === "COMPLETED"), c = n.filter((t) => t.currentNodeId === e.id), l = c.find((e) => e.status === "ACTIVE"), u = c.find((e) => e.status === "WAITING");
|
|
589
616
|
if (a) return {
|
|
590
|
-
secondaryLabel: `處理者 ${
|
|
617
|
+
secondaryLabel: `處理者 ${It(a)}`,
|
|
591
618
|
statusLabel: "待處理",
|
|
592
619
|
tone: "current"
|
|
593
620
|
};
|
|
594
621
|
if (o) return {
|
|
595
|
-
secondaryLabel: `已取消 ${
|
|
622
|
+
secondaryLabel: `已取消 ${It(o)}`,
|
|
596
623
|
statusLabel: "已取消",
|
|
597
624
|
tone: "cancelled"
|
|
598
625
|
};
|
|
599
626
|
if (s) return {
|
|
600
|
-
secondaryLabel: `已完成 ${
|
|
627
|
+
secondaryLabel: `已完成 ${It(s)}`,
|
|
601
628
|
statusLabel: "已完成",
|
|
602
629
|
tone: "completed"
|
|
603
630
|
};
|
|
@@ -616,64 +643,56 @@ function sn(e, t, n, r) {
|
|
|
616
643
|
statusLabel: "已發起",
|
|
617
644
|
tone: "completed"
|
|
618
645
|
};
|
|
619
|
-
let d = e.type === "endEvent" ?
|
|
646
|
+
let d = e.type === "endEvent" ? gn[r] : void 0;
|
|
620
647
|
return d ? {
|
|
621
648
|
...d,
|
|
622
649
|
secondaryLabel: r
|
|
623
650
|
} : {
|
|
624
|
-
secondaryLabel:
|
|
651
|
+
secondaryLabel: Pt(e.type),
|
|
625
652
|
statusLabel: "未抵達",
|
|
626
653
|
tone: "neutral"
|
|
627
654
|
};
|
|
628
655
|
}
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
async function cn({ activityLogs: e, adhocDirectives: t = [], instance: n, tasks: r }) {
|
|
656
|
+
// src/views/instances/detail/sections/container-helpers.ts
|
|
657
|
+
async function vn({ activityLogs: e, adhocDirectives: t = [], instance: n, tasks: r }) {
|
|
632
658
|
let i = [...new Set([
|
|
633
659
|
n?.initiatorMemberId ?? null,
|
|
634
660
|
n?.submittedByMemberId ?? null,
|
|
635
661
|
...e.map((e) => e.actorMemberId),
|
|
636
|
-
...e.flatMap(
|
|
662
|
+
...e.flatMap(Z),
|
|
637
663
|
...r.map((e) => e.assigneeMemberId),
|
|
638
664
|
...r.map((e) => e.originalAssigneeMemberId),
|
|
639
665
|
...r.flatMap((e) => e.candidateMemberIds),
|
|
640
|
-
...r.flatMap((e) =>
|
|
641
|
-
...t.flatMap((e) => [e.createdByMemberId, ...
|
|
642
|
-
].filter(
|
|
666
|
+
...r.flatMap((e) => Dt(e.delegationChainJson).flatMap((e) => [e.from, e.to])),
|
|
667
|
+
...t.flatMap((e) => [e.createdByMemberId, ...yn(e.targetValueJson)])
|
|
668
|
+
].filter(H))];
|
|
643
669
|
try {
|
|
644
|
-
return await
|
|
670
|
+
return await ze(i);
|
|
645
671
|
} catch {
|
|
646
672
|
return [];
|
|
647
673
|
}
|
|
648
674
|
}
|
|
649
|
-
function
|
|
675
|
+
function yn(e) {
|
|
650
676
|
try {
|
|
651
677
|
return (JSON.parse(e).memberIds ?? []).filter((e) => typeof e == "string");
|
|
652
678
|
} catch {
|
|
653
679
|
return [];
|
|
654
680
|
}
|
|
655
681
|
}
|
|
656
|
-
async function
|
|
657
|
-
return (await Promise.all(e.map((e) =>
|
|
658
|
-
}
|
|
659
|
-
function dn(e) {
|
|
660
|
-
return e.reduce((e, t) => {
|
|
661
|
-
let n = e.get(t.taskId), r = !n || new Date(t.decidedAt).getTime() > new Date(n.decidedAt).getTime() ? t : n;
|
|
662
|
-
return new Map(e).set(t.taskId, r);
|
|
663
|
-
}, /* @__PURE__ */ new Map());
|
|
682
|
+
async function bn(e) {
|
|
683
|
+
return (await Promise.all(e.map((e) => A(e.id)))).flat();
|
|
664
684
|
}
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
let [t, n] = y({
|
|
685
|
+
// src/views/instances/detail/use-resubmit-comment-draft.ts
|
|
686
|
+
function xn(e) {
|
|
687
|
+
let [t, n] = S({
|
|
669
688
|
instanceId: e,
|
|
670
689
|
text: ""
|
|
671
|
-
}), r =
|
|
690
|
+
}), r = se((t) => n({
|
|
672
691
|
instanceId: e,
|
|
673
692
|
text: t
|
|
674
693
|
}), [e]);
|
|
675
694
|
return {
|
|
676
|
-
clearAfterResubmit:
|
|
695
|
+
clearAfterResubmit: se((e) => n((t) => t.instanceId === e ? {
|
|
677
696
|
instanceId: e,
|
|
678
697
|
text: ""
|
|
679
698
|
} : t), []),
|
|
@@ -681,111 +700,113 @@ function fn(e) {
|
|
|
681
700
|
setComment: r
|
|
682
701
|
};
|
|
683
702
|
}
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
var pn = {
|
|
703
|
+
// src/views/instances/detail/sections/InstanceFormSection.tsx
|
|
704
|
+
var Sn = {
|
|
687
705
|
display: "grid",
|
|
688
706
|
gap: 16
|
|
689
|
-
},
|
|
707
|
+
}, $ = {
|
|
690
708
|
display: "flex",
|
|
691
709
|
flexWrap: "wrap",
|
|
692
710
|
gap: 8
|
|
693
|
-
},
|
|
711
|
+
}, Cn = 2e3, wn = {
|
|
694
712
|
minWidth: "100%",
|
|
695
713
|
width: "100%"
|
|
696
714
|
};
|
|
697
|
-
function
|
|
715
|
+
function Tn(e) {
|
|
698
716
|
e && (e.style.width = "100%");
|
|
699
717
|
}
|
|
700
|
-
function
|
|
701
|
-
let
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
]),
|
|
707
|
-
return /* @__PURE__ */
|
|
708
|
-
style:
|
|
718
|
+
function En({ attachments: t, canResubmitInstance: n, deciding: r, error: i, fieldAccess: a, fieldLabelMarkers: o, fill: c = null, instance: l, loading: u, onDataSourceStateChange: d, onDownloadAttachment: f, onFileUploadStateChange: p, onResubmitFormChange: m, onReloadAfterConflict: h = null, onResubmitCommentChange: g = null, onResubmitInstance: ee, onUploadAttachment: te, resubmitComment: ne = "", resubmitFormData: re, resubmitFormErrors: ie }) {
|
|
719
|
+
let oe = l?.formDefinitionSnapshot.schema, _ = l?.workflowSnapshot, v = x(() => n && oe && _ ? ae(oe, _) : c?.schema ?? oe, [
|
|
720
|
+
n,
|
|
721
|
+
c?.schema,
|
|
722
|
+
oe,
|
|
723
|
+
_
|
|
724
|
+
]), y = !n && c !== null;
|
|
725
|
+
return /* @__PURE__ */ k("div", {
|
|
726
|
+
style: Sn,
|
|
709
727
|
children: [
|
|
710
|
-
|
|
728
|
+
i ? /* @__PURE__ */ O(D, {
|
|
711
729
|
color: "text-error",
|
|
712
730
|
variant: "body",
|
|
713
|
-
children:
|
|
731
|
+
children: i
|
|
714
732
|
}) : null,
|
|
715
|
-
|
|
733
|
+
u ? /* @__PURE__ */ O(D, {
|
|
716
734
|
color: "text-neutral",
|
|
717
735
|
variant: "body",
|
|
718
736
|
children: "載入中..."
|
|
719
737
|
}) : null,
|
|
720
|
-
|
|
721
|
-
style:
|
|
722
|
-
children: [/* @__PURE__ */
|
|
738
|
+
h ? /* @__PURE__ */ k("div", {
|
|
739
|
+
style: Sn,
|
|
740
|
+
children: [/* @__PURE__ */ O(me, {
|
|
723
741
|
content: "表單在你填寫期間被更新了,你填的內容還在。請重新載入後確認再同意。",
|
|
724
742
|
severity: "error"
|
|
725
|
-
}), /* @__PURE__ */
|
|
726
|
-
style:
|
|
727
|
-
children: /* @__PURE__ */
|
|
728
|
-
disabled:
|
|
729
|
-
icon:
|
|
743
|
+
}), /* @__PURE__ */ O("div", {
|
|
744
|
+
style: $,
|
|
745
|
+
children: /* @__PURE__ */ O(C, {
|
|
746
|
+
disabled: u,
|
|
747
|
+
icon: Ze,
|
|
730
748
|
iconType: "leading",
|
|
731
|
-
onClick:
|
|
749
|
+
onClick: h,
|
|
732
750
|
variant: "base-secondary",
|
|
733
751
|
children: "重新載入"
|
|
734
752
|
})
|
|
735
753
|
})]
|
|
736
754
|
}) : null,
|
|
737
|
-
|
|
738
|
-
content: `本關需要你補填 ${
|
|
755
|
+
y && c.fieldCount > 0 ? /* @__PURE__ */ O(me, {
|
|
756
|
+
content: `本關需要你補填 ${c.fieldCount} 個欄位,按「同意」時會一起送出並納入簽章。`,
|
|
739
757
|
severity: "info"
|
|
740
758
|
}) : null,
|
|
741
|
-
|
|
742
|
-
/* @__PURE__ */
|
|
743
|
-
|
|
744
|
-
|
|
759
|
+
v && l?.formDefinitionSnapshot.uiSchema ? /* @__PURE__ */ k(we, { children: [
|
|
760
|
+
/* @__PURE__ */ O(s, {
|
|
761
|
+
attachments: t,
|
|
762
|
+
dataSourceContext: n ? {
|
|
763
|
+
instanceId: l.id,
|
|
745
764
|
kind: "runtime"
|
|
746
765
|
} : void 0,
|
|
747
|
-
dataSourceInitialValues:
|
|
748
|
-
errors:
|
|
749
|
-
...!
|
|
750
|
-
...!
|
|
766
|
+
dataSourceInitialValues: l.formData,
|
|
767
|
+
errors: y ? c.errors : ie,
|
|
768
|
+
...!n && a ? { fieldAccess: a } : {},
|
|
769
|
+
...!n && o ? { fieldLabelMarkers: o } : {},
|
|
751
770
|
onChange: (e) => {
|
|
752
|
-
|
|
771
|
+
y ? c.onChange(e) : m(e);
|
|
753
772
|
},
|
|
754
|
-
onDataSourceStateChange:
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
773
|
+
onDataSourceStateChange: d,
|
|
774
|
+
onDownloadAttachment: f,
|
|
775
|
+
onFileUploadStateChange: p,
|
|
776
|
+
onUploadAttachment: n ? te : void 0,
|
|
777
|
+
optionSnapshots: l.formDataOptionSnapshot,
|
|
778
|
+
readonly: !n,
|
|
779
|
+
schema: v,
|
|
780
|
+
uiSchema: l.formDefinitionSnapshot.uiSchema,
|
|
781
|
+
value: n ? re : y ? c.value : l.formData
|
|
761
782
|
}),
|
|
762
|
-
|
|
783
|
+
n && g ? /* @__PURE__ */ O(e, {
|
|
763
784
|
label: "簽核意見",
|
|
764
785
|
name: "resubmitComment",
|
|
765
|
-
children: /* @__PURE__ */
|
|
766
|
-
disabled:
|
|
767
|
-
onChange: (e) =>
|
|
786
|
+
children: /* @__PURE__ */ O(Se, {
|
|
787
|
+
disabled: r,
|
|
788
|
+
onChange: (e) => g(e.target.value),
|
|
768
789
|
placeholder: "選填,例如說明這次補正或修改了哪些內容",
|
|
769
|
-
maxLength:
|
|
770
|
-
ref:
|
|
790
|
+
maxLength: Cn,
|
|
791
|
+
ref: Tn,
|
|
771
792
|
resize: "vertical",
|
|
772
793
|
rows: 4,
|
|
773
|
-
style:
|
|
774
|
-
value:
|
|
794
|
+
style: wn,
|
|
795
|
+
value: ne
|
|
775
796
|
})
|
|
776
797
|
}) : null,
|
|
777
|
-
|
|
778
|
-
style:
|
|
779
|
-
children: /* @__PURE__ */
|
|
780
|
-
disabled:
|
|
781
|
-
icon:
|
|
798
|
+
n ? /* @__PURE__ */ O("div", {
|
|
799
|
+
style: $,
|
|
800
|
+
children: /* @__PURE__ */ O(C, {
|
|
801
|
+
disabled: r,
|
|
802
|
+
icon: Ze,
|
|
782
803
|
iconType: "leading",
|
|
783
804
|
onClick: ee,
|
|
784
805
|
variant: "base-primary",
|
|
785
806
|
children: "重新送出"
|
|
786
807
|
})
|
|
787
808
|
}) : null
|
|
788
|
-
] }) : /* @__PURE__ */
|
|
809
|
+
] }) : /* @__PURE__ */ O(D, {
|
|
789
810
|
color: "text-neutral",
|
|
790
811
|
variant: "body",
|
|
791
812
|
children: "此案件沒有可顯示的表單快照。"
|
|
@@ -793,22 +814,21 @@ function vn({ canResubmitInstance: e, deciding: t, error: r, fieldAccess: i, fie
|
|
|
793
814
|
]
|
|
794
815
|
});
|
|
795
816
|
}
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
var $ = {
|
|
817
|
+
// src/views/instances/detail/sections/InstanceAttachmentsSection.tsx
|
|
818
|
+
var Dn = {
|
|
799
819
|
display: "grid",
|
|
800
820
|
gap: 16
|
|
801
821
|
};
|
|
802
|
-
function
|
|
803
|
-
let i =
|
|
822
|
+
function On({ attachments: e, onDownload: n, onPreview: r }) {
|
|
823
|
+
let i = x(() => e.map((e) => ({
|
|
804
824
|
attachment: e,
|
|
805
825
|
createdAt: e.createdAt,
|
|
806
826
|
filename: e.filename,
|
|
807
827
|
id: e.id,
|
|
808
828
|
key: e.id,
|
|
809
829
|
mimeType: e.mimeType,
|
|
810
|
-
sizeLabel:
|
|
811
|
-
})), [e]), a =
|
|
830
|
+
sizeLabel: jt(Number(e.sizeBytes))
|
|
831
|
+
})), [e]), a = x(() => [
|
|
812
832
|
{
|
|
813
833
|
dataIndex: "filename",
|
|
814
834
|
key: "filename",
|
|
@@ -829,7 +849,7 @@ function yn({ attachments: e, onDownload: n, onPreview: r }) {
|
|
|
829
849
|
},
|
|
830
850
|
{
|
|
831
851
|
key: "createdAt",
|
|
832
|
-
render: (e) => /* @__PURE__ */
|
|
852
|
+
render: (e) => /* @__PURE__ */ O(D, {
|
|
833
853
|
component: "span",
|
|
834
854
|
variant: "body",
|
|
835
855
|
children: t(e.createdAt)
|
|
@@ -837,16 +857,16 @@ function yn({ attachments: e, onDownload: n, onPreview: r }) {
|
|
|
837
857
|
title: "上傳時間",
|
|
838
858
|
width: 220
|
|
839
859
|
}
|
|
840
|
-
], []), o =
|
|
860
|
+
], []), o = x(() => ({
|
|
841
861
|
render: (e) => [...e.mimeType === "application/pdf" ? [{
|
|
842
|
-
icon:
|
|
862
|
+
icon: Je,
|
|
843
863
|
iconType: "leading",
|
|
844
864
|
name: "預覽",
|
|
845
865
|
onClick: () => {
|
|
846
866
|
r(e.attachment);
|
|
847
867
|
}
|
|
848
868
|
}] : [], {
|
|
849
|
-
icon:
|
|
869
|
+
icon: M,
|
|
850
870
|
iconType: "leading",
|
|
851
871
|
name: "下載",
|
|
852
872
|
onClick: () => {
|
|
@@ -856,83 +876,82 @@ function yn({ attachments: e, onDownload: n, onPreview: r }) {
|
|
|
856
876
|
variant: "base-secondary",
|
|
857
877
|
width: 160
|
|
858
878
|
}), [n, r]);
|
|
859
|
-
return /* @__PURE__ */
|
|
860
|
-
style:
|
|
861
|
-
children: [/* @__PURE__ */
|
|
879
|
+
return /* @__PURE__ */ k("div", {
|
|
880
|
+
style: Dn,
|
|
881
|
+
children: [/* @__PURE__ */ O(D, {
|
|
862
882
|
component: "h2",
|
|
863
883
|
variant: "h3",
|
|
864
884
|
children: "附件"
|
|
865
|
-
}), i.length > 0 ? /* @__PURE__ */
|
|
885
|
+
}), i.length > 0 ? /* @__PURE__ */ O(xe, {
|
|
866
886
|
actions: o,
|
|
867
887
|
columns: a,
|
|
868
888
|
dataSource: i,
|
|
869
889
|
fullWidth: !0
|
|
870
|
-
}) : /* @__PURE__ */
|
|
890
|
+
}) : /* @__PURE__ */ O(D, {
|
|
871
891
|
color: "text-neutral",
|
|
872
892
|
variant: "body",
|
|
873
893
|
children: "此案件沒有附件。"
|
|
874
894
|
})]
|
|
875
895
|
});
|
|
876
896
|
}
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
var bn = {
|
|
897
|
+
// src/views/instances/detail/sections/InstanceTasksSection.tsx
|
|
898
|
+
var kn = {
|
|
880
899
|
display: "grid",
|
|
881
900
|
gap: 12,
|
|
882
901
|
width: "100%"
|
|
883
|
-
},
|
|
902
|
+
}, An = {
|
|
884
903
|
minWidth: "100%",
|
|
885
904
|
width: "100%"
|
|
886
|
-
},
|
|
905
|
+
}, jn = {
|
|
887
906
|
display: "grid",
|
|
888
907
|
gap: 12,
|
|
889
908
|
width: "100%"
|
|
890
|
-
},
|
|
891
|
-
function
|
|
909
|
+
}, Mn = { marginTop: 12 }, Nn = { marginTop: 24 };
|
|
910
|
+
function Pn(e) {
|
|
892
911
|
e && (e.style.width = "100%");
|
|
893
912
|
}
|
|
894
|
-
var
|
|
913
|
+
var Fn = {
|
|
895
914
|
COMPLETION_NOTIFY: "結案通知",
|
|
896
915
|
COUNTERSIGN: "臨時會簽",
|
|
897
916
|
PRE_APPROVAL: "臨時加簽",
|
|
898
917
|
STAGE_NOTIFY: "階段完成通知"
|
|
899
|
-
},
|
|
918
|
+
}, In = {
|
|
900
919
|
COMPLETION_NOTIFY: "本張單到達結案狀態(核准 / 拒絕 / 取消)後,通知指定對象。",
|
|
901
920
|
COUNTERSIGN: "指定對象會併入下一層簽核,下一層需所有人都完成才會繼續。",
|
|
902
921
|
PRE_APPROVAL: "指定對象需先完成加簽,本階段才會往下一層繼續。",
|
|
903
922
|
STAGE_NOTIFY: "本階段完成後(不論通過與否)通知指定對象。"
|
|
904
|
-
},
|
|
923
|
+
}, Ln = [{
|
|
905
924
|
id: "REJECT_INSTANCE",
|
|
906
925
|
name: "加簽拒絕時整單駁回"
|
|
907
926
|
}, {
|
|
908
927
|
id: "RETURN_TO_ORIGIN",
|
|
909
928
|
name: "加簽拒絕時退回給我重新處理"
|
|
910
|
-
}],
|
|
929
|
+
}], Rn = [{
|
|
911
930
|
id: "MEMBER",
|
|
912
931
|
name: "指定成員"
|
|
913
932
|
}, {
|
|
914
933
|
id: "WEBHOOK",
|
|
915
934
|
name: "Webhook"
|
|
916
|
-
}],
|
|
917
|
-
let [p,
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
}, [p,
|
|
921
|
-
let [
|
|
935
|
+
}], zn = b(function({ adhocDirectives: n, currentMemberId: r, fill: i = null, instance: a, memberProfilesById: o, onChanged: s, onDecidingChange: c, onFillApproveError: l, tasks: d }, f) {
|
|
936
|
+
let [p, m] = S(!1), [h, g] = S(null);
|
|
937
|
+
ce(() => {
|
|
938
|
+
c?.(p);
|
|
939
|
+
}, [p, c]);
|
|
940
|
+
let [ee, te] = S(""), [ne, re] = S(!1), [ie, ae] = S(""), [oe, v] = S(null), [y, b] = S(!1), [se, ue] = S(""), [me, ge] = S(!1), [_e, E] = S(null), [ve, be] = S(""), [Ce, Ee] = S(null), [Ae, je] = S(!1), [A, Me] = S([]), [Ne, Pe] = S(!1), [Fe, Ie] = S(""), [ze, Be] = S([]), [Ve, Ue] = S(!1), [We, Ge] = S([]), [Ke, qe] = S(!1), [j, M] = S("COUNTERSIGN"), [Je, Ye] = S("REJECT_INSTANCE"), [Xe, Ze] = S(!1), [Qe, $e] = S("MEMBER"), [et, tt] = S(""), N = ie.trim(), nt = se.trim(), rt = ve.trim(), P = x(() => Rt(d, r), [r, d]), F = x(() => P && a ? a.workflowSnapshot.nodes.find((e) => e.id === P.nodeId) ?? null : null, [P, a]), it = x(() => F && a ? zt(a.workflowSnapshot, F) : [], [F, a]), at = F?.type === "userTask" && F.data.returnBehavior.allowReturn, ot = F?.type === "userTask" && F.data.allowReject !== !1, st = F?.type === "userTask" && F.data.allowTransfer !== !1, ct = F?.type === "userTask" && F.data.returnBehavior.requireComment === !0, lt = F?.type === "userTask" && F.data.allowAddSigner, ut = x(() => n.filter((e) => e.status === "PENDING"), [n]), I = it.find((e) => e.id === _e) ?? it[0] ?? null, dt = x(() => d.map((e) => ({
|
|
922
941
|
...e,
|
|
923
|
-
assigneeLabel:
|
|
924
|
-
fillFieldCount:
|
|
942
|
+
assigneeLabel: It(e, o),
|
|
943
|
+
fillFieldCount: Vn(e, a?.workflowSnapshot ?? null),
|
|
925
944
|
key: e.id,
|
|
926
|
-
nodeLabel:
|
|
945
|
+
nodeLabel: u({
|
|
927
946
|
...e,
|
|
928
|
-
nodeLabel:
|
|
947
|
+
nodeLabel: Ft(e.nodeId, a?.workflowSnapshot ?? null)
|
|
929
948
|
}),
|
|
930
|
-
statusLabel:
|
|
949
|
+
statusLabel: W(e.status)
|
|
931
950
|
})), [
|
|
951
|
+
a,
|
|
932
952
|
o,
|
|
933
|
-
s,
|
|
934
953
|
d
|
|
935
|
-
]),
|
|
954
|
+
]), ft = x(() => [
|
|
936
955
|
{
|
|
937
956
|
dataIndex: "nodeLabel",
|
|
938
957
|
key: "nodeLabel",
|
|
@@ -942,7 +961,7 @@ var En = {
|
|
|
942
961
|
{
|
|
943
962
|
key: "assigneeMemberId",
|
|
944
963
|
title: "處理者",
|
|
945
|
-
render: (e) => /* @__PURE__ */
|
|
964
|
+
render: (e) => /* @__PURE__ */ O(D, {
|
|
946
965
|
component: "span",
|
|
947
966
|
variant: "body",
|
|
948
967
|
children: e.assigneeLabel
|
|
@@ -957,7 +976,7 @@ var En = {
|
|
|
957
976
|
},
|
|
958
977
|
{
|
|
959
978
|
key: "fill",
|
|
960
|
-
render: (e) => e.fillFieldCount > 0 ? /* @__PURE__ */
|
|
979
|
+
render: (e) => e.fillFieldCount > 0 ? /* @__PURE__ */ O(fe, {
|
|
961
980
|
size: "sub",
|
|
962
981
|
text: `需補填 ${e.fillFieldCount} 欄`,
|
|
963
982
|
variant: "dot-warning"
|
|
@@ -967,7 +986,7 @@ var En = {
|
|
|
967
986
|
},
|
|
968
987
|
{
|
|
969
988
|
key: "createdAt",
|
|
970
|
-
render: (e) => /* @__PURE__ */
|
|
989
|
+
render: (e) => /* @__PURE__ */ O(D, {
|
|
971
990
|
component: "span",
|
|
972
991
|
variant: "body",
|
|
973
992
|
children: t(e.createdAt)
|
|
@@ -975,13 +994,13 @@ var En = {
|
|
|
975
994
|
title: "建立時間",
|
|
976
995
|
width: 220
|
|
977
996
|
}
|
|
978
|
-
], []),
|
|
997
|
+
], []), pt = x(() => ut.map((e) => ({
|
|
979
998
|
...e,
|
|
980
|
-
createdByLabel:
|
|
999
|
+
createdByLabel: K(e.createdByMemberId, o),
|
|
981
1000
|
key: e.id,
|
|
982
|
-
targetLabel:
|
|
983
|
-
typeLabel:
|
|
984
|
-
})), [
|
|
1001
|
+
targetLabel: Bn(e, o),
|
|
1002
|
+
typeLabel: Fn[e.type]
|
|
1003
|
+
})), [o, ut]), mt = x(() => [
|
|
985
1004
|
{
|
|
986
1005
|
dataIndex: "typeLabel",
|
|
987
1006
|
key: "typeLabel",
|
|
@@ -990,7 +1009,7 @@ var En = {
|
|
|
990
1009
|
},
|
|
991
1010
|
{
|
|
992
1011
|
key: "targetLabel",
|
|
993
|
-
render: (e) => /* @__PURE__ */
|
|
1012
|
+
render: (e) => /* @__PURE__ */ O(D, {
|
|
994
1013
|
component: "span",
|
|
995
1014
|
variant: "body",
|
|
996
1015
|
children: e.targetLabel
|
|
@@ -1000,7 +1019,7 @@ var En = {
|
|
|
1000
1019
|
},
|
|
1001
1020
|
{
|
|
1002
1021
|
key: "createdByLabel",
|
|
1003
|
-
render: (e) => /* @__PURE__ */
|
|
1022
|
+
render: (e) => /* @__PURE__ */ O(D, {
|
|
1004
1023
|
component: "span",
|
|
1005
1024
|
variant: "body",
|
|
1006
1025
|
children: e.createdByLabel
|
|
@@ -1010,7 +1029,7 @@ var En = {
|
|
|
1010
1029
|
},
|
|
1011
1030
|
{
|
|
1012
1031
|
key: "createdAt",
|
|
1013
|
-
render: (e) => /* @__PURE__ */
|
|
1032
|
+
render: (e) => /* @__PURE__ */ O(D, {
|
|
1014
1033
|
component: "span",
|
|
1015
1034
|
variant: "body",
|
|
1016
1035
|
children: t(e.createdAt)
|
|
@@ -1020,279 +1039,279 @@ var En = {
|
|
|
1020
1039
|
},
|
|
1021
1040
|
{
|
|
1022
1041
|
key: "actions",
|
|
1023
|
-
render: (e) => e.createdByMemberId === r ? /* @__PURE__ */
|
|
1042
|
+
render: (e) => e.createdByMemberId === r ? /* @__PURE__ */ O(C, {
|
|
1024
1043
|
disabled: Xe,
|
|
1025
|
-
onClick: () => void
|
|
1044
|
+
onClick: () => void kt(e.id),
|
|
1026
1045
|
size: "minor",
|
|
1027
1046
|
variant: "destructive-secondary",
|
|
1028
1047
|
children: "撤回"
|
|
1029
|
-
}) : /* @__PURE__ */
|
|
1048
|
+
}) : /* @__PURE__ */ O(we, {}),
|
|
1030
1049
|
title: "操作",
|
|
1031
1050
|
width: 100
|
|
1032
1051
|
}
|
|
1033
1052
|
], [Xe, r]);
|
|
1034
|
-
async function
|
|
1035
|
-
if (!r || !
|
|
1036
|
-
|
|
1037
|
-
let o = e === "APPROVED" && i !== null && !
|
|
1053
|
+
async function L({ action: e, comment: t, returnToNodeId: n = null, transferToMemberId: a = null }) {
|
|
1054
|
+
if (!r || !P || e === "REJECTED" && !ot || e === "TRANSFERRED" && !st) return !1;
|
|
1055
|
+
m(!0), g(null);
|
|
1056
|
+
let o = e === "APPROVED" && i !== null && !P.isAdhoc ? {
|
|
1038
1057
|
expectedFormDataFingerprint: i.expectedFormDataFingerprint,
|
|
1039
1058
|
formData: i.formData
|
|
1040
1059
|
} : null;
|
|
1041
1060
|
try {
|
|
1042
|
-
await
|
|
1061
|
+
await ke({
|
|
1043
1062
|
action: e,
|
|
1044
1063
|
comment: t,
|
|
1045
1064
|
decidedByMemberId: r,
|
|
1046
1065
|
fill: o,
|
|
1047
1066
|
returnToNodeId: n,
|
|
1048
|
-
taskId:
|
|
1067
|
+
taskId: P.id,
|
|
1049
1068
|
transferToMemberId: a
|
|
1050
|
-
}),
|
|
1069
|
+
}), b(!1), ge(!1), Pe(!1), ae(""), ue(""), be(""), Ee(null), E(null), v(null);
|
|
1051
1070
|
} catch (e) {
|
|
1052
|
-
return
|
|
1071
|
+
return m(!1), o !== null && e instanceof Error && l?.(e.message) === !0 ? (re(!1), !1) : (g(_(e)), !1);
|
|
1053
1072
|
}
|
|
1054
1073
|
try {
|
|
1055
|
-
await
|
|
1074
|
+
await s();
|
|
1056
1075
|
} catch (e) {
|
|
1057
|
-
|
|
1076
|
+
g(_(e));
|
|
1058
1077
|
} finally {
|
|
1059
|
-
|
|
1078
|
+
m(!1);
|
|
1060
1079
|
}
|
|
1061
1080
|
return !0;
|
|
1062
1081
|
}
|
|
1063
|
-
function
|
|
1064
|
-
r &&
|
|
1082
|
+
function R() {
|
|
1083
|
+
r && P && (g(null), re(!0));
|
|
1065
1084
|
}
|
|
1066
|
-
function
|
|
1067
|
-
p || (
|
|
1085
|
+
function ht() {
|
|
1086
|
+
p || (re(!1), te(""));
|
|
1068
1087
|
}
|
|
1069
|
-
async function
|
|
1070
|
-
p || await
|
|
1088
|
+
async function z() {
|
|
1089
|
+
p || await L({
|
|
1071
1090
|
action: "APPROVED",
|
|
1072
|
-
comment:
|
|
1073
|
-
}) && (
|
|
1091
|
+
comment: ee.trim() || null
|
|
1092
|
+
}) && (re(!1), te(""));
|
|
1074
1093
|
}
|
|
1075
1094
|
function gt() {
|
|
1076
|
-
|
|
1095
|
+
ot && (ae(""), v(null), b(!0));
|
|
1077
1096
|
}
|
|
1078
1097
|
function _t() {
|
|
1079
|
-
p || (
|
|
1098
|
+
p || (b(!1), ae(""), v(null));
|
|
1080
1099
|
}
|
|
1081
1100
|
function vt() {
|
|
1082
|
-
|
|
1101
|
+
ue(""), E(it[0]?.id ?? null), ge(!0);
|
|
1083
1102
|
}
|
|
1084
1103
|
function yt() {
|
|
1085
|
-
p || (
|
|
1104
|
+
p || (ge(!1), ue(""), E(null));
|
|
1086
1105
|
}
|
|
1087
1106
|
function bt() {
|
|
1088
|
-
|
|
1107
|
+
st && (be(""), Ee(null), Pe(!0), St(""));
|
|
1089
1108
|
}
|
|
1090
|
-
function
|
|
1091
|
-
p || (
|
|
1109
|
+
function xt() {
|
|
1110
|
+
p || (Pe(!1), be(""), Ee(null));
|
|
1092
1111
|
}
|
|
1093
|
-
async function
|
|
1094
|
-
|
|
1112
|
+
async function St(e) {
|
|
1113
|
+
je(!0);
|
|
1095
1114
|
try {
|
|
1096
|
-
|
|
1115
|
+
Me((await He(e)).filter((e) => e.memberId !== r).map(Bt));
|
|
1097
1116
|
} catch (e) {
|
|
1098
|
-
|
|
1117
|
+
g(_(e));
|
|
1099
1118
|
} finally {
|
|
1100
|
-
|
|
1119
|
+
je(!1);
|
|
1101
1120
|
}
|
|
1102
1121
|
}
|
|
1103
|
-
async function
|
|
1104
|
-
|
|
1122
|
+
async function Ct() {
|
|
1123
|
+
ot && (N ? await L({
|
|
1105
1124
|
action: "REJECTED",
|
|
1106
|
-
comment:
|
|
1107
|
-
}) :
|
|
1125
|
+
comment: N
|
|
1126
|
+
}) : v("請輸入拒絕原因"));
|
|
1108
1127
|
}
|
|
1109
|
-
async function
|
|
1110
|
-
|
|
1128
|
+
async function B() {
|
|
1129
|
+
st && (Ce ? await L({
|
|
1111
1130
|
action: "TRANSFERRED",
|
|
1112
1131
|
comment: rt || null,
|
|
1113
|
-
transferToMemberId:
|
|
1114
|
-
}) :
|
|
1132
|
+
transferToMemberId: Ce.id
|
|
1133
|
+
}) : g("請選擇轉派對象"));
|
|
1115
1134
|
}
|
|
1116
|
-
async function
|
|
1117
|
-
await
|
|
1135
|
+
async function wt() {
|
|
1136
|
+
await L({
|
|
1118
1137
|
action: "RETURNED",
|
|
1119
1138
|
comment: nt || null,
|
|
1120
|
-
returnToNodeId:
|
|
1139
|
+
returnToNodeId: I?.id ?? null
|
|
1121
1140
|
});
|
|
1122
1141
|
}
|
|
1123
|
-
function
|
|
1124
|
-
|
|
1142
|
+
function Tt() {
|
|
1143
|
+
Ie(""), Be([]), Ye("REJECT_INSTANCE"), $e("MEMBER"), tt("");
|
|
1125
1144
|
}
|
|
1126
|
-
function
|
|
1127
|
-
|
|
1145
|
+
function Et(e) {
|
|
1146
|
+
M(e), Tt(), qe(!0), V("");
|
|
1128
1147
|
}
|
|
1129
|
-
function
|
|
1130
|
-
Xe || (qe(!1),
|
|
1148
|
+
function Dt() {
|
|
1149
|
+
Xe || (qe(!1), Tt());
|
|
1131
1150
|
}
|
|
1132
|
-
async function
|
|
1151
|
+
async function V(e) {
|
|
1133
1152
|
Ue(!0);
|
|
1134
1153
|
try {
|
|
1135
|
-
Ge((await
|
|
1154
|
+
Ge((await He(e)).map(Bt));
|
|
1136
1155
|
} catch (e) {
|
|
1137
|
-
|
|
1156
|
+
g(_(e));
|
|
1138
1157
|
} finally {
|
|
1139
1158
|
Ue(!1);
|
|
1140
1159
|
}
|
|
1141
1160
|
}
|
|
1142
|
-
async function
|
|
1143
|
-
if (!
|
|
1144
|
-
let e = (
|
|
1145
|
-
memberIds:
|
|
1161
|
+
async function Ot() {
|
|
1162
|
+
if (!P) return;
|
|
1163
|
+
let e = (j === "STAGE_NOTIFY" || j === "COMPLETION_NOTIFY") && Qe === "WEBHOOK", t = Vt({
|
|
1164
|
+
memberIds: ze.map((e) => e.id),
|
|
1146
1165
|
useWebhookTarget: e,
|
|
1147
1166
|
webhookUrl: et
|
|
1148
1167
|
});
|
|
1149
1168
|
if (!t.valid) {
|
|
1150
|
-
|
|
1169
|
+
g(t.error);
|
|
1151
1170
|
return;
|
|
1152
1171
|
}
|
|
1153
|
-
let { target: n } = t, r =
|
|
1154
|
-
Ze(!0),
|
|
1172
|
+
let { target: n } = t, r = Fe.trim() || null;
|
|
1173
|
+
Ze(!0), g(null);
|
|
1155
1174
|
try {
|
|
1156
|
-
|
|
1175
|
+
j === "COUNTERSIGN" ? await Le({
|
|
1157
1176
|
comment: r,
|
|
1158
1177
|
target: n,
|
|
1159
|
-
taskId:
|
|
1160
|
-
}) :
|
|
1178
|
+
taskId: P.id
|
|
1179
|
+
}) : j === "PRE_APPROVAL" ? await Re({
|
|
1161
1180
|
comment: r,
|
|
1162
|
-
onReject:
|
|
1181
|
+
onReject: Je,
|
|
1163
1182
|
target: n,
|
|
1164
|
-
taskId:
|
|
1165
|
-
}) :
|
|
1183
|
+
taskId: P.id
|
|
1184
|
+
}) : j === "STAGE_NOTIFY" ? await Oe({
|
|
1166
1185
|
target: n,
|
|
1167
|
-
taskId:
|
|
1168
|
-
}) : await
|
|
1186
|
+
taskId: P.id
|
|
1187
|
+
}) : await De({
|
|
1169
1188
|
target: n,
|
|
1170
|
-
taskId:
|
|
1171
|
-
}), qe(!1),
|
|
1189
|
+
taskId: P.id
|
|
1190
|
+
}), qe(!1), Tt(), await s();
|
|
1172
1191
|
} catch (e) {
|
|
1173
|
-
|
|
1192
|
+
g(_(e));
|
|
1174
1193
|
} finally {
|
|
1175
1194
|
Ze(!1);
|
|
1176
1195
|
}
|
|
1177
1196
|
}
|
|
1178
|
-
async function
|
|
1179
|
-
Ze(!0),
|
|
1197
|
+
async function kt(e) {
|
|
1198
|
+
Ze(!0), g(null);
|
|
1180
1199
|
try {
|
|
1181
|
-
await
|
|
1200
|
+
await Te(e), await s();
|
|
1182
1201
|
} catch (e) {
|
|
1183
|
-
|
|
1202
|
+
g(_(e));
|
|
1184
1203
|
} finally {
|
|
1185
1204
|
Ze(!1);
|
|
1186
1205
|
}
|
|
1187
1206
|
}
|
|
1188
|
-
|
|
1189
|
-
canAddSignerCurrentTask:
|
|
1190
|
-
canRejectCurrentTask:
|
|
1191
|
-
canReturnCurrentTask:
|
|
1192
|
-
canTransferCurrentTask:
|
|
1207
|
+
le(f, () => ({
|
|
1208
|
+
canAddSignerCurrentTask: lt,
|
|
1209
|
+
canRejectCurrentTask: ot,
|
|
1210
|
+
canReturnCurrentTask: at,
|
|
1211
|
+
canTransferCurrentTask: st,
|
|
1193
1212
|
deciding: p,
|
|
1194
|
-
handleApprove:
|
|
1195
|
-
hasCurrentTask:
|
|
1196
|
-
openAdhocModal:
|
|
1213
|
+
handleApprove: R,
|
|
1214
|
+
hasCurrentTask: P !== null,
|
|
1215
|
+
openAdhocModal: Et,
|
|
1197
1216
|
openRejectModal: gt,
|
|
1198
1217
|
openReturnModal: vt,
|
|
1199
1218
|
openTransferModal: bt
|
|
1200
1219
|
}), [
|
|
1201
|
-
|
|
1202
|
-
at,
|
|
1203
|
-
it,
|
|
1220
|
+
lt,
|
|
1204
1221
|
ot,
|
|
1222
|
+
at,
|
|
1223
|
+
st,
|
|
1205
1224
|
r,
|
|
1206
|
-
|
|
1225
|
+
P,
|
|
1207
1226
|
p
|
|
1208
1227
|
]);
|
|
1209
|
-
let
|
|
1210
|
-
return /* @__PURE__ */
|
|
1211
|
-
/* @__PURE__ */
|
|
1228
|
+
let H = j === "STAGE_NOTIFY" || j === "COMPLETION_NOTIFY", U = H && Qe === "WEBHOOK" ? !et.trim() : ze.length === 0, At = Ln.find((e) => e.id === Je) ?? Ln[0], jt = Rn.find((e) => e.id === Qe) ?? Rn[0];
|
|
1229
|
+
return /* @__PURE__ */ k(we, { children: [
|
|
1230
|
+
/* @__PURE__ */ O(D, {
|
|
1212
1231
|
component: "h2",
|
|
1213
1232
|
variant: "h3",
|
|
1214
1233
|
children: "任務"
|
|
1215
1234
|
}),
|
|
1216
|
-
|
|
1235
|
+
h ? /* @__PURE__ */ O(D, {
|
|
1217
1236
|
color: "text-error",
|
|
1218
1237
|
variant: "body",
|
|
1219
|
-
children:
|
|
1238
|
+
children: h
|
|
1220
1239
|
}) : null,
|
|
1221
|
-
/* @__PURE__ */
|
|
1222
|
-
style:
|
|
1223
|
-
children: /* @__PURE__ */
|
|
1224
|
-
columns:
|
|
1225
|
-
dataSource:
|
|
1240
|
+
/* @__PURE__ */ O("div", {
|
|
1241
|
+
style: Mn,
|
|
1242
|
+
children: /* @__PURE__ */ O(xe, {
|
|
1243
|
+
columns: ft,
|
|
1244
|
+
dataSource: dt,
|
|
1226
1245
|
fullWidth: !0
|
|
1227
1246
|
})
|
|
1228
1247
|
}),
|
|
1229
|
-
|
|
1248
|
+
ut.length > 0 ? /* @__PURE__ */ k(we, { children: [/* @__PURE__ */ O(D, {
|
|
1230
1249
|
component: "h3",
|
|
1231
|
-
style:
|
|
1250
|
+
style: Nn,
|
|
1232
1251
|
variant: "h3",
|
|
1233
1252
|
children: "待生效的臨時設定"
|
|
1234
|
-
}), /* @__PURE__ */
|
|
1235
|
-
style:
|
|
1236
|
-
children: /* @__PURE__ */
|
|
1237
|
-
columns:
|
|
1238
|
-
dataSource:
|
|
1253
|
+
}), /* @__PURE__ */ O("div", {
|
|
1254
|
+
style: Mn,
|
|
1255
|
+
children: /* @__PURE__ */ O(xe, {
|
|
1256
|
+
columns: mt,
|
|
1257
|
+
dataSource: pt,
|
|
1239
1258
|
fullWidth: !0
|
|
1240
1259
|
})
|
|
1241
1260
|
})] }) : null,
|
|
1242
|
-
/* @__PURE__ */
|
|
1261
|
+
/* @__PURE__ */ k(T, {
|
|
1243
1262
|
cancelText: "取消",
|
|
1244
1263
|
confirmText: "送出同意",
|
|
1245
1264
|
loading: p,
|
|
1246
1265
|
modalType: "standard",
|
|
1247
|
-
onCancel:
|
|
1248
|
-
onClose:
|
|
1249
|
-
onConfirm: () => void
|
|
1250
|
-
open:
|
|
1266
|
+
onCancel: ht,
|
|
1267
|
+
onClose: ht,
|
|
1268
|
+
onConfirm: () => void z(),
|
|
1269
|
+
open: ne,
|
|
1251
1270
|
showModalFooter: !0,
|
|
1252
1271
|
showModalHeader: !0,
|
|
1253
1272
|
size: "regular",
|
|
1254
1273
|
supportingText: "可以留下同意的說明,內容會記錄在簽核歷程;不填也可以直接送出。",
|
|
1255
1274
|
title: "簽核意見",
|
|
1256
1275
|
children: [
|
|
1257
|
-
|
|
1276
|
+
h ? /* @__PURE__ */ O(D, {
|
|
1258
1277
|
color: "text-error",
|
|
1259
1278
|
role: "alert",
|
|
1260
1279
|
variant: "body",
|
|
1261
|
-
children:
|
|
1280
|
+
children: h
|
|
1262
1281
|
}) : null,
|
|
1263
|
-
i !== null && i.summary.length > 0 ? /* @__PURE__ */
|
|
1264
|
-
style:
|
|
1265
|
-
children: [/* @__PURE__ */
|
|
1282
|
+
i !== null && i.summary.length > 0 ? /* @__PURE__ */ k("div", {
|
|
1283
|
+
style: kn,
|
|
1284
|
+
children: [/* @__PURE__ */ O(D, {
|
|
1266
1285
|
variant: "body",
|
|
1267
1286
|
children: "將一併送出的補填欄位:"
|
|
1268
|
-
}), i.summary.map((e) => /* @__PURE__ */
|
|
1287
|
+
}), i.summary.map((e) => /* @__PURE__ */ O(w, {
|
|
1269
1288
|
title: e.label,
|
|
1270
|
-
children: /* @__PURE__ */
|
|
1289
|
+
children: /* @__PURE__ */ O(pe, { children: e.text })
|
|
1271
1290
|
}, e.fieldKey))]
|
|
1272
1291
|
}) : null,
|
|
1273
|
-
/* @__PURE__ */
|
|
1274
|
-
style:
|
|
1275
|
-
children: /* @__PURE__ */
|
|
1292
|
+
/* @__PURE__ */ O("div", {
|
|
1293
|
+
style: kn,
|
|
1294
|
+
children: /* @__PURE__ */ O(e, {
|
|
1276
1295
|
label: "簽核意見",
|
|
1277
1296
|
name: "approveComment",
|
|
1278
|
-
children: /* @__PURE__ */
|
|
1297
|
+
children: /* @__PURE__ */ O(Se, {
|
|
1279
1298
|
autoFocus: !0,
|
|
1280
|
-
onChange: (e) =>
|
|
1299
|
+
onChange: (e) => te(e.target.value),
|
|
1281
1300
|
placeholder: "選填,例如補充核准的條件或提醒事項",
|
|
1282
|
-
ref:
|
|
1301
|
+
ref: Pn,
|
|
1283
1302
|
resize: "vertical",
|
|
1284
1303
|
rows: 4,
|
|
1285
|
-
style:
|
|
1286
|
-
value:
|
|
1304
|
+
style: An,
|
|
1305
|
+
value: ee
|
|
1287
1306
|
})
|
|
1288
1307
|
})
|
|
1289
1308
|
})
|
|
1290
1309
|
]
|
|
1291
1310
|
}),
|
|
1292
|
-
/* @__PURE__ */
|
|
1311
|
+
/* @__PURE__ */ O(T, {
|
|
1293
1312
|
cancelText: "取消",
|
|
1294
1313
|
confirmButtonProps: {
|
|
1295
|
-
disabled: !
|
|
1314
|
+
disabled: !N,
|
|
1296
1315
|
variant: "destructive-primary"
|
|
1297
1316
|
},
|
|
1298
1317
|
confirmText: "送出拒絕",
|
|
@@ -1301,61 +1320,61 @@ var En = {
|
|
|
1301
1320
|
modalType: "standard",
|
|
1302
1321
|
onCancel: _t,
|
|
1303
1322
|
onClose: _t,
|
|
1304
|
-
onConfirm: () => void
|
|
1305
|
-
open:
|
|
1323
|
+
onConfirm: () => void Ct(),
|
|
1324
|
+
open: y,
|
|
1306
1325
|
showModalFooter: !0,
|
|
1307
1326
|
showModalHeader: !0,
|
|
1308
1327
|
size: "regular",
|
|
1309
1328
|
supportingText: "拒絕案件時必須留下原因,供發起人與後續追蹤查看。",
|
|
1310
1329
|
title: "拒絕原因",
|
|
1311
|
-
children: /* @__PURE__ */
|
|
1312
|
-
style:
|
|
1313
|
-
children: [/* @__PURE__ */
|
|
1330
|
+
children: /* @__PURE__ */ k("div", {
|
|
1331
|
+
style: kn,
|
|
1332
|
+
children: [/* @__PURE__ */ O(e, {
|
|
1314
1333
|
label: "拒絕原因",
|
|
1315
1334
|
name: "rejectReason",
|
|
1316
1335
|
required: !0,
|
|
1317
|
-
children: /* @__PURE__ */
|
|
1336
|
+
children: /* @__PURE__ */ O(Se, {
|
|
1318
1337
|
autoFocus: !0,
|
|
1319
1338
|
onChange: (e) => {
|
|
1320
|
-
|
|
1339
|
+
ae(e.target.value), v(null);
|
|
1321
1340
|
},
|
|
1322
1341
|
placeholder: "請說明拒絕原因",
|
|
1323
|
-
ref:
|
|
1342
|
+
ref: Pn,
|
|
1324
1343
|
resize: "vertical",
|
|
1325
1344
|
rows: 4,
|
|
1326
|
-
style:
|
|
1327
|
-
type:
|
|
1328
|
-
value:
|
|
1345
|
+
style: An,
|
|
1346
|
+
type: oe ? "error" : "default",
|
|
1347
|
+
value: ie
|
|
1329
1348
|
})
|
|
1330
|
-
}),
|
|
1349
|
+
}), oe ? /* @__PURE__ */ O(D, {
|
|
1331
1350
|
color: "text-error",
|
|
1332
1351
|
variant: "body",
|
|
1333
|
-
children:
|
|
1352
|
+
children: oe
|
|
1334
1353
|
}) : null]
|
|
1335
1354
|
})
|
|
1336
1355
|
}),
|
|
1337
|
-
/* @__PURE__ */
|
|
1356
|
+
/* @__PURE__ */ O(T, {
|
|
1338
1357
|
cancelText: "取消",
|
|
1339
|
-
confirmButtonProps: { disabled: !
|
|
1358
|
+
confirmButtonProps: { disabled: !Ce },
|
|
1340
1359
|
confirmText: "送出轉派",
|
|
1341
1360
|
loading: p,
|
|
1342
1361
|
modalType: "standard",
|
|
1343
|
-
onCancel:
|
|
1344
|
-
onClose:
|
|
1345
|
-
onConfirm: () => void
|
|
1346
|
-
open:
|
|
1362
|
+
onCancel: xt,
|
|
1363
|
+
onClose: xt,
|
|
1364
|
+
onConfirm: () => void B(),
|
|
1365
|
+
open: Ne,
|
|
1347
1366
|
showModalFooter: !0,
|
|
1348
1367
|
showModalHeader: !0,
|
|
1349
1368
|
size: "regular",
|
|
1350
1369
|
supportingText: "轉派後,原任務會保留轉派紀錄,新的待簽任務會指派給指定成員。",
|
|
1351
1370
|
title: "轉派簽核",
|
|
1352
|
-
children: /* @__PURE__ */
|
|
1353
|
-
style:
|
|
1354
|
-
children: [/* @__PURE__ */
|
|
1371
|
+
children: /* @__PURE__ */ k("div", {
|
|
1372
|
+
style: jn,
|
|
1373
|
+
children: [/* @__PURE__ */ O(e, {
|
|
1355
1374
|
label: "轉派對象",
|
|
1356
1375
|
name: "transferToMemberId",
|
|
1357
1376
|
required: !0,
|
|
1358
|
-
children: /* @__PURE__ */
|
|
1377
|
+
children: /* @__PURE__ */ O(de, {
|
|
1359
1378
|
asyncData: !0,
|
|
1360
1379
|
disabledOptionsFilter: !0,
|
|
1361
1380
|
emptyText: "沒有符合的成員",
|
|
@@ -1368,144 +1387,144 @@ var En = {
|
|
|
1368
1387
|
loading: Ae,
|
|
1369
1388
|
loadingText: "搜尋成員中...",
|
|
1370
1389
|
mode: "single",
|
|
1371
|
-
onChange: (e) =>
|
|
1372
|
-
onSearch:
|
|
1373
|
-
onSearchTextChange: (e) =>
|
|
1390
|
+
onChange: (e) => Ee(Ht(e)),
|
|
1391
|
+
onSearch: St,
|
|
1392
|
+
onSearchTextChange: (e) => Ee(Ut(e, A)),
|
|
1374
1393
|
onVisibilityChange: (e) => {
|
|
1375
|
-
e &&
|
|
1394
|
+
e && St("");
|
|
1376
1395
|
},
|
|
1377
|
-
options: [...
|
|
1396
|
+
options: [...A],
|
|
1378
1397
|
placeholder: "搜尋姓名或信箱",
|
|
1379
1398
|
searchDebounceTime: 300,
|
|
1380
|
-
value:
|
|
1399
|
+
value: Ce
|
|
1381
1400
|
})
|
|
1382
|
-
}), /* @__PURE__ */
|
|
1401
|
+
}), /* @__PURE__ */ O(e, {
|
|
1383
1402
|
label: "轉派說明",
|
|
1384
1403
|
name: "transferComment",
|
|
1385
|
-
children: /* @__PURE__ */
|
|
1386
|
-
onChange: (e) =>
|
|
1404
|
+
children: /* @__PURE__ */ O(Se, {
|
|
1405
|
+
onChange: (e) => be(e.target.value),
|
|
1387
1406
|
placeholder: "可補充轉派原因",
|
|
1388
|
-
ref:
|
|
1407
|
+
ref: Pn,
|
|
1389
1408
|
resize: "vertical",
|
|
1390
1409
|
rows: 4,
|
|
1391
|
-
style:
|
|
1392
|
-
value:
|
|
1410
|
+
style: An,
|
|
1411
|
+
value: ve
|
|
1393
1412
|
})
|
|
1394
1413
|
})]
|
|
1395
1414
|
})
|
|
1396
1415
|
}),
|
|
1397
|
-
/* @__PURE__ */
|
|
1416
|
+
/* @__PURE__ */ O(T, {
|
|
1398
1417
|
cancelText: "取消",
|
|
1399
|
-
confirmButtonProps: { disabled: !
|
|
1418
|
+
confirmButtonProps: { disabled: !I || ct && !nt },
|
|
1400
1419
|
confirmText: "送出退回",
|
|
1401
1420
|
loading: p,
|
|
1402
1421
|
modalType: "standard",
|
|
1403
1422
|
onCancel: yt,
|
|
1404
1423
|
onClose: yt,
|
|
1405
|
-
onConfirm: () => void
|
|
1406
|
-
open:
|
|
1424
|
+
onConfirm: () => void wt(),
|
|
1425
|
+
open: me,
|
|
1407
1426
|
showModalFooter: !0,
|
|
1408
1427
|
showModalHeader: !0,
|
|
1409
1428
|
size: "regular",
|
|
1410
1429
|
supportingText: "退回後,流程會回到指定節點並等待重新處理。",
|
|
1411
1430
|
title: "退回簽核",
|
|
1412
|
-
children: /* @__PURE__ */
|
|
1413
|
-
style:
|
|
1414
|
-
children: [/* @__PURE__ */
|
|
1431
|
+
children: /* @__PURE__ */ k("div", {
|
|
1432
|
+
style: jn,
|
|
1433
|
+
children: [/* @__PURE__ */ O(e, {
|
|
1415
1434
|
label: "退回節點",
|
|
1416
1435
|
name: "returnTargetNodeId",
|
|
1417
1436
|
required: !0,
|
|
1418
|
-
children: /* @__PURE__ */
|
|
1437
|
+
children: /* @__PURE__ */ O(ye, {
|
|
1419
1438
|
clearable: !1,
|
|
1420
1439
|
fullWidth: !0,
|
|
1421
|
-
onChange: (e) =>
|
|
1422
|
-
options: [...
|
|
1440
|
+
onChange: (e) => E(e?.id ?? null),
|
|
1441
|
+
options: [...it],
|
|
1423
1442
|
placeholder: "選擇退回節點",
|
|
1424
|
-
value:
|
|
1443
|
+
value: I
|
|
1425
1444
|
})
|
|
1426
|
-
}), /* @__PURE__ */
|
|
1427
|
-
hintText:
|
|
1445
|
+
}), /* @__PURE__ */ O(e, {
|
|
1446
|
+
hintText: ct ? "此關卡設定退回時必須填寫意見。" : void 0,
|
|
1428
1447
|
label: "退回說明",
|
|
1429
1448
|
name: "returnComment",
|
|
1430
|
-
required:
|
|
1431
|
-
children: /* @__PURE__ */
|
|
1432
|
-
onChange: (e) =>
|
|
1433
|
-
placeholder:
|
|
1434
|
-
ref:
|
|
1449
|
+
required: ct,
|
|
1450
|
+
children: /* @__PURE__ */ O(Se, {
|
|
1451
|
+
onChange: (e) => ue(e.target.value),
|
|
1452
|
+
placeholder: ct ? "請說明退回原因" : "可補充需要修改的內容",
|
|
1453
|
+
ref: Pn,
|
|
1435
1454
|
resize: "vertical",
|
|
1436
1455
|
rows: 4,
|
|
1437
|
-
style:
|
|
1438
|
-
value:
|
|
1456
|
+
style: An,
|
|
1457
|
+
value: se
|
|
1439
1458
|
})
|
|
1440
1459
|
})]
|
|
1441
1460
|
})
|
|
1442
1461
|
}),
|
|
1443
|
-
/* @__PURE__ */
|
|
1462
|
+
/* @__PURE__ */ O(T, {
|
|
1444
1463
|
cancelText: "取消",
|
|
1445
|
-
confirmButtonProps: { disabled:
|
|
1464
|
+
confirmButtonProps: { disabled: U },
|
|
1446
1465
|
confirmText: "送出",
|
|
1447
1466
|
loading: Xe,
|
|
1448
1467
|
modalType: "standard",
|
|
1449
|
-
onCancel:
|
|
1450
|
-
onClose:
|
|
1451
|
-
onConfirm: () => void
|
|
1468
|
+
onCancel: Dt,
|
|
1469
|
+
onClose: Dt,
|
|
1470
|
+
onConfirm: () => void Ot(),
|
|
1452
1471
|
open: Ke,
|
|
1453
1472
|
showModalFooter: !0,
|
|
1454
1473
|
showModalHeader: !0,
|
|
1455
1474
|
size: "regular",
|
|
1456
|
-
supportingText:
|
|
1457
|
-
title:
|
|
1458
|
-
children: /* @__PURE__ */
|
|
1459
|
-
style:
|
|
1475
|
+
supportingText: In[j],
|
|
1476
|
+
title: Fn[j],
|
|
1477
|
+
children: /* @__PURE__ */ k("div", {
|
|
1478
|
+
style: jn,
|
|
1460
1479
|
children: [
|
|
1461
|
-
|
|
1480
|
+
H ? /* @__PURE__ */ O(e, {
|
|
1462
1481
|
label: "通知時機",
|
|
1463
1482
|
name: "adhocNotifyMode",
|
|
1464
1483
|
required: !0,
|
|
1465
|
-
children: /* @__PURE__ */
|
|
1484
|
+
children: /* @__PURE__ */ O(ye, {
|
|
1466
1485
|
clearable: !1,
|
|
1467
1486
|
fullWidth: !0,
|
|
1468
|
-
onChange: (e) =>
|
|
1487
|
+
onChange: (e) => M(e?.id === "COMPLETION_NOTIFY" ? "COMPLETION_NOTIFY" : "STAGE_NOTIFY"),
|
|
1469
1488
|
options: [{
|
|
1470
1489
|
id: "STAGE_NOTIFY",
|
|
1471
|
-
name:
|
|
1490
|
+
name: Fn.STAGE_NOTIFY
|
|
1472
1491
|
}, {
|
|
1473
1492
|
id: "COMPLETION_NOTIFY",
|
|
1474
|
-
name:
|
|
1493
|
+
name: Fn.COMPLETION_NOTIFY
|
|
1475
1494
|
}],
|
|
1476
1495
|
value: {
|
|
1477
|
-
id:
|
|
1478
|
-
name:
|
|
1496
|
+
id: j,
|
|
1497
|
+
name: Fn[j]
|
|
1479
1498
|
}
|
|
1480
1499
|
})
|
|
1481
1500
|
}) : null,
|
|
1482
|
-
|
|
1501
|
+
H ? /* @__PURE__ */ O(e, {
|
|
1483
1502
|
label: "通知對象類型",
|
|
1484
1503
|
name: "adhocTargetKind",
|
|
1485
1504
|
required: !0,
|
|
1486
|
-
children: /* @__PURE__ */
|
|
1505
|
+
children: /* @__PURE__ */ O(ye, {
|
|
1487
1506
|
clearable: !1,
|
|
1488
1507
|
fullWidth: !0,
|
|
1489
1508
|
onChange: (e) => $e(e?.id === "WEBHOOK" ? "WEBHOOK" : "MEMBER"),
|
|
1490
|
-
options: [...
|
|
1491
|
-
value:
|
|
1509
|
+
options: [...Rn],
|
|
1510
|
+
value: jt
|
|
1492
1511
|
})
|
|
1493
1512
|
}) : null,
|
|
1494
|
-
|
|
1513
|
+
H && Qe === "WEBHOOK" ? /* @__PURE__ */ O(e, {
|
|
1495
1514
|
label: "Webhook URL",
|
|
1496
1515
|
name: "adhocWebhookUrl",
|
|
1497
1516
|
required: !0,
|
|
1498
|
-
children: /* @__PURE__ */
|
|
1517
|
+
children: /* @__PURE__ */ O(he, {
|
|
1499
1518
|
fullWidth: !0,
|
|
1500
1519
|
onChange: (e) => tt(e.target.value),
|
|
1501
1520
|
placeholder: "https://example.com/webhook",
|
|
1502
1521
|
value: et
|
|
1503
1522
|
})
|
|
1504
|
-
}) : /* @__PURE__ */
|
|
1505
|
-
label:
|
|
1523
|
+
}) : /* @__PURE__ */ O(e, {
|
|
1524
|
+
label: H ? "通知對象" : "簽核對象",
|
|
1506
1525
|
name: "adhocMemberId",
|
|
1507
1526
|
required: !0,
|
|
1508
|
-
children: /* @__PURE__ */
|
|
1527
|
+
children: /* @__PURE__ */ O(de, {
|
|
1509
1528
|
asyncData: !0,
|
|
1510
1529
|
disabledOptionsFilter: !0,
|
|
1511
1530
|
emptyText: "沒有符合的成員",
|
|
@@ -1515,45 +1534,45 @@ var En = {
|
|
|
1515
1534
|
name: "adhoc-member-search",
|
|
1516
1535
|
spellCheck: !1
|
|
1517
1536
|
},
|
|
1518
|
-
loading:
|
|
1537
|
+
loading: Ve,
|
|
1519
1538
|
loadingText: "搜尋成員中...",
|
|
1520
1539
|
menuMaxHeight: 320,
|
|
1521
1540
|
mode: "multiple",
|
|
1522
|
-
onChange: (e) =>
|
|
1523
|
-
onSearch:
|
|
1541
|
+
onChange: (e) => Be(e.map(Ht).filter(q)),
|
|
1542
|
+
onSearch: V,
|
|
1524
1543
|
onVisibilityChange: (e) => {
|
|
1525
|
-
e &&
|
|
1544
|
+
e && V("");
|
|
1526
1545
|
},
|
|
1527
1546
|
options: [...We],
|
|
1528
1547
|
overflowStrategy: "wrap",
|
|
1529
1548
|
placeholder: "搜尋姓名或信箱,可加入多位",
|
|
1530
1549
|
searchDebounceTime: 300,
|
|
1531
|
-
value: [...
|
|
1550
|
+
value: [...ze]
|
|
1532
1551
|
})
|
|
1533
1552
|
}),
|
|
1534
|
-
|
|
1553
|
+
j === "PRE_APPROVAL" ? /* @__PURE__ */ O(e, {
|
|
1535
1554
|
label: "拒簽處理方式",
|
|
1536
1555
|
name: "adhocOnReject",
|
|
1537
1556
|
required: !0,
|
|
1538
|
-
children: /* @__PURE__ */
|
|
1557
|
+
children: /* @__PURE__ */ O(ye, {
|
|
1539
1558
|
clearable: !1,
|
|
1540
1559
|
fullWidth: !0,
|
|
1541
|
-
onChange: (e) =>
|
|
1542
|
-
options: [...
|
|
1543
|
-
value:
|
|
1560
|
+
onChange: (e) => Ye(e?.id === "RETURN_TO_ORIGIN" ? "RETURN_TO_ORIGIN" : "REJECT_INSTANCE"),
|
|
1561
|
+
options: [...Ln],
|
|
1562
|
+
value: At
|
|
1544
1563
|
})
|
|
1545
1564
|
}) : null,
|
|
1546
|
-
|
|
1565
|
+
H ? null : /* @__PURE__ */ O(e, {
|
|
1547
1566
|
label: "說明",
|
|
1548
1567
|
name: "adhocComment",
|
|
1549
|
-
children: /* @__PURE__ */
|
|
1550
|
-
onChange: (e) =>
|
|
1568
|
+
children: /* @__PURE__ */ O(Se, {
|
|
1569
|
+
onChange: (e) => Ie(e.target.value),
|
|
1551
1570
|
placeholder: "可補充原因",
|
|
1552
|
-
ref:
|
|
1571
|
+
ref: Pn,
|
|
1553
1572
|
resize: "vertical",
|
|
1554
1573
|
rows: 3,
|
|
1555
|
-
style:
|
|
1556
|
-
value:
|
|
1574
|
+
style: An,
|
|
1575
|
+
value: Fe
|
|
1557
1576
|
})
|
|
1558
1577
|
})
|
|
1559
1578
|
]
|
|
@@ -1561,36 +1580,35 @@ var En = {
|
|
|
1561
1580
|
})
|
|
1562
1581
|
] });
|
|
1563
1582
|
});
|
|
1564
|
-
function
|
|
1583
|
+
function Bn(e, t) {
|
|
1565
1584
|
try {
|
|
1566
1585
|
let n = JSON.parse(e.targetValueJson);
|
|
1567
|
-
if (n.memberIds?.length) return n.memberIds.map((e) =>
|
|
1586
|
+
if (n.memberIds?.length) return n.memberIds.map((e) => K(e, t)).join("、");
|
|
1568
1587
|
if (n.webhookUrl) return n.webhookUrl;
|
|
1569
1588
|
if (n.positionId) return `職位 ${n.positionId}`;
|
|
1570
1589
|
if (n.orgUnitId) return `部門 ${n.orgUnitId}`;
|
|
1571
1590
|
} catch {}
|
|
1572
1591
|
return e.targetKind;
|
|
1573
1592
|
}
|
|
1574
|
-
function
|
|
1593
|
+
function Vn(e, t) {
|
|
1575
1594
|
if (e.isAdhoc || e.status !== "PENDING" && e.status !== "IN_PROGRESS") return 0;
|
|
1576
1595
|
let n = t?.nodes.find((t) => t.id === e.nodeId);
|
|
1577
|
-
return n?.type === "userTask" ?
|
|
1596
|
+
return n?.type === "userTask" ? nt(n).size : 0;
|
|
1578
1597
|
}
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
var Nn = {
|
|
1598
|
+
// src/views/instances/detail/sections/InstanceSignaturesSection.tsx
|
|
1599
|
+
var Hn = {
|
|
1582
1600
|
display: "grid",
|
|
1583
1601
|
gap: 16
|
|
1584
1602
|
};
|
|
1585
|
-
function
|
|
1586
|
-
let r =
|
|
1603
|
+
function Un({ signatureVerification: e, signatures: n }) {
|
|
1604
|
+
let r = x(() => n.map((e) => ({
|
|
1587
1605
|
algorithm: e.algorithm,
|
|
1588
|
-
hashLabel:
|
|
1606
|
+
hashLabel: Mt(e.signedPayloadHash),
|
|
1589
1607
|
key: e.id,
|
|
1590
1608
|
keyVersion: e.keyVersion,
|
|
1591
1609
|
signedAtLabel: t(e.signedAt),
|
|
1592
1610
|
signerMemberId: e.signerMemberId
|
|
1593
|
-
})), [n]), i =
|
|
1611
|
+
})), [n]), i = x(() => [
|
|
1594
1612
|
{
|
|
1595
1613
|
dataIndex: "signerMemberId",
|
|
1596
1614
|
key: "signerMemberId",
|
|
@@ -1622,20 +1640,20 @@ function Pn({ signatureVerification: e, signatures: n }) {
|
|
|
1622
1640
|
width: 220
|
|
1623
1641
|
}
|
|
1624
1642
|
], []);
|
|
1625
|
-
return /* @__PURE__ */
|
|
1626
|
-
style:
|
|
1643
|
+
return /* @__PURE__ */ k("div", {
|
|
1644
|
+
style: Hn,
|
|
1627
1645
|
children: [
|
|
1628
|
-
/* @__PURE__ */
|
|
1646
|
+
/* @__PURE__ */ O(D, {
|
|
1629
1647
|
component: "h2",
|
|
1630
1648
|
variant: "h3",
|
|
1631
1649
|
children: "簽章"
|
|
1632
1650
|
}),
|
|
1633
|
-
/* @__PURE__ */
|
|
1651
|
+
/* @__PURE__ */ O(D, {
|
|
1634
1652
|
color: e?.valid ? "text-success" : "text-error",
|
|
1635
1653
|
variant: "body",
|
|
1636
1654
|
children: e ? e.valid ? `簽章鏈已驗證,共 ${e.checkedCount} 筆。` : `簽章鏈驗證失敗:${e.errors.join("、")}` : "尚無簽章紀錄。"
|
|
1637
1655
|
}),
|
|
1638
|
-
r.length > 0 ? /* @__PURE__ */
|
|
1656
|
+
r.length > 0 ? /* @__PURE__ */ O(xe, {
|
|
1639
1657
|
columns: i,
|
|
1640
1658
|
dataSource: r,
|
|
1641
1659
|
fullWidth: !0
|
|
@@ -1643,16 +1661,15 @@ function Pn({ signatureVerification: e, signatures: n }) {
|
|
|
1643
1661
|
]
|
|
1644
1662
|
});
|
|
1645
1663
|
}
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
var Fn = {
|
|
1664
|
+
// src/views/instances/detail/sections/InstanceHistorySection.tsx
|
|
1665
|
+
var Wn = {
|
|
1649
1666
|
display: "grid",
|
|
1650
1667
|
gap: 16
|
|
1651
|
-
},
|
|
1668
|
+
}, Gn = {
|
|
1652
1669
|
cursor: "help",
|
|
1653
1670
|
textDecoration: "underline dotted",
|
|
1654
1671
|
textUnderlineOffset: 3
|
|
1655
|
-
},
|
|
1672
|
+
}, Kn = {
|
|
1656
1673
|
borderLeftColor: "var(--mzn-color-border)",
|
|
1657
1674
|
borderLeftStyle: "solid",
|
|
1658
1675
|
borderLeftWidth: 2,
|
|
@@ -1661,41 +1678,42 @@ var Fn = {
|
|
|
1661
1678
|
marginTop: 4,
|
|
1662
1679
|
paddingLeft: 8,
|
|
1663
1680
|
whiteSpace: "pre-wrap"
|
|
1664
|
-
},
|
|
1665
|
-
...
|
|
1681
|
+
}, qn = { color: "var(--mzn-color-text-secondary)" }, Jn = {
|
|
1682
|
+
...Kn,
|
|
1666
1683
|
borderLeftColor: "var(--mzn-color-text-error)",
|
|
1667
1684
|
color: "var(--mzn-color-text-error)"
|
|
1668
1685
|
};
|
|
1669
|
-
function
|
|
1670
|
-
return e.filter((e) =>
|
|
1686
|
+
function Yn(...e) {
|
|
1687
|
+
return e.filter((e) => H(e ?? null)).join(" ");
|
|
1671
1688
|
}
|
|
1672
|
-
var
|
|
1689
|
+
var Xn = b(function({ className: e, descriptionParts: t, error: n, forcePending: r = !1, index: i = 0, orientation: a, status: o = "pending", title: s, type: c = "number", ...l }, u) {
|
|
1673
1690
|
let d = r ? "pending" : o, f = t.filter((e) => e.type !== "comment"), p = t.filter((e) => e.type === "comment");
|
|
1674
|
-
return /* @__PURE__ */
|
|
1691
|
+
return /* @__PURE__ */ k("div", {
|
|
1675
1692
|
...l,
|
|
1676
|
-
className:
|
|
1693
|
+
className: Yn(R.host, c === "dot" ? R.dot : null, n && d !== "processing" ? R.error : null, a === "horizontal" ? R.horizontal : null, c === "number" ? R.number : null, d === "pending" ? R.pending : null, d === "processing" ? R.processing : null, n && d === "processing" ? R.processingError : null, !n && d === "succeeded" ? R.succeeded : null, a === "vertical" ? R.vertical : null, e),
|
|
1677
1694
|
ref: u,
|
|
1678
|
-
children: [c === "dot" ? /* @__PURE__ */
|
|
1679
|
-
className:
|
|
1695
|
+
children: [c === "dot" ? /* @__PURE__ */ O("span", { className: Yn(R.statusIndicator, R.statusIndicatorDot) }) : /* @__PURE__ */ O("span", {
|
|
1696
|
+
className: R.statusIndicator,
|
|
1680
1697
|
children: i + 1
|
|
1681
|
-
}), /* @__PURE__ */
|
|
1682
|
-
className:
|
|
1698
|
+
}), /* @__PURE__ */ k("div", {
|
|
1699
|
+
className: R.textContainer,
|
|
1683
1700
|
children: [
|
|
1684
|
-
/* @__PURE__ */ D
|
|
1685
|
-
className:
|
|
1701
|
+
/* @__PURE__ */ k(D, {
|
|
1702
|
+
className: R.title,
|
|
1686
1703
|
variant: "label-primary-highlight",
|
|
1687
|
-
children: [s, /* @__PURE__ */
|
|
1704
|
+
children: [s, /* @__PURE__ */ O("span", { className: R.titleConnectLine })]
|
|
1688
1705
|
}),
|
|
1689
|
-
f.length > 0 ? /* @__PURE__ */
|
|
1690
|
-
className:
|
|
1691
|
-
|
|
1692
|
-
|
|
1706
|
+
f.length > 0 ? /* @__PURE__ */ O(D, {
|
|
1707
|
+
className: R.description,
|
|
1708
|
+
component: "div",
|
|
1709
|
+
variant: "body",
|
|
1710
|
+
children: f.map((e, t) => /* @__PURE__ */ k(y, { children: [t > 0 ? " · " : null, Zn(e)] }, `${e.type}-${t}`))
|
|
1693
1711
|
}) : null,
|
|
1694
|
-
p.map((e, t) => /* @__PURE__ */ D
|
|
1695
|
-
style: e.tone === "danger" ?
|
|
1712
|
+
p.map((e, t) => /* @__PURE__ */ k(D, {
|
|
1713
|
+
style: e.tone === "danger" ? Jn : Kn,
|
|
1696
1714
|
variant: "body",
|
|
1697
|
-
children: [/* @__PURE__ */
|
|
1698
|
-
style: e.tone === "danger" ? void 0 :
|
|
1715
|
+
children: [/* @__PURE__ */ k("span", {
|
|
1716
|
+
style: e.tone === "danger" ? void 0 : qn,
|
|
1699
1717
|
children: [e.label, ":"]
|
|
1700
1718
|
}), e.text]
|
|
1701
1719
|
}, `comment-${t}`))
|
|
@@ -1703,76 +1721,87 @@ var Vn = ie(function({ className: e, descriptionParts: t, error: n, forcePending
|
|
|
1703
1721
|
})]
|
|
1704
1722
|
});
|
|
1705
1723
|
});
|
|
1706
|
-
function
|
|
1707
|
-
return e.type === "text" ? e.text : e.email?.trim() ? /* @__PURE__ */
|
|
1724
|
+
function Zn(e) {
|
|
1725
|
+
return e.type === "text" ? e.text : e.email?.trim() ? /* @__PURE__ */ k(we, { children: [
|
|
1708
1726
|
e.prefix,
|
|
1709
1727
|
":",
|
|
1710
|
-
/* @__PURE__ */
|
|
1728
|
+
/* @__PURE__ */ O(Ce, {
|
|
1711
1729
|
title: e.email,
|
|
1712
|
-
children: ({ ref: t, ...n }) => /* @__PURE__ */
|
|
1730
|
+
children: ({ ref: t, ...n }) => /* @__PURE__ */ O("span", {
|
|
1713
1731
|
...n,
|
|
1714
1732
|
"data-testid": e.memberId ? `member-tooltip-${e.memberId}` : void 0,
|
|
1715
1733
|
ref: t,
|
|
1716
|
-
style:
|
|
1734
|
+
style: Gn,
|
|
1717
1735
|
children: e.label
|
|
1718
1736
|
})
|
|
1719
1737
|
})
|
|
1720
1738
|
] }) : `${e.prefix}:${e.label}`;
|
|
1721
1739
|
}
|
|
1722
|
-
function
|
|
1723
|
-
let
|
|
1740
|
+
function Qn({ activityLogs: e, formSchema: t = null, instanceState: n, memberProfilesById: r, signatureVerification: i, signaturesById: a, taskDecisions: o = null, taskDecisionsByTaskId: s, tasks: c, workflowSnapshot: l, workflowTokens: u }) {
|
|
1741
|
+
let d = x(() => hn(e, c, u, l, n, r, s, a, i, t, o), [
|
|
1742
|
+
e,
|
|
1743
|
+
t,
|
|
1744
|
+
n,
|
|
1745
|
+
r,
|
|
1746
|
+
i,
|
|
1747
|
+
a,
|
|
1748
|
+
o,
|
|
1749
|
+
s,
|
|
1750
|
+
c,
|
|
1751
|
+
l,
|
|
1752
|
+
u
|
|
1753
|
+
]), f = Kt(d), p = d.map((e) => ({
|
|
1724
1754
|
...e,
|
|
1725
1755
|
descriptionParts: e.descriptionParts.filter(Y)
|
|
1726
1756
|
}));
|
|
1727
|
-
return /* @__PURE__ */
|
|
1728
|
-
style:
|
|
1729
|
-
children: [/* @__PURE__ */
|
|
1757
|
+
return /* @__PURE__ */ k("div", {
|
|
1758
|
+
style: Wn,
|
|
1759
|
+
children: [/* @__PURE__ */ O(D, {
|
|
1730
1760
|
component: "h2",
|
|
1731
1761
|
variant: "h3",
|
|
1732
1762
|
children: "歷程"
|
|
1733
|
-
}),
|
|
1734
|
-
currentStep:
|
|
1763
|
+
}), p.length > 0 ? /* @__PURE__ */ O(be, {
|
|
1764
|
+
currentStep: f,
|
|
1735
1765
|
orientation: "vertical",
|
|
1736
1766
|
type: "dot",
|
|
1737
|
-
children:
|
|
1767
|
+
children: p.map((e) => /* @__PURE__ */ O(Xn, {
|
|
1738
1768
|
descriptionParts: e.descriptionParts,
|
|
1739
1769
|
error: e.error,
|
|
1740
1770
|
forcePending: e.forcePending,
|
|
1741
1771
|
title: e.title
|
|
1742
1772
|
}, e.id))
|
|
1743
|
-
}) : /* @__PURE__ */
|
|
1773
|
+
}) : /* @__PURE__ */ O(D, {
|
|
1744
1774
|
color: "text-neutral",
|
|
1745
1775
|
variant: "body",
|
|
1746
1776
|
children: "尚無歷程紀錄。"
|
|
1747
1777
|
})]
|
|
1748
1778
|
});
|
|
1749
1779
|
}
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
var Wn = {
|
|
1780
|
+
// src/views/instances/detail/sections/InstanceWebhookDeliveriesSection.tsx
|
|
1781
|
+
var $n = {
|
|
1753
1782
|
display: "grid",
|
|
1754
1783
|
gap: 16
|
|
1755
|
-
},
|
|
1784
|
+
}, er = {
|
|
1756
1785
|
display: "grid",
|
|
1757
1786
|
gap: 2
|
|
1758
|
-
},
|
|
1787
|
+
}, tr = {
|
|
1759
1788
|
overflowWrap: "anywhere",
|
|
1760
1789
|
whiteSpace: "pre-wrap"
|
|
1761
1790
|
};
|
|
1762
|
-
function
|
|
1763
|
-
let [r, i] =
|
|
1791
|
+
function nr({ deliveries: e, onRetry: t, readNodeLabel: n }) {
|
|
1792
|
+
let [r, i] = S(null), [a, o] = S(!1), [s, c] = S(null), l = x(() => e.map((e) => ({
|
|
1764
1793
|
delivery: e,
|
|
1765
1794
|
key: e.id
|
|
1766
|
-
})), [e]), u =
|
|
1795
|
+
})), [e]), u = x(() => [
|
|
1767
1796
|
{
|
|
1768
1797
|
key: "endpoint",
|
|
1769
|
-
render: ({ delivery: e }) => /* @__PURE__ */
|
|
1770
|
-
style:
|
|
1771
|
-
children: [/* @__PURE__ */
|
|
1798
|
+
render: ({ delivery: e }) => /* @__PURE__ */ k("div", {
|
|
1799
|
+
style: er,
|
|
1800
|
+
children: [/* @__PURE__ */ O(D, {
|
|
1772
1801
|
component: "span",
|
|
1773
1802
|
variant: "body",
|
|
1774
1803
|
children: e.endpointLabel ?? e.endpointKey
|
|
1775
|
-
}), /* @__PURE__ */ D
|
|
1804
|
+
}), /* @__PURE__ */ k(D, {
|
|
1776
1805
|
color: "text-neutral",
|
|
1777
1806
|
component: "span",
|
|
1778
1807
|
variant: "caption",
|
|
@@ -1791,13 +1820,13 @@ function qn({ deliveries: e, onRetry: t, readNodeLabel: n }) {
|
|
|
1791
1820
|
},
|
|
1792
1821
|
{
|
|
1793
1822
|
key: "status",
|
|
1794
|
-
render: ({ delivery: e }) => /* @__PURE__ */
|
|
1823
|
+
render: ({ delivery: e }) => /* @__PURE__ */ O(rr, { status: e.status }),
|
|
1795
1824
|
title: "狀態",
|
|
1796
1825
|
width: 120
|
|
1797
1826
|
},
|
|
1798
1827
|
{
|
|
1799
1828
|
key: "attemptCount",
|
|
1800
|
-
render: ({ delivery: e }) => /* @__PURE__ */
|
|
1829
|
+
render: ({ delivery: e }) => /* @__PURE__ */ O(D, {
|
|
1801
1830
|
component: "span",
|
|
1802
1831
|
variant: "body",
|
|
1803
1832
|
children: e.attemptCount
|
|
@@ -1807,21 +1836,21 @@ function qn({ deliveries: e, onRetry: t, readNodeLabel: n }) {
|
|
|
1807
1836
|
},
|
|
1808
1837
|
{
|
|
1809
1838
|
key: "lastError",
|
|
1810
|
-
render: ({ delivery: e }) => e.lastErrorCode && e.status !== "SENT" ? /* @__PURE__ */
|
|
1811
|
-
style:
|
|
1812
|
-
children: [/* @__PURE__ */
|
|
1839
|
+
render: ({ delivery: e }) => e.lastErrorCode && e.status !== "SENT" ? /* @__PURE__ */ k("div", {
|
|
1840
|
+
style: er,
|
|
1841
|
+
children: [/* @__PURE__ */ O(D, {
|
|
1813
1842
|
color: "text-error",
|
|
1814
1843
|
component: "span",
|
|
1815
1844
|
variant: "body",
|
|
1816
1845
|
children: e.lastErrorCode
|
|
1817
|
-
}), e.lastErrorDetail ? /* @__PURE__ */
|
|
1846
|
+
}), e.lastErrorDetail ? /* @__PURE__ */ O(D, {
|
|
1818
1847
|
color: "text-neutral",
|
|
1819
1848
|
component: "span",
|
|
1820
|
-
style:
|
|
1849
|
+
style: tr,
|
|
1821
1850
|
variant: "caption",
|
|
1822
1851
|
children: e.lastErrorDetail
|
|
1823
1852
|
}) : null]
|
|
1824
|
-
}) : /* @__PURE__ */
|
|
1853
|
+
}) : /* @__PURE__ */ O(D, {
|
|
1825
1854
|
color: "text-neutral",
|
|
1826
1855
|
component: "span",
|
|
1827
1856
|
variant: "body",
|
|
@@ -1832,18 +1861,18 @@ function qn({ deliveries: e, onRetry: t, readNodeLabel: n }) {
|
|
|
1832
1861
|
},
|
|
1833
1862
|
{
|
|
1834
1863
|
key: "time",
|
|
1835
|
-
render: ({ delivery: e }) => /* @__PURE__ */
|
|
1864
|
+
render: ({ delivery: e }) => /* @__PURE__ */ O(D, {
|
|
1836
1865
|
component: "span",
|
|
1837
1866
|
variant: "body",
|
|
1838
|
-
children:
|
|
1867
|
+
children: ir(e)
|
|
1839
1868
|
}),
|
|
1840
1869
|
title: "時間",
|
|
1841
1870
|
width: 220
|
|
1842
1871
|
}
|
|
1843
|
-
], [n]), d =
|
|
1872
|
+
], [n]), d = x(() => ({
|
|
1844
1873
|
render: ({ delivery: e }) => e.status === "FAILED" && e.attemptCount > 0 ? [{
|
|
1845
1874
|
disabled: () => a,
|
|
1846
|
-
icon:
|
|
1875
|
+
icon: Qe,
|
|
1847
1876
|
iconType: "leading",
|
|
1848
1877
|
name: "重新傳送",
|
|
1849
1878
|
onClick: () => {
|
|
@@ -1865,30 +1894,30 @@ function qn({ deliveries: e, onRetry: t, readNodeLabel: n }) {
|
|
|
1865
1894
|
}
|
|
1866
1895
|
}
|
|
1867
1896
|
}
|
|
1868
|
-
return /* @__PURE__ */
|
|
1869
|
-
style:
|
|
1897
|
+
return /* @__PURE__ */ k("div", {
|
|
1898
|
+
style: $n,
|
|
1870
1899
|
children: [
|
|
1871
|
-
/* @__PURE__ */
|
|
1900
|
+
/* @__PURE__ */ O(D, {
|
|
1872
1901
|
component: "h2",
|
|
1873
1902
|
variant: "h3",
|
|
1874
1903
|
children: "外部系統通知"
|
|
1875
1904
|
}),
|
|
1876
|
-
s ? /* @__PURE__ */
|
|
1905
|
+
s ? /* @__PURE__ */ O(D, {
|
|
1877
1906
|
color: "text-error",
|
|
1878
1907
|
variant: "body",
|
|
1879
1908
|
children: s
|
|
1880
1909
|
}) : null,
|
|
1881
|
-
l.length > 0 ? /* @__PURE__ */
|
|
1910
|
+
l.length > 0 ? /* @__PURE__ */ O(xe, {
|
|
1882
1911
|
actions: d,
|
|
1883
1912
|
columns: u,
|
|
1884
1913
|
dataSource: l,
|
|
1885
1914
|
fullWidth: !0
|
|
1886
|
-
}) : /* @__PURE__ */
|
|
1915
|
+
}) : /* @__PURE__ */ O(D, {
|
|
1887
1916
|
color: "text-neutral",
|
|
1888
1917
|
variant: "body",
|
|
1889
1918
|
children: "此案件沒有外部系統通知。"
|
|
1890
1919
|
}),
|
|
1891
|
-
/* @__PURE__ */
|
|
1920
|
+
/* @__PURE__ */ O(T, {
|
|
1892
1921
|
cancelText: "取消",
|
|
1893
1922
|
confirmText: "重新傳送",
|
|
1894
1923
|
loading: a,
|
|
@@ -1902,7 +1931,7 @@ function qn({ deliveries: e, onRetry: t, readNodeLabel: n }) {
|
|
|
1902
1931
|
showModalHeader: !0,
|
|
1903
1932
|
supportingText: "會以相同的投遞編號重新送出,接收端可據此避免重複處理。",
|
|
1904
1933
|
title: "重新傳送通知",
|
|
1905
|
-
children: /* @__PURE__ */ D
|
|
1934
|
+
children: /* @__PURE__ */ k(D, {
|
|
1906
1935
|
variant: "body",
|
|
1907
1936
|
children: [
|
|
1908
1937
|
"確定要重新通知「",
|
|
@@ -1914,49 +1943,47 @@ function qn({ deliveries: e, onRetry: t, readNodeLabel: n }) {
|
|
|
1914
1943
|
]
|
|
1915
1944
|
});
|
|
1916
1945
|
}
|
|
1917
|
-
function
|
|
1918
|
-
return e === "SENT" ? /* @__PURE__ */
|
|
1946
|
+
function rr({ status: e }) {
|
|
1947
|
+
return e === "SENT" ? /* @__PURE__ */ O(fe, {
|
|
1919
1948
|
size: "sub",
|
|
1920
1949
|
text: "已送達",
|
|
1921
1950
|
variant: "dot-success"
|
|
1922
|
-
}) : e === "FAILED" ? /* @__PURE__ */
|
|
1951
|
+
}) : e === "FAILED" ? /* @__PURE__ */ O(fe, {
|
|
1923
1952
|
size: "sub",
|
|
1924
1953
|
text: "失敗",
|
|
1925
1954
|
variant: "dot-error"
|
|
1926
|
-
}) : /* @__PURE__ */
|
|
1955
|
+
}) : /* @__PURE__ */ O(fe, {
|
|
1927
1956
|
size: "sub",
|
|
1928
1957
|
text: e === "PENDING" ? "等待傳送" : "傳送中",
|
|
1929
1958
|
variant: "dot-info"
|
|
1930
1959
|
});
|
|
1931
1960
|
}
|
|
1932
|
-
function
|
|
1961
|
+
function ir(e) {
|
|
1933
1962
|
return e.sentAt ? `送達:${t(e.sentAt)}` : e.status === "PENDING" && e.nextRetryAt ? `下次重試:${t(e.nextRetryAt)}` : e.lastAttemptAt ? `最後嘗試:${t(e.lastAttemptAt)}` : `建立:${t(e.createdAt)}`;
|
|
1934
1963
|
}
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
function Xn(e, t) {
|
|
1964
|
+
// src/views/instances/viewer-field-access.ts
|
|
1965
|
+
function ar(e, t) {
|
|
1938
1966
|
let n = new Map(t.map((e) => [e.id, e]));
|
|
1939
1967
|
return new Set(e.filter((e) => e.eventType === "TASK_CREATED").map((e) => e.taskId === null ? void 0 : n.get(e.taskId)).filter((e) => e !== void 0 && !e.isAdhoc).map((e) => e.nodeId));
|
|
1940
1968
|
}
|
|
1941
|
-
function
|
|
1969
|
+
function or({ activityLogs: e, actingTask: t, instance: n, tasks: r }) {
|
|
1942
1970
|
let i = n.workflowSnapshot;
|
|
1943
|
-
return
|
|
1971
|
+
return F({
|
|
1944
1972
|
definition: i,
|
|
1945
1973
|
fieldKeys: (n.formDefinitionSnapshot.schema?.fields ?? []).map((e) => e.fieldKey),
|
|
1946
1974
|
isAdhocTask: t?.isAdhoc ?? !1,
|
|
1947
1975
|
nodeId: t?.nodeId ?? null,
|
|
1948
|
-
revealedFieldKeys:
|
|
1976
|
+
revealedFieldKeys: rt(i, ar(e, r))
|
|
1949
1977
|
});
|
|
1950
1978
|
}
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
return `還有 ${new Set(Object.keys(e).map(Qe)).size} 個補填欄位需要完成`;
|
|
1979
|
+
// src/views/instances/detail/InstanceDetailView.tsx
|
|
1980
|
+
function sr(e) {
|
|
1981
|
+
return `還有 ${new Set(Object.keys(e).map(P)).size} 個補填欄位需要完成`;
|
|
1955
1982
|
}
|
|
1956
|
-
var
|
|
1983
|
+
var cr = 3e3, lr = 40, ur = 184, dr = 96, fr = {
|
|
1957
1984
|
display: "grid",
|
|
1958
1985
|
gap: 16
|
|
1959
|
-
},
|
|
1986
|
+
}, pr = {
|
|
1960
1987
|
background: "#f8fafc",
|
|
1961
1988
|
border: "1px solid #e2e8f0",
|
|
1962
1989
|
borderRadius: 8,
|
|
@@ -1964,7 +1991,7 @@ var $n = 3e3, er = 40, tr = 184, nr = 96, rr = {
|
|
|
1964
1991
|
minHeight: 440,
|
|
1965
1992
|
overflow: "hidden",
|
|
1966
1993
|
width: "min(80vw, 1040px)"
|
|
1967
|
-
},
|
|
1994
|
+
}, mr = {
|
|
1968
1995
|
background: "#ffffff",
|
|
1969
1996
|
border: "1px solid #cbd5e1",
|
|
1970
1997
|
borderRadius: 8,
|
|
@@ -1974,24 +2001,24 @@ var $n = 3e3, er = 40, tr = 184, nr = 96, rr = {
|
|
|
1974
2001
|
minHeight: 82,
|
|
1975
2002
|
padding: 12,
|
|
1976
2003
|
width: 184
|
|
1977
|
-
},
|
|
2004
|
+
}, hr = {
|
|
1978
2005
|
borderRadius: 999,
|
|
1979
2006
|
fontSize: 12,
|
|
1980
2007
|
fontWeight: 600,
|
|
1981
2008
|
justifySelf: "start",
|
|
1982
2009
|
lineHeight: "18px",
|
|
1983
2010
|
padding: "0 8px"
|
|
1984
|
-
},
|
|
2011
|
+
}, gr = {
|
|
1985
2012
|
color: "#64748b",
|
|
1986
2013
|
fontSize: 12,
|
|
1987
2014
|
overflow: "hidden",
|
|
1988
2015
|
textOverflow: "ellipsis",
|
|
1989
2016
|
whiteSpace: "nowrap"
|
|
1990
|
-
},
|
|
2017
|
+
}, _r = { opacity: 0 }, vr = {
|
|
1991
2018
|
display: "flex",
|
|
1992
2019
|
flexWrap: "wrap",
|
|
1993
2020
|
gap: 8
|
|
1994
|
-
},
|
|
2021
|
+
}, yr = {
|
|
1995
2022
|
alignItems: "center",
|
|
1996
2023
|
background: "#ffffff",
|
|
1997
2024
|
border: "1px solid #cbd5e1",
|
|
@@ -2003,29 +2030,29 @@ var $n = 3e3, er = 40, tr = 184, nr = 96, rr = {
|
|
|
2003
2030
|
gap: 6,
|
|
2004
2031
|
lineHeight: "20px",
|
|
2005
2032
|
padding: "4px 8px"
|
|
2006
|
-
},
|
|
2033
|
+
}, br = {
|
|
2007
2034
|
display: "grid",
|
|
2008
2035
|
gap: 16
|
|
2009
|
-
},
|
|
2010
|
-
function
|
|
2011
|
-
let { member:
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
}, [
|
|
2015
|
-
if (!
|
|
2036
|
+
}, xr = { workflowRuntime: jr };
|
|
2037
|
+
function Sr({ instanceId: a, showAttachments: s = !0, showForm: l = !0, showHistory: u = !0, showSignatures: d = !0, showTasks: f = !0, showWebhookDeliveries: p = !0 }) {
|
|
2038
|
+
let { member: y } = n(), b = y?.memberId ?? null, le = p && r(y), [de, fe] = S([]), [w, pe] = S(null), [me, he] = S([]), [ye, be] = S([]), [xe, Ce] = S([]), [Te, De] = S([]), [Oe, ke] = S(null), [A, Le] = S([]), [Re, ze] = S([]), [He, Ke] = S([]), [qe, M] = S(null), [Je, Qe] = S(!0), [tt, N] = S(!1), [rt, P] = S(!1), [F, st] = S(!1), [ut, I] = S(!1), [ft, pt] = S(""), [mt, L] = S(!1), [R, z] = S({}), [gt, _t] = S({}), { clearAfterResubmit: vt, comment: yt, setComment: bt } = xn(a), [xt, St] = S({}), [B, wt] = S(null), [Et, Dt] = S(null), [V, Ot] = S([]), kt = ft.trim(), U = ue(null), At = ue(0), jt = Te.some((e) => e.status === "PENDING" || e.status === "DELIVERY_IN_PROGRESS");
|
|
2039
|
+
ce(() => {
|
|
2040
|
+
dn();
|
|
2041
|
+
}, [b, a]), ce(() => {
|
|
2042
|
+
if (!le || !jt || At.current >= lr) return;
|
|
2016
2043
|
let e = setTimeout(() => {
|
|
2017
|
-
|
|
2018
|
-
},
|
|
2044
|
+
At.current += 1, mn();
|
|
2045
|
+
}, cr);
|
|
2019
2046
|
return () => clearTimeout(e);
|
|
2020
2047
|
}, [
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
]),
|
|
2025
|
-
|
|
2048
|
+
le,
|
|
2049
|
+
jt,
|
|
2050
|
+
Te
|
|
2051
|
+
]), ce(() => {
|
|
2052
|
+
_t(w?.formData ?? {}), St({});
|
|
2026
2053
|
}, [w]);
|
|
2027
|
-
let
|
|
2028
|
-
|
|
2054
|
+
let Mt = se((e, t) => {
|
|
2055
|
+
St((n) => {
|
|
2029
2056
|
let r = n[e];
|
|
2030
2057
|
return r?.hasValue === t.hasValue && r.status === t.status ? n : {
|
|
2031
2058
|
...n,
|
|
@@ -2035,273 +2062,281 @@ function pr({ instanceId: i, showAttachments: a = !0, showForm: ne = !0, showHis
|
|
|
2035
2062
|
}
|
|
2036
2063
|
};
|
|
2037
2064
|
});
|
|
2038
|
-
}, []),
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
}, [
|
|
2042
|
-
let X = w?.formDefinitionSnapshot.schema ?? null, Z =
|
|
2065
|
+
}, []), W = x(() => Rt(A, b), [b, A]), G = x(() => W && w ? w.workflowSnapshot.nodes.find((e) => e.id === W.nodeId) ?? null : null, [W, w]), Pt = G?.type === "userTask" && G.data.returnBehavior.allowReturn, It = G?.type === "userTask" && G.data.allowReject !== !1, Lt = G?.type === "userTask" && G.data.allowTransfer !== !1, zt = G?.type === "userTask" && G.data.allowAddSigner, Bt = !(!w || w.initiatorMemberId !== b || w.state !== "RUNNING" && w.state !== "RETURNED"), Vt = !!(w && w.initiatorMemberId === b && w.state === "RETURNED"), q = x(() => W && !W.isAdhoc && G?.type === "userTask" && nt(G).size > 0 ? G : null, [W, G]), Ht = q ? W?.id ?? null : null, Ut = o(), [J, Wt] = S({}), [Gt, Y] = S({}), [Kt, qt] = S(!1);
|
|
2066
|
+
ce(() => {
|
|
2067
|
+
Wt({}), Y({}), qt(!1);
|
|
2068
|
+
}, [Ht]);
|
|
2069
|
+
let X = w?.formDefinitionSnapshot.schema ?? null, Z = x(() => q && X ? ie(X, q) : null, [q, X]), Q = x(() => Z && w ? it(Z.fields, {
|
|
2043
2070
|
...w.formData,
|
|
2044
|
-
...
|
|
2071
|
+
...J
|
|
2045
2072
|
}) : null, [
|
|
2046
|
-
|
|
2073
|
+
J,
|
|
2047
2074
|
Z,
|
|
2048
2075
|
w
|
|
2049
|
-
]),
|
|
2050
|
-
draft:
|
|
2051
|
-
node:
|
|
2076
|
+
]), Jt = x(() => q && Z && Q && w ? m({
|
|
2077
|
+
draft: J,
|
|
2078
|
+
node: q,
|
|
2052
2079
|
schema: Z,
|
|
2053
2080
|
stored: w.formData,
|
|
2054
2081
|
values: Q
|
|
2055
2082
|
}) : {}, [
|
|
2056
|
-
Y,
|
|
2057
2083
|
J,
|
|
2084
|
+
q,
|
|
2058
2085
|
Z,
|
|
2059
2086
|
Q,
|
|
2060
2087
|
w
|
|
2061
|
-
]),
|
|
2062
|
-
activityLogs:
|
|
2063
|
-
actingTask:
|
|
2088
|
+
]), Yt = x(() => w ? or({
|
|
2089
|
+
activityLogs: de,
|
|
2090
|
+
actingTask: W,
|
|
2064
2091
|
instance: w,
|
|
2065
|
-
tasks:
|
|
2092
|
+
tasks: A
|
|
2066
2093
|
}) : void 0, [
|
|
2067
|
-
|
|
2068
|
-
|
|
2094
|
+
de,
|
|
2095
|
+
W,
|
|
2069
2096
|
w,
|
|
2070
|
-
|
|
2071
|
-
]),
|
|
2097
|
+
A
|
|
2098
|
+
]), Xt = x(() => w ? oe(w.workflowSnapshot, q) : void 0, [q, w]), Zt = x(() => new Map(He.map((e) => [e.memberId, e])), [He]), Qt = ht(x(() => X ? h(X, Jt) : [], [Jt, X])), $t = x(() => q && Q && X && w?.formDataFingerprint ? {
|
|
2072
2099
|
expectedFormDataFingerprint: w.formDataFingerprint,
|
|
2073
|
-
formData:
|
|
2074
|
-
summary:
|
|
2100
|
+
formData: ne(Jt, q),
|
|
2101
|
+
summary: g(X, q, Jt, new Map([...Zt.keys()].map((e) => [e, K(e, Zt)])), Qt)
|
|
2075
2102
|
} : null, [
|
|
2076
|
-
|
|
2077
|
-
|
|
2103
|
+
Jt,
|
|
2104
|
+
q,
|
|
2105
|
+
Qt,
|
|
2078
2106
|
Q,
|
|
2079
2107
|
w,
|
|
2080
|
-
|
|
2108
|
+
Zt,
|
|
2081
2109
|
X
|
|
2082
2110
|
]);
|
|
2083
|
-
function
|
|
2084
|
-
if (!
|
|
2085
|
-
let t =
|
|
2086
|
-
|
|
2111
|
+
function en(e) {
|
|
2112
|
+
if (!q) return;
|
|
2113
|
+
let t = nt(q), n = Object.entries(e).filter(([e, n]) => t.has(e) && JSON.stringify(n) !== JSON.stringify(Q?.[e]));
|
|
2114
|
+
Wt((e) => ({
|
|
2087
2115
|
...e,
|
|
2088
2116
|
...Object.fromEntries(n)
|
|
2089
|
-
})),
|
|
2117
|
+
})), Y({});
|
|
2090
2118
|
}
|
|
2091
|
-
async function
|
|
2092
|
-
if (
|
|
2119
|
+
async function tn() {
|
|
2120
|
+
if (q && !w?.formDataFingerprint) ge.error("無法確認表單版本,請重新整理頁面後再同意。");
|
|
2093
2121
|
else {
|
|
2094
|
-
if (
|
|
2095
|
-
|
|
2096
|
-
let e = await
|
|
2097
|
-
schema:
|
|
2122
|
+
if (q && Q && X && w?.formDefinitionSnapshot.uiSchema) {
|
|
2123
|
+
P(!0);
|
|
2124
|
+
let e = await ot({
|
|
2125
|
+
schema: ee(X, q),
|
|
2098
2126
|
uiSchema: w.formDefinitionSnapshot.uiSchema,
|
|
2099
2127
|
values: Q
|
|
2100
|
-
}).catch((e) => (
|
|
2128
|
+
}).catch((e) => (ge.error(_(e)), null)).finally(() => P(!1));
|
|
2101
2129
|
if (!e) return;
|
|
2102
2130
|
if (!e.valid) {
|
|
2103
|
-
|
|
2131
|
+
Y(e.errors), e.firstInvalidFieldKey && at(e.firstInvalidFieldKey), ge.warning(sr(e.errors));
|
|
2104
2132
|
return;
|
|
2105
2133
|
}
|
|
2106
2134
|
}
|
|
2107
2135
|
U.current?.handleApprove();
|
|
2108
2136
|
}
|
|
2109
2137
|
}
|
|
2110
|
-
function
|
|
2111
|
-
if (!
|
|
2112
|
-
if (
|
|
2113
|
-
let t =
|
|
2114
|
-
return t ? (
|
|
2138
|
+
function nn(e) {
|
|
2139
|
+
if (!q || !X) return !1;
|
|
2140
|
+
if (re(e)) return qt(!0), !0;
|
|
2141
|
+
let t = v(e, X, q);
|
|
2142
|
+
return t ? (Y(t), at(Object.keys(t)[0] ?? ""), ge.warning(sr(t)), !0) : !1;
|
|
2115
2143
|
}
|
|
2116
|
-
async function
|
|
2117
|
-
await
|
|
2144
|
+
async function rn() {
|
|
2145
|
+
await dn(), qt(!1);
|
|
2118
2146
|
}
|
|
2119
|
-
let
|
|
2147
|
+
let an = x(() => c(me), [me]), on = x(() => new Map(xe.map((e) => [e.id, e])), [xe]), sn = x(() => w ? Dr(w.workflowSnapshot) : null, [w]), cn = x(() => w && sn ? Er(sn, A, Re, w.state) : [], [
|
|
2120
2148
|
w,
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
]),
|
|
2125
|
-
async function
|
|
2126
|
-
Qe(!0),
|
|
2149
|
+
sn,
|
|
2150
|
+
A,
|
|
2151
|
+
Re
|
|
2152
|
+
]), ln = x(() => sn ? Or(sn) : [], [sn]), un = x(() => w ? wr(w.workflowSnapshot) : [], [w]);
|
|
2153
|
+
async function dn() {
|
|
2154
|
+
Qe(!0), M(null);
|
|
2127
2155
|
try {
|
|
2128
|
-
let e = await
|
|
2129
|
-
|
|
2130
|
-
let t = await
|
|
2131
|
-
|
|
2132
|
-
|
|
2156
|
+
let e = await Ne(a);
|
|
2157
|
+
fe(e.activityLogs), pe(e.instance), Le(e.tasks), ze(e.workflowTokens);
|
|
2158
|
+
let t = await Ae(e.instance.id), [n, r, i, o, s] = await Promise.all([
|
|
2159
|
+
bn(e.tasks),
|
|
2160
|
+
vn({
|
|
2133
2161
|
...e,
|
|
2134
2162
|
adhocDirectives: t
|
|
2135
2163
|
}),
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2164
|
+
je(e.instance.id),
|
|
2165
|
+
Ie(e.instance.id),
|
|
2166
|
+
fn(e.instance.id)
|
|
2139
2167
|
]);
|
|
2140
|
-
|
|
2168
|
+
he(n), Ke(r), be(i), Ce(o.signatures), ke(o.verification), Ot(t), De(s);
|
|
2141
2169
|
} catch (e) {
|
|
2142
|
-
|
|
2170
|
+
M(_(e));
|
|
2143
2171
|
} finally {
|
|
2144
2172
|
Qe(!1);
|
|
2145
2173
|
}
|
|
2146
2174
|
}
|
|
2147
|
-
async function
|
|
2148
|
-
return
|
|
2175
|
+
async function fn(e) {
|
|
2176
|
+
return le ? Me(e).catch(() => []) : [];
|
|
2149
2177
|
}
|
|
2150
|
-
async function
|
|
2151
|
-
await
|
|
2178
|
+
async function pn(e) {
|
|
2179
|
+
await Ve(e.id), At.current = 0, await dn();
|
|
2152
2180
|
}
|
|
2153
|
-
async function
|
|
2154
|
-
let e = await
|
|
2155
|
-
e.some((e) => e.status === "PENDING" || e.status === "DELIVERY_IN_PROGRESS") ?
|
|
2181
|
+
async function mn() {
|
|
2182
|
+
let e = await fn(a);
|
|
2183
|
+
e.some((e) => e.status === "PENDING" || e.status === "DELIVERY_IN_PROGRESS") ? De(e) : await dn();
|
|
2156
2184
|
}
|
|
2157
|
-
async function
|
|
2158
|
-
if (!
|
|
2159
|
-
return { id: (await
|
|
2185
|
+
async function hn(e, t) {
|
|
2186
|
+
if (!b) throw Error("尚未登入,無法上傳附件");
|
|
2187
|
+
return { id: (await Ue({
|
|
2160
2188
|
file: t,
|
|
2161
2189
|
formFieldPath: `form.${e.fieldKey}`
|
|
2162
2190
|
})).id };
|
|
2163
2191
|
}
|
|
2164
|
-
async function
|
|
2165
|
-
if (
|
|
2166
|
-
|
|
2167
|
-
|
|
2192
|
+
async function gn(e) {
|
|
2193
|
+
if (b) try {
|
|
2194
|
+
let t = await Pe({ id: e });
|
|
2195
|
+
window.open(t, "_blank", "noopener,noreferrer");
|
|
2196
|
+
} catch (e) {
|
|
2197
|
+
ge.error(_(e));
|
|
2198
|
+
}
|
|
2168
2199
|
}
|
|
2169
|
-
async function
|
|
2170
|
-
if (!
|
|
2171
|
-
let t = await
|
|
2172
|
-
|
|
2200
|
+
async function _n(e) {
|
|
2201
|
+
if (!b) return;
|
|
2202
|
+
let t = await Fe({ id: e.id });
|
|
2203
|
+
wt(e), Dt(t);
|
|
2173
2204
|
}
|
|
2174
|
-
async function
|
|
2175
|
-
if (
|
|
2176
|
-
|
|
2205
|
+
async function yn() {
|
|
2206
|
+
if (b && w && Bt) {
|
|
2207
|
+
N(!0), M(null), z({});
|
|
2177
2208
|
try {
|
|
2178
|
-
await
|
|
2179
|
-
cancelledByMemberId:
|
|
2180
|
-
comment:
|
|
2209
|
+
await Ee({
|
|
2210
|
+
cancelledByMemberId: b,
|
|
2211
|
+
comment: kt || null,
|
|
2181
2212
|
instanceId: w.id
|
|
2182
|
-
}),
|
|
2213
|
+
}), pt(""), L(!1), await dn();
|
|
2183
2214
|
} catch (e) {
|
|
2184
|
-
|
|
2215
|
+
M(_(e));
|
|
2185
2216
|
} finally {
|
|
2186
|
-
|
|
2217
|
+
N(!1);
|
|
2187
2218
|
}
|
|
2188
2219
|
}
|
|
2189
2220
|
}
|
|
2190
|
-
async function
|
|
2191
|
-
if (!
|
|
2192
|
-
|
|
2193
|
-
let e =
|
|
2221
|
+
async function Sn() {
|
|
2222
|
+
if (!b || !w || !Vt) return;
|
|
2223
|
+
N(!0), M(null), z({});
|
|
2224
|
+
let e = i(Object.values(xt));
|
|
2194
2225
|
if (e) {
|
|
2195
|
-
|
|
2226
|
+
M(e), N(!1);
|
|
2196
2227
|
return;
|
|
2197
2228
|
}
|
|
2198
|
-
|
|
2229
|
+
if (Ut.blockMessage) {
|
|
2230
|
+
M(Ut.blockMessage), N(!1);
|
|
2231
|
+
return;
|
|
2232
|
+
}
|
|
2233
|
+
let t = w.formDefinitionSnapshot.schema ? ae(w.formDefinitionSnapshot.schema, w.workflowSnapshot) : null, n = te(t ? it(t.fields, gt) : gt, w.workflowSnapshot);
|
|
2199
2234
|
try {
|
|
2200
2235
|
if (t && w.formDefinitionSnapshot.uiSchema) {
|
|
2201
|
-
let e = await
|
|
2236
|
+
let e = await ot({
|
|
2202
2237
|
schema: t,
|
|
2203
2238
|
uiSchema: w.formDefinitionSnapshot.uiSchema,
|
|
2204
2239
|
values: n
|
|
2205
2240
|
});
|
|
2206
2241
|
if (!e.valid) {
|
|
2207
|
-
|
|
2242
|
+
z(e.errors), M("請先修正表單中標示的欄位。"), e.firstInvalidFieldKey && at(e.firstInvalidFieldKey);
|
|
2208
2243
|
return;
|
|
2209
2244
|
}
|
|
2210
2245
|
}
|
|
2211
|
-
await
|
|
2212
|
-
comment:
|
|
2246
|
+
await Be({
|
|
2247
|
+
comment: yt,
|
|
2213
2248
|
formData: n,
|
|
2214
|
-
initiatorMemberId:
|
|
2249
|
+
initiatorMemberId: b,
|
|
2215
2250
|
instanceId: w.id,
|
|
2216
2251
|
title: w.title
|
|
2217
|
-
}),
|
|
2252
|
+
}), vt(w.id), await dn();
|
|
2218
2253
|
} catch (e) {
|
|
2219
|
-
|
|
2254
|
+
M(_(e));
|
|
2220
2255
|
} finally {
|
|
2221
|
-
|
|
2256
|
+
N(!1);
|
|
2222
2257
|
}
|
|
2223
2258
|
}
|
|
2224
|
-
let $ =
|
|
2225
|
-
return /* @__PURE__ */
|
|
2226
|
-
/* @__PURE__ */
|
|
2259
|
+
let $ = tt || F || rt;
|
|
2260
|
+
return /* @__PURE__ */ k(we, { children: [
|
|
2261
|
+
/* @__PURE__ */ O(_e, { children: /* @__PURE__ */ k(We, {
|
|
2227
2262
|
description: w ? [
|
|
2228
|
-
|
|
2263
|
+
Nt(w.state),
|
|
2229
2264
|
t(w.startedAt),
|
|
2230
|
-
|
|
2231
|
-
].filter(
|
|
2265
|
+
Tt(w, Zt)
|
|
2266
|
+
].filter(H).join(" · ") : "載入案件內容。",
|
|
2232
2267
|
title: w?.title ?? "簽核案件",
|
|
2233
2268
|
children: [
|
|
2234
|
-
w ? /* @__PURE__ */
|
|
2269
|
+
w ? /* @__PURE__ */ O(C, {
|
|
2235
2270
|
"aria-label": "查看流程圖",
|
|
2236
|
-
icon:
|
|
2271
|
+
icon: $e,
|
|
2237
2272
|
iconType: "icon-only",
|
|
2238
|
-
onClick: () =>
|
|
2273
|
+
onClick: () => I(!0),
|
|
2239
2274
|
title: "查看流程圖",
|
|
2240
2275
|
variant: "base-secondary",
|
|
2241
2276
|
children: "流程圖"
|
|
2242
2277
|
}) : null,
|
|
2243
|
-
|
|
2278
|
+
Bt ? /* @__PURE__ */ O(C, {
|
|
2244
2279
|
disabled: $,
|
|
2245
|
-
icon:
|
|
2280
|
+
icon: j,
|
|
2246
2281
|
iconType: "leading",
|
|
2247
|
-
onClick: () =>
|
|
2282
|
+
onClick: () => L(!0),
|
|
2248
2283
|
variant: "destructive-secondary",
|
|
2249
2284
|
children: "取消案件"
|
|
2250
2285
|
}) : null,
|
|
2251
|
-
|
|
2252
|
-
|
|
2286
|
+
W ? /* @__PURE__ */ k(we, { children: [
|
|
2287
|
+
zt ? /* @__PURE__ */ k(we, { children: [/* @__PURE__ */ O(C, {
|
|
2253
2288
|
disabled: $,
|
|
2254
|
-
icon:
|
|
2289
|
+
icon: Xe,
|
|
2255
2290
|
iconType: "leading",
|
|
2256
2291
|
onClick: () => U.current?.openAdhocModal("COUNTERSIGN"),
|
|
2257
2292
|
variant: "base-secondary",
|
|
2258
2293
|
children: "會簽"
|
|
2259
|
-
}, "adhoc-countersign"), /* @__PURE__ */
|
|
2294
|
+
}, "adhoc-countersign"), /* @__PURE__ */ O(C, {
|
|
2260
2295
|
disabled: $,
|
|
2261
|
-
icon:
|
|
2296
|
+
icon: Xe,
|
|
2262
2297
|
iconType: "leading",
|
|
2263
2298
|
onClick: () => U.current?.openAdhocModal("PRE_APPROVAL"),
|
|
2264
2299
|
variant: "base-secondary",
|
|
2265
2300
|
children: "加簽"
|
|
2266
2301
|
}, "adhoc-pre-approval")] }) : null,
|
|
2267
|
-
/* @__PURE__ */
|
|
2302
|
+
/* @__PURE__ */ O(C, {
|
|
2268
2303
|
disabled: $,
|
|
2269
|
-
icon:
|
|
2304
|
+
icon: Ye,
|
|
2270
2305
|
iconType: "leading",
|
|
2271
2306
|
onClick: () => U.current?.openAdhocModal("STAGE_NOTIFY"),
|
|
2272
2307
|
variant: "base-secondary",
|
|
2273
2308
|
children: "通知設定"
|
|
2274
2309
|
}, "adhoc-notify"),
|
|
2275
|
-
|
|
2310
|
+
Pt ? /* @__PURE__ */ O(C, {
|
|
2276
2311
|
disabled: $,
|
|
2277
|
-
icon:
|
|
2312
|
+
icon: Ze,
|
|
2278
2313
|
iconType: "leading",
|
|
2279
2314
|
onClick: () => U.current?.openReturnModal(),
|
|
2280
2315
|
variant: "base-secondary",
|
|
2281
2316
|
children: "退回"
|
|
2282
2317
|
}, "task-return") : null,
|
|
2283
|
-
|
|
2318
|
+
Lt ? /* @__PURE__ */ O(C, {
|
|
2284
2319
|
disabled: $,
|
|
2285
|
-
icon:
|
|
2320
|
+
icon: et,
|
|
2286
2321
|
iconType: "leading",
|
|
2287
2322
|
onClick: () => U.current?.openTransferModal(),
|
|
2288
2323
|
variant: "base-secondary",
|
|
2289
2324
|
children: "轉派"
|
|
2290
2325
|
}, "task-transfer") : null,
|
|
2291
|
-
|
|
2326
|
+
It ? /* @__PURE__ */ O(C, {
|
|
2292
2327
|
disabled: $,
|
|
2293
|
-
icon:
|
|
2328
|
+
icon: j,
|
|
2294
2329
|
iconType: "leading",
|
|
2295
2330
|
onClick: () => U.current?.openRejectModal(),
|
|
2296
2331
|
variant: "destructive-secondary",
|
|
2297
2332
|
children: "拒絕"
|
|
2298
2333
|
}, "task-reject") : null,
|
|
2299
|
-
/* @__PURE__ */
|
|
2334
|
+
/* @__PURE__ */ O(C, {
|
|
2300
2335
|
disabled: $,
|
|
2301
|
-
icon:
|
|
2336
|
+
icon: Ge,
|
|
2302
2337
|
iconType: "leading",
|
|
2303
2338
|
onClick: () => {
|
|
2304
|
-
|
|
2339
|
+
tn();
|
|
2305
2340
|
},
|
|
2306
2341
|
variant: "base-primary",
|
|
2307
2342
|
children: "同意"
|
|
@@ -2309,182 +2344,188 @@ function pr({ instanceId: i, showAttachments: a = !0, showForm: ne = !0, showHis
|
|
|
2309
2344
|
] }) : null
|
|
2310
2345
|
]
|
|
2311
2346
|
}) }),
|
|
2312
|
-
/* @__PURE__ */
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2347
|
+
/* @__PURE__ */ k(ve, { children: [
|
|
2348
|
+
l ? /* @__PURE__ */ O(E, { children: /* @__PURE__ */ O(En, {
|
|
2349
|
+
attachments: ye,
|
|
2350
|
+
canResubmitInstance: Vt,
|
|
2351
|
+
deciding: tt,
|
|
2352
|
+
error: qe,
|
|
2353
|
+
fieldAccess: Yt,
|
|
2354
|
+
fieldLabelMarkers: Xt,
|
|
2355
|
+
fill: Z && Q && q ? {
|
|
2356
|
+
errors: Gt,
|
|
2357
|
+
fieldCount: nt(q).size,
|
|
2358
|
+
onChange: en,
|
|
2323
2359
|
schema: Z,
|
|
2324
2360
|
value: Q
|
|
2325
2361
|
} : null,
|
|
2326
2362
|
instance: w,
|
|
2327
|
-
loading:
|
|
2328
|
-
onDataSourceStateChange:
|
|
2329
|
-
|
|
2363
|
+
loading: Je,
|
|
2364
|
+
onDataSourceStateChange: Mt,
|
|
2365
|
+
onDownloadAttachment: (e) => {
|
|
2366
|
+
gn(e);
|
|
2367
|
+
},
|
|
2368
|
+
onFileUploadStateChange: Ut.onFileUploadStateChange,
|
|
2369
|
+
onReloadAfterConflict: Kt ? () => void rn() : null,
|
|
2330
2370
|
onResubmitFormChange: (e) => {
|
|
2331
|
-
|
|
2371
|
+
_t(e), z({});
|
|
2332
2372
|
},
|
|
2333
|
-
onResubmitCommentChange:
|
|
2334
|
-
onResubmitInstance: () => void
|
|
2335
|
-
onUploadAttachment:
|
|
2336
|
-
resubmitComment:
|
|
2337
|
-
resubmitFormData:
|
|
2338
|
-
resubmitFormErrors:
|
|
2373
|
+
onResubmitCommentChange: bt,
|
|
2374
|
+
onResubmitInstance: () => void Sn(),
|
|
2375
|
+
onUploadAttachment: hn,
|
|
2376
|
+
resubmitComment: yt,
|
|
2377
|
+
resubmitFormData: gt,
|
|
2378
|
+
resubmitFormErrors: R
|
|
2339
2379
|
}) }) : null,
|
|
2340
|
-
|
|
2380
|
+
s ? /* @__PURE__ */ O(E, { children: /* @__PURE__ */ O(On, {
|
|
2341
2381
|
attachments: ye,
|
|
2342
2382
|
onDownload: (e) => {
|
|
2343
|
-
|
|
2383
|
+
gn(e.id);
|
|
2344
2384
|
},
|
|
2345
2385
|
onPreview: (e) => {
|
|
2346
|
-
|
|
2386
|
+
_n(e);
|
|
2347
2387
|
}
|
|
2348
2388
|
}) }) : null,
|
|
2349
|
-
|
|
2350
|
-
adhocDirectives:
|
|
2351
|
-
currentMemberId:
|
|
2352
|
-
fill:
|
|
2389
|
+
f ? /* @__PURE__ */ O(E, { children: /* @__PURE__ */ O(zn, {
|
|
2390
|
+
adhocDirectives: V,
|
|
2391
|
+
currentMemberId: b,
|
|
2392
|
+
fill: $t,
|
|
2353
2393
|
instance: w,
|
|
2354
|
-
memberProfilesById:
|
|
2355
|
-
onChanged:
|
|
2356
|
-
onDecidingChange:
|
|
2357
|
-
onFillApproveError:
|
|
2394
|
+
memberProfilesById: Zt,
|
|
2395
|
+
onChanged: dn,
|
|
2396
|
+
onDecidingChange: st,
|
|
2397
|
+
onFillApproveError: nn,
|
|
2358
2398
|
ref: U,
|
|
2359
|
-
tasks:
|
|
2399
|
+
tasks: A
|
|
2360
2400
|
}) }) : null,
|
|
2361
|
-
|
|
2362
|
-
signatureVerification:
|
|
2363
|
-
signatures:
|
|
2401
|
+
d ? /* @__PURE__ */ O(E, { children: /* @__PURE__ */ O(Un, {
|
|
2402
|
+
signatureVerification: Oe,
|
|
2403
|
+
signatures: xe
|
|
2364
2404
|
}) }) : null,
|
|
2365
|
-
|
|
2366
|
-
deliveries:
|
|
2367
|
-
onRetry:
|
|
2368
|
-
readNodeLabel: (e) =>
|
|
2405
|
+
le && Te.length > 0 ? /* @__PURE__ */ O(E, { children: /* @__PURE__ */ O(nr, {
|
|
2406
|
+
deliveries: Te,
|
|
2407
|
+
onRetry: pn,
|
|
2408
|
+
readNodeLabel: (e) => Ft(e, w?.workflowSnapshot ?? null)
|
|
2369
2409
|
}) }) : null,
|
|
2370
|
-
|
|
2371
|
-
activityLogs:
|
|
2410
|
+
u ? /* @__PURE__ */ O(E, { children: /* @__PURE__ */ O(Qn, {
|
|
2411
|
+
activityLogs: de,
|
|
2372
2412
|
formSchema: X,
|
|
2373
2413
|
instanceState: w?.state ?? "RUNNING",
|
|
2374
|
-
memberProfilesById:
|
|
2375
|
-
signatureVerification:
|
|
2376
|
-
signaturesById:
|
|
2377
|
-
|
|
2378
|
-
|
|
2414
|
+
memberProfilesById: Zt,
|
|
2415
|
+
signatureVerification: Oe,
|
|
2416
|
+
signaturesById: on,
|
|
2417
|
+
taskDecisions: me,
|
|
2418
|
+
taskDecisionsByTaskId: an,
|
|
2419
|
+
tasks: A,
|
|
2379
2420
|
workflowSnapshot: w?.workflowSnapshot ?? null,
|
|
2380
|
-
workflowTokens:
|
|
2421
|
+
workflowTokens: Re
|
|
2381
2422
|
}) }) : null
|
|
2382
2423
|
] }),
|
|
2383
|
-
w ? /* @__PURE__ */
|
|
2424
|
+
w ? /* @__PURE__ */ O(T, {
|
|
2384
2425
|
modalType: "standard",
|
|
2385
|
-
onClose: () =>
|
|
2386
|
-
open:
|
|
2426
|
+
onClose: () => I(!1),
|
|
2427
|
+
open: ut,
|
|
2387
2428
|
showModalHeader: !0,
|
|
2388
2429
|
size: "wide",
|
|
2389
|
-
supportingText: `${
|
|
2430
|
+
supportingText: `${Nt(w.state)} · ${t(w.startedAt)}`,
|
|
2390
2431
|
title: "流程圖",
|
|
2391
|
-
children: /* @__PURE__ */
|
|
2392
|
-
style:
|
|
2393
|
-
children: [/* @__PURE__ */
|
|
2394
|
-
style:
|
|
2395
|
-
children: /* @__PURE__ */
|
|
2396
|
-
edges:
|
|
2432
|
+
children: /* @__PURE__ */ k("div", {
|
|
2433
|
+
style: fr,
|
|
2434
|
+
children: [/* @__PURE__ */ O("div", {
|
|
2435
|
+
style: pr,
|
|
2436
|
+
children: /* @__PURE__ */ k(dt, {
|
|
2437
|
+
edges: ln,
|
|
2397
2438
|
fitView: !0,
|
|
2398
2439
|
fitViewOptions: { padding: .18 },
|
|
2399
2440
|
maxZoom: 1.2,
|
|
2400
2441
|
minZoom: .2,
|
|
2401
|
-
nodes:
|
|
2442
|
+
nodes: cn,
|
|
2402
2443
|
nodesDraggable: !1,
|
|
2403
2444
|
nodesFocusable: !1,
|
|
2404
|
-
nodeTypes:
|
|
2445
|
+
nodeTypes: xr,
|
|
2405
2446
|
panOnDrag: !0,
|
|
2406
2447
|
proOptions: { hideAttribution: !0 },
|
|
2407
|
-
children: [/* @__PURE__ */
|
|
2448
|
+
children: [/* @__PURE__ */ O(ct, {}), /* @__PURE__ */ O(lt, { showInteractive: !1 })]
|
|
2408
2449
|
})
|
|
2409
|
-
}),
|
|
2410
|
-
style:
|
|
2411
|
-
children:
|
|
2412
|
-
style:
|
|
2450
|
+
}), un.length > 0 ? /* @__PURE__ */ O("div", {
|
|
2451
|
+
style: vr,
|
|
2452
|
+
children: un.map((e) => /* @__PURE__ */ O("span", {
|
|
2453
|
+
style: yr,
|
|
2413
2454
|
children: e
|
|
2414
2455
|
}, e))
|
|
2415
2456
|
}) : null]
|
|
2416
2457
|
})
|
|
2417
2458
|
}) : null,
|
|
2418
|
-
/* @__PURE__ */
|
|
2459
|
+
/* @__PURE__ */ O(T, {
|
|
2419
2460
|
modalType: "standard",
|
|
2420
2461
|
onClose: () => {
|
|
2421
|
-
|
|
2462
|
+
wt(null), Dt(null);
|
|
2422
2463
|
},
|
|
2423
|
-
open: !!(
|
|
2464
|
+
open: !!(B && Et),
|
|
2424
2465
|
showModalHeader: !0,
|
|
2425
2466
|
size: "wide",
|
|
2426
|
-
supportingText:
|
|
2467
|
+
supportingText: B?.filename ?? void 0,
|
|
2427
2468
|
title: "PDF 預覽",
|
|
2428
|
-
children:
|
|
2429
|
-
filename:
|
|
2430
|
-
fileUrl:
|
|
2431
|
-
onDownload:
|
|
2469
|
+
children: Et ? /* @__PURE__ */ O(Ct, {
|
|
2470
|
+
filename: B?.filename ?? "PDF 預覽",
|
|
2471
|
+
fileUrl: Et,
|
|
2472
|
+
onDownload: B ? () => void gn(B.id) : void 0
|
|
2432
2473
|
}) : null
|
|
2433
2474
|
}),
|
|
2434
|
-
/* @__PURE__ */
|
|
2475
|
+
/* @__PURE__ */ O(T, {
|
|
2435
2476
|
cancelText: "保留案件",
|
|
2436
2477
|
confirmButtonProps: { variant: "destructive-primary" },
|
|
2437
2478
|
confirmText: "確認取消",
|
|
2438
|
-
loading:
|
|
2479
|
+
loading: tt,
|
|
2439
2480
|
modalStatusType: "error",
|
|
2440
2481
|
modalType: "standard",
|
|
2441
|
-
onCancel: () =>
|
|
2442
|
-
onClose: () =>
|
|
2443
|
-
onConfirm: () => void
|
|
2444
|
-
open:
|
|
2482
|
+
onCancel: () => L(!1),
|
|
2483
|
+
onClose: () => L(!1),
|
|
2484
|
+
onConfirm: () => void yn(),
|
|
2485
|
+
open: mt,
|
|
2445
2486
|
showModalFooter: !0,
|
|
2446
2487
|
showModalHeader: !0,
|
|
2447
2488
|
supportingText: "取消後會關閉目前待簽任務與候選簽核人。",
|
|
2448
2489
|
title: "取消案件",
|
|
2449
|
-
children: /* @__PURE__ */
|
|
2450
|
-
style:
|
|
2451
|
-
children: [/* @__PURE__ */ D
|
|
2490
|
+
children: /* @__PURE__ */ k("div", {
|
|
2491
|
+
style: br,
|
|
2492
|
+
children: [/* @__PURE__ */ k(D, {
|
|
2452
2493
|
variant: "body",
|
|
2453
2494
|
children: [
|
|
2454
2495
|
"確定要取消「",
|
|
2455
2496
|
w?.title ?? "",
|
|
2456
2497
|
"」嗎?"
|
|
2457
2498
|
]
|
|
2458
|
-
}), /* @__PURE__ */
|
|
2499
|
+
}), /* @__PURE__ */ O(e, {
|
|
2459
2500
|
label: "取消原因",
|
|
2460
2501
|
name: "cancelComment",
|
|
2461
|
-
children: /* @__PURE__ */
|
|
2462
|
-
onChange: (e) =>
|
|
2502
|
+
children: /* @__PURE__ */ O(Se, {
|
|
2503
|
+
onChange: (e) => pt(e.target.value),
|
|
2463
2504
|
placeholder: "可填寫取消原因",
|
|
2464
2505
|
resize: "vertical",
|
|
2465
2506
|
rows: 3,
|
|
2466
|
-
value:
|
|
2507
|
+
value: ft
|
|
2467
2508
|
})
|
|
2468
2509
|
})]
|
|
2469
2510
|
})
|
|
2470
2511
|
})
|
|
2471
2512
|
] });
|
|
2472
2513
|
}
|
|
2473
|
-
function
|
|
2514
|
+
function Cr(e) {
|
|
2474
2515
|
return e.data.label ? e.data.label : e.data.isDefault ? "其他情況" : e.data.condition ?? "";
|
|
2475
2516
|
}
|
|
2476
|
-
function
|
|
2477
|
-
return e.edges.map(
|
|
2517
|
+
function wr(e) {
|
|
2518
|
+
return e.edges.map(Cr).filter((e) => e.trim().length > 0);
|
|
2478
2519
|
}
|
|
2479
|
-
function
|
|
2520
|
+
function Tr(e) {
|
|
2480
2521
|
return e === "startEvent" ? "開始" : e === "endEvent" ? "完成" : e === "userTask" ? "簽核節點" : e === "serviceTask" ? "知會節點" : e === "exclusiveGateway" ? "條件分流" : "平行處理";
|
|
2481
2522
|
}
|
|
2482
|
-
function
|
|
2523
|
+
function Er(e, t, n, r) {
|
|
2483
2524
|
return e.nodes.map((e) => {
|
|
2484
|
-
let i =
|
|
2525
|
+
let i = _n(e, t, n, r);
|
|
2485
2526
|
return {
|
|
2486
2527
|
data: {
|
|
2487
|
-
kindLabel:
|
|
2528
|
+
kindLabel: Tr(e.type),
|
|
2488
2529
|
label: e.data.label,
|
|
2489
2530
|
secondaryLabel: i.secondaryLabel,
|
|
2490
2531
|
statusLabel: i.statusLabel,
|
|
@@ -2492,42 +2533,42 @@ function _r(e, t, n, r) {
|
|
|
2492
2533
|
},
|
|
2493
2534
|
id: e.id,
|
|
2494
2535
|
position: e.position,
|
|
2495
|
-
sourcePosition:
|
|
2496
|
-
targetPosition:
|
|
2536
|
+
sourcePosition: I.Right,
|
|
2537
|
+
targetPosition: I.Left,
|
|
2497
2538
|
type: "workflowRuntime"
|
|
2498
2539
|
};
|
|
2499
2540
|
});
|
|
2500
2541
|
}
|
|
2501
|
-
function
|
|
2502
|
-
let t = new
|
|
2542
|
+
function Dr(e) {
|
|
2543
|
+
let t = new ft.graphlib.Graph();
|
|
2503
2544
|
return t.setDefaultEdgeLabel(() => ({})), t.setGraph({
|
|
2504
2545
|
nodesep: 56,
|
|
2505
2546
|
rankdir: "LR",
|
|
2506
2547
|
ranksep: 120
|
|
2507
2548
|
}), e.nodes.forEach((e) => {
|
|
2508
2549
|
t.setNode(e.id, {
|
|
2509
|
-
height:
|
|
2510
|
-
width:
|
|
2550
|
+
height: dr,
|
|
2551
|
+
width: ur
|
|
2511
2552
|
});
|
|
2512
2553
|
}), e.edges.forEach((e) => {
|
|
2513
2554
|
t.setEdge(e.source, e.target);
|
|
2514
|
-
}),
|
|
2555
|
+
}), ft.layout(t), {
|
|
2515
2556
|
...e,
|
|
2516
2557
|
nodes: e.nodes.map((e) => {
|
|
2517
2558
|
let n = t.node(e.id);
|
|
2518
2559
|
return n ? {
|
|
2519
2560
|
...e,
|
|
2520
2561
|
position: {
|
|
2521
|
-
x: n.x -
|
|
2522
|
-
y: n.y -
|
|
2562
|
+
x: n.x - ur / 2,
|
|
2563
|
+
y: n.y - dr / 2
|
|
2523
2564
|
}
|
|
2524
2565
|
} : e;
|
|
2525
2566
|
})
|
|
2526
2567
|
};
|
|
2527
2568
|
}
|
|
2528
|
-
function
|
|
2569
|
+
function Or(e) {
|
|
2529
2570
|
return e.edges.map((e) => {
|
|
2530
|
-
let t =
|
|
2571
|
+
let t = Cr(e);
|
|
2531
2572
|
return {
|
|
2532
2573
|
animated: !1,
|
|
2533
2574
|
id: e.id,
|
|
@@ -2555,25 +2596,25 @@ function yr(e) {
|
|
|
2555
2596
|
};
|
|
2556
2597
|
});
|
|
2557
2598
|
}
|
|
2558
|
-
function
|
|
2599
|
+
function kr(e) {
|
|
2559
2600
|
return e === "current" ? {
|
|
2560
|
-
...
|
|
2601
|
+
...mr,
|
|
2561
2602
|
border: "1px solid var(--mzn-color-primary, #0057ff)",
|
|
2562
2603
|
boxShadow: "0 0 0 3px rgba(0, 87, 255, 0.14)"
|
|
2563
2604
|
} : e === "completed" ? {
|
|
2564
|
-
...
|
|
2605
|
+
...mr,
|
|
2565
2606
|
border: "1px solid #16a34a"
|
|
2566
2607
|
} : e === "cancelled" ? {
|
|
2567
|
-
...
|
|
2608
|
+
...mr,
|
|
2568
2609
|
border: "1px solid #dc2626",
|
|
2569
2610
|
opacity: .72
|
|
2570
2611
|
} : e === "waiting" ? {
|
|
2571
|
-
...
|
|
2612
|
+
...mr,
|
|
2572
2613
|
border: "1px dashed #64748b"
|
|
2573
|
-
} :
|
|
2614
|
+
} : mr;
|
|
2574
2615
|
}
|
|
2575
|
-
function
|
|
2576
|
-
let t =
|
|
2616
|
+
function Ar(e) {
|
|
2617
|
+
let t = hr;
|
|
2577
2618
|
return e === "current" ? {
|
|
2578
2619
|
...t,
|
|
2579
2620
|
background: "#eff6ff",
|
|
@@ -2596,42 +2637,41 @@ function xr(e) {
|
|
|
2596
2637
|
color: "#64748b"
|
|
2597
2638
|
};
|
|
2598
2639
|
}
|
|
2599
|
-
function
|
|
2600
|
-
return /* @__PURE__ */
|
|
2601
|
-
style:
|
|
2640
|
+
function jr({ data: e }) {
|
|
2641
|
+
return /* @__PURE__ */ k("div", {
|
|
2642
|
+
style: kr(e.tone),
|
|
2602
2643
|
children: [
|
|
2603
|
-
/* @__PURE__ */
|
|
2644
|
+
/* @__PURE__ */ O(ut, {
|
|
2604
2645
|
isConnectable: !1,
|
|
2605
|
-
position:
|
|
2606
|
-
style:
|
|
2646
|
+
position: I.Left,
|
|
2647
|
+
style: _r,
|
|
2607
2648
|
type: "target"
|
|
2608
2649
|
}),
|
|
2609
|
-
/* @__PURE__ */
|
|
2650
|
+
/* @__PURE__ */ O(D, {
|
|
2610
2651
|
component: "span",
|
|
2611
2652
|
ellipsis: !0,
|
|
2612
2653
|
title: e.label,
|
|
2613
2654
|
variant: "label-primary",
|
|
2614
2655
|
children: e.label
|
|
2615
2656
|
}),
|
|
2616
|
-
/* @__PURE__ */
|
|
2617
|
-
style:
|
|
2657
|
+
/* @__PURE__ */ O("span", {
|
|
2658
|
+
style: Ar(e.tone),
|
|
2618
2659
|
children: e.statusLabel
|
|
2619
2660
|
}),
|
|
2620
|
-
/* @__PURE__ */
|
|
2661
|
+
/* @__PURE__ */ O("span", {
|
|
2621
2662
|
title: e.secondaryLabel,
|
|
2622
|
-
style:
|
|
2663
|
+
style: gr,
|
|
2623
2664
|
children: e.secondaryLabel || e.kindLabel
|
|
2624
2665
|
}),
|
|
2625
|
-
/* @__PURE__ */
|
|
2666
|
+
/* @__PURE__ */ O(ut, {
|
|
2626
2667
|
isConnectable: !1,
|
|
2627
|
-
position:
|
|
2628
|
-
style:
|
|
2668
|
+
position: I.Right,
|
|
2669
|
+
style: _r,
|
|
2629
2670
|
type: "source"
|
|
2630
2671
|
})
|
|
2631
2672
|
]
|
|
2632
2673
|
});
|
|
2633
2674
|
}
|
|
2634
|
-
|
|
2635
|
-
export { An as a, Pn as i, qn as n, yn as o, Un as r, vn as s, pr as t };
|
|
2675
|
+
export { zn as a, Un as i, nr as n, On as o, Qn as r, En as s, Sr as t };
|
|
2636
2676
|
|
|
2637
|
-
//# sourceMappingURL=detail-
|
|
2677
|
+
//# sourceMappingURL=detail-_GeKqNC-.js.map
|