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