@atlashub/smartstack 3.21.0 → 3.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{AgentSkillsPage-7si3Ng8e.js → AgentSkillsPage-BWQSCYl-.js} +2 -2
- package/dist/chunks/{AgentSkillsPage-7si3Ng8e.js.map → AgentSkillsPage-BWQSCYl-.js.map} +1 -1
- package/dist/chunks/{AgentSkillsPage-D0cD1QdM.js → AgentSkillsPage-IQcMnBaD.js} +2 -2
- package/dist/chunks/{AgentSkillsPage-D0cD1QdM.js.map → AgentSkillsPage-IQcMnBaD.js.map} +1 -1
- package/dist/chunks/{AgentWorkloadPage-H_7ze33H.js → AgentWorkloadPage-DqrjkvWL.js} +2 -2
- package/dist/chunks/{AgentWorkloadPage-H_7ze33H.js.map → AgentWorkloadPage-DqrjkvWL.js.map} +1 -1
- package/dist/chunks/{AgentWorkloadPage-D4d86cdV.js → AgentWorkloadPage-w-HiyFYP.js} +2 -2
- package/dist/chunks/{AgentWorkloadPage-D4d86cdV.js.map → AgentWorkloadPage-w-HiyFYP.js.map} +1 -1
- package/dist/chunks/{ApiCatalogDetailPage-2ktkRrCb.js → ApiCatalogDetailPage-D3L8Yf4G.js} +3 -3
- package/dist/chunks/{ApiCatalogDetailPage-2ktkRrCb.js.map → ApiCatalogDetailPage-D3L8Yf4G.js.map} +1 -1
- package/dist/chunks/{ApiCatalogDetailPage-BQ53xuwD.js → ApiCatalogDetailPage-MPT3Kz6H.js} +2 -2
- package/dist/chunks/{ApiCatalogDetailPage-BQ53xuwD.js.map → ApiCatalogDetailPage-MPT3Kz6H.js.map} +1 -1
- package/dist/chunks/{ApiCatalogPage-BEqTDJz8.js → ApiCatalogPage-D4Hg3uiS.js} +2 -2
- package/dist/chunks/{ApiCatalogPage-BEqTDJz8.js.map → ApiCatalogPage-D4Hg3uiS.js.map} +1 -1
- package/dist/chunks/{ApiCatalogPage-BBkWSLI8.js → ApiCatalogPage-DRg5Cz0r.js} +2 -2
- package/dist/chunks/{ApiCatalogPage-BBkWSLI8.js.map → ApiCatalogPage-DRg5Cz0r.js.map} +1 -1
- package/dist/chunks/{ApplicationDetailPage-BYJ2YMPq.js → ApplicationDetailPage-Caizuyn2.js} +2 -2
- package/dist/chunks/{ApplicationDetailPage-BYJ2YMPq.js.map → ApplicationDetailPage-Caizuyn2.js.map} +1 -1
- package/dist/chunks/{ApplicationDetailPage-D8-bf1as.js → ApplicationDetailPage-CuCW6aMB.js} +4 -4
- package/dist/chunks/{ApplicationDetailPage-D8-bf1as.js.map → ApplicationDetailPage-CuCW6aMB.js.map} +1 -1
- package/dist/chunks/{ApplicationsDashboardPage-BBlLms2r.js → ApplicationsDashboardPage-B2MW8-Kc.js} +2 -2
- package/dist/chunks/{ApplicationsDashboardPage-BBlLms2r.js.map → ApplicationsDashboardPage-B2MW8-Kc.js.map} +1 -1
- package/dist/chunks/{ApplicationsDashboardPage-DTWZxJJM.js → ApplicationsDashboardPage-BDIjFIYZ.js} +3 -3
- package/dist/chunks/{ApplicationsDashboardPage-DTWZxJJM.js.map → ApplicationsDashboardPage-BDIjFIYZ.js.map} +1 -1
- package/dist/chunks/{ApplicationsGridPage-BQaMsK1K.js → ApplicationsGridPage-DV-FihKj.js} +2 -2
- package/dist/chunks/{ApplicationsGridPage-BQaMsK1K.js.map → ApplicationsGridPage-DV-FihKj.js.map} +1 -1
- package/dist/chunks/{ApplicationsGridPage-DbVcvezt.js → ApplicationsGridPage-DXsTfXPI.js} +2 -2
- package/dist/chunks/{ApplicationsGridPage-DbVcvezt.js.map → ApplicationsGridPage-DXsTfXPI.js.map} +1 -1
- package/dist/chunks/{ApplicationsListPage-DYKM2Yeo.js → ApplicationsListPage--CGkyBuJ.js} +2 -2
- package/dist/chunks/{ApplicationsListPage-DYKM2Yeo.js.map → ApplicationsListPage--CGkyBuJ.js.map} +1 -1
- package/dist/chunks/{ApplicationsListPage-C91v2rZt.js → ApplicationsListPage-JUX823bh.js} +2 -2
- package/dist/chunks/{ApplicationsListPage-C91v2rZt.js.map → ApplicationsListPage-JUX823bh.js.map} +1 -1
- package/dist/chunks/{ApplicationsPage-BCbgotIx.js → ApplicationsPage-6zgFye6w.js} +2 -2
- package/dist/chunks/{ApplicationsPage-BCbgotIx.js.map → ApplicationsPage-6zgFye6w.js.map} +1 -1
- package/dist/chunks/{ApplicationsPage-CW3-Hjlu.js → ApplicationsPage-CQPuuiO6.js} +4 -4
- package/dist/chunks/{ApplicationsPage-CW3-Hjlu.js.map → ApplicationsPage-CQPuuiO6.js.map} +1 -1
- package/dist/chunks/{AssignmentRulesPage-D8vfGDBN.js → AssignmentRulesPage-CFffeEbo.js} +2 -2
- package/dist/chunks/{AssignmentRulesPage-D8vfGDBN.js.map → AssignmentRulesPage-CFffeEbo.js.map} +1 -1
- package/dist/chunks/{AssignmentRulesPage-CxktlEMB.js → AssignmentRulesPage-D78UeUId.js} +2 -2
- package/dist/chunks/{AssignmentRulesPage-CxktlEMB.js.map → AssignmentRulesPage-D78UeUId.js.map} +1 -1
- package/dist/chunks/{AssignmentsPage-DmfBYQAD.js → AssignmentsPage-Cww2ifZF.js} +2 -2
- package/dist/chunks/{AssignmentsPage-DmfBYQAD.js.map → AssignmentsPage-Cww2ifZF.js.map} +1 -1
- package/dist/chunks/{AssignmentsPage-sRCCBmRc.js → AssignmentsPage-DE_QS2LO.js} +2 -2
- package/dist/chunks/{AssignmentsPage-sRCCBmRc.js.map → AssignmentsPage-DE_QS2LO.js.map} +1 -1
- package/dist/chunks/{AuthCallbackPage-C7XiZxKb.js → AuthCallbackPage-CA2nO6DG.js} +2 -2
- package/dist/chunks/{AuthCallbackPage-C7XiZxKb.js.map → AuthCallbackPage-CA2nO6DG.js.map} +1 -1
- package/dist/chunks/{AuthCallbackPage-BCe_bwJM.js → AuthCallbackPage-CDUAoX-N.js} +2 -2
- package/dist/chunks/{AuthCallbackPage-BCe_bwJM.js.map → AuthCallbackPage-CDUAoX-N.js.map} +1 -1
- package/dist/chunks/{ConfirmEmailPage-BUfGSqxF.js → ConfirmEmailPage-BqsILAYH.js} +2 -2
- package/dist/chunks/{ConfirmEmailPage-BUfGSqxF.js.map → ConfirmEmailPage-BqsILAYH.js.map} +1 -1
- package/dist/chunks/{ConfirmEmailPage-Buj4x-rx.js → ConfirmEmailPage-INeHCuMB.js} +2 -2
- package/dist/chunks/{ConfirmEmailPage-Buj4x-rx.js.map → ConfirmEmailPage-INeHCuMB.js.map} +1 -1
- package/dist/chunks/{CreateSupportTicketPage-CKDX_HQm.js → CreateSupportTicketPage-BWeuV2aU.js} +2 -2
- package/dist/chunks/{CreateSupportTicketPage-CKDX_HQm.js.map → CreateSupportTicketPage-BWeuV2aU.js.map} +1 -1
- package/dist/chunks/{CreateSupportTicketPage-0LgY-_pu.js → CreateSupportTicketPage-OBwF4v7b.js} +2 -2
- package/dist/chunks/{CreateSupportTicketPage-0LgY-_pu.js.map → CreateSupportTicketPage-OBwF4v7b.js.map} +1 -1
- package/dist/chunks/{DashboardPage-CUZ80NGV.js → DashboardPage-CKHqWrdS.js} +3 -3
- package/dist/chunks/{DashboardPage-CUZ80NGV.js.map → DashboardPage-CKHqWrdS.js.map} +1 -1
- package/dist/chunks/{DashboardPage-CaNOAstg.js → DashboardPage-COmc9b__.js} +3 -3
- package/dist/chunks/{DashboardPage-CaNOAstg.js.map → DashboardPage-COmc9b__.js.map} +1 -1
- package/dist/chunks/{DashboardPage-B48_rQFi.js → DashboardPage-CfKZHiSj.js} +2 -2
- package/dist/chunks/{DashboardPage-B48_rQFi.js.map → DashboardPage-CfKZHiSj.js.map} +1 -1
- package/dist/chunks/{DashboardPage-CUZV1J9t.js → DashboardPage-CwEZZ3jx.js} +2 -2
- package/dist/chunks/{DashboardPage-CUZV1J9t.js.map → DashboardPage-CwEZZ3jx.js.map} +1 -1
- package/dist/chunks/{EscalationConfigPage-CdzAbnGy.js → EscalationConfigPage--7lgZ0kJ.js} +2 -2
- package/dist/chunks/{EscalationConfigPage-CdzAbnGy.js.map → EscalationConfigPage--7lgZ0kJ.js.map} +1 -1
- package/dist/chunks/{EscalationConfigPage-CYGIl_e6.js → EscalationConfigPage-DPyiBcqV.js} +2 -2
- package/dist/chunks/{EscalationConfigPage-CYGIl_e6.js.map → EscalationConfigPage-DPyiBcqV.js.map} +1 -1
- package/dist/chunks/{ForceChangePasswordPage-lRpkwcX7.js → ForceChangePasswordPage-BE-6umub.js} +2 -2
- package/dist/chunks/{ForceChangePasswordPage-lRpkwcX7.js.map → ForceChangePasswordPage-BE-6umub.js.map} +1 -1
- package/dist/chunks/{ForceChangePasswordPage-CvmYAV3r.js → ForceChangePasswordPage-CnsYoWmV.js} +2 -2
- package/dist/chunks/{ForceChangePasswordPage-CvmYAV3r.js.map → ForceChangePasswordPage-CnsYoWmV.js.map} +1 -1
- package/dist/chunks/{ForgotPasswordPage-0u49E4Pw.js → ForgotPasswordPage-CSq4DnFF.js} +2 -2
- package/dist/chunks/{ForgotPasswordPage-0u49E4Pw.js.map → ForgotPasswordPage-CSq4DnFF.js.map} +1 -1
- package/dist/chunks/{ForgotPasswordPage-CxQUqKOm.js → ForgotPasswordPage-DZLVolAC.js} +2 -2
- package/dist/chunks/{ForgotPasswordPage-CxQUqKOm.js.map → ForgotPasswordPage-DZLVolAC.js.map} +1 -1
- package/dist/chunks/{GroupDetailPage-DFBvVO1S.js → GroupDetailPage-Bf9Wb_2j.js} +5 -5
- package/dist/chunks/{GroupDetailPage-DFBvVO1S.js.map → GroupDetailPage-Bf9Wb_2j.js.map} +1 -1
- package/dist/chunks/{GroupDetailPage-B2FkKrGG.js → GroupDetailPage-R-hf3rJ7.js} +2 -2
- package/dist/chunks/{GroupDetailPage-B2FkKrGG.js.map → GroupDetailPage-R-hf3rJ7.js.map} +1 -1
- package/dist/chunks/{MyAccessRequestsPage-C9IX4c0K.js → MyAccessRequestsPage-BIisvWM6.js} +2 -2
- package/dist/chunks/{MyAccessRequestsPage-C9IX4c0K.js.map → MyAccessRequestsPage-BIisvWM6.js.map} +1 -1
- package/dist/chunks/{MyAccessRequestsPage-D6pVULNM.js → MyAccessRequestsPage-BLSV7Tbx.js} +2 -2
- package/dist/chunks/{MyAccessRequestsPage-D6pVULNM.js.map → MyAccessRequestsPage-BLSV7Tbx.js.map} +1 -1
- package/dist/chunks/{MyTenantsPage-BEcYYdGR.js → MyTenantsPage-D-7k9CP1.js} +3 -3
- package/dist/chunks/{MyTenantsPage-BEcYYdGR.js.map → MyTenantsPage-D-7k9CP1.js.map} +1 -1
- package/dist/chunks/{MyTenantsPage-D9f85zjF.js → MyTenantsPage-DqGW6aDt.js} +2 -2
- package/dist/chunks/{MyTenantsPage-D9f85zjF.js.map → MyTenantsPage-DqGW6aDt.js.map} +1 -1
- package/dist/chunks/{MyTicketsPage-DJR8h6y1.js → MyTicketsPage--DgDsnZA.js} +2 -2
- package/dist/chunks/{MyTicketsPage-DJR8h6y1.js.map → MyTicketsPage--DgDsnZA.js.map} +1 -1
- package/dist/chunks/{MyTicketsPage-DiOUExKJ.js → MyTicketsPage-CqJ3Aqob.js} +2 -2
- package/dist/chunks/{MyTicketsPage-DiOUExKJ.js.map → MyTicketsPage-CqJ3Aqob.js.map} +1 -1
- package/dist/chunks/{NavigationAppsPage-CeHbxfZw.js → NavigationAppsPage-Bebis_RT.js} +2 -2
- package/dist/chunks/{NavigationAppsPage-CeHbxfZw.js.map → NavigationAppsPage-Bebis_RT.js.map} +1 -1
- package/dist/chunks/{NavigationAppsPage-If7tmCFY.js → NavigationAppsPage-THNPOAjv.js} +2 -2
- package/dist/chunks/{NavigationAppsPage-If7tmCFY.js.map → NavigationAppsPage-THNPOAjv.js.map} +1 -1
- package/dist/chunks/{NotificationsPage-C29Lln5o.js → NotificationsPage-CAbNW_Cn.js} +2 -2
- package/dist/chunks/{NotificationsPage-C29Lln5o.js.map → NotificationsPage-CAbNW_Cn.js.map} +1 -1
- package/dist/chunks/{NotificationsPage-BiaLRb0s.js → NotificationsPage-DxwizUhL.js} +2 -2
- package/dist/chunks/{NotificationsPage-BiaLRb0s.js.map → NotificationsPage-DxwizUhL.js.map} +1 -1
- package/dist/chunks/{OnboardingWizardPage-DQrBKNBq.js → OnboardingWizardPage-C6HlbJ3K.js} +2 -2
- package/dist/chunks/{OnboardingWizardPage-DQrBKNBq.js.map → OnboardingWizardPage-C6HlbJ3K.js.map} +1 -1
- package/dist/chunks/{OnboardingWizardPage-BQah4cI8.js → OnboardingWizardPage-CyC2zONO.js} +2 -2
- package/dist/chunks/{OnboardingWizardPage-BQah4cI8.js.map → OnboardingWizardPage-CyC2zONO.js.map} +1 -1
- package/dist/chunks/{PermissionDetailPage-Ckjdjvf9.js → PermissionDetailPage-BDHiNgky.js} +2 -2
- package/dist/chunks/{PermissionDetailPage-Ckjdjvf9.js.map → PermissionDetailPage-BDHiNgky.js.map} +1 -1
- package/dist/chunks/{PermissionDetailPage-Dh8v7mGj.js → PermissionDetailPage-C5K17ydY.js} +2 -2
- package/dist/chunks/{PermissionDetailPage-Dh8v7mGj.js.map → PermissionDetailPage-C5K17ydY.js.map} +1 -1
- package/dist/chunks/{PermissionsPage-l0PnY-EE.js → PermissionsPage-COI5LJPo.js} +2 -2
- package/dist/chunks/{PermissionsPage-l0PnY-EE.js.map → PermissionsPage-COI5LJPo.js.map} +1 -1
- package/dist/chunks/{PermissionsPage-DLy9U3P3.js → PermissionsPage-CkOwH2_d.js} +2 -2
- package/dist/chunks/{PermissionsPage-DLy9U3P3.js.map → PermissionsPage-CkOwH2_d.js.map} +1 -1
- package/dist/chunks/{PortalDashboardPage-DFBx38-x.js → PortalDashboardPage-CoEC4CmC.js} +2 -2
- package/dist/chunks/{PortalDashboardPage-DFBx38-x.js.map → PortalDashboardPage-CoEC4CmC.js.map} +1 -1
- package/dist/chunks/{PortalDashboardPage-rQYhrX0q.js → PortalDashboardPage-DrYymEf-.js} +2 -2
- package/dist/chunks/{PortalDashboardPage-rQYhrX0q.js.map → PortalDashboardPage-DrYymEf-.js.map} +1 -1
- package/dist/chunks/{PreferencesPage-BBu8yZQB.js → PreferencesPage-CJRaU3ba.js} +2 -2
- package/dist/chunks/{PreferencesPage-BBu8yZQB.js.map → PreferencesPage-CJRaU3ba.js.map} +1 -1
- package/dist/chunks/{PreferencesPage-B81MsNV1.js → PreferencesPage-Cqr9mAab.js} +2 -2
- package/dist/chunks/{PreferencesPage-B81MsNV1.js.map → PreferencesPage-Cqr9mAab.js.map} +1 -1
- package/dist/chunks/{ProfilePage-DDrl10zj.js → ProfilePage-BZVpg6-l.js} +2 -2
- package/dist/chunks/{ProfilePage-DDrl10zj.js.map → ProfilePage-BZVpg6-l.js.map} +1 -1
- package/dist/chunks/{ProfilePage-DPoXwdnc.js → ProfilePage-Cu_FITeL.js} +2 -2
- package/dist/chunks/{ProfilePage-DPoXwdnc.js.map → ProfilePage-Cu_FITeL.js.map} +1 -1
- package/dist/chunks/{ReferencesManagementPage-eFsKjIEK.js → ReferencesManagementPage-DUlVk9Ps.js} +3 -3
- package/dist/chunks/{ReferencesManagementPage-eFsKjIEK.js.map → ReferencesManagementPage-DUlVk9Ps.js.map} +1 -1
- package/dist/chunks/{ReferencesManagementPage-DhVsuElE.js → ReferencesManagementPage-ZCuYtqd7.js} +2 -2
- package/dist/chunks/{ReferencesManagementPage-DhVsuElE.js.map → ReferencesManagementPage-ZCuYtqd7.js.map} +1 -1
- package/dist/chunks/{RegisterPage-CiQib3-6.js → RegisterPage-C4xmVwh9.js} +2 -2
- package/dist/chunks/{RegisterPage-CiQib3-6.js.map → RegisterPage-C4xmVwh9.js.map} +1 -1
- package/dist/chunks/{RegisterPage-bXCcJD88.js → RegisterPage-DGyzoIHT.js} +2 -2
- package/dist/chunks/{RegisterPage-bXCcJD88.js.map → RegisterPage-DGyzoIHT.js.map} +1 -1
- package/dist/chunks/{ResetPasswordPage-Dqiahhnj.js → ResetPasswordPage-DqDD6VPR.js} +2 -2
- package/dist/chunks/{ResetPasswordPage-Dqiahhnj.js.map → ResetPasswordPage-DqDD6VPR.js.map} +1 -1
- package/dist/chunks/{ResetPasswordPage-CubPG3yv.js → ResetPasswordPage-Glu-aeqv.js} +2 -2
- package/dist/chunks/{ResetPasswordPage-CubPG3yv.js.map → ResetPasswordPage-Glu-aeqv.js.map} +1 -1
- package/dist/chunks/{ResolutionModal-Bg7XZmR1.js → ResolutionModal-CxjANAOP.js} +2 -2
- package/dist/chunks/{ResolutionModal-Bg7XZmR1.js.map → ResolutionModal-CxjANAOP.js.map} +1 -1
- package/dist/chunks/{ResolutionModal-DqRk_T0n.js → ResolutionModal-Duat18qV.js} +2 -2
- package/dist/chunks/{ResolutionModal-DqRk_T0n.js.map → ResolutionModal-Duat18qV.js.map} +1 -1
- package/dist/chunks/{RoleDetailPage-Blau6_4c.js → RoleDetailPage-BQffUSnt.js} +3 -3
- package/dist/chunks/{RoleDetailPage-Blau6_4c.js.map → RoleDetailPage-BQffUSnt.js.map} +1 -1
- package/dist/chunks/{RoleDetailPage-CiRVxxIP.js → RoleDetailPage-JTm5lD1_.js} +2 -2
- package/dist/chunks/{RoleDetailPage-CiRVxxIP.js.map → RoleDetailPage-JTm5lD1_.js.map} +1 -1
- package/dist/chunks/{RolesPage-Pm-RN3lP.js → RolesPage-B9rRzciI.js} +2 -2
- package/dist/chunks/{RolesPage-Pm-RN3lP.js.map → RolesPage-B9rRzciI.js.map} +1 -1
- package/dist/chunks/{RolesPage-Cb8joqdJ.js → RolesPage-BN8_zMOC.js} +2 -2
- package/dist/chunks/{RolesPage-Cb8joqdJ.js.map → RolesPage-BN8_zMOC.js.map} +1 -1
- package/dist/chunks/{SlaConfigPage-B86McKM6.js → SlaConfigPage-B7kZNig4.js} +2 -2
- package/dist/chunks/{SlaConfigPage-B86McKM6.js.map → SlaConfigPage-B7kZNig4.js.map} +1 -1
- package/dist/chunks/{SlaConfigPage-BY7gvYU6.js → SlaConfigPage-okvZfA_K.js} +2 -2
- package/dist/chunks/{SlaConfigPage-BY7gvYU6.js.map → SlaConfigPage-okvZfA_K.js.map} +1 -1
- package/dist/chunks/{SupportPermissionsPage-BYxcLMSd.js → SupportPermissionsPage-DGAPqJbl.js} +2 -2
- package/dist/chunks/{SupportPermissionsPage-BYxcLMSd.js.map → SupportPermissionsPage-DGAPqJbl.js.map} +1 -1
- package/dist/chunks/{SupportPermissionsPage-MXqXNJIZ.js → SupportPermissionsPage-Dg_wLOme.js} +2 -2
- package/dist/chunks/{SupportPermissionsPage-MXqXNJIZ.js.map → SupportPermissionsPage-Dg_wLOme.js.map} +1 -1
- package/dist/chunks/{TemplatesPage-BDguJ401.js → TemplatesPage-DT9fhlAU.js} +2 -2
- package/dist/chunks/{TemplatesPage-BDguJ401.js.map → TemplatesPage-DT9fhlAU.js.map} +1 -1
- package/dist/chunks/{TemplatesPage-DdnGgioU.js → TemplatesPage-DiEk538p.js} +2 -2
- package/dist/chunks/{TemplatesPage-DdnGgioU.js.map → TemplatesPage-DiEk538p.js.map} +1 -1
- package/dist/chunks/{TenantCard-ffwWsgFQ.js → TenantCard-BbSYk9_Z.js} +2 -2
- package/dist/chunks/{TenantCard-ffwWsgFQ.js.map → TenantCard-BbSYk9_Z.js.map} +1 -1
- package/dist/chunks/{TenantCard-CUjb6og9.js → TenantCard-CEkiKxcZ.js} +2 -2
- package/dist/chunks/{TenantCard-CUjb6og9.js.map → TenantCard-CEkiKxcZ.js.map} +1 -1
- package/dist/chunks/{TenantScopeSelector-Dz7i1I43.js → TenantScopeSelector-BWfYxvEa.js} +2 -2
- package/dist/chunks/{TenantScopeSelector-Dz7i1I43.js.map → TenantScopeSelector-BWfYxvEa.js.map} +1 -1
- package/dist/chunks/{TenantScopeSelector-Cym_Zyps.js → TenantScopeSelector-D-BKgQPV.js} +2 -2
- package/dist/chunks/{TenantScopeSelector-Cym_Zyps.js.map → TenantScopeSelector-D-BKgQPV.js.map} +1 -1
- package/dist/chunks/{TicketDetailPage-GOh9GX7E.js → TicketDetailPage-C1mNS9Up.js} +2 -2
- package/dist/chunks/{TicketDetailPage-GOh9GX7E.js.map → TicketDetailPage-C1mNS9Up.js.map} +1 -1
- package/dist/chunks/{TicketDetailPage-Du8WMyqf.js → TicketDetailPage-ieVDRh42.js} +2 -2
- package/dist/chunks/{TicketDetailPage-Du8WMyqf.js.map → TicketDetailPage-ieVDRh42.js.map} +1 -1
- package/dist/chunks/{TicketsPage-Bqd6moQy.js → TicketsPage-CnuWsnIW.js} +2 -2
- package/dist/chunks/{TicketsPage-Bqd6moQy.js.map → TicketsPage-CnuWsnIW.js.map} +1 -1
- package/dist/chunks/{TicketsPage-WdU4Bb7M.js → TicketsPage-jjyY15_D.js} +2 -2
- package/dist/chunks/{TicketsPage-WdU4Bb7M.js.map → TicketsPage-jjyY15_D.js.map} +1 -1
- package/dist/chunks/{UserCreateTicketPage-Cm1emgwR.js → UserCreateTicketPage-B8Tvf-ag.js} +2 -2
- package/dist/chunks/{UserCreateTicketPage-Cm1emgwR.js.map → UserCreateTicketPage-B8Tvf-ag.js.map} +1 -1
- package/dist/chunks/{UserCreateTicketPage-BPw-5Y_D.js → UserCreateTicketPage-DnOsDlfO.js} +2 -2
- package/dist/chunks/{UserCreateTicketPage-BPw-5Y_D.js.map → UserCreateTicketPage-DnOsDlfO.js.map} +1 -1
- package/dist/chunks/{UserDashboardPage-BP5WeXPS.js → UserDashboardPage-BrtkJ-NB.js} +2 -2
- package/dist/chunks/{UserDashboardPage-BP5WeXPS.js.map → UserDashboardPage-BrtkJ-NB.js.map} +1 -1
- package/dist/chunks/{UserDashboardPage-B53C8fUq.js → UserDashboardPage-KLB5CQP5.js} +2 -2
- package/dist/chunks/{UserDashboardPage-B53C8fUq.js.map → UserDashboardPage-KLB5CQP5.js.map} +1 -1
- package/dist/chunks/{UserDetailPage-B110bmGX.js → UserDetailPage-U7smBQoF.js} +5 -5
- package/dist/chunks/{UserDetailPage-B110bmGX.js.map → UserDetailPage-U7smBQoF.js.map} +1 -1
- package/dist/chunks/{UserDetailPage-CV2VCE46.js → UserDetailPage-_J6lcKAU.js} +2 -2
- package/dist/chunks/{UserDetailPage-CV2VCE46.js.map → UserDetailPage-_J6lcKAU.js.map} +1 -1
- package/dist/chunks/{UserTicketDetailPage-CCNJON1V.js → UserTicketDetailPage-CWoYQgH-.js} +2 -2
- package/dist/chunks/{UserTicketDetailPage-CCNJON1V.js.map → UserTicketDetailPage-CWoYQgH-.js.map} +1 -1
- package/dist/chunks/{UserTicketDetailPage-V0mLXrox.js → UserTicketDetailPage-DkufSlvZ.js} +2 -2
- package/dist/chunks/{UserTicketDetailPage-V0mLXrox.js.map → UserTicketDetailPage-DkufSlvZ.js.map} +1 -1
- package/dist/chunks/{UsersGroupsPage-CmdaU-z-.js → UsersGroupsPage-C38s2-Rq.js} +3 -3
- package/dist/chunks/{UsersGroupsPage-CmdaU-z-.js.map → UsersGroupsPage-C38s2-Rq.js.map} +1 -1
- package/dist/chunks/{UsersGroupsPage-BgfAMgEP.js → UsersGroupsPage-Dq3rAteo.js} +2 -2
- package/dist/chunks/{UsersGroupsPage-BgfAMgEP.js.map → UsersGroupsPage-Dq3rAteo.js.map} +1 -1
- package/dist/chunks/{UsersPage-Bg7033pp.js → UsersPage-B5C5KEUR.js} +2 -2
- package/dist/chunks/{UsersPage-Bg7033pp.js.map → UsersPage-B5C5KEUR.js.map} +1 -1
- package/dist/chunks/{UsersPage-TYAfwPY1.js → UsersPage-CXC9Hvq6.js} +2 -2
- package/dist/chunks/{UsersPage-TYAfwPY1.js.map → UsersPage-CXC9Hvq6.js.map} +1 -1
- package/dist/chunks/{accessRequestsApi-DZeDvzwv.js → accessRequestsApi-B-4TJ5_U.js} +2 -2
- package/dist/chunks/{accessRequestsApi-DZeDvzwv.js.map → accessRequestsApi-B-4TJ5_U.js.map} +1 -1
- package/dist/chunks/{accessRequestsApi-ZXFPCid2.js → accessRequestsApi-DZSfThpd.js} +2 -2
- package/dist/chunks/{accessRequestsApi-ZXFPCid2.js.map → accessRequestsApi-DZSfThpd.js.map} +1 -1
- package/dist/chunks/{aiApi-CsH8DXgs.js → aiApi-B20Teu2v.js} +2 -2
- package/dist/chunks/{aiApi-CsH8DXgs.js.map → aiApi-B20Teu2v.js.map} +1 -1
- package/dist/chunks/{aiApi-CVPzFTXa.js → aiApi-DMGz-RPM.js} +2 -2
- package/dist/chunks/{aiApi-CVPzFTXa.js.map → aiApi-DMGz-RPM.js.map} +1 -1
- package/dist/chunks/{applicationAnalyticsApi-B8AhFYLr.js → applicationAnalyticsApi-Bwa75Fzd.js} +2 -2
- package/dist/chunks/{applicationAnalyticsApi-B8AhFYLr.js.map → applicationAnalyticsApi-Bwa75Fzd.js.map} +1 -1
- package/dist/chunks/{applicationAnalyticsApi-Ce_1qOk-.js → applicationAnalyticsApi-CLBqRPfN.js} +2 -2
- package/dist/chunks/{applicationAnalyticsApi-Ce_1qOk-.js.map → applicationAnalyticsApi-CLBqRPfN.js.map} +1 -1
- package/dist/chunks/{groupsApi-BgCk2fsp.js → groupsApi-QzXI-5xu.js} +2 -2
- package/dist/chunks/{groupsApi-BgCk2fsp.js.map → groupsApi-QzXI-5xu.js.map} +1 -1
- package/dist/chunks/{groupsApi-BIbG665N.js → groupsApi-hB9kSWEd.js} +2 -2
- package/dist/chunks/{groupsApi-BIbG665N.js.map → groupsApi-hB9kSWEd.js.map} +1 -1
- package/dist/chunks/{index-Cb3LotuT.js → index--NGcBYUu.js} +3 -3
- package/dist/chunks/{index-Cb3LotuT.js.map → index--NGcBYUu.js.map} +1 -1
- package/dist/chunks/{index-C33zcyF4.js → index--aPwOFjF.js} +2 -2
- package/dist/chunks/{index-C33zcyF4.js.map → index--aPwOFjF.js.map} +1 -1
- package/dist/chunks/{index-sMr9qND_.js → index-0VrOtwP0.js} +2 -2
- package/dist/chunks/{index-sMr9qND_.js.map → index-0VrOtwP0.js.map} +1 -1
- package/dist/chunks/{index-DDKetfKq.js → index-37U271aw.js} +2 -2
- package/dist/chunks/{index-DDKetfKq.js.map → index-37U271aw.js.map} +1 -1
- package/dist/chunks/{index-B9fS7ir6.js → index-B7qZTuQ-.js} +2 -2
- package/dist/chunks/{index-B9fS7ir6.js.map → index-B7qZTuQ-.js.map} +1 -1
- package/dist/chunks/{index-CdjBY7L8.js → index-Bedzmqr-.js} +2 -2
- package/dist/chunks/{index-CdjBY7L8.js.map → index-Bedzmqr-.js.map} +1 -1
- package/dist/chunks/{index-CHG_O1fS.js → index-Betxo5g5.js} +2 -2
- package/dist/chunks/{index-CHG_O1fS.js.map → index-Betxo5g5.js.map} +1 -1
- package/dist/chunks/{index-jiGu-H8x.js → index-BmaJz475.js} +2 -2
- package/dist/chunks/{index-jiGu-H8x.js.map → index-BmaJz475.js.map} +1 -1
- package/dist/chunks/{index-C53JoVNk.js → index-Buhqag3v.js} +2 -2
- package/dist/chunks/{index-C53JoVNk.js.map → index-Buhqag3v.js.map} +1 -1
- package/dist/chunks/{index-DO0Rw7hX.js → index-C3VxlfKq.js} +2 -2
- package/dist/chunks/{index-DO0Rw7hX.js.map → index-C3VxlfKq.js.map} +1 -1
- package/dist/chunks/{index-CSQ60fpG.js → index-CgpRo8Oe.js} +2 -2
- package/dist/chunks/{index-CSQ60fpG.js.map → index-CgpRo8Oe.js.map} +1 -1
- package/dist/chunks/{index-B-e-ELsf.js → index-DOY0w8Iu.js} +8 -8
- package/dist/chunks/{index-B-e-ELsf.js.map → index-DOY0w8Iu.js.map} +1 -1
- package/dist/chunks/{index-D2REDIRX.js → index-DwuvIOrQ.js} +2 -2
- package/dist/chunks/{index-D2REDIRX.js.map → index-DwuvIOrQ.js.map} +1 -1
- package/dist/chunks/{index-DCcl7Qof.js → index-DzedSLdI.js} +2 -2
- package/dist/chunks/{index-DCcl7Qof.js.map → index-DzedSLdI.js.map} +1 -1
- package/dist/chunks/{index-2wUhd9Lu.js → index-IgLVXPg8.js} +10 -10
- package/dist/chunks/index-IgLVXPg8.js.map +1 -0
- package/dist/chunks/{index-CwSaRXXg.js → index-lpIzhufD.js} +1916 -1900
- package/dist/chunks/index-lpIzhufD.js.map +1 -0
- package/dist/chunks/{index-Cuwn2q-f.js → index-mLUKwbGl.js} +4 -4
- package/dist/chunks/{index-Cuwn2q-f.js.map → index-mLUKwbGl.js.map} +1 -1
- package/dist/chunks/{index-B0mk2tNY.js → index-tO6MMIFB.js} +2 -2
- package/dist/chunks/{index-B0mk2tNY.js.map → index-tO6MMIFB.js.map} +1 -1
- package/dist/chunks/{tenantIconMap-BpNANQ5s.js → tenantIconMap-BQD9byc8.js} +2 -2
- package/dist/chunks/{tenantIconMap-BpNANQ5s.js.map → tenantIconMap-BQD9byc8.js.map} +1 -1
- package/dist/chunks/{tenantIconMap-DtdUgvJO.js → tenantIconMap-CTMuSt18.js} +2 -2
- package/dist/chunks/{tenantIconMap-DtdUgvJO.js.map → tenantIconMap-CTMuSt18.js.map} +1 -1
- package/dist/chunks/{ticketingApi-Bu4rKwLl.js → ticketingApi-BNIdox5t.js} +2 -2
- package/dist/chunks/{ticketingApi-Bu4rKwLl.js.map → ticketingApi-BNIdox5t.js.map} +1 -1
- package/dist/chunks/{ticketingApi-r4Avm9iS.js → ticketingApi-J0vC_t7r.js} +2 -2
- package/dist/chunks/{ticketingApi-r4Avm9iS.js.map → ticketingApi-J0vC_t7r.js.map} +1 -1
- package/dist/chunks/{useAccessRequests-B9bF4swg.js → useAccessRequests-DCNNLnxk.js} +3 -3
- package/dist/chunks/{useAccessRequests-B9bF4swg.js.map → useAccessRequests-DCNNLnxk.js.map} +1 -1
- package/dist/chunks/{useAccessRequests-JyPUX3Om.js → useAccessRequests-DT7X4FAK.js} +2 -2
- package/dist/chunks/{useAccessRequests-JyPUX3Om.js.map → useAccessRequests-DT7X4FAK.js.map} +1 -1
- package/dist/chunks/{useUserAccessRequests-DjPQenC2.js → useUserAccessRequests-BYbmG4c7.js} +2 -2
- package/dist/chunks/{useUserAccessRequests-DjPQenC2.js.map → useUserAccessRequests-BYbmG4c7.js.map} +1 -1
- package/dist/chunks/{useUserAccessRequests-BB6FHW14.js → useUserAccessRequests-CylKxRN6.js} +2 -2
- package/dist/chunks/{useUserAccessRequests-BB6FHW14.js.map → useUserAccessRequests-CylKxRN6.js.map} +1 -1
- package/dist/hooks/useCollapsibleState.d.ts +5 -2
- package/dist/hooks/useCollapsibleState.d.ts.map +1 -1
- package/dist/i18n/config.d.ts +1 -0
- package/dist/i18n/config.d.ts.map +1 -1
- package/dist/main.d.ts +0 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/smartstack.cjs +1 -1
- package/dist/smartstack.js +1 -1
- package/dist/utils/permissions.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/index-2wUhd9Lu.js.map +0 -1
- package/dist/chunks/index-CwSaRXXg.js.map +0 -1
package/dist/chunks/{ReferencesManagementPage-DhVsuElE.js → ReferencesManagementPage-ZCuYtqd7.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-2wUhd9Lu.js"),se=require("./TenantScopeSelector-Cym_Zyps.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-IgLVXPg8.js"),se=require("./TenantScopeSelector-D-BKgQPV.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-ZCuYtqd7.js.map
|