@xframework-ca-test/cli 1.0.33 → 1.0.35
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/ui/assets/AIVision-0025192f.js +4 -0
- package/dist/ui/assets/AccountDetails-42610e44.js +1 -0
- package/dist/ui/assets/AccountDetails-5b4cd3f7.js +1 -0
- package/dist/ui/assets/AccountServices-f68f471d.js +1 -0
- package/dist/ui/assets/AccountsList-262479cf.js +1 -0
- package/dist/ui/assets/ActionLink-9db8b1c2.js +1 -0
- package/dist/ui/assets/AdaptableCard-3d1e1f96.js +1 -0
- package/dist/ui/assets/AddAccount-2cd72664.js +1 -0
- package/dist/ui/assets/AddEditFile-6ae10d57.js +1 -0
- package/dist/ui/assets/AddEditTranslation-3812ff0f.js +1 -0
- package/dist/ui/assets/AiApiLogList-1eac39b7.js +1 -0
- package/dist/ui/assets/AiCa-2e90495f.js +1 -0
- package/dist/ui/assets/Alert-59d09a99.js +1 -0
- package/dist/ui/assets/ApiService-df126758.js +1 -0
- package/dist/ui/assets/AppLandingPage-afcea727.js +4 -0
- package/dist/ui/assets/AuditLogsList-ea37686b.js +1 -0
- package/dist/ui/assets/Auth0Callback-00729568.js +1 -0
- package/dist/ui/assets/BarCodes-4ff49536.js +1 -0
- package/dist/ui/assets/BlankLayout-7085ab88.js +1 -0
- package/dist/ui/assets/{BrainServices-a4bb698e.js → BrainServices-4cb93af5.js} +1 -1
- package/dist/ui/assets/CalendarList-689ed66a.js +2 -0
- package/dist/ui/assets/CalendarList-f4a9aa21.css +8 -0
- package/dist/ui/assets/CategoryList-a6d01041.js +1 -0
- package/dist/ui/assets/CategoryList-c03f4259.js +1 -0
- package/dist/ui/assets/ChatContainer-fec7b84d.js +1 -0
- package/dist/ui/assets/ChatsList-4b3194e4.js +1 -0
- package/dist/ui/assets/Check-af681a30.js +1 -0
- package/dist/ui/assets/CheckInVideo-aa9f50b2.js +6 -0
- package/dist/ui/assets/ClassicLayout-a9866742.js +2 -0
- package/dist/ui/assets/CompanyList-94119d71.js +1 -0
- package/dist/ui/assets/{CompanyService-1bf7c3c8.js → CompanyService-491a9cc1.js} +1 -1
- package/dist/ui/assets/{Component-59e4c14b.js → Component-566d01e0.js} +1 -1
- package/dist/ui/assets/ConfirmDialog-2838a642.js +1 -0
- package/dist/ui/assets/ContactDetails-c9dc0ed1.js +1 -0
- package/dist/ui/assets/{ContactService-92281a90.js → ContactService-8afcaeb7.js} +1 -1
- package/dist/ui/assets/ContactsList-5b06c9b8.js +1 -0
- package/dist/ui/assets/CountiesList-18b23cf7.js +1 -0
- package/dist/ui/assets/CountyDetails-ea024f14.js +1 -0
- package/dist/ui/assets/CourseDetails-8a5f8d63.js +1 -0
- package/dist/ui/assets/CourseList-3564fec3.js +1 -0
- package/dist/ui/assets/{CourseService-f0dc3bf1.js → CourseService-29ad460c.js} +1 -1
- package/dist/ui/assets/CreateSignature-c22e4a71.js +7 -0
- package/dist/ui/assets/{CustomerInfoField-fff65ace.js → CustomerInfoField-4bf880e2.js} +1 -1
- package/dist/ui/assets/DeckedLayout-610fe851.js +1 -0
- package/dist/ui/assets/DensitySelector-5d2e901f.js +1 -0
- package/dist/ui/assets/{DepartmentServices-3d56a9e7.js → DepartmentServices-a53e998b.js} +1 -1
- package/dist/ui/assets/{DigitalSignature-fff42e33.js → DigitalSignature-69eaf80c.js} +1 -1
- package/dist/ui/assets/{DocumemtManagementService-6501a5c1.js → DocumemtManagementService-85cde51a.js} +1 -1
- package/dist/ui/assets/DocumentActivity-bc938c61.js +1 -0
- package/dist/ui/assets/DocumentLayout-a12982d7.js +1 -0
- package/dist/ui/assets/DocumentList2-9c8c6284.js +23 -0
- package/dist/ui/assets/DocumentLists-1cdaae06.js +1 -0
- package/dist/ui/assets/DocumentUserSigned-f7371fc5.js +7 -0
- package/dist/ui/assets/DocumentsList-3b25907c.js +1 -0
- package/dist/ui/assets/DoubleSidedImage-b4bd3915.js +1 -0
- package/dist/ui/assets/{Drawer-949c18c6.js → Drawer-4f97e662.js} +1 -1
- package/dist/ui/assets/DynamicDashboard-0a41d287.js +1 -0
- package/dist/ui/assets/{DynamicTablesService-963fe77b.js → DynamicTablesService-6aa57f52.js} +1 -1
- package/dist/ui/assets/EditAccount-e42d66af.js +1 -0
- package/dist/ui/assets/EditLead-c8c9760a.js +1 -0
- package/dist/ui/assets/FaqItems-25d66543.js +6 -0
- package/dist/ui/assets/{FileManagementServices-25fd64c5.js → FileManagementServices-19b47568.js} +1 -1
- package/dist/ui/assets/{FolderOpen-88bfcc74.js → FolderOpen-7b0e2ac0.js} +1 -1
- package/dist/ui/assets/FormContainer-9a52b9e8.js +1 -0
- package/dist/ui/assets/{GeneralSettings-a7f805e8.js → GeneralSettings-c8c2f051.js} +5 -5
- package/dist/ui/assets/GenericPage-81e41302.js +1 -0
- package/dist/ui/assets/GridMapDetails-38f50b3c.js +1 -0
- package/dist/ui/assets/HorizontalMenuContent-fd559f4d.js +1 -0
- package/dist/ui/assets/{ImportFile-3f60d715.js → ImportFile-026b1771.js} +1 -1
- package/dist/ui/assets/{InlineSignaturePad-09c06619.js → InlineSignaturePad-f5630151.js} +1 -1
- package/dist/ui/assets/InvoicesList-9723bc5a.js +1 -0
- package/dist/ui/assets/{KeyVaultService-874d83fe.js → KeyVaultService-9608f0ff.js} +1 -1
- package/dist/ui/assets/LeadDetails-8cdaae0e.js +1 -0
- package/dist/ui/assets/{LeadSourceService-e46fa85e.js → LeadSourceService-cf71ea64.js} +1 -1
- package/dist/ui/assets/LeadsList-1ec20a77.js +1 -0
- package/dist/ui/assets/Logo-dd6f7656.js +1 -0
- package/dist/ui/assets/MapView-dcab88b3.js +1 -0
- package/dist/ui/assets/MarketingPage-998d10b0.js +4 -0
- package/dist/ui/assets/MenuNew-79fc95f3.js +1 -0
- package/dist/ui/assets/{MenuTable-c2c65021.js → MenuTable-f69e0fe4.js} +1 -1
- package/dist/ui/assets/MessageInput-07fcc5cb.js +21 -0
- package/dist/ui/assets/MessagesList-21d2b034.js +1 -0
- package/dist/ui/assets/ModernLayout-05af7cf7.js +1 -0
- package/dist/ui/assets/{NoData-8c485a3a.js → NoData-4cc4af03.js} +1 -1
- package/dist/ui/assets/Notify-8fb74d48.js +1 -0
- package/dist/ui/assets/OpportunitiesList-2f96958f.js +1 -0
- package/dist/ui/assets/OpportunityDetails-aaec3200.js +1 -0
- package/dist/ui/assets/{OpportunityServices-fa4fabfd.js → OpportunityServices-c4510dd2.js} +1 -1
- package/dist/ui/assets/OpportunityStatus-ea3b5ee2.js +1 -0
- package/dist/ui/assets/PageBreadcrumb-cf54a6e9.js +1 -0
- package/dist/ui/assets/{Password-d9294711.js → Password-21414dc6.js} +1 -1
- package/dist/ui/assets/PasswordInput-333c82ca.js +1 -0
- package/dist/ui/assets/{PreferenceService-75bf9db6.js → PreferenceService-d2b3e003.js} +1 -1
- package/dist/ui/assets/Profile-8c9fd2fc.js +1 -0
- package/dist/ui/assets/{ReportEditor-8880f57e.js → ReportEditor-4e4f6d53.js} +3 -3
- package/dist/ui/assets/{ReportViewer-9f1080f7.js → ReportViewer-616d3cfc.js} +30 -30
- package/dist/ui/assets/RoleEdit-a076ea85.js +1 -0
- package/dist/ui/assets/RoleForm-47691f91.js +1 -0
- package/dist/ui/assets/{RoleNew-49fadb16.js → RoleNew-e86a1513.js} +1 -1
- package/dist/ui/assets/{RoleService-7008da2c.js → RoleService-2f9ed883.js} +1 -1
- package/dist/ui/assets/ScheduleCycle-0ae23631.js +1 -0
- package/dist/ui/assets/{ScheduleService-7228f0a3.js → ScheduleService-41a88c41.js} +1 -1
- package/dist/ui/assets/ScreenList-8f58150b.js +1 -0
- package/dist/ui/assets/Settings-fc91c9d2.js +2 -0
- package/dist/ui/assets/{SetupWizard-4172e377.js → SetupWizard-d1363582.js} +1 -1
- package/dist/ui/assets/SimpleLayout-77cfb778.js +1 -0
- package/dist/ui/assets/StackedSideLayout-2f1ee9d1.js +1 -0
- package/dist/ui/assets/StickyFooter-3e569b80.js +1 -0
- package/dist/ui/assets/SupportRequets-0ecd4ab8.js +1 -0
- package/dist/ui/assets/{Switcher-c8648037.js → Switcher-e2fba588.js} +1 -1
- package/dist/ui/assets/TimeLogApprovalDataList-7b49a432.js +1 -0
- package/dist/ui/assets/TimeLogApprovalList-78cab2b6.js +1 -0
- package/dist/ui/assets/TimeLogList-592b29aa.js +1 -0
- package/dist/ui/assets/{TimeLogService-cd7b2f61.js → TimeLogService-83166cbc.js} +1 -1
- package/dist/ui/assets/TimesheetsList-d1520efb.js +1 -0
- package/dist/ui/assets/TranslationList-88d7d5d7.js +1 -0
- package/dist/ui/assets/TweaksPanel-bc10bc47.js +112 -0
- package/dist/ui/assets/{Upload-fb34ce03.js → Upload-be937eb6.js} +4 -4
- package/dist/ui/assets/UserEdit-1f8208f3.js +1 -0
- package/dist/ui/assets/UserForm-e9b56aff.js +1 -0
- package/dist/ui/assets/{UserNew-b36c342c.js → UserNew-31fa258f.js} +1 -1
- package/dist/ui/assets/{UserService-047aef51.js → UserService-1b93ceb0.js} +1 -1
- package/dist/ui/assets/ViewTimeLogForApproval-ae077050.js +1 -0
- package/dist/ui/assets/Views-1359da48.js +1 -0
- package/dist/ui/assets/WelcomeList-dc8666ec.js +9 -0
- package/dist/ui/assets/WidgetLayoutsService-49730609.js +1 -0
- package/dist/ui/assets/{WrapperCell-a7981b07.js → WrapperCell-3d5592cf.js} +1 -1
- package/dist/ui/assets/actioncell-6b5ebd6c.js +1 -0
- package/dist/ui/assets/{ar-3c9c213e.js → ar-fb4f0ea8.js} +1 -1
- package/dist/ui/assets/calendarList-ac838a86.js +2 -0
- package/dist/ui/assets/{cjs-162261df.js → cjs-998de55c.js} +1 -1
- package/dist/ui/assets/createSvgIcon-aba65987.js +1 -0
- package/dist/ui/assets/documentsList-4e2e061e.js +1 -0
- package/dist/ui/assets/{es-be649ede.js → es-cd58d3ad.js} +1 -1
- package/dist/ui/assets/{esm-f306d015.js → esm-c40433f8.js} +1 -1
- package/dist/ui/assets/gridList-e1571c87.js +1 -0
- package/dist/ui/assets/gridMapTable-d95f9c70.js +1 -0
- package/dist/ui/assets/{index-f6be0390.js → index-00a8eb64.js} +1 -1
- package/dist/ui/assets/index-04438b6b.js +22 -0
- package/dist/ui/assets/index-058738bc.js +1 -0
- package/dist/ui/assets/{index-e4c6057f.js → index-0b08ce18.js} +1 -1
- package/dist/ui/assets/index-0d730815.js +4 -0
- package/dist/ui/assets/index-0efcf53a.js +1 -0
- package/dist/ui/assets/index-0f432250.js +1 -0
- package/dist/ui/assets/{index-cebd880b.js → index-0fd6e996.js} +1 -1
- package/dist/ui/assets/{index-49a94e54.js → index-11297f4a.js} +1 -1
- package/dist/ui/assets/index-14c1c1d7.js +1 -0
- package/dist/ui/assets/index-15e1f4be.js +1 -0
- package/dist/ui/assets/index-16586c21.js +1 -0
- package/dist/ui/assets/index-19346c14.js +1 -0
- package/dist/ui/assets/{index-16bb10a6.js → index-1dc2b9d2.js} +1 -1
- package/dist/ui/assets/index-211fbe21.js +1 -0
- package/dist/ui/assets/index-23e16bff.js +1 -0
- package/dist/ui/assets/index-27aef8b5.js +1 -0
- package/dist/ui/assets/{index-36228db5.js → index-289b3fd9.js} +1 -1
- package/dist/ui/assets/{index-a22a3546.js → index-2dae59b1.js} +1 -1
- package/dist/ui/assets/index-353fd6dd.js +1 -0
- package/dist/ui/assets/{index-ea125a16.js → index-359d245d.js} +1 -1
- package/dist/ui/assets/{index-c62ac197.js → index-3b5ce20a.js} +70 -62
- package/dist/ui/assets/index-3b929ba4.js +34 -0
- package/dist/ui/assets/index-42e3a337.js +1 -0
- package/dist/ui/assets/index-44b6de3a.js +1 -0
- package/dist/ui/assets/index-46d3ca9a.js +7 -0
- package/dist/ui/assets/{index-e3cc723f.js → index-49016ad0.js} +1 -1
- package/dist/ui/assets/index-51132258.js +1 -0
- package/dist/ui/assets/{index-dc103f22.js → index-52963879.js} +1 -1
- package/dist/ui/assets/{index-fcc1c999.js → index-533fd007.js} +1 -1
- package/dist/ui/assets/index-59ec468b.js +13 -0
- package/dist/ui/assets/index-5e2d5279.js +1 -0
- package/dist/ui/assets/{index-d17da176.js → index-62f95885.js} +1 -1
- package/dist/ui/assets/index-659c6412.js +1 -0
- package/dist/ui/assets/index-6873dfc3.js +1 -0
- package/dist/ui/assets/index-69a68d9e.js +1 -0
- package/dist/ui/assets/index-6a6902c7.js +1 -0
- package/dist/ui/assets/index-7596c6bb.js +1 -0
- package/dist/ui/assets/{index-47dcc43a.js → index-8045c5f0.js} +1 -1
- package/dist/ui/assets/{index-b028e652.js → index-8677acd1.js} +1 -1
- package/dist/ui/assets/{index-42e65911.js → index-88c52b97.js} +1 -1
- package/dist/ui/assets/index-89cfefab.js +1 -0
- package/dist/ui/assets/{index-bea4c3dc.js → index-8c0643fd.js} +1 -1
- package/dist/ui/assets/index-8d5b6a1f.js +1 -0
- package/dist/ui/assets/index-8d5d70f9.js +1 -0
- package/dist/ui/assets/{index-9b41371d.js → index-91505016.js} +1 -1
- package/dist/ui/assets/{index-ffc00dbb.js → index-92314073.js} +1 -1
- package/dist/ui/assets/index-985cf3f6.js +1 -0
- package/dist/ui/assets/index-a14e51de.js +1 -0
- package/dist/ui/assets/index-a733f80b.js +1 -0
- package/dist/ui/assets/index-a84d5808.js +1 -0
- package/dist/ui/assets/index-acac6006.js +1 -0
- package/dist/ui/assets/index-b0ef7ac3.js +1 -0
- package/dist/ui/assets/index-b6ef5984.js +1 -0
- package/dist/ui/assets/{index-fc9071e0.js → index-bd4edda3.js} +1 -1
- package/dist/ui/assets/{index-0ec72c4b.js → index-c29b8474.js} +1 -1
- package/dist/ui/assets/index-c88c7790.js +19 -0
- package/dist/ui/assets/index-ce89a95e.css +7 -0
- package/dist/ui/assets/index-d221d69e.js +1 -0
- package/dist/ui/assets/{index-f1576468.js → index-d33facae.js} +1 -1
- package/dist/ui/assets/index-e46c57a5.js +1 -0
- package/dist/ui/assets/index-e863817c.js +1 -0
- package/dist/ui/assets/index-f4af2342.js +1 -0
- package/dist/ui/assets/{index-77e820d0.js → index-fc9f8c4b.js} +1 -1
- package/dist/ui/assets/{index-ec2010d2.js → index-ff23edc5.js} +1 -1
- package/dist/ui/assets/{index.esm-70ab539c.js → index.esm-b2d342b5.js} +1 -1
- package/dist/ui/assets/liveLocation-8e0bb2f3.js +1 -0
- package/dist/ui/assets/{mapView-ab35acaa.js → mapView-c8063ed6.js} +1 -1
- package/dist/ui/assets/modeuls-setup-4b06843c.js +1 -0
- package/dist/ui/assets/{permissionHoc-6f787658.js → permissionHoc-0818bfb0.js} +1 -1
- package/dist/ui/assets/{react-21134174.js → react-12ddbe48.js} +1 -1
- package/dist/ui/assets/{react-4d5dc208.js → react-61e0b284.js} +1 -1
- package/dist/ui/assets/{strongPassword-bbec776a.js → strongPassword-6bc8786f.js} +1 -1
- package/dist/ui/assets/{styles-0608350c.js → styles-b7ae7bf6.js} +1 -1
- package/dist/ui/assets/{tableV2-4d1c9fd2.js → tableV2-99c808c0.js} +1 -1
- package/dist/ui/assets/tableV3-24eed052.js +1 -0
- package/dist/ui/assets/ticketRequestDetails-8b299fbd.js +1 -0
- package/dist/ui/assets/{useDidUpdate-25c4d4ed.js → useDidUpdate-de319a18.js} +1 -1
- package/dist/ui/assets/{useDrop-02b0e5d7.js → useDrop-8f0d11a7.js} +1 -1
- package/dist/ui/assets/useFilteredData-e8fad668.js +1 -0
- package/dist/ui/assets/{usePermission-d94b4984.js → usePermission-4689548c.js} +1 -1
- package/dist/ui/assets/{vendor-charts-eccea5d1.js → vendor-charts-4be0b5ab.js} +1 -1
- package/dist/ui/assets/{vendor-codemirror-c8203b49.js → vendor-codemirror-1a1216c9.js} +11 -11
- package/dist/ui/assets/{vendor-devex-33a39e11.js → vendor-devex-4076ffeb.js} +2 -2
- package/dist/ui/assets/{vendor-excel-ee8fc4e5.js → vendor-excel-3b3553df.js} +1 -1
- package/dist/ui/assets/{vendor-i18n-2fcb1983.js → vendor-i18n-b89304ef.js} +1 -1
- package/dist/ui/assets/vendor-mui-98daa63f.js +185 -0
- package/dist/ui/assets/{vendor-pdf-b2a5d8b1.js → vendor-pdf-3c29882d.js} +1 -1
- package/dist/ui/assets/withHeaderItem-df2cc5d9.js +1 -0
- package/dist/ui/assets/{zh-cn-1881e930.js → zh-cn-13c6c696.js} +1 -1
- package/dist/ui/config.js +16 -20
- package/dist/ui/index.html +9 -9
- package/dist/ui/manifest.json +2 -2
- package/index.bundle.js +60 -46
- package/package.json +1 -1
- package/dist/ui/assets/AIVision-4f515575.js +0 -4
- package/dist/ui/assets/AccountDetails-2b42d262.js +0 -1
- package/dist/ui/assets/AccountDetails-492dee8f.js +0 -1
- package/dist/ui/assets/AccountServices-62599aae.js +0 -1
- package/dist/ui/assets/AccountsList-fe7cb5f9.js +0 -1
- package/dist/ui/assets/ActionLink-33e476e1.js +0 -1
- package/dist/ui/assets/AdaptableCard-df7695d6.js +0 -1
- package/dist/ui/assets/AddAccount-a05910e8.js +0 -1
- package/dist/ui/assets/AddEditFile-063c229b.js +0 -1
- package/dist/ui/assets/AddEditTranslation-43beae49.js +0 -1
- package/dist/ui/assets/AiApiLogList-a488921d.js +0 -1
- package/dist/ui/assets/AiCa-9c1b25b2.js +0 -1
- package/dist/ui/assets/Alert-7dfbd254.js +0 -1
- package/dist/ui/assets/ApiService-2b99757f.js +0 -1
- package/dist/ui/assets/AppLandingPage-3956cf0c.js +0 -4
- package/dist/ui/assets/AuditLogsList-7a2ce37d.js +0 -1
- package/dist/ui/assets/Auth0Callback-b943f19f.js +0 -1
- package/dist/ui/assets/BarCodes-17ed5da4.js +0 -1
- package/dist/ui/assets/BlankLayout-2f6e1153.js +0 -1
- package/dist/ui/assets/CalendarList-25834ddb.css +0 -11
- package/dist/ui/assets/CalendarList-72739043.js +0 -2
- package/dist/ui/assets/CategoryList-9f82e9a3.js +0 -1
- package/dist/ui/assets/CategoryList-c97891e7.js +0 -1
- package/dist/ui/assets/ChatContainer-4a38b179.js +0 -1
- package/dist/ui/assets/ChatsList-6c2c3e2f.js +0 -1
- package/dist/ui/assets/Check-71f21a49.js +0 -1
- package/dist/ui/assets/CheckInVideo-cb5fa9a2.js +0 -6
- package/dist/ui/assets/ClassicLayout-7d09e5ac.js +0 -1
- package/dist/ui/assets/CompanyList-9532f511.js +0 -1
- package/dist/ui/assets/ConfirmDialog-3202eb3d.js +0 -1
- package/dist/ui/assets/ContactDetails-3b70919b.js +0 -1
- package/dist/ui/assets/ContactsList-e9ac0fa3.js +0 -1
- package/dist/ui/assets/CountiesList-6ad338a5.js +0 -1
- package/dist/ui/assets/CountyDetails-22d4bc89.js +0 -1
- package/dist/ui/assets/CourseDetails-18040b49.js +0 -1
- package/dist/ui/assets/CourseList-e502f89d.js +0 -1
- package/dist/ui/assets/CreateSignature-375d191b.js +0 -7
- package/dist/ui/assets/DeckedLayout-909ac220.js +0 -1
- package/dist/ui/assets/DensitySelector-a2c1c68f.js +0 -1
- package/dist/ui/assets/DocumentActivity-d63dacec.js +0 -1
- package/dist/ui/assets/DocumentLayout-637075fd.js +0 -1
- package/dist/ui/assets/DocumentList2-518d2fa4.js +0 -23
- package/dist/ui/assets/DocumentLists-2da9ff88.js +0 -1
- package/dist/ui/assets/DocumentUserSigned-27bfa6e6.js +0 -7
- package/dist/ui/assets/DocumentsList-9f56db71.js +0 -1
- package/dist/ui/assets/DoubleSidedImage-ae98733b.js +0 -1
- package/dist/ui/assets/DynamicDashboard-6f177244.js +0 -1
- package/dist/ui/assets/EditAccount-1c1a8318.js +0 -1
- package/dist/ui/assets/EditLead-cc38d2a2.js +0 -1
- package/dist/ui/assets/FaqItems-c1c85af7.js +0 -6
- package/dist/ui/assets/FormContainer-91c2b0e4.js +0 -1
- package/dist/ui/assets/GenericPage-25a5d92a.js +0 -1
- package/dist/ui/assets/GridMapDetails-851a5781.js +0 -1
- package/dist/ui/assets/HorizontalMenuContent-96da38e1.js +0 -1
- package/dist/ui/assets/InvoicesList-8e66a112.js +0 -1
- package/dist/ui/assets/LeadDetails-ad63b3df.js +0 -1
- package/dist/ui/assets/LeadsList-bd7d9804.js +0 -1
- package/dist/ui/assets/Logo-3f3c9ee6.js +0 -1
- package/dist/ui/assets/MapView-afd1c913.js +0 -1
- package/dist/ui/assets/MarketingPage-89a860b1.js +0 -4
- package/dist/ui/assets/MenuEdit-d6e0d64c.js +0 -1
- package/dist/ui/assets/MessageInput-6dc83761.js +0 -21
- package/dist/ui/assets/MessagesList-966b69c5.js +0 -1
- package/dist/ui/assets/ModernLayout-03f30574.js +0 -1
- package/dist/ui/assets/Notify-bb3ce372.js +0 -1
- package/dist/ui/assets/OpportunitiesList-62eb34f6.js +0 -1
- package/dist/ui/assets/OpportunityDetails-356a8580.js +0 -1
- package/dist/ui/assets/OpportunityStatus-fa8108ea.js +0 -1
- package/dist/ui/assets/PasswordInput-8619a9df.js +0 -1
- package/dist/ui/assets/Profile-9104808b.js +0 -1
- package/dist/ui/assets/RoleEdit-98a6410b.js +0 -1
- package/dist/ui/assets/RoleForm-cc251eba.js +0 -1
- package/dist/ui/assets/ScheduleCycle-22c8e809.js +0 -1
- package/dist/ui/assets/ScreenList-9f7afa1c.js +0 -1
- package/dist/ui/assets/SidePanelContent-6b13836f.js +0 -1
- package/dist/ui/assets/SimpleLayout-d5445c0d.js +0 -2
- package/dist/ui/assets/StackedSideLayout-51127dc5.js +0 -1
- package/dist/ui/assets/StickyFooter-5b934274.js +0 -1
- package/dist/ui/assets/SupportRequets-be6542a9.js +0 -1
- package/dist/ui/assets/TimeLogApprovalDataList-c16d8bae.js +0 -1
- package/dist/ui/assets/TimeLogApprovalList-f6a75a20.js +0 -1
- package/dist/ui/assets/TimeLogList-ea288cce.js +0 -1
- package/dist/ui/assets/TimesheetsList-4a20e96c.js +0 -1
- package/dist/ui/assets/TranslationList-7a989333.js +0 -1
- package/dist/ui/assets/UserEdit-87262ea5.js +0 -1
- package/dist/ui/assets/UserForm-31fdd3b3.js +0 -1
- package/dist/ui/assets/ViewTimeLogForApproval-43b24a1a.js +0 -1
- package/dist/ui/assets/Views-74429e81.js +0 -1
- package/dist/ui/assets/WelcomeList-6c693eae.js +0 -9
- package/dist/ui/assets/actioncell-17e12e21.js +0 -1
- package/dist/ui/assets/calendarList-511b4d8f.js +0 -2
- package/dist/ui/assets/createSvgIcon-c5fc0d04.js +0 -1
- package/dist/ui/assets/documentsList-ac2c91ec.js +0 -1
- package/dist/ui/assets/dxicons-4c1b2089.ttf +0 -0
- package/dist/ui/assets/dxicons-ade3c9ed.woff2 +0 -0
- package/dist/ui/assets/dxicons-b4cd1226.woff +0 -0
- package/dist/ui/assets/gridList-cb9a14b1.js +0 -1
- package/dist/ui/assets/gridMapTable-c19770a8.js +0 -1
- package/dist/ui/assets/index-1d60e514.js +0 -1
- package/dist/ui/assets/index-26466d9d.js +0 -1
- package/dist/ui/assets/index-289cfedb.js +0 -1
- package/dist/ui/assets/index-2ce5b358.js +0 -1
- package/dist/ui/assets/index-307ce6d7.js +0 -1
- package/dist/ui/assets/index-36ba4ea7.js +0 -1
- package/dist/ui/assets/index-3f02e05a.js +0 -1
- package/dist/ui/assets/index-44662933.js +0 -13
- package/dist/ui/assets/index-51ee35f9.js +0 -1
- package/dist/ui/assets/index-54372d82.js +0 -1
- package/dist/ui/assets/index-569a9d2c.js +0 -1
- package/dist/ui/assets/index-62de659f.js +0 -13
- package/dist/ui/assets/index-6589dd2d.js +0 -1
- package/dist/ui/assets/index-6b6d0f06.js +0 -1
- package/dist/ui/assets/index-6c618440.js +0 -1
- package/dist/ui/assets/index-785ad361.js +0 -1
- package/dist/ui/assets/index-7df8779c.js +0 -1
- package/dist/ui/assets/index-82c9477e.js +0 -1
- package/dist/ui/assets/index-8ab45286.js +0 -1
- package/dist/ui/assets/index-8c229076.css +0 -7
- package/dist/ui/assets/index-a205cfed.js +0 -34
- package/dist/ui/assets/index-a23f9c87.js +0 -1
- package/dist/ui/assets/index-a455424a.js +0 -1
- package/dist/ui/assets/index-a4f78ee1.js +0 -1
- package/dist/ui/assets/index-aaad94c2.js +0 -1
- package/dist/ui/assets/index-b1b6b0f6.js +0 -1
- package/dist/ui/assets/index-c1f92742.js +0 -4
- package/dist/ui/assets/index-c2088808.js +0 -1
- package/dist/ui/assets/index-cbc29fa8.js +0 -1
- package/dist/ui/assets/index-cd2b7d32.js +0 -1
- package/dist/ui/assets/index-cf3804f1.js +0 -19
- package/dist/ui/assets/index-d0ef2cc2.js +0 -1
- package/dist/ui/assets/index-d1145737.js +0 -7
- package/dist/ui/assets/index-d58fb185.js +0 -1
- package/dist/ui/assets/index-d5b5a7e1.js +0 -1
- package/dist/ui/assets/index-daeff047.js +0 -1
- package/dist/ui/assets/index-ded3b055.js +0 -1
- package/dist/ui/assets/index-ede23a2b.js +0 -1
- package/dist/ui/assets/index-f8144346.js +0 -1
- package/dist/ui/assets/index-fd68b510.js +0 -1
- package/dist/ui/assets/index-fe3409ae.js +0 -1
- package/dist/ui/assets/liveLocation-646eef95.js +0 -1
- package/dist/ui/assets/modeuls-setup-402f891e.js +0 -1
- package/dist/ui/assets/tableV3-3d2f4952.js +0 -1
- package/dist/ui/assets/ticketRequestDetails-f78147f7.js +0 -1
- package/dist/ui/assets/vendor-mui-69397583.js +0 -185
- package/dist/ui/menudata/menus.json +0 -606
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{w as Ye,j as e,u as Dt,J as De,F as ye,N as Ue,I as yt,n as bt,o as ne,l as Nt}from"./vendor-mui-98daa63f.js";import{A as vt}from"./AdaptableCard-3d1e1f96.js";import{P as Ct}from"./PageBreadcrumb-cf54a6e9.js";import{r as c}from"./vendor-react-ece1c85f.js";import{o as He}from"./vendor-devex-4076ffeb.js";import{ai as y,dn as Re,D as be,k as Ne,B as z,a0 as K,r as re,E as A,F as q,a4 as $e,c as Pe,bA as Tt,d as St,aQ as Oe,ad as wt,dp as kt,dq as Et,cF as ze}from"./index-3b5ce20a.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import{a as ce,T as he}from"./index-a14e51de.js";import{D as de}from"./Drawer-4f97e662.js";import{a as Ve}from"./FormContainer-9a52b9e8.js";import{S as Ge}from"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import{U as It}from"./Upload-be937eb6.js";import{c as ve,a as V,j as fe,i as Ce,F as Te,b as Se,d as O,E as F}from"./index.esm-b2d342b5.js";import{t as Be,l as oe,u as ge}from"./dateTime-a775a333.js";import{d as Ft,b as We,e as Mt,a as At,c as qt,f as Ut,g as $t,h as Pt,i as Ot}from"./ScheduleService-41a88c41.js";import{r as Ze,u as _e,g as Qe}from"./index-c29b8474.js";import{C as zt}from"./ConfirmDialog-2838a642.js";import{u as Lt}from"./usePermission-4689548c.js";import{r as Yt}from"./createSvgIcon-aba65987.js";import{g as Ht,r as Rt}from"./index-d221d69e.js";import{S as Je}from"./StickyFooter-3e569b80.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-3c29882d.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-de319a18.js";import"./ContactService-8afcaeb7.js";import"./UserService-1b93ceb0.js";const Le=Ye(e.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),Vt=Ye(e.jsx("path",{d:"M17.5 4.5c-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6v14.65c0 .65.73.45.75.45C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5 1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.41.21.75-.19.75-.45V6c-1.49-1.12-3.63-1.5-5.5-1.5m3.5 14c-1.1-.35-2.3-.5-3.5-.5-1.7 0-4.15.65-5.5 1.5V8c1.35-.85 3.8-1.5 5.5-1.5 1.2 0 2.4.15 3.5.5z"}),"ImportContacts");y.extend(Re);y.extend(Be);be("calendar",Ze);const Gt=({isOpen:r,onClose:b,fetchEventData:I,Type:N})=>{const S=Ne(),{allContacts:g}=_e(d=>d.calendar.data),w={eventName:"",startDate:null,startTime:null,endDate:null,endTime:null,eventType:"",link:"",notes:"",participants:[],sendNotification:!1},k=ve({eventName:V().required("Event name is required"),startDate:fe().required("Start date is required"),startTime:V().required("Start time is required"),endDate:fe().required("End date is required"),endTime:V().required("End time is required"),eventType:V().required("Event type is required"),link:V().required("Link is required"),participants:Ce().min(1,"At least one participant is required").required("Participants are required")}),v=async d=>{const C=d==null?void 0:d.startDate,s=(d==null?void 0:d.startTime)??"00:00:00",t=(d==null?void 0:d.endDate)??C,l=(d==null?void 0:d.endTime)??s,{utcDate:n,utcTime:h}=oe(C,s),{utcDate:j,utcTime:E}=oe(t,l),M={eventName:d.eventName,eventDate:n,fromTime:h,endDate:j,toTime:E,notes:d.notes??"",sendNotification:d.sendNotification??!1,eventCategoryId:d.eventType,link:d.link??"",participantIds:d.participants.map(Y=>Y.id)},U=await Ft(M);U.success?(A.push(e.jsx(q,{title:"Success",type:"success",duration:2500,children:"Event Created"}),{placement:"top-center"}),b(),I()):A.push(e.jsx(q,{title:"Error",type:"danger",duration:2500,children:U.message}),{placement:"top-center"})};return c.useEffect(()=>{S(Qe({}))},[S]),e.jsx(de,{title:"Add Event",isOpen:r,onClose:b,portalClassName:"w30",footer:e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx(z,{size:"sm",className:"mr-2",onClick:b,children:"Cancel"}),e.jsx(z,{size:"sm",variant:"solid",type:"submit",form:"addEventForm",children:"Add Event"})]}),children:e.jsx(Te,{initialValues:w,validationSchema:k,onSubmit:v,children:({values:d,setFieldValue:C})=>e.jsxs(Se,{id:"addEventForm",children:[e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Event Name*"}),e.jsx(O,{name:"eventName",children:({field:s})=>e.jsx(K,{...s,placeholder:"Event Name"})}),e.jsx(F,{name:"eventName",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Start Date*"}),e.jsx(O,{name:"startDate",children:({field:s,form:t})=>e.jsx(ce,{name:"startDate",placeholder:"Select start date",field:s,onChange:l=>t.setFieldValue("startDate",l)})}),e.jsx(F,{name:"startDate",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Start Time*"}),e.jsx(O,{name:"startTime",children:({field:s,form:t})=>e.jsx(he,{name:"startTime",id:"startTime",field:s,format:"12",clearable:!1,onChange:l=>{const n=y(l).format("HH:mm:ss");t.setFieldValue("startTime",n)}})}),e.jsx(F,{name:"startTime",component:"div",className:"text-red-600"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"End Date*"}),e.jsx(O,{name:"endDate",children:({field:s,form:t})=>e.jsx(ce,{name:"endDate",placeholder:"Select end date",field:s,onChange:l=>t.setFieldValue("endDate",l)})}),e.jsx(F,{name:"endDate",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"End Time*"}),e.jsx(O,{name:"endTime",children:({field:s,form:t})=>e.jsx(he,{name:"endTime",id:"endTime",field:s,format:"12",clearable:!1,onChange:l=>{const n=y(l).format("HH:mm:ss");t.setFieldValue("endTime",n)}})}),e.jsx(F,{name:"endTime",component:"div",className:"text-red-600"})]})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Invite Contact(s)*"}),e.jsx(re,{options:g.map(s=>({...s,label:s.email,value:s.id})),isMulti:!0,onChange:s=>C("participants",s.map(t=>({email:t.email,id:t.id}))),className:"rounded-md"}),e.jsx(F,{name:"participants",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Event Type*"}),e.jsx(re,{options:N,value:N.find(s=>s.value===d.eventType),onChange:s=>C("eventType",s==null?void 0:s.value)}),e.jsx(F,{name:"eventType",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Link*"}),e.jsx(O,{name:"link",children:({field:s})=>e.jsx(K,{...s,placeholder:"Meeting Link"})}),e.jsx(F,{name:"link",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Notes"}),e.jsx(O,{name:"notes",children:({field:s})=>e.jsx(K,{...s,placeholder:"Notes",textArea:!0})})]}),e.jsx("div",{className:"pb-4",children:e.jsx(Ve,{label:"Send Notification",children:e.jsx(O,{name:"sendNotification",component:Ge})})})]})})})};y.extend(Re);y.extend(Be);be("calendar",Ze);const Bt=({isOpen:r,onClose:b,fetchEventData:I,selectedEvent:N,Type:S})=>{const g=Ne(),{allContacts:w}=_e(t=>t.calendar.data),k=(t,l)=>{if(!t)return;const n=t instanceof Date?t:new Date(t);if(isNaN(n.getTime()))return;const h=(l||"00:00:00").split(":").map(U=>Number(U)),j=Number.isFinite(h[0])?h[0]:0,E=Number.isFinite(h[1])?h[1]:0,M=Number.isFinite(h[2])?h[2]:0;if(![j,E,M].some(U=>isNaN(U)))return new Date(n.getFullYear(),n.getMonth(),n.getDate(),j,E,M)},v=t=>{if(!t)return{eventName:"",startDate:"",startTime:"",endDate:"",endTime:"",eventType:"",link:"",notes:"",participants:[],sendNotification:!1};const l=t.startDate instanceof Date&&!isNaN(t.startDate.getTime())?t.startDate:t.startDateTime?new Date(t.startDateTime):t.eventDate&&t.fromTime?ge(t.eventDate.slice(0,10),t.fromTime):null,n=t.endDate instanceof Date&&!isNaN(t.endDate.getTime())?t.endDate:t.endDateTime?new Date(t.endDateTime):t.endDate&&t.toTime?ge(t.endDate.slice(0,10),t.toTime):null,h=l?y(l).format("YYYY-MM-DD"):"",j=l?y(l).format("HH:mm:ss"):"",E=n?y(n).format("YYYY-MM-DD"):"",M=n?y(n).format("HH:mm:ss"):"";return{eventName:(t==null?void 0:t.text)||(t==null?void 0:t.eventName)||"",startDate:h,startTime:j,endDate:E,endTime:M,eventType:(t==null?void 0:t.eventType)||String(t==null?void 0:t.categoryId)||"",link:(t==null?void 0:t.link)||"",notes:(t==null?void 0:t.notes)||"",participants:(t==null?void 0:t.participants)||[],sendNotification:(t==null?void 0:t.sendNotification)||!1}},d=(()=>{const t=v(N);return console.log(N),{...t,startDate:t.startDate?new Date(Number(t.startDate.split("-")[0]),Number(t.startDate.split("-")[1])-1,Number(t.startDate.split("-")[2])):"",endDate:t.endDate?new Date(Number(t.endDate.split("-")[0]),Number(t.endDate.split("-")[1])-1,Number(t.endDate.split("-")[2])):""}})(),C=ve({eventName:V().required("Event name is required"),startDate:fe().required("Start date is required"),startTime:V().required("Start time is required"),endDate:fe().required("End date is required"),endTime:V().required("End time is required"),eventType:V().required("Event type is required"),link:V().required("Link is required"),participants:Ce().min(1,"At least one participant is required").required("Participants are required")}),s=async t=>{var _;const l=t==null?void 0:t.startDate,n=(t==null?void 0:t.startTime)??"00:00:00",h=(t==null?void 0:t.endDate)??l,j=(t==null?void 0:t.endTime)??n,{utcDate:E,utcTime:M}=oe(l,n),{utcDate:U,utcTime:Y}=oe(h,j),X={eventName:t.eventName,eventDate:E,fromTime:M,endDate:U,toTime:Y,eventCategoryId:t.eventType,link:t.link??"",notes:t.notes??"",sendNotification:t.sendNotification??!1,participantIds:(_=t.participants)==null?void 0:_.map(H=>H.participantId||H.id)},Z=await We(N==null?void 0:N.eventId,X);Z.success?(A.push(e.jsx(q,{title:"Success",type:"success",duration:2500,children:"Event Updated"}),{placement:"top-center"}),b(),I()):A.push(e.jsx(q,{title:"Error",type:"danger",duration:2500,children:Z.message}),{placement:"top-center"})};return c.useEffect(()=>{g(Qe({}))},[g]),e.jsx(de,{title:"Edit Event",isOpen:r,onClose:b,portalClassName:"w30",footer:e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx(z,{size:"sm",className:"mr-2",onClick:b,children:"Cancel"}),e.jsx(z,{size:"sm",variant:"solid",type:"submit",form:"editEventForm",children:"Update Event"})]}),children:e.jsx(Te,{initialValues:d,validationSchema:C,onSubmit:s,enableReinitialize:!0,children:({values:t,setFieldValue:l})=>e.jsxs(Se,{id:"editEventForm",children:[e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Event Name*"}),e.jsx(O,{name:"eventName",children:({field:n})=>e.jsx(K,{...n,placeholder:"Event Name"})}),e.jsx(F,{name:"eventName",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Start Date*"}),e.jsx(ce,{name:"startDate",value:t.startDate,onChange:n=>l("startDate",n)}),e.jsx(F,{name:"startDate",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Start Time*"}),e.jsx(he,{name:"startTime",format:"12",clearable:!1,defaultValue:k(t.startDate,t.startTime),onChange:n=>{const h=y(n).format("HH:mm:ss");l("startTime",h)}}),e.jsx(F,{name:"startTime",component:"div",className:"text-red-600"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"End Date*"}),e.jsx(ce,{name:"endDate",value:t.endDate,onChange:n=>l("endDate",n)}),e.jsx(F,{name:"endDate",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"End Time*"}),e.jsx(he,{name:"endTime",format:"12",clearable:!1,defaultValue:k(t.endDate,t.endTime),onChange:n=>{const h=y(n).format("HH:mm:ss");l("endTime",h)}}),e.jsx(F,{name:"endTime",component:"div",className:"text-red-600"})]})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Invite Contact(s)"}),e.jsx(re,{options:w.map(n=>({value:n.id,label:n.email,email:n.email,participantId:n.id})),value:(t.participants||[]).map(n=>({value:n.participantId||n.id,label:n.email,email:n.email,participantId:n.participantId||n.id})),isMulti:!0,onChange:n=>{const h=n.map(j=>({email:j.email,participantId:j.participantId||j.value}));l("participants",h)},className:"rounded-md"}),e.jsx(F,{name:"participants",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Event Type*"}),e.jsx(re,{options:S,value:S.find(n=>n.value===t.eventType),onChange:n=>l("eventType",n==null?void 0:n.value)}),e.jsx(F,{name:"eventType",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Link*"}),e.jsx(O,{name:"link",children:({field:n})=>e.jsx(K,{...n,placeholder:"Meeting Link"})}),e.jsx(F,{name:"link",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Notes"}),e.jsx(O,{name:"notes",children:({field:n})=>e.jsx(K,{...n,placeholder:"Notes",textArea:!0})})]}),e.jsx("div",{className:"pb-4",children:e.jsx(Ve,{label:"Send Notification",children:e.jsx(O,{name:"sendNotification",component:Ge})})})]})})})};var we={},Wt=Dt;Object.defineProperty(we,"__esModule",{value:!0});var Ke=we.default=void 0,Zt=Wt(Yt()),_t=e;Ke=we.default=(0,Zt.default)((0,_t.jsx)("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"}),"FilterAlt");const Qt=({onSaveClick:r,onCancel:b,onClearFilers:I})=>e.jsxs("div",{className:"text-right w-full",children:[e.jsx(z,{size:"sm",className:"mr-2",onClick:I,children:"Clear All"}),e.jsx(z,{size:"sm",className:"mr-2",onClick:b,children:"Cancel"}),e.jsx(z,{size:"sm",variant:"solid",onClick:r,children:"Query"})]}),Jt=r=>{var M,U,Y,X,Z,_,H,me;const[b,I]=c.useState(((M=r==null?void 0:r.filters)==null?void 0:M.date)??null),[N,S]=c.useState(((U=r==null?void 0:r.filters)==null?void 0:U.meetingWith)??""),[g,w]=c.useState(((Y=r==null?void 0:r.filters)==null?void 0:Y.eventName)??""),[k,v]=c.useState(((X=r==null?void 0:r.filters)==null?void 0:X.categoryId)??""),[d,C]=c.useState(((Z=r==null?void 0:r.filters)==null?void 0:Z.userId)??""),[s,t]=c.useState(!1),[l,n]=c.useState(((_=r==null?void 0:r.filters)==null?void 0:_.meetingType)??[]),h=()=>{var f;t(!1),(f=r.onClose)==null||f.call(r)},j=()=>{var f;r.setFilters({date:null,meetingWith:"",meetingType:[],categoryId:"",eventName:"",userId:""}),I(null),S(""),w(""),v(""),C(""),n([]),t(!1),(f=r.onClose)==null||f.call(r)},E=()=>{var f;r.setFilters({date:b?y(b).format("YYYY-MM-DD"):null,meetingWith:N,meetingType:l,categoryId:k,eventName:g,userId:d}),t(!1),(f=r.onClose)==null||f.call(r)};return c.useEffect(()=>{r.isOpen&&t(!0)},[r.isOpen]),e.jsxs(de,{title:"Filters",isOpen:s,footer:e.jsx(Qt,{onCancel:h,onSaveClick:E,onClearFilers:j}),onClose:h,portalClassName:"w30",onRequestClose:h,children:[e.jsxs("div",{className:"mb-5",children:[e.jsx("h5",{className:"mb-2",children:"Event Name"}),e.jsx(K,{type:"text",value:g,onChange:f=>w(f.target.value),placeholder:"Enter event name"})]}),e.jsxs("div",{className:"mb-5",children:[e.jsx("h5",{className:"mb-2",children:"Event Start Date"}),e.jsx(ce,{value:b,onChange:f=>I(f),placeholder:"Select Date"})]}),e.jsxs("div",{className:"mb-5",children:[e.jsx("h5",{className:"mb-2",children:"Category"}),e.jsx(re,{value:(H=r==null?void 0:r.Type)==null?void 0:H.find(f=>f.value===k),placeholder:"Select Type",options:r==null?void 0:r.Type,onChange:f=>v((f==null?void 0:f.value)||"")})]}),e.jsxs("div",{className:"mb-5",children:[e.jsx("h5",{className:"mb-2",children:"Meeting With"}),e.jsx(K,{type:"text",value:N,onChange:f=>S(f.target.value),placeholder:"Search person"})]}),e.jsxs("div",{className:"mb-5",children:[e.jsx("h5",{className:"mb-2",children:"Created By"}),e.jsx(re,{value:(me=r==null?void 0:r.users)==null?void 0:me.find(f=>f.value===d),placeholder:"Select Type",options:r==null?void 0:r.users,onChange:f=>C((f==null?void 0:f.value)||"")})]})]})};const Kt=new Date,Xt=({eventsList:r,Type:b,userTimeZone:I,onAppointmentUpdated:N,openEditDrawer:S,actions:g,CustomAppointment:w,AppointmentTooltip:k})=>{const v=["timelineDay","timelineWeek","timelineMonth"],d=c.useMemo(()=>b.map(s=>({id:String(s.value),text:s.label,color:s.color||"#3366FF"})),[b]),C=c.useMemo(()=>r.map(s=>({...s,startDate:s.startDate instanceof Date?s.startDate:new Date(s.startDate),endDate:s.endDate instanceof Date?s.endDate:new Date(s.endDate),eventType:String(s.eventType??s.categoryId),text:s.text??s.eventName??"Untitled Event",color:s.color||"#3366FF"})),[r]);return e.jsx("div",{className:"w-full h-[calc(100vh-200px)]",children:e.jsx(He,{timeZone:I,dataSource:C,views:v,defaultCurrentView:"timelineMonth",defaultCurrentDate:Kt,height:"100%",startDayHour:0,endDayHour:24,cellDuration:60,showAllDayPanel:!1,crossScrollingEnabled:!0,groups:["eventType"],resources:[{fieldExpr:"eventType",dataSource:d,label:"Category",useColorAsDefault:!0}],onAppointmentUpdated:N,onAppointmentClick:s=>S(s.appointmentData),onAppointmentFormOpening:s=>s.cancel=!0,editing:{allowUpdating:g.edit,allowDeleting:g.delete,allowResizing:g.edit,allowDragging:g.edit},appointmentComponent:w,onAppointmentRendered:s=>{var n;const t=((n=s.appointmentData)==null?void 0:n.color)||"#3366FF",l=s.appointmentElement;l&&(l.style.backgroundColor=t,l.style.borderColor=t,l.querySelectorAll(".dx-scheduler-appointment-left-arrow, .dx-scheduler-appointment-right-arrow").forEach(h=>{h.style.borderColor=t}))},appointmentTooltipRender:k})})},ea=ve({files:Ce().min(1,"Please upload at least one ICS file").required("ICS file upload is required")}),ta=({initialData:r={files:[]},footerWidth:b,onSubmit:I,onCancel:N})=>{const S=(g,w)=>{if(!g)return"Invalid file";const k=Array.from(g);for(const v of k){if(!v.name.toLowerCase().endsWith(".ics"))return"Only .ics files are allowed";if(v.size===0)return"File cannot be empty"}return!0};return e.jsx(Te,{initialValues:r,validationSchema:ea,onSubmit:(g,{setSubmitting:w})=>{console.log(g),I(g.files,w)},children:({values:g,errors:w,touched:k,isSubmitting:v})=>e.jsx(Se,{children:e.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Upload ICS File(s)"}),e.jsx(O,{name:"files",children:({field:d,form:C})=>e.jsx(It,{draggable:!0,multiple:!0,accept:".ics",beforeUpload:S,fileList:g.files||[],cropNeeded:!1,uploadText:"Click or drag ICS files",onChange:s=>{C.setFieldValue(d.name,s)},onFileRemove:s=>C.setFieldValue(d.name,s)})}),w.files&&k.files&&e.jsx("div",{className:"text-red-500 text-sm mt-1",children:w.files})]}),e.jsx(Je,{className:`px-8 flex items-center justify-between py-4 ${b}`,stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(z,{type:"button",size:"sm",className:"mr-2",onClick:N,children:"Cancel"}),e.jsx(z,{size:"sm",variant:"solid",type:"submit",loading:v,children:"Import"})]})})]})})})},aa=({onFilterApply:r,userName:b,onCancel:I,defaultOptions:N,defaultUser:S})=>{const[g,w]=c.useState([]),[k,v]=c.useState(N),[d,C]=c.useState(S);c.useEffect(()=>{(async()=>{var l,n,h;try{const j=await Mt();(l=j==null?void 0:j.data)!=null&&l.$values&&(w((n=j.data.$values)==null?void 0:n.map(E=>({id:E.id,title:E.title}))),(N==null?void 0:N.length)===0&&v((h=j.data.$values)==null?void 0:h.map(E=>E.id)))}catch(j){console.error("Failed to load filter options",j)}})()},[]);const s=(t,l)=>{v(t?n=>[...n,l]:n=>n.filter(h=>h!==l))};return e.jsxs(e.Fragment,{children:[e.jsx(De,{variant:"subtitle1",sx:{mb:1,ml:2},children:"My Calendars"}),e.jsxs(ye,{children:[e.jsxs(ye,{display:"flex",justifyContent:"start",alignItems:"center",sx:{mb:1},children:[e.jsx(Ue,{control:e.jsx($e,{}),checked:d,onChange:t=>C(t),label:"",labelPlacement:"start",sx:{marginRight:0}}),e.jsx(De,{children:b})]},"myname"),g==null?void 0:g.map(t=>e.jsxs(ye,{display:"flex",justifyContent:"start",alignItems:"center",sx:{mb:1},children:[e.jsx(Ue,{control:e.jsx($e,{}),checked:k.includes(t.id),onChange:l=>s(l,t.id),label:"",labelPlacement:"start",sx:{marginRight:0}}),e.jsx(De,{children:t.title})]},t.id))]}),e.jsxs(Je,{className:"px-8 flex items-center justify-between py-4",stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:[e.jsx(z,{size:"sm",className:"mr-2",onClick:I,children:"Cancel"}),e.jsx(z,{size:"sm",variant:"solid",onClick:()=>r(k,d),children:"Apply"})]})]})},na=new Date,sa=["agenda","day","week","workWeek","month"];be("users",Rt);const Pa=()=>{const[r,b]=c.useState(!1),[I,N]=c.useState(!1),[S,g]=c.useState([]),[w,k]=c.useState(null),[v,d]=c.useState(!1),[C,s]=c.useState(null),[t,l]=c.useState("month"),[n,h]=c.useState(Intl.DateTimeFormat().resolvedOptions().timeZone),[j,E]=c.useState([]),M=Lt("Schedules"),U=c.useRef(null),[Y,X]=c.useState("calendar"),[Z,_]=c.useState(null),{googleAuthToken:H,userName:me,id:f}=Pe(i=>i.auth.user),[Xe,se]=c.useState(!1),et=Ne(),[tt,le]=c.useState(!1),[at,ue]=c.useState(!1),[ie,ke]=c.useState([]),[je,Ee]=c.useState(!1),nt=Pe(i=>{var a,o,u;return((u=(o=(a=i==null?void 0:i.users)==null?void 0:a.data)==null?void 0:o.usersList)==null?void 0:u.map(p=>({value:p.id,label:`${p.firstName} ${p.lastName}`})))||[]});c.useEffect(()=>{et(Ht({isActive:!0,roleName:"Admin"}))},[]);const st=i=>{_(i.currentTarget)},Q=()=>{_(null)},P={edit:M.isEdit,delete:M.isDelete,view:M.isView},[m,it]=c.useState({date:null,meetingWith:"",meetingType:[],categoryId:"",userId:"",eventName:""}),[rt,Ie]=c.useState(!1),ot=()=>{Ie(!1)},lt=()=>{Ie(!0)},G=c.useCallback(async()=>{var i,a,o;try{const u=await At(m==null?void 0:m.date,m==null?void 0:m.meetingWith,((i=m==null?void 0:m.meetingType)==null?void 0:i.length)>0?(a=m==null?void 0:m.meetingType)==null?void 0:a.join(","):"","",m==null?void 0:m.eventName,m==null?void 0:m.categoryId,je?f:m==null?void 0:m.userId,ie.length>0?ie==null?void 0:ie.map(x=>`'${x}'`).join(","):void 0),D=(((o=u==null?void 0:u.data)==null?void 0:o.$values)||[]).map(x=>{var J,W;const B=ge((J=x.eventDate)==null?void 0:J.slice(0,10),x.fromTime),ee=ge((W=x.endDate)==null?void 0:W.slice(0,10),x.toTime);return{id:x.$id,eventId:x.id,text:x.eventName,startDate:B,endDate:ee,startDateTime:x.startDateTime,endDateTime:x.endDateTime,color:x.categoryColor||"#3366FF",fromTime:x.fromTime,toTime:x.toTime,notes:x.notes,sendNotification:x.sendNotification,participants:x.participants,eventType:String(x.categoryId),link:x.link,basefromTime:x.fromTime,basetoTime:x.toTime}});g(D)}catch(u){console.error("Failed to fetch data:",u),g([])}},[m,je,ie]),ct=async()=>{se(!0);const i=new Date,a=i.toISOString(),o=new Date(i);o.setDate(o.getDate()+7);const u=o.toISOString(),p=y(a).format("MM/DD/YYYY"),D=y(u).format("MM/DD/YYYY");try{(await Ut({accessToken:H,startDate:a,endDate:u})).success&&A.push(e.jsx(q,{title:"Pulled Events from Google",type:"success",duration:3e3,children:`Successfully pulled events from ${p} → ${D}`}),{placement:"top-center"})}catch{A.push(e.jsx(q,{title:"Unable to Fetch Events",type:"danger",duration:2500,children:"Unable to Fetch Events from Google Calendar"}),{placement:"top-center"})}finally{se(!1),G()}},dt=async()=>{se(!0);const i=new Date,a=i.toISOString(),o=new Date(i);o.setDate(o.getDate()+1);const u=o.toISOString(),p=y(a).format("MM/DD/YYYY"),D=y(u).format("MM/DD/YYYY");try{(await $t({accessToken:H,startDate:a,endDate:u})).success&&A.push(e.jsx(q,{title:"Pushed Events to Google Calendar",type:"success",duration:3e3,children:`Successfully pushed events from ${p} → ${D} to Google Calendar`}),{placement:"top-center"})}catch{A.push(e.jsx(q,{title:"Unable to Push Events",type:"danger",duration:2500,children:"Unable to Push Events to Google Calendar"}),{placement:"top-center"})}finally{G(),se(!1)}},mt=async i=>{if(i!=null&&i.length){se(!0);try{const a=new FormData;for(const u of Array.from(i))a.append("files",u);(await Pt(a)).success&&(le(!1),A.push(e.jsx(q,{title:"ICS Import Successful",type:"success",duration:3e3,children:"Successfully Imported events from file."}),{placement:"top-center"}))}catch(a){console.error("ICS upload error:",a),A.push(e.jsx(q,{title:"Error Importing ICS",type:"danger",duration:2500,children:"Failed to upload or parse .ics files"}),{placement:"top-center"})}finally{se(!1),le(!1),G()}}},ut=c.useCallback(async()=>{var i,a;try{const o=await qt(),u=((a=(i=o==null?void 0:o.data)==null?void 0:i.$values)==null?void 0:a.map(p=>({label:p==null?void 0:p.name,value:p==null?void 0:p.id,color:(p==null?void 0:p.color)||"#3366FF"})))||[];E(u)}catch(o){console.error("Failed to fetch data:",o),E([])}},[]);c.useEffect(()=>{G()},[G]),c.useEffect(()=>{ut()},[]);const pt=()=>b(!0),xt=()=>b(!1),pe=i=>{P.edit&&(k(i),N(!0))},ht=()=>N(!1),xe=()=>{s(null),d(!1)},ft=async()=>{const i=await Ot(C);i.success?(A.push(e.jsx(q,{title:"Success",type:"success",duration:2500,children:"Event Deleted"}),{placement:"top-center"}),G()):A.push(e.jsx(q,{title:"Error",type:"danger",duration:2500,children:i.message}),{placement:"top-center"}),xe()},Fe=async i=>{const{appointmentData:a}=i,o=a.eventId,u=a.startDate,p=a.endDate,D=R=>{if(!R)return"";const ae=R instanceof Date?R:new Date(R);if(isNaN(ae.getTime()))return"";const T=String(ae.getHours()).padStart(2,"0"),L=String(ae.getMinutes()).padStart(2,"0"),qe=String(ae.getSeconds()).padStart(2,"0");return`${T}:${L}:${qe}`},x=D(u),B=D(p),{utcDate:ee,utcTime:J}=oe(u,x),{utcDate:W,utcTime:$}=oe(p,B),te={eventName:a.text??"",fromTime:J??"",toTime:$??"",eventDate:ee??"",endDate:W??"",link:a.link??"",notes:a.notes??"",sendNotification:a.sendNotification??!1,eventCategoryId:a==null?void 0:a.eventType};try{const R=await We(o,te);R.success?(A.push(e.jsx(q,{title:"Success",type:"success",duration:2500,children:"Event Updated"}),{placement:"top-center"}),G()):A.push(e.jsx(q,{title:"Error",type:"danger",duration:2500,children:R.message}),{placement:"top-center"})}catch{A.push(e.jsx(q,{title:"Error",type:"danger",duration:2500,children:"Something went wrong."}),{placement:"top-center"})}},Me=({data:i})=>{const a=i.appointmentData,o=$=>{if(!$)return null;if($ instanceof Date)return y($);const te=String($);return/[zZ]|[+\-]\d{2}:\d{2}$/.test(te)?y(te).local():y.utc(te).local()},u=o(a.startDateTime??a.startDate),p=o(a.endDateTime??a.endDate),D=t==="month",x=a.allDay,B=a.color||"#3366FF",ee="#fff",J=$=>{$.preventDefault(),$.stopPropagation(),pe(a)},W=$=>{$.preventDefault(),$.stopPropagation(),s(a.eventId),d(!0)};return e.jsxs("div",{onClick:J,className:`custom-appointment ${D?"month-view":"default-view"}`,style:{backgroundColor:B,borderRadius:6,padding:D?"6px 8px":"4px 6px",cursor:"pointer",display:"flex",flexDirection:"row",alignItems:D?"flex-start":"center",justifyContent:"space-between",width:"100%",color:ee,minHeight:D?48:32,lineHeight:1.3},title:`${a.text}
|
|
2
|
+
${u.format("MMM DD, hh:mm A")} → ${p.format("MMM DD, hh:mm A")}`,children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",whiteSpace:D?"normal":"nowrap"},children:[e.jsx("strong",{style:{fontSize:D?12:13,marginBottom:D?2:0,overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:D?2:1,WebkitBoxOrient:"vertical"},children:a.text}),e.jsx("span",{style:{fontSize:D?11:12,opacity:.9,whiteSpace:D?"normal":"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:x||!u.isSame(p,"day")?`${u.format("MMM DD")} - ${p.format("MMM DD")}`:`${u.format("hh:mm A")} → ${p.format("hh:mm A")}`})]}),P.delete&&e.jsx(ze,{onClick:W,fontSize:D?13:14,style:{marginLeft:6,flexShrink:0,opacity:.9,cursor:"pointer",zIndex:5},title:"Delete"})]})},gt=m.date!==null||m.meetingWith!==""||m.meetingType.length>0||(m==null?void 0:m.eventName)!==""||(m==null?void 0:m.categoryId)!==""||(m==null?void 0:m.userId)!=="",Ae=i=>{var ae;const a=(ae=U.current)==null?void 0:ae.instance,{appointmentData:o}=i;if(!o)return null;const u=c.useCallback(T=>{var L;(L=a==null?void 0:a.hideAppointmentTooltip)==null||L.call(a),pe(o),T!=null&&T.event&&T.event.stopPropagation()},[a,o]),p=c.useCallback(T=>{var L;(L=a==null?void 0:a.hideAppointmentTooltip)==null||L.call(a),s(o.eventId||o.id),d(!0),T!=null&&T.event&&T.event.stopPropagation()},[a,o]),D=T=>{if(!T)return y(null);if(T instanceof Date)return y(T);const L=String(T);return/[zZ]|[+\-]\d{2}:\d{2}$/.test(L)?y(L).local():y.utc(L).local()},x=D(o.startDateTime??o.startDate),B=D(o.endDateTime??o.endDate),ee=o.allDay,J=x.isSame(B,"day"),W=o.disabled;!W&&P.edit;const $=!W&&P.delete,te=o.color||"#2563eb",R=o.color||"#1e40af";return e.jsxs("div",{className:"dx-tooltip-appointment-item",onClick:u,className:"group flex items-center justify-between px-2.5 py-1 rounded-md cursor-pointer transition-all",style:{backgroundColor:te,border:`1px solid ${R}`,color:"#fff",lineHeight:"1.1rem"},children:[e.jsx("div",{className:"dx-tooltip-appointment-item-marker",children:e.jsx("div",{className:"dx-tooltip-appointment-item-marker-body",style:{backgroundColor:o.color||"#3366FF"}})}),e.jsxs("div",{className:"dx-tooltip-appointment-item-content",children:[e.jsx("div",{className:"dx-tooltip-appointment-item-content-subject",children:o.text}),e.jsx("div",{className:"dx-tooltip-appointment-item-content-date",children:ee||!J?`${x.format("MMM DD")} - ${B.format("MMM DD")}`:`${x.format("MMM DD, h:mm A")} - ${B.format("h:mm A")}`})]}),e.jsx("div",{className:"dx-tooltip-appointment-item-delete-button-container",children:$&&e.jsx("button",{onClick:T=>{T.stopPropagation(),p(T)},className:"opacity-80 hover:opacity-100 text-white hover:text-red-100 transition-all p-0.5 rounded-md",title:"Delete",children:e.jsx(ze,{className:"w-3.5 h-3.5"})})})]})},jt=c.useMemo(()=>S.map(i=>({...i,startDate:i.startDate instanceof Date?i.startDate:new Date(i.startDate),endDate:i.endDate instanceof Date?i.endDate:new Date(i.endDate),eventType:String(i.eventType??i.eventType),text:i.text??i.eventName??"Untitled"})),[S]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[e.jsx(Ct,{items:[{label:"Schedule"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Schedule"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx(yt,{onClick:lt,title:"Filters",children:e.jsx(Ke,{style:gt?{color:"orange"}:{}})}),e.jsx(z,{size:"sm",variant:"solid",className:"ml-2",onClick:st,"aria-controls":"actions-menu","aria-haspopup":"true",children:e.jsxs("span",{className:"flex items-center",children:["Actions",e.jsx(Tt,{className:"ml-1 text-base"})]})}),e.jsxs(bt,{id:"actions-menu",anchorEl:Z,keepMounted:!0,open:!!Z,onClose:Q,PaperProps:{elevation:4,className:"rounded-xl shadow-lg border border-gray-200 min-w-[240px] overflow-hidden"},children:[(P==null?void 0:P.edit)&&e.jsx(ne,{onClick:()=>{pt(),Q()},className:"group flex items-center justify-between px-4 py-2.5 hover:bg-custom-50 transition-all duration-150",children:e.jsxs("div",{className:"flex items-center gap-2 text-gray-700 group-hover:text-custom-700",children:[e.jsx(St,{size:17}),e.jsx("span",{className:"font-medium",children:"Add Event"})]})}),e.jsx(ne,{onClick:()=>{ue(!0),Q()},className:"group flex items-center justify-between px-4 py-2.5 hover:bg-custom-50 transition-all duration-150",children:e.jsxs("div",{className:"flex items-center gap-2 text-gray-700 group-hover:text-custom-700",children:[e.jsx(Oe,{size:16}),e.jsx("span",{className:"font-medium",children:"My Calendar"})]})}),e.jsx("div",{className:"border-t border-gray-200 my-1"}),e.jsxs(ne,{onClick:()=>{X("calendar"),Q()},className:"group flex items-center justify-between px-4 py-2.5 hover:bg-custom-50 transition-all duration-150",children:[e.jsxs("div",{className:"flex items-center gap-2 text-gray-700 group-hover:text-custom-700",children:[e.jsx(Oe,{size:17}),e.jsx("span",{className:"font-medium",children:"Calendar View"})]}),Y==="calendar"&&e.jsx(Le,{fontSize:"small",className:"text-custom-600"})]}),e.jsxs(ne,{onClick:()=>{X("gantt"),Q()},className:"group flex items-center justify-between px-4 py-2.5 hover:bg-custom-50 transition-all duration-150",children:[e.jsxs("div",{className:"flex items-center gap-2 text-gray-700 group-hover:text-custom-700",children:[e.jsx(wt,{size:17}),e.jsx("span",{className:"font-medium",children:"Timeline View"})]}),Y==="gantt"&&e.jsx(Le,{fontSize:"small",className:"text-custom-600"})]}),e.jsx("div",{className:"border-t border-gray-200 my-1"}),H&&e.jsx(ne,{onClick:()=>{ct(),Q()},className:"group flex items-center justify-between px-4 py-2.5 hover:bg-custom-50 transition-all duration-150",children:e.jsxs("div",{className:"flex items-center gap-2 text-gray-700 group-hover:text-custom-700",children:[e.jsx(Vt,{fontSize:"small"}),e.jsx("span",{className:"font-medium",children:"Import from Google Calendar"})]})}),H&&e.jsx(ne,{onClick:()=>{dt(),Q()},className:"group flex items-center justify-between px-4 py-2.5 hover:bg-custom-50 transition-all duration-150",children:e.jsxs("div",{className:"flex items-center gap-2 text-gray-700 group-hover:text-custom-700",children:[e.jsx(kt,{size:17}),e.jsx("span",{className:"font-medium",children:"Push to Google Calendar"})]})}),e.jsx(ne,{onClick:()=>{le(!0),Q()},className:"group flex items-center justify-between px-4 py-2.5 hover:bg-custom-50",children:e.jsxs("div",{className:"flex items-center gap-2 text-gray-700 group-hover:text-custom-700",children:[e.jsx(Et,{size:17}),e.jsx("span",{className:"font-medium",children:"Import from ICS File"})]})})]})]})]})]}),Xe&&e.jsx(Nt,{sx:{backgroundColor:"rgba(0, 0, 0, 0.1)","& .MuiLinearProgress-bar":{backgroundColor:"var(--custom-600)"}}}),e.jsx(vt,{className:"m-6 h-full py-4 px-6 bg-white",bodyClass:"h-full",children:Y==="calendar"?e.jsx(He,{ref:U,timeZone:n,dataSource:jt,views:sa,currentView:t,defaultCurrentDate:na,onCurrentViewChange:i=>l(i),height:1350,startDayHour:0,endDayHour:24,showAllDayPanel:!0,onAppointmentUpdated:Fe,onAppointmentClick:i=>{var u,p,D;const a=(u=i.event)==null?void 0:u.target;((p=a==null?void 0:a.closest)==null?void 0:p.call(a,".dx-tooltip-appointment-item-edit-button"))||((D=a==null?void 0:a.closest)==null?void 0:D.call(a,".dx-tooltip-appointment-item-delete-button"))||pe(i.appointmentData)},onAppointmentFormOpening:i=>i.cancel=!0,appointmentComponent:Me,onAppointmentRendered:i=>{var u;const a=((u=i.appointmentData)==null?void 0:u.color)||"#3366FF",o=i.appointmentElement;o&&(o.style.backgroundColor=a,o.style.borderColor=a,o.querySelectorAll(".dx-scheduler-appointment-left-arrow, .dx-scheduler-appointment-right-arrow").forEach(p=>{p.style.borderColor=a}))},editing:{allowAdding:P.edit,allowUpdating:P.edit,allowDeleting:P.delete,allowResizing:P.edit,allowDragging:P.edit},maxAppointmentsPerCell:4,appointmentTooltipRender:Ae}):e.jsx("div",{className:"h-full w-full flex flex-col",children:e.jsx("div",{style:{height:"800px"},children:e.jsx(Xt,{eventsList:S,Type:j,userTimeZone:n,onAppointmentUpdated:Fe,openEditDrawer:pe,actions:P,CustomAppointment:Me,AppointmentTooltip:Ae})})})}),e.jsx(Gt,{isOpen:r,onClose:xt,fetchEventData:G,Type:j}),e.jsx(Bt,{isOpen:I,onClose:ht,fetchEventData:G,selectedEvent:w,Type:j}),e.jsx(Jt,{isOpen:rt,onClose:ot,setFilters:it,filters:m,Type:j,users:nt}),e.jsx(zt,{isOpen:v,type:"danger",title:"Delete Event",confirmButtonColor:"red-600",onClose:xe,onRequestClose:xe,onCancel:xe,onConfirm:ft,children:e.jsx("p",{children:"Are you sure you want to delete this event? This action cannot be undone."})}),e.jsx(de,{title:"Import ICS File",isOpen:tt,onClose:()=>le(!1),portalClassName:"w30",children:e.jsx(ta,{onSubmit:mt,onCancel:()=>le(!1),footerWidth:"w-full"})}),e.jsx(de,{title:"",isOpen:at,onClose:()=>ue(!1),portalClassName:"w30",children:e.jsx(aa,{defaultOptions:ie,defaultUser:je,userName:me,onFilterApply:(i,a)=>{ke(i),Ee(a),ue(!1)},onCancel:()=>{ke([]),Ee(!1),ue(!1)}})})]})};export{Pa as default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* DevExpress Gantt (dx-gantt)
|
|
3
|
+
* Version: 4.1.62
|
|
4
|
+
* Build date: Wed Jun 04 2025
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
|
+
* Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
|
|
8
|
+
*/.dx-gantt-tsac{position:relative;overflow:hidden;background-color:#fff;z-index:6}.dx-gantt-tsa{position:relative}.dx-gantt-hb{position:absolute;left:0;height:0;z-index:6}.dx-gantt-vb{position:absolute;top:0;width:0;z-index:6}.dx-gantt-tm,.dx-gantt-ti,.dx-gantt-tc{position:absolute;top:0;z-index:6}.dx-gantt-tm:before,.dx-gantt-ti:before,.dx-gantt-tc:before{content:"";position:absolute;top:0;width:6px;margin-left:-3px;z-index:6;height:100%}.dx-gantt-si{position:absolute;top:0;white-space:nowrap;box-sizing:border-box}.dx-gantt-taskWrapper,.dx-gantt-milestoneWrapper,.dx-gantt-taskResWrapper{position:absolute;z-index:10;vertical-align:top;white-space:nowrap}.dx-gantt-taskWrapper>div{vertical-align:top}.dx-gantt-taskResWrapper{pointer-events:none}.dx-gantt-task{position:relative;display:inline-block;white-space:nowrap;vertical-align:top}.dx-gantt-tPrg{position:absolute;top:0;height:100%;z-index:0}.dx-gantt-taskTitle,.dx-gantt-taskRes{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.dx-gantt-titleIn{position:relative;width:100%;z-index:1}.dx-gantt-titleOut{display:inline-block;width:500px;margin-left:-500px;text-align:right;text-overflow:ellipsis;padding-left:5px}.dx-gantt-taskRes{display:inline-block;overflow:hidden}.dx-gantt-task,.dx-gantt-taskTitle,.dx-gantt-titleOut,.dx-gantt-taskRes{box-sizing:border-box}.dx-gantt-sel{position:absolute;z-index:5}.dx-gantt-task.dx-gantt-milestone{transform:rotate(45deg);border-radius:0!important;padding:0}.dx-gantt-task.dx-gantt-smallTask{text-align:center}.dx-gantt-task.dx-gantt-smallTask .dx-gantt-titleIn{padding:0;visibility:hidden}.dx-gantt-conn-h,.dx-gantt-conn-v,.dx-gantt-arrow{position:absolute;z-index:9}.dx-gantt-conn-v{top:0;width:4px;cursor:pointer;border-left-width:1px;border-left-style:solid}.dx-gantt-conn-v.active{border-left-width:2px!important}.dx-gantt-conn-h{left:0;height:4px;cursor:pointer;border-top-width:1px;border-top-style:solid}.dx-gantt-conn-h.active{border-top-width:2px!important}.dx-gantt-arrow{width:0;height:0}.dx-gantt-arrow.dx-gantt-TA{border-left-color:transparent!important;border-right-color:transparent!important;border-top-color:transparent!important}.dx-gantt-arrow.dx-gantt-RA{border-right-color:transparent!important;border-top-color:transparent!important;border-bottom-color:transparent!important}.dx-gantt-arrow.dx-gantt-BA{border-left-color:transparent!important;border-right-color:transparent!important;border-bottom-color:transparent!important}.dx-gantt-arrow.dx-gantt-LA{border-left-color:transparent!important;border-top-color:transparent!important;border-bottom-color:transparent!important}.dx-gantt-nwi{position:absolute;z-index:3}.dx-gantt-altRow{position:absolute;z-index:2}.dx-gantt-task-edit-wrapper{padding-left:1px}.dx-gantt-task-edit-wrapper,.dx-gantt-task-edit-wrapper-successor{position:absolute;z-index:11}.dx-gantt-task-edit-wrapper-custom{background-color:#5a54544d}.dx-gantt-task-edit-wrapper-custom.hide-updating{background-color:transparent;pointer-events:none}.dx-gantt-task-edit-wrapper.milestone .dx-gantt-task-edit-frame,.dx-gantt-task-edit-wrapper.hide-updating .dx-gantt-task-edit-frame{border:none!important}#dx-gantt-ta.ms-pointer-active,#dx-gantt-ta.ms-pointer-active .dx-gantt-task-edit-frame,#dx-gantt-ta.ms-pointer-active .dx-gantt-task-edit-frame div{-webkit-appearance:none;touch-action:none;-webkit-user-select:none;user-select:none;-moz-user-select:none}.dx-gantt-task-edit-wrapper.milestone .dx-gantt-task-edit-progress,.dx-gantt-task-edit-wrapper.milestone .dx-gantt-task-edit-start,.dx-gantt-task-edit-wrapper.milestone .dx-gantt-task-edit-end,.dx-gantt-task-edit-wrapper.move .dx-gantt-task-edit-progress,.dx-gantt-task-edit-wrapper.move .dx-gantt-task-edit-dependency-r,.dx-gantt-task-edit-wrapper.move .dx-gantt-task-edit-dependency-l,.dx-gantt-task-edit-wrapper.hide-dependency .dx-gantt-task-edit-dependency-r,.dx-gantt-task-edit-wrapper.hide-dependency .dx-gantt-task-edit-dependency-l,.dx-gantt-task-edit-wrapper.hide-updating .dx-gantt-task-edit-progress,.dx-gantt-task-edit-wrapper.hide-updating .dx-gantt-task-edit-start,.dx-gantt-task-edit-wrapper.hide-updating .dx-gantt-task-edit-end{display:none}.dx-gantt-task-edit-frame,.dx-gantt-task-edit-frame-successor{box-sizing:border-box;height:100%;width:100%;position:absolute;z-index:9}.dx-gantt-task-edit-frame{border:1px solid #269aff}.dx-gantt-task-edit-progress{position:absolute;width:0;height:0;bottom:0;cursor:pointer;border-style:solid;border-width:0 6px 9px 6px;border-color:transparent transparent #269aff transparent;z-index:10}.dx-gantt-task-edit-progress:before{content:"";width:10px;height:4px;background-color:#fff;position:absolute;bottom:-14px;left:-6px;border:1px solid #269aff;border-top:none}.dx-gantt-task-edit-progress div{position:absolute;bottom:0;cursor:pointer;border-style:solid;border-width:0 5px 7px 5px;border-color:transparent transparent white transparent;z-index:9;top:2px;left:-5px;pointer-events:none}.dx-gantt-task-edit-tooltip{position:absolute;font-family:sans-serif;width:-moz-max-content;width:max-content;line-height:16px;font-size:12px;border-radius:2px;display:none;z-index:12}.dx-gantt-task-edit-tooltip-default{padding:6px;color:#fff;background-color:#000000a3}.dx-gantt-task-edit-tooltip-after:after{content:"";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:6px solid rgba(0,0,0,.64);top:-6px;position:absolute}.dx-gantt-task-edit-tooltip-before:before{content:"";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid rgba(0,0,0,.64);bottom:-6px;position:absolute}.dx-gantt-task-edit-tooltip .dx-gantt-task-title{padding-bottom:3px}.dx-gantt-task-edit-tooltip .dx-gantt-status-time tr td:first-child{padding-right:3px}.dx-gantt-task-edit-tooltip .dx-gantt-status-time tr td:first-child,.dx-gantt-task-edit-tooltip .dx-gantt-status-time span:first-child,.dx-gantt-task-edit-tooltip .dx-gantt-task-title{font-weight:600}.dx-gantt-task-edit-dependency-r,.dx-gantt-task-edit-successor-dependency-r,.dx-gantt-task-edit-dependency-l,.dx-gantt-task-edit-successor-dependency-l{position:absolute;border-radius:50%;box-sizing:border-box;top:5px;width:10px;height:10px;background:white;border:1px solid #269aff;cursor:pointer}.dx-gantt-task-edit-dependency-r,.dx-gantt-task-edit-successor-dependency-r{left:-10px}.dx-gantt-task-edit-dependency-l,.dx-gantt-task-edit-successor-dependency-l{right:-10px}.dx-gantt-task-edit-dependency-r.dx-gantt-edit-touch,.dx-gantt-task-edit-successor-dependency-r.dx-gantt-edit-touch,.dx-gantt-task-edit-dependency-l.dx-gantt-edit-touch,.dx-gantt-task-edit-successor-dependency-l.dx-gantt-edit-touch{top:3px;width:11px;height:11px}.dx-gantt-task-edit-dependency-r.dx-gantt-edit-touch,.dx-gantt-task-edit-successor-dependency-r.dx-gantt-edit-touch{left:-15px}.dx-gantt-task-edit-dependency-l.dx-gantt-edit-touch,.dx-gantt-task-edit-successor-dependency-l.dx-gantt-edit-touch{right:-15px}.dx-gantt-task-edit-start,.dx-gantt-task-edit-end{position:absolute;height:100%;width:5px;top:0;cursor:col-resize}.dx-gantt-task-edit-end{right:0}.dx-gantt-task-edit-dependency-line{height:2px;background-color:#269aff;position:absolute;transform-origin:0% 0%;z-index:9}.dx-gantt-touch-action{touch-action:none}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{A as R}from"./AdaptableCard-3d1e1f96.js";import{P as H}from"./PageBreadcrumb-cf54a6e9.js";import{r,f as W}from"./vendor-react-ece1c85f.js";import{e as _,f as G,u as I,h as J,r as K,i as Q,s as X}from"./index-1dc2b9d2.js";import{a0 as E,B as k,k as B,E as w,F as S,D as Y,d as Z}from"./index-3b5ce20a.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./index-a14e51de.js";import{D as L}from"./Drawer-4f97e662.js";import{a as M,F as ee}from"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import{A as te,T as O}from"./actioncell-6b5ebd6c.js";import{D as ae}from"./tableV2-99c808c0.js";import{h as se}from"./index-b0ef7ac3.js";import{S as ie}from"./StickyFooter-3e569b80.js";import{d as q,c as oe,a as re,F as ne,b as le}from"./index.esm-b2d342b5.js";import{a as de}from"./index-0b08ce18.js";import{C as ce}from"./ConfirmDialog-2838a642.js";import{u as pe}from"./usePermission-4689548c.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-3c29882d.js";import"./vendor-devex-4076ffeb.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-de319a18.js";import"./FileSaver.min-20f3f13a.js";import"./DensitySelector-5d2e901f.js";import"./NoData-4cc4af03.js";const me=({touched:n,errors:i})=>e.jsxs(R,{className:"mb-4",children:[e.jsx(M,{asterisk:!0,label:"Title",invalid:i.title&&n.title,errorMessage:i.title,children:e.jsx(q,{type:"text",autoComplete:"off",name:"title",placeholder:"Title",component:E})}),e.jsx(M,{asterisk:!0,label:"Description",invalid:i.description&&n.description,errorMessage:i.description,children:e.jsx(q,{type:"text",textArea:!0,autoComplete:"off",name:"description",placeholder:"description",component:E})})]}),{useUniqueId:ue}=se,fe=oe().shape({title:re().required("title is Required")}),P=r.forwardRef((n,i)=>{const{type:l,initialData:g={id:"",title:"",description:""},onFormSubmit:p,onDiscard:d}=n,C=ue("CAT-");return e.jsx(ne,{innerRef:i,initialValues:{...g},validationSchema:fe,onSubmit:(m,{setSubmitting:u})=>{const c={...m};l==="new"&&(c.id=C),p==null||p(c,u)},children:({touched:m,errors:u,isSubmitting:c})=>e.jsx(le,{children:e.jsxs(ee,{children:[e.jsx(me,{touched:m,errors:u}),e.jsxs(ie,{className:"px-8 flex items-center justify-between py-4",stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:[e.jsx(k,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>d==null?void 0:d(),children:"Discard"}),e.jsx(k,{size:"sm",variant:"solid",loading:c,icon:e.jsx(de,{}),type:"submit",children:"Save"})]})]})})})});P.displayName="CategoryForm";const T=n=>{const{onDrawerClose:i,categoryId:l,initialData:g,fetchData:p}=n;W(),B(),r.useState(!1);const d=async a=>await _(a),C=async a=>await G(l,a),m=()=>{p()},u=async(a,x)=>{x(!0);const j={description:a==null?void 0:a.description,title:a==null?void 0:a.title};(l?C:d)(j).then(f=>{f.success&&(w.push(e.jsxs(S,{title:"Success",type:"success",duration:2500,children:["Category ",l?"Updated":"Added"," Successfully"]}),{placement:"top-center"}),m(),i())}).catch(f=>{var b;console.log("category - error",f);var h=(b=f.response)==null?void 0:b.data;x(!1),w.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:(h==null?void 0:h.message)||"Something went wrong"}),{placement:"top-center"})})},c=()=>{i()};return e.jsx(P,{type:l?"edit":"new",initialData:g,onFormSubmit:u,onDiscard:c})};Y("SupportData",K);const Je=()=>{const[n,i]=r.useState([]),[l,g]=r.useState(!1),[p,d]=r.useState(!1),[C,m]=r.useState(null);pe("Categories");const u={edit:!0,delete:!0,view:!1},[c,a]=r.useState(!1),[x,j]=r.useState(!1),[F,f]=r.useState(null),h=B(),b=I(t=>{var s,o;return((o=(s=t==null?void 0:t.SupportData)==null?void 0:s.data)==null?void 0:o.categoryList)||[]}),{loading:v}=I(t=>{var s;return(s=t==null?void 0:t.SupportData)==null?void 0:s.data}),y=I(t=>{var s,o;return((o=(s=t==null?void 0:t.SupportData)==null?void 0:s.data)==null?void 0:o.selectedRowData)||[]});r.useEffect(()=>{D()},[]);const D=()=>{h(J())},V=()=>g(!0),A=()=>g(!1),N=()=>d(!1),z=(t,s)=>{s===O.edit&&(m(t.id),h(X(t)),d(!0)),s===O.delete&&(f(t),a(!0))},U=async()=>{var t,s;if(F)try{j(!0),await Q(F.id),j(!1),a(!1),f(null),w.push(e.jsx(S,{title:"Success",type:"success",duration:2500,children:"Category deleted successfully"}),{placement:"top-center"}),D()}catch(o){console.error("Delete failed:",o),j(!1),w.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:((s=(t=o==null?void 0:o.response)==null?void 0:t.data)==null?void 0:s.message)||"Failed to delete category"}),{placement:"top-center"})}},$=[{dataField:"Action",caption:"Action",width:100,cellRender:t=>e.jsx(te,{row:t==null?void 0:t.data,actions:u,buttonClick:z}),alignment:"center"},{dataField:"title",caption:"Title",width:300,align:"left"},{dataField:"description",caption:"Description",width:400,align:"left",wordWrapEnabled:!0},{dataField:"createdBy",caption:"Created By",width:300,align:"left"},{dataField:"createdDate",caption:"Created at",width:220,dataType:"date",format:"MM/dd/yyyy",align:"center"}];return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[e.jsx(H,{items:[{label:"Support Request"},{label:"Categories"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Categories"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx(k,{onClick:V,block:!0,variant:"solid",size:"sm",icon:e.jsx(Z,{}),children:"Add Category"}),e.jsx(L,{title:"Add Category",isOpen:l,onClose:A,onRequestClose:A,portalClassName:"w30",children:e.jsx(T,{onDrawerClose:A,fetchData:D})}),e.jsx(L,{title:"Edit Category",isOpen:p,onClose:N,onRequestClose:N,portalClassName:"w30",children:e.jsx(T,{categoryId:C,initialData:{title:y==null?void 0:y.title,description:y==null?void 0:y.description},onDrawerClose:N,fetchData:D})})]})]})]}),e.jsx(R,{className:"m-6 h-full bg-transparent",bodyClass:"h-full",children:e.jsx(R,{className:"borderless",children:e.jsx(ae,{columns:$,tableName:"Category-table",data:b||[],height:"calc(100vh - 280px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:n,setSelectedRowId:i,setFilterValues:()=>{},filterValues:[],identity:"Category-Listing",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"Category-Listing-table",handleSearch:()=>{},isColumnResizing:!0,isPaginationReq:!0,isLoading:v})})}),e.jsx(ce,{isOpen:c,type:"danger",title:"Delete Category",confirmButtonColor:"red-600",onClose:()=>a(!1),onRequestClose:()=>a(!1),onCancel:()=>a(!1),onConfirm:U,children:e.jsx("p",{children:"Are you sure you want to delete this category?"})})]})};export{Je as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{A as E}from"./AdaptableCard-3d1e1f96.js";import{P as G}from"./PageBreadcrumb-cf54a6e9.js";import{r as l,f as J}from"./vendor-react-ece1c85f.js";import{u as O,a as K,r as Q}from"./index-c29b8474.js";import{a0 as N,B as q,k as v,E as w,F,D as W,d as X}from"./index-3b5ce20a.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./index-a14e51de.js";import{D as T}from"./Drawer-4f97e662.js";import{a as I,F as Y}from"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import{A as Z,T as P}from"./actioncell-6b5ebd6c.js";import{D as ee}from"./tableV2-99c808c0.js";import{h as te}from"./index-b0ef7ac3.js";import{S as oe}from"./StickyFooter-3e569b80.js";import{d as k,c as ie,a as R,F as re,b as se}from"./index.esm-b2d342b5.js";import{a as ae}from"./index-0b08ce18.js";import{j as le,k as ne,l as de}from"./ScheduleService-41a88c41.js";import{C as ce}from"./ConfirmDialog-2838a642.js";import{u as pe}from"./usePermission-4689548c.js";import"./vendor-redux-a1f00e6b.js";import"./ContactService-8afcaeb7.js";import"./vendor-pdf-3c29882d.js";import"./vendor-devex-4076ffeb.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-de319a18.js";import"./FileSaver.min-20f3f13a.js";import"./DensitySelector-5d2e901f.js";import"./NoData-4cc4af03.js";const me=({touched:n,errors:s})=>e.jsxs(E,{className:"mb-4",children:[e.jsx(I,{label:"Title",asterisk:!0,invalid:s.title&&n.title,errorMessage:s.title,children:e.jsx(k,{type:"text",autoComplete:"off",name:"title",placeholder:"Title",component:N})}),e.jsx(I,{label:"Description",invalid:s.description&&n.description,errorMessage:s.description,children:e.jsx(k,{type:"text",textArea:!0,autoComplete:"off",name:"description",placeholder:"Description",component:N})}),e.jsx(I,{label:"Color",invalid:s.color&&n.color,errorMessage:s.color,children:e.jsx(k,{type:"color",autoComplete:"off",name:"color",placeholder:"Color",component:N})})]}),{useUniqueId:ue}=te,fe=ie().shape({title:R().required("Field is required"),description:R().required("Field is required"),color:R().required("Field is required")}),z=l.forwardRef((n,s)=>{const{type:d,initialData:C={id:"",title:"",description:"",color:""},onFormSubmit:m,onDiscard:c}=n,u=ue("CAT-");return e.jsx(re,{innerRef:s,initialValues:{...C},validationSchema:fe,onSubmit:(f,{setSubmitting:o})=>{const p={...f};d==="new"&&(p.id=u),m==null||m(p,o)},children:({touched:f,errors:o,isSubmitting:p})=>e.jsx(se,{children:e.jsxs(Y,{children:[e.jsx(me,{touched:f,errors:o}),e.jsxs(oe,{className:"px-8 flex items-center justify-between py-4",stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:[e.jsx(q,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>c==null?void 0:c(),children:"Discard"}),e.jsx(q,{size:"sm",variant:"solid",loading:p,icon:e.jsx(ae,{}),type:"submit",children:"Save"})]})]})})})});z.displayName="CategoryForm";const V=n=>{const{onDrawerClose:s,categoryId:d,initialData:C,fetchData:m}=n;J(),v(),l.useState(!1);const c=async i=>await le(i),u=async i=>await ne(d,i),f=()=>{m()},o=async(i,a)=>{a(!0);const L={name:i==null?void 0:i.title,description:i==null?void 0:i.description,color:i==null?void 0:i.color};(d?u:c)(L).then(y=>{y.success&&(w.push(e.jsxs(F,{title:"Success",type:"success",duration:2500,children:["Category ",d?"Updated":"Added"," Successfully"]}),{placement:"top-center"}),f(),s())}).catch(y=>{var b;console.log("category - error",y);var x=(b=y.response)==null?void 0:b.data;a(!1),w.push(e.jsx(F,{title:"Error",type:"danger",duration:2500,children:(x==null?void 0:x.message)||"Something went wrong"}),{placement:"top-center"})})},p=()=>{s()};return e.jsx(z,{type:d?"edit":"new",initialData:C,onFormSubmit:o,onDiscard:p})};W("calendar",Q);const We=()=>{var M;const[n,s]=l.useState([]),[d,C]=l.useState(!1),[m,c]=l.useState(!1),[u,f]=l.useState(null),o=pe("Category"),p={edit:o==null?void 0:o.isEdit,delete:o==null?void 0:o.isDelete,view:!1},[i,a]=l.useState(!1),[L,j]=l.useState(!1),[y,x]=l.useState(null),b=v(),h=O(t=>{var r,g;return(g=(r=t==null?void 0:t.calendar)==null?void 0:r.data)==null?void 0:g.CategoryList}),{loading:B}=O(t=>{var r;return(r=t==null?void 0:t.calendar)==null?void 0:r.data});l.useEffect(()=>{D()},[]);const D=()=>{b(K())},U=()=>C(!0),S=()=>C(!1),A=()=>c(!1),$=(t,r)=>{r===P.edit&&(f(t.id),c(!0)),r===P.delete&&(x(t),a(!0))},H=async()=>{var t,r;if(y)try{j(!0),await de(y.id),j(!1),a(!1),x(null),w.push(e.jsx(F,{title:"Success",type:"success",duration:2500,children:"Category deleted successfully"}),{placement:"top-center"}),D()}catch(g){console.error("Delete failed:",g),j(!1),w.push(e.jsx(F,{title:"Error",type:"danger",duration:2500,children:((r=(t=g==null?void 0:g.response)==null?void 0:t.data)==null?void 0:r.message)||"Failed to delete category"}),{placement:"top-center"})}},_=[{dataField:"Action",caption:"Action",width:"10%",cellRender:t=>e.jsx(Z,{row:t==null?void 0:t.data,actions:p,buttonClick:$})},{dataField:"name",caption:"Title"},{dataField:"description",caption:"Description"},{dataField:"color",caption:"Color",cellRender:t=>{const r=(t==null?void 0:t.value)||"transparent";return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("div",{className:"w-4 h-4 rounded-sm border border-gray-300",style:{backgroundColor:r}}),e.jsx("span",{children:r})]})}},{dataField:"createdDate",caption:"Created at",width:"10%",dataType:"date",format:"MM/dd/yyyy"}];return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[e.jsx(G,{items:[{label:"Schedule"},{label:"Category"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Category"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[(o==null?void 0:o.isEdit)&&e.jsx(q,{onClick:U,block:!0,variant:"solid",size:"sm",icon:e.jsx(X,{}),children:"Add Category"}),e.jsx(T,{title:"Add Category",isOpen:d,onClose:S,onRequestClose:S,portalClassName:"w30",children:e.jsx(V,{onDrawerClose:S,fetchData:D})}),e.jsx(T,{title:"Edit Category",isOpen:m,onClose:A,onRequestClose:A,portalClassName:"w30",children:e.jsx(V,{categoryId:u,initialData:{...h==null?void 0:h.find(t=>t.id===u),title:(M=h==null?void 0:h.find(t=>t.id===u))==null?void 0:M.name},onDrawerClose:A,fetchData:D})})]})]})]}),e.jsx(E,{className:"m-6 h-full py-4 px-6 bg-transparent ",bodyClass:"h-full",children:e.jsx(E,{className:"borderless",children:e.jsx(ee,{columns:_,tableName:"Category-table",data:h||[],height:"calc(100vh - 280px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:n,setSelectedRowId:s,setFilterValues:()=>{},filterValues:[],identity:"Category-Listing",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"Category-Listing-table",handleSearch:()=>{},isColumnResizing:!0,isPaginationReq:!0,isLoading:B})})}),e.jsx(ce,{isOpen:i,type:"danger",title:"Delete Category",confirmButtonColor:"red-600",onClose:()=>a(!1),onRequestClose:()=>a(!1),onCancel:()=>a(!1),onConfirm:H,children:e.jsx("p",{children:"Are you sure you want to delete this category?"})})]})};export{We as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./vendor-mui-98daa63f.js";import{c as H,ah as z,a0 as I,B as G,d as V,ai as S,aj as T,_ as Q,U as W}from"./index-3b5ce20a.js";import{A as q}from"./AdaptableCard-3d1e1f96.js";import{r as i,c as v}from"./vendor-react-ece1c85f.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./index-a14e51de.js";import"./Drawer-4f97e662.js";import"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import{b as K}from"./UserService-1b93ceb0.js";import{F as _}from"./index-88c52b97.js";import{T as J}from"./index-8d5b6a1f.js";import{H as O,a as X}from"./HubConnectionBuilder-5116af86.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-3c29882d.js";import"./vendor-devex-4076ffeb.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-de319a18.js";const Z=({onSelect:r,onClose:c})=>{const[n,C]=i.useState(""),[g,k]=i.useState([]),[f,j]=i.useState([]),m=H(t=>{var l,p;return((p=(l=t.auth.session)==null?void 0:l.tenantId)==null?void 0:p.toString())??""});return i.useEffect(()=>{(async()=>{try{const l=await K({fromDate:"",role:"",searchString:"",toDate:""},m,!0,"");k(l.data.values||[]),j(l.data.values||[])}catch(l){console.error("Failed to fetch clients:",l)}})()},[]),i.useEffect(()=>{const t=n.toLowerCase(),l=g.filter(p=>`${p.firstName} ${p.lastName}`.toLowerCase().includes(t)||p.email.toLowerCase().includes(t));j(l)},[n,g]),console.log("Filtered Clients:",f),s.jsxs("div",{className:"client-select-popup",children:[s.jsxs("div",{className:"popup-header",children:[s.jsx("h4",{children:"Select a User"}),s.jsx("button",{onClick:c,className:"close-button",children:s.jsx(z,{})})]}),s.jsx(I,{type:"text",placeholder:"Type to search by name or email...",value:n,onChange:t=>C(t.target.value)}),s.jsx("ul",{children:f.map(t=>s.jsxs("li",{onClick:()=>r(t),children:[s.jsx("p",{children:`${t.firstName} ${t.lastName}`}),s.jsx("p",{children:`${t.email}`})]},t.id))})]})};function B(r){if(!r)return"";const c=S(),n=S.utc(r).local();return n.isSame(c,"day")?n.format("hh:mm A"):n.isSame(c.subtract(1,"day"),"day")?`Yesterday ${n.format("hh:mm A")}`:n.format("MM-DD-YYYY hh:mm A")}const ee=({chats:r,onChatSelect:c,selectedChatId:n,setShowPopup:C,handleStartChat:g,showPopup:k,loggedInUser:f,isRefetch:j})=>{const[m,t]=i.useState(r),[l,p]=i.useState(""),y=H(e=>e.theme.mode),U=(e,d)=>{c(e),w(d)},w=e=>{t(m.map((d,a)=>a===e?{...d,isRead:!0}:d))},N=r==null?void 0:r.filter(e=>{var d,a;return((d=e==null?void 0:e.fromUser)==null?void 0:d.toLowerCase().includes(l.toLowerCase()))||((a=e==null?void 0:e.toUser)==null?void 0:a.toLowerCase().includes(l.toLowerCase()))});return i.useEffect(()=>{t(N)},[r,l]),i.useEffect(()=>{w(0)},[j]),i.useEffect(()=>{const e=r.map((d,a)=>d.toUserId===f&&d.fromUserId===n||d.fromUserId===f&&d.toUserId===n?{...d,isRead:!0}:d);t(e)},[r]),s.jsxs("div",{className:"chat-list",style:{position:"relative"},children:[s.jsxs("div",{className:"lg:flex items-center justify-between mb-2 p-2",children:[s.jsx("h3",{className:"mb-4 lg:mb-0 pl-2",children:"Chats"}),s.jsx("div",{className:"lg:mb-0 flex-0.5",children:s.jsx(G,{onClick:()=>C(!0),variant:"solid",size:"sm",icon:s.jsx(V,{})})})]}),k&&s.jsx(Z,{onSelect:g,onClose:()=>C(!1)}),s.jsx(I,{type:"text",placeholder:"Search chat",className:"search-bar",value:l,onChange:e=>p(e.target.value)}),s.jsx("ul",{className:"chat-items",children:m==null?void 0:m.map((e,d)=>{var a,o,x,h,b,u,R,D,M,$,E,A,L,P,Y,F;return e.toUserId!==f?s.jsxs("li",{style:n===e.toUserId?y==="dark"?{backgroundColor:"#292f3c"}:{backgroundColor:"#e6e6e6"}:{},className:"chat-item",onClick:()=>U(e==null?void 0:e.toUserId,d),children:[s.jsxs("div",{className:"user-icon",children:[(h=(x=(o=(a=e==null?void 0:e.toUser)==null?void 0:a.split(" "))==null?void 0:o[0])==null?void 0:x.charAt(0))==null?void 0:h.toUpperCase(),(D=(R=(u=(b=e==null?void 0:e.toUser)==null?void 0:b.split(" "))==null?void 0:u[1])==null?void 0:R.charAt(0))==null?void 0:D.toUpperCase()]}),s.jsxs("div",{className:"chat-details dark:bg-[#292f3c] dark:text-white",children:[s.jsxs("span",{className:"user-name dark:bg-[#292f3c] dark:text-white",children:[s.jsx("span",{className:"dark:bg-[#292f3c] dark:text-white",children:e.toUser}),!e.isRead&&s.jsx("span",{style:{width:"10px",height:"10px",float:"right",backgroundColor:"green",borderRadius:"50%",display:"inline-block"}})]}),((M=e==null?void 0:e.messageText)==null?void 0:M.length)>40?`${e.messageText.substring(0,40)}...`:e.messageText,s.jsx("span",{className:"timestamp dark:bg-[#292f3c] dark:text-white",children:e.createdDate?B(e.createdDate):""})]})]},e.toUserId):s.jsxs("li",{style:n===e.fromUserId?y==="dark"?{backgroundColor:"#292f3c"}:{backgroundColor:"#e6e6e6"}:{},className:"chat-item ",onClick:()=>U(e==null?void 0:e.fromUserId,d),children:[s.jsxs("div",{className:"user-icon",children:[(A=(E=($=e==null?void 0:e.fromUser)==null?void 0:$.split(" "))==null?void 0:E[0])==null?void 0:A.charAt(0),(Y=(P=(L=e==null?void 0:e.fromUser)==null?void 0:L.split(" "))==null?void 0:P[1])==null?void 0:Y.charAt(0)]}),s.jsxs("div",{className:"chat-details dark:bg-[#292f3c] dark:text-white",children:[s.jsxs("span",{className:"user-name dark:bg-[#292f3c] dark:text-white",children:[s.jsx("span",{className:"dark:bg-[#292f3c] dark:text-white",children:e.fromUser}),!e.isRead&&s.jsx("span",{style:{width:"10px",height:"10px",float:"right",backgroundColor:"green",borderRadius:"50%",display:"inline-block"}})]}),((F=e==null?void 0:e.messageText)==null?void 0:F.length)>40?`${e.messageText.substring(0,40)}...`:e.messageText,s.jsx("span",{className:"timestamp dark:bg-[#292f3c] dark:text-white",children:e.createdDate?B(e.createdDate):""})]})]},e.fromUserId)})})]})},se=({messages:r,onSendMessage:c})=>{const[n,C]=v.useState(""),[g,k]=v.useState(!1),f=i.useRef(null),j=()=>{f.current.scrollTop=f.current.scrollHeight};i.useEffect(()=>{j()},[r]);const m=t=>{c(n,k),C("")};return s.jsxs("div",{className:"chat-detail dark:bg-[#292f3c]",children:[s.jsxs("div",{className:"messages",ref:f,children:[r.map((t,l)=>s.jsxs(v.Fragment,{children:[(t==null?void 0:t.sender)==="admin"&&s.jsx("span",{children:t==null?void 0:t.fromUser}),s.jsxs("div",{className:`message ${t.sender} dark:bg-[#292f3c] dark:text-white`,children:[s.jsx("span",{className:"text dark:bg-[#292f3c] dark:text-white",children:t.text}),s.jsx("span",{className:"timestamp ml-2 dark:bg-[#292f3c] dark:text-white",children:t.time})]})]},l)),g&&s.jsxs("div",{className:"loading-spinner",children:[s.jsx("div",{className:"spinner"}),s.jsx("div",{className:"flex justify-end pr-6",children:s.jsx("div",{className:"dot-spinner"})})]})]}),s.jsxs("div",{className:"message-input dark:bg-[#292f3c] dark:text-white",children:[s.jsx(I,{type:"text",placeholder:"Type here...",value:n,onChange:t=>C(t.target.value),onKeyDown:t=>{t.key==="Enter"&&n&&m()}}),s.jsx(G,{disabled:!n,shape:"circle",variant:"solid",size:"md",icon:s.jsx(_,{}),onClick:m})]})]})};async function te(r){return(await T.apiV10ChatSendMessagePost(r)).data}async function re(r){return(await T.apiV10ChatGetChatHistoryPost(r)).data}async function ae(r){return(await T.apiV10ChatGetChatListIdPost(r)).data}const Te=()=>{const r=Q(a=>a.auth.user),[c,n]=i.useState([]),[C,g]=i.useState(!1),[k,f]=i.useState(!1),[j,m]=i.useState([]),[t,l]=i.useState(null),p=i.useRef(null),y=a=>{l(a),p.current=a};i.useEffect(()=>{const a=new O().withUrl(W.apiBaseUrl+"/chatNotification?userId="+r.id,{skipNegotiation:!0,transport:X.WebSockets}).withAutomaticReconnect().build();return a.on("MessageReceivedNotification",o=>{N(),U(o)}),a.start().catch(o=>console.error("SignalR chat connection failed:",o)),()=>{a.stop()}},[]);const U=a=>{(a==null?void 0:a.messageSentFromUserId)===p.current&&(e(p.current),f(o=>!o))},w=async(a,o)=>{var b;o(!0);const x={messageText:a,fromUserId:(b=r.id)==null?void 0:b.toString(),toUserId:t},h=await te(x);h!=null&&h.success&&(e(t),N()),o(!1)},N=i.useCallback(async()=>{var a;try{const o=await ae(r==null?void 0:r.id);n((a=o==null?void 0:o.data)==null?void 0:a.$values)}catch{n([])}},[]),e=async a=>{var o,x;try{const h=await re({fromUserId:r==null?void 0:r.id,toUserId:a});let b=(x=(o=h==null?void 0:h.data)==null?void 0:o.$values)==null?void 0:x.map(u=>({fromUser:u.fromUser,fromUserId:u.fromUserId,sender:u.fromUserId===(r==null?void 0:r.id)?"user":"admin",text:u==null?void 0:u.messageText,time:S.utc(u==null?void 0:u.createdDate).local().format("MM-DD-YYYY h:mm a")}));m(b)}catch{m([])}};i.useEffect(()=>{N()},[]),i.useEffect(()=>{t?e(t):m([])},[t]);const d=a=>{l(a.id);const o=c==null?void 0:c.map(x=>x==null?void 0:x.toUserId);o!=null&&o.includes(a.id)||n([{toUser:`${a.firstName} ${a.lastName}`,toUserId:a.id,messageText:"",createdDate:"",isRead:!0},...c]),g(!1)};return s.jsx(q,{className:"border-0 m-6 h-full p-4 dark:bg-[#292f3c] dark:text-white",bodyClass:"h-full",children:s.jsxs("div",{className:"chat-app dark:bg-[#292f3c] dark:text-whit",children:[s.jsx(ee,{chats:c,showPopup:C,handleStartChat:d,selectedChatId:t,onChatSelect:y,setShowPopup:g,loggedInUser:r==null?void 0:r.id,isRefetch:k}),t?s.jsx(se,{messages:j,onSendMessage:w}):s.jsx("div",{className:"chat-placeholder",children:s.jsxs("div",{className:"flex",style:{flexDirection:"column",alignItems:"center"},children:[s.jsx(J,{size:150,className:"mb-4 text-orange-600"}),s.jsx("p",{children:"No conversation selected"})]})})]})})};export{Te as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./vendor-mui-98daa63f.js";import{A as s}from"./AdaptableCard-3d1e1f96.js";import{P as e}from"./PageBreadcrumb-cf54a6e9.js";import{r as a}from"./vendor-react-ece1c85f.js";import"./index-3b5ce20a.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-3c29882d.js";import"./vendor-devex-4076ffeb.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";const h=()=>(a.useState(!1),r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[r.jsx(e,{items:[{label:"Talks"},{label:"Chats"}]}),r.jsx("div",{className:"lg:flex items-center justify-between",children:r.jsx("h3",{className:"mb-4 lg:mb-0",children:"Chats"})})]}),r.jsx(s,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:r.jsx(s,{className:"borderless",children:"Soon..."})})]}));export{h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as r,j as t}from"./vendor-mui-98daa63f.js";import{r as a}from"./createSvgIcon-aba65987.js";var e={},u=r;Object.defineProperty(e,"__esModule",{value:!0});var o=e.default=void 0,i=u(a()),l=t;o=e.default=(0,i.default)((0,l.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");export{o as d};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{j as e,l as te}from"./vendor-mui-98daa63f.js";import{A as $}from"./AdaptableCard-3d1e1f96.js";import{P as ae}from"./PageBreadcrumb-cf54a6e9.js";import{r as t,c as re,f as se}from"./vendor-react-ece1c85f.js";import{b as le,c as oe,a as ne}from"./vendor-redux-a1f00e6b.js";import{dR as ie,_ as ce,bI as de,dk as A,D as ue,k as me,l as fe,ai as pe}from"./index-3b5ce20a.js";import{T as B}from"./actioncell-6b5ebd6c.js";import{D as he}from"./tableV2-99c808c0.js";import"./vendor-pdf-3c29882d.js";import"./vendor-devex-4076ffeb.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";import"./FileSaver.min-20f3f13a.js";import"./DensitySelector-5d2e901f.js";import"./NoData-4cc4af03.js";async function xe(){return(await ie.apiV10VideosListGet()).data}const q="VideoData",I=le(`${q}/getVideosData`,async s=>(await xe()).data),ge={total:0,pageIndex:1,pageSize:10,query:"",sort:{order:"",key:""}},be={loading:!1,deleteConfirmation:!1,selectedRowData:"",tableData:ge,filterData:{parentAccount:"",primaryContact:"",billingContact:""},accountList:[],contactList:[],videoList:[]},Y=oe({name:`${q}`,initialState:be,reducers:{setTableData:(s,l)=>{s.tableData=l.payload},setFilterData:(s,l)=>{s.filterData=l.payload},toggleDeleteConfirmation:(s,l)=>{s.deleteConfirmation=l.payload},setSelectedRowData:(s,l)=>{s.selectedRowData=l.payload}},extraReducers:s=>{s.addCase(I.fulfilled,(l,n)=>{var c,x,i,p;l.videoList=(x=(c=n.payload)==null?void 0:c.data)==null?void 0:x.$values,l.tableData.total=(p=(i=n.payload)==null?void 0:i.data)==null?void 0:p.totalCount,l.loading=!1}).addCase(I.pending,l=>{l.loading=!0}).addCase(I.rejected,(l,n)=>{l.videoList=[]})}}),{setTableData:Be,setFilterData:qe,toggleDeleteConfirmation:ve,setSelectedRowData:ye}=Y.actions,Ce=Y.reducer,je=ne({data:Ce}),M=ce,O=t.memo(({isOpen:s,onClose:l,videoUrl:n,title:c})=>{const[x,i]=t.useState(!0),[p,h]=t.useState(!1),[v,u]=t.useState(!1),r=t.useRef(null),y=t.useRef(null),D=t.useCallback(()=>{i(!1),u(!0),h(!1)},[]),j=t.useCallback(()=>{i(!1),u(!0),r.current&&r.current.play().catch(()=>{})},[]),V=t.useCallback(f=>{console.error("Video error:",f.currentTarget.error),i(!1),h(!0),u(!1)},[]),k=t.useCallback(()=>{r.current&&(r.current.pause(),r.current.currentTime=0,r.current.removeAttribute("src"),r.current.load()),i(!0),h(!1),u(!1),l()},[l]),w=t.useCallback(()=>{h(!1),i(!0),u(!1),r.current&&r.current.load()},[]),C=t.useCallback(f=>{f.target===y.current&&k()},[k]);return t.useEffect(()=>{if(!s)return;const f=d=>{var g,S;if(d.key==="Escape")return d.preventDefault(),d.stopPropagation(),!1;if(r.current&&v)switch(d.key){case" ":case"k":d.preventDefault(),r.current.paused?r.current.play():r.current.pause();break;case"ArrowLeft":d.preventDefault(),r.current.currentTime=Math.max(0,r.current.currentTime-10);break;case"ArrowRight":d.preventDefault(),r.current.currentTime=Math.min(r.current.duration,r.current.currentTime+10);break;case"ArrowUp":d.preventDefault(),r.current.volume=Math.min(1,r.current.volume+.1);break;case"ArrowDown":d.preventDefault(),r.current.volume=Math.max(0,r.current.volume-.1);break;case"m":d.preventDefault(),r.current.muted=!r.current.muted;break;case"f":d.preventDefault(),document.fullscreenElement?document.exitFullscreen():(S=(g=r.current).requestFullscreen)==null||S.call(g);break}};return document.addEventListener("keydown",f,!0),()=>{document.removeEventListener("keydown",f,!0)}},[s,v]),t.useEffect(()=>{s&&n&&(i(!0),h(!1),u(!1),r.current&&r.current.load())},[s,n]),t.useEffect(()=>(s?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[s]),s?e.jsxs("div",{ref:y,className:"video-modal-overlay",onClick:C,children:[e.jsxs("div",{className:"video-modal-content",children:[e.jsxs("div",{className:"video-header",children:[e.jsx("h3",{children:c}),e.jsx("button",{onClick:k,className:"close-button","aria-label":"Close video",type:"button",children:e.jsx(de,{})})]}),e.jsxs("div",{className:"video-container",children:[e.jsxs("video",{ref:r,onCanPlay:D,onLoadedData:j,onError:V,controls:!0,controlsList:"nodownload",preload:"metadata",playsInline:!0,autoPlay:!1,children:[e.jsx("source",{src:n,type:"video/mp4"}),e.jsx("source",{src:n,type:"video/webm"}),e.jsx("source",{src:n,type:"video/ogg"}),"Your browser does not support the video tag."]}),x&&!v&&!p&&e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-gray-900/80 z-20",style:{backgroundColor:"rgba(17, 24, 39, 0.8)"},children:[e.jsx("div",{className:"rounded-full",style:{width:"48px",height:"48px",border:"3px solid transparent",borderTop:"3px solid white",animation:"spin 1s linear infinite",marginBottom:"16px"}}),e.jsx("p",{style:{color:"white",fontSize:"14px",margin:0},children:"Loading video..."})]}),p&&e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-gray-900 text-white z-20 text-center",style:{backgroundColor:"rgb(17, 24, 39)",color:"white",padding:"16px"},children:[e.jsx("div",{style:{fontSize:"48px",marginBottom:"16px"},children:"⚠️"}),e.jsx("h4",{style:{fontSize:"20px",fontWeight:"600",marginBottom:"8px"},children:"Failed to load video"}),e.jsx("p",{style:{fontSize:"14px",opacity:.7,marginBottom:"16px"},children:"The video could not be loaded. Please try again."}),e.jsxs("div",{className:"flex",style:{gap:"8px"},children:[e.jsx("button",{onClick:w,className:"cursor-pointer",style:{backgroundColor:"#3b82f6",color:"white",padding:"8px 16px",borderRadius:"6px",border:"none",fontSize:"14px"},children:"Retry"}),e.jsx("button",{onClick:k,className:"cursor-pointer",style:{backgroundColor:"#6b7280",color:"white",padding:"8px 16px",borderRadius:"6px",border:"none",fontSize:"14px"},children:"Close"})]})]})]}),e.jsx("div",{className:"video-footer",children:e.jsxs("div",{className:"footer-content",children:[e.jsx("span",{children:"Click X to close"}),e.jsx("span",{className:"help-text",children:"Space: Play/Pause • F: Fullscreen • M: Mute"})]})})]}),e.jsx("style",{jsx:!0,children:`
|
|
2
|
+
@keyframes spin {
|
|
3
|
+
0% { transform: rotate(0deg); }
|
|
4
|
+
100% { transform: rotate(360deg); }
|
|
5
|
+
}
|
|
6
|
+
`})]}):null});O.displayName="VideoPlayerModal";const _=t.memo(({thumbnailUrl:s,videoUrl:l,accountName:n,onVideoClick:c,width:x=80,height:i=56,className:p=""})=>{const[h,v]=t.useState(!1),[u,r]=t.useState(!0),y=t.useCallback(()=>{r(!1)},[]),D=t.useCallback(()=>{v(!0),r(!1)},[]),j=t.useCallback(()=>{c(l,`${n}`)},[l,n,c]);return e.jsx("div",{className:`video-thumbnail-container ${p}`,onClick:j,children:e.jsxs("div",{className:"thumbnail-wrapper",style:{width:`${x}px`,height:`${i}px`},children:[u&&e.jsx("div",{className:"loading-placeholder",children:e.jsx("div",{className:"loading-spinner"})}),h?e.jsxs("div",{className:"fallback-content",children:[e.jsx(A,{}),e.jsx("div",{className:"play-text",children:"Play"})]}):e.jsx("img",{src:s,alt:`${n} video thumbnail`,className:`thumbnail-image ${u?"loading":"loaded"}`,onLoad:y,onError:D,loading:"lazy"}),e.jsx("div",{className:"play-overlay",children:e.jsx("div",{className:"play-button",children:e.jsx(A,{})})})]})})});_.displayName="VideoThumbnail";ue("VideoData",je);function ke(s){const l=Math.floor(s/3600),n=Math.floor(s%3600/60),c=Math.floor(s%60),x=String(l).padStart(2,"0"),i=String(n).padStart(2,"0"),p=String(c).padStart(2,"0");return`${x}:${i}:${p}`}function De(s){if(s===0)return"0 B";const l=["B","KB","MB","GB","TB"],n=Math.floor(Math.log(s)/Math.log(1024));return`${(s/Math.pow(1024,n)).toFixed(2)} ${l[n]}`}const G=()=>{const[s,l]=t.useState([]);t.useState(!1);const[n,c]=t.useState(!1),[x,i]=t.useState(!1);t.useState();const[p,h]=t.useState(!1),[v,u]=t.useState(!1),[r,y]=t.useState(""),[D,j]=t.useState(""),[V,k]=t.useState({}),w=t.useRef(null),[C,f]=t.useState(!1);t.useRef(null);const d=se(),g=me(),{textTheme:S}=fe(),L=M(a=>a.VideoData.data.loading);M(a=>a.VideoData.data.tableData);const R=M(a=>a.VideoData.data.videoList||[]),F=t.useCallback(a=>{const o={},m=Date.now();a.forEach(b=>{o[b.id]=m+14*60*1e3}),k(o)},[]),E=t.useCallback(async()=>{const a=Date.now(),o=[];if(Object.entries(V).forEach(([m,b])=>{a>=b&&o.push(m)}),o.length>0&&!C){f(!0);try{await N()}catch(m){console.error("Failed to refresh video URLs:",m)}finally{f(!1)}}},[V,C]),N=t.useCallback(async()=>{try{await g(I())}catch(a){console.error("Failed to fetch video data:",a)}},[g]);t.useEffect(()=>{R.length>0&&F(R)},[R,F]),t.useEffect(()=>(w.current=setInterval(E,2*60*1e3),()=>{w.current&&clearInterval(w.current)}),[E]);const T=t.useCallback(async()=>{f(!0);try{await N()}catch(a){console.error("Manual refresh failed:",a)}finally{f(!1)}},[N]),P=t.useCallback(async(a,o)=>{try{await T(),o&&typeof o=="function"&&setTimeout(()=>{o()},1e3)}catch(m){console.error("Failed to handle video error:",m)}},[T]),K=t.useCallback(()=>{h(!0)},[]);t.useCallback(()=>{h(!1)},[]),t.useCallback(()=>{c(!0)},[]),t.useCallback(()=>{c(!1)},[]),t.useCallback(()=>{i(!1)},[]);const z=t.useCallback(a=>{window.open()},[d]),X=t.useCallback((a,o)=>{o===B.view&&z(a),o===B.delete&&(g(ve(!0)),g(ye(a)))},[g,z]),U=t.useCallback((a,o)=>{y(a),j(o),u(!0)},[]),H=t.useCallback(()=>{u(!1),y(""),j("")},[]),W=t.useMemo(()=>[{dataField:"videoUrl",caption:"Video",width:"10%",alignment:"left",allowSorting:!1,allowFiltering:!1,allowSearch:!1,cellRender:a=>{const{videoUrl:o,thumbnailUrl:m,originalFileName:b,id:Z}=a.data;return o?e.jsx("div",{"data-cname":"Video",className:"flex items-center",children:e.jsx(_,{thumbnailUrl:m||"https://via.placeholder.com/160x90/e5e7eb/6b7280?text=Video",videoUrl:o,accountName:b,onVideoClick:U,onVideoError:ee=>P(Z,ee),width:100,height:50})}):e.jsx("div",{"data-cname":"Video",className:"flex items-center h-14",children:e.jsx("div",{className:"text-gray-400 text-xs bg-gray-100 px-3 py-2 rounded-lg",children:"No Video"})})}},{dataField:"originalFileName",caption:"Name",width:"30%",cellRender:a=>{var b;const m=((b=a==null?void 0:a.data)==null?void 0:b.videoUrl)??null;return e.jsx("div",{"data-cname":"Name",children:m?e.jsx("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:`${S} ml-2 rtl:mr-2`,children:a.value}):e.jsx("span",{className:"ml-2 rtl:mr-2",children:a.value})})}},{dataField:"durationSeconds",caption:"Duration",alignment:"left",width:"10%",cellRender:a=>e.jsx("div",{"data-cname":"Video Duration",children:ke(a.value)})},{dataField:"fileSizeBytes",caption:"Size",width:"10%",alignment:"left",cellRender:a=>e.jsx("div",{"data-cname":"Size",children:De(a.value)})},{dataField:"userName",caption:"Uploaded By",width:"20%"},{dataField:"uploadDate",caption:"Upload Date",width:"20%",dataType:"date",format:"dd-MM-yyyy",cellRender:a=>{const o=pe(a.value).format("MM/DD/YYYY");return e.jsx("div",{"data-cname":"Upload Date",children:o})}}],[S,X,U,P]),[J,Q]=t.useState({pageSize:"",pageIndex:""});return t.useEffect(()=>{N()},[N]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[e.jsx(ae,{items:[{label:"Build"},{label:"Video Check In"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Video Check In"}),e.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center gap-2"})]})]}),e.jsxs($,{className:"m-6 h-full py-4 px-6 bg-transparent ",bodyClass:"h-full",children:[(L||C)&&e.jsx(te,{sx:{backgroundColor:"rgba(0, 0, 0, 0.1)","& .MuiLinearProgress-bar":{backgroundColor:"var(--custom-600)"}}}),C&&e.jsx("div",{className:"mb-2 text-sm text-blue-600 bg-blue-50 px-3 py-2 rounded",children:"Refreshing video URLs..."}),e.jsx($,{className:"borderless",children:e.jsx(he,{columns:W,tableName:"CheckIn-Listing",data:R||[],defaultHiddenColumn:[],height:"calc(100vh - 290px)",fetchData:()=>{},id_label:"$id",selectedRowId:s,setSelectedRowId:l,setFilterValues:()=>{},filterValues:[],identity:"CheckIn-Listing",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"CheckIn-Listing",handleSearch:()=>{},isColumnResizing:!0,pager:J,setPager:Q,openFilter:K,isPaginationReq:!0,isFilterReq:!1,isSelectionReq:!1,isLoading:L||C})})]}),e.jsx(O,{isOpen:v,onClose:H,videoUrl:r,title:D})]})};G.displayName="CheckIn";const Ye=re.memo(G);export{Ye as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{aG as Te,g as X,aH as ct,c as z,k as ut,aI as dt,aE as we,aJ as Se,a8 as ft,aK as ht,aa as pt,aL as mt,aM as gt,aC as xt,aN as vt,aO as yt,aP as jt,aQ as bt,aR as Nt,aS as Ct,aT as Tt,aU as wt,aV as St,aW as kt,ae as Mt,aX as Pt,aY as Et,aZ as It,a_ as Rt,a$ as ke,b0 as Ot,b1 as Lt,b2 as At,b3 as $t,b4 as Be,b5 as Dt,b6 as me,H as zt,B as He,l as Ke,b7 as Ft,b8 as _e,b9 as Wt,ba as Bt,bb as Me,bc as Ht,bd as de,N as xe,be as Kt,bf as Ue,bg as qe,u as _t,bh as Ut,bi as qt,bj as Vt,bk as Xt,h as fe,i as Ve,bl as Pe,D as Qt,bm as Gt,bn as Yt,bo as Ee,bp as Ie,P as Xe,b as Qe,bq as Jt,E as Zt,F as en,d as tn,br as nn,e as rn}from"./index-3b5ce20a.js";import{w as le}from"./withHeaderItem-df2cc5d9.js";import{r as w,g as Ge,L as ce,u as Ye,f as sn,c as ue}from"./vendor-react-ece1c85f.js";import{a as an,b as on,c as ln,d as cn,e as un,f as dn,g as fn,h as hn,i as pn,j as mn,k as gn}from"./index-8d5b6a1f.js";import{A as xn}from"./index-0b08ce18.js";import{M as vn}from"./index-00a8eb64.js";import{A as G,V as yn}from"./Views-1359da48.js";import{D as Y,S as Je,b as ve}from"./index-a14e51de.js";import{A as jn}from"./ApiService-df126758.js";import{A as ae}from"./Alert-59d09a99.js";import"./index-7596c6bb.js";import{D as bn}from"./Drawer-4f97e662.js";import"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import{_ as Nn}from"./vendor-pdf-3c29882d.js";import{L as Ze}from"./Logo-dd6f7656.js";import{u as et,T as Re}from"./vendor-i18n-b89304ef.js";import{r as Cn}from"./index-359d245d.js";import{a as Tn}from"./WidgetLayoutsService-49730609.js";import{u as wn}from"./usePermission-4689548c.js";const tt=({toggled:r,className:t})=>e.jsx("div",{className:t,children:r?e.jsx(Te,{}):e.jsx(Te,{})}),Sn=r=>{const{headerStart:t,headerEnd:a,headerMiddle:n,className:s,container:i}=r;return e.jsx("header",{className:X("header",s),children:e.jsxs("div",{className:X("header-wrapper",ct,i&&"container mx-auto"),children:[e.jsx("div",{className:"header-action header-action-start",children:t}),n&&e.jsx("div",{className:"header-action header-action-middle",children:n}),e.jsx("div",{className:"header-action header-action-end",children:a})]})})},ie=(r="")=>parseInt(r.replace("px","")),kn={"2xl":ie("1536px"),xl:ie("1280px"),lg:ie("1024px"),md:ie("768px"),sm:ie("640px"),xs:ie("576px")},he=()=>{const r=(i="smaller")=>{const h=window.innerWidth;return Object.fromEntries(Object.entries(kn).map(([l,c])=>[l,i==="larger"?h>c:h<c]))},t=()=>({windowWidth:window.innerWidth,larger:r("larger"),smaller:r("smaller")}),[a,n]=w.useState(t()),s=()=>{const i=t();n(i)};return w.useEffect(()=>(window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)),[a.windowWidth]),a},Mn=({className:r})=>{const t=z(i=>i.theme.layout.sideNavCollapse),a=ut(),{larger:n}=he(),s=()=>{a(dt(!t))};return e.jsx(e.Fragment,{children:n.md&&e.jsx("div",{className:r,onClick:s,children:e.jsx(tt,{className:"text-2xl",toggled:t})})})},Pn=le(Mn),ye={account:e.jsx(we,{}),authentication:e.jsx(Se,{}),signIn:e.jsx(ft,{}),signUp:e.jsx(ht,{}),forgotPassword:e.jsx(Se,{}),resetPassword:e.jsx(pt,{}),accessDenied:e.jsx(mt,{}),guide:e.jsx(gt,{}),Dashboard:e.jsx(an,{}),CRM:e.jsx(xt,{}),CMS:e.jsx(vt,{}),LMS:e.jsx(yt,{}),Forms:e.jsx(on,{}),Tasks:e.jsx(jt,{}),Schedule:e.jsx(ln,{}),Events:e.jsx(cn,{}),Calendar:e.jsx(bt,{}),Documents:e.jsx(un,{}),"Billing & Invoice":e.jsx(dn,{}),"Support Tickets":e.jsx(Nt,{}),"Training Portal":e.jsx(Ct,{}),"Election Mobile App":e.jsx(vn,{}),Courses:e.jsx(fn,{}),Projects:e.jsx(hn,{}),"FAQ's":e.jsx(xn,{}),Timesheets:e.jsx(pn,{}),Products:e.jsx(mn,{}),Reports:e.jsx(Tt,{}),Components:e.jsx(wt,{}),Settings:e.jsx(St,{}),Build:e.jsx(kt,{}),Modules:e.jsx(Mt,{}),"Client Portal":e.jsx(Pt,{}),Entities:e.jsx(Et,{}),Talks:e.jsx(gn,{}),Contacts:e.jsx(It,{}),Accounts:e.jsx(we,{}),Leads:e.jsx(Rt,{}),Opportunities:e.jsx(ke,{}),Opportunity:e.jsx(ke,{}),Company:e.jsx(Ot,{}),Chats:e.jsx(Lt,{}),"Support Request":e.jsx(At,{})},je="collapse",J="item",En=[{key:"apps.account",path:"",title:"Account",translateKey:"nav.appsAccount.account",icon:"account",type:je,subMenu:[{key:"appsAccount.settings",path:`${G}/account/settings/profile`,title:"Profile",translateKey:"nav.appsAccount.settings",icon:"",type:J,subMenu:[]},{key:"appsAccount.notifications",path:`${G}/notifications/activity`,title:"Notifications",translateKey:"nav.appsAccount.notifications",icon:"",type:J,subMenu:[]}]}],In=[{key:"crudoperation",path:"",title:"Settings",translateKey:"nav.crudoperation.crud",icon:"guide",type:je,subMenu:[{key:"configuration.roleList",path:`${G}/configuration/role-list`,title:"Role List",translateKey:"nav.configuration.roleList",icon:"",type:J,subMenu:[]},{key:"configuration.userList",path:`${G}/configuration/user-list`,title:"User List",translateKey:"nav.configuration.userList",icon:"",type:J,subMenu:[]},{key:"configuration.permissionList",path:`${G}/configuration/permission-menu`,title:"Permissions",translateKey:"nav.configuration.permissionList",icon:"",type:J,subMenu:[]},{key:"configuration.settingsList",path:`${G}/configuration/settings`,title:"Settings",translateKey:"nav.configuration.settingsList",icon:"",type:J,subMenu:[]},{key:"configuration.settingsList",path:`${G}/configuration/settings`,title:"Settings",translateKey:"nav.configuration.settingsList",icon:"",type:J,subMenu:[]},{key:"configuration.copqList",path:`${G}/configuration/copq-list`,title:"COPQ",translateKey:"nav.configuration.copqList",icon:"",type:J,subMenu:[]}]}],Rn=[{key:"apps.crm",path:"",title:"CRM",translateKey:"nav.appsCrm.crm",icon:"crm",type:je,subMenu:[{key:"appsCrm.customers",path:`${G}/crm/customers`,title:"Customers",translateKey:"nav.appsCrm.customers",icon:"",type:J,subMenu:[]},{key:"appsCrm.document",path:`${G}/crm/documents`,title:"User List",translateKey:"nav.appsCrm.documents",icon:"",type:J,subMenu:[]}]}],On=[...Rn,...In,...En];var Ln=$t,An=function(){return Ln.Date.now()},$n=An,Dn=/\s/;function zn(r){for(var t=r.length;t--&&Dn.test(r.charAt(t)););return t}var Fn=zn,Wn=Fn,Bn=/^\s+/;function Hn(r){return r&&r.slice(0,Wn(r)+1).replace(Bn,"")}var Kn=Hn,_n=Kn,Oe=Be,Un=Dt,Le=0/0,qn=/^[-+]0x[0-9a-f]+$/i,Vn=/^0b[01]+$/i,Xn=/^0o[0-7]+$/i,Qn=parseInt;function Gn(r){if(typeof r=="number")return r;if(Un(r))return Le;if(Oe(r)){var t=typeof r.valueOf=="function"?r.valueOf():r;r=Oe(t)?t+"":t}if(typeof r!="string")return r===0?r:+r;r=_n(r);var a=Vn.test(r);return a||Xn.test(r)?Qn(r.slice(2),a?2:8):qn.test(r)?Le:+r}var Yn=Gn,Jn=Be,ge=$n,Ae=Yn,Zn="Expected a function",er=Math.max,tr=Math.min;function nr(r,t,a){var n,s,i,h,l,c,u=0,p=!1,x=!1,j=!0;if(typeof r!="function")throw new TypeError(Zn);t=Ae(t)||0,Jn(a)&&(p=!!a.leading,x="maxWait"in a,i=x?er(Ae(a.maxWait)||0,t):i,j="trailing"in a?!!a.trailing:j);function v(N){var P=n,W=s;return n=s=void 0,u=N,h=r.apply(W,P),h}function o(N){return u=N,l=setTimeout(f,t),p?v(N):h}function d(N){var P=N-c,W=N-u,_=t-P;return x?tr(_,i-W):_}function y(N){var P=N-c,W=N-u;return c===void 0||P>=t||P<0||x&&W>=i}function f(){var N=ge();if(y(N))return k(N);l=setTimeout(f,d(N))}function k(N){return l=void 0,j&&n?v(N):(n=s=void 0,h)}function b(){l!==void 0&&clearTimeout(l),u=0,n=c=s=l=void 0}function S(){return l===void 0?h:k(ge())}function L(){var N=ge(),P=y(N);if(n=arguments,s=this,c=N,P){if(l===void 0)return o(c);if(x)return clearTimeout(l),l=setTimeout(f,t),v(c)}return l===void 0&&(l=setTimeout(f,t)),h}return L.cancel=b,L.flush=S,L}var rr=nr;const sr=Ge(rr);var nt={exports:{}};(function(r){r.exports=function(t){var a={};function n(s){if(a[s])return a[s].exports;var i=a[s]={exports:{},id:s,loaded:!1};return t[s].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=t,n.c=a,n.p="",n(0)}([function(t,a,n){t.exports=n(1)},function(t,a,n){Object.defineProperty(a,"__esModule",{value:!0});function s(l){return l&&l.__esModule?l:{default:l}}var i=n(2),h=s(i);a.default=h.default,t.exports=a.default},function(t,a,n){Object.defineProperty(a,"__esModule",{value:!0});var s=Object.assign||function(o){for(var d=1;d<arguments.length;d++){var y=arguments[d];for(var f in y)Object.prototype.hasOwnProperty.call(y,f)&&(o[f]=y[f])}return o};a.default=v;function i(o){return o&&o.__esModule?o:{default:o}}function h(o,d){var y={};for(var f in o)d.indexOf(f)>=0||Object.prototype.hasOwnProperty.call(o,f)&&(y[f]=o[f]);return y}var l=n(3),c=n(4),u=i(c),p=n(14),x=n(15),j=i(x);v.propTypes={activeClassName:u.default.string,activeIndex:u.default.number,activeStyle:u.default.object,autoEscape:u.default.bool,className:u.default.string,findChunks:u.default.func,highlightClassName:u.default.oneOfType([u.default.object,u.default.string]),highlightStyle:u.default.object,highlightTag:u.default.oneOfType([u.default.node,u.default.func,u.default.string]),sanitize:u.default.func,searchWords:u.default.arrayOf(u.default.oneOfType([u.default.string,u.default.instanceOf(RegExp)])).isRequired,textToHighlight:u.default.string.isRequired,unhighlightTag:u.default.oneOfType([u.default.node,u.default.func,u.default.string]),unhighlightClassName:u.default.string,unhighlightStyle:u.default.object};function v(o){var d=o.activeClassName,y=d===void 0?"":d,f=o.activeIndex,k=f===void 0?-1:f,b=o.activeStyle,S=o.autoEscape,L=o.caseSensitive,N=L===void 0?!1:L,P=o.className,W=o.findChunks,_=o.highlightClassName,V=_===void 0?"":_,re=o.highlightStyle,ne=re===void 0?{}:re,se=o.highlightTag,C=se===void 0?"mark":se,B=o.sanitize,U=o.searchWords,K=o.textToHighlight,H=o.unhighlightTag,Z=H===void 0?"span":H,ee=o.unhighlightClassName,pe=ee===void 0?"":ee,g=o.unhighlightStyle,T=h(o,["activeClassName","activeIndex","activeStyle","autoEscape","caseSensitive","className","findChunks","highlightClassName","highlightStyle","highlightTag","sanitize","searchWords","textToHighlight","unhighlightTag","unhighlightClassName","unhighlightStyle"]),A=(0,l.findAll)({autoEscape:S,caseSensitive:N,findChunks:W,sanitize:B,searchWords:U,textToHighlight:K}),I=C,M=-1,R="",E=void 0,O=function(F){var q={};for(var Q in F)q[Q.toLowerCase()]=F[Q];return q},$=(0,j.default)(O);return(0,p.createElement)("span",s({className:P},T,{children:A.map(function(D,F){var q=K.substr(D.start,D.end-D.start);if(D.highlight){M++;var Q=void 0;typeof V=="object"?N?Q=V[q]:(V=$(V),Q=V[q.toLowerCase()]):Q=V;var Ne=M===+k;R=Q+" "+(Ne?y:""),E=Ne===!0&&b!=null?Object.assign({},ne,b):ne;var Ce={children:q,className:R,key:F,style:E};return typeof I!="string"&&(Ce.highlightIndex=M),(0,p.createElement)(I,Ce)}else return(0,p.createElement)(Z,{children:q,className:pe,key:F,style:g})})}))}t.exports=a.default},function(t,a){t.exports=function(n){var s={};function i(h){if(s[h])return s[h].exports;var l=s[h]={exports:{},id:h,loaded:!1};return n[h].call(l.exports,l,l.exports,i),l.loaded=!0,l.exports}return i.m=n,i.c=s,i.p="",i(0)}([function(n,s,i){n.exports=i(1)},function(n,s,i){Object.defineProperty(s,"__esModule",{value:!0});var h=i(2);Object.defineProperty(s,"combineChunks",{enumerable:!0,get:function(){return h.combineChunks}}),Object.defineProperty(s,"fillInChunks",{enumerable:!0,get:function(){return h.fillInChunks}}),Object.defineProperty(s,"findAll",{enumerable:!0,get:function(){return h.findAll}}),Object.defineProperty(s,"findChunks",{enumerable:!0,get:function(){return h.findChunks}})},function(n,s){Object.defineProperty(s,"__esModule",{value:!0}),s.findAll=function(x){var j=x.autoEscape,v=x.caseSensitive,o=v===void 0?!1:v,d=x.findChunks,y=d===void 0?h:d,f=x.sanitize,k=x.searchWords,b=x.textToHighlight;return l({chunksToHighlight:i({chunks:y({autoEscape:j,caseSensitive:o,sanitize:f,searchWords:k,textToHighlight:b})}),totalLength:b?b.length:0})};var i=s.combineChunks=function(x){var j=x.chunks;return j=j.sort(function(v,o){return v.start-o.start}).reduce(function(v,o){if(v.length===0)return[o];var d=v.pop();if(o.start<=d.end){var y=Math.max(d.end,o.end);v.push({start:d.start,end:y})}else v.push(d,o);return v},[]),j},h=function(x){var j=x.autoEscape,v=x.caseSensitive,o=x.sanitize,d=o===void 0?c:o,y=x.searchWords,f=x.textToHighlight;return f=d(f),y.filter(function(k){return k}).reduce(function(k,b){b=d(b),j&&(b=u(b));for(var S=new RegExp(b,v?"g":"gi"),L=void 0;L=S.exec(f);){var N=L.index,P=S.lastIndex;P>N&&k.push({start:N,end:P}),L.index==S.lastIndex&&S.lastIndex++}return k},[])};s.findChunks=h;var l=s.fillInChunks=function(x){var j=x.chunksToHighlight,v=x.totalLength,o=[],d=function(k,b,S){b-k>0&&o.push({start:k,end:b,highlight:S})};if(j.length===0)d(0,v,!1);else{var y=0;j.forEach(function(f){d(y,f.start,!1),d(f.start,f.end,!0),y=f.end}),d(y,v,!1)}return o};function c(p){return p}function u(p){return p.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}}])},function(t,a,n){(function(s){t.exports=n(13)()}).call(a,n(5))},function(t,a){var n=t.exports={},s,i;function h(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?s=setTimeout:s=h}catch{s=h}try{typeof clearTimeout=="function"?i=clearTimeout:i=l}catch{i=l}})();function c(k){if(s===setTimeout)return setTimeout(k,0);if((s===h||!s)&&setTimeout)return s=setTimeout,setTimeout(k,0);try{return s(k,0)}catch{try{return s.call(null,k,0)}catch{return s.call(this,k,0)}}}function u(k){if(i===clearTimeout)return clearTimeout(k);if((i===l||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(k);try{return i(k)}catch{try{return i.call(null,k)}catch{return i.call(this,k)}}}var p=[],x=!1,j,v=-1;function o(){!x||!j||(x=!1,j.length?p=j.concat(p):v=-1,p.length&&d())}function d(){if(!x){var k=c(o);x=!0;for(var b=p.length;b;){for(j=p,p=[];++v<b;)j&&j[v].run();v=-1,b=p.length}j=null,x=!1,u(k)}}n.nextTick=function(k){var b=new Array(arguments.length-1);if(arguments.length>1)for(var S=1;S<arguments.length;S++)b[S-1]=arguments[S];p.push(new y(k,b)),p.length===1&&!x&&c(d)};function y(k,b){this.fun=k,this.array=b}y.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={};function f(){}n.on=f,n.addListener=f,n.once=f,n.off=f,n.removeListener=f,n.removeAllListeners=f,n.emit=f,n.prependListener=f,n.prependOnceListener=f,n.listeners=function(k){return[]},n.binding=function(k){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(k){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(t,a,n){(function(s){var i=n(7),h=n(8),l=n(9),c=n(10),u=n(11),p=n(12);t.exports=function(x,j){var v=typeof Symbol=="function"&&Symbol.iterator,o="@@iterator";function d(g){var T=g&&(v&&g[v]||g[o]);if(typeof T=="function")return T}var y="<<anonymous>>",f={array:L("array"),bool:L("boolean"),func:L("function"),number:L("number"),object:L("object"),string:L("string"),symbol:L("symbol"),any:N(),arrayOf:P,element:W(),instanceOf:_,node:se(),objectOf:re,oneOf:V,oneOfType:ne,shape:C,exact:B};function k(g,T){return g===T?g!==0||1/g===1/T:g!==g&&T!==T}function b(g){this.message=g,this.stack=""}b.prototype=Error.prototype;function S(g){function T(I,M,R,E,O,$,D){return E=E||y,$=$||R,D!==u&&j&&h(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"),M[R]==null?I?M[R]===null?new b("The "+O+" `"+$+"` is marked as required "+("in `"+E+"`, but its value is `null`.")):new b("The "+O+" `"+$+"` is marked as required in "+("`"+E+"`, but its value is `undefined`.")):null:g(M,R,E,O,$)}var A=T.bind(null,!1);return A.isRequired=T.bind(null,!0),A}function L(g){function T(A,I,M,R,E,O){var $=A[I],D=H($);if(D!==g){var F=Z($);return new b("Invalid "+R+" `"+E+"` of type "+("`"+F+"` supplied to `"+M+"`, expected ")+("`"+g+"`."))}return null}return S(T)}function N(){return S(i.thatReturnsNull)}function P(g){function T(A,I,M,R,E){if(typeof g!="function")return new b("Property `"+E+"` of component `"+M+"` has invalid PropType notation inside arrayOf.");var O=A[I];if(!Array.isArray(O)){var $=H(O);return new b("Invalid "+R+" `"+E+"` of type "+("`"+$+"` supplied to `"+M+"`, expected an array."))}for(var D=0;D<O.length;D++){var F=g(O,D,M,R,E+"["+D+"]",u);if(F instanceof Error)return F}return null}return S(T)}function W(){function g(T,A,I,M,R){var E=T[A];if(!x(E)){var O=H(E);return new b("Invalid "+M+" `"+R+"` of type "+("`"+O+"` supplied to `"+I+"`, expected a single ReactElement."))}return null}return S(g)}function _(g){function T(A,I,M,R,E){if(!(A[I]instanceof g)){var O=g.name||y,$=pe(A[I]);return new b("Invalid "+R+" `"+E+"` of type "+("`"+$+"` supplied to `"+M+"`, expected ")+("instance of `"+O+"`."))}return null}return S(T)}function V(g){if(!Array.isArray(g))return i.thatReturnsNull;function T(A,I,M,R,E){for(var O=A[I],$=0;$<g.length;$++)if(k(O,g[$]))return null;var D=JSON.stringify(g);return new b("Invalid "+R+" `"+E+"` of value `"+O+"` "+("supplied to `"+M+"`, expected one of "+D+"."))}return S(T)}function re(g){function T(A,I,M,R,E){if(typeof g!="function")return new b("Property `"+E+"` of component `"+M+"` has invalid PropType notation inside objectOf.");var O=A[I],$=H(O);if($!=="object")return new b("Invalid "+R+" `"+E+"` of type "+("`"+$+"` supplied to `"+M+"`, expected an object."));for(var D in O)if(O.hasOwnProperty(D)){var F=g(O,D,M,R,E+"."+D,u);if(F instanceof Error)return F}return null}return S(T)}function ne(g){if(!Array.isArray(g))return i.thatReturnsNull;for(var T=0;T<g.length;T++){var A=g[T];if(typeof A!="function")return l(!1,"Invalid argument supplied to oneOfType. Expected an array of check functions, but received %s at index %s.",ee(A),T),i.thatReturnsNull}function I(M,R,E,O,$){for(var D=0;D<g.length;D++){var F=g[D];if(F(M,R,E,O,$,u)==null)return null}return new b("Invalid "+O+" `"+$+"` supplied to "+("`"+E+"`."))}return S(I)}function se(){function g(T,A,I,M,R){return U(T[A])?null:new b("Invalid "+M+" `"+R+"` supplied to "+("`"+I+"`, expected a ReactNode."))}return S(g)}function C(g){function T(A,I,M,R,E){var O=A[I],$=H(O);if($!=="object")return new b("Invalid "+R+" `"+E+"` of type `"+$+"` "+("supplied to `"+M+"`, expected `object`."));for(var D in g){var F=g[D];if(F){var q=F(O,D,M,R,E+"."+D,u);if(q)return q}}return null}return S(T)}function B(g){function T(A,I,M,R,E){var O=A[I],$=H(O);if($!=="object")return new b("Invalid "+R+" `"+E+"` of type `"+$+"` "+("supplied to `"+M+"`, expected `object`."));var D=c({},A[I],g);for(var F in D){var q=g[F];if(!q)return new b("Invalid "+R+" `"+E+"` key `"+F+"` supplied to `"+M+"`.\nBad object: "+JSON.stringify(A[I],null," ")+`
|
|
2
|
+
Valid keys: `+JSON.stringify(Object.keys(g),null," "));var Q=q(O,F,M,R,E+"."+F,u);if(Q)return Q}return null}return S(T)}function U(g){switch(typeof g){case"number":case"string":case"undefined":return!0;case"boolean":return!g;case"object":if(Array.isArray(g))return g.every(U);if(g===null||x(g))return!0;var T=d(g);if(T){var A=T.call(g),I;if(T!==g.entries){for(;!(I=A.next()).done;)if(!U(I.value))return!1}else for(;!(I=A.next()).done;){var M=I.value;if(M&&!U(M[1]))return!1}}else return!1;return!0;default:return!1}}function K(g,T){return g==="symbol"||T["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&T instanceof Symbol}function H(g){var T=typeof g;return Array.isArray(g)?"array":g instanceof RegExp?"object":K(T,g)?"symbol":T}function Z(g){if(typeof g>"u"||g===null)return""+g;var T=H(g);if(T==="object"){if(g instanceof Date)return"date";if(g instanceof RegExp)return"regexp"}return T}function ee(g){var T=Z(g);switch(T){case"array":case"object":return"an "+T;case"boolean":case"date":case"regexp":return"a "+T;default:return T}}function pe(g){return!g.constructor||!g.constructor.name?y:g.constructor.name}return f.checkPropTypes=p,f.PropTypes=f,f}}).call(a,n(5))},function(t,a){function n(i){return function(){return i}}var s=function(){};s.thatReturns=n,s.thatReturnsFalse=n(!1),s.thatReturnsTrue=n(!0),s.thatReturnsNull=n(null),s.thatReturnsThis=function(){return this},s.thatReturnsArgument=function(i){return i},t.exports=s},function(t,a,n){(function(s){function i(h,l,c,u,p,x,j,v){if(!h){var o;if(l===void 0)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[c,u,p,x,j,v],y=0;o=new Error(l.replace(/%s/g,function(){return d[y++]})),o.name="Invariant Violation"}throw o.framesToPop=1,o}}t.exports=i}).call(a,n(5))},function(t,a,n){(function(s){var i=n(7),h=i;t.exports=h}).call(a,n(5))},function(t,a){var n=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function h(c){if(c==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(c)}function l(){try{if(!Object.assign)return!1;var c=new String("abc");if(c[5]="de",Object.getOwnPropertyNames(c)[0]==="5")return!1;for(var u={},p=0;p<10;p++)u["_"+String.fromCharCode(p)]=p;var x=Object.getOwnPropertyNames(u).map(function(v){return u[v]});if(x.join("")!=="0123456789")return!1;var j={};return"abcdefghijklmnopqrst".split("").forEach(function(v){j[v]=v}),Object.keys(Object.assign({},j)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}t.exports=l()?Object.assign:function(c,u){for(var p,x=h(c),j,v=1;v<arguments.length;v++){p=Object(arguments[v]);for(var o in p)s.call(p,o)&&(x[o]=p[o]);if(n){j=n(p);for(var d=0;d<j.length;d++)i.call(p,j[d])&&(x[j[d]]=p[j[d]])}}return x}},function(t,a){var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=n},function(t,a,n){(function(s){function i(h,l,c,u,p){}t.exports=i}).call(a,n(5))},function(t,a,n){var s=n(7),i=n(8),h=n(11);t.exports=function(){function l(p,x,j,v,o,d){d!==h&&i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}l.isRequired=l;function c(){return l}var u={array:l,bool:l,func:l,number:l,object:l,string:l,symbol:l,any:l,arrayOf:c,element:l,instanceOf:c,node:l,objectOf:c,oneOf:c,oneOfType:c,shape:c,exact:c};return u.checkPropTypes=s,u.PropTypes=u,u}},function(t,a){t.exports=w},function(t,a){var n=function(h,l){return h===l};function s(i){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n,l=void 0,c=[],u=void 0,p=!1,x=function(o,d){return h(o,c[d])},j=function(){for(var o=arguments.length,d=Array(o),y=0;y<o;y++)d[y]=arguments[y];return p&&l===this&&d.length===c.length&&d.every(x)||(p=!0,l=this,c=d,u=i.apply(this,d)),u};return j}t.exports=s}])})(nt);var ir=nt.exports;const ar=Ge(ir);function or(r){var a,n;const t=[];for(const s of r){const i=[],h=s.title,l=s.icon;if(s.path&&i.push({title:s.title,url:s.path,icon:l,category:s.key,categoryTitle:h}),(a=s.subMenu)!=null&&a.length){for(const c of s.subMenu)if(c.path&&i.push({title:c.title,url:c.path,icon:c.icon||l,category:s.key,categoryTitle:h}),(n=c.subMenu)!=null&&n.length)for(const u of c.subMenu)u.path&&i.push({title:u.title,url:u.path,icon:u.icon||c.icon||l,category:s.key,categoryTitle:h})}i.length>0&&t.push({title:h,data:i})}return t}const lr=r=>{const{icon:t,label:a,url:n="",isLast:s,keyWord:i,onNavigate:h}=r,{textTheme:l}=Ke();return e.jsx(ce,{to:n,onClick:h,children:e.jsxs("div",{className:X("flex items-center justify-between rounded-lg p-3.5 cursor-pointer user-select","bg-gray-50 dark:bg-gray-700/60 hover:bg-gray-100 dark:hover:bg-gray-700/90",!s&&"mb-3"),children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:X("mr-4 rounded-md ring-1 ring-slate-900/5 shadow-sm text-xl group-hover:shadow h-6 w-6 flex items-center justify-center bg-white dark:bg-gray-700",l,"dark:text-gray-100"),children:t&&ye[t]}),e.jsx("div",{className:"text-gray-900 dark:text-gray-300",children:e.jsx(ar,{autoEscape:!0,highlightClassName:X(l,"underline bg-transparent font-semibold dark:text-white"),searchWords:[i],textToHighlight:a})})]}),e.jsx(Ft,{className:"text-lg"})]})})},cr=({className:r,variant:t="dark"})=>{const a=t==="light",[n,s]=w.useState(!1),[i,h]=w.useState([]),[l,c]=w.useState(!1),[u,p]=w.useState(""),x=w.useRef(null),j=w.useMemo(()=>or(On),[]),v=()=>{c(!1),p(""),h(j)},o=()=>{s(!0)},d=()=>{s(!1),setTimeout(v,300)};w.useEffect(()=>{if(n){h(j);const b=setTimeout(()=>{var S;return(S=x.current)==null?void 0:S.focus()},100);return()=>clearTimeout(b)}},[n,j]);const y=sr(b=>{if(p(b),!b){c(!1),h(j);return}const S=b.toLowerCase(),L=j.map(N=>({...N,data:N.data.filter(P=>P.title.toLowerCase().includes(S)||P.categoryTitle.toLowerCase().includes(S))})).filter(N=>N.data.length>0);c(L.length===0),h(L)},200),f=b=>{y(b.target.value)},k=()=>{d()};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:X(r,"!p-0 !bg-transparent !rounded-none"),onClick:o,children:[e.jsxs("div",{className:X("hidden md:flex items-center gap-2 w-[260px] px-3.5 py-2 rounded-full transition-colors cursor-pointer",a?"border border-gray-200 bg-gray-50 hover:bg-gray-100 text-gray-400 hover:text-gray-700":"border border-white/[.12] bg-white/[.08] hover:bg-white/[.11] text-white/65 hover:text-white/90"),children:[e.jsx(me,{className:"text-sm flex-shrink-0"}),e.jsx("span",{className:"text-[13px] font-medium leading-none flex-1",children:"Search…"}),e.jsx("kbd",{className:X("ml-auto font-mono text-[10px] px-1.5 py-0.5 rounded leading-none",a?"bg-gray-200 text-gray-400":"bg-white/[.08] text-white/50"),children:"⌘K"})]}),e.jsx("div",{className:X("flex md:hidden items-center justify-center w-9 h-9 rounded-full cursor-pointer",a?"border border-gray-200 bg-gray-50 text-gray-500":"border border-white/[.12] bg-white/[.06] text-white/70"),children:e.jsx(me,{className:"text-base"})})]}),e.jsx(zt,{contentClassName:"p-0",isOpen:n,closable:!1,onRequestClose:d,children:e.jsxs("div",{children:[e.jsxs("div",{className:"px-4 flex items-center justify-between border-b border-gray-200 dark:border-gray-600",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(me,{className:"text-xl"}),e.jsx("input",{ref:x,className:"ring-0 outline-none block w-full p-4 text-base bg-transparent text-gray-900 dark:text-gray-100",placeholder:"Search...",onChange:f})]}),e.jsx(He,{size:"xs",onClick:d,children:"Esc"})]}),e.jsxs("div",{className:"py-6 px-5 max-h-[550px] overflow-y-auto",children:[i.map(b=>e.jsxs("div",{className:"mb-6",children:[e.jsx("h6",{className:"mb-3",children:b.title}),b.data.map((S,L)=>e.jsx(lr,{icon:S.icon,label:S.title,url:S.url,keyWord:u,onNavigate:k},S.title+L))]},b.title)),l&&e.jsxs("div",{className:"my-10 text-center text-lg",children:[e.jsx("span",{children:"No results for "}),e.jsxs("span",{className:"heading-text",children:["'",u,"'"]})]})]})]})})]})},ur=le(cr);async function dr(){return{data:{count:0}}}async function fr(){return jn.fetchData({url:"/notification/list",method:"get"})}const hr="h-72",pr=({className:r,dot:t})=>e.jsxs("div",{className:X("relative flex items-center justify-center w-9 h-9 rounded-full cursor-pointer transition-colors hover:bg-white/[.07]",r),children:[e.jsx(Ht,{size:20,className:"text-white/70"}),t&&e.jsx("span",{className:"absolute top-1.5 right-1.5 w-2 h-2 rounded-full bg-custom-600 border-2 border-[#1B1B1B]"})]}),mr=({className:r})=>{const[t,a]=w.useState([]),[n,s]=w.useState(!1),[i,h]=w.useState(!1),[l,c]=w.useState(!1);Ke();const{larger:u}=he(),p=z(o=>o.theme.direction),x=w.useCallback(()=>{dr().then(o=>{o.data.count>0?(h(!1),s(!0)):h(!0)}).catch(o=>{})},[s]);w.useEffect(()=>{x()},[x]);const j=w.useCallback(async()=>{if(t.length===0){c(!0);const o=await fr();c(!1),a(o.data)}},[t,c]),v=w.useCallback(()=>{const o=t.map(d=>(d.readed||(d.readed=!0),d));a(o),s(!1)},[t]);return w.useCallback(o=>{const d=t.map(f=>(f.id===o&&(f.readed=!0),f));a(d),t.some(f=>!f.readed)||s(!1)},[t]),e.jsxs(Y,{renderTitle:e.jsx(pr,{dot:n,className:r}),menuClass:"p-0 min-w-[280px] md:min-w-[340px]",placement:u.md?"bottom-end":"bottom-center",onOpen:j,children:[e.jsx(Y.Item,{variant:"header",children:e.jsxs("div",{className:"border-b border-gray-200 dark:border-gray-600 px-4 py-2 flex items-center justify-between",children:[e.jsx("h6",{children:"Notifications"}),e.jsx(_e,{title:"Mark all as read",children:e.jsx(He,{variant:"plain",shape:"circle",size:"sm",icon:e.jsx(Wt,{className:"text-xl"}),onClick:v})})]})}),e.jsx("div",{className:X("overflow-y-auto",hr),children:e.jsx(Je,{direction:p,children:e.jsxs("div",{id:"notification_alerts",className:"p-4",children:[e.jsx(ae,{closable:!0,showIcon:!0,className:"mb-4",type:"info",children:"NCR | XX24QC | CREATED"}),e.jsx(ae,{closable:!0,showIcon:!0,customIcon:e.jsx(Bt,{}),className:"mb-4 p-1",children:"NCR | XX24QC | IN PROCESS"}),e.jsx(ae,{closable:!0,showIcon:!0,customIcon:e.jsx(Me,{}),className:"mb-4",type:"success",children:"NCR | XX24QC | ACCEPTED"}),e.jsx(ae,{closable:!0,showIcon:!0,customIcon:e.jsx(Me,{}),className:"mb-4",type:"success",children:"NCR | XX24QC | CLOSED-NOCOPQ"}),e.jsx(ae,{closable:!0,showIcon:!0,className:"mb-4",type:"danger",children:"NCR | XX24QC | REJECTED"})]})})}),e.jsx(Y.Item,{variant:"header",children:e.jsx("div",{className:"flex justify-center border-t border-gray-200 dark:border-gray-600 px-4 py-2",children:e.jsx(ce,{to:"/app/notifications/activity",className:"font-semibold cursor-pointer p-2 px-3 text-gray-600 hover:text-gray-900 dark:text-gray-200 dark:hover:text-white",children:"View All Notifications"})})})]})},gr=le(mr),xr=w.lazy(()=>Nn(()=>import("./index-51132258.js"),["assets/index-51132258.js","assets/vendor-mui-98daa63f.js","assets/vendor-react-ece1c85f.js","assets/index-3b5ce20a.js","assets/vendor-redux-a1f00e6b.js","assets/vendor-pdf-3c29882d.js","assets/vendor-devex-4076ffeb.js","assets/vendor-i18n-b89304ef.js","assets/vendor-msal-9caa1ed1.js","assets/vendor-charts-4be0b5ab.js","assets/index-ce89a95e.css","assets/withHeaderItem-df2cc5d9.js","assets/index-8d5b6a1f.js","assets/index-0b08ce18.js","assets/index-00a8eb64.js","assets/Views-1359da48.js","assets/index-a14e51de.js","assets/useDidUpdate-de319a18.js","assets/useControllableState-d0909575.js","assets/ApiService-df126758.js","assets/Alert-59d09a99.js","assets/index-7596c6bb.js","assets/Drawer-4f97e662.js","assets/FormContainer-9a52b9e8.js","assets/Switcher-e2fba588.js","assets/index-289b3fd9.js","assets/Upload-be937eb6.js","assets/Logo-dd6f7656.js","assets/index-359d245d.js","assets/WidgetLayoutsService-49730609.js","assets/usePermission-4689548c.js"])),vr=le(tt),yr=r=>{const{menus:t}=r,[a,n]=w.useState(!1),s=()=>{n(!0)},i=()=>{n(!1)};z(f=>f.theme.themeColor),z(f=>f.theme.primaryColorLevel);const h=z(f=>f.theme.navMode),l=z(f=>f.theme.mode),c=z(f=>f.theme.themeColours),u=z(f=>f.theme.themeSecondaryColours),p=z(f=>f.theme.direction),x=z(f=>f.base.common.currentRouteKey),j=z(f=>f.auth.user.authority),{smaller:v}=he(),o=f=>{const k=parseInt(f.slice(1,3),16),b=parseInt(f.slice(3,5),16),S=parseInt(f.slice(5,7),16);return(.299*k+.587*b+.114*S)/255>.5?"#111827":"#ffffff"},y=l===qe||h===de?(u==null?void 0:u["950"])||(u==null?void 0:u["900"]):u==null?void 0:u["600"];return y?o(y):h===de?"#ffffff":h===xe&&(c!=null&&c["600"])?o(c[600]):"#111827",e.jsx(e.Fragment,{children:v.md&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-2xl",onClick:s,children:e.jsx(vr,{toggled:a})}),e.jsx(bn,{title:"Navigation",isOpen:a,bodyClass:"p-0 bg-white",portalClassName:"prevent-overflow",width:330,placement:p===Kt?"right":"left",onClose:i,onRequestClose:i,children:e.jsx(w.Suspense,{fallback:e.jsx(e.Fragment,{}),children:a&&e.jsx("div",{style:{minHeight:"100%",backgroundColor:"#ffffff"},children:e.jsx(xr,{navMode:Ue,collapsed:!1,navigationTree:t,routeKey:x,userAuthority:j,direction:p,onMenuItemClick:i})})})})]})})};function jr(r){if(!r)return"?";const t=r.trim().split(/\s+/);return t.length===1?t[0].substring(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}function br(r,t){return[...r??[],t??""].join(" ").toLowerCase().includes("admin")}const $e=({initials:r,size:t=36})=>e.jsx("div",{className:"flex items-center justify-center rounded-full shrink-0 select-none",style:{width:t,height:t,background:"var(--custom-600)",color:"#fff",fontWeight:700,fontSize:t*.38,letterSpacing:"0.02em"},children:r}),Nr=({className:r})=>{const{avatar:t,userName:a,email:n,authority:s,roleName:i=""}=z(x=>x.auth.user),{signOut:h}=_t(),l=jr(a),c=br(s,i),u=e.jsx("div",{className:`${r} flex items-center cursor-pointer`,children:t?e.jsx("img",{src:t,alt:l,className:"rounded-full",style:{width:36,height:36,objectFit:"cover"}}):e.jsx($e,{initials:l,size:36})}),p=({icon:x,label:j,to:v,onClick:o,danger:d})=>e.jsx(Y.Item,{eventKey:j,className:"px-0",onClick:o,children:v?e.jsxs(ce,{to:v,className:"flex items-center gap-3 px-4 py-2 w-full",children:[e.jsx("span",{style:{fontSize:18,color:d?"var(--custom-600)":"#6B7280"},children:x}),e.jsx("span",{style:{fontSize:14,fontWeight:500,color:d?"var(--custom-600)":void 0},children:j})]}):e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 w-full cursor-pointer",children:[e.jsx("span",{style:{fontSize:18,color:d?"var(--custom-600)":"#6B7280"},children:x}),e.jsx("span",{style:{fontSize:14,fontWeight:500,color:d?"var(--custom-600)":void 0},children:j})]})});return e.jsxs(Y,{menuStyle:{minWidth:260,padding:0,borderRadius:12,overflow:"hidden"},renderTitle:u,placement:"bottom-end",children:[e.jsx(Y.Item,{variant:"header",className:"px-0",children:e.jsxs("div",{className:"flex items-center",style:{gap:12,padding:"16px 16px 12px"},children:[t?e.jsx("img",{src:t,alt:l,className:"rounded-full shrink-0",style:{width:48,height:48,objectFit:"cover"}}):e.jsx($e,{initials:l,size:48}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{style:{fontWeight:700,fontSize:15,color:"#111827",lineHeight:1.2},children:a}),e.jsx("div",{className:"overflow-hidden whitespace-nowrap",style:{fontSize:12,color:"#6B7280",marginTop:2,textOverflow:"ellipsis"},children:n}),i&&e.jsx("div",{style:{display:"inline-block",marginTop:6,fontSize:10,fontWeight:700,letterSpacing:"0.07em",textTransform:"uppercase",color:"var(--custom-600)",border:"1.5px solid var(--custom-600)",borderRadius:999,padding:"2px 8px"},children:i})]})]})}),e.jsx(Y.Item,{variant:"divider"}),e.jsx(p,{icon:e.jsx(Ut,{}),label:"My Profile",to:"/app/account/settings/profile"}),c&&e.jsx(e.Fragment,{}),e.jsx(Y.Item,{variant:"divider"}),e.jsx(p,{icon:e.jsx(qt,{}),label:"Documentation",to:"/app/docs"}),e.jsx(p,{icon:e.jsx(Vt,{}),label:"Support",to:"/app/support"}),e.jsx(Y.Item,{variant:"divider"}),e.jsx(p,{icon:e.jsx(Xt,{}),label:"Log out",onClick:h,danger:!0})]})},Cr=le(Nr),De=({icon:r,isDefaultIcon:t,gutter:a=!1})=>{const n=Ve[r];return typeof r!="string"&&!r?e.jsx(e.Fragment,{}):e.jsx("span",{className:`text-2xl ${a?"ltr:mr-2 rtl:ml-2":"ml-3"}`,children:t?ye[r]??e.jsx(fe,{}):n?e.jsx(n,{}):e.jsx(fe,{})})},{MenuItem:Tr}=ve,wr=({title:r,translateKey:t,children:a,direction:n})=>{const{t:s}=et();return e.jsx(_e,{title:s(t)||r,placement:n==="rtl"?"left":"right",children:a})},ze=r=>{const{nav:t,onLinkClick:a,sideCollapsed:n}=r;z(c=>c.theme.navMode);const s=z(c=>c.theme.themeColor),i=z(c=>c.theme.primaryColorLevel);z(c=>c.theme.sideNavigationColor),z(c=>c.theme.mode);const h=Ye(),l=t.menuName.toLowerCase().replace(/\s+/g,"").includes(h.pathname.replace(/^\/|\/$/g,"").split("/")[1]);return e.jsx(Tr,{id:`${t.id}`,eventKey:t.id,className:`mb-2 ${l?"menu-item-active":""}`,children:t.menuName==="Client Portal"?e.jsxs("a",{href:t.routeLink,target:"_blank",rel:"noopener noreferrer",className:`flex items-center px-0 h-full w-full text-${s}-600 border border-${s}-${i} border-opacity-10 rounded-md bg-${s}-${i} bg-opacity-10`,onClick:()=>a==null?void 0:a({key:t.id,title:t.menuName,path:t.routeLink??""}),children:[e.jsx(De,{icon:t.icon?t.icon:t.menuName,isDefaultIcon:!t.icon}),!n&&e.jsx("span",{className:"pl-2",children:e.jsx(Re,{i18nKey:t.translateKey,defaults:t.menuName})})]}):e.jsxs(ce,{to:t.routeLink??"",className:"flex items-center px-0 h-full w-full",onClick:()=>a==null?void 0:a({key:t.id,title:t.menuName,path:t.routeLink??""}),children:[e.jsx(De,{icon:t.icon?t.icon:t.menuName,isDefaultIcon:!t.icon}),!n&&e.jsx("span",{className:"pl-2",children:e.jsx(Re,{i18nKey:t.translateKey,defaults:t.menuName})})]})},t.$id)},Sr=({nav:r,onLinkClick:t,sideCollapsed:a,direction:n})=>e.jsx(e.Fragment,{children:a?e.jsx(wr,{title:r.menuName,translateKey:"",direction:n,children:e.jsx(ze,{nav:r,sideCollapsed:a,onLinkClick:t})}):e.jsx(ze,{nav:r,sideCollapsed:a,onLinkClick:t})}),rt=({icon:r,isDefaultIcon:t,gutter:a=!1})=>{const n=Ve[r];return typeof r!="string"&&!r?e.jsx(e.Fragment,{}):e.jsx("span",{className:`text-2xl ${a?"ltr:mr-2 rtl:ml-2":"mr-2"}`,children:t?ye[r]??e.jsx(fe,{}):n?e.jsx(n,{}):e.jsx(fe,{})})},{MenuItem:st,MenuCollapse:kr}=ve,it=({items:r,onLinkClick:t,direction:a,isStrictActive:n})=>{const s=z(i=>i.theme.layout.sideNavCollapse);return e.jsx(e.Fragment,{children:r.map(i=>{var u;const h=((u=i.childMenus)==null?void 0:u.$values)||[],l=h.some(p=>p.isView);return!i.isView&&!l?null:h.length>0?e.jsx(at,{nav:i,sideCollapsed:!1,direction:a,onLinkClick:t},i.$id):e.jsx(st,{eventKey:i.$id,children:e.jsx(ce,{className:"h-full w-full flex items-center ml-4",to:i.routeLink,onClick:()=>t==null?void 0:t({key:i.$id,title:i.menuName,path:i.routeLink??""}),children:e.jsx("span",{className:n?"text-orange-500":s?"text-gray-600":"",children:i.menuName})})},i.$id)})})},Mr=({nav:r,onLinkClick:t,direction:a,sideCollapsed:n})=>{var l;const s=Ye(),i=r.routeLink?s.pathname.startsWith(r.routeLink):!1,h=r.routeLink?s.pathname===r.routeLink:!1;return e.jsx(kr,{id:`${r.id}`,label:e.jsxs(e.Fragment,{children:[e.jsx(rt,{icon:r.icon?r.icon:r.menuName,isDefaultIcon:!r.icon}),e.jsx("span",{children:r.menuName})]}),eventKey:r.$id,isActive:i,expanded:i,children:e.jsx(it,{items:((l=r.childMenus)==null?void 0:l.$values)||[],direction:a,onLinkClick:t,isStrictActive:h,isCollapsed:n})},r.$id)},Pr=({nav:r,onLinkClick:t,direction:a,sideCollapsed:n})=>{var l;const s=r.routeLink?location.pathname.startsWith(r.routeLink):!1,i=e.jsx(st,{id:`${r.id}`,eventKey:r.$id,active:s,children:e.jsx(rt,{icon:r.icon?r.icon:r.menuName,isDefaultIcon:!r.icon})},r.$id),h=r.routeLink?location.pathname===r.routeLink:!1;return e.jsx(Y,{trigger:"hover",renderTitle:i,placement:a==="rtl"?"middle-end-top":"middle-start-top",children:e.jsx(it,{items:((l=r.childMenus)==null?void 0:l.$values)||[],direction:a,onLinkClick:t,isStrictActive:h,isCollapsed:n})})},at=({sideCollapsed:r,nav:t,direction:a,onLinkClick:n})=>r?e.jsx(Pr,{nav:t,direction:a,onLinkClick:n,sideCollapsed:r}):e.jsx(Mr,{nav:t,direction:a,onLinkClick:n,sideCollapsed:r}),ot=(r,t)=>r.map(a=>{const n={...a,parentKey:t};return a.childMenus&&Array.isArray(a.childMenus.$values)&&(n.childMenus.$values=ot(a.childMenus.$values,n.$id)),n}),Er=(r,t)=>{if(typeof t!="string"){console.warn("Invalid key: must be a string");return}if(!r||typeof r!="object"&&!Array.isArray(r)){console.warn("Invalid navTree: must be an object or an array");return}const a=n=>{if(n.menuName.toLowerCase().replace(/\s+/g,"")===t.toLowerCase().replace(/\s+/g,""))return n;if(n.childMenus&&Array.isArray(n.childMenus.$values))for(const s of n.childMenus.$values){const i=a(s);if(i)return i.parentKey=n.menuName.toLowerCase().replace(/\s+/g,""),i}};if(Array.isArray(r))for(const n of r){const s=a(n);if(s)return s}else return a(r)},lt=(r,t)=>Array.isArray(r)?(r==null?void 0:r.find(n=>n.$id===t))?!0:r.some(n=>lt(n.childMenus,t)):!1,Ir=(r,t)=>{let a={};return r.forEach(n=>{lt([n],t)&&(a=n)}),a};function Rr(r,t){const a=w.useMemo(()=>ot(r),[r]),n=w.useMemo(()=>Er(a,t),[a,t]),s=w.useMemo(()=>Ir(a,t),[a,t]);return{activedRoute:n,includedRouteTree:s}}const Or=r=>{const{navMode:t=Pe.navMode,collapsed:a,navigationTree:n=[],userAuthority:s=[],onMenuItemClick:i,routeKey:h,direction:l=Pe.direction}=r;et();const[c,u]=w.useState([]),{activedRoute:p}=Rr(n,h);w.useEffect(()=>{p!=null&&p.parentKey&&u([p.parentKey])},[p]);const x=()=>{i==null||i()},j=v=>{var d;if(!v.isView)return null;const o=((d=v.childMenus)==null?void 0:d.$values)||[];return o.length?e.jsx(at,{nav:v,sideCollapsed:a,direction:l,onLinkClick:i,activedRoute:p,children:o.map(y=>j(y))},v.id):e.jsx(Sr,{nav:v,sideCollapsed:a,direction:l,onLinkClick:x,activedRoute:p},v.id)};return e.jsx(ve,{className:"px-4",variant:"none",sideCollapsed:a,defaultActiveKeys:p!=null&&p.$id?[p.$id]:[],defaultExpandedKeys:c,children:n.map(v=>j(v))})},Lr=Or,Ar={width:Ee,minWidth:Ee},$r={width:Ie,minWidth:Ie},Dr=r=>{const{menus:t}=r,[a,n]=w.useState([]),s=z(N=>{var P,W;return(W=(P=N.menuList)==null?void 0:P.data)==null?void 0:W.menuPermissions});w.useEffect(()=>{Qt("menuList",Cn)},[]),w.useEffect(()=>{n(t)},[t]),w.useEffect(()=>{s!=null&&s.length&&n(S(s))},[s]),z(N=>N.theme.themeColor),z(N=>N.theme.primaryColorLevel);const i=z(N=>N.theme.navMode),h=z(N=>N.theme.sideNavigationColor),l=z(N=>N.theme.themeSecondaryColours),c=z(N=>N.theme.mode),u=z(N=>N.theme.direction),p=z(N=>N.base.common.currentRouteKey),x=z(N=>N.theme.layout.sideNavCollapse),j=z(N=>N.auth.user.authority),{larger:v}=he(),o=N=>{const P=parseInt(N.slice(1,3),16),W=parseInt(N.slice(3,5),16),_=parseInt(N.slice(5,7),16);return(.299*P+.587*W+.114*_)/255>.5?"#111827":"#ffffff"},d=c===qe||i===de,y=d?(l==null?void 0:l["950"])||(l==null?void 0:l["900"]):l==null?void 0:l["600"],f=y?o(y):d?"#ffffff":void 0,k=()=>i===xe?`bg-${h} side-nav-${i}`:`side-nav-${i}`,b=()=>i===xe?de:y?o(y)==="#ffffff"?"dark":"light":i===Ue?c:i,S=(N=[])=>[...N].map(P=>{var W;return{...P,childMenus:(W=P.childMenus)!=null&&W.$values?{...P.childMenus,$values:S(P.childMenus.$values)}:P.childMenus}}).sort((P,W)=>P.sequence-W.sequence),L=e.jsx(Lr,{navMode:i,collapsed:x,navigationTree:a,routeKey:p,userAuthority:j,direction:u});return e.jsx(e.Fragment,{children:v.md&&e.jsxs("div",{style:{...x?$r:Ar,...y?{backgroundColor:y}:{},...f?{color:f,"--menu-item-color":f}:{}},className:X("side-nav",k(),!x&&"side-nav-expand"),children:[e.jsxs("div",{className:"side-nav-header",children:[e.jsx(Ze,{logoWidth:"200px",mode:b(),type:x?"streamline":"full",className:x?Gt:Yt}),e.jsx("div",{className:"pb-5"})]}),x?L:e.jsx("div",{className:"side-nav-content",children:e.jsx(Je,{autoHide:!0,direction:u,children:L})})]})})},m={ink:"#1B1B1B",orange:"var(--custom-600)",muted:"#646464",line:"#E9E9E9",soft:"#F6F4F1",cream:"#FBF2EA",green:"#16A34A"},te=({name:r,size:t=16,stroke:a=1.7})=>{const n={width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round"},s={plus:e.jsx("path",{d:"M12 5v14M5 12h14"}),x:e.jsx("path",{d:"M18 6L6 18M6 6l12 12"}),chevronDown:e.jsx("path",{d:"M6 9l6 6 6-6"}),chevronRight:e.jsx("path",{d:"M9 6l6 6-6 6"}),folder:e.jsx("path",{d:"M3 7a2 2 0 012-2h4l2 2h8a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2z"}),file:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"}),e.jsx("path",{d:"M14 2v6h6"})]}),fileText:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"}),e.jsx("path",{d:"M14 2v6h6M16 13H8M16 17H8M10 9H8"})]}),table:e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),e.jsx("path",{d:"M3 9h18M3 15h18M9 3v18M15 3v18"})]}),barChart:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M3 3v18h18"}),e.jsx("rect",{x:"7",y:"12",width:"3",height:"6"}),e.jsx("rect",{x:"12",y:"8",width:"3",height:"10"}),e.jsx("rect",{x:"17",y:"5",width:"3",height:"13"})]}),kpi:e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),e.jsx("path",{d:"M7 14l3-3 3 3 4-5"})]}),map:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M9 4l-6 2v14l6-2 6 2 6-2V4l-6 2z"}),e.jsx("path",{d:"M9 4v14M15 6v14"})]}),calendar:e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"}),e.jsx("path",{d:"M16 2v4M8 2v4M3 10h18"})]}),chat:e.jsx("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"}),alert:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M10.3 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"}),e.jsx("path",{d:"M12 9v4M12 17h.01"})]}),grid:e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1"}),e.jsx("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1"}),e.jsx("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1"}),e.jsx("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1"})]}),donut:e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:"12",cy:"12",r:"9"}),e.jsx("circle",{cx:"12",cy:"12",r:"4"})]}),layout:e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:"3",y:"3",width:"7",height:"9",rx:"1.5"}),e.jsx("rect",{x:"14",y:"3",width:"7",height:"5",rx:"1.5"}),e.jsx("rect",{x:"14",y:"12",width:"7",height:"9",rx:"1.5"}),e.jsx("rect",{x:"3",y:"16",width:"7",height:"5",rx:"1.5"})]}),check:e.jsx("path",{d:"M20 6L9 17l-5-5"}),arrowRight:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M5 12h14"}),e.jsx("path",{d:"M13 5l7 7-7 7"})]})};return e.jsx("svg",{...n,children:s[r]??null})},zr=[{id:"operations",label:"Operations",children:[{id:"fleet",label:"Fleet"},{id:"transloads",label:"Transloads"},{id:"incidents",label:"Incidents"}]},{id:"compliance",label:"Compliance",children:[{id:"audits",label:"Audits"},{id:"permits",label:"Permits"}]},{id:"people",label:"People",children:[{id:"directory",label:"Directory"},{id:"training",label:"Training"}]},{id:"analytics",label:"Analytics",children:[{id:"exec",label:"Executive overview"},{id:"ops-kpis",label:"Ops KPIs"}]}],oe={fontSize:12,fontWeight:700,color:m.muted,textTransform:"uppercase",letterSpacing:"0.06em",display:"block",marginBottom:6},Fe={width:"100%",padding:"8px 10px",border:`1.5px solid ${m.line}`,borderRadius:6,fontSize:14,outline:"none",boxSizing:"border-box",color:m.ink,background:"#fff"},Fr=({value:r,onChange:t,menus:a=[]})=>{var v;const n=w.useMemo(()=>{const o=a.filter(d=>{var y,f;return(((f=(y=d.childMenus)==null?void 0:y.$values)==null?void 0:f.length)??0)>0});return o.length>0?o.map(d=>{var y;return{id:d.id,label:d.menuName,children:(((y=d.childMenus)==null?void 0:y.$values)??[]).map(f=>({id:f.id,label:f.menuName})).sort((f,k)=>f.label.localeCompare(k.label))}}).sort((d,y)=>d.label.localeCompare(y.label)):zr},[a]),s=r.parent||((v=n[0])==null?void 0:v.id)||"",[i,h]=w.useState(r.mode||"child"),[l,c]=w.useState(s),[u,p]=w.useState(s),x=(o,d)=>{if(h(o),c(d),o==="parent")t({mode:"parent"});else{const y=n.find(f=>f.id===d);t({mode:"child",parent:d,parentLabel:y==null?void 0:y.label})}},j=({active:o,title:d,desc:y,onClick:f})=>e.jsxs("div",{onClick:f,className:"flex items-start cursor-pointer",style:{gap:12,padding:"12px 14px",borderRadius:8,border:`2px solid ${o?m.orange:m.line}`,background:o?m.cream:"#fff",marginBottom:8},children:[e.jsx("div",{className:"flex items-center justify-center shrink-0 rounded-full",style:{width:18,height:18,border:`2px solid ${o?m.orange:"#CCC"}`,background:o?m.orange:"transparent",marginTop:1},children:o&&e.jsx("div",{style:{width:6,height:6,borderRadius:"50%",background:"#fff"}})}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:15,fontWeight:700,color:m.ink},children:d}),e.jsx("div",{style:{fontSize:15,color:m.muted,marginTop:2},children:y})]})]});return e.jsxs("div",{children:[e.jsx(j,{active:i==="child",title:"Place under an existing parent",desc:"Adds this as a child link inside a current navigation group.",onClick:()=>x("child",l)}),e.jsx(j,{active:i==="parent",title:"Make it its own top-level parent",desc:"Adds a new section to the main navigation bar.",onClick:()=>{h("parent"),t({mode:"parent"})}}),i==="child"&&e.jsxs("div",{style:{marginTop:4},children:[e.jsx("div",{style:{fontSize:15,color:m.muted,marginBottom:6},children:"Pick the parent group:"}),e.jsxs("div",{className:"overflow-hidden",style:{border:`1px solid ${m.line}`,borderRadius:8},children:[n.map(o=>e.jsxs("div",{children:[e.jsxs("div",{onClick:()=>{const d=u===o.id?null:o.id;p(d),x("child",o.id)},className:"flex items-center cursor-pointer",style:{gap:8,padding:"9px 12px",borderBottom:`1px solid ${m.line}`,background:l===o.id?m.cream:"#fff",fontSize:15,fontWeight:600,color:m.ink},children:[e.jsx(te,{name:"folder",size:14}),o.label,e.jsx("span",{style:{marginLeft:"auto",fontSize:14,color:m.muted,background:m.soft,borderRadius:999,padding:"1px 6px"},children:o.children.length}),e.jsx(te,{name:u===o.id?"chevronDown":"chevronRight",size:12})]}),u===o.id&&o.children.map(d=>e.jsxs("div",{className:"flex items-center",style:{gap:8,padding:"8px 12px 8px 32px",borderBottom:"1px solid #F8F8F8",fontSize:14,color:m.muted,background:"#FAFAFA"},children:[e.jsx(te,{name:"file",size:12}),d.label]},d.id))]},o.id)),e.jsxs("div",{className:"flex items-center cursor-pointer",style:{gap:8,padding:"9px 12px",fontSize:15,color:m.muted},onMouseEnter:o=>o.currentTarget.style.background=m.soft,onMouseLeave:o=>o.currentTarget.style.background="transparent",children:[e.jsx(te,{name:"plus",size:14}),"Create new parent group…"]})]})]})]})},Wr=({onClose:r,onCreate:t})=>{const a=sn(),n="page",[s,i]=w.useState(1),[h,l]=w.useState([]);w.useEffect(()=>{const C=localStorage.getItem(Xe);C&&Qe(C,"default").then(B=>{var U;l(((U=B==null?void 0:B.data)==null?void 0:U.$values)??[])})},[]);const[c,u]=w.useState(""),[p,x]=w.useState(""),[j,v]=w.useState("fileText"),[o,d]=w.useState({mode:"child",parent:"operations",parentLabel:"Operations"}),[y,f]=w.useState("team"),[k]=w.useState("5m"),[b,S]=w.useState("title"),L=w.useRef(void 0),N=w.useRef(void 0),P=s===1&&!c.trim();w.useEffect(()=>{if(s===1){if(clearTimeout(L.current),clearTimeout(N.current),!c.trim()){S("title");return}if(!p.trim()){L.current=setTimeout(()=>S("desc"),3e3);return}return S("desc"),N.current=setTimeout(()=>S("next"),5e3),()=>{clearTimeout(L.current),clearTimeout(N.current)}}},[c,p,s]),w.useEffect(()=>{s>=2&&S("next")},[s]);const W=["fileText","layout","table","map","calendar","chat"],[_,V]=w.useState(!1),re=()=>{const C=B=>B.toLowerCase().replace(/\s+/g,"-");return o.mode==="parent"?`/${C(c)||"new-parent"}`:`/${C(o.parentLabel||o.parent||"")}/${C(c||"untitled")}`},ne=C=>Zt.push(e.jsx(en,{title:"Error",type:"danger",duration:3e3,children:C}),{placement:"top-center"}),se=async()=>{var B,U;const C={kind:n,title:c.trim(),desc:p.trim(),nav:o,icon:j,refresh:k,audience:y,slots:[]};V(!0);try{const{title:K,...H}=C,Z=await Tn({layoutName:C.title,description:C.desc,layoutData:JSON.stringify({...H,slots:[],isDraft:!0})});if((Z==null?void 0:Z.success)===!1){ne(Z.message||"Failed to create page layout.");return}const ee=await Jt({menuName:c.trim(),description:p.trim()||"",parentId:o.mode==="child"?o.parent??null:null,portal:"default",routeLink:re(),sequence:0,icon:j,dynamicTableId:null,isModule:!1,isUninstallDisabled:!1,moduleDescription:"",moduleIcon:""});if((ee==null?void 0:ee.success)===!1){ne(ee.message||"Failed to create menu item.");return}t&&t(C),r(),a("/build/build-dashboards")}catch(K){const H=((U=(B=K==null?void 0:K.response)==null?void 0:B.data)==null?void 0:U.message)||(K==null?void 0:K.message)||"Something went wrong. Please try again.";ne(H)}finally{V(!1)}};return e.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-[9999]",style:{background:"rgba(0,0,0,0.45)"},onClick:C=>{C.target===C.currentTarget&&r()},children:e.jsxs("div",{className:"flex flex-col overflow-hidden",style:{background:"#fff",borderRadius:20,width:760,maxHeight:"90vh",boxShadow:"0 30px 80px rgba(0,0,0,0.22)"},children:[e.jsxs("div",{className:"flex items-center",style:{padding:"18px 22px",borderBottom:`1px solid ${m.line}`,gap:12},children:[e.jsx("div",{className:"grid shrink-0",style:{width:36,height:36,borderRadius:9,background:m.cream,placeItems:"center",color:m.orange},children:e.jsx(te,{name:"layout",size:18})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{style:{fontWeight:900,fontSize:18,color:m.ink,margin:0},children:"Build a Page"}),e.jsx("div",{style:{fontSize:14,color:m.muted,marginTop:2},children:"End-user screen with mixed components."})]}),e.jsx("button",{onClick:r,className:"grid cursor-pointer",style:{width:28,height:28,borderRadius:7,border:`1px solid ${m.line}`,background:m.soft,placeItems:"center"},children:e.jsx(te,{name:"x",size:13})})]}),e.jsx("div",{className:"flex items-center",style:{padding:"14px 22px",borderBottom:`1px solid ${m.line}`,gap:0},children:[["Basics",1],["Navigation",2],["Review",3]].map(([C,B],U)=>{const K=s>B,H=s===B;return e.jsxs(ue.Fragment,{children:[e.jsxs("div",{className:"flex items-center",style:{gap:8},children:[e.jsx("div",{className:"grid shrink-0",style:{width:26,height:26,borderRadius:"50%",background:K?m.green:H?m.orange:m.line,color:K||H?"#fff":m.muted,placeItems:"center",fontSize:15,fontWeight:700},children:K?e.jsx(te,{name:"check",size:11,stroke:3}):B}),e.jsx("span",{style:{fontSize:14,fontWeight:700,color:H?m.ink:m.muted},children:C})]}),U<2&&e.jsx("div",{className:"flex-1",style:{height:1,background:m.line,margin:"0 12px"}})]},C)})}),e.jsxs("div",{className:"flex-1 overflow-auto",style:{padding:22},children:[s===1&&e.jsxs("div",{className:"flex flex-col",style:{gap:14},children:[e.jsxs("div",{style:{padding:"12px 14px",borderRadius:10,border:`2px solid ${b==="title"?m.orange:m.line}`,background:b==="title"?m.cream:"#fff",transition:"border-color 0.2s, background 0.2s"},children:[e.jsxs("label",{style:{...oe,color:b==="title"?m.orange:m.muted},children:["Page title ",e.jsx("span",{style:{color:"#DC2626"},children:"*"})]}),e.jsx("div",{style:{fontSize:15,color:m.muted,marginBottom:8},children:"Shown in the nav, the breadcrumb and the browser tab."}),e.jsx("input",{style:{...Fe},value:c,onChange:C=>u(C.target.value),placeholder:"e.g. Driver Performance",autoFocus:!0,onFocus:C=>C.currentTarget.style.borderColor=m.orange,onBlur:C=>C.currentTarget.style.borderColor=m.line})]}),e.jsxs("div",{style:{padding:"12px 14px",borderRadius:10,border:`2px solid ${b==="desc"?m.orange:m.line}`,background:b==="desc"?m.cream:"#fff",transition:"border-color 0.2s, background 0.2s"},children:[e.jsxs("label",{style:{...oe,color:b==="desc"?m.orange:m.muted},children:["Description ",e.jsx("span",{style:{fontSize:14,color:m.muted,fontWeight:400,textTransform:"none",letterSpacing:"normal"},children:"optional"})]}),e.jsx("div",{style:{fontSize:15,color:m.muted,marginBottom:8},children:"A short one-liner that helps your team find this page later."}),e.jsx("textarea",{style:{...Fe,resize:"none",height:68},value:p,onChange:C=>x(C.target.value),placeholder:"Track on-time delivery, idle time and route adherence per driver.",onFocus:C=>C.currentTarget.style.borderColor=m.orange,onBlur:C=>C.currentTarget.style.borderColor=m.line})]}),e.jsxs("div",{children:[e.jsx("label",{style:oe,children:"Icon"}),e.jsx("div",{className:"flex flex-wrap",style:{gap:6},children:W.map(C=>e.jsxs("button",{onClick:()=>v(C),className:"inline-flex items-center cursor-pointer",style:{gap:6,padding:"6px 10px",borderRadius:8,border:`1.5px solid ${j===C?m.orange:m.line}`,background:j===C?m.cream:"transparent",color:j===C?m.orange:m.muted,fontSize:14,fontWeight:700},children:[e.jsx(te,{name:C,size:12}),C]},C))})]})]}),s===2&&e.jsxs("div",{children:[e.jsxs("label",{style:oe,children:["Navigation location ",e.jsx("span",{style:{color:"#DC2626"},children:"*"})]}),e.jsx("div",{style:{fontSize:15,color:m.muted,marginBottom:12},children:"Where should this page appear in the navigation?"}),e.jsx(Fr,{value:o,onChange:d,menus:h}),e.jsxs("div",{style:{marginTop:14,padding:"10px 14px",background:m.soft,borderRadius:8,fontSize:12},children:["Will be reachable at:",e.jsxs("div",{style:{fontFamily:"IBM Plex Mono, monospace",fontSize:15,color:m.orange,marginTop:4},children:["/",o.mode==="parent"?c.toLowerCase().replace(/\s+/g,"-")||"new-parent":`${(o.parentLabel||o.parent||"").toLowerCase().replace(/\s+/g,"-")}/${(c||"untitled").toLowerCase().replace(/\s+/g,"-")}`]})]})]}),s===3&&e.jsxs("div",{className:"flex flex-col",style:{gap:14},children:[e.jsxs("div",{children:[e.jsx("label",{style:oe,children:"Audience"}),e.jsx("div",{className:"flex flex-wrap",style:{gap:6},children:[["team","My team"],["org","Whole org"],["execs","Executives only"],["external","External clients"]].map(([C,B])=>e.jsx("button",{onClick:()=>f(C),className:"cursor-pointer",style:{padding:"6px 12px",borderRadius:8,border:`1.5px solid ${y===C?m.orange:m.line}`,background:y===C?m.cream:"transparent",color:y===C?m.orange:m.muted,fontSize:14,fontWeight:700},children:B},C))})]}),e.jsxs("div",{style:{background:"#FAFAFA",border:`1px solid ${m.line}`,borderRadius:10,padding:"14px 16px"},children:[e.jsx("div",{style:{fontWeight:700,fontSize:15,color:m.muted,letterSpacing:"0.06em",textTransform:"uppercase",marginBottom:10},children:"Review"}),e.jsxs("div",{className:"grid",style:{gridTemplateColumns:"100px 1fr",gap:"8px 14px",fontSize:13},children:[e.jsx("div",{style:{color:m.muted},children:"Type"}),e.jsx("div",{children:e.jsx("b",{children:"Page"})}),e.jsx("div",{style:{color:m.muted},children:"Title"}),e.jsx("div",{children:e.jsx("b",{children:c||"—"})}),e.jsx("div",{style:{color:m.muted},children:"Description"}),e.jsx("div",{children:p||e.jsx("i",{style:{color:m.muted},children:"(none)"})}),e.jsx("div",{style:{color:m.muted},children:"Navigation"}),e.jsx("div",{children:o.mode==="parent"?e.jsx("span",{children:"New top-level parent"}):e.jsxs("span",{children:["Under ",e.jsx("b",{children:o.parentLabel})]})}),e.jsx("div",{style:{color:m.muted},children:"Audience"}),e.jsx("div",{children:y})]})]})]})]}),e.jsxs("div",{className:"flex items-center justify-between",style:{padding:"14px 22px",borderTop:`1px solid ${m.line}`},children:[e.jsxs("div",{style:{fontSize:14,color:m.muted},children:["Step ",s," of 3"]}),e.jsxs("div",{className:"flex",style:{gap:8},children:[s>1&&e.jsx("button",{onClick:()=>i(C=>C-1),className:"cursor-pointer",style:{padding:"8px 16px",fontSize:15,fontWeight:700,color:m.muted,border:`1px solid ${m.line}`,borderRadius:8,background:"transparent"},children:"Back"}),e.jsx("button",{onClick:r,className:"cursor-pointer",style:{padding:"8px 16px",fontSize:15,fontWeight:700,color:m.muted,border:`1px solid ${m.line}`,borderRadius:8,background:"transparent"},children:"Cancel"}),s<3?e.jsxs("button",{onClick:()=>i(C=>C+1),disabled:P,className:"flex items-center",style:{gap:6,padding:"8px 20px",fontSize:15,fontWeight:700,color:"#fff",background:P?"#CCC":m.orange,border:"none",borderRadius:8,cursor:P?"not-allowed":"pointer",opacity:P?.6:1},children:["Continue ",e.jsx(te,{name:"arrowRight",size:14,stroke:2.2})]}):e.jsx("button",{onClick:se,disabled:_,className:"flex items-center",style:{gap:6,padding:"8px 20px",fontSize:15,fontWeight:700,color:"#fff",background:m.orange,border:"none",borderRadius:8,cursor:_?"not-allowed":"pointer",opacity:_?.6:1},children:_?"Creating…":"Create page"})]})]})]})})},Br=ue.memo(r=>{const{menus:t}=r;return e.jsxs(e.Fragment,{children:[e.jsx(Ze,{type:"streamline",imgClass:"mx-auto mobile-only"}),e.jsx(yr,{menus:t}),e.jsx(Pn,{})]})}),Hr=ue.memo(({onOpen:r})=>e.jsxs("button",{onClick:r,className:"hidden md:inline-flex items-center gap-2 text-[13px] font-bold text-white rounded-full px-4 py-[8px] border-0 flex-shrink-0 cursor-pointer transition-colors",style:{background:"var(--custom-600)"},onMouseEnter:t=>t.currentTarget.style.background="var(--custom-700)",onMouseLeave:t=>t.currentTarget.style.background="var(--custom-600)",children:[e.jsx(tn,{className:"text-[14px]"})," Build"]})),Kr=()=>e.jsx("span",{className:"[&_button]:text-gray-500 [&_button:hover]:bg-gray-100 [&_button:hover]:text-gray-800",children:e.jsx(gr,{hoverable:!1})}),We=({icon:r,title:t})=>e.jsx("button",{title:t,className:"relative flex items-center justify-center w-9 h-9 rounded-full bg-transparent border-0 text-gray-500 hover:bg-gray-100 hover:text-gray-800 cursor-pointer flex-shrink-0 transition-colors",children:r}),_r=ue.memo(({onOpenWizard:r})=>{const{isManage:t}=wn("Page Builder");return e.jsxs(e.Fragment,{children:[t&&e.jsx(Hr,{onOpen:r}),e.jsx(ur,{variant:"light"}),e.jsx(Kr,{}),e.jsx(We,{icon:e.jsx(nn,{size:18}),title:"Location"}),e.jsx(We,{icon:e.jsx(rn,{size:18}),title:"Help & Support"}),e.jsx(Cr,{hoverable:!1})]})}),Ur=()=>{const[r,t]=w.useState([]),[a,n]=w.useState(!1);w.useEffect(()=>{s()},[]);const s=async()=>{var h;const i=localStorage.getItem(Xe);if(i){const l=await Qe(i,"default"),c=be((h=l==null?void 0:l.data)==null?void 0:h.$values);t(c??[])}else t([])};return e.jsxs("div",{className:"app-layout-classic flex flex-auto flex-col",children:[e.jsxs("div",{className:"flex flex-auto min-w-0",children:[e.jsx(Dr,{menus:r}),e.jsxs("div",{className:"flex flex-col flex-auto min-h-screen min-w-0 relative w-full",children:[e.jsx(Sn,{className:"shadow dark:shadow-2xl",headerStart:e.jsx(Br,{menus:r}),headerEnd:e.jsx(_r,{onOpenWizard:()=>n(!0)})}),e.jsx("div",{className:"h-full flex flex-auto flex-col",children:e.jsx(yn,{})})]})]}),a&&e.jsx(Wr,{onClose:()=>n(!1)})]})};function be(r){return[...r.map(a=>a.childMenus&&a.childMenus.$values?{...a,childMenus:{...a.childMenus,$values:be(a.childMenus.$values)}}:a)].sort((a,n)=>a.sequence-n.sequence)}const qr=ue.memo(Ur),gs=Object.freeze(Object.defineProperty({__proto__:null,default:qr,sortMenuItems:be},Symbol.toStringTag,{value:"Module"}));export{Wr as C,Sn as H,yr as M,gr as N,Pn as S,Cr as U,rt as V,Dr as a,ur as b,Lr as c,gs as d,ye as n,be as s,he as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,R as de}from"./vendor-mui-98daa63f.js";import{A as E}from"./AdaptableCard-3d1e1f96.js";import{r as o,f as O}from"./vendor-react-ece1c85f.js";import{b as K,c as me,a as pe}from"./vendor-redux-a1f00e6b.js";import{a as ue,b as ye,c as fe,d as Ce,e as he}from"./CompanyService-491a9cc1.js";import{_ as ge,k as D,a0 as w,B as N,cF as xe,D as Q,Z as De,cE as H,E as R,F as v,l as be,d as je}from"./index-3b5ce20a.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./index-a14e51de.js";import{D as _}from"./Drawer-4f97e662.js";import{a as S,F as we}from"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import{A as Se,T as L}from"./actioncell-6b5ebd6c.js";import{D as Fe}from"./tableV2-99c808c0.js";import{P as Ne}from"./PageBreadcrumb-cf54a6e9.js";import{D as Re}from"./DoubleSidedImage-b4bd3915.js";import{h as ve}from"./index-b0ef7ac3.js";import{S as ke}from"./StickyFooter-3e569b80.js";import{C as X}from"./ConfirmDialog-2838a642.js";import{d as F,c as Ie,a as P,F as Ae,b as Le}from"./index.esm-b2d342b5.js";import{a as Pe}from"./index-0b08ce18.js";import"./vendor-pdf-3c29882d.js";import"./vendor-devex-4076ffeb.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-de319a18.js";import"./FileSaver.min-20f3f13a.js";import"./DensitySelector-5d2e901f.js";import"./NoData-4cc4af03.js";const T="CompanyData",x=K(`${T}/getCompaniesData`,async a=>(await ue(a)).data),M=K(T+"/getCompanyDetails",async a=>(await ye(a.id)).data),Ee={total:0,pageIndex:1,pageSize:10,query:"",sort:{order:"",key:""}},Me={loading:!1,deleteConfirmation:!1,selectedRowData:"",tableData:Ee,filterData:{name:"",category:["bags","cloths","devices","shoes","watches"],status:[0,1,2],productStatus:0},companyList:[]},Y=me({name:`${T}`,initialState:Me,reducers:{setTableData:(a,t)=>{a.tableData=t.payload},setFilterData:(a,t)=>{a.filterData=t.payload},toggleDeleteConfirmation:(a,t)=>{a.deleteConfirmation=t.payload},setSelectedRowData:(a,t)=>{a.selectedRowData=t.payload}},extraReducers:a=>{a.addCase(x.fulfilled,(t,s)=>{t.companyList=s.payload.$values,t.tableData.total=s.payload.$values.length,t.loading=!1}).addCase(x.pending,t=>{t.loading=!0}).addCase(M.fulfilled,(t,s)=>{t.company=s.payload,t.loading=!1}).addCase(M.pending,t=>{t.loading=!0})}}),{setTableData:kt,setFilterData:It,toggleDeleteConfirmation:z,setSelectedRowData:Z}=Y.actions,ze=Y.reducer,ee=pe({data:ze}),h=ge,Oe=({data:a,pager:t,setPager:s,fetchData:m})=>{var c;const i=(y,r)=>{s(p=>({...p,pageIndex:r})),m({pageIndex:r,pageSize:t==null?void 0:t.pageSize})},l=y=>{const r=parseInt(y.target.value,10);s(p=>({...p,pageSize:r})),m({pageIndex:t==null?void 0:t.pageIndex,pageSize:r})};return e.jsx(de,{component:"div",count:((c=a==null?void 0:a[0])==null?void 0:c.totalCount)||0,rowsPerPageOptions:[20,50,100,500],page:t==null?void 0:t.pageIndex,onPageChange:i,rowsPerPage:t==null?void 0:t.pageSize,onRowsPerPageChange:l})},Te=a=>{D();const{touched:t,errors:s,type:m}=a;return o.useState(),e.jsxs(E,{className:"mb-4",children:[e.jsx(S,{label:"Company Name",invalid:s.companyName&&t.companyName,errorMessage:s.companyName,children:e.jsx(F,{type:"text",autoComplete:"off",name:"companyName",placeholder:"Company Name",component:w})}),e.jsx(S,{label:"Address",invalid:s.companyLocation&&t.companyLocation,errorMessage:s.companyLocation,children:e.jsx(F,{type:"text",autoComplete:"off",name:"companyLocation",placeholder:"Address",component:w})}),e.jsx(S,{label:"Website",invalid:s.website&&t.website,errorMessage:s.website,children:e.jsx(F,{type:"text",autoComplete:"off",name:"website",placeholder:"Website",component:w})}),e.jsx(S,{label:"Notes",invalid:s.notes&&t.notes,errorMessage:s.notes,children:e.jsx(F,{type:"text",autoComplete:"off",name:"notes",placeholder:"Notes",component:w,textArea:!0})})]})},{useUniqueId:qe}=ve,J=Ie().shape({companyName:P().required("Company name Required"),companyLocation:P().required("Address Required"),website:P().required("Website Required")}),Be=({onDelete:a})=>{const[t,s]=o.useState(!1),m=()=>{s(!0)},i=()=>{s(!1)},l=()=>{a==null||a(s)};return e.jsxs(e.Fragment,{children:[e.jsx(N,{className:"text-red-600",variant:"plain",size:"sm",icon:e.jsx(xe,{}),type:"button",onClick:m,children:"Delete"}),e.jsx(X,{isOpen:t,type:"danger",title:"Delete Category",confirmButtonColor:"red-600",onClose:i,onRequestClose:i,onCancel:i,onConfirm:l,children:e.jsx("p",{children:"Are you sure you want to delete this? All record related to this role will be deleted as well. This action cannot be undone."})})]})},q=o.forwardRef((a,t)=>{const{type:s,initialData:m={id:"",contactName:"",email:"",contactNumber:"",posistion:"",notes:""},onFormSubmit:i,onDiscard:l,onDelete:c}=a,y=qe("Contact-");return e.jsx(e.Fragment,{children:e.jsx(Ae,{innerRef:t,initialValues:{...m},validationSchema:J,onSubmit:(r,{setSubmitting:p})=>{const C=r;s==="new"&&(C.id=y),i==null||i(C,p)},children:({values:r,touched:p,errors:C,isSubmitting:u})=>e.jsx(Le,{children:e.jsxs(we,{children:[e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-1 gap-4",children:e.jsx("div",{className:"lg:col-span-2 pb-8",children:e.jsx(Te,{type:s,touched:p,errors:C})})}),e.jsxs(ke,{className:"px-8 flex items-center justify-between py-4",stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:[e.jsx("div",{children:s==="edit"&&e.jsx(Be,{onDelete:c})}),e.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(N,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>l==null?void 0:l(),children:"Discard"}),e.jsx(N,{size:"sm",variant:"solid",loading:u,icon:e.jsx(Pe,{}),type:"submit",children:"Save"})]})]})]})})})})});q.displayName="CompanyForm";Q("CompanysData",ee);const $e=a=>{const{id:t,onDrawerClose:s}=a,m=D();O();const i=h(d=>{var f,g;return(g=(f=d.CompanyData)==null?void 0:f.data)==null?void 0:g.company});console.log("companyData",i);const l=h(d=>{var f,g;return(g=(f=d.CompanyData)==null?void 0:f.data)==null?void 0:g.loading}),c=d=>{m(M({id:d}))},y=()=>{m(x({}))},r=async(d,f)=>{f(!0);const g={companyName:d.companyName??"",companyLocation:d.companyLocation??"",website:d.website??"",status:"",notes:d.notes??""},k=await fe(t,g);f(!1),k&&(u("updated"),y(),s())},p=()=>{s()},C=async d=>{d(!1)},u=d=>{R.push(e.jsxs(v,{title:"Success",type:"success",duration:2500,children:["Company Successfully ",d]}),{placement:"top-center"})};return o.useEffect(()=>{c(t)},[t]),e.jsxs(e.Fragment,{children:[e.jsx(De,{loading:l,children:!H(i)&&e.jsx(e.Fragment,{children:e.jsx(q,{type:"edit",initialData:i,onFormSubmit:r,onDiscard:p,onDelete:C})})}),!l&&H(i)&&e.jsxs("div",{className:"h-full flex flex-col items-center justify-center",children:[e.jsx(Re,{src:"/img/others/img-2.png",darkModeSrc:"/img/others/img-2-dark.png",alt:"No product found!"}),e.jsx("h3",{className:"mt-8",children:"No company found!"})]})]})},Ve=()=>{const a=D(),t=h(c=>c.CompanyData.data.deleteConfirmation),s=h(c=>c.CompanyData.data.selectedRowData),m=h(c=>c.CompanyData.data.tableData),i=()=>{a(z(!1))},l=async()=>{a(z(!1)),await Ce(s.id)&&(a(x(m)),R.push(e.jsx(v,{title:"Deleted",type:"success",duration:2500,children:"Company Successfully Deleted"}),{placement:"top-center"}))};return e.jsx(X,{isOpen:t,type:"danger",title:"Delete Contact",confirmButtonColor:"red-600",onClose:i,onRequestClose:i,onCancel:i,onConfirm:l,children:e.jsx("p",{children:"Are you sure you want to delete this Contact? This action cannot be undone."})})},Ge=a=>{const{onDrawerClose:t,customerId:s}=a;O();const m=D();o.useState(!1);const i=async r=>await he(r),l=()=>{m(x({}))},c=async(r,p)=>{p(!0);const C={companyName:r.companyName??"",companyLocation:r.companyLocation??"",website:r.website??"",status:"",notes:r.notes??""};i(C).then(u=>{u.success&&(R.push(e.jsx(v,{title:"Success",type:"success",duration:2500,children:"Contact Successfully Added"}),{placement:"top-center"}),l(),t())}).catch(u=>{console.log("category - error",u);var d=u.response.data;p(!1),R.push(e.jsx(v,{title:"Error",type:"danger",duration:2500,children:d.message}),{placement:"top-center"})})},y=()=>{t()};return e.jsx(e.Fragment,{children:e.jsx(q,{type:"new",onFormSubmit:c,onDiscard:y})})},Ue=[{key:"auto",name:"Immediately"},{key:"onClick",name:"On Button Click"}],We=[{key:"dragAndDrop",name:"Drag and drop"},{key:"select",name:"Select"}],He=["nextColumn","widget"];Q("CompanyData",ee);const _e={edit:!0,delete:!0,view:!1},At=()=>{const[a,t]=o.useState([]),[s,m]=o.useState(!1);o.useState(!1);const[i,l]=o.useState(!1),[c,y]=o.useState(!1),[r,p]=o.useState(),C=()=>{l(!0)},u=()=>{l(!1)},[d,f]=o.useState(!0),[g,k]=o.useState(!0),[Ze,te]=o.useState(Ue[0].key),ae=o.useRef(null);o.useState(He[0]),o.useState(We[1].key),o.useState(!0),o.useState(!0),o.useState(!0),o.useState(!0);const se=O(),b=D(),B=h(n=>n.CompanyData.data.filterData);h(n=>n.CompanyData.data.loading);const I=h(n=>n.CompanyData.data.companyList);console.log("companyList",I),be();const{pageIndex:$,pageSize:V,sort:G,query:oe,total:Je}=h(n=>n.CompanyData.data.tableData);o.useEffect(()=>{ne()},[$,V,G,s,B]);const ne=()=>{const n=x({pageIndex:$,pageSize:V,sort:G,query:oe,filterData:B});b(n)},j=o.useCallback(()=>{ae.current.instance().clearFilter()},[]);o.useCallback(n=>{f(n.value),j()},[j]),o.useCallback(n=>{k(n.value),j()},[j]),o.useCallback(n=>{te(n.value)},[]);const ie=n=>{se("/app/crm/lead-details/"+n.id)},[U,W]=o.useState({pageSize:"",pageIndex:""}),re=(n,A)=>{A===L.view&&ie(n),A===L.edit&&(p(n.id),b(Z(n)),y(!0)),A===L.delete&&(b(z(!0)),b(Z(n)))},le=()=>{y(!1)},ce=[{dataField:"Action",caption:"Action",width:"130",cellRender:n=>e.jsx("div",{children:e.jsx(Se,{row:n==null?void 0:n.data,actions:_e,buttonClick:re})})},{dataField:"companyName",caption:"Company Name",width:"330"},{dataField:"address",caption:"Address",width:"330"},{dataField:"website",caption:"Website",width:"330"},{dataField:"createdDate",caption:"Created On",width:"230",dataType:"date",format:"MM/dd/yyyy"}];return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[e.jsx(Ne,{items:[{label:"CRM"},{label:"Company"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Company"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx(N,{onClick:()=>C(),block:!0,variant:"solid",size:"sm",icon:e.jsx(je,{}),children:"Add Company"}),e.jsx(_,{title:"Add Company",isOpen:i,onClose:u,onRequestClose:u,portalClassName:"w30",children:e.jsx(Ge,{onDrawerClose:u})}),e.jsx(_,{title:"Edit Company",isOpen:c,onClose:u,onRequestClose:u,portalClassName:"w30",children:e.jsx($e,{id:r,onDrawerClose:le})})]})]})]}),e.jsx(E,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:e.jsxs(E,{className:"borderless",children:[e.jsx(Fe,{columns:ce,tableName:"contact-table",data:I||[],defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:a,setSelectedRowId:t,setFilterValues:()=>{},filterValues:[],identity:"Lead-Listing",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"Lead-Listing-table",handleSearch:()=>{},isColumnResizing:!0,pager:U,setPager:W}),e.jsx(Oe,{data:I||[],pager:U,setPager:W,fetchData:()=>{}})]})}),e.jsx(Ve,{})]})};export{At as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{dg as e}from"./index-3b5ce20a.js";async function p(a){return(await e.apiV10CompanyAddCompanyPost(a)).data}async function s(a){return(await e.apiV10CompanyGetCompaniesPost(a)).data}async function r(a){return(await e.apiV10CompanyGetCompanyByIdIdGet(a)).data}async function i(a,n){return(await e.apiV10CompanyUpdateCompanyIdPut(a,n)).data}async function y(a){return(await e.apiV10CompanyDeleteCompanyIdDelete(a)).data}export{s as a,r as b,i as c,y as d,p as e};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r}from"./vendor-mui-
|
|
1
|
+
import{j as r}from"./vendor-mui-98daa63f.js";import{bY as m,c as p,du as c,dv as d,dw as u,dx as g,dy as h,dz as b,dA as x,dB as C,dC as N,dD as f}from"./index-3b5ce20a.js";import{A as v}from"./AdaptableCard-3d1e1f96.js";import{b as F}from"./index-49016ad0.js";import{b as k}from"./index-0b08ce18.js";import{f as A}from"./vendor-react-ece1c85f.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-3c29882d.js";import"./vendor-devex-4076ffeb.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";function I(s){return m({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 13.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"},child:[]},{tag:"path",attr:{d:"M19.071 3.429h.001c3.905 3.905 3.905 10.237 0 14.142l-5.403 5.403a2.36 2.36 0 0 1-3.336 0l-5.375-5.375-.028-.028c-3.905-3.905-3.905-10.237 0-14.142 3.904-3.905 10.236-3.905 14.141 0ZM5.99 4.489v.001a8.5 8.5 0 0 0 0 12.02l.023.024.002.002 5.378 5.378a.859.859 0 0 0 1.214 0l5.403-5.404a8.5 8.5 0 0 0-.043-11.977A8.5 8.5 0 0 0 5.99 4.489Z"},child:[]}]})(s)}const O=()=>{const s=A(),t=p(e=>{var a;return((a=e.auth.session)==null?void 0:a.permission)||[]}),l=e=>{const a=t.find(o=>o.menuName===e);return(a==null?void 0:a.isView)||!1},n=[{label:"AI Vision",icon:k,url:"/app/pages/ai-vision",menuName:"AI Vision"},{label:"Bar Codes",icon:c,url:"/app/pages/barcodes",menuName:"Bar Code Generator"},{label:"Event Calendar",icon:d,url:"/app/pages/Calendar",menuName:"Calendar"},{label:"Chat",icon:u,url:"/app/pages/Chat",menuName:"Chat"},{label:"Cloud Storage",icon:g,url:"/app/pages/documentmanagement",menuName:"Cloud Storage"},{label:"Data Grid",icon:h,url:"/app/pages/grid",menuName:"Grid"},{label:"Live Tracking",icon:I,url:"/app/pages/live-tracking",menuName:"Live 360"},{label:"Interactive Map",icon:b,url:"/app/pages/map",menuName:"Map Interactive"},{label:"Grid View Map",icon:x,url:"/app/pages/gridmap",menuName:"Map Grid"},{label:"Geo fence",icon:F,url:"/app/pages/geo-fence",menuName:"Map Geo Fence"},{label:"OCR",icon:C,url:"/app/pages/ocr",menuName:"OCR"},{label:"Time Log",icon:N,url:"/app/pages/TimeLog",menuName:"Time Log"},{label:"Video Check In",icon:f,url:"/app/pages/Check-In",menuName:"Video Check In"}].map(e=>l(e.menuName)?e:{label:"",icon:null,url:""});return console.log("gridItems",n),r.jsxs(v,{className:"p-4 sm:p-6 md:p-8 bg-transparent",bodyClass:"p-0",children:[r.jsx("h2",{className:"text-2xl font-semibold mb-6 sm:mb-8 text-gray-800",children:"Available Components"}),r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-5 gap-5",children:n.map((e,a)=>{const o=e.icon,i=!!e.url;return r.jsxs("div",{className:`group rounded-2xl bg-white border border-gray-200 shadow-sm transition duration-200
|
|
2
2
|
${i?"cursor-pointer hover:shadow-lg hover:border-custom-600":"opacity-50 cursor-default"}
|
|
3
3
|
flex flex-col items-center justify-center p-4 h-[36vh] dark:bg-[#292f3c] dark:text-white
|
|
4
4
|
`,onClick:()=>i&&s(e.url),children:[o&&r.jsx("div",{className:"flex items-center justify-center w-48 h-48 mb-4",children:r.jsx(o,{className:"text-custom-600 text-5xl group-hover:scale-110 transition-transform"})}),e.label&&r.jsx("p",{className:"text-center text-[18px] font-medium leading-tight mt-1",children:e.label})]},a)})})]})};export{O as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{H as j,B as t,as as s,bM as b,cc as p,m as g,bL as N}from"./index-3b5ce20a.js";const f=({status:a})=>{switch(a){case"info":return e.jsx(s,{className:"bg-blue-100 text-blue-600 dark:bg-blue-500/20 dark:text-blue-100",shape:"circle",children:e.jsx("span",{className:"text-2xl",children:e.jsx(N,{})})});case"success":return e.jsx(s,{className:"bg-emerald-100 text-emerald-600 dark:bg-emerald-500/20 dark:text-emerald-100",shape:"circle",children:e.jsx("span",{className:"text-2xl",children:e.jsx(g,{})})});case"warning":return e.jsx(s,{className:"text-amber-600 bg-amber-100 dark:text-amber-100",shape:"circle",children:e.jsx("span",{className:"text-2xl",children:e.jsx(p,{})})});case"danger":return e.jsx(s,{className:"text-red-600 bg-red-100 dark:text-red-100",shape:"circle",children:e.jsx("span",{className:"text-2xl",children:e.jsx(b,{})})});default:return null}},v=a=>{const{type:c="info",title:n,children:i,onCancel:r,onConfirm:l,cancelText:x="Cancel",confirmText:d="Confirm",confirmButtonColor:o,...m}=a,h=()=>{r==null||r()},u=()=>{l==null||l()};return e.jsxs(j,{contentClassName:"pb-0 px-0",...m,children:[e.jsxs("div",{className:"px-6 pb-6 pt-2 flex",children:[e.jsx("div",{children:e.jsx(f,{status:c})}),e.jsxs("div",{className:"ml-4 rtl:mr-4",children:[e.jsx("h5",{className:"mb-2",children:n}),i]})]}),e.jsxs("div",{className:"text-right px-6 py-3 bg-gray-100 dark:bg-gray-700 rounded-bl-lg rounded-br-lg",children:[e.jsx(t,{size:"sm",className:"ltr:mr-2 rtl:ml-2",onClick:h,children:x}),e.jsx(t,{size:"sm",variant:"solid",color:o,onClick:u,children:d})]})]})};export{v as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./vendor-mui-98daa63f.js";import{j as O,r as R}from"./vendor-react-ece1c85f.js";import{D as w,k as T,Z as k,ai as z}from"./index-3b5ce20a.js";import{A}from"./AdaptableCard-3d1e1f96.js";import{u as E,r as B,b as F}from"./index-11297f4a.js";import{P as L}from"./PageBreadcrumb-cf54a6e9.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-3c29882d.js";import"./vendor-devex-4076ffeb.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";import"./ContactService-8afcaeb7.js";import"./AccountServices-f68f471d.js";w("ContactsData",B);const ss=S=>{var a;let{id:l}=O();const I=T(),Y=E(d=>{var i,r;return(r=(i=d.ContactsData)==null?void 0:i.data)==null?void 0:r.loading}),e=E(d=>{var i,r,m,c,n,h,p,o,x,j,t,b,N,g,u,v,C,f,y,P;return{...(r=(i=d.ContactsData)==null?void 0:i.data)==null?void 0:r.contact,posistion:{value:(n=(c=(m=d.ContactsData)==null?void 0:m.data)==null?void 0:c.contact)==null?void 0:n.contactPosistionId,label:(o=(p=(h=d.ContactsData)==null?void 0:h.data)==null?void 0:p.contact)==null?void 0:o.contactPosistion},accountId:{value:(t=(j=(x=d.ContactsData)==null?void 0:x.data)==null?void 0:j.contact)==null?void 0:t.accountId,label:(g=(N=(b=d.ContactsData)==null?void 0:b.data)==null?void 0:N.contact)==null?void 0:g.accountName},department:{label:(C=(v=(u=d.ContactsData)==null?void 0:u.data)==null?void 0:v.contact)==null?void 0:C.department,value:(P=(y=(f=d.ContactsData)==null?void 0:f.data)==null?void 0:y.contact)==null?void 0:P.departmentId}}}),M=d=>{I(F({id:d}))};return R.useEffect(()=>{l&&M(l)},[l]),s.jsx(s.Fragment,{children:s.jsxs(k,{loading:Y,children:[s.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[s.jsx(L,{items:[{label:"CRM"},{label:"Contacts"},{label:"Contact Detail"}]}),s.jsx("div",{className:"lg:flex items-center justify-between",children:s.jsx("h3",{className:"mb-4 lg:mb-0",children:"Contact Detail"})})]}),s.jsx(A,{className:"m-6 h-full bg-transparent",bodyClass:"h-full",children:s.jsxs(A,{className:"py-4 px-6 borderless",children:[s.jsx("h3",{className:"mt-2 mtb-2 lg:mb-0",children:"Details"}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Contact Name"}),s.jsx("h6",{children:e==null?void 0:e.contactName})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Contact Number"}),s.jsx("h6",{children:e==null?void 0:e.contactNumber})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Email"}),s.jsx("h6",{children:e==null?void 0:e.email})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Account Name"}),s.jsx("h6",{children:e==null?void 0:e.accountName})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Position"}),s.jsx("h6",{children:e==null?void 0:e.contactPosistion})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Department"}),s.jsx("h6",{children:(a=e==null?void 0:e.department)==null?void 0:a.label})]})]}),s.jsx("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Contact Time"}),s.jsx("h6",{children:e==null?void 0:e.preferredContactTime})]})}),s.jsx("hr",{}),s.jsx("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Address"}),s.jsxs("h6",{children:[e==null?void 0:e.address,", ",e==null?void 0:e.state,", ",e==null?void 0:e.city,", ",e==null?void 0:e.zip]})]})}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Industry"}),s.jsx("h6",{children:e==null?void 0:e.industry})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"No Of Employees"}),s.jsx("h6",{children:e==null?void 0:e.noOfEmployees})]})]}),s.jsx("hr",{}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Website"}),s.jsx("h6",{children:e==null?void 0:e.website})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Notes"}),s.jsx("h6",{children:e==null?void 0:e.notes})]})]}),s.jsx("hr",{}),s.jsx("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Created On"}),s.jsx("h6",{children:e!=null&&e.createdDate?z(e==null?void 0:e.createdDate).format("MM/DD/YYYY"):""})]})})]})})]})})};export{ss as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{cX as n}from"./index-3b5ce20a.js";async function c(t){return(await n.apiV10ContactAddContactPost(t)).data}async function r(t){return(await n.apiV10ContactGetContactsPost(t)).data}async function p(t){return(await n.apiV10ContactGetContactByIdIdGet(t)).data}async function i(t,a){return(await n.apiV10ContactUpdateContactIdPut(t,a)).data}async function C(t){return(await n.apiV10ContactDeleteContactIdDelete(t)).data}async function d(t,a,e){return(await n.apiV10ContactImportFilesPost(t,a,e)).data}export{d as a,r as b,c,i as d,C as e,p as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,l as re}from"./vendor-mui-98daa63f.js";import{A as U}from"./AdaptableCard-3d1e1f96.js";import{r as i,f as de,L as me}from"./vendor-react-ece1c85f.js";import{k as T,aA as ue,E as pe,F as Ce,r as Q,B as F,D as Z,l as fe,d as J,ai as he}from"./index-3b5ce20a.js";import{u as m,t as O,g as xe,c as k,a as be,r as ge,s as K}from"./index-11297f4a.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import{C as X}from"./index-a14e51de.js";import{D as L}from"./Drawer-4f97e662.js";import"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import{A as je,T as E}from"./actioncell-6b5ebd6c.js";import{D as ve}from"./tableV2-99c808c0.js";import{a as we,b as De}from"./AddAccount-2cd72664.js";import{C as Ne}from"./ConfirmDialog-2838a642.js";import{e as ye,a as Fe}from"./ContactService-8afcaeb7.js";import{r as Se}from"./index-0fd6e996.js";import{a as Ae}from"./DepartmentServices-a53e998b.js";import{u as Pe}from"./usePermission-4689548c.js";import{C as Re}from"./ImportFile-026b1771.js";import{P as Le}from"./PageBreadcrumb-cf54a6e9.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-3c29882d.js";import"./vendor-devex-4076ffeb.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";import"./AccountServices-f68f471d.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-de319a18.js";import"./FileSaver.min-20f3f13a.js";import"./DensitySelector-5d2e901f.js";import"./NoData-4cc4af03.js";import"./index-b0ef7ac3.js";import"./StickyFooter-3e569b80.js";import"./index.esm-b2d342b5.js";import"./Check-af681a30.js";import"./createSvgIcon-aba65987.js";import"./DoubleSidedImage-b4bd3915.js";import"./index-0b08ce18.js";import"./validationPatterns-77446c46.js";import"./CourseService-29ad460c.js";import"./ApiService-df126758.js";import"./papaparse.min-f30b4da6.js";import"./vendor-excel-3b3553df.js";const ke=o=>{const d=T(),C=m(c=>c.ContactsData.data.deleteConfirmation),f=m(c=>c.ContactsData.data.selectedRowData);m(c=>c.ContactsData.data.tableData);const n=()=>{d(O(!1))},g=async()=>{d(O(!1)),await ye(f.id)&&(o!=null&&o.fetchData&&(ue("apiCache-contactsData"),o.fetchData()),pe.push(e.jsx(Ce,{title:"Deleted",type:"success",duration:2500,children:"Contact Successfully Deleted"}),{placement:"top-center"}))};return e.jsx(Ne,{isOpen:C,type:"danger",title:"Delete Contact",confirmButtonColor:"red-600",onClose:n,onRequestClose:n,onCancel:n,onConfirm:g,children:e.jsx("p",{children:"Are you sure you want to delete this Contact? This action cannot be undone."})})},Ie=({onSaveClick:o,onCancel:d,onClearFilers:C})=>e.jsxs("div",{className:"text-right w-full",children:[e.jsx(F,{size:"sm",className:"mr-2",onClick:C,children:"Clear All"}),e.jsx(F,{size:"sm",className:"mr-2",onClick:d,children:"Cancel"}),e.jsx(F,{size:"sm",variant:"solid",onClick:o,children:"Query"})]}),Ee=o=>{i.useRef(null);const d=T(),[C,f]=i.useState(!1),n=m(a=>a.ContactsData.data.filterData),[g,c]=i.useState(n==null?void 0:n.account),[j,v]=i.useState(n==null?void 0:n.position),[S,A]=i.useState([]),w=()=>{f(!1),o.onClose()},I=i.useCallback(async()=>{var a,u;try{const l=await Ae();if(l!=null&&l.data){let x=(u=(a=l==null?void 0:l.data)==null?void 0:a.$values)==null?void 0:u.map(p=>({value:p.id,label:p.positionName}));A(x)}}catch(l){A([]),console.error("Failed to opportunity logs:",l)}},[]);i.useEffect(()=>{P(),I()},[]);const P=()=>{const a=xe({});d(a)},h=m(a=>{var l,x,p;return(p=(x=(l=a==null?void 0:a.ContactsData)==null?void 0:l.data)==null?void 0:x.accountList)==null?void 0:p.map(R=>({value:R.id,label:R.accountName}))}),D=()=>{d(k({account:"",position:""})),c(""),v("")},N=()=>{o.onClose(),f(!1),d(k({account:g,position:j}))};return i.useEffect(()=>{o.isOpen&&f(!0)},[o.isOpen]),i.useEffect(()=>{var a,u;((a=n==null?void 0:n.account)==null?void 0:a.value)===""&&c(""),((u=n==null?void 0:n.position)==null?void 0:u.value)===""&&v("")},[n]),e.jsx(e.Fragment,{children:e.jsxs(L,{title:"Advanced Filter Selection Page",isOpen:C,portalClassName:"w30",footer:e.jsx(Ie,{onCancel:w,onSaveClick:N,onClearFilers:D}),onClose:w,onRequestClose:w,children:[e.jsxs("div",{className:"mb-5",children:[e.jsx("div",{className:"lg:flex md:flex-none sm:flex-none mb-4",children:e.jsx("h5",{children:"Account"})}),e.jsx(Q,{size:"sm",className:"mb-4 rounded-xl",placeholder:"Please Select",isMulti:!1,value:g,onChange:a=>c(a),options:h,isClearable:!0})]}),e.jsxs("div",{className:"mb-5",children:[e.jsx("div",{className:"lg:flex md:flex-none sm:flex-none mb-4",children:e.jsx("h5",{children:"Position"})}),e.jsx(Q,{size:"sm",className:"mb-4 rounded-xl",placeholder:"Please Select",isMulti:!1,value:j,onChange:a=>v(a),options:S,isClearable:!0})]})]})})};Z("ContactsData",ge);Z("AccountsData",Se);const Pt=({accountId:o=null,accountName:d=""})=>{var Y,H,W,_;const[C,f]=i.useState([]),[n,g]=i.useState(!1);i.useState(!1);const[c,j]=i.useState(!1),[v,S]=i.useState(!1),[A,w]=i.useState(),[I,P]=i.useState(!1),h=Pe("Contacts"),[D,N]=i.useState({drawerType:""}),a={edit:h.isEdit,delete:h.isDelete,view:h.isView},u=()=>{P(!0)},l=()=>{P(!1)},x=()=>{j(!0)},p=()=>{j(!1)},R=i.useRef(null),ee=de(),b=T(),s=m(t=>t.ContactsData.data.filterData),M=m(t=>t.ContactsData.data.loading),te=m(t=>t.ContactsData.data.contactList),{textTheme:ae}=fe(),{pageIndex:z,pageSize:q,sort:B,query:se,total:Oe}=m(t=>t.ContactsData.data.tableData);i.useEffect(()=>{y()},[z,q,B,n,s]);const y=()=>{var r,G;const t=be({pageIndex:z,pageSize:q,sort:B,query:se,...((r=s==null?void 0:s.account)==null?void 0:r.value)&&!o&&{accountId:s.account.value},...((G=s==null?void 0:s.position)==null?void 0:G.value)&&!o&&{position:s.position.value},...o&&{accountId:o}});b(t)};i.useCallback(()=>{R.current.instance().clearFilter()},[]);const oe=t=>{ee("/app/crm/contact-details/"+t.id)},[ie,ne]=i.useState({pageSize:"",pageIndex:""}),le=(t,r)=>{r===E.view&&oe(t),r===E.edit&&(w(t.id),b(K(t)),S(!0)),r===E.delete&&(b(O(!0)),b(K(t)))},V=()=>{S(!1)},$=t=>{t==="accountId"&&b(k({...s,account:""})),t==="Position"&&b(k({...s,position:""}))},ce=[...a!=null&&a.edit||a!=null&&a.delete?[{dataField:"Action",caption:"Action",width:"130",cellRender:t=>e.jsx("div",{id:"mAction","data-cname":"Action",children:e.jsx(je,{row:t==null?void 0:t.data,actions:a,buttonClick:le})})}]:[],{dataField:"contactName",caption:"Name",width:"230",cellRender:t=>{var r;return e.jsx("div",{"data-cname":"Name",children:e.jsx(me,{to:`/app/crm/contact-details/${(r=t==null?void 0:t.data)==null?void 0:r.id}`,className:`${ae} ml-2 rtl:mr-2`,children:t.value})})}},{dataField:"email",caption:"Email",width:"230"},{dataField:"contactPosistion",caption:"Position",width:"230"},{dataField:"department",caption:"Department",width:"230"},{dataField:"contactNumber",caption:"Phone",width:"230"},{dataField:"contactStatus",caption:"Status",width:"230"},{dataField:"createdDate",caption:"Created On",width:"230",dataType:"date",format:"dd-MM-yyyy",cellRender:t=>{const r=he(t.value).format("MM/DD/YYYY");return e.jsx("div",{"data-cname":"Created On",children:r})}}];return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:o?"topbar py-4 pt-0 border-gray-200 border-b dark:bg-[#292f3c] dark:text-white":"topbar py-4 px-6 border-gray-200 border-b",children:[e.jsx(Le,{items:[{label:"CRM"},{label:"Contacts"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Contacts"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 w-full",children:[h.isEdit&&e.jsx(F,{block:!0,variant:"solid",size:"sm",icon:e.jsx(J,{}),onClick:()=>x(),children:"Add Contact"}),h.isEdit&&e.jsx(F,{block:!0,variant:"solid",size:"sm",icon:e.jsx(J,{}),onClick:()=>N(t=>({...t,drawerType:"import"})),children:"Import Contacts"})]}),e.jsx(L,{title:"Add Contact",isOpen:c,onClose:p,portalClassName:"w30 prevent-overflow",children:e.jsx(we,{footerWidth:"w30",accountId:o,accountName:d,fetchData:y,onDrawerClose:p})}),e.jsx(L,{title:"Edit Contact",isOpen:v,onClose:V,portalClassName:"w30 prevent-overflow",children:e.jsx(De,{footerWidth:"w30",id:A,fetchData:y,onDrawerClose:V})})]})]})]}),e.jsxs(U,{className:o?"h-full bg-transparent borderless my-6":"m-6 h-full p-4 bg-transparent borderless",bodyClass:"h-full",children:[M&&e.jsx(re,{sx:{backgroundColor:"rgba(0, 0, 0, 0.1)","& .MuiLinearProgress-bar":{backgroundColor:"var(--custom-600)"}}}),e.jsxs(U,{className:"borderless",children:[!o&&e.jsxs("div",{className:"text-right mb-3 ",children:[((Y=s==null?void 0:s.account)==null?void 0:Y.value)&&e.jsx(X,{title:"Account",value:(H=s==null?void 0:s.account)==null?void 0:H.label,tagId:"accountId",onRemovefilter:$}),((W=s==null?void 0:s.position)==null?void 0:W.value)&&e.jsx(X,{title:"Position",value:(_=s==null?void 0:s.position)==null?void 0:_.label,tagId:"Position",onRemovefilter:$})]}),e.jsx(ve,{columns:ce,tableName:"contact-table",data:te||[],height:o?"calc(100vh - 460px)":"calc(100vh - 290px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:C,setSelectedRowId:f,setFilterValues:()=>{},filterValues:[],identity:"Lead-Listing",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"Lead-Listing-table",handleSearch:()=>{},isColumnResizing:!0,pager:ie,setPager:ne,openFilter:u,isPaginationReq:!0,isFilterReq:!0,isSelectionReq:!1,isLoading:M})]})]}),e.jsx(ke,{fetchData:y}),e.jsx(Ee,{isOpen:I,onClose:l}),e.jsx(L,{title:"Import Contacts",portalClassName:"w30 prevent-overflow",isOpen:(D==null?void 0:D.drawerType)==="import",closable:!0,onClose:()=>N(t=>({...t,drawerType:""})),children:e.jsx(Re,{requiredHeaders:["firstName","lastName","email"],allowedHeaders:["firstName","lastName","email","contactNumber","position","accountId","notes","department","preferredContactTime"],apiUrl:Fe,importType:"Contacts",templateFile:"/data/Contacts_Import_template.csv",fetchData:()=>y(),onDiscard:()=>N(t=>({...t,drawerType:""}))})})]})};export{Pt as default};
|