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