@acorex/modules 21.0.0-next.88 → 21.0.0-next.90
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-modules-application-management-features-widget-view.component-uc8eGA-k.mjs → acorex-modules-application-management-features-widget-view.component-BNTT58PB.mjs} +2 -2
- package/fesm2022/{acorex-modules-application-management-features-widget-view.component-uc8eGA-k.mjs.map → acorex-modules-application-management-features-widget-view.component-BNTT58PB.mjs.map} +1 -1
- package/fesm2022/acorex-modules-application-management.mjs +1 -1
- package/fesm2022/{acorex-modules-assessment-management-acorex-modules-assessment-management-WGRBHMmQ.mjs → acorex-modules-assessment-management-acorex-modules-assessment-management-BDU2DZEq.mjs} +108 -53
- package/fesm2022/acorex-modules-assessment-management-acorex-modules-assessment-management-BDU2DZEq.mjs.map +1 -0
- package/fesm2022/{acorex-modules-assessment-management-assessment-session-answers-view.util-BWG9hI3t.mjs → acorex-modules-assessment-management-assessment-session-answers-view.util-CzgivU3s.mjs} +2 -2
- package/fesm2022/{acorex-modules-assessment-management-assessment-session-answers-view.util-BWG9hI3t.mjs.map → acorex-modules-assessment-management-assessment-session-answers-view.util-CzgivU3s.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-assessment-management-fill-assessment-session.command-BtZ68Wt5.mjs → acorex-modules-assessment-management-fill-assessment-session.command-D6i0YZ3k.mjs} +2 -2
- package/fesm2022/{acorex-modules-assessment-management-fill-assessment-session.command-BtZ68Wt5.mjs.map → acorex-modules-assessment-management-fill-assessment-session.command-D6i0YZ3k.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-assessment-management-index-_rWx2Vje.mjs → acorex-modules-assessment-management-index-BPQ9AiD6.mjs} +3 -3
- package/fesm2022/{acorex-modules-assessment-management-index-_rWx2Vje.mjs.map → acorex-modules-assessment-management-index-BPQ9AiD6.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-assessment-management-index-CL6OmKwh.mjs → acorex-modules-assessment-management-index-BaMs2R6k.mjs} +3 -3
- package/fesm2022/{acorex-modules-assessment-management-index-CL6OmKwh.mjs.map → acorex-modules-assessment-management-index-BaMs2R6k.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-assessment-management-index-BDqMpgdu.mjs → acorex-modules-assessment-management-index-YVENsZN4.mjs} +2 -2
- package/fesm2022/{acorex-modules-assessment-management-index-BDqMpgdu.mjs.map → acorex-modules-assessment-management-index-YVENsZN4.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-assessment-management-index-BwZPHD1o.mjs → acorex-modules-assessment-management-index-oXkGQDat.mjs} +2 -2
- package/fesm2022/{acorex-modules-assessment-management-index-BwZPHD1o.mjs.map → acorex-modules-assessment-management-index-oXkGQDat.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-assessment-management-preview-question.command-DMeQF_J0.mjs → acorex-modules-assessment-management-preview-question.command-B6rHNI4x.mjs} +2 -2
- package/fesm2022/{acorex-modules-assessment-management-preview-question.command-DMeQF_J0.mjs.map → acorex-modules-assessment-management-preview-question.command-B6rHNI4x.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-assessment-management-preview-questionnaire.command-CKmY95wj.mjs → acorex-modules-assessment-management-preview-questionnaire.command-DXB1Y7hz.mjs} +2 -2
- package/fesm2022/{acorex-modules-assessment-management-preview-questionnaire.command-CKmY95wj.mjs.map → acorex-modules-assessment-management-preview-questionnaire.command-DXB1Y7hz.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-assessment-management-question-bank-interface-editor-widget-edit.component-CXf2p-tS.mjs → acorex-modules-assessment-management-question-bank-interface-editor-widget-edit.component-D2CNfj8T.mjs} +2 -2
- package/fesm2022/{acorex-modules-assessment-management-question-bank-interface-editor-widget-edit.component-CXf2p-tS.mjs.map → acorex-modules-assessment-management-question-bank-interface-editor-widget-edit.component-D2CNfj8T.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-assessment-management-questionnaire-viewer-popup.component-CLZuPzUo.mjs → acorex-modules-assessment-management-questionnaire-viewer-popup.component-CF_tV-2p.mjs} +2 -2
- package/fesm2022/{acorex-modules-assessment-management-questionnaire-viewer-popup.component-CLZuPzUo.mjs.map → acorex-modules-assessment-management-questionnaire-viewer-popup.component-CF_tV-2p.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-assessment-management-review-assessment-session.command-CcGyOKUI.mjs → acorex-modules-assessment-management-review-assessment-session.command-CtEvoUxA.mjs} +3 -3
- package/fesm2022/{acorex-modules-assessment-management-review-assessment-session.command-CcGyOKUI.mjs.map → acorex-modules-assessment-management-review-assessment-session.command-CtEvoUxA.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-assessment-management-view-session-answers.command-CmieuVjM.mjs → acorex-modules-assessment-management-view-session-answers.command-CkyBkiXC.mjs} +3 -3
- package/fesm2022/{acorex-modules-assessment-management-view-session-answers.command-CmieuVjM.mjs.map → acorex-modules-assessment-management-view-session-answers.command-CkyBkiXC.mjs.map} +1 -1
- package/fesm2022/acorex-modules-assessment-management.mjs +1 -1
- package/fesm2022/acorex-modules-asset-management.mjs +37 -23
- package/fesm2022/acorex-modules-asset-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-auth-acorex-modules-auth-CMRT9dQC.mjs → acorex-modules-auth-acorex-modules-auth-Nw701LHa.mjs} +30 -30
- package/fesm2022/{acorex-modules-auth-acorex-modules-auth-CMRT9dQC.mjs.map → acorex-modules-auth-acorex-modules-auth-Nw701LHa.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-app-chooser.component-mOPBXcQc.mjs → acorex-modules-auth-app-chooser.component-FqCIt_8E.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-app-chooser.component-mOPBXcQc.mjs.map → acorex-modules-auth-app-chooser.component-FqCIt_8E.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-change-password.command-CceYk6DE.mjs → acorex-modules-auth-change-password.command-DND9Oka4.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-change-password.command-CceYk6DE.mjs.map → acorex-modules-auth-change-password.command-DND9Oka4.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-edit-account-info.command-jF8A_Jsy.mjs → acorex-modules-auth-edit-account-info.command-bmdkZzYt.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-edit-account-info.command-jF8A_Jsy.mjs.map → acorex-modules-auth-edit-account-info.command-bmdkZzYt.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-lock-screen.command-BvruxuiF.mjs → acorex-modules-auth-lock-screen.command-DSGXqDVD.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-lock-screen.command-BvruxuiF.mjs.map → acorex-modules-auth-lock-screen.command-DSGXqDVD.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-login.module-CmBClJv2.mjs → acorex-modules-auth-login.module-DC3dzDf0.mjs} +4 -4
- package/fesm2022/{acorex-modules-auth-login.module-CmBClJv2.mjs.map → acorex-modules-auth-login.module-DC3dzDf0.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-master.layout-CLGmgSqo.mjs → acorex-modules-auth-master.layout-iMOvevEv.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-master.layout-CLGmgSqo.mjs.map → acorex-modules-auth-master.layout-iMOvevEv.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-oauth-callback.component-yxfNoBS-.mjs → acorex-modules-auth-oauth-callback.component-s9WMG92M.mjs} +3 -3
- package/fesm2022/{acorex-modules-auth-oauth-callback.component-yxfNoBS-.mjs.map → acorex-modules-auth-oauth-callback.component-s9WMG92M.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-open-sessions.command-DsWueHa3.mjs → acorex-modules-auth-open-sessions.command-CLL8rgjE.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-open-sessions.command-DsWueHa3.mjs.map → acorex-modules-auth-open-sessions.command-CLL8rgjE.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-C3_tAt8j.mjs → acorex-modules-auth-password.component-BOEi91f7.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-password.component-C3_tAt8j.mjs.map → acorex-modules-auth-password.component-BOEi91f7.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-BrTEuc51.mjs → acorex-modules-auth-password.component-eA_3LtcO.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-password.component-BrTEuc51.mjs.map → acorex-modules-auth-password.component-eA_3LtcO.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-profile-activity-chart.component-C6_0oeCC.mjs → acorex-modules-auth-profile-activity-chart.component-BK1k4Lrh.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-profile-activity-chart.component-C6_0oeCC.mjs.map → acorex-modules-auth-profile-activity-chart.component-BK1k4Lrh.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-profile-delete-account-danger-zone.component-EhmuT88j.mjs → acorex-modules-auth-profile-delete-account-danger-zone.component-CHru1be-.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-profile-delete-account-danger-zone.component-EhmuT88j.mjs.map → acorex-modules-auth-profile-delete-account-danger-zone.component-CHru1be-.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-profile-page-component.provider-BHEdqBbF.mjs → acorex-modules-auth-profile-page-component.provider-MCsUPTrt.mjs} +4 -4
- package/fesm2022/{acorex-modules-auth-profile-page-component.provider-BHEdqBbF.mjs.map → acorex-modules-auth-profile-page-component.provider-MCsUPTrt.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-profile-page.component-Q0ixAWtC.mjs → acorex-modules-auth-profile-page.component-DOj2GhFJ.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-profile-page.component-Q0ixAWtC.mjs.map → acorex-modules-auth-profile-page.component-DOj2GhFJ.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-remove-pin-code.command-j5iobHAs.mjs → acorex-modules-auth-remove-pin-code.command-CqRxKR4Y.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-remove-pin-code.command-j5iobHAs.mjs.map → acorex-modules-auth-remove-pin-code.command-CqRxKR4Y.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-routes-BFACBfAG.mjs → acorex-modules-auth-routes-FZRnzT9V.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-routes-BFACBfAG.mjs.map → acorex-modules-auth-routes-FZRnzT9V.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-session-lock-overlay.component-flpWlR8p.mjs → acorex-modules-auth-session-lock-overlay.component-6o2uU9U5.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-session-lock-overlay.component-flpWlR8p.mjs.map → acorex-modules-auth-session-lock-overlay.component-6o2uU9U5.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-set-pin-code.command-B0sXGsok.mjs → acorex-modules-auth-set-pin-code.command-CsXJ30Fs.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-set-pin-code.command-B0sXGsok.mjs.map → acorex-modules-auth-set-pin-code.command-CsXJ30Fs.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-set-pin-code.component-D95Hn8R-.mjs → acorex-modules-auth-set-pin-code.component-DJhqru7e.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-set-pin-code.component-D95Hn8R-.mjs.map → acorex-modules-auth-set-pin-code.component-DJhqru7e.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-settings.provider-D0-hEHd2.mjs → acorex-modules-auth-settings.provider-BJ7lDjbr.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-settings.provider-D0-hEHd2.mjs.map → acorex-modules-auth-settings.provider-BJ7lDjbr.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-tenant-chooser.component-DBIVSBaM.mjs → acorex-modules-auth-tenant-chooser.component-DR7rH0m1.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-tenant-chooser.component-DBIVSBaM.mjs.map → acorex-modules-auth-tenant-chooser.component-DR7rH0m1.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-two-factor.module-DwXsAUlJ.mjs → acorex-modules-auth-two-factor.module-BvvDIlqe.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-two-factor.module-DwXsAUlJ.mjs.map → acorex-modules-auth-two-factor.module-BvvDIlqe.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-view-login-history.command-BpCog3dx.mjs → acorex-modules-auth-view-login-history.command-BUiXUbjA.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-view-login-history.command-BpCog3dx.mjs.map → acorex-modules-auth-view-login-history.command-BUiXUbjA.mjs.map} +1 -1
- package/fesm2022/acorex-modules-auth.mjs +1 -1
- package/fesm2022/acorex-modules-business-core.mjs +0 -6
- package/fesm2022/acorex-modules-business-core.mjs.map +1 -1
- package/fesm2022/{acorex-modules-common-search-popup.component-6_qrYkc2.mjs → acorex-modules-common-search-popup.component-BhItO3Sr.mjs} +2 -2
- package/fesm2022/{acorex-modules-common-search-popup.component-6_qrYkc2.mjs.map → acorex-modules-common-search-popup.component-BhItO3Sr.mjs.map} +1 -1
- package/fesm2022/acorex-modules-common.mjs +39 -52
- package/fesm2022/acorex-modules-common.mjs.map +1 -1
- package/fesm2022/{acorex-modules-contact-core-acorex-modules-contact-core-CBMdv1GN.mjs → acorex-modules-contact-core-acorex-modules-contact-core-CELmV51p.mjs} +8 -7
- package/fesm2022/acorex-modules-contact-core-acorex-modules-contact-core-CELmV51p.mjs.map +1 -0
- package/fesm2022/{acorex-modules-contact-core-entity.provider-B8__CVGP.mjs → acorex-modules-contact-core-entity.provider-AH-gvpLJ.mjs} +3 -3
- package/fesm2022/{acorex-modules-contact-core-entity.provider-B8__CVGP.mjs.map → acorex-modules-contact-core-entity.provider-AH-gvpLJ.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-contact-core-menu.provider-C-iEIPGe.mjs → acorex-modules-contact-core-menu.provider-T9IuzSBf.mjs} +11 -5
- package/fesm2022/acorex-modules-contact-core-menu.provider-T9IuzSBf.mjs.map +1 -0
- package/fesm2022/{acorex-modules-contact-core-permission-definition.provider-DXjdp846.mjs → acorex-modules-contact-core-permission-definition.provider-CnxI1ujq.mjs} +2 -2
- package/fesm2022/{acorex-modules-contact-core-permission-definition.provider-DXjdp846.mjs.map → acorex-modules-contact-core-permission-definition.provider-CnxI1ujq.mjs.map} +1 -1
- package/fesm2022/acorex-modules-contact-core.mjs +1 -1
- package/fesm2022/{acorex-modules-conversation-acorex-modules-conversation-CUjTT3M7.mjs → acorex-modules-conversation-acorex-modules-conversation-Dc8te-PO.mjs} +6127 -3272
- package/fesm2022/acorex-modules-conversation-acorex-modules-conversation-Dc8te-PO.mjs.map +1 -0
- package/fesm2022/acorex-modules-conversation-after-message-sent.command-DxDe6o9N.mjs +34 -0
- package/fesm2022/acorex-modules-conversation-after-message-sent.command-DxDe6o9N.mjs.map +1 -0
- package/fesm2022/{acorex-modules-conversation-assist-delegated-agent-detail-popup.component-CGcngwdA.mjs → acorex-modules-conversation-assist-delegated-agent-detail-popup.component-Dyx_n0bi.mjs} +6 -6
- package/fesm2022/{acorex-modules-conversation-assist-delegated-agent-detail-popup.component-CGcngwdA.mjs.map → acorex-modules-conversation-assist-delegated-agent-detail-popup.component-Dyx_n0bi.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-conversation-comments-page.component-hopaF6xW.mjs → acorex-modules-conversation-comments-page.component--g4ugC_L.mjs} +2 -2
- package/fesm2022/{acorex-modules-conversation-comments-page.component-hopaF6xW.mjs.map → acorex-modules-conversation-comments-page.component--g4ugC_L.mjs.map} +1 -1
- package/fesm2022/acorex-modules-conversation-emit-typing-indicator.command-BOldPLQ0.mjs +30 -0
- package/fesm2022/acorex-modules-conversation-emit-typing-indicator.command-BOldPLQ0.mjs.map +1 -0
- package/fesm2022/acorex-modules-conversation-mark-conversation-unread.command-O_zPrBQ0.mjs +30 -0
- package/fesm2022/acorex-modules-conversation-mark-conversation-unread.command-O_zPrBQ0.mjs.map +1 -0
- package/fesm2022/acorex-modules-conversation-retry-assist-response.command-DsB-CP3R.mjs +34 -0
- package/fesm2022/acorex-modules-conversation-retry-assist-response.command-DsB-CP3R.mjs.map +1 -0
- package/fesm2022/{acorex-modules-conversation-send-assist-chat-message.command-CqDrZKFK.mjs → acorex-modules-conversation-send-assist-chat-message.command-g_NgPuxP.mjs} +19 -9
- package/fesm2022/acorex-modules-conversation-send-assist-chat-message.command-g_NgPuxP.mjs.map +1 -0
- package/fesm2022/{acorex-modules-conversation-start-assist-chat.command-DiDAz-Is.mjs → acorex-modules-conversation-start-assist-chat.command-DeMmJdd6.mjs} +2 -2
- package/fesm2022/{acorex-modules-conversation-start-assist-chat.command-DiDAz-Is.mjs.map → acorex-modules-conversation-start-assist-chat.command-DeMmJdd6.mjs.map} +1 -1
- package/fesm2022/acorex-modules-conversation-sync-read-state.command-4YxdwLaE.mjs +62 -0
- package/fesm2022/acorex-modules-conversation-sync-read-state.command-4YxdwLaE.mjs.map +1 -0
- package/fesm2022/acorex-modules-conversation.mjs +1 -1
- package/fesm2022/acorex-modules-customer-management.mjs +2 -2
- package/fesm2022/acorex-modules-customer-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-dashboard-management-acorex-modules-dashboard-management-Lx3VuIg6.mjs → acorex-modules-dashboard-management-acorex-modules-dashboard-management-kph3UxDu.mjs} +1087 -395
- package/fesm2022/acorex-modules-dashboard-management-acorex-modules-dashboard-management-kph3UxDu.mjs.map +1 -0
- package/fesm2022/{acorex-modules-dashboard-management-index-DvY9N8FF.mjs → acorex-modules-dashboard-management-index-rp9dgARq.mjs} +2 -2
- package/fesm2022/{acorex-modules-dashboard-management-index-DvY9N8FF.mjs.map → acorex-modules-dashboard-management-index-rp9dgARq.mjs.map} +1 -1
- package/fesm2022/acorex-modules-dashboard-management.mjs +1 -1
- package/fesm2022/{acorex-modules-data-management-index-CxVSgxTM.mjs → acorex-modules-data-management-index-BYQncZ6e.mjs} +28 -6
- package/fesm2022/acorex-modules-data-management-index-BYQncZ6e.mjs.map +1 -0
- package/fesm2022/acorex-modules-data-management.mjs +6 -6
- package/fesm2022/acorex-modules-data-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-document-management-drive-choose.component-DyJoXajP.mjs → acorex-modules-document-management-drive-choose.component-Dx1slMSA.mjs} +3 -3
- package/fesm2022/{acorex-modules-document-management-drive-choose.component-DyJoXajP.mjs.map → acorex-modules-document-management-drive-choose.component-Dx1slMSA.mjs.map} +1 -1
- package/fesm2022/acorex-modules-document-management.mjs +272 -355
- package/fesm2022/acorex-modules-document-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-form-template-management-template-picker.component-cLToc9fP.mjs → acorex-modules-form-template-management-template-picker.component-BGf98ooQ.mjs} +2 -2
- package/fesm2022/{acorex-modules-form-template-management-template-picker.component-cLToc9fP.mjs.map → acorex-modules-form-template-management-template-picker.component-BGf98ooQ.mjs.map} +1 -1
- package/fesm2022/acorex-modules-form-template-management.mjs +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-acorex-modules-human-capital-management-DpVAfk3i.mjs → acorex-modules-human-capital-management-acorex-modules-human-capital-management-BZwLfZkb.mjs} +43 -22
- package/fesm2022/acorex-modules-human-capital-management-acorex-modules-human-capital-management-BZwLfZkb.mjs.map +1 -0
- package/fesm2022/{acorex-modules-human-capital-management-approve-leave-request.command-BDv_eotn.mjs → acorex-modules-human-capital-management-approve-leave-request.command-B_EBDijL.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-approve-leave-request.command-BDv_eotn.mjs.map → acorex-modules-human-capital-management-approve-leave-request.command-B_EBDijL.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-assign-position-assignment.command-CT49oS39.mjs → acorex-modules-human-capital-management-assign-position-assignment.command-ZzWBeTv1.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-assign-position-assignment.command-CT49oS39.mjs.map → acorex-modules-human-capital-management-assign-position-assignment.command-ZzWBeTv1.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-cancel-leave-request.command-zAunbLbf.mjs → acorex-modules-human-capital-management-cancel-leave-request.command-Bd3RvlNm.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-cancel-leave-request.command-zAunbLbf.mjs.map → acorex-modules-human-capital-management-cancel-leave-request.command-Bd3RvlNm.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-edit-personal-info.command-8LKMNm4Z.mjs → acorex-modules-human-capital-management-edit-personal-info.command-Drbi1WMd.mjs} +2 -6
- package/fesm2022/acorex-modules-human-capital-management-edit-personal-info.command-Drbi1WMd.mjs.map +1 -0
- package/fesm2022/{acorex-modules-human-capital-management-edit-signature.command-BQ6Ysh-A.mjs → acorex-modules-human-capital-management-edit-signature.command-CRPqnXIj.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-edit-signature.command-BQ6Ysh-A.mjs.map → acorex-modules-human-capital-management-edit-signature.command-CRPqnXIj.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-reject-leave-request.command-CEAUhv0o.mjs → acorex-modules-human-capital-management-reject-leave-request.command-BC-1Kixd.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-reject-leave-request.command-CEAUhv0o.mjs.map → acorex-modules-human-capital-management-reject-leave-request.command-BC-1Kixd.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-revoke-position-assignment.command-DakWOslg.mjs → acorex-modules-human-capital-management-revoke-position-assignment.command-Caylq9Rv.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-revoke-position-assignment.command-DakWOslg.mjs.map → acorex-modules-human-capital-management-revoke-position-assignment.command-Caylq9Rv.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-start-leave-request-flow.command-BXMGzUuM.mjs → acorex-modules-human-capital-management-start-leave-request-flow.command-BsEwA1VM.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-start-leave-request-flow.command-BXMGzUuM.mjs.map → acorex-modules-human-capital-management-start-leave-request-flow.command-BsEwA1VM.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-start-lifecycle-event-flow.command-B1s_i8U3.mjs → acorex-modules-human-capital-management-start-lifecycle-event-flow.command-B8xK2iTn.mjs} +2 -2
- package/fesm2022/{acorex-modules-human-capital-management-start-lifecycle-event-flow.command-B1s_i8U3.mjs.map → acorex-modules-human-capital-management-start-lifecycle-event-flow.command-B8xK2iTn.mjs.map} +1 -1
- package/fesm2022/acorex-modules-human-capital-management.mjs +1 -1
- package/fesm2022/acorex-modules-learning-management.mjs +1 -1
- package/fesm2022/acorex-modules-learning-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-location-management.mjs +2 -2
- package/fesm2022/acorex-modules-location-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-meeting-management.mjs +1 -1
- package/fesm2022/acorex-modules-meeting-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-notification-management-acorex-modules-notification-management-DZSXFNgo.mjs → acorex-modules-notification-management-acorex-modules-notification-management-DZWUyu54.mjs} +4 -4
- package/fesm2022/{acorex-modules-notification-management-acorex-modules-notification-management-DZSXFNgo.mjs.map → acorex-modules-notification-management-acorex-modules-notification-management-DZWUyu54.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-notification-management-notification-page.component-swzDjJUP.mjs → acorex-modules-notification-management-notification-page.component-BNxTMY-C.mjs} +3 -3
- package/fesm2022/{acorex-modules-notification-management-notification-page.component-swzDjJUP.mjs.map → acorex-modules-notification-management-notification-page.component-BNxTMY-C.mjs.map} +1 -1
- package/fesm2022/acorex-modules-notification-management.mjs +1 -1
- package/fesm2022/{acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs → acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs} +37 -37
- package/fesm2022/{acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs.map → acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-add-business-unit-to-business-unit.command-BG6AQs-j.mjs → acorex-modules-organization-management-add-business-unit-to-business-unit.command-CgqydSZh.mjs} +2 -2
- package/fesm2022/{acorex-modules-organization-management-add-business-unit-to-business-unit.command-BG6AQs-j.mjs.map → acorex-modules-organization-management-add-business-unit-to-business-unit.command-CgqydSZh.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-add-position-to-business-unit.command-DzA0h9ED.mjs → acorex-modules-organization-management-add-position-to-business-unit.command-B_BIg-aF.mjs} +2 -2
- package/fesm2022/{acorex-modules-organization-management-add-position-to-business-unit.command-DzA0h9ED.mjs.map → acorex-modules-organization-management-add-position-to-business-unit.command-B_BIg-aF.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-add-team-to-business-unit.command-5ZGzmp95.mjs → acorex-modules-organization-management-add-team-to-business-unit.command-zFql0VH1.mjs} +2 -2
- package/fesm2022/{acorex-modules-organization-management-add-team-to-business-unit.command-5ZGzmp95.mjs.map → acorex-modules-organization-management-add-team-to-business-unit.command-zFql0VH1.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-entity.provider-DKhXlL2j.mjs → acorex-modules-organization-management-entity.provider-Buchg68Q.mjs} +15 -15
- package/fesm2022/{acorex-modules-organization-management-entity.provider-DKhXlL2j.mjs.map → acorex-modules-organization-management-entity.provider-Buchg68Q.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-feature-definition.provider-DhCn97pE.mjs → acorex-modules-organization-management-feature-definition.provider-CulEun4H.mjs} +2 -2
- package/fesm2022/{acorex-modules-organization-management-feature-definition.provider-DhCn97pE.mjs.map → acorex-modules-organization-management-feature-definition.provider-CulEun4H.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-job-definition-pages-component.provider-C1WFmQ2x.mjs → acorex-modules-organization-management-job-definition-pages-component.provider-D3k2BNKU.mjs} +4 -4
- package/fesm2022/{acorex-modules-organization-management-job-definition-pages-component.provider-C1WFmQ2x.mjs.map → acorex-modules-organization-management-job-definition-pages-component.provider-D3k2BNKU.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-job-definition-responsibilities-page.component-Bs28OWW8.mjs → acorex-modules-organization-management-job-definition-responsibilities-page.component-CSwHAkh5.mjs} +3 -3
- package/fesm2022/{acorex-modules-organization-management-job-definition-responsibilities-page.component-Bs28OWW8.mjs.map → acorex-modules-organization-management-job-definition-responsibilities-page.component-CSwHAkh5.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-job-definition-skills-page.component-C66FEcxc.mjs → acorex-modules-organization-management-job-definition-skills-page.component-CVo37Mx0.mjs} +2 -2
- package/fesm2022/{acorex-modules-organization-management-job-definition-skills-page.component-C66FEcxc.mjs.map → acorex-modules-organization-management-job-definition-skills-page.component-CVo37Mx0.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-job-level.datasource-DcOVF99r.mjs → acorex-modules-organization-management-job-level.datasource-CMxMInko.mjs} +2 -2
- package/fesm2022/{acorex-modules-organization-management-job-level.datasource-DcOVF99r.mjs.map → acorex-modules-organization-management-job-level.datasource-CMxMInko.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-menu.provider-B0v8w3eH.mjs → acorex-modules-organization-management-menu.provider-BL99vlod.mjs} +3 -3
- package/fesm2022/{acorex-modules-organization-management-menu.provider-B0v8w3eH.mjs.map → acorex-modules-organization-management-menu.provider-BL99vlod.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-org-chart-default-node-contribution.provider-B07M8tKi.mjs → acorex-modules-organization-management-org-chart-default-node-contribution.provider-CfvmOwYD.mjs} +2 -2
- package/fesm2022/{acorex-modules-organization-management-org-chart-default-node-contribution.provider-B07M8tKi.mjs.map → acorex-modules-organization-management-org-chart-default-node-contribution.provider-CfvmOwYD.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-org-chart-employee-flyout-contribution.provider-DSvij02R.mjs → acorex-modules-organization-management-org-chart-employee-flyout-contribution.provider-CsvhhcoW.mjs} +2 -2
- package/fesm2022/{acorex-modules-organization-management-org-chart-employee-flyout-contribution.provider-DSvij02R.mjs.map → acorex-modules-organization-management-org-chart-employee-flyout-contribution.provider-CsvhhcoW.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-org-chart-position-employee-node-contribution.provider-BYWq-Aco.mjs → acorex-modules-organization-management-org-chart-position-employee-node-contribution.provider-Dvo2XEHn.mjs} +2 -2
- package/fesm2022/{acorex-modules-organization-management-org-chart-position-employee-node-contribution.provider-BYWq-Aco.mjs.map → acorex-modules-organization-management-org-chart-position-employee-node-contribution.provider-Dvo2XEHn.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-org-chart-ux-node-contribution.provider-DiMvAEbk.mjs → acorex-modules-organization-management-org-chart-ux-node-contribution.provider-BsBsdoII.mjs} +2 -2
- package/fesm2022/{acorex-modules-organization-management-org-chart-ux-node-contribution.provider-DiMvAEbk.mjs.map → acorex-modules-organization-management-org-chart-ux-node-contribution.provider-BsBsdoII.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-org-chart.page-DwHB4ZGl.mjs → acorex-modules-organization-management-org-chart.page-DJNfsp4z.mjs} +2 -2
- package/fesm2022/{acorex-modules-organization-management-org-chart.page-DwHB4ZGl.mjs.map → acorex-modules-organization-management-org-chart.page-DJNfsp4z.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-permission-definition.provider-CynLhaYz.mjs → acorex-modules-organization-management-permission-definition.provider-CuReVYo1.mjs} +2 -2
- package/fesm2022/{acorex-modules-organization-management-permission-definition.provider-CynLhaYz.mjs.map → acorex-modules-organization-management-permission-definition.provider-CuReVYo1.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-remove-position-from-business-unit.command-DUgDxwtI.mjs → acorex-modules-organization-management-remove-position-from-business-unit.command-mPTX8Vpc.mjs} +2 -2
- package/fesm2022/{acorex-modules-organization-management-remove-position-from-business-unit.command-DUgDxwtI.mjs.map → acorex-modules-organization-management-remove-position-from-business-unit.command-mPTX8Vpc.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-replace-position-assignee.command-BTAwsZNP.mjs → acorex-modules-organization-management-replace-position-assignee.command-DibpVA88.mjs} +2 -2
- package/fesm2022/{acorex-modules-organization-management-replace-position-assignee.command-BTAwsZNP.mjs.map → acorex-modules-organization-management-replace-position-assignee.command-DibpVA88.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-responsibilities-matrix-widget-edit.component-D904V181.mjs → acorex-modules-organization-management-responsibilities-matrix-widget-edit.component-zN1Vz3Om.mjs} +2 -2
- package/fesm2022/{acorex-modules-organization-management-responsibilities-matrix-widget-edit.component-D904V181.mjs.map → acorex-modules-organization-management-responsibilities-matrix-widget-edit.component-zN1Vz3Om.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-responsibilities-matrix-widget-view.component-BMFws_6Y.mjs → acorex-modules-organization-management-responsibilities-matrix-widget-view.component-BYOs9nrw.mjs} +2 -2
- package/fesm2022/{acorex-modules-organization-management-responsibilities-matrix-widget-view.component-BMFws_6Y.mjs.map → acorex-modules-organization-management-responsibilities-matrix-widget-view.component-BYOs9nrw.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-responsibilities-matrix.component-DXmsR1qV.mjs → acorex-modules-organization-management-responsibilities-matrix.component-DVlThT1h.mjs} +2 -2
- package/fesm2022/{acorex-modules-organization-management-responsibilities-matrix.component-DXmsR1qV.mjs.map → acorex-modules-organization-management-responsibilities-matrix.component-DVlThT1h.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-organization-management-settings.provider-UFqps4Zg.mjs → acorex-modules-organization-management-settings.provider-BxoCS3w7.mjs} +2 -2
- package/fesm2022/{acorex-modules-organization-management-settings.provider-UFqps4Zg.mjs.map → acorex-modules-organization-management-settings.provider-BxoCS3w7.mjs.map} +1 -1
- package/fesm2022/acorex-modules-organization-management.mjs +1 -1
- package/fesm2022/acorex-modules-person-core.mjs +0 -6
- package/fesm2022/acorex-modules-person-core.mjs.map +1 -1
- package/fesm2022/acorex-modules-platform-dev-tools.mjs +2 -2
- package/fesm2022/acorex-modules-platform-dev-tools.mjs.map +1 -1
- package/fesm2022/{acorex-modules-platform-management-acorex-modules-platform-management-DsKPOWpy.mjs → acorex-modules-platform-management-acorex-modules-platform-management-B5hMhQp-.mjs} +2 -2
- package/fesm2022/{acorex-modules-platform-management-acorex-modules-platform-management-DsKPOWpy.mjs.map → acorex-modules-platform-management-acorex-modules-platform-management-B5hMhQp-.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-platform-management-menu-list.component-Br4nL9zq.mjs → acorex-modules-platform-management-menu-list.component-DcOr1v-f.mjs} +3 -3
- package/fesm2022/{acorex-modules-platform-management-menu-list.component-Br4nL9zq.mjs.map → acorex-modules-platform-management-menu-list.component-DcOr1v-f.mjs.map} +1 -1
- package/fesm2022/acorex-modules-platform-management.mjs +1 -1
- package/fesm2022/acorex-modules-product-catalog.mjs +7 -6
- package/fesm2022/acorex-modules-product-catalog.mjs.map +1 -1
- package/fesm2022/acorex-modules-project-management.mjs +708 -425
- package/fesm2022/acorex-modules-project-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-report-management-report-runner-root-page.component-DaPEmTm9.mjs → acorex-modules-report-management-report-runner-root-page.component-CgrBAgqq.mjs} +2 -2
- package/fesm2022/{acorex-modules-report-management-report-runner-root-page.component-DaPEmTm9.mjs.map → acorex-modules-report-management-report-runner-root-page.component-CgrBAgqq.mjs.map} +1 -1
- package/fesm2022/acorex-modules-report-management.mjs +7 -7
- package/fesm2022/acorex-modules-report-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-risk-management-preview-risk-matrix-cell.command-CWG3zUBo.mjs +120 -0
- package/fesm2022/acorex-modules-risk-management-preview-risk-matrix-cell.command-CWG3zUBo.mjs.map +1 -0
- package/fesm2022/acorex-modules-risk-management.mjs +13 -0
- package/fesm2022/acorex-modules-risk-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-security-management.mjs +1 -1
- package/fesm2022/acorex-modules-security-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-settings-management-setting-view.component-CG-GW2yS.mjs → acorex-modules-settings-management-setting-view.component-BRhZR1br.mjs} +109 -15
- package/fesm2022/acorex-modules-settings-management-setting-view.component-BRhZR1br.mjs.map +1 -0
- package/fesm2022/acorex-modules-settings-management.mjs +1 -1
- package/fesm2022/acorex-modules-supplier-management.mjs +1 -1
- package/fesm2022/acorex-modules-supplier-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-task-management-start-task-flow.command-HYdQOWDe.mjs +115 -0
- package/fesm2022/acorex-modules-task-management-start-task-flow.command-HYdQOWDe.mjs.map +1 -0
- package/fesm2022/{acorex-modules-task-management-task-board.page-FFhsAyHF.mjs → acorex-modules-task-management-task-board.page-BMTjJlry.mjs} +41 -32
- package/fesm2022/acorex-modules-task-management-task-board.page-BMTjJlry.mjs.map +1 -0
- package/fesm2022/acorex-modules-task-management.mjs +490 -485
- package/fesm2022/acorex-modules-task-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-timesheet-management-report-hours-by-project.query-z38wZLKJ.mjs → acorex-modules-timesheet-management-report-hours-by-project.query-CGc1Q6aB.mjs} +2 -2
- package/fesm2022/acorex-modules-timesheet-management-report-hours-by-project.query-CGc1Q6aB.mjs.map +1 -0
- package/fesm2022/{acorex-modules-timesheet-management-resolve-work-item-from-jira-issue.command-BDfvz6fH.mjs → acorex-modules-timesheet-management-resolve-work-item-from-jira-issue.command-AIcAUd3s.mjs} +2 -2
- package/fesm2022/{acorex-modules-timesheet-management-resolve-work-item-from-jira-issue.command-BDfvz6fH.mjs.map → acorex-modules-timesheet-management-resolve-work-item-from-jira-issue.command-AIcAUd3s.mjs.map} +1 -1
- package/fesm2022/acorex-modules-timesheet-management.mjs +8 -8
- package/fesm2022/acorex-modules-timesheet-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-workflow-management-acorex-modules-workflow-management-DJeUheQT.mjs → acorex-modules-workflow-management-acorex-modules-workflow-management-D04WU8wX.mjs} +32 -25
- package/fesm2022/acorex-modules-workflow-management-acorex-modules-workflow-management-D04WU8wX.mjs.map +1 -0
- package/fesm2022/{acorex-modules-workflow-management-index--6gz3uRb.mjs → acorex-modules-workflow-management-index-Bfzsu6VL.mjs} +2 -2
- package/fesm2022/{acorex-modules-workflow-management-index--6gz3uRb.mjs.map → acorex-modules-workflow-management-index-Bfzsu6VL.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-workflow-management-index-DV7Uf5hP.mjs → acorex-modules-workflow-management-index-CG1-u2Va.mjs} +3 -3
- package/fesm2022/{acorex-modules-workflow-management-index-DV7Uf5hP.mjs.map → acorex-modules-workflow-management-index-CG1-u2Va.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-workflow-management-index-C702Snjg.mjs → acorex-modules-workflow-management-index-DtKZARCI.mjs} +3 -3
- package/fesm2022/{acorex-modules-workflow-management-index-C702Snjg.mjs.map → acorex-modules-workflow-management-index-DtKZARCI.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-workflow-management-save-workflow-definition-activities.command-C60ABOUE.mjs → acorex-modules-workflow-management-save-workflow-definition-activities.command-80PIS1oE.mjs} +2 -2
- package/fesm2022/{acorex-modules-workflow-management-save-workflow-definition-activities.command-C60ABOUE.mjs.map → acorex-modules-workflow-management-save-workflow-definition-activities.command-80PIS1oE.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-workflow-management-workflow-configurator-widget-column.component-ChnPuG_J.mjs → acorex-modules-workflow-management-workflow-configurator-widget-column.component-CXhrrqa_.mjs} +2 -2
- package/fesm2022/{acorex-modules-workflow-management-workflow-configurator-widget-column.component-ChnPuG_J.mjs.map → acorex-modules-workflow-management-workflow-configurator-widget-column.component-CXhrrqa_.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-workflow-management-workflow-configurator-widget-edit.component-BqydSkbP.mjs → acorex-modules-workflow-management-workflow-configurator-widget-edit.component-CzPQUA9m.mjs} +47 -25
- package/fesm2022/acorex-modules-workflow-management-workflow-configurator-widget-edit.component-CzPQUA9m.mjs.map +1 -0
- package/fesm2022/{acorex-modules-workflow-management-workflow-run-history-popup.component-D_yi-Ccp.mjs → acorex-modules-workflow-management-workflow-run-history-popup.component-CTs6Sdm2.mjs} +2 -2
- package/fesm2022/{acorex-modules-workflow-management-workflow-run-history-popup.component-D_yi-Ccp.mjs.map → acorex-modules-workflow-management-workflow-run-history-popup.component-CTs6Sdm2.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-workflow-management-workflow-task-popover.component-CdvuOzXH.mjs → acorex-modules-workflow-management-workflow-task-popover.component-CaIIzv1r.mjs} +2 -2
- package/fesm2022/{acorex-modules-workflow-management-workflow-task-popover.component-CdvuOzXH.mjs.map → acorex-modules-workflow-management-workflow-task-popover.component-CaIIzv1r.mjs.map} +1 -1
- package/fesm2022/acorex-modules-workflow-management.mjs +1 -1
- package/fesm2022/acorex-modules-workplacesafety-management-control-hierarchy-diagram-widget-edit.component-CFF7X1MO.mjs +70 -0
- package/fesm2022/acorex-modules-workplacesafety-management-control-hierarchy-diagram-widget-edit.component-CFF7X1MO.mjs.map +1 -0
- package/fesm2022/acorex-modules-workplacesafety-management-control-hierarchy-diagram-widget-view.component-DwC2aHVt.mjs +70 -0
- package/fesm2022/acorex-modules-workplacesafety-management-control-hierarchy-diagram-widget-view.component-DwC2aHVt.mjs.map +1 -0
- package/fesm2022/acorex-modules-workplacesafety-management-control-hierarchy-diagram.types-DmzV305e.mjs +195 -0
- package/fesm2022/acorex-modules-workplacesafety-management-control-hierarchy-diagram.types-DmzV305e.mjs.map +1 -0
- package/fesm2022/acorex-modules-workplacesafety-management-hazard-risk-ppe-rule-status.provider-BsRNRZ6z.mjs +42 -0
- package/fesm2022/acorex-modules-workplacesafety-management-hazard-risk-ppe-rule-status.provider-BsRNRZ6z.mjs.map +1 -0
- package/fesm2022/acorex-modules-workplacesafety-management.mjs +630 -307
- package/fesm2022/acorex-modules-workplacesafety-management.mjs.map +1 -1
- package/package.json +2 -2
- package/types/acorex-modules-asset-management.d.ts +7 -3
- package/types/acorex-modules-contact-core.d.ts +1 -0
- package/types/acorex-modules-conversation.d.ts +898 -161
- package/types/acorex-modules-dashboard-management.d.ts +75 -10
- package/types/acorex-modules-document-management.d.ts +25 -5
- package/types/acorex-modules-human-capital-management.d.ts +4 -0
- package/types/acorex-modules-project-management.d.ts +46 -23
- package/types/acorex-modules-report-management.d.ts +2 -0
- package/types/acorex-modules-task-management.d.ts +100 -15
- package/types/acorex-modules-timesheet-management.d.ts +2 -2
- package/types/acorex-modules-workflow-management.d.ts +9 -4
- package/types/acorex-modules-workplacesafety-management.d.ts +62 -34
- package/fesm2022/acorex-modules-assessment-management-acorex-modules-assessment-management-WGRBHMmQ.mjs.map +0 -1
- package/fesm2022/acorex-modules-contact-core-acorex-modules-contact-core-CBMdv1GN.mjs.map +0 -1
- package/fesm2022/acorex-modules-contact-core-menu.provider-C-iEIPGe.mjs.map +0 -1
- package/fesm2022/acorex-modules-conversation-acorex-modules-conversation-CUjTT3M7.mjs.map +0 -1
- package/fesm2022/acorex-modules-conversation-send-assist-chat-message.command-CqDrZKFK.mjs.map +0 -1
- package/fesm2022/acorex-modules-dashboard-management-acorex-modules-dashboard-management-Lx3VuIg6.mjs.map +0 -1
- package/fesm2022/acorex-modules-data-management-index-CxVSgxTM.mjs.map +0 -1
- package/fesm2022/acorex-modules-human-capital-management-acorex-modules-human-capital-management-DpVAfk3i.mjs.map +0 -1
- package/fesm2022/acorex-modules-human-capital-management-edit-personal-info.command-8LKMNm4Z.mjs.map +0 -1
- package/fesm2022/acorex-modules-settings-management-setting-view.component-CG-GW2yS.mjs.map +0 -1
- package/fesm2022/acorex-modules-task-management-task-board.page-FFhsAyHF.mjs.map +0 -1
- package/fesm2022/acorex-modules-timesheet-management-report-hours-by-project.query-z38wZLKJ.mjs.map +0 -1
- package/fesm2022/acorex-modules-workflow-management-acorex-modules-workflow-management-DJeUheQT.mjs.map +0 -1
- package/fesm2022/acorex-modules-workflow-management-workflow-configurator-widget-edit.component-BqydSkbP.mjs.map +0 -1
|
@@ -2,7 +2,7 @@ import { AXPWidgetsList } from '@acorex/platform/contracts';
|
|
|
2
2
|
import { AXDataSource } from '@acorex/cdk/common';
|
|
3
3
|
import { AXPEntityService } from '@acorex/platform/layout/entity';
|
|
4
4
|
import { inject } from '@angular/core';
|
|
5
|
-
import { R as RootConfig, f as AXMOrganizationManagementDataSourceKeys } from './acorex-modules-organization-management-acorex-modules-organization-management-
|
|
5
|
+
import { R as RootConfig, f as AXMOrganizationManagementDataSourceKeys } from './acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs';
|
|
6
6
|
|
|
7
7
|
class AXMJobLevelDataSourceDefinition {
|
|
8
8
|
constructor() {
|
|
@@ -92,4 +92,4 @@ class AXMJobLevelDataSourceDefinition {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
export { AXMJobLevelDataSourceDefinition };
|
|
95
|
-
//# sourceMappingURL=acorex-modules-organization-management-job-level.datasource-
|
|
95
|
+
//# sourceMappingURL=acorex-modules-organization-management-job-level.datasource-CMxMInko.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-modules-organization-management-job-level.datasource-
|
|
1
|
+
{"version":3,"file":"acorex-modules-organization-management-job-level.datasource-CMxMInko.mjs","sources":["../../../../libs/modules/organization-management/src/lib/features/shared/datasources/job-level.datasource.ts"],"sourcesContent":["import { AXPWidgetsList } from '@acorex/platform/contracts';\nimport { AXDataSource } from '@acorex/cdk/common';\nimport { AXPFilterDefinition } from '@acorex/platform/contracts';\nimport { AXPDataSourceDefinition, AXPDataSourceDefinitionProvider } from '@acorex/platform/core';\nimport { AXPEntityService } from '@acorex/platform/layout/entity';\nimport { inject } from '@angular/core';\nimport { RootConfig } from '../../../contracts';\nimport { AXMOrganizationManagementDataSourceKeys } from '../../../contracts/datasource.keys';\nimport { AXMOrganizationManagementJobLevelEntityModel } from '../../../entities/job-level/job-level.types';\n\nexport class AXMJobLevelDataSourceDefinition implements AXPDataSourceDefinitionProvider {\n private readonly entityService = inject(AXPEntityService);\n private readonly jobLevelData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.jobLevel.name)\n .data<string, AXMOrganizationManagementJobLevelEntityModel>();\n\n items(): Promise<AXPDataSourceDefinition[]> {\n return Promise.resolve([\n {\n name: AXMOrganizationManagementDataSourceKeys.JobLevels,\n title: 'Job Levels',\n source: () => {\n return new AXDataSource({\n key: 'id',\n load: async (_) => {\n try {\n const res = await this.jobLevelData.query({ skip: 0, take: 1000 });\n return {\n items: res.items\n .map((item: AXMOrganizationManagementJobLevelEntityModel) => ({\n ...item,\n }))\n .sort((a, b) => (a.level ?? 0) - (b.level ?? 0)),\n total: res.total,\n };\n } catch (e) {\n console.log(e);\n throw e;\n }\n },\n byKey: async (key: unknown) => {\n return await this.jobLevelData.byKey(key as string);\n },\n pageSize: 100,\n });\n },\n columns: [\n {\n name: 'id',\n title: 'ID',\n datatype: 'uuid',\n type: AXPWidgetsList.Editors.TextBox,\n },\n {\n name: 'title',\n title: 'Title',\n datatype: 'string',\n type: AXPWidgetsList.Editors.TextBox,\n },\n {\n name: 'description',\n title: 'Description',\n datatype: 'string',\n type: AXPWidgetsList.Editors.TextBox,\n },\n ],\n filters: [\n {\n field: 'title',\n title: 'Title',\n operator: {\n type: 'equal',\n },\n widget: {\n type: AXPWidgetsList.Editors.TextBox,\n },\n filterType: {\n advance: true,\n inline: true,\n },\n } as AXPFilterDefinition,\n ],\n textField: {\n name: 'title',\n title: 'Title',\n },\n valueField: {\n name: 'id',\n title: 'ID',\n },\n },\n ]);\n }\n}\n"],"names":[],"mappings":";;;;;;MAUa,+BAA+B,CAAA;AAA5C,IAAA,WAAA,GAAA;AACqB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;QACxC,IAAA,CAAA,YAAY,GAAG,IAAI,CAAC;AAChC,aAAA,UAAU,CAAC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EAAE,IAAI;AACX,wBAAA,QAAQ,EAAE,MAAM;AAChB,wBAAA,IAAI,EAAE,cAAc,CAAC,OAAO,CAAC,OAAO;AACvC,qBAAA;AACD,oBAAA;AACI,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,KAAK,EAAE,OAAO;AACd,wBAAA,QAAQ,EAAE,QAAQ;AAClB,wBAAA,IAAI,EAAE,cAAc,CAAC,OAAO,CAAC,OAAO;AACvC,qBAAA;AACD,oBAAA;AACI,wBAAA,IAAI,EAAE,aAAa;AACnB,wBAAA,KAAK,EAAE,aAAa;AACpB,wBAAA,QAAQ,EAAE,QAAQ;AAClB,wBAAA,IAAI,EAAE,cAAc,CAAC,OAAO,CAAC,OAAO;AACvC,qBAAA;AACJ,iBAAA;AACD,gBAAA,OAAO,EAAE;AACL,oBAAA;AACI,wBAAA,KAAK,EAAE,OAAO;AACd,wBAAA,KAAK,EAAE,OAAO;AACd,wBAAA,QAAQ,EAAE;AACN,4BAAA,IAAI,EAAE,OAAO;AAChB,yBAAA;AACD,wBAAA,MAAM,EAAE;AACJ,4BAAA,IAAI,EAAE,cAAc,CAAC,OAAO,CAAC,OAAO;AACvC,yBAAA;AACD,wBAAA,UAAU,EAAE;AACR,4BAAA,OAAO,EAAE,IAAI;AACb,4BAAA,MAAM,EAAE,IAAI;AACf,yBAAA;AACmB,qBAAA;AAC3B,iBAAA;AACD,gBAAA,SAAS,EAAE;AACP,oBAAA,IAAI,EAAE,OAAO;AACb,oBAAA,KAAK,EAAE,OAAO;AACjB,iBAAA;AACD,gBAAA,UAAU,EAAE;AACR,oBAAA,IAAI,EAAE,IAAI;AACV,oBAAA,KAAK,EAAE,IAAI;AACd,iBAAA;AACJ,aAAA;AACJ,SAAA,CAAC;IACN;AACH;;;;"}
|
|
@@ -2,7 +2,7 @@ import { AXPCommonMenuKeys } from '@acorex/modules/common';
|
|
|
2
2
|
import { AXPSessionService } from '@acorex/platform/auth';
|
|
3
3
|
import { AXPEntityService } from '@acorex/platform/layout/entity';
|
|
4
4
|
import { inject } from '@angular/core';
|
|
5
|
-
import { R as RootConfig, g as AXPOrganizationManagementPermissionKeys, h as AXPOrganizationManagementMenuKeys } from './acorex-modules-organization-management-acorex-modules-organization-management-
|
|
5
|
+
import { R as RootConfig, g as AXPOrganizationManagementPermissionKeys, h as AXPOrganizationManagementMenuKeys } from './acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs';
|
|
6
6
|
|
|
7
7
|
//#region ---- Imports ----
|
|
8
8
|
//#endregion
|
|
@@ -30,7 +30,7 @@ class AXMMenuProvider {
|
|
|
30
30
|
context.addItems([
|
|
31
31
|
{
|
|
32
32
|
name: AXPCommonMenuKeys.Organization,
|
|
33
|
-
priority:
|
|
33
|
+
priority: 8000,
|
|
34
34
|
text: '@organization-management:module.menus.root.title',
|
|
35
35
|
icon: module.icon,
|
|
36
36
|
children: [
|
|
@@ -172,4 +172,4 @@ class AXMMenuProvider {
|
|
|
172
172
|
//#endregion
|
|
173
173
|
|
|
174
174
|
export { AXMMenuProvider };
|
|
175
|
-
//# sourceMappingURL=acorex-modules-organization-management-menu.provider-
|
|
175
|
+
//# sourceMappingURL=acorex-modules-organization-management-menu.provider-BL99vlod.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-modules-organization-management-menu.provider-B0v8w3eH.mjs","sources":["../../../../libs/modules/organization-management/src/lib/menu.provider.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPCommonMenuKeys } from '@acorex/modules/common';\nimport { AXPSessionService } from '@acorex/platform/auth';\nimport { AXPMenuProvider, AXPMenuProviderContext } from '@acorex/platform/common';\nimport { AXPEntityService } from '@acorex/platform/layout/entity';\nimport { inject } from '@angular/core';\nimport { RootConfig } from './contracts';\nimport { AXPOrganizationManagementMenuKeys } from './contracts/menu.keys';\nimport { AXPOrganizationManagementPermissionKeys } from './contracts/permission.keys';\n\n//#endregion\n\n//#region ---- Menu Provider ----\n\n/**\n * Organization Management Module Menu Provider.\n * Provides menu structure for the Organization Management module.\n * - Root \"Organization\": Employees, Leave Requests, Chart (operational) then Teams, Positions, Business Units (structure)\n * - Configuration/Organization: Job Definitions, Job Levels, Responsibilities, etc. (reference data)\n */\nexport class AXMMenuProvider implements AXPMenuProvider {\n //#region ---- Services & Dependencies ----\n\n private entityService = inject(AXPEntityService);\n private sessionService = inject(AXPSessionService);\n\n //#endregion\n\n //#region ---- Public Methods ----\n\n async provide(context: AXPMenuProviderContext): Promise<void> {\n const module = RootConfig.module;\n\n const organizationMenu = context.find(AXPCommonMenuKeys.Organization);\n if (!organizationMenu.exists) {\n // Root \"Organization\" - structure items (Employees, Leave, Chart added by HCM with lower priorities)\n context.addItems([\n {\n name: AXPCommonMenuKeys.Organization,\n priority: 9000,\n text: '@organization-management:module.menus.root.title',\n icon: module.icon,\n children: [\n {\n name: AXPOrganizationManagementMenuKeys.OrganizationChart,\n text: '@organization-management:organization-chart.menus.chart.title',\n path: `${this.sessionService.application?.name}/organization/chart`,\n priority: 30,\n icon: RootConfig.entities.chart.icon,\n policy: {\n features: [module.name],\n permissions: [AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management],\n },\n },\n { name: `${AXPOrganizationManagementMenuKeys.Root}:divider1`, text: '', type: 'break', priority: 40 },\n {\n name: AXPOrganizationManagementMenuKeys.Teams,\n text: '@organization-management:teams.menus.teams.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.team.name),\n priority: 50,\n icon: RootConfig.entities.team.icon,\n policy: {\n features: [module.name],\n permissions: [AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management],\n },\n },\n {\n name: AXPOrganizationManagementMenuKeys.Positions,\n text: '@organization-management:positions.menus.positions.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.position.name),\n priority: 55,\n icon: RootConfig.entities.position.icon,\n policy: {\n features: [module.name],\n permissions: [AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management],\n },\n },\n {\n name: AXPOrganizationManagementMenuKeys.BusinessUnits,\n text: '@organization-management:business-units.menus.business-units.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.businessUnit.name),\n priority: 60,\n icon: RootConfig.entities.businessUnit.icon,\n policy: {\n features: [module.name],\n permissions: [AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management],\n },\n },\n ],\n },\n ]);\n }\n\n // Configuration/Organization - reference data (Job Definitions, Employment Types, etc.)\n const orgConfigMenu = context.find(AXPCommonMenuKeys.OrganizationConfig);\n if (!orgConfigMenu.exists) {\n context.find(AXPCommonMenuKeys.Configuration).addItems([\n {\n name: AXPCommonMenuKeys.OrganizationConfig,\n priority: 8600,\n text: '@organization-management:module.menus.configuration.title',\n icon: module.icon,\n type: 'menu',\n children: [],\n },\n ]);\n }\n\n // Add org config items\n context.find(AXPCommonMenuKeys.OrganizationConfig).addItems([\n {\n name: AXPOrganizationManagementMenuKeys.TeamMemberRoles,\n text: '@organization-management:team-member-roles.menus.team-member-roles.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.teamMemberRole.name),\n priority: 1,\n icon: RootConfig.entities.teamMemberRole.icon,\n policy: {\n features: [module.name],\n permissions: [AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management],\n },\n },\n {\n name: AXPOrganizationManagementMenuKeys.JobDefinitions,\n text: '@organization-management:job-definitions.menus.job-definitions.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.jobDefinition.name),\n priority: 2,\n icon: RootConfig.entities.jobDefinition.icon,\n policy: {\n features: [module.name],\n permissions: [AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management],\n },\n },\n {\n name: AXPOrganizationManagementMenuKeys.JobLevels,\n text: '@organization-management:job-levels.menus.job-levels.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.jobLevel.name),\n priority: 3,\n icon: RootConfig.entities.jobLevel.icon,\n policy: {\n features: [module.name],\n permissions: [AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management],\n },\n },\n {\n name: AXPOrganizationManagementMenuKeys.Responsibilities,\n text: '@organization-management:responsibilities.menus.responsibilities.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.responsibility.name),\n priority: 4,\n icon: RootConfig.entities.responsibility.icon,\n policy: {\n features: [module.name],\n permissions: [AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management],\n },\n },\n {\n name: AXPOrganizationManagementMenuKeys.ResponsibilityLevels,\n text: '@organization-management:responsibility-levels.menus.responsibility-levels.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.responsibilityLevel.name),\n priority: 5,\n icon: RootConfig.entities.responsibilityLevel.icon,\n policy: {\n features: [module.name],\n permissions: [AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management],\n },\n },\n {\n name: AXPOrganizationManagementMenuKeys.BusinessUnitTypes,\n text: '@organization-management:business-unit-types.menus.business-unit-types.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.businessUnitType.name),\n priority: 6,\n icon: RootConfig.entities.businessUnitType.icon,\n policy: {\n features: [module.name],\n permissions: [AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management],\n },\n },\n { name: `${AXPOrganizationManagementMenuKeys.Root}:staff-divider`, text: '', type: 'break', priority: 7 },\n ]);\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AAAA;AAWA;AAEA;AAEA;;;;;AAKG;MACU,eAAe,CAAA;AAA5B,IAAA,WAAA,GAAA;;AAGU,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;;IA6JpD;;;IAvJE,MAAM,OAAO,CAAC,OAA+B,EAAA;AAC3C,QAAA,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM;QAEhC,MAAM,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC;AACrE,QAAA,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE;;YAE5B,OAAO,CAAC,QAAQ,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AA,IAAI,EAAE,kFAAkF;AACxF,gBAAA,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,mBAAmB,CAAC,IAAI,CAAC;AAC9F,gBAAA,QAAQ,EAAE,CAAC;AACX,gBAAA,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,mBAAmB,CAAC,IAAI;AAClD,gBAAA,MAAM,EAAE;AACN,oBAAA,QAAQ,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC;AACvB,oBAAA,WAAW,EAAE,CAAC,uCAAuC,CAAC,sBAAsB,CAAC,UAAU,CAAC;AACzF,iBAAA;AACF,aAAA;AACD,YAAA;gBACE,IAAI,EAAE,iCAAiC,CAAC,iBAAiB;AACzD,gBAAA,IAAI,EAAE,8EAA8E;AACpF,gBAAA,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC;AAC3F,gBAAA,QAAQ,EAAE,CAAC;AACX,gBAAA,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI;AAC/C,gBAAA,MAAM,EAAE;AACN,oBAAA,QAAQ,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC;AACvB,oBAAA,WAAW,EAAE,CAAC,uCAAuC,CAAC,sBAAsB,CAAC,UAAU,CAAC;AACzF,iBAAA;AACF,aAAA;AACD,YAAA,EAAE,IAAI,EAAE,CAAA,EAAG,iCAAiC,CAAC,IAAI,gBAAgB,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE;AAC1G,SAAA,CAAC;IACJ;AAGD;AAED;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-modules-organization-management-menu.provider-BL99vlod.mjs","sources":["../../../../libs/modules/organization-management/src/lib/menu.provider.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPCommonMenuKeys } from '@acorex/modules/common';\nimport { AXPSessionService } from '@acorex/platform/auth';\nimport { AXPMenuProvider, AXPMenuProviderContext } from '@acorex/platform/common';\nimport { AXPEntityService } from '@acorex/platform/layout/entity';\nimport { inject } from '@angular/core';\nimport { RootConfig } from './contracts';\nimport { AXPOrganizationManagementMenuKeys } from './contracts/menu.keys';\nimport { AXPOrganizationManagementPermissionKeys } from './contracts/permission.keys';\n\n//#endregion\n\n//#region ---- Menu Provider ----\n\n/**\n * Organization Management Module Menu Provider.\n * Provides menu structure for the Organization Management module.\n * - Root \"Organization\": Employees, Leave Requests, Chart (operational) then Teams, Positions, Business Units (structure)\n * - Configuration/Organization: Job Definitions, Job Levels, Responsibilities, etc. (reference data)\n */\nexport class AXMMenuProvider implements AXPMenuProvider {\n //#region ---- Services & Dependencies ----\n\n private entityService = inject(AXPEntityService);\n private sessionService = inject(AXPSessionService);\n\n //#endregion\n\n //#region ---- Public Methods ----\n\n async provide(context: AXPMenuProviderContext): Promise<void> {\n const module = RootConfig.module;\n\n const organizationMenu = context.find(AXPCommonMenuKeys.Organization);\n if (!organizationMenu.exists) {\n // Root \"Organization\" - structure items (Employees, Leave, Chart added by HCM with lower priorities)\n context.addItems([\n {\n name: AXPCommonMenuKeys.Organization,\n priority: 8000,\n text: '@organization-management:module.menus.root.title',\n icon: module.icon,\n children: [\n {\n name: AXPOrganizationManagementMenuKeys.OrganizationChart,\n text: '@organization-management:organization-chart.menus.chart.title',\n path: `${this.sessionService.application?.name}/organization/chart`,\n priority: 30,\n icon: RootConfig.entities.chart.icon,\n policy: {\n features: [module.name],\n permissions: [AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management],\n },\n },\n { name: `${AXPOrganizationManagementMenuKeys.Root}:divider1`, text: '', type: 'break', priority: 40 },\n {\n name: AXPOrganizationManagementMenuKeys.Teams,\n text: '@organization-management:teams.menus.teams.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.team.name),\n priority: 50,\n icon: RootConfig.entities.team.icon,\n policy: {\n features: [module.name],\n permissions: [AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management],\n },\n },\n {\n name: AXPOrganizationManagementMenuKeys.Positions,\n text: '@organization-management:positions.menus.positions.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.position.name),\n priority: 55,\n icon: RootConfig.entities.position.icon,\n policy: {\n features: [module.name],\n permissions: [AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management],\n },\n },\n {\n name: AXPOrganizationManagementMenuKeys.BusinessUnits,\n text: '@organization-management:business-units.menus.business-units.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.businessUnit.name),\n priority: 60,\n icon: RootConfig.entities.businessUnit.icon,\n policy: {\n features: [module.name],\n permissions: [AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management],\n },\n },\n ],\n },\n ]);\n }\n\n // Configuration/Organization - reference data (Job Definitions, Employment Types, etc.)\n const orgConfigMenu = context.find(AXPCommonMenuKeys.OrganizationConfig);\n if (!orgConfigMenu.exists) {\n context.find(AXPCommonMenuKeys.Configuration).addItems([\n {\n name: AXPCommonMenuKeys.OrganizationConfig,\n priority: 8600,\n text: '@organization-management:module.menus.configuration.title',\n icon: module.icon,\n type: 'menu',\n children: [],\n },\n ]);\n }\n\n // Add org config items\n context.find(AXPCommonMenuKeys.OrganizationConfig).addItems([\n {\n name: AXPOrganizationManagementMenuKeys.TeamMemberRoles,\n text: '@organization-management:team-member-roles.menus.team-member-roles.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.teamMemberRole.name),\n priority: 1,\n icon: RootConfig.entities.teamMemberRole.icon,\n policy: {\n features: [module.name],\n permissions: [AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management],\n },\n },\n {\n name: AXPOrganizationManagementMenuKeys.JobDefinitions,\n text: '@organization-management:job-definitions.menus.job-definitions.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.jobDefinition.name),\n priority: 2,\n icon: RootConfig.entities.jobDefinition.icon,\n policy: {\n features: [module.name],\n permissions: [AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management],\n },\n },\n {\n name: AXPOrganizationManagementMenuKeys.JobLevels,\n text: '@organization-management:job-levels.menus.job-levels.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.jobLevel.name),\n priority: 3,\n icon: RootConfig.entities.jobLevel.icon,\n policy: {\n features: [module.name],\n permissions: [AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management],\n },\n },\n {\n name: AXPOrganizationManagementMenuKeys.Responsibilities,\n text: '@organization-management:responsibilities.menus.responsibilities.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.responsibility.name),\n priority: 4,\n icon: RootConfig.entities.responsibility.icon,\n policy: {\n features: [module.name],\n permissions: [AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management],\n },\n },\n {\n name: AXPOrganizationManagementMenuKeys.ResponsibilityLevels,\n text: '@organization-management:responsibility-levels.menus.responsibility-levels.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.responsibilityLevel.name),\n priority: 5,\n icon: RootConfig.entities.responsibilityLevel.icon,\n policy: {\n features: [module.name],\n permissions: [AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management],\n },\n },\n {\n name: AXPOrganizationManagementMenuKeys.BusinessUnitTypes,\n text: '@organization-management:business-unit-types.menus.business-unit-types.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.businessUnitType.name),\n priority: 6,\n icon: RootConfig.entities.businessUnitType.icon,\n policy: {\n features: [module.name],\n permissions: [AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management],\n },\n },\n { name: `${AXPOrganizationManagementMenuKeys.Root}:staff-divider`, text: '', type: 'break', priority: 7 },\n ]);\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AAAA;AAWA;AAEA;AAEA;;;;;AAKG;MACU,eAAe,CAAA;AAA5B,IAAA,WAAA,GAAA;;AAGU,QAAA,IAAA,CAAA,aA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AC,uCAAuC,CAAC,sBAAsB,CAAC,UAAU,CAAC;AACzF,iBAAA;AACF,aAAA;AACD,YAAA,EAAE,IAAI,EAAE,CAAA,EAAG,iCAAiC,CAAC,IAAI,gBAAgB,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE;AAC1G,SAAA,CAAC;IACJ;AAGD;AAED;;;;"}
|
|
@@ -5,7 +5,7 @@ import { AXPCommandService } from '@acorex/platform/runtime';
|
|
|
5
5
|
import { AXPWorkflowService } from '@acorex/platform/workflow';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
7
|
import { inject, LOCALE_ID, Injectable } from '@angular/core';
|
|
8
|
-
import { g as AXPOrganizationManagementPermissionKeys, j as AXMOrganizationManagementCommandKeys, R as RootConfig } from './acorex-modules-organization-management-acorex-modules-organization-management-
|
|
8
|
+
import { g as AXPOrganizationManagementPermissionKeys, j as AXMOrganizationManagementCommandKeys, R as RootConfig } from './acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs';
|
|
9
9
|
|
|
10
10
|
//#region ---- Imports ----
|
|
11
11
|
//#endregion
|
|
@@ -224,4 +224,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
224
224
|
}] });
|
|
225
225
|
|
|
226
226
|
export { AXMOrgChartDefaultNodeContributionProvider };
|
|
227
|
-
//# sourceMappingURL=acorex-modules-organization-management-org-chart-default-node-contribution.provider-
|
|
227
|
+
//# sourceMappingURL=acorex-modules-organization-management-org-chart-default-node-contribution.provider-CfvmOwYD.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-modules-organization-management-org-chart-default-node-contribution.provider-B07M8tKi.mjs","sources":["../../../../libs/modules/organization-management/src/lib/features/organization-chart/contributions/org-chart-default-node-contribution.provider.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXTranslationService, createMultiLanguageString, resolveMultiLanguageString } from '@acorex/core/translation';\nimport { AXPSessionService } from '@acorex/platform/auth';\nimport type { AXPMultiLanguageString } from '@acorex/platform/contracts';\nimport { AXPEntityService } from '@acorex/platform/layout/entity';\nimport { AXPCommandService } from '@acorex/platform/runtime';\nimport { AXPWorkflowService } from '@acorex/platform/workflow';\nimport { inject, Injectable, LOCALE_ID } from '@angular/core';\nimport { AXMOrganizationManagementCommandKeys } from '../../../contracts/commands.keys';\nimport { RootConfig } from '../../../contracts';\nimport { AXPOrganizationManagementPermissionKeys } from '../../../contracts/permission.keys';\nimport {\n AXMOrgChartNodeContributionContext,\n AXMOrgChartNodeContributionProvider,\n AXMOrgChartNodeMenuAction,\n} from '../tokens/org-chart-node-contribution.token';\n\n//#endregion\n\n//#region ---- Module Constants ----\n\nconst orgChartNodeActionKey = (suffix: string): string =>\n `@organization-management:organization-chart.node-actions.${suffix}`;\n\n//#endregion\n\n@Injectable()\nexport class AXMOrgChartDefaultNodeContributionProvider implements AXMOrgChartNodeContributionProvider {\n //#region ---- Services & Dependencies ----\n\n private readonly commandService = inject(AXPCommandService);\n private readonly workflowService = inject(AXPWorkflowService);\n private readonly sessionService = inject(AXPSessionService);\n private readonly entityService = inject(AXPEntityService);\n private readonly localeId = inject(LOCALE_ID);\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ---- Menu Actions ----\n\n async getMenuActions(context: AXMOrgChartNodeContributionContext): Promise<AXMOrgChartNodeMenuAction[]> {\n if (context.nodeKind !== 'company-root' && context.nodeKind !== 'business-unit') {\n return [];\n }\n\n const businessUnitId = this.resolveBusinessUnitId(context);\n const parentId = context.nodeKind === 'business-unit' ? businessUnitId : undefined;\n\n const typeAllowsDirectPositions =\n context.nodeKind === 'business-unit' && businessUnitId\n ? await this.resolveTypeAllowsDirectPositions(context, businessUnitId)\n : false;\n\n /** When true, a separator goes after the last “Add BU by type” row before the Add position row. */\n const hasPositionRowAfterBuTypes =\n context.nodeKind === 'business-unit' && Boolean(businessUnitId) && typeAllowsDirectPositions;\n\n const canCreateBusinessUnit = this.authorize(AXPOrganizationManagementPermissionKeys.BusinessUnit.Create);\n const canUpdateBusinessUnit = this.authorize(AXPOrganizationManagementPermissionKeys.BusinessUnit.Update);\n const canDeleteBusinessUnit = this.authorize(AXPOrganizationManagementPermissionKeys.BusinessUnit.Delete);\n const canViewPosition = this.authorize(AXPOrganizationManagementPermissionKeys.Position.View);\n const canCreateTeam = this.authorize(AXPOrganizationManagementPermissionKeys.Team.Create);\n\n const buTypeRows = await this.loadBusinessUnitTypes();\n const addNewBuKey = orgChartNodeActionKey('add-new-bu-with-type');\n const addBuActions: AXMOrgChartNodeMenuAction[] = await Promise.all(\n buTypeRows.map(async (row, index) => ({\n id: `organization-management.add-bu-type.${row.id}`,\n title: await this.menuTitleDualLocale(addNewBuKey, { type: row.title }),\n nestedInAddFlyout: true,\n icon: 'fa-light fa-sitemap',\n order: 10 + index,\n disabled: !canCreateBusinessUnit,\n break: hasPositionRowAfterBuTypes && index === buTypeRows.length - 1 && buTypeRows.length > 0 ? 'after' : undefined,\n execute: async () => {\n await this.commandService.execute(\n AXMOrganizationManagementCommandKeys.OrganizationChart.AddBusinessUnitToBusinessUnit,\n { parentBusinessUnitId: parentId, typeId: row.id },\n );\n await context.refreshChart();\n },\n })),\n );\n\n const addPositionToBuAction: AXMOrgChartNodeMenuAction | null =\n context.nodeKind === 'business-unit' && businessUnitId && typeAllowsDirectPositions\n ? {\n id: 'organization-management.add-position-to-business-unit',\n title: orgChartNodeActionKey('add-new-position'),\n nestedInAddFlyout: true,\n icon: 'fa-light fa-briefcase',\n order: 10 + buTypeRows.length,\n disabled: !canUpdateBusinessUnit || !canViewPosition,\n execute: async () => {\n const result = await this.commandService.execute(\n AXMOrganizationManagementCommandKeys.OrganizationChart.AddPositionToBusinessUnit,\n { businessUnitId },\n );\n if (result?.success) {\n await context.refreshChart();\n }\n },\n }\n : null;\n\n const addNewTeamToBuAction: AXMOrgChartNodeMenuAction | null =\n context.nodeKind === 'business-unit' && businessUnitId\n ? {\n id: 'organization-management.org-chart.add-new-team',\n title: orgChartNodeActionKey('add-new-team'),\n nestedInAddFlyout: true,\n icon: 'fa-light fa-people-group',\n order: 10 + buTypeRows.length + (addPositionToBuAction ? 1 : 0),\n disabled: !canCreateTeam,\n execute: async () => {\n const result = await this.commandService.execute(\n AXMOrganizationManagementCommandKeys.OrganizationChart.AddTeamToBusinessUnit,\n { businessUnitId },\n );\n if (result?.success) {\n await context.refreshChart();\n }\n },\n }\n : null;\n\n const removeBuActions: AXMOrgChartNodeMenuAction[] =\n context.nodeKind === 'business-unit'\n ? [\n {\n id: 'organization-management.remove-bu',\n title: orgChartNodeActionKey('remove'),\n icon: 'fa-light fa-trash',\n color: 'danger',\n order: 120,\n break: 'before',\n disabled: !canDeleteBusinessUnit || !businessUnitId,\n execute: async () => {\n await this.workflowService.execute('delete-entity', {\n entity: RootConfig.entities.businessUnit.source,\n data: { id: businessUnitId },\n options: { process: { showResult: true } },\n });\n await context.refreshChart();\n },\n },\n ]\n : [];\n\n return [\n ...addBuActions,\n ...(addPositionToBuAction ? [addPositionToBuAction] : []),\n ...(addNewTeamToBuAction ? [addNewTeamToBuAction] : []),\n ...removeBuActions,\n ];\n }\n\n //#endregion\n\n //#region ---- Authorization ----\n\n private authorize(permission: string): boolean {\n return this.sessionService.authorize(permission);\n }\n\n //#endregion\n\n //#region ---- Menu Labels ----\n\n /**\n * Resolves copy for menu rows: nested `translate` bindings do not pass interpolation params into the pipe;\n * use per-locale strings via {@link createMultiLanguageString}.\n *\n * TODO: Remove this dual-locale pre-resolution once we can pass interpolation params through\n * {@link AXPMultiLanguageString} and/or the menu `translate` pipe (see `@acorex/components/menu` item template).\n */\n private async menuTitleDualLocale(\n key: string,\n params: Record<string, string | number>,\n ): Promise<ReturnType<typeof createMultiLanguageString>> {\n const [enUs, faIr] = await Promise.all([\n this.translationService.translateAsync(key, { lang: 'en-US', params }),\n this.translationService.translateAsync(key, { lang: 'fa-IR', params }),\n ]);\n return createMultiLanguageString(enUs, faIr);\n }\n\n //#endregion\n\n //#region ---- Business Unit Types ----\n\n /**\n * Resolves whether the BU's type allows direct positions (metadata from chart, nested type, or type lookup).\n */\n private async resolveTypeAllowsDirectPositions(\n context: AXMOrgChartNodeContributionContext,\n businessUnitId: string,\n ): Promise<boolean> {\n const fromMeta = context.node.metadata?.['typeAllowsDirectPositions'];\n if (typeof fromMeta === 'boolean') {\n return fromMeta;\n }\n try {\n const bu = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.businessUnit.name)\n .data()\n .byKey(businessUnitId);\n const row = bu as { type?: { allowsDirectPositions?: boolean }; typeId?: string } | null;\n const nested = row?.type?.allowsDirectPositions;\n if (typeof nested === 'boolean') {\n return nested;\n }\n const typeId = row?.typeId?.trim();\n if (typeId) {\n const ty = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.businessUnitType.name)\n .data()\n .byKey(typeId);\n return (ty as { allowsDirectPositions?: boolean } | null)?.allowsDirectPositions !== false;\n }\n } catch {\n // fall through\n }\n return true;\n }\n\n private async loadBusinessUnitTypes(): Promise<Array<{ id: string; title: string }>> {\n try {\n const result = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.businessUnitType.name)\n .data()\n .query({\n skip: 0,\n take: 500,\n sort: [{ field: 'title', dir: 'asc' }],\n });\n const items = (result.items ?? []) as Array<{ id: string; title?: unknown; name?: string }>;\n return items\n .map((row) => {\n const id = String(row.id ?? '');\n const title = this.resolveBusinessUnitTypeLabel(row);\n return { id, title: title || (row.name ?? '').trim() || id };\n })\n .filter((row) => row.id.length > 0);\n } catch {\n return [];\n }\n }\n\n /**\n * API rows use {@link AXPMultiLanguageString} for `title`; treating it as a string breaks `.trim()` and drops all types.\n */\n private resolveBusinessUnitTypeLabel(row: { title?: unknown; name?: string }): string {\n const raw = row.title;\n if (raw == null) {\n return '';\n }\n if (typeof raw === 'string') {\n return raw.trim();\n }\n return resolveMultiLanguageString(raw as AXPMultiLanguageString, this.localeId).trim();\n }\n\n //#endregion\n\n //#region ---- Node Metadata ----\n\n private resolveBusinessUnitId(context: AXMOrgChartNodeContributionContext): string | undefined {\n if (context.nodeKind === 'business-unit') {\n return (\n context.node.entity?.id ??\n (context.node.metadata?.['businessUnitId'] as string | undefined) ??\n (context.node.metadata?.['unitId'] as string | undefined)\n );\n }\n return context.node.metadata?.['businessUnitId'] as string | undefined;\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA;AAkBA;AAEA;AAEA,MAAM,qBAAqB,GAAG,CAAC,MAAc,KAC3C,CAAA,yDAAA,EAA4D,MAAM,CAAA,CAAE;AAEtE;MAGa,0CAA0C,CAAA;AADvD,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC5C,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;AAC5B,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAqPnE,IAAA;;;IA/OC,MAAM,cAAc,CAAC,OAA2C,EAAA;AAC9D,QAAA,IAAI,OAAO,CAAC,QAAQ,KAAK,cAAc,IAAI,OAAO,CAAC,QAAQ,KAAK,eAAe,EAAE;AAC/E,YAAA,OAAO,EAAE;QACX;QAEA,MAAM,cAAc,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC;AAC1D,QAAA,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,KAAK,eAAe,GAAG,cAAc,GAAG,SAAS;QAElF,MAAM,yBAAyB,GAC7B,OAAO,CAAC,QAAQ,KAAK,eAAe,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"file":"acorex-modules-organization-management-org-chart-default-node-contribution.provider-CfvmOwYD.mjs","sources":["../../../../libs/modules/organization-management/src/lib/features/organization-chart/contributions/org-chart-default-node-contribution.provider.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXTranslationService, createMultiLanguageString, resolveMultiLanguageString } from '@acorex/core/translation';\nimport { AXPSessionService } from '@acorex/platform/auth';\nimport type { AXPMultiLanguageString } from '@acorex/platform/contracts';\nimport { AXPEntityService } from '@acorex/platform/layout/entity';\nimport { AXPCommandService } from '@acorex/platform/runtime';\nimport { AXPWorkflowService } from '@acorex/platform/workflow';\nimport { inject, Injectable, LOCALE_ID } from '@angular/core';\nimport { AXMOrganizationManagementCommandKeys } from '../../../contracts/commands.keys';\nimport { RootConfig } from '../../../contracts';\nimport { AXPOrganizationManagementPermissionKeys } from '../../../contracts/permission.keys';\nimport {\n AXMOrgChartNodeContributionContext,\n AXMOrgChartNodeContributionProvider,\n AXMOrgChartNodeMenuAction,\n} from '../tokens/org-chart-node-contribution.token';\n\n//#endregion\n\n//#region ---- Module Constants ----\n\nconst orgChartNodeActionKey = (suffix: string): string =>\n `@organization-management:organization-chart.node-actions.${suffix}`;\n\n//#endregion\n\n@Injectable()\nexport class AXMOrgChartDefaultNodeContributionProvider implements AXMOrgChartNodeContributionProvider {\n //#region ---- Services & Dependencies ----\n\n private readonly commandService = inject(AXPCommandService);\n private readonly workflowService = inject(AXPWorkflowService);\n private readonly sessionService = inject(AXPSessionService);\n private readonly entityService = inject(AXPEntityService);\n private readonly localeId = inject(LOCALE_ID);\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ---- Menu Actions ----\n\n async getMenuActions(context: AXMOrgChartNodeContributionContext): Promise<AXMOrgChartNodeMenuAction[]> {\n if (context.nodeKind !== 'company-root' && context.nodeKind !== 'business-unit') {\n return [];\n }\n\n const businessUnitId = this.resolveBusinessUnitId(context);\n const parentId = context.nodeKind === 'business-unit' ? businessUnitId : undefined;\n\n const typeAllowsDirectPositions =\n context.nodeKind === 'business-unit' && businessUnitId\n ? await this.resolveTypeAllowsDirectPositions(context, businessUnitId)\n : false;\n\n /** When true, a separator goes after the last “Add BU by type” row before the Add position row. */\n const hasPositionRowAfterBuTypes =\n context.nodeKind === 'business-unit' && Boolean(businessUnitId) && typeAllowsDirectPositions;\n\n const canCreateBusinessUnit = this.authorize(AXPOrganizationManagementPermissionKeys.BusinessUnit.Create);\n const canUpdateBusinessUnit = this.authorize(AXPOrganizationManagementPermissionKeys.BusinessUnit.Update);\n const canDeleteBusinessUnit = this.authorize(AXPOrganizationManagementPermissionKeys.BusinessUnit.Delete);\n const canViewPosition = this.authorize(AXPOrganizationManagementPermissionKeys.Position.View);\n const canCreateTeam = this.authorize(AXPOrganizationManagementPermissionKeys.Team.Create);\n\n const buTypeRows = await this.loadBusinessUnitTypes();\n const addNewBuKey = orgChartNodeActionKey('add-new-bu-with-type');\n const addBuActions: AXMOrgChartNodeMenuAction[] = await Promise.all(\n buTypeRows.map(async (row, index) => ({\n id: `organization-management.add-bu-type.${row.id}`,\n title: await this.menuTitleDualLocale(addNewBuKey, { type: row.title }),\n nestedInAddFlyout: true,\n icon: 'fa-light fa-sitemap',\n order: 10 + index,\n disabled: !canCreateBusinessUnit,\n break: hasPositionRowAfterBuTypes && index === buTypeRows.length - 1 && buTypeRows.length > 0 ? 'after' : undefined,\n execute: async () => {\n await this.commandService.execute(\n AXMOrganizationManagementCommandKeys.OrganizationChart.AddBusinessUnitToBusinessUnit,\n { parentBusinessUnitId: parentId, typeId: row.id },\n );\n await context.refreshChart();\n },\n })),\n );\n\n const addPositionToBuAction: AXMOrgChartNodeMenuAction | null =\n context.nodeKind === 'business-unit' && businessUnitId && typeAllowsDirectPositions\n ? {\n id: 'organization-management.add-position-to-business-unit',\n title: orgChartNodeActionKey('add-new-position'),\n nestedInAddFlyout: true,\n icon: 'fa-light fa-briefcase',\n order: 10 + buTypeRows.length,\n disabled: !canUpdateBusinessUnit || !canViewPosition,\n execute: async () => {\n const result = await this.commandService.execute(\n AXMOrganizationManagementCommandKeys.OrganizationChart.AddPositionToBusinessUnit,\n { businessUnitId },\n );\n if (result?.success) {\n await context.refreshChart();\n }\n },\n }\n : null;\n\n const addNewTeamToBuAction: AXMOrgChartNodeMenuAction | null =\n context.nodeKind === 'business-unit' && businessUnitId\n ? {\n id: 'organization-management.org-chart.add-new-team',\n title: orgChartNodeActionKey('add-new-team'),\n nestedInAddFlyout: true,\n icon: 'fa-light fa-people-group',\n order: 10 + buTypeRows.length + (addPositionToBuAction ? 1 : 0),\n disabled: !canCreateTeam,\n execute: async () => {\n const result = await this.commandService.execute(\n AXMOrganizationManagementCommandKeys.OrganizationChart.AddTeamToBusinessUnit,\n { businessUnitId },\n );\n if (result?.success) {\n await context.refreshChart();\n }\n },\n }\n : null;\n\n const removeBuActions: AXMOrgChartNodeMenuAction[] =\n context.nodeKind === 'business-unit'\n ? [\n {\n id: 'organization-management.remove-bu',\n title: orgChartNodeActionKey('remove'),\n icon: 'fa-light fa-trash',\n color: 'danger',\n order: 120,\n break: 'before',\n disabled: !canDeleteBusinessUnit || !businessUnitId,\n execute: async () => {\n await this.workflowService.execute('delete-entity', {\n entity: RootConfig.entities.businessUnit.source,\n data: { id: businessUnitId },\n options: { process: { showResult: true } },\n });\n await context.refreshChart();\n },\n },\n ]\n : [];\n\n return [\n ...addBuActions,\n ...(addPositionToBuAction ? [addPositionToBuAction] : []),\n ...(addNewTeamToBuAction ? [addNewTeamToBuAction] : []),\n ...removeBuActions,\n ];\n }\n\n //#endregion\n\n //#region ---- Authorization ----\n\n private authorize(permission: string): boolean {\n return this.sessionService.authorize(permission);\n }\n\n //#endregion\n\n //#region ---- Menu Labels ----\n\n /**\n * Resolves copy for menu rows: nested `translate` bindings do not pass interpolation params into the pipe;\n * use per-locale strings via {@link createMultiLanguageString}.\n *\n * TODO: Remove this dual-locale pre-resolution once we can pass interpolation params through\n * {@link AXPMultiLanguageString} and/or the menu `translate` pipe (see `@acorex/components/menu` item template).\n */\n private async menuTitleDualLocale(\n key: string,\n params: Record<string, string | number>,\n ): Promise<ReturnType<typeof createMultiLanguageString>> {\n const [enUs, faIr] = await Promise.all([\n this.translationService.translateAsync(key, { lang: 'en-US', params }),\n this.translationService.translateAsync(key, { lang: 'fa-IR', params }),\n ]);\n return createMultiLanguageString(enUs, faIr);\n }\n\n //#endregion\n\n //#region ---- Business Unit Types ----\n\n /**\n * Resolves whether the BU's type allows direct positions (metadata from chart, nested type, or type lookup).\n */\n private async resolveTypeAllowsDirectPositions(\n context: AXMOrgChartNodeContributionContext,\n businessUnitId: string,\n ): Promise<boolean> {\n const fromMeta = context.node.metadata?.['typeAllowsDirectPositions'];\n if (typeof fromMeta === 'boolean') {\n return fromMeta;\n }\n try {\n const bu = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.businessUnit.name)\n .data()\n .byKey(businessUnitId);\n const row = bu as { type?: { allowsDirectPositions?: boolean }; typeId?: string } | null;\n const nested = row?.type?.allowsDirectPositions;\n if (typeof nested === 'boolean') {\n return nested;\n }\n const typeId = row?.typeId?.trim();\n if (typeId) {\n const ty = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.businessUnitType.name)\n .data()\n .byKey(typeId);\n return (ty as { allowsDirectPositions?: boolean } | null)?.allowsDirectPositions !== false;\n }\n } catch {\n // fall through\n }\n return true;\n }\n\n private async loadBusinessUnitTypes(): Promise<Array<{ id: string; title: string }>> {\n try {\n const result = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.businessUnitType.name)\n .data()\n .query({\n skip: 0,\n take: 500,\n sort: [{ field: 'title', dir: 'asc' }],\n });\n const items = (result.items ?? []) as Array<{ id: string; title?: unknown; name?: string }>;\n return items\n .map((row) => {\n const id = String(row.id ?? '');\n const title = this.resolveBusinessUnitTypeLabel(row);\n return { id, title: title || (row.name ?? '').trim() || id };\n })\n .filter((row) => row.id.length > 0);\n } catch {\n return [];\n }\n }\n\n /**\n * API rows use {@link AXPMultiLanguageString} for `title`; treating it as a string breaks `.trim()` and drops all types.\n */\n private resolveBusinessUnitTypeLabel(row: { title?: unknown; name?: string }): string {\n const raw = row.title;\n if (raw == null) {\n return '';\n }\n if (typeof raw === 'string') {\n return raw.trim();\n }\n return resolveMultiLanguageString(raw as AXPMultiLanguageString, this.localeId).trim();\n }\n\n //#endregion\n\n //#region ---- Node Metadata ----\n\n private resolveBusinessUnitId(context: AXMOrgChartNodeContributionContext): string | undefined {\n if (context.nodeKind === 'business-unit') {\n return (\n context.node.entity?.id ??\n (context.node.metadata?.['businessUnitId'] as string | undefined) ??\n (context.node.metadata?.['unitId'] as string | undefined)\n );\n }\n return context.node.metadata?.['businessUnitId'] as string | undefined;\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA;AAkBA;AAEA;AAEA,MAAM,qBAAqB,GAAG,CAAC,MAAc,KAC3C,CAAA,yDAAA,EAA4D,MAAM,CAAA,CAAE;AAEtE;MAGa,0CAA0C,CAAA;AADvD,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC5C,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;AAC5B,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAqPnE,IAAA;;;IA/OC,MAAM,cAAc,CAAC,OAA2C,EAAA;AAC9D,QAAA,IAAI,OAAO,CAAC,QAAQ,KAAK,cAAc,IAAI,OAAO,CAAC,QAAQ,KAAK,eAAe,EAAE;AAC/E,YAAA,OAAO,EAAE;QACX;QAEA,MAAM,cAAc,GAAG,IAAI,CA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AAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAA1C,0CAA0C,EAAA,CAAA,CAAA;;2FAA1C,0CAA0C,EAAA,UAAA,EAAA,CAAA;kBADtD;;;;;"}
|
|
@@ -5,7 +5,7 @@ import { AXPEntityDefinitionRegistryService, AXPEntityDataSelectorService } from
|
|
|
5
5
|
import { AXPCommandService } from '@acorex/platform/runtime';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
7
|
import { inject, Injectable } from '@angular/core';
|
|
8
|
-
import { R as RootConfig, l as axmResolveOrgChartFlyoutEmployeeId, g as AXPOrganizationManagementPermissionKeys, m as AXM_ORG_CHART_EMPLOYEE_SUBMENU_ICON, o as AXM_ORG_CHART_EMPLOYEE_SUBMENU_TITLE_I18N_KEY, e as AXM_ORG_CHART_EMPLOYEE_SUBMENU_GROUP_ID } from './acorex-modules-organization-management-acorex-modules-organization-management-
|
|
8
|
+
import { R as RootConfig, l as axmResolveOrgChartFlyoutEmployeeId, g as AXPOrganizationManagementPermissionKeys, m as AXM_ORG_CHART_EMPLOYEE_SUBMENU_ICON, o as AXM_ORG_CHART_EMPLOYEE_SUBMENU_TITLE_I18N_KEY, e as AXM_ORG_CHART_EMPLOYEE_SUBMENU_GROUP_ID } from './acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs';
|
|
9
9
|
|
|
10
10
|
//#region ---- Imports ----
|
|
11
11
|
//#endregion
|
|
@@ -178,4 +178,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
178
178
|
}] });
|
|
179
179
|
|
|
180
180
|
export { AXMOrgChartEmployeeFlyoutContributionProvider };
|
|
181
|
-
//# sourceMappingURL=acorex-modules-organization-management-org-chart-employee-flyout-contribution.provider-
|
|
181
|
+
//# sourceMappingURL=acorex-modules-organization-management-org-chart-employee-flyout-contribution.provider-CsvhhcoW.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-modules-organization-management-org-chart-employee-flyout-contribution.provider-DSvij02R.mjs","sources":["../../../../libs/modules/organization-management/src/lib/features/organization-chart/contributions/org-chart-employee-flyout-contribution.provider.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXDialogService } from '@acorex/components/dialog';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPSessionService } from '@acorex/platform/auth';\nimport { AXPEntityDataSelectorService, AXPEntityDefinitionRegistryService } from '@acorex/platform/layout/entity';\nimport { AXPCommandService } from '@acorex/platform/runtime';\nimport { inject, Injectable } from '@angular/core';\nimport { RootConfig } from '../../../contracts';\nimport { AXPOrganizationManagementPermissionKeys } from '../../../contracts/permission.keys';\nimport {\n AXM_ORG_CHART_EMPLOYEE_SUBMENU_GROUP_ID,\n AXM_ORG_CHART_EMPLOYEE_SUBMENU_ICON,\n AXM_ORG_CHART_EMPLOYEE_SUBMENU_TITLE_I18N_KEY,\n} from '../constants/org-chart-employee-submenu.const';\nimport {\n AXMOrgChartNodeContributionContext,\n AXMOrgChartNodeContributionProvider,\n AXMOrgChartNodeMenuAction,\n} from '../tokens/org-chart-node-contribution.token';\nimport { axmResolveOrgChartFlyoutEmployeeId } from '../utils/org-chart-resolve-flyout-employee-id.util';\n\n//#endregion\n\n//#region ---- Constants ----\n\nconst actionKey = (suffix: string): string =>\n `@organization-management:organization-chart.node-actions.${suffix}`;\n\nconst HCM_EMPLOYEE_MODULE = 'HumanCapitalManagement';\nconst HCM_EMPLOYEE_NAME = 'Employee';\nconst HCM_EMPLOYEE_SOURCE = `${HCM_EMPLOYEE_MODULE}.${HCM_EMPLOYEE_NAME}`;\n\nconst employeeViewPermission = 'HumanCapitalManagement:Permission:Employee.View';\n\n//#endregion\n\n/**\n * **Employee** context-submenu: open employee record (`Entity:OpenDetails`), HR placeholders, schedule, add-to-team — plus chat/email from extensions.\n * Shown for {@link AXMOrgChartNodeKind} `employee` and for company / business unit / filled position when an\n * assigned person id is available; hidden when head or top role is vacant.\n */\n@Injectable()\nexport class AXMOrgChartEmployeeFlyoutContributionProvider implements AXMOrgChartNodeContributionProvider {\n //#region ---- Services & Dependencies ----\n\n private readonly commandService = inject(AXPCommandService);\n private readonly sessionService = inject(AXPSessionService);\n private readonly dialogService = inject(AXDialogService);\n private readonly translationService = inject(AXTranslationService);\n private readonly entityRegistry = inject(AXPEntityDefinitionRegistryService);\n private readonly entityDataSelector = inject(AXPEntityDataSelectorService);\n\n private readonly teamMemberEntityInfo = {\n module: RootConfig.module.name,\n name: RootConfig.entities.teamMember.name,\n title: RootConfig.entities.teamMember.title,\n };\n\n //#endregion\n\n //#region ---- AXMOrgChartNodeContributionProvider ----\n\n async getMenuActions(context: AXMOrgChartNodeContributionContext): Promise<AXMOrgChartNodeMenuAction[]> {\n const employeeId = axmResolveOrgChartFlyoutEmployeeId(context);\n if (!employeeId) {\n return [];\n }\n return this.buildFlyoutActions(context, employeeId);\n }\n\n //#endregion\n\n //#region ---- Flyout actions ----\n\n private buildFlyoutActions(\n context: AXMOrgChartNodeContributionContext,\n employeeId: string,\n ): AXMOrgChartNodeMenuAction[] {\n void context;\n const canViewEmployee = this.authorize(employeeViewPermission);\n const canTeam = this.authorize(AXPOrganizationManagementPermissionKeys.Team.Create);\n\n return [\n this.withEmployeeSubmenu({\n id: 'organization-management.org-chart.open-employee-details',\n title: actionKey('open'),\n icon: 'fa-light fa-arrow-up-right-from-square',\n order: 35,\n disabled: !canViewEmployee,\n execute: async () => {\n await this.commandService.execute('Entity:OpenDetails', {\n entity: HCM_EMPLOYEE_SOURCE,\n data: { id: employeeId },\n });\n },\n }),\n this.withEmployeeSubmenu({\n id: 'organization-management.org-chart.hr-transfer',\n title: actionKey('hr-workflow-transfer'),\n icon: 'fa-light fa-right-left',\n order: 60,\n submenuSectionBreak: true,\n execute: async () => {\n await this.showPlaceholder(\n actionKey('placeholders.hr-workflow.title'),\n actionKey('placeholders.hr-workflow.transfer'),\n );\n },\n }),\n this.withEmployeeSubmenu({\n id: 'organization-management.org-chart.hr-promotion',\n title: actionKey('hr-workflow-promotion'),\n icon: 'fa-light fa-arrow-trend-up',\n order: 61,\n execute: async () => {\n await this.showPlaceholder(\n actionKey('placeholders.hr-workflow.title'),\n actionKey('placeholders.hr-workflow.promotion'),\n );\n },\n }),\n this.withEmployeeSubmenu({\n id: 'organization-management.org-chart.hr-offboarding',\n title: actionKey('hr-workflow-offboarding'),\n icon: 'fa-light fa-door-open',\n order: 62,\n execute: async () => {\n await this.showPlaceholder(\n actionKey('placeholders.hr-workflow.title'),\n actionKey('placeholders.hr-workflow.offboarding'),\n );\n },\n }),\n this.withEmployeeSubmenu({\n id: 'organization-management.org-chart.schedule-meeting',\n title: actionKey('schedule-meeting'),\n icon: 'fa-light fa-calendar-plus',\n order: 70,\n submenuSectionBreak: true,\n execute: async () => {\n await this.showPlaceholder(\n actionKey('placeholders.schedule-meeting.title'),\n actionKey('placeholders.schedule-meeting.message'),\n );\n },\n }),\n this.withEmployeeSubmenu({\n id: 'organization-management.org-chart.add-to-team',\n title: actionKey('add-to-team'),\n icon: 'fa-light fa-user-plus',\n order: 75,\n /** Trailing group break: separator after the Employee row on the root menu (inner last-row break is normalized away). */\n break: 'after',\n disabled: !canTeam,\n execute: async (ctx) => {\n await this.openTeamSelectorThenCreateTeamMember(ctx, employeeId);\n },\n }),\n ];\n }\n\n /**\n * Picks a team via {@link AXPEntityDataSelectorService}, then opens **Create Team Member** with both `teamId` and\n * `employeeId` set.\n */\n private async openTeamSelectorThenCreateTeamMember(\n ctx: AXMOrgChartNodeContributionContext,\n employeeId: string,\n ): Promise<void> {\n const teamEntity = await this.entityRegistry.resolve(RootConfig.module.name, RootConfig.entities.team.name);\n if (!teamEntity) {\n return;\n }\n const title = await this.translationService.translateAsync(actionKey('add-to-team-select-team'));\n const pick = await this.entityDataSelector.open({\n entity: teamEntity,\n title,\n allowMultiple: false,\n });\n const teamId = pick?.items?.[0]?.id;\n if (teamId == null || String(teamId).trim().length === 0) {\n return;\n }\n\n const result = await this.commandService.execute('Entity:Create', {\n __context__: {\n entity: RootConfig.entities.teamMember.source,\n entityInfo: this.teamMemberEntityInfo,\n data: { employeeId, teamId: String(teamId).trim() },\n options: {\n process: {\n redirect: false,\n },\n },\n },\n });\n if (result?.success) {\n await ctx.refreshChart();\n }\n }\n\n private withEmployeeSubmenu(\n action: AXMOrgChartNodeMenuAction,\n ): AXMOrgChartNodeMenuAction {\n return {\n ...action,\n submenuGroupId: AXM_ORG_CHART_EMPLOYEE_SUBMENU_GROUP_ID,\n submenuGroupTitle: AXM_ORG_CHART_EMPLOYEE_SUBMENU_TITLE_I18N_KEY,\n submenuGroupIcon: AXM_ORG_CHART_EMPLOYEE_SUBMENU_ICON,\n };\n }\n\n //#endregion\n\n //#region ---- Resolvers ----\n\n private authorize(permission: string): boolean {\n return this.sessionService.authorize(permission);\n }\n\n private async showPlaceholder(titleKey: string, messageKey: string): Promise<void> {\n const title = await this.translationService.translateAsync(titleKey);\n const message = await this.translationService.translateAsync(messageKey);\n await this.dialogService.alert(title, message, 'primary');\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA;AAsBA;AAEA;AAEA,MAAM,SAAS,GAAG,CAAC,MAAc,KAC/B,CAAA,yDAAA,EAA4D,MAAM,CAAA,CAAE;AAEtE,MAAM,mBAAmB,GAAG,wBAAwB;AACpD,MAAM,iBAAiB,GAAG,UAAU;AACpC,MAAM,mBAAmB,GAAG,CAAA,EAAG,mBAAmB,CAAA,CAAA,EAAI,iBAAiB,EAAE;AAEzE,MAAM,sBAAsB,GAAG,iDAAiD;AAEhF;AAEA;;;;AAIG;MAEU,6CAA6C,CAAA;AAD1D,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM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,kBAAkB,CAAC,cAAc,CAAC,UAAU,CAAC;AACxE,QAAA,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,CAAC;IAC3D;8GAtLW,6CAA6C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAA7C,6CAA6C,EAAA,CAAA,CAAA;;2FAA7C,6CAA6C,EAAA,UAAA,EAAA,CAAA;kBADzD;;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-modules-organization-management-org-chart-employee-flyout-contribution.provider-CsvhhcoW.mjs","sources":["../../../../libs/modules/organization-management/src/lib/features/organization-chart/contributions/org-chart-employee-flyout-contribution.provider.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXDialogService } from '@acorex/components/dialog';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPSessionService } from '@acorex/platform/auth';\nimport { AXPEntityDataSelectorService, AXPEntityDefinitionRegistryService } from '@acorex/platform/layout/entity';\nimport { AXPCommandService } from '@acorex/platform/runtime';\nimport { inject, Injectable } from '@angular/core';\nimport { RootConfig } from '../../../contracts';\nimport { AXPOrganizationManagementPermissionKeys } from '../../../contracts/permission.keys';\nimport {\n AXM_ORG_CHART_EMPLOYEE_SUBMENU_GROUP_ID,\n AXM_ORG_CHART_EMPLOYEE_SUBMENU_ICON,\n AXM_ORG_CHART_EMPLOYEE_SUBMENU_TITLE_I18N_KEY,\n} from '../constants/org-chart-employee-submenu.const';\nimport {\n AXMOrgChartNodeContributionContext,\n AXMOrgChartNodeContributionProvider,\n AXMOrgChartNodeMenuAction,\n} from '../tokens/org-chart-node-contribution.token';\nimport { axmResolveOrgChartFlyoutEmployeeId } from '../utils/org-chart-resolve-flyout-employee-id.util';\n\n//#endregion\n\n//#region ---- Constants ----\n\nconst actionKey = (suffix: string): string =>\n `@organization-management:organization-chart.node-actions.${suffix}`;\n\nconst HCM_EMPLOYEE_MODULE = 'HumanCapitalManagement';\nconst HCM_EMPLOYEE_NAME = 'Employee';\nconst HCM_EMPLOYEE_SOURCE = `${HCM_EMPLOYEE_MODULE}.${HCM_EMPLOYEE_NAME}`;\n\nconst employeeViewPermission = 'HumanCapitalManagement:Permission:Employee.View';\n\n//#endregion\n\n/**\n * **Employee** context-submenu: open employee record (`Entity:OpenDetails`), HR placeholders, schedule, add-to-team — plus chat/email from extensions.\n * Shown for {@link AXMOrgChartNodeKind} `employee` and for company / business unit / filled position when an\n * assigned person id is available; hidden when head or top role is vacant.\n */\n@Injectable()\nexport class AXMOrgChartEmployeeFlyoutContributionProvider implements AXMOrgChartNodeContributionProvider {\n //#region ---- Services & Dependencies ----\n\n private readonly commandService = inject(AXPCommandService);\n private readonly sessionService = inject(AXPSessionService);\n private readonly dialogService = inject(AXDialogService);\n private readonly translationService = inject(AXTranslationService);\n private readonly entityRegistry = inject(AXPEntityDefinitionRegistryService);\n private readonly entityDataSelector = inject(AXPEntityDataSelectorService);\n\n private readonly teamMemberEntityInfo = {\n module: RootConfig.module.name,\n name: RootConfig.entities.teamMember.name,\n title: RootConfig.entities.teamMember.title,\n };\n\n //#endregion\n\n //#region ---- AXMOrgChartNodeContributionProvider ----\n\n async getMenuActions(context: AXMOrgChartNodeContributionContext): Promise<AXMOrgChartNodeMenuAction[]> {\n const employeeId = axmResolveOrgChartFlyoutEmployeeId(context);\n if (!employeeId) {\n return [];\n }\n return this.buildFlyoutActions(context, employeeId);\n }\n\n //#endregion\n\n //#region ---- Flyout actions ----\n\n private buildFlyoutActions(\n context: AXMOrgChartNodeContributionContext,\n employeeId: string,\n ): AXMOrgChartNodeMenuAction[] {\n void context;\n const canViewEmployee = this.authorize(employeeViewPermission);\n const canTeam = this.authorize(AXPOrganizationManagementPermissionKeys.Team.Create);\n\n return [\n this.withEmployeeSubmenu({\n id: 'organization-management.org-chart.open-employee-details',\n title: actionKey('open'),\n icon: 'fa-light fa-arrow-up-right-from-square',\n order: 35,\n disabled: !canViewEmployee,\n execute: async () => {\n await this.commandService.execute('Entity:OpenDetails', {\n entity: HCM_EMPLOYEE_SOURCE,\n data: { id: employeeId },\n });\n },\n }),\n this.withEmployeeSubmenu({\n id: 'organization-management.org-chart.hr-transfer',\n title: actionKey('hr-workflow-transfer'),\n icon: 'fa-light fa-right-left',\n order: 60,\n submenuSectionBreak: true,\n execute: async () => {\n await this.showPlaceholder(\n actionKey('placeholders.hr-workflow.title'),\n actionKey('placeholders.hr-workflow.transfer'),\n );\n },\n }),\n this.withEmployeeSubmenu({\n id: 'organization-management.org-chart.hr-promotion',\n title: actionKey('hr-workflow-promotion'),\n icon: 'fa-light fa-arrow-trend-up',\n order: 61,\n execute: async () => {\n await this.showPlaceholder(\n actionKey('placeholders.hr-workflow.title'),\n actionKey('placeholders.hr-workflow.promotion'),\n );\n },\n }),\n this.withEmployeeSubmenu({\n id: 'organization-management.org-chart.hr-offboarding',\n title: actionKey('hr-workflow-offboarding'),\n icon: 'fa-light fa-door-open',\n order: 62,\n execute: async () => {\n await this.showPlaceholder(\n actionKey('placeholders.hr-workflow.title'),\n actionKey('placeholders.hr-workflow.offboarding'),\n );\n },\n }),\n this.withEmployeeSubmenu({\n id: 'organization-management.org-chart.schedule-meeting',\n title: actionKey('schedule-meeting'),\n icon: 'fa-light fa-calendar-plus',\n order: 70,\n submenuSectionBreak: true,\n execute: async () => {\n await this.showPlaceholder(\n actionKey('placeholders.schedule-meeting.title'),\n actionKey('placeholders.schedule-meeting.message'),\n );\n },\n }),\n this.withEmployeeSubmenu({\n id: 'organization-management.org-chart.add-to-team',\n title: actionKey('add-to-team'),\n icon: 'fa-light fa-user-plus',\n order: 75,\n /** Trailing group break: separator after the Employee row on the root menu (inner last-row break is normalized away). */\n break: 'after',\n disabled: !canTeam,\n execute: async (ctx) => {\n await this.openTeamSelectorThenCreateTeamMember(ctx, employeeId);\n },\n }),\n ];\n }\n\n /**\n * Picks a team via {@link AXPEntityDataSelectorService}, then opens **Create Team Member** with both `teamId` and\n * `employeeId` set.\n */\n private async openTeamSelectorThenCreateTeamMember(\n ctx: AXMOrgChartNodeContributionContext,\n employeeId: string,\n ): Promise<void> {\n const teamEntity = await this.entityRegistry.resolve(RootConfig.module.name, RootConfig.entities.team.name);\n if (!teamEntity) {\n return;\n }\n const title = await this.translationService.translateAsync(actionKey('add-to-team-select-team'));\n const pick = await this.entityDataSelector.open({\n entity: teamEntity,\n title,\n allowMultiple: false,\n });\n const teamId = pick?.items?.[0]?.id;\n if (teamId == null || String(teamId).trim().length === 0) {\n return;\n }\n\n const result = await this.commandService.execute('Entity:Create', {\n __context__: {\n entity: RootConfig.entities.teamMember.source,\n entityInfo: this.teamMemberEntityInfo,\n data: { employeeId, teamId: String(teamId).trim() },\n options: {\n process: {\n redirect: false,\n },\n },\n },\n });\n if (result?.success) {\n await ctx.refreshChart();\n }\n }\n\n private withEmployeeSubmenu(\n action: AXMOrgChartNodeMenuAction,\n ): AXMOrgChartNodeMenuAction {\n return {\n ...action,\n submenuGroupId: AXM_ORG_CHART_EMPLOYEE_SUBMENU_GROUP_ID,\n submenuGroupTitle: AXM_ORG_CHART_EMPLOYEE_SUBMENU_TITLE_I18N_KEY,\n submenuGroupIcon: AXM_ORG_CHART_EMPLOYEE_SUBMENU_ICON,\n };\n }\n\n //#endregion\n\n //#region ---- Resolvers ----\n\n private authorize(permission: string): boolean {\n return this.sessionService.authorize(permission);\n }\n\n private async showPlaceholder(titleKey: string, messageKey: string): Promise<void> {\n const title = await this.translationService.translateAsync(titleKey);\n const message = await this.translationService.translateAsync(messageKey);\n await this.dialogService.alert(title, message, 'primary');\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA;AAsBA;AAEA;AAEA,MAAM,SAAS,GAAG,CAAC,MAAc,KAC/B,CAAA,yDAAA,EAA4D,MAAM,CAAA,CAAE;AAEtE,MAAM,mBAAmB,GAAG,wBAAwB;AACpD,MAAM,iBAAiB,GAAG,UAAU;AACpC,MAAM,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6CAA6C;AAChE,YAAA,gBAAgB,EAAE,mCAAmC;SACtD;IACH;;;AAMQ,IAAA,SAAS,CAAC,UAAkB,EAAA;QAClC,OAAO,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,UAAU,CAAC;IAClD;AAEQ,IAAA,MAAM,eAAe,CAAC,QAAgB,EAAE,UAAkB,EAAA;QAChE,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,QAAQ,CAAC;QACpE,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,UAAU,CAAC;AACxE,QAAA,MAAM,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,CAAC;IAC3D;8GAtLW,6CAA6C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAA7C,6CAA6C,EAAA,CAAA,CAAA;;2FAA7C,6CAA6C,EAAA,UAAA,EAAA,CAAA;kBADzD;;;;;"}
|
|
@@ -2,7 +2,7 @@ import { AXPSessionService } from '@acorex/platform/auth';
|
|
|
2
2
|
import { AXPCommandService } from '@acorex/platform/runtime';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { inject, Injectable } from '@angular/core';
|
|
5
|
-
import { R as RootConfig, g as AXPOrganizationManagementPermissionKeys, k as AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND, j as AXMOrganizationManagementCommandKeys } from './acorex-modules-organization-management-acorex-modules-organization-management-
|
|
5
|
+
import { R as RootConfig, g as AXPOrganizationManagementPermissionKeys, k as AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND, j as AXMOrganizationManagementCommandKeys } from './acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs';
|
|
6
6
|
|
|
7
7
|
//#region ---- Imports ----
|
|
8
8
|
//#endregion
|
|
@@ -166,4 +166,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
166
166
|
}] });
|
|
167
167
|
|
|
168
168
|
export { AXMOrgChartPositionEmployeeNodeContributionProvider };
|
|
169
|
-
//# sourceMappingURL=acorex-modules-organization-management-org-chart-position-employee-node-contribution.provider-
|
|
169
|
+
//# sourceMappingURL=acorex-modules-organization-management-org-chart-position-employee-node-contribution.provider-Dvo2XEHn.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-modules-organization-management-org-chart-position-employee-node-contribution.provider-BYWq-Aco.mjs","sources":["../../../../libs/modules/organization-management/src/lib/features/organization-chart/contributions/org-chart-position-employee-node-contribution.provider.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPSessionService } from '@acorex/platform/auth';\nimport { AXPCommandService } from '@acorex/platform/runtime';\nimport { inject, Injectable } from '@angular/core';\nimport {\n AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND,\n AXMOrganizationManagementCommandKeys,\n} from '../../../contracts/commands.keys';\nimport { RootConfig } from '../../../contracts';\nimport { AXPOrganizationManagementPermissionKeys } from '../../../contracts/permission.keys';\nimport {\n AXMOrgChartNodeContributionContext,\n AXMOrgChartNodeContributionProvider,\n AXMOrgChartNodeMenuAction,\n} from '../tokens/org-chart-node-contribution.token';\n\n//#endregion\n\n//#region ---- Module Constants ----\n\nconst orgChartNodeActionKey = (suffix: string): string =>\n `@organization-management:organization-chart.node-actions.${suffix}`;\n\nconst POSITION_ENTITY_SOURCE = RootConfig.entities.position.source;\n\nconst positionAssignmentCreatePermission = 'HumanCapitalManagement:Permission:PositionAssignment.Create';\nconst positionAssignmentEditPermission = 'HumanCapitalManagement:Permission:PositionAssignment.Edit';\n\n//#endregion\n\n/**\n * Context menu actions for org chart **position** nodes (structure / location / etc.).\n */\n@Injectable()\nexport class AXMOrgChartPositionEmployeeNodeContributionProvider implements AXMOrgChartNodeContributionProvider {\n //#region ---- Services & Dependencies ----\n\n private readonly commandService = inject(AXPCommandService);\n private readonly sessionService = inject(AXPSessionService);\n\n //#endregion\n\n //#region ---- AXMOrgChartNodeContributionProvider Implementation ----\n\n async getMenuActions(context: AXMOrgChartNodeContributionContext): Promise<AXMOrgChartNodeMenuAction[]> {\n if (context.nodeKind === 'position') {\n return this.getPositionNodeActions(context);\n }\n return [];\n }\n\n //#endregion\n\n //#region ---- Position Node Actions ----\n\n private getPositionNodeActions(context: AXMOrgChartNodeContributionContext): AXMOrgChartNodeMenuAction[] {\n const positionId = this.resolvePositionId(context);\n if (!positionId) {\n return [];\n }\n\n const businessUnitId = this.resolveBusinessUnitIdForPosition(context);\n const vacant = context.node.metadata?.['vacant'] === true;\n const occupant = context.node.metadata?.['occupant'] as Record<string, unknown> | undefined;\n const occupantEmployeeId =\n typeof occupant?.['employeeId'] === 'string' && occupant['employeeId'].trim().length > 0\n ? occupant['employeeId'].trim()\n : undefined;\n\n const canUpdateBusinessUnit = this.authorize(AXPOrganizationManagementPermissionKeys.BusinessUnit.Update);\n const canCreateAssignment = this.authorize(positionAssignmentCreatePermission);\n const canEditAssignment = this.authorize(positionAssignmentEditPermission);\n\n const actions: AXMOrgChartNodeMenuAction[] = [];\n\n if (vacant && businessUnitId) {\n actions.push({\n id: 'organization-management.assign-employee-to-position-from-chart',\n title: orgChartNodeActionKey('assign-employee-to-position'),\n icon: 'fa-light fa-user-plus',\n order: 110,\n disabled: !canCreateAssignment,\n execute: async (ctx) => {\n const pid = this.resolvePositionId(ctx);\n const buId = this.resolveBusinessUnitIdForPosition(ctx);\n if (!pid || !buId) {\n return;\n }\n const result = await this.commandService.execute(AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND, {\n data: {\n businessUnitId: buId,\n positionId: pid,\n isPrimary: false,\n },\n });\n if (result?.success) {\n await ctx.refreshChart();\n }\n },\n });\n }\n\n if (!vacant && occupantEmployeeId && businessUnitId) {\n actions.push({\n id: 'organization-management.replace-position-assignee-from-chart',\n title: orgChartNodeActionKey('assign-new-employee-to-position'),\n icon: 'fa-light fa-arrows-rotate',\n order: 115,\n disabled: !canCreateAssignment || !canEditAssignment,\n execute: async (ctx) => {\n const pid = this.resolvePositionId(ctx);\n const buId = this.resolveBusinessUnitIdForPosition(ctx);\n const occ = ctx.node.metadata?.['occupant'] as Record<string, unknown> | undefined;\n const eid =\n typeof occ?.['employeeId'] === 'string' && occ['employeeId'].trim().length > 0\n ? occ['employeeId'].trim()\n : '';\n if (!pid || !buId || !eid) {\n return;\n }\n const result = await this.commandService.execute(\n AXMOrganizationManagementCommandKeys.OrganizationChart.ReplacePositionAssignee,\n { businessUnitId: buId, positionId: pid, currentEmployeeId: eid },\n );\n if (result?.success) {\n await ctx.refreshChart();\n }\n },\n });\n }\n\n if (businessUnitId) {\n actions.push({\n id: 'organization-management.remove-position-from-unit-from-chart',\n title: orgChartNodeActionKey('remove-from-unit'),\n icon: 'fa-light fa-link-slash',\n color: 'danger',\n order: 120,\n disabled: !canUpdateBusinessUnit,\n execute: async (ctx) => {\n const pid = this.resolvePositionId(ctx);\n const buId = this.resolveBusinessUnitIdForPosition(ctx);\n if (!pid || !buId) {\n return;\n }\n const occ = ctx.node.metadata?.['occupant'] as Record<string, unknown> | undefined;\n const occId =\n typeof occ?.['employeeId'] === 'string' && occ['employeeId'].trim().length > 0\n ? occ['employeeId'].trim()\n : undefined;\n const result = await this.commandService.execute(\n AXMOrganizationManagementCommandKeys.OrganizationChart.RemovePositionFromBusinessUnit,\n {\n businessUnitId: buId,\n positionId: pid,\n ...(occId ? { occupantEmployeeId: occId } : {}),\n },\n );\n if (result?.success) {\n await ctx.refreshChart();\n }\n },\n });\n }\n\n return actions;\n }\n\n //#endregion\n\n //#region ---- Resolvers & Authorization ----\n\n private authorize(permission: string): boolean {\n return this.sessionService.authorize(permission);\n }\n\n private resolvePositionId(context: AXMOrgChartNodeContributionContext): string | undefined {\n const entity = context.node.entity;\n if (entity?.id != null && this.isPositionEntityType(entity.type)) {\n const id = String(entity.id).trim();\n return id.length > 0 ? id : undefined;\n }\n const metaPid = context.node.metadata?.['positionId'];\n if (typeof metaPid === 'string' && metaPid.trim().length > 0) {\n return metaPid.trim();\n }\n return undefined;\n }\n\n private isPositionEntityType(entityType: string | undefined): boolean {\n if (!entityType || typeof entityType !== 'string') {\n return false;\n }\n return entityType === POSITION_ENTITY_SOURCE || entityType.endsWith('.Position');\n }\n\n private resolveBusinessUnitIdForPosition(context: AXMOrgChartNodeContributionContext): string | undefined {\n const meta = context.node.metadata ?? {};\n const a = meta['businessUnitId'];\n const b = meta['organizationalUnitId'];\n const raw = (typeof a === 'string' && a.trim().length > 0 ? a : typeof b === 'string' ? b : '') as string;\n const id = String(raw).trim();\n return id.length > 0 ? id : undefined;\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;AAAA;AAiBA;AAEA;AAEA,MAAM,qBAAqB,GAAG,CAAC,MAAc,KAC3C,CAAA,yDAAA,EAA4D,MAAM,CAAA,CAAE;AAEtE,MAAM,sBAAsB,GAAG,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM;AAElE,MAAM,kCAAkC,GAAG,6DAA6D;AACxG,MAAM,gCAAgC,GAAG,2DAA2D;AAEpG;AAEA;;AAEG;MAEU,mDAAmD,CAAA;AADhE,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAwK5D,IAAA;;;IAlKC,MAAM,cAAc,CAAC,OAA2C,EAAA;AAC9D,QAAA,IAAI,OAAO,CAAC,QAAQ,KAAK,UAAU,EAAE;AACnC,YAAA,OAAO,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC;QAC7C;AACA,QAAA,OAAO,EAAE;IACX;;;AAMQ,IAAA,sBAAsB,CAAC,OAA2C,EAAA;QACxE,MAAM,UAAU,GAAG,IAAI,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,CAAC,QAAQ,CAAC,WAAW,CAAC;IAClF;AAEQ,IAAA,gCAAgC,CAAC,OAA2C,EAAA;QAClF,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,IAAI,EAAE;AACxC,QAAA,MAAM,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC;AAChC,QAAA,MAAM,CAAC,GAAG,IAAI,CAAC,sBAAsB,CAAC;AACtC,QAAA,MAAM,GAAG,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,KAAK,QAAQ,GAAG,CAAC,GAAG,EAAE,CAAW;QACzG,MAAM,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE;AAC7B,QAAA,OAAO,EAAE,CAAC,MAAM,GAAG,CAAC,GAAG,EAAE,GAAG,SAAS;IACvC;8GAzKW,mDAAmD,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAnD,mDAAmD,EAAA,CAAA,CAAA;;2FAAnD,mDAAmD,EAAA,UAAA,EAAA,CAAA;kBAD/D;;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-modules-organization-management-org-chart-position-employee-node-contribution.provider-Dvo2XEHn.mjs","sources":["../../../../libs/modules/organization-management/src/lib/features/organization-chart/contributions/org-chart-position-employee-node-contribution.provider.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPSessionService } from '@acorex/platform/auth';\nimport { AXPCommandService } from '@acorex/platform/runtime';\nimport { inject, Injectable } from '@angular/core';\nimport {\n AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND,\n AXMOrganizationManagementCommandKeys,\n} from '../../../contracts/commands.keys';\nimport { RootConfig } from '../../../contracts';\nimport { AXPOrganizationManagementPermissionKeys } from '../../../contracts/permission.keys';\nimport {\n AXMOrgChartNodeContributionContext,\n AXMOrgChartNodeContributionProvider,\n AXMOrgChartNodeMenuAction,\n} from '../tokens/org-chart-node-contribution.token';\n\n//#endregion\n\n//#region ---- Module Constants ----\n\nconst orgChartNodeActionKey = (suffix: string): string =>\n `@organization-management:organization-chart.node-actions.${suffix}`;\n\nconst POSITION_ENTITY_SOURCE = RootConfig.entities.position.source;\n\nconst positionAssignmentCreatePermission = 'HumanCapitalManagement:Permission:PositionAssignment.Create';\nconst positionAssignmentEditPermission = 'HumanCapitalManagement:Permission:PositionAssignment.Edit';\n\n//#endregion\n\n/**\n * Context menu actions for org chart **position** nodes (structure / location / etc.).\n */\n@Injectable()\nexport class AXMOrgChartPositionEmployeeNodeContributionProvider implements AXMOrgChartNodeContributionProvider {\n //#region ---- Services & Dependencies ----\n\n private readonly commandService = inject(AXPCommandService);\n private readonly sessionService = inject(AXPSessionService);\n\n //#endregion\n\n //#region ---- AXMOrgChartNodeContributionProvider Implementation ----\n\n async getMenuActions(context: AXMOrgChartNodeContributionContext): Promise<AXMOrgChartNodeMenuAction[]> {\n if (context.nodeKind === 'position') {\n return this.getPositionNodeActions(context);\n }\n return [];\n }\n\n //#endregion\n\n //#region ---- Position Node Actions ----\n\n private getPositionNodeActions(context: AXMOrgChartNodeContributionContext): AXMOrgChartNodeMenuAction[] {\n const positionId = this.resolvePositionId(context);\n if (!positionId) {\n return [];\n }\n\n const businessUnitId = this.resolveBusinessUnitIdForPosition(context);\n const vacant = context.node.metadata?.['vacant'] === true;\n const occupant = context.node.metadata?.['occupant'] as Record<string, unknown> | undefined;\n const occupantEmployeeId =\n typeof occupant?.['employeeId'] === 'string' && occupant['employeeId'].trim().length > 0\n ? occupant['employeeId'].trim()\n : undefined;\n\n const canUpdateBusinessUnit = this.authorize(AXPOrganizationManagementPermissionKeys.BusinessUnit.Update);\n const canCreateAssignment = this.authorize(positionAssignmentCreatePermission);\n const canEditAssignment = this.authorize(positionAssignmentEditPermission);\n\n const actions: AXMOrgChartNodeMenuAction[] = [];\n\n if (vacant && businessUnitId) {\n actions.push({\n id: 'organization-management.assign-employee-to-position-from-chart',\n title: orgChartNodeActionKey('assign-employee-to-position'),\n icon: 'fa-light fa-user-plus',\n order: 110,\n disabled: !canCreateAssignment,\n execute: async (ctx) => {\n const pid = this.resolvePositionId(ctx);\n const buId = this.resolveBusinessUnitIdForPosition(ctx);\n if (!pid || !buId) {\n return;\n }\n const result = await this.commandService.execute(AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND, {\n data: {\n businessUnitId: buId,\n positionId: pid,\n isPrimary: false,\n },\n });\n if (result?.success) {\n await ctx.refreshChart();\n }\n },\n });\n }\n\n if (!vacant && occupantEmployeeId && businessUnitId) {\n actions.push({\n id: 'organization-management.replace-position-assignee-from-chart',\n title: orgChartNodeActionKey('assign-new-employee-to-position'),\n icon: 'fa-light fa-arrows-rotate',\n order: 115,\n disabled: !canCreateAssignment || !canEditAssignment,\n execute: async (ctx) => {\n const pid = this.resolvePositionId(ctx);\n const buId = this.resolveBusinessUnitIdForPosition(ctx);\n const occ = ctx.node.metadata?.['occupant'] as Record<string, unknown> | undefined;\n const eid =\n typeof occ?.['employeeId'] === 'string' && occ['employeeId'].trim().length > 0\n ? occ['employeeId'].trim()\n : '';\n if (!pid || !buId || !eid) {\n return;\n }\n const result = await this.commandService.execute(\n AXMOrganizationManagementCommandKeys.OrganizationChart.ReplacePositionAssignee,\n { businessUnitId: buId, positionId: pid, currentEmployeeId: eid },\n );\n if (result?.success) {\n await ctx.refreshChart();\n }\n },\n });\n }\n\n if (businessUnitId) {\n actions.push({\n id: 'organization-management.remove-position-from-unit-from-chart',\n title: orgChartNodeActionKey('remove-from-unit'),\n icon: 'fa-light fa-link-slash',\n color: 'danger',\n order: 120,\n disabled: !canUpdateBusinessUnit,\n execute: async (ctx) => {\n const pid = this.resolvePositionId(ctx);\n const buId = this.resolveBusinessUnitIdForPosition(ctx);\n if (!pid || !buId) {\n return;\n }\n const occ = ctx.node.metadata?.['occupant'] as Record<string, unknown> | undefined;\n const occId =\n typeof occ?.['employeeId'] === 'string' && occ['employeeId'].trim().length > 0\n ? occ['employeeId'].trim()\n : undefined;\n const result = await this.commandService.execute(\n AXMOrganizationManagementCommandKeys.OrganizationChart.RemovePositionFromBusinessUnit,\n {\n businessUnitId: buId,\n positionId: pid,\n ...(occId ? { occupantEmployeeId: occId } : {}),\n },\n );\n if (result?.success) {\n await ctx.refreshChart();\n }\n },\n });\n }\n\n return actions;\n }\n\n //#endregion\n\n //#region ---- Resolvers & Authorization ----\n\n private authorize(permission: string): boolean {\n return this.sessionService.authorize(permission);\n }\n\n private resolvePositionId(context: AXMOrgChartNodeContributionContext): string | undefined {\n const entity = context.node.entity;\n if (entity?.id != null && this.isPositionEntityType(entity.type)) {\n const id = String(entity.id).trim();\n return id.length > 0 ? id : undefined;\n }\n const metaPid = context.node.metadata?.['positionId'];\n if (typeof metaPid === 'string' && metaPid.trim().length > 0) {\n return metaPid.trim();\n }\n return undefined;\n }\n\n private isPositionEntityType(entityType: string | undefined): boolean {\n if (!entityType || typeof entityType !== 'string') {\n return false;\n }\n return entityType === POSITION_ENTITY_SOURCE || entityType.endsWith('.Position');\n }\n\n private resolveBusinessUnitIdForPosition(context: AXMOrgChartNodeContributionContext): string | undefined {\n const meta = context.node.metadata ?? {};\n const a = meta['businessUnitId'];\n const b = meta['organizationalUnitId'];\n const raw = (typeof a === 'string' && a.trim().length > 0 ? a : typeof b === 'string' ? b : '') as string;\n const id = String(raw).trim();\n return id.length > 0 ? id : undefined;\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;AAAA;AAiBA;AAEA;AAEA,MAAM,qBAAqB,GAAG,CAAC,MAAc,KAC3C,CAAA,yDAAA,EAA4D,MAAM,CAAA,CAAE;AAEtE,MAAM,sBAAsB,GAAG,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM;AAElE,MAAM,kCAAkC,GAAG,6DAA6D;AACxG,MAAM,gCAAgC,GAAG,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UAAA,EAAA,CAAA;kBAD/D;;;;;"}
|
|
@@ -2,7 +2,7 @@ import { AXPSessionService } from '@acorex/platform/auth';
|
|
|
2
2
|
import { AXPCommandService } from '@acorex/platform/runtime';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { inject, Injectable } from '@angular/core';
|
|
5
|
-
import { R as RootConfig, q as AXM_ORG_CHART_LAYOUT_SUBMENU_ICON, r as AXM_ORG_CHART_LAYOUT_SUBMENU_TITLE_I18N_KEY, s as AXM_ORG_CHART_LAYOUT_SUBMENU_GROUP_ID, g as AXPOrganizationManagementPermissionKeys, k as AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND, A as AXMOrgChartNodeType } from './acorex-modules-organization-management-acorex-modules-organization-management-
|
|
5
|
+
import { R as RootConfig, q as AXM_ORG_CHART_LAYOUT_SUBMENU_ICON, r as AXM_ORG_CHART_LAYOUT_SUBMENU_TITLE_I18N_KEY, s as AXM_ORG_CHART_LAYOUT_SUBMENU_GROUP_ID, g as AXPOrganizationManagementPermissionKeys, k as AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND, A as AXMOrgChartNodeType } from './acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs';
|
|
6
6
|
|
|
7
7
|
//#region ---- Imports ----
|
|
8
8
|
//#endregion
|
|
@@ -330,4 +330,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
330
330
|
}] });
|
|
331
331
|
|
|
332
332
|
export { AXMOrgChartUxNodeContributionProvider };
|
|
333
|
-
//# sourceMappingURL=acorex-modules-organization-management-org-chart-ux-node-contribution.provider-
|
|
333
|
+
//# sourceMappingURL=acorex-modules-organization-management-org-chart-ux-node-contribution.provider-BsBsdoII.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-modules-organization-management-org-chart-ux-node-contribution.provider-DiMvAEbk.mjs","sources":["../../../../libs/modules/organization-management/src/lib/features/organization-chart/contributions/org-chart-ux-node-contribution.provider.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPSessionService } from '@acorex/platform/auth';\nimport { AXPCommandService } from '@acorex/platform/runtime';\nimport { inject, Injectable } from '@angular/core';\nimport { AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND } from '../../../contracts/commands.keys';\nimport { RootConfig } from '../../../contracts';\nimport { AXPOrganizationManagementPermissionKeys } from '../../../contracts/permission.keys';\nimport {\n AXM_ORG_CHART_LAYOUT_SUBMENU_GROUP_ID,\n AXM_ORG_CHART_LAYOUT_SUBMENU_ICON,\n AXM_ORG_CHART_LAYOUT_SUBMENU_TITLE_I18N_KEY,\n} from '../constants/org-chart-layout-submenu.const';\nimport {\n AXMOrgChartNodeContributionContext,\n AXMOrgChartNodeContributionProvider,\n AXMOrgChartNodeMenuAction,\n} from '../tokens/org-chart-node-contribution.token';\nimport { AXMOrgChartNodeType, AXMOrganizationNode } from '../model/org-chart.type';\n\n//#endregion\n\n//#region ---- Constants ----\n\nconst actionKey = (suffix: string): string =>\n `@organization-management:organization-chart.node-actions.${suffix}`;\n\nconst TENANT_VIEW_PERMISSION = 'TenantManagement:Permission:Management';\n\nconst POSITION_ENTITY_SOURCE = RootConfig.entities.position.source;\n\nconst BUSINESS_UNIT_ENTITY_SOURCE = RootConfig.entities.businessUnit.source;\n\nconst TENANT_ENTITY_SOURCE = 'TenantManagement.Tenant';\n\nconst COMPANY_ENTITY_SOURCE = RootConfig.entities.company.source;\n\n//#endregion\n\n/**\n * Org chart context menus: open record details, nested expand/collapse, multi-seat assign, HR stubs.\n */\n@Injectable()\nexport class AXMOrgChartUxNodeContributionProvider implements AXMOrgChartNodeContributionProvider {\n //#region ---- Services & Dependencies ----\n\n private readonly commandService = inject(AXPCommandService);\n private readonly sessionService = inject(AXPSessionService);\n\n private readonly positionAssignmentCreatePermission =\n 'HumanCapitalManagement:Permission:PositionAssignment.Create';\n\n private readonly tenantEntityInfo = {\n module: 'TenantManagement',\n name: 'Tenant',\n title: '@tenant-management:tenants.entities.tenant.title',\n };\n\n private readonly companyEntityInfo = {\n module: RootConfig.module.name,\n name: RootConfig.entities.company.name,\n title: RootConfig.entities.company.title,\n };\n\n //#endregion\n\n //#region ---- AXMOrgChartNodeContributionProvider ----\n\n async getMenuActions(context: AXMOrgChartNodeContributionContext): Promise<AXMOrgChartNodeMenuAction[]> {\n const actions: AXMOrgChartNodeMenuAction[] = [\n ...this.getCrossCuttingActions(context),\n ...this.getKindSpecificActions(context),\n ];\n return actions;\n }\n\n //#endregion\n\n //#region ---- Cross-cutting ----\n\n private getCrossCuttingActions(context: AXMOrgChartNodeContributionContext): AXMOrgChartNodeMenuAction[] {\n const hasChildren = (context.node.children?.length ?? 0) > 0;\n const expanded = context.node.isExpanded !== false;\n\n return [\n {\n id: 'organization-management.org-chart.toggle-detail-panel',\n title: actionKey('toggle-detail-panel'),\n icon: 'fa-light fa-sidebar',\n /** After Communication and structure actions; before Remove (120). */\n order: 117,\n break: 'before',\n submenuGroupId: AXM_ORG_CHART_LAYOUT_SUBMENU_GROUP_ID,\n submenuGroupTitle: AXM_ORG_CHART_LAYOUT_SUBMENU_TITLE_I18N_KEY,\n submenuGroupIcon: AXM_ORG_CHART_LAYOUT_SUBMENU_ICON,\n /** Separator before expand/collapse nested rows (never on the last row — that leaves a stray rule and gap). */\n submenuSectionBreak: true,\n execute: async (ctx) => {\n ctx.host.toggleDetailPanel();\n },\n },\n {\n id: 'organization-management.org-chart.expand-branch',\n title: actionKey('expand'),\n icon: 'fa-light fa-square-plus',\n order: 118,\n submenuGroupId: AXM_ORG_CHART_LAYOUT_SUBMENU_GROUP_ID,\n submenuGroupTitle: AXM_ORG_CHART_LAYOUT_SUBMENU_TITLE_I18N_KEY,\n submenuGroupIcon: AXM_ORG_CHART_LAYOUT_SUBMENU_ICON,\n disabled: !hasChildren || expanded,\n execute: async (ctx) => {\n ctx.host.setNodeBranchExpanded(ctx.node, true);\n },\n },\n {\n id: 'organization-management.org-chart.collapse-branch',\n title: actionKey('collapse'),\n icon: 'fa-light fa-square-minus',\n order: 119,\n submenuGroupId: AXM_ORG_CHART_LAYOUT_SUBMENU_GROUP_ID,\n submenuGroupTitle: AXM_ORG_CHART_LAYOUT_SUBMENU_TITLE_I18N_KEY,\n submenuGroupIcon: AXM_ORG_CHART_LAYOUT_SUBMENU_ICON,\n /** Trailing group break: separator after the View & Layout row on the root menu (inner last-row break is normalized away). */\n break: 'after',\n disabled: !hasChildren || !expanded,\n execute: async (ctx) => {\n ctx.host.setNodeBranchExpanded(ctx.node, false);\n },\n },\n ];\n }\n\n //#endregion\n\n //#region ---- Kind-specific ----\n\n /**\n * **Open** — `Entity:OpenDetails` (navigate to entity view route).\n */\n private buildOpenDetailsAction(args: {\n id: string;\n canOpen: boolean;\n breakAfter?: 'after';\n order?: number;\n resolve: (ctx: AXMOrgChartNodeContributionContext) => { entity: string; id: string } | null;\n }): AXMOrgChartNodeMenuAction {\n return {\n id: args.id,\n title: actionKey('open'),\n icon: 'fa-light fa-arrow-up-right-from-square',\n order: args.order ?? 20,\n break: args.breakAfter,\n disabled: !args.canOpen,\n execute: async (ctx) => {\n const spec = args.resolve(ctx);\n if (!spec) {\n return;\n }\n await this.commandService.execute('Entity:OpenDetails', {\n entity: spec.entity,\n data: { id: spec.id },\n });\n },\n };\n }\n\n private getKindSpecificActions(context: AXMOrgChartNodeContributionContext): AXMOrgChartNodeMenuAction[] {\n switch (context.nodeKind) {\n case 'company-root':\n return this.getCompanyRootActions(context);\n case 'business-unit':\n return this.getBusinessUnitActions(context);\n case 'position':\n return this.getPositionActions(context);\n default:\n return [];\n }\n }\n\n private getCompanyRootActions(context: AXMOrgChartNodeContributionContext): AXMOrgChartNodeMenuAction[] {\n const viewTarget = this.resolveCompanyRootViewTarget(context.node);\n if (!viewTarget) {\n return [];\n }\n let canOpen = true;\n if (viewTarget.kind === 'tenant') {\n canOpen =\n canOpen &&\n (this.authorize(TENANT_VIEW_PERMISSION) ||\n this.authorize(AXPOrganizationManagementPermissionKeys.Chart.Management));\n } else if (viewTarget.kind === 'company') {\n canOpen =\n canOpen && this.authorize(AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management);\n }\n\n return [\n this.buildOpenDetailsAction({\n id: 'organization-management.org-chart.open-details',\n canOpen,\n breakAfter: 'after',\n resolve: (ctx) => {\n const target = this.resolveCompanyRootViewTarget(ctx.node);\n return target ? { entity: target.source, id: target.id } : null;\n },\n }),\n ];\n }\n\n private getBusinessUnitActions(context: AXMOrgChartNodeContributionContext): AXMOrgChartNodeMenuAction[] {\n const businessUnitId = this.resolveBusinessUnitId(context);\n const canView = this.authorize(AXPOrganizationManagementPermissionKeys.BusinessUnit.View);\n\n return [\n ...(businessUnitId\n ? [\n this.buildOpenDetailsAction({\n id: 'organization-management.org-chart.open-details',\n canOpen: canView,\n breakAfter: 'after',\n resolve: (ctx) => {\n const id = this.resolveBusinessUnitId(ctx);\n return id ? { entity: BUSINESS_UNIT_ENTITY_SOURCE, id } : null;\n },\n }),\n ]\n : []),\n ];\n }\n\n private getPositionActions(context: AXMOrgChartNodeContributionContext): AXMOrgChartNodeMenuAction[] {\n const positionId = this.resolvePositionId(context);\n const businessUnitId = this.resolveBusinessUnitIdForPosition(context);\n const capacity = this.resolvePositionCapacity(context.node);\n const filled = this.resolveFilledAssignmentCount(context.node);\n const canViewPosition = this.authorize(AXPOrganizationManagementPermissionKeys.Position.View);\n const canAssignMore =\n this.authorize(this.positionAssignmentCreatePermission) &&\n capacity > 1 &&\n filled < capacity &&\n Boolean(positionId) &&\n Boolean(businessUnitId);\n\n return [\n ...(positionId\n ? [\n this.buildOpenDetailsAction({\n id: 'organization-management.org-chart.open-details',\n canOpen: canViewPosition,\n breakAfter: 'after',\n resolve: (ctx) => {\n const id = this.resolvePositionId(ctx);\n return id ? { entity: POSITION_ENTITY_SOURCE, id } : null;\n },\n }),\n ]\n : []),\n {\n id: 'organization-management.org-chart.add-additional-assignee',\n title: actionKey('add-additional-assignee'),\n icon: 'fa-light fa-user-plus',\n order: 108,\n disabled: !canAssignMore,\n execute: async (ctx) => {\n const pid = this.resolvePositionId(ctx);\n const buId = this.resolveBusinessUnitIdForPosition(ctx);\n if (!pid || !buId) {\n return;\n }\n const result = await this.commandService.execute(AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND, {\n data: {\n businessUnitId: buId,\n positionId: pid,\n isPrimary: false,\n },\n });\n if (result?.success) {\n await ctx.refreshChart();\n }\n },\n },\n ];\n }\n\n //#endregion\n\n //#region ---- Resolvers ----\n\n private authorize(permission: string): boolean {\n return this.sessionService.authorize(permission);\n }\n\n private resolveCompanyRootViewTarget(\n node: AXMOrganizationNode,\n ): { kind: 'tenant' | 'company'; source: string; entityInfo: Record<string, string>; id: string } | null {\n const ent = node.entity;\n if (!ent?.id) {\n return null;\n }\n const id = String(ent.id).trim();\n if (!id) {\n return null;\n }\n const rawType = String(ent.type ?? '').trim();\n if (rawType === 'tenant' || rawType.endsWith('.Tenant')) {\n return { kind: 'tenant', source: TENANT_ENTITY_SOURCE, entityInfo: this.tenantEntityInfo, id };\n }\n if (rawType === COMPANY_ENTITY_SOURCE || rawType.endsWith('.Company')) {\n return { kind: 'company', source: COMPANY_ENTITY_SOURCE, entityInfo: this.companyEntityInfo, id };\n }\n return null;\n }\n\n private resolveBusinessUnitId(context: AXMOrgChartNodeContributionContext): string | undefined {\n if (context.nodeKind === 'business-unit') {\n const fromEntity = context.node.entity?.id;\n const entityId =\n fromEntity != null && String(fromEntity).trim().length > 0 ? String(fromEntity).trim() : undefined;\n return (\n entityId ??\n (context.node.metadata?.['businessUnitId'] as string | undefined)?.trim() ??\n (context.node.metadata?.['unitId'] as string | undefined)?.trim()\n );\n }\n return undefined;\n }\n\n private resolvePositionId(context: AXMOrgChartNodeContributionContext): string | undefined {\n const entity = context.node.entity;\n if (entity?.id != null && this.isPositionEntityType(entity.type)) {\n const id = String(entity.id).trim();\n return id.length > 0 ? id : undefined;\n }\n const metaPid = context.node.metadata?.['positionId'];\n if (typeof metaPid === 'string' && metaPid.trim().length > 0) {\n return metaPid.trim();\n }\n return undefined;\n }\n\n private isPositionEntityType(entityType: string | undefined): boolean {\n if (!entityType || typeof entityType !== 'string') {\n return false;\n }\n return entityType === POSITION_ENTITY_SOURCE || entityType.endsWith('.Position');\n }\n\n private resolveBusinessUnitIdForPosition(context: AXMOrgChartNodeContributionContext): string | undefined {\n const meta = context.node.metadata ?? {};\n const a = meta['businessUnitId'];\n const b = meta['organizationalUnitId'];\n const raw = (typeof a === 'string' && a.trim().length > 0 ? a : typeof b === 'string' ? b : '') as string;\n const id = String(raw).trim();\n return id.length > 0 ? id : undefined;\n }\n\n private resolvePositionCapacity(node: AXMOrganizationNode): number {\n const meta = node.metadata ?? {};\n const raw = meta['capacity'];\n if (typeof raw === 'number' && Number.isFinite(raw) && raw >= 1) {\n return Math.floor(raw);\n }\n if (typeof raw === 'string') {\n const n = Number(raw.trim());\n if (Number.isFinite(n) && n >= 1) {\n return Math.floor(n);\n }\n }\n return 1;\n }\n\n private resolveFilledAssignmentCount(node: AXMOrganizationNode): number {\n const meta = node.metadata ?? {};\n const fromMeta = meta['activeAssignmentCount'];\n if (typeof fromMeta === 'number' && Number.isFinite(fromMeta) && fromMeta >= 0) {\n return Math.floor(fromMeta);\n }\n const employeeChildren =\n node.children?.filter((c) => c.type === AXMOrgChartNodeType.Employee).length ?? 0;\n if (employeeChildren > 0) {\n return employeeChildren;\n }\n if (meta['vacant'] === true) {\n return 0;\n }\n const occ = meta['occupant'] as Record<string, unknown> | undefined;\n if (typeof occ?.['employeeId'] === 'string' && occ['employeeId'].trim().length > 0) {\n return 1;\n }\n return 0;\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;AAAA;AAoBA;AAEA;AAEA,MAAM,SAAS,GAAG,CAAC,MAAc,KAC/B,CAAA,yDAAA,EAA4D,MAAM,CAAA,CAAE;AAEtE,MAAM,sBAAsB,GAAG,wCAAwC;AAE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;QACA,MAAM,gBAAgB,GACpB,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,mBAAmB,CAAC,QAAQ,CAAC,CAAC,MAAM,IAAI,CAAC;AACnF,QAAA,IAAI,gBAAgB,GAAG,CAAC,EAAE;AACxB,YAAA,OAAO,gBAAgB;QACzB;AACA,QAAA,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE;AAC3B,YAAA,OAAO,CAAC;QACV;AACA,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAwC;QACnE,IAAI,OAAO,GAAG,GAAG,YAAY,CAAC,KAAK,QAAQ,IAAI,GAAG,CAAC,YAAY,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;AAClF,YAAA,OAAO,CAAC;QACV;AACA,QAAA,OAAO,CAAC;IACV;8GA1VW,qCAAqC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAArC,qCAAqC,EAAA,CAAA,CAAA;;2FAArC,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBADjD;;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-modules-organization-management-org-chart-ux-node-contribution.provider-BsBsdoII.mjs","sources":["../../../../libs/modules/organization-management/src/lib/features/organization-chart/contributions/org-chart-ux-node-contribution.provider.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPSessionService } from '@acorex/platform/auth';\nimport { AXPCommandService } from '@acorex/platform/runtime';\nimport { inject, Injectable } from '@angular/core';\nimport { AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND } from '../../../contracts/commands.keys';\nimport { RootConfig } from '../../../contracts';\nimport { AXPOrganizationManagementPermissionKeys } from '../../../contracts/permission.keys';\nimport {\n AXM_ORG_CHART_LAYOUT_SUBMENU_GROUP_ID,\n AXM_ORG_CHART_LAYOUT_SUBMENU_ICON,\n AXM_ORG_CHART_LAYOUT_SUBMENU_TITLE_I18N_KEY,\n} from '../constants/org-chart-layout-submenu.const';\nimport {\n AXMOrgChartNodeContributionContext,\n AXMOrgChartNodeContributionProvider,\n AXMOrgChartNodeMenuAction,\n} from '../tokens/org-chart-node-contribution.token';\nimport { AXMOrgChartNodeType, AXMOrganizationNode } from '../model/org-chart.type';\n\n//#endregion\n\n//#region ---- Constants ----\n\nconst actionKey = (suffix: string): string =>\n `@organization-management:organization-chart.node-actions.${suffix}`;\n\nconst TENANT_VIEW_PERMISSION = 'TenantManagement:Permission:Management';\n\nconst POSITION_ENTITY_SOURCE = RootConfig.entities.position.source;\n\nconst BUSINESS_UNIT_ENTITY_SOURCE = RootConfig.entities.businessUnit.source;\n\nconst TENANT_ENTITY_SOURCE = 'TenantManagement.Tenant';\n\nconst COMPANY_ENTITY_SOURCE = RootConfig.entities.company.source;\n\n//#endregion\n\n/**\n * Org chart context menus: open record details, nested expand/collapse, multi-seat assign, HR stubs.\n */\n@Injectable()\nexport class AXMOrgChartUxNodeContributionProvider implements AXMOrgChartNodeContributionProvider {\n //#region ---- Services & Dependencies ----\n\n private readonly commandService = inject(AXPCommandService);\n private readonly sessionService = inject(AXPSessionService);\n\n private readonly positionAssignmentCreatePermission =\n 'HumanCapitalManagement:Permission:PositionAssignment.Create';\n\n private readonly tenantEntityInfo = {\n module: 'TenantManagement',\n name: 'Tenant',\n title: '@tenant-management:tenants.entities.tenant.title',\n };\n\n private readonly companyEntityInfo = {\n module: RootConfig.module.name,\n name: RootConfig.entities.company.name,\n title: RootConfig.entities.company.title,\n };\n\n //#endregion\n\n //#region ---- AXMOrgChartNodeContributionProvider ----\n\n async getMenuActions(context: AXMOrgChartNodeContributionContext): Promise<AXMOrgChartNodeMenuAction[]> {\n const actions: AXMOrgChartNodeMenuAction[] = [\n ...this.getCrossCuttingActions(context),\n ...this.getKindSpecificActions(context),\n ];\n return actions;\n }\n\n //#endregion\n\n //#region ---- Cross-cutting ----\n\n private getCrossCuttingActions(context: AXMOrgChartNodeContributionContext): AXMOrgChartNodeMenuAction[] {\n const hasChildren = (context.node.children?.length ?? 0) > 0;\n const expanded = context.node.isExpanded !== false;\n\n return [\n {\n id: 'organization-management.org-chart.toggle-detail-panel',\n title: actionKey('toggle-detail-panel'),\n icon: 'fa-light fa-sidebar',\n /** After Communication and structure actions; before Remove (120). */\n order: 117,\n break: 'before',\n submenuGroupId: AXM_ORG_CHART_LAYOUT_SUBMENU_GROUP_ID,\n submenuGroupTitle: AXM_ORG_CHART_LAYOUT_SUBMENU_TITLE_I18N_KEY,\n submenuGroupIcon: AXM_ORG_CHART_LAYOUT_SUBMENU_ICON,\n /** Separator before expand/collapse nested rows (never on the last row — that leaves a stray rule and gap). */\n submenuSectionBreak: true,\n execute: async (ctx) => {\n ctx.host.toggleDetailPanel();\n },\n },\n {\n id: 'organization-management.org-chart.expand-branch',\n title: actionKey('expand'),\n icon: 'fa-light fa-square-plus',\n order: 118,\n submenuGroupId: AXM_ORG_CHART_LAYOUT_SUBMENU_GROUP_ID,\n submenuGroupTitle: AXM_ORG_CHART_LAYOUT_SUBMENU_TITLE_I18N_KEY,\n submenuGroupIcon: AXM_ORG_CHART_LAYOUT_SUBMENU_ICON,\n disabled: !hasChildren || expanded,\n execute: async (ctx) => {\n ctx.host.setNodeBranchExpanded(ctx.node, true);\n },\n },\n {\n id: 'organization-management.org-chart.collapse-branch',\n title: actionKey('collapse'),\n icon: 'fa-light fa-square-minus',\n order: 119,\n submenuGroupId: AXM_ORG_CHART_LAYOUT_SUBMENU_GROUP_ID,\n submenuGroupTitle: AXM_ORG_CHART_LAYOUT_SUBMENU_TITLE_I18N_KEY,\n submenuGroupIcon: AXM_ORG_CHART_LAYOUT_SUBMENU_ICON,\n /** Trailing group break: separator after the View & Layout row on the root menu (inner last-row break is normalized away). */\n break: 'after',\n disabled: !hasChildren || !expanded,\n execute: async (ctx) => {\n ctx.host.setNodeBranchExpanded(ctx.node, false);\n },\n },\n ];\n }\n\n //#endregion\n\n //#region ---- Kind-specific ----\n\n /**\n * **Open** — `Entity:OpenDetails` (navigate to entity view route).\n */\n private buildOpenDetailsAction(args: {\n id: string;\n canOpen: boolean;\n breakAfter?: 'after';\n order?: number;\n resolve: (ctx: AXMOrgChartNodeContributionContext) => { entity: string; id: string } | null;\n }): AXMOrgChartNodeMenuAction {\n return {\n id: args.id,\n title: actionKey('open'),\n icon: 'fa-light fa-arrow-up-right-from-square',\n order: args.order ?? 20,\n break: args.breakAfter,\n disabled: !args.canOpen,\n execute: async (ctx) => {\n const spec = args.resolve(ctx);\n if (!spec) {\n return;\n }\n await this.commandService.execute('Entity:OpenDetails', {\n entity: spec.entity,\n data: { id: spec.id },\n });\n },\n };\n }\n\n private getKindSpecificActions(context: AXMOrgChartNodeContributionContext): AXMOrgChartNodeMenuAction[] {\n switch (context.nodeKind) {\n case 'company-root':\n return this.getCompanyRootActions(context);\n case 'business-unit':\n return this.getBusinessUnitActions(context);\n case 'position':\n return this.getPositionActions(context);\n default:\n return [];\n }\n }\n\n private getCompanyRootActions(context: AXMOrgChartNodeContributionContext): AXMOrgChartNodeMenuAction[] {\n const viewTarget = this.resolveCompanyRootViewTarget(context.node);\n if (!viewTarget) {\n return [];\n }\n let canOpen = true;\n if (viewTarget.kind === 'tenant') {\n canOpen =\n canOpen &&\n (this.authorize(TENANT_VIEW_PERMISSION) ||\n this.authorize(AXPOrganizationManagementPermissionKeys.Chart.Management));\n } else if (viewTarget.kind === 'company') {\n canOpen =\n canOpen && this.authorize(AXPOrganizationManagementPermissionKeys.OrganizationManagement.Management);\n }\n\n return [\n this.buildOpenDetailsAction({\n id: 'organization-management.org-chart.open-details',\n canOpen,\n breakAfter: 'after',\n resolve: (ctx) => {\n const target = this.resolveCompanyRootViewTarget(ctx.node);\n return target ? { entity: target.source, id: target.id } : null;\n },\n }),\n ];\n }\n\n private getBusinessUnitActions(context: AXMOrgChartNodeContributionContext): AXMOrgChartNodeMenuAction[] {\n const businessUnitId = this.resolveBusinessUnitId(context);\n const canView = this.authorize(AXPOrganizationManagementPermissionKeys.BusinessUnit.View);\n\n return [\n ...(businessUnitId\n ? [\n this.buildOpenDetailsAction({\n id: 'organization-management.org-chart.open-details',\n canOpen: canView,\n breakAfter: 'after',\n resolve: (ctx) => {\n const id = this.resolveBusinessUnitId(ctx);\n return id ? { entity: BUSINESS_UNIT_ENTITY_SOURCE, id } : null;\n },\n }),\n ]\n : []),\n ];\n }\n\n private getPositionActions(context: AXMOrgChartNodeContributionContext): AXMOrgChartNodeMenuAction[] {\n const positionId = this.resolvePositionId(context);\n const businessUnitId = this.resolveBusinessUnitIdForPosition(context);\n const capacity = this.resolvePositionCapacity(context.node);\n const filled = this.resolveFilledAssignmentCount(context.node);\n const canViewPosition = this.authorize(AXPOrganizationManagementPermissionKeys.Position.View);\n const canAssignMore =\n this.authorize(this.positionAssignmentCreatePermission) &&\n capacity > 1 &&\n filled < capacity &&\n Boolean(positionId) &&\n Boolean(businessUnitId);\n\n return [\n ...(positionId\n ? [\n this.buildOpenDetailsAction({\n id: 'organization-management.org-chart.open-details',\n canOpen: canViewPosition,\n breakAfter: 'after',\n resolve: (ctx) => {\n const id = this.resolvePositionId(ctx);\n return id ? { entity: POSITION_ENTITY_SOURCE, id } : null;\n },\n }),\n ]\n : []),\n {\n id: 'organization-management.org-chart.add-additional-assignee',\n title: actionKey('add-additional-assignee'),\n icon: 'fa-light fa-user-plus',\n order: 108,\n disabled: !canAssignMore,\n execute: async (ctx) => {\n const pid = this.resolvePositionId(ctx);\n const buId = this.resolveBusinessUnitIdForPosition(ctx);\n if (!pid || !buId) {\n return;\n }\n const result = await this.commandService.execute(AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND, {\n data: {\n businessUnitId: buId,\n positionId: pid,\n isPrimary: false,\n },\n });\n if (result?.success) {\n await ctx.refreshChart();\n }\n },\n },\n ];\n }\n\n //#endregion\n\n //#region ---- Resolvers ----\n\n private authorize(permission: string): boolean {\n return this.sessionService.authorize(permission);\n }\n\n private resolveCompanyRootViewTarget(\n node: AXMOrganizationNode,\n ): { kind: 'tenant' | 'company'; source: string; entityInfo: Record<string, string>; id: string } | null {\n const ent = node.entity;\n if (!ent?.id) {\n return null;\n }\n const id = String(ent.id).trim();\n if (!id) {\n return null;\n }\n const rawType = String(ent.type ?? '').trim();\n if (rawType === 'tenant' || rawType.endsWith('.Tenant')) {\n return { kind: 'tenant', source: TENANT_ENTITY_SOURCE, entityInfo: this.tenantEntityInfo, id };\n }\n if (rawType === COMPANY_ENTITY_SOURCE || rawType.endsWith('.Company')) {\n return { kind: 'company', source: COMPANY_ENTITY_SOURCE, entityInfo: this.companyEntityInfo, id };\n }\n return null;\n }\n\n private resolveBusinessUnitId(context: AXMOrgChartNodeContributionContext): string | undefined {\n if (context.nodeKind === 'business-unit') {\n const fromEntity = context.node.entity?.id;\n const entityId =\n fromEntity != null && String(fromEntity).trim().length > 0 ? String(fromEntity).trim() : undefined;\n return (\n entityId ??\n (context.node.metadata?.['businessUnitId'] as string | undefined)?.trim() ??\n (context.node.metadata?.['unitId'] as string | undefined)?.trim()\n );\n }\n return undefined;\n }\n\n private resolvePositionId(context: AXMOrgChartNodeContributionContext): string | undefined {\n const entity = context.node.entity;\n if (entity?.id != null && this.isPositionEntityType(entity.type)) {\n const id = String(entity.id).trim();\n return id.length > 0 ? id : undefined;\n }\n const metaPid = context.node.metadata?.['positionId'];\n if (typeof metaPid === 'string' && metaPid.trim().length > 0) {\n return metaPid.trim();\n }\n return undefined;\n }\n\n private isPositionEntityType(entityType: string | undefined): boolean {\n if (!entityType || typeof entityType !== 'string') {\n return false;\n }\n return entityType === POSITION_ENTITY_SOURCE || entityType.endsWith('.Position');\n }\n\n private resolveBusinessUnitIdForPosition(context: AXMOrgChartNodeContributionContext): string | undefined {\n const meta = context.node.metadata ?? {};\n const a = meta['businessUnitId'];\n const b = meta['organizationalUnitId'];\n const raw = (typeof a === 'string' && a.trim().length > 0 ? a : typeof b === 'string' ? b : '') as string;\n const id = String(raw).trim();\n return id.length > 0 ? id : undefined;\n }\n\n private resolvePositionCapacity(node: AXMOrganizationNode): number {\n const meta = node.metadata ?? {};\n const raw = meta['capacity'];\n if (typeof raw === 'number' && Number.isFinite(raw) && raw >= 1) {\n return Math.floor(raw);\n }\n if (typeof raw === 'string') {\n const n = Number(raw.trim());\n if (Number.isFinite(n) && n >= 1) {\n return Math.floor(n);\n }\n }\n return 1;\n }\n\n private resolveFilledAssignmentCount(node: AXMOrganizationNode): number {\n const meta = node.metadata ?? {};\n const fromMeta = meta['activeAssignmentCount'];\n if (typeof fromMeta === 'number' && Number.isFinite(fromMeta) && fromMeta >= 0) {\n return Math.floor(fromMeta);\n }\n const employeeChildren =\n node.children?.filter((c) => c.type === AXMOrgChartNodeType.Employee).length ?? 0;\n if (employeeChildren > 0) {\n return employeeChildren;\n }\n if (meta['vacant'] === true) {\n return 0;\n }\n const occ = meta['occupant'] as Record<string, unknown> | undefined;\n if (typeof occ?.['employeeId'] === 'string' && occ['employeeId'].trim().length > 0) {\n return 1;\n }\n return 0;\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;AAAA;AAoBA;AAEA;AAEA,MAAM,SAAS,GAAG,CAAC,MAAc,KAC/B,CAAA,yDAAA,EAA4D,MAAM,CAAA,CAAE;AAEtE,MAAM,sBAAsB,GAAG,wCAAwC;AAEvE,MAAM,sBAAsB,GAAG,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM;AAElE,MAAM,2BAA2B,GAAG,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,MAAM;AAE3E,MAAM,oBAAoB,GAAG,yBAAyB;AAEtD,MAAM,qBAAqB,GAAG,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM;AAEhE;AAEA;;AAEG;MAEU,qCAAqC,CAAA;AADlD,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAA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CAAwC;QACnE,IAAI,OAAO,GAAG,GAAG,YAAY,CAAC,KAAK,QAAQ,IAAI,GAAG,CAAC,YAAY,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;AAClF,YAAA,OAAO,CAAC;QACV;AACA,QAAA,OAAO,CAAC;IACV;8GA1VW,qCAAqC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAArC,qCAAqC,EAAA,CAAA,CAAA;;2FAArC,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBADjD;;;;;"}
|
|
@@ -26,7 +26,7 @@ import * as i1$1 from '@angular/forms';
|
|
|
26
26
|
import { FormsModule } from '@angular/forms';
|
|
27
27
|
import { ActivatedRoute, RouterModule } from '@angular/router';
|
|
28
28
|
import set from 'lodash-es/set';
|
|
29
|
-
import { A as AXMOrgChartNodeType, a as AXM_ORG_CHART_NODE_CONTRIBUTOR, R as RootConfig, n as normalizeVacantLeafSeatsSetting, b as AXPOrganizationManagementSettings, p as parseOrgChartMode, c as AXMOrgChartStructureRefreshHub, d as AXMOrgChartCategory, e as AXM_ORG_CHART_EMPLOYEE_SUBMENU_GROUP_ID } from './acorex-modules-organization-management-acorex-modules-organization-management-
|
|
29
|
+
import { A as AXMOrgChartNodeType, a as AXM_ORG_CHART_NODE_CONTRIBUTOR, R as RootConfig, n as normalizeVacantLeafSeatsSetting, b as AXPOrganizationManagementSettings, p as parseOrgChartMode, c as AXMOrgChartStructureRefreshHub, d as AXMOrgChartCategory, e as AXM_ORG_CHART_EMPLOYEE_SUBMENU_GROUP_ID } from './acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs';
|
|
30
30
|
import { AXLoadingDialogService } from '@acorex/components/loading-dialog';
|
|
31
31
|
import { AXPExportService, AXPSettingsService } from '@acorex/platform/common';
|
|
32
32
|
import { AXPEntityService } from '@acorex/platform/layout/entity';
|
|
@@ -1931,4 +1931,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
1931
1931
|
}], ctorParameters: () => [], propDecorators: { treeContainer: [{ type: i0.ViewChild, args: ['chart', { isSignal: true }] }], parent: [{ type: i0.ViewChild, args: ['parent', { isSignal: true }] }], contextMenu: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXContextMenuComponent), { isSignal: true }] }], panView: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXPanViewDirective), { isSignal: true }] }] } });
|
|
1932
1932
|
|
|
1933
1933
|
export { AXMOrgChartPage };
|
|
1934
|
-
//# sourceMappingURL=acorex-modules-organization-management-org-chart.page-
|
|
1934
|
+
//# sourceMappingURL=acorex-modules-organization-management-org-chart.page-DJNfsp4z.mjs.map
|