@acorex-platform/module-maintenance-management-client 2.0.0-next.27 → 2.0.0-next.30
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/fesm2022/{acorex-platform-module-maintenance-management-client-acorex-platform-module-maintenance-management-client-C3cGlFKd.mjs → acorex-platform-module-maintenance-management-client-acorex-platform-module-maintenance-management-client-B7XvuarJ.mjs} +18 -18
- package/fesm2022/{acorex-platform-module-maintenance-management-client-acorex-platform-module-maintenance-management-client-C3cGlFKd.mjs.map → acorex-platform-module-maintenance-management-client-acorex-platform-module-maintenance-management-client-B7XvuarJ.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-plan.mjs +1 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-plan.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-template.mjs +2 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-template.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-work-order.mjs +5 -0
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-work-order.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-acorex-platform-module-maintenance-management-client-contracts-entity-catalog-B3VyUXZS.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-acorex-platform-module-maintenance-management-client-contracts-entity-catalog-CIu03c96.mjs} +27 -27
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-acorex-platform-module-maintenance-management-client-contracts-entity-catalog-B3VyUXZS.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-acorex-platform-module-maintenance-management-client-contracts-entity-catalog-CIu03c96.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-activity-type-asset-type.entity-CsYZTxT_.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-activity-type-asset-type.entity-Bi-wss4r.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-activity-type-asset-type.entity-CsYZTxT_.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-activity-type-asset-type.entity-Bi-wss4r.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-activity-type-resource.entity-Bh5dBgpo.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-activity-type-resource.entity-DB1ZyNUk.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-activity-type-resource.entity-Bh5dBgpo.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-activity-type-resource.entity-DB1ZyNUk.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-activity-type.entity-DvO6Fzyy.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-activity-type.entity-BhVlwEV1.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-activity-type.entity-DvO6Fzyy.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-activity-type.entity-BhVlwEV1.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-cause.entity-PdvjV4lk.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-cause.entity-BIjXhM2g.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-cause.entity-PdvjV4lk.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-cause.entity-BIjXhM2g.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-detection.entity-BV-O5oRI.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-detection.entity-BR2R0kXQ.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-detection.entity-BV-O5oRI.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-detection.entity-BR2R0kXQ.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-effect.entity-GqFBuuiR.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-effect.entity-jrDlUTju.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-effect.entity-GqFBuuiR.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-effect.entity-jrDlUTju.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mechanism.entity-CiqHDstL.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mechanism.entity-CwaID6Tg.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mechanism.entity-CiqHDstL.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mechanism.entity-CwaID6Tg.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode-asset-type.entity-TcC_1stz.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode-asset-type.entity-Ctv5AbaF.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode-asset-type.entity-TcC_1stz.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode-asset-type.entity-Ctv5AbaF.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode-mechanism.entity-q2O4YHPk.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode-mechanism.entity-CXddpjjm.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode-mechanism.entity-q2O4YHPk.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode-mechanism.entity-CXddpjjm.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode-solution.entity-CeyOYGAL.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode-solution.entity-C1QtFfPN.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode-solution.entity-CeyOYGAL.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode-solution.entity-C1QtFfPN.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode.entity-CDWqPcEx.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode.entity-DVZBO9qr.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode.entity-CDWqPcEx.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-mode.entity-DVZBO9qr.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register-cause.entity-6GS66uos.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register-cause.entity-0HIQxku7.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register-cause.entity-6GS66uos.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register-cause.entity-0HIQxku7.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register-effect.entity-BDsiwqyj.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register-effect.entity-Bjr9gkQT.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register-effect.entity-BDsiwqyj.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register-effect.entity-Bjr9gkQT.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register-mechanism.entity-DYX8gBDO.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register-mechanism.entity-BrB1OzKY.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register-mechanism.entity-DYX8gBDO.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register-mechanism.entity-BrB1OzKY.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register.entity-DWKPDUB7.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register.entity-Bhiq6c98.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register.entity-DWKPDUB7.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register.entity-Bhiq6c98.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-severity.entity-wHk-6VCb.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-severity.entity-GGv9jngd.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-severity.entity-wHk-6VCb.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-severity.entity-GGv9jngd.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-type.entity-tTg4D_-N.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-type.entity-3CpGlIGA.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-type.entity-tTg4D_-N.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-type.entity-3CpGlIGA.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-plan.entity-BwsjdQur.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-plan.entity-YSQNd7Nr.mjs} +3 -3
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-plan.entity-YSQNd7Nr.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template-activity-type.entity-CCx9h8Gq.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template-activity-type.entity-NGoFGswA.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template-activity-type.entity-CCx9h8Gq.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template-activity-type.entity-NGoFGswA.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template-failure-mode.entity-BlfNXvBw.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template-failure-mode.entity-nXsrBciU.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template-failure-mode.entity-BlfNXvBw.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template-failure-mode.entity-nXsrBciU.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template-resource.entity-2lGT7_Xi.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template-resource.entity-9Jkv8GZV.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template-resource.entity-2lGT7_Xi.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template-resource.entity-9Jkv8GZV.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template.entity-bJKzxAis.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template.entity-DDGI55YV.mjs} +4 -3
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template.entity-DDGI55YV.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-type.entity-j2eyDg9O.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-type.entity-COLiAgR2.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-type.entity-j2eyDg9O.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-type.entity-COLiAgR2.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-work-order.entity-DFJdx9Km.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-work-order.entity-Cv276Guk.mjs} +7 -2
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-work-order.entity-Cv276Guk.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-work-package.entity-DM60G8nP.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-work-package.entity-BSvZDFrh.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-work-package.entity-DM60G8nP.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-work-package.entity-BSvZDFrh.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-work-report.entity-DOvNijen.mjs → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-work-report.entity-uZ1PK2gr.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-contracts-entity-catalog-work-report.entity-DOvNijen.mjs.map → acorex-platform-module-maintenance-management-client-contracts-entity-catalog-work-report.entity-uZ1PK2gr.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog.mjs +1 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts.mjs +906 -742
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-create-or-get-work-report-draft.activity-C-K8mD4N.mjs → acorex-platform-module-maintenance-management-client-create-or-get-work-report-draft.activity-rzwSWpbX.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-create-or-get-work-report-draft.activity-C-K8mD4N.mjs.map → acorex-platform-module-maintenance-management-client-create-or-get-work-report-draft.activity-rzwSWpbX.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-maintenance-interval-widget-edit.component-b8sTwXxe.mjs → acorex-platform-module-maintenance-management-client-maintenance-interval-widget-edit.component-AwR7TA8Z.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-maintenance-interval-widget-edit.component-b8sTwXxe.mjs.map → acorex-platform-module-maintenance-management-client-maintenance-interval-widget-edit.component-AwR7TA8Z.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-open-work-order-checklist-form.command-C6rDOolF.mjs → acorex-platform-module-maintenance-management-client-open-work-order-checklist-form.command-BFojY1dW.mjs} +136 -3
- package/fesm2022/acorex-platform-module-maintenance-management-client-open-work-order-checklist-form.command-BFojY1dW.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-maintenance-management-client-record-work-report-assessment.activity-StzIetk8.mjs → acorex-platform-module-maintenance-management-client-record-work-report-assessment.activity-BSlCB3ol.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-record-work-report-assessment.activity-StzIetk8.mjs.map → acorex-platform-module-maintenance-management-client-record-work-report-assessment.activity-BSlCB3ol.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-sign-off-work-order.command-Ca8WbM3R.mjs → acorex-platform-module-maintenance-management-client-sign-off-work-order.command-DZxPc93J.mjs} +131 -6
- package/fesm2022/acorex-platform-module-maintenance-management-client-sign-off-work-order.command-DZxPc93J.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-maintenance-management-client-start-work-order-flow.command-CNau6u4p.mjs → acorex-platform-module-maintenance-management-client-start-work-order-flow.command-DEmTjXtp.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-start-work-order-flow.command-CNau6u4p.mjs.map → acorex-platform-module-maintenance-management-client-start-work-order-flow.command-DEmTjXtp.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-update-work-order-completed.activity-CSKzwPjv.mjs → acorex-platform-module-maintenance-management-client-update-work-order-completed.activity-DCQzsQ8Y.mjs} +28 -7
- package/fesm2022/acorex-platform-module-maintenance-management-client-update-work-order-completed.activity-DCQzsQ8Y.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-maintenance-management-client-update-work-order-in-progress.activity-DDJHrYkP.mjs → acorex-platform-module-maintenance-management-client-update-work-order-in-progress.activity-C-X8TfhM.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-update-work-order-in-progress.activity-DDJHrYkP.mjs.map → acorex-platform-module-maintenance-management-client-update-work-order-in-progress.activity-C-X8TfhM.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client-work-order-status-patch.util-BGY7nYJK.mjs +53 -0
- package/fesm2022/acorex-platform-module-maintenance-management-client-work-order-status-patch.util-BGY7nYJK.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-maintenance-management-client-work-order-workflow-column.component-DcBxsEci.mjs → acorex-platform-module-maintenance-management-client-work-order-workflow-column.component-7jBAeutS.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-work-order-workflow-column.component-DcBxsEci.mjs.map → acorex-platform-module-maintenance-management-client-work-order-workflow-column.component-7jBAeutS.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client.mjs +1 -1
- package/i18n/en-AU/maintenance-management.json +13 -0
- package/i18n/en-US/maintenance-management.json +13 -0
- package/i18n/fa-IR/maintenance-management.json +13 -0
- package/package.json +3 -3
- package/types/acorex-platform-module-maintenance-management-client-contracts.d.ts +153 -99
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-plan.entity-BwsjdQur.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template.entity-bJKzxAis.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-work-order.entity-DFJdx9Km.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client-open-work-order-checklist-form.command-C6rDOolF.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client-sign-off-work-order.command-Ca8WbM3R.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client-update-work-order-completed.activity-CSKzwPjv.mjs.map +0 -1
|
@@ -33,860 +33,1024 @@ const AXM_MAINTENANCE_INTERVAL_CHECK_COMMAND_KEY = AXMMaintenanceManagementComma
|
|
|
33
33
|
//#endregion
|
|
34
34
|
|
|
35
35
|
//#region ----- Constants -----
|
|
36
|
-
/**
|
|
37
|
-
const
|
|
38
|
-
/** Bookmark action that opens the in-progress checklist form. */
|
|
39
|
-
const AXM_INTERVAL_OPEN_FORM_ACTION_NAME = 'open-form';
|
|
40
|
-
/** Bookmark action that collects a signature and completes the interval work order. */
|
|
41
|
-
const AXM_INTERVAL_SIGN_OFF_ACTION_NAME = 'sign-off';
|
|
42
|
-
/** Seeded interval workflow name. The task-board card belongs to this instance. */
|
|
43
|
-
const AXM_INTERVAL_WORK_ORDER_WORKFLOW_NAME = 'maintenance-interval-work-order';
|
|
44
|
-
const AXM_INTERVAL_DUE_ACTIVITY_ID = 'intervalDueHumanTask';
|
|
45
|
-
/** Workflow variable / instance property for the checklist case of this work order. */
|
|
46
|
-
const AXM_INTERVAL_CHECKLIST_CASE_ID = 'assessmentCaseId';
|
|
47
|
-
/** Workflow variable / instance property for the checklist session of this work order. */
|
|
48
|
-
const AXM_INTERVAL_CHECKLIST_SESSION_ID = 'assessmentSessionId';
|
|
49
|
-
/** Workflow variable storing the template questionnaire this occurrence was opened against. */
|
|
50
|
-
const AXM_INTERVAL_CHECKLIST_QUESTIONNAIRE_ID = 'checklistQuestionnaireId';
|
|
51
|
-
/** Short-lived claim so concurrent Open Form clicks create one case and session. */
|
|
52
|
-
const AXM_INTERVAL_CHECKLIST_CLAIM = 'checklistOccurrenceClaim';
|
|
53
|
-
const AXM_INTERVAL_IN_PROGRESS_TASK_DESCRIPTION = '@maintenance-management:work-orders.tasks.interval-due.in-progress-description';
|
|
54
|
-
const AXM_INTERVAL_COMPLETED_TASK_DESCRIPTION = '@maintenance-management:work-orders.tasks.interval-due.completed-description';
|
|
55
|
-
//#endregion
|
|
56
|
-
//#region ----- Checklist id -----
|
|
57
|
-
function isRecord(value) {
|
|
58
|
-
return value != null && typeof value === 'object' && !Array.isArray(value);
|
|
59
|
-
}
|
|
60
|
-
function resolveChecklistId(value) {
|
|
61
|
-
if (typeof value === 'string') {
|
|
62
|
-
return value.trim();
|
|
63
|
-
}
|
|
64
|
-
if (isRecord(value)) {
|
|
65
|
-
return resolveChecklistId(value['id']);
|
|
66
|
-
}
|
|
67
|
-
return '';
|
|
68
|
-
}
|
|
36
|
+
/** Widget name for the maintenance interval editor. Kind strings match `AXMAssetIntervalKind`. */
|
|
37
|
+
const AXM_MAINTENANCE_INTERVAL_WIDGET = 'maintenance-interval-editor';
|
|
69
38
|
/**
|
|
70
|
-
*
|
|
71
|
-
*
|
|
39
|
+
* Same stored values as `AXMAssetIntervalKind`.
|
|
40
|
+
* Combinations are multiple entries, not extra kinds.
|
|
72
41
|
*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
42
|
+
const AXM_MAINTENANCE_INTERVAL_KINDS = ['schedule', 'date', 'distance', 'operating-hours', 'operation-count'];
|
|
43
|
+
const METER_KINDS = ['distance', 'operating-hours', 'operation-count'];
|
|
44
|
+
/** How multiple enabled intervals combine. Stored in lowercase, like other persisted enums. */
|
|
45
|
+
var AXMMaintenanceIntervalTriggerLogic;
|
|
46
|
+
(function (AXMMaintenanceIntervalTriggerLogic) {
|
|
47
|
+
AXMMaintenanceIntervalTriggerLogic["Any"] = "any";
|
|
48
|
+
AXMMaintenanceIntervalTriggerLogic["All"] = "all";
|
|
49
|
+
})(AXMMaintenanceIntervalTriggerLogic || (AXMMaintenanceIntervalTriggerLogic = {}));
|
|
50
|
+
/** Unit stored on a meter trigger. Distance is the only kind with a choice. */
|
|
51
|
+
var AXMMaintenanceIntervalUnit;
|
|
52
|
+
(function (AXMMaintenanceIntervalUnit) {
|
|
53
|
+
AXMMaintenanceIntervalUnit["Kilometer"] = "kilometer";
|
|
54
|
+
AXMMaintenanceIntervalUnit["Mile"] = "mile";
|
|
55
|
+
AXMMaintenanceIntervalUnit["Hour"] = "hour";
|
|
56
|
+
AXMMaintenanceIntervalUnit["Operation"] = "operation";
|
|
57
|
+
})(AXMMaintenanceIntervalUnit || (AXMMaintenanceIntervalUnit = {}));
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region ----- Kind helpers -----
|
|
60
|
+
const KIND_SET = new Set(AXM_MAINTENANCE_INTERVAL_KINDS);
|
|
61
|
+
function isAXMMaintenanceIntervalKind(value) {
|
|
62
|
+
return KIND_SET.has(value);
|
|
89
63
|
}
|
|
90
|
-
function
|
|
91
|
-
|
|
92
|
-
|
|
64
|
+
function isAXMMaintenanceMeterKind(value) {
|
|
65
|
+
return value === 'distance' || value === 'operating-hours' || value === 'operation-count';
|
|
66
|
+
}
|
|
67
|
+
function defaultAXMMaintenanceIntervalUnit(kind) {
|
|
68
|
+
switch (kind) {
|
|
69
|
+
case 'distance':
|
|
70
|
+
return AXMMaintenanceIntervalUnit.Kilometer;
|
|
71
|
+
case 'operating-hours':
|
|
72
|
+
return AXMMaintenanceIntervalUnit.Hour;
|
|
73
|
+
case 'operation-count':
|
|
74
|
+
return AXMMaintenanceIntervalUnit.Operation;
|
|
93
75
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
const options = isRecord(item['command']['options']) ? item['command']['options'] : null;
|
|
104
|
-
const checklist = resolveChecklistId(options?.['checklist']);
|
|
105
|
-
if (checklist) {
|
|
106
|
-
return checklist;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
76
|
+
}
|
|
77
|
+
function isAXMMaintenanceIntervalUnitForKind(kind, unit) {
|
|
78
|
+
switch (kind) {
|
|
79
|
+
case 'distance':
|
|
80
|
+
return unit === AXMMaintenanceIntervalUnit.Kilometer || unit === AXMMaintenanceIntervalUnit.Mile;
|
|
81
|
+
case 'operating-hours':
|
|
82
|
+
return unit === AXMMaintenanceIntervalUnit.Hour;
|
|
83
|
+
case 'operation-count':
|
|
84
|
+
return unit === AXMMaintenanceIntervalUnit.Operation;
|
|
109
85
|
}
|
|
110
|
-
return '';
|
|
111
86
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
function buildIntervalWorkOrderOpenFormAction(input) {
|
|
115
|
-
return {
|
|
116
|
-
name: AXM_INTERVAL_OPEN_FORM_ACTION_NAME,
|
|
117
|
-
title: '@maintenance-management:work-orders.tasks.actions.open-form',
|
|
118
|
-
icon: 'fa-light fa-file-lines',
|
|
119
|
-
color: 'primary',
|
|
120
|
-
priority: 'primary',
|
|
121
|
-
command: {
|
|
122
|
-
name: AXMMaintenanceManagementCommandKeys.WorkOrder.OpenForm,
|
|
123
|
-
options: {
|
|
124
|
-
data: { id: input.workOrderId },
|
|
125
|
-
checklist: input.checklist,
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
};
|
|
87
|
+
function emptyAXMMaintenanceIntervalConfig() {
|
|
88
|
+
return { triggerLogic: AXMMaintenanceIntervalTriggerLogic.Any, triggers: [] };
|
|
129
89
|
}
|
|
130
|
-
function
|
|
90
|
+
function emptyAXMMaintenanceIntervalDraft() {
|
|
131
91
|
return {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
checklist: input.checklist,
|
|
142
|
-
},
|
|
92
|
+
triggerLogic: AXMMaintenanceIntervalTriggerLogic.Any,
|
|
93
|
+
scheduleEnabled: false,
|
|
94
|
+
schedule: null,
|
|
95
|
+
dateEnabled: false,
|
|
96
|
+
date: null,
|
|
97
|
+
meters: {
|
|
98
|
+
distance: { enabled: false, interval: null, unit: AXMMaintenanceIntervalUnit.Kilometer },
|
|
99
|
+
'operating-hours': { enabled: false, interval: null, unit: AXMMaintenanceIntervalUnit.Hour },
|
|
100
|
+
'operation-count': { enabled: false, interval: null, unit: AXMMaintenanceIntervalUnit.Operation },
|
|
143
101
|
},
|
|
144
102
|
};
|
|
145
103
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region ----- Normalize -----
|
|
106
|
+
function scheduleMode(value) {
|
|
107
|
+
if (!value || typeof value !== 'object') {
|
|
108
|
+
return '';
|
|
149
109
|
}
|
|
150
|
-
const
|
|
151
|
-
|
|
152
|
-
const name = typeof action['name'] === 'string' ? action['name'].trim() : '';
|
|
153
|
-
return name === AXM_INTERVAL_START_FLOW_ACTION_NAME || commandName === AXMMaintenanceManagementCommandKeys.WorkOrder.StartFlow;
|
|
110
|
+
const mode = value.mode;
|
|
111
|
+
return typeof mode === 'string' ? mode.trim() : '';
|
|
154
112
|
}
|
|
155
|
-
function
|
|
156
|
-
if (!
|
|
157
|
-
return
|
|
113
|
+
function scheduleStartDate(value) {
|
|
114
|
+
if (!value || typeof value !== 'object') {
|
|
115
|
+
return null;
|
|
158
116
|
}
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
const name = typeof action['name'] === 'string' ? action['name'].trim() : '';
|
|
162
|
-
return name === AXM_INTERVAL_SIGN_OFF_ACTION_NAME || commandName === AXMMaintenanceManagementCommandKeys.WorkOrder.SignOff;
|
|
117
|
+
const start = value.startCondition;
|
|
118
|
+
return start?.startDate ?? null;
|
|
163
119
|
}
|
|
164
|
-
function
|
|
165
|
-
if (!
|
|
120
|
+
function isSchedule(value) {
|
|
121
|
+
if (!value || typeof value !== 'object') {
|
|
166
122
|
return false;
|
|
167
123
|
}
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
const name = typeof action['name'] === 'string' ? action['name'].trim() : '';
|
|
171
|
-
return name === AXM_INTERVAL_OPEN_FORM_ACTION_NAME || commandName === AXMMaintenanceManagementCommandKeys.WorkOrder.OpenForm;
|
|
124
|
+
const record = value;
|
|
125
|
+
return typeof record.mode === 'string' || record.startCondition != null || typeof record.recurrence === 'string';
|
|
172
126
|
}
|
|
173
|
-
/**
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
const rewrite = (list) => {
|
|
183
|
-
const next = [];
|
|
184
|
-
for (const item of list) {
|
|
185
|
-
if (isIntervalStartFlowAction(item) || isIntervalOpenFormAction(item)) {
|
|
186
|
-
changed = true;
|
|
187
|
-
if (!placed) {
|
|
188
|
-
next.push(openFormAction);
|
|
189
|
-
placed = true;
|
|
190
|
-
}
|
|
191
|
-
continue;
|
|
192
|
-
}
|
|
193
|
-
next.push(item);
|
|
194
|
-
}
|
|
195
|
-
return next;
|
|
196
|
-
};
|
|
197
|
-
const prefix = rewrite(prefixSource);
|
|
198
|
-
const suffix = rewrite(suffixSource);
|
|
199
|
-
if (!placed) {
|
|
200
|
-
suffix.push(openFormAction);
|
|
201
|
-
changed = true;
|
|
127
|
+
/** Calendar day stored on a date interval, as `YYYY-MM-DD`. */
|
|
128
|
+
function readIntervalDate(value) {
|
|
129
|
+
const date = value instanceof Date
|
|
130
|
+
? value
|
|
131
|
+
: typeof value === 'string' && value.trim()
|
|
132
|
+
? new Date(value)
|
|
133
|
+
: null;
|
|
134
|
+
if (!date || Number.isNaN(date.getTime())) {
|
|
135
|
+
return null;
|
|
202
136
|
}
|
|
203
|
-
|
|
137
|
+
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
138
|
+
const day = String(date.getDate()).padStart(2, '0');
|
|
139
|
+
return `${date.getFullYear()}-${month}-${day}`;
|
|
204
140
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
function resolveIntervalChecklistViewerMode(statusId) {
|
|
211
|
-
const status = readStatusName(statusId);
|
|
212
|
-
if (status === 'completed') {
|
|
213
|
-
return 'readonly';
|
|
214
|
-
}
|
|
215
|
-
if (status === 'in-progress') {
|
|
216
|
-
return 'editable';
|
|
217
|
-
}
|
|
218
|
-
return 'unavailable';
|
|
141
|
+
function isUnit(value) {
|
|
142
|
+
return (value === AXMMaintenanceIntervalUnit.Kilometer ||
|
|
143
|
+
value === AXMMaintenanceIntervalUnit.Mile ||
|
|
144
|
+
value === AXMMaintenanceIntervalUnit.Hour ||
|
|
145
|
+
value === AXMMaintenanceIntervalUnit.Operation);
|
|
219
146
|
}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
147
|
+
function readTriggerLogic(value) {
|
|
148
|
+
return value === AXMMaintenanceIntervalTriggerLogic.All
|
|
149
|
+
? AXMMaintenanceIntervalTriggerLogic.All
|
|
150
|
+
: AXMMaintenanceIntervalTriggerLogic.Any;
|
|
151
|
+
}
|
|
152
|
+
function supportedKindSet(kinds) {
|
|
153
|
+
const set = new Set();
|
|
154
|
+
for (const kind of kinds) {
|
|
155
|
+
if (isAXMMaintenanceIntervalKind(kind)) {
|
|
156
|
+
set.add(kind);
|
|
157
|
+
}
|
|
224
158
|
}
|
|
225
|
-
|
|
226
|
-
|
|
159
|
+
return set;
|
|
160
|
+
}
|
|
161
|
+
function meterIssue(kind, interval) {
|
|
162
|
+
if (typeof interval !== 'number' || !Number.isFinite(interval) || interval <= 0) {
|
|
163
|
+
return 'interval';
|
|
227
164
|
}
|
|
228
|
-
if (
|
|
229
|
-
return '';
|
|
165
|
+
if (kind === 'operation-count' && !Number.isInteger(interval)) {
|
|
166
|
+
return 'integer';
|
|
230
167
|
}
|
|
231
|
-
|
|
232
|
-
next.add(value);
|
|
233
|
-
const record = value;
|
|
234
|
-
return (readStatusName(record['name'], next) ||
|
|
235
|
-
readStatusName(record['id'], next) ||
|
|
236
|
-
readStatusName(record['statusId'], next) ||
|
|
237
|
-
readStatusName(record['status'], next));
|
|
168
|
+
return null;
|
|
238
169
|
}
|
|
239
170
|
/**
|
|
240
|
-
*
|
|
241
|
-
*
|
|
171
|
+
* Builds the value object emitted by the interval editor.
|
|
172
|
+
* Unsupported, disabled, and invalid triggers are left out.
|
|
173
|
+
* Zero or one valid trigger always reports `any`.
|
|
242
174
|
*/
|
|
243
|
-
function
|
|
244
|
-
const
|
|
245
|
-
const
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
for (const item of list) {
|
|
256
|
-
if (isManaged(item)) {
|
|
257
|
-
changed = true;
|
|
258
|
-
if (!placed) {
|
|
259
|
-
next.push(...desired);
|
|
260
|
-
placed = true;
|
|
261
|
-
}
|
|
262
|
-
continue;
|
|
175
|
+
function buildAXMMaintenanceIntervalConfig(supportedIntervalKinds, draft) {
|
|
176
|
+
const supported = supportedKindSet(supportedIntervalKinds);
|
|
177
|
+
const triggers = [];
|
|
178
|
+
const errors = [];
|
|
179
|
+
if (supported.has('schedule') && draft.scheduleEnabled) {
|
|
180
|
+
const schedule = draft.schedule;
|
|
181
|
+
if (schedule && scheduleMode(schedule) === 'specific-date') {
|
|
182
|
+
if (readIntervalDate(scheduleStartDate(schedule))) {
|
|
183
|
+
triggers.push({ kind: 'schedule', schedule });
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
errors.push({ kind: 'schedule', code: 'date' });
|
|
263
187
|
}
|
|
264
|
-
next.push(item);
|
|
265
188
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
const prefix = rewrite(prefixSource);
|
|
269
|
-
const suffix = rewrite(suffixSource);
|
|
270
|
-
if (!placed) {
|
|
271
|
-
suffix.push(...desired);
|
|
272
|
-
changed = true;
|
|
273
|
-
}
|
|
274
|
-
return { prefix, suffix, changed: changed || !sameJson(actions, { prefix, suffix }) };
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* Cancellation from workflow-activity:sign-off is success:true with metadata.outcome Cancelled.
|
|
278
|
-
* Only an explicit Signed outcome with a signature continues.
|
|
279
|
-
*/
|
|
280
|
-
function readSignOffActivityOutcome(result) {
|
|
281
|
-
const outcome = text(result?.metadata?.outcome);
|
|
282
|
-
if (result?.success === false) {
|
|
283
|
-
return outcome === 'Cancelled' ? 'Cancelled' : 'Failed';
|
|
284
|
-
}
|
|
285
|
-
if (!result || outcome === 'Cancelled' || outcome !== 'Signed') {
|
|
286
|
-
return 'Cancelled';
|
|
287
|
-
}
|
|
288
|
-
const data = isRecord(result.data) ? result.data : null;
|
|
289
|
-
return text(data?.['signature']) ? 'Signed' : 'Cancelled';
|
|
290
|
-
}
|
|
291
|
-
function rewriteIntervalCardBookmarks(input) {
|
|
292
|
-
const workflowInstance = isRecord(input.instance['workflowInstance'])
|
|
293
|
-
? input.instance['workflowInstance']
|
|
294
|
-
: input.instance;
|
|
295
|
-
const bookmarks = readBookmarkList(workflowInstance['bookmarks']);
|
|
296
|
-
const definitionId = text(input.instance['definitionId']) || text(workflowInstance['definitionId']);
|
|
297
|
-
const checklist = readIntervalChecklistId(input.instance, readChecklistFromBookmarks(bookmarks));
|
|
298
|
-
const selected = new Set(selectIntervalBookmarks(bookmarks, input.workOrderId, text(input.sourceBookmarkId), definitionId).map((bookmark) => text(bookmark['id'])));
|
|
299
|
-
if (selected.size === 0) {
|
|
300
|
-
return { bookmarks, changed: false };
|
|
301
|
-
}
|
|
302
|
-
const description = input.mode === 'completed' ? AXM_INTERVAL_COMPLETED_TASK_DESCRIPTION : AXM_INTERVAL_IN_PROGRESS_TASK_DESCRIPTION;
|
|
303
|
-
const statusId = input.mode === 'completed' ? 'completed' : 'in-progress';
|
|
304
|
-
let changed = false;
|
|
305
|
-
const next = bookmarks.map((bookmark) => {
|
|
306
|
-
if (!selected.has(text(bookmark['id']))) {
|
|
307
|
-
return bookmark;
|
|
189
|
+
else if (isSchedule(schedule)) {
|
|
190
|
+
triggers.push({ kind: 'schedule', schedule });
|
|
308
191
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
return bookmark;
|
|
192
|
+
else {
|
|
193
|
+
errors.push({ kind: 'schedule', code: 'schedule' });
|
|
312
194
|
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
195
|
+
}
|
|
196
|
+
if (supported.has('date') && draft.dateEnabled) {
|
|
197
|
+
const date = readIntervalDate(draft.date);
|
|
198
|
+
if (date) {
|
|
199
|
+
triggers.push({ kind: 'date', date });
|
|
316
200
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
}, input.mode, { workOrderId: input.workOrderId, checklist });
|
|
323
|
-
payload['actions'] = { prefix: replaced.prefix, suffix: replaced.suffix };
|
|
324
|
-
payload['description'] = description;
|
|
325
|
-
payload['context'] = {
|
|
326
|
-
...context,
|
|
327
|
-
workOrderId: input.workOrderId,
|
|
328
|
-
statusId,
|
|
329
|
-
...(checklist ? { checklist } : {}),
|
|
330
|
-
};
|
|
331
|
-
if (JSON.stringify(payload) !== before) {
|
|
332
|
-
changed = true;
|
|
201
|
+
else if (!supported.has('schedule') && isSchedule(draft.schedule)) {
|
|
202
|
+
triggers.push({ kind: 'date', schedule: draft.schedule });
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
errors.push({ kind: 'date', code: 'date' });
|
|
333
206
|
}
|
|
334
|
-
return {
|
|
335
|
-
...bookmark,
|
|
336
|
-
payload,
|
|
337
|
-
payloadJson: JSON.stringify(payload),
|
|
338
|
-
};
|
|
339
|
-
});
|
|
340
|
-
return { bookmarks: next, changed };
|
|
341
|
-
}
|
|
342
|
-
function readBookmarkList(value) {
|
|
343
|
-
if (!Array.isArray(value)) {
|
|
344
|
-
return [];
|
|
345
|
-
}
|
|
346
|
-
return value.map((item) => (isRecord(item) ? { ...item } : null)).filter((item) => !!item);
|
|
347
|
-
}
|
|
348
|
-
function readPayload(bookmark) {
|
|
349
|
-
if (isRecord(bookmark['payload'])) {
|
|
350
|
-
return { ...bookmark['payload'] };
|
|
351
|
-
}
|
|
352
|
-
const payloadJson = bookmark['payloadJson'];
|
|
353
|
-
if (typeof payloadJson !== 'string' || !payloadJson.trim()) {
|
|
354
|
-
return null;
|
|
355
|
-
}
|
|
356
|
-
try {
|
|
357
|
-
const parsed = JSON.parse(payloadJson);
|
|
358
|
-
return isRecord(parsed) ? { ...parsed } : null;
|
|
359
|
-
}
|
|
360
|
-
catch {
|
|
361
|
-
return null;
|
|
362
207
|
}
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
const fromActions = readChecklistIdFromTaskActions(payload?.['actions']);
|
|
368
|
-
if (fromActions) {
|
|
369
|
-
return fromActions;
|
|
208
|
+
for (const kind of METER_KINDS) {
|
|
209
|
+
const meter = draft.meters[kind];
|
|
210
|
+
if (!supported.has(kind) || !meter.enabled) {
|
|
211
|
+
continue;
|
|
370
212
|
}
|
|
371
|
-
const
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
213
|
+
const issue = meterIssue(kind, meter.interval);
|
|
214
|
+
if (issue) {
|
|
215
|
+
errors.push({ kind, code: issue });
|
|
216
|
+
continue;
|
|
375
217
|
}
|
|
218
|
+
const unit = isAXMMaintenanceIntervalUnitForKind(kind, meter.unit)
|
|
219
|
+
? meter.unit
|
|
220
|
+
: defaultAXMMaintenanceIntervalUnit(kind);
|
|
221
|
+
triggers.push({ kind, interval: meter.interval, unit });
|
|
376
222
|
}
|
|
377
|
-
|
|
223
|
+
const triggerLogic = triggers.length > 1 && draft.triggerLogic === AXMMaintenanceIntervalTriggerLogic.All
|
|
224
|
+
? AXMMaintenanceIntervalTriggerLogic.All
|
|
225
|
+
: AXMMaintenanceIntervalTriggerLogic.Any;
|
|
226
|
+
return { config: { triggerLogic, triggers }, errors };
|
|
378
227
|
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
228
|
+
/**
|
|
229
|
+
* Date trigger schedule, or a legacy scheduler-picker object stored before interval configs.
|
|
230
|
+
* Meter-only configs have no calendar schedule.
|
|
231
|
+
*/
|
|
232
|
+
function readMaintenancePlanCalendarSchedule(value) {
|
|
233
|
+
if (!value || typeof value !== 'object') {
|
|
234
|
+
return undefined;
|
|
235
|
+
}
|
|
236
|
+
const record = value;
|
|
237
|
+
if (Array.isArray(record.triggers)) {
|
|
238
|
+
for (const item of record.triggers) {
|
|
239
|
+
if (!item || typeof item !== 'object') {
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
242
|
+
const kind = item.kind;
|
|
243
|
+
if (kind !== 'date' && kind !== 'schedule') {
|
|
244
|
+
continue;
|
|
245
|
+
}
|
|
246
|
+
const schedule = item.schedule;
|
|
247
|
+
if (isSchedule(schedule)) {
|
|
248
|
+
return schedule;
|
|
249
|
+
}
|
|
385
250
|
}
|
|
251
|
+
return undefined;
|
|
386
252
|
}
|
|
387
|
-
if (
|
|
388
|
-
return
|
|
253
|
+
if (record.mode != null || record.startCondition != null || record.recurrence != null) {
|
|
254
|
+
return value;
|
|
389
255
|
}
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
256
|
+
return undefined;
|
|
257
|
+
}
|
|
258
|
+
/** Reads a stored config into editor state. Kinds outside `supportedIntervalKinds` are dropped. */
|
|
259
|
+
function draftFromAXMMaintenanceIntervalConfig(value, supportedIntervalKinds) {
|
|
260
|
+
const draft = emptyAXMMaintenanceIntervalDraft();
|
|
261
|
+
const supported = supportedKindSet(supportedIntervalKinds);
|
|
262
|
+
if (!value || typeof value !== 'object') {
|
|
263
|
+
return draft;
|
|
393
264
|
}
|
|
394
|
-
const
|
|
395
|
-
|
|
396
|
-
|
|
265
|
+
const record = value;
|
|
266
|
+
draft.triggerLogic = readTriggerLogic(record.triggerLogic);
|
|
267
|
+
if (!Array.isArray(record.triggers)) {
|
|
268
|
+
return draft;
|
|
269
|
+
}
|
|
270
|
+
for (const item of record.triggers) {
|
|
271
|
+
if (!item || typeof item !== 'object' || !('kind' in item) || typeof item.kind !== 'string') {
|
|
272
|
+
continue;
|
|
397
273
|
}
|
|
398
|
-
const
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
274
|
+
const kind = item.kind;
|
|
275
|
+
if (kind === 'date') {
|
|
276
|
+
const schedule = item.schedule;
|
|
277
|
+
const date = readIntervalDate(item.date);
|
|
278
|
+
if (isSchedule(schedule) && supported.has('schedule') && !draft.scheduleEnabled) {
|
|
279
|
+
draft.scheduleEnabled = true;
|
|
280
|
+
draft.schedule = schedule;
|
|
281
|
+
}
|
|
282
|
+
if (!supported.has('date')) {
|
|
283
|
+
continue;
|
|
284
|
+
}
|
|
285
|
+
if (date) {
|
|
286
|
+
draft.dateEnabled = true;
|
|
287
|
+
draft.date = date;
|
|
288
|
+
}
|
|
289
|
+
else if (isSchedule(schedule) && !supported.has('schedule')) {
|
|
290
|
+
draft.dateEnabled = true;
|
|
291
|
+
draft.schedule = schedule;
|
|
292
|
+
}
|
|
293
|
+
continue;
|
|
294
|
+
}
|
|
295
|
+
if (!isAXMMaintenanceIntervalKind(kind) || !supported.has(kind)) {
|
|
296
|
+
continue;
|
|
297
|
+
}
|
|
298
|
+
if (kind === 'schedule') {
|
|
299
|
+
const schedule = item.schedule;
|
|
300
|
+
if (!isSchedule(schedule) || draft.scheduleEnabled) {
|
|
301
|
+
continue;
|
|
302
|
+
}
|
|
303
|
+
draft.scheduleEnabled = true;
|
|
304
|
+
draft.schedule = schedule;
|
|
305
|
+
continue;
|
|
306
|
+
}
|
|
307
|
+
if (!isAXMMaintenanceMeterKind(kind)) {
|
|
308
|
+
continue;
|
|
309
|
+
}
|
|
310
|
+
const meter = draft.meters[kind];
|
|
311
|
+
if (meter.enabled) {
|
|
312
|
+
continue;
|
|
313
|
+
}
|
|
314
|
+
const interval = item.interval;
|
|
315
|
+
const unit = item.unit;
|
|
316
|
+
if (meterIssue(kind, typeof interval === 'number' ? interval : null)) {
|
|
317
|
+
continue;
|
|
318
|
+
}
|
|
319
|
+
meter.enabled = true;
|
|
320
|
+
meter.interval = interval;
|
|
321
|
+
meter.unit = isUnit(unit) && isAXMMaintenanceIntervalUnitForKind(kind, unit) ? unit : defaultAXMMaintenanceIntervalUnit(kind);
|
|
322
|
+
}
|
|
323
|
+
return draft;
|
|
410
324
|
}
|
|
411
325
|
//#endregion
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
if (auditAt instanceof Date && !Number.isNaN(auditAt.getTime())) {
|
|
422
|
-
return auditAt.toISOString();
|
|
326
|
+
|
|
327
|
+
//#region ----- Constants -----
|
|
328
|
+
/** Seeded inspection workflow. It collects meters and does not replace interval-plan triggers. */
|
|
329
|
+
const AXM_INSPECTION_WORK_ORDER_WORKFLOW_NAME = 'maintenance-inspection-work-order';
|
|
330
|
+
const AXM_INSPECTION_USAGE_KINDS_INPUT = 'usageKinds';
|
|
331
|
+
const DEFAULT_USAGE_KIND = 'distance';
|
|
332
|
+
function readKindToken(value) {
|
|
333
|
+
if (typeof value === 'string') {
|
|
334
|
+
return value.trim();
|
|
423
335
|
}
|
|
424
|
-
if (typeof
|
|
425
|
-
return
|
|
336
|
+
if (value && typeof value === 'object' && 'id' in value && typeof value.id === 'string') {
|
|
337
|
+
return value.id.trim();
|
|
426
338
|
}
|
|
427
339
|
return '';
|
|
428
340
|
}
|
|
429
|
-
/**
|
|
430
|
-
function
|
|
431
|
-
const
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
return [...withId].sort((left, right) => {
|
|
436
|
-
const leftAt = createdStamp(left);
|
|
437
|
-
const rightAt = createdStamp(right);
|
|
438
|
-
if (leftAt && rightAt && leftAt !== rightAt) {
|
|
439
|
-
return leftAt < rightAt ? -1 : 1;
|
|
440
|
-
}
|
|
441
|
-
if (leftAt && !rightAt) {
|
|
442
|
-
return -1;
|
|
443
|
-
}
|
|
444
|
-
if (!leftAt && rightAt) {
|
|
445
|
-
return 1;
|
|
446
|
-
}
|
|
447
|
-
const leftId = text(left.id);
|
|
448
|
-
const rightId = text(right.id);
|
|
449
|
-
if (leftId === rightId) {
|
|
450
|
-
return 0;
|
|
341
|
+
/** Meter kinds an asset type can collect. Schedule and date stay on the plan, not on this input. */
|
|
342
|
+
function collectableUsageKinds(supported) {
|
|
343
|
+
const kinds = [];
|
|
344
|
+
for (const kind of supported) {
|
|
345
|
+
if (isAXMMaintenanceMeterKind(kind) && !kinds.includes(kind)) {
|
|
346
|
+
kinds.push(kind);
|
|
451
347
|
}
|
|
452
|
-
|
|
453
|
-
|
|
348
|
+
}
|
|
349
|
+
return kinds;
|
|
454
350
|
}
|
|
455
351
|
/**
|
|
456
|
-
*
|
|
457
|
-
*
|
|
352
|
+
* Readings to collect for one inspection template or instance.
|
|
353
|
+
* An empty selection defaults to distance when that meter is supported.
|
|
354
|
+
* Distance cannot stay selected when the asset type does not support it.
|
|
458
355
|
*/
|
|
459
|
-
function
|
|
460
|
-
const
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
const
|
|
465
|
-
|
|
466
|
-
|
|
356
|
+
function resolveInspectionUsageKinds(value, supported) {
|
|
357
|
+
const allowed = collectableUsageKinds(supported);
|
|
358
|
+
if (value != null && !Array.isArray(value)) {
|
|
359
|
+
return { kinds: [], issue: 'unsupported' };
|
|
360
|
+
}
|
|
361
|
+
const selected = [];
|
|
362
|
+
for (const item of Array.isArray(value) ? value : []) {
|
|
363
|
+
const token = readKindToken(item);
|
|
364
|
+
if (!token) {
|
|
365
|
+
continue;
|
|
366
|
+
}
|
|
367
|
+
if (!isAXMMaintenanceMeterKind(token) || !allowed.includes(token)) {
|
|
368
|
+
return { kinds: [], issue: token === DEFAULT_USAGE_KIND ? 'distance-unsupported' : 'unsupported' };
|
|
369
|
+
}
|
|
370
|
+
if (!selected.includes(token)) {
|
|
371
|
+
selected.push(token);
|
|
372
|
+
}
|
|
467
373
|
}
|
|
468
|
-
if (
|
|
469
|
-
|
|
374
|
+
if (selected.length === 0) {
|
|
375
|
+
if (!allowed.includes(DEFAULT_USAGE_KIND)) {
|
|
376
|
+
return { kinds: [], issue: 'distance-unsupported' };
|
|
377
|
+
}
|
|
378
|
+
return { kinds: [DEFAULT_USAGE_KIND], issue: null };
|
|
470
379
|
}
|
|
471
|
-
|
|
472
|
-
|
|
380
|
+
return { kinds: selected, issue: null };
|
|
381
|
+
}
|
|
382
|
+
function readInspectionUsageKinds(source) {
|
|
383
|
+
const workflowInstance = source?.['workflowInstance'] && typeof source['workflowInstance'] === 'object'
|
|
384
|
+
? source['workflowInstance']
|
|
385
|
+
: source;
|
|
386
|
+
const workflowState = workflowInstance?.['workflowState'] && typeof workflowInstance['workflowState'] === 'object'
|
|
387
|
+
? workflowInstance['workflowState']
|
|
473
388
|
: null;
|
|
474
|
-
|
|
389
|
+
const input = workflowState?.['input'] && typeof workflowState['input'] === 'object'
|
|
390
|
+
? workflowState['input']
|
|
391
|
+
: null;
|
|
392
|
+
const raw = input?.[AXM_INSPECTION_USAGE_KINDS_INPUT] ?? source?.[AXM_INSPECTION_USAGE_KINDS_INPUT];
|
|
393
|
+
if (!Array.isArray(raw)) {
|
|
394
|
+
return [];
|
|
395
|
+
}
|
|
396
|
+
return raw.map(readKindToken).filter((kind) => isAXMMaintenanceMeterKind(kind));
|
|
475
397
|
}
|
|
476
398
|
//#endregion
|
|
477
399
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
const
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
400
|
+
//#region ----- Constants -----
|
|
401
|
+
/** Bookmark action that starts an interval work order. */
|
|
402
|
+
const AXM_INTERVAL_START_FLOW_ACTION_NAME = 'start-flow';
|
|
403
|
+
/** Bookmark action that opens the in-progress checklist form. */
|
|
404
|
+
const AXM_INTERVAL_OPEN_FORM_ACTION_NAME = 'open-form';
|
|
405
|
+
/** Bookmark action that collects a signature and completes the interval work order. */
|
|
406
|
+
const AXM_INTERVAL_SIGN_OFF_ACTION_NAME = 'sign-off';
|
|
407
|
+
/** Seeded interval workflow name. The task-board card belongs to this instance. */
|
|
408
|
+
const AXM_INTERVAL_WORK_ORDER_WORKFLOW_NAME = 'maintenance-interval-work-order';
|
|
409
|
+
const AXM_INTERVAL_DUE_ACTIVITY_ID = 'intervalDueHumanTask';
|
|
410
|
+
/** Workflow variable / instance property for the checklist case of this work order. */
|
|
411
|
+
const AXM_INTERVAL_CHECKLIST_CASE_ID = 'assessmentCaseId';
|
|
412
|
+
/** Workflow variable / instance property for the checklist session of this work order. */
|
|
413
|
+
const AXM_INTERVAL_CHECKLIST_SESSION_ID = 'assessmentSessionId';
|
|
414
|
+
/** Workflow variable storing the template questionnaire this occurrence was opened against. */
|
|
415
|
+
const AXM_INTERVAL_CHECKLIST_QUESTIONNAIRE_ID = 'checklistQuestionnaireId';
|
|
416
|
+
/** Short-lived claim so concurrent Open Form clicks create one case and session. */
|
|
417
|
+
const AXM_INTERVAL_CHECKLIST_CLAIM = 'checklistOccurrenceClaim';
|
|
418
|
+
const AXM_INTERVAL_IN_PROGRESS_TASK_DESCRIPTION = '@maintenance-management:work-orders.tasks.interval-due.in-progress-description';
|
|
419
|
+
const AXM_INTERVAL_COMPLETED_TASK_DESCRIPTION = '@maintenance-management:work-orders.tasks.interval-due.completed-description';
|
|
420
|
+
//#endregion
|
|
421
|
+
//#region ----- Checklist id -----
|
|
422
|
+
function isRecord(value) {
|
|
423
|
+
return value != null && typeof value === 'object' && !Array.isArray(value);
|
|
424
|
+
}
|
|
425
|
+
function resolveChecklistId(value) {
|
|
426
|
+
if (typeof value === 'string') {
|
|
427
|
+
return value.trim();
|
|
428
|
+
}
|
|
429
|
+
if (isRecord(value)) {
|
|
430
|
+
return resolveChecklistId(value['id']);
|
|
431
|
+
}
|
|
432
|
+
return '';
|
|
433
|
+
}
|
|
510
434
|
/**
|
|
511
|
-
*
|
|
512
|
-
*
|
|
435
|
+
* Questionnaire for this interval occurrence.
|
|
436
|
+
* `workflowState.input.checklist` wins over a task-action or command fallback.
|
|
513
437
|
*/
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
438
|
+
function readIntervalChecklistId(source, fallback) {
|
|
439
|
+
const workflowInstance = isRecord(source?.['workflowInstance'])
|
|
440
|
+
? source['workflowInstance']
|
|
441
|
+
: source;
|
|
442
|
+
const workflowState = isRecord(workflowInstance?.['workflowState'])
|
|
443
|
+
? workflowInstance['workflowState']
|
|
444
|
+
: null;
|
|
445
|
+
const input = isRecord(workflowState?.['input']) ? workflowState['input'] : null;
|
|
446
|
+
const properties = isRecord(workflowState?.['properties'])
|
|
447
|
+
? workflowState['properties']
|
|
448
|
+
: null;
|
|
449
|
+
return (resolveChecklistId(input?.['checklist']) ||
|
|
450
|
+
resolveChecklistId(input?.['preChecklistQuestionnaireId']) ||
|
|
451
|
+
resolveChecklistId(properties?.[AXM_INTERVAL_CHECKLIST_QUESTIONNAIRE_ID]) ||
|
|
452
|
+
resolveChecklistId(properties?.['checklist']) ||
|
|
453
|
+
resolveChecklistId(fallback));
|
|
454
|
+
}
|
|
455
|
+
function readChecklistIdFromTaskActions(actions) {
|
|
456
|
+
if (!isRecord(actions)) {
|
|
457
|
+
return '';
|
|
458
|
+
}
|
|
459
|
+
const lists = [actions['prefix'], actions['suffix']];
|
|
460
|
+
for (const list of lists) {
|
|
461
|
+
if (!Array.isArray(list)) {
|
|
462
|
+
continue;
|
|
463
|
+
}
|
|
464
|
+
for (const item of list) {
|
|
465
|
+
if (!isRecord(item) || !isRecord(item['command'])) {
|
|
466
|
+
continue;
|
|
467
|
+
}
|
|
468
|
+
const options = isRecord(item['command']['options']) ? item['command']['options'] : null;
|
|
469
|
+
const checklist = resolveChecklistId(options?.['checklist']);
|
|
470
|
+
if (checklist) {
|
|
471
|
+
return checklist;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
return '';
|
|
476
|
+
}
|
|
477
|
+
//#endregion
|
|
478
|
+
//#region ----- Task action -----
|
|
479
|
+
function buildIntervalWorkOrderOpenFormAction(input) {
|
|
522
480
|
return {
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
481
|
+
name: AXM_INTERVAL_OPEN_FORM_ACTION_NAME,
|
|
482
|
+
title: '@maintenance-management:work-orders.tasks.actions.open-form',
|
|
483
|
+
icon: 'fa-light fa-file-lines',
|
|
484
|
+
color: 'primary',
|
|
485
|
+
priority: 'primary',
|
|
486
|
+
command: {
|
|
487
|
+
name: AXMMaintenanceManagementCommandKeys.WorkOrder.OpenForm,
|
|
488
|
+
options: {
|
|
489
|
+
data: { id: input.workOrderId },
|
|
490
|
+
checklist: input.checklist,
|
|
491
|
+
...(input.usageKinds ? { usageKinds: input.usageKinds } : {}),
|
|
492
|
+
},
|
|
493
|
+
},
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
function buildIntervalWorkOrderSignOffAction(input) {
|
|
497
|
+
return {
|
|
498
|
+
name: AXM_INTERVAL_SIGN_OFF_ACTION_NAME,
|
|
499
|
+
title: '@maintenance-management:work-orders.tasks.actions.sign-off',
|
|
500
|
+
icon: 'fa-light fa-file-signature',
|
|
501
|
+
color: 'primary',
|
|
502
|
+
priority: 'primary',
|
|
503
|
+
command: {
|
|
504
|
+
name: AXMMaintenanceManagementCommandKeys.WorkOrder.SignOff,
|
|
505
|
+
options: {
|
|
506
|
+
data: { id: input.workOrderId },
|
|
507
|
+
checklist: input.checklist,
|
|
508
|
+
...(input.usageKinds ? { usageKinds: input.usageKinds } : {}),
|
|
509
|
+
},
|
|
510
|
+
},
|
|
528
511
|
};
|
|
529
512
|
}
|
|
513
|
+
function isIntervalStartFlowAction(action) {
|
|
514
|
+
if (!isRecord(action)) {
|
|
515
|
+
return false;
|
|
516
|
+
}
|
|
517
|
+
const command = isRecord(action['command']) ? action['command'] : null;
|
|
518
|
+
const commandName = typeof command?.['name'] === 'string' ? command['name'].trim() : '';
|
|
519
|
+
const name = typeof action['name'] === 'string' ? action['name'].trim() : '';
|
|
520
|
+
return name === AXM_INTERVAL_START_FLOW_ACTION_NAME || commandName === AXMMaintenanceManagementCommandKeys.WorkOrder.StartFlow;
|
|
521
|
+
}
|
|
522
|
+
function isIntervalSignOffAction(action) {
|
|
523
|
+
if (!isRecord(action)) {
|
|
524
|
+
return false;
|
|
525
|
+
}
|
|
526
|
+
const command = isRecord(action['command']) ? action['command'] : null;
|
|
527
|
+
const commandName = typeof command?.['name'] === 'string' ? command['name'].trim() : '';
|
|
528
|
+
const name = typeof action['name'] === 'string' ? action['name'].trim() : '';
|
|
529
|
+
return name === AXM_INTERVAL_SIGN_OFF_ACTION_NAME || commandName === AXMMaintenanceManagementCommandKeys.WorkOrder.SignOff;
|
|
530
|
+
}
|
|
531
|
+
function isIntervalOpenFormAction(action) {
|
|
532
|
+
if (!isRecord(action)) {
|
|
533
|
+
return false;
|
|
534
|
+
}
|
|
535
|
+
const command = isRecord(action['command']) ? action['command'] : null;
|
|
536
|
+
const commandName = typeof command?.['name'] === 'string' ? command['name'].trim() : '';
|
|
537
|
+
const name = typeof action['name'] === 'string' ? action['name'].trim() : '';
|
|
538
|
+
return name === AXM_INTERVAL_OPEN_FORM_ACTION_NAME || commandName === AXMMaintenanceManagementCommandKeys.WorkOrder.OpenForm;
|
|
539
|
+
}
|
|
530
540
|
/**
|
|
531
|
-
*
|
|
532
|
-
*
|
|
541
|
+
* Replaces Start Flow with a single Open Form action.
|
|
542
|
+
* A second call refreshes that action and does not add another button.
|
|
533
543
|
*/
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
var AXMWorkOrderStatus;
|
|
563
|
-
(function (AXMWorkOrderStatus) {
|
|
564
|
-
AXMWorkOrderStatus["Planned"] = "planned";
|
|
565
|
-
AXMWorkOrderStatus["Scheduled"] = "scheduled";
|
|
566
|
-
AXMWorkOrderStatus["Assigned"] = "assigned";
|
|
567
|
-
AXMWorkOrderStatus["InProgress"] = "in-progress";
|
|
568
|
-
AXMWorkOrderStatus["OnHold"] = "on-hold";
|
|
569
|
-
AXMWorkOrderStatus["Completed"] = "completed";
|
|
570
|
-
AXMWorkOrderStatus["SignedOff"] = "signed-off";
|
|
571
|
-
AXMWorkOrderStatus["Cancelled"] = "cancelled";
|
|
572
|
-
})(AXMWorkOrderStatus || (AXMWorkOrderStatus = {}));
|
|
573
|
-
//#endregion
|
|
574
|
-
|
|
575
|
-
//#region ---- Source type enum ----
|
|
576
|
-
var AXMWorkOrderSourceType;
|
|
577
|
-
(function (AXMWorkOrderSourceType) {
|
|
578
|
-
AXMWorkOrderSourceType["Manual"] = "manual";
|
|
579
|
-
AXMWorkOrderSourceType["MaintenancePlan"] = "maintenance-plan";
|
|
580
|
-
AXMWorkOrderSourceType["CreateAsset"] = "create-asset";
|
|
581
|
-
AXMWorkOrderSourceType["FailureRegister"] = "failure-register";
|
|
582
|
-
})(AXMWorkOrderSourceType || (AXMWorkOrderSourceType = {}));
|
|
583
|
-
//#endregion
|
|
584
|
-
|
|
585
|
-
//#region ---- Status names ----
|
|
586
|
-
var AXMFailureRegisterStatus;
|
|
587
|
-
(function (AXMFailureRegisterStatus) {
|
|
588
|
-
AXMFailureRegisterStatus["Reported"] = "reported";
|
|
589
|
-
AXMFailureRegisterStatus["UnderReview"] = "underReview";
|
|
590
|
-
AXMFailureRegisterStatus["WorkOrderRequired"] = "workOrderRequired";
|
|
591
|
-
AXMFailureRegisterStatus["WorkOrderCreated"] = "workOrderCreated";
|
|
592
|
-
AXMFailureRegisterStatus["InProgress"] = "inProgress";
|
|
593
|
-
AXMFailureRegisterStatus["Resolved"] = "resolved";
|
|
594
|
-
AXMFailureRegisterStatus["FollowUpRequired"] = "followUpRequired";
|
|
595
|
-
AXMFailureRegisterStatus["Rejected"] = "rejected";
|
|
596
|
-
AXMFailureRegisterStatus["Duplicate"] = "duplicate";
|
|
597
|
-
AXMFailureRegisterStatus["Closed"] = "closed";
|
|
598
|
-
})(AXMFailureRegisterStatus || (AXMFailureRegisterStatus = {}));
|
|
599
|
-
//#endregion
|
|
600
|
-
|
|
601
|
-
//#region ----- Constants -----
|
|
602
|
-
/** Widget name for the maintenance interval editor. Kind strings match `AXMAssetIntervalKind`. */
|
|
603
|
-
const AXM_MAINTENANCE_INTERVAL_WIDGET = 'maintenance-interval-editor';
|
|
544
|
+
function replaceIntervalStartFlowActions(actions, openFormAction) {
|
|
545
|
+
const prefixSource = Array.isArray(actions?.prefix) ? actions.prefix : [];
|
|
546
|
+
const suffixSource = Array.isArray(actions?.suffix) ? actions.suffix : [];
|
|
547
|
+
let changed = false;
|
|
548
|
+
let placed = false;
|
|
549
|
+
const rewrite = (list) => {
|
|
550
|
+
const next = [];
|
|
551
|
+
for (const item of list) {
|
|
552
|
+
if (isIntervalStartFlowAction(item) || isIntervalOpenFormAction(item)) {
|
|
553
|
+
changed = true;
|
|
554
|
+
if (!placed) {
|
|
555
|
+
next.push(openFormAction);
|
|
556
|
+
placed = true;
|
|
557
|
+
}
|
|
558
|
+
continue;
|
|
559
|
+
}
|
|
560
|
+
next.push(item);
|
|
561
|
+
}
|
|
562
|
+
return next;
|
|
563
|
+
};
|
|
564
|
+
const prefix = rewrite(prefixSource);
|
|
565
|
+
const suffix = rewrite(suffixSource);
|
|
566
|
+
if (!placed) {
|
|
567
|
+
suffix.push(openFormAction);
|
|
568
|
+
changed = true;
|
|
569
|
+
}
|
|
570
|
+
return { prefix, suffix, changed };
|
|
571
|
+
}
|
|
604
572
|
/**
|
|
605
|
-
*
|
|
606
|
-
*
|
|
573
|
+
* Completed checklists reopen read-only. In Progress stays editable.
|
|
574
|
+
* Accepts the stored status string or a status object (`name` / `id`).
|
|
575
|
+
* Any other status cannot open this card's form.
|
|
607
576
|
*/
|
|
608
|
-
|
|
609
|
-
const
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
var AXMMaintenanceIntervalUnit;
|
|
618
|
-
(function (AXMMaintenanceIntervalUnit) {
|
|
619
|
-
AXMMaintenanceIntervalUnit["Kilometer"] = "kilometer";
|
|
620
|
-
AXMMaintenanceIntervalUnit["Mile"] = "mile";
|
|
621
|
-
AXMMaintenanceIntervalUnit["Hour"] = "hour";
|
|
622
|
-
AXMMaintenanceIntervalUnit["Operation"] = "operation";
|
|
623
|
-
})(AXMMaintenanceIntervalUnit || (AXMMaintenanceIntervalUnit = {}));
|
|
624
|
-
//#endregion
|
|
625
|
-
//#region ----- Kind helpers -----
|
|
626
|
-
const KIND_SET = new Set(AXM_MAINTENANCE_INTERVAL_KINDS);
|
|
627
|
-
function isAXMMaintenanceIntervalKind(value) {
|
|
628
|
-
return KIND_SET.has(value);
|
|
629
|
-
}
|
|
630
|
-
function isAXMMaintenanceMeterKind(value) {
|
|
631
|
-
return value === 'distance' || value === 'operating-hours' || value === 'operation-count';
|
|
577
|
+
function resolveIntervalChecklistViewerMode(statusId) {
|
|
578
|
+
const status = readStatusName(statusId);
|
|
579
|
+
if (status === 'completed') {
|
|
580
|
+
return 'readonly';
|
|
581
|
+
}
|
|
582
|
+
if (status === 'in-progress') {
|
|
583
|
+
return 'editable';
|
|
584
|
+
}
|
|
585
|
+
return 'unavailable';
|
|
632
586
|
}
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
587
|
+
/** Status plugin values are a name string or an object with `name` / `id`. */
|
|
588
|
+
function readStatusName(value, seen) {
|
|
589
|
+
if (typeof value === 'string') {
|
|
590
|
+
return value.trim();
|
|
591
|
+
}
|
|
592
|
+
if (value == null || typeof value !== 'object' || Array.isArray(value)) {
|
|
593
|
+
return '';
|
|
594
|
+
}
|
|
595
|
+
if (seen?.has(value)) {
|
|
596
|
+
return '';
|
|
641
597
|
}
|
|
598
|
+
const next = seen ?? new Set();
|
|
599
|
+
next.add(value);
|
|
600
|
+
const record = value;
|
|
601
|
+
return (readStatusName(record['name'], next) ||
|
|
602
|
+
readStatusName(record['id'], next) ||
|
|
603
|
+
readStatusName(record['statusId'], next) ||
|
|
604
|
+
readStatusName(record['status'], next));
|
|
642
605
|
}
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
606
|
+
/**
|
|
607
|
+
* In Progress cards show Open Form, then Sign Off.
|
|
608
|
+
* Completed cards keep Open Form and drop Sign Off. Other actions, including History, stay where they are.
|
|
609
|
+
*/
|
|
610
|
+
function applyIntervalWorkOrderCardActions(actions, mode, input) {
|
|
611
|
+
const openForm = buildIntervalWorkOrderOpenFormAction(input);
|
|
612
|
+
const desired = mode === 'completed'
|
|
613
|
+
? [openForm]
|
|
614
|
+
: [openForm, buildIntervalWorkOrderSignOffAction(input)];
|
|
615
|
+
const prefixSource = Array.isArray(actions?.prefix) ? actions.prefix : [];
|
|
616
|
+
const suffixSource = Array.isArray(actions?.suffix) ? actions.suffix : [];
|
|
617
|
+
let changed = false;
|
|
618
|
+
let placed = false;
|
|
619
|
+
const isManaged = (item) => isIntervalStartFlowAction(item) || isIntervalOpenFormAction(item) || isIntervalSignOffAction(item);
|
|
620
|
+
const rewrite = (list) => {
|
|
621
|
+
const next = [];
|
|
622
|
+
for (const item of list) {
|
|
623
|
+
if (isManaged(item)) {
|
|
624
|
+
changed = true;
|
|
625
|
+
if (!placed) {
|
|
626
|
+
next.push(...desired);
|
|
627
|
+
placed = true;
|
|
628
|
+
}
|
|
629
|
+
continue;
|
|
630
|
+
}
|
|
631
|
+
next.push(item);
|
|
632
|
+
}
|
|
633
|
+
return next;
|
|
634
|
+
};
|
|
635
|
+
const prefix = rewrite(prefixSource);
|
|
636
|
+
const suffix = rewrite(suffixSource);
|
|
637
|
+
if (!placed) {
|
|
638
|
+
suffix.push(...desired);
|
|
639
|
+
changed = true;
|
|
651
640
|
}
|
|
641
|
+
return { prefix, suffix, changed: changed || !sameJson(actions, { prefix, suffix }) };
|
|
652
642
|
}
|
|
653
|
-
|
|
654
|
-
|
|
643
|
+
/**
|
|
644
|
+
* Cancellation from workflow-activity:sign-off is success:true with metadata.outcome Cancelled.
|
|
645
|
+
* Only an explicit Signed outcome with a signature continues.
|
|
646
|
+
*/
|
|
647
|
+
function readSignOffActivityOutcome(result) {
|
|
648
|
+
const outcome = text(result?.metadata?.outcome);
|
|
649
|
+
if (result?.success === false) {
|
|
650
|
+
return outcome === 'Cancelled' ? 'Cancelled' : 'Failed';
|
|
651
|
+
}
|
|
652
|
+
if (!result || outcome === 'Cancelled' || outcome !== 'Signed') {
|
|
653
|
+
return 'Cancelled';
|
|
654
|
+
}
|
|
655
|
+
const data = isRecord(result.data) ? result.data : null;
|
|
656
|
+
return text(data?.['signature']) ? 'Signed' : 'Cancelled';
|
|
655
657
|
}
|
|
656
|
-
function
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
658
|
+
function rewriteIntervalCardBookmarks(input) {
|
|
659
|
+
const workflowInstance = isRecord(input.instance['workflowInstance'])
|
|
660
|
+
? input.instance['workflowInstance']
|
|
661
|
+
: input.instance;
|
|
662
|
+
const bookmarks = readBookmarkList(workflowInstance['bookmarks']);
|
|
663
|
+
const definitionId = text(input.instance['definitionId']) || text(workflowInstance['definitionId']);
|
|
664
|
+
const checklist = readIntervalChecklistId(input.instance, readChecklistFromBookmarks(bookmarks));
|
|
665
|
+
const usageKinds = readInspectionUsageKinds(input.instance).join(',');
|
|
666
|
+
const selected = new Set(selectIntervalBookmarks(bookmarks, input.workOrderId, text(input.sourceBookmarkId), definitionId).map((bookmark) => text(bookmark['id'])));
|
|
667
|
+
if (selected.size === 0) {
|
|
668
|
+
return { bookmarks, changed: false };
|
|
669
|
+
}
|
|
670
|
+
const inspectionCard = definitionId === AXM_INSPECTION_WORK_ORDER_WORKFLOW_NAME;
|
|
671
|
+
const description = inspectionCard
|
|
672
|
+
? input.mode === 'completed'
|
|
673
|
+
? '@maintenance-management:work-orders.tasks.inspection.completed-description'
|
|
674
|
+
: '@maintenance-management:work-orders.tasks.inspection.in-progress-description'
|
|
675
|
+
: input.mode === 'completed'
|
|
676
|
+
? AXM_INTERVAL_COMPLETED_TASK_DESCRIPTION
|
|
677
|
+
: AXM_INTERVAL_IN_PROGRESS_TASK_DESCRIPTION;
|
|
678
|
+
const statusId = input.mode === 'completed' ? 'completed' : 'in-progress';
|
|
679
|
+
let changed = false;
|
|
680
|
+
const next = bookmarks.map((bookmark) => {
|
|
681
|
+
if (!selected.has(text(bookmark['id']))) {
|
|
682
|
+
return bookmark;
|
|
683
|
+
}
|
|
684
|
+
const payload = readPayload(bookmark);
|
|
685
|
+
if (!payload) {
|
|
686
|
+
return bookmark;
|
|
687
|
+
}
|
|
688
|
+
const before = JSON.stringify(payload);
|
|
689
|
+
if (input.mode === 'in-progress' && text(input.assigneeUserId)) {
|
|
690
|
+
payload['assignedUserIds'] = [text(input.assigneeUserId)];
|
|
691
|
+
}
|
|
692
|
+
const context = isRecord(payload['context']) ? { ...payload['context'] } : {};
|
|
693
|
+
const actions = isRecord(payload['actions']) ? payload['actions'] : {};
|
|
694
|
+
const replaced = applyIntervalWorkOrderCardActions({
|
|
695
|
+
prefix: Array.isArray(actions['prefix']) ? actions['prefix'] : [],
|
|
696
|
+
suffix: Array.isArray(actions['suffix']) ? actions['suffix'] : [],
|
|
697
|
+
}, input.mode, { workOrderId: input.workOrderId, checklist, ...(usageKinds ? { usageKinds } : {}) });
|
|
698
|
+
payload['actions'] = { prefix: replaced.prefix, suffix: replaced.suffix };
|
|
699
|
+
payload['description'] = description;
|
|
700
|
+
payload['context'] = {
|
|
701
|
+
...context,
|
|
702
|
+
workOrderId: input.workOrderId,
|
|
703
|
+
statusId,
|
|
704
|
+
...(checklist ? { checklist } : {}),
|
|
705
|
+
...(usageKinds ? { usageKinds } : {}),
|
|
706
|
+
};
|
|
707
|
+
if (JSON.stringify(payload) !== before) {
|
|
708
|
+
changed = true;
|
|
709
|
+
}
|
|
710
|
+
return {
|
|
711
|
+
...bookmark,
|
|
712
|
+
payload,
|
|
713
|
+
payloadJson: JSON.stringify(payload),
|
|
714
|
+
};
|
|
715
|
+
});
|
|
716
|
+
return { bookmarks: next, changed };
|
|
669
717
|
}
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
if (!value || typeof value !== 'object') {
|
|
674
|
-
return '';
|
|
718
|
+
function readBookmarkList(value) {
|
|
719
|
+
if (!Array.isArray(value)) {
|
|
720
|
+
return [];
|
|
675
721
|
}
|
|
676
|
-
|
|
677
|
-
return typeof mode === 'string' ? mode.trim() : '';
|
|
722
|
+
return value.map((item) => (isRecord(item) ? { ...item } : null)).filter((item) => !!item);
|
|
678
723
|
}
|
|
679
|
-
function
|
|
680
|
-
if (
|
|
724
|
+
function readPayload(bookmark) {
|
|
725
|
+
if (isRecord(bookmark['payload'])) {
|
|
726
|
+
return { ...bookmark['payload'] };
|
|
727
|
+
}
|
|
728
|
+
const payloadJson = bookmark['payloadJson'];
|
|
729
|
+
if (typeof payloadJson !== 'string' || !payloadJson.trim()) {
|
|
681
730
|
return null;
|
|
682
731
|
}
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
}
|
|
686
|
-
function isSchedule(value) {
|
|
687
|
-
if (!value || typeof value !== 'object') {
|
|
688
|
-
return false;
|
|
732
|
+
try {
|
|
733
|
+
const parsed = JSON.parse(payloadJson);
|
|
734
|
+
return isRecord(parsed) ? { ...parsed } : null;
|
|
689
735
|
}
|
|
690
|
-
|
|
691
|
-
return typeof record.mode === 'string' || record.startCondition != null || typeof record.recurrence === 'string';
|
|
692
|
-
}
|
|
693
|
-
/** Calendar day stored on a date interval, as `YYYY-MM-DD`. */
|
|
694
|
-
function readIntervalDate(value) {
|
|
695
|
-
const date = value instanceof Date
|
|
696
|
-
? value
|
|
697
|
-
: typeof value === 'string' && value.trim()
|
|
698
|
-
? new Date(value)
|
|
699
|
-
: null;
|
|
700
|
-
if (!date || Number.isNaN(date.getTime())) {
|
|
736
|
+
catch {
|
|
701
737
|
return null;
|
|
702
738
|
}
|
|
703
|
-
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
704
|
-
const day = String(date.getDate()).padStart(2, '0');
|
|
705
|
-
return `${date.getFullYear()}-${month}-${day}`;
|
|
706
|
-
}
|
|
707
|
-
function isUnit(value) {
|
|
708
|
-
return (value === AXMMaintenanceIntervalUnit.Kilometer ||
|
|
709
|
-
value === AXMMaintenanceIntervalUnit.Mile ||
|
|
710
|
-
value === AXMMaintenanceIntervalUnit.Hour ||
|
|
711
|
-
value === AXMMaintenanceIntervalUnit.Operation);
|
|
712
739
|
}
|
|
713
|
-
function
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
740
|
+
function readChecklistFromBookmarks(bookmarks) {
|
|
741
|
+
for (const bookmark of bookmarks) {
|
|
742
|
+
const payload = readPayload(bookmark);
|
|
743
|
+
const fromActions = readChecklistIdFromTaskActions(payload?.['actions']);
|
|
744
|
+
if (fromActions) {
|
|
745
|
+
return fromActions;
|
|
746
|
+
}
|
|
747
|
+
const context = isRecord(payload?.['context']) ? payload?.['context'] : null;
|
|
748
|
+
const fromContext = text(context?.['checklist']);
|
|
749
|
+
if (fromContext) {
|
|
750
|
+
return fromContext;
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
return '';
|
|
717
754
|
}
|
|
718
|
-
function
|
|
719
|
-
const
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
755
|
+
function selectIntervalBookmarks(bookmarks, workOrderId, sourceBookmarkId, definitionId) {
|
|
756
|
+
const active = bookmarks.filter((bookmark) => bookmark['isConsumed'] !== true && bookmark['consumed'] !== true);
|
|
757
|
+
if (sourceBookmarkId) {
|
|
758
|
+
const byId = active.filter((bookmark) => text(bookmark['id']) === sourceBookmarkId);
|
|
759
|
+
if (byId.length > 0) {
|
|
760
|
+
return byId;
|
|
723
761
|
}
|
|
724
762
|
}
|
|
725
|
-
|
|
763
|
+
if (definitionId !== AXM_INTERVAL_WORK_ORDER_WORKFLOW_NAME &&
|
|
764
|
+
definitionId !== AXM_INSPECTION_WORK_ORDER_WORKFLOW_NAME) {
|
|
765
|
+
return [];
|
|
766
|
+
}
|
|
767
|
+
const byWorkOrder = active.filter((bookmark) => bookmarkReferencesWorkOrder(bookmark, workOrderId));
|
|
768
|
+
if (byWorkOrder.length > 0) {
|
|
769
|
+
return byWorkOrder;
|
|
770
|
+
}
|
|
771
|
+
const humanTasks = active.filter((bookmark) => {
|
|
772
|
+
if (text(bookmark['activityId']) === AXM_INTERVAL_DUE_ACTIVITY_ID) {
|
|
773
|
+
return true;
|
|
774
|
+
}
|
|
775
|
+
const payload = readPayload(bookmark);
|
|
776
|
+
return text(payload?.['activityType']) === 'workflow-activity:human-task';
|
|
777
|
+
});
|
|
778
|
+
return humanTasks.length === 1 ? humanTasks : [];
|
|
726
779
|
}
|
|
727
|
-
function
|
|
728
|
-
|
|
729
|
-
|
|
780
|
+
function bookmarkReferencesWorkOrder(bookmark, workOrderId) {
|
|
781
|
+
const payload = readPayload(bookmark);
|
|
782
|
+
const context = isRecord(payload?.['context']) ? payload?.['context'] : null;
|
|
783
|
+
return text(context?.['workOrderId']) === workOrderId;
|
|
784
|
+
}
|
|
785
|
+
function sameJson(left, right) {
|
|
786
|
+
return JSON.stringify(left ?? null) === JSON.stringify(right ?? null);
|
|
787
|
+
}
|
|
788
|
+
//#endregion
|
|
789
|
+
//#region ----- Occurrence identity -----
|
|
790
|
+
function text(value) {
|
|
791
|
+
return typeof value === 'string' ? value.trim() : '';
|
|
792
|
+
}
|
|
793
|
+
function createdStamp(row) {
|
|
794
|
+
const auditAt = row.auditInfo?.created?.at;
|
|
795
|
+
if (typeof auditAt === 'string' && auditAt.trim()) {
|
|
796
|
+
return auditAt.trim();
|
|
730
797
|
}
|
|
731
|
-
if (
|
|
732
|
-
return
|
|
798
|
+
if (auditAt instanceof Date && !Number.isNaN(auditAt.getTime())) {
|
|
799
|
+
return auditAt.toISOString();
|
|
733
800
|
}
|
|
734
|
-
|
|
801
|
+
if (typeof row.createdAt === 'string' && row.createdAt.trim()) {
|
|
802
|
+
return row.createdAt.trim();
|
|
803
|
+
}
|
|
804
|
+
return '';
|
|
735
805
|
}
|
|
736
|
-
/**
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
function buildAXMMaintenanceIntervalConfig(supportedIntervalKinds, draft) {
|
|
742
|
-
const supported = supportedKindSet(supportedIntervalKinds);
|
|
743
|
-
const triggers = [];
|
|
744
|
-
const errors = [];
|
|
745
|
-
if (supported.has('schedule') && draft.scheduleEnabled) {
|
|
746
|
-
const schedule = draft.schedule;
|
|
747
|
-
if (schedule && scheduleMode(schedule) === 'specific-date') {
|
|
748
|
-
if (readIntervalDate(scheduleStartDate(schedule))) {
|
|
749
|
-
triggers.push({ kind: 'schedule', schedule });
|
|
750
|
-
}
|
|
751
|
-
else {
|
|
752
|
-
errors.push({ kind: 'schedule', code: 'date' });
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
else if (isSchedule(schedule)) {
|
|
756
|
-
triggers.push({ kind: 'schedule', schedule });
|
|
757
|
-
}
|
|
758
|
-
else {
|
|
759
|
-
errors.push({ kind: 'schedule', code: 'schedule' });
|
|
760
|
-
}
|
|
806
|
+
/** Earliest created row, then lowest id. Rows without an id are ignored. */
|
|
807
|
+
function pickCanonicalChecklistRow(rows) {
|
|
808
|
+
const withId = rows.filter((row) => text(row.id));
|
|
809
|
+
if (withId.length === 0) {
|
|
810
|
+
return null;
|
|
761
811
|
}
|
|
762
|
-
|
|
763
|
-
const
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
else if (!supported.has('schedule') && isSchedule(draft.schedule)) {
|
|
768
|
-
triggers.push({ kind: 'date', schedule: draft.schedule });
|
|
812
|
+
return [...withId].sort((left, right) => {
|
|
813
|
+
const leftAt = createdStamp(left);
|
|
814
|
+
const rightAt = createdStamp(right);
|
|
815
|
+
if (leftAt && rightAt && leftAt !== rightAt) {
|
|
816
|
+
return leftAt < rightAt ? -1 : 1;
|
|
769
817
|
}
|
|
770
|
-
|
|
771
|
-
|
|
818
|
+
if (leftAt && !rightAt) {
|
|
819
|
+
return -1;
|
|
772
820
|
}
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
const meter = draft.meters[kind];
|
|
776
|
-
if (!supported.has(kind) || !meter.enabled) {
|
|
777
|
-
continue;
|
|
821
|
+
if (!leftAt && rightAt) {
|
|
822
|
+
return 1;
|
|
778
823
|
}
|
|
779
|
-
const
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
824
|
+
const leftId = text(left.id);
|
|
825
|
+
const rightId = text(right.id);
|
|
826
|
+
if (leftId === rightId) {
|
|
827
|
+
return 0;
|
|
783
828
|
}
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
: defaultAXMMaintenanceIntervalUnit(kind);
|
|
787
|
-
triggers.push({ kind, interval: meter.interval, unit });
|
|
788
|
-
}
|
|
789
|
-
const triggerLogic = triggers.length > 1 && draft.triggerLogic === AXMMaintenanceIntervalTriggerLogic.All
|
|
790
|
-
? AXMMaintenanceIntervalTriggerLogic.All
|
|
791
|
-
: AXMMaintenanceIntervalTriggerLogic.Any;
|
|
792
|
-
return { config: { triggerLogic, triggers }, errors };
|
|
829
|
+
return leftId < rightId ? -1 : 1;
|
|
830
|
+
})[0];
|
|
793
831
|
}
|
|
794
832
|
/**
|
|
795
|
-
*
|
|
796
|
-
*
|
|
833
|
+
* A checklist occurrence is this work order plus its template questionnaire and the session's own case.
|
|
834
|
+
* Questionnaire id alone is not enough.
|
|
797
835
|
*/
|
|
798
|
-
function
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
const
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
continue;
|
|
807
|
-
}
|
|
808
|
-
const kind = item.kind;
|
|
809
|
-
if (kind !== 'date' && kind !== 'schedule') {
|
|
810
|
-
continue;
|
|
811
|
-
}
|
|
812
|
-
const schedule = item.schedule;
|
|
813
|
-
if (isSchedule(schedule)) {
|
|
814
|
-
return schedule;
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
return undefined;
|
|
836
|
+
function isWorkOrderChecklistOccurrence(input) {
|
|
837
|
+
const workOrderId = text(input.workOrderId);
|
|
838
|
+
const questionnaireId = text(input.questionnaireId);
|
|
839
|
+
const subjectType = text(input.subjectType);
|
|
840
|
+
const caseId = text(input.assessmentCase?.['id']);
|
|
841
|
+
const sessionCaseId = text(input.session?.['caseId']);
|
|
842
|
+
if (!workOrderId || !questionnaireId || !subjectType || !caseId || !sessionCaseId || sessionCaseId !== caseId) {
|
|
843
|
+
return false;
|
|
818
844
|
}
|
|
819
|
-
if (
|
|
820
|
-
return
|
|
845
|
+
if (text(input.assessmentCase?.['questionnaireId']) !== questionnaireId) {
|
|
846
|
+
return false;
|
|
821
847
|
}
|
|
822
|
-
|
|
848
|
+
const subject = isRecord(input.assessmentCase?.['subjectRef'])
|
|
849
|
+
? input.assessmentCase?.['subjectRef']
|
|
850
|
+
: null;
|
|
851
|
+
return text(subject?.['type']) === subjectType && text(subject?.['id']) === workOrderId;
|
|
823
852
|
}
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
853
|
+
//#endregion
|
|
854
|
+
|
|
855
|
+
const AXMMaintenanceManagementFeatureKeys = {
|
|
856
|
+
Management: 'MaintenanceManagement:Feature:Management',
|
|
857
|
+
};
|
|
858
|
+
|
|
859
|
+
const AXMMaintenanceManagementMenuKeys = {
|
|
860
|
+
Root: 'MaintenanceManagement:Menu',
|
|
861
|
+
// MainPlanEquipmentMaintenanceSectionGroup: 'MaintenanceManagement:Menu:MainPlanEquipment:MaintenanceSectionGroup',
|
|
862
|
+
// PlanEquipmentMaintenanceSectionGroup: 'MaintenanceManagement:Menu:PlantEquipment:MaintenanceSectionGroup',
|
|
863
|
+
Activities: 'MaintenanceManagement:Menu:Activities',
|
|
864
|
+
Failures: 'MaintenanceManagement:Menu:Failures',
|
|
865
|
+
ActivityCategories: 'MaintenanceManagement:Menu:ActivityCategories',
|
|
866
|
+
ActivityTypes: 'MaintenanceManagement:Menu:ActivityTypes',
|
|
867
|
+
MaintenanceTypes: 'MaintenanceManagement:Menu:MaintenanceTypes',
|
|
868
|
+
MaintenancePlans: 'MaintenanceManagement:Menu:MaintenancePlans',
|
|
869
|
+
MaintenancePlansList: 'MaintenanceManagement:Menu:MaintenancePlans:List',
|
|
870
|
+
WorkPackages: 'MaintenanceManagement:Menu:WorkPackages',
|
|
871
|
+
WorkOrders: 'MaintenanceManagement:Menu:WorkOrders',
|
|
872
|
+
WorkReports: 'MaintenanceManagement:Menu:WorkReports',
|
|
873
|
+
MaintenanceTemplates: 'MaintenanceManagement:Menu:MaintenanceTemplates',
|
|
874
|
+
MaintenanceTemplateActivityTypes: 'MaintenanceManagement:Menu:MaintenanceTemplateActivityTypes',
|
|
875
|
+
MaintenanceTemplateResources: 'MaintenanceManagement:Menu:MaintenanceTemplateResources',
|
|
876
|
+
MaintenanceTemplateFailureModes: 'MaintenanceManagement:Menu:MaintenanceTemplateFailureModes',
|
|
877
|
+
FailureCauses: 'MaintenanceManagement:Menu:FailureCauses',
|
|
878
|
+
FailureMechanisms: 'MaintenanceManagement:Menu:FailureMechanisms',
|
|
879
|
+
FailureDetections: 'MaintenanceManagement:Menu:FailureDetections',
|
|
880
|
+
FailureEffects: 'MaintenanceManagement:Menu:FailureEffects',
|
|
881
|
+
FailureSeverities: 'MaintenanceManagement:Menu:FailureSeverities',
|
|
882
|
+
FailureTypes: 'MaintenanceManagement:Menu:FailureTypes',
|
|
883
|
+
FailureModes: 'MaintenanceManagement:Menu:FailureModes',
|
|
884
|
+
FailureRegisters: 'MaintenanceManagement:Menu:FailureRegisters',
|
|
885
|
+
};
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* Assets & Maintenance capabilities used by this module.
|
|
889
|
+
* Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
|
|
890
|
+
*/
|
|
891
|
+
const AXPAssetsMaintenancePermissionKeys = {
|
|
892
|
+
Access: 'AssetsMaintenance:Permission:Access',
|
|
893
|
+
MaintainAssets: 'AssetsMaintenance:Permission:MaintainAssets',
|
|
894
|
+
MaintainMaintenance: 'AssetsMaintenance:Permission:MaintainMaintenance',
|
|
895
|
+
Setup: 'AssetsMaintenance:Permission:Setup',
|
|
896
|
+
};
|
|
897
|
+
const cap = AXPAssetsMaintenancePermissionKeys.MaintainMaintenance;
|
|
898
|
+
function entityCrud() {
|
|
899
|
+
return {
|
|
900
|
+
Management: cap,
|
|
901
|
+
View: cap,
|
|
902
|
+
Create: cap,
|
|
903
|
+
Update: cap,
|
|
904
|
+
Delete: cap,
|
|
905
|
+
};
|
|
906
|
+
}
|
|
907
|
+
/**
|
|
908
|
+
* @deprecated Prefer {@link AXPAssetsMaintenancePermissionKeys}.
|
|
909
|
+
* Legacy nested shape kept so existing imports compile during migration.
|
|
910
|
+
*/
|
|
911
|
+
const AXMMaintenanceManagementPermissionKeys = {
|
|
912
|
+
MaintenanceManagement: {
|
|
913
|
+
Management: cap,
|
|
914
|
+
ActivityCategory: entityCrud(),
|
|
915
|
+
MaintenanceType: entityCrud(),
|
|
916
|
+
MaintenanceTemplate: entityCrud(),
|
|
917
|
+
MaintenancePlan: entityCrud(),
|
|
918
|
+
WorkPackage: entityCrud(),
|
|
919
|
+
WorkOrder: entityCrud(),
|
|
920
|
+
WorkReport: entityCrud(),
|
|
921
|
+
MaintenanceTemplateActivityType: entityCrud(),
|
|
922
|
+
MaintenanceTemplateResource: entityCrud(),
|
|
923
|
+
MaintenanceTemplateFailureMode: entityCrud(),
|
|
924
|
+
ActivityType: entityCrud(),
|
|
925
|
+
ActivityTypeAssetType: entityCrud(),
|
|
926
|
+
ActivityTypeResource: entityCrud(),
|
|
927
|
+
FailureCause: entityCrud(),
|
|
928
|
+
FailureMechanism: entityCrud(),
|
|
929
|
+
FailureDetection: entityCrud(),
|
|
930
|
+
FailureEffect: entityCrud(),
|
|
931
|
+
FailureSeverity: entityCrud(),
|
|
932
|
+
FailureType: entityCrud(),
|
|
933
|
+
FailureMode: entityCrud(),
|
|
934
|
+
FailureRegister: entityCrud(),
|
|
935
|
+
},
|
|
936
|
+
};
|
|
937
|
+
|
|
938
|
+
//#region ---- Status names ----
|
|
939
|
+
var AXMWorkOrderStatus;
|
|
940
|
+
(function (AXMWorkOrderStatus) {
|
|
941
|
+
AXMWorkOrderStatus["Planned"] = "planned";
|
|
942
|
+
AXMWorkOrderStatus["Scheduled"] = "scheduled";
|
|
943
|
+
AXMWorkOrderStatus["Assigned"] = "assigned";
|
|
944
|
+
AXMWorkOrderStatus["InProgress"] = "in-progress";
|
|
945
|
+
AXMWorkOrderStatus["OnHold"] = "on-hold";
|
|
946
|
+
AXMWorkOrderStatus["Completed"] = "completed";
|
|
947
|
+
AXMWorkOrderStatus["SignedOff"] = "signed-off";
|
|
948
|
+
AXMWorkOrderStatus["Cancelled"] = "cancelled";
|
|
949
|
+
})(AXMWorkOrderStatus || (AXMWorkOrderStatus = {}));
|
|
950
|
+
//#endregion
|
|
951
|
+
|
|
952
|
+
//#region ---- Source type enum ----
|
|
953
|
+
var AXMWorkOrderSourceType;
|
|
954
|
+
(function (AXMWorkOrderSourceType) {
|
|
955
|
+
AXMWorkOrderSourceType["Manual"] = "manual";
|
|
956
|
+
AXMWorkOrderSourceType["MaintenancePlan"] = "maintenance-plan";
|
|
957
|
+
AXMWorkOrderSourceType["CreateAsset"] = "create-asset";
|
|
958
|
+
AXMWorkOrderSourceType["FailureRegister"] = "failure-register";
|
|
959
|
+
})(AXMWorkOrderSourceType || (AXMWorkOrderSourceType = {}));
|
|
960
|
+
//#endregion
|
|
961
|
+
|
|
962
|
+
//#region ---- Status names ----
|
|
963
|
+
var AXMFailureRegisterStatus;
|
|
964
|
+
(function (AXMFailureRegisterStatus) {
|
|
965
|
+
AXMFailureRegisterStatus["Reported"] = "reported";
|
|
966
|
+
AXMFailureRegisterStatus["UnderReview"] = "underReview";
|
|
967
|
+
AXMFailureRegisterStatus["WorkOrderRequired"] = "workOrderRequired";
|
|
968
|
+
AXMFailureRegisterStatus["WorkOrderCreated"] = "workOrderCreated";
|
|
969
|
+
AXMFailureRegisterStatus["InProgress"] = "inProgress";
|
|
970
|
+
AXMFailureRegisterStatus["Resolved"] = "resolved";
|
|
971
|
+
AXMFailureRegisterStatus["FollowUpRequired"] = "followUpRequired";
|
|
972
|
+
AXMFailureRegisterStatus["Rejected"] = "rejected";
|
|
973
|
+
AXMFailureRegisterStatus["Duplicate"] = "duplicate";
|
|
974
|
+
AXMFailureRegisterStatus["Closed"] = "closed";
|
|
975
|
+
})(AXMFailureRegisterStatus || (AXMFailureRegisterStatus = {}));
|
|
976
|
+
//#endregion
|
|
977
|
+
|
|
978
|
+
//#endregion
|
|
979
|
+
//#region ----- Snapshot -----
|
|
980
|
+
function readCompletion(value) {
|
|
981
|
+
if (!Array.isArray(value)) {
|
|
982
|
+
return [];
|
|
835
983
|
}
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
}
|
|
840
|
-
const kind = item.kind;
|
|
841
|
-
if (kind === 'date') {
|
|
842
|
-
const schedule = item.schedule;
|
|
843
|
-
const date = readIntervalDate(item.date);
|
|
844
|
-
if (isSchedule(schedule) && supported.has('schedule') && !draft.scheduleEnabled) {
|
|
845
|
-
draft.scheduleEnabled = true;
|
|
846
|
-
draft.schedule = schedule;
|
|
847
|
-
}
|
|
848
|
-
if (!supported.has('date')) {
|
|
849
|
-
continue;
|
|
850
|
-
}
|
|
851
|
-
if (date) {
|
|
852
|
-
draft.dateEnabled = true;
|
|
853
|
-
draft.date = date;
|
|
854
|
-
}
|
|
855
|
-
else if (isSchedule(schedule) && !supported.has('schedule')) {
|
|
856
|
-
draft.dateEnabled = true;
|
|
857
|
-
draft.schedule = schedule;
|
|
858
|
-
}
|
|
859
|
-
continue;
|
|
860
|
-
}
|
|
861
|
-
if (!isAXMMaintenanceIntervalKind(kind) || !supported.has(kind)) {
|
|
984
|
+
const readings = [];
|
|
985
|
+
for (const item of value) {
|
|
986
|
+
if (!item || typeof item !== 'object') {
|
|
862
987
|
continue;
|
|
863
988
|
}
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
989
|
+
const record = item;
|
|
990
|
+
const kind = record['kind'];
|
|
991
|
+
const unit = record['unit'];
|
|
992
|
+
const currentValue = record['currentValue'];
|
|
993
|
+
const capturedAt = record['capturedAt'];
|
|
994
|
+
if (typeof kind !== 'string' ||
|
|
995
|
+
!isAXMMaintenanceMeterKind(kind) ||
|
|
996
|
+
typeof unit !== 'string' ||
|
|
997
|
+
!isAXMMaintenanceIntervalUnitForKind(kind, unit) ||
|
|
998
|
+
typeof currentValue !== 'number' ||
|
|
999
|
+
typeof capturedAt !== 'string') {
|
|
871
1000
|
continue;
|
|
872
1001
|
}
|
|
873
|
-
|
|
1002
|
+
readings.push({ kind, unit: unit, currentValue, capturedAt });
|
|
1003
|
+
}
|
|
1004
|
+
return readings;
|
|
1005
|
+
}
|
|
1006
|
+
function readDrafts(value, capturedAt) {
|
|
1007
|
+
if (!Array.isArray(value)) {
|
|
1008
|
+
return [];
|
|
1009
|
+
}
|
|
1010
|
+
const readings = [];
|
|
1011
|
+
for (const item of value) {
|
|
1012
|
+
if (!item || typeof item !== 'object') {
|
|
874
1013
|
continue;
|
|
875
1014
|
}
|
|
876
|
-
const
|
|
877
|
-
|
|
1015
|
+
const record = item;
|
|
1016
|
+
const kind = record['kind'];
|
|
1017
|
+
const unit = record['unit'];
|
|
1018
|
+
const rawValue = record['value'] ?? record['currentValue'];
|
|
1019
|
+
if (typeof kind !== 'string' || !isAXMMaintenanceMeterKind(kind) || typeof unit !== 'string' || typeof rawValue !== 'number') {
|
|
878
1020
|
continue;
|
|
879
1021
|
}
|
|
880
|
-
|
|
881
|
-
const unit = item.unit;
|
|
882
|
-
if (meterIssue(kind, typeof interval === 'number' ? interval : null)) {
|
|
1022
|
+
if (!isAXMMaintenanceIntervalUnitForKind(kind, unit)) {
|
|
883
1023
|
continue;
|
|
884
1024
|
}
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
1025
|
+
const readingAt = typeof record['readingAt'] === 'string' && record['readingAt'].trim() ? record['readingAt'] : capturedAt;
|
|
1026
|
+
readings.push({
|
|
1027
|
+
kind: kind,
|
|
1028
|
+
unit: unit,
|
|
1029
|
+
currentValue: rawValue,
|
|
1030
|
+
capturedAt: readingAt,
|
|
1031
|
+
});
|
|
1032
|
+
}
|
|
1033
|
+
return readings;
|
|
1034
|
+
}
|
|
1035
|
+
/**
|
|
1036
|
+
* Completed work orders keep the readings captured at completion.
|
|
1037
|
+
* A draft submitted with the task wins over a later live asset meter.
|
|
1038
|
+
* Live meters are used only when the task has not submitted readings yet.
|
|
1039
|
+
*/
|
|
1040
|
+
function resolveWorkOrderCompletionUsageSnapshot(input) {
|
|
1041
|
+
const existing = readCompletion(input.existing);
|
|
1042
|
+
if (existing.length > 0) {
|
|
1043
|
+
return { readings: existing, source: 'existing' };
|
|
888
1044
|
}
|
|
889
|
-
|
|
1045
|
+
const drafts = readDrafts(input.drafts, input.capturedAt);
|
|
1046
|
+
if (drafts.length > 0) {
|
|
1047
|
+
return { readings: drafts, source: 'submitted' };
|
|
1048
|
+
}
|
|
1049
|
+
return { readings: [...input.live], source: 'live' };
|
|
1050
|
+
}
|
|
1051
|
+
function missingRequiredTaskReadings(requiredKinds, drafts) {
|
|
1052
|
+
const present = new Set(readDrafts(drafts, new Date(0).toISOString()).map((reading) => reading.kind));
|
|
1053
|
+
return requiredKinds.filter((kind) => isAXMMaintenanceMeterKind(kind) && !present.has(kind));
|
|
890
1054
|
}
|
|
891
1055
|
//#endregion
|
|
892
1056
|
|
|
@@ -1265,5 +1429,5 @@ function resolveMaintenanceIntervalStates(value) {
|
|
|
1265
1429
|
* Generated bundle index. Do not edit.
|
|
1266
1430
|
*/
|
|
1267
1431
|
|
|
1268
|
-
export { AXMFailureRegisterStatus, AXMMaintenanceIntervalTriggerLogic, AXMMaintenanceIntervalUnit, AXMMaintenanceManagementCommandKeys, AXMMaintenanceManagementFeatureKeys, AXMMaintenanceManagementMenuKeys, AXMMaintenanceManagementPermissionKeys, AXMWorkOrderSourceType, AXMWorkOrderStatus, AXM_INTERVAL_CHECKLIST_CASE_ID, AXM_INTERVAL_CHECKLIST_CLAIM, AXM_INTERVAL_CHECKLIST_QUESTIONNAIRE_ID, AXM_INTERVAL_CHECKLIST_SESSION_ID, AXM_INTERVAL_COMPLETED_TASK_DESCRIPTION, AXM_INTERVAL_IN_PROGRESS_TASK_DESCRIPTION, AXM_INTERVAL_OPEN_FORM_ACTION_NAME, AXM_INTERVAL_SIGN_OFF_ACTION_NAME, AXM_INTERVAL_START_FLOW_ACTION_NAME, AXM_INTERVAL_WORK_ORDER_WORKFLOW_NAME, AXM_MAINTENANCE_INTERVAL_CHECK_COMMAND_KEY, AXM_MAINTENANCE_INTERVAL_KINDS, AXM_MAINTENANCE_INTERVAL_STATE_ERRORS, AXM_MAINTENANCE_INTERVAL_STATE_KINDS, AXM_MAINTENANCE_INTERVAL_WIDGET, AXPAssetsMaintenancePermissionKeys, MM_CATALOG_SCOPE_MN, MaintenanceManagementManifest, RootConfig, applyIntervalWorkOrderCardActions, buildAXMMaintenanceIntervalConfig, buildIntervalWorkOrderOpenFormAction, buildIntervalWorkOrderSignOffAction, defaultAXMMaintenanceIntervalUnit, draftFromAXMMaintenanceIntervalConfig, emptyAXMMaintenanceIntervalConfig, emptyAXMMaintenanceIntervalDraft, isAXMMaintenanceIntervalKind, isAXMMaintenanceIntervalUnitForKind, isAXMMaintenanceMeterKind, isIntervalOpenFormAction, isIntervalSignOffAction, isIntervalStartFlowAction, isWorkOrderChecklistOccurrence, pickCanonicalChecklistRow, readChecklistIdFromTaskActions, readIntervalChecklistId, readIntervalDate, readMaintenanceIntervalStates, readMaintenancePlanCalendarSchedule, readSignOffActivityOutcome, replaceIntervalStartFlowActions, resolveChecklistId, resolveIntervalChecklistViewerMode, resolveMaintenanceIntervalStates, rewriteIntervalCardBookmarks };
|
|
1432
|
+
export { AXMFailureRegisterStatus, AXMMaintenanceIntervalTriggerLogic, AXMMaintenanceIntervalUnit, AXMMaintenanceManagementCommandKeys, AXMMaintenanceManagementFeatureKeys, AXMMaintenanceManagementMenuKeys, AXMMaintenanceManagementPermissionKeys, AXMWorkOrderSourceType, AXMWorkOrderStatus, AXM_INSPECTION_USAGE_KINDS_INPUT, AXM_INSPECTION_WORK_ORDER_WORKFLOW_NAME, AXM_INTERVAL_CHECKLIST_CASE_ID, AXM_INTERVAL_CHECKLIST_CLAIM, AXM_INTERVAL_CHECKLIST_QUESTIONNAIRE_ID, AXM_INTERVAL_CHECKLIST_SESSION_ID, AXM_INTERVAL_COMPLETED_TASK_DESCRIPTION, AXM_INTERVAL_IN_PROGRESS_TASK_DESCRIPTION, AXM_INTERVAL_OPEN_FORM_ACTION_NAME, AXM_INTERVAL_SIGN_OFF_ACTION_NAME, AXM_INTERVAL_START_FLOW_ACTION_NAME, AXM_INTERVAL_WORK_ORDER_WORKFLOW_NAME, AXM_MAINTENANCE_INTERVAL_CHECK_COMMAND_KEY, AXM_MAINTENANCE_INTERVAL_KINDS, AXM_MAINTENANCE_INTERVAL_STATE_ERRORS, AXM_MAINTENANCE_INTERVAL_STATE_KINDS, AXM_MAINTENANCE_INTERVAL_WIDGET, AXPAssetsMaintenancePermissionKeys, MM_CATALOG_SCOPE_MN, MaintenanceManagementManifest, RootConfig, applyIntervalWorkOrderCardActions, buildAXMMaintenanceIntervalConfig, buildIntervalWorkOrderOpenFormAction, buildIntervalWorkOrderSignOffAction, collectableUsageKinds, defaultAXMMaintenanceIntervalUnit, draftFromAXMMaintenanceIntervalConfig, emptyAXMMaintenanceIntervalConfig, emptyAXMMaintenanceIntervalDraft, isAXMMaintenanceIntervalKind, isAXMMaintenanceIntervalUnitForKind, isAXMMaintenanceMeterKind, isIntervalOpenFormAction, isIntervalSignOffAction, isIntervalStartFlowAction, isWorkOrderChecklistOccurrence, missingRequiredTaskReadings, pickCanonicalChecklistRow, readChecklistIdFromTaskActions, readInspectionUsageKinds, readIntervalChecklistId, readIntervalDate, readMaintenanceIntervalStates, readMaintenancePlanCalendarSchedule, readSignOffActivityOutcome, replaceIntervalStartFlowActions, resolveChecklistId, resolveInspectionUsageKinds, resolveIntervalChecklistViewerMode, resolveMaintenanceIntervalStates, resolveWorkOrderCompletionUsageSnapshot, rewriteIntervalCardBookmarks };
|
|
1269
1433
|
//# sourceMappingURL=acorex-platform-module-maintenance-management-client-contracts.mjs.map
|