@rytass/bpm-core-react 0.18.0 → 0.18.1
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 +25 -0
- package/dist/chunks/FormBuilderView-CHaAQL5v.cjs +3 -0
- package/dist/chunks/FormBuilderView-CHaAQL5v.cjs.map +1 -0
- package/dist/chunks/{FormBuilderView-BVKY1j_0.js → FormBuilderView-vQfVc08Z.js} +485 -481
- package/dist/chunks/FormBuilderView-vQfVc08Z.js.map +1 -0
- package/dist/chunks/{FormRendererView-BsTwZkqU.js → FormRendererView-CTLlG13b.js} +300 -189
- package/dist/chunks/FormRendererView-CTLlG13b.js.map +1 -0
- package/dist/chunks/FormRendererView-ChmM_4Yc.cjs +4 -0
- package/dist/chunks/FormRendererView-ChmM_4Yc.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/{approver-filled-form-Dm3Iw7iw.cjs → approver-filled-form-B4zPg9kz.cjs} +2 -2
- package/dist/chunks/approver-filled-form-B4zPg9kz.cjs.map +1 -0
- package/dist/chunks/{approver-filled-form-ZEwpmsHJ.js → approver-filled-form-Bgazhbvd.js} +40 -36
- package/dist/chunks/approver-filled-form-Bgazhbvd.js.map +1 -0
- 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-D9ipJpF_.js} +131 -148
- package/dist/chunks/compose-D9ipJpF_.js.map +1 -0
- package/dist/chunks/compose-DtfX8DQ9.cjs +2 -0
- package/dist/chunks/compose-DtfX8DQ9.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-Df79YzUn.cjs +65 -0
- package/dist/chunks/designer-Df79YzUn.cjs.map +1 -0
- package/dist/chunks/{designer-BCLrjb4H.js → designer-ubnZbP-A.js} +1791 -1407
- package/dist/chunks/designer-ubnZbP-A.js.map +1 -0
- package/dist/chunks/detail-BBC9kqXd.cjs +5 -0
- package/dist/chunks/detail-BBC9kqXd.cjs.map +1 -0
- package/dist/chunks/{detail-4F39ggBn.js → detail-C6XKZjlF.js} +1033 -1005
- package/dist/chunks/detail-C6XKZjlF.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/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/index.cjs +1 -1
- 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/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 +2 -2
- package/dist/views/instances/detail/sections/shared.d.ts +2 -2
- 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 +14 -15
- 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 { n as i, s as a, t as o } from "./FormRendererView-CTLlG13b.js";
|
|
8
|
+
import { a as s, n as c, o as l, r as u, t as d } from "./task-decision-3d17ZvZE.js";
|
|
9
|
+
import { t as f } from "./format-member-label-C73FuP-d.js";
|
|
10
|
+
import { a as p, c as m, d as h, i as g, l as ee, n as te, o as ne, r as _, s as re, t as ie, u as v } from "./approver-filled-form-Bgazhbvd.js";
|
|
11
|
+
import { Fragment as ae, forwardRef as y, useCallback as oe, useEffect as se, useImperativeHandle as ce, useMemo as b, useRef as le, useState as x } from "react";
|
|
12
|
+
import { AutoComplete as ue, Badge as de, Button as S, Description as C, DescriptionContent as fe, InlineMessage as w, Input as pe, Message as me, Modal as T, PageHeader as he, Section as ge, SectionGroup as _e, Select as ve, Stepper as ye, Table as be, Textarea as xe, Tooltip as Se, Typography as E } from "@mezzanine-ui/react";
|
|
13
|
+
import { Fragment as Ce, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
14
|
+
import { cancelAdhocDirective as we, cancelApprovalInstance as Te, configureAdhocCompletionNotification as Ee, configureAdhocStageNotification as De, decideTask as Oe, listAdhocDirectives as ke, listAttachments as Ae, listTaskDecisions as k, listWorkflowWebhookDeliveries as je, readApprovalInstance as Me, readAttachmentDownloadUrl as Ne, readAttachmentPreviewUrl as Pe, readInstanceSignatures as Fe, requestAdhocCountersign as Ie, requestAdhocPreApproval as Le, resolveMemberProfiles as Re, resubmitApprovalInstance as ze, retryWorkflowWebhookDelivery as Be, searchMembers as Ve, uploadAttachment as He } from "@rytass/bpm-core-client/workflow";
|
|
15
|
+
import Ue from "@mezzanine-ui/react/ContentHeader";
|
|
16
|
+
import { CheckedIcon as We, ChevronLeftIcon as Ge, ChevronRightIcon as Ke, DangerousOutlineIcon as qe, DownloadIcon as A, 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 j } from "@mezzanine-ui/icons";
|
|
17
|
+
import { readNodeFillableFieldKeys as nt, readRevealedFieldKeys as rt, readTopLevelFieldKey as it, resolveFieldAccess as M } from "@rytass/bpm-core-shared";
|
|
18
|
+
import { buildFormRendererValues as N, focusFormRendererField as at, readFormDataSourceErrorMessage as ot, validateFormRendererValuesInWorker as st } from "@rytass/bpm-core-client/form";
|
|
19
|
+
import { resolveOrgUnitOptions as ct } from "@rytass/bpm-core-client/organization";
|
|
20
|
+
import { Background as lt, Controls as ut, Handle as dt, Position as P, ReactFlow as ft } from "@xyflow/react";
|
|
21
|
+
import * as pt from "dagre";
|
|
22
|
+
import { Document as mt, Page as ht } from "react-pdf";
|
|
23
|
+
import { readSelectableReturnTargetNodeIds as gt } from "@rytass/bpm-core-shared/workflow-graph";
|
|
24
|
+
import { stepClasses as F } from "@mezzanine-ui/core/stepper";
|
|
25
|
+
function _t(e) {
|
|
26
|
+
let [t, n] = x(/* @__PURE__ */ new Map()), r = e.join("\n");
|
|
27
|
+
return se(() => {
|
|
28
|
+
let e = r ? [...new Set(r.split("\n"))].filter((e) => !t.has(e)) : [], a = !1;
|
|
29
|
+
return e.length === 0 ? () => void 0 : (ct(e).then((e) => e.map(i)).catch(() => []).then((t) => {
|
|
30
|
+
a || n((n) => new Map([...n, ...e.map((e) => [e, t.find((t) => t.id.toLowerCase() === e.toLowerCase())?.name ?? null])]));
|
|
31
|
+
}), () => {
|
|
32
|
+
a = !0;
|
|
33
|
+
});
|
|
34
|
+
}, [r, t]), b(() => 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 I = {
|
|
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
|
+
}, vt = 760, yt = 920, bt = 320, xt = 32, St = .75, Ct = 1.75, L = .25;
|
|
49
|
+
function wt({ filename: e, fileUrl: t, onDownload: n }) {
|
|
50
|
+
let r = le(null), [i, a] = x(null), [o, s] = x(1), [c, l] = x(1), [u, d] = x(vt);
|
|
51
|
+
se(() => {
|
|
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
|
+
}, []), se(() => {
|
|
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 = b(() => {
|
|
63
|
+
let e = Math.max(bt, u - xt);
|
|
64
|
+
return Math.round(Math.min(yt, e) * c);
|
|
65
|
+
}, [c, u]), p = oe((e) => {
|
|
51
66
|
a(e.numPages), s(1);
|
|
52
|
-
}, []),
|
|
53
|
-
return /* @__PURE__ */
|
|
67
|
+
}, []), m = o > 1, h = i !== null && o < i, g = c > St, ee = c < Ct, te = i === null ? `第 ${o} 頁` : `第 ${o} / ${i} 頁`, ne = `${Math.round(c * 100)}%`;
|
|
68
|
+
return /* @__PURE__ */ O("section", {
|
|
54
69
|
"aria-label": `${e} PDF 預覽`,
|
|
55
|
-
className:
|
|
56
|
-
children: [/* @__PURE__ */
|
|
57
|
-
className:
|
|
70
|
+
className: I.root,
|
|
71
|
+
children: [/* @__PURE__ */ O("div", {
|
|
72
|
+
className: I.toolbar,
|
|
58
73
|
children: [
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
className:
|
|
74
|
+
/* @__PURE__ */ O("div", {
|
|
75
|
+
className: I.pageControls,
|
|
61
76
|
"aria-label": "頁面切換",
|
|
62
77
|
children: [
|
|
63
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ D(S, {
|
|
64
79
|
"aria-label": "上一頁",
|
|
65
|
-
disabled: !
|
|
66
|
-
icon:
|
|
80
|
+
disabled: !m,
|
|
81
|
+
icon: Ge,
|
|
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__ */ E
|
|
74
|
-
className:
|
|
88
|
+
/* @__PURE__ */ D(E, {
|
|
89
|
+
className: I.counter,
|
|
75
90
|
component: "span",
|
|
76
91
|
variant: "body",
|
|
77
|
-
children:
|
|
92
|
+
children: te
|
|
78
93
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ D(S, {
|
|
80
95
|
"aria-label": "下一頁",
|
|
81
|
-
disabled: !
|
|
82
|
-
icon:
|
|
96
|
+
disabled: !h,
|
|
97
|
+
icon: Ke,
|
|
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__ */ O("div", {
|
|
107
|
+
className: I.zoomControls,
|
|
93
108
|
"aria-label": "縮放",
|
|
94
109
|
children: [
|
|
95
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ D(S, {
|
|
96
111
|
"aria-label": "縮小",
|
|
97
|
-
disabled: !
|
|
112
|
+
disabled: !g,
|
|
98
113
|
icon: j,
|
|
99
114
|
onClick: () => {
|
|
100
|
-
l((e) => Math.max(
|
|
115
|
+
l((e) => Math.max(St, e - L));
|
|
101
116
|
},
|
|
102
117
|
size: "minor",
|
|
103
118
|
variant: "base-secondary"
|
|
104
119
|
}),
|
|
105
|
-
/* @__PURE__ */ E
|
|
106
|
-
className:
|
|
120
|
+
/* @__PURE__ */ D(E, {
|
|
121
|
+
className: I.counter,
|
|
107
122
|
component: "span",
|
|
108
123
|
variant: "body",
|
|
109
|
-
children:
|
|
124
|
+
children: ne
|
|
110
125
|
}),
|
|
111
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ D(S, {
|
|
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(Ct, e + L));
|
|
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__ */ D(S, {
|
|
139
|
+
icon: A,
|
|
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__ */ D("div", {
|
|
148
|
+
className: I.viewport,
|
|
134
149
|
ref: r,
|
|
135
|
-
children: /* @__PURE__ */
|
|
136
|
-
error: /* @__PURE__ */
|
|
150
|
+
children: /* @__PURE__ */ D(mt, {
|
|
151
|
+
error: /* @__PURE__ */ D(Tt, { message: "PDF 無法載入。" }),
|
|
137
152
|
file: t,
|
|
138
|
-
loading: /* @__PURE__ */
|
|
139
|
-
noData: /* @__PURE__ */
|
|
153
|
+
loading: /* @__PURE__ */ D(Tt, { message: "正在載入 PDF..." }),
|
|
154
|
+
noData: /* @__PURE__ */ D(Tt, { message: "沒有可預覽的 PDF。" }),
|
|
140
155
|
onLoadSuccess: p,
|
|
141
156
|
suspense: !1,
|
|
142
|
-
children: /* @__PURE__ */
|
|
143
|
-
className:
|
|
144
|
-
loading: /* @__PURE__ */
|
|
157
|
+
children: /* @__PURE__ */ D(ht, {
|
|
158
|
+
className: I.page,
|
|
159
|
+
loading: /* @__PURE__ */ D(Tt, { message: "正在載入頁面..." }),
|
|
145
160
|
pageNumber: o,
|
|
146
161
|
renderAnnotationLayer: !0,
|
|
147
162
|
renderTextLayer: !0,
|
|
@@ -151,132 +166,130 @@ function ht({ filename: e, fileUrl: t, onDownload: n }) {
|
|
|
151
166
|
})]
|
|
152
167
|
});
|
|
153
168
|
}
|
|
154
|
-
function
|
|
155
|
-
return /* @__PURE__ */
|
|
156
|
-
className:
|
|
157
|
-
children: /* @__PURE__ */ E
|
|
169
|
+
function Tt({ message: e }) {
|
|
170
|
+
return /* @__PURE__ */ D("div", {
|
|
171
|
+
className: I.state,
|
|
172
|
+
children: /* @__PURE__ */ D(E, {
|
|
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 Et({ initiatorMemberId: e, submittedByMemberId: t }) {
|
|
167
181
|
return t && t !== e ? t : null;
|
|
168
182
|
}
|
|
169
|
-
function
|
|
170
|
-
let n =
|
|
183
|
+
function Dt(e, t) {
|
|
184
|
+
let n = Et(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 Ot(e) {
|
|
191
|
+
let t = R(e, "from"), n = R(e, "to"), r = R(e, "reason");
|
|
179
192
|
return !t || !n || !r ? null : {
|
|
180
193
|
from: t,
|
|
181
194
|
reason: r,
|
|
182
|
-
ruleId:
|
|
195
|
+
ruleId: R(e, "ruleId"),
|
|
183
196
|
to: n
|
|
184
197
|
};
|
|
185
198
|
}
|
|
186
|
-
function
|
|
199
|
+
function kt(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) => jt(e) ? Ot(e) : null).filter((e) => e !== null) : [];
|
|
190
203
|
} catch {
|
|
191
204
|
return [];
|
|
192
205
|
}
|
|
193
206
|
}
|
|
194
|
-
function
|
|
207
|
+
function R(e, t) {
|
|
195
208
|
let n = e[t];
|
|
196
209
|
return typeof n == "string" ? n : null;
|
|
197
210
|
}
|
|
198
|
-
function
|
|
211
|
+
function At(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 z(e, t) {
|
|
203
216
|
let n = e[t];
|
|
204
217
|
return typeof n == "number" ? n : null;
|
|
205
218
|
}
|
|
206
|
-
function
|
|
219
|
+
function B(e) {
|
|
207
220
|
return typeof e == "string" && e.trim().length > 0;
|
|
208
221
|
}
|
|
209
|
-
function
|
|
222
|
+
function jt(e) {
|
|
210
223
|
return typeof e == "object" && !!e;
|
|
211
224
|
}
|
|
212
|
-
function
|
|
225
|
+
function Mt(e) {
|
|
213
226
|
return e.status === "PENDING" || e.status === "IN_PROGRESS";
|
|
214
227
|
}
|
|
215
|
-
function
|
|
216
|
-
return
|
|
228
|
+
function V(e) {
|
|
229
|
+
return ot(e) || (e instanceof Error ? e.message : "發生未知錯誤");
|
|
217
230
|
}
|
|
218
|
-
function
|
|
231
|
+
function Nt(e) {
|
|
219
232
|
return !Number.isFinite(e) || e <= 0 ? "-" : e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1024 / 1024).toFixed(1)} MB`;
|
|
220
233
|
}
|
|
221
|
-
function
|
|
234
|
+
function H(e) {
|
|
222
235
|
return e.length > 16 ? `${e.slice(0, 12)}...` : e;
|
|
223
236
|
}
|
|
224
|
-
function
|
|
237
|
+
function Pt(e) {
|
|
225
238
|
return e === "APPROVED" ? "已同意" : e === "CANCELLED" ? "已取消" : e === "DRAFT" ? "草稿" : e === "EXPIRED" ? "已逾期" : e === "REJECTED" ? "已拒絕" : e === "RETURNED" ? "已退回" : e === "RUNNING" ? "進行中" : e;
|
|
226
239
|
}
|
|
227
240
|
function U(e) {
|
|
228
241
|
return e === "PENDING" ? "待處理" : e === "IN_PROGRESS" ? "處理中" : e === "COMPLETED" ? "已完成" : e === "CANCELLED" ? "已取消" : e === "TRANSFERRED" ? "已轉派" : e;
|
|
229
242
|
}
|
|
230
|
-
function
|
|
243
|
+
function Ft(e) {
|
|
231
244
|
return e === "APPROVED" ? "同意" : e === "REJECTED" ? "拒絕" : e === "RETURNED" ? "退回" : e === "TRANSFERRED" ? "轉派" : e;
|
|
232
245
|
}
|
|
233
|
-
function
|
|
246
|
+
function It(e) {
|
|
234
247
|
return e === "startEvent" ? "開始" : e === "endEvent" ? "完成" : e === "userTask" ? "簽核節點" : e === "serviceTask" ? "知會節點" : e === "exclusiveGateway" ? "條件分流" : "平行處理";
|
|
235
248
|
}
|
|
236
|
-
function
|
|
249
|
+
function Lt(e, t) {
|
|
237
250
|
return t?.nodes.find((t) => t.id === e)?.data.label ?? e;
|
|
238
251
|
}
|
|
239
252
|
function W(e, t) {
|
|
240
253
|
if (!e) return "-";
|
|
241
254
|
let n = t.get(e);
|
|
242
|
-
return n ?
|
|
255
|
+
return n ? f(n.name, n.email, "fullwidth") : e;
|
|
243
256
|
}
|
|
244
|
-
function
|
|
245
|
-
let n =
|
|
257
|
+
function Rt(e, t = /* @__PURE__ */ new Map()) {
|
|
258
|
+
let n = kt(e.delegationChainJson);
|
|
246
259
|
if (!e.assigneeMemberId) return e.candidateMemberIds.length ? `候選 ${e.candidateMemberIds.map((e) => W(e, t)).join("、")}` : "未指定";
|
|
247
260
|
let r = W(e.assigneeMemberId, t), i = W(e.originalAssigneeMemberId, t);
|
|
248
261
|
return n.length === 0 || e.originalAssigneeMemberId === e.assigneeMemberId ? r : `${r}(原:${i})`;
|
|
249
262
|
}
|
|
250
|
-
function
|
|
263
|
+
function zt(e, t) {
|
|
251
264
|
return t ? e.assigneeMemberId === t || (e.openCandidateMemberIds ?? e.candidateMemberIds).includes(t) : !1;
|
|
252
265
|
}
|
|
253
|
-
function
|
|
254
|
-
let n = e.filter((e) =>
|
|
266
|
+
function Bt(e, t) {
|
|
267
|
+
let n = e.filter((e) => zt(e, t) && (e.status === "PENDING" || e.status === "IN_PROGRESS"));
|
|
255
268
|
return n.find((e) => !e.isAdhoc) ?? n[0] ?? null;
|
|
256
269
|
}
|
|
257
|
-
function
|
|
270
|
+
function Vt(e, t) {
|
|
258
271
|
if (t.type !== "userTask" || !t.data.returnBehavior.allowReturn) return [];
|
|
259
272
|
if (t.data.returnBehavior.allowedTargets === "ANY") {
|
|
260
|
-
let n =
|
|
273
|
+
let n = gt(e, t.id);
|
|
261
274
|
return e.nodes.filter((e) => n.includes(e.id)).map((e) => ({
|
|
262
275
|
id: e.id,
|
|
263
|
-
name: `${e.data.label}(${
|
|
276
|
+
name: `${e.data.label}(${It(e.type)})`
|
|
264
277
|
}));
|
|
265
278
|
}
|
|
266
279
|
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
280
|
return r ? [{
|
|
268
281
|
id: r.id,
|
|
269
|
-
name: `${r.data.label}(${
|
|
282
|
+
name: `${r.data.label}(${It(r.type)})`
|
|
270
283
|
}] : [];
|
|
271
284
|
}
|
|
272
|
-
function
|
|
285
|
+
function Ht(e) {
|
|
273
286
|
return {
|
|
274
287
|
email: e.email,
|
|
275
288
|
id: e.memberId,
|
|
276
|
-
name:
|
|
289
|
+
name: f(e.name, e.email, "dot")
|
|
277
290
|
};
|
|
278
291
|
}
|
|
279
|
-
function
|
|
292
|
+
function G({ memberIds: e, useWebhookTarget: t, webhookUrl: n }) {
|
|
280
293
|
if (t) {
|
|
281
294
|
let e = n.trim();
|
|
282
295
|
return e ? {
|
|
@@ -301,11 +314,11 @@ function Nt({ memberIds: e, useWebhookTarget: t, webhookUrl: n }) {
|
|
|
301
314
|
valid: !1
|
|
302
315
|
};
|
|
303
316
|
}
|
|
304
|
-
function
|
|
317
|
+
function Ut(e) {
|
|
305
318
|
return !!e;
|
|
306
319
|
}
|
|
307
|
-
function
|
|
308
|
-
if (!
|
|
320
|
+
function Wt(e) {
|
|
321
|
+
if (!jt(e)) return null;
|
|
309
322
|
let t = e.email, n = e.id, r = e.name;
|
|
310
323
|
return typeof n == "string" && typeof r == "string" ? {
|
|
311
324
|
email: typeof t == "string" ? t : null,
|
|
@@ -313,7 +326,7 @@ function Ft(e) {
|
|
|
313
326
|
name: r
|
|
314
327
|
} : null;
|
|
315
328
|
}
|
|
316
|
-
function
|
|
329
|
+
function Gt(e, t) {
|
|
317
330
|
let n = e.trim().toLocaleLowerCase();
|
|
318
331
|
if (!n) return null;
|
|
319
332
|
let r = t.filter((e) => [
|
|
@@ -323,21 +336,21 @@ function It(e, t) {
|
|
|
323
336
|
].some((e) => e.toLocaleLowerCase().includes(n)));
|
|
324
337
|
return r.length === 1 ? r[0] ?? null : null;
|
|
325
338
|
}
|
|
326
|
-
function
|
|
327
|
-
return
|
|
339
|
+
function K(e) {
|
|
340
|
+
return B(e) ? {
|
|
328
341
|
text: e,
|
|
329
342
|
type: "text"
|
|
330
343
|
} : null;
|
|
331
344
|
}
|
|
332
|
-
function
|
|
333
|
-
return
|
|
345
|
+
function q(e, t, n = "neutral") {
|
|
346
|
+
return B(t) ? {
|
|
334
347
|
label: e,
|
|
335
348
|
text: t,
|
|
336
349
|
tone: n,
|
|
337
350
|
type: "comment"
|
|
338
351
|
} : null;
|
|
339
352
|
}
|
|
340
|
-
function
|
|
353
|
+
function Kt(e, t, n, r) {
|
|
341
354
|
let i = t ? n.get(t) : null;
|
|
342
355
|
return {
|
|
343
356
|
email: i?.email ?? null,
|
|
@@ -347,43 +360,43 @@ function Lt(e, t, n, r) {
|
|
|
347
360
|
type: "member"
|
|
348
361
|
};
|
|
349
362
|
}
|
|
350
|
-
function
|
|
363
|
+
function J(e) {
|
|
351
364
|
return !!e;
|
|
352
365
|
}
|
|
353
|
-
function
|
|
366
|
+
function Y(e) {
|
|
354
367
|
let t = e.findIndex((e) => e.id.startsWith("pending-task-") || e.id.startsWith("future-node-"));
|
|
355
368
|
return t === -1 ? e.length : t;
|
|
356
369
|
}
|
|
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" ||
|
|
370
|
+
function X(e) {
|
|
371
|
+
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" || Z(e) || Yt(e.eventType, $t(e));
|
|
359
372
|
}
|
|
360
|
-
function
|
|
361
|
-
return e.eventType === "TASK_CREATED" &&
|
|
373
|
+
function Z(e) {
|
|
374
|
+
return e.eventType === "TASK_CREATED" && At($t(e), "sequentialCandidateMemberIds").length > 0;
|
|
362
375
|
}
|
|
363
|
-
function
|
|
376
|
+
function qt(e) {
|
|
364
377
|
if (e.eventType !== "TASK_CANDIDATE_ACTIVATED" && e.eventType !== "TASK_CREATED") return [];
|
|
365
|
-
let t =
|
|
378
|
+
let t = $t(e);
|
|
366
379
|
return [
|
|
367
|
-
...
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
].filter(
|
|
380
|
+
...At(t, "sequentialCandidateMemberIds"),
|
|
381
|
+
R(t, "candidateMemberId"),
|
|
382
|
+
R(t, "previousMemberId")
|
|
383
|
+
].filter(B);
|
|
371
384
|
}
|
|
372
|
-
var
|
|
385
|
+
var Jt = /* @__PURE__ */ new Set([
|
|
373
386
|
"SERVICE_TASK_EXECUTED",
|
|
374
387
|
"SERVICE_TASK_FAILED",
|
|
375
388
|
"WEBHOOK_DELIVERY_RETRIED"
|
|
376
389
|
]);
|
|
377
|
-
function
|
|
378
|
-
return
|
|
390
|
+
function Yt(e, t) {
|
|
391
|
+
return Jt.has(e) && R(t, "action") === "NOTIFY_WEBHOOK";
|
|
379
392
|
}
|
|
380
|
-
function
|
|
381
|
-
return
|
|
393
|
+
function Xt(e) {
|
|
394
|
+
return R(e, "endpointLabel") ?? R(e, "endpointKey") ?? "外部系統";
|
|
382
395
|
}
|
|
383
|
-
function
|
|
396
|
+
function Zt(e) {
|
|
384
397
|
return e === "APPROVED" ? "已同意" : e === "REJECTED" ? "已拒絕" : e === "RETURNED" ? "已退回" : e === "TRANSFERRED" ? "已轉派" : "簽核已決議";
|
|
385
398
|
}
|
|
386
|
-
function
|
|
399
|
+
function Qt(e, t) {
|
|
387
400
|
if (e === "INSTANCE_STARTED") return "案件已發起";
|
|
388
401
|
if (e === "INSTANCE_CANCELLED") return "案件已取消";
|
|
389
402
|
if (e === "INSTANCE_EXPIRED") return "案件逾期,已由系統終止";
|
|
@@ -393,85 +406,102 @@ function Ut(e, t) {
|
|
|
393
406
|
if (e === "TOKEN_ADVANCED") return "流程已前進";
|
|
394
407
|
if (e === "TASK_CREATED") return "待簽任務已建立";
|
|
395
408
|
if (e === "TASK_CANDIDATE_ACTIVATED") return "輪到下一位簽核";
|
|
396
|
-
if (e === "TASK_DECIDED") return
|
|
409
|
+
if (e === "TASK_DECIDED") return Zt(R(t, "action"));
|
|
397
410
|
if (e === "SLA_TRIGGERED") return "時限提醒已觸發";
|
|
398
411
|
if (e === "TASK_REASSIGNED") return "管理者改派待辦";
|
|
399
|
-
if (
|
|
400
|
-
let n =
|
|
412
|
+
if (Yt(e, t)) {
|
|
413
|
+
let n = Xt(t);
|
|
401
414
|
return e === "SERVICE_TASK_EXECUTED" ? `已通知外部系統:${n}` : e === "SERVICE_TASK_FAILED" ? `通知外部系統失敗:${n}` : `管理者重新傳送外部系統通知:${n}`;
|
|
402
415
|
}
|
|
403
416
|
return e;
|
|
404
417
|
}
|
|
405
|
-
function
|
|
418
|
+
function $t(e) {
|
|
406
419
|
try {
|
|
407
420
|
let t = JSON.parse(e.payloadJson);
|
|
408
|
-
return
|
|
421
|
+
return jt(t) ? t : {};
|
|
409
422
|
} catch {
|
|
410
423
|
return {};
|
|
411
424
|
}
|
|
412
425
|
}
|
|
413
|
-
function
|
|
414
|
-
return e.eventType === "SLA_TRIGGERED" || e.eventType === "INSTANCE_EXPIRED" || e.eventType === "SERVICE_TASK_FAILED" &&
|
|
426
|
+
function en(e, t) {
|
|
427
|
+
return e.eventType === "SLA_TRIGGERED" || e.eventType === "INSTANCE_EXPIRED" || e.eventType === "SERVICE_TASK_FAILED" && Yt(e.eventType, t) || R(t, "action") === "REJECTED" || R(t, "instanceState") === "REJECTED";
|
|
415
428
|
}
|
|
416
|
-
function
|
|
429
|
+
function tn(e) {
|
|
417
430
|
return t(e);
|
|
418
431
|
}
|
|
419
|
-
function
|
|
420
|
-
if (e.eventType === "INSTANCE_STARTED") return
|
|
432
|
+
function nn(e, t, n, r) {
|
|
433
|
+
if (e.eventType === "INSTANCE_STARTED") return Dt({
|
|
421
434
|
initiatorMemberId: e.actorMemberId,
|
|
422
|
-
submittedByMemberId:
|
|
435
|
+
submittedByMemberId: R(t, "submittedByMemberId")
|
|
423
436
|
}, r);
|
|
424
437
|
if (e.eventType === "TASK_CANDIDATE_ACTIVATED") {
|
|
425
|
-
let e =
|
|
438
|
+
let e = R(t, "candidateMemberId"), n = R(t, "previousMemberId");
|
|
426
439
|
if (!e) return null;
|
|
427
440
|
let i = W(e, r);
|
|
428
441
|
return n ? `輪到:${i}(前一位:${W(n, r)})` : `輪到:${i}`;
|
|
429
442
|
}
|
|
430
443
|
if (e.eventType === "TASK_CREATED") {
|
|
431
|
-
let e =
|
|
444
|
+
let e = At(t, "sequentialCandidateMemberIds");
|
|
432
445
|
if (e.length) return `簽核順序:${e.map((e) => W(e, r)).join(" → ")}`;
|
|
433
|
-
let n =
|
|
446
|
+
let n = R(t, "assigneeMemberId"), i = R(t, "originalAssigneeMemberId");
|
|
434
447
|
if (!n) {
|
|
435
|
-
let e =
|
|
448
|
+
let e = At(t, "candidateMemberIds");
|
|
436
449
|
return e.length ? `候選簽核人:${e.map((e) => W(e, r)).join("、")}` : null;
|
|
437
450
|
}
|
|
438
451
|
let a = W(n, r), o = W(i, r);
|
|
439
452
|
return i && i !== n ? `待簽人:${a}(原簽核人:${o})` : `待簽人:${a}`;
|
|
440
453
|
}
|
|
441
454
|
if (e.eventType === "TASK_DECIDED") {
|
|
442
|
-
let e =
|
|
443
|
-
return e === "REJECTED" && n ? [i, `拒絕原因:${n}`].filter(
|
|
455
|
+
let e = R(t, "action"), n = R(t, "comment"), i = e ? `決議:${Ft(e)}` : null, a = R(t, "transferToMemberId");
|
|
456
|
+
return e === "REJECTED" && n ? [i, `拒絕原因:${n}`].filter(B).join(" · ") : e === "APPROVED" && n ? [i, `同意說明:${n}`].filter(B).join(" · ") : e === "TRANSFERRED" ? [i, `轉派給:${W(a, r)}`].filter(B).join(" · ") : i;
|
|
444
457
|
}
|
|
445
458
|
if (e.eventType === "TOKEN_ADVANCED") {
|
|
446
|
-
let e =
|
|
447
|
-
if (e) return `流程結果:${
|
|
448
|
-
let r =
|
|
459
|
+
let e = R(t, "action");
|
|
460
|
+
if (e) return `流程結果:${Ft(e)}`;
|
|
461
|
+
let r = z(t, "arrivedCount"), i = z(t, "requiredCount");
|
|
449
462
|
if (r !== null && i !== null) return `等待匯合:${r}/${i}`;
|
|
450
|
-
let a =
|
|
451
|
-
if (a && o) return `由 ${
|
|
463
|
+
let a = R(t, "fromNodeId"), o = R(t, "toNodeId");
|
|
464
|
+
if (a && o) return `由 ${Lt(a, n)} 前進至 ${Lt(o, n)}`;
|
|
452
465
|
}
|
|
453
466
|
if (e.eventType === "ENGINE_PROCESS_REQUESTED") {
|
|
454
|
-
let e =
|
|
455
|
-
return e ? `案件狀態:${
|
|
467
|
+
let e = R(t, "state");
|
|
468
|
+
return e ? `案件狀態:${Pt(e)}` : null;
|
|
456
469
|
}
|
|
457
470
|
return null;
|
|
458
471
|
}
|
|
459
|
-
function
|
|
460
|
-
if (e.eventType === "INSTANCE_RESUBMITTED") return [
|
|
461
|
-
if (e.eventType !== "TASK_DECIDED") return [
|
|
462
|
-
let
|
|
472
|
+
function rn(e, t, n, r, i, a, o, s = null, c = null) {
|
|
473
|
+
if (e.eventType === "INSTANCE_RESUBMITTED") return [q("簽核意見", R(t, "comment"))].filter(J);
|
|
474
|
+
if (e.eventType !== "TASK_DECIDED") return [K(nn(e, t, n, o))].filter(J);
|
|
475
|
+
let l = an(e, t, r, c), u = R(t, "action") ?? l?.action ?? null, d = R(t, "comment") ?? l?.comment ?? null, f = R(t, "transferToMemberId") ?? l?.transferToMemberId ?? null, p = R(t, "signatureId") ?? l?.signatureId ?? null, m = p ? i.get(p) : null;
|
|
463
476
|
return [
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
].filter(
|
|
477
|
+
K(u ? `決議:${Ft(u)}` : null),
|
|
478
|
+
u === "REJECTED" ? q("拒絕原因", d ?? "-", "danger") : null,
|
|
479
|
+
u === "APPROVED" ? q("同意說明", d) : null,
|
|
480
|
+
u === "RETURNED" ? q("退回說明", d ?? "-") : null,
|
|
481
|
+
u === "TRANSFERRED" ? K(`轉派給:${W(f, o)}`) : null,
|
|
482
|
+
u === "TRANSFERRED" ? q("轉派說明", d ?? "-") : null,
|
|
483
|
+
K(sn(t, s)),
|
|
484
|
+
m ? K(a?.valid ? `簽章:已驗證(${H(m.signedPayloadHash)})` : `簽章:待檢查(${H(m.signedPayloadHash)})`) : null
|
|
485
|
+
].filter(J);
|
|
486
|
+
}
|
|
487
|
+
function an(e, t, n, r) {
|
|
488
|
+
let i = e.taskId;
|
|
489
|
+
if (!i) return null;
|
|
490
|
+
let a = R(t, "decisionId"), o = (t) => a ? t.id === a : t.decidedByMemberId === e.actorMemberId;
|
|
491
|
+
if (!r) {
|
|
492
|
+
let e = n.get(i) ?? null;
|
|
493
|
+
return e && o(e) ? e : null;
|
|
494
|
+
}
|
|
495
|
+
return on(r.filter((e) => e.taskId === i && o(e)), new Date(e.createdAt).getTime());
|
|
473
496
|
}
|
|
474
|
-
function
|
|
497
|
+
function on(e, t) {
|
|
498
|
+
let n = (e) => Math.abs(u(e) - t), r = (e, t) => {
|
|
499
|
+
let r = n(e) - n(t);
|
|
500
|
+
return r < 0 || !(r > 0) && d(e, t) < 0;
|
|
501
|
+
};
|
|
502
|
+
return e.reduce((e, t) => !e || r(t, e) ? t : e, null);
|
|
503
|
+
}
|
|
504
|
+
function sn(e, t) {
|
|
475
505
|
let n = e.changedFieldKeys;
|
|
476
506
|
if (!Array.isArray(n)) return null;
|
|
477
507
|
let r = n.filter((e) => typeof e == "string" && e !== "");
|
|
@@ -479,94 +509,94 @@ function Yt(e, t) {
|
|
|
479
509
|
let i = r.map((e) => t?.fields.find((t) => t.fieldKey === e)?.label || e);
|
|
480
510
|
return `補填 ${r.length} 個欄位:${i.join("、")}`;
|
|
481
511
|
}
|
|
482
|
-
function
|
|
512
|
+
function cn(e, t, n, r, i) {
|
|
483
513
|
if (e.type === "startEvent" || i.has(e.id)) return !1;
|
|
484
514
|
if (r === "REJECTED") return !0;
|
|
485
|
-
let a =
|
|
515
|
+
let a = _n(e, t, n, r);
|
|
486
516
|
return a.tone === "neutral" || a.tone === "waiting";
|
|
487
517
|
}
|
|
488
|
-
function
|
|
518
|
+
function ln(e, t, n, r, i) {
|
|
489
519
|
if (r !== "RUNNING" && r !== "REJECTED") return [];
|
|
490
|
-
let a = e.nodes.filter((e) =>
|
|
520
|
+
let a = e.nodes.filter((e) => cn(e, t, n, r, i)), o = Q(e, a, t, n, i), s = new Map(e.nodes.map((e, t) => [e.id, t]));
|
|
491
521
|
return a.filter((e) => o.has(e.id)).sort((e, t) => {
|
|
492
522
|
let n = o.get(e.id) ?? 0, r = o.get(t.id) ?? 0;
|
|
493
523
|
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
524
|
});
|
|
495
525
|
}
|
|
496
|
-
function
|
|
526
|
+
function Q(e, t, n, r, i) {
|
|
497
527
|
let a = new Set(t.map((e) => e.id)), o = e.edges.reduce((e, t) => {
|
|
498
528
|
let n = [...e.get(t.source) ?? [], t.target];
|
|
499
529
|
return new Map(e).set(t.source, n);
|
|
500
530
|
}, /* @__PURE__ */ new Map());
|
|
501
|
-
return
|
|
531
|
+
return un(e, n, r, i).reduce((e, t) => pn(e, dn(t, o, a)), /* @__PURE__ */ new Map());
|
|
502
532
|
}
|
|
503
|
-
function
|
|
504
|
-
let i = n.filter((e) => e.status === "ACTIVE" || e.status === "WAITING").map((e) => e.currentNodeId), a = t.filter(
|
|
533
|
+
function un(e, t, n, r) {
|
|
534
|
+
let i = n.filter((e) => e.status === "ACTIVE" || e.status === "WAITING").map((e) => e.currentNodeId), a = t.filter(Mt).map((e) => e.nodeId), o = e.nodes.filter((e) => r.has(e.id)).map((e) => e.id), s = [.../* @__PURE__ */ new Set([
|
|
505
535
|
...i,
|
|
506
536
|
...a,
|
|
507
537
|
...o
|
|
508
538
|
])], c = e.nodes.filter((e) => e.type === "startEvent").map((e) => e.id);
|
|
509
539
|
return s.length > 0 ? s : c;
|
|
510
540
|
}
|
|
511
|
-
function
|
|
512
|
-
return
|
|
541
|
+
function dn(e, t, n) {
|
|
542
|
+
return fn([{
|
|
513
543
|
distance: 0,
|
|
514
544
|
nodeId: e
|
|
515
545
|
}], t, n);
|
|
516
546
|
}
|
|
517
|
-
function
|
|
547
|
+
function fn(e, t, n, r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map()) {
|
|
518
548
|
let [a, ...o] = e;
|
|
519
549
|
if (!a) return i;
|
|
520
|
-
if (r.has(a.nodeId)) return
|
|
550
|
+
if (r.has(a.nodeId)) return fn(o, t, n, r, i);
|
|
521
551
|
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
|
|
552
|
+
return fn([...o, ...(t.get(a.nodeId) ?? []).map((e) => ({
|
|
523
553
|
distance: a.distance + 1,
|
|
524
554
|
nodeId: e
|
|
525
555
|
}))], t, n, s, c);
|
|
526
556
|
}
|
|
527
|
-
function
|
|
557
|
+
function pn(e, t) {
|
|
528
558
|
return [...t.entries()].reduce((e, [t, n]) => new Map(e).set(t, Math.min(e.get(t) ?? n, n)), e);
|
|
529
559
|
}
|
|
530
|
-
function
|
|
560
|
+
function mn(e) {
|
|
531
561
|
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
562
|
}
|
|
533
|
-
function
|
|
534
|
-
let
|
|
535
|
-
let t =
|
|
563
|
+
function hn(e, t, n, r, i, a, o, s, l, u = null, d = null) {
|
|
564
|
+
let f = d ? c(d) : null, p = e.filter(X).map((e) => {
|
|
565
|
+
let t = $t(e), n = e.nodeId ? Lt(e.nodeId, r) : null;
|
|
536
566
|
return {
|
|
537
567
|
descriptionParts: [
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
...
|
|
542
|
-
].filter(
|
|
543
|
-
error:
|
|
568
|
+
K(n ? `節點:${n}` : "節點:全流程"),
|
|
569
|
+
Kt("操作者", e.actorMemberId, a, "系統"),
|
|
570
|
+
K(`時間:${tn(e.createdAt)}`),
|
|
571
|
+
...rn(e, t, r, o, s, l, a, u, f ? f.get(e.taskId ?? "") ?? [] : null)
|
|
572
|
+
].filter(J),
|
|
573
|
+
error: en(e, t),
|
|
544
574
|
id: e.id,
|
|
545
|
-
title:
|
|
575
|
+
title: Qt(e.eventType, t)
|
|
546
576
|
};
|
|
547
|
-
}),
|
|
577
|
+
}), m = t.filter(Mt).map((e) => ({
|
|
548
578
|
descriptionParts: [
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
].filter(
|
|
579
|
+
K(`節點:${Lt(e.nodeId, r)}`),
|
|
580
|
+
Kt("處理者", e.assigneeMemberId, a, "未指定"),
|
|
581
|
+
K(`建立時間:${tn(e.createdAt)}`)
|
|
582
|
+
].filter(J),
|
|
553
583
|
error: !1,
|
|
554
584
|
id: `pending-task-${e.id}`,
|
|
555
585
|
title: e.status === "IN_PROGRESS" ? "簽核處理中" : "等待簽核處理"
|
|
556
|
-
})),
|
|
557
|
-
descriptionParts: [
|
|
586
|
+
})), h = new Set([...e.filter(X).map((e) => e.nodeId), ...t.map((e) => e.nodeId)].filter(B)), g = r ? ln(r, t, n, i, h).map((e) => ({
|
|
587
|
+
descriptionParts: [K(`${It(e.type)} · 尚未抵達`)].filter(J),
|
|
558
588
|
error: !1,
|
|
559
589
|
forcePending: !0,
|
|
560
590
|
id: `future-node-${e.id}`,
|
|
561
|
-
title:
|
|
591
|
+
title: mn(e)
|
|
562
592
|
})) : [];
|
|
563
593
|
return [
|
|
564
|
-
...
|
|
565
|
-
...
|
|
566
|
-
...
|
|
594
|
+
...p,
|
|
595
|
+
...m,
|
|
596
|
+
...g
|
|
567
597
|
];
|
|
568
598
|
}
|
|
569
|
-
var
|
|
599
|
+
var gn = {
|
|
570
600
|
APPROVED: {
|
|
571
601
|
statusLabel: "已完成",
|
|
572
602
|
tone: "completed"
|
|
@@ -584,20 +614,20 @@ var on = {
|
|
|
584
614
|
tone: "cancelled"
|
|
585
615
|
}
|
|
586
616
|
};
|
|
587
|
-
function
|
|
617
|
+
function _n(e, t, n, r) {
|
|
588
618
|
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
619
|
if (a) return {
|
|
590
|
-
secondaryLabel: `處理者 ${
|
|
620
|
+
secondaryLabel: `處理者 ${Rt(a)}`,
|
|
591
621
|
statusLabel: "待處理",
|
|
592
622
|
tone: "current"
|
|
593
623
|
};
|
|
594
624
|
if (o) return {
|
|
595
|
-
secondaryLabel: `已取消 ${
|
|
625
|
+
secondaryLabel: `已取消 ${Rt(o)}`,
|
|
596
626
|
statusLabel: "已取消",
|
|
597
627
|
tone: "cancelled"
|
|
598
628
|
};
|
|
599
629
|
if (s) return {
|
|
600
|
-
secondaryLabel: `已完成 ${
|
|
630
|
+
secondaryLabel: `已完成 ${Rt(s)}`,
|
|
601
631
|
statusLabel: "已完成",
|
|
602
632
|
tone: "completed"
|
|
603
633
|
};
|
|
@@ -616,64 +646,56 @@ function sn(e, t, n, r) {
|
|
|
616
646
|
statusLabel: "已發起",
|
|
617
647
|
tone: "completed"
|
|
618
648
|
};
|
|
619
|
-
let d = e.type === "endEvent" ?
|
|
649
|
+
let d = e.type === "endEvent" ? gn[r] : void 0;
|
|
620
650
|
return d ? {
|
|
621
651
|
...d,
|
|
622
652
|
secondaryLabel: r
|
|
623
653
|
} : {
|
|
624
|
-
secondaryLabel:
|
|
654
|
+
secondaryLabel: It(e.type),
|
|
625
655
|
statusLabel: "未抵達",
|
|
626
656
|
tone: "neutral"
|
|
627
657
|
};
|
|
628
658
|
}
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
async function cn({ activityLogs: e, adhocDirectives: t = [], instance: n, tasks: r }) {
|
|
659
|
+
// src/views/instances/detail/sections/container-helpers.ts
|
|
660
|
+
async function vn({ activityLogs: e, adhocDirectives: t = [], instance: n, tasks: r }) {
|
|
632
661
|
let i = [...new Set([
|
|
633
662
|
n?.initiatorMemberId ?? null,
|
|
634
663
|
n?.submittedByMemberId ?? null,
|
|
635
664
|
...e.map((e) => e.actorMemberId),
|
|
636
|
-
...e.flatMap(
|
|
665
|
+
...e.flatMap(qt),
|
|
637
666
|
...r.map((e) => e.assigneeMemberId),
|
|
638
667
|
...r.map((e) => e.originalAssigneeMemberId),
|
|
639
668
|
...r.flatMap((e) => e.candidateMemberIds),
|
|
640
|
-
...r.flatMap((e) =>
|
|
641
|
-
...t.flatMap((e) => [e.createdByMemberId,
|
|
642
|
-
].filter(
|
|
669
|
+
...r.flatMap((e) => kt(e.delegationChainJson).flatMap((e) => [e.from, e.to])),
|
|
670
|
+
...t.flatMap((e) => [e.createdByMemberId, ...$(e.targetValueJson)])
|
|
671
|
+
].filter(B))];
|
|
643
672
|
try {
|
|
644
|
-
return await
|
|
673
|
+
return await Re(i);
|
|
645
674
|
} catch {
|
|
646
675
|
return [];
|
|
647
676
|
}
|
|
648
677
|
}
|
|
649
|
-
function
|
|
678
|
+
function $(e) {
|
|
650
679
|
try {
|
|
651
680
|
return (JSON.parse(e).memberIds ?? []).filter((e) => typeof e == "string");
|
|
652
681
|
} catch {
|
|
653
682
|
return [];
|
|
654
683
|
}
|
|
655
684
|
}
|
|
656
|
-
async function
|
|
657
|
-
return (await Promise.all(e.map((e) =>
|
|
685
|
+
async function yn(e) {
|
|
686
|
+
return (await Promise.all(e.map((e) => k(e.id)))).flat();
|
|
658
687
|
}
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
return new Map(e).set(t.taskId, r);
|
|
663
|
-
}, /* @__PURE__ */ new Map());
|
|
664
|
-
}
|
|
665
|
-
//#endregion
|
|
666
|
-
//#region src/views/instances/detail/use-resubmit-comment-draft.ts
|
|
667
|
-
function fn(e) {
|
|
668
|
-
let [t, n] = y({
|
|
688
|
+
// src/views/instances/detail/use-resubmit-comment-draft.ts
|
|
689
|
+
function bn(e) {
|
|
690
|
+
let [t, n] = x({
|
|
669
691
|
instanceId: e,
|
|
670
692
|
text: ""
|
|
671
|
-
}), r =
|
|
693
|
+
}), r = oe((t) => n({
|
|
672
694
|
instanceId: e,
|
|
673
695
|
text: t
|
|
674
696
|
}), [e]);
|
|
675
697
|
return {
|
|
676
|
-
clearAfterResubmit:
|
|
698
|
+
clearAfterResubmit: oe((e) => n((t) => t.instanceId === e ? {
|
|
677
699
|
instanceId: e,
|
|
678
700
|
text: ""
|
|
679
701
|
} : t), []),
|
|
@@ -681,52 +703,51 @@ function fn(e) {
|
|
|
681
703
|
setComment: r
|
|
682
704
|
};
|
|
683
705
|
}
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
var pn = {
|
|
706
|
+
// src/views/instances/detail/sections/InstanceFormSection.tsx
|
|
707
|
+
var xn = {
|
|
687
708
|
display: "grid",
|
|
688
709
|
gap: 16
|
|
689
|
-
},
|
|
710
|
+
}, Sn = {
|
|
690
711
|
display: "flex",
|
|
691
712
|
flexWrap: "wrap",
|
|
692
713
|
gap: 8
|
|
693
|
-
},
|
|
714
|
+
}, Cn = 2e3, wn = {
|
|
694
715
|
minWidth: "100%",
|
|
695
716
|
width: "100%"
|
|
696
717
|
};
|
|
697
|
-
function
|
|
718
|
+
function Tn(e) {
|
|
698
719
|
e && (e.style.width = "100%");
|
|
699
720
|
}
|
|
700
|
-
function
|
|
701
|
-
let
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
]), v = !
|
|
707
|
-
return /* @__PURE__ */
|
|
708
|
-
style:
|
|
721
|
+
function En({ canResubmitInstance: t, deciding: n, error: r, fieldAccess: i, fieldLabelMarkers: a, fill: s = null, instance: c, loading: l, onDataSourceStateChange: u, onResubmitFormChange: d, onReloadAfterConflict: f = null, onResubmitCommentChange: p = null, onResubmitInstance: m, onUploadAttachment: h, resubmitComment: g = "", resubmitFormData: ee, resubmitFormErrors: ne }) {
|
|
722
|
+
let _ = c?.formDefinitionSnapshot.schema, re = c?.workflowSnapshot, ie = b(() => t && _ && re ? te(_, re) : s?.schema ?? _, [
|
|
723
|
+
t,
|
|
724
|
+
s?.schema,
|
|
725
|
+
_,
|
|
726
|
+
re
|
|
727
|
+
]), v = !t && s !== null;
|
|
728
|
+
return /* @__PURE__ */ O("div", {
|
|
729
|
+
style: xn,
|
|
709
730
|
children: [
|
|
710
|
-
r ? /* @__PURE__ */ E
|
|
731
|
+
r ? /* @__PURE__ */ D(E, {
|
|
711
732
|
color: "text-error",
|
|
712
733
|
variant: "body",
|
|
713
734
|
children: r
|
|
714
735
|
}) : null,
|
|
715
|
-
|
|
736
|
+
l ? /* @__PURE__ */ D(E, {
|
|
716
737
|
color: "text-neutral",
|
|
717
738
|
variant: "body",
|
|
718
739
|
children: "載入中..."
|
|
719
740
|
}) : null,
|
|
720
|
-
f ? /* @__PURE__ */
|
|
721
|
-
style:
|
|
722
|
-
children: [/* @__PURE__ */
|
|
741
|
+
f ? /* @__PURE__ */ O("div", {
|
|
742
|
+
style: xn,
|
|
743
|
+
children: [/* @__PURE__ */ D(w, {
|
|
723
744
|
content: "表單在你填寫期間被更新了,你填的內容還在。請重新載入後確認再同意。",
|
|
724
745
|
severity: "error"
|
|
725
|
-
}), /* @__PURE__ */
|
|
726
|
-
style:
|
|
727
|
-
children: /* @__PURE__ */
|
|
728
|
-
disabled:
|
|
729
|
-
icon:
|
|
746
|
+
}), /* @__PURE__ */ D("div", {
|
|
747
|
+
style: Sn,
|
|
748
|
+
children: /* @__PURE__ */ D(S, {
|
|
749
|
+
disabled: l,
|
|
750
|
+
icon: Ze,
|
|
730
751
|
iconType: "leading",
|
|
731
752
|
onClick: f,
|
|
732
753
|
variant: "base-secondary",
|
|
@@ -734,58 +755,58 @@ function vn({ canResubmitInstance: e, deciding: t, error: r, fieldAccess: i, fie
|
|
|
734
755
|
})
|
|
735
756
|
})]
|
|
736
757
|
}) : null,
|
|
737
|
-
v &&
|
|
738
|
-
content: `本關需要你補填 ${
|
|
758
|
+
v && s.fieldCount > 0 ? /* @__PURE__ */ D(w, {
|
|
759
|
+
content: `本關需要你補填 ${s.fieldCount} 個欄位,按「同意」時會一起送出並納入簽章。`,
|
|
739
760
|
severity: "info"
|
|
740
761
|
}) : null,
|
|
741
|
-
|
|
742
|
-
/* @__PURE__ */
|
|
743
|
-
dataSourceContext:
|
|
744
|
-
instanceId:
|
|
762
|
+
ie && c?.formDefinitionSnapshot.uiSchema ? /* @__PURE__ */ O(Ce, { children: [
|
|
763
|
+
/* @__PURE__ */ D(o, {
|
|
764
|
+
dataSourceContext: t ? {
|
|
765
|
+
instanceId: c.id,
|
|
745
766
|
kind: "runtime"
|
|
746
767
|
} : void 0,
|
|
747
|
-
dataSourceInitialValues:
|
|
748
|
-
errors: v ?
|
|
749
|
-
...!
|
|
750
|
-
...!
|
|
768
|
+
dataSourceInitialValues: c.formData,
|
|
769
|
+
errors: v ? s.errors : ne,
|
|
770
|
+
...!t && i ? { fieldAccess: i } : {},
|
|
771
|
+
...!t && a ? { fieldLabelMarkers: a } : {},
|
|
751
772
|
onChange: (e) => {
|
|
752
|
-
v ?
|
|
773
|
+
v ? s.onChange(e) : d(e);
|
|
753
774
|
},
|
|
754
|
-
onDataSourceStateChange:
|
|
755
|
-
onUploadAttachment:
|
|
756
|
-
optionSnapshots:
|
|
757
|
-
readonly: !
|
|
758
|
-
schema:
|
|
759
|
-
uiSchema:
|
|
760
|
-
value:
|
|
775
|
+
onDataSourceStateChange: u,
|
|
776
|
+
onUploadAttachment: t ? h : void 0,
|
|
777
|
+
optionSnapshots: c.formDataOptionSnapshot,
|
|
778
|
+
readonly: !t,
|
|
779
|
+
schema: ie,
|
|
780
|
+
uiSchema: c.formDefinitionSnapshot.uiSchema,
|
|
781
|
+
value: t ? ee : v ? s.value : c.formData
|
|
761
782
|
}),
|
|
762
|
-
|
|
783
|
+
t && p ? /* @__PURE__ */ D(e, {
|
|
763
784
|
label: "簽核意見",
|
|
764
785
|
name: "resubmitComment",
|
|
765
|
-
children: /* @__PURE__ */
|
|
766
|
-
disabled:
|
|
786
|
+
children: /* @__PURE__ */ D(xe, {
|
|
787
|
+
disabled: n,
|
|
767
788
|
onChange: (e) => p(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: g
|
|
775
796
|
})
|
|
776
797
|
}) : null,
|
|
777
|
-
|
|
778
|
-
style:
|
|
779
|
-
children: /* @__PURE__ */
|
|
780
|
-
disabled:
|
|
781
|
-
icon:
|
|
798
|
+
t ? /* @__PURE__ */ D("div", {
|
|
799
|
+
style: Sn,
|
|
800
|
+
children: /* @__PURE__ */ D(S, {
|
|
801
|
+
disabled: n,
|
|
802
|
+
icon: Ze,
|
|
782
803
|
iconType: "leading",
|
|
783
|
-
onClick:
|
|
804
|
+
onClick: m,
|
|
784
805
|
variant: "base-primary",
|
|
785
806
|
children: "重新送出"
|
|
786
807
|
})
|
|
787
808
|
}) : null
|
|
788
|
-
] }) : /* @__PURE__ */ E
|
|
809
|
+
] }) : /* @__PURE__ */ D(E, {
|
|
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 = b(() => 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: Nt(Number(e.sizeBytes))
|
|
831
|
+
})), [e]), a = b(() => [
|
|
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__ */ E
|
|
852
|
+
render: (e) => /* @__PURE__ */ D(E, {
|
|
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 = b(() => ({
|
|
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: A,
|
|
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__ */ E
|
|
879
|
+
return /* @__PURE__ */ O("div", {
|
|
880
|
+
style: Dn,
|
|
881
|
+
children: [/* @__PURE__ */ D(E, {
|
|
862
882
|
component: "h2",
|
|
863
883
|
variant: "h3",
|
|
864
884
|
children: "附件"
|
|
865
|
-
}), i.length > 0 ? /* @__PURE__ */
|
|
885
|
+
}), i.length > 0 ? /* @__PURE__ */ D(be, {
|
|
866
886
|
actions: o,
|
|
867
887
|
columns: a,
|
|
868
888
|
dataSource: i,
|
|
869
889
|
fullWidth: !0
|
|
870
|
-
}) : /* @__PURE__ */ E
|
|
890
|
+
}) : /* @__PURE__ */ D(E, {
|
|
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 = y(function({ adhocDirectives: n, currentMemberId: r, fill: i = null, instance: a, memberProfilesById: o, onChanged: s, onDecidingChange: c, onFillApproveError: u, tasks: d }, f) {
|
|
936
|
+
let [p, m] = x(!1), [h, g] = x(null);
|
|
937
|
+
se(() => {
|
|
938
|
+
c?.(p);
|
|
939
|
+
}, [p, c]);
|
|
940
|
+
let [ee, te] = x(""), [ne, _] = x(!1), [re, ie] = x(""), [v, ae] = x(null), [y, oe] = x(!1), [le, w] = x(""), [me, he] = x(!1), [ge, _e] = x(null), [ye, Se] = x(""), [Te, ke] = x(null), [Ae, k] = x(!1), [je, Me] = x([]), [Ne, Pe] = x(!1), [Fe, Re] = x(""), [ze, Be] = x([]), [He, Ue] = x(!1), [We, Ge] = x([]), [Ke, qe] = x(!1), [A, Je] = x("COUNTERSIGN"), [Ye, Xe] = x("REJECT_INSTANCE"), [Ze, Qe] = x(!1), [$e, et] = x("MEMBER"), [tt, j] = x(""), nt = re.trim(), rt = le.trim(), it = ye.trim(), M = b(() => Bt(d, r), [r, d]), N = b(() => M && a ? a.workflowSnapshot.nodes.find((e) => e.id === M.nodeId) ?? null : null, [M, a]), at = b(() => N && a ? Vt(a.workflowSnapshot, N) : [], [N, a]), ot = N?.type === "userTask" && N.data.returnBehavior.allowReturn, st = N?.type === "userTask" && N.data.allowReject !== !1, ct = N?.type === "userTask" && N.data.allowTransfer !== !1, lt = N?.type === "userTask" && N.data.returnBehavior.requireComment === !0, ut = N?.type === "userTask" && N.data.allowAddSigner, dt = b(() => n.filter((e) => e.status === "PENDING"), [n]), P = at.find((e) => e.id === ge) ?? at[0] ?? null, ft = b(() => d.map((e) => ({
|
|
922
941
|
...e,
|
|
923
|
-
assigneeLabel:
|
|
924
|
-
fillFieldCount:
|
|
942
|
+
assigneeLabel: Rt(e, o),
|
|
943
|
+
fillFieldCount: Vn(e, a?.workflowSnapshot ?? null),
|
|
925
944
|
key: e.id,
|
|
926
|
-
nodeLabel:
|
|
945
|
+
nodeLabel: l({
|
|
927
946
|
...e,
|
|
928
|
-
nodeLabel:
|
|
947
|
+
nodeLabel: Lt(e.nodeId, a?.workflowSnapshot ?? null)
|
|
929
948
|
}),
|
|
930
949
|
statusLabel: U(e.status)
|
|
931
950
|
})), [
|
|
951
|
+
a,
|
|
932
952
|
o,
|
|
933
|
-
s,
|
|
934
953
|
d
|
|
935
|
-
]),
|
|
954
|
+
]), pt = b(() => [
|
|
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__ */ E
|
|
964
|
+
render: (e) => /* @__PURE__ */ D(E, {
|
|
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__ */ D(de, {
|
|
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__ */ E
|
|
989
|
+
render: (e) => /* @__PURE__ */ D(E, {
|
|
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
|
+
], []), mt = b(() => dt.map((e) => ({
|
|
979
998
|
...e,
|
|
980
|
-
createdByLabel: W(e.createdByMemberId,
|
|
999
|
+
createdByLabel: W(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, dt]), ht = b(() => [
|
|
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__ */ E
|
|
1012
|
+
render: (e) => /* @__PURE__ */ D(E, {
|
|
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__ */ E
|
|
1022
|
+
render: (e) => /* @__PURE__ */ D(E, {
|
|
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__ */ E
|
|
1032
|
+
render: (e) => /* @__PURE__ */ D(E, {
|
|
1014
1033
|
component: "span",
|
|
1015
1034
|
variant: "body",
|
|
1016
1035
|
children: t(e.createdAt)
|
|
@@ -1020,342 +1039,342 @@ var En = {
|
|
|
1020
1039
|
},
|
|
1021
1040
|
{
|
|
1022
1041
|
key: "actions",
|
|
1023
|
-
render: (e) => e.createdByMemberId === r ? /* @__PURE__ */
|
|
1024
|
-
disabled:
|
|
1025
|
-
onClick: () => void
|
|
1042
|
+
render: (e) => e.createdByMemberId === r ? /* @__PURE__ */ D(S, {
|
|
1043
|
+
disabled: Ze,
|
|
1044
|
+
onClick: () => void z(e.id),
|
|
1026
1045
|
size: "minor",
|
|
1027
1046
|
variant: "destructive-secondary",
|
|
1028
1047
|
children: "撤回"
|
|
1029
|
-
}) : /* @__PURE__ */
|
|
1048
|
+
}) : /* @__PURE__ */ D(Ce, {}),
|
|
1030
1049
|
title: "操作",
|
|
1031
1050
|
width: 100
|
|
1032
1051
|
}
|
|
1033
|
-
], [
|
|
1034
|
-
async function
|
|
1035
|
-
if (!r || !
|
|
1036
|
-
|
|
1037
|
-
let o = e === "APPROVED" && i !== null && !
|
|
1052
|
+
], [Ze, r]);
|
|
1053
|
+
async function gt({ action: e, comment: t, returnToNodeId: n = null, transferToMemberId: a = null }) {
|
|
1054
|
+
if (!r || !M || e === "REJECTED" && !st || e === "TRANSFERRED" && !ct) return !1;
|
|
1055
|
+
m(!0), g(null);
|
|
1056
|
+
let o = e === "APPROVED" && i !== null && !M.isAdhoc ? {
|
|
1038
1057
|
expectedFormDataFingerprint: i.expectedFormDataFingerprint,
|
|
1039
1058
|
formData: i.formData
|
|
1040
1059
|
} : null;
|
|
1041
1060
|
try {
|
|
1042
|
-
await
|
|
1061
|
+
await Oe({
|
|
1043
1062
|
action: e,
|
|
1044
1063
|
comment: t,
|
|
1045
1064
|
decidedByMemberId: r,
|
|
1046
1065
|
fill: o,
|
|
1047
1066
|
returnToNodeId: n,
|
|
1048
|
-
taskId:
|
|
1067
|
+
taskId: M.id,
|
|
1049
1068
|
transferToMemberId: a
|
|
1050
|
-
}),
|
|
1069
|
+
}), oe(!1), he(!1), Pe(!1), ie(""), w(""), Se(""), ke(null), _e(null), ae(null);
|
|
1051
1070
|
} catch (e) {
|
|
1052
|
-
return
|
|
1071
|
+
return m(!1), o !== null && e instanceof Error && u?.(e.message) === !0 ? (_(!1), !1) : (g(V(e)), !1);
|
|
1053
1072
|
}
|
|
1054
1073
|
try {
|
|
1055
|
-
await
|
|
1074
|
+
await s();
|
|
1056
1075
|
} catch (e) {
|
|
1057
|
-
|
|
1076
|
+
g(V(e));
|
|
1058
1077
|
} finally {
|
|
1059
|
-
|
|
1078
|
+
m(!1);
|
|
1060
1079
|
}
|
|
1061
1080
|
return !0;
|
|
1062
1081
|
}
|
|
1063
|
-
function
|
|
1064
|
-
r &&
|
|
1082
|
+
function F() {
|
|
1083
|
+
r && M && (g(null), _(!0));
|
|
1065
1084
|
}
|
|
1066
|
-
function
|
|
1067
|
-
p || (
|
|
1085
|
+
function _t() {
|
|
1086
|
+
p || (_(!1), te(""));
|
|
1068
1087
|
}
|
|
1069
|
-
async function
|
|
1070
|
-
p || await
|
|
1088
|
+
async function I() {
|
|
1089
|
+
p || await gt({
|
|
1071
1090
|
action: "APPROVED",
|
|
1072
|
-
comment:
|
|
1073
|
-
}) && (
|
|
1074
|
-
}
|
|
1075
|
-
function gt() {
|
|
1076
|
-
at && (S(""), de(null), pe(!0));
|
|
1077
|
-
}
|
|
1078
|
-
function _t() {
|
|
1079
|
-
p || (pe(!1), S(""), de(null));
|
|
1091
|
+
comment: ee.trim() || null
|
|
1092
|
+
}) && (_(!1), te(""));
|
|
1080
1093
|
}
|
|
1081
1094
|
function vt() {
|
|
1082
|
-
|
|
1095
|
+
st && (ie(""), ae(null), oe(!0));
|
|
1083
1096
|
}
|
|
1084
1097
|
function yt() {
|
|
1085
|
-
p || (
|
|
1098
|
+
p || (oe(!1), ie(""), ae(null));
|
|
1086
1099
|
}
|
|
1087
1100
|
function bt() {
|
|
1088
|
-
|
|
1101
|
+
w(""), _e(at[0]?.id ?? null), he(!0);
|
|
1089
1102
|
}
|
|
1090
|
-
function
|
|
1091
|
-
p || (
|
|
1103
|
+
function xt() {
|
|
1104
|
+
p || (he(!1), w(""), _e(null));
|
|
1092
1105
|
}
|
|
1093
|
-
|
|
1094
|
-
|
|
1106
|
+
function St() {
|
|
1107
|
+
ct && (Se(""), ke(null), Pe(!0), L(""));
|
|
1108
|
+
}
|
|
1109
|
+
function Ct() {
|
|
1110
|
+
p || (Pe(!1), Se(""), ke(null));
|
|
1111
|
+
}
|
|
1112
|
+
async function L(e) {
|
|
1113
|
+
k(!0);
|
|
1095
1114
|
try {
|
|
1096
|
-
|
|
1115
|
+
Me((await Ve(e)).filter((e) => e.memberId !== r).map(Ht));
|
|
1097
1116
|
} catch (e) {
|
|
1098
|
-
|
|
1117
|
+
g(V(e));
|
|
1099
1118
|
} finally {
|
|
1100
|
-
|
|
1119
|
+
k(!1);
|
|
1101
1120
|
}
|
|
1102
1121
|
}
|
|
1103
|
-
async function
|
|
1104
|
-
|
|
1122
|
+
async function wt() {
|
|
1123
|
+
st && (nt ? await gt({
|
|
1105
1124
|
action: "REJECTED",
|
|
1106
|
-
comment:
|
|
1107
|
-
}) :
|
|
1125
|
+
comment: nt
|
|
1126
|
+
}) : ae("請輸入拒絕原因"));
|
|
1108
1127
|
}
|
|
1109
|
-
async function
|
|
1110
|
-
|
|
1128
|
+
async function Tt() {
|
|
1129
|
+
ct && (Te ? await gt({
|
|
1111
1130
|
action: "TRANSFERRED",
|
|
1112
|
-
comment:
|
|
1113
|
-
transferToMemberId:
|
|
1114
|
-
}) :
|
|
1131
|
+
comment: it || null,
|
|
1132
|
+
transferToMemberId: Te.id
|
|
1133
|
+
}) : g("請選擇轉派對象"));
|
|
1115
1134
|
}
|
|
1116
|
-
async function
|
|
1117
|
-
await
|
|
1135
|
+
async function Et() {
|
|
1136
|
+
await gt({
|
|
1118
1137
|
action: "RETURNED",
|
|
1119
|
-
comment:
|
|
1120
|
-
returnToNodeId:
|
|
1138
|
+
comment: rt || null,
|
|
1139
|
+
returnToNodeId: P?.id ?? null
|
|
1121
1140
|
});
|
|
1122
1141
|
}
|
|
1123
|
-
function
|
|
1124
|
-
|
|
1142
|
+
function Dt() {
|
|
1143
|
+
Re(""), Be([]), Xe("REJECT_INSTANCE"), et("MEMBER"), j("");
|
|
1125
1144
|
}
|
|
1126
|
-
function
|
|
1127
|
-
Je(e),
|
|
1145
|
+
function Ot(e) {
|
|
1146
|
+
Je(e), Dt(), qe(!0), R("");
|
|
1128
1147
|
}
|
|
1129
|
-
function
|
|
1130
|
-
|
|
1148
|
+
function kt() {
|
|
1149
|
+
Ze || (qe(!1), Dt());
|
|
1131
1150
|
}
|
|
1132
|
-
async function
|
|
1151
|
+
async function R(e) {
|
|
1133
1152
|
Ue(!0);
|
|
1134
1153
|
try {
|
|
1135
|
-
Ge((await
|
|
1154
|
+
Ge((await Ve(e)).map(Ht));
|
|
1136
1155
|
} catch (e) {
|
|
1137
|
-
|
|
1156
|
+
g(V(e));
|
|
1138
1157
|
} finally {
|
|
1139
1158
|
Ue(!1);
|
|
1140
1159
|
}
|
|
1141
1160
|
}
|
|
1142
|
-
async function
|
|
1143
|
-
if (!
|
|
1144
|
-
let e = (A === "STAGE_NOTIFY" || A === "COMPLETION_NOTIFY") &&
|
|
1145
|
-
memberIds:
|
|
1161
|
+
async function At() {
|
|
1162
|
+
if (!M) return;
|
|
1163
|
+
let e = (A === "STAGE_NOTIFY" || A === "COMPLETION_NOTIFY") && $e === "WEBHOOK", t = G({
|
|
1164
|
+
memberIds: ze.map((e) => e.id),
|
|
1146
1165
|
useWebhookTarget: e,
|
|
1147
|
-
webhookUrl:
|
|
1166
|
+
webhookUrl: tt
|
|
1148
1167
|
});
|
|
1149
1168
|
if (!t.valid) {
|
|
1150
|
-
|
|
1169
|
+
g(t.error);
|
|
1151
1170
|
return;
|
|
1152
1171
|
}
|
|
1153
|
-
let { target: n } = t, r =
|
|
1154
|
-
|
|
1172
|
+
let { target: n } = t, r = Fe.trim() || null;
|
|
1173
|
+
Qe(!0), g(null);
|
|
1155
1174
|
try {
|
|
1156
|
-
A === "COUNTERSIGN" ? await
|
|
1175
|
+
A === "COUNTERSIGN" ? await Ie({
|
|
1157
1176
|
comment: r,
|
|
1158
1177
|
target: n,
|
|
1159
|
-
taskId:
|
|
1160
|
-
}) : A === "PRE_APPROVAL" ? await
|
|
1178
|
+
taskId: M.id
|
|
1179
|
+
}) : A === "PRE_APPROVAL" ? await Le({
|
|
1161
1180
|
comment: r,
|
|
1162
1181
|
onReject: Ye,
|
|
1163
1182
|
target: n,
|
|
1164
|
-
taskId:
|
|
1165
|
-
}) : A === "STAGE_NOTIFY" ? await
|
|
1183
|
+
taskId: M.id
|
|
1184
|
+
}) : A === "STAGE_NOTIFY" ? await De({
|
|
1166
1185
|
target: n,
|
|
1167
|
-
taskId:
|
|
1168
|
-
}) : await
|
|
1186
|
+
taskId: M.id
|
|
1187
|
+
}) : await Ee({
|
|
1169
1188
|
target: n,
|
|
1170
|
-
taskId:
|
|
1171
|
-
}), qe(!1),
|
|
1189
|
+
taskId: M.id
|
|
1190
|
+
}), qe(!1), Dt(), await s();
|
|
1172
1191
|
} catch (e) {
|
|
1173
|
-
|
|
1192
|
+
g(V(e));
|
|
1174
1193
|
} finally {
|
|
1175
|
-
|
|
1194
|
+
Qe(!1);
|
|
1176
1195
|
}
|
|
1177
1196
|
}
|
|
1178
|
-
async function
|
|
1179
|
-
|
|
1197
|
+
async function z(e) {
|
|
1198
|
+
Qe(!0), g(null);
|
|
1180
1199
|
try {
|
|
1181
|
-
await
|
|
1200
|
+
await we(e), await s();
|
|
1182
1201
|
} catch (e) {
|
|
1183
|
-
|
|
1202
|
+
g(V(e));
|
|
1184
1203
|
} finally {
|
|
1185
|
-
|
|
1204
|
+
Qe(!1);
|
|
1186
1205
|
}
|
|
1187
1206
|
}
|
|
1188
|
-
|
|
1189
|
-
canAddSignerCurrentTask:
|
|
1190
|
-
canRejectCurrentTask:
|
|
1191
|
-
canReturnCurrentTask:
|
|
1192
|
-
canTransferCurrentTask:
|
|
1207
|
+
ce(f, () => ({
|
|
1208
|
+
canAddSignerCurrentTask: ut,
|
|
1209
|
+
canRejectCurrentTask: st,
|
|
1210
|
+
canReturnCurrentTask: ot,
|
|
1211
|
+
canTransferCurrentTask: ct,
|
|
1193
1212
|
deciding: p,
|
|
1194
|
-
handleApprove:
|
|
1195
|
-
hasCurrentTask:
|
|
1196
|
-
openAdhocModal:
|
|
1197
|
-
openRejectModal:
|
|
1198
|
-
openReturnModal:
|
|
1199
|
-
openTransferModal:
|
|
1213
|
+
handleApprove: F,
|
|
1214
|
+
hasCurrentTask: M !== null,
|
|
1215
|
+
openAdhocModal: Ot,
|
|
1216
|
+
openRejectModal: vt,
|
|
1217
|
+
openReturnModal: bt,
|
|
1218
|
+
openTransferModal: St
|
|
1200
1219
|
}), [
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
it,
|
|
1220
|
+
ut,
|
|
1221
|
+
st,
|
|
1204
1222
|
ot,
|
|
1223
|
+
ct,
|
|
1205
1224
|
r,
|
|
1206
|
-
|
|
1225
|
+
M,
|
|
1207
1226
|
p
|
|
1208
1227
|
]);
|
|
1209
|
-
let
|
|
1210
|
-
return /* @__PURE__ */
|
|
1211
|
-
/* @__PURE__ */ E
|
|
1228
|
+
let B = A === "STAGE_NOTIFY" || A === "COMPLETION_NOTIFY", jt = B && $e === "WEBHOOK" ? !tt.trim() : ze.length === 0, Mt = Ln.find((e) => e.id === Ye) ?? Ln[0], Nt = Rn.find((e) => e.id === $e) ?? Rn[0];
|
|
1229
|
+
return /* @__PURE__ */ O(Ce, { children: [
|
|
1230
|
+
/* @__PURE__ */ D(E, {
|
|
1212
1231
|
component: "h2",
|
|
1213
1232
|
variant: "h3",
|
|
1214
1233
|
children: "任務"
|
|
1215
1234
|
}),
|
|
1216
|
-
|
|
1235
|
+
h ? /* @__PURE__ */ D(E, {
|
|
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__ */ D("div", {
|
|
1241
|
+
style: Mn,
|
|
1242
|
+
children: /* @__PURE__ */ D(be, {
|
|
1243
|
+
columns: pt,
|
|
1244
|
+
dataSource: ft,
|
|
1226
1245
|
fullWidth: !0
|
|
1227
1246
|
})
|
|
1228
1247
|
}),
|
|
1229
|
-
|
|
1248
|
+
dt.length > 0 ? /* @__PURE__ */ O(Ce, { children: [/* @__PURE__ */ D(E, {
|
|
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__ */ D("div", {
|
|
1254
|
+
style: Mn,
|
|
1255
|
+
children: /* @__PURE__ */ D(be, {
|
|
1256
|
+
columns: ht,
|
|
1257
|
+
dataSource: mt,
|
|
1239
1258
|
fullWidth: !0
|
|
1240
1259
|
})
|
|
1241
1260
|
})] }) : null,
|
|
1242
|
-
/* @__PURE__ */
|
|
1261
|
+
/* @__PURE__ */ O(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: _t,
|
|
1267
|
+
onClose: _t,
|
|
1268
|
+
onConfirm: () => void I(),
|
|
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__ */ D(E, {
|
|
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__ */ E
|
|
1282
|
+
i !== null && i.summary.length > 0 ? /* @__PURE__ */ O("div", {
|
|
1283
|
+
style: kn,
|
|
1284
|
+
children: [/* @__PURE__ */ D(E, {
|
|
1266
1285
|
variant: "body",
|
|
1267
1286
|
children: "將一併送出的補填欄位:"
|
|
1268
|
-
}), i.summary.map((e) => /* @__PURE__ */
|
|
1287
|
+
}), i.summary.map((e) => /* @__PURE__ */ D(C, {
|
|
1269
1288
|
title: e.label,
|
|
1270
|
-
children: /* @__PURE__ */
|
|
1289
|
+
children: /* @__PURE__ */ D(fe, { children: e.text })
|
|
1271
1290
|
}, e.fieldKey))]
|
|
1272
1291
|
}) : null,
|
|
1273
|
-
/* @__PURE__ */
|
|
1274
|
-
style:
|
|
1275
|
-
children: /* @__PURE__ */
|
|
1292
|
+
/* @__PURE__ */ D("div", {
|
|
1293
|
+
style: kn,
|
|
1294
|
+
children: /* @__PURE__ */ D(e, {
|
|
1276
1295
|
label: "簽核意見",
|
|
1277
1296
|
name: "approveComment",
|
|
1278
|
-
children: /* @__PURE__ */
|
|
1297
|
+
children: /* @__PURE__ */ D(xe, {
|
|
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__ */ D(T, {
|
|
1293
1312
|
cancelText: "取消",
|
|
1294
1313
|
confirmButtonProps: {
|
|
1295
|
-
disabled: !
|
|
1314
|
+
disabled: !nt,
|
|
1296
1315
|
variant: "destructive-primary"
|
|
1297
1316
|
},
|
|
1298
1317
|
confirmText: "送出拒絕",
|
|
1299
1318
|
loading: p,
|
|
1300
1319
|
modalStatusType: "error",
|
|
1301
1320
|
modalType: "standard",
|
|
1302
|
-
onCancel:
|
|
1303
|
-
onClose:
|
|
1304
|
-
onConfirm: () => void
|
|
1305
|
-
open:
|
|
1321
|
+
onCancel: yt,
|
|
1322
|
+
onClose: yt,
|
|
1323
|
+
onConfirm: () => void wt(),
|
|
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__ */ O("div", {
|
|
1331
|
+
style: kn,
|
|
1332
|
+
children: [/* @__PURE__ */ D(e, {
|
|
1314
1333
|
label: "拒絕原因",
|
|
1315
1334
|
name: "rejectReason",
|
|
1316
1335
|
required: !0,
|
|
1317
|
-
children: /* @__PURE__ */
|
|
1336
|
+
children: /* @__PURE__ */ D(xe, {
|
|
1318
1337
|
autoFocus: !0,
|
|
1319
1338
|
onChange: (e) => {
|
|
1320
|
-
|
|
1339
|
+
ie(e.target.value), ae(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: v ? "error" : "default",
|
|
1347
|
+
value: re
|
|
1329
1348
|
})
|
|
1330
|
-
}),
|
|
1349
|
+
}), v ? /* @__PURE__ */ D(E, {
|
|
1331
1350
|
color: "text-error",
|
|
1332
1351
|
variant: "body",
|
|
1333
|
-
children:
|
|
1352
|
+
children: v
|
|
1334
1353
|
}) : null]
|
|
1335
1354
|
})
|
|
1336
1355
|
}),
|
|
1337
|
-
/* @__PURE__ */
|
|
1356
|
+
/* @__PURE__ */ D(T, {
|
|
1338
1357
|
cancelText: "取消",
|
|
1339
|
-
confirmButtonProps: { disabled: !
|
|
1358
|
+
confirmButtonProps: { disabled: !Te },
|
|
1340
1359
|
confirmText: "送出轉派",
|
|
1341
1360
|
loading: p,
|
|
1342
1361
|
modalType: "standard",
|
|
1343
|
-
onCancel:
|
|
1344
|
-
onClose:
|
|
1345
|
-
onConfirm: () => void
|
|
1346
|
-
open:
|
|
1362
|
+
onCancel: Ct,
|
|
1363
|
+
onClose: Ct,
|
|
1364
|
+
onConfirm: () => void Tt(),
|
|
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__ */ O("div", {
|
|
1372
|
+
style: jn,
|
|
1373
|
+
children: [/* @__PURE__ */ D(e, {
|
|
1355
1374
|
label: "轉派對象",
|
|
1356
1375
|
name: "transferToMemberId",
|
|
1357
1376
|
required: !0,
|
|
1358
|
-
children: /* @__PURE__ */
|
|
1377
|
+
children: /* @__PURE__ */ D(ue, {
|
|
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) => ke(
|
|
1372
|
-
onSearch:
|
|
1373
|
-
onSearchTextChange: (e) => ke(
|
|
1390
|
+
onChange: (e) => ke(Wt(e)),
|
|
1391
|
+
onSearch: L,
|
|
1392
|
+
onSearchTextChange: (e) => ke(Gt(e, je)),
|
|
1374
1393
|
onVisibilityChange: (e) => {
|
|
1375
|
-
e &&
|
|
1394
|
+
e && L("");
|
|
1376
1395
|
},
|
|
1377
|
-
options: [...
|
|
1396
|
+
options: [...je],
|
|
1378
1397
|
placeholder: "搜尋姓名或信箱",
|
|
1379
1398
|
searchDebounceTime: 300,
|
|
1380
|
-
value:
|
|
1399
|
+
value: Te
|
|
1381
1400
|
})
|
|
1382
|
-
}), /* @__PURE__ */
|
|
1401
|
+
}), /* @__PURE__ */ D(e, {
|
|
1383
1402
|
label: "轉派說明",
|
|
1384
1403
|
name: "transferComment",
|
|
1385
|
-
children: /* @__PURE__ */
|
|
1386
|
-
onChange: (e) =>
|
|
1404
|
+
children: /* @__PURE__ */ D(xe, {
|
|
1405
|
+
onChange: (e) => Se(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: ye
|
|
1393
1412
|
})
|
|
1394
1413
|
})]
|
|
1395
1414
|
})
|
|
1396
1415
|
}),
|
|
1397
|
-
/* @__PURE__ */
|
|
1416
|
+
/* @__PURE__ */ D(T, {
|
|
1398
1417
|
cancelText: "取消",
|
|
1399
|
-
confirmButtonProps: { disabled: !
|
|
1418
|
+
confirmButtonProps: { disabled: !P || lt && !rt },
|
|
1400
1419
|
confirmText: "送出退回",
|
|
1401
1420
|
loading: p,
|
|
1402
1421
|
modalType: "standard",
|
|
1403
|
-
onCancel:
|
|
1404
|
-
onClose:
|
|
1405
|
-
onConfirm: () => void
|
|
1406
|
-
open:
|
|
1422
|
+
onCancel: xt,
|
|
1423
|
+
onClose: xt,
|
|
1424
|
+
onConfirm: () => void Et(),
|
|
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__ */ O("div", {
|
|
1432
|
+
style: jn,
|
|
1433
|
+
children: [/* @__PURE__ */ D(e, {
|
|
1415
1434
|
label: "退回節點",
|
|
1416
1435
|
name: "returnTargetNodeId",
|
|
1417
1436
|
required: !0,
|
|
1418
|
-
children: /* @__PURE__ */
|
|
1437
|
+
children: /* @__PURE__ */ D(ve, {
|
|
1419
1438
|
clearable: !1,
|
|
1420
1439
|
fullWidth: !0,
|
|
1421
|
-
onChange: (e) =>
|
|
1422
|
-
options: [...
|
|
1440
|
+
onChange: (e) => _e(e?.id ?? null),
|
|
1441
|
+
options: [...at],
|
|
1423
1442
|
placeholder: "選擇退回節點",
|
|
1424
|
-
value:
|
|
1443
|
+
value: P
|
|
1425
1444
|
})
|
|
1426
|
-
}), /* @__PURE__ */
|
|
1427
|
-
hintText:
|
|
1445
|
+
}), /* @__PURE__ */ D(e, {
|
|
1446
|
+
hintText: lt ? "此關卡設定退回時必須填寫意見。" : void 0,
|
|
1428
1447
|
label: "退回說明",
|
|
1429
1448
|
name: "returnComment",
|
|
1430
|
-
required:
|
|
1431
|
-
children: /* @__PURE__ */
|
|
1432
|
-
onChange: (e) =>
|
|
1433
|
-
placeholder:
|
|
1434
|
-
ref:
|
|
1449
|
+
required: lt,
|
|
1450
|
+
children: /* @__PURE__ */ D(xe, {
|
|
1451
|
+
onChange: (e) => w(e.target.value),
|
|
1452
|
+
placeholder: lt ? "請說明退回原因" : "可補充需要修改的內容",
|
|
1453
|
+
ref: Pn,
|
|
1435
1454
|
resize: "vertical",
|
|
1436
1455
|
rows: 4,
|
|
1437
|
-
style:
|
|
1438
|
-
value:
|
|
1456
|
+
style: An,
|
|
1457
|
+
value: le
|
|
1439
1458
|
})
|
|
1440
1459
|
})]
|
|
1441
1460
|
})
|
|
1442
1461
|
}),
|
|
1443
|
-
/* @__PURE__ */
|
|
1462
|
+
/* @__PURE__ */ D(T, {
|
|
1444
1463
|
cancelText: "取消",
|
|
1445
|
-
confirmButtonProps: { disabled:
|
|
1464
|
+
confirmButtonProps: { disabled: jt },
|
|
1446
1465
|
confirmText: "送出",
|
|
1447
|
-
loading:
|
|
1466
|
+
loading: Ze,
|
|
1448
1467
|
modalType: "standard",
|
|
1449
|
-
onCancel:
|
|
1450
|
-
onClose:
|
|
1451
|
-
onConfirm: () => void
|
|
1468
|
+
onCancel: kt,
|
|
1469
|
+
onClose: kt,
|
|
1470
|
+
onConfirm: () => void At(),
|
|
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[A],
|
|
1476
|
+
title: Fn[A],
|
|
1477
|
+
children: /* @__PURE__ */ O("div", {
|
|
1478
|
+
style: jn,
|
|
1460
1479
|
children: [
|
|
1461
|
-
|
|
1480
|
+
B ? /* @__PURE__ */ D(e, {
|
|
1462
1481
|
label: "通知時機",
|
|
1463
1482
|
name: "adhocNotifyMode",
|
|
1464
1483
|
required: !0,
|
|
1465
|
-
children: /* @__PURE__ */
|
|
1484
|
+
children: /* @__PURE__ */ D(ve, {
|
|
1466
1485
|
clearable: !1,
|
|
1467
1486
|
fullWidth: !0,
|
|
1468
1487
|
onChange: (e) => Je(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
1496
|
id: A,
|
|
1478
|
-
name:
|
|
1497
|
+
name: Fn[A]
|
|
1479
1498
|
}
|
|
1480
1499
|
})
|
|
1481
1500
|
}) : null,
|
|
1482
|
-
|
|
1501
|
+
B ? /* @__PURE__ */ D(e, {
|
|
1483
1502
|
label: "通知對象類型",
|
|
1484
1503
|
name: "adhocTargetKind",
|
|
1485
1504
|
required: !0,
|
|
1486
|
-
children: /* @__PURE__ */
|
|
1505
|
+
children: /* @__PURE__ */ D(ve, {
|
|
1487
1506
|
clearable: !1,
|
|
1488
1507
|
fullWidth: !0,
|
|
1489
|
-
onChange: (e) =>
|
|
1490
|
-
options: [...
|
|
1491
|
-
value:
|
|
1508
|
+
onChange: (e) => et(e?.id === "WEBHOOK" ? "WEBHOOK" : "MEMBER"),
|
|
1509
|
+
options: [...Rn],
|
|
1510
|
+
value: Nt
|
|
1492
1511
|
})
|
|
1493
1512
|
}) : null,
|
|
1494
|
-
|
|
1513
|
+
B && $e === "WEBHOOK" ? /* @__PURE__ */ D(e, {
|
|
1495
1514
|
label: "Webhook URL",
|
|
1496
1515
|
name: "adhocWebhookUrl",
|
|
1497
1516
|
required: !0,
|
|
1498
|
-
children: /* @__PURE__ */
|
|
1517
|
+
children: /* @__PURE__ */ D(pe, {
|
|
1499
1518
|
fullWidth: !0,
|
|
1500
|
-
onChange: (e) =>
|
|
1519
|
+
onChange: (e) => j(e.target.value),
|
|
1501
1520
|
placeholder: "https://example.com/webhook",
|
|
1502
|
-
value:
|
|
1521
|
+
value: tt
|
|
1503
1522
|
})
|
|
1504
|
-
}) : /* @__PURE__ */
|
|
1505
|
-
label:
|
|
1523
|
+
}) : /* @__PURE__ */ D(e, {
|
|
1524
|
+
label: B ? "通知對象" : "簽核對象",
|
|
1506
1525
|
name: "adhocMemberId",
|
|
1507
1526
|
required: !0,
|
|
1508
|
-
children: /* @__PURE__ */
|
|
1527
|
+
children: /* @__PURE__ */ D(ue, {
|
|
1509
1528
|
asyncData: !0,
|
|
1510
1529
|
disabledOptionsFilter: !0,
|
|
1511
1530
|
emptyText: "沒有符合的成員",
|
|
@@ -1519,41 +1538,41 @@ var En = {
|
|
|
1519
1538
|
loadingText: "搜尋成員中...",
|
|
1520
1539
|
menuMaxHeight: 320,
|
|
1521
1540
|
mode: "multiple",
|
|
1522
|
-
onChange: (e) =>
|
|
1523
|
-
onSearch:
|
|
1541
|
+
onChange: (e) => Be(e.map(Wt).filter(Ut)),
|
|
1542
|
+
onSearch: R,
|
|
1524
1543
|
onVisibilityChange: (e) => {
|
|
1525
|
-
e &&
|
|
1544
|
+
e && R("");
|
|
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
|
-
A === "PRE_APPROVAL" ? /* @__PURE__ */
|
|
1553
|
+
A === "PRE_APPROVAL" ? /* @__PURE__ */ D(e, {
|
|
1535
1554
|
label: "拒簽處理方式",
|
|
1536
1555
|
name: "adhocOnReject",
|
|
1537
1556
|
required: !0,
|
|
1538
|
-
children: /* @__PURE__ */
|
|
1557
|
+
children: /* @__PURE__ */ D(ve, {
|
|
1539
1558
|
clearable: !1,
|
|
1540
1559
|
fullWidth: !0,
|
|
1541
|
-
onChange: (e) =>
|
|
1542
|
-
options: [...
|
|
1543
|
-
value:
|
|
1560
|
+
onChange: (e) => Xe(e?.id === "RETURN_TO_ORIGIN" ? "RETURN_TO_ORIGIN" : "REJECT_INSTANCE"),
|
|
1561
|
+
options: [...Ln],
|
|
1562
|
+
value: Mt
|
|
1544
1563
|
})
|
|
1545
1564
|
}) : null,
|
|
1546
|
-
|
|
1565
|
+
B ? null : /* @__PURE__ */ D(e, {
|
|
1547
1566
|
label: "說明",
|
|
1548
1567
|
name: "adhocComment",
|
|
1549
|
-
children: /* @__PURE__ */
|
|
1550
|
-
onChange: (e) =>
|
|
1568
|
+
children: /* @__PURE__ */ D(xe, {
|
|
1569
|
+
onChange: (e) => Re(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,7 +1580,7 @@ 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
1586
|
if (n.memberIds?.length) return n.memberIds.map((e) => W(e, t)).join("、");
|
|
@@ -1571,26 +1590,25 @@ function jn(e, t) {
|
|
|
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 = b(() => n.map((e) => ({
|
|
1587
1605
|
algorithm: e.algorithm,
|
|
1588
|
-
hashLabel:
|
|
1606
|
+
hashLabel: H(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 = b(() => [
|
|
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__ */ O("div", {
|
|
1644
|
+
style: Hn,
|
|
1627
1645
|
children: [
|
|
1628
|
-
/* @__PURE__ */ E
|
|
1646
|
+
/* @__PURE__ */ D(E, {
|
|
1629
1647
|
component: "h2",
|
|
1630
1648
|
variant: "h3",
|
|
1631
1649
|
children: "簽章"
|
|
1632
1650
|
}),
|
|
1633
|
-
/* @__PURE__ */ E
|
|
1651
|
+
/* @__PURE__ */ D(E, {
|
|
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__ */ D(be, {
|
|
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) => B(e ?? null)).join(" ");
|
|
1671
1688
|
}
|
|
1672
|
-
var
|
|
1689
|
+
var Xn = y(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__ */ O("div", {
|
|
1675
1692
|
...l,
|
|
1676
|
-
className:
|
|
1693
|
+
className: Yn(F.host, c === "dot" ? F.dot : null, n && d !== "processing" ? F.error : null, a === "horizontal" ? F.horizontal : null, c === "number" ? F.number : null, d === "pending" ? F.pending : null, d === "processing" ? F.processing : null, n && d === "processing" ? F.processingError : null, !n && d === "succeeded" ? F.succeeded : null, a === "vertical" ? F.vertical : null, e),
|
|
1677
1694
|
ref: u,
|
|
1678
|
-
children: [c === "dot" ? /* @__PURE__ */
|
|
1679
|
-
className:
|
|
1695
|
+
children: [c === "dot" ? /* @__PURE__ */ D("span", { className: Yn(F.statusIndicator, F.statusIndicatorDot) }) : /* @__PURE__ */ D("span", {
|
|
1696
|
+
className: F.statusIndicator,
|
|
1680
1697
|
children: i + 1
|
|
1681
|
-
}), /* @__PURE__ */
|
|
1682
|
-
className:
|
|
1698
|
+
}), /* @__PURE__ */ O("div", {
|
|
1699
|
+
className: F.textContainer,
|
|
1683
1700
|
children: [
|
|
1684
|
-
/* @__PURE__ */
|
|
1685
|
-
className:
|
|
1701
|
+
/* @__PURE__ */ O(E, {
|
|
1702
|
+
className: F.title,
|
|
1686
1703
|
variant: "label-primary-highlight",
|
|
1687
|
-
children: [s, /* @__PURE__ */
|
|
1704
|
+
children: [s, /* @__PURE__ */ D("span", { className: F.titleConnectLine })]
|
|
1688
1705
|
}),
|
|
1689
|
-
f.length > 0 ? /* @__PURE__ */ E
|
|
1690
|
-
className:
|
|
1691
|
-
|
|
1692
|
-
|
|
1706
|
+
f.length > 0 ? /* @__PURE__ */ D(E, {
|
|
1707
|
+
className: F.description,
|
|
1708
|
+
component: "div",
|
|
1709
|
+
variant: "body",
|
|
1710
|
+
children: f.map((e, t) => /* @__PURE__ */ O(ae, { children: [t > 0 ? " · " : null, Zn(e)] }, `${e.type}-${t}`))
|
|
1693
1711
|
}) : null,
|
|
1694
|
-
p.map((e, t) => /* @__PURE__ */
|
|
1695
|
-
style: e.tone === "danger" ?
|
|
1712
|
+
p.map((e, t) => /* @__PURE__ */ O(E, {
|
|
1713
|
+
style: e.tone === "danger" ? Jn : Kn,
|
|
1696
1714
|
variant: "body",
|
|
1697
|
-
children: [/* @__PURE__ */
|
|
1698
|
-
style: e.tone === "danger" ? void 0 :
|
|
1715
|
+
children: [/* @__PURE__ */ O("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__ */ O(Ce, { children: [
|
|
1708
1726
|
e.prefix,
|
|
1709
1727
|
":",
|
|
1710
|
-
/* @__PURE__ */
|
|
1728
|
+
/* @__PURE__ */ D(Se, {
|
|
1711
1729
|
title: e.email,
|
|
1712
|
-
children: ({ ref: t, ...n }) => /* @__PURE__ */
|
|
1730
|
+
children: ({ ref: t, ...n }) => /* @__PURE__ */ D("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 = b(() => 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 = Y(d), p = d.map((e) => ({
|
|
1724
1754
|
...e,
|
|
1725
|
-
descriptionParts: e.descriptionParts.filter(
|
|
1755
|
+
descriptionParts: e.descriptionParts.filter(J)
|
|
1726
1756
|
}));
|
|
1727
|
-
return /* @__PURE__ */
|
|
1728
|
-
style:
|
|
1729
|
-
children: [/* @__PURE__ */ E
|
|
1757
|
+
return /* @__PURE__ */ O("div", {
|
|
1758
|
+
style: Wn,
|
|
1759
|
+
children: [/* @__PURE__ */ D(E, {
|
|
1730
1760
|
component: "h2",
|
|
1731
1761
|
variant: "h3",
|
|
1732
1762
|
children: "歷程"
|
|
1733
|
-
}),
|
|
1734
|
-
currentStep:
|
|
1763
|
+
}), p.length > 0 ? /* @__PURE__ */ D(ye, {
|
|
1764
|
+
currentStep: f,
|
|
1735
1765
|
orientation: "vertical",
|
|
1736
1766
|
type: "dot",
|
|
1737
|
-
children:
|
|
1767
|
+
children: p.map((e) => /* @__PURE__ */ D(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__ */ E
|
|
1773
|
+
}) : /* @__PURE__ */ D(E, {
|
|
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] = x(null), [a, o] = x(!1), [s, c] = x(null), l = b(() => e.map((e) => ({
|
|
1764
1793
|
delivery: e,
|
|
1765
1794
|
key: e.id
|
|
1766
|
-
})), [e]), u =
|
|
1795
|
+
})), [e]), u = b(() => [
|
|
1767
1796
|
{
|
|
1768
1797
|
key: "endpoint",
|
|
1769
|
-
render: ({ delivery: e }) => /* @__PURE__ */
|
|
1770
|
-
style:
|
|
1771
|
-
children: [/* @__PURE__ */ E
|
|
1798
|
+
render: ({ delivery: e }) => /* @__PURE__ */ O("div", {
|
|
1799
|
+
style: er,
|
|
1800
|
+
children: [/* @__PURE__ */ D(E, {
|
|
1772
1801
|
component: "span",
|
|
1773
1802
|
variant: "body",
|
|
1774
1803
|
children: e.endpointLabel ?? e.endpointKey
|
|
1775
|
-
}), /* @__PURE__ */
|
|
1804
|
+
}), /* @__PURE__ */ O(E, {
|
|
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__ */ D(rr, { status: e.status }),
|
|
1795
1824
|
title: "狀態",
|
|
1796
1825
|
width: 120
|
|
1797
1826
|
},
|
|
1798
1827
|
{
|
|
1799
1828
|
key: "attemptCount",
|
|
1800
|
-
render: ({ delivery: e }) => /* @__PURE__ */ E
|
|
1829
|
+
render: ({ delivery: e }) => /* @__PURE__ */ D(E, {
|
|
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__ */ E
|
|
1839
|
+
render: ({ delivery: e }) => e.lastErrorCode && e.status !== "SENT" ? /* @__PURE__ */ O("div", {
|
|
1840
|
+
style: er,
|
|
1841
|
+
children: [/* @__PURE__ */ D(E, {
|
|
1813
1842
|
color: "text-error",
|
|
1814
1843
|
component: "span",
|
|
1815
1844
|
variant: "body",
|
|
1816
1845
|
children: e.lastErrorCode
|
|
1817
|
-
}), e.lastErrorDetail ? /* @__PURE__ */ E
|
|
1846
|
+
}), e.lastErrorDetail ? /* @__PURE__ */ D(E, {
|
|
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__ */ E
|
|
1853
|
+
}) : /* @__PURE__ */ D(E, {
|
|
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__ */ E
|
|
1864
|
+
render: ({ delivery: e }) => /* @__PURE__ */ D(E, {
|
|
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 = b(() => ({
|
|
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__ */ O("div", {
|
|
1898
|
+
style: $n,
|
|
1870
1899
|
children: [
|
|
1871
|
-
/* @__PURE__ */ E
|
|
1900
|
+
/* @__PURE__ */ D(E, {
|
|
1872
1901
|
component: "h2",
|
|
1873
1902
|
variant: "h3",
|
|
1874
1903
|
children: "外部系統通知"
|
|
1875
1904
|
}),
|
|
1876
|
-
s ? /* @__PURE__ */ E
|
|
1905
|
+
s ? /* @__PURE__ */ D(E, {
|
|
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__ */ D(be, {
|
|
1882
1911
|
actions: d,
|
|
1883
1912
|
columns: u,
|
|
1884
1913
|
dataSource: l,
|
|
1885
1914
|
fullWidth: !0
|
|
1886
|
-
}) : /* @__PURE__ */ E
|
|
1915
|
+
}) : /* @__PURE__ */ D(E, {
|
|
1887
1916
|
color: "text-neutral",
|
|
1888
1917
|
variant: "body",
|
|
1889
1918
|
children: "此案件沒有外部系統通知。"
|
|
1890
1919
|
}),
|
|
1891
|
-
/* @__PURE__ */
|
|
1920
|
+
/* @__PURE__ */ D(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__ */
|
|
1934
|
+
children: /* @__PURE__ */ O(E, {
|
|
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__ */ D(de, {
|
|
1919
1948
|
size: "sub",
|
|
1920
1949
|
text: "已送達",
|
|
1921
1950
|
variant: "dot-success"
|
|
1922
|
-
}) : e === "FAILED" ? /* @__PURE__ */
|
|
1951
|
+
}) : e === "FAILED" ? /* @__PURE__ */ D(de, {
|
|
1923
1952
|
size: "sub",
|
|
1924
1953
|
text: "失敗",
|
|
1925
1954
|
variant: "dot-error"
|
|
1926
|
-
}) : /* @__PURE__ */
|
|
1955
|
+
}) : /* @__PURE__ */ D(de, {
|
|
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 M({
|
|
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(it)).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 (!ce || !
|
|
2036
|
+
}, xr = { workflowRuntime: jr };
|
|
2037
|
+
function Sr({ instanceId: i, showAttachments: o = !0, showForm: c = !0, showHistory: l = !0, showSignatures: u = !0, showTasks: d = !0, showWebhookDeliveries: f = !0 }) {
|
|
2038
|
+
let { member: ae } = n(), y = ae?.memberId ?? null, ce = f && r(ae), [ue, de] = x([]), [C, fe] = x(null), [w, pe] = x([]), [ve, ye] = x([]), [be, Se] = x([]), [we, Ee] = x([]), [De, Oe] = x(null), [k, Ie] = x([]), [Le, Re] = x([]), [Ve, Ge] = x([]), [Ke, A] = x(null), [Je, Qe] = x(!0), [tt, j] = x(!1), [rt, it] = x(!1), [M, ot] = x(!1), [ct, dt] = x(!1), [P, pt] = x(""), [mt, ht] = x(!1), [gt, F] = x({}), [I, vt] = x({}), { clearAfterResubmit: yt, comment: bt, setComment: xt } = bn(i), [St, Ct] = x({}), [L, Tt] = x(null), [Et, Ot] = x(null), [kt, R] = x([]), At = P.trim(), z = le(null), jt = le(0), Mt = we.some((e) => e.status === "PENDING" || e.status === "DELIVERY_IN_PROGRESS");
|
|
2039
|
+
se(() => {
|
|
2040
|
+
Q();
|
|
2041
|
+
}, [y, i]), se(() => {
|
|
2042
|
+
if (!ce || !Mt || jt.current >= lr) return;
|
|
2016
2043
|
let e = setTimeout(() => {
|
|
2017
|
-
|
|
2018
|
-
},
|
|
2044
|
+
jt.current += 1, fn();
|
|
2045
|
+
}, cr);
|
|
2019
2046
|
return () => clearTimeout(e);
|
|
2020
2047
|
}, [
|
|
2021
2048
|
ce,
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
]),
|
|
2025
|
-
|
|
2026
|
-
}, [
|
|
2027
|
-
let
|
|
2028
|
-
|
|
2049
|
+
Mt,
|
|
2050
|
+
we
|
|
2051
|
+
]), se(() => {
|
|
2052
|
+
vt(C?.formData ?? {}), Ct({});
|
|
2053
|
+
}, [C]);
|
|
2054
|
+
let Nt = oe((e, t) => {
|
|
2055
|
+
Ct((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,274 @@ function pr({ instanceId: i, showAttachments: a = !0, showForm: ne = !0, showHis
|
|
|
2035
2062
|
}
|
|
2036
2063
|
};
|
|
2037
2064
|
});
|
|
2038
|
-
}, []),
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
}, [
|
|
2042
|
-
let
|
|
2043
|
-
...
|
|
2044
|
-
...
|
|
2065
|
+
}, []), H = b(() => Bt(k, y), [y, k]), U = b(() => H && C ? C.workflowSnapshot.nodes.find((e) => e.id === H.nodeId) ?? null : null, [H, C]), Ft = U?.type === "userTask" && U.data.returnBehavior.allowReturn, It = U?.type === "userTask" && U.data.allowReject !== !1, Rt = U?.type === "userTask" && U.data.allowTransfer !== !1, zt = U?.type === "userTask" && U.data.allowAddSigner, Vt = !(!C || C.initiatorMemberId !== y || C.state !== "RUNNING" && C.state !== "RETURNED"), Ht = !!(C && C.initiatorMemberId === y && C.state === "RETURNED"), G = b(() => H && !H.isAdhoc && U?.type === "userTask" && nt(U).size > 0 ? U : null, [H, U]), Ut = G ? H?.id ?? null : null, [Wt, Gt] = x({}), [K, q] = x({}), [Kt, J] = x(!1);
|
|
2066
|
+
se(() => {
|
|
2067
|
+
Gt({}), q({}), J(!1);
|
|
2068
|
+
}, [Ut]);
|
|
2069
|
+
let Y = C?.formDefinitionSnapshot.schema ?? null, X = b(() => G && Y ? p(Y, G) : null, [G, Y]), Z = b(() => X && C ? N(X.fields, {
|
|
2070
|
+
...C.formData,
|
|
2071
|
+
...Wt
|
|
2045
2072
|
}) : null, [
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
]),
|
|
2050
|
-
draft:
|
|
2051
|
-
node:
|
|
2052
|
-
schema:
|
|
2053
|
-
stored:
|
|
2054
|
-
values:
|
|
2073
|
+
Wt,
|
|
2074
|
+
X,
|
|
2075
|
+
C
|
|
2076
|
+
]), qt = b(() => G && X && Z && C ? g({
|
|
2077
|
+
draft: Wt,
|
|
2078
|
+
node: G,
|
|
2079
|
+
schema: X,
|
|
2080
|
+
stored: C.formData,
|
|
2081
|
+
values: Z
|
|
2055
2082
|
}) : {}, [
|
|
2056
|
-
|
|
2057
|
-
|
|
2083
|
+
Wt,
|
|
2084
|
+
G,
|
|
2085
|
+
X,
|
|
2058
2086
|
Z,
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
instance: w,
|
|
2087
|
+
C
|
|
2088
|
+
]), Jt = b(() => C ? or({
|
|
2089
|
+
activityLogs: ue,
|
|
2090
|
+
actingTask: H,
|
|
2091
|
+
instance: C,
|
|
2065
2092
|
tasks: k
|
|
2066
2093
|
}) : void 0, [
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2094
|
+
ue,
|
|
2095
|
+
H,
|
|
2096
|
+
C,
|
|
2070
2097
|
k
|
|
2071
|
-
]),
|
|
2072
|
-
expectedFormDataFingerprint:
|
|
2073
|
-
formData:
|
|
2074
|
-
summary:
|
|
2098
|
+
]), Yt = b(() => C ? ne(C.workflowSnapshot, G) : void 0, [G, C]), Xt = b(() => new Map(Ve.map((e) => [e.memberId, e])), [Ve]), Zt = _t(b(() => Y ? re(Y, qt) : [], [qt, Y])), Qt = b(() => G && Z && Y && C?.formDataFingerprint ? {
|
|
2099
|
+
expectedFormDataFingerprint: C.formDataFingerprint,
|
|
2100
|
+
formData: m(qt, G),
|
|
2101
|
+
summary: v(Y, G, qt, new Map([...Xt.keys()].map((e) => [e, W(e, Xt)])), Zt)
|
|
2075
2102
|
} : null, [
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2103
|
+
qt,
|
|
2104
|
+
G,
|
|
2105
|
+
Zt,
|
|
2106
|
+
Z,
|
|
2107
|
+
C,
|
|
2108
|
+
Xt,
|
|
2109
|
+
Y
|
|
2082
2110
|
]);
|
|
2083
|
-
function
|
|
2084
|
-
if (!
|
|
2085
|
-
let t =
|
|
2086
|
-
|
|
2111
|
+
function $t(e) {
|
|
2112
|
+
if (!G) return;
|
|
2113
|
+
let t = nt(G), n = Object.entries(e).filter(([e, n]) => t.has(e) && JSON.stringify(n) !== JSON.stringify(Z?.[e]));
|
|
2114
|
+
Gt((e) => ({
|
|
2087
2115
|
...e,
|
|
2088
2116
|
...Object.fromEntries(n)
|
|
2089
|
-
})),
|
|
2117
|
+
})), q({});
|
|
2090
2118
|
}
|
|
2091
|
-
async function
|
|
2092
|
-
if (
|
|
2119
|
+
async function en() {
|
|
2120
|
+
if (G && !C?.formDataFingerprint) me.error("無法確認表單版本,請重新整理頁面後再同意。");
|
|
2093
2121
|
else {
|
|
2094
|
-
if (
|
|
2095
|
-
|
|
2096
|
-
let e = await
|
|
2097
|
-
schema:
|
|
2098
|
-
uiSchema:
|
|
2099
|
-
values:
|
|
2100
|
-
}).catch((e) => (
|
|
2122
|
+
if (G && Z && Y && C?.formDefinitionSnapshot.uiSchema) {
|
|
2123
|
+
it(!0);
|
|
2124
|
+
let e = await st({
|
|
2125
|
+
schema: h(Y, G),
|
|
2126
|
+
uiSchema: C.formDefinitionSnapshot.uiSchema,
|
|
2127
|
+
values: Z
|
|
2128
|
+
}).catch((e) => (me.error(V(e)), null)).finally(() => it(!1));
|
|
2101
2129
|
if (!e) return;
|
|
2102
2130
|
if (!e.valid) {
|
|
2103
|
-
|
|
2131
|
+
q(e.errors), e.firstInvalidFieldKey && at(e.firstInvalidFieldKey), me.warning(sr(e.errors));
|
|
2104
2132
|
return;
|
|
2105
2133
|
}
|
|
2106
2134
|
}
|
|
2107
|
-
|
|
2135
|
+
z.current?.handleApprove();
|
|
2108
2136
|
}
|
|
2109
2137
|
}
|
|
2110
|
-
function
|
|
2111
|
-
if (!
|
|
2112
|
-
if (
|
|
2113
|
-
let t =
|
|
2114
|
-
return t ? (
|
|
2138
|
+
function tn(e) {
|
|
2139
|
+
if (!G || !Y) return !1;
|
|
2140
|
+
if (ie(e)) return J(!0), !0;
|
|
2141
|
+
let t = ee(e, Y, G);
|
|
2142
|
+
return t ? (q(t), at(Object.keys(t)[0] ?? ""), me.warning(sr(t)), !0) : !1;
|
|
2115
2143
|
}
|
|
2116
|
-
async function
|
|
2117
|
-
await
|
|
2144
|
+
async function nn() {
|
|
2145
|
+
await Q(), J(!1);
|
|
2118
2146
|
}
|
|
2119
|
-
let
|
|
2120
|
-
|
|
2121
|
-
|
|
2147
|
+
let rn = b(() => s(w), [w]), an = b(() => new Map(be.map((e) => [e.id, e])), [be]), on = b(() => C ? Dr(C.workflowSnapshot) : null, [C]), sn = b(() => C && on ? Er(on, k, Le, C.state) : [], [
|
|
2148
|
+
C,
|
|
2149
|
+
on,
|
|
2122
2150
|
k,
|
|
2123
|
-
|
|
2124
|
-
]),
|
|
2125
|
-
async function
|
|
2126
|
-
Qe(!0),
|
|
2151
|
+
Le
|
|
2152
|
+
]), cn = b(() => on ? Or(on) : [], [on]), ln = b(() => C ? wr(C.workflowSnapshot) : [], [C]);
|
|
2153
|
+
async function Q() {
|
|
2154
|
+
Qe(!0), A(null);
|
|
2127
2155
|
try {
|
|
2128
|
-
let e = await
|
|
2129
|
-
|
|
2130
|
-
let t = await
|
|
2131
|
-
|
|
2132
|
-
|
|
2156
|
+
let e = await Me(i);
|
|
2157
|
+
de(e.activityLogs), fe(e.instance), Ie(e.tasks), Re(e.workflowTokens);
|
|
2158
|
+
let t = await ke(e.instance.id), [n, r, a, o, s] = await Promise.all([
|
|
2159
|
+
yn(e.tasks),
|
|
2160
|
+
vn({
|
|
2133
2161
|
...e,
|
|
2134
2162
|
adhocDirectives: t
|
|
2135
2163
|
}),
|
|
2136
|
-
Te(e.instance.id),
|
|
2137
2164
|
Ae(e.instance.id),
|
|
2138
|
-
|
|
2165
|
+
Fe(e.instance.id),
|
|
2166
|
+
un(e.instance.id)
|
|
2139
2167
|
]);
|
|
2140
|
-
|
|
2168
|
+
pe(n), Ge(r), ye(a), Se(o.signatures), Oe(o.verification), R(t), Ee(s);
|
|
2141
2169
|
} catch (e) {
|
|
2142
|
-
|
|
2170
|
+
A(V(e));
|
|
2143
2171
|
} finally {
|
|
2144
2172
|
Qe(!1);
|
|
2145
2173
|
}
|
|
2146
2174
|
}
|
|
2147
|
-
async function
|
|
2148
|
-
return ce ?
|
|
2175
|
+
async function un(e) {
|
|
2176
|
+
return ce ? je(e).catch(() => []) : [];
|
|
2149
2177
|
}
|
|
2150
|
-
async function
|
|
2151
|
-
await
|
|
2178
|
+
async function dn(e) {
|
|
2179
|
+
await Be(e.id), jt.current = 0, await Q();
|
|
2152
2180
|
}
|
|
2153
|
-
async function
|
|
2154
|
-
let e = await
|
|
2155
|
-
e.some((e) => e.status === "PENDING" || e.status === "DELIVERY_IN_PROGRESS") ?
|
|
2181
|
+
async function fn() {
|
|
2182
|
+
let e = await un(i);
|
|
2183
|
+
e.some((e) => e.status === "PENDING" || e.status === "DELIVERY_IN_PROGRESS") ? Ee(e) : await Q();
|
|
2156
2184
|
}
|
|
2157
2185
|
async function pn(e, t) {
|
|
2158
|
-
if (!
|
|
2159
|
-
return { id: (await
|
|
2186
|
+
if (!y) throw Error("尚未登入,無法上傳附件");
|
|
2187
|
+
return { id: (await He({
|
|
2160
2188
|
file: t,
|
|
2161
2189
|
formFieldPath: `form.${e.fieldKey}`
|
|
2162
2190
|
})).id };
|
|
2163
2191
|
}
|
|
2164
2192
|
async function mn(e) {
|
|
2165
|
-
if (!
|
|
2166
|
-
let t = await
|
|
2193
|
+
if (!y) return;
|
|
2194
|
+
let t = await Ne({ id: e.id });
|
|
2167
2195
|
window.open(t, "_blank", "noopener,noreferrer");
|
|
2168
2196
|
}
|
|
2169
2197
|
async function hn(e) {
|
|
2170
|
-
if (!
|
|
2171
|
-
let t = await
|
|
2172
|
-
|
|
2198
|
+
if (!y) return;
|
|
2199
|
+
let t = await Pe({ id: e.id });
|
|
2200
|
+
Tt(e), Ot(t);
|
|
2173
2201
|
}
|
|
2174
2202
|
async function gn() {
|
|
2175
|
-
if (
|
|
2176
|
-
|
|
2203
|
+
if (y && C && Vt) {
|
|
2204
|
+
j(!0), A(null), F({});
|
|
2177
2205
|
try {
|
|
2178
|
-
await
|
|
2179
|
-
cancelledByMemberId:
|
|
2180
|
-
comment:
|
|
2181
|
-
instanceId:
|
|
2182
|
-
}),
|
|
2206
|
+
await Te({
|
|
2207
|
+
cancelledByMemberId: y,
|
|
2208
|
+
comment: At || null,
|
|
2209
|
+
instanceId: C.id
|
|
2210
|
+
}), pt(""), ht(!1), await Q();
|
|
2183
2211
|
} catch (e) {
|
|
2184
|
-
|
|
2212
|
+
A(V(e));
|
|
2185
2213
|
} finally {
|
|
2186
|
-
|
|
2214
|
+
j(!1);
|
|
2187
2215
|
}
|
|
2188
2216
|
}
|
|
2189
2217
|
}
|
|
2190
2218
|
async function _n() {
|
|
2191
|
-
if (!
|
|
2192
|
-
|
|
2193
|
-
let e =
|
|
2219
|
+
if (!y || !C || !Ht) return;
|
|
2220
|
+
j(!0), A(null), F({});
|
|
2221
|
+
let e = a(Object.values(St));
|
|
2194
2222
|
if (e) {
|
|
2195
|
-
|
|
2223
|
+
A(e), j(!1);
|
|
2196
2224
|
return;
|
|
2197
2225
|
}
|
|
2198
|
-
let t =
|
|
2226
|
+
let t = C.formDefinitionSnapshot.schema ? te(C.formDefinitionSnapshot.schema, C.workflowSnapshot) : null, n = _(t ? N(t.fields, I) : I, C.workflowSnapshot);
|
|
2199
2227
|
try {
|
|
2200
|
-
if (t &&
|
|
2201
|
-
let e = await
|
|
2228
|
+
if (t && C.formDefinitionSnapshot.uiSchema) {
|
|
2229
|
+
let e = await st({
|
|
2202
2230
|
schema: t,
|
|
2203
|
-
uiSchema:
|
|
2231
|
+
uiSchema: C.formDefinitionSnapshot.uiSchema,
|
|
2204
2232
|
values: n
|
|
2205
2233
|
});
|
|
2206
2234
|
if (!e.valid) {
|
|
2207
|
-
|
|
2235
|
+
F(e.errors), A("請先修正表單中標示的欄位。"), e.firstInvalidFieldKey && at(e.firstInvalidFieldKey);
|
|
2208
2236
|
return;
|
|
2209
2237
|
}
|
|
2210
2238
|
}
|
|
2211
|
-
await
|
|
2212
|
-
comment:
|
|
2239
|
+
await ze({
|
|
2240
|
+
comment: bt,
|
|
2213
2241
|
formData: n,
|
|
2214
|
-
initiatorMemberId:
|
|
2215
|
-
instanceId:
|
|
2216
|
-
title:
|
|
2217
|
-
}),
|
|
2242
|
+
initiatorMemberId: y,
|
|
2243
|
+
instanceId: C.id,
|
|
2244
|
+
title: C.title
|
|
2245
|
+
}), yt(C.id), await Q();
|
|
2218
2246
|
} catch (e) {
|
|
2219
|
-
|
|
2247
|
+
A(V(e));
|
|
2220
2248
|
} finally {
|
|
2221
|
-
|
|
2249
|
+
j(!1);
|
|
2222
2250
|
}
|
|
2223
2251
|
}
|
|
2224
|
-
let $ =
|
|
2225
|
-
return /* @__PURE__ */
|
|
2226
|
-
/* @__PURE__ */
|
|
2227
|
-
description:
|
|
2228
|
-
|
|
2229
|
-
t(
|
|
2230
|
-
|
|
2231
|
-
].filter(
|
|
2232
|
-
title:
|
|
2252
|
+
let $ = tt || M || rt;
|
|
2253
|
+
return /* @__PURE__ */ O(Ce, { children: [
|
|
2254
|
+
/* @__PURE__ */ D(he, { children: /* @__PURE__ */ O(Ue, {
|
|
2255
|
+
description: C ? [
|
|
2256
|
+
Pt(C.state),
|
|
2257
|
+
t(C.startedAt),
|
|
2258
|
+
Dt(C, Xt)
|
|
2259
|
+
].filter(B).join(" · ") : "載入案件內容。",
|
|
2260
|
+
title: C?.title ?? "簽核案件",
|
|
2233
2261
|
children: [
|
|
2234
|
-
|
|
2262
|
+
C ? /* @__PURE__ */ D(S, {
|
|
2235
2263
|
"aria-label": "查看流程圖",
|
|
2236
|
-
icon:
|
|
2264
|
+
icon: $e,
|
|
2237
2265
|
iconType: "icon-only",
|
|
2238
|
-
onClick: () =>
|
|
2266
|
+
onClick: () => dt(!0),
|
|
2239
2267
|
title: "查看流程圖",
|
|
2240
2268
|
variant: "base-secondary",
|
|
2241
2269
|
children: "流程圖"
|
|
2242
2270
|
}) : null,
|
|
2243
|
-
|
|
2271
|
+
Vt ? /* @__PURE__ */ D(S, {
|
|
2244
2272
|
disabled: $,
|
|
2245
|
-
icon:
|
|
2273
|
+
icon: qe,
|
|
2246
2274
|
iconType: "leading",
|
|
2247
|
-
onClick: () =>
|
|
2275
|
+
onClick: () => ht(!0),
|
|
2248
2276
|
variant: "destructive-secondary",
|
|
2249
2277
|
children: "取消案件"
|
|
2250
2278
|
}) : null,
|
|
2251
|
-
|
|
2252
|
-
|
|
2279
|
+
H ? /* @__PURE__ */ O(Ce, { children: [
|
|
2280
|
+
zt ? /* @__PURE__ */ O(Ce, { children: [/* @__PURE__ */ D(S, {
|
|
2253
2281
|
disabled: $,
|
|
2254
|
-
icon:
|
|
2282
|
+
icon: Xe,
|
|
2255
2283
|
iconType: "leading",
|
|
2256
|
-
onClick: () =>
|
|
2284
|
+
onClick: () => z.current?.openAdhocModal("COUNTERSIGN"),
|
|
2257
2285
|
variant: "base-secondary",
|
|
2258
2286
|
children: "會簽"
|
|
2259
|
-
}, "adhoc-countersign"), /* @__PURE__ */
|
|
2287
|
+
}, "adhoc-countersign"), /* @__PURE__ */ D(S, {
|
|
2260
2288
|
disabled: $,
|
|
2261
|
-
icon:
|
|
2289
|
+
icon: Xe,
|
|
2262
2290
|
iconType: "leading",
|
|
2263
|
-
onClick: () =>
|
|
2291
|
+
onClick: () => z.current?.openAdhocModal("PRE_APPROVAL"),
|
|
2264
2292
|
variant: "base-secondary",
|
|
2265
2293
|
children: "加簽"
|
|
2266
2294
|
}, "adhoc-pre-approval")] }) : null,
|
|
2267
|
-
/* @__PURE__ */
|
|
2295
|
+
/* @__PURE__ */ D(S, {
|
|
2268
2296
|
disabled: $,
|
|
2269
|
-
icon:
|
|
2297
|
+
icon: Ye,
|
|
2270
2298
|
iconType: "leading",
|
|
2271
|
-
onClick: () =>
|
|
2299
|
+
onClick: () => z.current?.openAdhocModal("STAGE_NOTIFY"),
|
|
2272
2300
|
variant: "base-secondary",
|
|
2273
2301
|
children: "通知設定"
|
|
2274
2302
|
}, "adhoc-notify"),
|
|
2275
|
-
|
|
2303
|
+
Ft ? /* @__PURE__ */ D(S, {
|
|
2276
2304
|
disabled: $,
|
|
2277
|
-
icon:
|
|
2305
|
+
icon: Ze,
|
|
2278
2306
|
iconType: "leading",
|
|
2279
|
-
onClick: () =>
|
|
2307
|
+
onClick: () => z.current?.openReturnModal(),
|
|
2280
2308
|
variant: "base-secondary",
|
|
2281
2309
|
children: "退回"
|
|
2282
2310
|
}, "task-return") : null,
|
|
2283
|
-
|
|
2311
|
+
Rt ? /* @__PURE__ */ D(S, {
|
|
2284
2312
|
disabled: $,
|
|
2285
|
-
icon:
|
|
2313
|
+
icon: et,
|
|
2286
2314
|
iconType: "leading",
|
|
2287
|
-
onClick: () =>
|
|
2315
|
+
onClick: () => z.current?.openTransferModal(),
|
|
2288
2316
|
variant: "base-secondary",
|
|
2289
2317
|
children: "轉派"
|
|
2290
2318
|
}, "task-transfer") : null,
|
|
2291
|
-
|
|
2319
|
+
It ? /* @__PURE__ */ D(S, {
|
|
2292
2320
|
disabled: $,
|
|
2293
|
-
icon:
|
|
2321
|
+
icon: qe,
|
|
2294
2322
|
iconType: "leading",
|
|
2295
|
-
onClick: () =>
|
|
2323
|
+
onClick: () => z.current?.openRejectModal(),
|
|
2296
2324
|
variant: "destructive-secondary",
|
|
2297
2325
|
children: "拒絕"
|
|
2298
2326
|
}, "task-reject") : null,
|
|
2299
|
-
/* @__PURE__ */
|
|
2327
|
+
/* @__PURE__ */ D(S, {
|
|
2300
2328
|
disabled: $,
|
|
2301
|
-
icon:
|
|
2329
|
+
icon: We,
|
|
2302
2330
|
iconType: "leading",
|
|
2303
2331
|
onClick: () => {
|
|
2304
|
-
|
|
2332
|
+
en();
|
|
2305
2333
|
},
|
|
2306
2334
|
variant: "base-primary",
|
|
2307
2335
|
children: "同意"
|
|
@@ -2309,36 +2337,36 @@ function pr({ instanceId: i, showAttachments: a = !0, showForm: ne = !0, showHis
|
|
|
2309
2337
|
] }) : null
|
|
2310
2338
|
]
|
|
2311
2339
|
}) }),
|
|
2312
|
-
/* @__PURE__ */
|
|
2313
|
-
|
|
2314
|
-
canResubmitInstance:
|
|
2315
|
-
deciding:
|
|
2316
|
-
error:
|
|
2317
|
-
fieldAccess:
|
|
2318
|
-
fieldLabelMarkers:
|
|
2319
|
-
fill:
|
|
2320
|
-
errors:
|
|
2321
|
-
fieldCount:
|
|
2322
|
-
onChange:
|
|
2323
|
-
schema:
|
|
2324
|
-
value:
|
|
2340
|
+
/* @__PURE__ */ O(_e, { children: [
|
|
2341
|
+
c ? /* @__PURE__ */ D(ge, { children: /* @__PURE__ */ D(En, {
|
|
2342
|
+
canResubmitInstance: Ht,
|
|
2343
|
+
deciding: tt,
|
|
2344
|
+
error: Ke,
|
|
2345
|
+
fieldAccess: Jt,
|
|
2346
|
+
fieldLabelMarkers: Yt,
|
|
2347
|
+
fill: X && Z && G ? {
|
|
2348
|
+
errors: K,
|
|
2349
|
+
fieldCount: nt(G).size,
|
|
2350
|
+
onChange: $t,
|
|
2351
|
+
schema: X,
|
|
2352
|
+
value: Z
|
|
2325
2353
|
} : null,
|
|
2326
|
-
instance:
|
|
2327
|
-
loading:
|
|
2328
|
-
onDataSourceStateChange:
|
|
2329
|
-
onReloadAfterConflict:
|
|
2354
|
+
instance: C,
|
|
2355
|
+
loading: Je,
|
|
2356
|
+
onDataSourceStateChange: Nt,
|
|
2357
|
+
onReloadAfterConflict: Kt ? () => void nn() : null,
|
|
2330
2358
|
onResubmitFormChange: (e) => {
|
|
2331
|
-
|
|
2359
|
+
vt(e), F({});
|
|
2332
2360
|
},
|
|
2333
|
-
onResubmitCommentChange:
|
|
2361
|
+
onResubmitCommentChange: xt,
|
|
2334
2362
|
onResubmitInstance: () => void _n(),
|
|
2335
2363
|
onUploadAttachment: pn,
|
|
2336
|
-
resubmitComment:
|
|
2337
|
-
resubmitFormData:
|
|
2338
|
-
resubmitFormErrors:
|
|
2364
|
+
resubmitComment: bt,
|
|
2365
|
+
resubmitFormData: I,
|
|
2366
|
+
resubmitFormErrors: gt
|
|
2339
2367
|
}) }) : null,
|
|
2340
|
-
|
|
2341
|
-
attachments:
|
|
2368
|
+
o ? /* @__PURE__ */ D(ge, { children: /* @__PURE__ */ D(On, {
|
|
2369
|
+
attachments: ve,
|
|
2342
2370
|
onDownload: (e) => {
|
|
2343
2371
|
mn(e);
|
|
2344
2372
|
},
|
|
@@ -2346,145 +2374,146 @@ function pr({ instanceId: i, showAttachments: a = !0, showForm: ne = !0, showHis
|
|
|
2346
2374
|
hn(e);
|
|
2347
2375
|
}
|
|
2348
2376
|
}) }) : null,
|
|
2349
|
-
|
|
2350
|
-
adhocDirectives:
|
|
2351
|
-
currentMemberId:
|
|
2352
|
-
fill:
|
|
2353
|
-
instance:
|
|
2354
|
-
memberProfilesById:
|
|
2355
|
-
onChanged:
|
|
2377
|
+
d ? /* @__PURE__ */ D(ge, { children: /* @__PURE__ */ D(zn, {
|
|
2378
|
+
adhocDirectives: kt,
|
|
2379
|
+
currentMemberId: y,
|
|
2380
|
+
fill: Qt,
|
|
2381
|
+
instance: C,
|
|
2382
|
+
memberProfilesById: Xt,
|
|
2383
|
+
onChanged: Q,
|
|
2356
2384
|
onDecidingChange: ot,
|
|
2357
|
-
onFillApproveError:
|
|
2358
|
-
ref:
|
|
2385
|
+
onFillApproveError: tn,
|
|
2386
|
+
ref: z,
|
|
2359
2387
|
tasks: k
|
|
2360
2388
|
}) }) : null,
|
|
2361
|
-
|
|
2362
|
-
signatureVerification:
|
|
2363
|
-
signatures:
|
|
2389
|
+
u ? /* @__PURE__ */ D(ge, { children: /* @__PURE__ */ D(Un, {
|
|
2390
|
+
signatureVerification: De,
|
|
2391
|
+
signatures: be
|
|
2364
2392
|
}) }) : null,
|
|
2365
|
-
ce &&
|
|
2366
|
-
deliveries:
|
|
2367
|
-
onRetry:
|
|
2368
|
-
readNodeLabel: (e) =>
|
|
2393
|
+
ce && we.length > 0 ? /* @__PURE__ */ D(ge, { children: /* @__PURE__ */ D(nr, {
|
|
2394
|
+
deliveries: we,
|
|
2395
|
+
onRetry: dn,
|
|
2396
|
+
readNodeLabel: (e) => Lt(e, C?.workflowSnapshot ?? null)
|
|
2369
2397
|
}) }) : null,
|
|
2370
|
-
|
|
2371
|
-
activityLogs:
|
|
2372
|
-
formSchema:
|
|
2373
|
-
instanceState:
|
|
2374
|
-
memberProfilesById:
|
|
2375
|
-
signatureVerification:
|
|
2376
|
-
signaturesById:
|
|
2377
|
-
|
|
2398
|
+
l ? /* @__PURE__ */ D(ge, { children: /* @__PURE__ */ D(Qn, {
|
|
2399
|
+
activityLogs: ue,
|
|
2400
|
+
formSchema: Y,
|
|
2401
|
+
instanceState: C?.state ?? "RUNNING",
|
|
2402
|
+
memberProfilesById: Xt,
|
|
2403
|
+
signatureVerification: De,
|
|
2404
|
+
signaturesById: an,
|
|
2405
|
+
taskDecisions: w,
|
|
2406
|
+
taskDecisionsByTaskId: rn,
|
|
2378
2407
|
tasks: k,
|
|
2379
|
-
workflowSnapshot:
|
|
2380
|
-
workflowTokens:
|
|
2408
|
+
workflowSnapshot: C?.workflowSnapshot ?? null,
|
|
2409
|
+
workflowTokens: Le
|
|
2381
2410
|
}) }) : null
|
|
2382
2411
|
] }),
|
|
2383
|
-
|
|
2412
|
+
C ? /* @__PURE__ */ D(T, {
|
|
2384
2413
|
modalType: "standard",
|
|
2385
|
-
onClose: () =>
|
|
2386
|
-
open:
|
|
2414
|
+
onClose: () => dt(!1),
|
|
2415
|
+
open: ct,
|
|
2387
2416
|
showModalHeader: !0,
|
|
2388
2417
|
size: "wide",
|
|
2389
|
-
supportingText: `${
|
|
2418
|
+
supportingText: `${Pt(C.state)} · ${t(C.startedAt)}`,
|
|
2390
2419
|
title: "流程圖",
|
|
2391
|
-
children: /* @__PURE__ */
|
|
2392
|
-
style:
|
|
2393
|
-
children: [/* @__PURE__ */
|
|
2394
|
-
style:
|
|
2395
|
-
children: /* @__PURE__ */
|
|
2396
|
-
edges:
|
|
2420
|
+
children: /* @__PURE__ */ O("div", {
|
|
2421
|
+
style: fr,
|
|
2422
|
+
children: [/* @__PURE__ */ D("div", {
|
|
2423
|
+
style: pr,
|
|
2424
|
+
children: /* @__PURE__ */ O(ft, {
|
|
2425
|
+
edges: cn,
|
|
2397
2426
|
fitView: !0,
|
|
2398
2427
|
fitViewOptions: { padding: .18 },
|
|
2399
2428
|
maxZoom: 1.2,
|
|
2400
2429
|
minZoom: .2,
|
|
2401
|
-
nodes:
|
|
2430
|
+
nodes: sn,
|
|
2402
2431
|
nodesDraggable: !1,
|
|
2403
2432
|
nodesFocusable: !1,
|
|
2404
|
-
nodeTypes:
|
|
2433
|
+
nodeTypes: xr,
|
|
2405
2434
|
panOnDrag: !0,
|
|
2406
2435
|
proOptions: { hideAttribution: !0 },
|
|
2407
|
-
children: [/* @__PURE__ */
|
|
2436
|
+
children: [/* @__PURE__ */ D(lt, {}), /* @__PURE__ */ D(ut, { showInteractive: !1 })]
|
|
2408
2437
|
})
|
|
2409
|
-
}),
|
|
2410
|
-
style:
|
|
2411
|
-
children:
|
|
2412
|
-
style:
|
|
2438
|
+
}), ln.length > 0 ? /* @__PURE__ */ D("div", {
|
|
2439
|
+
style: vr,
|
|
2440
|
+
children: ln.map((e) => /* @__PURE__ */ D("span", {
|
|
2441
|
+
style: yr,
|
|
2413
2442
|
children: e
|
|
2414
2443
|
}, e))
|
|
2415
2444
|
}) : null]
|
|
2416
2445
|
})
|
|
2417
2446
|
}) : null,
|
|
2418
|
-
/* @__PURE__ */
|
|
2447
|
+
/* @__PURE__ */ D(T, {
|
|
2419
2448
|
modalType: "standard",
|
|
2420
2449
|
onClose: () => {
|
|
2421
|
-
|
|
2450
|
+
Tt(null), Ot(null);
|
|
2422
2451
|
},
|
|
2423
|
-
open: !!(
|
|
2452
|
+
open: !!(L && Et),
|
|
2424
2453
|
showModalHeader: !0,
|
|
2425
2454
|
size: "wide",
|
|
2426
|
-
supportingText:
|
|
2455
|
+
supportingText: L?.filename ?? void 0,
|
|
2427
2456
|
title: "PDF 預覽",
|
|
2428
|
-
children:
|
|
2429
|
-
filename:
|
|
2430
|
-
fileUrl:
|
|
2431
|
-
onDownload:
|
|
2457
|
+
children: Et ? /* @__PURE__ */ D(wt, {
|
|
2458
|
+
filename: L?.filename ?? "PDF 預覽",
|
|
2459
|
+
fileUrl: Et,
|
|
2460
|
+
onDownload: L ? () => void mn(L) : void 0
|
|
2432
2461
|
}) : null
|
|
2433
2462
|
}),
|
|
2434
|
-
/* @__PURE__ */
|
|
2463
|
+
/* @__PURE__ */ D(T, {
|
|
2435
2464
|
cancelText: "保留案件",
|
|
2436
2465
|
confirmButtonProps: { variant: "destructive-primary" },
|
|
2437
2466
|
confirmText: "確認取消",
|
|
2438
|
-
loading:
|
|
2467
|
+
loading: tt,
|
|
2439
2468
|
modalStatusType: "error",
|
|
2440
2469
|
modalType: "standard",
|
|
2441
|
-
onCancel: () =>
|
|
2442
|
-
onClose: () =>
|
|
2470
|
+
onCancel: () => ht(!1),
|
|
2471
|
+
onClose: () => ht(!1),
|
|
2443
2472
|
onConfirm: () => void gn(),
|
|
2444
|
-
open:
|
|
2473
|
+
open: mt,
|
|
2445
2474
|
showModalFooter: !0,
|
|
2446
2475
|
showModalHeader: !0,
|
|
2447
2476
|
supportingText: "取消後會關閉目前待簽任務與候選簽核人。",
|
|
2448
2477
|
title: "取消案件",
|
|
2449
|
-
children: /* @__PURE__ */
|
|
2450
|
-
style:
|
|
2451
|
-
children: [/* @__PURE__ */
|
|
2478
|
+
children: /* @__PURE__ */ O("div", {
|
|
2479
|
+
style: br,
|
|
2480
|
+
children: [/* @__PURE__ */ O(E, {
|
|
2452
2481
|
variant: "body",
|
|
2453
2482
|
children: [
|
|
2454
2483
|
"確定要取消「",
|
|
2455
|
-
|
|
2484
|
+
C?.title ?? "",
|
|
2456
2485
|
"」嗎?"
|
|
2457
2486
|
]
|
|
2458
|
-
}), /* @__PURE__ */
|
|
2487
|
+
}), /* @__PURE__ */ D(e, {
|
|
2459
2488
|
label: "取消原因",
|
|
2460
2489
|
name: "cancelComment",
|
|
2461
|
-
children: /* @__PURE__ */
|
|
2462
|
-
onChange: (e) =>
|
|
2490
|
+
children: /* @__PURE__ */ D(xe, {
|
|
2491
|
+
onChange: (e) => pt(e.target.value),
|
|
2463
2492
|
placeholder: "可填寫取消原因",
|
|
2464
2493
|
resize: "vertical",
|
|
2465
2494
|
rows: 3,
|
|
2466
|
-
value:
|
|
2495
|
+
value: P
|
|
2467
2496
|
})
|
|
2468
2497
|
})]
|
|
2469
2498
|
})
|
|
2470
2499
|
})
|
|
2471
2500
|
] });
|
|
2472
2501
|
}
|
|
2473
|
-
function
|
|
2502
|
+
function Cr(e) {
|
|
2474
2503
|
return e.data.label ? e.data.label : e.data.isDefault ? "其他情況" : e.data.condition ?? "";
|
|
2475
2504
|
}
|
|
2476
|
-
function
|
|
2477
|
-
return e.edges.map(
|
|
2505
|
+
function wr(e) {
|
|
2506
|
+
return e.edges.map(Cr).filter((e) => e.trim().length > 0);
|
|
2478
2507
|
}
|
|
2479
|
-
function
|
|
2508
|
+
function Tr(e) {
|
|
2480
2509
|
return e === "startEvent" ? "開始" : e === "endEvent" ? "完成" : e === "userTask" ? "簽核節點" : e === "serviceTask" ? "知會節點" : e === "exclusiveGateway" ? "條件分流" : "平行處理";
|
|
2481
2510
|
}
|
|
2482
|
-
function
|
|
2511
|
+
function Er(e, t, n, r) {
|
|
2483
2512
|
return e.nodes.map((e) => {
|
|
2484
|
-
let i =
|
|
2513
|
+
let i = _n(e, t, n, r);
|
|
2485
2514
|
return {
|
|
2486
2515
|
data: {
|
|
2487
|
-
kindLabel:
|
|
2516
|
+
kindLabel: Tr(e.type),
|
|
2488
2517
|
label: e.data.label,
|
|
2489
2518
|
secondaryLabel: i.secondaryLabel,
|
|
2490
2519
|
statusLabel: i.statusLabel,
|
|
@@ -2492,42 +2521,42 @@ function _r(e, t, n, r) {
|
|
|
2492
2521
|
},
|
|
2493
2522
|
id: e.id,
|
|
2494
2523
|
position: e.position,
|
|
2495
|
-
sourcePosition:
|
|
2496
|
-
targetPosition:
|
|
2524
|
+
sourcePosition: P.Right,
|
|
2525
|
+
targetPosition: P.Left,
|
|
2497
2526
|
type: "workflowRuntime"
|
|
2498
2527
|
};
|
|
2499
2528
|
});
|
|
2500
2529
|
}
|
|
2501
|
-
function
|
|
2502
|
-
let t = new
|
|
2530
|
+
function Dr(e) {
|
|
2531
|
+
let t = new pt.graphlib.Graph();
|
|
2503
2532
|
return t.setDefaultEdgeLabel(() => ({})), t.setGraph({
|
|
2504
2533
|
nodesep: 56,
|
|
2505
2534
|
rankdir: "LR",
|
|
2506
2535
|
ranksep: 120
|
|
2507
2536
|
}), e.nodes.forEach((e) => {
|
|
2508
2537
|
t.setNode(e.id, {
|
|
2509
|
-
height:
|
|
2510
|
-
width:
|
|
2538
|
+
height: dr,
|
|
2539
|
+
width: ur
|
|
2511
2540
|
});
|
|
2512
2541
|
}), e.edges.forEach((e) => {
|
|
2513
2542
|
t.setEdge(e.source, e.target);
|
|
2514
|
-
}),
|
|
2543
|
+
}), pt.layout(t), {
|
|
2515
2544
|
...e,
|
|
2516
2545
|
nodes: e.nodes.map((e) => {
|
|
2517
2546
|
let n = t.node(e.id);
|
|
2518
2547
|
return n ? {
|
|
2519
2548
|
...e,
|
|
2520
2549
|
position: {
|
|
2521
|
-
x: n.x -
|
|
2522
|
-
y: n.y -
|
|
2550
|
+
x: n.x - ur / 2,
|
|
2551
|
+
y: n.y - dr / 2
|
|
2523
2552
|
}
|
|
2524
2553
|
} : e;
|
|
2525
2554
|
})
|
|
2526
2555
|
};
|
|
2527
2556
|
}
|
|
2528
|
-
function
|
|
2557
|
+
function Or(e) {
|
|
2529
2558
|
return e.edges.map((e) => {
|
|
2530
|
-
let t =
|
|
2559
|
+
let t = Cr(e);
|
|
2531
2560
|
return {
|
|
2532
2561
|
animated: !1,
|
|
2533
2562
|
id: e.id,
|
|
@@ -2555,25 +2584,25 @@ function yr(e) {
|
|
|
2555
2584
|
};
|
|
2556
2585
|
});
|
|
2557
2586
|
}
|
|
2558
|
-
function
|
|
2587
|
+
function kr(e) {
|
|
2559
2588
|
return e === "current" ? {
|
|
2560
|
-
...
|
|
2589
|
+
...mr,
|
|
2561
2590
|
border: "1px solid var(--mzn-color-primary, #0057ff)",
|
|
2562
2591
|
boxShadow: "0 0 0 3px rgba(0, 87, 255, 0.14)"
|
|
2563
2592
|
} : e === "completed" ? {
|
|
2564
|
-
...
|
|
2593
|
+
...mr,
|
|
2565
2594
|
border: "1px solid #16a34a"
|
|
2566
2595
|
} : e === "cancelled" ? {
|
|
2567
|
-
...
|
|
2596
|
+
...mr,
|
|
2568
2597
|
border: "1px solid #dc2626",
|
|
2569
2598
|
opacity: .72
|
|
2570
2599
|
} : e === "waiting" ? {
|
|
2571
|
-
...
|
|
2600
|
+
...mr,
|
|
2572
2601
|
border: "1px dashed #64748b"
|
|
2573
|
-
} :
|
|
2602
|
+
} : mr;
|
|
2574
2603
|
}
|
|
2575
|
-
function
|
|
2576
|
-
let t =
|
|
2604
|
+
function Ar(e) {
|
|
2605
|
+
let t = hr;
|
|
2577
2606
|
return e === "current" ? {
|
|
2578
2607
|
...t,
|
|
2579
2608
|
background: "#eff6ff",
|
|
@@ -2596,42 +2625,41 @@ function xr(e) {
|
|
|
2596
2625
|
color: "#64748b"
|
|
2597
2626
|
};
|
|
2598
2627
|
}
|
|
2599
|
-
function
|
|
2600
|
-
return /* @__PURE__ */
|
|
2601
|
-
style:
|
|
2628
|
+
function jr({ data: e }) {
|
|
2629
|
+
return /* @__PURE__ */ O("div", {
|
|
2630
|
+
style: kr(e.tone),
|
|
2602
2631
|
children: [
|
|
2603
|
-
/* @__PURE__ */
|
|
2632
|
+
/* @__PURE__ */ D(dt, {
|
|
2604
2633
|
isConnectable: !1,
|
|
2605
|
-
position:
|
|
2606
|
-
style:
|
|
2634
|
+
position: P.Left,
|
|
2635
|
+
style: _r,
|
|
2607
2636
|
type: "target"
|
|
2608
2637
|
}),
|
|
2609
|
-
/* @__PURE__ */ E
|
|
2638
|
+
/* @__PURE__ */ D(E, {
|
|
2610
2639
|
component: "span",
|
|
2611
2640
|
ellipsis: !0,
|
|
2612
2641
|
title: e.label,
|
|
2613
2642
|
variant: "label-primary",
|
|
2614
2643
|
children: e.label
|
|
2615
2644
|
}),
|
|
2616
|
-
/* @__PURE__ */
|
|
2617
|
-
style:
|
|
2645
|
+
/* @__PURE__ */ D("span", {
|
|
2646
|
+
style: Ar(e.tone),
|
|
2618
2647
|
children: e.statusLabel
|
|
2619
2648
|
}),
|
|
2620
|
-
/* @__PURE__ */
|
|
2649
|
+
/* @__PURE__ */ D("span", {
|
|
2621
2650
|
title: e.secondaryLabel,
|
|
2622
|
-
style:
|
|
2651
|
+
style: gr,
|
|
2623
2652
|
children: e.secondaryLabel || e.kindLabel
|
|
2624
2653
|
}),
|
|
2625
|
-
/* @__PURE__ */
|
|
2654
|
+
/* @__PURE__ */ D(dt, {
|
|
2626
2655
|
isConnectable: !1,
|
|
2627
|
-
position:
|
|
2628
|
-
style:
|
|
2656
|
+
position: P.Right,
|
|
2657
|
+
style: _r,
|
|
2629
2658
|
type: "source"
|
|
2630
2659
|
})
|
|
2631
2660
|
]
|
|
2632
2661
|
});
|
|
2633
2662
|
}
|
|
2634
|
-
|
|
2635
|
-
export { An as a, Pn as i, qn as n, yn as o, Un as r, vn as s, pr as t };
|
|
2663
|
+
export { zn as a, Un as i, nr as n, On as o, Qn as r, En as s, Sr as t };
|
|
2636
2664
|
|
|
2637
|
-
//# sourceMappingURL=detail-
|
|
2665
|
+
//# sourceMappingURL=detail-C6XKZjlF.js.map
|