@acorex-platform/module-maintenance-management-client 1.0.2 → 2.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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-BN1T6EGq.mjs} +397 -226
- package/fesm2022/acorex-platform-module-maintenance-management-client-acorex-platform-module-maintenance-management-client-BN1T6EGq.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-register.mjs +3 -3
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-failure-register.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-plan.mjs +127 -8
- 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 +40 -34
- 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-maintenance-type.mjs +3 -30
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-maintenance-type.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entities-work-order.mjs +39 -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-CvJLY_ER.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-CvJLY_ER.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-CHISj-3_.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-CHISj-3_.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-BB_neovt.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-BB_neovt.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-CA35iAeO.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-CA35iAeO.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-Dveksw4J.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-Dveksw4J.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-BrxNfi3J.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-BrxNfi3J.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-BwN3RK3T.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-BwN3RK3T.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-LLBPWwD6.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-LLBPWwD6.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-C530P5Cc.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-C530P5Cc.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-CjVopQfu.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-CjVopQfu.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-Bt-LPy1o.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-Bt-LPy1o.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-DM3NkYIb.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-DM3NkYIb.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-CAUGtYZZ.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-CAUGtYZZ.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-b2CoWHHc.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-b2CoWHHc.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-Ds2HnidM.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-Ds2HnidM.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-BWld5Sze.mjs} +5 -5
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register.entity-BWld5Sze.mjs.map +1 -0
- 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-BO43T2pF.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-BO43T2pF.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-B0Zsa8d2.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-B0Zsa8d2.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-B0p3E0th.mjs} +129 -10
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-plan.entity-B0p3E0th.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-DOylBdod.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-DOylBdod.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-Dg5UI7iT.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-Dg5UI7iT.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-6juUHuAq.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-6juUHuAq.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-Ci8LwI6j.mjs} +42 -36
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-template.entity-Ci8LwI6j.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-DG6iTlAh.mjs} +5 -32
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-maintenance-type.entity-DG6iTlAh.mjs.map +1 -0
- 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-De8VGu0Y.mjs} +41 -2
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-work-order.entity-De8VGu0Y.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-7rwrxOLD.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-7rwrxOLD.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-0MT-WwMU.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-0MT-WwMU.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 +1096 -701
- 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-DN48yuJ9.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-DN48yuJ9.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-failure-register-status.provider-CLBaQy_e.mjs → acorex-platform-module-maintenance-management-client-failure-register-status.provider-C7p6xbx3.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-failure-register-status.provider-CLBaQy_e.mjs.map → acorex-platform-module-maintenance-management-client-failure-register-status.provider-C7p6xbx3.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-fill-work-report-completion.command-Capowl1e.mjs → acorex-platform-module-maintenance-management-client-fill-work-report-completion.command-BWOmZ9LK.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-fill-work-report-completion.command-Capowl1e.mjs.map → acorex-platform-module-maintenance-management-client-fill-work-report-completion.command-BWOmZ9LK.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client-maintenance-interval-widget-edit.component-DmfVFWOZ.mjs +98 -0
- package/fesm2022/acorex-platform-module-maintenance-management-client-maintenance-interval-widget-edit.component-DmfVFWOZ.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-maintenance-management-client-maintenance-interval-widget-view.component-B0vjGln5.mjs → acorex-platform-module-maintenance-management-client-maintenance-interval-widget-view.component-rqJ6-Akn.mjs} +6 -3
- package/fesm2022/acorex-platform-module-maintenance-management-client-maintenance-interval-widget-view.component-rqJ6-Akn.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-maintenance-management-client-maintenance-interval-widget.kinds-D8Hnq0ct.mjs → acorex-platform-module-maintenance-management-client-maintenance-interval-widget.kinds-BnDgqwww.mjs} +17 -2
- package/fesm2022/acorex-platform-module-maintenance-management-client-maintenance-interval-widget.kinds-BnDgqwww.mjs.map +1 -0
- 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-D9SdaLHS.mjs} +152 -4
- package/fesm2022/acorex-platform-module-maintenance-management-client-open-work-order-checklist-form.command-D9SdaLHS.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-maintenance-management-client-open-work-report-from-work-order.command-B0O4fWPt.mjs → acorex-platform-module-maintenance-management-client-open-work-report-from-work-order.command-Cz_3VSE6.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-maintenance-management-client-open-work-report-from-work-order.command-B0O4fWPt.mjs.map → acorex-platform-module-maintenance-management-client-open-work-report-from-work-order.command-Cz_3VSE6.mjs.map} +1 -1
- 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-Cs07SVKM.mjs} +3 -3
- 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-Cs07SVKM.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-resolve-person-user-id.activity-nwXAJHkd.mjs → acorex-platform-module-maintenance-management-client-resolve-person-user-id.activity-Bmw1fXhW.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-resolve-person-user-id.activity-nwXAJHkd.mjs.map → acorex-platform-module-maintenance-management-client-resolve-person-user-id.activity-Bmw1fXhW.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-resolve-work-order.activity-q5WM7Sv5.mjs → acorex-platform-module-maintenance-management-client-resolve-work-order.activity-BgkerN1E.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-resolve-work-order.activity-q5WM7Sv5.mjs.map → acorex-platform-module-maintenance-management-client-resolve-work-order.activity-BgkerN1E.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-CqRr1Y2e.mjs} +132 -7
- package/fesm2022/acorex-platform-module-maintenance-management-client-sign-off-work-order.command-CqRr1Y2e.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-maintenance-management-client-start-work-order-flow-id.util-CuUi8LBT.mjs → acorex-platform-module-maintenance-management-client-start-work-order-flow-id.util-BfP3AJxa.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-start-work-order-flow-id.util-CuUi8LBT.mjs.map → acorex-platform-module-maintenance-management-client-start-work-order-flow-id.util-BfP3AJxa.mjs.map} +1 -1
- 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-Bq6BHkUZ.mjs} +28 -8
- package/fesm2022/acorex-platform-module-maintenance-management-client-start-work-order-flow.command-Bq6BHkUZ.mjs.map +1 -0
- 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-DH8k3mM6.mjs} +28 -7
- package/fesm2022/acorex-platform-module-maintenance-management-client-update-work-order-completed.activity-DH8k3mM6.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-D4_X8iuF.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-D4_X8iuF.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-update-work-report-on-completion.activity-_B0SUFtQ.mjs → acorex-platform-module-maintenance-management-client-update-work-report-on-completion.activity-BvVB4Bcr.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-update-work-report-on-completion.activity-_B0SUFtQ.mjs.map → acorex-platform-module-maintenance-management-client-update-work-report-on-completion.activity-BvVB4Bcr.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-validate-work-order-completion.activity-RA2zaQHH.mjs → acorex-platform-module-maintenance-management-client-validate-work-order-completion.activity-CSC01Cxt.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-validate-work-order-completion.activity-RA2zaQHH.mjs.map → acorex-platform-module-maintenance-management-client-validate-work-order-completion.activity-CSC01Cxt.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-work-order-list-command-Bh_6PS5w.mjs → acorex-platform-module-maintenance-management-client-work-order-list-command-CVS61IDw.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-work-order-list-command-Bh_6PS5w.mjs.map → acorex-platform-module-maintenance-management-client-work-order-list-command-CVS61IDw.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client-work-order-status-patch.util-BZWR2x2y.mjs +53 -0
- package/fesm2022/acorex-platform-module-maintenance-management-client-work-order-status-patch.util-BZWR2x2y.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-maintenance-management-client-work-order-status.provider-DvBk5kAW.mjs → acorex-platform-module-maintenance-management-client-work-order-status.provider-tBxn2-nw.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-work-order-status.provider-DvBk5kAW.mjs.map → acorex-platform-module-maintenance-management-client-work-order-status.provider-tBxn2-nw.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-work-order-work-report-column.component-BikBvmHi.mjs → acorex-platform-module-maintenance-management-client-work-order-work-report-column.component-DvI4Gst1.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-work-order-work-report-column.component-BikBvmHi.mjs.map → acorex-platform-module-maintenance-management-client-work-order-work-report-column.component-DvI4Gst1.mjs.map} +1 -1
- 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-CDAa-HPv.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-CDAa-HPv.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-work-report-assessment.util-Da1HVAit.mjs → acorex-platform-module-maintenance-management-client-work-report-assessment.util-H9Qr3JR1.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-work-report-assessment.util-Da1HVAit.mjs.map → acorex-platform-module-maintenance-management-client-work-report-assessment.util-H9Qr3JR1.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-maintenance-management-client-work-report-checklist-results-view.component-BgIQr5Hr.mjs → acorex-platform-module-maintenance-management-client-work-report-checklist-results-view.component-CRJgdMsV.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-maintenance-management-client-work-report-checklist-results-view.component-BgIQr5Hr.mjs.map → acorex-platform-module-maintenance-management-client-work-report-checklist-results-view.component-CRJgdMsV.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client.mjs +1 -1
- package/i18n/en-AU/maintenance-management.json +59 -12
- package/i18n/en-US/maintenance-management.json +59 -12
- package/i18n/fa-IR/maintenance-management.json +58 -11
- package/package.json +3 -3
- package/types/acorex-platform-module-maintenance-management-client-contracts.d.ts +270 -107
- package/types/acorex-platform-module-maintenance-management-client.d.ts +13 -2
- package/fesm2022/acorex-platform-module-maintenance-management-client-acorex-platform-module-maintenance-management-client-C3cGlFKd.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client-contracts-entity-catalog-failure-register.entity-DWKPDUB7.mjs.map +0 -1
- 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-maintenance-type.entity-j2eyDg9O.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-maintenance-interval-widget-edit.component-b8sTwXxe.mjs +0 -54
- package/fesm2022/acorex-platform-module-maintenance-management-client-maintenance-interval-widget-edit.component-b8sTwXxe.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client-maintenance-interval-widget-view.component-B0vjGln5.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client-maintenance-interval-widget.kinds-D8Hnq0ct.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-start-work-order-flow.command-CNau6u4p.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-maintenance-management-client-update-work-order-completed.activity-CSKzwPjv.mjs.map +0 -1
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import { axpRegisterEntityPublicReadFields } from '@acorex-platform/framework-shared/entity';
|
|
2
|
+
|
|
3
|
+
// Existing catalog tree outputs. These flags/counts contain no related records.
|
|
4
|
+
for (const entity of ['FailureType', 'FailureDetection', 'FailureCause', 'FailureMechanism', 'FailureEffect']) {
|
|
5
|
+
axpRegisterEntityPublicReadFields(`MaintenanceManagement.${entity}`, 'hasChild', 'childrenCount');
|
|
6
|
+
}
|
|
7
|
+
|
|
1
8
|
/** Maintenance catalog scope for questionnaires, question bank items, and workflow definitions. */
|
|
2
9
|
const MM_CATALOG_SCOPE_MN = 'maintenance-management.mn';
|
|
3
10
|
|
|
@@ -33,392 +40,864 @@ const AXM_MAINTENANCE_INTERVAL_CHECK_COMMAND_KEY = AXMMaintenanceManagementComma
|
|
|
33
40
|
//#endregion
|
|
34
41
|
|
|
35
42
|
//#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
|
-
}
|
|
43
|
+
/** Widget name for the maintenance interval editor. Kind strings match `AXMAssetIntervalKind`. */
|
|
44
|
+
const AXM_MAINTENANCE_INTERVAL_WIDGET = 'maintenance-interval-editor';
|
|
69
45
|
/**
|
|
70
|
-
*
|
|
71
|
-
*
|
|
46
|
+
* Same stored values as `AXMAssetIntervalKind`.
|
|
47
|
+
* Combinations are multiple entries, not extra kinds.
|
|
72
48
|
*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
49
|
+
const AXM_MAINTENANCE_INTERVAL_KINDS = ['schedule', 'date', 'distance', 'operating-hours', 'operation-count'];
|
|
50
|
+
const METER_KINDS = ['distance', 'operating-hours', 'operation-count'];
|
|
51
|
+
/** How multiple enabled intervals combine. Stored in lowercase, like other persisted enums. */
|
|
52
|
+
var AXMMaintenanceIntervalTriggerLogic;
|
|
53
|
+
(function (AXMMaintenanceIntervalTriggerLogic) {
|
|
54
|
+
AXMMaintenanceIntervalTriggerLogic["Any"] = "any";
|
|
55
|
+
AXMMaintenanceIntervalTriggerLogic["All"] = "all";
|
|
56
|
+
})(AXMMaintenanceIntervalTriggerLogic || (AXMMaintenanceIntervalTriggerLogic = {}));
|
|
57
|
+
/** Unit stored on a meter trigger. Distance is the only kind with a choice. */
|
|
58
|
+
var AXMMaintenanceIntervalUnit;
|
|
59
|
+
(function (AXMMaintenanceIntervalUnit) {
|
|
60
|
+
AXMMaintenanceIntervalUnit["Kilometer"] = "kilometer";
|
|
61
|
+
AXMMaintenanceIntervalUnit["Mile"] = "mile";
|
|
62
|
+
AXMMaintenanceIntervalUnit["Hour"] = "hour";
|
|
63
|
+
AXMMaintenanceIntervalUnit["Operation"] = "operation";
|
|
64
|
+
})(AXMMaintenanceIntervalUnit || (AXMMaintenanceIntervalUnit = {}));
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region ----- Kind helpers -----
|
|
67
|
+
const KIND_SET = new Set(AXM_MAINTENANCE_INTERVAL_KINDS);
|
|
68
|
+
function isAXMMaintenanceIntervalKind(value) {
|
|
69
|
+
return KIND_SET.has(value);
|
|
89
70
|
}
|
|
90
|
-
function
|
|
91
|
-
|
|
92
|
-
|
|
71
|
+
function isAXMMaintenanceMeterKind(value) {
|
|
72
|
+
return value === 'distance' || value === 'operating-hours' || value === 'operation-count';
|
|
73
|
+
}
|
|
74
|
+
function defaultAXMMaintenanceIntervalUnit(kind) {
|
|
75
|
+
switch (kind) {
|
|
76
|
+
case 'distance':
|
|
77
|
+
return AXMMaintenanceIntervalUnit.Kilometer;
|
|
78
|
+
case 'operating-hours':
|
|
79
|
+
return AXMMaintenanceIntervalUnit.Hour;
|
|
80
|
+
case 'operation-count':
|
|
81
|
+
return AXMMaintenanceIntervalUnit.Operation;
|
|
93
82
|
}
|
|
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
|
-
}
|
|
83
|
+
}
|
|
84
|
+
function isAXMMaintenanceIntervalUnitForKind(kind, unit) {
|
|
85
|
+
switch (kind) {
|
|
86
|
+
case 'distance':
|
|
87
|
+
return unit === AXMMaintenanceIntervalUnit.Kilometer || unit === AXMMaintenanceIntervalUnit.Mile;
|
|
88
|
+
case 'operating-hours':
|
|
89
|
+
return unit === AXMMaintenanceIntervalUnit.Hour;
|
|
90
|
+
case 'operation-count':
|
|
91
|
+
return unit === AXMMaintenanceIntervalUnit.Operation;
|
|
109
92
|
}
|
|
110
|
-
return '';
|
|
111
93
|
}
|
|
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
|
-
};
|
|
94
|
+
function emptyAXMMaintenanceIntervalConfig() {
|
|
95
|
+
return { triggerLogic: AXMMaintenanceIntervalTriggerLogic.Any, triggers: [] };
|
|
129
96
|
}
|
|
130
|
-
function
|
|
97
|
+
function emptyAXMMaintenanceIntervalDraft() {
|
|
131
98
|
return {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
checklist: input.checklist,
|
|
142
|
-
},
|
|
99
|
+
triggerLogic: AXMMaintenanceIntervalTriggerLogic.Any,
|
|
100
|
+
scheduleEnabled: false,
|
|
101
|
+
schedule: null,
|
|
102
|
+
dateEnabled: false,
|
|
103
|
+
date: null,
|
|
104
|
+
meters: {
|
|
105
|
+
distance: { enabled: false, interval: null, unit: AXMMaintenanceIntervalUnit.Kilometer },
|
|
106
|
+
'operating-hours': { enabled: false, interval: null, unit: AXMMaintenanceIntervalUnit.Hour },
|
|
107
|
+
'operation-count': { enabled: false, interval: null, unit: AXMMaintenanceIntervalUnit.Operation },
|
|
143
108
|
},
|
|
144
109
|
};
|
|
145
110
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region ----- Normalize -----
|
|
113
|
+
function scheduleMode(value) {
|
|
114
|
+
if (!value || typeof value !== 'object') {
|
|
115
|
+
return '';
|
|
149
116
|
}
|
|
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;
|
|
117
|
+
const mode = value.mode;
|
|
118
|
+
return typeof mode === 'string' ? mode.trim() : '';
|
|
154
119
|
}
|
|
155
|
-
function
|
|
156
|
-
if (!
|
|
157
|
-
return
|
|
120
|
+
function scheduleStartDate(value) {
|
|
121
|
+
if (!value || typeof value !== 'object') {
|
|
122
|
+
return null;
|
|
158
123
|
}
|
|
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;
|
|
124
|
+
const start = value.startCondition;
|
|
125
|
+
return start?.startDate ?? null;
|
|
163
126
|
}
|
|
164
|
-
function
|
|
165
|
-
if (!
|
|
127
|
+
function isSchedule(value) {
|
|
128
|
+
if (!value || typeof value !== 'object') {
|
|
166
129
|
return false;
|
|
167
130
|
}
|
|
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;
|
|
131
|
+
const record = value;
|
|
132
|
+
return typeof record.mode === 'string' || record.startCondition != null || typeof record.recurrence === 'string';
|
|
172
133
|
}
|
|
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;
|
|
134
|
+
/** Calendar day stored on a date interval, as `YYYY-MM-DD`. */
|
|
135
|
+
function readIntervalDate(value) {
|
|
136
|
+
const date = value instanceof Date
|
|
137
|
+
? value
|
|
138
|
+
: typeof value === 'string' && value.trim()
|
|
139
|
+
? new Date(value)
|
|
140
|
+
: null;
|
|
141
|
+
if (!date || Number.isNaN(date.getTime())) {
|
|
142
|
+
return null;
|
|
202
143
|
}
|
|
203
|
-
|
|
144
|
+
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
145
|
+
const day = String(date.getDate()).padStart(2, '0');
|
|
146
|
+
return `${date.getFullYear()}-${month}-${day}`;
|
|
204
147
|
}
|
|
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';
|
|
148
|
+
function isUnit(value) {
|
|
149
|
+
return (value === AXMMaintenanceIntervalUnit.Kilometer ||
|
|
150
|
+
value === AXMMaintenanceIntervalUnit.Mile ||
|
|
151
|
+
value === AXMMaintenanceIntervalUnit.Hour ||
|
|
152
|
+
value === AXMMaintenanceIntervalUnit.Operation);
|
|
219
153
|
}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
154
|
+
function readTriggerLogic(value) {
|
|
155
|
+
return value === AXMMaintenanceIntervalTriggerLogic.All
|
|
156
|
+
? AXMMaintenanceIntervalTriggerLogic.All
|
|
157
|
+
: AXMMaintenanceIntervalTriggerLogic.Any;
|
|
158
|
+
}
|
|
159
|
+
function supportedKindSet(kinds) {
|
|
160
|
+
const set = new Set();
|
|
161
|
+
for (const kind of kinds) {
|
|
162
|
+
if (isAXMMaintenanceIntervalKind(kind)) {
|
|
163
|
+
set.add(kind);
|
|
164
|
+
}
|
|
224
165
|
}
|
|
225
|
-
|
|
226
|
-
|
|
166
|
+
return set;
|
|
167
|
+
}
|
|
168
|
+
function meterIssue(kind, interval) {
|
|
169
|
+
if (typeof interval !== 'number' || !Number.isFinite(interval) || interval <= 0) {
|
|
170
|
+
return 'interval';
|
|
227
171
|
}
|
|
228
|
-
if (
|
|
229
|
-
return '';
|
|
172
|
+
if (kind === 'operation-count' && !Number.isInteger(interval)) {
|
|
173
|
+
return 'integer';
|
|
230
174
|
}
|
|
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));
|
|
175
|
+
return null;
|
|
238
176
|
}
|
|
239
177
|
/**
|
|
240
|
-
*
|
|
241
|
-
*
|
|
178
|
+
* Builds the value object emitted by the interval editor.
|
|
179
|
+
* Unsupported, disabled, and invalid triggers are left out.
|
|
180
|
+
* Zero or one valid trigger always reports `any`.
|
|
242
181
|
*/
|
|
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;
|
|
182
|
+
function buildAXMMaintenanceIntervalConfig(supportedIntervalKinds, draft) {
|
|
183
|
+
const supported = supportedKindSet(supportedIntervalKinds);
|
|
184
|
+
const triggers = [];
|
|
185
|
+
const errors = [];
|
|
186
|
+
if (supported.has('schedule') && draft.scheduleEnabled) {
|
|
187
|
+
const schedule = draft.schedule;
|
|
188
|
+
if (schedule && scheduleMode(schedule) === 'specific-date') {
|
|
189
|
+
if (readIntervalDate(scheduleStartDate(schedule))) {
|
|
190
|
+
triggers.push({ kind: 'schedule', schedule });
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
errors.push({ kind: 'schedule', code: 'date' });
|
|
263
194
|
}
|
|
264
|
-
next.push(item);
|
|
265
195
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
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 };
|
|
196
|
+
else if (isSchedule(schedule)) {
|
|
197
|
+
triggers.push({ kind: 'schedule', schedule });
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
errors.push({ kind: 'schedule', code: 'schedule' });
|
|
201
|
+
}
|
|
301
202
|
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
if (!selected.has(text(bookmark['id']))) {
|
|
307
|
-
return bookmark;
|
|
203
|
+
if (supported.has('date') && draft.dateEnabled) {
|
|
204
|
+
const date = readIntervalDate(draft.date);
|
|
205
|
+
if (date) {
|
|
206
|
+
triggers.push({ kind: 'date', date });
|
|
308
207
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
return bookmark;
|
|
208
|
+
else if (!supported.has('schedule') && isSchedule(draft.schedule)) {
|
|
209
|
+
triggers.push({ kind: 'date', schedule: draft.schedule });
|
|
312
210
|
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
payload['assignedUserIds'] = [text(input.assigneeUserId)];
|
|
211
|
+
else {
|
|
212
|
+
errors.push({ kind: 'date', code: 'date' });
|
|
316
213
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
const
|
|
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;
|
|
214
|
+
}
|
|
215
|
+
for (const kind of METER_KINDS) {
|
|
216
|
+
const meter = draft.meters[kind];
|
|
217
|
+
if (!supported.has(kind) || !meter.enabled) {
|
|
218
|
+
continue;
|
|
333
219
|
}
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
if (!Array.isArray(value)) {
|
|
344
|
-
return [];
|
|
220
|
+
const issue = meterIssue(kind, meter.interval);
|
|
221
|
+
if (issue) {
|
|
222
|
+
errors.push({ kind, code: issue });
|
|
223
|
+
continue;
|
|
224
|
+
}
|
|
225
|
+
const unit = isAXMMaintenanceIntervalUnitForKind(kind, meter.unit)
|
|
226
|
+
? meter.unit
|
|
227
|
+
: defaultAXMMaintenanceIntervalUnit(kind);
|
|
228
|
+
triggers.push({ kind, interval: meter.interval, unit });
|
|
345
229
|
}
|
|
346
|
-
|
|
230
|
+
const triggerLogic = triggers.length > 1 && draft.triggerLogic === AXMMaintenanceIntervalTriggerLogic.All
|
|
231
|
+
? AXMMaintenanceIntervalTriggerLogic.All
|
|
232
|
+
: AXMMaintenanceIntervalTriggerLogic.Any;
|
|
233
|
+
return { config: { triggerLogic, triggers }, errors };
|
|
347
234
|
}
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
if (typeof
|
|
354
|
-
return
|
|
235
|
+
/**
|
|
236
|
+
* Date trigger schedule, or a legacy scheduler-picker object stored before interval configs.
|
|
237
|
+
* Meter-only configs have no calendar schedule.
|
|
238
|
+
*/
|
|
239
|
+
function readMaintenancePlanCalendarSchedule(value) {
|
|
240
|
+
if (!value || typeof value !== 'object') {
|
|
241
|
+
return undefined;
|
|
355
242
|
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
243
|
+
const record = value;
|
|
244
|
+
if (Array.isArray(record.triggers)) {
|
|
245
|
+
for (const item of record.triggers) {
|
|
246
|
+
if (!item || typeof item !== 'object') {
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
const kind = item.kind;
|
|
250
|
+
if (kind !== 'date' && kind !== 'schedule') {
|
|
251
|
+
continue;
|
|
252
|
+
}
|
|
253
|
+
const schedule = item.schedule;
|
|
254
|
+
if (isSchedule(schedule)) {
|
|
255
|
+
return schedule;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
return undefined;
|
|
359
259
|
}
|
|
360
|
-
|
|
361
|
-
return
|
|
260
|
+
if (record.mode != null || record.startCondition != null || record.recurrence != null) {
|
|
261
|
+
return value;
|
|
362
262
|
}
|
|
263
|
+
return undefined;
|
|
363
264
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
}
|
|
371
|
-
const context = isRecord(payload?.['context']) ? payload?.['context'] : null;
|
|
372
|
-
const fromContext = text(context?.['checklist']);
|
|
373
|
-
if (fromContext) {
|
|
374
|
-
return fromContext;
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
return '';
|
|
265
|
+
/**
|
|
266
|
+
* Plan calendar: prefer the Scheduling Widget field, then the interval-config calendar trigger.
|
|
267
|
+
*/
|
|
268
|
+
function readMaintenancePlanSchedule(plan) {
|
|
269
|
+
return (readMaintenancePlanCalendarSchedule(plan.schedule) ??
|
|
270
|
+
readMaintenancePlanCalendarSchedule(plan.intervalConfig));
|
|
378
271
|
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
return [];
|
|
272
|
+
/**
|
|
273
|
+
* Hydrates the Scheduling Widget from older plans that only stored a recurring calendar
|
|
274
|
+
* on `intervalConfig`. Specific Date on intervalConfig stays on that widget and is not copied.
|
|
275
|
+
* The Scheduling Widget and Maintenance Interval Config remain independent.
|
|
276
|
+
*/
|
|
277
|
+
function syncMaintenancePlanScheduleFields(record) {
|
|
278
|
+
const existing = readMaintenancePlanCalendarSchedule(record['schedule']);
|
|
279
|
+
if (existing) {
|
|
280
|
+
return;
|
|
389
281
|
}
|
|
390
|
-
const
|
|
391
|
-
if (
|
|
392
|
-
return
|
|
282
|
+
const fromConfig = readMaintenancePlanCalendarSchedule(record['intervalConfig']);
|
|
283
|
+
if (!fromConfig || scheduleMode(fromConfig) === 'specific-date') {
|
|
284
|
+
return;
|
|
393
285
|
}
|
|
394
|
-
|
|
395
|
-
if (text(bookmark['activityId']) === AXM_INTERVAL_DUE_ACTIVITY_ID) {
|
|
396
|
-
return true;
|
|
397
|
-
}
|
|
398
|
-
const payload = readPayload(bookmark);
|
|
399
|
-
return text(payload?.['activityType']) === 'workflow-activity:human-task';
|
|
400
|
-
});
|
|
401
|
-
return humanTasks.length === 1 ? humanTasks : [];
|
|
402
|
-
}
|
|
403
|
-
function bookmarkReferencesWorkOrder(bookmark, workOrderId) {
|
|
404
|
-
const payload = readPayload(bookmark);
|
|
405
|
-
const context = isRecord(payload?.['context']) ? payload?.['context'] : null;
|
|
406
|
-
return text(context?.['workOrderId']) === workOrderId;
|
|
286
|
+
record['schedule'] = fromConfig;
|
|
407
287
|
}
|
|
408
|
-
|
|
409
|
-
|
|
288
|
+
/** True when `schedule` is a calendar scheduler value (not meter-only interval config). */
|
|
289
|
+
function hasMaintenanceTemplateSchedule(schedule) {
|
|
290
|
+
return readMaintenancePlanCalendarSchedule(schedule) != null;
|
|
410
291
|
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
292
|
+
/**
|
|
293
|
+
* Deep-clones a template/plan Scheduling Widget value for plan creation.
|
|
294
|
+
* Does not invent a daily/Never fallback — callers must load the saved template first.
|
|
295
|
+
*/
|
|
296
|
+
function cloneMaintenanceTemplateSchedule(schedule) {
|
|
297
|
+
const source = readMaintenancePlanCalendarSchedule(schedule);
|
|
298
|
+
if (!source) {
|
|
299
|
+
throw new Error('Maintenance template schedule is required to create a plan.');
|
|
300
|
+
}
|
|
301
|
+
return structuredClone(source);
|
|
415
302
|
}
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
303
|
+
/**
|
|
304
|
+
* Whether a list/partial template row still needs `getOne` before plan generation.
|
|
305
|
+
* Reload when maintenance type or (when required) calendar schedule is missing.
|
|
306
|
+
*/
|
|
307
|
+
function shouldReloadMaintenanceTemplateForPlan(partial, options) {
|
|
308
|
+
if (!partial?.maintenanceTypeId) {
|
|
309
|
+
return true;
|
|
420
310
|
}
|
|
421
|
-
if (
|
|
311
|
+
if (options?.requireSchedule && !hasMaintenanceTemplateSchedule(partial.schedule)) {
|
|
312
|
+
return true;
|
|
313
|
+
}
|
|
314
|
+
return false;
|
|
315
|
+
}
|
|
316
|
+
/** Reads a stored config into editor state. Kinds outside `supportedIntervalKinds` are dropped. */
|
|
317
|
+
function draftFromAXMMaintenanceIntervalConfig(value, supportedIntervalKinds) {
|
|
318
|
+
const draft = emptyAXMMaintenanceIntervalDraft();
|
|
319
|
+
const supported = supportedKindSet(supportedIntervalKinds);
|
|
320
|
+
if (!value || typeof value !== 'object') {
|
|
321
|
+
return draft;
|
|
322
|
+
}
|
|
323
|
+
const record = value;
|
|
324
|
+
draft.triggerLogic = readTriggerLogic(record.triggerLogic);
|
|
325
|
+
if (!Array.isArray(record.triggers)) {
|
|
326
|
+
return draft;
|
|
327
|
+
}
|
|
328
|
+
for (const item of record.triggers) {
|
|
329
|
+
if (!item || typeof item !== 'object' || !('kind' in item) || typeof item.kind !== 'string') {
|
|
330
|
+
continue;
|
|
331
|
+
}
|
|
332
|
+
const kind = item.kind;
|
|
333
|
+
if (kind === 'date') {
|
|
334
|
+
const schedule = item.schedule;
|
|
335
|
+
const date = readIntervalDate(item.date);
|
|
336
|
+
if (isSchedule(schedule) && supported.has('schedule') && !draft.scheduleEnabled) {
|
|
337
|
+
draft.scheduleEnabled = true;
|
|
338
|
+
draft.schedule = schedule;
|
|
339
|
+
}
|
|
340
|
+
if (!supported.has('date')) {
|
|
341
|
+
continue;
|
|
342
|
+
}
|
|
343
|
+
if (date) {
|
|
344
|
+
draft.dateEnabled = true;
|
|
345
|
+
draft.date = date;
|
|
346
|
+
}
|
|
347
|
+
else if (isSchedule(schedule) && !supported.has('schedule')) {
|
|
348
|
+
draft.dateEnabled = true;
|
|
349
|
+
draft.schedule = schedule;
|
|
350
|
+
}
|
|
351
|
+
continue;
|
|
352
|
+
}
|
|
353
|
+
if (!isAXMMaintenanceIntervalKind(kind) || !supported.has(kind)) {
|
|
354
|
+
continue;
|
|
355
|
+
}
|
|
356
|
+
if (kind === 'schedule') {
|
|
357
|
+
const schedule = item.schedule;
|
|
358
|
+
if (!isSchedule(schedule) || draft.scheduleEnabled) {
|
|
359
|
+
continue;
|
|
360
|
+
}
|
|
361
|
+
draft.scheduleEnabled = true;
|
|
362
|
+
draft.schedule = schedule;
|
|
363
|
+
continue;
|
|
364
|
+
}
|
|
365
|
+
if (!isAXMMaintenanceMeterKind(kind)) {
|
|
366
|
+
continue;
|
|
367
|
+
}
|
|
368
|
+
const meter = draft.meters[kind];
|
|
369
|
+
if (meter.enabled) {
|
|
370
|
+
continue;
|
|
371
|
+
}
|
|
372
|
+
const interval = item.interval;
|
|
373
|
+
const unit = item.unit;
|
|
374
|
+
if (meterIssue(kind, typeof interval === 'number' ? interval : null)) {
|
|
375
|
+
continue;
|
|
376
|
+
}
|
|
377
|
+
meter.enabled = true;
|
|
378
|
+
meter.interval = interval;
|
|
379
|
+
meter.unit = isUnit(unit) && isAXMMaintenanceIntervalUnitForKind(kind, unit) ? unit : defaultAXMMaintenanceIntervalUnit(kind);
|
|
380
|
+
}
|
|
381
|
+
return draft;
|
|
382
|
+
}
|
|
383
|
+
//#endregion
|
|
384
|
+
|
|
385
|
+
//#region ----- Constants -----
|
|
386
|
+
/** Seeded inspection workflow. It collects meters and does not replace interval-plan triggers. */
|
|
387
|
+
const AXM_INSPECTION_WORK_ORDER_WORKFLOW_NAME = 'maintenance-inspection-work-order';
|
|
388
|
+
const AXM_INSPECTION_USAGE_KINDS_INPUT = 'usageKinds';
|
|
389
|
+
const DEFAULT_USAGE_KIND = 'distance';
|
|
390
|
+
function readKindToken(value) {
|
|
391
|
+
if (typeof value === 'string') {
|
|
392
|
+
return value.trim();
|
|
393
|
+
}
|
|
394
|
+
if (value && typeof value === 'object' && 'id' in value && typeof value.id === 'string') {
|
|
395
|
+
return value.id.trim();
|
|
396
|
+
}
|
|
397
|
+
return '';
|
|
398
|
+
}
|
|
399
|
+
/** Meter kinds an asset type can collect. Schedule and date stay on the plan, not on this input. */
|
|
400
|
+
function collectableUsageKinds(supported) {
|
|
401
|
+
const kinds = [];
|
|
402
|
+
for (const kind of supported) {
|
|
403
|
+
if (isAXMMaintenanceMeterKind(kind) && !kinds.includes(kind)) {
|
|
404
|
+
kinds.push(kind);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
return kinds;
|
|
408
|
+
}
|
|
409
|
+
function normalizeUsageKindList(value) {
|
|
410
|
+
if (value == null || value === '') {
|
|
411
|
+
return [];
|
|
412
|
+
}
|
|
413
|
+
if (Array.isArray(value)) {
|
|
414
|
+
return value;
|
|
415
|
+
}
|
|
416
|
+
if (typeof value === 'string') {
|
|
417
|
+
return value
|
|
418
|
+
.split(',')
|
|
419
|
+
.map((item) => item.trim())
|
|
420
|
+
.filter((item) => item.length > 0);
|
|
421
|
+
}
|
|
422
|
+
return null;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Readings to collect for one inspection template or instance.
|
|
426
|
+
* An empty selection defaults to distance when that meter is supported.
|
|
427
|
+
* An asset type with no meters can keep an empty selection, including the workflow's distance default.
|
|
428
|
+
* Distance cannot stay selected when the asset type supports other meters but not distance.
|
|
429
|
+
*/
|
|
430
|
+
function resolveInspectionUsageKinds(value, supported) {
|
|
431
|
+
const allowed = collectableUsageKinds(supported);
|
|
432
|
+
const items = normalizeUsageKindList(value);
|
|
433
|
+
if (items == null) {
|
|
434
|
+
return { kinds: [], issue: 'unsupported' };
|
|
435
|
+
}
|
|
436
|
+
const selected = [];
|
|
437
|
+
for (const item of items) {
|
|
438
|
+
const token = readKindToken(item);
|
|
439
|
+
if (!token) {
|
|
440
|
+
continue;
|
|
441
|
+
}
|
|
442
|
+
if (!isAXMMaintenanceMeterKind(token) || !allowed.includes(token)) {
|
|
443
|
+
const onlyDefaultDistance = allowed.length === 0 && items.every((entry) => {
|
|
444
|
+
const kind = readKindToken(entry);
|
|
445
|
+
return kind === '' || kind === DEFAULT_USAGE_KIND;
|
|
446
|
+
});
|
|
447
|
+
if (onlyDefaultDistance) {
|
|
448
|
+
return { kinds: [], issue: null };
|
|
449
|
+
}
|
|
450
|
+
return { kinds: [], issue: token === DEFAULT_USAGE_KIND ? 'distance-unsupported' : 'unsupported' };
|
|
451
|
+
}
|
|
452
|
+
if (!selected.includes(token)) {
|
|
453
|
+
selected.push(token);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
if (selected.length === 0) {
|
|
457
|
+
if (allowed.length === 0) {
|
|
458
|
+
return { kinds: [], issue: null };
|
|
459
|
+
}
|
|
460
|
+
if (!allowed.includes(DEFAULT_USAGE_KIND)) {
|
|
461
|
+
return { kinds: [], issue: 'distance-unsupported' };
|
|
462
|
+
}
|
|
463
|
+
return { kinds: [DEFAULT_USAGE_KIND], issue: null };
|
|
464
|
+
}
|
|
465
|
+
return { kinds: selected, issue: null };
|
|
466
|
+
}
|
|
467
|
+
function readInspectionUsageKinds(source) {
|
|
468
|
+
const workflowInstance = source?.['workflowInstance'] && typeof source['workflowInstance'] === 'object'
|
|
469
|
+
? source['workflowInstance']
|
|
470
|
+
: source;
|
|
471
|
+
const workflowState = workflowInstance?.['workflowState'] && typeof workflowInstance['workflowState'] === 'object'
|
|
472
|
+
? workflowInstance['workflowState']
|
|
473
|
+
: null;
|
|
474
|
+
const input = workflowState?.['input'] && typeof workflowState['input'] === 'object'
|
|
475
|
+
? workflowState['input']
|
|
476
|
+
: null;
|
|
477
|
+
const raw = input?.[AXM_INSPECTION_USAGE_KINDS_INPUT] ?? source?.[AXM_INSPECTION_USAGE_KINDS_INPUT];
|
|
478
|
+
if (!Array.isArray(raw)) {
|
|
479
|
+
return [];
|
|
480
|
+
}
|
|
481
|
+
return raw.map(readKindToken).filter((kind) => isAXMMaintenanceMeterKind(kind));
|
|
482
|
+
}
|
|
483
|
+
//#endregion
|
|
484
|
+
|
|
485
|
+
//#region ----- Constants -----
|
|
486
|
+
/** Bookmark action that starts an interval work order. */
|
|
487
|
+
const AXM_INTERVAL_START_FLOW_ACTION_NAME = 'start-flow';
|
|
488
|
+
/** Bookmark action that opens the in-progress checklist form. */
|
|
489
|
+
const AXM_INTERVAL_OPEN_FORM_ACTION_NAME = 'open-form';
|
|
490
|
+
/** Bookmark action that collects a signature and completes the interval work order. */
|
|
491
|
+
const AXM_INTERVAL_SIGN_OFF_ACTION_NAME = 'sign-off';
|
|
492
|
+
/** Seeded interval workflow name. The task-board card belongs to this instance. */
|
|
493
|
+
const AXM_INTERVAL_WORK_ORDER_WORKFLOW_NAME = 'maintenance-interval-work-order';
|
|
494
|
+
const AXM_INTERVAL_DUE_ACTIVITY_ID = 'intervalDueHumanTask';
|
|
495
|
+
/** Workflow variable / instance property for the checklist case of this work order. */
|
|
496
|
+
const AXM_INTERVAL_CHECKLIST_CASE_ID = 'assessmentCaseId';
|
|
497
|
+
/** Workflow variable / instance property for the checklist session of this work order. */
|
|
498
|
+
const AXM_INTERVAL_CHECKLIST_SESSION_ID = 'assessmentSessionId';
|
|
499
|
+
/** Workflow variable storing the template questionnaire this occurrence was opened against. */
|
|
500
|
+
const AXM_INTERVAL_CHECKLIST_QUESTIONNAIRE_ID = 'checklistQuestionnaireId';
|
|
501
|
+
/** Short-lived claim so concurrent Open Form clicks create one case and session. */
|
|
502
|
+
const AXM_INTERVAL_CHECKLIST_CLAIM = 'checklistOccurrenceClaim';
|
|
503
|
+
const AXM_INTERVAL_IN_PROGRESS_TASK_DESCRIPTION = '@maintenance-management:work-orders.tasks.interval-due.in-progress-description';
|
|
504
|
+
const AXM_INTERVAL_COMPLETED_TASK_DESCRIPTION = '@maintenance-management:work-orders.tasks.interval-due.completed-description';
|
|
505
|
+
const AXM_INTERVAL_CANCELLED_TASK_DESCRIPTION = '@maintenance-management:work-orders.tasks.interval-due.cancelled-description';
|
|
506
|
+
//#endregion
|
|
507
|
+
//#region ----- Checklist id -----
|
|
508
|
+
function isRecord(value) {
|
|
509
|
+
return value != null && typeof value === 'object' && !Array.isArray(value);
|
|
510
|
+
}
|
|
511
|
+
function resolveChecklistId(value) {
|
|
512
|
+
if (typeof value === 'string') {
|
|
513
|
+
const trimmed = value.trim();
|
|
514
|
+
// An unevaluated workflow expression is not a questionnaire.
|
|
515
|
+
if (!trimmed || trimmed.includes('{{')) {
|
|
516
|
+
return '';
|
|
517
|
+
}
|
|
518
|
+
return trimmed;
|
|
519
|
+
}
|
|
520
|
+
if (isRecord(value)) {
|
|
521
|
+
return resolveChecklistId(value['id']);
|
|
522
|
+
}
|
|
523
|
+
return '';
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Questionnaire for this interval occurrence.
|
|
527
|
+
* `workflowState.input.checklist` wins over a task-action or command fallback.
|
|
528
|
+
*/
|
|
529
|
+
function readIntervalChecklistId(source, fallback) {
|
|
530
|
+
const workflowInstance = isRecord(source?.['workflowInstance'])
|
|
531
|
+
? source['workflowInstance']
|
|
532
|
+
: source;
|
|
533
|
+
const workflowState = isRecord(workflowInstance?.['workflowState'])
|
|
534
|
+
? workflowInstance['workflowState']
|
|
535
|
+
: null;
|
|
536
|
+
const input = isRecord(workflowState?.['input']) ? workflowState['input'] : null;
|
|
537
|
+
const properties = isRecord(workflowState?.['properties'])
|
|
538
|
+
? workflowState['properties']
|
|
539
|
+
: null;
|
|
540
|
+
return (resolveChecklistId(input?.['checklist']) ||
|
|
541
|
+
resolveChecklistId(input?.['preChecklistQuestionnaireId']) ||
|
|
542
|
+
resolveChecklistId(properties?.[AXM_INTERVAL_CHECKLIST_QUESTIONNAIRE_ID]) ||
|
|
543
|
+
resolveChecklistId(properties?.['checklist']) ||
|
|
544
|
+
resolveChecklistId(fallback));
|
|
545
|
+
}
|
|
546
|
+
function readChecklistIdFromTaskActions(actions) {
|
|
547
|
+
if (!isRecord(actions)) {
|
|
548
|
+
return '';
|
|
549
|
+
}
|
|
550
|
+
const lists = [actions['prefix'], actions['suffix']];
|
|
551
|
+
for (const list of lists) {
|
|
552
|
+
if (!Array.isArray(list)) {
|
|
553
|
+
continue;
|
|
554
|
+
}
|
|
555
|
+
for (const item of list) {
|
|
556
|
+
if (!isRecord(item) || !isRecord(item['command'])) {
|
|
557
|
+
continue;
|
|
558
|
+
}
|
|
559
|
+
const options = isRecord(item['command']['options']) ? item['command']['options'] : null;
|
|
560
|
+
const checklist = resolveChecklistId(options?.['checklist']);
|
|
561
|
+
if (checklist) {
|
|
562
|
+
return checklist;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
return '';
|
|
567
|
+
}
|
|
568
|
+
//#endregion
|
|
569
|
+
//#region ----- Task action -----
|
|
570
|
+
function buildIntervalWorkOrderOpenFormAction(input) {
|
|
571
|
+
return {
|
|
572
|
+
name: AXM_INTERVAL_OPEN_FORM_ACTION_NAME,
|
|
573
|
+
title: '@maintenance-management:work-orders.tasks.actions.open-form',
|
|
574
|
+
icon: 'fa-light fa-file-lines',
|
|
575
|
+
color: 'primary',
|
|
576
|
+
priority: 'primary',
|
|
577
|
+
command: {
|
|
578
|
+
name: AXMMaintenanceManagementCommandKeys.WorkOrder.OpenForm,
|
|
579
|
+
options: {
|
|
580
|
+
data: { id: input.workOrderId },
|
|
581
|
+
checklist: input.checklist,
|
|
582
|
+
...(input.usageKinds ? { usageKinds: input.usageKinds } : {}),
|
|
583
|
+
},
|
|
584
|
+
},
|
|
585
|
+
};
|
|
586
|
+
}
|
|
587
|
+
function buildIntervalWorkOrderSignOffAction(input) {
|
|
588
|
+
return {
|
|
589
|
+
name: AXM_INTERVAL_SIGN_OFF_ACTION_NAME,
|
|
590
|
+
title: '@maintenance-management:work-orders.tasks.actions.sign-off',
|
|
591
|
+
icon: 'fa-light fa-file-signature',
|
|
592
|
+
color: 'primary',
|
|
593
|
+
priority: 'primary',
|
|
594
|
+
command: {
|
|
595
|
+
name: AXMMaintenanceManagementCommandKeys.WorkOrder.SignOff,
|
|
596
|
+
options: {
|
|
597
|
+
data: { id: input.workOrderId },
|
|
598
|
+
checklist: input.checklist,
|
|
599
|
+
...(input.usageKinds ? { usageKinds: input.usageKinds } : {}),
|
|
600
|
+
},
|
|
601
|
+
},
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
function isIntervalStartFlowAction(action) {
|
|
605
|
+
if (!isRecord(action)) {
|
|
606
|
+
return false;
|
|
607
|
+
}
|
|
608
|
+
const command = isRecord(action['command']) ? action['command'] : null;
|
|
609
|
+
const commandName = typeof command?.['name'] === 'string' ? command['name'].trim() : '';
|
|
610
|
+
const name = typeof action['name'] === 'string' ? action['name'].trim() : '';
|
|
611
|
+
return name === AXM_INTERVAL_START_FLOW_ACTION_NAME || commandName === AXMMaintenanceManagementCommandKeys.WorkOrder.StartFlow;
|
|
612
|
+
}
|
|
613
|
+
function isIntervalSignOffAction(action) {
|
|
614
|
+
if (!isRecord(action)) {
|
|
615
|
+
return false;
|
|
616
|
+
}
|
|
617
|
+
const command = isRecord(action['command']) ? action['command'] : null;
|
|
618
|
+
const commandName = typeof command?.['name'] === 'string' ? command['name'].trim() : '';
|
|
619
|
+
const name = typeof action['name'] === 'string' ? action['name'].trim() : '';
|
|
620
|
+
return name === AXM_INTERVAL_SIGN_OFF_ACTION_NAME || commandName === AXMMaintenanceManagementCommandKeys.WorkOrder.SignOff;
|
|
621
|
+
}
|
|
622
|
+
function isIntervalOpenFormAction(action) {
|
|
623
|
+
if (!isRecord(action)) {
|
|
624
|
+
return false;
|
|
625
|
+
}
|
|
626
|
+
const command = isRecord(action['command']) ? action['command'] : null;
|
|
627
|
+
const commandName = typeof command?.['name'] === 'string' ? command['name'].trim() : '';
|
|
628
|
+
const name = typeof action['name'] === 'string' ? action['name'].trim() : '';
|
|
629
|
+
return name === AXM_INTERVAL_OPEN_FORM_ACTION_NAME || commandName === AXMMaintenanceManagementCommandKeys.WorkOrder.OpenForm;
|
|
630
|
+
}
|
|
631
|
+
/**
|
|
632
|
+
* Replaces Start Flow with a single Open Form action.
|
|
633
|
+
* A second call refreshes that action and does not add another button.
|
|
634
|
+
*/
|
|
635
|
+
function replaceIntervalStartFlowActions(actions, openFormAction) {
|
|
636
|
+
const prefixSource = Array.isArray(actions?.prefix) ? actions.prefix : [];
|
|
637
|
+
const suffixSource = Array.isArray(actions?.suffix) ? actions.suffix : [];
|
|
638
|
+
let changed = false;
|
|
639
|
+
let placed = false;
|
|
640
|
+
const rewrite = (list) => {
|
|
641
|
+
const next = [];
|
|
642
|
+
for (const item of list) {
|
|
643
|
+
if (isIntervalStartFlowAction(item) || isIntervalOpenFormAction(item)) {
|
|
644
|
+
changed = true;
|
|
645
|
+
if (!placed) {
|
|
646
|
+
next.push(openFormAction);
|
|
647
|
+
placed = true;
|
|
648
|
+
}
|
|
649
|
+
continue;
|
|
650
|
+
}
|
|
651
|
+
next.push(item);
|
|
652
|
+
}
|
|
653
|
+
return next;
|
|
654
|
+
};
|
|
655
|
+
const prefix = rewrite(prefixSource);
|
|
656
|
+
const suffix = rewrite(suffixSource);
|
|
657
|
+
if (!placed) {
|
|
658
|
+
suffix.push(openFormAction);
|
|
659
|
+
changed = true;
|
|
660
|
+
}
|
|
661
|
+
return { prefix, suffix, changed };
|
|
662
|
+
}
|
|
663
|
+
/**
|
|
664
|
+
* Completed and cancelled checklists reopen read-only. In Progress stays editable. Planned stays unavailable.
|
|
665
|
+
* Accepts the stored status string or a status object (`name` / `id`).
|
|
666
|
+
* Any other status cannot open this card's form.
|
|
667
|
+
*/
|
|
668
|
+
function resolveIntervalChecklistViewerMode(statusId) {
|
|
669
|
+
const status = readStatusName(statusId);
|
|
670
|
+
if (status === 'completed' || status === 'cancelled') {
|
|
671
|
+
return 'readonly';
|
|
672
|
+
}
|
|
673
|
+
if (status === 'in-progress') {
|
|
674
|
+
return 'editable';
|
|
675
|
+
}
|
|
676
|
+
return 'unavailable';
|
|
677
|
+
}
|
|
678
|
+
/** Status plugin values are a name string or an object with `name` / `id`. */
|
|
679
|
+
function readStatusName(value, seen) {
|
|
680
|
+
if (typeof value === 'string') {
|
|
681
|
+
return value.trim();
|
|
682
|
+
}
|
|
683
|
+
if (value == null || typeof value !== 'object' || Array.isArray(value)) {
|
|
684
|
+
return '';
|
|
685
|
+
}
|
|
686
|
+
if (seen?.has(value)) {
|
|
687
|
+
return '';
|
|
688
|
+
}
|
|
689
|
+
const next = seen ?? new Set();
|
|
690
|
+
next.add(value);
|
|
691
|
+
const record = value;
|
|
692
|
+
return (readStatusName(record['name'], next) ||
|
|
693
|
+
readStatusName(record['id'], next) ||
|
|
694
|
+
readStatusName(record['statusId'], next) ||
|
|
695
|
+
readStatusName(record['status'], next));
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* In Progress cards show Open Form, then Sign Off.
|
|
699
|
+
* Completed cards keep Open Form and drop Sign Off. Other actions, including History, stay where they are.
|
|
700
|
+
*/
|
|
701
|
+
function applyIntervalWorkOrderCardActions(actions, mode, input) {
|
|
702
|
+
const openForm = buildIntervalWorkOrderOpenFormAction(input);
|
|
703
|
+
const desired = mode === 'in-progress'
|
|
704
|
+
? [openForm, buildIntervalWorkOrderSignOffAction(input)]
|
|
705
|
+
: [openForm];
|
|
706
|
+
const prefixSource = Array.isArray(actions?.prefix) ? actions.prefix : [];
|
|
707
|
+
const suffixSource = Array.isArray(actions?.suffix) ? actions.suffix : [];
|
|
708
|
+
let changed = false;
|
|
709
|
+
let placed = false;
|
|
710
|
+
const isManaged = (item) => isIntervalStartFlowAction(item) || isIntervalOpenFormAction(item) || isIntervalSignOffAction(item);
|
|
711
|
+
const rewrite = (list) => {
|
|
712
|
+
const next = [];
|
|
713
|
+
for (const item of list) {
|
|
714
|
+
if (isManaged(item)) {
|
|
715
|
+
changed = true;
|
|
716
|
+
if (!placed) {
|
|
717
|
+
next.push(...desired);
|
|
718
|
+
placed = true;
|
|
719
|
+
}
|
|
720
|
+
continue;
|
|
721
|
+
}
|
|
722
|
+
next.push(item);
|
|
723
|
+
}
|
|
724
|
+
return next;
|
|
725
|
+
};
|
|
726
|
+
const prefix = rewrite(prefixSource);
|
|
727
|
+
const suffix = rewrite(suffixSource);
|
|
728
|
+
if (!placed) {
|
|
729
|
+
suffix.push(...desired);
|
|
730
|
+
changed = true;
|
|
731
|
+
}
|
|
732
|
+
return { prefix, suffix, changed: changed || !sameJson(actions, { prefix, suffix }) };
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* Cancellation from workflow-activity:sign-off is success:true with metadata.outcome Cancelled.
|
|
736
|
+
* Only an explicit Signed outcome with a signature continues.
|
|
737
|
+
*/
|
|
738
|
+
function readSignOffActivityOutcome(result) {
|
|
739
|
+
const outcome = text$1(result?.metadata?.outcome);
|
|
740
|
+
if (result?.success === false) {
|
|
741
|
+
return outcome === 'Cancelled' ? 'Cancelled' : 'Failed';
|
|
742
|
+
}
|
|
743
|
+
if (!result || outcome === 'Cancelled' || outcome !== 'Signed') {
|
|
744
|
+
return 'Cancelled';
|
|
745
|
+
}
|
|
746
|
+
const data = isRecord(result.data) ? result.data : null;
|
|
747
|
+
return text$1(data?.['signature']) ? 'Signed' : 'Cancelled';
|
|
748
|
+
}
|
|
749
|
+
function rewriteIntervalCardBookmarks(input) {
|
|
750
|
+
const workflowInstance = isRecord(input.instance['workflowInstance'])
|
|
751
|
+
? input.instance['workflowInstance']
|
|
752
|
+
: input.instance;
|
|
753
|
+
const bookmarks = readBookmarkList(workflowInstance['bookmarks']);
|
|
754
|
+
const definitionId = text$1(input.instance['definitionId']) || text$1(workflowInstance['definitionId']);
|
|
755
|
+
const checklist = readIntervalChecklistId(input.instance, readChecklistFromBookmarks(bookmarks));
|
|
756
|
+
const usageKinds = readInspectionUsageKinds(input.instance).join(',');
|
|
757
|
+
const selected = new Set(selectIntervalBookmarks(bookmarks, input.workOrderId, text$1(input.sourceBookmarkId), definitionId).map((bookmark) => text$1(bookmark['id'])));
|
|
758
|
+
if (selected.size === 0) {
|
|
759
|
+
return { bookmarks, changed: false };
|
|
760
|
+
}
|
|
761
|
+
const inspectionCard = definitionId === AXM_INSPECTION_WORK_ORDER_WORKFLOW_NAME;
|
|
762
|
+
const description = input.mode === 'cancelled'
|
|
763
|
+
? inspectionCard
|
|
764
|
+
? '@maintenance-management:work-orders.tasks.inspection.cancelled-description'
|
|
765
|
+
: AXM_INTERVAL_CANCELLED_TASK_DESCRIPTION
|
|
766
|
+
: inspectionCard
|
|
767
|
+
? input.mode === 'completed'
|
|
768
|
+
? '@maintenance-management:work-orders.tasks.inspection.completed-description'
|
|
769
|
+
: '@maintenance-management:work-orders.tasks.inspection.in-progress-description'
|
|
770
|
+
: input.mode === 'completed'
|
|
771
|
+
? AXM_INTERVAL_COMPLETED_TASK_DESCRIPTION
|
|
772
|
+
: AXM_INTERVAL_IN_PROGRESS_TASK_DESCRIPTION;
|
|
773
|
+
const statusId = input.mode === 'completed' ? 'completed' : input.mode === 'cancelled' ? 'cancelled' : 'in-progress';
|
|
774
|
+
let changed = false;
|
|
775
|
+
const next = bookmarks.map((bookmark) => {
|
|
776
|
+
if (!selected.has(text$1(bookmark['id']))) {
|
|
777
|
+
return bookmark;
|
|
778
|
+
}
|
|
779
|
+
const payload = readPayload(bookmark);
|
|
780
|
+
if (!payload) {
|
|
781
|
+
return bookmark;
|
|
782
|
+
}
|
|
783
|
+
const before = JSON.stringify(payload);
|
|
784
|
+
if (input.mode === 'in-progress' && text$1(input.assigneeUserId)) {
|
|
785
|
+
payload['assignedUserIds'] = [text$1(input.assigneeUserId)];
|
|
786
|
+
}
|
|
787
|
+
const context = isRecord(payload['context']) ? { ...payload['context'] } : {};
|
|
788
|
+
const actions = isRecord(payload['actions']) ? payload['actions'] : {};
|
|
789
|
+
const replaced = applyIntervalWorkOrderCardActions({
|
|
790
|
+
prefix: Array.isArray(actions['prefix']) ? actions['prefix'] : [],
|
|
791
|
+
suffix: Array.isArray(actions['suffix']) ? actions['suffix'] : [],
|
|
792
|
+
}, input.mode, { workOrderId: input.workOrderId, checklist, ...(usageKinds ? { usageKinds } : {}) });
|
|
793
|
+
payload['actions'] = { prefix: replaced.prefix, suffix: replaced.suffix };
|
|
794
|
+
payload['description'] = description;
|
|
795
|
+
if (text$1(input.dueDate)) {
|
|
796
|
+
payload['dueDate'] = text$1(input.dueDate);
|
|
797
|
+
}
|
|
798
|
+
if (input.mode === 'cancelled') {
|
|
799
|
+
payload['waitingResolved'] = true;
|
|
800
|
+
payload['resolvedReason'] = text$1(input.resolvedReason) || 'deadline-expiry';
|
|
801
|
+
}
|
|
802
|
+
payload['context'] = {
|
|
803
|
+
...context,
|
|
804
|
+
workOrderId: input.workOrderId,
|
|
805
|
+
statusId,
|
|
806
|
+
...(checklist ? { checklist } : {}),
|
|
807
|
+
...(usageKinds ? { usageKinds } : {}),
|
|
808
|
+
};
|
|
809
|
+
if (JSON.stringify(payload) !== before) {
|
|
810
|
+
changed = true;
|
|
811
|
+
}
|
|
812
|
+
return {
|
|
813
|
+
...bookmark,
|
|
814
|
+
payload,
|
|
815
|
+
payloadJson: JSON.stringify(payload),
|
|
816
|
+
};
|
|
817
|
+
});
|
|
818
|
+
return { bookmarks: next, changed };
|
|
819
|
+
}
|
|
820
|
+
function readBookmarkList(value) {
|
|
821
|
+
if (!Array.isArray(value)) {
|
|
822
|
+
return [];
|
|
823
|
+
}
|
|
824
|
+
return value.map((item) => (isRecord(item) ? { ...item } : null)).filter((item) => !!item);
|
|
825
|
+
}
|
|
826
|
+
function readPayload(bookmark) {
|
|
827
|
+
if (isRecord(bookmark['payload'])) {
|
|
828
|
+
return { ...bookmark['payload'] };
|
|
829
|
+
}
|
|
830
|
+
const payloadJson = bookmark['payloadJson'];
|
|
831
|
+
if (typeof payloadJson !== 'string' || !payloadJson.trim()) {
|
|
832
|
+
return null;
|
|
833
|
+
}
|
|
834
|
+
try {
|
|
835
|
+
const parsed = JSON.parse(payloadJson);
|
|
836
|
+
return isRecord(parsed) ? { ...parsed } : null;
|
|
837
|
+
}
|
|
838
|
+
catch {
|
|
839
|
+
return null;
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
function readChecklistFromBookmarks(bookmarks) {
|
|
843
|
+
for (const bookmark of bookmarks) {
|
|
844
|
+
const payload = readPayload(bookmark);
|
|
845
|
+
const fromActions = readChecklistIdFromTaskActions(payload?.['actions']);
|
|
846
|
+
if (fromActions) {
|
|
847
|
+
return fromActions;
|
|
848
|
+
}
|
|
849
|
+
const context = isRecord(payload?.['context']) ? payload?.['context'] : null;
|
|
850
|
+
const fromContext = text$1(context?.['checklist']);
|
|
851
|
+
if (fromContext) {
|
|
852
|
+
return fromContext;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
return '';
|
|
856
|
+
}
|
|
857
|
+
function selectIntervalBookmarks(bookmarks, workOrderId, sourceBookmarkId, definitionId) {
|
|
858
|
+
const active = bookmarks.filter((bookmark) => bookmark['isConsumed'] !== true && bookmark['consumed'] !== true);
|
|
859
|
+
if (sourceBookmarkId) {
|
|
860
|
+
const byId = active.filter((bookmark) => text$1(bookmark['id']) === sourceBookmarkId);
|
|
861
|
+
if (byId.length > 0) {
|
|
862
|
+
return byId;
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
if (definitionId !== AXM_INTERVAL_WORK_ORDER_WORKFLOW_NAME &&
|
|
866
|
+
definitionId !== AXM_INSPECTION_WORK_ORDER_WORKFLOW_NAME) {
|
|
867
|
+
return [];
|
|
868
|
+
}
|
|
869
|
+
const byWorkOrder = active.filter((bookmark) => bookmarkReferencesWorkOrder(bookmark, workOrderId));
|
|
870
|
+
if (byWorkOrder.length > 0) {
|
|
871
|
+
return byWorkOrder;
|
|
872
|
+
}
|
|
873
|
+
const humanTasks = active.filter((bookmark) => {
|
|
874
|
+
if (text$1(bookmark['activityId']) === AXM_INTERVAL_DUE_ACTIVITY_ID) {
|
|
875
|
+
return true;
|
|
876
|
+
}
|
|
877
|
+
const payload = readPayload(bookmark);
|
|
878
|
+
return text$1(payload?.['activityType']) === 'workflow-activity:human-task';
|
|
879
|
+
});
|
|
880
|
+
return humanTasks.length === 1 ? humanTasks : [];
|
|
881
|
+
}
|
|
882
|
+
function bookmarkReferencesWorkOrder(bookmark, workOrderId) {
|
|
883
|
+
const payload = readPayload(bookmark);
|
|
884
|
+
const context = isRecord(payload?.['context']) ? payload?.['context'] : null;
|
|
885
|
+
return text$1(context?.['workOrderId']) === workOrderId;
|
|
886
|
+
}
|
|
887
|
+
function sameJson(left, right) {
|
|
888
|
+
return JSON.stringify(left ?? null) === JSON.stringify(right ?? null);
|
|
889
|
+
}
|
|
890
|
+
//#endregion
|
|
891
|
+
//#region ----- Occurrence identity -----
|
|
892
|
+
function text$1(value) {
|
|
893
|
+
return typeof value === 'string' ? value.trim() : '';
|
|
894
|
+
}
|
|
895
|
+
function createdStamp(row) {
|
|
896
|
+
const auditAt = row.auditInfo?.created?.at;
|
|
897
|
+
if (typeof auditAt === 'string' && auditAt.trim()) {
|
|
898
|
+
return auditAt.trim();
|
|
899
|
+
}
|
|
900
|
+
if (auditAt instanceof Date && !Number.isNaN(auditAt.getTime())) {
|
|
422
901
|
return auditAt.toISOString();
|
|
423
902
|
}
|
|
424
903
|
if (typeof row.createdAt === 'string' && row.createdAt.trim()) {
|
|
@@ -428,7 +907,7 @@ function createdStamp(row) {
|
|
|
428
907
|
}
|
|
429
908
|
/** Earliest created row, then lowest id. Rows without an id are ignored. */
|
|
430
909
|
function pickCanonicalChecklistRow(rows) {
|
|
431
|
-
const withId = rows.filter((row) => text(row.id));
|
|
910
|
+
const withId = rows.filter((row) => text$1(row.id));
|
|
432
911
|
if (withId.length === 0) {
|
|
433
912
|
return null;
|
|
434
913
|
}
|
|
@@ -444,8 +923,8 @@ function pickCanonicalChecklistRow(rows) {
|
|
|
444
923
|
if (!leftAt && rightAt) {
|
|
445
924
|
return 1;
|
|
446
925
|
}
|
|
447
|
-
const leftId = text(left.id);
|
|
448
|
-
const rightId = text(right.id);
|
|
926
|
+
const leftId = text$1(left.id);
|
|
927
|
+
const rightId = text$1(right.id);
|
|
449
928
|
if (leftId === rightId) {
|
|
450
929
|
return 0;
|
|
451
930
|
}
|
|
@@ -457,21 +936,21 @@ function pickCanonicalChecklistRow(rows) {
|
|
|
457
936
|
* Questionnaire id alone is not enough.
|
|
458
937
|
*/
|
|
459
938
|
function isWorkOrderChecklistOccurrence(input) {
|
|
460
|
-
const workOrderId = text(input.workOrderId);
|
|
461
|
-
const questionnaireId = text(input.questionnaireId);
|
|
462
|
-
const subjectType = text(input.subjectType);
|
|
463
|
-
const caseId = text(input.assessmentCase?.['id']);
|
|
464
|
-
const sessionCaseId = text(input.session?.['caseId']);
|
|
939
|
+
const workOrderId = text$1(input.workOrderId);
|
|
940
|
+
const questionnaireId = text$1(input.questionnaireId);
|
|
941
|
+
const subjectType = text$1(input.subjectType);
|
|
942
|
+
const caseId = text$1(input.assessmentCase?.['id']);
|
|
943
|
+
const sessionCaseId = text$1(input.session?.['caseId']);
|
|
465
944
|
if (!workOrderId || !questionnaireId || !subjectType || !caseId || !sessionCaseId || sessionCaseId !== caseId) {
|
|
466
945
|
return false;
|
|
467
946
|
}
|
|
468
|
-
if (text(input.assessmentCase?.['questionnaireId']) !== questionnaireId) {
|
|
947
|
+
if (text$1(input.assessmentCase?.['questionnaireId']) !== questionnaireId) {
|
|
469
948
|
return false;
|
|
470
949
|
}
|
|
471
950
|
const subject = isRecord(input.assessmentCase?.['subjectRef'])
|
|
472
951
|
? input.assessmentCase?.['subjectRef']
|
|
473
952
|
: null;
|
|
474
|
-
return text(subject?.['type']) === subjectType && text(subject?.['id']) === workOrderId;
|
|
953
|
+
return text$1(subject?.['type']) === subjectType && text$1(subject?.['id']) === workOrderId;
|
|
475
954
|
}
|
|
476
955
|
//#endregion
|
|
477
956
|
|
|
@@ -513,380 +992,296 @@ const AXMMaintenanceManagementMenuKeys = {
|
|
|
513
992
|
*/
|
|
514
993
|
const AXPAssetsMaintenancePermissionKeys = {
|
|
515
994
|
Access: 'AssetsMaintenance:Permission:Access',
|
|
516
|
-
MaintainAssets: 'AssetsMaintenance:Permission:MaintainAssets',
|
|
517
|
-
MaintainMaintenance: 'AssetsMaintenance:Permission:MaintainMaintenance',
|
|
518
|
-
Setup: 'AssetsMaintenance:Permission:Setup',
|
|
519
|
-
};
|
|
520
|
-
const cap = AXPAssetsMaintenancePermissionKeys.MaintainMaintenance;
|
|
521
|
-
function entityCrud() {
|
|
522
|
-
return {
|
|
523
|
-
Management: cap,
|
|
524
|
-
View: cap,
|
|
525
|
-
Create: cap,
|
|
526
|
-
Update: cap,
|
|
527
|
-
Delete: cap,
|
|
528
|
-
};
|
|
529
|
-
}
|
|
530
|
-
/**
|
|
531
|
-
* @deprecated Prefer {@link AXPAssetsMaintenancePermissionKeys}.
|
|
532
|
-
* Legacy nested shape kept so existing imports compile during migration.
|
|
533
|
-
*/
|
|
534
|
-
const AXMMaintenanceManagementPermissionKeys = {
|
|
535
|
-
MaintenanceManagement: {
|
|
536
|
-
Management: cap,
|
|
537
|
-
ActivityCategory: entityCrud(),
|
|
538
|
-
MaintenanceType: entityCrud(),
|
|
539
|
-
MaintenanceTemplate: entityCrud(),
|
|
540
|
-
MaintenancePlan: entityCrud(),
|
|
541
|
-
WorkPackage: entityCrud(),
|
|
542
|
-
WorkOrder: entityCrud(),
|
|
543
|
-
WorkReport: entityCrud(),
|
|
544
|
-
MaintenanceTemplateActivityType: entityCrud(),
|
|
545
|
-
MaintenanceTemplateResource: entityCrud(),
|
|
546
|
-
MaintenanceTemplateFailureMode: entityCrud(),
|
|
547
|
-
ActivityType: entityCrud(),
|
|
548
|
-
ActivityTypeAssetType: entityCrud(),
|
|
549
|
-
ActivityTypeResource: entityCrud(),
|
|
550
|
-
FailureCause: entityCrud(),
|
|
551
|
-
FailureMechanism: entityCrud(),
|
|
552
|
-
FailureDetection: entityCrud(),
|
|
553
|
-
FailureEffect: entityCrud(),
|
|
554
|
-
FailureSeverity: entityCrud(),
|
|
555
|
-
FailureType: entityCrud(),
|
|
556
|
-
FailureMode: entityCrud(),
|
|
557
|
-
FailureRegister: entityCrud(),
|
|
558
|
-
},
|
|
559
|
-
};
|
|
560
|
-
|
|
561
|
-
//#region ---- Status names ----
|
|
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';
|
|
604
|
-
/**
|
|
605
|
-
* Same stored values as `AXMAssetIntervalKind`.
|
|
606
|
-
* Combinations are multiple entries, not extra kinds.
|
|
607
|
-
*/
|
|
608
|
-
const AXM_MAINTENANCE_INTERVAL_KINDS = ['schedule', 'date', 'distance', 'operating-hours', 'operation-count'];
|
|
609
|
-
const METER_KINDS = ['distance', 'operating-hours', 'operation-count'];
|
|
610
|
-
/** How multiple enabled intervals combine. Stored in lowercase, like other persisted enums. */
|
|
611
|
-
var AXMMaintenanceIntervalTriggerLogic;
|
|
612
|
-
(function (AXMMaintenanceIntervalTriggerLogic) {
|
|
613
|
-
AXMMaintenanceIntervalTriggerLogic["Any"] = "any";
|
|
614
|
-
AXMMaintenanceIntervalTriggerLogic["All"] = "all";
|
|
615
|
-
})(AXMMaintenanceIntervalTriggerLogic || (AXMMaintenanceIntervalTriggerLogic = {}));
|
|
616
|
-
/** Unit stored on a meter trigger. Distance is the only kind with a choice. */
|
|
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';
|
|
632
|
-
}
|
|
633
|
-
function defaultAXMMaintenanceIntervalUnit(kind) {
|
|
634
|
-
switch (kind) {
|
|
635
|
-
case 'distance':
|
|
636
|
-
return AXMMaintenanceIntervalUnit.Kilometer;
|
|
637
|
-
case 'operating-hours':
|
|
638
|
-
return AXMMaintenanceIntervalUnit.Hour;
|
|
639
|
-
case 'operation-count':
|
|
640
|
-
return AXMMaintenanceIntervalUnit.Operation;
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
function isAXMMaintenanceIntervalUnitForKind(kind, unit) {
|
|
644
|
-
switch (kind) {
|
|
645
|
-
case 'distance':
|
|
646
|
-
return unit === AXMMaintenanceIntervalUnit.Kilometer || unit === AXMMaintenanceIntervalUnit.Mile;
|
|
647
|
-
case 'operating-hours':
|
|
648
|
-
return unit === AXMMaintenanceIntervalUnit.Hour;
|
|
649
|
-
case 'operation-count':
|
|
650
|
-
return unit === AXMMaintenanceIntervalUnit.Operation;
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
function emptyAXMMaintenanceIntervalConfig() {
|
|
654
|
-
return { triggerLogic: AXMMaintenanceIntervalTriggerLogic.Any, triggers: [] };
|
|
655
|
-
}
|
|
656
|
-
function emptyAXMMaintenanceIntervalDraft() {
|
|
657
|
-
return {
|
|
658
|
-
triggerLogic: AXMMaintenanceIntervalTriggerLogic.Any,
|
|
659
|
-
scheduleEnabled: false,
|
|
660
|
-
schedule: null,
|
|
661
|
-
dateEnabled: false,
|
|
662
|
-
date: null,
|
|
663
|
-
meters: {
|
|
664
|
-
distance: { enabled: false, interval: null, unit: AXMMaintenanceIntervalUnit.Kilometer },
|
|
665
|
-
'operating-hours': { enabled: false, interval: null, unit: AXMMaintenanceIntervalUnit.Hour },
|
|
666
|
-
'operation-count': { enabled: false, interval: null, unit: AXMMaintenanceIntervalUnit.Operation },
|
|
667
|
-
},
|
|
668
|
-
};
|
|
669
|
-
}
|
|
670
|
-
//#endregion
|
|
671
|
-
//#region ----- Normalize -----
|
|
672
|
-
function scheduleMode(value) {
|
|
673
|
-
if (!value || typeof value !== 'object') {
|
|
674
|
-
return '';
|
|
675
|
-
}
|
|
676
|
-
const mode = value.mode;
|
|
677
|
-
return typeof mode === 'string' ? mode.trim() : '';
|
|
678
|
-
}
|
|
679
|
-
function scheduleStartDate(value) {
|
|
680
|
-
if (!value || typeof value !== 'object') {
|
|
681
|
-
return null;
|
|
682
|
-
}
|
|
683
|
-
const start = value.startCondition;
|
|
684
|
-
return start?.startDate ?? null;
|
|
685
|
-
}
|
|
686
|
-
function isSchedule(value) {
|
|
687
|
-
if (!value || typeof value !== 'object') {
|
|
688
|
-
return false;
|
|
689
|
-
}
|
|
690
|
-
const record = value;
|
|
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())) {
|
|
701
|
-
return null;
|
|
702
|
-
}
|
|
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
|
-
}
|
|
713
|
-
function readTriggerLogic(value) {
|
|
714
|
-
return value === AXMMaintenanceIntervalTriggerLogic.All
|
|
715
|
-
? AXMMaintenanceIntervalTriggerLogic.All
|
|
716
|
-
: AXMMaintenanceIntervalTriggerLogic.Any;
|
|
717
|
-
}
|
|
718
|
-
function supportedKindSet(kinds) {
|
|
719
|
-
const set = new Set();
|
|
720
|
-
for (const kind of kinds) {
|
|
721
|
-
if (isAXMMaintenanceIntervalKind(kind)) {
|
|
722
|
-
set.add(kind);
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
return set;
|
|
726
|
-
}
|
|
727
|
-
function meterIssue(kind, interval) {
|
|
728
|
-
if (typeof interval !== 'number' || !Number.isFinite(interval) || interval <= 0) {
|
|
729
|
-
return 'interval';
|
|
730
|
-
}
|
|
731
|
-
if (kind === 'operation-count' && !Number.isInteger(interval)) {
|
|
732
|
-
return 'integer';
|
|
733
|
-
}
|
|
734
|
-
return null;
|
|
995
|
+
MaintainAssets: 'AssetsMaintenance:Permission:MaintainAssets',
|
|
996
|
+
MaintainMaintenance: 'AssetsMaintenance:Permission:MaintainMaintenance',
|
|
997
|
+
Setup: 'AssetsMaintenance:Permission:Setup',
|
|
998
|
+
};
|
|
999
|
+
const cap = AXPAssetsMaintenancePermissionKeys.MaintainMaintenance;
|
|
1000
|
+
function entityCrud() {
|
|
1001
|
+
return {
|
|
1002
|
+
Management: cap,
|
|
1003
|
+
View: cap,
|
|
1004
|
+
Create: cap,
|
|
1005
|
+
Update: cap,
|
|
1006
|
+
Delete: cap,
|
|
1007
|
+
};
|
|
735
1008
|
}
|
|
736
1009
|
/**
|
|
737
|
-
*
|
|
738
|
-
*
|
|
739
|
-
* Zero or one valid trigger always reports `any`.
|
|
1010
|
+
* @deprecated Prefer {@link AXPAssetsMaintenancePermissionKeys}.
|
|
1011
|
+
* Legacy nested shape kept so existing imports compile during migration.
|
|
740
1012
|
*/
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
1013
|
+
const AXMMaintenanceManagementPermissionKeys = {
|
|
1014
|
+
MaintenanceManagement: {
|
|
1015
|
+
Management: cap,
|
|
1016
|
+
ActivityCategory: entityCrud(),
|
|
1017
|
+
MaintenanceType: entityCrud(),
|
|
1018
|
+
MaintenanceTemplate: entityCrud(),
|
|
1019
|
+
MaintenancePlan: entityCrud(),
|
|
1020
|
+
WorkPackage: entityCrud(),
|
|
1021
|
+
WorkOrder: entityCrud(),
|
|
1022
|
+
WorkReport: entityCrud(),
|
|
1023
|
+
MaintenanceTemplateActivityType: entityCrud(),
|
|
1024
|
+
MaintenanceTemplateResource: entityCrud(),
|
|
1025
|
+
MaintenanceTemplateFailureMode: entityCrud(),
|
|
1026
|
+
ActivityType: entityCrud(),
|
|
1027
|
+
ActivityTypeAssetType: entityCrud(),
|
|
1028
|
+
ActivityTypeResource: entityCrud(),
|
|
1029
|
+
FailureCause: entityCrud(),
|
|
1030
|
+
FailureMechanism: entityCrud(),
|
|
1031
|
+
FailureDetection: entityCrud(),
|
|
1032
|
+
FailureEffect: entityCrud(),
|
|
1033
|
+
FailureSeverity: entityCrud(),
|
|
1034
|
+
FailureType: entityCrud(),
|
|
1035
|
+
FailureMode: entityCrud(),
|
|
1036
|
+
FailureRegister: entityCrud(),
|
|
1037
|
+
},
|
|
1038
|
+
};
|
|
1039
|
+
|
|
1040
|
+
//#region ---- Status names ----
|
|
1041
|
+
var AXMWorkOrderStatus;
|
|
1042
|
+
(function (AXMWorkOrderStatus) {
|
|
1043
|
+
AXMWorkOrderStatus["Planned"] = "planned";
|
|
1044
|
+
AXMWorkOrderStatus["Scheduled"] = "scheduled";
|
|
1045
|
+
AXMWorkOrderStatus["Assigned"] = "assigned";
|
|
1046
|
+
AXMWorkOrderStatus["InProgress"] = "in-progress";
|
|
1047
|
+
AXMWorkOrderStatus["OnHold"] = "on-hold";
|
|
1048
|
+
AXMWorkOrderStatus["Completed"] = "completed";
|
|
1049
|
+
AXMWorkOrderStatus["SignedOff"] = "signed-off";
|
|
1050
|
+
AXMWorkOrderStatus["Cancelled"] = "cancelled";
|
|
1051
|
+
})(AXMWorkOrderStatus || (AXMWorkOrderStatus = {}));
|
|
1052
|
+
//#endregion
|
|
1053
|
+
|
|
1054
|
+
//#region ---- Source type enum ----
|
|
1055
|
+
var AXMWorkOrderSourceType;
|
|
1056
|
+
(function (AXMWorkOrderSourceType) {
|
|
1057
|
+
AXMWorkOrderSourceType["Manual"] = "manual";
|
|
1058
|
+
AXMWorkOrderSourceType["MaintenancePlan"] = "maintenance-plan";
|
|
1059
|
+
AXMWorkOrderSourceType["CreateAsset"] = "create-asset";
|
|
1060
|
+
AXMWorkOrderSourceType["FailureRegister"] = "failure-register";
|
|
1061
|
+
})(AXMWorkOrderSourceType || (AXMWorkOrderSourceType = {}));
|
|
1062
|
+
//#endregion
|
|
1063
|
+
|
|
1064
|
+
//#region ---- Status names ----
|
|
1065
|
+
var AXMFailureRegisterStatus;
|
|
1066
|
+
(function (AXMFailureRegisterStatus) {
|
|
1067
|
+
AXMFailureRegisterStatus["Reported"] = "reported";
|
|
1068
|
+
AXMFailureRegisterStatus["UnderReview"] = "underReview";
|
|
1069
|
+
AXMFailureRegisterStatus["WorkOrderRequired"] = "workOrderRequired";
|
|
1070
|
+
AXMFailureRegisterStatus["WorkOrderCreated"] = "workOrderCreated";
|
|
1071
|
+
AXMFailureRegisterStatus["InProgress"] = "inProgress";
|
|
1072
|
+
AXMFailureRegisterStatus["Resolved"] = "resolved";
|
|
1073
|
+
AXMFailureRegisterStatus["FollowUpRequired"] = "followUpRequired";
|
|
1074
|
+
AXMFailureRegisterStatus["Rejected"] = "rejected";
|
|
1075
|
+
AXMFailureRegisterStatus["Duplicate"] = "duplicate";
|
|
1076
|
+
AXMFailureRegisterStatus["Closed"] = "closed";
|
|
1077
|
+
})(AXMFailureRegisterStatus || (AXMFailureRegisterStatus = {}));
|
|
1078
|
+
//#endregion
|
|
1079
|
+
|
|
1080
|
+
//#endregion
|
|
1081
|
+
//#region ----- Snapshot -----
|
|
1082
|
+
function readCompletion(value) {
|
|
1083
|
+
if (!Array.isArray(value)) {
|
|
1084
|
+
return [];
|
|
761
1085
|
}
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
if (
|
|
765
|
-
|
|
766
|
-
}
|
|
767
|
-
else if (!supported.has('schedule') && isSchedule(draft.schedule)) {
|
|
768
|
-
triggers.push({ kind: 'date', schedule: draft.schedule });
|
|
1086
|
+
const readings = [];
|
|
1087
|
+
for (const item of value) {
|
|
1088
|
+
if (!item || typeof item !== 'object') {
|
|
1089
|
+
continue;
|
|
769
1090
|
}
|
|
770
|
-
|
|
771
|
-
|
|
1091
|
+
const record = item;
|
|
1092
|
+
const kind = record['kind'];
|
|
1093
|
+
const unit = record['unit'];
|
|
1094
|
+
const currentValue = record['currentValue'];
|
|
1095
|
+
const capturedAt = record['capturedAt'];
|
|
1096
|
+
if (typeof kind !== 'string' ||
|
|
1097
|
+
!isAXMMaintenanceMeterKind(kind) ||
|
|
1098
|
+
typeof unit !== 'string' ||
|
|
1099
|
+
!isAXMMaintenanceIntervalUnitForKind(kind, unit) ||
|
|
1100
|
+
typeof currentValue !== 'number' ||
|
|
1101
|
+
typeof capturedAt !== 'string') {
|
|
1102
|
+
continue;
|
|
772
1103
|
}
|
|
1104
|
+
readings.push({ kind, unit: unit, currentValue, capturedAt });
|
|
773
1105
|
}
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
1106
|
+
return readings;
|
|
1107
|
+
}
|
|
1108
|
+
function readDrafts(value, capturedAt) {
|
|
1109
|
+
if (!Array.isArray(value)) {
|
|
1110
|
+
return [];
|
|
1111
|
+
}
|
|
1112
|
+
const readings = [];
|
|
1113
|
+
for (const item of value) {
|
|
1114
|
+
if (!item || typeof item !== 'object') {
|
|
777
1115
|
continue;
|
|
778
1116
|
}
|
|
779
|
-
const
|
|
780
|
-
|
|
781
|
-
|
|
1117
|
+
const record = item;
|
|
1118
|
+
const kind = record['kind'];
|
|
1119
|
+
const unit = record['unit'];
|
|
1120
|
+
const rawValue = record['value'] ?? record['currentValue'];
|
|
1121
|
+
if (typeof kind !== 'string' || !isAXMMaintenanceMeterKind(kind) || typeof unit !== 'string' || typeof rawValue !== 'number') {
|
|
782
1122
|
continue;
|
|
783
1123
|
}
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
1124
|
+
if (!isAXMMaintenanceIntervalUnitForKind(kind, unit)) {
|
|
1125
|
+
continue;
|
|
1126
|
+
}
|
|
1127
|
+
const readingAt = typeof record['readingAt'] === 'string' && record['readingAt'].trim() ? record['readingAt'] : capturedAt;
|
|
1128
|
+
readings.push({
|
|
1129
|
+
kind: kind,
|
|
1130
|
+
unit: unit,
|
|
1131
|
+
currentValue: rawValue,
|
|
1132
|
+
capturedAt: readingAt,
|
|
1133
|
+
});
|
|
1134
|
+
}
|
|
1135
|
+
return readings;
|
|
793
1136
|
}
|
|
794
1137
|
/**
|
|
795
|
-
*
|
|
796
|
-
*
|
|
1138
|
+
* Completed work orders keep the readings captured at completion.
|
|
1139
|
+
* A draft submitted with the task wins over a later live asset meter.
|
|
1140
|
+
* Live meters are used only when the task has not submitted readings yet.
|
|
797
1141
|
*/
|
|
798
|
-
function
|
|
799
|
-
|
|
800
|
-
|
|
1142
|
+
function resolveWorkOrderCompletionUsageSnapshot(input) {
|
|
1143
|
+
const existing = readCompletion(input.existing);
|
|
1144
|
+
if (existing.length > 0) {
|
|
1145
|
+
return { readings: existing, source: 'existing' };
|
|
801
1146
|
}
|
|
802
|
-
const
|
|
803
|
-
if (
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
1147
|
+
const drafts = readDrafts(input.drafts, input.capturedAt);
|
|
1148
|
+
if (drafts.length > 0) {
|
|
1149
|
+
return { readings: drafts, source: 'submitted' };
|
|
1150
|
+
}
|
|
1151
|
+
return { readings: [...input.live], source: 'live' };
|
|
1152
|
+
}
|
|
1153
|
+
function missingRequiredTaskReadings(requiredKinds, drafts) {
|
|
1154
|
+
const present = new Set(readDrafts(drafts, new Date(0).toISOString()).map((reading) => reading.kind));
|
|
1155
|
+
return requiredKinds.filter((kind) => isAXMMaintenanceMeterKind(kind) && !present.has(kind));
|
|
1156
|
+
}
|
|
1157
|
+
//#endregion
|
|
1158
|
+
|
|
1159
|
+
//#region ----- Constants -----
|
|
1160
|
+
const AXM_SCHEDULED_OCCURRENCE_BATCH_SIZE = 25;
|
|
1161
|
+
const AXM_DEADLINE_EXPIRY_REASON = 'deadline-expiry';
|
|
1162
|
+
const AXM_SCHEDULE_CHANGED_REASON = 'schedule-changed';
|
|
1163
|
+
const CLAIM_LEASE_MS = 2 * 60 * 1000;
|
|
1164
|
+
//#endregion
|
|
1165
|
+
//#region ----- Identity -----
|
|
1166
|
+
function scheduledOccurrenceKey(planId, scheduledStart) {
|
|
1167
|
+
return `${planId}:${scheduledStart}`;
|
|
1168
|
+
}
|
|
1169
|
+
function meterOccurrenceKey(planId, signature) {
|
|
1170
|
+
return `${planId}:meter:${signature}`;
|
|
1171
|
+
}
|
|
1172
|
+
/** Stable id so two runners inserting the same occurrence collide instead of duplicating it. */
|
|
1173
|
+
function stableOccurrenceId(key) {
|
|
1174
|
+
let hash = 0x811c9dc5;
|
|
1175
|
+
for (let index = 0; index < key.length; index += 1) {
|
|
1176
|
+
hash ^= key.charCodeAt(index);
|
|
1177
|
+
hash = Math.imul(hash, 0x01000193);
|
|
1178
|
+
}
|
|
1179
|
+
const hex = (hash >>> 0).toString(16).padStart(8, '0').repeat(4).slice(0, 32);
|
|
1180
|
+
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-4${hex.slice(13, 16)}-a${hex.slice(17, 20)}-${hex.slice(20, 32)}`;
|
|
1181
|
+
}
|
|
1182
|
+
//#endregion
|
|
1183
|
+
//#region ----- Reconcile -----
|
|
1184
|
+
function reconcileScheduleOccurrences(desired, existing) {
|
|
1185
|
+
const desiredByKey = new Map(desired.map((item) => [item.key, item]));
|
|
1186
|
+
const desiredByStart = new Map(desired.map((item) => [Date.parse(item.scheduledStart), item]));
|
|
1187
|
+
const consumed = new Set();
|
|
1188
|
+
const resume = [];
|
|
1189
|
+
const supersede = [];
|
|
1190
|
+
for (const row of existing) {
|
|
1191
|
+
const start = Date.parse(row.scheduledStart ?? '');
|
|
1192
|
+
const match = (row.occurrenceKey && desiredByKey.get(row.occurrenceKey))
|
|
1193
|
+
|| (Number.isFinite(start) ? desiredByStart.get(start) : undefined);
|
|
1194
|
+
if (match) {
|
|
1195
|
+
consumed.add(match.key);
|
|
1196
|
+
if (!row.workflowInstanceId && !isHistory(row.statusId)) {
|
|
1197
|
+
resume.push({ id: row.id, occurrence: match });
|
|
815
1198
|
}
|
|
1199
|
+
continue;
|
|
1200
|
+
}
|
|
1201
|
+
if (row.autoGenerated && row.occurrenceKey && !isHistory(row.statusId) && !isStarted(row.statusId)) {
|
|
1202
|
+
supersede.push(row);
|
|
816
1203
|
}
|
|
817
|
-
return undefined;
|
|
818
1204
|
}
|
|
819
|
-
|
|
820
|
-
|
|
1205
|
+
return {
|
|
1206
|
+
create: desired.filter((item) => !consumed.has(item.key)),
|
|
1207
|
+
resume,
|
|
1208
|
+
supersede,
|
|
1209
|
+
};
|
|
1210
|
+
}
|
|
1211
|
+
function takeOccurrenceBatch(items, cursor, size = AXM_SCHEDULED_OCCURRENCE_BATCH_SIZE) {
|
|
1212
|
+
return items.filter((item) => item.index >= cursor).slice(0, size);
|
|
1213
|
+
}
|
|
1214
|
+
function isHistory(statusId) {
|
|
1215
|
+
return statusId === AXMWorkOrderStatus.Completed
|
|
1216
|
+
|| statusId === AXMWorkOrderStatus.SignedOff
|
|
1217
|
+
|| statusId === AXMWorkOrderStatus.Cancelled;
|
|
1218
|
+
}
|
|
1219
|
+
function isStarted(statusId) {
|
|
1220
|
+
return statusId === AXMWorkOrderStatus.InProgress || statusId === AXMWorkOrderStatus.OnHold;
|
|
1221
|
+
}
|
|
1222
|
+
//#endregion
|
|
1223
|
+
//#region ----- Window -----
|
|
1224
|
+
function scheduledTaskWindow(input) {
|
|
1225
|
+
const start = Date.parse(text(input.scheduledStart));
|
|
1226
|
+
const deadline = Date.parse(text(input.signOffDeadline));
|
|
1227
|
+
const hasStart = Number.isFinite(start);
|
|
1228
|
+
const hasDeadline = Number.isFinite(deadline);
|
|
1229
|
+
if (!hasStart && !hasDeadline) {
|
|
1230
|
+
return 'unscheduled';
|
|
1231
|
+
}
|
|
1232
|
+
const now = input.now.getTime();
|
|
1233
|
+
if (hasStart && now < start) {
|
|
1234
|
+
return 'before';
|
|
1235
|
+
}
|
|
1236
|
+
if (hasDeadline && now > deadline) {
|
|
1237
|
+
return 'after';
|
|
1238
|
+
}
|
|
1239
|
+
return 'open';
|
|
1240
|
+
}
|
|
1241
|
+
function canMutateScheduledTask(input) {
|
|
1242
|
+
if (!text(input.occurrenceKey) && !text(input.signOffDeadline)) {
|
|
1243
|
+
return true;
|
|
821
1244
|
}
|
|
822
|
-
return
|
|
1245
|
+
return scheduledTaskWindow(input) === 'open';
|
|
823
1246
|
}
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
1247
|
+
function isDeadlineCancellationPatch(patch) {
|
|
1248
|
+
const reason = text(patch['cancellationReason']);
|
|
1249
|
+
return text(patch['statusId']) === AXMWorkOrderStatus.Cancelled
|
|
1250
|
+
&& (reason === AXM_DEADLINE_EXPIRY_REASON || reason === AXM_SCHEDULE_CHANGED_REASON)
|
|
1251
|
+
&& typeof patch['cancelledAt'] === 'string'
|
|
1252
|
+
&& !('draftUsageReadings' in patch)
|
|
1253
|
+
&& !('completionUsageReadings' in patch)
|
|
1254
|
+
&& !('intervalStatesProgression' in patch);
|
|
1255
|
+
}
|
|
1256
|
+
function buildDeadlineCancellationPatch(claim, cancelledAt) {
|
|
1257
|
+
return {
|
|
1258
|
+
statusId: AXMWorkOrderStatus.Cancelled,
|
|
1259
|
+
cancellationReason: claim.outcome === AXM_SCHEDULE_CHANGED_REASON ? AXM_SCHEDULE_CHANGED_REASON : AXM_DEADLINE_EXPIRY_REASON,
|
|
1260
|
+
cancelledAt,
|
|
1261
|
+
outcomeClaim: claim,
|
|
1262
|
+
};
|
|
1263
|
+
}
|
|
1264
|
+
function decideScheduledOutcome(input) {
|
|
1265
|
+
const status = text(input.statusId);
|
|
1266
|
+
if (status === AXMWorkOrderStatus.Completed || status === AXMWorkOrderStatus.SignedOff) {
|
|
1267
|
+
return input.incoming === 'signed' ? 'accept' : 'reject';
|
|
830
1268
|
}
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
if (!Array.isArray(record.triggers)) {
|
|
834
|
-
return draft;
|
|
1269
|
+
if (status === AXMWorkOrderStatus.Cancelled && input.incoming === 'signed') {
|
|
1270
|
+
return 'reject';
|
|
835
1271
|
}
|
|
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)) {
|
|
862
|
-
continue;
|
|
863
|
-
}
|
|
864
|
-
if (kind === 'schedule') {
|
|
865
|
-
const schedule = item.schedule;
|
|
866
|
-
if (!isSchedule(schedule) || draft.scheduleEnabled) {
|
|
867
|
-
continue;
|
|
868
|
-
}
|
|
869
|
-
draft.scheduleEnabled = true;
|
|
870
|
-
draft.schedule = schedule;
|
|
871
|
-
continue;
|
|
872
|
-
}
|
|
873
|
-
if (!isAXMMaintenanceMeterKind(kind)) {
|
|
874
|
-
continue;
|
|
875
|
-
}
|
|
876
|
-
const meter = draft.meters[kind];
|
|
877
|
-
if (meter.enabled) {
|
|
878
|
-
continue;
|
|
879
|
-
}
|
|
880
|
-
const interval = item.interval;
|
|
881
|
-
const unit = item.unit;
|
|
882
|
-
if (meterIssue(kind, typeof interval === 'number' ? interval : null)) {
|
|
883
|
-
continue;
|
|
884
|
-
}
|
|
885
|
-
meter.enabled = true;
|
|
886
|
-
meter.interval = interval;
|
|
887
|
-
meter.unit = isUnit(unit) && isAXMMaintenanceIntervalUnitForKind(kind, unit) ? unit : defaultAXMMaintenanceIntervalUnit(kind);
|
|
1272
|
+
const claim = input.claim;
|
|
1273
|
+
if (!claim || !text(claim.outcome) || !text(claim.at)) {
|
|
1274
|
+
return 'accept';
|
|
888
1275
|
}
|
|
889
|
-
|
|
1276
|
+
const age = input.now.getTime() - Date.parse(claim.at);
|
|
1277
|
+
const fresh = Number.isFinite(age) && age >= 0 && age < (input.leaseMs ?? CLAIM_LEASE_MS);
|
|
1278
|
+
if (!fresh || claim.outcome === input.incoming) {
|
|
1279
|
+
return 'accept';
|
|
1280
|
+
}
|
|
1281
|
+
return 'reject';
|
|
1282
|
+
}
|
|
1283
|
+
function text(value) {
|
|
1284
|
+
return typeof value === 'string' ? value.trim() : '';
|
|
890
1285
|
}
|
|
891
1286
|
//#endregion
|
|
892
1287
|
|
|
@@ -1265,5 +1660,5 @@ function resolveMaintenanceIntervalStates(value) {
|
|
|
1265
1660
|
* Generated bundle index. Do not edit.
|
|
1266
1661
|
*/
|
|
1267
1662
|
|
|
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 };
|
|
1663
|
+
export { AXMFailureRegisterStatus, AXMMaintenanceIntervalTriggerLogic, AXMMaintenanceIntervalUnit, AXMMaintenanceManagementCommandKeys, AXMMaintenanceManagementFeatureKeys, AXMMaintenanceManagementMenuKeys, AXMMaintenanceManagementPermissionKeys, AXMWorkOrderSourceType, AXMWorkOrderStatus, AXM_DEADLINE_EXPIRY_REASON, AXM_INSPECTION_USAGE_KINDS_INPUT, AXM_INSPECTION_WORK_ORDER_WORKFLOW_NAME, AXM_INTERVAL_CANCELLED_TASK_DESCRIPTION, 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, AXM_SCHEDULED_OCCURRENCE_BATCH_SIZE, AXM_SCHEDULE_CHANGED_REASON, AXPAssetsMaintenancePermissionKeys, MM_CATALOG_SCOPE_MN, MaintenanceManagementManifest, RootConfig, applyIntervalWorkOrderCardActions, buildAXMMaintenanceIntervalConfig, buildDeadlineCancellationPatch, buildIntervalWorkOrderOpenFormAction, buildIntervalWorkOrderSignOffAction, canMutateScheduledTask, cloneMaintenanceTemplateSchedule, collectableUsageKinds, decideScheduledOutcome, defaultAXMMaintenanceIntervalUnit, draftFromAXMMaintenanceIntervalConfig, emptyAXMMaintenanceIntervalConfig, emptyAXMMaintenanceIntervalDraft, hasMaintenanceTemplateSchedule, isAXMMaintenanceIntervalKind, isAXMMaintenanceIntervalUnitForKind, isAXMMaintenanceMeterKind, isDeadlineCancellationPatch, isIntervalOpenFormAction, isIntervalSignOffAction, isIntervalStartFlowAction, isWorkOrderChecklistOccurrence, meterOccurrenceKey, missingRequiredTaskReadings, pickCanonicalChecklistRow, readChecklistIdFromTaskActions, readInspectionUsageKinds, readIntervalChecklistId, readIntervalDate, readMaintenanceIntervalStates, readMaintenancePlanCalendarSchedule, readMaintenancePlanSchedule, readSignOffActivityOutcome, reconcileScheduleOccurrences, replaceIntervalStartFlowActions, resolveChecklistId, resolveInspectionUsageKinds, resolveIntervalChecklistViewerMode, resolveMaintenanceIntervalStates, resolveWorkOrderCompletionUsageSnapshot, rewriteIntervalCardBookmarks, scheduledOccurrenceKey, scheduledTaskWindow, shouldReloadMaintenanceTemplateForPlan, stableOccurrenceId, syncMaintenancePlanScheduleFields, takeOccurrenceBatch };
|
|
1269
1664
|
//# sourceMappingURL=acorex-platform-module-maintenance-management-client-contracts.mjs.map
|