@rytass/bpm-core-react 0.22.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +84 -0
- package/README.md +1 -0
- package/dist/chunks/FormBuilderView-Bg9ftYz-.cjs +4 -0
- package/dist/chunks/FormBuilderView-Bg9ftYz-.cjs.map +1 -0
- package/dist/chunks/{FormBuilderView-DbfbLZCI.js → FormBuilderView-CBvdcg_t.js} +675 -614
- package/dist/chunks/FormBuilderView-CBvdcg_t.js.map +1 -0
- package/dist/chunks/FormRendererView-D-p6GDQB.cjs +6 -0
- package/dist/chunks/FormRendererView-D-p6GDQB.cjs.map +1 -0
- package/dist/chunks/FormRendererView-DHXmekC3.js +1319 -0
- package/dist/chunks/FormRendererView-DHXmekC3.js.map +1 -0
- package/dist/chunks/{approval-instance-list-page-Cv5I1YPX.cjs → approval-instance-list-page-BqkG9jiR.cjs} +2 -2
- package/dist/chunks/{approval-instance-list-page-Cv5I1YPX.cjs.map → approval-instance-list-page-BqkG9jiR.cjs.map} +1 -1
- package/dist/chunks/{approval-instance-list-page-BI5fIXc-.js → approval-instance-list-page-CsSpIN4C.js} +2 -2
- package/dist/chunks/{approval-instance-list-page-BI5fIXc-.js.map → approval-instance-list-page-CsSpIN4C.js.map} +1 -1
- package/dist/chunks/compose-B43jtdyL.cjs +2 -0
- package/dist/chunks/compose-B43jtdyL.cjs.map +1 -0
- package/dist/chunks/{compose-U1zs3Yof.js → compose-C7yS6bJm.js} +162 -148
- package/dist/chunks/compose-C7yS6bJm.js.map +1 -0
- package/dist/chunks/{dashboard-page-BoqNhjT_.js → dashboard-page-DBJCsPya.js} +2 -2
- package/dist/chunks/{dashboard-page-BoqNhjT_.js.map → dashboard-page-DBJCsPya.js.map} +1 -1
- package/dist/chunks/{dashboard-page-D7YJ3udk.cjs → dashboard-page-lqlLELKs.cjs} +2 -2
- package/dist/chunks/{dashboard-page-D7YJ3udk.cjs.map → dashboard-page-lqlLELKs.cjs.map} +1 -1
- package/dist/chunks/{designer-DPG7R_WP.js → designer-B9Ut4xze.js} +1786 -1463
- package/dist/chunks/designer-B9Ut4xze.js.map +1 -0
- package/dist/chunks/designer-eXw7R9ug.cjs +69 -0
- package/dist/chunks/designer-eXw7R9ug.cjs.map +1 -0
- package/dist/chunks/{detail-CHZDNNM6.js → detail-BB_uYaoM.js} +904 -896
- package/dist/chunks/detail-BB_uYaoM.js.map +1 -0
- package/dist/chunks/detail-DN8pEzUJ.cjs +5 -0
- package/dist/chunks/detail-DN8pEzUJ.cjs.map +1 -0
- package/dist/chunks/instance-error-message-BKt07-Bo.js +270 -0
- package/dist/chunks/instance-error-message-BKt07-Bo.js.map +1 -0
- package/dist/chunks/instance-error-message-BL_X7Af8.cjs +2 -0
- package/dist/chunks/instance-error-message-BL_X7Af8.cjs.map +1 -0
- package/dist/chunks/member-profile-resolution-CJlgVdTR.js +44 -0
- package/dist/chunks/member-profile-resolution-CJlgVdTR.js.map +1 -0
- package/dist/chunks/member-profile-resolution-DiH-P-Vh.cjs +2 -0
- package/dist/chunks/member-profile-resolution-DiH-P-Vh.cjs.map +1 -0
- package/dist/chunks/{providers-CQWekD7_.js → providers-D35lBOTd.js} +2 -2
- package/dist/chunks/{providers-CQWekD7_.js.map → providers-D35lBOTd.js.map} +1 -1
- package/dist/chunks/{providers-VUOh6i0i.cjs → providers-Dz4Wqxr6.cjs} +2 -2
- package/dist/chunks/{providers-VUOh6i0i.cjs.map → providers-Dz4Wqxr6.cjs.map} +1 -1
- package/dist/chunks/{routes-config-C1j_vFKo.cjs → routes-config-BWjZDAU3.cjs} +2 -2
- package/dist/chunks/{routes-config-C1j_vFKo.cjs.map → routes-config-BWjZDAU3.cjs.map} +1 -1
- package/dist/chunks/{routes-config-BcNaWJWJ.js → routes-config-DjEOE9eP.js} +3 -2
- package/dist/chunks/{routes-config-BcNaWJWJ.js.map → routes-config-DjEOE9eP.js.map} +1 -1
- package/dist/chunks/users-C_Dtw_sR.cjs +2 -0
- package/dist/chunks/users-C_Dtw_sR.cjs.map +1 -0
- package/dist/chunks/users-wgM3TqU3.js +513 -0
- package/dist/chunks/users-wgM3TqU3.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +4 -4
- package/dist/lib/routes-config.d.cts +2 -0
- package/dist/lib/routes-config.d.ts +2 -0
- package/dist/next/index.cjs +1 -1
- package/dist/next/index.js +2 -2
- package/dist/pages/admin/stuck-instances/index.cjs +2 -0
- package/dist/pages/admin/stuck-instances/index.cjs.map +1 -0
- package/dist/pages/admin/stuck-instances/index.d.cts +4 -0
- package/dist/pages/admin/stuck-instances/index.d.ts +4 -0
- package/dist/pages/admin/stuck-instances/index.js +13 -0
- package/dist/pages/admin/stuck-instances/index.js.map +1 -0
- package/dist/pages/admin/users/index.cjs +1 -1
- package/dist/pages/admin/users/index.js +1 -1
- package/dist/pages/instances/detail/index.cjs +1 -1
- package/dist/pages/instances/detail/index.js +1 -1
- package/dist/pages/templates/compose/index.cjs +1 -1
- package/dist/pages/templates/compose/index.js +1 -1
- package/dist/pages/templates/designer/index.cjs +1 -1
- package/dist/pages/templates/designer/index.js +1 -1
- package/dist/views/admin/index.cjs +1 -1
- package/dist/views/admin/index.d.cts +1 -0
- package/dist/views/admin/index.d.ts +1 -0
- package/dist/views/admin/index.js +3 -2
- package/dist/views/admin/stuck-instances/AdminStuckInstancesView.d.cts +10 -0
- package/dist/views/admin/stuck-instances/AdminStuckInstancesView.d.ts +10 -0
- package/dist/views/admin/stuck-instances/StuckInstanceCancelModal.d.cts +14 -0
- package/dist/views/admin/stuck-instances/StuckInstanceCancelModal.d.ts +14 -0
- package/dist/views/admin/stuck-instances/index.cjs +2 -0
- package/dist/views/admin/stuck-instances/index.cjs.map +1 -0
- package/dist/views/admin/stuck-instances/index.d.cts +2 -0
- package/dist/views/admin/stuck-instances/index.d.ts +2 -0
- package/dist/views/admin/stuck-instances/index.js +237 -0
- package/dist/views/admin/stuck-instances/index.js.map +1 -0
- package/dist/views/admin/users/index.cjs +1 -1
- package/dist/views/admin/users/index.js +1 -1
- package/dist/views/cc/index.cjs +1 -1
- package/dist/views/cc/index.js +1 -1
- package/dist/views/dashboard/index.cjs +1 -1
- package/dist/views/dashboard/index.js +1 -1
- package/dist/views/forms/builder/index.cjs +1 -1
- package/dist/views/forms/builder/index.js +1 -1
- package/dist/views/forms/renderer/FormRendererView.d.cts +26 -1
- package/dist/views/forms/renderer/FormRendererView.d.ts +26 -1
- package/dist/views/forms/renderer/index.cjs +1 -1
- package/dist/views/forms/renderer/index.js +1 -1
- package/dist/views/inbox/index.cjs +1 -1
- package/dist/views/inbox/index.js +1 -1
- package/dist/views/instances/approver-filled-form.d.cts +56 -20
- package/dist/views/instances/approver-filled-form.d.ts +56 -20
- package/dist/views/instances/detail/index.cjs +1 -1
- package/dist/views/instances/detail/index.js +1 -1
- package/dist/views/instances/detail/sections/InstanceFormSection.d.cts +7 -0
- package/dist/views/instances/detail/sections/InstanceFormSection.d.ts +7 -0
- package/dist/views/instances/detail/sections/InstanceTasksSection.d.cts +1 -1
- package/dist/views/instances/detail/sections/InstanceTasksSection.d.ts +1 -1
- package/dist/views/instances/new/index.cjs +1 -1
- package/dist/views/instances/new/index.js +5 -5
- 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/compose/index.cjs +1 -1
- package/dist/views/templates/compose/index.js +1 -1
- package/dist/views/templates/compose/steps/ComposeReviewStep.d.cts +3 -1
- package/dist/views/templates/compose/steps/ComposeReviewStep.d.ts +3 -1
- package/dist/views/templates/compose/steps/ComposeWorkflowStep.d.cts +4 -1
- package/dist/views/templates/compose/steps/ComposeWorkflowStep.d.ts +4 -1
- package/dist/views/templates/compose/use-template-compose-wizard.d.cts +3 -1
- package/dist/views/templates/compose/use-template-compose-wizard.d.ts +3 -1
- package/dist/views/templates/designer/TemplateDesignerView.d.cts +10 -1
- package/dist/views/templates/designer/TemplateDesignerView.d.ts +10 -1
- package/dist/views/templates/designer/approver-resolver-model.d.cts +31 -0
- package/dist/views/templates/designer/approver-resolver-model.d.ts +31 -0
- package/dist/views/templates/designer/field-access-matrix/FieldAccessMatrixDrawer.d.cts +3 -1
- package/dist/views/templates/designer/field-access-matrix/FieldAccessMatrixDrawer.d.ts +3 -1
- package/dist/views/templates/designer/field-access-matrix/field-access-copy.d.cts +3 -2
- package/dist/views/templates/designer/field-access-matrix/field-access-copy.d.ts +3 -2
- package/dist/views/templates/designer/index.cjs +1 -1
- package/dist/views/templates/designer/index.js +1 -1
- package/dist/views/templates/designer/launch-mode.d.cts +19 -0
- package/dist/views/templates/designer/launch-mode.d.ts +19 -0
- package/dist/views/templates/designer/node-actor-resolver-options.d.cts +30 -3
- package/dist/views/templates/designer/node-actor-resolver-options.d.ts +30 -3
- package/dist/views/templates/designer/publish-default-value-check.d.cts +36 -0
- package/dist/views/templates/designer/publish-default-value-check.d.ts +36 -0
- package/dist/views/templates/index.cjs +1 -1
- package/dist/views/templates/index.js +1 -1
- package/dist/views/templates/versions/index.cjs +1 -1
- package/dist/views/templates/versions/index.js +1 -1
- package/package.json +23 -3
- package/dist/chunks/FormBuilderView-Bok4Y59D.cjs +0 -4
- package/dist/chunks/FormBuilderView-Bok4Y59D.cjs.map +0 -1
- package/dist/chunks/FormBuilderView-DbfbLZCI.js.map +0 -1
- package/dist/chunks/FormRendererView-CAyPXhPq.js +0 -1351
- package/dist/chunks/FormRendererView-CAyPXhPq.js.map +0 -1
- package/dist/chunks/FormRendererView-iLlHFIUR.cjs +0 -6
- package/dist/chunks/FormRendererView-iLlHFIUR.cjs.map +0 -1
- package/dist/chunks/compose-DP1N4twA.cjs +0 -2
- package/dist/chunks/compose-DP1N4twA.cjs.map +0 -1
- package/dist/chunks/compose-U1zs3Yof.js.map +0 -1
- package/dist/chunks/designer-CWL-dCQ_.cjs +0 -69
- package/dist/chunks/designer-CWL-dCQ_.cjs.map +0 -1
- package/dist/chunks/designer-DPG7R_WP.js.map +0 -1
- package/dist/chunks/detail-BUfsSal0.cjs +0 -5
- package/dist/chunks/detail-BUfsSal0.cjs.map +0 -1
- package/dist/chunks/detail-CHZDNNM6.js.map +0 -1
- package/dist/chunks/instance-error-message-BEM4O_Kj.js +0 -208
- package/dist/chunks/instance-error-message-BEM4O_Kj.js.map +0 -1
- package/dist/chunks/instance-error-message-BpCLCOjp.cjs +0 -2
- package/dist/chunks/instance-error-message-BpCLCOjp.cjs.map +0 -1
- package/dist/chunks/users-BBtiZ9QQ.js +0 -486
- package/dist/chunks/users-BBtiZ9QQ.js.map +0 -1
- package/dist/chunks/users-EqSzDhuj.cjs +0 -2
- package/dist/chunks/users-EqSzDhuj.cjs.map +0 -1
package/dist/next/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../chunks/providers-
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../chunks/providers-Dz4Wqxr6.cjs"),t=require("../chunks/router-adapter--gYs13E8.cjs"),n=require("../chunks/routes-config-BWjZDAU3.cjs");let r=require("react"),i=require("react/jsx-runtime"),a=require("next/navigation");function o({children:n,locale:o,language:s,organizationTimeZone:c,publicPaths:l,loginPath:u}){let d=(0,a.useRouter)(),f=(0,a.usePathname)(),p=(0,r.useMemo)(()=>({pathname:f,push:e=>d.push(e),replace:e=>d.replace(e),back:()=>d.back(),searchParams:()=>t.n()}),[d,f]);return(0,i.jsx)(t.t,{value:p,children:(0,i.jsx)(e.t,{locale:o,language:s,organizationTimeZone:c,publicPaths:l,loginPath:u,children:n})})}exports.BPMNextProviders=o,exports.BPMRoutesProvider=n.t,exports.createDefaultBPMRoutes=n.n,exports.useBPMRoutes=n.r;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/next/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "../chunks/providers-
|
|
2
|
+
import { t as e } from "../chunks/providers-D35lBOTd.js";
|
|
3
3
|
import { n as t, t as n } from "../chunks/router-adapter-CkxCyzf5.js";
|
|
4
|
-
import { n as r, r as i, t as a } from "../chunks/routes-config-
|
|
4
|
+
import { n as r, r as i, t as a } from "../chunks/routes-config-DjEOE9eP.js";
|
|
5
5
|
import { useMemo as o } from "react";
|
|
6
6
|
import { jsx as s } from "react/jsx-runtime";
|
|
7
7
|
import { usePathname as c, useRouter as l } from "next/navigation";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../views/admin/stuck-instances/index.cjs");let t=require("react/jsx-runtime");var n={title:`卡住的案件 | BPM Admin`,description:`列出往下一關失敗而停住的案件,管理員可撤銷。`};function r(){return(0,t.jsx)(e.AdminStuckInstancesView,{})}exports.default=r,exports.metadata=n;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["AdminStuckInstancesView","require_views_admin_stuck_instances_index","react_jsx_runtime","metadata","AdminStuckInstancesPage"],"sources":["../../../../src/pages/admin/stuck-instances/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { AdminStuckInstancesView } from '../../../views/admin/stuck-instances';\n\nexport const metadata: Metadata = {\n title: '卡住的案件 | BPM Admin',\n description: '列出往下一關失敗而停住的案件,管理員可撤銷。',\n};\n\nexport default function AdminStuckInstancesPage(): ReactElement {\n return <AdminStuckInstancesView />;\n}\n"],"mappings":"A,oMAIA,IAAaG,EAAqB,CAChC,MAAO,oBACP,YAAa,wBACf,EAEA,SAAwBC,GAAwC,CAC9D,OAAO,EAAAF,EAAA,IAAA,CAACF,EAAAA,wBAAD,CAA0B,CAAA,CACnC,C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AdminStuckInstancesView as e } from "../../../views/admin/stuck-instances/index.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
// src/pages/admin/stuck-instances/index.tsx
|
|
4
|
+
var n = {
|
|
5
|
+
title: "卡住的案件 | BPM Admin",
|
|
6
|
+
description: "列出往下一關失敗而停住的案件,管理員可撤銷。"
|
|
7
|
+
};
|
|
8
|
+
function r() {
|
|
9
|
+
return /* @__PURE__ */ t(e, {});
|
|
10
|
+
}
|
|
11
|
+
export { r as default, n as metadata };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["metadata","AdminStuckInstancesPage","AdminStuckInstancesView"],"sources":["../../../../src/pages/admin/stuck-instances/index.tsx"],"sourcesContent":["import type { Metadata } from 'next';\nimport type { ReactElement } from 'react';\nimport { AdminStuckInstancesView } from '../../../views/admin/stuck-instances';\n\nexport const metadata: Metadata = {\n title: '卡住的案件 | BPM Admin',\n description: '列出往下一關失敗而停住的案件,管理員可撤銷。',\n};\n\nexport default function AdminStuckInstancesPage(): ReactElement {\n return <AdminStuckInstancesView />;\n}\n"],"mappings":";;;AAIA,IAAaA,IAAqB;CAChC,OAAO;CACP,aAAa;AACf;AAEA,SAAwBC,IAAwC;CAC9D,OAAO,kBAACC,GAAD,CAA0B,CAAA;AACnC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/users-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/users-C_Dtw_sR.cjs");let t=require("react/jsx-runtime");var n={title:`會員對照 | BPM Admin`,description:`檢視 BPM 內部會員組織歸屬與主管解析。`};function r(){return(0,t.jsx)(e.t,{})}exports.default=r,exports.metadata=n;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/detail-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/detail-DN8pEzUJ.cjs");let t=require("react/jsx-runtime");var n={title:`案件詳情 | BPM Admin`};async function r({params:n}){let{id:r}=await n;return(0,t.jsx)(e.t,{instanceId:r})}exports.default=r,exports.metadata=n;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/compose-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/compose-B43jtdyL.cjs");let t=require("react/jsx-runtime"),n=require("next/server");var r={title:`建立模板(表單 + 流程) | BPM Admin`,description:`以精靈式流程一次完成 BPM 表單與簽核流程設計並發佈。`};async function i(){return await(0,n.connection)(),(0,t.jsx)(e.t,{aiAssistantAvailable:!!process.env.OPENAI_API_KEY,showAiAssistant:process.env.BPM_AI_ASSISTANT_ENABLED===`true`})}exports.default=i,exports.metadata=r;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/designer-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../../../chunks/designer-eXw7R9ug.cjs");let t=require("react/jsx-runtime");var n={title:`流程設計器 | BPM Admin`,description:`以視覺化設計器編輯 BPM 簽核流程節點、條件與發佈版本。`};async function r({params:n}){let{id:r}=await n;return(0,t.jsx)(e.t,{aiAssistantAvailable:!!process.env.OPENAI_API_KEY,showAiAssistant:process.env.BPM_AI_ASSISTANT_ENABLED===`true`,showDryRun:process.env.BPM_TEMPLATE_DRY_RUN_ENABLED!==`false`,templateId:r})}exports.default=r,exports.metadata=n;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/users-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/users-C_Dtw_sR.cjs"),t=require("../../chunks/orgs-B_2J2tLX.cjs"),n=require("../../chunks/delegations-ClRCwD1I.cjs"),r=require("./webhook-endpoints/index.cjs"),i=require("./stuck-instances/index.cjs");exports.AdminDelegationsView=n.t,exports.AdminOrgsView=t.t,exports.AdminStuckInstancesView=i.AdminStuckInstancesView,exports.AdminUsersView=e.t,exports.AdminWebhookEndpointsView=r.AdminWebhookEndpointsView,exports.StuckInstanceCancelModal=i.StuckInstanceCancelModal;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { t as e } from "../../chunks/users-
|
|
1
|
+
import { t as e } from "../../chunks/users-wgM3TqU3.js";
|
|
2
2
|
import { t } from "../../chunks/orgs-DqxMds26.js";
|
|
3
3
|
import { t as n } from "../../chunks/delegations-zisffLwk.js";
|
|
4
4
|
import { AdminWebhookEndpointsView as r } from "./webhook-endpoints/index.js";
|
|
5
|
-
|
|
5
|
+
import { AdminStuckInstancesView as i, StuckInstanceCancelModal as a } from "./stuck-instances/index.js";
|
|
6
|
+
export { n as AdminDelegationsView, t as AdminOrgsView, i as AdminStuckInstancesView, e as AdminUsersView, r as AdminWebhookEndpointsView, a as StuckInstanceCancelModal };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Administrator list of approval instances that could not move on to their
|
|
4
|
+
* next stage (the next approver could not be resolved, say) and still cannot.
|
|
5
|
+
* Each row names where it stuck, who pressed last, who has to press again, and
|
|
6
|
+
* why. The only action is cancelling the instance; fixing the cause and having
|
|
7
|
+
* the listed person press again clears the row by itself. Administrator-only on
|
|
8
|
+
* the server.
|
|
9
|
+
*/
|
|
10
|
+
export declare function AdminStuckInstancesView(): ReactElement;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Administrator list of approval instances that could not move on to their
|
|
4
|
+
* next stage (the next approver could not be resolved, say) and still cannot.
|
|
5
|
+
* Each row names where it stuck, who pressed last, who has to press again, and
|
|
6
|
+
* why. The only action is cancelling the instance; fixing the cause and having
|
|
7
|
+
* the listed person press again clears the row by itself. Administrator-only on
|
|
8
|
+
* the server.
|
|
9
|
+
*/
|
|
10
|
+
export declare function AdminStuckInstancesView(): ReactElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { StuckApprovalInstanceRecord } from '@rytass/bpm-core-client/workflow';
|
|
3
|
+
/**
|
|
4
|
+
* Administrator cancellation of one stuck approval instance. The reason is
|
|
5
|
+
* required (trimmed) and goes to the applicant as an in-app notification, so
|
|
6
|
+
* the window says so before the administrator confirms. Cancelling cannot be
|
|
7
|
+
* undone.
|
|
8
|
+
*/
|
|
9
|
+
export declare function StuckInstanceCancelModal({ instance, onCancelled, onClose, }: {
|
|
10
|
+
readonly instance: StuckApprovalInstanceRecord | null;
|
|
11
|
+
/** The cancellation went through; the host closes the window and reloads. */
|
|
12
|
+
readonly onCancelled: () => void;
|
|
13
|
+
readonly onClose: () => void;
|
|
14
|
+
}): ReactElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { StuckApprovalInstanceRecord } from '@rytass/bpm-core-client/workflow';
|
|
3
|
+
/**
|
|
4
|
+
* Administrator cancellation of one stuck approval instance. The reason is
|
|
5
|
+
* required (trimmed) and goes to the applicant as an in-app notification, so
|
|
6
|
+
* the window says so before the administrator confirms. Cancelling cannot be
|
|
7
|
+
* undone.
|
|
8
|
+
*/
|
|
9
|
+
export declare function StuckInstanceCancelModal({ instance, onCancelled, onClose, }: {
|
|
10
|
+
readonly instance: StuckApprovalInstanceRecord | null;
|
|
11
|
+
/** The cancellation went through; the host closes the window and reloads. */
|
|
12
|
+
readonly onCancelled: () => void;
|
|
13
|
+
readonly onClose: () => void;
|
|
14
|
+
}): ReactElement;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../chunks/rolldown-runtime-BocRIvOZ.cjs"),t=require("../../../chunks/format-date-time-D-cx5M8z.cjs"),n=require("../../../chunks/member-profile-resolution-DiH-P-Vh.cjs"),r=require("../../../chunks/bpm-form-field-Bc6k4ZEO.cjs");let i=require("react"),a=require("@mezzanine-ui/react"),o=require("@rytass/bpm-core-client"),s=require("react/jsx-runtime"),c=require("@rytass/bpm-core-client/workflow"),l=require("@mezzanine-ui/react/ContentHeader");l=e.t(l,1);function u({instance:e,onCancelled:t,onClose:n}){let[o,l]=(0,i.useState)(``),[u,p]=(0,i.useState)(!1),m=(0,i.useRef)(!1),[h,g]=(0,i.useState)(null),_=o.trim(),v=e?.instanceId??null;(0,i.useEffect)(()=>{l(``),g(null),p(!1),m.current=!1},[v]);let y=()=>{u||n()};async function b(){if(!e||!_||m.current)return;m.current=!0,p(!0),g(null);let n=await(0,c.adminCancelApprovalInstance)({instanceId:e.instanceId,reason:_}).then(()=>!0,e=>(g(f(e)),!1));m.current=!1,p(!1),n&&t()}return(0,s.jsx)(a.Modal,{cancelText:`取消`,confirmButtonProps:{disabled:!_||u},confirmText:`確認撤銷`,loading:u,modalType:`standard`,onCancel:y,onClose:y,onConfirm:()=>{b()},open:!!e,showModalFooter:!0,showModalHeader:!0,size:`regular`,title:`撤銷卡住的案件`,children:e?(0,s.jsxs)(`div`,{style:d,children:[(0,s.jsxs)(a.Typography,{variant:`body`,children:[`案件:`,e.instanceTitle]}),(0,s.jsx)(a.Typography,{color:`text-neutral`,variant:`body`,children:`撤銷後無法復原。申請人會收到站內通知,內容含撤銷理由。`}),h?(0,s.jsx)(a.Typography,{color:`text-error`,variant:`body`,children:h}):null,(0,s.jsx)(r.t,{label:`撤銷理由(必填)`,name:`stuckCancelReason`,children:(0,s.jsx)(a.Input,{...u?{disabled:!0}:{},fullWidth:!0,name:`stuckCancelReason`,onChange:e=>{l(e.target.value)},placeholder:`例如:下一關簽核人設定有誤,請重新送單`,value:o})})]}):null})}var d={display:`grid`,gap:16};function f(e){return e instanceof Error?e.message:`撤銷案件失敗。`}var p={display:`grid`,gap:12},m=[10,20,50];function h(){let[e,r]=(0,i.useState)([]),[d,f]=(0,i.useState)(new Map),[h,y]=(0,i.useState)(!0),[b,x]=(0,i.useState)(null),[S,C]=(0,i.useState)(null),[w,T]=(0,i.useState)(1),[E,D]=(0,i.useState)(20),[O,k]=(0,i.useState)(0),A=(0,i.useRef)(0),j=(0,i.useCallback)(async()=>{let e=A.current+1;A.current=e,y(!0);try{let{instances:t,totalCount:i}=await(0,c.listStuckApprovalInstancesPage)({page:w,pageSize:E});if(t.length===0&&w>1&&i>0){A.current===e&&T(Math.ceil(i/E));return}let a=await n.n(g(t),o.resolveMembers);if(A.current!==e)return;r(t),k(i),f(new Map(a.profiles.map(e=>[e.memberId,e]))),x(null)}catch(t){A.current===e&&(r([]),f(new Map),x(v(t)))}finally{A.current===e&&y(!1)}},[w,E]);(0,i.useEffect)(()=>{j()},[j]);let M=(0,i.useMemo)(()=>e.map(e=>({instance:e,key:e.instanceId})),[e]),N=(0,i.useMemo)(()=>[{key:`instanceTitle`,render:({instance:e})=>e.instanceTitle,title:`案件`,width:220},{key:`templateName`,render:({instance:e})=>e.templateName??`-`,title:`範本`,width:160},{key:`stuckAt`,render:({instance:e})=>e.kind===`RESUBMIT`?`退件後重送`:e.nodeLabel??`-`,title:`卡在哪一關`,width:160},{key:`failedActor`,render:({instance:e})=>e.automatic===`SLA_AUTO_APPROVE`?`系統逾時自動同意`:_(e.failedActorMemberId,d),title:`上次失敗的人`,width:160},{key:`pendingActors`,render:({instance:e})=>e.pendingActorMemberIds.length?e.pendingActorMemberIds.map(e=>_(e,d)).join(`、`):`目前沒有人能按`,title:`現在該重按的人`,width:180},{key:`message`,render:({instance:e})=>e.message,title:`原因`,width:260},{key:`failedAt`,render:({instance:e})=>t.t(e.failedAt),title:`時間`,width:180}],[d]),P=(0,i.useMemo)(()=>({render:({instance:e})=>[{name:`撤銷`,onClick:()=>C(e)}],variant:`base-secondary`,width:100}),[]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.PageHeader,{children:(0,s.jsx)(l.default,{description:`往下一關失敗、至今仍停在原處的案件。排除原因後由「現在該重按的人」再按一次即可;無法處理時可撤銷。`,title:`卡住的案件`})}),(0,s.jsx)(a.SectionGroup,{children:(0,s.jsx)(a.Section,{children:(0,s.jsxs)(`div`,{style:p,children:[b?(0,s.jsx)(a.Typography,{color:`text-error`,variant:`body`,children:b}):null,!h&&!b&&e.length===0?(0,s.jsx)(a.Typography,{color:`text-neutral`,variant:`body`,children:`目前沒有卡住的案件`}):null,h||e.length?(0,s.jsx)(a.Table,{actions:P,columns:N,dataSource:M,fullWidth:!0,loading:h,pagination:{current:w,onChange:e=>{T(e)},onChangePageSize:e=>{T(1),D(e)},pageSize:E,pageSizeLabel:`每頁筆數`,pageSizeOptions:m,renderResultSummary:(e,t,n)=>`顯示 ${e}-${t} 筆,共 ${n} 筆`,showPageSizeOptions:!0,total:O}}):null]})})}),(0,s.jsx)(u,{instance:S,onCancelled:()=>{C(null),j()},onClose:()=>C(null)})]})}function g(e){return[...new Set(e.flatMap(e=>[...e.failedActorMemberId?[e.failedActorMemberId]:[],...e.pendingActorMemberIds]))]}function _(e,t){return e?t.get(e)?.name??e:`-`}function v(e){return e instanceof Error?e.message:`載入卡住的案件失敗。`}exports.AdminStuckInstancesView=h,exports.StuckInstanceCancelModal=u;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["useState","useRef","adminCancelApprovalInstance","readErrorMessage","Modal","Typography","BPMFormField","Input","useState","useRef","useCallback","listStuckApprovalInstancesPage","resolveMemberProfilesPerIdOnFailure","resolveMembers","useMemo","formatDateTime","_Fragment","PageHeader","ContentHeader","SectionGroup","Section","Typography","Table","require_rolldown_runtime","require_format_date_time","require_member_profile_resolution","require_bpm_form_field","react","_mezzanine_ui_react","_rytass_bpm_core_client","react_jsx_runtime","_rytass_bpm_core_client_workflow","_mezzanine_ui_react_ContentHeader","StuckInstanceCancelModal","reason","setReason","busy","setBusy","busyRef","error","setError","trimmedReason","instanceId","instance","handleClose","onClose","handleConfirm","succeeded","readErrorMessage$1","requestError","onCancelled","BODY_STYLE","event","STACK_STYLE","PAGE_SIZE_OPTIONS","AdminStuckInstancesView","instances","setInstances","profilesById","setProfilesById","loading","setLoading","cancelTarget","setCancelTarget","page","setPage","pageSize","setPageSize","totalCount","setTotalCount","latestRequestRef","refresh","request","loaded","total","resolution","readMemberIds","profile","readErrorMessage","rows","columns","readMemberText","memberId","actions","nextPage","nextPageSize","from","to"],"sources":["../../../../src/views/admin/stuck-instances/StuckInstanceCancelModal.tsx","../../../../src/views/admin/stuck-instances/AdminStuckInstancesView.tsx"],"sourcesContent":["'use client';\n\nimport { ChangeEvent, ReactElement, useEffect, useRef, useState } from 'react';\nimport { Input, Modal, Typography } from '@mezzanine-ui/react';\nimport {\n adminCancelApprovalInstance,\n type StuckApprovalInstanceRecord,\n} from '@rytass/bpm-core-client/workflow';\nimport { BPMFormField } from '../../../components/bpm-form-field';\n\n/**\n * Administrator cancellation of one stuck approval instance. The reason is\n * required (trimmed) and goes to the applicant as an in-app notification, so\n * the window says so before the administrator confirms. Cancelling cannot be\n * undone.\n */\nexport function StuckInstanceCancelModal({\n instance,\n onCancelled,\n onClose,\n}: {\n readonly instance: StuckApprovalInstanceRecord | null;\n /** The cancellation went through; the host closes the window and reloads. */\n readonly onCancelled: () => void;\n readonly onClose: () => void;\n}): ReactElement {\n const [reason, setReason] = useState('');\n const [busy, setBusy] = useState(false);\n // `busy` only reaches the handler after a re-render; a second press that\n // lands before it would send a second cancellation.\n const busyRef = useRef(false);\n const [error, setError] = useState<string | null>(null);\n\n const trimmedReason = reason.trim();\n\n // A different instance starts from a blank window.\n const instanceId = instance?.instanceId ?? null;\n\n useEffect((): void => {\n setReason('');\n setError(null);\n setBusy(false);\n busyRef.current = false;\n }, [instanceId]);\n\n // While the request is in flight every close path is a no-op: the cancel\n // button, Esc, the backdrop and the corner X all end up here.\n const handleClose = (): void => {\n if (busy) {\n return;\n }\n\n onClose();\n };\n\n async function handleConfirm(): Promise<void> {\n if (!instance || !trimmedReason || busyRef.current) {\n return;\n }\n\n busyRef.current = true;\n setBusy(true);\n setError(null);\n\n const succeeded = await adminCancelApprovalInstance({\n instanceId: instance.instanceId,\n reason: trimmedReason,\n }).then(\n (): boolean => true,\n (requestError: unknown): boolean => {\n setError(readErrorMessage(requestError));\n\n return false;\n },\n );\n\n busyRef.current = false;\n setBusy(false);\n\n if (succeeded) {\n onCancelled();\n }\n }\n\n return (\n <Modal\n cancelText=\"取消\"\n confirmButtonProps={{ disabled: !trimmedReason || busy }}\n confirmText=\"確認撤銷\"\n loading={busy}\n modalType=\"standard\"\n onCancel={handleClose}\n onClose={handleClose}\n onConfirm={(): void => {\n void handleConfirm();\n }}\n open={Boolean(instance)}\n showModalFooter\n showModalHeader\n size=\"regular\"\n title=\"撤銷卡住的案件\"\n >\n {instance ? (\n <div style={BODY_STYLE}>\n <Typography variant=\"body\">案件:{instance.instanceTitle}</Typography>\n <Typography color=\"text-neutral\" variant=\"body\">\n 撤銷後無法復原。申請人會收到站內通知,內容含撤銷理由。\n </Typography>\n {error ? (\n <Typography color=\"text-error\" variant=\"body\">\n {error}\n </Typography>\n ) : null}\n <BPMFormField label=\"撤銷理由(必填)\" name=\"stuckCancelReason\">\n <Input\n {...(busy ? { disabled: true as const } : {})}\n fullWidth\n name=\"stuckCancelReason\"\n onChange={(event: ChangeEvent<HTMLInputElement>): void => {\n setReason(event.target.value);\n }}\n placeholder=\"例如:下一關簽核人設定有誤,請重新送單\"\n value={reason}\n />\n </BPMFormField>\n </div>\n ) : null}\n </Modal>\n );\n}\n\nconst BODY_STYLE = {\n display: 'grid',\n gap: 16,\n} as const;\n\nfunction readErrorMessage(error: unknown): string {\n return error instanceof Error ? error.message : '撤銷案件失敗。';\n}\n","'use client';\n\nimport {\n CSSProperties,\n ReactElement,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n PageHeader,\n Section,\n SectionGroup,\n Table,\n Typography,\n} from '@mezzanine-ui/react';\nimport ContentHeader from '@mezzanine-ui/react/ContentHeader';\nimport type { TableActions, TableColumn } from '@mezzanine-ui/core/table';\nimport { resolveMembers } from '@rytass/bpm-core-client';\nimport type { MemberProfileRecord } from '@rytass/bpm-core-client/template';\nimport {\n listStuckApprovalInstancesPage,\n type StuckApprovalInstanceRecord,\n} from '@rytass/bpm-core-client/workflow';\nimport { formatDateTime } from '../../../lib/format-date-time';\nimport { resolveMemberProfilesPerIdOnFailure } from '../../../lib/member-profile-resolution';\nimport { StuckInstanceCancelModal } from './StuckInstanceCancelModal';\n\ntype StuckRow = Readonly<\n Record<string, unknown> & {\n instance: StuckApprovalInstanceRecord;\n key: string;\n }\n>;\n\nconst STACK_STYLE: CSSProperties = { display: 'grid', gap: 12 };\n\nconst PAGE_SIZE_OPTIONS = [10, 20, 50];\n\n/**\n * Administrator list of approval instances that could not move on to their\n * next stage (the next approver could not be resolved, say) and still cannot.\n * Each row names where it stuck, who pressed last, who has to press again, and\n * why. The only action is cancelling the instance; fixing the cause and having\n * the listed person press again clears the row by itself. Administrator-only on\n * the server.\n */\nexport function AdminStuckInstancesView(): ReactElement {\n const [instances, setInstances] = useState<\n readonly StuckApprovalInstanceRecord[]\n >([]);\n const [profilesById, setProfilesById] = useState<\n ReadonlyMap<string, MemberProfileRecord>\n >(new Map());\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState<string | null>(null);\n const [cancelTarget, setCancelTarget] =\n useState<StuckApprovalInstanceRecord | null>(null);\n const [page, setPage] = useState(1);\n const [pageSize, setPageSize] = useState(20);\n const [totalCount, setTotalCount] = useState(0);\n\n // Only the latest listing may write, so a slow earlier answer cannot replace\n // the list that a cancellation just reloaded.\n const latestRequestRef = useRef(0);\n\n const refresh = useCallback(async (): Promise<void> => {\n const request = latestRequestRef.current + 1;\n\n latestRequestRef.current = request;\n setLoading(true);\n\n try {\n const { instances: loaded, totalCount: total } =\n await listStuckApprovalInstancesPage({ page, pageSize });\n\n // A cancellation can empty the last page: step back to the new last one,\n // whose load replaces this answer.\n if (loaded.length === 0 && page > 1 && total > 0) {\n if (latestRequestRef.current === request) {\n setPage(Math.ceil(total / pageSize));\n }\n\n return;\n }\n\n const resolution = await resolveMemberProfilesPerIdOnFailure(\n readMemberIds(loaded),\n resolveMembers,\n );\n\n if (latestRequestRef.current !== request) {\n return;\n }\n\n // Ids that cannot be resolved stay out of the map and show as the raw id.\n setInstances(loaded);\n setTotalCount(total);\n setProfilesById(\n new Map(\n resolution.profiles.map((profile) => [profile.memberId, profile]),\n ),\n );\n setError(null);\n } catch (requestError: unknown) {\n if (latestRequestRef.current === request) {\n // The table already shows the page asked for; rows of the page left\n // behind must not stand under that number.\n setInstances([]);\n setProfilesById(new Map());\n setError(readErrorMessage(requestError));\n }\n } finally {\n if (latestRequestRef.current === request) {\n setLoading(false);\n }\n }\n }, [page, pageSize]);\n\n useEffect((): void => {\n void refresh();\n }, [refresh]);\n\n const rows = useMemo(\n (): StuckRow[] =>\n instances.map((instance) => ({ instance, key: instance.instanceId })),\n [instances],\n );\n\n const columns = useMemo(\n (): TableColumn<StuckRow>[] => [\n {\n key: 'instanceTitle',\n render: ({ instance }: StuckRow): string => instance.instanceTitle,\n title: '案件',\n width: 220,\n },\n {\n key: 'templateName',\n render: ({ instance }: StuckRow): string =>\n instance.templateName ?? '-',\n title: '範本',\n width: 160,\n },\n {\n key: 'stuckAt',\n render: ({ instance }: StuckRow): string =>\n instance.kind === 'RESUBMIT'\n ? '退件後重送'\n : (instance.nodeLabel ?? '-'),\n title: '卡在哪一關',\n width: 160,\n },\n {\n key: 'failedActor',\n render: ({ instance }: StuckRow): string =>\n instance.automatic === 'SLA_AUTO_APPROVE'\n ? '系統逾時自動同意'\n : readMemberText(instance.failedActorMemberId, profilesById),\n title: '上次失敗的人',\n width: 160,\n },\n {\n key: 'pendingActors',\n render: ({ instance }: StuckRow): string =>\n instance.pendingActorMemberIds.length\n ? instance.pendingActorMemberIds\n .map((memberId) => readMemberText(memberId, profilesById))\n .join('、')\n : '目前沒有人能按',\n title: '現在該重按的人',\n width: 180,\n },\n {\n key: 'message',\n render: ({ instance }: StuckRow): string => instance.message,\n title: '原因',\n width: 260,\n },\n {\n key: 'failedAt',\n render: ({ instance }: StuckRow): string =>\n formatDateTime(instance.failedAt),\n title: '時間',\n width: 180,\n },\n ],\n [profilesById],\n );\n\n const actions = useMemo(\n (): TableActions<StuckRow> => ({\n render: ({\n instance,\n }): ReturnType<TableActions<StuckRow>['render']> => [\n {\n name: '撤銷',\n onClick: (): void => setCancelTarget(instance),\n },\n ],\n variant: 'base-secondary',\n width: 100,\n }),\n [],\n );\n\n return (\n <>\n <PageHeader>\n <ContentHeader\n description=\"往下一關失敗、至今仍停在原處的案件。排除原因後由「現在該重按的人」再按一次即可;無法處理時可撤銷。\"\n title=\"卡住的案件\"\n />\n </PageHeader>\n\n <SectionGroup>\n <Section>\n <div style={STACK_STYLE}>\n {error ? (\n <Typography color=\"text-error\" variant=\"body\">\n {error}\n </Typography>\n ) : null}\n {!loading && !error && instances.length === 0 ? (\n <Typography color=\"text-neutral\" variant=\"body\">\n 目前沒有卡住的案件\n </Typography>\n ) : null}\n {loading || instances.length ? (\n <Table\n actions={actions}\n columns={columns}\n dataSource={rows}\n fullWidth\n loading={loading}\n pagination={{\n current: page,\n onChange: (nextPage): void => {\n setPage(nextPage);\n },\n onChangePageSize: (nextPageSize): void => {\n setPage(1);\n setPageSize(nextPageSize);\n },\n pageSize,\n pageSizeLabel: '每頁筆數',\n pageSizeOptions: PAGE_SIZE_OPTIONS,\n renderResultSummary: (from, to, total): string =>\n `顯示 ${from}-${to} 筆,共 ${total} 筆`,\n showPageSizeOptions: true,\n total: totalCount,\n }}\n />\n ) : null}\n </div>\n </Section>\n </SectionGroup>\n\n <StuckInstanceCancelModal\n instance={cancelTarget}\n onCancelled={(): void => {\n setCancelTarget(null);\n void refresh();\n }}\n onClose={(): void => setCancelTarget(null)}\n />\n </>\n );\n}\n\nfunction readMemberIds(\n instances: readonly StuckApprovalInstanceRecord[],\n): readonly string[] {\n return [\n ...new Set(\n instances.flatMap((instance): readonly string[] => [\n ...(instance.failedActorMemberId ? [instance.failedActorMemberId] : []),\n ...instance.pendingActorMemberIds,\n ]),\n ),\n ];\n}\n\nfunction readMemberText(\n memberId: string | null,\n profilesById: ReadonlyMap<string, MemberProfileRecord>,\n): string {\n if (!memberId) {\n return '-';\n }\n\n return profilesById.get(memberId)?.name ?? memberId;\n}\n\nfunction readErrorMessage(error: unknown): string {\n return error instanceof Error ? error.message : '載入卡住的案件失敗。';\n}\n"],"mappings":"A,6iBAgBA,SAAgBiC,EAAyB,CACvC,WACA,cACA,WAMe,CACf,GAAM,CAACC,EAAQC,IAAA,EAAanC,EAAAA,SAAAA,CAAS,EAAE,EACjC,CAACoC,EAAMC,IAAA,EAAWrC,EAAAA,SAAAA,CAAS,EAAK,EAGhCsC,GAAA,EAAUrC,EAAAA,OAAAA,CAAO,EAAK,EACtB,CAACsC,EAAOC,IAAA,EAAYxC,EAAAA,SAAAA,CAAwB,IAAI,EAEhDyC,EAAgBP,EAAO,KAAK,EAG5BQ,E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,CAACrB,GAASiB,EAAU,SAAW,GAC1C,EAAA1B,EAAA,IAAA,CAACT,EAAAA,WAAD,CAAY,MAAM,eAAe,QAAQ,OAAO,SAAA,WAEpC,CAAA,EACV,KACHuC,GAAWJ,EAAU,QACpB,EAAA1B,EAAA,IAAA,CAACR,EAAAA,MAAD,CACW,UACA,UACT,WAAYyD,EACZ,UAAA,GACS,UACT,WAAY,CACV,QAASf,EACT,SAAW,GAAmB,CAC5BC,EAAQmB,CAAQ,CAClB,EACA,iBAAmB,GAAuB,CACxCnB,EAAQ,CAAC,EACTE,EAAYkB,CAAY,CAC1B,EACA,WACA,cAAe,OACf,gBAAiB/B,EACjB,qBAAsB,EAAM,EAAI,IAC9B,MAAMgC,EAAK,GAAGC,EAAG,OAAOb,EAAM,IAChC,oBAAqB,GACrB,MAAON,CACT,CACD,CAAA,EACC,IACD,CACE,CAAA,CAAA,CAAA,CACG,CAAA,GAEd,EAAAtC,EAAA,IAAA,CAACG,EAAD,CACE,SAAU6B,EACV,gBAAyB,CACvBC,EAAgB,IAAI,EACpBQ,EAAa,CACf,EACA,YAAqBR,EAAgB,IAAI,CAC1C,CAAA,CACD,CAAA,CAAA,CAEN,CAEA,SAASa,EACP,EACmB,CACnB,MAAO,CACL,GAAG,IAAI,IACLpB,EAAU,QAAS,GAAgC,CACjD,GAAIb,EAAS,oBAAsB,CAACA,EAAS,mBAAmB,EAAI,CAAC,EACrE,GAAGA,EAAS,qBACd,CAAC,CACH,CACF,CACF,CAEA,SAASsC,EACP,EACA,EACQ,CAKR,OAJKC,EAIExB,EAAa,IAAIwB,CAAQ,CAAC,EAAE,MAAQA,EAHlC,GAIX,CAEA,SAASJ,EAAiB,EAAwB,CAChD,OAAOvC,aAAiB,MAAQA,EAAM,QAAU,YAClD,C"}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as e } from "../../../chunks/format-date-time-B0LdmWg4.js";
|
|
3
|
+
import { n as t } from "../../../chunks/member-profile-resolution-CJlgVdTR.js";
|
|
4
|
+
import { t as n } from "../../../chunks/bpm-form-field-9B-Det0u.js";
|
|
5
|
+
import { useCallback as r, useEffect as i, useMemo as a, useRef as o, useState as s } from "react";
|
|
6
|
+
import { Input as c, Modal as l, PageHeader as u, Section as d, SectionGroup as f, Table as p, Typography as m } from "@mezzanine-ui/react";
|
|
7
|
+
import { resolveMembers as h } from "@rytass/bpm-core-client";
|
|
8
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
9
|
+
import { adminCancelApprovalInstance as y, listStuckApprovalInstancesPage as b } from "@rytass/bpm-core-client/workflow";
|
|
10
|
+
import x from "@mezzanine-ui/react/ContentHeader";
|
|
11
|
+
// src/views/admin/stuck-instances/StuckInstanceCancelModal.tsx
|
|
12
|
+
function S({ instance: e, onCancelled: t, onClose: r }) {
|
|
13
|
+
let [a, u] = s(""), [d, f] = s(!1), p = o(!1), [h, g] = s(null), b = a.trim(), x = e?.instanceId ?? null;
|
|
14
|
+
i(() => {
|
|
15
|
+
u(""), g(null), f(!1), p.current = !1;
|
|
16
|
+
}, [x]);
|
|
17
|
+
let S = () => {
|
|
18
|
+
d || r();
|
|
19
|
+
};
|
|
20
|
+
async function T() {
|
|
21
|
+
if (!e || !b || p.current) return;
|
|
22
|
+
p.current = !0, f(!0), g(null);
|
|
23
|
+
let n = await y({
|
|
24
|
+
instanceId: e.instanceId,
|
|
25
|
+
reason: b
|
|
26
|
+
}).then(() => !0, (e) => (g(w(e)), !1));
|
|
27
|
+
p.current = !1, f(!1), n && t();
|
|
28
|
+
}
|
|
29
|
+
return /* @__PURE__ */ _(l, {
|
|
30
|
+
cancelText: "取消",
|
|
31
|
+
confirmButtonProps: { disabled: !b || d },
|
|
32
|
+
confirmText: "確認撤銷",
|
|
33
|
+
loading: d,
|
|
34
|
+
modalType: "standard",
|
|
35
|
+
onCancel: S,
|
|
36
|
+
onClose: S,
|
|
37
|
+
onConfirm: () => {
|
|
38
|
+
T();
|
|
39
|
+
},
|
|
40
|
+
open: !!e,
|
|
41
|
+
showModalFooter: !0,
|
|
42
|
+
showModalHeader: !0,
|
|
43
|
+
size: "regular",
|
|
44
|
+
title: "撤銷卡住的案件",
|
|
45
|
+
children: e ? /* @__PURE__ */ v("div", {
|
|
46
|
+
style: C,
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ v(m, {
|
|
49
|
+
variant: "body",
|
|
50
|
+
children: ["案件:", e.instanceTitle]
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ _(m, {
|
|
53
|
+
color: "text-neutral",
|
|
54
|
+
variant: "body",
|
|
55
|
+
children: "撤銷後無法復原。申請人會收到站內通知,內容含撤銷理由。"
|
|
56
|
+
}),
|
|
57
|
+
h ? /* @__PURE__ */ _(m, {
|
|
58
|
+
color: "text-error",
|
|
59
|
+
variant: "body",
|
|
60
|
+
children: h
|
|
61
|
+
}) : null,
|
|
62
|
+
/* @__PURE__ */ _(n, {
|
|
63
|
+
label: "撤銷理由(必填)",
|
|
64
|
+
name: "stuckCancelReason",
|
|
65
|
+
children: /* @__PURE__ */ _(c, {
|
|
66
|
+
...d ? { disabled: !0 } : {},
|
|
67
|
+
fullWidth: !0,
|
|
68
|
+
name: "stuckCancelReason",
|
|
69
|
+
onChange: (e) => {
|
|
70
|
+
u(e.target.value);
|
|
71
|
+
},
|
|
72
|
+
placeholder: "例如:下一關簽核人設定有誤,請重新送單",
|
|
73
|
+
value: a
|
|
74
|
+
})
|
|
75
|
+
})
|
|
76
|
+
]
|
|
77
|
+
}) : null
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
var C = {
|
|
81
|
+
display: "grid",
|
|
82
|
+
gap: 16
|
|
83
|
+
};
|
|
84
|
+
function w(e) {
|
|
85
|
+
return e instanceof Error ? e.message : "撤銷案件失敗。";
|
|
86
|
+
}
|
|
87
|
+
// src/views/admin/stuck-instances/AdminStuckInstancesView.tsx
|
|
88
|
+
var T = {
|
|
89
|
+
display: "grid",
|
|
90
|
+
gap: 12
|
|
91
|
+
}, E = [
|
|
92
|
+
10,
|
|
93
|
+
20,
|
|
94
|
+
50
|
|
95
|
+
];
|
|
96
|
+
function D() {
|
|
97
|
+
let [n, c] = s([]), [l, y] = s(/* @__PURE__ */ new Map()), [C, w] = s(!0), [D, j] = s(null), [M, N] = s(null), [P, F] = s(1), [I, L] = s(20), [R, z] = s(0), B = o(0), V = r(async () => {
|
|
98
|
+
let e = B.current + 1;
|
|
99
|
+
B.current = e, w(!0);
|
|
100
|
+
try {
|
|
101
|
+
let { instances: n, totalCount: r } = await b({
|
|
102
|
+
page: P,
|
|
103
|
+
pageSize: I
|
|
104
|
+
});
|
|
105
|
+
if (n.length === 0 && P > 1 && r > 0) {
|
|
106
|
+
B.current === e && F(Math.ceil(r / I));
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
let i = await t(O(n), h);
|
|
110
|
+
if (B.current !== e) return;
|
|
111
|
+
c(n), z(r), y(new Map(i.profiles.map((e) => [e.memberId, e]))), j(null);
|
|
112
|
+
} catch (t) {
|
|
113
|
+
B.current === e && (c([]), y(/* @__PURE__ */ new Map()), j(A(t)));
|
|
114
|
+
} finally {
|
|
115
|
+
B.current === e && w(!1);
|
|
116
|
+
}
|
|
117
|
+
}, [P, I]);
|
|
118
|
+
i(() => {
|
|
119
|
+
V();
|
|
120
|
+
}, [V]);
|
|
121
|
+
let H = a(() => n.map((e) => ({
|
|
122
|
+
instance: e,
|
|
123
|
+
key: e.instanceId
|
|
124
|
+
})), [n]), U = a(() => [
|
|
125
|
+
{
|
|
126
|
+
key: "instanceTitle",
|
|
127
|
+
render: ({ instance: e }) => e.instanceTitle,
|
|
128
|
+
title: "案件",
|
|
129
|
+
width: 220
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
key: "templateName",
|
|
133
|
+
render: ({ instance: e }) => e.templateName ?? "-",
|
|
134
|
+
title: "範本",
|
|
135
|
+
width: 160
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
key: "stuckAt",
|
|
139
|
+
render: ({ instance: e }) => e.kind === "RESUBMIT" ? "退件後重送" : e.nodeLabel ?? "-",
|
|
140
|
+
title: "卡在哪一關",
|
|
141
|
+
width: 160
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
key: "failedActor",
|
|
145
|
+
render: ({ instance: e }) => e.automatic === "SLA_AUTO_APPROVE" ? "系統逾時自動同意" : k(e.failedActorMemberId, l),
|
|
146
|
+
title: "上次失敗的人",
|
|
147
|
+
width: 160
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
key: "pendingActors",
|
|
151
|
+
render: ({ instance: e }) => e.pendingActorMemberIds.length ? e.pendingActorMemberIds.map((e) => k(e, l)).join("、") : "目前沒有人能按",
|
|
152
|
+
title: "現在該重按的人",
|
|
153
|
+
width: 180
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
key: "message",
|
|
157
|
+
render: ({ instance: e }) => e.message,
|
|
158
|
+
title: "原因",
|
|
159
|
+
width: 260
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
key: "failedAt",
|
|
163
|
+
render: ({ instance: t }) => e(t.failedAt),
|
|
164
|
+
title: "時間",
|
|
165
|
+
width: 180
|
|
166
|
+
}
|
|
167
|
+
], [l]), W = a(() => ({
|
|
168
|
+
render: ({ instance: e }) => [{
|
|
169
|
+
name: "撤銷",
|
|
170
|
+
onClick: () => N(e)
|
|
171
|
+
}],
|
|
172
|
+
variant: "base-secondary",
|
|
173
|
+
width: 100
|
|
174
|
+
}), []);
|
|
175
|
+
return /* @__PURE__ */ v(g, { children: [
|
|
176
|
+
/* @__PURE__ */ _(u, { children: /* @__PURE__ */ _(x, {
|
|
177
|
+
description: "往下一關失敗、至今仍停在原處的案件。排除原因後由「現在該重按的人」再按一次即可;無法處理時可撤銷。",
|
|
178
|
+
title: "卡住的案件"
|
|
179
|
+
}) }),
|
|
180
|
+
/* @__PURE__ */ _(f, { children: /* @__PURE__ */ _(d, { children: /* @__PURE__ */ v("div", {
|
|
181
|
+
style: T,
|
|
182
|
+
children: [
|
|
183
|
+
D ? /* @__PURE__ */ _(m, {
|
|
184
|
+
color: "text-error",
|
|
185
|
+
variant: "body",
|
|
186
|
+
children: D
|
|
187
|
+
}) : null,
|
|
188
|
+
!C && !D && n.length === 0 ? /* @__PURE__ */ _(m, {
|
|
189
|
+
color: "text-neutral",
|
|
190
|
+
variant: "body",
|
|
191
|
+
children: "目前沒有卡住的案件"
|
|
192
|
+
}) : null,
|
|
193
|
+
C || n.length ? /* @__PURE__ */ _(p, {
|
|
194
|
+
actions: W,
|
|
195
|
+
columns: U,
|
|
196
|
+
dataSource: H,
|
|
197
|
+
fullWidth: !0,
|
|
198
|
+
loading: C,
|
|
199
|
+
pagination: {
|
|
200
|
+
current: P,
|
|
201
|
+
onChange: (e) => {
|
|
202
|
+
F(e);
|
|
203
|
+
},
|
|
204
|
+
onChangePageSize: (e) => {
|
|
205
|
+
F(1), L(e);
|
|
206
|
+
},
|
|
207
|
+
pageSize: I,
|
|
208
|
+
pageSizeLabel: "每頁筆數",
|
|
209
|
+
pageSizeOptions: E,
|
|
210
|
+
renderResultSummary: (e, t, n) => `顯示 ${e}-${t} 筆,共 ${n} 筆`,
|
|
211
|
+
showPageSizeOptions: !0,
|
|
212
|
+
total: R
|
|
213
|
+
}
|
|
214
|
+
}) : null
|
|
215
|
+
]
|
|
216
|
+
}) }) }),
|
|
217
|
+
/* @__PURE__ */ _(S, {
|
|
218
|
+
instance: M,
|
|
219
|
+
onCancelled: () => {
|
|
220
|
+
N(null), V();
|
|
221
|
+
},
|
|
222
|
+
onClose: () => N(null)
|
|
223
|
+
})
|
|
224
|
+
] });
|
|
225
|
+
}
|
|
226
|
+
function O(e) {
|
|
227
|
+
return [...new Set(e.flatMap((e) => [...e.failedActorMemberId ? [e.failedActorMemberId] : [], ...e.pendingActorMemberIds]))];
|
|
228
|
+
}
|
|
229
|
+
function k(e, t) {
|
|
230
|
+
return e ? t.get(e)?.name ?? e : "-";
|
|
231
|
+
}
|
|
232
|
+
function A(e) {
|
|
233
|
+
return e instanceof Error ? e.message : "載入卡住的案件失敗。";
|
|
234
|
+
}
|
|
235
|
+
export { D as AdminStuckInstancesView, S as StuckInstanceCancelModal };
|
|
236
|
+
|
|
237
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["readErrorMessage","_Fragment","formatDateTime","resolveMemberProfilesPerIdOnFailure","BPMFormField","Fragment$1","ContentHeader","StuckInstanceCancelModal","reason","setReason","useState","busy","setBusy","busyRef","useRef","error","setError","trimmedReason","instanceId","instance","handleClose","onClose","handleConfirm","succeeded","adminCancelApprovalInstance","readErrorMessage$1","requestError","onCancelled","Modal","BODY_STYLE","Typography","Input","event","STACK_STYLE","PAGE_SIZE_OPTIONS","AdminStuckInstancesView","instances","setInstances","profilesById","setProfilesById","loading","setLoading","cancelTarget","setCancelTarget","page","setPage","pageSize","setPageSize","totalCount","setTotalCount","latestRequestRef","refresh","useCallback","request","loaded","total","listStuckApprovalInstancesPage","resolution","readMemberIds","resolveMembers","profile","readErrorMessage","rows","useMemo","columns","readMemberText","memberId","actions","PageHeader","SectionGroup","Section","Table","nextPage","nextPageSize","from","to"],"sources":["../../../../src/views/admin/stuck-instances/StuckInstanceCancelModal.tsx","../../../../src/views/admin/stuck-instances/AdminStuckInstancesView.tsx"],"sourcesContent":["'use client';\n\nimport { ChangeEvent, ReactElement, useEffect, useRef, useState } from 'react';\nimport { Input, Modal, Typography } from '@mezzanine-ui/react';\nimport {\n adminCancelApprovalInstance,\n type StuckApprovalInstanceRecord,\n} from '@rytass/bpm-core-client/workflow';\nimport { BPMFormField } from '../../../components/bpm-form-field';\n\n/**\n * Administrator cancellation of one stuck approval instance. The reason is\n * required (trimmed) and goes to the applicant as an in-app notification, so\n * the window says so before the administrator confirms. Cancelling cannot be\n * undone.\n */\nexport function StuckInstanceCancelModal({\n instance,\n onCancelled,\n onClose,\n}: {\n readonly instance: StuckApprovalInstanceRecord | null;\n /** The cancellation went through; the host closes the window and reloads. */\n readonly onCancelled: () => void;\n readonly onClose: () => void;\n}): ReactElement {\n const [reason, setReason] = useState('');\n const [busy, setBusy] = useState(false);\n // `busy` only reaches the handler after a re-render; a second press that\n // lands before it would send a second cancellation.\n const busyRef = useRef(false);\n const [error, setError] = useState<string | null>(null);\n\n const trimmedReason = reason.trim();\n\n // A different instance starts from a blank window.\n const instanceId = instance?.instanceId ?? null;\n\n useEffect((): void => {\n setReason('');\n setError(null);\n setBusy(false);\n busyRef.current = false;\n }, [instanceId]);\n\n // While the request is in flight every close path is a no-op: the cancel\n // button, Esc, the backdrop and the corner X all end up here.\n const handleClose = (): void => {\n if (busy) {\n return;\n }\n\n onClose();\n };\n\n async function handleConfirm(): Promise<void> {\n if (!instance || !trimmedReason || busyRef.current) {\n return;\n }\n\n busyRef.current = true;\n setBusy(true);\n setError(null);\n\n const succeeded = await adminCancelApprovalInstance({\n instanceId: instance.instanceId,\n reason: trimmedReason,\n }).then(\n (): boolean => true,\n (requestError: unknown): boolean => {\n setError(readErrorMessage(requestError));\n\n return false;\n },\n );\n\n busyRef.current = false;\n setBusy(false);\n\n if (succeeded) {\n onCancelled();\n }\n }\n\n return (\n <Modal\n cancelText=\"取消\"\n confirmButtonProps={{ disabled: !trimmedReason || busy }}\n confirmText=\"確認撤銷\"\n loading={busy}\n modalType=\"standard\"\n onCancel={handleClose}\n onClose={handleClose}\n onConfirm={(): void => {\n void handleConfirm();\n }}\n open={Boolean(instance)}\n showModalFooter\n showModalHeader\n size=\"regular\"\n title=\"撤銷卡住的案件\"\n >\n {instance ? (\n <div style={BODY_STYLE}>\n <Typography variant=\"body\">案件:{instance.instanceTitle}</Typography>\n <Typography color=\"text-neutral\" variant=\"body\">\n 撤銷後無法復原。申請人會收到站內通知,內容含撤銷理由。\n </Typography>\n {error ? (\n <Typography color=\"text-error\" variant=\"body\">\n {error}\n </Typography>\n ) : null}\n <BPMFormField label=\"撤銷理由(必填)\" name=\"stuckCancelReason\">\n <Input\n {...(busy ? { disabled: true as const } : {})}\n fullWidth\n name=\"stuckCancelReason\"\n onChange={(event: ChangeEvent<HTMLInputElement>): void => {\n setReason(event.target.value);\n }}\n placeholder=\"例如:下一關簽核人設定有誤,請重新送單\"\n value={reason}\n />\n </BPMFormField>\n </div>\n ) : null}\n </Modal>\n );\n}\n\nconst BODY_STYLE = {\n display: 'grid',\n gap: 16,\n} as const;\n\nfunction readErrorMessage(error: unknown): string {\n return error instanceof Error ? error.message : '撤銷案件失敗。';\n}\n","'use client';\n\nimport {\n CSSProperties,\n ReactElement,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n PageHeader,\n Section,\n SectionGroup,\n Table,\n Typography,\n} from '@mezzanine-ui/react';\nimport ContentHeader from '@mezzanine-ui/react/ContentHeader';\nimport type { TableActions, TableColumn } from '@mezzanine-ui/core/table';\nimport { resolveMembers } from '@rytass/bpm-core-client';\nimport type { MemberProfileRecord } from '@rytass/bpm-core-client/template';\nimport {\n listStuckApprovalInstancesPage,\n type StuckApprovalInstanceRecord,\n} from '@rytass/bpm-core-client/workflow';\nimport { formatDateTime } from '../../../lib/format-date-time';\nimport { resolveMemberProfilesPerIdOnFailure } from '../../../lib/member-profile-resolution';\nimport { StuckInstanceCancelModal } from './StuckInstanceCancelModal';\n\ntype StuckRow = Readonly<\n Record<string, unknown> & {\n instance: StuckApprovalInstanceRecord;\n key: string;\n }\n>;\n\nconst STACK_STYLE: CSSProperties = { display: 'grid', gap: 12 };\n\nconst PAGE_SIZE_OPTIONS = [10, 20, 50];\n\n/**\n * Administrator list of approval instances that could not move on to their\n * next stage (the next approver could not be resolved, say) and still cannot.\n * Each row names where it stuck, who pressed last, who has to press again, and\n * why. The only action is cancelling the instance; fixing the cause and having\n * the listed person press again clears the row by itself. Administrator-only on\n * the server.\n */\nexport function AdminStuckInstancesView(): ReactElement {\n const [instances, setInstances] = useState<\n readonly StuckApprovalInstanceRecord[]\n >([]);\n const [profilesById, setProfilesById] = useState<\n ReadonlyMap<string, MemberProfileRecord>\n >(new Map());\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState<string | null>(null);\n const [cancelTarget, setCancelTarget] =\n useState<StuckApprovalInstanceRecord | null>(null);\n const [page, setPage] = useState(1);\n const [pageSize, setPageSize] = useState(20);\n const [totalCount, setTotalCount] = useState(0);\n\n // Only the latest listing may write, so a slow earlier answer cannot replace\n // the list that a cancellation just reloaded.\n const latestRequestRef = useRef(0);\n\n const refresh = useCallback(async (): Promise<void> => {\n const request = latestRequestRef.current + 1;\n\n latestRequestRef.current = request;\n setLoading(true);\n\n try {\n const { instances: loaded, totalCount: total } =\n await listStuckApprovalInstancesPage({ page, pageSize });\n\n // A cancellation can empty the last page: step back to the new last one,\n // whose load replaces this answer.\n if (loaded.length === 0 && page > 1 && total > 0) {\n if (latestRequestRef.current === request) {\n setPage(Math.ceil(total / pageSize));\n }\n\n return;\n }\n\n const resolution = await resolveMemberProfilesPerIdOnFailure(\n readMemberIds(loaded),\n resolveMembers,\n );\n\n if (latestRequestRef.current !== request) {\n return;\n }\n\n // Ids that cannot be resolved stay out of the map and show as the raw id.\n setInstances(loaded);\n setTotalCount(total);\n setProfilesById(\n new Map(\n resolution.profiles.map((profile) => [profile.memberId, profile]),\n ),\n );\n setError(null);\n } catch (requestError: unknown) {\n if (latestRequestRef.current === request) {\n // The table already shows the page asked for; rows of the page left\n // behind must not stand under that number.\n setInstances([]);\n setProfilesById(new Map());\n setError(readErrorMessage(requestError));\n }\n } finally {\n if (latestRequestRef.current === request) {\n setLoading(false);\n }\n }\n }, [page, pageSize]);\n\n useEffect((): void => {\n void refresh();\n }, [refresh]);\n\n const rows = useMemo(\n (): StuckRow[] =>\n instances.map((instance) => ({ instance, key: instance.instanceId })),\n [instances],\n );\n\n const columns = useMemo(\n (): TableColumn<StuckRow>[] => [\n {\n key: 'instanceTitle',\n render: ({ instance }: StuckRow): string => instance.instanceTitle,\n title: '案件',\n width: 220,\n },\n {\n key: 'templateName',\n render: ({ instance }: StuckRow): string =>\n instance.templateName ?? '-',\n title: '範本',\n width: 160,\n },\n {\n key: 'stuckAt',\n render: ({ instance }: StuckRow): string =>\n instance.kind === 'RESUBMIT'\n ? '退件後重送'\n : (instance.nodeLabel ?? '-'),\n title: '卡在哪一關',\n width: 160,\n },\n {\n key: 'failedActor',\n render: ({ instance }: StuckRow): string =>\n instance.automatic === 'SLA_AUTO_APPROVE'\n ? '系統逾時自動同意'\n : readMemberText(instance.failedActorMemberId, profilesById),\n title: '上次失敗的人',\n width: 160,\n },\n {\n key: 'pendingActors',\n render: ({ instance }: StuckRow): string =>\n instance.pendingActorMemberIds.length\n ? instance.pendingActorMemberIds\n .map((memberId) => readMemberText(memberId, profilesById))\n .join('、')\n : '目前沒有人能按',\n title: '現在該重按的人',\n width: 180,\n },\n {\n key: 'message',\n render: ({ instance }: StuckRow): string => instance.message,\n title: '原因',\n width: 260,\n },\n {\n key: 'failedAt',\n render: ({ instance }: StuckRow): string =>\n formatDateTime(instance.failedAt),\n title: '時間',\n width: 180,\n },\n ],\n [profilesById],\n );\n\n const actions = useMemo(\n (): TableActions<StuckRow> => ({\n render: ({\n instance,\n }): ReturnType<TableActions<StuckRow>['render']> => [\n {\n name: '撤銷',\n onClick: (): void => setCancelTarget(instance),\n },\n ],\n variant: 'base-secondary',\n width: 100,\n }),\n [],\n );\n\n return (\n <>\n <PageHeader>\n <ContentHeader\n description=\"往下一關失敗、至今仍停在原處的案件。排除原因後由「現在該重按的人」再按一次即可;無法處理時可撤銷。\"\n title=\"卡住的案件\"\n />\n </PageHeader>\n\n <SectionGroup>\n <Section>\n <div style={STACK_STYLE}>\n {error ? (\n <Typography color=\"text-error\" variant=\"body\">\n {error}\n </Typography>\n ) : null}\n {!loading && !error && instances.length === 0 ? (\n <Typography color=\"text-neutral\" variant=\"body\">\n 目前沒有卡住的案件\n </Typography>\n ) : null}\n {loading || instances.length ? (\n <Table\n actions={actions}\n columns={columns}\n dataSource={rows}\n fullWidth\n loading={loading}\n pagination={{\n current: page,\n onChange: (nextPage): void => {\n setPage(nextPage);\n },\n onChangePageSize: (nextPageSize): void => {\n setPage(1);\n setPageSize(nextPageSize);\n },\n pageSize,\n pageSizeLabel: '每頁筆數',\n pageSizeOptions: PAGE_SIZE_OPTIONS,\n renderResultSummary: (from, to, total): string =>\n `顯示 ${from}-${to} 筆,共 ${total} 筆`,\n showPageSizeOptions: true,\n total: totalCount,\n }}\n />\n ) : null}\n </div>\n </Section>\n </SectionGroup>\n\n <StuckInstanceCancelModal\n instance={cancelTarget}\n onCancelled={(): void => {\n setCancelTarget(null);\n void refresh();\n }}\n onClose={(): void => setCancelTarget(null)}\n />\n </>\n );\n}\n\nfunction readMemberIds(\n instances: readonly StuckApprovalInstanceRecord[],\n): readonly string[] {\n return [\n ...new Set(\n instances.flatMap((instance): readonly string[] => [\n ...(instance.failedActorMemberId ? [instance.failedActorMemberId] : []),\n ...instance.pendingActorMemberIds,\n ]),\n ),\n ];\n}\n\nfunction readMemberText(\n memberId: string | null,\n profilesById: ReadonlyMap<string, MemberProfileRecord>,\n): string {\n if (!memberId) {\n return '-';\n }\n\n return profilesById.get(memberId)?.name ?? memberId;\n}\n\nfunction readErrorMessage(error: unknown): string {\n return error instanceof Error ? error.message : '載入卡住的案件失敗。';\n}\n"],"mappings":";;;;;;;;;;;AAgBA,SAAgBO,EAAyB,EACvC,aACA,gBACA,cAMe;CACf,IAAM,CAACC,GAAQC,KAAaC,EAAS,EAAE,GACjC,CAACC,GAAMC,KAAWF,EAAS,EAAK,GAGhCG,IAAUC,EAAO,EAAK,GACtB,CAACC,GAAOC,KAAYN,EAAwB,IAAI,GAEhDO,IAAgBT,EAAO,KAAK,GAG5BU,IAAaC,GAAU,cAAc;CAE3C,QAAsB;EAIpB,AAHAV,EAAU,EAAE,GACZO,EAAS,IAAI,GACbJ,EAAQ,EAAK,GACb,EAAQ,UAAU;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EAAS,sBAAsB,CAACA,EAAS,mBAAmB,IAAI,CAAC,GACrE,GAAGA,EAAS,qBACd,CAAC,CACH,CACF;AACF;AAEA,SAAS8C,EACP,GACA,GACQ;CAKR,OAJKC,IAIE5B,EAAa,IAAI4B,CAAQ,CAAC,EAAE,QAAQA,IAHlC;AAIX;AAEA,SAASL,EAAiB,GAAwB;CAChD,OAAO9C,aAAiB,QAAQA,EAAM,UAAU;AAClD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../chunks/users-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../chunks/users-C_Dtw_sR.cjs");exports.AdminUsersView=e.t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as AdminUsersView } from "../../../chunks/users-
|
|
1
|
+
export { t as AdminUsersView } from "../../../chunks/users-wgM3TqU3.js";
|
package/dist/views/cc/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/approval-instance-list-page-
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/approval-instance-list-page-BqkG9jiR.cjs");let t=require("react/jsx-runtime");function n(){return(0,t.jsx)(e.t,{defaultState:null,description:`查看抄送給你的簽核案件。`,emptyMessage:`目前沒有抄送給你的簽核案件。`,searchPlaceholder:`關鍵字:搜尋案件、發起人、模板或狀態`,title:`抄送給我`,view:`CC`})}exports.CcView=n;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/views/cc/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/dashboard-page-
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/dashboard-page-lqlLELKs.cjs");let t=require("react/jsx-runtime");function n(){return(0,t.jsx)(e.t,{})}exports.DashboardView=n;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../chunks/FormBuilderView-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../chunks/FormBuilderView-Bg9ftYz-.cjs");exports.FormBuilderView=e.t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as FormBuilderView } from "../../../chunks/FormBuilderView-
|
|
1
|
+
export { t as FormBuilderView } from "../../../chunks/FormBuilderView-CBvdcg_t.js";
|