@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 @@
|
|
|
1
|
+
import{j as o}from"./vendor-mui-98daa63f.js";import{f as w,r as F}from"./vendor-react-ece1c85f.js";import{_ as b,D as k,k as A,Z as C,cE as m,E as f,F as g}from"./index-3b5ce20a.js";import{D as I}from"./DoubleSidedImage-b4bd3915.js";import{b as L,c as M,a as T}from"./vendor-redux-a1f00e6b.js";import{c as _,d as $,e as v}from"./RoleService-2f9ed883.js";import{R as B}from"./RoleForm-47691f91.js";const R="RoleEditState",c=L(R+"/getTRole",async t=>(await _(t.id)).data),G=async t=>(await $(t)).data,U=async t=>(await v(t)).success,W={loading:!0,roleData:{id:"",role:"",description:""}},Z=M({name:`${R}/state`,initialState:W,reducers:{},extraReducers:t=>{t.addCase(c.fulfilled,(s,i)=>{s.roleData=i.payload,s.loading=!1}).addCase(c.pending,s=>{s.loading=!0})}}),q=Z.reducer,z=T({data:q}),h=b;k("RoleEditState",z);const H=t=>{const{roleId:s,onDrawerClose:i,footerWidth:D}=t,x=A(),d=w(),r=h(e=>{var n,a;return(a=(n=e.RoleEditState)==null?void 0:n.data)==null?void 0:a.roleData}),l=h(e=>{var n,a;return(a=(n=e.RoleEditState)==null?void 0:n.data)==null?void 0:a.loading}),S=e=>{x(c({id:e}))},E=async(e,n)=>{var u;n(!0);const a=await G({id:e.id??"",name:e.name??"",description:e.description});n(!1),a!=null&&a.success?p("updated"):N(((u=a==null?void 0:a.data)==null?void 0:u.message)||"Something went wrong"),t==null||t.fetchData(),i(null)},y=()=>{i()},j=async e=>{e(!1),await U(s??"")&&(p("deleted"),i(null))},N=e=>{f.push(o.jsx(g,{title:"Failed",type:"danger",duration:2500,children:e}),{placement:"top-center"}),d("/app/settings/role")},p=e=>{f.push(o.jsxs(g,{title:"Success",type:"success",duration:2500,children:["Role Successfully ",e]}),{placement:"top-center"}),d("/app/settings/role")};return F.useEffect(()=>{S(s)},[s]),o.jsxs(o.Fragment,{children:[o.jsx(C,{loading:l,children:!m(r)&&o.jsx(o.Fragment,{children:o.jsx(B,{type:"edit",footerWidth:D,initialData:r,onFormSubmit:E,onDiscard:y,onDelete:j})})}),!l&&m(r)&&o.jsxs("div",{className:"h-full flex flex-col items-center justify-center",children:[o.jsx(I,{src:"/img/others/img-2.png",darkModeSrc:"/img/others/img-2-dark.png",alt:"No product found!"}),o.jsx("h3",{className:"mt-8",children:"No role found!"})]})]})},Y=H;export{Y as R,U as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{r as y}from"./vendor-react-ece1c85f.js";import{a as p,F as b}from"./FormContainer-9a52b9e8.js";import{a0 as u,B as d,cF as w}from"./index-3b5ce20a.js";import{h as S}from"./index-b0ef7ac3.js";import{S as A}from"./StickyFooter-3e569b80.js";import{C as T}from"./ConfirmDialog-2838a642.js";import{d as x,a as F,c as I,F as k,b as v}from"./index.esm-b2d342b5.js";import{A as D}from"./AdaptableCard-3d1e1f96.js";import{a as E}from"./index-0b08ce18.js";import{V as f,i as N}from"./validationPatterns-77446c46.js";const q=t=>{const{touched:r,errors:s,type:i}=t;return e.jsxs(D,{className:"mb-4",children:[e.jsx(p,{asterisk:!0,label:"Role",invalid:s.name&&r.name,errorMessage:s.name,children:e.jsx(x,{type:"text",autoComplete:"off",name:"name",placeholder:"Role",component:u})}),e.jsx(p,{asterisk:!0,label:"Description",invalid:s.description&&r.description,errorMessage:s.description,children:e.jsx(x,{textArea:!0,type:"text",autoComplete:"off",name:"description",placeholder:"Description",component:u})})]})},B={TEXT_INPUT:100,TEXT_AREA:255,PASSWORD:50,USERNAME:30},{TEXT_INPUT:h,TEXT_AREA:j}=B,{useUniqueId:O}=S,g=F().matches(f.sqlInjectionSafe,"Invalid input: SQL keywords not allowed").matches(f.noSpecialChars,"Special characters like < > = { } are not allowed").test("no-base64","Base64 encoded content is not allowed",t=>t?!N(t.trim()):!0),M=I().shape({name:g.required("Role Required").max(h,`Maximum ${h} characters allowed`),description:g.required("Description Required").max(j,`Maximum ${j} characters allowed`)}),_=({onDelete:t})=>{const[r,s]=y.useState(!1),i=()=>{s(!0)},o=()=>{s(!1)},a=()=>{t==null||t(s)};return e.jsxs(e.Fragment,{children:[e.jsx(d,{className:"text-red-600",variant:"plain",size:"sm",icon:e.jsx(w,{}),type:"button",onClick:i,children:"Delete"}),e.jsx(T,{isOpen:r,type:"danger",title:"Delete product",confirmButtonColor:"red-600",onClose:o,onRequestClose:o,onCancel:o,onConfirm:a,children:e.jsx("p",{children:"Are you sure you want to delete this role? All record related to this role will be deleted as well. This action cannot be undone."})})]})},X=y.forwardRef((t,r)=>{const{type:s,footerWidth:i,initialData:o={id:"",name:"",description:""},onFormSubmit:a,onDiscard:l,onDelete:C}=t,R=O("Role-");return e.jsx(e.Fragment,{children:e.jsx(k,{innerRef:r,initialValues:{...o},validationSchema:M,onSubmit:(m,{setSubmitting:c})=>{const n=m;s==="new"&&(n.id=R),a==null||a(n,c)},children:({values:m,touched:c,errors:n,isSubmitting:$})=>e.jsx(v,{children:e.jsxs(b,{children:[e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-1 gap-4",children:e.jsx("div",{className:"lg:col-span-2",children:e.jsx(q,{type:s,touched:c,errors:n})})}),e.jsxs(A,{className:`px-8 flex items-center justify-between py-4 ${i}`,stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:[e.jsx("div",{children:s==="edit"&&e.jsx(_,{onDelete:C})}),e.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(d,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>l==null?void 0:l(),children:"Discard"}),e.jsx(d,{size:"sm",variant:"solid",icon:e.jsx(E,{}),type:"submit",children:"Save"})]})]})]})})})})});X.displayName="RoleForm";export{X as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o}from"./vendor-mui-
|
|
1
|
+
import{j as o}from"./vendor-mui-98daa63f.js";import{R as f}from"./RoleForm-47691f91.js";import{E as r,F as n}from"./index-3b5ce20a.js";import{b as y}from"./RoleService-2f9ed883.js";import{f as R,r as w}from"./vendor-react-ece1c85f.js";const g=s=>{const{onDrawerClose:i,footerWidth:d}=s;R(),w.useState(!1);const p=async e=>await y(e),m=async(e,u)=>{var a,c;e.roleType="Operation";const h={name:e.name??"",description:e.description??"",roleType:e.roleType};try{const t=await p(h);t.success?(r.push(o.jsx(n,{title:"Success",type:"success",duration:2500,children:"Role Successfully Added"}),{placement:"top-center"}),s.onAddNew()):r.push(o.jsx(n,{title:"Error",type:"danger",duration:2500,children:t.message}),{placement:"top-center"})}catch(t){r.push(o.jsx(n,{title:"Error",type:"danger",duration:2500,children:((c=(a=t==null?void 0:t.response)==null?void 0:a.data)==null?void 0:c.message)||"Something went wrong"}),{placement:"top-center"}),s.onAddNew()}},l=()=>{i()};return o.jsx(o.Fragment,{children:o.jsx(f,{type:"new",footerWidth:d,onFormSubmit:m,onDiscard:l})})},F=g;export{F as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{cn as a}from"./index-3b5ce20a.js";async function n(e){return(await a.apiV10UserCreateRolePost(e)).data}async function o(e){return(await a.apiV10UserGetRolesTypePost("Operation",e)).data}async function r(e){return(await a.apiV10UserGetRoleByIdIdGet(e)).data}async function p(e){return await a.apiV10UserUpdateRolePut(e)}async function i(e){return(await a.apiV10UserDeleteRoleIdDelete(e)).data}export{o as a,n as b,r as c,p as d,i as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,u as xe}from"./vendor-mui-98daa63f.js";import{A as w}from"./AdaptableCard-3d1e1f96.js";import{r as m,f as Z}from"./vendor-react-ece1c85f.js";import{b as ye,c as ge,a as De}from"./vendor-redux-a1f00e6b.js";import{eu as z,_ as be,ev as Ce,k as H,a0 as U,r as M,ai as I,B,D as ae,Z as se,E as O,F as R,l as je,d as Te,a4 as ve}from"./index-3b5ce20a.js";import{C as ie}from"./ConfirmDialog-2838a642.js";import{a as j,F as Ae}from"./FormContainer-9a52b9e8.js";import{h as Fe}from"./index-b0ef7ac3.js";import{S as Ie}from"./StickyFooter-3e569b80.js";import{u as ke,d as T,c as q,a as _,k as Ne,F as Oe,b as Re}from"./index.esm-b2d342b5.js";import{a as Le}from"./index-0b08ce18.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import{a as $e,T as Me}from"./index-a14e51de.js";import{D as ee}from"./Drawer-4f97e662.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import{a as qe}from"./CourseService-29ad460c.js";import{r as He}from"./createSvgIcon-aba65987.js";import{A as Ee,T as V}from"./actioncell-6b5ebd6c.js";import{u as Ve}from"./usePermission-4689548c.js";import{u as Pe}from"./useDeviceCheck-920641a5.js";import{D as Ye}from"./tableV2-99c808c0.js";import{P as ze}from"./PageBreadcrumb-cf54a6e9.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"./ApiService-df126758.js";import"./FileSaver.min-20f3f13a.js";import"./DensitySelector-5d2e901f.js";import"./NoData-4cc4af03.js";async function Ge(a){return(await z.apiV10CourseSchedulePost(a)).data}async function Ue(a){return(await z.apiV10CourseScheduleGet(a)).data}async function _e(a,s){return(await z.apiV10CourseScheduleIdPut(a,s)).data}async function re(a){return(await z.apiV10CourseScheduleIdDelete(a)).data}const ne="ScheduleData",P=ye(`${ne}/getScheduleData`,async a=>{const s=await Ue(a);return s==null?void 0:s.data}),we={total:0,pageIndex:1,pageSize:10,query:"",sort:{order:"",key:""}},Be={loading:!1,deleteConfirmation:!1,selectedRowData:"",tableData:we,filterData:{name:"",category:["bags","cloths","devices","shoes","watches"],status:[0,1,2],productStatus:0},ScheduleList:[]},oe=ge({name:`${ne}`,initialState:Be,reducers:{setTableData:(a,s)=>{a.tableData=s.payload},toggleDeleteConfirmation:(a,s)=>{a.deleteConfirmation=s.payload},setSelectedRowData:(a,s)=>{a.selectedRowData=s.payload}},extraReducers:a=>{a.addCase(P.fulfilled,(s,r)=>{var u,o;s.ScheduleList=((o=(u=r==null?void 0:r.payload)==null?void 0:u.result)==null?void 0:o.$values)||[],s.loading=!1}).addCase(P.pending,s=>{s.loading=!0}).addCase(P.rejected,(s,r)=>{s.ScheduleList=[],s.loading=!1})}}),{setTableData:_t,toggleDeleteConfirmation:W,setSelectedRowData:We}=oe.actions,Ze=oe.reducer,le=De({data:Ze}),Y=be;async function Je(a){return(await Ce.apiV10LocationGet(a)).data}const Ke=a=>{var y,C,F,L;H();const{touched:s,errors:r,type:u,values:o}=a;ke();const[f,n]=m.useState([]),[p,i]=m.useState([]),h=["In-person","Online","In-person & Online"].map((l,c)=>({label:l,value:c+1})),S=["Guided","NonGuided"].map((l,c)=>({label:l,value:c+1})),b=[{label:"30 Mins",value:1},{label:"1 Hour",value:2},{label:"1.5 Hour",value:3},{label:"2 Hour",value:4},{label:"2.5 Hour",value:5},{label:"3 Hour",value:6},{label:"3.5 Hour",value:7},{label:"4 Hour",value:8},{label:"4.5 Hour",value:9},{label:"5 Hour",value:10},{label:"5.5 Hour",value:11},{label:"6 Hour",value:12}],D=m.useCallback(async()=>{var l,c,d,k;try{const g=await Je({status:!1}),A=(c=(l=g==null?void 0:g.data)==null?void 0:l.result)==null?void 0:c.$values.map(N=>({value:N.id,label:`${N.title}`}));n(A)}catch(g){n([]),console.error("Failed to fetch US states:",g)}try{const g=await qe({status:!1}),A=(k=(d=g==null?void 0:g.data)==null?void 0:d.finalResults)==null?void 0:k.$values.map(N=>({value:N.id,label:`${N.title}`}));i(A)}catch(g){i([]),console.error("Failed to fetch US states:",g)}},[]);return m.useEffect(()=>{D()},[]),t.jsxs(w,{className:"mb-4",children:[t.jsx(j,{asterisk:!0,label:"Title",invalid:r.title&&s.title,errorMessage:r.title,children:t.jsx(T,{type:"text",autoComplete:"off",name:"title",placeholder:"Title",component:U})}),t.jsx(j,{asterisk:!0,label:"Course",invalid:r.courseId&&s.courseId,errorMessage:r.courseId,children:t.jsx(T,{name:"courseId",children:({field:l,form:c})=>t.jsx(M,{field:l,form:c,options:p,name:"courseId",onChange:d=>{c.setFieldValue(l.name,d)}})})}),t.jsx(j,{label:"Date",asterisk:!0,invalid:r.date&&s.date,errorMessage:r.date,children:t.jsx(T,{name:"date",children:({field:l,form:c})=>t.jsx(t.Fragment,{children:t.jsx($e,{name:"date",placeholder:"Date",field:l,value:o==null?void 0:o.date,onChange:d=>{d&&c.setFieldValue("date",d)}})})})}),t.jsx(j,{label:"Course Start Time",asterisk:!0,invalid:r.courseStartTime&&s.courseStartTime,errorMessage:r.courseStartTime,children:t.jsx(T,{name:"courseStartTime",placeholder:"Course Start Time",children:({field:l,form:c})=>t.jsx(Me,{name:"courseStartTime",id:"courseStartTime",field:l,defaultValue:c.values.courseStartTime?new Date(I().format("YYYY-MM-DD")+`T${c.values.courseStartTime}`)||"":void 0,format:"12",clearable:!1,onChange:d=>{var k=I(d).format("HH:mm:ss");c.setFieldValue("courseStartTime",k)}})})}),t.jsx(j,{asterisk:!0,label:"Course Duration",invalid:r.courseDuration&&s.courseDuration,errorMessage:r.courseDuration,children:t.jsx(T,{name:"courseDuration",children:({field:l,form:c})=>t.jsx(M,{field:l,form:c,options:b,name:"courseDuration",onChange:d=>{c.setFieldValue(l.name,d)}})})}),t.jsx(j,{asterisk:!0,label:"Course Type",invalid:r.courseType&&s.courseType,errorMessage:r.courseType,children:t.jsx(T,{name:"courseType",children:({field:l,form:c})=>t.jsx(M,{field:l,form:c,options:h,name:"courseType",onChange:d=>{c.setFieldValue(l.name,d)}})})}),(((y=o==null?void 0:o.courseType)==null?void 0:y.value)==2||((C=o==null?void 0:o.courseType)==null?void 0:C.value)==3)&&t.jsx(j,{asterisk:!0,label:"Assistance Level",invalid:r.guidedType&&s.guidedType,errorMessage:r.guidedType,children:t.jsx(T,{name:"guidedType",children:({field:l,form:c})=>t.jsx(M,{field:l,form:c,options:S,name:"guidedType",onChange:d=>{c.setFieldValue(l.name,d)}})})}),(((F=o==null?void 0:o.courseType)==null?void 0:F.value)==2||((L=o==null?void 0:o.courseType)==null?void 0:L.value)==3)&&t.jsx(j,{label:"Link",invalid:r.link&&s.link,errorMessage:r.link,children:t.jsx(T,{type:"text",autoComplete:"off",name:"link",placeholder:"Link",component:U})}),t.jsx(j,{label:"Location",invalid:r.location&&s.location,errorMessage:r.location,children:t.jsx(T,{name:"location",children:({field:l,form:c})=>t.jsx(M,{field:l,form:c,options:f,name:"location",onChange:d=>{c.setFieldValue(l.name,d)}})})}),t.jsx(j,{asterisk:!0,label:"No. of Seats",invalid:r.noOfSeats&&s.noOfSeats,errorMessage:r.noOfSeats,children:t.jsx(T,{type:"number",autoComplete:"off",name:"noOfSeats",placeholder:"No. of Seats",component:U})})]})},{useUniqueId:Qe}=Fe,te=q().shape({date:_().required("Date is required"),courseStartTime:_().required("Start Time is required"),courseDuration:q().required("Course Duration is required"),courseId:q().required("Course is required"),title:_().required("Title is required"),noOfSeats:Ne().required("Number of seats is required"),courseType:q().required("Course Type is required"),guidedType:q().nullable().when("courseType",{is:a=>(a==null?void 0:a.value)===2||(a==null?void 0:a.value)===3,then:a=>a.required("Assistance Level is required"),otherwise:a=>a.notRequired()})}),J=m.forwardRef((a,s)=>{const{type:r,initialData:u={date:"",courseStartTime:"",courseDuration:"",title:"",location:"",noOfSeats:"",courseType:"",link:"",guidedType:"",courseId:""},onFormSubmit:o,onDiscard:f,onDelete:n}=a,p=Qe("LeadSource-");return t.jsx(t.Fragment,{children:t.jsx(Oe,{innerRef:s,initialValues:{...u},validationSchema:te,onSubmit:(i,{setSubmitting:h})=>{const S=i;r==="new"&&(S.id=p),o==null||o(S,h)},children:({values:i,touched:h,errors:S,isSubmitting:b})=>t.jsx(Re,{children:t.jsxs(Ae,{children:[t.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-1 gap-4",children:t.jsx("div",{className:"lg:col-span-2 pb-8",children:t.jsx(Ke,{type:r,touched:h,errors:S,values:i})})}),t.jsx(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:t.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[t.jsx(B,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>f==null?void 0:f(),children:"Discard"}),t.jsx(B,{size:"sm",variant:"solid",loading:b,icon:t.jsx(Le,{}),type:"submit",children:"Save"})]})})]})})})})});J.displayName="ScheduleForm";function Xe(a){return a=String(a).trim(),/^\d+$/.test(a)?`${parseInt(a,10).toString().padStart(2,"0")}:00:00`:/^\d{2}:\d{2}:\d{2}$/.test(a)?a:" "}ae("ScheduleData",le);const et=a=>{const{id:s,onDrawerClose:r,refetchDataAfterUpdate:u}=a;H(),Z();const o=async(i,h)=>{var D,y,C,F;h(!0);const S={title:(i==null?void 0:i.title)??"",duration:((D=i.courseDuration)==null?void 0:D.value)??"",courseId:(i==null?void 0:i.courseId.value)??"",startTime:Xe(i.courseStartTime)??"",scheduleDate:i.date?I(i.date).format("YYYY-MM-DD"):"",locationId:((y=i.location)==null?void 0:y.value)??null,noOfSeats:i.noOfSeats??"",courseType:((C=i==null?void 0:i.courseType)==null?void 0:C.value)??null,isGuided:!!((F=i==null?void 0:i.guidedType)!=null&&F.value),link:(i==null?void 0:i.link)??""},b=await _e(i==null?void 0:i.id,S);h(!1),b&&(p("updated"),u(),r())},f=()=>{r()},n=async i=>{i(!1)},p=i=>{O.push(t.jsxs(R,{title:"Success",type:"success",duration:2500,children:["Election Schedule Successfully ",i]}),{placement:"top-center"})};return t.jsx(t.Fragment,{children:t.jsx(se,{loading:!1,children:t.jsx(J,{type:"edit",initialData:a.selectedData,onFormSubmit:o,onDiscard:f,onDelete:n})})})};function tt(a){return a=String(a).trim(),/^\d+$/.test(a)?`${parseInt(a,10).toString().padStart(2,"0")}:00:00`:/^\d{2}:\d{2}:\d{2}$/.test(a)?a:" "}const at=a=>{const{onDrawerClose:s,refetchDataAfterUpdate:r}=a;Z(),H(),m.useState(!1);const u=async n=>await Ge(n),o=async(n,p)=>{var h,S,b,D;p(!0);const i={title:(n==null?void 0:n.title)??"",duration:((h=n.courseDuration)==null?void 0:h.value)??"",courseId:(n==null?void 0:n.courseId.value)??"",startTime:tt(n.courseStartTime)??"",scheduleDate:n.date?I(n.date).format("YYYY-MM-DD"):"",locationId:((S=n.location)==null?void 0:S.value)??null,noOfSeats:n.noOfSeats??"",courseType:((b=n==null?void 0:n.courseType)==null?void 0:b.value)??null,isGuided:!!((D=n==null?void 0:n.guidedType)!=null&&D.value),link:(n==null?void 0:n.link)??""};u(i).then(y=>{y.success&&(O.push(t.jsx(R,{title:"Success",type:"success",duration:2500,children:"Course Schedule Successfully Added"}),{placement:"top-center"}),r(),s())}).catch(y=>{console.log("category - error",y);var C=y.response.data;p(!1),O.push(t.jsx(R,{title:"Error",type:"danger",duration:2500,children:C.message}),{placement:"top-center"})})},f=()=>{s()};return t.jsx(t.Fragment,{children:t.jsx(J,{type:"new",onFormSubmit:o,onDiscard:f})})};var K={},st=xe;Object.defineProperty(K,"__esModule",{value:!0});var Q=K.default=void 0,it=st(He()),rt=t;Q=K.default=(0,it.default)((0,rt.jsx)("path",{d:"M15 16h4v2h-4zm0-8h7v2h-7zm0 4h6v2h-6zM3 18c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V8H3zm2-8h6v8H5zm5-6H6L5 5H2v2h12V5h-3z"}),"DeleteSweepOutlined");const nt=({refetchDataAfterUpdate:a})=>{const s=H(),r=Y(n=>{var p,i;return(i=(p=n.ScheduleData)==null?void 0:p.data)==null?void 0:i.deleteConfirmation}),u=Y(n=>{var p,i;return(i=(p=n.ScheduleData)==null?void 0:p.data)==null?void 0:i.selectedRowData}),o=()=>{s(W(!1))},f=async()=>{s(W(!1)),await re(u.id,{isActive:!u.isActive})&&(a(),O.push(t.jsx(R,{title:`Marked ${u.isActive?"Inactive":"Active"}`,type:"success",duration:2500,children:`Election Schedule Successfully Marked ${u.isActive?"Inactive":"Active"}`}),{placement:"top-center"}))};return t.jsx(ie,{isOpen:r,type:"danger",title:"Are You Sure?",icon:t.jsx(Q,{className:"text-red-600 w-6 h-6"}),confirmButtonColor:"red-600",confirmText:u.isActive?"Inactive":"Active",onClose:o,onRequestClose:o,onCancel:o,onConfirm:f,children:t.jsx("p",{className:"text-center text-gray-600",children:`Are you sure you want to mark this Election Schedule ${u.isActive?"Inactive":"Active"} Please confirm to proceed.`})})};ae("ScheduleData",le);const ot={InPerson:1,Online:2,InPersonOnline:3},ce=[{label:"30 Mins",value:1},{label:"1 Hour",value:2},{label:"1.5 Hour",value:3},{label:"2 Hour",value:4},{label:"2.5 Hour",value:5},{label:"3 Hour",value:6},{label:"3.5 Hour",value:7},{label:"4 Hour",value:8},{label:"4.5 Hour",value:9},{label:"5 Hour",value:10},{label:"5.5 Hour",value:11},{label:"6 Hour",value:12}],lt=a=>{var s;return((s=ce.find(r=>r.value===a))==null?void 0:s.label)||"-"},wt=()=>{const[a,s]=m.useState([]);m.useState(!1),m.useState(!1);const[r,u]=m.useState(!1),[o,f]=m.useState(!1),[n,p]=m.useState(),i=Ve("Election Schedules"),[h,S]=m.useState(null),[b,D]=m.useState(!1),[y,C]=m.useState(!1);i.isEdit,i.isDelete;const F=()=>{u(!0)},L=()=>{u(!1)};m.useRef(null),Z();const l=H(),c=Y(e=>{var x,v;return(v=(x=e==null?void 0:e.ScheduleData)==null?void 0:x.data)==null?void 0:v.ScheduleList}),d=Y(e=>{var x,v;return(v=(x=e==null?void 0:e.ScheduleData)==null?void 0:x.data)==null?void 0:v.loading}),[k,g]=m.useState(""),[A,N]=m.useState({label:"All",value:null});je(),m.useEffect(()=>{$()},[A]);const $=()=>{const e=P({status:A==null?void 0:A.value});l(e)},de=e=>{},ue=e=>{const x=ce.find(G=>G.value===e.duration)||null;let v={...e,date:new Date(e.scheduleDate),courseStartTime:e.startTime,courseDuration:x,location:{label:e!=null&&e.locationName?`${e.locationName}`:"",value:e.locationId},courseType:{label:e!=null&&e.courseType?`${e.courseType}`:"",value:ot[e==null?void 0:e.courseType]},guidedType:e!=null&&e.isGuided?{label:e!=null&&e.assistanceType?`${e.assistanceType}`:"NonGuided",value:e.assistanceType==="NonGuided"?2:1}:null,link:e==null?void 0:e.link,courseId:{label:e.title,value:e==null?void 0:e.courseId}};g(v),f(!0)},me=e=>{l(W(!0)),l(We(e))},pe=async()=>{try{C(!0),D(!1),await re(h.id)&&($(),O.push(t.jsx(R,{title:"Archived",type:"success",duration:2500,children:" Schedule Successfully Archived"}),{placement:"top-center"}))}catch(e){console.log(e)}finally{C(!1),E()}},he=e=>{const x=I().startOf("day"),v=I(e.startDate).startOf("day"),G=I(e.endDate).endOf("day");if(x.isBetween(v,G,null,"[]")&&(e!=null&&e.isActive)){O.push(t.jsx(R,{title:"Action Not Allowed",type:"warning",duration:5e3,children:`Current Election - ${e==null?void 0:e.title} Is not eligible for Archival as it's within the date range.`}),{placement:"top-center"});return}S(e),D(!0)},fe=(e,x)=>{x===V.edit&&ue(e),x===V.delete&&me(e),x===V.view&&de(e==null?void 0:e.data),x===V.archive&&he(e==null?void 0:e.data)},E=()=>{D(!1),S(null)},X=()=>{f(!1)};Pe();const Se=[{dataField:"Action",caption:"Action",width:"130",cellRender:e=>t.jsx("div",{"data-cname":"Action",className:"flex justify-start items-center",children:t.jsx(Ee,{row:e==null?void 0:e.data,actions:{edit:!0,delete:!0},buttonClick:fe})})},{dataField:"scheduleDate",caption:"Date",dataType:"date",format:"MM/dd/yyyy"},{dataField:"courseName",caption:"Schedule Name"},{dataField:"title",caption:"Course Name"},{dataField:"startTime",caption:"Start Time"},{dataField:"duration",caption:"Course Duration",cellRender:({data:e})=>t.jsx("div",{"data-cname":"Course Duration",children:lt(e==null?void 0:e.duration)})},{dataField:"locationName",caption:"Location",cellRender:({data:e})=>e.locationName?t.jsx("div",{"data-cname":"Location",children:`${e==null?void 0:e.locationName} - ${e.address}, ${e.address2} ${e.address2?",":""}${e.city}, ${e.state}, ${e.zip}`}):null},{dataField:"isActive",caption:"Active",cellRender:({data:e})=>t.jsx("div",{"data-cname":"Active",children:t.jsx(ve,{checked:e.isActive})})},{dataField:"code",caption:"Code",dataType:"string"},{dataField:"noOfSeats",caption:"Seats",cellRender:({data:e})=>t.jsxs("div",{"data-cname":"noOfSeats",children:[e.regularCheckins,"/",e==null?void 0:e.noOfSeats]})},{dataField:"waitingList",caption:"Waiting List"}];return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[t.jsx(ze,{items:[{label:"Courses"},{label:"Course Schedule"}]}),t.jsxs("div",{className:"lg:flex items-center justify-between",children:[t.jsx("h3",{className:"mb-4 lg:mb-0",children:"Course Schedule"}),t.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center",children:t.jsx(B,{onClick:()=>F(),block:!0,variant:"solid",size:"sm",icon:t.jsx(Te,{}),children:"Add Course Schedule"})})]})]}),(d||y)&&t.jsx("div",{className:"flex justify-center items-center absolute inset-0 bg-gray-300 bg-opacity-20 z-50",children:t.jsx(se,{loading:!0})}),t.jsx(w,{className:"m-6 h-full py-4 pb-0 px-6 bg-transparent",bodyClass:"h-full",children:t.jsx(w,{className:"borderless pb-0",children:t.jsx(Ye,{columns:Se,tableName:"Course-schedule-table",data:c||[],height:"calc(100vh - 270px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:a,setSelectedRowId:s,setFilterValues:()=>{},filterValues:[],identity:"Lead-Listing",isColumnReorderReq:!0,setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"Lead-Listing-table",handleSearch:()=>{},isColumnResizing:!0,isPaginationReq:!0,isSelectionReq:!1,isFilterReq:!0,openFilter:()=>{},isLoading:d||y})})}),t.jsx(nt,{refetchDataAfterUpdate:$}),t.jsx(ee,{title:"Add Course Schedule",isOpen:r,onClose:L,onRequestClose:()=>{},portalClassName:"w30",children:t.jsx(at,{onDrawerClose:L,refetchDataAfterUpdate:$})}),t.jsx(ee,{title:"Edit Course Schedule",isOpen:o,onClose:X,onRequestClose:()=>{},portalClassName:"w30",children:t.jsx(et,{id:n,selectedData:k,onDrawerClose:X,refetchDataAfterUpdate:$})}),t.jsx(ie,{isOpen:b,type:"danger",title:"Are You Sure?",icon:t.jsx(Q,{className:"text-red-600 w-6 h-6"}),confirmButtonColor:"red-600",confirmText:"Archive",onClose:E,onRequestClose:E,onCancel:E,onConfirm:pe,children:t.jsx("p",{className:"text-center text-gray-600",children:`Are you sure, you want to Archive ${h==null?void 0:h.title}. This will Archive all Courses and Participants data for this Election?`})})]})};export{wt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ct as a}from"./index-3b5ce20a.js";async function l(e){return(await a.apiV10ScheduleMeetingAddMeetingPost(e)).data}async function u(e,t,n,s,i,o,c,r){return(await a.apiV10ScheduleMeetingGetAllMeetingsGet(e,s,t,n,i,o,c,r)).data}async function g(e,t){return(await a.apiV10ScheduleMeetingUpdateMeetingIdPut(e,t)).data}async function S(e){return(await a.apiV10ScheduleMeetingDeleteMeetingIdDelete(e)).data}async function y(e){return(await a.apiV10ScheduleMeetingAddEventCategoryPost(e)).data}async function h(){return(await a.apiV10ScheduleMeetingGetEventCategoriesGet()).data}async function M(e,t){return(await a.apiV10ScheduleMeetingUpdateEventCategoryIdPut(e,t)).data}async function I(e){return(await a.apiV10ScheduleMeetingDeleteEventCategoryIdDelete(e)).data}async function f(e){return(await a.apiV10ScheduleMeetingSyncFromGoogleCalendarPost(e)).data}async function w(e){return(await a.apiV10ScheduleMeetingSyncAllToGoogleCalendarPost(e)).data}async function V(){return(await a.apiV10ScheduleMeetingGetIcalSubscriptionsGet()).data}async function G(e){return(await a.apiV10ScheduleMeetingAddIcalSubscriptionPost(e)).data}async function A(e,t){return(await a.apiV10ScheduleMeetingUpdateIcalSubscriptionIdPut(e,t)).data}async function C(e){return(await a.apiV10ScheduleMeetingDeleteIcalSubscriptionIdDelete(e)).data}async function P(e){return(await a.apiV10ScheduleMeetingUploadIcalFilesPost(e)).data}async function m(e){return(await a.apiV10ScheduleMeetingSyncIcalSubscriptionIdPost(e)).data}export{u as a,g as b,h as c,l as d,V as e,f,w as g,P as h,S as i,y as j,M as k,I as l,A as m,G as n,m as o,C as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{A as K}from"./AdaptableCard-3d1e1f96.js";import{P as z}from"./PageBreadcrumb-cf54a6e9.js";import{r as a,f as v}from"./vendor-react-ece1c85f.js";import{u as h,t as k,A as U,r as Q,s as Y}from"./AddEditTranslation-3812ff0f.js";import{k as B,a0 as D,B as L,E as w,F as M,cH as _,D as G,d as J}from"./index-3b5ce20a.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./index-a14e51de.js";import{D as N}from"./Drawer-4f97e662.js";import{a as j,F as X}from"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import{T as Z,a as ee,b as te}from"./index-289b3fd9.js";import"./Upload-be937eb6.js";import{A as ie,T as V}from"./actioncell-6b5ebd6c.js";import{D as ne}from"./tableV2-99c808c0.js";import{C as oe}from"./ConfirmDialog-2838a642.js";import{u as ae}from"./usePermission-4689548c.js";import{h as le}from"./index-b0ef7ac3.js";import{S as re}from"./StickyFooter-3e569b80.js";import{d as F,c as se,a as E,F as de,b as ce}from"./index.esm-b2d342b5.js";import{a as me}from"./index-0b08ce18.js";import"./index-533fd007.js";import"./Notify-8fb74d48.js";import"./vendor-redux-a1f00e6b.js";import"./CompanyService-491a9cc1.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 ue=({fetchData:l})=>{const t=B(),i=h(m=>m.TranslationData.data.deleteConfirmation);h(m=>m.TranslationData.data.selectedRowData);const c=()=>{t(k(!1))},u=async()=>{};return e.jsx(oe,{isOpen:i,type:"danger",title:"Delete Screen",confirmButtonColor:"red-600",onClose:c,onRequestClose:c,onCancel:c,onConfirm:u,children:e.jsx("p",{children:"Are you sure you want to delete this Screen?"})})},Se=({touched:l,errors:t,type:i})=>(a.useState(!1),e.jsxs(K,{className:"mb-4",children:[e.jsx("div",{className:"flex-1",children:e.jsx(j,{asterisk:!0,label:"Screen Name",invalid:t.name&&l.name,errorMessage:t.name,children:e.jsx(F,{type:"text",autoComplete:"off",name:"name",placeholder:"Screen Name",component:D})})}),e.jsx("div",{className:"flex-1",children:e.jsx(j,{asterisk:!0,label:"Screen Code",invalid:t.screenCode&&l.screenCode,errorMessage:t.screenCode,children:e.jsx(F,{type:"text",disabled:i!=="new",autoComplete:"off",name:"screenCode",placeholder:"Screen Code",component:D})})}),e.jsx("div",{className:"mb-5",children:e.jsx(j,{asterisk:!0,label:"Description",invalid:t.description&&l.description,errorMessage:t.description,children:e.jsx(F,{type:"text",textArea:!0,autoComplete:"off",name:"description",placeholder:"Description",component:D})})})]})),{useUniqueId:pe}=le,xe=se().shape({name:E().required("Screen name is required"),screenCode:E().required("Screen code is required"),description:E().required("Description is required")}),A=a.forwardRef((l,t)=>{const{type:i,initialData:c={id:"",name:"",description:"",screenCode:""},onFormSubmit:u,onDiscard:m,onDelete:g}=l,x=pe("FAQ-");return e.jsx(e.Fragment,{children:e.jsx(de,{innerRef:t,initialValues:{...c},validationSchema:xe,onSubmit:(s,{setSubmitting:o})=>{const r={...s};i==="new"&&(r.id=x),u==null||u(r,o)},children:({touched:s,errors:o,isSubmitting:r})=>e.jsx(ce,{children:e.jsxs(X,{children:[e.jsx("div",{className:"grid grid-cols-1 gap-4",children:e.jsx("div",{className:"pb-8",children:e.jsx(Se,{type:i,touched:s,errors:o})})}),e.jsx(re,{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.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(L,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>m==null?void 0:m(),children:"Discard"}),e.jsx(L,{size:"sm",variant:"solid",loading:r,icon:e.jsx(me,{}),type:"submit",children:"Save"})]})})]})})})})});A.displayName="ScreenForm";const P=l=>{const{onDrawerClose:t,faqId:i,fetchData:c,initialData:u}=l;v(),B(),a.useState(!1);const m=async o=>{},g=async o=>{},x=async(o,r)=>{r(!0),o==null||o.name,o==null||o.description,o==null||o.screenCode,(i?g:m)().then(S=>{S.success&&(w.push(e.jsxs(M,{title:"Success",type:"success",duration:2500,children:["Screen ",i?"Updated":"Added"," Successfully"]}),{placement:"top-center"}),c(),t())}).catch(S=>{var H;var d=(H=S.response)==null?void 0:H.data;r(!1),w.push(e.jsx(M,{title:"Error",type:"danger",duration:2500,children:(d==null?void 0:d.message)||"Something went wrong"}),{placement:"top-center"})})},s=()=>{t()};return e.jsx(A,{type:i?"edit":"new",initialData:u||void 0,onFormSubmit:x,onDiscard:s})},ge={ElectionInformation:{image:"/screens/Welcome - Election.png",hotspots:[{id:"ElectionInformation.Header.Title",x:68,y:21.3,label:"ElectionInformation.Header.Title",translationKey:"ElectionInformation.Header.Title"},{id:"ElectionInformation.Header.SubTitle",x:96,y:25,label:"ElectionInformation.Header.SubTitle",translationKey:"ElectionInformation.Header.SubTitle"},{id:"ElectionInformation.Footer.Title",x:90,y:83.5,label:"ElectionInformation.Footer.Title",translationKey:"ElectionInformation.Footer.Title"},{id:"ElectionInformation.Footer.Button.Text",x:59,y:90.5,label:"ElectionInformation.Footer.Button.Text",translationKey:"ElectionInformation.Footer.Button.Text"}]},ElectionDates:{image:"/screens/ElectionDates.png",hotspots:[{id:"ElectionDates.Header.Title",x:62,y:9.2,label:"ElectionDates.Header.Title",translationKey:"ElectionDates.Header.Title"},{id:"ElectionDates.Footer.SearchPlaceholder",x:34,y:90.2,label:"ElectionDates.Footer.SearchPlaceholder",translationKey:"ElectionDates.Footer.SearchPlaceholder"}]},Settings:{image:"/screens/Settings.png",hotspots:[{id:"Settings.Notifications.Title",x:45.5,y:94.5,label:"Settings.Notifications.Title",translationKey:"Settings.Notifications.Title"},{id:"Settings.Notifications.Subtitle",x:53,y:97,label:"Settings.Notifications.Subtitle",translationKey:"Settings.Notifications.Subtitle"}]},Welcome:{image:"/screens/Welcome.png",hotspots:[{id:"Welcome.Header.Title",x:62,y:21.5,label:"Welcome.Header.Title",translationKey:"Welcome.Header.Title"},{id:"Welcome.Header.SubTitle",x:79,y:24.5,label:"Welcome.Header.SubTitle",translationKey:"Welcome.Header.SubTitle"},{id:"Welcome.Footer.Title",x:84,y:83.5,label:"Welcome.Footer.Title",translationKey:"Welcome.Footer.Title"},{id:"Footer.Button.Text",x:59,y:90.5,label:"Footer.Button.Text",translationKey:"Footer.Button.Text"}]},PollingLocations:{image:"/screens/Welcome - Locations.png",hotspots:[{id:"PollingLocations.Header.Title",x:62,y:21.5,label:"PollingLocations.Header.Title",translationKey:"PollingLocations.Header.Title"},{id:"PollingLocations.Header.SubTitle",x:90,y:24.5,label:"PollingLocations.Header.SubTitle",translationKey:"PollingLocations.Header.SubTitle"},{id:"PollingLocations.Footer.Title",x:97.5,y:83.5,label:"PollingLocations.Footer.Title",translationKey:"PollingLocations.Footer.Title"},{id:"PollingLocations.Footer.Button.Text",x:59,y:90.5,label:"PollingLocations.Footer.Button.Text",translationKey:"PollingLocations.Footer.Button.Text"}]},VotingCenter:{image:"/screens/Voting Centers - Map.png",hotspots:[{id:"VotingCenter.Header.Title",x:40,y:9,label:"VotingCenter.Header.Title",translationKey:"VotingCenter.Header.Title"},{id:"VotingCenter.Header.LowTime",x:27,y:15.5,label:"VotingCenter.Header.LowTime",translationKey:"VotingCenter.Header.LowTime"},{id:"VotingCenter.Header.Mins",x:24,y:17,label:"VotingCenter.Header.Mins",translationKey:"VotingCenter.Header.Mins"},{id:"VotingCenter.Header.ModerateTime",x:65,y:15.5,label:"VotingCenter.Header.ModerateTime",translationKey:"VotingCenter.Header.ModerateTime"},{id:"VotingCenter.Header.Mins",x:57,y:17,label:"VotingCenter.Header.Mins",translationKey:"VotingCenter.Header.Mins"},{id:"VotingCenter.Header.LongTime",x:92.5,y:15.5,label:"VotingCenter.Header.LongTime",translationKey:"VotingCenter.Header.LongTime"},{id:"VotingCenter.Header.Mins",x:90,y:17,label:"VotingCenter.Header.Mins",translationKey:"VotingCenter.Header.Mins"},{id:"VotingCenter.Header.Description",x:82,y:28,label:"VotingCenter.Header.Description",translationKey:"VotingCenter.Header.Description"},{id:"VotingCenter.Section.EarlyVoting",x:39,y:33.7,label:"VotingCenter.Section.EarlyVoting",translationKey:"VotingCenter.Section.EarlyVoting"},{id:"VotingCenter.Section.ElectionDay",x:81,y:33.7,label:"VotingCenter.Section.ElectionDay",translationKey:"VotingCenter.Section.ElectionDay"},{id:"VotingCenter.Section.Distance",x:84,y:54.3,label:"VotingCenter.Section.Distance",translationKey:"VotingCenter.Section.Distance"},{id:"VotingCenter.Section.Directions",x:36,y:64,label:"VotingCenter.Section.Directions",translationKey:"VotingCenter.Section.Directions"},{id:"VotingCenter.Section.LastUpdated",x:90,y:65.7,label:"VotingCenter.Section.LastUpdated",translationKey:"VotingCenter.Section.LastUpdated"}]},Home:{homeScreens:{Banner1:{image:"/screens/Welcome - Landing.png",hotspots:[{id:"Home.Header.Slider1.Subtitle1.Title",x:59,y:20,label:"Home.Header.Slider1.Title",translationKey:"Home.Header.Slider1.Title",isBannerNeeded:!0},{id:"Home.Header.Slider1.Subtitle1.Label",x:73,y:22,label:"Home.Header.Slider1.Subtitle1.Label",translationKey:"Home.Header.Slider1.Subtitle1.Label"},{id:"Home.Header.Slider1.Subtitle2.Label",x:94,y:24,label:"Home.Header.Slider1.Subtitle2.Label",translationKey:"Home.Header.Slider1.Subtitle2.Label"},{id:"Home.Header.Slider1.Button",x:57,y:27.7,label:"Home.Header.Slider1.Button",translationKey:"Home.Header.Slider1.Button",isRedirectionNeeded:!0},{id:"Home.Section.VotingCenter.Title",x:34,y:42,label:"Find a Voting Center",translationKey:"Home.Section.VotingCenter.Title",isIconNeeded:!0},{id:"Home.Section.VotingCenter.Description",x:42,y:50,label:"Find a Voting Center",translationKey:"Home.Section.VotingCenter.Description"},{id:"Home.Section.Ballot.Title",x:83,y:42,label:"What’s on My Ballot?",translationKey:"Home.Section.Ballot.Title",isIconNeeded:!0,isRedirectionNeeded:!0},{id:"Home.Section.Ballot.Description",x:90,y:50,label:"What’s on My Ballot?",translationKey:"Home.Section.Ballot.Description"},{id:"Home.Section.Faq.Title",x:36,y:60,label:"Voting FAQ",translationKey:"Home.Section.Faq.Title",isIconNeeded:!0},{id:"Home.Section.Faq.Description",x:42,y:68,label:"Voting FAQ",translationKey:"Home.Section.Faq.Description"},{id:"Home.Section.ElectionDates.Title",x:83,y:60,label:"Election Dates & Reminders",translationKey:"Home.Section.ElectionDates.Title",isIconNeeded:!0},{id:"Home.Section.ElectionDates.Description",x:91,y:67.5,label:"Home.Section.ElectionDates.Description",translationKey:"Home.Section.ElectionDates.Description"},{id:"Home.Section.RegistrationStatus.Title",x:35,y:77,label:"Check Your Voter Registration Status",translationKey:"Home.Section.RegistrationStatus.Title",isIconNeeded:!0,isRedirectionNeeded:!0},{id:"Home.Section.RegistrationStatus.Description",x:43,y:85.5,label:"Check Your Voter Registration Status",translationKey:"Home.Section.RegistrationStatus.Description"},{id:"Home.Section.ElectionResults.Title",x:82,y:77,label:"Election Results",translationKey:"Home.Section.ElectionResults.Title",isIconNeeded:!0,isRedirectionNeeded:!0},{id:"Home.Section.ElectionResults.Description",x:90,y:85.5,label:"Election Results",translationKey:"Home.Section.ElectionResults.Description"}]},Banner2:{image:"/screens/Home-Banner2.png",hotspots:[{id:"Home.Header.Slider2.Title",x:63,y:24.2,label:"Home.Header.Slider2.Title",translationKey:"Home.Header.Slider2.Title",isBannerNeeded:!0},{id:"Home.Header.Slider2.Subtitle1.Label",x:77,y:26.5,label:"Home.Header.Slider2.Subtitle1.Label",translationKey:"Home.Header.Slider2.Subtitle1.Label"},{id:"Home.Header.Slider2.Subtitle2.Label",x:94.2,y:28,label:"Home.Header.Slider2.Subtitle2.Label",translationKey:"Home.Header.Slider2.Subtitle2.Label"},{id:"Home.Header.Slider2.Button",x:57,y:31.2,label:"Home.Header.Slider2.Button",translationKey:"Home.Header.Slider2.Button",isRedirectionNeeded:!0}]},Banner3:{image:"/screens/Home-Banner3.png",hotspots:[{id:"Home.Header.Slider3.Title",x:71,y:24.3,label:"Home.Header.Slider3.Title",translationKey:"Home.Header.Slider3.Title",isBannerNeeded:!0},{id:"Home.Header.Slider3.Subtitle1.Label",x:56,y:26.5,label:"Home.Header.Slider3.Subtitle1.Label",translationKey:"Home.Header.Slider3.Subtitle1.Label"},{id:"Home.Header.Slider3.Subtitle2.Label",x:50,y:28.4,label:"Home.Header.Slider3.Subtitle2.Label",translationKey:"Home.Header.Slider3.Subtitle2.Label"},{id:"Home.Header.Slider3.Button",x:52,y:31.5,label:"Home.Header.Slider3.Button",translationKey:"Home.Header.Slider3.Button",isRedirectionNeeded:!0}]}}}},be=({screenId:l})=>{var S;const t=ge[l],[i,c]=a.useState(null),[u,m]=a.useState(void 0),[g,x]=a.useState(!1),[s,o]=a.useState("Banner1");if(a.useEffect(()=>{c(null),m(void 0),x(!1)},[s,l]),!t)return e.jsxs("div",{className:"text-red-600",children:["No config found for: ",l]});const r=l==="Home"&&(t!=null&&t.homeScreens)?t.homeScreens[s]:t,y=async d=>{};return e.jsxs("div",{children:[l==="Home"&&t.homeScreens&&e.jsx("div",{className:"mb-4 flex gap-2",children:e.jsx(Z,{variant:"pill",className:"p-0",value:s,onClick:()=>c(null),onChange:o,children:e.jsx(ee,{className:"flex flex-col sm:flex-row gap-2",children:Object.keys(t.homeScreens).map(d=>e.jsx(te,{value:d,children:d},d))})})}),e.jsxs("div",{className:"flex gap-4",children:[e.jsxs("div",{className:"relative flex-1 max-w-xl border rounded shadow h-full",children:[e.jsx("img",{src:r.image,alt:l,className:"w-full h-auto block select-none rounded"}),(S=r==null?void 0:r.hotspots)==null?void 0:S.map(d=>e.jsx("div",{className:"absolute flex items-center gap-1",style:{top:`${d.y}%`,left:`${d.x}%`,transform:"translate(-50%, -50%)"},children:e.jsx(_,{className:"text-white bg-red-800 rounded-full p-1 shadow cursor-pointer hover:text-white",size:22,title:`Edit: ${d.label}`,onClick:()=>y()})},`${d.id}`))]}),e.jsx("div",{className:"flex-1 border rounded p-4 shadow h-full",children:i?e.jsx(e.Fragment,{children:g?e.jsx("p",{className:"text-gray-500",children:"Loading translation..."}):e.jsx(U,{categoryId:u,onDrawerClose:()=>c(null),fetchData:()=>{},initialValues:{translationKey:i.translationKey},isBannerNeeded:i==null?void 0:i.isBannerNeeded,isIconNeeded:i==null?void 0:i.isIconNeeded,isRedirectionNeeded:i==null?void 0:i.isRedirectionNeeded})}):e.jsx("div",{className:"text-gray-500 text-center mt-10",children:"📝 Click a pencil icon to edit translation"})})]})]})};G("TranslationData",Q);const et=()=>{const[l,t]=a.useState([]);a.useState(!1),a.useState(!1);const[i,c]=a.useState(!1),[u,m]=a.useState(!1),[g,x]=a.useState(),s=ae("Mobile Screens"),[o,r]=a.useState(null),[y,S]=a.useState(!1),d={edit:s==null?void 0:s.isEdit,delete:s==null?void 0:s.isDelete,view:!1,translation:!0},H=()=>{c(!0)},C=()=>{c(!1)};v();const I=B();h(n=>{var p,b;return(b=(p=n==null?void 0:n.TranslationData)==null?void 0:p.data)==null?void 0:b.loading}),h(n=>{var p,b;return(b=(p=n==null?void 0:n.TranslationData)==null?void 0:p.data)==null?void 0:b.ScreenList}),a.useEffect(()=>{f()},[]);const f=()=>{},[q,W]=a.useState({pageSize:"",pageIndex:""}),O=(n,p)=>{p===V.edit&&(x(n.id),r({name:n==null?void 0:n.screenName,description:n==null?void 0:n.description,screenCode:n==null?void 0:n.screenCode}),m(!0)),p===V.delete&&(I(k(!0)),I(Y(n))),p===V.translation&&(r(n),S(!0))},T=()=>{m(!1),r(null)},R=()=>{S(!1),r(null)},$=[{dataField:"Action",caption:"Action",width:"10%",cellRender:n=>e.jsx("div",{"data-cname":"Action",children:e.jsx(ie,{row:n==null?void 0:n.data,actions:d,buttonClick:O})})},{dataField:"screenName",caption:"Screen Name",width:"30%"},{dataField:"screenCode",caption:"Screen Code",width:"25%"},{dataField:"description",caption:"Description",width:"35%"}];return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[e.jsx(z,{items:[{label:"Settings"},{label:"Mobile Screens"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Mobile Screens"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx(L,{onClick:()=>H(),block:!0,variant:"solid",size:"sm",icon:e.jsx(J,{}),children:"Add Screen"}),e.jsx(N,{title:"Add Screen",isOpen:i,onClose:C,onRequestClose:C,portalClassName:"w30",children:e.jsx(P,{onDrawerClose:C,fetchData:f})}),e.jsx(N,{title:"Edit Screen",isOpen:u,onClose:T,onRequestClose:T,portalClassName:"w30",children:e.jsx(P,{faqId:g,initialData:o,onDrawerClose:T,fetchData:f})})]})]})]}),e.jsx(K,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:e.jsx(K,{className:"borderless",children:e.jsx(ne,{columns:$,tableName:"Screen-table",data:[],height:"calc(100vh - 280px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:l,setSelectedRowId:t,setFilterValues:()=>{},filterValues:[],identity:"Lead-Listing",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"Lead-Listing-table",handleSearch:()=>{},isColumnResizing:!0,pager:q,setPager:W,isPaginationReq:!0})})}),e.jsx(ue,{fetchData:f}),e.jsx(N,{title:"Translate",isOpen:y,onClose:R,onRequestClose:R,portalClassName:"w100",children:o&&e.jsx(be,{screenId:o==null?void 0:o.screenCode})})]})};export{et as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as t}from"./vendor-pdf-3c29882d.js";import{j as e}from"./vendor-mui-98daa63f.js";import{r as s,f as c,u as m}from"./vendor-react-ece1c85f.js";import{Z as g,a7 as x,a8 as u,a9 as _,aa as y,ab as d,ac as b,ad as j,ae as L,af as v,ag as P}from"./index-3b5ce20a.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-devex-4076ffeb.js";import"./vendor-i18n-b89304ef.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";const h=s.lazy(()=>t(()=>import("./index-14c1c1d7.js"),["assets/index-14c1c1d7.js","assets/vendor-mui-98daa63f.js","assets/vendor-react-ece1c85f.js","assets/AdaptableCard-3d1e1f96.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/PageBreadcrumb-cf54a6e9.js","assets/index-d221d69e.js","assets/UserService-1b93ceb0.js","assets/actioncell-6b5ebd6c.js","assets/tableV3-24eed052.js","assets/FileSaver.min-20f3f13a.js","assets/mapView-c8063ed6.js","assets/esm-c40433f8.js","assets/Alert-59d09a99.js","assets/index-7596c6bb.js","assets/useControllableState-d0909575.js","assets/index-a14e51de.js","assets/useDidUpdate-de319a18.js","assets/Drawer-4f97e662.js","assets/FormContainer-9a52b9e8.js","assets/Switcher-e2fba588.js","assets/index-289b3fd9.js","assets/Upload-be937eb6.js","assets/lodash-306e3f66.js","assets/DensitySelector-5d2e901f.js","assets/NoData-4cc4af03.js","assets/UserEdit-1f8208f3.js","assets/DoubleSidedImage-b4bd3915.js","assets/UserForm-e9b56aff.js","assets/index-b0ef7ac3.js","assets/StickyFooter-3e569b80.js","assets/ConfirmDialog-2838a642.js","assets/index.esm-b2d342b5.js","assets/index-fc9f8c4b.js","assets/RoleService-2f9ed883.js","assets/PasswordInput-333c82ca.js","assets/index-88c52b97.js","assets/index-0fd6e996.js","assets/AccountServices-f68f471d.js","assets/ContactService-8afcaeb7.js","assets/index-985cf3f6.js","assets/index-0b08ce18.js","assets/strongPassword-6bc8786f.js","assets/validationPatterns-77446c46.js","assets/UserNew-31fa258f.js"])),k=s.lazy(()=>t(()=>import("./index-058738bc.js"),["assets/index-058738bc.js","assets/vendor-mui-98daa63f.js","assets/vendor-react-ece1c85f.js","assets/index-fc9f8c4b.js","assets/vendor-redux-a1f00e6b.js","assets/RoleService-2f9ed883.js","assets/index-3b5ce20a.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/PageBreadcrumb-cf54a6e9.js","assets/AdaptableCard-3d1e1f96.js","assets/Alert-59d09a99.js","assets/index-7596c6bb.js","assets/useControllableState-d0909575.js","assets/index-a14e51de.js","assets/useDidUpdate-de319a18.js","assets/Drawer-4f97e662.js","assets/FormContainer-9a52b9e8.js","assets/Switcher-e2fba588.js","assets/index-289b3fd9.js","assets/Upload-be937eb6.js","assets/RoleNew-e86a1513.js","assets/RoleForm-47691f91.js","assets/index-b0ef7ac3.js","assets/StickyFooter-3e569b80.js","assets/ConfirmDialog-2838a642.js","assets/index.esm-b2d342b5.js","assets/index-0b08ce18.js","assets/validationPatterns-77446c46.js","assets/RoleEdit-a076ea85.js","assets/DoubleSidedImage-b4bd3915.js","assets/actioncell-6b5ebd6c.js","assets/tableV3-24eed052.js","assets/FileSaver.min-20f3f13a.js","assets/mapView-c8063ed6.js","assets/esm-c40433f8.js","assets/lodash-306e3f66.js","assets/DensitySelector-5d2e901f.js","assets/NoData-4cc4af03.js"])),A=s.lazy(()=>t(()=>import("./index-f4af2342.js"),["assets/index-f4af2342.js","assets/vendor-mui-98daa63f.js","assets/vendor-react-ece1c85f.js","assets/vendor-redux-a1f00e6b.js","assets/index-3b5ce20a.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/ClassicLayout-a9866742.js","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","assets/AdaptableCard-3d1e1f96.js","assets/actioncell-6b5ebd6c.js","assets/MenuNew-79fc95f3.js","assets/DoubleSidedImage-b4bd3915.js","assets/lodash-306e3f66.js","assets/index-659c6412.js","assets/DynamicTablesService-6aa57f52.js","assets/index-b0ef7ac3.js","assets/StickyFooter-3e569b80.js","assets/index.esm-b2d342b5.js","assets/validationPatterns-77446c46.js","assets/index-a733f80b.js","assets/ConfirmDialog-2838a642.js","assets/RoleService-2f9ed883.js"])),E=s.lazy(()=>t(()=>import("./index-211fbe21.js"),["assets/index-211fbe21.js","assets/vendor-mui-98daa63f.js","assets/vendor-react-ece1c85f.js","assets/AdaptableCard-3d1e1f96.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/KeyVaultService-9608f0ff.js","assets/PageBreadcrumb-cf54a6e9.js","assets/Alert-59d09a99.js","assets/index-7596c6bb.js","assets/useControllableState-d0909575.js","assets/index-a14e51de.js","assets/useDidUpdate-de319a18.js","assets/Drawer-4f97e662.js","assets/FormContainer-9a52b9e8.js","assets/Switcher-e2fba588.js","assets/index-289b3fd9.js","assets/Upload-be937eb6.js","assets/actioncell-6b5ebd6c.js","assets/tableV2-99c808c0.js","assets/FileSaver.min-20f3f13a.js","assets/DensitySelector-5d2e901f.js","assets/NoData-4cc4af03.js","assets/tableV2-4baa3f27.css","assets/index-b0ef7ac3.js","assets/StickyFooter-3e569b80.js","assets/ConfirmDialog-2838a642.js","assets/index.esm-b2d342b5.js","assets/index-0b08ce18.js","assets/DoubleSidedImage-b4bd3915.js","assets/index-49016ad0.js","assets/Notify-8fb74d48.js"])),f=s.lazy(()=>t(()=>import("./GeneralSettings-c8c2f051.js"),["assets/GeneralSettings-c8c2f051.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/PageBreadcrumb-cf54a6e9.js","assets/AdaptableCard-3d1e1f96.js","assets/Alert-59d09a99.js","assets/index-7596c6bb.js","assets/useControllableState-d0909575.js","assets/index-a14e51de.js","assets/useDidUpdate-de319a18.js","assets/Drawer-4f97e662.js","assets/FormContainer-9a52b9e8.js","assets/Switcher-e2fba588.js","assets/index-289b3fd9.js","assets/Upload-be937eb6.js","assets/index-0b08ce18.js","assets/OpportunityServices-c4510dd2.js","assets/actioncell-6b5ebd6c.js","assets/MenuTable-f69e0fe4.js","assets/FileSaver.min-20f3f13a.js","assets/DepartmentServices-a53e998b.js","assets/tableV3-24eed052.js","assets/mapView-c8063ed6.js","assets/esm-c40433f8.js","assets/lodash-306e3f66.js","assets/DensitySelector-5d2e901f.js","assets/NoData-4cc4af03.js","assets/LeadSourceService-cf71ea64.js","assets/PreferenceService-d2b3e003.js","assets/BrainServices-4cb93af5.js","assets/ScheduleService-41a88c41.js"])),z=s.lazy(()=>t(()=>import("./index-0d730815.js"),["assets/index-0d730815.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/PageBreadcrumb-cf54a6e9.js","assets/index-289b3fd9.js","assets/useControllableState-d0909575.js","assets/AdaptableCard-3d1e1f96.js","assets/Alert-59d09a99.js","assets/index-7596c6bb.js","assets/index-a14e51de.js","assets/useDidUpdate-de319a18.js","assets/Drawer-4f97e662.js","assets/FormContainer-9a52b9e8.js","assets/Switcher-e2fba588.js","assets/Upload-be937eb6.js","assets/Logo-dd6f7656.js","assets/index.esm-b2d342b5.js","assets/TweaksPanel-bc10bc47.js","assets/index-533fd007.js","assets/FileSaver.min-20f3f13a.js","assets/index-0b08ce18.js","assets/Notify-8fb74d48.js"])),D=s.lazy(()=>t(()=>import("./index-e863817c.js"),["assets/index-e863817c.js","assets/vendor-mui-98daa63f.js","assets/vendor-react-ece1c85f.js","assets/index-359d245d.js","assets/vendor-redux-a1f00e6b.js","assets/index-3b5ce20a.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/PageBreadcrumb-cf54a6e9.js","assets/AdaptableCard-3d1e1f96.js","assets/Alert-59d09a99.js","assets/index-7596c6bb.js","assets/useControllableState-d0909575.js","assets/index-a14e51de.js","assets/useDidUpdate-de319a18.js","assets/Drawer-4f97e662.js","assets/FormContainer-9a52b9e8.js","assets/Switcher-e2fba588.js","assets/index-289b3fd9.js","assets/Upload-be937eb6.js","assets/MenuNew-79fc95f3.js","assets/DoubleSidedImage-b4bd3915.js","assets/lodash-306e3f66.js","assets/index-659c6412.js","assets/DynamicTablesService-6aa57f52.js","assets/index-b0ef7ac3.js","assets/StickyFooter-3e569b80.js","assets/index.esm-b2d342b5.js","assets/index-0b08ce18.js","assets/validationPatterns-77446c46.js","assets/index-a733f80b.js","assets/WidgetLayoutsService-49730609.js","assets/actioncell-6b5ebd6c.js","assets/ConfirmDialog-2838a642.js","assets/MenuTable-f69e0fe4.js","assets/FileSaver.min-20f3f13a.js","assets/Notify-8fb74d48.js"])),I=s.lazy(()=>t(()=>import("./index-b6ef5984.js"),["assets/index-b6ef5984.js","assets/vendor-mui-98daa63f.js","assets/vendor-react-ece1c85f.js","assets/AdaptableCard-3d1e1f96.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/PageBreadcrumb-cf54a6e9.js","assets/Alert-59d09a99.js","assets/index-7596c6bb.js","assets/useControllableState-d0909575.js","assets/index-a14e51de.js","assets/useDidUpdate-de319a18.js","assets/Drawer-4f97e662.js","assets/FormContainer-9a52b9e8.js","assets/Switcher-e2fba588.js","assets/index-289b3fd9.js","assets/Upload-be937eb6.js","assets/actioncell-6b5ebd6c.js","assets/tableV2-99c808c0.js","assets/FileSaver.min-20f3f13a.js","assets/DensitySelector-5d2e901f.js","assets/NoData-4cc4af03.js","assets/tableV2-4baa3f27.css","assets/usePermission-4689548c.js","assets/index-b0ef7ac3.js","assets/StickyFooter-3e569b80.js","assets/ConfirmDialog-2838a642.js","assets/index.esm-b2d342b5.js","assets/index-0b08ce18.js","assets/validationPatterns-77446c46.js"])),R=s.lazy(()=>t(()=>import("./AuditLogsList-ea37686b.js"),["assets/AuditLogsList-ea37686b.js","assets/vendor-mui-98daa63f.js","assets/vendor-react-ece1c85f.js","assets/AdaptableCard-3d1e1f96.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/AccountServices-f68f471d.js","assets/PageBreadcrumb-cf54a6e9.js","assets/Alert-59d09a99.js","assets/index-7596c6bb.js","assets/useControllableState-d0909575.js","assets/index-a14e51de.js","assets/useDidUpdate-de319a18.js","assets/Drawer-4f97e662.js","assets/FormContainer-9a52b9e8.js","assets/Switcher-e2fba588.js","assets/index-289b3fd9.js","assets/Upload-be937eb6.js","assets/index.es-d5c880b3.js","assets/lodash-306e3f66.js","assets/index-d221d69e.js","assets/UserService-1b93ceb0.js","assets/createSvgIcon-aba65987.js","assets/AuditLogsList-412eadd5.css"])),O=s.lazy(()=>t(()=>import("./AiApiLogList-1eac39b7.js"),["assets/AiApiLogList-1eac39b7.js","assets/vendor-mui-98daa63f.js","assets/vendor-react-ece1c85f.js","assets/AdaptableCard-3d1e1f96.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/PageBreadcrumb-cf54a6e9.js","assets/TimeLogService-83166cbc.js","assets/tableV2-99c808c0.js","assets/FileSaver.min-20f3f13a.js","assets/DensitySelector-5d2e901f.js","assets/NoData-4cc4af03.js","assets/tableV2-4baa3f27.css","assets/Drawer-4f97e662.js","assets/Alert-59d09a99.js","assets/index-7596c6bb.js","assets/useControllableState-d0909575.js","assets/index-a14e51de.js","assets/useDidUpdate-de319a18.js","assets/FormContainer-9a52b9e8.js","assets/Switcher-e2fba588.js","assets/index-289b3fd9.js","assets/Upload-be937eb6.js"])),p={users:"/app/settings/user",roles:"/app/settings/role",permissions:"/app/settings/permission",apiKeys:"/app/settings/keyvault",general:"/app/settings/general-settings",branding:"/app/settings/branding",menu:"/app/settings/menu",installApp:"/app/settings/install-app",activityLogs:"/app/settings/activity-logs",aiLogs:"/app/settings/ai-logs"},T=Object.fromEntries(Object.entries(p).map(([o,a])=>[a,o])),V={users:e.jsx(h,{}),roles:e.jsx(k,{}),permissions:e.jsx(A,{}),apiKeys:e.jsx(E,{}),general:e.jsx(f,{}),branding:e.jsx(z,{}),menu:e.jsx(D,{}),installApp:e.jsx(I,{}),activityLogs:e.jsx(R,{}),aiLogs:e.jsx(O,{})},w=[{title:"Security & Access",items:[{key:"users",label:"Users",icon:e.jsx(x,{size:18})},{key:"roles",label:"Roles",icon:e.jsx(u,{size:18})},{key:"permissions",label:"Permissions",icon:e.jsx(_,{size:18})},{key:"apiKeys",label:"API Key Management",icon:e.jsx(y,{size:18})}]},{title:"System Configuration",items:[{key:"general",label:"General Settings",icon:e.jsx(d,{size:18})},{key:"branding",label:"Branding",icon:e.jsx(b,{size:18})},{key:"menu",label:"Menu",icon:e.jsx(j,{size:18})},{key:"installApp",label:"Install App",icon:e.jsx(L,{size:18})}]},{title:"Logs & Monitoring",items:[{key:"activityLogs",label:"Activity Logs",icon:e.jsx(v,{size:18})},{key:"aiLogs",label:"AI Logs",icon:e.jsx(P,{size:18})}]}],$=()=>{const o=c(),{pathname:a}=m(),r=T[a]??"users";return e.jsxs("div",{className:"flex h-full min-h-[calc(100vh-64px)] bg-white",children:[e.jsxs("aside",{className:"w-[240px] flex-shrink-0 border-r border-gray-100 bg-gray-50/60 py-6 overflow-y-auto",children:[e.jsx("div",{className:"px-5 mb-4",children:e.jsx("h1",{className:"text-[15px] font-bold text-gray-800 tracking-wide",children:"Settings"})}),w.map(n=>e.jsxs("div",{className:"mb-5",children:[e.jsx("p",{className:"px-5 mb-1 text-[11px] font-semibold uppercase tracking-widest text-gray-400 select-none",children:n.title}),n.items.map(i=>{const l=r===i.key;return e.jsxs("button",{onClick:()=>o(p[i.key]),className:`w-full flex items-center gap-2.5 px-5 py-2 text-[13px] font-medium text-left transition-colors cursor-pointer border-0 bg-transparent
|
|
2
|
+
${l?"text-custom-600 bg-white border-r-2 border-r-custom-600":"text-gray-600 hover:bg-white hover:text-gray-900"}`,children:[e.jsx("span",{className:l?"text-custom-600":"text-gray-400",children:i.icon}),i.label]},i.key)})]},n.title))]}),e.jsx("main",{className:"flex-1 overflow-y-auto p-8",children:e.jsx(s.Suspense,{fallback:e.jsx(g,{loading:!0}),children:V[r]})})]})};export{$ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./vendor-mui-69397583.js";import{f as ae,r as o}from"./vendor-react-ece1c85f.js";import{H as w,t as U}from"./index-c62ac197.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-b2a5d8b1.js";import"./vendor-devex-33a39e11.js";import"./vendor-i18n-2fcb1983.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-eccea5d1.js";const $=[{num:1,label:"Database",sub:"Pick & connect your DB"},{num:2,label:"Admin User",sub:"Create the first account"},{num:3,label:"Finish",sub:"Review & install"}];function ne({current:i,completed:n,visibleSteps:c}){return e.jsx("div",{className:"flex items-center gap-1",children:c.map((x,m)=>{const u=n.includes(x.num),b=i===x.num,k=m===c.length-1;return e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:`w-7 h-7 rounded-full flex items-center justify-center text-xs font-semibold flex-shrink-0 transition-colors ${u?"bg-green-500 text-white":b?"bg-indigo-600 text-white":"bg-gray-100 text-gray-400"}`,children:u?e.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}):x.num}),e.jsx("span",{className:`text-sm font-medium ${b?"text-gray-900":"text-gray-400"}`,children:x.label})]}),!k&&e.jsx("div",{className:"w-8 h-px bg-gray-200 mx-2"})]},x.num)})})}const ie=[{id:"sqlserver",label:"SQL Server",desc:"Microsoft SQL Server or Azure SQL",icon:e.jsxs("svg",{className:"w-8 h-8",viewBox:"0 0 40 40",fill:"none",children:[e.jsx("rect",{width:"40",height:"40",rx:"8",fill:"#E8F0FE"}),e.jsx("path",{d:"M20 8c-6 0-10 2.5-10 5.5v13C10 29.5 14 32 20 32s10-2.5 10-5.5v-13C30 10.5 26 8 20 8z",fill:"#4285F4",opacity:".15"}),e.jsx("ellipse",{cx:"20",cy:"13.5",rx:"10",ry:"3.5",fill:"#4285F4"}),e.jsx("path",{d:"M10 13.5v5c0 1.93 4 3.5 10 3.5s10-1.57 10-3.5v-5",stroke:"#4285F4",strokeWidth:"1.5",fill:"none"}),e.jsx("path",{d:"M10 18.5v5c0 1.93 4 3.5 10 3.5s10-1.57 10-3.5v-5",stroke:"#4285F4",strokeWidth:"1.5",fill:"none"}),e.jsx("path",{d:"M10 23.5v4c0 1.93 4 3.5 10 3.5s10-1.57 10-3.5v-4",stroke:"#4285F4",strokeWidth:"1.5",fill:"none"})]})},{id:"postgresql",label:"PostgreSQL",desc:"Powerful open-source relational database",icon:e.jsxs("svg",{className:"w-8 h-8",viewBox:"0 0 40 40",fill:"none",children:[e.jsx("rect",{width:"40",height:"40",rx:"8",fill:"#E8F5E9"}),e.jsx("path",{d:"M20 8c-6 0-10 2.5-10 5.5v13C10 29.5 14 32 20 32s10-2.5 10-5.5v-13C30 10.5 26 8 20 8z",fill:"#34A853",opacity:".15"}),e.jsx("ellipse",{cx:"20",cy:"13.5",rx:"10",ry:"3.5",fill:"#34A853"}),e.jsx("path",{d:"M10 13.5v5c0 1.93 4 3.5 10 3.5s10-1.57 10-3.5v-5",stroke:"#34A853",strokeWidth:"1.5",fill:"none"}),e.jsx("path",{d:"M10 18.5v5c0 1.93 4 3.5 10 3.5s10-1.57 10-3.5v-5",stroke:"#34A853",strokeWidth:"1.5",fill:"none"}),e.jsx("path",{d:"M10 23.5v4c0 1.93 4 3.5 10 3.5s10-1.57 10-3.5v-4",stroke:"#34A853",strokeWidth:"1.5",fill:"none"})]})}];function le({option:i,selected:n,onSelect:c}){return e.jsxs("button",{type:"button",onClick:c,className:`relative flex items-center gap-4 p-5 rounded-xl border-2 text-left transition-all ${n?"border-indigo-500 bg-indigo-50 shadow-sm":"border-gray-200 hover:border-indigo-300 bg-white"}`,children:[n&&e.jsx("span",{className:"absolute top-3 right-3 w-5 h-5 bg-indigo-600 rounded-full flex items-center justify-center",children:e.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),i.icon,e.jsxs("div",{children:[e.jsx("span",{className:"block font-semibold text-gray-900 text-sm",children:i.label}),e.jsx("span",{className:"block text-xs text-gray-500 mt-0.5",children:i.desc})]})]})}function M({checked:i,onChange:n}){return e.jsx("button",{type:"button",role:"switch","aria-checked":i,onClick:()=>n(!i),className:`relative w-10 h-6 rounded-full transition-colors flex-shrink-0 ${i?"bg-indigo-600":"bg-gray-200"}`,children:e.jsx("span",{className:`absolute top-0.5 left-0.5 w-5 h-5 bg-white rounded-full shadow transition-transform ${i?"translate-x-4":"translate-x-0"}`})})}function oe({step:i,totalSteps:n}){const c=$.findIndex(u=>u.num===i),x=c>=0?c:0,m=Math.round((x+1)/n*100);return e.jsx("div",{className:"w-full h-1.5 bg-gray-100 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-gradient-to-r from-indigo-500 to-cyan-400 rounded-full transition-all duration-500",style:{width:`${m}%`}})})}function R({children:i}){return e.jsxs("div",{className:"flex items-center gap-3 mt-6 mb-3",children:[e.jsx("span",{className:"text-xs font-semibold text-gray-400 tracking-widest uppercase",children:i}),e.jsx("div",{className:"flex-1 h-px bg-gray-100"})]})}function be(){var E;ae();const n=(((E=window.RUNTIME_CONFIG)==null?void 0:E.VITE_SETUP_MODE)??"manager")==="manager",c=n?$.filter(s=>s.num!==1):$,x=n?2:1,[m,u]=o.useState(x),[b,k]=o.useState([]),[t,p]=o.useState({provider:"sqlserver",trustCert:!0}),[C,j]=o.useState(!1),[A,h]=o.useState(""),[W,d]=o.useState(!1),[Q,S]=o.useState(""),[P,V]=o.useState(!1),[a,v]=o.useState({firstName:"",lastName:"",email:"",password:"",sendUpdates:!1}),[B,H]=o.useState(!1),[g,O]=o.useState({}),[F,_]=o.useState(!0),[y,I]=o.useState(!1),[q,D]=o.useState(""),[G,J]=o.useState(!1),N=`${U.apiBaseUrl}${U.apiPrefix}`;function T(){const s=t.host||"localhost",r=t.database||"xframework";if(t.provider==="sqlserver"){const f=t.port?`${s},${t.port}`:s,z=t.trustCert?"TrustServerCertificate=True":"TrustServerCertificate=False";return t.useWindowsAuth?`Server=${f};Database=${r};Integrated Security=True;${z};MultipleActiveResultSets=True;`:`Server=${f};Database=${r};User Id=${t.username??""};Password=${t.password??""};${z};MultipleActiveResultSets=True;`}const l=t.port||"5432";return`Host=${s};Port=${l};Database=${r};Username=${t.username??""};Password=${t.password??""};`}async function K(){h(""),d(!1);const s=t.provider==="sqlserver"?!t.useWindowsAuth:!0;if(!t.database||s&&!t.username){h("Please fill in all required fields.");return}j(!0);try{const r=T(),l=await w.post(`${N}/v1.0/setup/test-connection`,{provider:t.provider,connectionString:r});l.data.success?(S(r),d(!0)):h(l.data.error??"Connection failed.")}catch{h("Could not reach the API. Is the server running?")}finally{j(!1)}}async function X(){h("");const s=t.provider==="sqlserver"?!t.useWindowsAuth:!0;if(!t.database||s&&!t.username){h("Please fill in all required fields.");return}if(!W){j(!0);try{const r=T(),l=await w.post(`${N}/v1.0/setup/test-connection`,{provider:t.provider,connectionString:r});l.data.success?(S(r),d(!0),L(1)):h(l.data.error??"Connection failed. Fix the error or test again.")}catch{h("Could not reach the API. Is the server running?")}finally{j(!1)}return}L(1)}function Y(){const s={};return a.firstName.trim()||(s.firstName="Required"),a.lastName.trim()||(s.lastName="Required"),(!a.email.trim()||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a.email))&&(s.email="Valid email required"),a.password.length<10&&(s.password="At least 10 characters"),O(s),Object.keys(s).length===0}function Z(){Y()&&L(2)}async function ee(){var s,r;I(!0),D("");try{await w.post(`${N}/v1.0/setup/complete`,{firstName:a.firstName,lastName:a.lastName,email:a.email,password:a.password,sendUpdates:a.sendUpdates,seedDemoData:F,provider:n?"postgresql":t.provider,connectionString:n?"":Q}),J(!0),await new Promise(l=>setTimeout(l,5e3)),await new Promise(l=>{const f=()=>{w.get(`${N}/v1.0/setup/status`,{timeout:3e3}).then(()=>l()).catch(()=>setTimeout(f,5e3))};f()}),window.location.replace("/sign-in")}catch(l){D(((r=(s=l==null?void 0:l.response)==null?void 0:s.data)==null?void 0:r.error)??"Installation failed. Check the server logs.")}finally{I(!1)}}function L(s){k(r=>[...new Set([...r,s])]),u(s+1)}const se=t.provider==="sqlserver"?"1433":"5432",te=t.host?`${t.host}:${t.port||se}/${t.database||"xframework"}`:t.database||"—",re=t.provider==="sqlserver"?"SQL Server":"PostgreSQL";return G?e.jsx("div",{className:"min-h-screen bg-slate-900 flex items-center justify-center",children:e.jsxs("div",{className:"text-center p-12 bg-slate-800 border border-slate-700 rounded-2xl max-w-md w-full mx-4",children:[e.jsx("div",{className:"w-12 h-12 border-[3px] border-slate-700 border-t-indigo-500 rounded-full animate-spin mx-auto mb-6"}),e.jsx("h1",{className:"text-xl font-semibold text-slate-100 mb-2",children:"Setting up your project"}),e.jsxs("p",{className:"text-sm text-slate-400",children:["Applying your configuration and restarting the API.",e.jsx("br",{}),"This will only take a moment."]})]})}):e.jsxs("div",{className:"min-h-screen bg-gray-50 flex flex-col",children:[e.jsxs("header",{className:"bg-white border-b border-gray-100 px-8 py-4 flex items-center justify-between shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 bg-indigo-600 rounded-lg flex items-center justify-center",children:e.jsx("svg",{className:"w-4 h-4 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h7"})})}),e.jsx("p",{className:"font-bold text-gray-900",children:"xFramework"}),e.jsx("span",{className:"text-xs text-gray-400",children:"Setup Wizard"})]}),e.jsx(ne,{current:m,completed:b,visibleSteps:c}),e.jsx("p",{className:"text-xs text-gray-400 font-semibold tracking-widest uppercase",children:"xFramework V1.0"})]}),e.jsx(oe,{step:m,totalSteps:c.length}),e.jsx("main",{className:"flex-1 overflow-y-auto",children:e.jsxs("div",{className:"max-w-2xl mx-auto px-6 py-10",children:[m===1&&e.jsxs("div",{className:"mt-8",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Database Configuration"}),e.jsx("p",{className:"text-gray-500 mt-1 text-sm",children:"Choose your database engine and enter the connection details."}),e.jsx("div",{className:"grid grid-cols-2 gap-3 mt-6",children:ie.map(s=>e.jsx(le,{option:s,selected:t.provider===s.id,onSelect:()=>{p({provider:s.id,trustCert:!0}),S(""),d(!1),h("")}},s.id))}),e.jsx(R,{children:"Connection"}),e.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[e.jsxs("div",{className:"col-span-2",children:[e.jsx("label",{className:"block text-xs font-medium text-gray-500 mb-1",children:"Server address"}),e.jsxs("div",{className:"flex items-center border border-gray-200 rounded-lg px-3 py-2.5 bg-white focus-within:border-indigo-400 transition-colors",children:[e.jsxs("svg",{className:"w-4 h-4 text-gray-400 mr-2 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M12 5l7 7-7 7"}),e.jsx("rect",{x:"2",y:"7",width:"20",height:"10",rx:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),e.jsx("input",{type:"text",placeholder:"localhost",value:t.host??"",onChange:s=>{p(r=>({...r,host:s.target.value})),d(!1)},className:"flex-1 outline-none text-sm text-gray-900 bg-transparent"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-500 mb-1",children:"Port"}),e.jsx("input",{type:"text",placeholder:"auto",value:t.port??"",onChange:s=>{p(r=>({...r,port:s.target.value})),d(!1)},className:"w-full border border-gray-200 rounded-lg px-3 py-2.5 text-sm outline-none focus:border-indigo-400 transition-colors bg-white"})]}),e.jsxs("div",{className:"col-span-3",children:[e.jsxs("label",{className:"block text-xs font-medium text-gray-500 mb-1",children:["Database name ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsxs("div",{className:"flex items-center border border-gray-200 rounded-lg px-3 py-2.5 bg-white focus-within:border-indigo-400 transition-colors",children:[e.jsxs("svg",{className:"w-4 h-4 text-gray-400 mr-2 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:[e.jsx("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),e.jsx("path",{d:"M3 5v14c0 1.66 4.03 3 9 3s9-1.34 9-3V5"}),e.jsx("path",{d:"M3 12c0 1.66 4.03 3 9 3s9-1.34 9-3"})]}),e.jsx("input",{type:"text",placeholder:"xframework",value:t.database??"",onChange:s=>{p(r=>({...r,database:s.target.value})),d(!1)},className:"flex-1 outline-none text-sm text-gray-900 bg-transparent"})]})]})]}),e.jsx(R,{children:"Credentials"}),e.jsxs("div",{className:"flex flex-col gap-3",children:[t.provider==="sqlserver"&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(M,{checked:!!t.useWindowsAuth,onChange:s=>{p(r=>({...r,useWindowsAuth:s})),d(!1)}}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-700 font-medium",children:"Use integrated authentication (Windows)"}),e.jsx("p",{className:"text-xs text-gray-400",children:"Uses the current Windows user — no username or password needed"})]})]}),!t.useWindowsAuth&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-xs font-medium text-gray-500 mb-1",children:["Username ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsxs("div",{className:"flex items-center border border-gray-200 rounded-lg px-3 py-2.5 bg-white focus-within:border-indigo-400 transition-colors",children:[e.jsx("svg",{className:"w-4 h-4 text-gray-400 mr-2 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.5 20.25a8.25 8.25 0 0115 0"})}),e.jsx("input",{type:"text",placeholder:t.provider==="sqlserver"?"sa":"postgres",value:t.username??"",onChange:s=>{p(r=>({...r,username:s.target.value})),d(!1)},className:"flex-1 outline-none text-sm text-gray-900 bg-transparent"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-500 mb-1",children:"Password"}),e.jsxs("div",{className:"flex items-center border border-gray-200 rounded-lg px-3 py-2.5 bg-white focus-within:border-indigo-400 transition-colors",children:[e.jsx("svg",{className:"w-4 h-4 text-gray-400 mr-2 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V7.875C16.5 5.182 14.318 3 11.625 3S6.75 5.182 6.75 7.875V10.5m-2.25 0h13.5a1.5 1.5 0 011.5 1.5v7.5a1.5 1.5 0 01-1.5 1.5H4.5a1.5 1.5 0 01-1.5-1.5v-7.5a1.5 1.5 0 011.5-1.5z"})}),e.jsx("input",{type:P?"text":"password",placeholder:"••••••••",value:t.password??"",onChange:s=>{p(r=>({...r,password:s.target.value})),d(!1)},className:"flex-1 outline-none text-sm text-gray-900 bg-transparent"}),e.jsx("button",{type:"button",onClick:()=>V(s=>!s),className:"text-gray-400 hover:text-gray-600 ml-2",tabIndex:-1,children:P?e.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"})}):e.jsxs("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})})]})]})]}),t.provider==="sqlserver"&&e.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[e.jsx(M,{checked:!!t.trustCert,onChange:s=>{p(r=>({...r,trustCert:s})),d(!1)}}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-700 font-medium",children:"Trust the database certificate"}),e.jsx("p",{className:"text-xs text-gray-400",children:"Required for local SQL Server without a signed SSL certificate"})]})]})]}),A&&e.jsxs("div",{className:"mt-4 flex items-start gap-2 text-sm text-red-600 bg-red-50 border border-red-100 rounded-lg px-3 py-2.5",children:[e.jsx("svg",{className:"w-4 h-4 flex-shrink-0 mt-0.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 3h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"})}),A]}),W&&e.jsxs("div",{className:"mt-4 flex items-center gap-2 text-sm text-green-700 bg-green-50 border border-green-100 rounded-lg px-3 py-2.5",children:[e.jsx("svg",{className:"w-4 h-4 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),"Connection successful"]}),e.jsxs("div",{className:"mt-8 flex items-center justify-between",children:[e.jsx("button",{type:"button",onClick:K,disabled:C,className:"px-5 py-2.5 border border-gray-200 text-gray-600 text-sm font-medium rounded-lg hover:bg-gray-50 disabled:opacity-60 transition-colors flex items-center gap-2",children:C?e.jsxs(e.Fragment,{children:[e.jsxs("svg",{className:"animate-spin w-4 h-4",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8H4z"})]}),"Testing…"]}):e.jsxs(e.Fragment,{children:[e.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.348a1.125 1.125 0 010 1.971l-11.54 6.347a1.125 1.125 0 01-1.667-.985V5.653z"})}),"Test connection"]})}),e.jsx("button",{onClick:X,disabled:C,className:"px-6 py-2.5 bg-indigo-600 text-white text-sm font-medium rounded-lg hover:bg-indigo-700 disabled:opacity-60 transition-colors",children:"Continue ›"})]})]}),m===2&&e.jsxs("div",{className:"mt-8",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Create your admin account"}),e.jsx("p",{className:"text-gray-500 mt-1 text-sm",children:"This will be the first user of your xFramework install with full administrative access."}),e.jsxs("div",{className:"mt-6 grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["First name ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",placeholder:"Ada",value:a.firstName,onChange:s=>v(r=>({...r,firstName:s.target.value})),className:"w-full border border-gray-200 rounded-lg px-3 py-2.5 text-sm outline-none focus:border-indigo-400"}),g.firstName&&e.jsx("p",{className:"text-xs text-red-500 mt-1",children:g.firstName})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Last name ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",placeholder:"Lovelace",value:a.lastName,onChange:s=>v(r=>({...r,lastName:s.target.value})),className:"w-full border border-gray-200 rounded-lg px-3 py-2.5 text-sm outline-none focus:border-indigo-400"}),g.lastName&&e.jsx("p",{className:"text-xs text-red-500 mt-1",children:g.lastName})]}),e.jsxs("div",{className:"col-span-2",children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Email address ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs("div",{className:"flex items-center border border-gray-200 rounded-lg px-3 py-2.5 bg-white focus-within:border-indigo-400",children:[e.jsx("span",{className:"text-gray-400 mr-2 text-sm",children:"✉"}),e.jsx("input",{type:"email",placeholder:"you@company.com",value:a.email,onChange:s=>v(r=>({...r,email:s.target.value})),className:"flex-1 outline-none text-sm text-gray-900"})]}),g.email&&e.jsx("p",{className:"text-xs text-red-500 mt-1",children:g.email})]}),e.jsxs("div",{className:"col-span-2",children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Password ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs("div",{className:"flex items-center border border-gray-200 rounded-lg px-3 py-2.5 bg-white focus-within:border-indigo-400",children:[e.jsx("span",{className:"text-gray-400 mr-2 text-sm",children:"🔒"}),e.jsx("input",{type:B?"text":"password",placeholder:"At least 10 characters",value:a.password,onChange:s=>v(r=>({...r,password:s.target.value})),className:"flex-1 outline-none text-sm text-gray-900"}),e.jsx("button",{type:"button",onClick:()=>H(s=>!s),className:"text-gray-400 hover:text-gray-600 text-xs ml-2",children:B?"Hide":"Show"})]}),e.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Use 10+ chars with a mix of cases, numbers, and symbols."}),g.password&&e.jsx("p",{className:"text-xs text-red-500 mt-1",children:g.password})]})]}),e.jsxs("div",{className:"mt-8 flex justify-between",children:[!n&&e.jsx("button",{onClick:()=>u(1),className:"px-6 py-2.5 border border-gray-200 text-gray-600 text-sm font-medium rounded-lg hover:bg-gray-50 transition-colors",children:"← Back"}),e.jsx("button",{onClick:Z,className:`px-6 py-2.5 bg-indigo-600 text-white text-sm font-medium rounded-lg hover:bg-indigo-700 transition-colors ${n?"ml-auto":""}`,children:"Continue ›"})]})]}),m===3&&e.jsxs("div",{className:"mt-8",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Review & install"}),e.jsx("p",{className:"text-gray-500 mt-1 text-sm",children:"Looks good? Hit install — we'll provision the schema, seed defaults, and hand you the keys."}),e.jsx("div",{className:"mt-6 bg-white border border-gray-100 rounded-xl p-6 divide-y divide-gray-50 shadow-sm",children:[["Database",n?"PostgreSQL (embedded)":re],["Connection",n?"localhost (managed)":te],["Admin user",a.firstName&&a.lastName?`${a.firstName} ${a.lastName}`:"—"],["Admin email",a.email||"—"],["Version","xFramework v1.0.0"]].map(([s,r])=>e.jsxs("div",{className:"flex py-3 first:pt-0 last:pb-0",children:[e.jsx("span",{className:"text-sm text-gray-400 w-36 flex-shrink-0",children:s}),e.jsx("span",{className:"text-sm font-semibold text-gray-900",children:r})]},s))}),e.jsxs("div",{className:"mt-4 flex items-center gap-3",children:[e.jsx(M,{checked:F,onChange:_}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-700",children:"Seed demo data"}),e.jsx("p",{className:"text-xs text-gray-400",children:"Loads sample users, CRM records and opportunities so you can explore the app straight away."})]})]}),q&&e.jsx("p",{className:"mt-4 text-sm text-red-500 bg-red-50 border border-red-100 rounded-lg p-3",children:q}),e.jsxs("div",{className:"mt-8 flex justify-between",children:[e.jsx("button",{onClick:()=>u(2),disabled:y,className:"px-6 py-2.5 border border-gray-200 text-gray-600 text-sm font-medium rounded-lg hover:bg-gray-50 transition-colors disabled:opacity-60",children:"← Back"}),e.jsxs("button",{onClick:ee,disabled:y,className:"px-8 py-2.5 bg-indigo-600 text-white text-sm font-semibold rounded-lg hover:bg-indigo-700 disabled:opacity-60 transition-colors flex items-center gap-2",children:[y&&e.jsxs("svg",{className:"animate-spin w-4 h-4",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8H4z"})]}),y?"Installing…":"Install xFramework"]})]})]})]})})]})}export{be as default};
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{f as ae,r as o}from"./vendor-react-ece1c85f.js";import{I as w,U as z}from"./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 $=[{num:1,label:"Database",sub:"Pick & connect your DB"},{num:2,label:"Admin User",sub:"Create the first account"},{num:3,label:"Finish",sub:"Review & install"}];function ne({current:i,completed:n,visibleSteps:c}){return e.jsx("div",{className:"flex items-center gap-1",children:c.map((x,m)=>{const u=n.includes(x.num),b=i===x.num,k=m===c.length-1;return e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:`w-7 h-7 rounded-full flex items-center justify-center text-xs font-semibold flex-shrink-0 transition-colors ${u?"bg-green-500 text-white":b?"bg-indigo-600 text-white":"bg-gray-100 text-gray-400"}`,children:u?e.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}):x.num}),e.jsx("span",{className:`text-sm font-medium ${b?"text-gray-900":"text-gray-400"}`,children:x.label})]}),!k&&e.jsx("div",{className:"w-8 h-px bg-gray-200 mx-2"})]},x.num)})})}const ie=[{id:"sqlserver",label:"SQL Server",desc:"Microsoft SQL Server or Azure SQL",icon:e.jsxs("svg",{className:"w-8 h-8",viewBox:"0 0 40 40",fill:"none",children:[e.jsx("rect",{width:"40",height:"40",rx:"8",fill:"#E8F0FE"}),e.jsx("path",{d:"M20 8c-6 0-10 2.5-10 5.5v13C10 29.5 14 32 20 32s10-2.5 10-5.5v-13C30 10.5 26 8 20 8z",fill:"#4285F4",opacity:".15"}),e.jsx("ellipse",{cx:"20",cy:"13.5",rx:"10",ry:"3.5",fill:"#4285F4"}),e.jsx("path",{d:"M10 13.5v5c0 1.93 4 3.5 10 3.5s10-1.57 10-3.5v-5",stroke:"#4285F4",strokeWidth:"1.5",fill:"none"}),e.jsx("path",{d:"M10 18.5v5c0 1.93 4 3.5 10 3.5s10-1.57 10-3.5v-5",stroke:"#4285F4",strokeWidth:"1.5",fill:"none"}),e.jsx("path",{d:"M10 23.5v4c0 1.93 4 3.5 10 3.5s10-1.57 10-3.5v-4",stroke:"#4285F4",strokeWidth:"1.5",fill:"none"})]})},{id:"postgresql",label:"PostgreSQL",desc:"Powerful open-source relational database",icon:e.jsxs("svg",{className:"w-8 h-8",viewBox:"0 0 40 40",fill:"none",children:[e.jsx("rect",{width:"40",height:"40",rx:"8",fill:"#E8F5E9"}),e.jsx("path",{d:"M20 8c-6 0-10 2.5-10 5.5v13C10 29.5 14 32 20 32s10-2.5 10-5.5v-13C30 10.5 26 8 20 8z",fill:"#34A853",opacity:".15"}),e.jsx("ellipse",{cx:"20",cy:"13.5",rx:"10",ry:"3.5",fill:"#34A853"}),e.jsx("path",{d:"M10 13.5v5c0 1.93 4 3.5 10 3.5s10-1.57 10-3.5v-5",stroke:"#34A853",strokeWidth:"1.5",fill:"none"}),e.jsx("path",{d:"M10 18.5v5c0 1.93 4 3.5 10 3.5s10-1.57 10-3.5v-5",stroke:"#34A853",strokeWidth:"1.5",fill:"none"}),e.jsx("path",{d:"M10 23.5v4c0 1.93 4 3.5 10 3.5s10-1.57 10-3.5v-4",stroke:"#34A853",strokeWidth:"1.5",fill:"none"})]})}];function le({option:i,selected:n,onSelect:c}){return e.jsxs("button",{type:"button",onClick:c,className:`relative flex items-center gap-4 p-5 rounded-xl border-2 text-left transition-all ${n?"border-indigo-500 bg-indigo-50 shadow-sm":"border-gray-200 hover:border-indigo-300 bg-white"}`,children:[n&&e.jsx("span",{className:"absolute top-3 right-3 w-5 h-5 bg-indigo-600 rounded-full flex items-center justify-center",children:e.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),i.icon,e.jsxs("div",{children:[e.jsx("span",{className:"block font-semibold text-gray-900 text-sm",children:i.label}),e.jsx("span",{className:"block text-xs text-gray-500 mt-0.5",children:i.desc})]})]})}function M({checked:i,onChange:n}){return e.jsx("button",{type:"button",role:"switch","aria-checked":i,onClick:()=>n(!i),className:`relative w-10 h-6 rounded-full transition-colors flex-shrink-0 ${i?"bg-indigo-600":"bg-gray-200"}`,children:e.jsx("span",{className:`absolute top-0.5 left-0.5 w-5 h-5 bg-white rounded-full shadow transition-transform ${i?"translate-x-4":"translate-x-0"}`})})}function oe({step:i,totalSteps:n}){const c=$.findIndex(u=>u.num===i),x=c>=0?c:0,m=Math.round((x+1)/n*100);return e.jsx("div",{className:"w-full h-1.5 bg-gray-100 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-gradient-to-r from-indigo-500 to-cyan-400 rounded-full transition-all duration-500",style:{width:`${m}%`}})})}function R({children:i}){return e.jsxs("div",{className:"flex items-center gap-3 mt-6 mb-3",children:[e.jsx("span",{className:"text-xs font-semibold text-gray-400 tracking-widest uppercase",children:i}),e.jsx("div",{className:"flex-1 h-px bg-gray-100"})]})}function be(){var E;ae();const n=(((E=window.RUNTIME_CONFIG)==null?void 0:E.VITE_SETUP_MODE)??"manager")==="manager",c=n?$.filter(s=>s.num!==1):$,x=n?2:1,[m,u]=o.useState(x),[b,k]=o.useState([]),[t,p]=o.useState({provider:"sqlserver",trustCert:!0}),[C,j]=o.useState(!1),[A,h]=o.useState(""),[W,d]=o.useState(!1),[Q,S]=o.useState(""),[P,V]=o.useState(!1),[a,v]=o.useState({firstName:"",lastName:"",email:"",password:"",sendUpdates:!1}),[B,H]=o.useState(!1),[g,O]=o.useState({}),[F,_]=o.useState(!0),[y,I]=o.useState(!1),[q,D]=o.useState(""),[G,J]=o.useState(!1),N=`${z.apiBaseUrl}${z.apiPrefix}`;function T(){const s=t.host||"localhost",r=t.database||"xframework";if(t.provider==="sqlserver"){const f=t.port?`${s},${t.port}`:s,U=t.trustCert?"TrustServerCertificate=True":"TrustServerCertificate=False";return t.useWindowsAuth?`Server=${f};Database=${r};Integrated Security=True;${U};MultipleActiveResultSets=True;`:`Server=${f};Database=${r};User Id=${t.username??""};Password=${t.password??""};${U};MultipleActiveResultSets=True;`}const l=t.port||"5432";return`Host=${s};Port=${l};Database=${r};Username=${t.username??""};Password=${t.password??""};`}async function K(){h(""),d(!1);const s=t.provider==="sqlserver"?!t.useWindowsAuth:!0;if(!t.database||s&&!t.username){h("Please fill in all required fields.");return}j(!0);try{const r=T(),l=await w.post(`${N}/v1.0/setup/test-connection`,{provider:t.provider,connectionString:r});l.data.success?(S(r),d(!0)):h(l.data.error??"Connection failed.")}catch{h("Could not reach the API. Is the server running?")}finally{j(!1)}}async function X(){h("");const s=t.provider==="sqlserver"?!t.useWindowsAuth:!0;if(!t.database||s&&!t.username){h("Please fill in all required fields.");return}if(!W){j(!0);try{const r=T(),l=await w.post(`${N}/v1.0/setup/test-connection`,{provider:t.provider,connectionString:r});l.data.success?(S(r),d(!0),L(1)):h(l.data.error??"Connection failed. Fix the error or test again.")}catch{h("Could not reach the API. Is the server running?")}finally{j(!1)}return}L(1)}function Y(){const s={};return a.firstName.trim()||(s.firstName="Required"),a.lastName.trim()||(s.lastName="Required"),(!a.email.trim()||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a.email))&&(s.email="Valid email required"),a.password.length<10&&(s.password="At least 10 characters"),O(s),Object.keys(s).length===0}function Z(){Y()&&L(2)}async function ee(){var s,r;I(!0),D("");try{await w.post(`${N}/v1.0/setup/complete`,{firstName:a.firstName,lastName:a.lastName,email:a.email,password:a.password,sendUpdates:a.sendUpdates,seedDemoData:F,provider:n?"postgresql":t.provider,connectionString:n?"":Q}),J(!0),await new Promise(l=>setTimeout(l,5e3)),await new Promise(l=>{const f=()=>{w.get(`${N}/v1.0/setup/status`,{timeout:3e3}).then(()=>l()).catch(()=>setTimeout(f,5e3))};f()}),window.location.replace("/sign-in")}catch(l){D(((r=(s=l==null?void 0:l.response)==null?void 0:s.data)==null?void 0:r.error)??"Installation failed. Check the server logs.")}finally{I(!1)}}function L(s){k(r=>[...new Set([...r,s])]),u(s+1)}const se=t.provider==="sqlserver"?"1433":"5432",te=t.host?`${t.host}:${t.port||se}/${t.database||"xframework"}`:t.database||"—",re=t.provider==="sqlserver"?"SQL Server":"PostgreSQL";return G?e.jsx("div",{className:"min-h-screen bg-slate-900 flex items-center justify-center",children:e.jsxs("div",{className:"text-center p-12 bg-slate-800 border border-slate-700 rounded-2xl max-w-md w-full mx-4",children:[e.jsx("div",{className:"w-12 h-12 border-[3px] border-slate-700 border-t-indigo-500 rounded-full animate-spin mx-auto mb-6"}),e.jsx("h1",{className:"text-xl font-semibold text-slate-100 mb-2",children:"Setting up your project"}),e.jsxs("p",{className:"text-sm text-slate-400",children:["Applying your configuration and restarting the API.",e.jsx("br",{}),"This will only take a moment."]})]})}):e.jsxs("div",{className:"min-h-screen bg-gray-50 flex flex-col",children:[e.jsxs("header",{className:"bg-white border-b border-gray-100 px-8 py-4 flex items-center justify-between shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 bg-indigo-600 rounded-lg flex items-center justify-center",children:e.jsx("svg",{className:"w-4 h-4 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h7"})})}),e.jsx("p",{className:"font-bold text-gray-900",children:"xFramework"}),e.jsx("span",{className:"text-xs text-gray-400",children:"Setup Wizard"})]}),e.jsx(ne,{current:m,completed:b,visibleSteps:c}),e.jsx("p",{className:"text-xs text-gray-400 font-semibold tracking-widest uppercase",children:"xFramework V1.0"})]}),e.jsx(oe,{step:m,totalSteps:c.length}),e.jsx("main",{className:"flex-1 overflow-y-auto",children:e.jsxs("div",{className:"max-w-2xl mx-auto px-6 py-10",children:[m===1&&e.jsxs("div",{className:"mt-8",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Database Configuration"}),e.jsx("p",{className:"text-gray-500 mt-1 text-sm",children:"Choose your database engine and enter the connection details."}),e.jsx("div",{className:"grid grid-cols-2 gap-3 mt-6",children:ie.map(s=>e.jsx(le,{option:s,selected:t.provider===s.id,onSelect:()=>{p({provider:s.id,trustCert:!0}),S(""),d(!1),h("")}},s.id))}),e.jsx(R,{children:"Connection"}),e.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[e.jsxs("div",{className:"col-span-2",children:[e.jsx("label",{className:"block text-xs font-medium text-gray-500 mb-1",children:"Server address"}),e.jsxs("div",{className:"flex items-center border border-gray-200 rounded-lg px-3 py-2.5 bg-white focus-within:border-indigo-400 transition-colors",children:[e.jsxs("svg",{className:"w-4 h-4 text-gray-400 mr-2 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M12 5l7 7-7 7"}),e.jsx("rect",{x:"2",y:"7",width:"20",height:"10",rx:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),e.jsx("input",{type:"text",placeholder:"localhost",value:t.host??"",onChange:s=>{p(r=>({...r,host:s.target.value})),d(!1)},className:"flex-1 outline-none text-sm text-gray-900 bg-transparent"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-500 mb-1",children:"Port"}),e.jsx("input",{type:"text",placeholder:"auto",value:t.port??"",onChange:s=>{p(r=>({...r,port:s.target.value})),d(!1)},className:"w-full border border-gray-200 rounded-lg px-3 py-2.5 text-sm outline-none focus:border-indigo-400 transition-colors bg-white"})]}),e.jsxs("div",{className:"col-span-3",children:[e.jsxs("label",{className:"block text-xs font-medium text-gray-500 mb-1",children:["Database name ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsxs("div",{className:"flex items-center border border-gray-200 rounded-lg px-3 py-2.5 bg-white focus-within:border-indigo-400 transition-colors",children:[e.jsxs("svg",{className:"w-4 h-4 text-gray-400 mr-2 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:[e.jsx("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),e.jsx("path",{d:"M3 5v14c0 1.66 4.03 3 9 3s9-1.34 9-3V5"}),e.jsx("path",{d:"M3 12c0 1.66 4.03 3 9 3s9-1.34 9-3"})]}),e.jsx("input",{type:"text",placeholder:"xframework",value:t.database??"",onChange:s=>{p(r=>({...r,database:s.target.value})),d(!1)},className:"flex-1 outline-none text-sm text-gray-900 bg-transparent"})]})]})]}),e.jsx(R,{children:"Credentials"}),e.jsxs("div",{className:"flex flex-col gap-3",children:[t.provider==="sqlserver"&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(M,{checked:!!t.useWindowsAuth,onChange:s=>{p(r=>({...r,useWindowsAuth:s})),d(!1)}}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-700 font-medium",children:"Use integrated authentication (Windows)"}),e.jsx("p",{className:"text-xs text-gray-400",children:"Uses the current Windows user — no username or password needed"})]})]}),!t.useWindowsAuth&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-xs font-medium text-gray-500 mb-1",children:["Username ",e.jsx("span",{className:"text-red-400",children:"*"})]}),e.jsxs("div",{className:"flex items-center border border-gray-200 rounded-lg px-3 py-2.5 bg-white focus-within:border-indigo-400 transition-colors",children:[e.jsx("svg",{className:"w-4 h-4 text-gray-400 mr-2 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.5 20.25a8.25 8.25 0 0115 0"})}),e.jsx("input",{type:"text",placeholder:t.provider==="sqlserver"?"sa":"postgres",value:t.username??"",onChange:s=>{p(r=>({...r,username:s.target.value})),d(!1)},className:"flex-1 outline-none text-sm text-gray-900 bg-transparent"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-500 mb-1",children:"Password"}),e.jsxs("div",{className:"flex items-center border border-gray-200 rounded-lg px-3 py-2.5 bg-white focus-within:border-indigo-400 transition-colors",children:[e.jsx("svg",{className:"w-4 h-4 text-gray-400 mr-2 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V7.875C16.5 5.182 14.318 3 11.625 3S6.75 5.182 6.75 7.875V10.5m-2.25 0h13.5a1.5 1.5 0 011.5 1.5v7.5a1.5 1.5 0 01-1.5 1.5H4.5a1.5 1.5 0 01-1.5-1.5v-7.5a1.5 1.5 0 011.5-1.5z"})}),e.jsx("input",{type:P?"text":"password",placeholder:"••••••••",value:t.password??"",onChange:s=>{p(r=>({...r,password:s.target.value})),d(!1)},className:"flex-1 outline-none text-sm text-gray-900 bg-transparent"}),e.jsx("button",{type:"button",onClick:()=>V(s=>!s),className:"text-gray-400 hover:text-gray-600 ml-2",tabIndex:-1,children:P?e.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"})}):e.jsxs("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})})]})]})]}),t.provider==="sqlserver"&&e.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[e.jsx(M,{checked:!!t.trustCert,onChange:s=>{p(r=>({...r,trustCert:s})),d(!1)}}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-700 font-medium",children:"Trust the database certificate"}),e.jsx("p",{className:"text-xs text-gray-400",children:"Required for local SQL Server without a signed SSL certificate"})]})]})]}),A&&e.jsxs("div",{className:"mt-4 flex items-start gap-2 text-sm text-red-600 bg-red-50 border border-red-100 rounded-lg px-3 py-2.5",children:[e.jsx("svg",{className:"w-4 h-4 flex-shrink-0 mt-0.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 3h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"})}),A]}),W&&e.jsxs("div",{className:"mt-4 flex items-center gap-2 text-sm text-green-700 bg-green-50 border border-green-100 rounded-lg px-3 py-2.5",children:[e.jsx("svg",{className:"w-4 h-4 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),"Connection successful"]}),e.jsxs("div",{className:"mt-8 flex items-center justify-between",children:[e.jsx("button",{type:"button",onClick:K,disabled:C,className:"px-5 py-2.5 border border-gray-200 text-gray-600 text-sm font-medium rounded-lg hover:bg-gray-50 disabled:opacity-60 transition-colors flex items-center gap-2",children:C?e.jsxs(e.Fragment,{children:[e.jsxs("svg",{className:"animate-spin w-4 h-4",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8H4z"})]}),"Testing…"]}):e.jsxs(e.Fragment,{children:[e.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.348a1.125 1.125 0 010 1.971l-11.54 6.347a1.125 1.125 0 01-1.667-.985V5.653z"})}),"Test connection"]})}),e.jsx("button",{onClick:X,disabled:C,className:"px-6 py-2.5 bg-indigo-600 text-white text-sm font-medium rounded-lg hover:bg-indigo-700 disabled:opacity-60 transition-colors",children:"Continue ›"})]})]}),m===2&&e.jsxs("div",{className:"mt-8",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Create your admin account"}),e.jsx("p",{className:"text-gray-500 mt-1 text-sm",children:"This will be the first user of your xFramework install with full administrative access."}),e.jsxs("div",{className:"mt-6 grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["First name ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",placeholder:"Ada",value:a.firstName,onChange:s=>v(r=>({...r,firstName:s.target.value})),className:"w-full border border-gray-200 rounded-lg px-3 py-2.5 text-sm outline-none focus:border-indigo-400"}),g.firstName&&e.jsx("p",{className:"text-xs text-red-500 mt-1",children:g.firstName})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Last name ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",placeholder:"Lovelace",value:a.lastName,onChange:s=>v(r=>({...r,lastName:s.target.value})),className:"w-full border border-gray-200 rounded-lg px-3 py-2.5 text-sm outline-none focus:border-indigo-400"}),g.lastName&&e.jsx("p",{className:"text-xs text-red-500 mt-1",children:g.lastName})]}),e.jsxs("div",{className:"col-span-2",children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Email address ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs("div",{className:"flex items-center border border-gray-200 rounded-lg px-3 py-2.5 bg-white focus-within:border-indigo-400",children:[e.jsx("span",{className:"text-gray-400 mr-2 text-sm",children:"✉"}),e.jsx("input",{type:"email",placeholder:"you@company.com",value:a.email,onChange:s=>v(r=>({...r,email:s.target.value})),className:"flex-1 outline-none text-sm text-gray-900"})]}),g.email&&e.jsx("p",{className:"text-xs text-red-500 mt-1",children:g.email})]}),e.jsxs("div",{className:"col-span-2",children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Password ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs("div",{className:"flex items-center border border-gray-200 rounded-lg px-3 py-2.5 bg-white focus-within:border-indigo-400",children:[e.jsx("span",{className:"text-gray-400 mr-2 text-sm",children:"🔒"}),e.jsx("input",{type:B?"text":"password",placeholder:"At least 10 characters",value:a.password,onChange:s=>v(r=>({...r,password:s.target.value})),className:"flex-1 outline-none text-sm text-gray-900"}),e.jsx("button",{type:"button",onClick:()=>H(s=>!s),className:"text-gray-400 hover:text-gray-600 text-xs ml-2",children:B?"Hide":"Show"})]}),e.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Use 10+ chars with a mix of cases, numbers, and symbols."}),g.password&&e.jsx("p",{className:"text-xs text-red-500 mt-1",children:g.password})]})]}),e.jsxs("div",{className:"mt-8 flex justify-between",children:[!n&&e.jsx("button",{onClick:()=>u(1),className:"px-6 py-2.5 border border-gray-200 text-gray-600 text-sm font-medium rounded-lg hover:bg-gray-50 transition-colors",children:"← Back"}),e.jsx("button",{onClick:Z,className:`px-6 py-2.5 bg-indigo-600 text-white text-sm font-medium rounded-lg hover:bg-indigo-700 transition-colors ${n?"ml-auto":""}`,children:"Continue ›"})]})]}),m===3&&e.jsxs("div",{className:"mt-8",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Review & install"}),e.jsx("p",{className:"text-gray-500 mt-1 text-sm",children:"Looks good? Hit install — we'll provision the schema, seed defaults, and hand you the keys."}),e.jsx("div",{className:"mt-6 bg-white border border-gray-100 rounded-xl p-6 divide-y divide-gray-50 shadow-sm",children:[["Database",n?"PostgreSQL (embedded)":re],["Connection",n?"localhost (managed)":te],["Admin user",a.firstName&&a.lastName?`${a.firstName} ${a.lastName}`:"—"],["Admin email",a.email||"—"],["Version","xFramework v1.0.0"]].map(([s,r])=>e.jsxs("div",{className:"flex py-3 first:pt-0 last:pb-0",children:[e.jsx("span",{className:"text-sm text-gray-400 w-36 flex-shrink-0",children:s}),e.jsx("span",{className:"text-sm font-semibold text-gray-900",children:r})]},s))}),e.jsxs("div",{className:"mt-4 flex items-center gap-3",children:[e.jsx(M,{checked:F,onChange:_}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-700",children:"Seed demo data"}),e.jsx("p",{className:"text-xs text-gray-400",children:"Loads sample users, CRM records and opportunities so you can explore the app straight away."})]})]}),q&&e.jsx("p",{className:"mt-4 text-sm text-red-500 bg-red-50 border border-red-100 rounded-lg p-3",children:q}),e.jsxs("div",{className:"mt-8 flex justify-between",children:[e.jsx("button",{onClick:()=>u(2),disabled:y,className:"px-6 py-2.5 border border-gray-200 text-gray-600 text-sm font-medium rounded-lg hover:bg-gray-50 transition-colors disabled:opacity-60",children:"← Back"}),e.jsxs("button",{onClick:ee,disabled:y,className:"px-8 py-2.5 bg-indigo-600 text-white text-sm font-semibold rounded-lg hover:bg-indigo-700 disabled:opacity-60 transition-colors flex items-center gap-2",children:[y&&e.jsxs("svg",{className:"animate-spin w-4 h-4",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8H4z"})]}),y?"Installing…":"Install xFramework"]})]})]})]})})]})}export{be as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{u as f,M as h,b as j,N as g,U as v,s as b,H as w,C as N}from"./ClassicLayout-a9866742.js";import{H as S,a as y}from"./HorizontalMenuContent-fd559f4d.js";import{c as p,d as M,e as k,f as E,P as H,b as P}from"./index-3b5ce20a.js";import{V as z}from"./Views-1359da48.js";import{c as a,r as l,f as B}from"./vendor-react-ece1c85f.js";import{L as C}from"./Logo-dd6f7656.js";import{u as L}from"./usePermission-4689548c.js";import"./withHeaderItem-df2cc5d9.js";import"./index-8d5b6a1f.js";import"./index-0b08ce18.js";import"./index-00a8eb64.js";import"./index-a14e51de.js";import"./useDidUpdate-de319a18.js";import"./useControllableState-d0909575.js";import"./ApiService-df126758.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./Drawer-4f97e662.js";import"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import"./vendor-devex-4076ffeb.js";import"./vendor-pdf-3c29882d.js";import"./vendor-i18n-b89304ef.js";import"./index-359d245d.js";import"./vendor-redux-a1f00e6b.js";import"./WidgetLayoutsService-49730609.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";const R=s=>{const t=p(n=>n.theme.mode),o=p(n=>n.auth.user.authority),{menus:r}=s,{larger:i}=f();return e.jsx(e.Fragment,{children:i.md&&e.jsx(S,{manuVariant:t,userAuthority:o,menus:r})})},W=a.memo(s=>{const{menus:t}=s,o=t.filter(r=>r.routeLink!=="/app/settings");return e.jsxs(e.Fragment,{children:[e.jsx(y,{}),e.jsx(C,{type:"streamline",mode:"dark",logoWidth:"30px",imgClass:"mx-auto mobile-only"}),e.jsx(h,{menus:o}),e.jsx("div",{className:"hidden md:block h-[18px] w-px bg-white/[.14] mx-3 flex-shrink-0"}),e.jsx("div",{className:"hidden md:flex flex-1 min-w-0",children:e.jsx(R,{menus:o})})]})}),A=a.memo(({onOpen:s})=>e.jsxs("button",{onClick:s,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(M,{className:"text-[14px]",style:{strokeWidth:2.5}})," Build"]})),d=({icon:s,title:t,badge:o,onClick:r})=>e.jsxs("button",{title:t,onClick:r,className:"relative flex items-center justify-center w-9 h-9 rounded-full bg-transparent border-0 text-white/70 hover:bg-white/[.07] hover:text-white cursor-pointer flex-shrink-0 transition-colors",children:[s,o&&e.jsx("span",{className:"absolute top-1.5 right-1.5 w-2 h-2 rounded-full bg-custom-600 border-2 border-[#1B1B1B] pointer-events-none"})]}),I=a.memo(({onOpenWizard:s,onOpenSettings:t})=>{const{isManage:o}=L("Page Builder");return e.jsxs(e.Fragment,{children:[o&&e.jsx(A,{onOpen:s}),e.jsx(j,{}),e.jsx(g,{hoverable:!1}),e.jsx(d,{icon:e.jsx(k,{size:18}),title:"Help & Support"}),e.jsx(d,{icon:e.jsx(E,{size:18}),title:"Setting",onClick:t}),e.jsx(v,{hoverable:!1})]})}),O=()=>{const[s,t]=l.useState([]),[o,r]=l.useState(!1),i=B();l.useEffect(()=>{n()},[]);const n=async()=>{var u;const c=localStorage.getItem(H);if(c){const m=await P(c,"default"),x=b((u=m==null?void 0:m.data)==null?void 0:u.$values);t(x??[])}else t([])};return e.jsxs("div",{className:"app-layout-simple flex flex-auto flex-col min-h-screen",children:[e.jsx("div",{className:"flex flex-auto min-w-0",children:e.jsxs("div",{className:"flex flex-col flex-auto min-h-screen min-w-0 relative w-full",children:[e.jsx(w,{className:"header-ca-ink",headerStart:e.jsx(W,{menus:s}),headerEnd:e.jsx(I,{onOpenWizard:()=>r(!0),onOpenSettings:()=>i("/app/settings")})}),e.jsx(z,{pageContainerType:"default"})]})}),o&&e.jsx(N,{onClose:()=>r(!1)})]})},he=a.memo(O);export{he as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{c as r,r as i}from"./vendor-react-ece1c85f.js";import{M as c,U as p,s as d,H as x}from"./ClassicLayout-a9866742.js";import{V as f}from"./Views-1359da48.js";import{P as u,b as j}from"./index-3b5ce20a.js";import"./withHeaderItem-df2cc5d9.js";import"./index-8d5b6a1f.js";import"./index-0b08ce18.js";import"./index-00a8eb64.js";import"./index-a14e51de.js";import"./useDidUpdate-de319a18.js";import"./useControllableState-d0909575.js";import"./ApiService-df126758.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./Drawer-4f97e662.js";import"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import"./vendor-devex-4076ffeb.js";import"./vendor-pdf-3c29882d.js";import"./Logo-dd6f7656.js";import"./vendor-i18n-b89304ef.js";import"./index-359d245d.js";import"./vendor-redux-a1f00e6b.js";import"./WidgetLayoutsService-49730609.js";import"./usePermission-4689548c.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-4be0b5ab.js";const h=r.memo(({menus:s})=>e.jsx(e.Fragment,{children:e.jsx(c,{menus:s})})),v=r.memo(()=>e.jsx(e.Fragment,{children:e.jsx(p,{hoverable:!1})})),S=()=>{const[s,m]=i.useState([]);i.useEffect(()=>{l()},[]);const l=async()=>{var a;const t=localStorage.getItem(u);if(t){const o=await j(t,"default"),n=d((a=o==null?void 0:o.data)==null?void 0:a.$values);m(n??[])}};return e.jsx("div",{className:"app-layout-stacked-side flex flex-auto flex-col",children:e.jsxs("div",{className:"flex flex-auto min-w-0",children:[e.jsx("nav",{className:"stacked-side-nav",children:s.map(t=>e.jsx("div",{children:t.name},t.id))}),e.jsxs("div",{className:"flex flex-col flex-auto min-h-screen min-w-0 relative w-full",children:[e.jsx(x,{className:"shadow dark:shadow-2xl",headerStart:e.jsx(h,{menus:s}),headerEnd:e.jsx(v,{})}),e.jsx("div",{className:"h-full flex flex-auto flex-col",children:e.jsx(f,{})})]})]})})},W=r.memo(S);export{W as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as l}from"./vendor-mui-98daa63f.js";import{r as s}from"./vendor-react-ece1c85f.js";import{g as p}from"./index-3b5ce20a.js";const x=o=>{const{children:c,className:n,stickyClass:i,...a}=o,[f,m]=s.useState(!1),e=s.useRef(null);return s.useEffect(()=>{const t=e.current,r=new IntersectionObserver(([u])=>m(u.intersectionRatio<1),{threshold:[1]});return r.observe(t),function(){r.unobserve(t)}},[]),l.jsx("div",{id:"actions-footer",ref:e,className:p("sticky",n,f&&i),...a,children:c})};export{x as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{A as Y}from"./AdaptableCard-3d1e1f96.js";import{P as B}from"./PageBreadcrumb-cf54a6e9.js";import{r as l,f as $}from"./vendor-react-ece1c85f.js";import{a as z,u as k,g as V,r as G}from"./index-1dc2b9d2.js";import{_,r as E,B as L,D as H,k as U,ax as J,l as K,ai as P}from"./index-3b5ce20a.js";import{D as Q}from"./tableV2-99c808c0.js";import"./Alert-59d09a99.js";import{B as c}from"./index-7596c6bb.js";import{a as W,C as T}from"./index-a14e51de.js";import{D as X}from"./Drawer-4f97e662.js";import{a as M}from"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import{b as Z}from"./UserService-1b93ceb0.js";import{A as ee,T as te}from"./actioncell-6b5ebd6c.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"./FileSaver.min-20f3f13a.js";import"./DensitySelector-5d2e901f.js";import"./NoData-4cc4af03.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-de319a18.js";const ae=({onSaveClick:a,onCancel:d,onClearFilters:t})=>e.jsxs("div",{className:"text-right w-full",children:[e.jsx(L,{size:"sm",className:"mr-2",onClick:t,children:"Clear All"}),e.jsx(L,{size:"sm",className:"mr-2",onClick:d,children:"Cancel"}),e.jsx(L,{size:"sm",variant:"solid",onClick:a,children:"Apply"})]}),se=a=>{var g,b,C,s;const[d,t]=l.useState(!1),[D,R]=l.useState(((g=a==null?void 0:a.filters)==null?void 0:g.name)||""),[m,x]=l.useState(((b=a==null?void 0:a.filters)==null?void 0:b.company)||null),[h,f]=l.useState(((C=a==null?void 0:a.filters)==null?void 0:C.status)||null),[S,p]=l.useState(((s=a==null?void 0:a.filters)==null?void 0:s.registrationDate)||null),[N,F]=l.useState([]),[w,O]=l.useState([]),A=_(n=>{var o;return(o=n.auth.session)==null?void 0:o.tenantId});l.useEffect(()=>{(async()=>{var o,i,y;try{const I=await Z({},A,!0,"Customer");F((o=I.data.$values)==null?void 0:o.map(u=>({value:u.id,label:`${u.firstName} ${u.lastName}`})));const q=await z();O((y=(i=q==null?void 0:q.data)==null?void 0:i.finalResults)==null?void 0:y.$values.map(u=>({value:u.id,label:u.title})))}catch(I){console.error("Failed to fetch options",I)}})()},[]);const r=()=>{t(!1),a.onClose()},j=()=>{a.setFilters({company:{label:"",value:""},status:{label:"",value:""},registrationDate:null}),x(null),f(null),p(null),t(!1),a.onClose()},v=()=>{a.setFilters({company:m,status:h,registrationDate:S}),t(!1),a.onClose()};return l.useEffect(()=>{a.isOpen&&t(!0)},[a.isOpen]),l.useEffect(()=>{var n,o,i,y;R(((n=a.filters)==null?void 0:n.name)||""),x(((o=a.filters)==null?void 0:o.company)||null),f(((i=a.filters)==null?void 0:i.status)||null),p(((y=a.filters)==null?void 0:y.registrationDate)||null)},[a.filters]),e.jsxs(X,{title:"Filters",isOpen:d,portalClassName:"w30",footer:e.jsx(ae,{onCancel:r,onSaveClick:v,onClearFilters:j}),onClose:r,onRequestClose:r,children:[e.jsx("div",{className:"mb-5",children:e.jsx(M,{label:"Date",children:e.jsx(W,{value:S,onChange:p,placeholder:"Select date"})})}),e.jsx("div",{className:"mb-5",children:e.jsx(M,{label:"Type",children:e.jsx(E,{options:w,value:h,onChange:n=>f(n),placeholder:"Select Type",isClearable:!0})})}),e.jsx("div",{className:"mb-5",children:e.jsx(M,{label:"Customer",children:e.jsx(E,{options:N,value:m,onChange:n=>x(n),placeholder:"Select Customer",isClearable:!0})})})]})},le=a=>{switch(a){case"ReOpened":return e.jsx(c,{content:"Reopened",className:"text-yellow-700 bg-yellow-100 border border-yellow-300 px-2 py-0.5 rounded-full text-xs font-medium"});case"PendingCustomerConfirmation":return e.jsx(c,{content:"PendingCustomerConfirmation",className:"text-yellow-700 bg-yellow-100 border border-yellow-300 px-2 py-0.5 rounded-full text-xs font-medium"});case"Open":return e.jsx(c,{content:"Open",className:"text-orange-700 bg-orange-100 border border-orange-300 px-2 py-0.5 rounded-full text-xs font-medium"});case"NeedReview":return e.jsx(c,{content:"NeedReview",className:"text-orange-700 bg-orange-100 border border-orange-300 px-2 py-0.5 rounded-full text-xs font-medium"});case"Closed":return e.jsx(c,{content:"Closed",className:"text-red-700 bg-red-100 border border-red-300 px-2 py-0.5 rounded-full text-xs font-medium"});case"Resolved":return e.jsx(c,{content:"Resolved",className:"text-green-700 bg-green-100 border border-green-300 px-2 py-0.5 rounded-full text-xs font-medium"});default:return e.jsx(c,{content:a,className:"text-gray-700 bg-gray-100 border border-gray-300 px-2 py-0.5 rounded-full text-xs font-medium"})}};H("SupportData",G);const ne={edit:!1,delete:!1,view:!0},Le=()=>{var j,v,g,b,C;const[a,d]=l.useState([]);l.useState(!1),l.useState(!1),l.useState(!1),l.useState(!1),l.useState(),l.useState(null);const[t,D]=l.useState({name:"",company:"",status:"",registrationDate:null}),[R,m]=l.useState(!1),x=()=>m(!0),h=()=>m(!1);l.useState(null),l.useState([new Date,new Date]);const f=$(),S=U();k(s=>s.SupportData.data.filterData);const p=k(s=>s.SupportData.data.loading),N=k(s=>{var n,o;return(o=(n=s==null?void 0:s.SupportData)==null?void 0:n.data)==null?void 0:o.ticketList});l.useState(!1),l.useState(null),J.getState(),K(),l.useEffect(()=>{F()},[t]);const F=()=>{var o,i;const s={name:t.name||null,company:((o=t==null?void 0:t.company)==null?void 0:o.value)||null,status:((i=t==null?void 0:t.status)==null?void 0:i.value)||null,registrationDate:t.registrationDate?P(t.registrationDate).format("YYYY-MM-DD"):null},n=V(s);S(n)},w=s=>{f("/app/ticket-details/"+s.id)},O=(s,n)=>{n===te.view&&w(s)},A=[{dataField:"Action",caption:"Action",cellRender:s=>e.jsx("div",{children:e.jsx(ee,{row:s==null?void 0:s.data,actions:ne,buttonClick:O})})},{dataField:"customer",caption:"Customer Name"},{dataField:"title",caption:"Title",cssClass:"truncate-cell"},{dataField:"description",caption:"Description",width:500,cssClass:"truncate-cell"},{dataField:"supportCategory",caption:"Request Category"},{dataField:"createdDate",caption:"Requested Date",dataType:"date",format:"MM/dd/yyyy"},{dataField:"status",caption:"Status",cellRender:s=>{var n;return e.jsx("div",{"data-cname":"Status",children:le((n=s==null?void 0:s.data)==null?void 0:n.status)})}}],r=s=>{D(n=>({...n,[s]:void 0}))};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[e.jsx(B,{items:[{label:"Support Request"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Support Request"}),e.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center"})]})]}),e.jsx(Y,{className:"m-6 h-full bg-transparent",bodyClass:"h-full",children:e.jsxs(Y,{className:"borderless",children:[e.jsxs("div",{className:"text-right mb-3",children:[((j=t==null?void 0:t.company)==null?void 0:j.value)&&e.jsx(T,{title:"Customer",value:(v=t==null?void 0:t.company)==null?void 0:v.label,onRemovefilter:r,tagId:"company"}),((g=t==null?void 0:t.status)==null?void 0:g.value)&&e.jsx(T,{title:"Type",value:(b=t==null?void 0:t.status)==null?void 0:b.label,onRemovefilter:r,tagId:"status"}),(t==null?void 0:t.registrationDate)&&e.jsx(T,{title:"Date",value:(C=P(t.registrationDate))==null?void 0:C.format("MM/DD/YYYY"),onRemovefilter:r,tagId:"registrationDate"})]}),e.jsx(Q,{columns:A,tableName:"SupportRequest-table",data:N||[],height:"calc(100vh - 270px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:a,setSelectedRowId:d,setFilterValues:()=>{},filterValues:[],identity:"Lead-Listing",isColumnReorderReq:!0,setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"Lead-Listing-table",handleSearch:()=>{},isColumnResizing:!0,isPaginationReq:!0,isSelectionReq:!1,isFilterReq:!0,openFilter:x,isLoading:p})]})}),e.jsx(se,{isOpen:R,onClose:h,filters:t,setFilters:D})]})};export{Le as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o}from"./vendor-mui-
|
|
1
|
+
import{j as o}from"./vendor-mui-98daa63f.js";import{r as i}from"./vendor-react-ece1c85f.js";import{bv as P,g as k,bX as R}from"./index-3b5ce20a.js";const L=i.forwardRef((m,w)=>{const{checked:r,checkedContent:C,className:g,color:x,defaultChecked:a,disabled:n,isLoading:d=!1,labelRef:b,name:j,onChange:s,readOnly:h,unCheckedContent:v,field:l,...y}=m,{themeColor:N,primaryColorLevel:S}=P(),[t,f]=i.useState(a||r);i.useEffect(()=>{typeof r<"u"&&f(r)},[r]);const u=(()=>{let e=t,c={value:e};return l&&(e=typeof l.value=="boolean"?l.value:a,c={value:e,checked:e}),a&&(c.defaultChecked=a),c})(),$=e=>{const c=!t;n||h||d||(typeof r>"u"?(f(c),s==null||s(c,e)):s==null||s(t,e))},p=x||`${N}-${S}`,E=k("switcher",(t||u.checked)&&`switcher-checked bg-${p} dark:bg-${p}`,n&&"switcher-disabled",g);return o.jsxs("label",{ref:b,className:E,children:[o.jsx("input",{ref:w,type:"checkbox",disabled:n,readOnly:h,name:j,onChange:$,...u,...l,...y}),d?o.jsx(R,{className:k("switcher-toggle-loading",t?"switcher-checked-loading":"switcher-uncheck-loading")}):o.jsx("div",{className:"switcher-toggle"}),o.jsx("span",{className:"switcher-content",children:t?C:v})]})});L.displayName="Switcher";export{L as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{A as T}from"./AdaptableCard-3d1e1f96.js";import{P as Q}from"./PageBreadcrumb-cf54a6e9.js";import{j as X,r,f as Y}from"./vendor-react-ece1c85f.js";import{u as p,d as Z,r as _}from"./index-d33facae.js";import{D as G,k as I,ax as ee,l as se,B as A,d as te,E as C,F as k}from"./index-3b5ce20a.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./index-a14e51de.js";import{D as re}from"./Drawer-4f97e662.js";import"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import{m as ae}from"./TimeLogService-83166cbc.js";import{A as ie,I as $,b as oe}from"./InlineSignaturePad-f5630151.js";import{L as ne}from"./Logo-dd6f7656.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"./index-8677acd1.js";import"./StickyFooter-3e569b80.js";import"./index-0b08ce18.js";const le=[{key:"auto",name:"Immediately"},{key:"onClick",name:"On Button Click"}],de=[{key:"dragAndDrop",name:"Drag and drop"},{key:"select",name:"Select"}],ce=["nextColumn","widget"];G("TimeLogData",_);const We=()=>{var w,L;let{id:d}=X();r.useState([]);const[B,ue]=r.useState(!1);r.useState(!1);const[F,M]=r.useState(!1);r.useState(!1),r.useState(),r.useState(),r.useState("");const c=()=>{M(!1)};r.useState(!0),r.useState(!0),r.useState(le[0].key);const u=r.useRef(null);r.useState(ce[0]),r.useState(de[1].key),r.useState(!0),r.useState(!0),r.useState(!0),r.useState(!0);const E=Y(),P=I(),j=p(t=>{var a,s;return(s=(a=t==null?void 0:t.TimeLogData)==null?void 0:a.data)==null?void 0:s.filterData}),x=p(t=>t.TimeLogData.data.TimeLogListByBatchId),[v,R]=r.useState(),[xe,U]=r.useState();r.useState("");const[f,y]=r.useState(!1),[z,he]=r.useState([]),{auth:h}=ee.getState(),l=((L=(w=h==null?void 0:h.session)==null?void 0:w.userId)==null?void 0:L.toString())??"";se();const{pageIndex:S,pageSize:N,sort:b,query:O,total:me}=p(t=>t.TimeLogData.data.tableData);r.useEffect(()=>{x.map((t,a)=>{t.approverList.$values.map((s,i)=>{!f&&s.aproverUserId==l&&s.isReadyForApprove&&s.approverSignatureId})})},[x]),r.useEffect(()=>{D()},[S,N,b,B,j]);const D=()=>{const t=Z({pageIndex:S,pageSize:N,sort:b,query:O,filterData:j,id:d});P(t)};r.useCallback(()=>{var t;(t=u==null?void 0:u.current)==null||t.instance().clearFilter()},[]);const m=(t,a)=>{R(t),U(a),t&&a&&y(!0)},q=(t,a)=>{if(t&&a){const s=new Date(t),o=new Date(a).getTime()-s.getTime();if(o>0){const n=Math.floor(o/1e3/60),g=Math.floor(n/60),K=n%60;return`${g}h ${K}m`}else return""}},V=t=>{let a=0;if(t.forEach(s=>{if(s!=null&&s.startTime&&(s!=null&&s.endTime)){const i=new Date(s==null?void 0:s.startTime),o=new Date(s==null?void 0:s.endTime);a=a+(o.getTime()-i.getTime())}}),a>0){const s=Math.floor(a/1e3/60),i=Math.floor(s/60),o=s%60;return`${i}h ${o}m`}else return""},W=async t=>await ae(t),H=()=>{y(!1);const t={signatureFile:v,userId:l,signatureName:"signature1"};console.log("signaturepayload",t),v&&oe(t).then(a=>{var o;const s=(o=a==null?void 0:a.data)==null?void 0:o.id;W({userId:l,timeLogBatchId:d,signatureId:s,timeLogApprovalList:z}).then(n=>{n.success&&(D(),C.push(e.jsx(k,{title:"Success",type:"success",duration:2500,children:"Approved Successfully"}),{placement:"top-center"}),c())}).catch(n=>{var g=n.response.data;C.push(e.jsx(k,{title:"Error",type:"danger",duration:2500,children:g.message}),{placement:"top-center"})})})},J=()=>{E("/app/pages/TimeLogapproval")};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[e.jsx(Q,{items:[{label:"Timesheets"},{label:"Time Logs"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Time Logs"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx(A,{style:{marginRight:"0.5rem"},onClick:()=>J(),block:!0,variant:"solid",size:"sm",children:"View TimeLog Approvals"}),f&&e.jsx(A,{onClick:()=>H(),block:!0,variant:"solid",size:"sm",icon:e.jsx(te,{}),children:"Approve All Time Log"}),e.jsx(re,{title:"Add Signature",isOpen:F,onClose:c,portalClassName:"w30",children:e.jsx(ie,{onSignSubmit:m,batchId:d,onDrawerClose:c})})]})]})]}),e.jsx(T,{className:"m-6 h-full py-4 px-6 bg-transparent ",bodyClass:"h-full",children:e.jsx(e.Fragment,{children:x.map((t,a)=>e.jsx(e.Fragment,{children:e.jsxs(T,{className:"time-log p-10 w-[90%] m-auto borderless",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"pb-5",children:[e.jsx(ne,{type:"full",imgClass:"w-[220px]"}),e.jsxs("div",{children:[e.jsx("strong",{children:"Client Name:"})," ","ContentActive"]})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("h6",{children:"Employee Weekly TimeSheet"}),e.jsxs("div",{children:[e.jsx("strong",{children:"Week of Date:(Mon-Sun):"})," ",new Date(t.startDate).toLocaleDateString()," ","to"," ",new Date(t.endDate).toLocaleDateString()]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Employee Name:"})," ",t.fullName]})]})]}),e.jsxs("table",{className:"time-log-table w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-left",children:[e.jsx("th",{}),e.jsx("th",{className:"text-left",children:"Date"}),e.jsx("th",{children:"Description"}),e.jsx("th",{children:"Hours"}),e.jsx("th",{children:"Per Diem"}),e.jsx("th",{children:"Details/Comments"})]})}),e.jsxs("tbody",{children:[t.timelogs.$values.map((s,i)=>e.jsxs("tr",{children:[e.jsx("td",{children:i+1}),e.jsxs("td",{children:[" ",new Date(s.startTime).toLocaleString()]}),e.jsx("td",{children:s.timeLogTypeName}),e.jsxs("td",{children:[" ",q(s.startTime,s.endTime)]}),e.jsx("td",{children:"-"}),e.jsx("td",{children:"details"})]})),e.jsxs("tr",{children:[e.jsx("td",{}),e.jsx("td",{}),e.jsx("td",{children:e.jsx("strong",{children:"Totals"})}),e.jsx("td",{children:e.jsx("strong",{children:V(t.timelogs.$values)})}),e.jsx("td",{}),e.jsx("td",{})]})]})]}),e.jsx("div",{children:e.jsx("p",{className:"text-xs py-8",children:"*All employees are required to sign out next to the total hours. By signing you are attesting to the hours to be paid, and that all authorized break and rest periods have periods have been provided and you have not suffered any work related injury on this day"})}),e.jsxs("div",{className:`grid gap-4 ${t.approverList.$values.length<=2?"grid-cols-2":"grid-cols-3"}`,children:[e.jsxs("div",{className:`${t.approverList.$values.length<=2?"sig-ext":"sig-nrml"}`,children:[e.jsx("div",{className:"lg:flex border-b-2 flex my-auto items-center h-[142px]",children:t.approverList.$values.map((s,i)=>{if(s.isSelfApprove)return s.approverSignatureId?e.jsx("div",{className:"sign-line",children:e.jsx("img",{src:"\\"+s.signaturepath,className:"w-[170px] py-4"})}):s.aproverUserId&&s.aproverUserId.toLowerCase()==l.toLowerCase()?e.jsx(e.Fragment,{children:e.jsx($,{onSignSubmit:m})}):e.jsx(e.Fragment,{children:e.jsx("div",{className:"sign-line"})})})}),e.jsxs("div",{className:"flex mb-4",children:[e.jsx("div",{className:"w-1/2 my-auto py-4 text-left",children:t.fullName}),e.jsx("div",{className:"w-1/2 my-auto py-4 text-right",children:t.approverList.$values.map((s,i)=>{if(s.isSelfApprove&&s.approverSignatureId)return e.jsx("p",{children:new Date(s==null?void 0:s.approvedDate).toLocaleString()})})})]})]}),t.approverList.$values.map((s,i)=>{if(!s.isSelfApprove)return s.aproverUserId&&s.aproverUserId.toLowerCase()==l.toLowerCase()&&s.isReadyForApprove&&!s.approverSignatureId?e.jsxs("div",{children:[e.jsx("div",{className:"lg:flex border-b-2 flex my-auto items-center h-[142px]",children:e.jsx($,{onSignSubmit:m})}),e.jsxs("div",{className:"flex mb-4",children:[e.jsx("div",{className:"w-1/2 my-auto py-4 text-left",children:s==null?void 0:s.approverName}),e.jsx("div",{className:"w-1/2 my-auto py-4 text-right"})]})]}):s.approverSignatureId||s.signaturepath?e.jsxs("div",{children:[e.jsx("div",{className:"lg:flex border-b-2 flex my-auto items-center h-[142px]",children:e.jsx("div",{className:"sign-line",children:e.jsx("img",{src:"\\"+s.signaturepath,className:"w-[170px] py-4"})})}),e.jsxs("div",{className:"flex mb-4",children:[e.jsx("div",{className:"w-1/2 my-auto py-4 text-left",children:s==null?void 0:s.approverName}),e.jsx("div",{className:"w-1/2 my-auto py-4 text-right",children:e.jsx("p",{children:new Date(s==null?void 0:s.approvedDate).toLocaleString()})})]})]}):e.jsxs("div",{id:"no-sig",children:[e.jsx("div",{className:"lg:flex border-b-2 flex my-auto items-center h-[142px]",children:e.jsx("div",{className:"sign-line"})}),e.jsxs("div",{className:"flex mb-4",children:[e.jsx("div",{className:"w-1/2 my-auto py-4 text-left",children:s==null?void 0:s.approverName}),e.jsx("div",{className:"w-1/2 my-auto py-4 text-right"})]})]})})]})]})}))})})]})};export{We as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as i}from"./vendor-mui-98daa63f.js";import{A as f}from"./AdaptableCard-3d1e1f96.js";import{P as V}from"./PageBreadcrumb-cf54a6e9.js";import{r as t,f as z}from"./vendor-react-ece1c85f.js";import{u as l,c as O,r as P,b as x,t as H}from"./index-d33facae.js";import{D as W,ax as q,k as _,l as $,B as J}from"./index-3b5ce20a.js";import{A as K,T as c}from"./actioncell-6b5ebd6c.js";import{D as Q}from"./tableV2-99c808c0.js";import"./vendor-redux-a1f00e6b.js";import"./TimeLogService-83166cbc.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";const X=[{key:"auto",name:"Immediately"},{key:"onClick",name:"On Button Click"}],Y=[{key:"dragAndDrop",name:"Drag and drop"},{key:"select",name:"Select"}],Z=["nextColumn","widget"],G={delete:!0,view:!0};W("TimeLogData",P);const Ce=()=>{const[y,S]=t.useState([]),[A,ee]=t.useState(!1);t.useState(!1),t.useState(!1);const[te,w]=t.useState(!1),[ae,L]=t.useState(),[ie,b]=t.useState(),[se,D]=t.useState(!0),[oe,C]=t.useState(!0),[re,F]=t.useState(X[0].key),d=t.useRef(null);t.useState(Z[0]),t.useState(Y[1].key),t.useState(!0),t.useState(!0),t.useState(!0),t.useState(!0);const p=z();t.useState("");const{auth:n}=q.getState(),o=_(),u=l(e=>{var a,s;return(s=(a=e==null?void 0:e.TimeLogData)==null?void 0:a.data)==null?void 0:s.filterData}),{loading:T}=l(e=>e.TimeLogData.data),j=l(e=>e.TimeLogData.data.AllTimeLogApprovalList);$();const{pageIndex:m,pageSize:g,sort:v,query:k,total:le}=l(e=>e.TimeLogData.data.tableData);t.useEffect(()=>{R()},[m,g,v,A,u]);const R=()=>{var s,h;const e=((h=(s=n==null?void 0:n.session)==null?void 0:s.userId)==null?void 0:h.toString())??"",a=O({pageIndex:m,pageSize:g,sort:v,query:k,filterData:u,userId:e});o(a)},r=t.useCallback(()=>{var e;(e=d==null?void 0:d.current)==null||e.instance().clearFilter()},[]);t.useCallback(e=>{D(e.value),r()},[r]),t.useCallback(e=>{C(e.value),r()},[r]),t.useCallback(e=>{F(e.value)},[]);const I=e=>{p("/app/pages/TimeLogApproval/view/"+e.timeLogApprovalBatchId)},[U,M]=t.useState({pageSize:"",pageIndex:""}),N=(e,a)=>{a===c.view&&I(e),a===c.edit&&(L(e.id),b(e),o(x(e)),w(!0)),a===c.delete&&(o(H(!0)),o(x(e)))},E=[{dataField:"Action",caption:"Action",width:"75",cellRender:e=>i.jsx("div",{id:"mAction","data-cname":"Action",children:i.jsx(K,{row:e==null?void 0:e.data,actions:G,buttonClick:N})})},{dataField:"startDate",caption:"Start Date",width:"150",dataType:"datetime",format:"MM/dd/yyyy"},{dataField:"endDate",caption:"End Date",width:"150",dataType:"datetime",format:"MM/dd/yyyy"},{dataField:"approveStatus",caption:"Approved",width:"150"},{dataField:"approvedUsers",caption:"Approved Users",width:"300",cellRender:e=>{var a;return i.jsx("div",{id:"div-approvedUsers","data-cname":"Approved Users",style:{width:"100%",textWrap:"initial"},children:(a=e==null?void 0:e.data)==null?void 0:a.approvedUsers})}},{dataField:"nextApproveUsers",caption:"Next Approve Users",width:"300",cellRender:e=>{var a;return i.jsx("div",{id:"div-nextApproveUsers","data-cname":"Next Approve Users",style:{width:"100%",textWrap:"initial"},children:(a=e==null?void 0:e.data)==null?void 0:a.nextApproveUsers})}},{dataField:"approvalUsers",caption:"Approval Users",width:"300",cellRender:e=>{var a;return i.jsx("div",{id:"div-approvalUsers","data-cname":"Approval Users",style:{width:"100%",textWrap:"initial"},children:(a=e==null?void 0:e.data)==null?void 0:a.approvalUsers})}},{dataField:"approvalCreatedBy",caption:"Created By",width:"250"},{dataField:"createdDate",caption:"Created On",width:"150",dataType:"date",format:"MM/dd/yyyy"}],B=()=>{p("/app/pages/TimeLog")};return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[i.jsx(V,{items:[{label:"Timesheets"},{label:"Time Log Approvals"}]}),i.jsxs("div",{className:"lg:flex items-center justify-between",children:[i.jsx("h3",{className:"mb-4 lg:mb-0",children:"Time Log Approvals"}),i.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center",children:i.jsx(J,{style:{marginRight:"0.5rem"},onClick:()=>B(),block:!0,variant:"solid",size:"sm",children:"View TimeLog List"})})]})]}),i.jsx(f,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:i.jsx(f,{className:"borderless",children:i.jsx(Q,{columns:E,tableName:"time-log-approval",data:j||[],height:"calc(100vh - 320px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:y,setSelectedRowId:S,setFilterValues:()=>{},filterValues:[],identity:"Lead-Listing",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"app-key-Listing-table",handleSearch:()=>{},isColumnResizing:!0,pager:U,setPager:M,isPaginationReq:!0,isLoading:T})})})]})};export{Ce as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{A as B}from"./AdaptableCard-3d1e1f96.js";import{P as Ie}from"./PageBreadcrumb-cf54a6e9.js";import{r as s,f as me}from"./vendor-react-ece1c85f.js";import{g as J,u as z,a as Z,r as Ae,b as re,t as Me}from"./index-d33facae.js";import{D as W,k as q,r as ue,a0 as R,ai as O,B as w,cF as X,c as oe,Z as Ee,cE as ne,E as P,F as V,ax as Re,l as Oe,d as qe}from"./index-3b5ce20a.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import{d as le,a as de}from"./index-a14e51de.js";import{D as K}from"./Drawer-4f97e662.js";import{a as I,F as pe}from"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.js";import{A as Ue,T as Y}from"./actioncell-6b5ebd6c.js";import{D as Be}from"./tableV2-99c808c0.js";import{D as ze}from"./DoubleSidedImage-b4bd3915.js";import{h as Pe}from"./index-b0ef7ac3.js";import{S as he}from"./StickyFooter-3e569b80.js";import{C as Ve}from"./ConfirmDialog-2838a642.js";import{d as A,c as _,a as M,F as $e,b as He}from"./index.esm-b2d342b5.js";import{r as ge,u as xe,g as fe}from"./index-d221d69e.js";import{a as je}from"./index-0b08ce18.js";import{h as Ye,i as Ke,j as Qe,k as Ze,l as _e}from"./TimeLogService-83166cbc.js";import{p as ce}from"./Notify-8fb74d48.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";import"./UserService-1b93ceb0.js";W("users",ge);const Je=m=>{const f=q(),{touched:t,errors:r,type:o}=m,[T,v]=s.useState(""),[g,x]=s.useState(""),[S,u]=s.useState("");s.useState(!1);const[N,D]=s.useState([]),h=xe(i=>{var d,n,l;return(l=(n=(d=i.users)==null?void 0:d.data)==null?void 0:n.usersList)==null?void 0:l.map(p=>({value:p.id,label:p.firstName+" "+p.lastName+" ("+p.email+")"}))});s.useEffect(()=>{j()},[]);const j=()=>{const i=fe({});f(i)},y=(i,a,d)=>{if(console.log("form",d),i&&a){const n=new Date(i),p=new Date(a).getTime()-n.getTime();if(p>0){const L=Math.floor(p/1e3/60),b=Math.floor(L/60),k=L%60;u(`${b}h ${k}m`),d.setFieldValue("duration",`${b}h ${k}m`)}else u("")}},F=(i,a)=>{const d=parseFloat(i);if(!isNaN(d)){const n=Math.round(d*60),l=new Date(a.values.startTime);console.log("form.values.startTime",a.values.startTime);const p=new Date(l.getTime()+n*6e4),L=O(p).format("DD-MMM-YYYY hh:mm a");console.log("onDurationChange - formattedEndTime",L),a.setFieldValue("endTime",p),a.setFieldValue("duration",`${i}h`)}};return e.jsxs(B,{className:"mb-4",children:[o==="new"&&e.jsx(I,{label:"Select Users",invalid:r.userId&&t.userId,errorMessage:r.userId,children:e.jsx(A,{name:"userId",children:({field:i,form:a})=>e.jsx(e.Fragment,{children:e.jsx(ue,{field:i,form:a,name:"userId",placeholder:"Select Users",options:h,value:a.values.userId,components:{DropdownIndicator:null,IndicatorSeparator:null},onChange:d=>{console.log("option",d),a.values.userId=d,D(d)}})})})}),o==="edit"&&e.jsxs(e.Fragment,{children:[e.jsx(I,{label:"Name",invalid:r.firstName&&t.firstName,errorMessage:r.firstName,children:e.jsx(A,{name:"Name",children:({field:i,form:a})=>e.jsx(e.Fragment,{children:e.jsxs("h5",{children:[a.values.firstName," ",a.values.lastName]})})})}),e.jsx(I,{label:"Email",invalid:r.email&&t.email,errorMessage:r.email,children:e.jsx(A,{name:"Email",children:({field:i,form:a})=>e.jsx(e.Fragment,{children:e.jsx("h5",{children:a.values.email})})})}),e.jsx(I,{label:"Type",invalid:r.type&&t.type,errorMessage:r.type,children:e.jsx(A,{name:"Type",children:({field:i,form:a})=>e.jsx(e.Fragment,{children:e.jsx("h5",{children:a.values.type})})})})]}),e.jsx(I,{asterisk:!0,label:"Start Time",invalid:r.startTime&&t.startTime,errorMessage:r.startTime,children:e.jsx(A,{name:"startTime",children:({field:i,form:a})=>e.jsx(e.Fragment,{children:e.jsx(le,{amPm:!0,field:i,placeholder:"Pick a Start Time",onChange:d=>{console.log("startTime",d),a.setFieldValue("startTime",d),v(i.value),y(i.value,a.values.endTime,a)},value:i.value})})})}),e.jsx(I,{asterisk:!0,label:"End Time",invalid:r.endTime&&t.endTime,errorMessage:r.endTime,children:e.jsx(A,{name:"endTime",children:({field:i,form:a})=>e.jsx(e.Fragment,{children:e.jsx(le,{form:a,amPm:!0,field:i,placeholder:"Pick a End Time",onChange:d=>{a.setFieldValue("endTime",d),x(i.value),y(a.values.startTime,i.value,a)},value:i.value})})})}),e.jsx(I,{label:"Duration",asterisk:!0,invalid:r.duration&&t.duration,errorMessage:r.duration,children:e.jsx(A,{name:"duration",component:R,children:({field:i,form:a})=>e.jsx(R,{form:a,field:i,className:"form-input",placeholder:"Duration",type:"text",onChange:d=>{a.handleChange(d),console.log("duration key changes",d.target.value)},onBlur:d=>{console.log("duration key changes",d.target.value),F(d.target.value,a)}})})}),e.jsx(I,{label:"Time Log Description",invalid:r.timeLogDescription&&t.timeLogDescription,errorMessage:r.timeLogDescription,children:e.jsx(A,{type:"text",autoComplete:"off",name:"timeLogDescription",placeholder:"Time Log Description",component:R,textArea:!0})})]})},{useUniqueId:We}=Pe,Xe=_().shape({endTime:M().required("EndTime is Required"),startTime:M().required("StartTime is Required"),timeLogDescription:M().required("TimeLog Description is Required"),duration:M().required("Duration is Required"),userId:_().required("Select User is Required")}),Ge=_().shape({endTime:M().required("EndTime is Required"),startTime:M().required("StartTime is Required"),timeLogDescription:M().required("TimeLog Description is Required"),duration:M().required("Duration is Required")}),et=({onDelete:m})=>{const[f,t]=s.useState(!1),r=()=>{t(!0)},o=()=>{t(!1)},T=()=>{m==null||m(t)};return e.jsxs(e.Fragment,{children:[e.jsx(w,{className:"text-red-600",variant:"plain",size:"sm",icon:e.jsx(X,{}),type:"button",onClick:r,children:"Delete"}),e.jsx(Ve,{isOpen:f,type:"danger",title:"Delete Category",confirmButtonColor:"red-600",onClose:o,onRequestClose:o,onCancel:o,onConfirm:T,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."})})]})},G=s.forwardRef((m,f)=>{const{type:t,initialData:r={id:"",firstName:"",lastName:"",email:"",type:"",endTime:"",startTime:"",timeLogDescription:"",duration:"",userId:""},onFormSubmit:o,onDiscard:T,onDelete:v}=m,g=We("TimeLogForm-");return e.jsx(e.Fragment,{children:e.jsx($e,{innerRef:f,initialValues:{...r},validationSchema:t==="new"?Xe:Ge,onSubmit:(x,{setSubmitting:S})=>{const u=x;t==="new"&&(u.id=g),o==null||o(u,S)},children:({values:x,touched:S,errors:u,isSubmitting:N})=>e.jsx(He,{children:e.jsxs(pe,{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(Je,{type:t,touched:S,errors:u})})}),e.jsxs(he,{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:t==="edit"&&e.jsx(et,{onDelete:v})}),e.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(w,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>T==null?void 0:T(),children:"Discard"}),e.jsx(w,{size:"sm",variant:"solid",loading:N,icon:e.jsx(je,{}),type:"submit",children:"Save"})]})]})]})})})})});G.displayName="TimeLogForm";const tt=m=>{const{id:f,rowData:t,onDrawerClose:r}=m,o=q(),T=(h,j)=>{if(h&&j){const y=new Date(h),i=new Date(j).getTime()-y.getTime();if(i>0){const a=Math.floor(i/1e3/60),d=Math.floor(a/60),n=a%60;return`${d}h ${n}m`}else return""}},v=oe(h=>{var j,y,F,i,a,d,n,l;return{...(y=(j=h.TimeLogData)==null?void 0:j.data)==null?void 0:y.TimeLogData,duration:T((a=(i=(F=h.TimeLogData)==null?void 0:F.data)==null?void 0:i.TimeLogData)==null?void 0:a.startTime,(l=(n=(d=h.TimeLogData)==null?void 0:d.data)==null?void 0:n.TimeLogData)==null?void 0:l.endTime)}});console.log("edit",v);const g=oe(h=>{var j,y;return(y=(j=h.TimeLogData)==null?void 0:j.data)==null?void 0:y.loading}),x=()=>{o(J({}))},S=async(h,j)=>{j(!0);const y={endTime:h.endTime??"",startTime:h.startTime??"",timeLogDescription:h.timeLogDescription??"",userId:t.userId??"",timeLogType:1},F=await Ye(f,y);j(!1),F&&(D("updated"),x(),r())},u=()=>{r()},N=async h=>{h(!1),await Ke(f??"").then(j=>{D("deleted"),x(),r(null)})},D=h=>{P.push(e.jsxs(V,{title:"Success",type:"success",duration:2500,children:["Key Successfully ",h]}),{placement:"top-center"})};return e.jsxs(e.Fragment,{children:[e.jsx(Ee,{loading:g,children:!ne(v)&&e.jsx(e.Fragment,{children:e.jsx(G,{type:"edit",initialData:{firstName:t==null?void 0:t.firstName,lastName:t==null?void 0:t.lastName,email:t==null?void 0:t.email,type:t==null?void 0:t.timeLogTypeName,timeLogDescription:t==null?void 0:t.timeLogDescription,startTime:t!=null&&t.startTime?new Date(t==null?void 0:t.startTime):t==null?void 0:t.startTime,endTime:t!=null&&t.endTime?new Date(t==null?void 0:t.endTime):t==null?void 0:t.endTime,duration:t==null?void 0:t.duration,userId:void 0},onFormSubmit:S,onDiscard:u,onDelete:N})})}),!g&&ne(v)&&e.jsxs("div",{className:"h-full flex flex-col items-center justify-center",children:[e.jsx(ze,{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 Time Log found!"})]})]})},st=({onSaveClick:m,onCancel:f,onClearFilers:t})=>e.jsxs("div",{className:"text-right w-full",children:[e.jsx(w,{size:"sm",className:"mr-2",onClick:t,children:"Clear All"}),e.jsx(w,{size:"sm",className:"mr-2",onClick:f,children:"Cancel"}),e.jsx(w,{size:"sm",variant:"solid",onClick:m,children:"Query"})]}),at=m=>{const f=q(),[t,r]=s.useState(!1),o=z(D=>D.TimeLogData.data.filterData),[T,v]=s.useState(o==null?void 0:o.fromDate),[g,x]=s.useState(o==null?void 0:o.toDate),S=()=>{r(!1),m.onClose()},u=()=>{f(Z({fromDate:"",toDate:""})),v(""),x("")},N=()=>{m.onClose(),r(!1),f(Z({fromDate:T,toDate:g}))};return s.useEffect(()=>{m.isOpen&&r(!0)},[m.isOpen]),s.useEffect(()=>{v(o!=null&&o.fromDate?O(o==null?void 0:o.fromDate).format("MM/DD/yyyy"):""),x(o!=null&&o.toDate?O(o==null?void 0:o.toDate).format("MM/DD/yyyy"):"")},[o]),e.jsx(e.Fragment,{children:e.jsxs(K,{title:"Advanced Filter Selection Page",isOpen:t,portalClassName:"w30",footer:e.jsx(st,{onCancel:S,onSaveClick:N,onClearFilers:u}),onClose:S,onRequestClose:S,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:"From Date"})}),e.jsx(de,{placeholder:"Pick a From Date",onChange:D=>{console.log(D,"From Date"),v(D?O(D).format("MM/DD/yyyy"):void 0)},value:T,defaultValue:T})]}),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:"To Date"})}),e.jsx(de,{placeholder:"Pick a TO Date",onChange:D=>{x(D?O(D).format("MM/DD/yyyy"):void 0)},value:g,defaultValue:g})]})]})})};W("users",ge);const it=m=>{const[f,t]=s.useState(!1),[r,o]=s.useState([]),T=q();s.useState([]);const[v,g]=s.useState(""),[x,S]=s.useState([""]),[u,N]=s.useState([]);s.useEffect(()=>{D()},[f]);const D=()=>{const n=fe({});T(n)},h=(n,l)=>{const p=[...x];p[l]=n,S(p)},j=()=>{x&&x[0].trim()!==""&&(N([...u,{userId:void 0,email:x[0]}]),S([""]))},y=xe(n=>{var p,L,b;return(b=(L=(p=n.users)==null?void 0:p.data)==null?void 0:L.usersList)==null?void 0:b.map(k=>({value:k.id,label:k.firstName+" "+k.lastName+" ("+k.email+")"}))}),{onDrawerClose:F}=m,i=()=>{r&&(u.find(n=>n.userId===r.value)||N([...u,{userId:r.value,email:r.label}]),o(null))},a=()=>{console.log("selectedUser",r,"comments",v,"props.fromDate",m.fromDate,"props.toDate",m.toDate);const n={StartDate:new Date(m.fromDate),EndDate:new Date(m.toDate),TimeLogIds:m.selectedRowId.map(l=>l.id),ApprovalUsers:u};Qe(n).then(l=>{l.success&&(P.push(e.jsx(V,{title:"Success",type:"success",duration:2500,children:"Sent for approval Successfully"}),{placement:"top-center"}),F(!0))}).catch(l=>{console.log("category - error",l);var p=l.response.data;P.push(e.jsx(V,{title:"Error",type:"danger",duration:2500,children:p.message}),{placement:"top-center"})})},d=n=>{console.log("onRemoveUserByIndex",n);const l=u.filter((p,L)=>L!==n);N(l)};return e.jsx(e.Fragment,{children:e.jsxs(pe,{children:[e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-1 gap-4",children:e.jsxs("div",{className:"lg:col-span-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-bold",children:"From Date"}),e.jsx(R,{placeholder:"",readOnly:!0,value:m.fromDate,style:{marginBottom:"10px",marginTop:"10px"}})]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold",children:"To Date"}),e.jsx(R,{placeholder:"",readOnly:!0,value:m.toDate,style:{marginBottom:"10px",marginTop:"10px"}})]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold",children:"Select Users"}),e.jsx("div",{style:{marginBottom:"10px",marginTop:"10px"},children:e.jsx(ue,{name:"Users",placeholder:"Select Users",options:y,components:{DropdownIndicator:null,IndicatorSeparator:null},onChange:n=>{console.log("option",n),o(n)}})}),e.jsx(w,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:i,children:"Add User"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold",children:"Enter Emails"}),x.map((n,l)=>e.jsx(R,{placeholder:"Enter email",value:n,onChange:p=>h(p.target.value,l),style:{marginBottom:"10px",marginTop:"10px"}},l)),e.jsx("div",{children:e.jsx(w,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:j,children:"Add Email"})})]}),u&&u.length>0&&e.jsxs("table",{className:"w-full",style:{borderCollapse:"collapse",marginTop:"20px"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"text-left",style:{width:"10%",borderBottom:"1px solid #ccc",padding:"8px"},children:"#"}),e.jsx("th",{className:"text-left",style:{width:"75%",borderBottom:"1px solid #ccc",padding:"8px"},children:"Approval Users"}),e.jsx("th",{className:"text-left",style:{width:"15%",borderBottom:"1px solid #ccc",padding:"8px"}})]})}),e.jsx("tbody",{children:u.map((n,l)=>e.jsxs("tr",{children:[e.jsx("td",{style:{borderBottom:"1px solid #eee",padding:"8px"},children:l+1}),e.jsx("td",{style:{borderBottom:"1px solid #eee",padding:"8px"},children:n.email}),e.jsx("td",{style:{borderBottom:"1px solid #eee",padding:"8px"},children:e.jsx("button",{onClick:()=>d(l),children:e.jsx(X,{})})})]},n.value))})]}),e.jsxs("div",{className:"pb-2",style:{paddingTop:"20px"},children:[e.jsx("div",{className:"font-bold",children:"Comments"}),e.jsx(R,{placeholder:"",textArea:!0,value:v,onChange:n=>g(n.target.value)})]})]})}),e.jsx(he,{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.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(w,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:F,children:"Discard"}),e.jsx(w,{size:"sm",variant:"solid",onClick:a,icon:e.jsx(je,{}),disabled:!(u&&u.length>0),type:"button",children:"Save"})]})})]})})},rt=m=>{var y,F,i,a,d,n;const{onDrawerClose:f,customerId:t,onContactCreated:r,isfromDropdown:o=!1,newContactName:T=""}=m;me();const v=q();s.useState(!1);const{auth:g}=Re.getState(),x=((F=(y=g==null?void 0:g.session)==null?void 0:y.userId)==null?void 0:F.toString())??"",S=((a=(i=g==null?void 0:g.user)==null?void 0:i.userName)==null?void 0:a.toString())??"",u=((n=(d=g==null?void 0:g.user)==null?void 0:d.email)==null?void 0:n.toString())??"",N=async l=>await Ze(l),D=()=>{v(J({}))},h=async(l,p)=>{p(!0),console.log("values",l);const L={startTime:l.startTime?O(new Date(l.startTime)).format("yyyy-MM-DDTHH:mm:ss"):"",endTime:l.endTime?O(new Date(l.endTime)).format("yyyy-MM-DDTHH:mm:ss"):"",timeLogDescription:l.timeLogDescription??"",timeLogType:1,userId:l.userId.value};N(L).then(b=>{b.success&&(P.push(e.jsx(V,{title:"Success",type:"success",duration:2500,children:"Time log Successfully Added"}),{placement:"top-center"}),r&&r(b==null?void 0:b.data),D(),f())}).catch(b=>{var k=b.response.data;p(!1),P.push(e.jsx(V,{title:"Error",type:"danger",duration:2500,children:k.message}),{placement:"top-center"})})},j=()=>{f()};return e.jsx(e.Fragment,{children:e.jsx(G,{type:"new",onFormSubmit:h,onDiscard:j,initialData:{firstName:"",lastName:"",email:"",type:"",endTime:"",startTime:"",timeLogDescription:"",duration:"",userId:{value:x,label:S+" ("+u+")"}}})})},ot=[{key:"auto",name:"Immediately"},{key:"onClick",name:"On Button Click"}],nt=[{key:"dragAndDrop",name:"Drag and drop"},{key:"select",name:"Select"}],lt=["nextColumn","widget"],dt={edit:!0,delete:!0,view:!1,isApprove:!1};W("TimeLogData",Ae);const Zt=()=>{const[m,f]=s.useState([]),[t,r]=s.useState(!1);s.useState(!1);const[o,T]=s.useState(!1),[v,g]=s.useState(!1),[x,S]=s.useState(),[u,N]=s.useState(),[D,h]=s.useState(!1),[j,y]=s.useState(!1),F=()=>{T(!0)},i=()=>{T(!1)},[a,d]=s.useState(!0),[n,l]=s.useState(!0),[p,L]=s.useState(ot[0].key),b=s.useRef(null);s.useState(lt[0]),s.useState(nt[1].key),s.useState(!0),s.useState(!0),s.useState(!0),s.useState(!0);const k=me();s.useState("");const U=q(),C=z(c=>{var E,H;return(H=(E=c==null?void 0:c.TimeLogData)==null?void 0:E.data)==null?void 0:H.filterData}),{loading:ye}=z(c=>c.TimeLogData.data),ee=z(c=>c.TimeLogData.data.TimeLogtDataList);Oe();const{pageIndex:te,pageSize:se,sort:ae,query:De,total:ct}=z(c=>c.TimeLogData.data.tableData);s.useEffect(()=>{Q()},[te,se,ae,t,C]);const Q=()=>{const c=J({pageIndex:te,pageSize:se,sort:ae,query:De,filterData:C});U(c)},$=s.useCallback(()=>{var c;(c=b==null?void 0:b.current)==null||c.instance().clearFilter()},[]);s.useCallback(c=>{d(c.value),$()},[$]),s.useCallback(c=>{l(c.value),$()},[$]),s.useCallback(c=>{L(c.value)},[]);const Te=()=>{k("/app/pages/TimeLogapproval")},[ve,Se]=s.useState({pageSize:"",pageIndex:""}),be=(c,E)=>{Y.view,E===Y.edit&&(S(c.id),N(c),U(re(c)),g(!0)),E===Y.delete&&(U(Me(!0)),U(re(c))),E===Y.isApprove&&_e(c.id).then(H=>{H.success?(ce("Approved"),Q()):ce("Error in approving the records, please try again","error")})},ie=()=>{g(!1)},Ce=[{dataField:"Action",caption:"Action",width:"130",cellRender:c=>e.jsx("div",{id:"mAction","data-cname":"Action",children:e.jsx(Ue,{row:c==null?void 0:c.data,actions:dt,buttonClick:be})})},{dataField:"fullName",caption:"Full Name",width:"200"},{dataField:"email",caption:"Email",width:"200"},{dataField:"timeLogTypeName",caption:"Type",width:"200"},{dataField:"startTime",caption:"Start Time",width:"200",dataType:"datetime",format:"MM/dd/yyyy hh:mm a"},{dataField:"endTime",caption:"End Time",width:"200",dataType:"datetime",format:"MM/dd/yyyy hh:mm a"},{dataField:"timeLogDescription",caption:"Time Log Description",width:"200"},{dataField:"duration",caption:"Duration",width:"200"},{dataField:"approvedStatus",caption:"Approved",width:"200"},{dataField:"createdDate",caption:"Created On",width:"150",dataType:"date",format:"MM/dd/yyyy"}],Fe=()=>{h(!1)},Ne=()=>{h(!0)},Le=()=>{y(!0)},we=c=>{console.log("closeSendApprovalDrawer",c),c&&Q(),y(!1)},ke=()=>{U(Z({fromDate:void 0,toDate:void 0}))};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[e.jsx(Ie,{items:[{label:"Timesheets"},{label:"Time Logs"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Time Logs"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center gap-2",children:[e.jsx(w,{style:{marginRight:"0.5rem"},onClick:()=>F(),block:!0,variant:"solid",size:"sm",children:"Add TimeLog"}),e.jsx(K,{title:"Add Timelogs",isOpen:o,onClose:i,portalClassName:"w30",children:e.jsx(rt,{onDrawerClose:i})}),e.jsx(w,{style:{marginRight:"0.5rem"},onClick:()=>Te(),block:!0,variant:"solid",size:"sm",children:"View TimeLog Approvals"}),e.jsx(w,{onClick:()=>Le(),block:!0,variant:"solid",size:"sm",icon:e.jsx(qe,{}),disabled:!(C&&C.fromDate&&C.toDate&&ee.length>0),children:"Send For Approval"})]}),e.jsx(K,{title:"Approve List",isOpen:j,onClose:i,portalClassName:"w30",children:e.jsx(it,{fromDate:C==null?void 0:C.fromDate,toDate:C==null?void 0:C.toDate,selectedRowId:m,onDrawerClose:we})}),e.jsx(K,{title:"Edit Timelog",isOpen:v,onClose:ie,portalClassName:"w30",children:e.jsx(tt,{id:x,rowData:u,onDrawerClose:ie})})]})]}),C&&C.fromDate&&C.toDate&&e.jsx(B,{className:"m-6 h-full py-4 px-6 bg-transparent pb-0",bodyClass:"h-full",children:e.jsx(B,{className:"borderless",style:{textAlign:"right"},children:e.jsxs("div",{children:[e.jsx("b",{children:"Selected Date Range"})," : ",C.fromDate," - ",C.toDate," | ",e.jsx("button",{title:"Remove Filter",onClick:ke,children:e.jsx(X,{})})]})})}),e.jsx(B,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:e.jsx(B,{className:"borderless",children:e.jsx(Be,{columns:Ce,tableName:"time-log-list",data:ee||[],height:"calc(100vh - 320px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:m,setSelectedRowId:f,setFilterValues:()=>{},filterValues:[],identity:"Lead-Listing",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"app-key-Listing-table",handleSearch:()=>{},isColumnResizing:!0,pager:ve,setPager:Se,isPaginationReq:!0,openFilter:Ne,isFilterReq:!0,isLoading:ye})})}),e.jsx(at,{isOpen:D,onClose:Fe})]})};export{Zt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{cr as s}from"./index-3b5ce20a.js";async function i(e){return(await s.apiV10TimeLogAddTimeLogPost(e)).data}async function n(e){return(await s.apiV10TimeLogGetAllLogsPost(e)).data}async function p(e){return(await s.apiV10TimeLogGetTimeLogByIdIdGet(e)).data}async function r(e,o){return(await s.apiV10TimeLogUpdateTimeLogIdPut(e,o)).data}async function L(e){return(await s.apiV10TimeLogDeleteTimeLogIdDelete(e)).data}async function m(e){return(await s.apiV10TimeLogApproveTimeLogIdPut(e)).data}async function c(e){return(await s.apiV10TimeLogSendTimeLogForApprovalPost(e)).data}async function g(e){return(await s.apiV10TimeLogGetTimeLogApprovalListByUserIdIdGet(e)).data}async function T(e){return(await s.apiV10TimeLogGetTimeLogForApprovalListByBatchIdIdGet(e)).data}async function d(e){return(await s.apiV10TimeLogApproveTimeLogPost(e)).data}async function u(e){return(await s.apiV10TimeLogGetAnonymousUserTimeLogForApprovalListByTokenPost(e)).data}async function y(e){return(await s.apiV10TimeLogApproveAnonymousUserTimeLogPost(e)).data}async function A(e){return(await s.apiV10TimeLogGetAllTimeLogApprovalListsGet(e)).data}export{u as a,y as b,n as c,g as d,p as e,T as f,A as g,r as h,L as i,c as j,i as k,m as l,d as m};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-mui-98daa63f.js";import{A as l}from"./AdaptableCard-3d1e1f96.js";import{P as c}from"./PageBreadcrumb-cf54a6e9.js";import{f as T,r as o}from"./vendor-react-ece1c85f.js";import{o as x,s as d}from"./vendor-devex-4076ffeb.js";import{a0 as a,r as i,B as n,d as m}from"./index-3b5ce20a.js";import"./Alert-59d09a99.js";import"./index-7596c6bb.js";import"./index-a14e51de.js";import{D as Z}from"./Drawer-4f97e662.js";import"./FormContainer-9a52b9e8.js";import"./Switcher-e2fba588.js";import"./index-289b3fd9.js";import"./Upload-be937eb6.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";const u=[{text:"Google AdWords Strategy",ownerId:[2],startDate:new Date("2024-02-01T16:00:00.000Z"),endDate:new Date("2024-12-01T17:30:00.000Z"),priority:1},{text:"New Brochures",ownerId:[1],startDate:new Date("2024-12-01T18:30:00.000Z"),endDate:new Date("2024-12-01T21:15:00.000Z"),priority:2},{text:"Brochure Design Review",ownerId:[4],startDate:new Date("2024-12-01T20:15:00.000Z"),endDate:new Date("2024-12-01T23:15:00.000Z"),priority:1},{text:"Website Re-Design Plan",ownerId:[3],startDate:new Date("2024-12-01T23:45:00.000Z"),endDate:new Date("2024-12-02T18:15:00.000Z"),priority:2},{text:"Rollout of New Website and Marketing Brochures",ownerId:[1],startDate:new Date("2024-12-02T15:15:00.000Z"),endDate:new Date("2024-12-02T17:45:00.000Z"),priority:2},{text:"Update Sales Strategy Documents",ownerId:[2],startDate:new Date("2024-12-02T19:00:00.000Z"),endDate:new Date("2024-12-02T20:45:00.000Z"),priority:1},{text:"Non-Compete Agreements",ownerId:[4],startDate:new Date("2024-12-03T16:15:00.000Z"),endDate:new Date("2024-12-03T17:00:00.000Z"),priority:1},{text:"Approve Hiring of John Jeffers",ownerId:[2],startDate:new Date("2024-12-03T17:00:00.000Z"),endDate:new Date("2024-12-03T18:15:00.000Z"),priority:2},{text:"Update NDA Agreement",ownerId:[1],startDate:new Date("2024-12-03T18:45:00.000Z"),endDate:new Date("2024-12-03T20:45:00.000Z"),priority:2},{text:"Update Employee Files with New NDA",ownerId:[2],startDate:new Date("2024-12-03T21:00:00.000Z"),endDate:new Date("2024-12-03T23:45:00.000Z"),priority:1},{text:"Submit Questions Regarding New NDA",ownerId:[1],startDate:new Date("2024-12-05T01:00:00.000Z"),endDate:new Date("2024-12-04T16:30:00.000Z"),priority:1},{text:"Submit Signed NDA",ownerId:[2],startDate:new Date("2024-12-04T19:45:00.000Z"),endDate:new Date("2024-12-04T21:00:00.000Z"),priority:1},{text:"Review Revenue Projections",ownerId:[3],startDate:new Date("2024-12-05T00:15:00.000Z"),endDate:new Date("2024-12-04T15:00:00.000Z"),priority:2},{text:"Comment on Revenue Projections",ownerId:[2],startDate:new Date("2024-12-05T16:15:00.000Z"),endDate:new Date("2024-12-05T18:15:00.000Z"),priority:1},{text:"Provide New Health Insurance Docs",ownerId:[3],startDate:new Date("2024-12-05T19:45:00.000Z"),endDate:new Date("2024-12-05T21:15:00.000Z"),priority:2},{text:"Review Changes to Health Insurance Coverage",ownerId:[2],startDate:new Date("2024-12-05T21:15:00.000Z"),endDate:new Date("2024-12-05T22:30:00.000Z"),priority:1},{text:"Review Training Course for any Omissions",ownerId:[2],startDate:new Date("2024-12-08T21:00:00.000Z"),endDate:new Date("2024-12-09T19:00:00.000Z"),priority:2},{text:"Recall Rebate Form",ownerId:[1],startDate:new Date("2024-12-08T19:45:00.000Z"),endDate:new Date("2024-12-08T20:15:00.000Z"),priority:1},{text:"Create Report on Customer Feedback",ownerId:[4],startDate:new Date("2024-12-09T22:15:00.000Z"),endDate:new Date("2024-12-10T00:30:00.000Z"),priority:2},{text:"Review Customer Feedback Report",ownerId:[2],startDate:new Date("2024-12-09T23:15:00.000Z"),endDate:new Date("2024-12-10T01:30:00.000Z"),priority:1},{text:"Customer Feedback Report Analysis",ownerId:[3],startDate:new Date("2024-12-10T16:30:00.000Z"),endDate:new Date("2024-12-10T17:30:00.000Z"),priority:1},{text:"Prepare Shipping Cost Analysis Report",ownerId:[4],startDate:new Date("2024-12-10T19:30:00.000Z"),endDate:new Date("2024-12-10T20:30:00.000Z"),priority:1},{text:"Provide Feedback on Shippers",ownerId:[2],startDate:new Date("2024-12-10T21:15:00.000Z"),endDate:new Date("2024-12-10T23:00:00.000Z"),priority:2},{text:"Select Preferred Shipper",ownerId:[1],startDate:new Date("2024-12-11T00:30:00.000Z"),endDate:new Date("2024-12-11T03:00:00.000Z"),priority:1},{text:"Complete Shipper Selection Form",ownerId:[2],startDate:new Date("2024-12-11T15:30:00.000Z"),endDate:new Date("2024-12-11T17:00:00.000Z"),priority:2},{text:"Upgrade Server Hardware",ownerId:[4],startDate:new Date("2024-12-11T19:00:00.000Z"),endDate:new Date("2024-12-11T21:15:00.000Z"),priority:1},{text:"Upgrade Personal Computers",ownerId:[3],startDate:new Date("2024-12-11T21:45:00.000Z"),endDate:new Date("2024-12-11T23:30:00.000Z"),priority:1},{text:"Upgrade Apps to Windows RT or stay with WinForms",ownerId:[1],startDate:new Date("2024-12-12T17:30:00.000Z"),endDate:new Date("2024-12-12T20:00:00.000Z"),priority:1},{text:"Estimate Time Required to Touch-Enable Apps",ownerId:[1],startDate:new Date("2024-12-12T21:45:00.000Z"),endDate:new Date("2024-12-12T23:30:00.000Z"),priority:1},{text:"Report on Tranistion to Touch-Based Apps",ownerId:[2],startDate:new Date("2024-12-13T01:30:00.000Z"),endDate:new Date("2024-12-13T02:00:00.000Z"),priority:1},{text:"Submit New Website Design",ownerId:[2],startDate:new Date("2024-12-15T15:00:00.000Z"),endDate:new Date("2024-12-15T17:00:00.000Z"),priority:2},{text:"Create Icons for Website",ownerId:[4],startDate:new Date("2024-12-15T18:30:00.000Z"),endDate:new Date("2024-12-15T20:15:00.000Z"),priority:1},{text:"Create New Product Pages",ownerId:[1],startDate:new Date("2024-12-16T16:45:00.000Z"),endDate:new Date("2024-12-16T18:45:00.000Z"),priority:2},{text:"Approve Website Launch",ownerId:[3],startDate:new Date("2024-12-16T19:00:00.000Z"),endDate:new Date("2024-12-16T22:15:00.000Z"),priority:1},{text:"Update Customer Shipping Profiles",ownerId:[3],startDate:new Date("2024-12-17T16:30:00.000Z"),endDate:new Date("2024-12-17T18:00:00.000Z"),priority:1},{text:"Create New Shipping Return Labels",ownerId:[4],startDate:new Date("2024-12-17T19:45:00.000Z"),endDate:new Date("2024-12-17T21:00:00.000Z"),priority:1},{text:"Get Design for Shipping Return Labels",ownerId:[3],startDate:new Date("2024-12-17T22:00:00.000Z"),endDate:new Date("2024-12-17T23:30:00.000Z"),priority:1},{text:"PSD needed for Shipping Return Labels",ownerId:[4],startDate:new Date("2024-12-18T15:30:00.000Z"),endDate:new Date("2024-12-18T16:15:00.000Z"),priority:2},{text:"Contact ISP and Discuss Payment Options",ownerId:[1],startDate:new Date("2024-12-18T18:30:00.000Z"),endDate:new Date("2024-12-18T23:00:00.000Z"),priority:2},{text:"Prepare Year-End Support Summary Report",ownerId:[2],startDate:new Date("2024-12-19T00:00:00.000Z"),endDate:new Date("2024-12-19T03:00:00.000Z"),priority:1},{text:"Review New Training Material",ownerId:[3],startDate:new Date("2024-12-19T15:00:00.000Z"),endDate:new Date("2024-12-19T16:15:00.000Z"),priority:2},{text:"Distribute Training Material to Support Staff",ownerId:[2],startDate:new Date("2024-12-19T19:45:00.000Z"),endDate:new Date("2024-12-19T21:00:00.000Z"),priority:1},{text:"Training Material Distribution Schedule",ownerId:[2],startDate:new Date("2024-12-19T21:15:00.000Z"),endDate:new Date("2024-12-19T23:15:00.000Z"),priority:1},{text:"Approval on Converting to New HDMI Specification",ownerId:[4],startDate:new Date("2024-12-22T16:30:00.000Z"),endDate:new Date("2024-12-22T17:15:00.000Z"),priority:2},{text:"Create New Spike for Automation Server",ownerId:[3],startDate:new Date("2024-12-22T17:00:00.000Z"),endDate:new Date("2024-12-22T19:30:00.000Z"),priority:2},{text:"Code Review - New Automation Server",ownerId:[1],startDate:new Date("2024-12-22T20:00:00.000Z"),endDate:new Date("2024-12-22T22:00:00.000Z"),priority:1},{text:"Confirm Availability for Sales Meeting",ownerId:[1],startDate:new Date("2024-12-23T17:15:00.000Z"),endDate:new Date("2024-12-23T22:15:00.000Z"),priority:2},{text:"Reschedule Sales Team Meeting",ownerId:[2],startDate:new Date("2024-12-23T23:15:00.000Z"),endDate:new Date("2024-12-24T01:00:00.000Z"),priority:2},{text:"Send 2 Remotes for Giveaways",ownerId:[3],startDate:new Date("2024-12-24T16:30:00.000Z"),endDate:new Date("2024-12-24T18:45:00.000Z"),priority:1},{text:"Discuss Product Giveaways with Management",ownerId:[1],startDate:new Date("2024-12-24T19:15:00.000Z"),endDate:new Date("2024-12-24T23:45:00.000Z"),priority:2},{text:"Replace Desktops on the 3rd Floor",ownerId:[2],startDate:new Date("2024-12-25T16:30:00.000Z"),endDate:new Date("2024-12-25T17:45:00.000Z"),priority:1},{text:"Update Database with New Leads",ownerId:[3],startDate:new Date("2024-12-25T19:00:00.000Z"),endDate:new Date("2024-12-25T21:15:00.000Z"),priority:2},{text:"Mail New Leads for Follow Up",ownerId:[1],startDate:new Date("2024-12-25T21:45:00.000Z"),endDate:new Date("2024-12-25T22:30:00.000Z"),priority:2},{text:"Send Territory Sales Breakdown",ownerId:[2],startDate:new Date("2024-12-26T01:00:00.000Z"),endDate:new Date("2024-12-26T03:00:00.000Z"),priority:1},{text:"Territory Sales Breakdown Report",ownerId:[1],startDate:new Date("2024-12-26T15:45:00.000Z"),endDate:new Date("2024-12-26T16:45:00.000Z"),priority:1},{text:"Report on the State of Engineering Dept",ownerId:[3],startDate:new Date("2024-12-26T21:45:00.000Z"),endDate:new Date("2024-12-26T22:30:00.000Z"),priority:2},{text:"Staff Productivity Report",ownerId:[4],startDate:new Date("2024-12-26T23:15:00.000Z"),endDate:new Date("2024-12-27T02:30:00.000Z"),priority:2}],h=[{text:"Samantha Bright",id:1,color:"#cb6bb2"},{text:"John Heart",id:2,color:"#56ca85"},{text:"Todd Hoffman",id:3,color:"#1e90ff"},{text:"Sandra Johnson",id:4,color:"#ff9747"}],y=[{text:"Low Priority",id:1,color:"#1e90ff"},{text:"High Priority",id:2,color:"#ff9747"}],f=s=>{T(),o.useState(!1);const t=[{value:"ocean",label:"Ocean",color:"#00B8D9"},{value:"blue",label:"Blue",color:"#0052CC"},{value:"purple",label:"Purple",color:"#5243AA"},{value:"red",label:"Red",color:"#FF5630"},{value:"orange",label:"Orange",color:"#FF8B00"},{value:"yellow",label:"Yellow",color:"#FFC400"},{value:"green",label:"Green",color:"#36B37E"},{value:"forest",label:"Forest",color:"#00875A"},{value:"slate",label:"Slate",color:"#253858"},{value:"silver",label:"Silver",color:"#666666"}];return e.jsx(e.Fragment,{children:e.jsxs("div",{children:[e.jsxs("div",{className:"pb-2",children:[e.jsx("div",{className:"font-bold",children:"Account Name"}),e.jsx(a,{placeholder:""})]}),e.jsxs("div",{className:"pb-2",children:[e.jsx("div",{className:"font-bold",children:"Parent Account"}),e.jsx(i,{placeholder:"Please Select",options:t})]}),e.jsxs("div",{className:"pb-2",children:[e.jsx("div",{className:"font-bold",children:"Address"}),e.jsx(a,{placeholder:"",textArea:!0})]}),e.jsxs("div",{className:"lg:flex md:flex-none sm:flex-none pb-2",children:[e.jsxs("div",{className:"lg:w-1/3 md:w-full sm:w-full pr-4",children:[e.jsx("div",{className:"font-bold",children:"City"}),e.jsx(a,{placeholder:""})]}),e.jsxs("div",{className:"lg:w-1/3 md:w-full sm:w-full pr-4",children:[e.jsx("div",{className:"font-bold",children:"State"}),e.jsx(i,{placeholder:"Please Select",options:t})]}),e.jsxs("div",{className:"lg:w-1/3 md:w-full sm:w-full",children:[e.jsx("div",{className:"font-bold",children:"Zipcode"}),e.jsx(a,{placeholder:""})]})]}),e.jsxs("div",{className:"pb-2",children:[e.jsx("div",{className:"font-bold",children:"Primary Contact"}),e.jsx(a,{placeholder:""})]}),e.jsxs("div",{className:"pb-2",children:[e.jsx("div",{className:"font-bold",children:"Billing Contact"}),e.jsx(i,{placeholder:"Please Select",options:t})]}),e.jsxs("div",{className:"pb-2",children:[e.jsx("div",{className:"font-bold",children:"Notes"}),e.jsx(a,{placeholder:"",textArea:!0})]})]})})},b=new Date(2024,12,1),I=["timelineDay","timelineWeek","timelineWorkWeek","timelineMonth"],v=["priority"],q=()=>{o.useState(!1),o.useState(!1);const[s,t]=o.useState(!1),D=()=>{t(!0)},r=p=>{console.log("onDrawerClose",p),t(!1)},w=e.jsxs("div",{className:"text-right w-full",children:[e.jsx(n,{size:"sm",className:"mr-2",onClick:()=>r(),children:"Cancel"}),e.jsx(n,{size:"sm",className:"mr-2",children:"Create and Add Another"}),e.jsx(n,{size:"sm",variant:"solid",onClick:()=>r(),children:"Add Event"})]});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:[e.jsx(c,{items:[{label:"Timesheets"}]}),e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Timesheet"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx(n,{onClick:()=>D(),block:!0,variant:"solid",size:"sm",icon:e.jsx(m,{}),children:"Add Timesheet"}),e.jsx(Z,{title:"Add Timesheet",isOpen:s,onClose:r,onRequestClose:r,portalClassName:"w30",footer:w,children:e.jsx(f,{})})]})]})]}),e.jsx(l,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:e.jsx(l,{className:"borderless",children:e.jsxs(x,{timeZone:"America/Chicago",dataSource:u,views:I,defaultCurrentView:"timelineMonth",defaultCurrentDate:b,height:900,groups:v,cellDuration:60,firstDayOfWeek:0,startDayHour:8,endDayHour:20,children:[e.jsx(d,{fieldExpr:"ownerId",allowMultiple:!0,dataSource:h,label:"Owner",useColorAsDefault:!0}),e.jsx(d,{fieldExpr:"priority",allowMultiple:!1,dataSource:y,label:"Priority"})]})})})]})};export{q as default};
|