@atlashub/smartstack 3.28.0 → 3.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{AgentSkillsPage-ChykpPZx.js → AgentSkillsPage-CVq3qZoe.js} +2 -2
- package/dist/chunks/{AgentSkillsPage-ChykpPZx.js.map → AgentSkillsPage-CVq3qZoe.js.map} +1 -1
- package/dist/chunks/{AgentSkillsPage-ABpqnnyK.js → AgentSkillsPage-DJb49NMA.js} +2 -2
- package/dist/chunks/{AgentSkillsPage-ABpqnnyK.js.map → AgentSkillsPage-DJb49NMA.js.map} +1 -1
- package/dist/chunks/{AgentWorkloadPage-BltzNlXI.js → AgentWorkloadPage-D_nk3gKj.js} +2 -2
- package/dist/chunks/{AgentWorkloadPage-BltzNlXI.js.map → AgentWorkloadPage-D_nk3gKj.js.map} +1 -1
- package/dist/chunks/{AgentWorkloadPage-BI5QWJyQ.js → AgentWorkloadPage-oHEi-sFh.js} +2 -2
- package/dist/chunks/{AgentWorkloadPage-BI5QWJyQ.js.map → AgentWorkloadPage-oHEi-sFh.js.map} +1 -1
- package/dist/chunks/{ApiCatalogDetailPage-BaheZKBq.js → ApiCatalogDetailPage-Cr0q2HnB.js} +3 -3
- package/dist/chunks/{ApiCatalogDetailPage-BaheZKBq.js.map → ApiCatalogDetailPage-Cr0q2HnB.js.map} +1 -1
- package/dist/chunks/{ApiCatalogDetailPage-CsRxlHwO.js → ApiCatalogDetailPage-DX8buBkV.js} +2 -2
- package/dist/chunks/{ApiCatalogDetailPage-CsRxlHwO.js.map → ApiCatalogDetailPage-DX8buBkV.js.map} +1 -1
- package/dist/chunks/{ApiCatalogPage-CqmmHpQ4.js → ApiCatalogPage-DN7sazvI.js} +2 -2
- package/dist/chunks/{ApiCatalogPage-CqmmHpQ4.js.map → ApiCatalogPage-DN7sazvI.js.map} +1 -1
- package/dist/chunks/{ApiCatalogPage-B0yIz8-U.js → ApiCatalogPage-DqboIzZE.js} +2 -2
- package/dist/chunks/{ApiCatalogPage-B0yIz8-U.js.map → ApiCatalogPage-DqboIzZE.js.map} +1 -1
- package/dist/chunks/{ApplicationDetailPage-CngD5JSN.js → ApplicationDetailPage--9YwwS5A.js} +2 -2
- package/dist/chunks/{ApplicationDetailPage-CngD5JSN.js.map → ApplicationDetailPage--9YwwS5A.js.map} +1 -1
- package/dist/chunks/{ApplicationDetailPage-CdT6KNd7.js → ApplicationDetailPage-CCNjr64K.js} +4 -4
- package/dist/chunks/{ApplicationDetailPage-CdT6KNd7.js.map → ApplicationDetailPage-CCNjr64K.js.map} +1 -1
- package/dist/chunks/{ApplicationsDashboardPage-DHmnjk2O.js → ApplicationsDashboardPage-BSsHN3Yj.js} +2 -2
- package/dist/chunks/{ApplicationsDashboardPage-DHmnjk2O.js.map → ApplicationsDashboardPage-BSsHN3Yj.js.map} +1 -1
- package/dist/chunks/{ApplicationsDashboardPage-1V4iQ6eY.js → ApplicationsDashboardPage-Bs-Xgca4.js} +3 -3
- package/dist/chunks/{ApplicationsDashboardPage-1V4iQ6eY.js.map → ApplicationsDashboardPage-Bs-Xgca4.js.map} +1 -1
- package/dist/chunks/{ApplicationsGridPage-Bo3NDnBF.js → ApplicationsGridPage-DDysNWJ5.js} +2 -2
- package/dist/chunks/{ApplicationsGridPage-Bo3NDnBF.js.map → ApplicationsGridPage-DDysNWJ5.js.map} +1 -1
- package/dist/chunks/{ApplicationsGridPage-CiMJFlB_.js → ApplicationsGridPage-s1WEzOXS.js} +2 -2
- package/dist/chunks/{ApplicationsGridPage-CiMJFlB_.js.map → ApplicationsGridPage-s1WEzOXS.js.map} +1 -1
- package/dist/chunks/{ApplicationsListPage-L2_S23aN.js → ApplicationsListPage-B3CSMiV0.js} +2 -2
- package/dist/chunks/{ApplicationsListPage-L2_S23aN.js.map → ApplicationsListPage-B3CSMiV0.js.map} +1 -1
- package/dist/chunks/{ApplicationsListPage-De8jQ1Cm.js → ApplicationsListPage-B6ZCecIl.js} +2 -2
- package/dist/chunks/{ApplicationsListPage-De8jQ1Cm.js.map → ApplicationsListPage-B6ZCecIl.js.map} +1 -1
- package/dist/chunks/{ApplicationsPage-DBq7_Sm8.js → ApplicationsPage-BBaiBM--.js} +2 -2
- package/dist/chunks/{ApplicationsPage-DBq7_Sm8.js.map → ApplicationsPage-BBaiBM--.js.map} +1 -1
- package/dist/chunks/{ApplicationsPage-CiNI-b0R.js → ApplicationsPage-ztPwoAGt.js} +4 -4
- package/dist/chunks/{ApplicationsPage-CiNI-b0R.js.map → ApplicationsPage-ztPwoAGt.js.map} +1 -1
- package/dist/chunks/{AssignmentRulesPage-DFsO4ZES.js → AssignmentRulesPage-CK4L4rBO.js} +2 -2
- package/dist/chunks/{AssignmentRulesPage-DFsO4ZES.js.map → AssignmentRulesPage-CK4L4rBO.js.map} +1 -1
- package/dist/chunks/{AssignmentRulesPage-C8rfUsMB.js → AssignmentRulesPage-DFSVFFXr.js} +2 -2
- package/dist/chunks/{AssignmentRulesPage-C8rfUsMB.js.map → AssignmentRulesPage-DFSVFFXr.js.map} +1 -1
- package/dist/chunks/{AssignmentsPage-78C_EBsw.js → AssignmentsPage-Bp7oQD7Q.js} +2 -2
- package/dist/chunks/{AssignmentsPage-78C_EBsw.js.map → AssignmentsPage-Bp7oQD7Q.js.map} +1 -1
- package/dist/chunks/{AssignmentsPage-COCikISI.js → AssignmentsPage-JCLpyg94.js} +2 -2
- package/dist/chunks/{AssignmentsPage-COCikISI.js.map → AssignmentsPage-JCLpyg94.js.map} +1 -1
- package/dist/chunks/{AuthCallbackPage-DqT6ueVi.js → AuthCallbackPage-Bl9xlJ3h.js} +2 -2
- package/dist/chunks/{AuthCallbackPage-DqT6ueVi.js.map → AuthCallbackPage-Bl9xlJ3h.js.map} +1 -1
- package/dist/chunks/{AuthCallbackPage-BF4bkTnR.js → AuthCallbackPage-CzMHz4jy.js} +2 -2
- package/dist/chunks/{AuthCallbackPage-BF4bkTnR.js.map → AuthCallbackPage-CzMHz4jy.js.map} +1 -1
- package/dist/chunks/{ConfirmEmailPage-Bh_K5qJn.js → ConfirmEmailPage-D_8T1vqV.js} +2 -2
- package/dist/chunks/{ConfirmEmailPage-Bh_K5qJn.js.map → ConfirmEmailPage-D_8T1vqV.js.map} +1 -1
- package/dist/chunks/{ConfirmEmailPage-DJy4idrf.js → ConfirmEmailPage-M7mJgXvn.js} +2 -2
- package/dist/chunks/{ConfirmEmailPage-DJy4idrf.js.map → ConfirmEmailPage-M7mJgXvn.js.map} +1 -1
- package/dist/chunks/{CreateSupportTicketPage-pL7jbG9o.js → CreateSupportTicketPage-BNEGavlu.js} +2 -2
- package/dist/chunks/{CreateSupportTicketPage-pL7jbG9o.js.map → CreateSupportTicketPage-BNEGavlu.js.map} +1 -1
- package/dist/chunks/{CreateSupportTicketPage-AVTwXbJd.js → CreateSupportTicketPage-C2X2mfds.js} +2 -2
- package/dist/chunks/{CreateSupportTicketPage-AVTwXbJd.js.map → CreateSupportTicketPage-C2X2mfds.js.map} +1 -1
- package/dist/chunks/{DashboardPage-DdQlTLw0.js → DashboardPage-4oy2YqvT.js} +2 -2
- package/dist/chunks/{DashboardPage-DdQlTLw0.js.map → DashboardPage-4oy2YqvT.js.map} +1 -1
- package/dist/chunks/{DashboardPage-C55mIiB6.js → DashboardPage-CO-8B8EI.js} +3 -3
- package/dist/chunks/{DashboardPage-C55mIiB6.js.map → DashboardPage-CO-8B8EI.js.map} +1 -1
- package/dist/chunks/{DashboardPage-CcCnUl7s.js → DashboardPage-CPArUG-S.js} +2 -2
- package/dist/chunks/{DashboardPage-CcCnUl7s.js.map → DashboardPage-CPArUG-S.js.map} +1 -1
- package/dist/chunks/{DashboardPage-DOitDfGV.js → DashboardPage-D5MRMxEV.js} +3 -3
- package/dist/chunks/{DashboardPage-DOitDfGV.js.map → DashboardPage-D5MRMxEV.js.map} +1 -1
- package/dist/chunks/{EscalationConfigPage-DNnZftCH.js → EscalationConfigPage-CwdnfJbJ.js} +2 -2
- package/dist/chunks/{EscalationConfigPage-DNnZftCH.js.map → EscalationConfigPage-CwdnfJbJ.js.map} +1 -1
- package/dist/chunks/{EscalationConfigPage-DRr55328.js → EscalationConfigPage-DnjLFXnL.js} +2 -2
- package/dist/chunks/{EscalationConfigPage-DRr55328.js.map → EscalationConfigPage-DnjLFXnL.js.map} +1 -1
- package/dist/chunks/{ForceChangePasswordPage-1SCOPIqK.js → ForceChangePasswordPage-ZEIfyqwE.js} +2 -2
- package/dist/chunks/{ForceChangePasswordPage-1SCOPIqK.js.map → ForceChangePasswordPage-ZEIfyqwE.js.map} +1 -1
- package/dist/chunks/{ForceChangePasswordPage-DBeG_HRO.js → ForceChangePasswordPage-sh-3h_H9.js} +2 -2
- package/dist/chunks/{ForceChangePasswordPage-DBeG_HRO.js.map → ForceChangePasswordPage-sh-3h_H9.js.map} +1 -1
- package/dist/chunks/{ForgotPasswordPage-Dlb6wKfC.js → ForgotPasswordPage-B4M6-xeM.js} +2 -2
- package/dist/chunks/{ForgotPasswordPage-Dlb6wKfC.js.map → ForgotPasswordPage-B4M6-xeM.js.map} +1 -1
- package/dist/chunks/{ForgotPasswordPage-DffYfXva.js → ForgotPasswordPage-MIu-U7p0.js} +2 -2
- package/dist/chunks/{ForgotPasswordPage-DffYfXva.js.map → ForgotPasswordPage-MIu-U7p0.js.map} +1 -1
- package/dist/chunks/{GroupDetailPage-C9nRbeHI.js → GroupDetailPage-4XK3Bs_r.js} +5 -5
- package/dist/chunks/{GroupDetailPage-C9nRbeHI.js.map → GroupDetailPage-4XK3Bs_r.js.map} +1 -1
- package/dist/chunks/{GroupDetailPage-CPPUWzXf.js → GroupDetailPage-C-kvtd2T.js} +2 -2
- package/dist/chunks/{GroupDetailPage-CPPUWzXf.js.map → GroupDetailPage-C-kvtd2T.js.map} +1 -1
- package/dist/chunks/{MyAccessRequestsPage-BAX0xwJX.js → MyAccessRequestsPage-CP41FzHi.js} +2 -2
- package/dist/chunks/{MyAccessRequestsPage-BAX0xwJX.js.map → MyAccessRequestsPage-CP41FzHi.js.map} +1 -1
- package/dist/chunks/{MyAccessRequestsPage-BMY1V631.js → MyAccessRequestsPage-DzrXTrVi.js} +2 -2
- package/dist/chunks/{MyAccessRequestsPage-BMY1V631.js.map → MyAccessRequestsPage-DzrXTrVi.js.map} +1 -1
- package/dist/chunks/{MyTenantsPage-Bbn4HxN2.js → MyTenantsPage-CZRkMbh8.js} +2 -2
- package/dist/chunks/{MyTenantsPage-Bbn4HxN2.js.map → MyTenantsPage-CZRkMbh8.js.map} +1 -1
- package/dist/chunks/{MyTenantsPage-BHtp67SD.js → MyTenantsPage-V_SwYio2.js} +3 -3
- package/dist/chunks/{MyTenantsPage-BHtp67SD.js.map → MyTenantsPage-V_SwYio2.js.map} +1 -1
- package/dist/chunks/{MyTicketsPage-BvZeiTXu.js → MyTicketsPage-DOUhaLal.js} +2 -2
- package/dist/chunks/{MyTicketsPage-BvZeiTXu.js.map → MyTicketsPage-DOUhaLal.js.map} +1 -1
- package/dist/chunks/{MyTicketsPage-D9IGVofj.js → MyTicketsPage-DnvAIeyr.js} +2 -2
- package/dist/chunks/{MyTicketsPage-D9IGVofj.js.map → MyTicketsPage-DnvAIeyr.js.map} +1 -1
- package/dist/chunks/{NavigationAppsPage-DiPBCsAF.js → NavigationAppsPage-DXvpLsbt.js} +2 -2
- package/dist/chunks/{NavigationAppsPage-DiPBCsAF.js.map → NavigationAppsPage-DXvpLsbt.js.map} +1 -1
- package/dist/chunks/{NavigationAppsPage-ChtMK1yt.js → NavigationAppsPage-DfTa4jCG.js} +2 -2
- package/dist/chunks/{NavigationAppsPage-ChtMK1yt.js.map → NavigationAppsPage-DfTa4jCG.js.map} +1 -1
- package/dist/chunks/{NotificationsPage-BxCiGzHk.js → NotificationsPage-D76MdAs-.js} +2 -2
- package/dist/chunks/{NotificationsPage-BxCiGzHk.js.map → NotificationsPage-D76MdAs-.js.map} +1 -1
- package/dist/chunks/{NotificationsPage-BCnL9oPb.js → NotificationsPage-I1yCk7tk.js} +2 -2
- package/dist/chunks/{NotificationsPage-BCnL9oPb.js.map → NotificationsPage-I1yCk7tk.js.map} +1 -1
- package/dist/chunks/{OnboardingWizardPage-CV_cxq7k.js → OnboardingWizardPage-BRUzcl1A.js} +2 -2
- package/dist/chunks/{OnboardingWizardPage-CV_cxq7k.js.map → OnboardingWizardPage-BRUzcl1A.js.map} +1 -1
- package/dist/chunks/{OnboardingWizardPage-Du-tQ2ag.js → OnboardingWizardPage-DtWUPCh3.js} +2 -2
- package/dist/chunks/{OnboardingWizardPage-Du-tQ2ag.js.map → OnboardingWizardPage-DtWUPCh3.js.map} +1 -1
- package/dist/chunks/{PermissionDetailPage-C1iuWv0G.js → PermissionDetailPage-CUNKbl7t.js} +2 -2
- package/dist/chunks/{PermissionDetailPage-C1iuWv0G.js.map → PermissionDetailPage-CUNKbl7t.js.map} +1 -1
- package/dist/chunks/{PermissionDetailPage-Ds4Jt1os.js → PermissionDetailPage-DJJGbXoX.js} +2 -2
- package/dist/chunks/{PermissionDetailPage-Ds4Jt1os.js.map → PermissionDetailPage-DJJGbXoX.js.map} +1 -1
- package/dist/chunks/{PermissionsPage-BGI2nxCn.js → PermissionsPage-B8wmawPV.js} +2 -2
- package/dist/chunks/{PermissionsPage-BGI2nxCn.js.map → PermissionsPage-B8wmawPV.js.map} +1 -1
- package/dist/chunks/{PermissionsPage-sauv7ct1.js → PermissionsPage-Dbjcctuh.js} +2 -2
- package/dist/chunks/{PermissionsPage-sauv7ct1.js.map → PermissionsPage-Dbjcctuh.js.map} +1 -1
- package/dist/chunks/{PortalDashboardPage-CQWEcghD.js → PortalDashboardPage-BeNfBZmb.js} +2 -2
- package/dist/chunks/{PortalDashboardPage-CQWEcghD.js.map → PortalDashboardPage-BeNfBZmb.js.map} +1 -1
- package/dist/chunks/{PortalDashboardPage-2kCbJw9w.js → PortalDashboardPage-zii0ll57.js} +2 -2
- package/dist/chunks/{PortalDashboardPage-2kCbJw9w.js.map → PortalDashboardPage-zii0ll57.js.map} +1 -1
- package/dist/chunks/{PreferencesPage-Bu4gaDRb.js → PreferencesPage-BCpuIGzv.js} +2 -2
- package/dist/chunks/{PreferencesPage-Bu4gaDRb.js.map → PreferencesPage-BCpuIGzv.js.map} +1 -1
- package/dist/chunks/{PreferencesPage-Dbg0bEYD.js → PreferencesPage-BmvrBaAD.js} +2 -2
- package/dist/chunks/{PreferencesPage-Dbg0bEYD.js.map → PreferencesPage-BmvrBaAD.js.map} +1 -1
- package/dist/chunks/{ProfilePage-C5QS7tsh.js → ProfilePage-eowQd59_.js} +2 -2
- package/dist/chunks/{ProfilePage-C5QS7tsh.js.map → ProfilePage-eowQd59_.js.map} +1 -1
- package/dist/chunks/{ProfilePage-DfiBhOUt.js → ProfilePage-mf5wI0-n.js} +2 -2
- package/dist/chunks/{ProfilePage-DfiBhOUt.js.map → ProfilePage-mf5wI0-n.js.map} +1 -1
- package/dist/chunks/{ReferencesManagementPage-Bs0mapj8.js → ReferencesManagementPage-8UPgkVE8.js} +3 -3
- package/dist/chunks/{ReferencesManagementPage-Bs0mapj8.js.map → ReferencesManagementPage-8UPgkVE8.js.map} +1 -1
- package/dist/chunks/{ReferencesManagementPage-C0RgHbJb.js → ReferencesManagementPage-CLsaUNqA.js} +2 -2
- package/dist/chunks/{ReferencesManagementPage-C0RgHbJb.js.map → ReferencesManagementPage-CLsaUNqA.js.map} +1 -1
- package/dist/chunks/{RegisterPage-DS1chV_A.js → RegisterPage-57X-ILDb.js} +2 -2
- package/dist/chunks/{RegisterPage-DS1chV_A.js.map → RegisterPage-57X-ILDb.js.map} +1 -1
- package/dist/chunks/{RegisterPage-DoeIiJt0.js → RegisterPage-CNyHSbqs.js} +2 -2
- package/dist/chunks/{RegisterPage-DoeIiJt0.js.map → RegisterPage-CNyHSbqs.js.map} +1 -1
- package/dist/chunks/{ResetPasswordPage-3KEk3zj5.js → ResetPasswordPage-CyV8l-Zo.js} +2 -2
- package/dist/chunks/{ResetPasswordPage-3KEk3zj5.js.map → ResetPasswordPage-CyV8l-Zo.js.map} +1 -1
- package/dist/chunks/{ResetPasswordPage-C_VQSFB5.js → ResetPasswordPage-JW8-mh_k.js} +2 -2
- package/dist/chunks/{ResetPasswordPage-C_VQSFB5.js.map → ResetPasswordPage-JW8-mh_k.js.map} +1 -1
- package/dist/chunks/{ResolutionModal-S6URD--N.js → ResolutionModal-CjwE73NX.js} +2 -2
- package/dist/chunks/{ResolutionModal-S6URD--N.js.map → ResolutionModal-CjwE73NX.js.map} +1 -1
- package/dist/chunks/{ResolutionModal-BzI1x79r.js → ResolutionModal-wddG59kg.js} +2 -2
- package/dist/chunks/{ResolutionModal-BzI1x79r.js.map → ResolutionModal-wddG59kg.js.map} +1 -1
- package/dist/chunks/{RoleDetailPage-SXK9cq_3.js → RoleDetailPage-CrioVHFI.js} +3 -3
- package/dist/chunks/{RoleDetailPage-SXK9cq_3.js.map → RoleDetailPage-CrioVHFI.js.map} +1 -1
- package/dist/chunks/{RoleDetailPage-DvEEWPKr.js → RoleDetailPage-TUOGR1ow.js} +2 -2
- package/dist/chunks/{RoleDetailPage-DvEEWPKr.js.map → RoleDetailPage-TUOGR1ow.js.map} +1 -1
- package/dist/chunks/{RolesPage-B75lCugt.js → RolesPage-CAcols3D.js} +2 -2
- package/dist/chunks/{RolesPage-B75lCugt.js.map → RolesPage-CAcols3D.js.map} +1 -1
- package/dist/chunks/{RolesPage-C5gYJxAl.js → RolesPage-sJBWaNff.js} +2 -2
- package/dist/chunks/{RolesPage-C5gYJxAl.js.map → RolesPage-sJBWaNff.js.map} +1 -1
- package/dist/chunks/{SlaConfigPage-BqXHATb6.js → SlaConfigPage-BPGRloOS.js} +2 -2
- package/dist/chunks/{SlaConfigPage-BqXHATb6.js.map → SlaConfigPage-BPGRloOS.js.map} +1 -1
- package/dist/chunks/{SlaConfigPage-DZ4P1FFW.js → SlaConfigPage-D5TRn7Ir.js} +2 -2
- package/dist/chunks/{SlaConfigPage-DZ4P1FFW.js.map → SlaConfigPage-D5TRn7Ir.js.map} +1 -1
- package/dist/chunks/{SupportPermissionsPage-B4xy_pCQ.js → SupportPermissionsPage-Dc2bWTzG.js} +2 -2
- package/dist/chunks/{SupportPermissionsPage-B4xy_pCQ.js.map → SupportPermissionsPage-Dc2bWTzG.js.map} +1 -1
- package/dist/chunks/{SupportPermissionsPage-DW7KJjYK.js → SupportPermissionsPage-UXmYLrIq.js} +2 -2
- package/dist/chunks/{SupportPermissionsPage-DW7KJjYK.js.map → SupportPermissionsPage-UXmYLrIq.js.map} +1 -1
- package/dist/chunks/{TemplatesPage-DZa0PQTE.js → TemplatesPage-dmPlqqiD.js} +2 -2
- package/dist/chunks/{TemplatesPage-DZa0PQTE.js.map → TemplatesPage-dmPlqqiD.js.map} +1 -1
- package/dist/chunks/{TemplatesPage-m5-sLJ7F.js → TemplatesPage-nTY85sNA.js} +2 -2
- package/dist/chunks/{TemplatesPage-m5-sLJ7F.js.map → TemplatesPage-nTY85sNA.js.map} +1 -1
- package/dist/chunks/{TenantCard-BJQi7Oew.js → TenantCard-BUXfstRZ.js} +2 -2
- package/dist/chunks/{TenantCard-BJQi7Oew.js.map → TenantCard-BUXfstRZ.js.map} +1 -1
- package/dist/chunks/{TenantCard-CqfifMrM.js → TenantCard-BhT-31ls.js} +2 -2
- package/dist/chunks/{TenantCard-CqfifMrM.js.map → TenantCard-BhT-31ls.js.map} +1 -1
- package/dist/chunks/{TenantScopeSelector-CdiYJvuH.js → TenantScopeSelector-3_mzBLNI.js} +2 -2
- package/dist/chunks/{TenantScopeSelector-CdiYJvuH.js.map → TenantScopeSelector-3_mzBLNI.js.map} +1 -1
- package/dist/chunks/{TenantScopeSelector-Cl5DD318.js → TenantScopeSelector-B-SRDR2R.js} +2 -2
- package/dist/chunks/{TenantScopeSelector-Cl5DD318.js.map → TenantScopeSelector-B-SRDR2R.js.map} +1 -1
- package/dist/chunks/{TicketDetailPage-BOC9rHu3.js → TicketDetailPage-B4cR3rOC.js} +2 -2
- package/dist/chunks/{TicketDetailPage-BOC9rHu3.js.map → TicketDetailPage-B4cR3rOC.js.map} +1 -1
- package/dist/chunks/{TicketDetailPage-C1UuMxD8.js → TicketDetailPage-xN3wPnFL.js} +2 -2
- package/dist/chunks/{TicketDetailPage-C1UuMxD8.js.map → TicketDetailPage-xN3wPnFL.js.map} +1 -1
- package/dist/chunks/{TicketsPage-BCgHZA-m.js → TicketsPage-CkHgXSxU.js} +2 -2
- package/dist/chunks/{TicketsPage-BCgHZA-m.js.map → TicketsPage-CkHgXSxU.js.map} +1 -1
- package/dist/chunks/{TicketsPage-BjaN4Baq.js → TicketsPage-Dwi2xpMI.js} +2 -2
- package/dist/chunks/{TicketsPage-BjaN4Baq.js.map → TicketsPage-Dwi2xpMI.js.map} +1 -1
- package/dist/chunks/{UserCreateTicketPage-ChQL1mVY.js → UserCreateTicketPage-D2a3EOey.js} +3 -3
- package/dist/chunks/UserCreateTicketPage-D2a3EOey.js.map +1 -0
- package/dist/chunks/{UserCreateTicketPage-DkjsHeV7.js → UserCreateTicketPage-bcbSLglE.js} +48 -48
- package/dist/chunks/UserCreateTicketPage-bcbSLglE.js.map +1 -0
- package/dist/chunks/{UserDashboardPage-BMYrtF3o.js → UserDashboardPage-DwnDRNoW.js} +2 -2
- package/dist/chunks/{UserDashboardPage-BMYrtF3o.js.map → UserDashboardPage-DwnDRNoW.js.map} +1 -1
- package/dist/chunks/{UserDashboardPage-81-3GJAQ.js → UserDashboardPage-ZMsx8LWw.js} +2 -2
- package/dist/chunks/{UserDashboardPage-81-3GJAQ.js.map → UserDashboardPage-ZMsx8LWw.js.map} +1 -1
- package/dist/chunks/{UserDetailPage-BMW8jAWG.js → UserDetailPage-BRFowOFL.js} +2 -2
- package/dist/chunks/{UserDetailPage-BMW8jAWG.js.map → UserDetailPage-BRFowOFL.js.map} +1 -1
- package/dist/chunks/{UserDetailPage-D6oCH2eS.js → UserDetailPage-CZyV-zsg.js} +5 -5
- package/dist/chunks/{UserDetailPage-D6oCH2eS.js.map → UserDetailPage-CZyV-zsg.js.map} +1 -1
- package/dist/chunks/{UserTicketDetailPage-ZH2BDWBt.js → UserTicketDetailPage-BstGk_BP.js} +2 -2
- package/dist/chunks/{UserTicketDetailPage-ZH2BDWBt.js.map → UserTicketDetailPage-BstGk_BP.js.map} +1 -1
- package/dist/chunks/{UserTicketDetailPage-Z_myXXJ0.js → UserTicketDetailPage-DzB_pELt.js} +2 -2
- package/dist/chunks/{UserTicketDetailPage-Z_myXXJ0.js.map → UserTicketDetailPage-DzB_pELt.js.map} +1 -1
- package/dist/chunks/{UsersGroupsPage-B8Ka6uRa.js → UsersGroupsPage-BygTv_kK.js} +3 -3
- package/dist/chunks/{UsersGroupsPage-B8Ka6uRa.js.map → UsersGroupsPage-BygTv_kK.js.map} +1 -1
- package/dist/chunks/{UsersGroupsPage-xJmGib8b.js → UsersGroupsPage-DTmhzttW.js} +2 -2
- package/dist/chunks/{UsersGroupsPage-xJmGib8b.js.map → UsersGroupsPage-DTmhzttW.js.map} +1 -1
- package/dist/chunks/{UsersPage-CQ38akZ_.js → UsersPage-DcwLyMAX.js} +2 -2
- package/dist/chunks/{UsersPage-CQ38akZ_.js.map → UsersPage-DcwLyMAX.js.map} +1 -1
- package/dist/chunks/{UsersPage-Bd2-vl39.js → UsersPage-TIqSHgHj.js} +2 -2
- package/dist/chunks/{UsersPage-Bd2-vl39.js.map → UsersPage-TIqSHgHj.js.map} +1 -1
- package/dist/chunks/{accessRequestsApi-DguOx0q0.js → accessRequestsApi-3FjMFbpa.js} +2 -2
- package/dist/chunks/{accessRequestsApi-DguOx0q0.js.map → accessRequestsApi-3FjMFbpa.js.map} +1 -1
- package/dist/chunks/{accessRequestsApi-COtWo9kC.js → accessRequestsApi-B6dsJzvH.js} +2 -2
- package/dist/chunks/{accessRequestsApi-COtWo9kC.js.map → accessRequestsApi-B6dsJzvH.js.map} +1 -1
- package/dist/chunks/{aiApi-CITiWGYX.js → aiApi-9G4wG_mT.js} +2 -2
- package/dist/chunks/{aiApi-CITiWGYX.js.map → aiApi-9G4wG_mT.js.map} +1 -1
- package/dist/chunks/{aiApi-BmZsud6O.js → aiApi-DXOdsoxr.js} +2 -2
- package/dist/chunks/{aiApi-BmZsud6O.js.map → aiApi-DXOdsoxr.js.map} +1 -1
- package/dist/chunks/{applicationAnalyticsApi-BYoEJzSN.js → applicationAnalyticsApi-D0DEp9Y-.js} +2 -2
- package/dist/chunks/{applicationAnalyticsApi-BYoEJzSN.js.map → applicationAnalyticsApi-D0DEp9Y-.js.map} +1 -1
- package/dist/chunks/{applicationAnalyticsApi-D62lc6z4.js → applicationAnalyticsApi-DhOd6idI.js} +2 -2
- package/dist/chunks/{applicationAnalyticsApi-D62lc6z4.js.map → applicationAnalyticsApi-DhOd6idI.js.map} +1 -1
- package/dist/chunks/auth-Ca2Rn6on.js +2 -0
- package/dist/chunks/auth-Ca2Rn6on.js.map +1 -0
- package/dist/chunks/auth-ClNTDOqm.js +18 -0
- package/dist/chunks/auth-ClNTDOqm.js.map +1 -0
- package/dist/chunks/auth-DECnMZjF.js +18 -0
- package/dist/chunks/auth-DECnMZjF.js.map +1 -0
- package/dist/chunks/auth-DPvxdqy4.js +18 -0
- package/dist/chunks/auth-DPvxdqy4.js.map +1 -0
- package/dist/chunks/auth-HzvnTaOm.js +2 -0
- package/dist/chunks/auth-HzvnTaOm.js.map +1 -0
- package/dist/chunks/auth-M6aNTKCH.js +2 -0
- package/dist/chunks/auth-M6aNTKCH.js.map +1 -0
- package/dist/chunks/auth-UHnAu6_e.js +2 -0
- package/dist/chunks/auth-UHnAu6_e.js.map +1 -0
- package/dist/chunks/auth-YrujJY7m.js +18 -0
- package/dist/chunks/auth-YrujJY7m.js.map +1 -0
- package/dist/chunks/{groupsApi-3CR-_g5b.js → groupsApi-Db8G2lLs.js} +2 -2
- package/dist/chunks/{groupsApi-3CR-_g5b.js.map → groupsApi-Db8G2lLs.js.map} +1 -1
- package/dist/chunks/{groupsApi-BUyBgf_N.js → groupsApi-lbxNsHFv.js} +2 -2
- package/dist/chunks/{groupsApi-BUyBgf_N.js.map → groupsApi-lbxNsHFv.js.map} +1 -1
- package/dist/chunks/{index-IJR_91Yt.js → index-BI2dc1FS.js} +2 -2
- package/dist/chunks/{index-IJR_91Yt.js.map → index-BI2dc1FS.js.map} +1 -1
- package/dist/chunks/{index-DIQ6Jmmq.js → index-Bn8HzILk.js} +4 -4
- package/dist/chunks/{index-DIQ6Jmmq.js.map → index-Bn8HzILk.js.map} +1 -1
- package/dist/chunks/{index-DA5VyW0k.js → index-CN2WRyg1.js} +2249 -2264
- package/dist/chunks/index-CN2WRyg1.js.map +1 -0
- package/dist/chunks/{index-Br2wsGE8.js → index-CTGSmYvs.js} +2 -2
- package/dist/chunks/{index-Br2wsGE8.js.map → index-CTGSmYvs.js.map} +1 -1
- package/dist/chunks/index-CUICSveU.js +2 -0
- package/dist/chunks/index-CUICSveU.js.map +1 -0
- package/dist/chunks/{index-S-X8qFYW.js → index-CgtbaFf5.js} +2 -2
- package/dist/chunks/{index-S-X8qFYW.js.map → index-CgtbaFf5.js.map} +1 -1
- package/dist/chunks/{index-_g82N2nb.js → index-D0HS542b.js} +2 -2
- package/dist/chunks/{index-_g82N2nb.js.map → index-D0HS542b.js.map} +1 -1
- package/dist/chunks/{index-BIqcvvbh.js → index-DEtq-xUL.js} +9 -8
- package/dist/chunks/index-DEtq-xUL.js.map +1 -0
- package/dist/chunks/{index-BOKR3bw6.js → index-DF93KQFR.js} +2 -2
- package/dist/chunks/{index-BOKR3bw6.js.map → index-DF93KQFR.js.map} +1 -1
- package/dist/chunks/{index-CxgEV-rT.js → index-DLekpNSE.js} +2 -2
- package/dist/chunks/{index-CxgEV-rT.js.map → index-DLekpNSE.js.map} +1 -1
- package/dist/chunks/{index-DEOBhXS_.js → index-DUS-tunb.js} +2 -2
- package/dist/chunks/{index-DEOBhXS_.js.map → index-DUS-tunb.js.map} +1 -1
- package/dist/chunks/{index-BMsjMCv9.js → index-DjC1u2hI.js} +3 -3
- package/dist/chunks/{index-BMsjMCv9.js.map → index-DjC1u2hI.js.map} +1 -1
- package/dist/chunks/{index-BxHVPJ-j.js → index-DqbVFB1H.js} +2 -2
- package/dist/chunks/{index-BxHVPJ-j.js.map → index-DqbVFB1H.js.map} +1 -1
- package/dist/chunks/{index-Djy4eIbB.js → index-DwqLhQ8S.js} +2 -2
- package/dist/chunks/{index-Djy4eIbB.js.map → index-DwqLhQ8S.js.map} +1 -1
- package/dist/chunks/{index-C1w97Ejz.js → index-HsAOBno4.js} +2 -2
- package/dist/chunks/{index-C1w97Ejz.js.map → index-HsAOBno4.js.map} +1 -1
- package/dist/chunks/{index-Czk12A3G.js → index-TiWOcC0g.js} +2 -2
- package/dist/chunks/{index-Czk12A3G.js.map → index-TiWOcC0g.js.map} +1 -1
- package/dist/chunks/{index-vXiLh35n.js → index-cAikSVW0.js} +13 -13
- package/dist/chunks/index-cAikSVW0.js.map +1 -0
- package/dist/chunks/{index-CNxx56kE.js → index-xhRXN1Jq.js} +2 -2
- package/dist/chunks/{index-CNxx56kE.js.map → index-xhRXN1Jq.js.map} +1 -1
- package/dist/chunks/{tenantIconMap-COKA97Ug.js → tenantIconMap-CHeS7oLt.js} +2 -2
- package/dist/chunks/{tenantIconMap-COKA97Ug.js.map → tenantIconMap-CHeS7oLt.js.map} +1 -1
- package/dist/chunks/{tenantIconMap-BuSQUUyZ.js → tenantIconMap-__FKj6CN.js} +2 -2
- package/dist/chunks/{tenantIconMap-BuSQUUyZ.js.map → tenantIconMap-__FKj6CN.js.map} +1 -1
- package/dist/chunks/{ticketingApi-DbREwHez.js → ticketingApi-Cj239hYB.js} +2 -2
- package/dist/chunks/{ticketingApi-DbREwHez.js.map → ticketingApi-Cj239hYB.js.map} +1 -1
- package/dist/chunks/{ticketingApi-C6EbupqP.js → ticketingApi-DF4RwD_6.js} +2 -2
- package/dist/chunks/{ticketingApi-C6EbupqP.js.map → ticketingApi-DF4RwD_6.js.map} +1 -1
- package/dist/chunks/{useAccessRequests-vucIb3_w.js → useAccessRequests-CFam8zFR.js} +3 -3
- package/dist/chunks/{useAccessRequests-vucIb3_w.js.map → useAccessRequests-CFam8zFR.js.map} +1 -1
- package/dist/chunks/{useAccessRequests-C0dY6y-4.js → useAccessRequests-CViOUwyF.js} +2 -2
- package/dist/chunks/{useAccessRequests-C0dY6y-4.js.map → useAccessRequests-CViOUwyF.js.map} +1 -1
- package/dist/chunks/{useUserAccessRequests-BBcw1Rk9.js → useUserAccessRequests-B-Cs6NX1.js} +2 -2
- package/dist/chunks/{useUserAccessRequests-BBcw1Rk9.js.map → useUserAccessRequests-B-Cs6NX1.js.map} +1 -1
- package/dist/chunks/{useUserAccessRequests-Cj0nkesW.js → useUserAccessRequests-CslSQeBJ.js} +2 -2
- package/dist/chunks/{useUserAccessRequests-Cj0nkesW.js.map → useUserAccessRequests-CslSQeBJ.js.map} +1 -1
- package/dist/contexts/AuthContext.d.ts.map +1 -1
- package/dist/pages/LoginPage.d.ts.map +1 -1
- package/dist/pages/platform/administration/tenants/TenantDetailPage.d.ts.map +1 -1
- package/dist/pages/platform/support/UserCreateTicketPage.d.ts.map +1 -1
- package/dist/services/api/apiClient.d.ts.map +1 -1
- package/dist/services/support/ticketDraftService.d.ts.map +1 -1
- package/dist/smartstack.cjs +1 -1
- package/dist/smartstack.js +6 -6
- package/dist/utils/permissions.generated.d.ts +288 -0
- package/dist/utils/permissions.generated.d.ts.map +1 -0
- package/dist/utils/uuid.d.ts +6 -0
- package/dist/utils/uuid.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/chunks/UserCreateTicketPage-ChQL1mVY.js.map +0 -1
- package/dist/chunks/UserCreateTicketPage-DkjsHeV7.js.map +0 -1
- package/dist/chunks/auth-B-hELPDB.js +0 -2
- package/dist/chunks/auth-B-hELPDB.js.map +0 -1
- package/dist/chunks/auth-BYaMuq7D.js +0 -16
- package/dist/chunks/auth-BYaMuq7D.js.map +0 -1
- package/dist/chunks/auth-C5zpZ9k7.js +0 -2
- package/dist/chunks/auth-C5zpZ9k7.js.map +0 -1
- package/dist/chunks/auth-CDpRMVv1.js +0 -16
- package/dist/chunks/auth-CDpRMVv1.js.map +0 -1
- package/dist/chunks/auth-CyPkCta2.js +0 -2
- package/dist/chunks/auth-CyPkCta2.js.map +0 -1
- package/dist/chunks/auth-DL47kvnl.js +0 -2
- package/dist/chunks/auth-DL47kvnl.js.map +0 -1
- package/dist/chunks/auth-Diiv90i1.js +0 -16
- package/dist/chunks/auth-Diiv90i1.js.map +0 -1
- package/dist/chunks/auth-rog9MvUr.js +0 -16
- package/dist/chunks/auth-rog9MvUr.js.map +0 -1
- package/dist/chunks/index-BIqcvvbh.js.map +0 -1
- package/dist/chunks/index-DA5VyW0k.js.map +0 -1
- package/dist/chunks/index-Dht6EQW1.js +0 -2
- package/dist/chunks/index-Dht6EQW1.js.map +0 -1
- package/dist/chunks/index-vXiLh35n.js.map +0 -1
package/dist/chunks/{ReferencesManagementPage-C0RgHbJb.js → ReferencesManagementPage-CLsaUNqA.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),Me=require("react-i18next"),i=require("lucide-react"),C=require("./index-vXiLh35n.js"),se=require("./TenantScopeSelector-CdiYJvuH.js"),Ae=a=>({get:(s,u)=>C.apiClient.get(s,{...u,headers:a?{...u?.headers,"X-Tenant-Slug":a}:u?.headers}).then(r=>r.data),post:(s,u,r)=>C.apiClient.post(s,u,{...r,headers:a?{...r?.headers,"X-Tenant-Slug":a}:r?.headers}).then(c=>c.data),put:(s,u,r)=>C.apiClient.put(s,u,{...r,headers:a?{...r?.headers,"X-Tenant-Slug":a}:r?.headers}).then(c=>c.data),patch:(s,u,r)=>C.apiClient.patch(s,u,{...r,headers:a?{...r?.headers,"X-Tenant-Slug":a}:r?.headers}).then(c=>c.data),delete:(s,u)=>C.apiClient.delete(s,{...u,headers:a?{...u?.headers,"X-Tenant-Slug":a}:u?.headers}).then(r=>r.data)}),q={Company:0,Department:1,JobTitle:2,Office:3},v="/api/administration/users/references",Ie=a=>{const s=a?Ae(a):C.api,u=(r,c,d)=>{const h=new URLSearchParams;c&&h.append("tenantId",c),d&&Object.entries(d).forEach(([f,b])=>{b!==void 0&&h.append(f,String(b))});const o=h.toString();return o?`${v}/${r}?${o}`:`${v}/${r}`};return{companies:{getAll:async(r,c,d,h,o=1,f=20)=>{const b=u("companies",r,{search:c,isActive:d,source:h,page:o,pageSize:f});return s.get(b)},create:async(r,c)=>{const d=u("companies",r);return s.post(d,c)},update:async(r,c)=>{await s.put(`${v}/companies/${r}`,c)},activate:async r=>{await s.patch(`${v}/companies/${r}/activate`)},deactivate:async r=>{await s.patch(`${v}/companies/${r}/deactivate`)},delete:async r=>{await s.delete(`${v}/companies/${r}`)}},departments:{getAll:async(r,c,d,h,o=1,f=20)=>{const b=u("departments",r,{search:c,isActive:d,source:h,page:o,pageSize:f});return s.get(b)},create:async(r,c)=>{const d=u("departments",r);return s.post(d,c)},update:async(r,c)=>{await s.put(`${v}/departments/${r}`,c)},activate:async r=>{await s.patch(`${v}/departments/${r}/activate`)},deactivate:async r=>{await s.patch(`${v}/departments/${r}/deactivate`)},delete:async r=>{await s.delete(`${v}/departments/${r}`)}},jobTitles:{getAll:async(r,c,d,h,o=1,f=20)=>{const b=u("job-titles",r,{search:c,isActive:d,source:h,page:o,pageSize:f});return s.get(b)},create:async(r,c)=>{const d=u("job-titles",r);return s.post(d,c)},update:async(r,c)=>{await s.put(`${v}/job-titles/${r}`,c)},activate:async r=>{await s.patch(`${v}/job-titles/${r}/activate`)},deactivate:async r=>{await s.patch(`${v}/job-titles/${r}/deactivate`)},delete:async r=>{await s.delete(`${v}/job-titles/${r}`)}},offices:{getAll:async(r,c,d,h,o=1,f=20)=>{const b=u("offices",r,{search:c,isActive:d,source:h,page:o,pageSize:f});return s.get(b)},create:async(r,c)=>{const d=u("offices",r);return s.post(d,c)},update:async(r,c)=>{await s.put(`${v}/offices/${r}`,c)},activate:async r=>{await s.patch(`${v}/offices/${r}/activate`)},deactivate:async r=>{await s.patch(`${v}/offices/${r}/deactivate`)},delete:async r=>{await s.delete(`${v}/offices/${r}`)}},merge:{execute:async r=>s.post(`${v}/merge`,r),preview:async r=>s.post(`${v}/merge/preview`,r),getHistory:async(r,c,d,h)=>{const o=new URLSearchParams;r&&o.append("tenantId",r),c!==void 0&&o.append("referenceType",String(c)),d&&o.append("from",d),h&&o.append("to",h);const f=o.toString(),b=f?`${v}/merge/history?${f}`:`${v}/merge/history`;return s.get(b)}}}},ne=Ie;function Re(){const{t:a}=Me.useTranslation("admin"),{currentTenant:s,userTenants:u,switchTenant:r}=C.useTenant(),{tenants:c}=se.useAdminTenants(),[d,h]=l.useState(s?{tenantId:s.id,tenantSlug:s.slug,tenantUserId:"",tenantName:s.name}:"global"),o=d==="global",f=o?null:d.tenantId,b=o?void 0:d.tenantSlug,p=l.useMemo(()=>ne(b),[b]),[N,ce]=l.useState("departments"),[T,oe]=l.useState([]),[G,W]=l.useState(!0),[$,ie]=l.useState(""),[F,le]=l.useState(!1),[w,A]=l.useState(new Set),[g,U]=l.useState(1),[M]=l.useState(20),[K,de]=l.useState(0),[I,me]=l.useState(0),[xe,H]=l.useState(!1),[ue,L]=l.useState(!1),[pe,X]=l.useState(!1),[ve,O]=l.useState(!1),[R,Q]=l.useState(null),[B,V]=l.useState(null),[Y,he]=l.useState([]),[J,D]=l.useState(null),[x,S]=l.useState({code:"",name:""}),[P,Z]=l.useState(null),[ee,te]=l.useState(""),[E,z]=l.useState(!1),[ae,j]=l.useState(null),re=[{id:"departments",label:a("references.tabs.departments","Departments"),icon:i.Users,referenceType:q.Department},{id:"companies",label:a("references.tabs.companies","Companies"),icon:i.Building2,referenceType:q.Company},{id:"jobTitles",label:a("references.tabs.jobTitles","Job Titles"),icon:i.Briefcase,referenceType:q.JobTitle},{id:"offices",label:a("references.tabs.offices","Offices"),icon:i.MapPin,referenceType:q.Office}],_=re.find(t=>t.id===N),y=f,k=l.useCallback(async()=>{try{W(!0);const t=ne(b??void 0),n=F?void 0:!0;let m;switch(N){case"companies":m=await t.companies.getAll(y,$||void 0,n,void 0,g,M);break;case"departments":m=await t.departments.getAll(y,$||void 0,n,void 0,g,M);break;case"jobTitles":m=await t.jobTitles.getAll(y,$||void 0,n,void 0,g,M);break;case"offices":m=await t.offices.getAll(y,$||void 0,n,void 0,g,M);break;default:m={items:[],totalCount:0,page:1,pageSize:20,totalPages:0,hasPreviousPage:!1,hasNextPage:!1}}oe(m.items),de(m.totalCount),me(m.totalPages),A(new Set)}catch(t){console.error("Failed to load references:",t),j("Failed to load references")}finally{W(!1)}},[b,N,y,$,F,g,M]);l.useEffect(()=>{k()},[k]),l.useEffect(()=>{U(1)},[N,$,F,d]);const be=t=>{const n=new Set(w);n.has(t)?n.delete(t):n.add(t),A(n)},fe=()=>{w.size===T.length?A(new Set):A(new Set(T.map(t=>t.id)))},ge=async t=>{try{await r(t);const n=u.find(m=>m.id===t);n&&h({tenantId:n.id,tenantSlug:n.slug,tenantUserId:"",tenantName:n.name})}catch(n){console.error("Failed to switch tenant:",n)}},ye=async()=>{if(y)try{switch(z(!0),j(null),N){case"companies":await p.companies.create(y,x);break;case"departments":await p.departments.create(y,x);break;case"jobTitles":await p.jobTitles.create(y,x);break;case"offices":await p.offices.create(y,x);break}H(!1),S({code:"",name:""}),k()}catch(t){const n=t instanceof Error?t.message:"Failed to create";j(n)}finally{z(!1)}},je=async()=>{if(R)try{z(!0),j(null);const t={name:x.name,shortName:x.shortName,description:x.description};switch(N){case"companies":await p.companies.update(R.id,t);break;case"departments":await p.departments.update(R.id,t);break;case"jobTitles":await p.jobTitles.update(R.id,t);break;case"offices":await p.offices.update(R.id,t);break}L(!1),Q(null),k()}catch(t){const n=t instanceof Error?t.message:"Failed to update";j(n)}finally{z(!1)}},Ne=async t=>{if(confirm(a("references.confirmDelete","Are you sure you want to delete this reference?")))try{switch(N){case"companies":await p.companies.delete(t);break;case"departments":await p.departments.delete(t);break;case"jobTitles":await p.jobTitles.delete(t);break;case"offices":await p.offices.delete(t);break}k()}catch(n){const m=n instanceof Error?n.message:"Failed to delete";j(m)}},we=async t=>{try{if(t.isActive)switch(N){case"companies":await p.companies.deactivate(t.id);break;case"departments":await p.departments.deactivate(t.id);break;case"jobTitles":await p.jobTitles.deactivate(t.id);break;case"offices":await p.offices.deactivate(t.id);break}else switch(N){case"companies":await p.companies.activate(t.id);break;case"departments":await p.departments.activate(t.id);break;case"jobTitles":await p.jobTitles.activate(t.id);break;case"offices":await p.offices.activate(t.id);break}k()}catch(n){const m=n instanceof Error?n.message:"Failed to toggle status";j(m)}},Se=async()=>{if(!(w.size<2))try{const t=await p.merge.preview({tenantId:y,referenceType:_.referenceType,sourceIds:Array.from(w)});V(t),Z(null),te(""),X(!0)}catch(t){console.error("Failed to get merge preview:",t),j("Failed to preview merge")}},ke=async()=>{if(!P||!B)return;const t=Array.from(w).filter(n=>n!==P);try{z(!0),j(null),await p.merge.execute({tenantId:y,referenceType:_.referenceType,targetId:P,sourceIds:t,reason:ee||void 0}),X(!1),A(new Set),V(null),k()}catch(n){const m=n instanceof Error?n.message:"Failed to merge";j(m)}finally{z(!1)}},Ce=async()=>{try{const t=await p.merge.getHistory(y,_.referenceType);he(t),O(!0)}catch(t){console.error("Failed to load merge history:",t),j("Failed to load merge history")}},Te=t=>{Q(t),S({code:t.code,name:t.name,shortName:t.shortName,description:t.description}),L(!0),D(null)},$e=t=>t.isMerged?e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 text-xs font-medium rounded-full bg-[var(--info-bg)] text-[var(--info-text)]",children:[e.jsx(i.GitMerge,{className:"w-3 h-3"}),a("references.merged","Merged")]}):t.isActive?null:e.jsx("span",{className:"inline-flex items-center gap-1 px-2 py-1 text-xs font-medium rounded-full bg-[var(--bg-secondary)] text-[var(--text-secondary)]",children:a("references.inactive","Inactive")});return e.jsxs("div",{className:"p-6",children:[e.jsx("div",{className:"mb-6",children:e.jsx(C.Breadcrumb,{items:[{label:a("admin.title","Administration"),href:"/administration"},{label:a("users.title","Users"),href:"/administration/users"},{label:a("references.title","References")}]})}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-[var(--text-primary)]",children:a("references.title","Reference Data Management")}),e.jsx("p",{className:"text-[var(--text-secondary)] mt-1",children:a("references.description","Manage companies, departments, job titles, and offices for your organization")}),e.jsxs("div",{className:"mt-4",children:[e.jsx(se.TenantScopeSelector,{value:d,onChange:h,adminTenants:c.map(t=>({tenantId:t.id,tenantSlug:t.slug,tenantName:t.name,tenantType:t.type}))}),o&&e.jsxs("p",{className:"mt-2 text-sm text-[var(--text-secondary)] flex items-center gap-1.5",children:[e.jsx(i.Globe,{className:"w-4 h-4"}),a("references.globalModeInfo","Showing references from all tenants. Select a tenant to manage its data.")]})]})]}),ae&&e.jsxs("div",{className:"mb-4 p-4 bg-[var(--error-bg)] border border-[var(--error-border)] rounded-[var(--radius-card)]",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(i.AlertCircle,{className:"w-5 h-5 text-[var(--error-text)]"}),e.jsx("span",{className:"ml-2 text-[var(--error-text)]",children:ae}),e.jsx("button",{onClick:()=>j(null),className:"ml-auto text-[var(--error-text)]",children:e.jsx(i.X,{className:"w-4 h-4"})})]}),e.jsx("button",{onClick:()=>k(),className:"mt-2 text-sm text-[var(--error-text)] hover:opacity-80 underline",children:a("common.retry","Retry")})]}),e.jsx("div",{className:"border-b border-[var(--border-color)] mb-6",children:e.jsx("nav",{className:"flex gap-4 -mb-px",children:re.map(t=>{const n=t.icon,m=N===t.id;return e.jsxs("button",{onClick:()=>{ce(t.id),A(new Set)},className:`flex items-center gap-2 px-4 py-3 border-b-2 font-medium text-sm transition-colors ${m?"border-[var(--color-accent-500)] text-[var(--color-accent-600)]":"border-transparent text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--border-color)]"}`,children:[e.jsx(n,{className:"w-4 h-4"}),t.label]},t.id)})})}),e.jsxs("div",{className:"flex items-center justify-between gap-4 mb-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx(i.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--text-tertiary)]"}),e.jsx("input",{type:"text",value:$,onChange:t=>ie(t.target.value),placeholder:a("common.search","Search..."),className:"pl-10 pr-4 py-2 border border-[var(--border-color)] rounded-[var(--radius-input)] bg-[var(--bg-primary)] text-[var(--text-primary)] focus:ring-2 focus:ring-[var(--color-accent-500)]"})]}),e.jsxs("label",{className:"flex items-center gap-2 text-sm text-[var(--text-secondary)]",children:[e.jsx("input",{type:"checkbox",checked:F,onChange:t=>le(t.target.checked),className:"rounded border-[var(--border-color)]"}),a("references.showInactive","Show inactive")]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[w.size>=2&&!o&&e.jsxs("button",{onClick:Se,className:"flex items-center gap-2 px-4 py-2 bg-[var(--info-dot)] text-white rounded-[var(--radius-button)] hover:opacity-90 transition-opacity",children:[e.jsx(i.GitMerge,{className:"w-4 h-4"}),a("references.merge","Merge")," (",w.size,")"]}),!o&&e.jsxs("button",{onClick:Ce,className:"flex items-center gap-2 px-4 py-2 border border-[var(--border-color)] text-[var(--text-primary)] rounded-[var(--radius-button)] hover:bg-[var(--bg-hover)] transition-colors",children:[e.jsx(i.History,{className:"w-4 h-4"}),a("references.history","History")]}),e.jsxs("button",{onClick:()=>{S({code:"",name:""}),H(!0)},disabled:o,title:o?a("references.selectTenantToCreate","Select a tenant to create a reference"):void 0,className:`flex items-center gap-2 px-4 py-2 rounded-[var(--radius-button)] transition-colors ${o?"bg-[var(--bg-secondary)] text-[var(--text-tertiary)] cursor-not-allowed":"bg-[var(--color-accent-600)] text-white hover:bg-[var(--color-accent-700)]"}`,children:[e.jsx(i.Plus,{className:"w-4 h-4"}),a("common.create","Create")]})]})]}),e.jsxs("div",{className:"card overflow-hidden",children:[G&&e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(i.Loader2,{className:"w-8 h-8 animate-spin text-[var(--color-accent-500)]"})}),!G&&T.length===0&&e.jsx("div",{className:"text-center py-12 text-[var(--text-secondary)]",children:a("references.noItems","No items found")}),!G&&T.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-[var(--bg-secondary)] border-b border-[var(--border-color)]",children:e.jsxs("tr",{children:[e.jsx("th",{className:"w-12 px-4 py-3",children:!o&&e.jsx("input",{type:"checkbox",checked:w.size===T.length&&T.length>0,onChange:fe,className:"rounded border-[var(--border-color)]"})}),e.jsx("th",{className:"px-4 py-3 text-left text-sm font-medium text-[var(--text-secondary)]",children:a("references.code","Code")}),e.jsx("th",{className:"px-4 py-3 text-left text-sm font-medium text-[var(--text-secondary)]",children:a("references.name","Name")}),o&&e.jsx("th",{className:"px-4 py-3 text-left text-sm font-medium text-[var(--text-secondary)]",children:a("references.tenant","Tenant")}),e.jsx("th",{className:"px-4 py-3 text-left text-sm font-medium text-[var(--text-secondary)]",children:a("references.shortName","Short Name")}),e.jsx("th",{className:"px-4 py-3 text-center text-sm font-medium text-[var(--text-secondary)]",children:a("references.users","Users")}),e.jsx("th",{className:"px-4 py-3 text-center text-sm font-medium text-[var(--text-secondary)]",children:a("references.status","Status")}),e.jsx("th",{className:"w-20 px-4 py-3"})]})}),e.jsx("tbody",{className:"divide-y divide-[var(--border-color)]",children:T.map(t=>e.jsxs("tr",{className:`hover:bg-[var(--bg-hover)] transition-colors ${w.has(t.id)?"bg-[var(--info-bg)]":""} ${t.isMerged?"opacity-60":""}`,children:[e.jsx("td",{className:"px-4 py-3",children:!o&&e.jsx("input",{type:"checkbox",checked:w.has(t.id),onChange:()=>be(t.id),disabled:t.isMerged,className:"rounded border-[var(--border-color)]"})}),e.jsx("td",{className:"px-4 py-3 font-mono text-sm text-[var(--text-primary)]",children:t.code}),e.jsx("td",{className:"px-4 py-3 text-[var(--text-primary)]",children:t.name}),o&&e.jsx("td",{className:"px-4 py-3",children:t.tenantName?e.jsxs("button",{onClick:()=>t.tenantId&&ge(t.tenantId),className:"inline-flex items-center gap-1.5 px-2 py-1 text-xs font-medium rounded-full bg-[var(--info-bg)] text-[var(--info-text)] hover:opacity-80 transition-opacity",title:a("references.switchToTenant","Switch to this tenant"),children:[e.jsx(i.Building2,{className:"w-3 h-3"}),t.tenantName]}):e.jsx("span",{className:"text-[var(--text-tertiary)]",children:"-"})}),e.jsx("td",{className:"px-4 py-3 text-[var(--text-secondary)]",children:t.shortName||"-"}),e.jsx("td",{className:"px-4 py-3 text-center",children:e.jsxs("span",{className:"inline-flex items-center gap-1 text-[var(--text-secondary)]",children:[e.jsx(i.Users,{className:"w-4 h-4"}),t.userCount]})}),e.jsxs("td",{className:"px-4 py-3 text-center",children:[$e(t),t.isActive&&!t.isMerged&&e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 text-xs font-medium rounded-full bg-[var(--success-bg)] text-[var(--success-text)]",children:[e.jsx(i.Check,{className:"w-3 h-3"}),a("references.active","Active")]})]}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"relative",children:[e.jsx("button",{onClick:()=>D(J===t.id?null:t.id),className:"p-2 hover:bg-[var(--bg-secondary)] rounded-[var(--radius-button)] transition-colors",disabled:t.isMerged||o,children:e.jsx(i.MoreHorizontal,{className:"w-4 h-4"})}),J===t.id&&e.jsxs("div",{className:"absolute right-0 top-full mt-1 w-48 bg-[var(--bg-primary)] border border-[var(--border-color)] rounded-[var(--radius-card)] shadow-lg z-10",children:[e.jsxs("button",{onClick:()=>Te(t),className:"flex items-center gap-2 w-full px-4 py-2 text-left text-sm text-[var(--text-primary)] hover:bg-[var(--bg-hover)]",children:[e.jsx(i.Edit2,{className:"w-4 h-4"}),a("common.edit","Edit")]}),e.jsx("button",{onClick:()=>{we(t),D(null)},className:"flex items-center gap-2 w-full px-4 py-2 text-left text-sm text-[var(--text-primary)] hover:bg-[var(--bg-hover)]",children:t.isActive?a("common.deactivate","Deactivate"):a("common.activate","Activate")}),t.userCount===0&&e.jsxs("button",{onClick:()=>{Ne(t.id),D(null)},className:"flex items-center gap-2 w-full px-4 py-2 text-left text-sm text-[var(--error-text)] hover:bg-[var(--error-bg)]",children:[e.jsx(i.Trash2,{className:"w-4 h-4"}),a("common.delete","Delete")]})]})]})})]},t.id))})]}),e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-t border-[var(--border-color)] bg-[var(--bg-secondary)]",children:[e.jsxs("div",{className:"text-sm text-[var(--text-secondary)]",children:[a("references.showing","Showing")," ",(g-1)*M+1," ",a("references.to","to")," ",Math.min(g*M,K)," ",a("references.of","of")," ",K," ",a("references.results","results")]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>U(t=>Math.max(1,t-1)),disabled:g===1,className:"px-3 py-1.5 border border-[var(--border-color)] rounded-[var(--radius-button)] text-[var(--text-primary)] hover:bg-[var(--bg-hover)] transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:a("common.previous","Previous")}),e.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:Math.min(5,I)},(t,n)=>{let m;return I<=5||g<=3?m=n+1:g>=I-2?m=I-4+n:m=g-2+n,e.jsx("button",{onClick:()=>U(m),className:`px-3 py-1.5 rounded-[var(--radius-button)] transition-colors ${g===m?"bg-[var(--color-accent-600)] text-white":"border border-[var(--border-color)] text-[var(--text-primary)] hover:bg-[var(--bg-hover)]"}`,children:m},m)})}),e.jsx("button",{onClick:()=>U(t=>Math.min(I,t+1)),disabled:g===I,className:"px-3 py-1.5 border border-[var(--border-color)] rounded-[var(--radius-button)] text-[var(--text-primary)] hover:bg-[var(--bg-hover)] transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:a("common.next","Next")})]})]})]})]}),xe&&e.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50",children:e.jsxs("div",{className:"card w-full max-w-md p-6 m-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h2",{className:"text-xl font-semibold text-[var(--text-primary)]",children:a("references.createTitle","Create Reference")}),e.jsx("button",{onClick:()=>H(!1),className:"text-[var(--text-tertiary)] hover:text-[var(--text-primary)]",children:e.jsx(i.X,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-[var(--text-secondary)] mb-1",children:[a("references.code","Code")," *"]}),e.jsx("input",{type:"text",value:x.code,onChange:t=>S({...x,code:t.target.value}),className:"w-full px-4 py-2 border border-[var(--border-color)] rounded-[var(--radius-input)] bg-[var(--bg-primary)] text-[var(--text-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-accent-500)]"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-[var(--text-secondary)] mb-1",children:[a("references.name","Name")," *"]}),e.jsx("input",{type:"text",value:x.name,onChange:t=>S({...x,name:t.target.value}),className:"w-full px-4 py-2 border border-[var(--border-color)] rounded-[var(--radius-input)] bg-[var(--bg-primary)] text-[var(--text-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-accent-500)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-[var(--text-secondary)] mb-1",children:a("references.shortName","Short Name")}),e.jsx("input",{type:"text",value:x.shortName||"",onChange:t=>S({...x,shortName:t.target.value||null}),className:"w-full px-4 py-2 border border-[var(--border-color)] rounded-[var(--radius-input)] bg-[var(--bg-primary)] text-[var(--text-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-accent-500)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-[var(--text-secondary)] mb-1",children:a("references.description","Description")}),e.jsx("textarea",{value:x.description||"",onChange:t=>S({...x,description:t.target.value||null}),rows:3,className:"w-full px-4 py-2 border border-[var(--border-color)] rounded-[var(--radius-input)] bg-[var(--bg-primary)] text-[var(--text-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-accent-500)]"})]})]}),e.jsxs("div",{className:"flex justify-end gap-3 mt-6",children:[e.jsx("button",{onClick:()=>H(!1),className:"px-4 py-2 rounded-[var(--radius-button)] bg-[var(--bg-secondary)] text-[var(--text-secondary)] hover:bg-[var(--bg-hover)] transition-colors",children:a("common.cancel","Cancel")}),e.jsxs("button",{onClick:ye,disabled:E||!x.code||!x.name,className:"flex items-center gap-2 px-4 py-2 rounded-[var(--radius-button)] bg-[var(--color-accent-600)] text-white hover:bg-[var(--color-accent-700)] transition-colors disabled:opacity-50",children:[E&&e.jsx(i.Loader2,{className:"w-4 h-4 animate-spin"}),a("common.create","Create")]})]})]})}),ue&&R&&e.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50",children:e.jsxs("div",{className:"card w-full max-w-md p-6 m-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h2",{className:"text-xl font-semibold text-[var(--text-primary)]",children:a("references.editTitle","Edit Reference")}),e.jsx("button",{onClick:()=>L(!1),className:"text-[var(--text-tertiary)] hover:text-[var(--text-primary)]",children:e.jsx(i.X,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-[var(--text-secondary)] mb-1",children:a("references.code","Code")}),e.jsx("input",{type:"text",value:x.code,disabled:!0,className:"w-full px-4 py-2 border border-[var(--border-color)] rounded-[var(--radius-input)] bg-[var(--bg-secondary)] text-[var(--text-tertiary)] cursor-not-allowed"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-[var(--text-secondary)] mb-1",children:[a("references.name","Name")," *"]}),e.jsx("input",{type:"text",value:x.name,onChange:t=>S({...x,name:t.target.value}),className:"w-full px-4 py-2 border border-[var(--border-color)] rounded-[var(--radius-input)] bg-[var(--bg-primary)] text-[var(--text-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-accent-500)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-[var(--text-secondary)] mb-1",children:a("references.shortName","Short Name")}),e.jsx("input",{type:"text",value:x.shortName||"",onChange:t=>S({...x,shortName:t.target.value||null}),className:"w-full px-4 py-2 border border-[var(--border-color)] rounded-[var(--radius-input)] bg-[var(--bg-primary)] text-[var(--text-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-accent-500)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-[var(--text-secondary)] mb-1",children:a("references.description","Description")}),e.jsx("textarea",{value:x.description||"",onChange:t=>S({...x,description:t.target.value||null}),rows:3,className:"w-full px-4 py-2 border border-[var(--border-color)] rounded-[var(--radius-input)] bg-[var(--bg-primary)] text-[var(--text-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-accent-500)]"})]})]}),e.jsxs("div",{className:"flex justify-end gap-3 mt-6",children:[e.jsx("button",{onClick:()=>L(!1),className:"px-4 py-2 rounded-[var(--radius-button)] bg-[var(--bg-secondary)] text-[var(--text-secondary)] hover:bg-[var(--bg-hover)] transition-colors",children:a("common.cancel","Cancel")}),e.jsxs("button",{onClick:je,disabled:E||!x.name,className:"flex items-center gap-2 px-4 py-2 rounded-[var(--radius-button)] bg-[var(--color-accent-600)] text-white hover:bg-[var(--color-accent-700)] transition-colors disabled:opacity-50",children:[E&&e.jsx(i.Loader2,{className:"w-4 h-4 animate-spin"}),a("common.save","Save")]})]})]})}),pe&&B&&e.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50",children:e.jsxs("div",{className:"card w-full max-w-lg p-6 m-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("h2",{className:"text-xl font-semibold text-[var(--text-primary)] flex items-center gap-2",children:[e.jsx(i.GitMerge,{className:"w-5 h-5 text-[var(--info-dot)]"}),a("references.mergeTitle","Merge References")]}),e.jsx("button",{onClick:()=>X(!1),className:"text-[var(--text-tertiary)] hover:text-[var(--text-primary)]",children:e.jsx(i.X,{className:"w-5 h-5"})})]}),e.jsx("p",{className:"text-sm text-[var(--text-secondary)] mb-4",children:a("references.mergeDescription","Select the target reference. All other selected references will be merged into it and their users will be reassigned.")}),e.jsxs("div",{className:"space-y-2 mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-[var(--text-secondary)]",children:a("references.selectTarget","Select target reference")}),B.sources.map(t=>e.jsxs("label",{className:`flex items-center gap-3 p-3 border rounded-[var(--radius-card)] cursor-pointer transition-colors ${P===t.id?"border-[var(--info-dot)] bg-[var(--info-bg)]":"border-[var(--border-color)] hover:border-[var(--color-accent-500)]"}`,children:[e.jsx("input",{type:"radio",name:"mergeTarget",value:t.id,checked:P===t.id,onChange:()=>Z(t.id),className:"text-[var(--info-dot)]"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-medium text-[var(--text-primary)]",children:t.name}),e.jsxs("div",{className:"text-sm text-[var(--text-secondary)]",children:[t.code," ",t.shortName&&`(${t.shortName})`]})]}),e.jsxs("span",{className:"text-sm text-[var(--text-secondary)]",children:[t.userCount," ",a("references.users","users")]})]},t.id))]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-[var(--text-secondary)] mb-1",children:a("references.mergeReason","Reason (optional)")}),e.jsx("textarea",{value:ee,onChange:t=>te(t.target.value),rows:2,placeholder:a("references.mergeReasonPlaceholder","Why are you merging these references?"),className:"w-full px-4 py-2 border border-[var(--border-color)] rounded-[var(--radius-input)] bg-[var(--bg-primary)] text-[var(--text-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-accent-500)]"})]}),e.jsx("div",{className:"p-3 bg-[var(--warning-bg)] border border-[var(--warning-border)] rounded-[var(--radius-card)] mb-4",children:e.jsxs("p",{className:"text-sm text-[var(--warning-text)]",children:[e.jsx("strong",{children:B.totalUsersAffected})," ",a("references.usersWillBeReassigned","users will be reassigned")]})}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx("button",{onClick:()=>X(!1),className:"px-4 py-2 rounded-[var(--radius-button)] bg-[var(--bg-secondary)] text-[var(--text-secondary)] hover:bg-[var(--bg-hover)] transition-colors",children:a("common.cancel","Cancel")}),e.jsxs("button",{onClick:ke,disabled:E||!P,className:"flex items-center gap-2 px-4 py-2 rounded-[var(--radius-button)] bg-[var(--info-dot)] text-white hover:opacity-90 transition-opacity disabled:opacity-50",children:[E&&e.jsx(i.Loader2,{className:"w-4 h-4 animate-spin"}),e.jsx(i.GitMerge,{className:"w-4 h-4"}),a("references.merge","Merge")]})]})]})}),ve&&e.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50",children:e.jsxs("div",{className:"card w-full max-w-2xl p-6 m-4 max-h-[80vh] overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("h2",{className:"text-xl font-semibold text-[var(--text-primary)] flex items-center gap-2",children:[e.jsx(i.History,{className:"w-5 h-5"}),a("references.historyTitle","Merge History")]}),e.jsx("button",{onClick:()=>O(!1),className:"text-[var(--text-tertiary)] hover:text-[var(--text-primary)]",children:e.jsx(i.X,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"overflow-y-auto flex-1",children:Y.length===0?e.jsx("div",{className:"text-center py-8 text-[var(--text-secondary)]",children:a("references.noHistory","No merge history found")}):e.jsx("div",{className:"space-y-3",children:Y.map(t=>e.jsxs("div",{className:"p-4 border border-[var(--border-color)] rounded-[var(--radius-card)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(i.GitMerge,{className:"w-4 h-4 text-[var(--info-dot)]"}),e.jsx("span",{className:"font-medium text-[var(--text-primary)]",children:t.sourceReferenceName}),e.jsx("span",{className:"text-[var(--text-secondary)]",children:"→"}),e.jsx("span",{className:"font-medium text-[var(--text-primary)]",children:t.targetReferenceName})]}),e.jsxs("div",{className:"text-sm text-[var(--text-secondary)] space-y-1",children:[e.jsxs("div",{children:[t.affectedUserCount," users reassigned"]}),e.jsxs("div",{children:["By ",t.mergedByUserName]}),e.jsx("div",{children:new Date(t.mergedAt).toLocaleString()}),t.mergeReason&&e.jsxs("div",{className:"italic",children:['"',t.mergeReason,'"']})]})]},t.id))})}),e.jsx("div",{className:"flex justify-end mt-4 pt-4 border-t border-[var(--border-color)]",children:e.jsx("button",{onClick:()=>O(!1),className:"px-4 py-2 rounded-[var(--radius-button)] bg-[var(--bg-secondary)] text-[var(--text-secondary)] hover:bg-[var(--bg-hover)] transition-colors",children:a("common.close","Close")})})]})}),J&&e.jsx("button",{type:"button",className:"fixed inset-0 z-0",onClick:()=>D(null),"aria-label":"Close menu"})]})}exports.ReferencesManagementPage=Re;
|
|
2
|
-
//# sourceMappingURL=ReferencesManagementPage-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),Me=require("react-i18next"),i=require("lucide-react"),C=require("./index-cAikSVW0.js"),se=require("./TenantScopeSelector-3_mzBLNI.js"),Ae=a=>({get:(s,u)=>C.apiClient.get(s,{...u,headers:a?{...u?.headers,"X-Tenant-Slug":a}:u?.headers}).then(r=>r.data),post:(s,u,r)=>C.apiClient.post(s,u,{...r,headers:a?{...r?.headers,"X-Tenant-Slug":a}:r?.headers}).then(c=>c.data),put:(s,u,r)=>C.apiClient.put(s,u,{...r,headers:a?{...r?.headers,"X-Tenant-Slug":a}:r?.headers}).then(c=>c.data),patch:(s,u,r)=>C.apiClient.patch(s,u,{...r,headers:a?{...r?.headers,"X-Tenant-Slug":a}:r?.headers}).then(c=>c.data),delete:(s,u)=>C.apiClient.delete(s,{...u,headers:a?{...u?.headers,"X-Tenant-Slug":a}:u?.headers}).then(r=>r.data)}),q={Company:0,Department:1,JobTitle:2,Office:3},v="/api/administration/users/references",Ie=a=>{const s=a?Ae(a):C.api,u=(r,c,d)=>{const h=new URLSearchParams;c&&h.append("tenantId",c),d&&Object.entries(d).forEach(([f,b])=>{b!==void 0&&h.append(f,String(b))});const o=h.toString();return o?`${v}/${r}?${o}`:`${v}/${r}`};return{companies:{getAll:async(r,c,d,h,o=1,f=20)=>{const b=u("companies",r,{search:c,isActive:d,source:h,page:o,pageSize:f});return s.get(b)},create:async(r,c)=>{const d=u("companies",r);return s.post(d,c)},update:async(r,c)=>{await s.put(`${v}/companies/${r}`,c)},activate:async r=>{await s.patch(`${v}/companies/${r}/activate`)},deactivate:async r=>{await s.patch(`${v}/companies/${r}/deactivate`)},delete:async r=>{await s.delete(`${v}/companies/${r}`)}},departments:{getAll:async(r,c,d,h,o=1,f=20)=>{const b=u("departments",r,{search:c,isActive:d,source:h,page:o,pageSize:f});return s.get(b)},create:async(r,c)=>{const d=u("departments",r);return s.post(d,c)},update:async(r,c)=>{await s.put(`${v}/departments/${r}`,c)},activate:async r=>{await s.patch(`${v}/departments/${r}/activate`)},deactivate:async r=>{await s.patch(`${v}/departments/${r}/deactivate`)},delete:async r=>{await s.delete(`${v}/departments/${r}`)}},jobTitles:{getAll:async(r,c,d,h,o=1,f=20)=>{const b=u("job-titles",r,{search:c,isActive:d,source:h,page:o,pageSize:f});return s.get(b)},create:async(r,c)=>{const d=u("job-titles",r);return s.post(d,c)},update:async(r,c)=>{await s.put(`${v}/job-titles/${r}`,c)},activate:async r=>{await s.patch(`${v}/job-titles/${r}/activate`)},deactivate:async r=>{await s.patch(`${v}/job-titles/${r}/deactivate`)},delete:async r=>{await s.delete(`${v}/job-titles/${r}`)}},offices:{getAll:async(r,c,d,h,o=1,f=20)=>{const b=u("offices",r,{search:c,isActive:d,source:h,page:o,pageSize:f});return s.get(b)},create:async(r,c)=>{const d=u("offices",r);return s.post(d,c)},update:async(r,c)=>{await s.put(`${v}/offices/${r}`,c)},activate:async r=>{await s.patch(`${v}/offices/${r}/activate`)},deactivate:async r=>{await s.patch(`${v}/offices/${r}/deactivate`)},delete:async r=>{await s.delete(`${v}/offices/${r}`)}},merge:{execute:async r=>s.post(`${v}/merge`,r),preview:async r=>s.post(`${v}/merge/preview`,r),getHistory:async(r,c,d,h)=>{const o=new URLSearchParams;r&&o.append("tenantId",r),c!==void 0&&o.append("referenceType",String(c)),d&&o.append("from",d),h&&o.append("to",h);const f=o.toString(),b=f?`${v}/merge/history?${f}`:`${v}/merge/history`;return s.get(b)}}}},ne=Ie;function Re(){const{t:a}=Me.useTranslation("admin"),{currentTenant:s,userTenants:u,switchTenant:r}=C.useTenant(),{tenants:c}=se.useAdminTenants(),[d,h]=l.useState(s?{tenantId:s.id,tenantSlug:s.slug,tenantUserId:"",tenantName:s.name}:"global"),o=d==="global",f=o?null:d.tenantId,b=o?void 0:d.tenantSlug,p=l.useMemo(()=>ne(b),[b]),[N,ce]=l.useState("departments"),[T,oe]=l.useState([]),[G,W]=l.useState(!0),[$,ie]=l.useState(""),[F,le]=l.useState(!1),[w,A]=l.useState(new Set),[g,U]=l.useState(1),[M]=l.useState(20),[K,de]=l.useState(0),[I,me]=l.useState(0),[xe,H]=l.useState(!1),[ue,L]=l.useState(!1),[pe,X]=l.useState(!1),[ve,O]=l.useState(!1),[R,Q]=l.useState(null),[B,V]=l.useState(null),[Y,he]=l.useState([]),[J,D]=l.useState(null),[x,S]=l.useState({code:"",name:""}),[P,Z]=l.useState(null),[ee,te]=l.useState(""),[E,z]=l.useState(!1),[ae,j]=l.useState(null),re=[{id:"departments",label:a("references.tabs.departments","Departments"),icon:i.Users,referenceType:q.Department},{id:"companies",label:a("references.tabs.companies","Companies"),icon:i.Building2,referenceType:q.Company},{id:"jobTitles",label:a("references.tabs.jobTitles","Job Titles"),icon:i.Briefcase,referenceType:q.JobTitle},{id:"offices",label:a("references.tabs.offices","Offices"),icon:i.MapPin,referenceType:q.Office}],_=re.find(t=>t.id===N),y=f,k=l.useCallback(async()=>{try{W(!0);const t=ne(b??void 0),n=F?void 0:!0;let m;switch(N){case"companies":m=await t.companies.getAll(y,$||void 0,n,void 0,g,M);break;case"departments":m=await t.departments.getAll(y,$||void 0,n,void 0,g,M);break;case"jobTitles":m=await t.jobTitles.getAll(y,$||void 0,n,void 0,g,M);break;case"offices":m=await t.offices.getAll(y,$||void 0,n,void 0,g,M);break;default:m={items:[],totalCount:0,page:1,pageSize:20,totalPages:0,hasPreviousPage:!1,hasNextPage:!1}}oe(m.items),de(m.totalCount),me(m.totalPages),A(new Set)}catch(t){console.error("Failed to load references:",t),j("Failed to load references")}finally{W(!1)}},[b,N,y,$,F,g,M]);l.useEffect(()=>{k()},[k]),l.useEffect(()=>{U(1)},[N,$,F,d]);const be=t=>{const n=new Set(w);n.has(t)?n.delete(t):n.add(t),A(n)},fe=()=>{w.size===T.length?A(new Set):A(new Set(T.map(t=>t.id)))},ge=async t=>{try{await r(t);const n=u.find(m=>m.id===t);n&&h({tenantId:n.id,tenantSlug:n.slug,tenantUserId:"",tenantName:n.name})}catch(n){console.error("Failed to switch tenant:",n)}},ye=async()=>{if(y)try{switch(z(!0),j(null),N){case"companies":await p.companies.create(y,x);break;case"departments":await p.departments.create(y,x);break;case"jobTitles":await p.jobTitles.create(y,x);break;case"offices":await p.offices.create(y,x);break}H(!1),S({code:"",name:""}),k()}catch(t){const n=t instanceof Error?t.message:"Failed to create";j(n)}finally{z(!1)}},je=async()=>{if(R)try{z(!0),j(null);const t={name:x.name,shortName:x.shortName,description:x.description};switch(N){case"companies":await p.companies.update(R.id,t);break;case"departments":await p.departments.update(R.id,t);break;case"jobTitles":await p.jobTitles.update(R.id,t);break;case"offices":await p.offices.update(R.id,t);break}L(!1),Q(null),k()}catch(t){const n=t instanceof Error?t.message:"Failed to update";j(n)}finally{z(!1)}},Ne=async t=>{if(confirm(a("references.confirmDelete","Are you sure you want to delete this reference?")))try{switch(N){case"companies":await p.companies.delete(t);break;case"departments":await p.departments.delete(t);break;case"jobTitles":await p.jobTitles.delete(t);break;case"offices":await p.offices.delete(t);break}k()}catch(n){const m=n instanceof Error?n.message:"Failed to delete";j(m)}},we=async t=>{try{if(t.isActive)switch(N){case"companies":await p.companies.deactivate(t.id);break;case"departments":await p.departments.deactivate(t.id);break;case"jobTitles":await p.jobTitles.deactivate(t.id);break;case"offices":await p.offices.deactivate(t.id);break}else switch(N){case"companies":await p.companies.activate(t.id);break;case"departments":await p.departments.activate(t.id);break;case"jobTitles":await p.jobTitles.activate(t.id);break;case"offices":await p.offices.activate(t.id);break}k()}catch(n){const m=n instanceof Error?n.message:"Failed to toggle status";j(m)}},Se=async()=>{if(!(w.size<2))try{const t=await p.merge.preview({tenantId:y,referenceType:_.referenceType,sourceIds:Array.from(w)});V(t),Z(null),te(""),X(!0)}catch(t){console.error("Failed to get merge preview:",t),j("Failed to preview merge")}},ke=async()=>{if(!P||!B)return;const t=Array.from(w).filter(n=>n!==P);try{z(!0),j(null),await p.merge.execute({tenantId:y,referenceType:_.referenceType,targetId:P,sourceIds:t,reason:ee||void 0}),X(!1),A(new Set),V(null),k()}catch(n){const m=n instanceof Error?n.message:"Failed to merge";j(m)}finally{z(!1)}},Ce=async()=>{try{const t=await p.merge.getHistory(y,_.referenceType);he(t),O(!0)}catch(t){console.error("Failed to load merge history:",t),j("Failed to load merge history")}},Te=t=>{Q(t),S({code:t.code,name:t.name,shortName:t.shortName,description:t.description}),L(!0),D(null)},$e=t=>t.isMerged?e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 text-xs font-medium rounded-full bg-[var(--info-bg)] text-[var(--info-text)]",children:[e.jsx(i.GitMerge,{className:"w-3 h-3"}),a("references.merged","Merged")]}):t.isActive?null:e.jsx("span",{className:"inline-flex items-center gap-1 px-2 py-1 text-xs font-medium rounded-full bg-[var(--bg-secondary)] text-[var(--text-secondary)]",children:a("references.inactive","Inactive")});return e.jsxs("div",{className:"p-6",children:[e.jsx("div",{className:"mb-6",children:e.jsx(C.Breadcrumb,{items:[{label:a("admin.title","Administration"),href:"/administration"},{label:a("users.title","Users"),href:"/administration/users"},{label:a("references.title","References")}]})}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold text-[var(--text-primary)]",children:a("references.title","Reference Data Management")}),e.jsx("p",{className:"text-[var(--text-secondary)] mt-1",children:a("references.description","Manage companies, departments, job titles, and offices for your organization")}),e.jsxs("div",{className:"mt-4",children:[e.jsx(se.TenantScopeSelector,{value:d,onChange:h,adminTenants:c.map(t=>({tenantId:t.id,tenantSlug:t.slug,tenantName:t.name,tenantType:t.type}))}),o&&e.jsxs("p",{className:"mt-2 text-sm text-[var(--text-secondary)] flex items-center gap-1.5",children:[e.jsx(i.Globe,{className:"w-4 h-4"}),a("references.globalModeInfo","Showing references from all tenants. Select a tenant to manage its data.")]})]})]}),ae&&e.jsxs("div",{className:"mb-4 p-4 bg-[var(--error-bg)] border border-[var(--error-border)] rounded-[var(--radius-card)]",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(i.AlertCircle,{className:"w-5 h-5 text-[var(--error-text)]"}),e.jsx("span",{className:"ml-2 text-[var(--error-text)]",children:ae}),e.jsx("button",{onClick:()=>j(null),className:"ml-auto text-[var(--error-text)]",children:e.jsx(i.X,{className:"w-4 h-4"})})]}),e.jsx("button",{onClick:()=>k(),className:"mt-2 text-sm text-[var(--error-text)] hover:opacity-80 underline",children:a("common.retry","Retry")})]}),e.jsx("div",{className:"border-b border-[var(--border-color)] mb-6",children:e.jsx("nav",{className:"flex gap-4 -mb-px",children:re.map(t=>{const n=t.icon,m=N===t.id;return e.jsxs("button",{onClick:()=>{ce(t.id),A(new Set)},className:`flex items-center gap-2 px-4 py-3 border-b-2 font-medium text-sm transition-colors ${m?"border-[var(--color-accent-500)] text-[var(--color-accent-600)]":"border-transparent text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--border-color)]"}`,children:[e.jsx(n,{className:"w-4 h-4"}),t.label]},t.id)})})}),e.jsxs("div",{className:"flex items-center justify-between gap-4 mb-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx(i.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--text-tertiary)]"}),e.jsx("input",{type:"text",value:$,onChange:t=>ie(t.target.value),placeholder:a("common.search","Search..."),className:"pl-10 pr-4 py-2 border border-[var(--border-color)] rounded-[var(--radius-input)] bg-[var(--bg-primary)] text-[var(--text-primary)] focus:ring-2 focus:ring-[var(--color-accent-500)]"})]}),e.jsxs("label",{className:"flex items-center gap-2 text-sm text-[var(--text-secondary)]",children:[e.jsx("input",{type:"checkbox",checked:F,onChange:t=>le(t.target.checked),className:"rounded border-[var(--border-color)]"}),a("references.showInactive","Show inactive")]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[w.size>=2&&!o&&e.jsxs("button",{onClick:Se,className:"flex items-center gap-2 px-4 py-2 bg-[var(--info-dot)] text-white rounded-[var(--radius-button)] hover:opacity-90 transition-opacity",children:[e.jsx(i.GitMerge,{className:"w-4 h-4"}),a("references.merge","Merge")," (",w.size,")"]}),!o&&e.jsxs("button",{onClick:Ce,className:"flex items-center gap-2 px-4 py-2 border border-[var(--border-color)] text-[var(--text-primary)] rounded-[var(--radius-button)] hover:bg-[var(--bg-hover)] transition-colors",children:[e.jsx(i.History,{className:"w-4 h-4"}),a("references.history","History")]}),e.jsxs("button",{onClick:()=>{S({code:"",name:""}),H(!0)},disabled:o,title:o?a("references.selectTenantToCreate","Select a tenant to create a reference"):void 0,className:`flex items-center gap-2 px-4 py-2 rounded-[var(--radius-button)] transition-colors ${o?"bg-[var(--bg-secondary)] text-[var(--text-tertiary)] cursor-not-allowed":"bg-[var(--color-accent-600)] text-white hover:bg-[var(--color-accent-700)]"}`,children:[e.jsx(i.Plus,{className:"w-4 h-4"}),a("common.create","Create")]})]})]}),e.jsxs("div",{className:"card overflow-hidden",children:[G&&e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(i.Loader2,{className:"w-8 h-8 animate-spin text-[var(--color-accent-500)]"})}),!G&&T.length===0&&e.jsx("div",{className:"text-center py-12 text-[var(--text-secondary)]",children:a("references.noItems","No items found")}),!G&&T.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-[var(--bg-secondary)] border-b border-[var(--border-color)]",children:e.jsxs("tr",{children:[e.jsx("th",{className:"w-12 px-4 py-3",children:!o&&e.jsx("input",{type:"checkbox",checked:w.size===T.length&&T.length>0,onChange:fe,className:"rounded border-[var(--border-color)]"})}),e.jsx("th",{className:"px-4 py-3 text-left text-sm font-medium text-[var(--text-secondary)]",children:a("references.code","Code")}),e.jsx("th",{className:"px-4 py-3 text-left text-sm font-medium text-[var(--text-secondary)]",children:a("references.name","Name")}),o&&e.jsx("th",{className:"px-4 py-3 text-left text-sm font-medium text-[var(--text-secondary)]",children:a("references.tenant","Tenant")}),e.jsx("th",{className:"px-4 py-3 text-left text-sm font-medium text-[var(--text-secondary)]",children:a("references.shortName","Short Name")}),e.jsx("th",{className:"px-4 py-3 text-center text-sm font-medium text-[var(--text-secondary)]",children:a("references.users","Users")}),e.jsx("th",{className:"px-4 py-3 text-center text-sm font-medium text-[var(--text-secondary)]",children:a("references.status","Status")}),e.jsx("th",{className:"w-20 px-4 py-3"})]})}),e.jsx("tbody",{className:"divide-y divide-[var(--border-color)]",children:T.map(t=>e.jsxs("tr",{className:`hover:bg-[var(--bg-hover)] transition-colors ${w.has(t.id)?"bg-[var(--info-bg)]":""} ${t.isMerged?"opacity-60":""}`,children:[e.jsx("td",{className:"px-4 py-3",children:!o&&e.jsx("input",{type:"checkbox",checked:w.has(t.id),onChange:()=>be(t.id),disabled:t.isMerged,className:"rounded border-[var(--border-color)]"})}),e.jsx("td",{className:"px-4 py-3 font-mono text-sm text-[var(--text-primary)]",children:t.code}),e.jsx("td",{className:"px-4 py-3 text-[var(--text-primary)]",children:t.name}),o&&e.jsx("td",{className:"px-4 py-3",children:t.tenantName?e.jsxs("button",{onClick:()=>t.tenantId&&ge(t.tenantId),className:"inline-flex items-center gap-1.5 px-2 py-1 text-xs font-medium rounded-full bg-[var(--info-bg)] text-[var(--info-text)] hover:opacity-80 transition-opacity",title:a("references.switchToTenant","Switch to this tenant"),children:[e.jsx(i.Building2,{className:"w-3 h-3"}),t.tenantName]}):e.jsx("span",{className:"text-[var(--text-tertiary)]",children:"-"})}),e.jsx("td",{className:"px-4 py-3 text-[var(--text-secondary)]",children:t.shortName||"-"}),e.jsx("td",{className:"px-4 py-3 text-center",children:e.jsxs("span",{className:"inline-flex items-center gap-1 text-[var(--text-secondary)]",children:[e.jsx(i.Users,{className:"w-4 h-4"}),t.userCount]})}),e.jsxs("td",{className:"px-4 py-3 text-center",children:[$e(t),t.isActive&&!t.isMerged&&e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 text-xs font-medium rounded-full bg-[var(--success-bg)] text-[var(--success-text)]",children:[e.jsx(i.Check,{className:"w-3 h-3"}),a("references.active","Active")]})]}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"relative",children:[e.jsx("button",{onClick:()=>D(J===t.id?null:t.id),className:"p-2 hover:bg-[var(--bg-secondary)] rounded-[var(--radius-button)] transition-colors",disabled:t.isMerged||o,children:e.jsx(i.MoreHorizontal,{className:"w-4 h-4"})}),J===t.id&&e.jsxs("div",{className:"absolute right-0 top-full mt-1 w-48 bg-[var(--bg-primary)] border border-[var(--border-color)] rounded-[var(--radius-card)] shadow-lg z-10",children:[e.jsxs("button",{onClick:()=>Te(t),className:"flex items-center gap-2 w-full px-4 py-2 text-left text-sm text-[var(--text-primary)] hover:bg-[var(--bg-hover)]",children:[e.jsx(i.Edit2,{className:"w-4 h-4"}),a("common.edit","Edit")]}),e.jsx("button",{onClick:()=>{we(t),D(null)},className:"flex items-center gap-2 w-full px-4 py-2 text-left text-sm text-[var(--text-primary)] hover:bg-[var(--bg-hover)]",children:t.isActive?a("common.deactivate","Deactivate"):a("common.activate","Activate")}),t.userCount===0&&e.jsxs("button",{onClick:()=>{Ne(t.id),D(null)},className:"flex items-center gap-2 w-full px-4 py-2 text-left text-sm text-[var(--error-text)] hover:bg-[var(--error-bg)]",children:[e.jsx(i.Trash2,{className:"w-4 h-4"}),a("common.delete","Delete")]})]})]})})]},t.id))})]}),e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-t border-[var(--border-color)] bg-[var(--bg-secondary)]",children:[e.jsxs("div",{className:"text-sm text-[var(--text-secondary)]",children:[a("references.showing","Showing")," ",(g-1)*M+1," ",a("references.to","to")," ",Math.min(g*M,K)," ",a("references.of","of")," ",K," ",a("references.results","results")]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>U(t=>Math.max(1,t-1)),disabled:g===1,className:"px-3 py-1.5 border border-[var(--border-color)] rounded-[var(--radius-button)] text-[var(--text-primary)] hover:bg-[var(--bg-hover)] transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:a("common.previous","Previous")}),e.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:Math.min(5,I)},(t,n)=>{let m;return I<=5||g<=3?m=n+1:g>=I-2?m=I-4+n:m=g-2+n,e.jsx("button",{onClick:()=>U(m),className:`px-3 py-1.5 rounded-[var(--radius-button)] transition-colors ${g===m?"bg-[var(--color-accent-600)] text-white":"border border-[var(--border-color)] text-[var(--text-primary)] hover:bg-[var(--bg-hover)]"}`,children:m},m)})}),e.jsx("button",{onClick:()=>U(t=>Math.min(I,t+1)),disabled:g===I,className:"px-3 py-1.5 border border-[var(--border-color)] rounded-[var(--radius-button)] text-[var(--text-primary)] hover:bg-[var(--bg-hover)] transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:a("common.next","Next")})]})]})]})]}),xe&&e.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50",children:e.jsxs("div",{className:"card w-full max-w-md p-6 m-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h2",{className:"text-xl font-semibold text-[var(--text-primary)]",children:a("references.createTitle","Create Reference")}),e.jsx("button",{onClick:()=>H(!1),className:"text-[var(--text-tertiary)] hover:text-[var(--text-primary)]",children:e.jsx(i.X,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-[var(--text-secondary)] mb-1",children:[a("references.code","Code")," *"]}),e.jsx("input",{type:"text",value:x.code,onChange:t=>S({...x,code:t.target.value}),className:"w-full px-4 py-2 border border-[var(--border-color)] rounded-[var(--radius-input)] bg-[var(--bg-primary)] text-[var(--text-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-accent-500)]"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-[var(--text-secondary)] mb-1",children:[a("references.name","Name")," *"]}),e.jsx("input",{type:"text",value:x.name,onChange:t=>S({...x,name:t.target.value}),className:"w-full px-4 py-2 border border-[var(--border-color)] rounded-[var(--radius-input)] bg-[var(--bg-primary)] text-[var(--text-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-accent-500)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-[var(--text-secondary)] mb-1",children:a("references.shortName","Short Name")}),e.jsx("input",{type:"text",value:x.shortName||"",onChange:t=>S({...x,shortName:t.target.value||null}),className:"w-full px-4 py-2 border border-[var(--border-color)] rounded-[var(--radius-input)] bg-[var(--bg-primary)] text-[var(--text-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-accent-500)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-[var(--text-secondary)] mb-1",children:a("references.description","Description")}),e.jsx("textarea",{value:x.description||"",onChange:t=>S({...x,description:t.target.value||null}),rows:3,className:"w-full px-4 py-2 border border-[var(--border-color)] rounded-[var(--radius-input)] bg-[var(--bg-primary)] text-[var(--text-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-accent-500)]"})]})]}),e.jsxs("div",{className:"flex justify-end gap-3 mt-6",children:[e.jsx("button",{onClick:()=>H(!1),className:"px-4 py-2 rounded-[var(--radius-button)] bg-[var(--bg-secondary)] text-[var(--text-secondary)] hover:bg-[var(--bg-hover)] transition-colors",children:a("common.cancel","Cancel")}),e.jsxs("button",{onClick:ye,disabled:E||!x.code||!x.name,className:"flex items-center gap-2 px-4 py-2 rounded-[var(--radius-button)] bg-[var(--color-accent-600)] text-white hover:bg-[var(--color-accent-700)] transition-colors disabled:opacity-50",children:[E&&e.jsx(i.Loader2,{className:"w-4 h-4 animate-spin"}),a("common.create","Create")]})]})]})}),ue&&R&&e.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50",children:e.jsxs("div",{className:"card w-full max-w-md p-6 m-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h2",{className:"text-xl font-semibold text-[var(--text-primary)]",children:a("references.editTitle","Edit Reference")}),e.jsx("button",{onClick:()=>L(!1),className:"text-[var(--text-tertiary)] hover:text-[var(--text-primary)]",children:e.jsx(i.X,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-[var(--text-secondary)] mb-1",children:a("references.code","Code")}),e.jsx("input",{type:"text",value:x.code,disabled:!0,className:"w-full px-4 py-2 border border-[var(--border-color)] rounded-[var(--radius-input)] bg-[var(--bg-secondary)] text-[var(--text-tertiary)] cursor-not-allowed"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-[var(--text-secondary)] mb-1",children:[a("references.name","Name")," *"]}),e.jsx("input",{type:"text",value:x.name,onChange:t=>S({...x,name:t.target.value}),className:"w-full px-4 py-2 border border-[var(--border-color)] rounded-[var(--radius-input)] bg-[var(--bg-primary)] text-[var(--text-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-accent-500)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-[var(--text-secondary)] mb-1",children:a("references.shortName","Short Name")}),e.jsx("input",{type:"text",value:x.shortName||"",onChange:t=>S({...x,shortName:t.target.value||null}),className:"w-full px-4 py-2 border border-[var(--border-color)] rounded-[var(--radius-input)] bg-[var(--bg-primary)] text-[var(--text-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-accent-500)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-[var(--text-secondary)] mb-1",children:a("references.description","Description")}),e.jsx("textarea",{value:x.description||"",onChange:t=>S({...x,description:t.target.value||null}),rows:3,className:"w-full px-4 py-2 border border-[var(--border-color)] rounded-[var(--radius-input)] bg-[var(--bg-primary)] text-[var(--text-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-accent-500)]"})]})]}),e.jsxs("div",{className:"flex justify-end gap-3 mt-6",children:[e.jsx("button",{onClick:()=>L(!1),className:"px-4 py-2 rounded-[var(--radius-button)] bg-[var(--bg-secondary)] text-[var(--text-secondary)] hover:bg-[var(--bg-hover)] transition-colors",children:a("common.cancel","Cancel")}),e.jsxs("button",{onClick:je,disabled:E||!x.name,className:"flex items-center gap-2 px-4 py-2 rounded-[var(--radius-button)] bg-[var(--color-accent-600)] text-white hover:bg-[var(--color-accent-700)] transition-colors disabled:opacity-50",children:[E&&e.jsx(i.Loader2,{className:"w-4 h-4 animate-spin"}),a("common.save","Save")]})]})]})}),pe&&B&&e.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50",children:e.jsxs("div",{className:"card w-full max-w-lg p-6 m-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("h2",{className:"text-xl font-semibold text-[var(--text-primary)] flex items-center gap-2",children:[e.jsx(i.GitMerge,{className:"w-5 h-5 text-[var(--info-dot)]"}),a("references.mergeTitle","Merge References")]}),e.jsx("button",{onClick:()=>X(!1),className:"text-[var(--text-tertiary)] hover:text-[var(--text-primary)]",children:e.jsx(i.X,{className:"w-5 h-5"})})]}),e.jsx("p",{className:"text-sm text-[var(--text-secondary)] mb-4",children:a("references.mergeDescription","Select the target reference. All other selected references will be merged into it and their users will be reassigned.")}),e.jsxs("div",{className:"space-y-2 mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-[var(--text-secondary)]",children:a("references.selectTarget","Select target reference")}),B.sources.map(t=>e.jsxs("label",{className:`flex items-center gap-3 p-3 border rounded-[var(--radius-card)] cursor-pointer transition-colors ${P===t.id?"border-[var(--info-dot)] bg-[var(--info-bg)]":"border-[var(--border-color)] hover:border-[var(--color-accent-500)]"}`,children:[e.jsx("input",{type:"radio",name:"mergeTarget",value:t.id,checked:P===t.id,onChange:()=>Z(t.id),className:"text-[var(--info-dot)]"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"font-medium text-[var(--text-primary)]",children:t.name}),e.jsxs("div",{className:"text-sm text-[var(--text-secondary)]",children:[t.code," ",t.shortName&&`(${t.shortName})`]})]}),e.jsxs("span",{className:"text-sm text-[var(--text-secondary)]",children:[t.userCount," ",a("references.users","users")]})]},t.id))]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-[var(--text-secondary)] mb-1",children:a("references.mergeReason","Reason (optional)")}),e.jsx("textarea",{value:ee,onChange:t=>te(t.target.value),rows:2,placeholder:a("references.mergeReasonPlaceholder","Why are you merging these references?"),className:"w-full px-4 py-2 border border-[var(--border-color)] rounded-[var(--radius-input)] bg-[var(--bg-primary)] text-[var(--text-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-accent-500)]"})]}),e.jsx("div",{className:"p-3 bg-[var(--warning-bg)] border border-[var(--warning-border)] rounded-[var(--radius-card)] mb-4",children:e.jsxs("p",{className:"text-sm text-[var(--warning-text)]",children:[e.jsx("strong",{children:B.totalUsersAffected})," ",a("references.usersWillBeReassigned","users will be reassigned")]})}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx("button",{onClick:()=>X(!1),className:"px-4 py-2 rounded-[var(--radius-button)] bg-[var(--bg-secondary)] text-[var(--text-secondary)] hover:bg-[var(--bg-hover)] transition-colors",children:a("common.cancel","Cancel")}),e.jsxs("button",{onClick:ke,disabled:E||!P,className:"flex items-center gap-2 px-4 py-2 rounded-[var(--radius-button)] bg-[var(--info-dot)] text-white hover:opacity-90 transition-opacity disabled:opacity-50",children:[E&&e.jsx(i.Loader2,{className:"w-4 h-4 animate-spin"}),e.jsx(i.GitMerge,{className:"w-4 h-4"}),a("references.merge","Merge")]})]})]})}),ve&&e.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50",children:e.jsxs("div",{className:"card w-full max-w-2xl p-6 m-4 max-h-[80vh] overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("h2",{className:"text-xl font-semibold text-[var(--text-primary)] flex items-center gap-2",children:[e.jsx(i.History,{className:"w-5 h-5"}),a("references.historyTitle","Merge History")]}),e.jsx("button",{onClick:()=>O(!1),className:"text-[var(--text-tertiary)] hover:text-[var(--text-primary)]",children:e.jsx(i.X,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"overflow-y-auto flex-1",children:Y.length===0?e.jsx("div",{className:"text-center py-8 text-[var(--text-secondary)]",children:a("references.noHistory","No merge history found")}):e.jsx("div",{className:"space-y-3",children:Y.map(t=>e.jsxs("div",{className:"p-4 border border-[var(--border-color)] rounded-[var(--radius-card)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(i.GitMerge,{className:"w-4 h-4 text-[var(--info-dot)]"}),e.jsx("span",{className:"font-medium text-[var(--text-primary)]",children:t.sourceReferenceName}),e.jsx("span",{className:"text-[var(--text-secondary)]",children:"→"}),e.jsx("span",{className:"font-medium text-[var(--text-primary)]",children:t.targetReferenceName})]}),e.jsxs("div",{className:"text-sm text-[var(--text-secondary)] space-y-1",children:[e.jsxs("div",{children:[t.affectedUserCount," users reassigned"]}),e.jsxs("div",{children:["By ",t.mergedByUserName]}),e.jsx("div",{children:new Date(t.mergedAt).toLocaleString()}),t.mergeReason&&e.jsxs("div",{className:"italic",children:['"',t.mergeReason,'"']})]})]},t.id))})}),e.jsx("div",{className:"flex justify-end mt-4 pt-4 border-t border-[var(--border-color)]",children:e.jsx("button",{onClick:()=>O(!1),className:"px-4 py-2 rounded-[var(--radius-button)] bg-[var(--bg-secondary)] text-[var(--text-secondary)] hover:bg-[var(--bg-hover)] transition-colors",children:a("common.close","Close")})})]})}),J&&e.jsx("button",{type:"button",className:"fixed inset-0 z-0",onClick:()=>D(null),"aria-label":"Close menu"})]})}exports.ReferencesManagementPage=Re;
|
|
2
|
+
//# sourceMappingURL=ReferencesManagementPage-CLsaUNqA.js.map
|