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