@xframework-ca-test/cli 1.0.33 → 1.0.34

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.
Files changed (377) hide show
  1. package/dist/ui/assets/AIVision-0025192f.js +4 -0
  2. package/dist/ui/assets/AccountDetails-42610e44.js +1 -0
  3. package/dist/ui/assets/AccountDetails-5b4cd3f7.js +1 -0
  4. package/dist/ui/assets/AccountServices-f68f471d.js +1 -0
  5. package/dist/ui/assets/AccountsList-262479cf.js +1 -0
  6. package/dist/ui/assets/ActionLink-9db8b1c2.js +1 -0
  7. package/dist/ui/assets/AdaptableCard-3d1e1f96.js +1 -0
  8. package/dist/ui/assets/AddAccount-2cd72664.js +1 -0
  9. package/dist/ui/assets/AddEditFile-6ae10d57.js +1 -0
  10. package/dist/ui/assets/AddEditTranslation-3812ff0f.js +1 -0
  11. package/dist/ui/assets/AiApiLogList-1eac39b7.js +1 -0
  12. package/dist/ui/assets/AiCa-2e90495f.js +1 -0
  13. package/dist/ui/assets/Alert-59d09a99.js +1 -0
  14. package/dist/ui/assets/ApiService-df126758.js +1 -0
  15. package/dist/ui/assets/AppLandingPage-afcea727.js +4 -0
  16. package/dist/ui/assets/AuditLogsList-ea37686b.js +1 -0
  17. package/dist/ui/assets/Auth0Callback-00729568.js +1 -0
  18. package/dist/ui/assets/BarCodes-4ff49536.js +1 -0
  19. package/dist/ui/assets/BlankLayout-7085ab88.js +1 -0
  20. package/dist/ui/assets/{BrainServices-a4bb698e.js → BrainServices-4cb93af5.js} +1 -1
  21. package/dist/ui/assets/CalendarList-689ed66a.js +2 -0
  22. package/dist/ui/assets/CalendarList-f4a9aa21.css +8 -0
  23. package/dist/ui/assets/CategoryList-a6d01041.js +1 -0
  24. package/dist/ui/assets/CategoryList-c03f4259.js +1 -0
  25. package/dist/ui/assets/ChatContainer-fec7b84d.js +1 -0
  26. package/dist/ui/assets/ChatsList-4b3194e4.js +1 -0
  27. package/dist/ui/assets/Check-af681a30.js +1 -0
  28. package/dist/ui/assets/CheckInVideo-aa9f50b2.js +6 -0
  29. package/dist/ui/assets/ClassicLayout-a9866742.js +2 -0
  30. package/dist/ui/assets/CompanyList-94119d71.js +1 -0
  31. package/dist/ui/assets/{CompanyService-1bf7c3c8.js → CompanyService-491a9cc1.js} +1 -1
  32. package/dist/ui/assets/{Component-59e4c14b.js → Component-566d01e0.js} +1 -1
  33. package/dist/ui/assets/ConfirmDialog-2838a642.js +1 -0
  34. package/dist/ui/assets/ContactDetails-c9dc0ed1.js +1 -0
  35. package/dist/ui/assets/{ContactService-92281a90.js → ContactService-8afcaeb7.js} +1 -1
  36. package/dist/ui/assets/ContactsList-5b06c9b8.js +1 -0
  37. package/dist/ui/assets/CountiesList-18b23cf7.js +1 -0
  38. package/dist/ui/assets/CountyDetails-ea024f14.js +1 -0
  39. package/dist/ui/assets/CourseDetails-8a5f8d63.js +1 -0
  40. package/dist/ui/assets/CourseList-3564fec3.js +1 -0
  41. package/dist/ui/assets/{CourseService-f0dc3bf1.js → CourseService-29ad460c.js} +1 -1
  42. package/dist/ui/assets/CreateSignature-c22e4a71.js +7 -0
  43. package/dist/ui/assets/{CustomerInfoField-fff65ace.js → CustomerInfoField-4bf880e2.js} +1 -1
  44. package/dist/ui/assets/DeckedLayout-610fe851.js +1 -0
  45. package/dist/ui/assets/DensitySelector-5d2e901f.js +1 -0
  46. package/dist/ui/assets/{DepartmentServices-3d56a9e7.js → DepartmentServices-a53e998b.js} +1 -1
  47. package/dist/ui/assets/{DigitalSignature-fff42e33.js → DigitalSignature-69eaf80c.js} +1 -1
  48. package/dist/ui/assets/{DocumemtManagementService-6501a5c1.js → DocumemtManagementService-85cde51a.js} +1 -1
  49. package/dist/ui/assets/DocumentActivity-bc938c61.js +1 -0
  50. package/dist/ui/assets/DocumentLayout-a12982d7.js +1 -0
  51. package/dist/ui/assets/DocumentList2-9c8c6284.js +23 -0
  52. package/dist/ui/assets/DocumentLists-1cdaae06.js +1 -0
  53. package/dist/ui/assets/DocumentUserSigned-f7371fc5.js +7 -0
  54. package/dist/ui/assets/DocumentsList-3b25907c.js +1 -0
  55. package/dist/ui/assets/DoubleSidedImage-b4bd3915.js +1 -0
  56. package/dist/ui/assets/{Drawer-949c18c6.js → Drawer-4f97e662.js} +1 -1
  57. package/dist/ui/assets/DynamicDashboard-0a41d287.js +1 -0
  58. package/dist/ui/assets/{DynamicTablesService-963fe77b.js → DynamicTablesService-6aa57f52.js} +1 -1
  59. package/dist/ui/assets/EditAccount-e42d66af.js +1 -0
  60. package/dist/ui/assets/EditLead-c8c9760a.js +1 -0
  61. package/dist/ui/assets/FaqItems-25d66543.js +6 -0
  62. package/dist/ui/assets/{FileManagementServices-25fd64c5.js → FileManagementServices-19b47568.js} +1 -1
  63. package/dist/ui/assets/{FolderOpen-88bfcc74.js → FolderOpen-7b0e2ac0.js} +1 -1
  64. package/dist/ui/assets/FormContainer-9a52b9e8.js +1 -0
  65. package/dist/ui/assets/{GeneralSettings-a7f805e8.js → GeneralSettings-c8c2f051.js} +5 -5
  66. package/dist/ui/assets/GenericPage-81e41302.js +1 -0
  67. package/dist/ui/assets/GridMapDetails-38f50b3c.js +1 -0
  68. package/dist/ui/assets/HorizontalMenuContent-fd559f4d.js +1 -0
  69. package/dist/ui/assets/{ImportFile-3f60d715.js → ImportFile-026b1771.js} +1 -1
  70. package/dist/ui/assets/{InlineSignaturePad-09c06619.js → InlineSignaturePad-f5630151.js} +1 -1
  71. package/dist/ui/assets/InvoicesList-9723bc5a.js +1 -0
  72. package/dist/ui/assets/{KeyVaultService-874d83fe.js → KeyVaultService-9608f0ff.js} +1 -1
  73. package/dist/ui/assets/LeadDetails-8cdaae0e.js +1 -0
  74. package/dist/ui/assets/{LeadSourceService-e46fa85e.js → LeadSourceService-cf71ea64.js} +1 -1
  75. package/dist/ui/assets/LeadsList-1ec20a77.js +1 -0
  76. package/dist/ui/assets/Logo-dd6f7656.js +1 -0
  77. package/dist/ui/assets/MapView-dcab88b3.js +1 -0
  78. package/dist/ui/assets/MarketingPage-998d10b0.js +4 -0
  79. package/dist/ui/assets/MenuNew-79fc95f3.js +1 -0
  80. package/dist/ui/assets/{MenuTable-c2c65021.js → MenuTable-f69e0fe4.js} +1 -1
  81. package/dist/ui/assets/MessageInput-07fcc5cb.js +21 -0
  82. package/dist/ui/assets/MessagesList-21d2b034.js +1 -0
  83. package/dist/ui/assets/ModernLayout-05af7cf7.js +1 -0
  84. package/dist/ui/assets/{NoData-8c485a3a.js → NoData-4cc4af03.js} +1 -1
  85. package/dist/ui/assets/Notify-8fb74d48.js +1 -0
  86. package/dist/ui/assets/OpportunitiesList-2f96958f.js +1 -0
  87. package/dist/ui/assets/OpportunityDetails-aaec3200.js +1 -0
  88. package/dist/ui/assets/{OpportunityServices-fa4fabfd.js → OpportunityServices-c4510dd2.js} +1 -1
  89. package/dist/ui/assets/OpportunityStatus-ea3b5ee2.js +1 -0
  90. package/dist/ui/assets/PageBreadcrumb-cf54a6e9.js +1 -0
  91. package/dist/ui/assets/{Password-d9294711.js → Password-21414dc6.js} +1 -1
  92. package/dist/ui/assets/PasswordInput-333c82ca.js +1 -0
  93. package/dist/ui/assets/{PreferenceService-75bf9db6.js → PreferenceService-d2b3e003.js} +1 -1
  94. package/dist/ui/assets/Profile-8c9fd2fc.js +1 -0
  95. package/dist/ui/assets/{ReportEditor-8880f57e.js → ReportEditor-4e4f6d53.js} +3 -3
  96. package/dist/ui/assets/{ReportViewer-9f1080f7.js → ReportViewer-616d3cfc.js} +30 -30
  97. package/dist/ui/assets/RoleEdit-a076ea85.js +1 -0
  98. package/dist/ui/assets/RoleForm-47691f91.js +1 -0
  99. package/dist/ui/assets/{RoleNew-49fadb16.js → RoleNew-e86a1513.js} +1 -1
  100. package/dist/ui/assets/{RoleService-7008da2c.js → RoleService-2f9ed883.js} +1 -1
  101. package/dist/ui/assets/ScheduleCycle-0ae23631.js +1 -0
  102. package/dist/ui/assets/{ScheduleService-7228f0a3.js → ScheduleService-41a88c41.js} +1 -1
  103. package/dist/ui/assets/ScreenList-8f58150b.js +1 -0
  104. package/dist/ui/assets/Settings-fc91c9d2.js +2 -0
  105. package/dist/ui/assets/{SetupWizard-4172e377.js → SetupWizard-d1363582.js} +1 -1
  106. package/dist/ui/assets/SimpleLayout-77cfb778.js +1 -0
  107. package/dist/ui/assets/StackedSideLayout-2f1ee9d1.js +1 -0
  108. package/dist/ui/assets/StickyFooter-3e569b80.js +1 -0
  109. package/dist/ui/assets/SupportRequets-0ecd4ab8.js +1 -0
  110. package/dist/ui/assets/{Switcher-c8648037.js → Switcher-e2fba588.js} +1 -1
  111. package/dist/ui/assets/TimeLogApprovalDataList-7b49a432.js +1 -0
  112. package/dist/ui/assets/TimeLogApprovalList-78cab2b6.js +1 -0
  113. package/dist/ui/assets/TimeLogList-592b29aa.js +1 -0
  114. package/dist/ui/assets/{TimeLogService-cd7b2f61.js → TimeLogService-83166cbc.js} +1 -1
  115. package/dist/ui/assets/TimesheetsList-d1520efb.js +1 -0
  116. package/dist/ui/assets/TranslationList-88d7d5d7.js +1 -0
  117. package/dist/ui/assets/TweaksPanel-bc10bc47.js +112 -0
  118. package/dist/ui/assets/{Upload-fb34ce03.js → Upload-be937eb6.js} +4 -4
  119. package/dist/ui/assets/UserEdit-1f8208f3.js +1 -0
  120. package/dist/ui/assets/UserForm-e9b56aff.js +1 -0
  121. package/dist/ui/assets/{UserNew-b36c342c.js → UserNew-31fa258f.js} +1 -1
  122. package/dist/ui/assets/{UserService-047aef51.js → UserService-1b93ceb0.js} +1 -1
  123. package/dist/ui/assets/ViewTimeLogForApproval-ae077050.js +1 -0
  124. package/dist/ui/assets/Views-1359da48.js +1 -0
  125. package/dist/ui/assets/WelcomeList-dc8666ec.js +9 -0
  126. package/dist/ui/assets/WidgetLayoutsService-49730609.js +1 -0
  127. package/dist/ui/assets/{WrapperCell-a7981b07.js → WrapperCell-3d5592cf.js} +1 -1
  128. package/dist/ui/assets/actioncell-6b5ebd6c.js +1 -0
  129. package/dist/ui/assets/{ar-3c9c213e.js → ar-fb4f0ea8.js} +1 -1
  130. package/dist/ui/assets/calendarList-ac838a86.js +2 -0
  131. package/dist/ui/assets/{cjs-162261df.js → cjs-998de55c.js} +1 -1
  132. package/dist/ui/assets/createSvgIcon-aba65987.js +1 -0
  133. package/dist/ui/assets/documentsList-4e2e061e.js +1 -0
  134. package/dist/ui/assets/{es-be649ede.js → es-cd58d3ad.js} +1 -1
  135. package/dist/ui/assets/{esm-f306d015.js → esm-c40433f8.js} +1 -1
  136. package/dist/ui/assets/gridList-e1571c87.js +1 -0
  137. package/dist/ui/assets/gridMapTable-d95f9c70.js +1 -0
  138. package/dist/ui/assets/{index-f6be0390.js → index-00a8eb64.js} +1 -1
  139. package/dist/ui/assets/index-04438b6b.js +22 -0
  140. package/dist/ui/assets/index-058738bc.js +1 -0
  141. package/dist/ui/assets/{index-e4c6057f.js → index-0b08ce18.js} +1 -1
  142. package/dist/ui/assets/index-0d730815.js +4 -0
  143. package/dist/ui/assets/index-0efcf53a.js +1 -0
  144. package/dist/ui/assets/index-0f432250.js +1 -0
  145. package/dist/ui/assets/{index-cebd880b.js → index-0fd6e996.js} +1 -1
  146. package/dist/ui/assets/{index-49a94e54.js → index-11297f4a.js} +1 -1
  147. package/dist/ui/assets/index-14c1c1d7.js +1 -0
  148. package/dist/ui/assets/index-15e1f4be.js +1 -0
  149. package/dist/ui/assets/index-16586c21.js +1 -0
  150. package/dist/ui/assets/index-19346c14.js +1 -0
  151. package/dist/ui/assets/{index-16bb10a6.js → index-1dc2b9d2.js} +1 -1
  152. package/dist/ui/assets/index-211fbe21.js +1 -0
  153. package/dist/ui/assets/index-23e16bff.js +1 -0
  154. package/dist/ui/assets/index-27aef8b5.js +1 -0
  155. package/dist/ui/assets/{index-36228db5.js → index-289b3fd9.js} +1 -1
  156. package/dist/ui/assets/{index-a22a3546.js → index-2dae59b1.js} +1 -1
  157. package/dist/ui/assets/index-353fd6dd.js +1 -0
  158. package/dist/ui/assets/{index-ea125a16.js → index-359d245d.js} +1 -1
  159. package/dist/ui/assets/{index-c62ac197.js → index-3b5ce20a.js} +70 -62
  160. package/dist/ui/assets/index-3b929ba4.js +34 -0
  161. package/dist/ui/assets/index-42e3a337.js +1 -0
  162. package/dist/ui/assets/index-44b6de3a.js +1 -0
  163. package/dist/ui/assets/index-46d3ca9a.js +7 -0
  164. package/dist/ui/assets/{index-e3cc723f.js → index-49016ad0.js} +1 -1
  165. package/dist/ui/assets/index-51132258.js +1 -0
  166. package/dist/ui/assets/{index-dc103f22.js → index-52963879.js} +1 -1
  167. package/dist/ui/assets/{index-fcc1c999.js → index-533fd007.js} +1 -1
  168. package/dist/ui/assets/index-59ec468b.js +13 -0
  169. package/dist/ui/assets/index-5e2d5279.js +1 -0
  170. package/dist/ui/assets/{index-d17da176.js → index-62f95885.js} +1 -1
  171. package/dist/ui/assets/index-659c6412.js +1 -0
  172. package/dist/ui/assets/index-6873dfc3.js +1 -0
  173. package/dist/ui/assets/index-69a68d9e.js +1 -0
  174. package/dist/ui/assets/index-6a6902c7.js +1 -0
  175. package/dist/ui/assets/index-7596c6bb.js +1 -0
  176. package/dist/ui/assets/{index-47dcc43a.js → index-8045c5f0.js} +1 -1
  177. package/dist/ui/assets/{index-b028e652.js → index-8677acd1.js} +1 -1
  178. package/dist/ui/assets/{index-42e65911.js → index-88c52b97.js} +1 -1
  179. package/dist/ui/assets/index-89cfefab.js +1 -0
  180. package/dist/ui/assets/{index-bea4c3dc.js → index-8c0643fd.js} +1 -1
  181. package/dist/ui/assets/index-8d5b6a1f.js +1 -0
  182. package/dist/ui/assets/index-8d5d70f9.js +1 -0
  183. package/dist/ui/assets/{index-9b41371d.js → index-91505016.js} +1 -1
  184. package/dist/ui/assets/{index-ffc00dbb.js → index-92314073.js} +1 -1
  185. package/dist/ui/assets/index-985cf3f6.js +1 -0
  186. package/dist/ui/assets/index-a14e51de.js +1 -0
  187. package/dist/ui/assets/index-a733f80b.js +1 -0
  188. package/dist/ui/assets/index-a84d5808.js +1 -0
  189. package/dist/ui/assets/index-acac6006.js +1 -0
  190. package/dist/ui/assets/index-b0ef7ac3.js +1 -0
  191. package/dist/ui/assets/index-b6ef5984.js +1 -0
  192. package/dist/ui/assets/{index-fc9071e0.js → index-bd4edda3.js} +1 -1
  193. package/dist/ui/assets/{index-0ec72c4b.js → index-c29b8474.js} +1 -1
  194. package/dist/ui/assets/index-c88c7790.js +19 -0
  195. package/dist/ui/assets/index-ce89a95e.css +7 -0
  196. package/dist/ui/assets/index-d221d69e.js +1 -0
  197. package/dist/ui/assets/{index-f1576468.js → index-d33facae.js} +1 -1
  198. package/dist/ui/assets/index-e46c57a5.js +1 -0
  199. package/dist/ui/assets/index-e863817c.js +1 -0
  200. package/dist/ui/assets/index-f4af2342.js +1 -0
  201. package/dist/ui/assets/{index-77e820d0.js → index-fc9f8c4b.js} +1 -1
  202. package/dist/ui/assets/{index-ec2010d2.js → index-ff23edc5.js} +1 -1
  203. package/dist/ui/assets/{index.esm-70ab539c.js → index.esm-b2d342b5.js} +1 -1
  204. package/dist/ui/assets/liveLocation-8e0bb2f3.js +1 -0
  205. package/dist/ui/assets/{mapView-ab35acaa.js → mapView-c8063ed6.js} +1 -1
  206. package/dist/ui/assets/modeuls-setup-4b06843c.js +1 -0
  207. package/dist/ui/assets/{permissionHoc-6f787658.js → permissionHoc-0818bfb0.js} +1 -1
  208. package/dist/ui/assets/{react-21134174.js → react-12ddbe48.js} +1 -1
  209. package/dist/ui/assets/{react-4d5dc208.js → react-61e0b284.js} +1 -1
  210. package/dist/ui/assets/{strongPassword-bbec776a.js → strongPassword-6bc8786f.js} +1 -1
  211. package/dist/ui/assets/{styles-0608350c.js → styles-b7ae7bf6.js} +1 -1
  212. package/dist/ui/assets/{tableV2-4d1c9fd2.js → tableV2-99c808c0.js} +1 -1
  213. package/dist/ui/assets/tableV3-24eed052.js +1 -0
  214. package/dist/ui/assets/ticketRequestDetails-8b299fbd.js +1 -0
  215. package/dist/ui/assets/{useDidUpdate-25c4d4ed.js → useDidUpdate-de319a18.js} +1 -1
  216. package/dist/ui/assets/{useDrop-02b0e5d7.js → useDrop-8f0d11a7.js} +1 -1
  217. package/dist/ui/assets/useFilteredData-e8fad668.js +1 -0
  218. package/dist/ui/assets/{usePermission-d94b4984.js → usePermission-4689548c.js} +1 -1
  219. package/dist/ui/assets/{vendor-charts-eccea5d1.js → vendor-charts-4be0b5ab.js} +1 -1
  220. package/dist/ui/assets/{vendor-codemirror-c8203b49.js → vendor-codemirror-1a1216c9.js} +11 -11
  221. package/dist/ui/assets/{vendor-devex-33a39e11.js → vendor-devex-4076ffeb.js} +2 -2
  222. package/dist/ui/assets/{vendor-excel-ee8fc4e5.js → vendor-excel-3b3553df.js} +1 -1
  223. package/dist/ui/assets/{vendor-i18n-2fcb1983.js → vendor-i18n-b89304ef.js} +1 -1
  224. package/dist/ui/assets/vendor-mui-98daa63f.js +185 -0
  225. package/dist/ui/assets/{vendor-pdf-b2a5d8b1.js → vendor-pdf-3c29882d.js} +1 -1
  226. package/dist/ui/assets/withHeaderItem-df2cc5d9.js +1 -0
  227. package/dist/ui/assets/{zh-cn-1881e930.js → zh-cn-13c6c696.js} +1 -1
  228. package/dist/ui/config.js +16 -20
  229. package/dist/ui/index.html +9 -9
  230. package/dist/ui/manifest.json +2 -2
  231. package/index.bundle.js +22 -8
  232. package/package.json +1 -1
  233. package/dist/ui/assets/AIVision-4f515575.js +0 -4
  234. package/dist/ui/assets/AccountDetails-2b42d262.js +0 -1
  235. package/dist/ui/assets/AccountDetails-492dee8f.js +0 -1
  236. package/dist/ui/assets/AccountServices-62599aae.js +0 -1
  237. package/dist/ui/assets/AccountsList-fe7cb5f9.js +0 -1
  238. package/dist/ui/assets/ActionLink-33e476e1.js +0 -1
  239. package/dist/ui/assets/AdaptableCard-df7695d6.js +0 -1
  240. package/dist/ui/assets/AddAccount-a05910e8.js +0 -1
  241. package/dist/ui/assets/AddEditFile-063c229b.js +0 -1
  242. package/dist/ui/assets/AddEditTranslation-43beae49.js +0 -1
  243. package/dist/ui/assets/AiApiLogList-a488921d.js +0 -1
  244. package/dist/ui/assets/AiCa-9c1b25b2.js +0 -1
  245. package/dist/ui/assets/Alert-7dfbd254.js +0 -1
  246. package/dist/ui/assets/ApiService-2b99757f.js +0 -1
  247. package/dist/ui/assets/AppLandingPage-3956cf0c.js +0 -4
  248. package/dist/ui/assets/AuditLogsList-7a2ce37d.js +0 -1
  249. package/dist/ui/assets/Auth0Callback-b943f19f.js +0 -1
  250. package/dist/ui/assets/BarCodes-17ed5da4.js +0 -1
  251. package/dist/ui/assets/BlankLayout-2f6e1153.js +0 -1
  252. package/dist/ui/assets/CalendarList-25834ddb.css +0 -11
  253. package/dist/ui/assets/CalendarList-72739043.js +0 -2
  254. package/dist/ui/assets/CategoryList-9f82e9a3.js +0 -1
  255. package/dist/ui/assets/CategoryList-c97891e7.js +0 -1
  256. package/dist/ui/assets/ChatContainer-4a38b179.js +0 -1
  257. package/dist/ui/assets/ChatsList-6c2c3e2f.js +0 -1
  258. package/dist/ui/assets/Check-71f21a49.js +0 -1
  259. package/dist/ui/assets/CheckInVideo-cb5fa9a2.js +0 -6
  260. package/dist/ui/assets/ClassicLayout-7d09e5ac.js +0 -1
  261. package/dist/ui/assets/CompanyList-9532f511.js +0 -1
  262. package/dist/ui/assets/ConfirmDialog-3202eb3d.js +0 -1
  263. package/dist/ui/assets/ContactDetails-3b70919b.js +0 -1
  264. package/dist/ui/assets/ContactsList-e9ac0fa3.js +0 -1
  265. package/dist/ui/assets/CountiesList-6ad338a5.js +0 -1
  266. package/dist/ui/assets/CountyDetails-22d4bc89.js +0 -1
  267. package/dist/ui/assets/CourseDetails-18040b49.js +0 -1
  268. package/dist/ui/assets/CourseList-e502f89d.js +0 -1
  269. package/dist/ui/assets/CreateSignature-375d191b.js +0 -7
  270. package/dist/ui/assets/DeckedLayout-909ac220.js +0 -1
  271. package/dist/ui/assets/DensitySelector-a2c1c68f.js +0 -1
  272. package/dist/ui/assets/DocumentActivity-d63dacec.js +0 -1
  273. package/dist/ui/assets/DocumentLayout-637075fd.js +0 -1
  274. package/dist/ui/assets/DocumentList2-518d2fa4.js +0 -23
  275. package/dist/ui/assets/DocumentLists-2da9ff88.js +0 -1
  276. package/dist/ui/assets/DocumentUserSigned-27bfa6e6.js +0 -7
  277. package/dist/ui/assets/DocumentsList-9f56db71.js +0 -1
  278. package/dist/ui/assets/DoubleSidedImage-ae98733b.js +0 -1
  279. package/dist/ui/assets/DynamicDashboard-6f177244.js +0 -1
  280. package/dist/ui/assets/EditAccount-1c1a8318.js +0 -1
  281. package/dist/ui/assets/EditLead-cc38d2a2.js +0 -1
  282. package/dist/ui/assets/FaqItems-c1c85af7.js +0 -6
  283. package/dist/ui/assets/FormContainer-91c2b0e4.js +0 -1
  284. package/dist/ui/assets/GenericPage-25a5d92a.js +0 -1
  285. package/dist/ui/assets/GridMapDetails-851a5781.js +0 -1
  286. package/dist/ui/assets/HorizontalMenuContent-96da38e1.js +0 -1
  287. package/dist/ui/assets/InvoicesList-8e66a112.js +0 -1
  288. package/dist/ui/assets/LeadDetails-ad63b3df.js +0 -1
  289. package/dist/ui/assets/LeadsList-bd7d9804.js +0 -1
  290. package/dist/ui/assets/Logo-3f3c9ee6.js +0 -1
  291. package/dist/ui/assets/MapView-afd1c913.js +0 -1
  292. package/dist/ui/assets/MarketingPage-89a860b1.js +0 -4
  293. package/dist/ui/assets/MenuEdit-d6e0d64c.js +0 -1
  294. package/dist/ui/assets/MessageInput-6dc83761.js +0 -21
  295. package/dist/ui/assets/MessagesList-966b69c5.js +0 -1
  296. package/dist/ui/assets/ModernLayout-03f30574.js +0 -1
  297. package/dist/ui/assets/Notify-bb3ce372.js +0 -1
  298. package/dist/ui/assets/OpportunitiesList-62eb34f6.js +0 -1
  299. package/dist/ui/assets/OpportunityDetails-356a8580.js +0 -1
  300. package/dist/ui/assets/OpportunityStatus-fa8108ea.js +0 -1
  301. package/dist/ui/assets/PasswordInput-8619a9df.js +0 -1
  302. package/dist/ui/assets/Profile-9104808b.js +0 -1
  303. package/dist/ui/assets/RoleEdit-98a6410b.js +0 -1
  304. package/dist/ui/assets/RoleForm-cc251eba.js +0 -1
  305. package/dist/ui/assets/ScheduleCycle-22c8e809.js +0 -1
  306. package/dist/ui/assets/ScreenList-9f7afa1c.js +0 -1
  307. package/dist/ui/assets/SidePanelContent-6b13836f.js +0 -1
  308. package/dist/ui/assets/SimpleLayout-d5445c0d.js +0 -2
  309. package/dist/ui/assets/StackedSideLayout-51127dc5.js +0 -1
  310. package/dist/ui/assets/StickyFooter-5b934274.js +0 -1
  311. package/dist/ui/assets/SupportRequets-be6542a9.js +0 -1
  312. package/dist/ui/assets/TimeLogApprovalDataList-c16d8bae.js +0 -1
  313. package/dist/ui/assets/TimeLogApprovalList-f6a75a20.js +0 -1
  314. package/dist/ui/assets/TimeLogList-ea288cce.js +0 -1
  315. package/dist/ui/assets/TimesheetsList-4a20e96c.js +0 -1
  316. package/dist/ui/assets/TranslationList-7a989333.js +0 -1
  317. package/dist/ui/assets/UserEdit-87262ea5.js +0 -1
  318. package/dist/ui/assets/UserForm-31fdd3b3.js +0 -1
  319. package/dist/ui/assets/ViewTimeLogForApproval-43b24a1a.js +0 -1
  320. package/dist/ui/assets/Views-74429e81.js +0 -1
  321. package/dist/ui/assets/WelcomeList-6c693eae.js +0 -9
  322. package/dist/ui/assets/actioncell-17e12e21.js +0 -1
  323. package/dist/ui/assets/calendarList-511b4d8f.js +0 -2
  324. package/dist/ui/assets/createSvgIcon-c5fc0d04.js +0 -1
  325. package/dist/ui/assets/documentsList-ac2c91ec.js +0 -1
  326. package/dist/ui/assets/dxicons-4c1b2089.ttf +0 -0
  327. package/dist/ui/assets/dxicons-ade3c9ed.woff2 +0 -0
  328. package/dist/ui/assets/dxicons-b4cd1226.woff +0 -0
  329. package/dist/ui/assets/gridList-cb9a14b1.js +0 -1
  330. package/dist/ui/assets/gridMapTable-c19770a8.js +0 -1
  331. package/dist/ui/assets/index-1d60e514.js +0 -1
  332. package/dist/ui/assets/index-26466d9d.js +0 -1
  333. package/dist/ui/assets/index-289cfedb.js +0 -1
  334. package/dist/ui/assets/index-2ce5b358.js +0 -1
  335. package/dist/ui/assets/index-307ce6d7.js +0 -1
  336. package/dist/ui/assets/index-36ba4ea7.js +0 -1
  337. package/dist/ui/assets/index-3f02e05a.js +0 -1
  338. package/dist/ui/assets/index-44662933.js +0 -13
  339. package/dist/ui/assets/index-51ee35f9.js +0 -1
  340. package/dist/ui/assets/index-54372d82.js +0 -1
  341. package/dist/ui/assets/index-569a9d2c.js +0 -1
  342. package/dist/ui/assets/index-62de659f.js +0 -13
  343. package/dist/ui/assets/index-6589dd2d.js +0 -1
  344. package/dist/ui/assets/index-6b6d0f06.js +0 -1
  345. package/dist/ui/assets/index-6c618440.js +0 -1
  346. package/dist/ui/assets/index-785ad361.js +0 -1
  347. package/dist/ui/assets/index-7df8779c.js +0 -1
  348. package/dist/ui/assets/index-82c9477e.js +0 -1
  349. package/dist/ui/assets/index-8ab45286.js +0 -1
  350. package/dist/ui/assets/index-8c229076.css +0 -7
  351. package/dist/ui/assets/index-a205cfed.js +0 -34
  352. package/dist/ui/assets/index-a23f9c87.js +0 -1
  353. package/dist/ui/assets/index-a455424a.js +0 -1
  354. package/dist/ui/assets/index-a4f78ee1.js +0 -1
  355. package/dist/ui/assets/index-aaad94c2.js +0 -1
  356. package/dist/ui/assets/index-b1b6b0f6.js +0 -1
  357. package/dist/ui/assets/index-c1f92742.js +0 -4
  358. package/dist/ui/assets/index-c2088808.js +0 -1
  359. package/dist/ui/assets/index-cbc29fa8.js +0 -1
  360. package/dist/ui/assets/index-cd2b7d32.js +0 -1
  361. package/dist/ui/assets/index-cf3804f1.js +0 -19
  362. package/dist/ui/assets/index-d0ef2cc2.js +0 -1
  363. package/dist/ui/assets/index-d1145737.js +0 -7
  364. package/dist/ui/assets/index-d58fb185.js +0 -1
  365. package/dist/ui/assets/index-d5b5a7e1.js +0 -1
  366. package/dist/ui/assets/index-daeff047.js +0 -1
  367. package/dist/ui/assets/index-ded3b055.js +0 -1
  368. package/dist/ui/assets/index-ede23a2b.js +0 -1
  369. package/dist/ui/assets/index-f8144346.js +0 -1
  370. package/dist/ui/assets/index-fd68b510.js +0 -1
  371. package/dist/ui/assets/index-fe3409ae.js +0 -1
  372. package/dist/ui/assets/liveLocation-646eef95.js +0 -1
  373. package/dist/ui/assets/modeuls-setup-402f891e.js +0 -1
  374. package/dist/ui/assets/tableV3-3d2f4952.js +0 -1
  375. package/dist/ui/assets/ticketRequestDetails-f78147f7.js +0 -1
  376. package/dist/ui/assets/vendor-mui-69397583.js +0 -185
  377. package/dist/ui/menudata/menus.json +0 -606
@@ -1,2 +0,0 @@
1
- import{v as Le,j as e,s as Dt,H as De,E as ye,K as Ue,I as yt,n as Nt,o as ne,l as bt}from"./vendor-mui-69397583.js";import{A as vt}from"./AdaptableCard-df7695d6.js";import{r as l}from"./vendor-react-ece1c85f.js";import{o as He}from"./vendor-devex-33a39e11.js";import{Z as y,cW as Ve,Y as Ne,l as be,B as z,I as X,W as re,O as A,Q as q,S as $e,h as Oe,k as Ct,V as Tt,bh as Pe,cv as St,cX as wt,cY as kt,al as ze}from"./index-c62ac197.js";import"./Alert-7dfbd254.js";import"./index-6b6d0f06.js";import{a as ce,T as he}from"./index-c2088808.js";import{D as de}from"./Drawer-949c18c6.js";import{a as Re}from"./FormContainer-91c2b0e4.js";import{S as Ge}from"./Switcher-c8648037.js";import"./index-36228db5.js";import{U as Et}from"./Upload-fb34ce03.js";import{c as ve,a as R,j as fe,i as Ce,F as Te,b as Se,d as P,E as M}from"./index.esm-70ab539c.js";import{t as We,l as oe,u as ge}from"./dateTime-a775a333.js";import{d as It,b as Be,e as Mt,a as Ft,c as At,f as qt,g as Ut,h as $t,i as Ot}from"./ScheduleService-7228f0a3.js";import{r as Ze,u as _e,g as Qe}from"./index-0ec72c4b.js";import{C as Pt}from"./ConfirmDialog-3202eb3d.js";import{u as zt}from"./usePermission-d94b4984.js";import{r as Yt}from"./createSvgIcon-c5fc0d04.js";import{g as Lt,r as Ht}from"./index-6589dd2d.js";import{S as Ke}from"./StickyFooter-5b934274.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-pdf-b2a5d8b1.js";import"./vendor-i18n-2fcb1983.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-eccea5d1.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-25c4d4ed.js";import"./ContactService-92281a90.js";import"./UserService-047aef51.js";const Ye=Le(e.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),Vt=Le(e.jsx("path",{d:"M17.5 4.5c-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6v14.65c0 .65.73.45.75.45C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5 1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.41.21.75-.19.75-.45V6c-1.49-1.12-3.63-1.5-5.5-1.5m3.5 14c-1.1-.35-2.3-.5-3.5-.5-1.7 0-4.15.65-5.5 1.5V8c1.35-.85 3.8-1.5 5.5-1.5 1.2 0 2.4.15 3.5.5z"}),"ImportContacts");y.extend(Ve);y.extend(We);Ne("calendar",Ze);const Rt=({isOpen:i,onClose:N,fetchEventData:I,Type:b})=>{const S=be(),{allContacts:g}=_e(c=>c.calendar.data),w={eventName:"",startDate:null,startTime:null,endDate:null,endTime:null,eventType:"",link:"",notes:"",participants:[],sendNotification:!1},k=ve({eventName:R().required("Event name is required"),startDate:fe().required("Start date is required"),startTime:R().required("Start time is required"),endDate:fe().required("End date is required"),endTime:R().required("End time is required"),eventType:R().required("Event type is required"),link:R().required("Link is required"),participants:Ce().min(1,"At least one participant is required").required("Participants are required")}),v=async c=>{const C=c==null?void 0:c.startDate,s=(c==null?void 0:c.startTime)??"00:00:00",t=(c==null?void 0:c.endDate)??C,d=(c==null?void 0:c.endTime)??s,{utcDate:n,utcTime:h}=oe(C,s),{utcDate:j,utcTime:E}=oe(t,d),F={eventName:c.eventName,eventDate:n,fromTime:h,endDate:j,toTime:E,notes:c.notes??"",sendNotification:c.sendNotification??!1,eventCategoryId:c.eventType,link:c.link??"",participantIds:c.participants.map(L=>L.id)},U=await It(F);U.success?(A.push(e.jsx(q,{title:"Success",type:"success",duration:2500,children:"Event Created"}),{placement:"top-center"}),N(),I()):A.push(e.jsx(q,{title:"Error",type:"danger",duration:2500,children:U.message}),{placement:"top-center"})};return l.useEffect(()=>{S(Qe({}))},[S]),e.jsx(de,{title:"Add Event",isOpen:i,onClose:N,portalClassName:"w30",footer:e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx(z,{size:"sm",className:"mr-2",onClick:N,children:"Cancel"}),e.jsx(z,{size:"sm",variant:"solid",type:"submit",form:"addEventForm",children:"Add Event"})]}),children:e.jsx(Te,{initialValues:w,validationSchema:k,onSubmit:v,children:({values:c,setFieldValue:C})=>e.jsxs(Se,{id:"addEventForm",children:[e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Event Name*"}),e.jsx(P,{name:"eventName",children:({field:s})=>e.jsx(X,{...s,placeholder:"Event Name"})}),e.jsx(M,{name:"eventName",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Start Date*"}),e.jsx(P,{name:"startDate",children:({field:s,form:t})=>e.jsx(ce,{name:"startDate",placeholder:"Select start date",field:s,onChange:d=>t.setFieldValue("startDate",d)})}),e.jsx(M,{name:"startDate",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Start Time*"}),e.jsx(P,{name:"startTime",children:({field:s,form:t})=>e.jsx(he,{name:"startTime",id:"startTime",field:s,format:"12",clearable:!1,onChange:d=>{const n=y(d).format("HH:mm:ss");t.setFieldValue("startTime",n)}})}),e.jsx(M,{name:"startTime",component:"div",className:"text-red-600"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"End Date*"}),e.jsx(P,{name:"endDate",children:({field:s,form:t})=>e.jsx(ce,{name:"endDate",placeholder:"Select end date",field:s,onChange:d=>t.setFieldValue("endDate",d)})}),e.jsx(M,{name:"endDate",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"End Time*"}),e.jsx(P,{name:"endTime",children:({field:s,form:t})=>e.jsx(he,{name:"endTime",id:"endTime",field:s,format:"12",clearable:!1,onChange:d=>{const n=y(d).format("HH:mm:ss");t.setFieldValue("endTime",n)}})}),e.jsx(M,{name:"endTime",component:"div",className:"text-red-600"})]})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Invite Contact(s)*"}),e.jsx(re,{options:g.map(s=>({...s,label:s.email,value:s.id})),isMulti:!0,onChange:s=>C("participants",s.map(t=>({email:t.email,id:t.id}))),className:"rounded-md"}),e.jsx(M,{name:"participants",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Event Type*"}),e.jsx(re,{options:b,value:b.find(s=>s.value===c.eventType),onChange:s=>C("eventType",s==null?void 0:s.value)}),e.jsx(M,{name:"eventType",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Link*"}),e.jsx(P,{name:"link",children:({field:s})=>e.jsx(X,{...s,placeholder:"Meeting Link"})}),e.jsx(M,{name:"link",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Notes"}),e.jsx(P,{name:"notes",children:({field:s})=>e.jsx(X,{...s,placeholder:"Notes",textArea:!0})})]}),e.jsx("div",{className:"pb-4",children:e.jsx(Re,{label:"Send Notification",children:e.jsx(P,{name:"sendNotification",component:Ge})})})]})})})};y.extend(Ve);y.extend(We);Ne("calendar",Ze);const Gt=({isOpen:i,onClose:N,fetchEventData:I,selectedEvent:b,Type:S})=>{const g=be(),{allContacts:w}=_e(t=>t.calendar.data),k=(t,d)=>{if(!t)return;const n=t instanceof Date?t:new Date(t);if(isNaN(n.getTime()))return;const h=(d||"00:00:00").split(":").map(U=>Number(U)),j=Number.isFinite(h[0])?h[0]:0,E=Number.isFinite(h[1])?h[1]:0,F=Number.isFinite(h[2])?h[2]:0;if(![j,E,F].some(U=>isNaN(U)))return new Date(n.getFullYear(),n.getMonth(),n.getDate(),j,E,F)},v=t=>{if(!t)return{eventName:"",startDate:"",startTime:"",endDate:"",endTime:"",eventType:"",link:"",notes:"",participants:[],sendNotification:!1};const d=t.startDate instanceof Date&&!isNaN(t.startDate.getTime())?t.startDate:t.startDateTime?new Date(t.startDateTime):t.eventDate&&t.fromTime?ge(t.eventDate.slice(0,10),t.fromTime):null,n=t.endDate instanceof Date&&!isNaN(t.endDate.getTime())?t.endDate:t.endDateTime?new Date(t.endDateTime):t.endDate&&t.toTime?ge(t.endDate.slice(0,10),t.toTime):null,h=d?y(d).format("YYYY-MM-DD"):"",j=d?y(d).format("HH:mm:ss"):"",E=n?y(n).format("YYYY-MM-DD"):"",F=n?y(n).format("HH:mm:ss"):"";return{eventName:(t==null?void 0:t.text)||(t==null?void 0:t.eventName)||"",startDate:h,startTime:j,endDate:E,endTime:F,eventType:(t==null?void 0:t.eventType)||String(t==null?void 0:t.categoryId)||"",link:(t==null?void 0:t.link)||"",notes:(t==null?void 0:t.notes)||"",participants:(t==null?void 0:t.participants)||[],sendNotification:(t==null?void 0:t.sendNotification)||!1}},c=(()=>{const t=v(b);return console.log(b),{...t,startDate:t.startDate?new Date(Number(t.startDate.split("-")[0]),Number(t.startDate.split("-")[1])-1,Number(t.startDate.split("-")[2])):"",endDate:t.endDate?new Date(Number(t.endDate.split("-")[0]),Number(t.endDate.split("-")[1])-1,Number(t.endDate.split("-")[2])):""}})(),C=ve({eventName:R().required("Event name is required"),startDate:fe().required("Start date is required"),startTime:R().required("Start time is required"),endDate:fe().required("End date is required"),endTime:R().required("End time is required"),eventType:R().required("Event type is required"),link:R().required("Link is required"),participants:Ce().min(1,"At least one participant is required").required("Participants are required")}),s=async t=>{var _;const d=t==null?void 0:t.startDate,n=(t==null?void 0:t.startTime)??"00:00:00",h=(t==null?void 0:t.endDate)??d,j=(t==null?void 0:t.endTime)??n,{utcDate:E,utcTime:F}=oe(d,n),{utcDate:U,utcTime:L}=oe(h,j),J={eventName:t.eventName,eventDate:E,fromTime:F,endDate:U,toTime:L,eventCategoryId:t.eventType,link:t.link??"",notes:t.notes??"",sendNotification:t.sendNotification??!1,participantIds:(_=t.participants)==null?void 0:_.map(H=>H.participantId||H.id)},Z=await Be(b==null?void 0:b.eventId,J);Z.success?(A.push(e.jsx(q,{title:"Success",type:"success",duration:2500,children:"Event Updated"}),{placement:"top-center"}),N(),I()):A.push(e.jsx(q,{title:"Error",type:"danger",duration:2500,children:Z.message}),{placement:"top-center"})};return l.useEffect(()=>{g(Qe({}))},[g]),e.jsx(de,{title:"Edit Event",isOpen:i,onClose:N,portalClassName:"w30",footer:e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx(z,{size:"sm",className:"mr-2",onClick:N,children:"Cancel"}),e.jsx(z,{size:"sm",variant:"solid",type:"submit",form:"editEventForm",children:"Update Event"})]}),children:e.jsx(Te,{initialValues:c,validationSchema:C,onSubmit:s,enableReinitialize:!0,children:({values:t,setFieldValue:d})=>e.jsxs(Se,{id:"editEventForm",children:[e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Event Name*"}),e.jsx(P,{name:"eventName",children:({field:n})=>e.jsx(X,{...n,placeholder:"Event Name"})}),e.jsx(M,{name:"eventName",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Start Date*"}),e.jsx(ce,{name:"startDate",value:t.startDate,onChange:n=>d("startDate",n)}),e.jsx(M,{name:"startDate",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Start Time*"}),e.jsx(he,{name:"startTime",format:"12",clearable:!1,defaultValue:k(t.startDate,t.startTime),onChange:n=>{const h=y(n).format("HH:mm:ss");d("startTime",h)}}),e.jsx(M,{name:"startTime",component:"div",className:"text-red-600"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"End Date*"}),e.jsx(ce,{name:"endDate",value:t.endDate,onChange:n=>d("endDate",n)}),e.jsx(M,{name:"endDate",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"End Time*"}),e.jsx(he,{name:"endTime",format:"12",clearable:!1,defaultValue:k(t.endDate,t.endTime),onChange:n=>{const h=y(n).format("HH:mm:ss");d("endTime",h)}}),e.jsx(M,{name:"endTime",component:"div",className:"text-red-600"})]})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Invite Contact(s)"}),e.jsx(re,{options:w.map(n=>({value:n.id,label:n.email,email:n.email,participantId:n.id})),value:(t.participants||[]).map(n=>({value:n.participantId||n.id,label:n.email,email:n.email,participantId:n.participantId||n.id})),isMulti:!0,onChange:n=>{const h=n.map(j=>({email:j.email,participantId:j.participantId||j.value}));d("participants",h)},className:"rounded-md"}),e.jsx(M,{name:"participants",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Event Type*"}),e.jsx(re,{options:S,value:S.find(n=>n.value===t.eventType),onChange:n=>d("eventType",n==null?void 0:n.value)}),e.jsx(M,{name:"eventType",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Link*"}),e.jsx(P,{name:"link",children:({field:n})=>e.jsx(X,{...n,placeholder:"Meeting Link"})}),e.jsx(M,{name:"link",component:"div",className:"text-red-600"})]}),e.jsxs("div",{className:"pb-4",children:[e.jsx("div",{className:"mb-1 font-semibold text-sm",children:"Notes"}),e.jsx(P,{name:"notes",children:({field:n})=>e.jsx(X,{...n,placeholder:"Notes",textArea:!0})})]}),e.jsx("div",{className:"pb-4",children:e.jsx(Re,{label:"Send Notification",children:e.jsx(P,{name:"sendNotification",component:Ge})})})]})})})};var we={},Wt=Dt;Object.defineProperty(we,"__esModule",{value:!0});var Xe=we.default=void 0,Bt=Wt(Yt()),Zt=e;Xe=we.default=(0,Bt.default)((0,Zt.jsx)("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"}),"FilterAlt");const _t=({onSaveClick:i,onCancel:N,onClearFilers:I})=>e.jsxs("div",{className:"text-right w-full",children:[e.jsx(z,{size:"sm",className:"mr-2",onClick:I,children:"Clear All"}),e.jsx(z,{size:"sm",className:"mr-2",onClick:N,children:"Cancel"}),e.jsx(z,{size:"sm",variant:"solid",onClick:i,children:"Query"})]}),Qt=i=>{var F,U,L,J,Z,_,H,me;const[N,I]=l.useState(((F=i==null?void 0:i.filters)==null?void 0:F.date)??null),[b,S]=l.useState(((U=i==null?void 0:i.filters)==null?void 0:U.meetingWith)??""),[g,w]=l.useState(((L=i==null?void 0:i.filters)==null?void 0:L.eventName)??""),[k,v]=l.useState(((J=i==null?void 0:i.filters)==null?void 0:J.categoryId)??""),[c,C]=l.useState(((Z=i==null?void 0:i.filters)==null?void 0:Z.userId)??""),[s,t]=l.useState(!1),[d,n]=l.useState(((_=i==null?void 0:i.filters)==null?void 0:_.meetingType)??[]),h=()=>{var f;t(!1),(f=i.onClose)==null||f.call(i)},j=()=>{var f;i.setFilters({date:null,meetingWith:"",meetingType:[],categoryId:"",eventName:"",userId:""}),I(null),S(""),w(""),v(""),C(""),n([]),t(!1),(f=i.onClose)==null||f.call(i)},E=()=>{var f;i.setFilters({date:N?y(N).format("YYYY-MM-DD"):null,meetingWith:b,meetingType:d,categoryId:k,eventName:g,userId:c}),t(!1),(f=i.onClose)==null||f.call(i)};return l.useEffect(()=>{i.isOpen&&t(!0)},[i.isOpen]),e.jsxs(de,{title:"Filters",isOpen:s,footer:e.jsx(_t,{onCancel:h,onSaveClick:E,onClearFilers:j}),onClose:h,portalClassName:"w30",onRequestClose:h,children:[e.jsxs("div",{className:"mb-5",children:[e.jsx("h5",{className:"mb-2",children:"Event Name"}),e.jsx(X,{type:"text",value:g,onChange:f=>w(f.target.value),placeholder:"Enter event name"})]}),e.jsxs("div",{className:"mb-5",children:[e.jsx("h5",{className:"mb-2",children:"Event Start Date"}),e.jsx(ce,{value:N,onChange:f=>I(f),placeholder:"Select Date"})]}),e.jsxs("div",{className:"mb-5",children:[e.jsx("h5",{className:"mb-2",children:"Category"}),e.jsx(re,{value:(H=i==null?void 0:i.Type)==null?void 0:H.find(f=>f.value===k),placeholder:"Select Type",options:i==null?void 0:i.Type,onChange:f=>v((f==null?void 0:f.value)||"")})]}),e.jsxs("div",{className:"mb-5",children:[e.jsx("h5",{className:"mb-2",children:"Meeting With"}),e.jsx(X,{type:"text",value:b,onChange:f=>S(f.target.value),placeholder:"Search person"})]}),e.jsxs("div",{className:"mb-5",children:[e.jsx("h5",{className:"mb-2",children:"Created By"}),e.jsx(re,{value:(me=i==null?void 0:i.users)==null?void 0:me.find(f=>f.value===c),placeholder:"Select Type",options:i==null?void 0:i.users,onChange:f=>C((f==null?void 0:f.value)||"")})]})]})};const Kt=new Date,Xt=({eventsList:i,Type:N,userTimeZone:I,onAppointmentUpdated:b,openEditDrawer:S,actions:g,CustomAppointment:w,AppointmentTooltip:k})=>{const v=["timelineDay","timelineWeek","timelineMonth"],c=l.useMemo(()=>N.map(s=>({id:String(s.value),text:s.label,color:s.color||"#3366FF"})),[N]),C=l.useMemo(()=>i.map(s=>({...s,startDate:s.startDate instanceof Date?s.startDate:new Date(s.startDate),endDate:s.endDate instanceof Date?s.endDate:new Date(s.endDate),eventType:String(s.eventType??s.categoryId),text:s.text??s.eventName??"Untitled Event",color:s.color||"#3366FF"})),[i]);return e.jsx("div",{className:"w-full h-[calc(100vh-200px)]",children:e.jsx(He,{timeZone:I,dataSource:C,views:v,defaultCurrentView:"timelineMonth",defaultCurrentDate:Kt,height:"100%",startDayHour:0,endDayHour:24,cellDuration:60,showAllDayPanel:!1,crossScrollingEnabled:!0,groups:["eventType"],resources:[{fieldExpr:"eventType",dataSource:c,label:"Category",useColorAsDefault:!0}],onAppointmentUpdated:b,onAppointmentClick:s=>S(s.appointmentData),onAppointmentFormOpening:s=>s.cancel=!0,editing:{allowUpdating:g.edit,allowDeleting:g.delete,allowResizing:g.edit,allowDragging:g.edit},appointmentComponent:w,appointmentTooltipRender:k})})},Jt=ve({files:Ce().min(1,"Please upload at least one ICS file").required("ICS file upload is required")}),ea=({initialData:i={files:[]},footerWidth:N,onSubmit:I,onCancel:b})=>{const S=(g,w)=>{if(!g)return"Invalid file";const k=Array.from(g);for(const v of k){if(!v.name.toLowerCase().endsWith(".ics"))return"Only .ics files are allowed";if(v.size===0)return"File cannot be empty"}return!0};return e.jsx(Te,{initialValues:i,validationSchema:Jt,onSubmit:(g,{setSubmitting:w})=>{console.log(g),I(g.files,w)},children:({values:g,errors:w,touched:k,isSubmitting:v})=>e.jsx(Se,{children:e.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Upload ICS File(s)"}),e.jsx(P,{name:"files",children:({field:c,form:C})=>e.jsx(Et,{draggable:!0,multiple:!0,accept:".ics",beforeUpload:S,fileList:g.files||[],cropNeeded:!1,uploadText:"Click or drag ICS files",onChange:s=>{C.setFieldValue(c.name,s)},onFileRemove:s=>C.setFieldValue(c.name,s)})}),w.files&&k.files&&e.jsx("div",{className:"text-red-500 text-sm mt-1",children:w.files})]}),e.jsx(Ke,{className:`px-8 flex items-center justify-between py-4 ${N}`,stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(z,{type:"button",size:"sm",className:"mr-2",onClick:b,children:"Cancel"}),e.jsx(z,{size:"sm",variant:"solid",type:"submit",loading:v,children:"Import"})]})})]})})})},ta=({onFilterApply:i,userName:N,onCancel:I,defaultOptions:b,defaultUser:S})=>{const[g,w]=l.useState([]),[k,v]=l.useState(b),[c,C]=l.useState(S);l.useEffect(()=>{(async()=>{var d,n,h;try{const j=await Mt();(d=j==null?void 0:j.data)!=null&&d.$values&&(w((n=j.data.$values)==null?void 0:n.map(E=>({id:E.id,title:E.title}))),(b==null?void 0:b.length)===0&&v((h=j.data.$values)==null?void 0:h.map(E=>E.id)))}catch(j){console.error("Failed to load filter options",j)}})()},[]);const s=(t,d)=>{v(t?n=>[...n,d]:n=>n.filter(h=>h!==d))};return e.jsxs(e.Fragment,{children:[e.jsx(De,{variant:"subtitle1",sx:{mb:1,ml:2},children:"My Calendars"}),e.jsxs(ye,{children:[e.jsxs(ye,{display:"flex",justifyContent:"start",alignItems:"center",sx:{mb:1},children:[e.jsx(Ue,{control:e.jsx($e,{}),checked:c,onChange:t=>C(t),label:"",labelPlacement:"start",sx:{marginRight:0}}),e.jsx(De,{children:N})]},"myname"),g==null?void 0:g.map(t=>e.jsxs(ye,{display:"flex",justifyContent:"start",alignItems:"center",sx:{mb:1},children:[e.jsx(Ue,{control:e.jsx($e,{}),checked:k.includes(t.id),onChange:d=>s(d,t.id),label:"",labelPlacement:"start",sx:{marginRight:0}}),e.jsx(De,{children:t.title})]},t.id))]}),e.jsxs(Ke,{className:"px-8 flex items-center justify-between py-4",stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:[e.jsx(z,{size:"sm",className:"mr-2",onClick:I,children:"Cancel"}),e.jsx(z,{size:"sm",variant:"solid",onClick:()=>i(k,c),children:"Apply"})]})]})},aa=new Date,na=["agenda","day","week","workWeek","month"];Ne("users",Ht);const Ua=()=>{const[i,N]=l.useState(!1),[I,b]=l.useState(!1),[S,g]=l.useState([]),[w,k]=l.useState(null),[v,c]=l.useState(!1),[C,s]=l.useState(null),[t,d]=l.useState("month"),[n,h]=l.useState(Intl.DateTimeFormat().resolvedOptions().timeZone),[j,E]=l.useState([]),F=zt("Schedules"),U=l.useRef(null),[L,J]=l.useState("calendar"),[Z,_]=l.useState(null),{googleAuthToken:H,userName:me,id:f}=Oe(r=>r.auth.user),[Je,se]=l.useState(!1),et=be(),[tt,le]=l.useState(!1),[at,ue]=l.useState(!1),[ie,ke]=l.useState([]),[je,Ee]=l.useState(!1),nt=Oe(r=>{var a,o,p;return((p=(o=(a=r==null?void 0:r.users)==null?void 0:a.data)==null?void 0:o.usersList)==null?void 0:p.map(x=>({value:x.id,label:`${x.firstName} ${x.lastName}`})))||[]});l.useEffect(()=>{et(Lt({isActive:!0,roleName:"Admin"}))},[]);const st=r=>{_(r.currentTarget)},Q=()=>{_(null)},O={edit:F.isEdit,delete:F.isDelete,view:F.isView},[m,it]=l.useState({date:null,meetingWith:"",meetingType:[],categoryId:"",userId:"",eventName:""}),[rt,Ie]=l.useState(!1),ot=()=>{Ie(!1)},lt=()=>{Ie(!0)},G=l.useCallback(async()=>{var r,a,o;try{const p=await Ft(m==null?void 0:m.date,m==null?void 0:m.meetingWith,((r=m==null?void 0:m.meetingType)==null?void 0:r.length)>0?(a=m==null?void 0:m.meetingType)==null?void 0:a.join(","):"","",m==null?void 0:m.eventName,m==null?void 0:m.categoryId,je?f:m==null?void 0:m.userId,ie.length>0?ie==null?void 0:ie.map(u=>`'${u}'`).join(","):void 0),D=(((o=p==null?void 0:p.data)==null?void 0:o.$values)||[]).map(u=>{var K,B;const W=ge((K=u.eventDate)==null?void 0:K.slice(0,10),u.fromTime),ee=ge((B=u.endDate)==null?void 0:B.slice(0,10),u.toTime);return{id:u.$id,eventId:u.id,text:u.eventName,startDate:W,endDate:ee,startDateTime:u.startDateTime,endDateTime:u.endDateTime,color:u.categoryColor||"#3366FF",fromTime:u.fromTime,toTime:u.toTime,notes:u.notes,sendNotification:u.sendNotification,participants:u.participants,eventType:String(u.categoryId),link:u.link,basefromTime:u.fromTime,basetoTime:u.toTime}});g(D)}catch(p){console.error("Failed to fetch data:",p),g([])}},[m,je,ie]),ct=async()=>{se(!0);const r=new Date,a=r.toISOString(),o=new Date(r);o.setDate(o.getDate()+7);const p=o.toISOString(),x=y(a).format("MM/DD/YYYY"),D=y(p).format("MM/DD/YYYY");try{(await qt({accessToken:H,startDate:a,endDate:p})).success&&A.push(e.jsx(q,{title:"Pulled Events from Google",type:"success",duration:3e3,children:`Successfully pulled events from ${x} → ${D}`}),{placement:"top-center"})}catch{A.push(e.jsx(q,{title:"Unable to Fetch Events",type:"danger",duration:2500,children:"Unable to Fetch Events from Google Calendar"}),{placement:"top-center"})}finally{se(!1),G()}},dt=async()=>{se(!0);const r=new Date,a=r.toISOString(),o=new Date(r);o.setDate(o.getDate()+1);const p=o.toISOString(),x=y(a).format("MM/DD/YYYY"),D=y(p).format("MM/DD/YYYY");try{(await Ut({accessToken:H,startDate:a,endDate:p})).success&&A.push(e.jsx(q,{title:"Pushed Events to Google Calendar",type:"success",duration:3e3,children:`Successfully pushed events from ${x} → ${D} to Google Calendar`}),{placement:"top-center"})}catch{A.push(e.jsx(q,{title:"Unable to Push Events",type:"danger",duration:2500,children:"Unable to Push Events to Google Calendar"}),{placement:"top-center"})}finally{G(),se(!1)}},mt=async r=>{if(r!=null&&r.length){se(!0);try{const a=new FormData;for(const p of Array.from(r))a.append("files",p);(await $t(a)).success&&(le(!1),A.push(e.jsx(q,{title:"ICS Import Successful",type:"success",duration:3e3,children:"Successfully Imported events from file."}),{placement:"top-center"}))}catch(a){console.error("ICS upload error:",a),A.push(e.jsx(q,{title:"Error Importing ICS",type:"danger",duration:2500,children:"Failed to upload or parse .ics files"}),{placement:"top-center"})}finally{se(!1),le(!1),G()}}},ut=l.useCallback(async()=>{var r,a;try{const o=await At(),p=((a=(r=o==null?void 0:o.data)==null?void 0:r.$values)==null?void 0:a.map(x=>({label:x==null?void 0:x.name,value:x==null?void 0:x.id,color:(x==null?void 0:x.color)||"#3366FF"})))||[];E(p)}catch(o){console.error("Failed to fetch data:",o),E([])}},[]);l.useEffect(()=>{G()},[G]),l.useEffect(()=>{ut()},[]);const pt=()=>N(!0),xt=()=>N(!1),pe=r=>{O.edit&&(k(r),b(!0))},ht=()=>b(!1),xe=()=>{s(null),c(!1)},ft=async()=>{const r=await Ot(C);r.success?(A.push(e.jsx(q,{title:"Success",type:"success",duration:2500,children:"Event Deleted"}),{placement:"top-center"}),G()):A.push(e.jsx(q,{title:"Error",type:"danger",duration:2500,children:r.message}),{placement:"top-center"}),xe()},Me=async r=>{const{appointmentData:a}=r,o=a.eventId,p=a.startDate,x=a.endDate,D=V=>{if(!V)return"";const ae=V instanceof Date?V:new Date(V);if(isNaN(ae.getTime()))return"";const T=String(ae.getHours()).padStart(2,"0"),Y=String(ae.getMinutes()).padStart(2,"0"),qe=String(ae.getSeconds()).padStart(2,"0");return`${T}:${Y}:${qe}`},u=D(p),W=D(x),{utcDate:ee,utcTime:K}=oe(p,u),{utcDate:B,utcTime:$}=oe(x,W),te={eventName:a.text??"",fromTime:K??"",toTime:$??"",eventDate:ee??"",endDate:B??"",link:a.link??"",notes:a.notes??"",sendNotification:a.sendNotification??!1,eventCategoryId:a==null?void 0:a.eventType};try{const V=await Be(o,te);V.success?(A.push(e.jsx(q,{title:"Success",type:"success",duration:2500,children:"Event Updated"}),{placement:"top-center"}),G()):A.push(e.jsx(q,{title:"Error",type:"danger",duration:2500,children:V.message}),{placement:"top-center"})}catch{A.push(e.jsx(q,{title:"Error",type:"danger",duration:2500,children:"Something went wrong."}),{placement:"top-center"})}},Fe=({data:r})=>{const a=r.appointmentData,o=$=>{if(!$)return null;if($ instanceof Date)return y($);const te=String($);return/[zZ]|[+\-]\d{2}:\d{2}$/.test(te)?y(te).local():y.utc(te).local()},p=o(a.startDateTime??a.startDate),x=o(a.endDateTime??a.endDate),D=t==="month",u=a.allDay,W=a.color||"#3366FF",ee="#fff",K=$=>{$.preventDefault(),$.stopPropagation(),pe(a)},B=$=>{$.preventDefault(),$.stopPropagation(),s(a.eventId),c(!0)};return e.jsxs("div",{onClick:K,className:`custom-appointment ${D?"month-view":"default-view"}`,style:{backgroundColor:W,borderRadius:6,padding:D?"6px 8px":"4px 6px",cursor:"pointer",display:"flex",flexDirection:"row",alignItems:D?"flex-start":"center",justifyContent:"space-between",width:"100%",color:ee,minHeight:D?48:32,lineHeight:1.3},title:`${a.text}
2
- ${p.format("MMM DD, hh:mm A")} → ${x.format("MMM DD, hh:mm A")}`,children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",whiteSpace:D?"normal":"nowrap"},children:[e.jsx("strong",{style:{fontSize:D?12:13,marginBottom:D?2:0,overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:D?2:1,WebkitBoxOrient:"vertical"},children:a.text}),e.jsx("span",{style:{fontSize:D?11:12,opacity:.9,whiteSpace:D?"normal":"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:u||!p.isSame(x,"day")?`${p.format("MMM DD")} - ${x.format("MMM DD")}`:`${p.format("hh:mm A")} → ${x.format("hh:mm A")}`})]}),O.delete&&e.jsx(ze,{onClick:B,fontSize:D?13:14,style:{marginLeft:6,flexShrink:0,opacity:.9,cursor:"pointer",zIndex:5},title:"Delete"})]})},gt=m.date!==null||m.meetingWith!==""||m.meetingType.length>0||(m==null?void 0:m.eventName)!==""||(m==null?void 0:m.categoryId)!==""||(m==null?void 0:m.userId)!=="",Ae=r=>{var ae;const a=(ae=U.current)==null?void 0:ae.instance,{appointmentData:o}=r;if(!o)return null;const p=l.useCallback(T=>{var Y;(Y=a==null?void 0:a.hideAppointmentTooltip)==null||Y.call(a),pe(o),T!=null&&T.event&&T.event.stopPropagation()},[a,o]),x=l.useCallback(T=>{var Y;(Y=a==null?void 0:a.hideAppointmentTooltip)==null||Y.call(a),s(o.eventId||o.id),c(!0),T!=null&&T.event&&T.event.stopPropagation()},[a,o]),D=T=>{if(!T)return y(null);if(T instanceof Date)return y(T);const Y=String(T);return/[zZ]|[+\-]\d{2}:\d{2}$/.test(Y)?y(Y).local():y.utc(Y).local()},u=D(o.startDateTime??o.startDate),W=D(o.endDateTime??o.endDate),ee=o.allDay,K=u.isSame(W,"day"),B=o.disabled;!B&&O.edit;const $=!B&&O.delete,te=o.color||"#2563eb",V=o.color||"#1e40af";return e.jsxs("div",{className:"dx-tooltip-appointment-item",onClick:p,className:"group flex items-center justify-between px-2.5 py-1 rounded-md cursor-pointer transition-all",style:{backgroundColor:te,border:`1px solid ${V}`,color:"#fff",lineHeight:"1.1rem"},children:[e.jsx("div",{className:"dx-tooltip-appointment-item-marker",children:e.jsx("div",{className:"dx-tooltip-appointment-item-marker-body",style:{backgroundColor:o.color||"#3366FF"}})}),e.jsxs("div",{className:"dx-tooltip-appointment-item-content",children:[e.jsx("div",{className:"dx-tooltip-appointment-item-content-subject",children:o.text}),e.jsx("div",{className:"dx-tooltip-appointment-item-content-date",children:ee||!K?`${u.format("MMM DD")} - ${W.format("MMM DD")}`:`${u.format("MMM DD, h:mm A")} - ${W.format("h:mm A")}`})]}),e.jsx("div",{className:"dx-tooltip-appointment-item-delete-button-container",children:$&&e.jsx("button",{onClick:T=>{T.stopPropagation(),x(T)},className:"opacity-80 hover:opacity-100 text-white hover:text-red-100 transition-all p-0.5 rounded-md",title:"Delete",children:e.jsx(ze,{className:"w-3.5 h-3.5"})})})]})},jt=l.useMemo(()=>S.map(r=>({...r,startDate:r.startDate instanceof Date?r.startDate:new Date(r.startDate),endDate:r.endDate instanceof Date?r.endDate:new Date(r.endDate),eventType:String(r.eventType??r.eventType),text:r.text??r.eventName??"Untitled"})),[S]);return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Schedule"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx(yt,{onClick:lt,title:"Filters",children:e.jsx(Xe,{style:gt?{color:"orange"}:{}})}),e.jsx(z,{size:"sm",variant:"solid",className:"ml-2",onClick:st,"aria-controls":"actions-menu","aria-haspopup":"true",children:e.jsxs("span",{className:"flex items-center",children:["Actions",e.jsx(Ct,{className:"ml-1 text-base"})]})}),e.jsxs(Nt,{id:"actions-menu",anchorEl:Z,keepMounted:!0,open:!!Z,onClose:Q,PaperProps:{elevation:4,className:"rounded-xl shadow-lg border border-gray-200 min-w-[240px] overflow-hidden"},children:[(O==null?void 0:O.edit)&&e.jsx(ne,{onClick:()=>{pt(),Q()},className:"group flex items-center justify-between px-4 py-2.5 hover:bg-custom-50 transition-all duration-150",children:e.jsxs("div",{className:"flex items-center gap-2 text-gray-700 group-hover:text-custom-700",children:[e.jsx(Tt,{size:17}),e.jsx("span",{className:"font-medium",children:"Add Event"})]})}),e.jsx(ne,{onClick:()=>{ue(!0),Q()},className:"group flex items-center justify-between px-4 py-2.5 hover:bg-custom-50 transition-all duration-150",children:e.jsxs("div",{className:"flex items-center gap-2 text-gray-700 group-hover:text-custom-700",children:[e.jsx(Pe,{size:16}),e.jsx("span",{className:"font-medium",children:"My Calendar"})]})}),e.jsx("div",{className:"border-t border-gray-200 my-1"}),e.jsxs(ne,{onClick:()=>{J("calendar"),Q()},className:"group flex items-center justify-between px-4 py-2.5 hover:bg-custom-50 transition-all duration-150",children:[e.jsxs("div",{className:"flex items-center gap-2 text-gray-700 group-hover:text-custom-700",children:[e.jsx(Pe,{size:17}),e.jsx("span",{className:"font-medium",children:"Calendar View"})]}),L==="calendar"&&e.jsx(Ye,{fontSize:"small",className:"text-custom-600"})]}),e.jsxs(ne,{onClick:()=>{J("gantt"),Q()},className:"group flex items-center justify-between px-4 py-2.5 hover:bg-custom-50 transition-all duration-150",children:[e.jsxs("div",{className:"flex items-center gap-2 text-gray-700 group-hover:text-custom-700",children:[e.jsx(St,{size:17}),e.jsx("span",{className:"font-medium",children:"Timeline View"})]}),L==="gantt"&&e.jsx(Ye,{fontSize:"small",className:"text-custom-600"})]}),e.jsx("div",{className:"border-t border-gray-200 my-1"}),H&&e.jsx(ne,{onClick:()=>{ct(),Q()},className:"group flex items-center justify-between px-4 py-2.5 hover:bg-custom-50 transition-all duration-150",children:e.jsxs("div",{className:"flex items-center gap-2 text-gray-700 group-hover:text-custom-700",children:[e.jsx(Vt,{fontSize:"small"}),e.jsx("span",{className:"font-medium",children:"Import from Google Calendar"})]})}),H&&e.jsx(ne,{onClick:()=>{dt(),Q()},className:"group flex items-center justify-between px-4 py-2.5 hover:bg-custom-50 transition-all duration-150",children:e.jsxs("div",{className:"flex items-center gap-2 text-gray-700 group-hover:text-custom-700",children:[e.jsx(wt,{size:17}),e.jsx("span",{className:"font-medium",children:"Push to Google Calendar"})]})}),e.jsx(ne,{onClick:()=>{le(!0),Q()},className:"group flex items-center justify-between px-4 py-2.5 hover:bg-custom-50",children:e.jsxs("div",{className:"flex items-center gap-2 text-gray-700 group-hover:text-custom-700",children:[e.jsx(kt,{size:17}),e.jsx("span",{className:"font-medium",children:"Import from ICS File"})]})})]})]})]})}),Je&&e.jsx(bt,{sx:{backgroundColor:"rgba(0, 0, 0, 0.1)","& .MuiLinearProgress-bar":{backgroundColor:"var(--custom-600)"}}}),e.jsx(vt,{className:"m-6 h-full py-4 px-6 bg-white",bodyClass:"h-full",children:L==="calendar"?e.jsx(He,{ref:U,timeZone:n,dataSource:jt,views:na,currentView:t,defaultCurrentDate:aa,onCurrentViewChange:r=>d(r),height:1350,startDayHour:0,endDayHour:24,showAllDayPanel:!0,onAppointmentUpdated:Me,onAppointmentClick:r=>{var p,x,D;const a=(p=r.event)==null?void 0:p.target;((x=a==null?void 0:a.closest)==null?void 0:x.call(a,".dx-tooltip-appointment-item-edit-button"))||((D=a==null?void 0:a.closest)==null?void 0:D.call(a,".dx-tooltip-appointment-item-delete-button"))||pe(r.appointmentData)},onAppointmentFormOpening:r=>r.cancel=!0,appointmentComponent:Fe,editing:{allowAdding:O.edit,allowUpdating:O.edit,allowDeleting:O.delete,allowResizing:O.edit,allowDragging:O.edit},maxAppointmentsPerCell:4,appointmentTooltipRender:Ae}):e.jsx("div",{className:"h-full w-full flex flex-col",children:e.jsx("div",{style:{height:"800px"},children:e.jsx(Xt,{eventsList:S,Type:j,userTimeZone:n,onAppointmentUpdated:Me,openEditDrawer:pe,actions:O,CustomAppointment:Fe,AppointmentTooltip:Ae})})})}),e.jsx(Rt,{isOpen:i,onClose:xt,fetchEventData:G,Type:j}),e.jsx(Gt,{isOpen:I,onClose:ht,fetchEventData:G,selectedEvent:w,Type:j}),e.jsx(Qt,{isOpen:rt,onClose:ot,setFilters:it,filters:m,Type:j,users:nt}),e.jsx(Pt,{isOpen:v,type:"danger",title:"Delete Event",confirmButtonColor:"red-600",onClose:xe,onRequestClose:xe,onCancel:xe,onConfirm:ft,children:e.jsx("p",{children:"Are you sure you want to delete this event? This action cannot be undone."})}),e.jsx(de,{title:"Import ICS File",isOpen:tt,onClose:()=>le(!1),portalClassName:"w30",children:e.jsx(ea,{onSubmit:mt,onCancel:()=>le(!1),footerWidth:"w-full"})}),e.jsx(de,{title:"",isOpen:at,onClose:()=>ue(!1),portalClassName:"w30",children:e.jsx(ta,{defaultOptions:ie,defaultUser:je,userName:me,onFilterApply:(r,a)=>{ke(r),Ee(a),ue(!1)},onCancel:()=>{ke([]),Ee(!1),ue(!1)}})})]})};export{Ua as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor-mui-69397583.js";import{A as E}from"./AdaptableCard-df7695d6.js";import{r as n,f as Y}from"./vendor-react-ece1c85f.js";import{u as O,a as _,r as G}from"./index-0ec72c4b.js";import{I as N,B as q,l as z,O as w,Q as F,Y as J,V as K}from"./index-c62ac197.js";import"./Alert-7dfbd254.js";import"./index-6b6d0f06.js";import"./index-c2088808.js";import{D as T}from"./Drawer-949c18c6.js";import{a as I,F as W}from"./FormContainer-91c2b0e4.js";import"./Switcher-c8648037.js";import"./index-36228db5.js";import"./Upload-fb34ce03.js";import{A as X,T as V}from"./actioncell-17e12e21.js";import{D as Z}from"./tableV2-4d1c9fd2.js";import{h as ee}from"./index-36ba4ea7.js";import{S as te}from"./StickyFooter-5b934274.js";import{d as R,c as oe,a as k,F as ie,b as re}from"./index.esm-70ab539c.js";import{a as se}from"./index-e4c6057f.js";import{j as ae,k as ne,l as le}from"./ScheduleService-7228f0a3.js";import{C as ce}from"./ConfirmDialog-3202eb3d.js";import{u as de}from"./usePermission-d94b4984.js";import"./vendor-redux-a1f00e6b.js";import"./ContactService-92281a90.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";import"./useControllableState-d0909575.js";import"./useDidUpdate-25c4d4ed.js";import"./FileSaver.min-20f3f13a.js";import"./DensitySelector-a2c1c68f.js";import"./NoData-8c485a3a.js";const pe=({touched:l,errors:s})=>e.jsxs(E,{className:"mb-4",children:[e.jsx(I,{label:"Title",asterisk:!0,invalid:s.title&&l.title,errorMessage:s.title,children:e.jsx(R,{type:"text",autoComplete:"off",name:"title",placeholder:"Title",component:N})}),e.jsx(I,{label:"Description",invalid:s.description&&l.description,errorMessage:s.description,children:e.jsx(R,{type:"text",textArea:!0,autoComplete:"off",name:"description",placeholder:"Description",component:N})}),e.jsx(I,{label:"Color",invalid:s.color&&l.color,errorMessage:s.color,children:e.jsx(R,{type:"color",autoComplete:"off",name:"color",placeholder:"Color",component:N})})]}),{useUniqueId:me}=ee,ue=oe().shape({title:k().required("Field is required"),description:k().required("Field is required"),color:k().required("Field is required")}),P=n.forwardRef((l,s)=>{const{type:c,initialData:C={id:"",title:"",description:"",color:""},onFormSubmit:m,onDiscard:d}=l,u=me("CAT-");return e.jsx(ie,{innerRef:s,initialValues:{...C},validationSchema:ue,onSubmit:(f,{setSubmitting:o})=>{const p={...f};c==="new"&&(p.id=u),m==null||m(p,o)},children:({touched:f,errors:o,isSubmitting:p})=>e.jsx(re,{children:e.jsxs(W,{children:[e.jsx(pe,{touched:f,errors:o}),e.jsxs(te,{className:"px-8 flex items-center justify-between py-4",stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:[e.jsx(q,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>d==null?void 0:d(),children:"Discard"}),e.jsx(q,{size:"sm",variant:"solid",loading:p,icon:e.jsx(se,{}),type:"submit",children:"Save"})]})]})})})});P.displayName="CategoryForm";const v=l=>{const{onDrawerClose:s,categoryId:c,initialData:C,fetchData:m}=l;Y(),z(),n.useState(!1);const d=async i=>await ae(i),u=async i=>await ne(c,i),f=()=>{m()},o=async(i,a)=>{a(!0);const L={name:i==null?void 0:i.title,description:i==null?void 0:i.description,color:i==null?void 0:i.color};(c?u:d)(L).then(y=>{y.success&&(w.push(e.jsxs(F,{title:"Success",type:"success",duration:2500,children:["Category ",c?"Updated":"Added"," Successfully"]}),{placement:"top-center"}),f(),s())}).catch(y=>{var b;console.log("category - error",y);var x=(b=y.response)==null?void 0:b.data;a(!1),w.push(e.jsx(F,{title:"Error",type:"danger",duration:2500,children:(x==null?void 0:x.message)||"Something went wrong"}),{placement:"top-center"})})},p=()=>{s()};return e.jsx(P,{type:c?"edit":"new",initialData:C,onFormSubmit:o,onDiscard:p})};J("calendar",G);const Ge=()=>{var M;const[l,s]=n.useState([]),[c,C]=n.useState(!1),[m,d]=n.useState(!1),[u,f]=n.useState(null),o=de("Category"),p={edit:o==null?void 0:o.isEdit,delete:o==null?void 0:o.isDelete,view:!1},[i,a]=n.useState(!1),[L,j]=n.useState(!1),[y,x]=n.useState(null),b=z(),h=O(t=>{var r,g;return(g=(r=t==null?void 0:t.calendar)==null?void 0:r.data)==null?void 0:g.CategoryList}),{loading:U}=O(t=>{var r;return(r=t==null?void 0:t.calendar)==null?void 0:r.data});n.useEffect(()=>{D()},[]);const D=()=>{b(_())},B=()=>C(!0),S=()=>C(!1),A=()=>d(!1),$=(t,r)=>{r===V.edit&&(f(t.id),d(!0)),r===V.delete&&(x(t),a(!0))},H=async()=>{var t,r;if(y)try{j(!0),await le(y.id),j(!1),a(!1),x(null),w.push(e.jsx(F,{title:"Success",type:"success",duration:2500,children:"Category deleted successfully"}),{placement:"top-center"}),D()}catch(g){console.error("Delete failed:",g),j(!1),w.push(e.jsx(F,{title:"Error",type:"danger",duration:2500,children:((r=(t=g==null?void 0:g.response)==null?void 0:t.data)==null?void 0:r.message)||"Failed to delete category"}),{placement:"top-center"})}},Q=[{dataField:"Action",caption:"Action",width:"10%",cellRender:t=>e.jsx(X,{row:t==null?void 0:t.data,actions:p,buttonClick:$})},{dataField:"name",caption:"Title"},{dataField:"description",caption:"Description"},{dataField:"color",caption:"Color",cellRender:t=>{const r=(t==null?void 0:t.value)||"transparent";return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("div",{className:"w-4 h-4 rounded-sm border border-gray-300",style:{backgroundColor:r}}),e.jsx("span",{children:r})]})}},{dataField:"createdDate",caption:"Created at",width:"10%",dataType:"date",format:"MM/dd/yyyy"}];return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Category"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[(o==null?void 0:o.isEdit)&&e.jsx(q,{onClick:B,block:!0,variant:"solid",size:"sm",icon:e.jsx(K,{}),children:"Add Category"}),e.jsx(T,{title:"Add Category",isOpen:c,onClose:S,onRequestClose:S,portalClassName:"w30",children:e.jsx(v,{onDrawerClose:S,fetchData:D})}),e.jsx(T,{title:"Edit Category",isOpen:m,onClose:A,onRequestClose:A,portalClassName:"w30",children:e.jsx(v,{categoryId:u,initialData:{...h==null?void 0:h.find(t=>t.id===u),title:(M=h==null?void 0:h.find(t=>t.id===u))==null?void 0:M.name},onDrawerClose:A,fetchData:D})})]})]})}),e.jsx(E,{className:"m-6 h-full py-4 px-6 bg-transparent ",bodyClass:"h-full",children:e.jsx(E,{className:"borderless",children:e.jsx(Z,{columns:Q,tableName:"Category-table",data:h||[],height:"calc(100vh - 280px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:l,setSelectedRowId:s,setFilterValues:()=>{},filterValues:[],identity:"Category-Listing",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"Category-Listing-table",handleSearch:()=>{},isColumnResizing:!0,isPaginationReq:!0,isLoading:U})})}),e.jsx(ce,{isOpen:i,type:"danger",title:"Delete Category",confirmButtonColor:"red-600",onClose:()=>a(!1),onRequestClose:()=>a(!1),onCancel:()=>a(!1),onConfirm:H,children:e.jsx("p",{children:"Are you sure you want to delete this category?"})})]})};export{Ge as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor-mui-69397583.js";import{A as R}from"./AdaptableCard-df7695d6.js";import{r,f as H}from"./vendor-react-ece1c85f.js";import{e as Q,f as W,u as N,h as Y,r as _,i as G,s as J}from"./index-16bb10a6.js";import{I as E,B as k,l as V,O as w,Q as S,Y as K,V as X}from"./index-c62ac197.js";import"./Alert-7dfbd254.js";import"./index-6b6d0f06.js";import"./index-c2088808.js";import{D as L}from"./Drawer-949c18c6.js";import{a as O,F as Z}from"./FormContainer-91c2b0e4.js";import"./Switcher-c8648037.js";import"./index-36228db5.js";import"./Upload-fb34ce03.js";import{A as ee,T as M}from"./actioncell-17e12e21.js";import{D as te}from"./tableV2-4d1c9fd2.js";import{h as ie}from"./index-36ba4ea7.js";import{S as ae}from"./StickyFooter-5b934274.js";import{d as q,c as se,a as oe,F as re,b as ne}from"./index.esm-70ab539c.js";import{a as le}from"./index-e4c6057f.js";import{C as de}from"./ConfirmDialog-3202eb3d.js";import{u as ce}from"./usePermission-d94b4984.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";import"./useControllableState-d0909575.js";import"./useDidUpdate-25c4d4ed.js";import"./FileSaver.min-20f3f13a.js";import"./DensitySelector-a2c1c68f.js";import"./NoData-8c485a3a.js";const pe=({touched:n,errors:s})=>e.jsxs(R,{className:"mb-4",children:[e.jsx(O,{asterisk:!0,label:"Title",invalid:s.title&&n.title,errorMessage:s.title,children:e.jsx(q,{type:"text",autoComplete:"off",name:"title",placeholder:"Title",component:E})}),e.jsx(O,{asterisk:!0,label:"Description",invalid:s.description&&n.description,errorMessage:s.description,children:e.jsx(q,{type:"text",textArea:!0,autoComplete:"off",name:"description",placeholder:"description",component:E})})]}),{useUniqueId:me}=ie,ue=se().shape({title:oe().required("title is Required")}),v=r.forwardRef((n,s)=>{const{type:l,initialData:g={id:"",title:"",description:""},onFormSubmit:p,onDiscard:d}=n,C=me("CAT-");return e.jsx(re,{innerRef:s,initialValues:{...g},validationSchema:ue,onSubmit:(m,{setSubmitting:u})=>{const c={...m};l==="new"&&(c.id=C),p==null||p(c,u)},children:({touched:m,errors:u,isSubmitting:c})=>e.jsx(ne,{children:e.jsxs(Z,{children:[e.jsx(pe,{touched:m,errors:u}),e.jsxs(ae,{className:"px-8 flex items-center justify-between py-4",stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:[e.jsx(k,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>d==null?void 0:d(),children:"Discard"}),e.jsx(k,{size:"sm",variant:"solid",loading:c,icon:e.jsx(le,{}),type:"submit",children:"Save"})]})]})})})});v.displayName="CategoryForm";const T=n=>{const{onDrawerClose:s,categoryId:l,initialData:g,fetchData:p}=n;H(),V(),r.useState(!1);const d=async i=>await Q(i),C=async i=>await W(l,i),m=()=>{p()},u=async(i,x)=>{x(!0);const j={description:i==null?void 0:i.description,title:i==null?void 0:i.title};(l?C:d)(j).then(f=>{f.success&&(w.push(e.jsxs(S,{title:"Success",type:"success",duration:2500,children:["Category ",l?"Updated":"Added"," Successfully"]}),{placement:"top-center"}),m(),s())}).catch(f=>{var D;console.log("category - error",f);var h=(D=f.response)==null?void 0:D.data;x(!1),w.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:(h==null?void 0:h.message)||"Something went wrong"}),{placement:"top-center"})})},c=()=>{s()};return e.jsx(v,{type:l?"edit":"new",initialData:g,onFormSubmit:u,onDiscard:c})};K("SupportData",_);const We=()=>{const[n,s]=r.useState([]),[l,g]=r.useState(!1),[p,d]=r.useState(!1),[C,m]=r.useState(null);ce("Categories");const u={edit:!0,delete:!0,view:!1},[c,i]=r.useState(!1),[x,j]=r.useState(!1),[F,f]=r.useState(null),h=V(),D=N(t=>{var a,o;return((o=(a=t==null?void 0:t.SupportData)==null?void 0:a.data)==null?void 0:o.categoryList)||[]}),{loading:B}=N(t=>{var a;return(a=t==null?void 0:t.SupportData)==null?void 0:a.data}),y=N(t=>{var a,o;return((o=(a=t==null?void 0:t.SupportData)==null?void 0:a.data)==null?void 0:o.selectedRowData)||[]});r.useEffect(()=>{b()},[]);const b=()=>{h(Y())},z=()=>g(!0),A=()=>g(!1),I=()=>d(!1),P=(t,a)=>{a===M.edit&&(m(t.id),h(J(t)),d(!0)),a===M.delete&&(f(t),i(!0))},U=async()=>{var t,a;if(F)try{j(!0),await G(F.id),j(!1),i(!1),f(null),w.push(e.jsx(S,{title:"Success",type:"success",duration:2500,children:"Category deleted successfully"}),{placement:"top-center"}),b()}catch(o){console.error("Delete failed:",o),j(!1),w.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:((a=(t=o==null?void 0:o.response)==null?void 0:t.data)==null?void 0:a.message)||"Failed to delete category"}),{placement:"top-center"})}},$=[{dataField:"Action",caption:"Action",width:100,cellRender:t=>e.jsx(ee,{row:t==null?void 0:t.data,actions:u,buttonClick:P}),alignment:"center"},{dataField:"title",caption:"Title",width:300,align:"left"},{dataField:"description",caption:"Description",width:400,align:"left",wordWrapEnabled:!0},{dataField:"createdBy",caption:"Created By",width:300,align:"left"},{dataField:"createdDate",caption:"Created at",width:220,dataType:"date",format:"MM/dd/yyyy",align:"center"}];return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Categories"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx(k,{onClick:z,block:!0,variant:"solid",size:"sm",icon:e.jsx(X,{}),children:"Add Category"}),e.jsx(L,{title:"Add Category",isOpen:l,onClose:A,onRequestClose:A,portalClassName:"w30",children:e.jsx(T,{onDrawerClose:A,fetchData:b})}),e.jsx(L,{title:"Edit Category",isOpen:p,onClose:I,onRequestClose:I,portalClassName:"w30",children:e.jsx(T,{categoryId:C,initialData:{title:y==null?void 0:y.title,description:y==null?void 0:y.description},onDrawerClose:I,fetchData:b})})]})]})}),e.jsx(R,{className:"m-6 h-full bg-transparent",bodyClass:"h-full",children:e.jsx(R,{className:"p-4 borderless",children:e.jsx(te,{columns:$,tableName:"Category-table",data:D||[],height:"calc(100vh - 280px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:n,setSelectedRowId:s,setFilterValues:()=>{},filterValues:[],identity:"Category-Listing",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"Category-Listing-table",handleSearch:()=>{},isColumnResizing:!0,isPaginationReq:!0,isLoading:B})})}),e.jsx(de,{isOpen:c,type:"danger",title:"Delete Category",confirmButtonColor:"red-600",onClose:()=>i(!1),onRequestClose:()=>i(!1),onCancel:()=>i(!1),onConfirm:U,children:e.jsx("p",{children:"Are you sure you want to delete this category?"})})]})};export{We as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./vendor-mui-69397583.js";import{h as H,b6 as V,I,B as G,V as z,Z as S,dN as T,F as Q,t as W}from"./index-c62ac197.js";import{A as q}from"./AdaptableCard-df7695d6.js";import{r as n,c as v}from"./vendor-react-ece1c85f.js";import"./Alert-7dfbd254.js";import"./index-6b6d0f06.js";import"./index-c2088808.js";import"./Drawer-949c18c6.js";import"./FormContainer-91c2b0e4.js";import"./Switcher-c8648037.js";import"./index-36228db5.js";import"./Upload-fb34ce03.js";import{f as K}from"./UserService-047aef51.js";import{b as Z}from"./index-42e65911.js";import{h as J}from"./index-aaad94c2.js";import{H as O,a as X}from"./HubConnectionBuilder-5116af86.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";import"./useControllableState-d0909575.js";import"./useDidUpdate-25c4d4ed.js";const _=({onSelect:r,onClose:c})=>{const[o,C]=n.useState(""),[g,j]=n.useState([]),[p,k]=n.useState([]),m=H(t=>{var l,f;return((f=(l=t.auth.session)==null?void 0:l.tenantId)==null?void 0:f.toString())??""});return n.useEffect(()=>{(async()=>{try{const l=await K({fromDate:"",role:"",searchString:"",toDate:""},m,!0,"");j(l.data.values||[]),k(l.data.values||[])}catch(l){console.error("Failed to fetch clients:",l)}})()},[]),n.useEffect(()=>{const t=o.toLowerCase(),l=g.filter(f=>`${f.firstName} ${f.lastName}`.toLowerCase().includes(t)||f.email.toLowerCase().includes(t));k(l)},[o,g]),console.log("Filtered Clients:",p),s.jsxs("div",{className:"client-select-popup",children:[s.jsxs("div",{className:"popup-header",children:[s.jsx("h4",{children:"Select a User"}),s.jsx("button",{onClick:c,className:"close-button",children:s.jsx(V,{})})]}),s.jsx(I,{type:"text",placeholder:"Type to search by name or email...",value:o,onChange:t=>C(t.target.value)}),s.jsx("ul",{children:p.map(t=>s.jsxs("li",{onClick:()=>r(t),children:[s.jsx("p",{children:`${t.firstName} ${t.lastName}`}),s.jsx("p",{children:`${t.email}`})]},t.id))})]})};function B(r){if(!r)return"";const c=S(),o=S.utc(r).local();return o.isSame(c,"day")?o.format("hh:mm A"):o.isSame(c.subtract(1,"day"),"day")?`Yesterday ${o.format("hh:mm A")}`:o.format("MM-DD-YYYY hh:mm A")}const ee=({chats:r,onChatSelect:c,selectedChatId:o,setShowPopup:C,handleStartChat:g,showPopup:j,loggedInUser:p,isRefetch:k})=>{const[m,t]=n.useState(r),[l,f]=n.useState(""),y=H(e=>e.theme.mode),U=(e,d)=>{c(e),w(d)},w=e=>{t(m.map((d,a)=>a===e?{...d,isRead:!0}:d))},N=r==null?void 0:r.filter(e=>{var d,a;return((d=e==null?void 0:e.fromUser)==null?void 0:d.toLowerCase().includes(l.toLowerCase()))||((a=e==null?void 0:e.toUser)==null?void 0:a.toLowerCase().includes(l.toLowerCase()))});return n.useEffect(()=>{t(N)},[r,l]),n.useEffect(()=>{w(0)},[k]),n.useEffect(()=>{const e=r.map((d,a)=>d.toUserId===p&&d.fromUserId===o||d.fromUserId===p&&d.toUserId===o?{...d,isRead:!0}:d);t(e)},[r]),s.jsxs("div",{className:"chat-list",style:{position:"relative"},children:[s.jsxs("div",{className:"lg:flex items-center justify-between mb-2 p-2",children:[s.jsx("h3",{className:"mb-4 lg:mb-0 pl-2",children:"Chats"}),s.jsx("div",{className:"lg:mb-0 flex-0.5",children:s.jsx(G,{onClick:()=>C(!0),variant:"solid",size:"sm",icon:s.jsx(z,{})})})]}),j&&s.jsx(_,{onSelect:g,onClose:()=>C(!1)}),s.jsx(I,{type:"text",placeholder:"Search chat",className:"search-bar",value:l,onChange:e=>f(e.target.value)}),s.jsx("ul",{className:"chat-items",children:m==null?void 0:m.map((e,d)=>{var a,i,x,h,b,u,D,R,M,$,E,A,L,P,Y,F;return e.toUserId!==p?s.jsxs("li",{style:o===e.toUserId?y==="dark"?{backgroundColor:"#292f3c"}:{backgroundColor:"#e6e6e6"}:{},className:"chat-item",onClick:()=>U(e==null?void 0:e.toUserId,d),children:[s.jsxs("div",{className:"user-icon",children:[(h=(x=(i=(a=e==null?void 0:e.toUser)==null?void 0:a.split(" "))==null?void 0:i[0])==null?void 0:x.charAt(0))==null?void 0:h.toUpperCase(),(R=(D=(u=(b=e==null?void 0:e.toUser)==null?void 0:b.split(" "))==null?void 0:u[1])==null?void 0:D.charAt(0))==null?void 0:R.toUpperCase()]}),s.jsxs("div",{className:"chat-details dark:bg-[#292f3c] dark:text-white",children:[s.jsxs("span",{className:"user-name dark:bg-[#292f3c] dark:text-white",children:[s.jsx("span",{className:"dark:bg-[#292f3c] dark:text-white",children:e.toUser}),!e.isRead&&s.jsx("span",{style:{width:"10px",height:"10px",float:"right",backgroundColor:"green",borderRadius:"50%",display:"inline-block"}})]}),((M=e==null?void 0:e.messageText)==null?void 0:M.length)>40?`${e.messageText.substring(0,40)}...`:e.messageText,s.jsx("span",{className:"timestamp dark:bg-[#292f3c] dark:text-white",children:e.createdDate?B(e.createdDate):""})]})]},e.toUserId):s.jsxs("li",{style:o===e.fromUserId?y==="dark"?{backgroundColor:"#292f3c"}:{backgroundColor:"#e6e6e6"}:{},className:"chat-item ",onClick:()=>U(e==null?void 0:e.fromUserId,d),children:[s.jsxs("div",{className:"user-icon",children:[(A=(E=($=e==null?void 0:e.fromUser)==null?void 0:$.split(" "))==null?void 0:E[0])==null?void 0:A.charAt(0),(Y=(P=(L=e==null?void 0:e.fromUser)==null?void 0:L.split(" "))==null?void 0:P[1])==null?void 0:Y.charAt(0)]}),s.jsxs("div",{className:"chat-details dark:bg-[#292f3c] dark:text-white",children:[s.jsxs("span",{className:"user-name dark:bg-[#292f3c] dark:text-white",children:[s.jsx("span",{className:"dark:bg-[#292f3c] dark:text-white",children:e.fromUser}),!e.isRead&&s.jsx("span",{style:{width:"10px",height:"10px",float:"right",backgroundColor:"green",borderRadius:"50%",display:"inline-block"}})]}),((F=e==null?void 0:e.messageText)==null?void 0:F.length)>40?`${e.messageText.substring(0,40)}...`:e.messageText,s.jsx("span",{className:"timestamp dark:bg-[#292f3c] dark:text-white",children:e.createdDate?B(e.createdDate):""})]})]},e.fromUserId)})})]})},se=({messages:r,onSendMessage:c})=>{const[o,C]=v.useState(""),[g,j]=v.useState(!1),p=n.useRef(null),k=()=>{p.current.scrollTop=p.current.scrollHeight};n.useEffect(()=>{k()},[r]);const m=t=>{c(o,j),C("")};return s.jsxs("div",{className:"chat-detail dark:bg-[#292f3c]",children:[s.jsxs("div",{className:"messages",ref:p,children:[r.map((t,l)=>s.jsxs(v.Fragment,{children:[(t==null?void 0:t.sender)==="admin"&&s.jsx("span",{children:t==null?void 0:t.fromUser}),s.jsxs("div",{className:`message ${t.sender} dark:bg-[#292f3c] dark:text-white`,children:[s.jsx("span",{className:"text dark:bg-[#292f3c] dark:text-white",children:t.text}),s.jsx("span",{className:"timestamp ml-2 dark:bg-[#292f3c] dark:text-white",children:t.time})]})]},l)),g&&s.jsxs("div",{className:"loading-spinner",children:[s.jsx("div",{className:"spinner"}),s.jsx("div",{className:"flex justify-end pr-6",children:s.jsx("div",{className:"dot-spinner"})})]})]}),s.jsxs("div",{className:"message-input dark:bg-[#292f3c] dark:text-white",children:[s.jsx(I,{type:"text",placeholder:"Type here...",value:o,onChange:t=>C(t.target.value),onKeyDown:t=>{t.key==="Enter"&&o&&m()}}),s.jsx(G,{disabled:!o,shape:"circle",variant:"solid",size:"md",icon:s.jsx(Z,{}),onClick:m})]})]})};async function te(r){return(await T.apiV10ChatSendMessagePost(r)).data}async function re(r){return(await T.apiV10ChatGetChatHistoryPost(r)).data}async function ae(r){return(await T.apiV10ChatGetChatListIdPost(r)).data}const Te=()=>{const r=Q(a=>a.auth.user),[c,o]=n.useState([]),[C,g]=n.useState(!1),[j,p]=n.useState(!1),[k,m]=n.useState([]),[t,l]=n.useState(null),f=n.useRef(null),y=a=>{l(a),f.current=a};n.useEffect(()=>{var a=new O().withUrl(W.apiBaseUrl+"/chatNotification?userId="+r.id,{skipNegotiation:!0,transport:X.WebSockets}).build();a.start(),a.on("MessageReceivedNotification",i=>{N(),U(i)})},[]);const U=a=>{(a==null?void 0:a.messageSentFromUserId)===f.current&&(l(f.current),e(f.current),p(!j))},w=async(a,i)=>{var b;i(!0);const x={messageText:a,fromUserId:(b=r.id)==null?void 0:b.toString(),toUserId:t},h=await te(x);h!=null&&h.success&&(e(t),N()),i(!1)},N=n.useCallback(async()=>{var a;try{const i=await ae(r==null?void 0:r.id);o((a=i==null?void 0:i.data)==null?void 0:a.$values)}catch{o([])}},[]),e=async a=>{var i,x;try{const h=await re({fromUserId:r==null?void 0:r.id,toUserId:a});let b=(x=(i=h==null?void 0:h.data)==null?void 0:i.$values)==null?void 0:x.map(u=>({fromUser:u.fromUser,fromUserId:u.fromUserId,sender:u.fromUserId===(r==null?void 0:r.id)?"user":"admin",text:u==null?void 0:u.messageText,time:S.utc(u==null?void 0:u.createdDate).local().format("MM-DD-YYYY h:mm a")}));m(b)}catch{m([])}};n.useEffect(()=>{N()},[]),n.useEffect(()=>{t?e(t):m([])},[t]);const d=a=>{l(a.id);const i=c==null?void 0:c.map(x=>x==null?void 0:x.toUserId);i!=null&&i.includes(a.id)||o([{toUser:`${a.firstName} ${a.lastName}`,toUserId:a.id,messageText:"",createdDate:"",isRead:!0},...c]),g(!1)};return s.jsx(q,{className:"border-0 m-6 h-full p-4 dark:bg-[#292f3c] dark:text-white",bodyClass:"h-full",children:s.jsxs("div",{className:"chat-app dark:bg-[#292f3c] dark:text-whit",children:[s.jsx(ee,{chats:c,showPopup:C,handleStartChat:d,selectedChatId:t,onChatSelect:y,setShowPopup:g,loggedInUser:r==null?void 0:r.id,isRefetch:j}),t?s.jsx(se,{messages:k,onSendMessage:w}):s.jsx("div",{className:"chat-placeholder",children:s.jsxs("div",{className:"flex",style:{flexDirection:"column",alignItems:"center"},children:[s.jsx(J,{size:150,className:"mb-4 text-orange-600"}),s.jsx("p",{children:"No conversation selected"})]})})]})})};export{Te as default};
@@ -1 +0,0 @@
1
- import{j as r}from"./vendor-mui-69397583.js";import{A as s}from"./AdaptableCard-df7695d6.js";import{r as t}from"./vendor-react-ece1c85f.js";import"./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 x=()=>(t.useState(!1),r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:r.jsx("div",{className:"lg:flex items-center justify-between",children:r.jsx("h3",{className:"mb-4 lg:mb-0",children:"Chats"})})}),r.jsx(s,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:r.jsx(s,{className:"p-4",children:"Soon..."})})]}));export{x as default};
@@ -1 +0,0 @@
1
- import{s as r,j as t}from"./vendor-mui-69397583.js";import{r as a}from"./createSvgIcon-c5fc0d04.js";var e={},o=r;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,i=o(a()),s=t;u=e.default=(0,i.default)((0,s.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");export{u as d};
@@ -1,6 +0,0 @@
1
- import{j as e,l as te}from"./vendor-mui-69397583.js";import{A as $}from"./AdaptableCard-df7695d6.js";import{r as t,c as ae,f as re}from"./vendor-react-ece1c85f.js";import{b as se,c as oe,a as le}from"./vendor-redux-a1f00e6b.js";import{dV as ne,F as ie,bm as ce,cT as A,Y as de,l as ue,f as fe,Z as me}from"./index-c62ac197.js";import{T as B}from"./actioncell-17e12e21.js";import{D as pe}from"./tableV2-4d1c9fd2.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";import"./FileSaver.min-20f3f13a.js";import"./DensitySelector-a2c1c68f.js";import"./NoData-8c485a3a.js";async function he(){return(await ne.apiV10VideosListGet()).data}const Y="VideoData",I=se(`${Y}/getVideosData`,async s=>(await he()).data),xe={total:0,pageIndex:1,pageSize:10,query:"",sort:{order:"",key:""}},ge={loading:!1,deleteConfirmation:!1,selectedRowData:"",tableData:xe,filterData:{parentAccount:"",primaryContact:"",billingContact:""},accountList:[],contactList:[],videoList:[]},q=oe({name:`${Y}`,initialState:ge,reducers:{setTableData:(s,o)=>{s.tableData=o.payload},setFilterData:(s,o)=>{s.filterData=o.payload},toggleDeleteConfirmation:(s,o)=>{s.deleteConfirmation=o.payload},setSelectedRowData:(s,o)=>{s.selectedRowData=o.payload}},extraReducers:s=>{s.addCase(I.fulfilled,(o,n)=>{var c,x,i,p;o.videoList=(x=(c=n.payload)==null?void 0:c.data)==null?void 0:x.$values,o.tableData.total=(p=(i=n.payload)==null?void 0:i.data)==null?void 0:p.totalCount,o.loading=!1}).addCase(I.pending,o=>{o.loading=!0}).addCase(I.rejected,(o,n)=>{o.videoList=[]})}}),{setTableData:$e,setFilterData:Ae,toggleDeleteConfirmation:be,setSelectedRowData:ye}=q.actions,ve=q.reducer,Ce=le({data:ve}),M=ie,O=t.memo(({isOpen:s,onClose:o,videoUrl:n,title:c})=>{const[x,i]=t.useState(!0),[p,h]=t.useState(!1),[y,u]=t.useState(!1),r=t.useRef(null),v=t.useRef(null),D=t.useCallback(()=>{i(!1),u(!0),h(!1)},[]),j=t.useCallback(()=>{i(!1),u(!0),r.current&&r.current.play().catch(()=>{})},[]),V=t.useCallback(m=>{console.error("Video error:",m.currentTarget.error),i(!1),h(!0),u(!1)},[]),k=t.useCallback(()=>{r.current&&(r.current.pause(),r.current.currentTime=0,r.current.removeAttribute("src"),r.current.load()),i(!0),h(!1),u(!1),o()},[o]),w=t.useCallback(()=>{h(!1),i(!0),u(!1),r.current&&r.current.load()},[]),C=t.useCallback(m=>{m.target===v.current&&k()},[k]);return t.useEffect(()=>{if(!s)return;const m=d=>{var g,S;if(d.key==="Escape")return d.preventDefault(),d.stopPropagation(),!1;if(r.current&&y)switch(d.key){case" ":case"k":d.preventDefault(),r.current.paused?r.current.play():r.current.pause();break;case"ArrowLeft":d.preventDefault(),r.current.currentTime=Math.max(0,r.current.currentTime-10);break;case"ArrowRight":d.preventDefault(),r.current.currentTime=Math.min(r.current.duration,r.current.currentTime+10);break;case"ArrowUp":d.preventDefault(),r.current.volume=Math.min(1,r.current.volume+.1);break;case"ArrowDown":d.preventDefault(),r.current.volume=Math.max(0,r.current.volume-.1);break;case"m":d.preventDefault(),r.current.muted=!r.current.muted;break;case"f":d.preventDefault(),document.fullscreenElement?document.exitFullscreen():(S=(g=r.current).requestFullscreen)==null||S.call(g);break}};return document.addEventListener("keydown",m,!0),()=>{document.removeEventListener("keydown",m,!0)}},[s,y]),t.useEffect(()=>{s&&n&&(i(!0),h(!1),u(!1),r.current&&r.current.load())},[s,n]),t.useEffect(()=>(s?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[s]),s?e.jsxs("div",{ref:v,className:"video-modal-overlay",onClick:C,children:[e.jsxs("div",{className:"video-modal-content",children:[e.jsxs("div",{className:"video-header",children:[e.jsx("h3",{children:c}),e.jsx("button",{onClick:k,className:"close-button","aria-label":"Close video",type:"button",children:e.jsx(ce,{})})]}),e.jsxs("div",{className:"video-container",children:[e.jsxs("video",{ref:r,onCanPlay:D,onLoadedData:j,onError:V,controls:!0,controlsList:"nodownload",preload:"metadata",playsInline:!0,autoPlay:!1,children:[e.jsx("source",{src:n,type:"video/mp4"}),e.jsx("source",{src:n,type:"video/webm"}),e.jsx("source",{src:n,type:"video/ogg"}),"Your browser does not support the video tag."]}),x&&!y&&!p&&e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-gray-900/80 z-20",style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(17, 24, 39, 0.8)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",zIndex:20},children:[e.jsx("div",{style:{width:"48px",height:"48px",border:"3px solid transparent",borderTop:"3px solid white",borderRadius:"50%",animation:"spin 1s linear infinite",marginBottom:"16px"}}),e.jsx("p",{style:{color:"white",fontSize:"14px",margin:0},children:"Loading video..."})]}),p&&e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-gray-900 text-white z-20",style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgb(17, 24, 39)",color:"white",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",zIndex:20,padding:"16px",textAlign:"center"},children:[e.jsx("div",{style:{fontSize:"48px",marginBottom:"16px"},children:"⚠️"}),e.jsx("h4",{style:{fontSize:"20px",fontWeight:"600",marginBottom:"8px"},children:"Failed to load video"}),e.jsx("p",{style:{fontSize:"14px",opacity:.7,marginBottom:"16px"},children:"The video could not be loaded. Please try again."}),e.jsxs("div",{style:{display:"flex",gap:"8px"},children:[e.jsx("button",{onClick:w,style:{backgroundColor:"#3b82f6",color:"white",padding:"8px 16px",borderRadius:"6px",border:"none",cursor:"pointer",fontSize:"14px"},children:"Retry"}),e.jsx("button",{onClick:k,style:{backgroundColor:"#6b7280",color:"white",padding:"8px 16px",borderRadius:"6px",border:"none",cursor:"pointer",fontSize:"14px"},children:"Close"})]})]})]}),e.jsx("div",{className:"video-footer",children:e.jsxs("div",{className:"footer-content",children:[e.jsx("span",{children:"Click X to close"}),e.jsx("span",{className:"help-text",children:"Space: Play/Pause • F: Fullscreen • M: Mute"})]})})]}),e.jsx("style",{jsx:!0,children:`
2
- @keyframes spin {
3
- 0% { transform: rotate(0deg); }
4
- 100% { transform: rotate(360deg); }
5
- }
6
- `})]}):null});O.displayName="VideoPlayerModal";const G=t.memo(({thumbnailUrl:s,videoUrl:o,accountName:n,onVideoClick:c,width:x=80,height:i=56,className:p=""})=>{const[h,y]=t.useState(!1),[u,r]=t.useState(!0),v=t.useCallback(()=>{r(!1)},[]),D=t.useCallback(()=>{y(!0),r(!1)},[]),j=t.useCallback(()=>{c(o,`${n}`)},[o,n,c]);return e.jsx("div",{className:`video-thumbnail-container ${p}`,onClick:j,children:e.jsxs("div",{className:"thumbnail-wrapper",style:{width:`${x}px`,height:`${i}px`},children:[u&&e.jsx("div",{className:"loading-placeholder",children:e.jsx("div",{className:"loading-spinner"})}),h?e.jsxs("div",{className:"fallback-content",children:[e.jsx(A,{}),e.jsx("div",{className:"play-text",children:"Play"})]}):e.jsx("img",{src:s,alt:`${n} video thumbnail`,className:`thumbnail-image ${u?"loading":"loaded"}`,onLoad:v,onError:D,loading:"lazy"}),e.jsx("div",{className:"play-overlay",children:e.jsx("div",{className:"play-button",children:e.jsx(A,{})})})]})})});G.displayName="VideoThumbnail";de("VideoData",Ce);function je(s){const o=Math.floor(s/3600),n=Math.floor(s%3600/60),c=Math.floor(s%60),x=String(o).padStart(2,"0"),i=String(n).padStart(2,"0"),p=String(c).padStart(2,"0");return`${x}:${i}:${p}`}function ke(s){if(s===0)return"0 B";const o=["B","KB","MB","GB","TB"],n=Math.floor(Math.log(s)/Math.log(1024));return`${(s/Math.pow(1024,n)).toFixed(2)} ${o[n]}`}const _=()=>{const[s,o]=t.useState([]);t.useState(!1);const[n,c]=t.useState(!1),[x,i]=t.useState(!1);t.useState();const[p,h]=t.useState(!1),[y,u]=t.useState(!1),[r,v]=t.useState(""),[D,j]=t.useState(""),[V,k]=t.useState({}),w=t.useRef(null),[C,m]=t.useState(!1);t.useRef(null);const d=re(),g=ue(),{textTheme:S}=fe(),F=M(a=>a.VideoData.data.loading);M(a=>a.VideoData.data.tableData);const R=M(a=>a.VideoData.data.videoList||[]),L=t.useCallback(a=>{const l={},f=Date.now();a.forEach(b=>{l[b.id]=f+14*60*1e3}),k(l)},[]),E=t.useCallback(async()=>{const a=Date.now(),l=[];if(Object.entries(V).forEach(([f,b])=>{a>=b&&l.push(f)}),l.length>0&&!C){m(!0);try{await N()}catch(f){console.error("Failed to refresh video URLs:",f)}finally{m(!1)}}},[V,C]),N=t.useCallback(async()=>{try{await g(I())}catch(a){console.error("Failed to fetch video data:",a)}},[g]);t.useEffect(()=>{R.length>0&&L(R)},[R,L]),t.useEffect(()=>(w.current=setInterval(E,2*60*1e3),()=>{w.current&&clearInterval(w.current)}),[E]);const T=t.useCallback(async()=>{m(!0);try{await N()}catch(a){console.error("Manual refresh failed:",a)}finally{m(!1)}},[N]),z=t.useCallback(async(a,l)=>{try{await T(),l&&typeof l=="function"&&setTimeout(()=>{l()},1e3)}catch(f){console.error("Failed to handle video error:",f)}},[T]),K=t.useCallback(()=>{h(!0)},[]);t.useCallback(()=>{h(!1)},[]),t.useCallback(()=>{c(!0)},[]),t.useCallback(()=>{c(!1)},[]),t.useCallback(()=>{i(!1)},[]);const P=t.useCallback(a=>{window.open()},[d]),X=t.useCallback((a,l)=>{l===B.view&&P(a),l===B.delete&&(g(be(!0)),g(ye(a)))},[g,P]),U=t.useCallback((a,l)=>{v(a),j(l),u(!0)},[]),H=t.useCallback(()=>{u(!1),v(""),j("")},[]),W=t.useMemo(()=>[{dataField:"videoUrl",caption:"Video",width:"10%",alignment:"left",allowSorting:!1,allowFiltering:!1,allowSearch:!1,cellRender:a=>{const{videoUrl:l,thumbnailUrl:f,originalFileName:b,id:Q}=a.data;return l?e.jsx("div",{"data-cname":"Video",className:"flex items-center",children:e.jsx(G,{thumbnailUrl:f||"https://via.placeholder.com/160x90/e5e7eb/6b7280?text=Video",videoUrl:l,accountName:b,onVideoClick:U,onVideoError:ee=>z(Q,ee),width:100,height:50})}):e.jsx("div",{"data-cname":"Video",className:"flex items-center h-14",children:e.jsx("div",{className:"text-gray-400 text-xs bg-gray-100 px-3 py-2 rounded-lg",children:"No Video"})})}},{dataField:"originalFileName",caption:"Name",width:"30%",cellRender:a=>{var b;const f=((b=a==null?void 0:a.data)==null?void 0:b.videoUrl)??null;return e.jsx("div",{"data-cname":"Name",children:f?e.jsx("a",{href:f,target:"_blank",rel:"noopener noreferrer",className:`${S} ml-2 rtl:mr-2`,children:a.value}):e.jsx("span",{className:"ml-2 rtl:mr-2",children:a.value})})}},{dataField:"durationSeconds",caption:"Duration",alignment:"left",width:"10%",cellRender:a=>e.jsx("div",{"data-cname":"Video Duration",children:je(a.value)})},{dataField:"fileSizeBytes",caption:"Size",width:"10%",alignment:"left",cellRender:a=>e.jsx("div",{"data-cname":"Size",children:ke(a.value)})},{dataField:"userName",caption:"Uploaded By",width:"20%"},{dataField:"uploadDate",caption:"Upload Date",width:"20%",dataType:"date",format:"dd-MM-yyyy",cellRender:a=>{const l=me(a.value).format("MM/DD/YYYY");return e.jsx("div",{"data-cname":"Upload Date",children:l})}}],[S,X,U,z]),[Z,J]=t.useState({pageSize:"",pageIndex:""});return t.useEffect(()=>{N()},[N]),e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Video Check In"}),e.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center gap-2"})]})}),e.jsxs($,{className:"m-6 h-full py-4 px-6 bg-transparent ",bodyClass:"h-full",children:[(F||C)&&e.jsx(te,{sx:{backgroundColor:"rgba(0, 0, 0, 0.1)","& .MuiLinearProgress-bar":{backgroundColor:"var(--custom-600)"}}}),C&&e.jsx("div",{className:"mb-2 text-sm text-blue-600 bg-blue-50 px-3 py-2 rounded",children:"Refreshing video URLs..."}),e.jsx($,{className:"borderless",children:e.jsx(pe,{columns:W,tableName:"CheckIn-Listing",data:R||[],defaultHiddenColumn:[],height:"calc(100vh - 290px)",fetchData:()=>{},id_label:"$id",selectedRowId:s,setSelectedRowId:o,setFilterValues:()=>{},filterValues:[],identity:"CheckIn-Listing",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"CheckIn-Listing",handleSearch:()=>{},isColumnResizing:!0,pager:Z,setPager:J,openFilter:K,isPaginationReq:!0,isFilterReq:!1,isSelectionReq:!1,isLoading:F||C})})]}),e.jsx(O,{isOpen:y,onClose:H,videoUrl:r,title:D})]})};_.displayName="CheckIn";const Be=ae.memo(_);export{Be as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor-mui-69397583.js";import{am as F,d as S,an as pe,h as i,l as Y,ao as fe,ap as $,N as L,aq as je,ar as Z,as as ee,u as ge,at as Ne,au as ve,av as ye,s as V,a5 as Ce,ai as Me,aw as W,ax as be,ay as we,az as De,aA as Se,aB as $e,aC as Ae,aD as Ee,aE as Ie,aF as Pe,aG as Le,aH as Te,aI as H,aJ as _e,aK as Ke,j as A,aL as se,aM as Re,aN as B,Y as ke,aO as Oe,aP as Fe,aQ as U,aR as G,P as Ve,b as We}from"./index-c62ac197.js";import{w as T,S as He}from"./SidePanelContent-6b13836f.js";import{r as j,L as _,u as te,c as K}from"./vendor-react-ece1c85f.js";import{_ as Be}from"./vendor-pdf-b2a5d8b1.js";import{D as ne}from"./Drawer-949c18c6.js";import{D as M,b as R,S as Ue}from"./index-c2088808.js";import"./Alert-7dfbd254.js";import"./index-6b6d0f06.js";import"./FormContainer-91c2b0e4.js";import"./Switcher-c8648037.js";import"./index-36228db5.js";import"./Upload-fb34ce03.js";import{L as ae}from"./Logo-3f3c9ee6.js";import{T as Ge,a as qe,b as q,c as ze,d as Qe,e as z,f as Je,g as Xe}from"./index-aaad94c2.js";import{A as Ye}from"./index-e4c6057f.js";import{M as Ze}from"./index-f6be0390.js";import{u as re,T as Q}from"./vendor-i18n-2fcb1983.js";import{r as es}from"./index-ea125a16.js";import{V as ss}from"./Views-74429e81.js";const oe=({toggled:s,className:t})=>e.jsx("div",{className:t,children:s?e.jsx(F,{}):e.jsx(F,{})}),ts=s=>{const{headerStart:t,headerEnd:n,headerMiddle:a,className:o,container:r}=s;return e.jsx("header",{className:S("header",o),children:e.jsxs("div",{className:S("header-wrapper",pe,r&&"container mx-auto"),children:[e.jsx("div",{className:"header-action header-action-start",children:t}),a&&e.jsx("div",{className:"header-action header-action-middle",children:a}),e.jsx("div",{className:"header-action header-action-end",children:n})]})})},w=(s="")=>parseInt(s.replace("px","")),ns={"2xl":w("1536px"),xl:w("1280px"),lg:w("1024px"),md:w("768px"),sm:w("640px"),xs:w("576px")},k=()=>{const s=(r="smaller")=>{const x=window.innerWidth;return Object.fromEntries(Object.entries(ns).map(([l,d])=>[l,r==="larger"?x>d:x<d]))},t=()=>({windowWidth:window.innerWidth,larger:s("larger"),smaller:s("smaller")}),[n,a]=j.useState(t()),o=()=>{const r=t();a(r)};return j.useEffect(()=>(window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)),[n.windowWidth]),n},as=({className:s})=>{const t=i(r=>r.theme.layout.sideNavCollapse),n=Y(),{larger:a}=k(),o=()=>{n(fe(!t))};return e.jsx(e.Fragment,{children:a.md&&e.jsx("div",{className:s,onClick:o,children:e.jsx(oe,{className:"text-2xl",toggled:t})})})},rs=T(as),os=j.lazy(()=>Be(()=>import("./index-289cfedb.js"),["assets/index-289cfedb.js","assets/vendor-mui-69397583.js","assets/vendor-react-ece1c85f.js","assets/index-c62ac197.js","assets/vendor-redux-a1f00e6b.js","assets/vendor-pdf-b2a5d8b1.js","assets/vendor-devex-33a39e11.js","assets/vendor-i18n-2fcb1983.js","assets/vendor-msal-9caa1ed1.js","assets/vendor-charts-eccea5d1.js","assets/index-8c229076.css","assets/SidePanelContent-6b13836f.js","assets/Switcher-c8648037.js","assets/index-ec2010d2.js","assets/index-6b6d0f06.js","assets/useControllableState-d0909575.js","assets/DoubleSidedImage-ae98733b.js","assets/Drawer-949c18c6.js","assets/index-c2088808.js","assets/useDidUpdate-25c4d4ed.js","assets/Alert-7dfbd254.js","assets/FormContainer-91c2b0e4.js","assets/index-36228db5.js","assets/Upload-fb34ce03.js","assets/Logo-3f3c9ee6.js","assets/index-aaad94c2.js","assets/index-e4c6057f.js","assets/index-f6be0390.js","assets/index-ea125a16.js","assets/Views-74429e81.js"])),is=T(oe),ls=s=>{const{menus:t}=s,[n,a]=j.useState(!1),o=()=>{a(!0)},r=()=>{a(!1)};i(u=>u.theme.themeColor),i(u=>u.theme.primaryColorLevel);const x=i(u=>u.theme.navMode),l=i(u=>u.theme.mode),d=i(u=>u.theme.themeColours),p=i(u=>u.theme.themeSecondaryColours),h=i(u=>u.theme.direction),g=i(u=>u.base.common.currentRouteKey),b=i(u=>u.auth.user.authority),{smaller:f}=k(),v=u=>{const E=parseInt(u.slice(1,3),16),I=parseInt(u.slice(3,5),16),D=parseInt(u.slice(5,7),16);return(.299*E+.587*I+.114*D)/255>.5?"#111827":"#ffffff"},m=l===ee||x===$?(p==null?void 0:p["950"])||(p==null?void 0:p["900"]):p==null?void 0:p["600"];return m?v(m):x===$?"#ffffff":x===L&&(d!=null&&d["600"])?v(d[600]):"#111827",e.jsx(e.Fragment,{children:f.md&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-2xl",onClick:o,children:e.jsx(is,{toggled:n})}),e.jsx(ne,{title:"Navigation",isOpen:n,bodyClass:"p-0 bg-white",portalClassName:"prevent-overflow",width:330,placement:h===je?"right":"left",onClose:r,onRequestClose:r,children:e.jsx(j.Suspense,{fallback:e.jsx(e.Fragment,{}),children:n&&e.jsx("div",{style:{minHeight:"100%",backgroundColor:"#ffffff"},children:e.jsx(os,{navMode:Z,collapsed:!1,navigationTree:t,routeKey:g,userAuthority:b,direction:h,onMenuItemClick:r})})})})]})})},cs=[{label:"Profile",path:"/app/account/settings/profile",icon:e.jsx(ye,{})}],ds=({className:s})=>{var y;const{avatar:t,userName:n,userAvatarName:a,authority:o,email:r,roleName:x=""}=i(m=>m.auth.user),l=Y(),d=i(m=>m.theme.panelExpand),p=i(m=>m.theme.direction),h=()=>{l(V(!0))},g=()=>{l(V(!1));const m=document.body.classList;m.contains("drawer-lock-scroll")&&m.remove("drawer-lock-scroll","drawer-open")},{signOut:b}=ge();let f;t?f=e.jsx(Ce,{size:32,shape:"circle",src:t}):f=e.jsx("span",{className:"user-no-avatar",children:(y=n==null?void 0:n.substring(0,2))==null?void 0:y.toUpperCase()});const v=e.jsx("div",{className:S(s,"flex items-center"),children:f});return e.jsxs("div",{children:[e.jsxs(M,{menuStyle:{minWidth:240},renderTitle:v,placement:"bottom-end",children:[e.jsx(M.Item,{variant:"header",children:e.jsxs("div",{className:"py-2 px-3 flex items-center gap-2",children:[f,e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-gray-900 dark:text-gray-100",children:n}),e.jsx("div",{className:"text-xs",children:r})]})]})}),e.jsx(M.Item,{variant:"divider"}),cs.map(m=>e.jsx(M.Item,{eventKey:m.label,className:"mb-1 px-0",children:e.jsx(_,{className:"flex h-full w-full px-2",to:m.path,children:e.jsxs("span",{className:"flex gap-2 items-center w-full",children:[e.jsx("span",{className:"text-xl opacity-50",children:m.icon}),e.jsx("span",{children:m.label})]})})},m.label)),e.jsx(M.Item,{variant:"divider"}),e.jsxs(M.Item,{eventKey:"Settings",className:"gap-2",onClick:h,children:[e.jsx("span",{className:"text-xl opacity-50",children:e.jsx(Ne,{})}),e.jsx("span",{children:"Settings"})]}),e.jsx(M.Item,{variant:"divider"}),e.jsxs(M.Item,{eventKey:"Sign Out",className:"gap-2",onClick:b,children:[e.jsx("span",{className:"text-xl opacity-50",children:e.jsx(ve,{})}),e.jsx("span",{children:"Sign Out"})]})]}),e.jsx(ne,{title:"Theme Config",isOpen:d,placement:p==="rtl"?"left":"right",portalClassName:"w30",onClose:g,onRequestClose:g,children:e.jsx(He,{callBackClose:g})})]})},us=T(ds),ie={account:e.jsx(Me,{}),authentication:e.jsx(W,{}),Dashboard:e.jsx(Ge,{}),Talks:e.jsx(qe,{}),Schedule:e.jsx(q,{}),Events:e.jsx(q,{}),Documents:e.jsx(ze,{}),"Billing & Invoice":e.jsx(Qe,{}),"Support Tickets":e.jsx(be,{}),"Training Portal":e.jsx(we,{}),"Election Mobile App":e.jsx(Ze,{}),Courses:e.jsx(z,{}),Projects:e.jsx(z,{}),"FAQ's":e.jsx(Ye,{}),Timesheets:e.jsx(Je,{}),Products:e.jsx(Xe,{}),Reports:e.jsx(De,{}),Components:e.jsx(Se,{}),Settings:e.jsx($e,{}),signIn:e.jsx(Ae,{}),signUp:e.jsx(Ee,{}),forgotPassword:e.jsx(W,{}),resetPassword:e.jsx(Ie,{}),accessDenied:e.jsx(Pe,{}),guide:e.jsx(Le,{}),CMS:e.jsx(Te,{}),Build:e.jsx(H,{}),Modules:e.jsx(H,{}),"Client Portal":e.jsx(_e,{}),Entities:e.jsx(Ke,{})},J=({icon:s,isDefaultIcon:t,gutter:n=!1})=>{const a=se[s];return typeof s!="string"&&!s?e.jsx(e.Fragment,{}):e.jsx("span",{className:`text-2xl ${n?"ltr:mr-2 rtl:ml-2":"ml-3"}`,children:t?ie[s]??e.jsx(A,{}):a?e.jsx(a,{}):e.jsx(A,{})})},{MenuItem:ms}=R,xs=({title:s,translateKey:t,children:n,direction:a})=>{const{t:o}=re();return e.jsx(Re,{title:o(t)||s,placement:a==="rtl"?"left":"right",children:n})},X=s=>{const{nav:t,onLinkClick:n,sideCollapsed:a}=s;i(d=>d.theme.navMode);const o=i(d=>d.theme.themeColor),r=i(d=>d.theme.primaryColorLevel);i(d=>d.theme.sideNavigationColor),i(d=>d.theme.mode);const x=te(),l=t.menuName.toLowerCase().replace(/\s+/g,"").includes(x.pathname.replace(/^\/|\/$/g,"").split("/")[1]);return e.jsx(ms,{id:`${t.id}`,eventKey:t.id,className:`mb-2 ${l?"menu-item-active":""}`,children:t.menuName==="Client Portal"?e.jsxs("a",{href:t.routeLink,target:"_blank",rel:"noopener noreferrer",className:`flex items-center px-0 h-full w-full text-${o}-600 border border-${o}-${r} border-opacity-10 rounded-md bg-${o}-${r} bg-opacity-10`,onClick:()=>n==null?void 0:n({key:t.id,title:t.menuName,path:t.routeLink??""}),children:[e.jsx(J,{icon:t.icon?t.icon:t.menuName,isDefaultIcon:!t.icon}),!a&&e.jsx("span",{className:"pl-2",children:e.jsx(Q,{i18nKey:t.translateKey,defaults:t.menuName})})]}):e.jsxs(_,{to:t.routeLink??"",className:"flex items-center px-0 h-full w-full",onClick:()=>n==null?void 0:n({key:t.id,title:t.menuName,path:t.routeLink??""}),children:[e.jsx(J,{icon:t.icon?t.icon:t.menuName,isDefaultIcon:!t.icon}),!a&&e.jsx("span",{className:"pl-2",children:e.jsx(Q,{i18nKey:t.translateKey,defaults:t.menuName})})]})},t.$id)},hs=({nav:s,onLinkClick:t,sideCollapsed:n,direction:a})=>e.jsx(e.Fragment,{children:n?e.jsx(xs,{title:s.menuName,translateKey:"",direction:a,children:e.jsx(X,{nav:s,sideCollapsed:n,onLinkClick:t})}):e.jsx(X,{nav:s,sideCollapsed:n,onLinkClick:t})}),le=({icon:s,isDefaultIcon:t,gutter:n=!1})=>{const a=se[s];return typeof s!="string"&&!s?e.jsx(e.Fragment,{}):e.jsx("span",{className:`text-2xl ${n?"ltr:mr-2 rtl:ml-2":"mr-2"}`,children:t?ie[s]??e.jsx(A,{}):a?e.jsx(a,{}):e.jsx(A,{})})},{MenuItem:ce,MenuCollapse:ps}=R,de=({items:s,onLinkClick:t,direction:n,isStrictActive:a})=>{const o=i(r=>r.theme.layout.sideNavCollapse);return e.jsx(e.Fragment,{children:s.map(r=>{var p;const x=((p=r.childMenus)==null?void 0:p.$values)||[],l=x.some(h=>h.isView);return!r.isView&&!l?null:x.length>0?e.jsx(ue,{nav:r,sideCollapsed:!1,direction:n,onLinkClick:t},r.$id):e.jsx(ce,{eventKey:r.$id,children:e.jsx(_,{className:"h-full w-full flex items-center ml-4",to:r.routeLink,onClick:()=>t==null?void 0:t({key:r.$id,title:r.menuName,path:r.routeLink??""}),children:e.jsx("span",{className:a?"text-orange-500":o?"text-gray-600":"",children:r.menuName})})},r.$id)})})},fs=({nav:s,onLinkClick:t,direction:n,sideCollapsed:a})=>{var l;const o=te(),r=s.routeLink?o.pathname.startsWith(s.routeLink):!1,x=s.routeLink?o.pathname===s.routeLink:!1;return e.jsx(ps,{id:`${s.id}`,label:e.jsxs(e.Fragment,{children:[e.jsx(le,{icon:s.icon?s.icon:s.menuName,isDefaultIcon:!s.icon}),e.jsx("span",{children:s.menuName})]}),eventKey:s.$id,isActive:r,expanded:r,children:e.jsx(de,{items:((l=s.childMenus)==null?void 0:l.$values)||[],direction:n,onLinkClick:t,isStrictActive:x,isCollapsed:a})},s.$id)},js=({nav:s,onLinkClick:t,direction:n,sideCollapsed:a})=>{var l;const o=s.routeLink?location.pathname.startsWith(s.routeLink):!1,r=e.jsx(ce,{id:`${s.id}`,eventKey:s.$id,active:o,children:e.jsx(le,{icon:s.icon?s.icon:s.menuName,isDefaultIcon:!s.icon})},s.$id),x=s.routeLink?location.pathname===s.routeLink:!1;return e.jsx(M,{trigger:"hover",renderTitle:r,placement:n==="rtl"?"middle-end-top":"middle-start-top",children:e.jsx(de,{items:((l=s.childMenus)==null?void 0:l.$values)||[],direction:n,onLinkClick:t,isStrictActive:x,isCollapsed:a})})},ue=({sideCollapsed:s,nav:t,direction:n,onLinkClick:a})=>s?e.jsx(js,{nav:t,direction:n,onLinkClick:a,sideCollapsed:s}):e.jsx(fs,{nav:t,direction:n,onLinkClick:a,sideCollapsed:s}),me=(s,t)=>s.map(n=>{const a={...n,parentKey:t};return n.childMenus&&Array.isArray(n.childMenus.$values)&&(a.childMenus.$values=me(n.childMenus.$values,a.$id)),a}),gs=(s,t)=>{if(typeof t!="string"){console.warn("Invalid key: must be a string");return}if(!s||typeof s!="object"&&!Array.isArray(s)){console.warn("Invalid navTree: must be an object or an array");return}const n=a=>{if(a.menuName.toLowerCase().replace(/\s+/g,"")===t.toLowerCase().replace(/\s+/g,""))return a;if(a.childMenus&&Array.isArray(a.childMenus.$values))for(const o of a.childMenus.$values){const r=n(o);if(r)return r.parentKey=a.menuName.toLowerCase().replace(/\s+/g,""),r}};if(Array.isArray(s))for(const a of s){const o=n(a);if(o)return o}else return n(s)},xe=(s,t)=>Array.isArray(s)?(s==null?void 0:s.find(a=>a.$id===t))?!0:s.some(a=>xe(a.childMenus,t)):!1,Ns=(s,t)=>{let n={};return s.forEach(a=>{xe([a],t)&&(n=a)}),n};function vs(s,t){const n=j.useMemo(()=>me(s),[s]),a=j.useMemo(()=>gs(n,t),[n,t]),o=j.useMemo(()=>Ns(n,t),[n,t]);return{activedRoute:a,includedRouteTree:o}}const ys=s=>{const{navMode:t=B.navMode,collapsed:n,navigationTree:a=[],userAuthority:o=[],onMenuItemClick:r,routeKey:x,direction:l=B.direction}=s;re();const[d,p]=j.useState([]),{activedRoute:h}=vs(a,x);j.useEffect(()=>{h!=null&&h.parentKey&&p([h.parentKey])},[h]);const g=()=>{r==null||r()},b=f=>{var y;if(!f.isView)return null;const v=((y=f.childMenus)==null?void 0:y.$values)||[];return v.length?e.jsx(ue,{nav:f,sideCollapsed:n,direction:l,onLinkClick:r,activedRoute:h,children:v.map(m=>b(m))},f.id):e.jsx(hs,{nav:f,sideCollapsed:n,direction:l,onLinkClick:g,activedRoute:h},f.id)};return e.jsx(R,{className:"px-4",variant:"none",sideCollapsed:n,defaultActiveKeys:h!=null&&h.$id?[h.$id]:[],defaultExpandedKeys:d,children:a.map(f=>b(f))})},Cs=ys,Ms={width:U,minWidth:U},bs={width:G,minWidth:G},ws=s=>{const{menus:t}=s,[n,a]=j.useState([]),o=i(c=>{var N,C;return(C=(N=c.menuList)==null?void 0:N.data)==null?void 0:C.menuPermissions});j.useEffect(()=>{ke("menuList",es)},[]),j.useEffect(()=>{a(t)},[t]),j.useEffect(()=>{o!=null&&o.length&&a(D(o))},[o]),i(c=>c.theme.themeColor),i(c=>c.theme.primaryColorLevel);const r=i(c=>c.theme.navMode),x=i(c=>c.theme.sideNavigationColor),l=i(c=>c.theme.themeSecondaryColours),d=i(c=>c.theme.mode),p=i(c=>c.theme.direction),h=i(c=>c.base.common.currentRouteKey),g=i(c=>c.theme.layout.sideNavCollapse),b=i(c=>c.auth.user.authority),{larger:f}=k(),v=c=>{const N=parseInt(c.slice(1,3),16),C=parseInt(c.slice(3,5),16),he=parseInt(c.slice(5,7),16);return(.299*N+.587*C+.114*he)/255>.5?"#111827":"#ffffff"},y=d===ee||r===$,m=y?(l==null?void 0:l["950"])||(l==null?void 0:l["900"]):l==null?void 0:l["600"],u=m?v(m):y?"#ffffff":void 0,E=()=>r===L?`bg-${x} side-nav-${r}`:`side-nav-${r}`,I=()=>r===L?$:r===Z?d:r,D=(c=[])=>[...c].map(N=>{var C;return{...N,childMenus:(C=N.childMenus)!=null&&C.$values?{...N.childMenus,$values:D(N.childMenus.$values)}:N.childMenus}}).sort((N,C)=>N.sequence-C.sequence),P=e.jsx(Cs,{navMode:r,collapsed:g,navigationTree:n,routeKey:h,userAuthority:b,direction:p});return e.jsx(e.Fragment,{children:f.md&&e.jsxs("div",{style:{...g?bs:Ms,...m?{backgroundColor:m}:{},...u?{color:u,"--menu-item-color":u}:{}},className:S("side-nav",E(),!g&&"side-nav-expand"),children:[e.jsxs("div",{className:"side-nav-header",children:[e.jsx(ae,{logoWidth:"200px",mode:I(),type:g?"streamline":"full",className:g?Oe:Fe}),e.jsx("div",{className:"pb-5"})]}),g?P:e.jsx("div",{className:"side-nav-content",children:e.jsx(Ue,{autoHide:!0,direction:p,children:P})})]})})},Ds=K.memo(s=>{const{menus:t}=s;return e.jsxs(e.Fragment,{children:[e.jsx(ae,{type:"streamline",imgClass:"mx-auto mobile-only"}),e.jsx(ls,{menus:t}),e.jsx(rs,{})]})}),Ss=K.memo(()=>e.jsx(e.Fragment,{children:e.jsx(us,{hoverable:!1})})),$s=()=>{const[s,t]=j.useState([]);j.useEffect(()=>{n()},[]);const n=async()=>{var o;const a=localStorage.getItem(Ve);if(a){const r=await We(a,"default");let x=O((o=r==null?void 0:r.data)==null?void 0:o.$values);t(x??[])}else t([])};return e.jsx("div",{className:"app-layout-classic flex flex-auto flex-col",children:e.jsxs("div",{className:"flex flex-auto min-w-0",children:[e.jsx(ws,{menus:s}),e.jsxs("div",{className:"flex flex-col flex-auto min-h-screen min-w-0 relative w-full",children:[e.jsx(ts,{className:"shadow dark:shadow-2xl",headerStart:e.jsx(Ds,{menus:s}),headerEnd:e.jsx(Ss,{})}),e.jsx("div",{className:"h-full flex flex-auto flex-col",children:e.jsx(ss,{})})]})]})})};function O(s){return s.forEach(t=>{var n;t.childMenus&&t.childMenus.$values&&(t.childMenus.$values=O((n=t==null?void 0:t.childMenus)==null?void 0:n.$values))}),s.sort((t,n)=>t.sequence-n.sequence)}const As=K.memo($s),Xs=Object.freeze(Object.defineProperty({__proto__:null,default:As,sortMenuItems:O},Symbol.toStringTag,{value:"Module"}));export{Xs as C,ts as H,ls as M,rs as S,us as U,Cs as V,ws as a,ie as n,O as s,k as u};
@@ -1 +0,0 @@
1
- import{j as e,Q as de}from"./vendor-mui-69397583.js";import{A as z}from"./AdaptableCard-df7695d6.js";import{r as o,f as P}from"./vendor-react-ece1c85f.js";import{b as J,c as me,a as pe}from"./vendor-redux-a1f00e6b.js";import{a as ue,b as ye,c as fe,d as Ce,e as he}from"./CompanyService-1bf7c3c8.js";import{F as ge,l as D,I as w,B as F,al as xe,Y as K,E as De,c9 as H,O as R,Q as v,f as be,V as je}from"./index-c62ac197.js";import"./Alert-7dfbd254.js";import"./index-6b6d0f06.js";import"./index-c2088808.js";import{D as Q}from"./Drawer-949c18c6.js";import{a as S,F as we}from"./FormContainer-91c2b0e4.js";import"./Switcher-c8648037.js";import"./index-36228db5.js";import"./Upload-fb34ce03.js";import{A as Se,T as L}from"./actioncell-17e12e21.js";import{D as Ne}from"./tableV2-4d1c9fd2.js";import{D as Fe}from"./DoubleSidedImage-ae98733b.js";import{h as Re}from"./index-36ba4ea7.js";import{S as ve}from"./StickyFooter-5b934274.js";import{C as X}from"./ConfirmDialog-3202eb3d.js";import{d as N,c as Ie,a as O,F as ke,b as Ae}from"./index.esm-70ab539c.js";import{a as Le}from"./index-e4c6057f.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";import"./useControllableState-d0909575.js";import"./useDidUpdate-25c4d4ed.js";import"./FileSaver.min-20f3f13a.js";import"./DensitySelector-a2c1c68f.js";import"./NoData-8c485a3a.js";const T="CompanyData",x=J(`${T}/getCompaniesData`,async a=>(await ue(a)).data),E=J(T+"/getCompanyDetails",async a=>(await ye(a.id)).data),Oe={total:0,pageIndex:1,pageSize:10,query:"",sort:{order:"",key:""}},ze={loading:!1,deleteConfirmation:!1,selectedRowData:"",tableData:Oe,filterData:{name:"",category:["bags","cloths","devices","shoes","watches"],status:[0,1,2],productStatus:0},companyList:[]},Z=me({name:`${T}`,initialState:ze,reducers:{setTableData:(a,t)=>{a.tableData=t.payload},setFilterData:(a,t)=>{a.filterData=t.payload},toggleDeleteConfirmation:(a,t)=>{a.deleteConfirmation=t.payload},setSelectedRowData:(a,t)=>{a.selectedRowData=t.payload}},extraReducers:a=>{a.addCase(x.fulfilled,(t,s)=>{t.companyList=s.payload.$values,t.tableData.total=s.payload.$values.length,t.loading=!1}).addCase(x.pending,t=>{t.loading=!0}).addCase(E.fulfilled,(t,s)=>{t.company=s.payload,t.loading=!1}).addCase(E.pending,t=>{t.loading=!0})}}),{setTableData:Rt,setFilterData:vt,toggleDeleteConfirmation:M,setSelectedRowData:_}=Z.actions,Ee=Z.reducer,ee=pe({data:Ee}),h=ge,Me=({data:a,pager:t,setPager:s,fetchData:m})=>{var c;const i=(y,r)=>{s(p=>({...p,pageIndex:r})),m({pageIndex:r,pageSize:t==null?void 0:t.pageSize})},l=y=>{const r=parseInt(y.target.value,10);s(p=>({...p,pageSize:r})),m({pageIndex:t==null?void 0:t.pageIndex,pageSize:r})};return e.jsx(de,{component:"div",count:((c=a==null?void 0:a[0])==null?void 0:c.totalCount)||0,rowsPerPageOptions:[20,50,100,500],page:t==null?void 0:t.pageIndex,onPageChange:i,rowsPerPage:t==null?void 0:t.pageSize,onRowsPerPageChange:l})},Pe=a=>{D();const{touched:t,errors:s,type:m}=a;return o.useState(),e.jsxs(z,{className:"mb-4",children:[e.jsx(S,{label:"Company Name",invalid:s.companyName&&t.companyName,errorMessage:s.companyName,children:e.jsx(N,{type:"text",autoComplete:"off",name:"companyName",placeholder:"Company Name",component:w})}),e.jsx(S,{label:"Address",invalid:s.companyLocation&&t.companyLocation,errorMessage:s.companyLocation,children:e.jsx(N,{type:"text",autoComplete:"off",name:"companyLocation",placeholder:"Address",component:w})}),e.jsx(S,{label:"Website",invalid:s.website&&t.website,errorMessage:s.website,children:e.jsx(N,{type:"text",autoComplete:"off",name:"website",placeholder:"Website",component:w})}),e.jsx(S,{label:"Notes",invalid:s.notes&&t.notes,errorMessage:s.notes,children:e.jsx(N,{type:"text",autoComplete:"off",name:"notes",placeholder:"Notes",component:w,textArea:!0})})]})},{useUniqueId:Te}=Re,Y=Ie().shape({companyName:O().required("Company name Required"),companyLocation:O().required("Address Required"),website:O().required("Website Required")}),qe=({onDelete:a})=>{const[t,s]=o.useState(!1),m=()=>{s(!0)},i=()=>{s(!1)},l=()=>{a==null||a(s)};return e.jsxs(e.Fragment,{children:[e.jsx(F,{className:"text-red-600",variant:"plain",size:"sm",icon:e.jsx(xe,{}),type:"button",onClick:m,children:"Delete"}),e.jsx(X,{isOpen:t,type:"danger",title:"Delete Category",confirmButtonColor:"red-600",onClose:i,onRequestClose:i,onCancel:i,onConfirm:l,children:e.jsx("p",{children:"Are you sure you want to delete this? All record related to this role will be deleted as well. This action cannot be undone."})})]})},q=o.forwardRef((a,t)=>{const{type:s,initialData:m={id:"",contactName:"",email:"",contactNumber:"",posistion:"",notes:""},onFormSubmit:i,onDiscard:l,onDelete:c}=a,y=Te("Contact-");return e.jsx(e.Fragment,{children:e.jsx(ke,{innerRef:t,initialValues:{...m},validationSchema:Y,onSubmit:(r,{setSubmitting:p})=>{const C=r;s==="new"&&(C.id=y),i==null||i(C,p)},children:({values:r,touched:p,errors:C,isSubmitting:u})=>e.jsx(Ae,{children:e.jsxs(we,{children:[e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-1 gap-4",children:e.jsx("div",{className:"lg:col-span-2 pb-8",children:e.jsx(Pe,{type:s,touched:p,errors:C})})}),e.jsxs(ve,{className:"px-8 flex items-center justify-between py-4",stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:[e.jsx("div",{children:s==="edit"&&e.jsx(qe,{onDelete:c})}),e.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(F,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>l==null?void 0:l(),children:"Discard"}),e.jsx(F,{size:"sm",variant:"solid",loading:u,icon:e.jsx(Le,{}),type:"submit",children:"Save"})]})]})]})})})})});q.displayName="CompanyForm";K("CompanysData",ee);const Be=a=>{const{id:t,onDrawerClose:s}=a,m=D();P();const i=h(d=>{var f,g;return(g=(f=d.CompanyData)==null?void 0:f.data)==null?void 0:g.company});console.log("companyData",i);const l=h(d=>{var f,g;return(g=(f=d.CompanyData)==null?void 0:f.data)==null?void 0:g.loading}),c=d=>{m(E({id:d}))},y=()=>{m(x({}))},r=async(d,f)=>{f(!0);const g={companyName:d.companyName??"",companyLocation:d.companyLocation??"",website:d.website??"",status:"",notes:d.notes??""},I=await fe(t,g);f(!1),I&&(u("updated"),y(),s())},p=()=>{s()},C=async d=>{d(!1)},u=d=>{R.push(e.jsxs(v,{title:"Success",type:"success",duration:2500,children:["Company Successfully ",d]}),{placement:"top-center"})};return o.useEffect(()=>{c(t)},[t]),e.jsxs(e.Fragment,{children:[e.jsx(De,{loading:l,children:!H(i)&&e.jsx(e.Fragment,{children:e.jsx(q,{type:"edit",initialData:i,onFormSubmit:r,onDiscard:p,onDelete:C})})}),!l&&H(i)&&e.jsxs("div",{className:"h-full flex flex-col items-center justify-center",children:[e.jsx(Fe,{src:"/img/others/img-2.png",darkModeSrc:"/img/others/img-2-dark.png",alt:"No product found!"}),e.jsx("h3",{className:"mt-8",children:"No company found!"})]})]})},$e=()=>{const a=D(),t=h(c=>c.CompanyData.data.deleteConfirmation),s=h(c=>c.CompanyData.data.selectedRowData),m=h(c=>c.CompanyData.data.tableData),i=()=>{a(M(!1))},l=async()=>{a(M(!1)),await Ce(s.id)&&(a(x(m)),R.push(e.jsx(v,{title:"Deleted",type:"success",duration:2500,children:"Company Successfully Deleted"}),{placement:"top-center"}))};return e.jsx(X,{isOpen:t,type:"danger",title:"Delete Contact",confirmButtonColor:"red-600",onClose:i,onRequestClose:i,onCancel:i,onConfirm:l,children:e.jsx("p",{children:"Are you sure you want to delete this Contact? This action cannot be undone."})})},Ve=a=>{const{onDrawerClose:t,customerId:s}=a;P();const m=D();o.useState(!1);const i=async r=>await he(r),l=()=>{m(x({}))},c=async(r,p)=>{p(!0);const C={companyName:r.companyName??"",companyLocation:r.companyLocation??"",website:r.website??"",status:"",notes:r.notes??""};i(C).then(u=>{u.success&&(R.push(e.jsx(v,{title:"Success",type:"success",duration:2500,children:"Contact Successfully Added"}),{placement:"top-center"}),l(),t())}).catch(u=>{console.log("category - error",u);var d=u.response.data;p(!1),R.push(e.jsx(v,{title:"Error",type:"danger",duration:2500,children:d.message}),{placement:"top-center"})})},y=()=>{t()};return e.jsx(e.Fragment,{children:e.jsx(q,{type:"new",onFormSubmit:c,onDiscard:y})})},Ge=[{key:"auto",name:"Immediately"},{key:"onClick",name:"On Button Click"}],Ue=[{key:"dragAndDrop",name:"Drag and drop"},{key:"select",name:"Select"}],We=["nextColumn","widget"];K("CompanyData",ee);const He={edit:!0,delete:!0,view:!1},It=()=>{const[a,t]=o.useState([]),[s,m]=o.useState(!1);o.useState(!1);const[i,l]=o.useState(!1),[c,y]=o.useState(!1),[r,p]=o.useState(),C=()=>{l(!0)},u=()=>{l(!1)},[d,f]=o.useState(!0),[g,I]=o.useState(!0),[Qe,te]=o.useState(Ge[0].key),ae=o.useRef(null);o.useState(We[0]),o.useState(Ue[1].key),o.useState(!0),o.useState(!0),o.useState(!0),o.useState(!0);const se=P(),b=D(),B=h(n=>n.CompanyData.data.filterData);h(n=>n.CompanyData.data.loading);const k=h(n=>n.CompanyData.data.companyList);console.log("companyList",k),be();const{pageIndex:$,pageSize:V,sort:G,query:oe,total:_e}=h(n=>n.CompanyData.data.tableData);o.useEffect(()=>{ne()},[$,V,G,s,B]);const ne=()=>{const n=x({pageIndex:$,pageSize:V,sort:G,query:oe,filterData:B});b(n)},j=o.useCallback(()=>{ae.current.instance().clearFilter()},[]);o.useCallback(n=>{f(n.value),j()},[j]),o.useCallback(n=>{I(n.value),j()},[j]),o.useCallback(n=>{te(n.value)},[]);const ie=n=>{se("/app/crm/lead-details/"+n.id)},[U,W]=o.useState({pageSize:"",pageIndex:""}),re=(n,A)=>{A===L.view&&ie(n),A===L.edit&&(p(n.id),b(_(n)),y(!0)),A===L.delete&&(b(M(!0)),b(_(n)))},le=()=>{y(!1)},ce=[{dataField:"Action",caption:"Action",width:"130",cellRender:n=>e.jsx("div",{children:e.jsx(Se,{row:n==null?void 0:n.data,actions:He,buttonClick:re})})},{dataField:"companyName",caption:"Company Name",width:"330"},{dataField:"address",caption:"Address",width:"330"},{dataField:"website",caption:"Website",width:"330"},{dataField:"createdDate",caption:"Created On",width:"230",dataType:"date",format:"MM/dd/yyyy"}];return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Company"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx(F,{onClick:()=>C(),block:!0,variant:"solid",size:"sm",icon:e.jsx(je,{}),children:"Add Company"}),e.jsx(Q,{title:"Add Company",isOpen:i,onClose:u,onRequestClose:u,portalClassName:"w30",children:e.jsx(Ve,{onDrawerClose:u})}),e.jsx(Q,{title:"Edit Company",isOpen:c,onClose:u,onRequestClose:u,portalClassName:"w30",children:e.jsx(Be,{id:r,onDrawerClose:le})})]})]})}),e.jsx(z,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:e.jsxs(z,{className:"p-4",children:[e.jsx(Ne,{columns:ce,tableName:"contact-table",data:k||[],defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:a,setSelectedRowId:t,setFilterValues:()=>{},filterValues:[],identity:"Lead-Listing",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"Lead-Listing-table",handleSearch:()=>{},isColumnResizing:!0,pager:U,setPager:W}),e.jsx(Me,{data:k||[],pager:U,setPager:W,fetchData:()=>{}})]})}),e.jsx($e,{})]})};export{It as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor-mui-69397583.js";import{D as b,B as t,a5 as s,bq as j,bJ as p,aU as g,bp as N}from"./index-c62ac197.js";const f=({status:a})=>{switch(a){case"info":return e.jsx(s,{className:"bg-blue-100 text-blue-600 dark:bg-blue-500/20 dark:text-blue-100",shape:"circle",children:e.jsx("span",{className:"text-2xl",children:e.jsx(N,{})})});case"success":return e.jsx(s,{className:"bg-emerald-100 text-emerald-600 dark:bg-emerald-500/20 dark:text-emerald-100",shape:"circle",children:e.jsx("span",{className:"text-2xl",children:e.jsx(g,{})})});case"warning":return e.jsx(s,{className:"text-amber-600 bg-amber-100 dark:text-amber-100",shape:"circle",children:e.jsx("span",{className:"text-2xl",children:e.jsx(p,{})})});case"danger":return e.jsx(s,{className:"text-red-600 bg-red-100 dark:text-red-100",shape:"circle",children:e.jsx("span",{className:"text-2xl",children:e.jsx(j,{})})});default:return null}},D=a=>{const{type:n="info",title:c,children:i,onCancel:r,onConfirm:l,cancelText:x="Cancel",confirmText:d="Confirm",confirmButtonColor:o,...m}=a,h=()=>{r==null||r()},u=()=>{l==null||l()};return e.jsxs(b,{contentClassName:"pb-0 px-0",...m,children:[e.jsxs("div",{className:"px-6 pb-6 pt-2 flex",children:[e.jsx("div",{children:e.jsx(f,{status:n})}),e.jsxs("div",{className:"ml-4 rtl:mr-4",children:[e.jsx("h5",{className:"mb-2",children:c}),i]})]}),e.jsxs("div",{className:"text-right px-6 py-3 bg-gray-100 dark:bg-gray-700 rounded-bl-lg rounded-br-lg",children:[e.jsx(t,{size:"sm",className:"ltr:mr-2 rtl:ml-2",onClick:h,children:x}),e.jsx(t,{size:"sm",variant:"solid",color:o,onClick:u,children:d})]})]})};export{D as C};
@@ -1 +0,0 @@
1
- import{j as s}from"./vendor-mui-69397583.js";import{j as w,r as M}from"./vendor-react-ece1c85f.js";import{Y as R,l as T,E as z,Z as F}from"./index-c62ac197.js";import{A}from"./AdaptableCard-df7695d6.js";import{u as I,r as L,g as S}from"./index-49a94e54.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";import"./ContactService-92281a90.js";import"./AccountServices-62599aae.js";R("ContactsData",L);const $=W=>{var m;let{id:l}=w();const P=T(),Y=I(d=>{var i,r;return(r=(i=d.ContactsData)==null?void 0:i.data)==null?void 0:r.loading}),e=I(d=>{var i,r,c,a,n,h,p,x,j,o,t,N,g,b,u,v,y,C,f,E;return{...(r=(i=d.ContactsData)==null?void 0:i.data)==null?void 0:r.contact,posistion:{value:(n=(a=(c=d.ContactsData)==null?void 0:c.data)==null?void 0:a.contact)==null?void 0:n.contactPosistionId,label:(x=(p=(h=d.ContactsData)==null?void 0:h.data)==null?void 0:p.contact)==null?void 0:x.contactPosistion},accountId:{value:(t=(o=(j=d.ContactsData)==null?void 0:j.data)==null?void 0:o.contact)==null?void 0:t.accountId,label:(b=(g=(N=d.ContactsData)==null?void 0:N.data)==null?void 0:g.contact)==null?void 0:b.accountName},department:{label:(y=(v=(u=d.ContactsData)==null?void 0:u.data)==null?void 0:v.contact)==null?void 0:y.department,value:(E=(f=(C=d.ContactsData)==null?void 0:C.data)==null?void 0:f.contact)==null?void 0:E.departmentId}}}),O=d=>{P(S({id:d}))};return M.useEffect(()=>{l&&O(l)},[l]),s.jsx(s.Fragment,{children:s.jsxs(z,{loading:Y,children:[s.jsx("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:s.jsx("div",{className:"lg:flex items-center justify-between",children:s.jsx("h3",{className:"mb-4 lg:mb-0",children:"Contact Detail"})})}),s.jsx(A,{className:"m-6 h-full bg-transparent",bodyClass:"h-full",children:s.jsxs(A,{className:"py-4 px-6 borderless",children:[s.jsx("h3",{className:"mt-2 mtb-2 lg:mb-0",children:"Details"}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Contact Name"}),s.jsx("h6",{children:e==null?void 0:e.contactName})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Contact Number"}),s.jsx("h6",{children:e==null?void 0:e.contactNumber})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Email"}),s.jsx("h6",{children:e==null?void 0:e.email})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Account Name"}),s.jsx("h6",{children:e==null?void 0:e.accountName})]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Position"}),s.jsx("h6",{children:e==null?void 0:e.contactPosistion})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Department"}),s.jsx("h6",{children:(m=e==null?void 0:e.department)==null?void 0:m.label})]})]}),s.jsx("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Contact Time"}),s.jsx("h6",{children:e==null?void 0:e.preferredContactTime})]})}),s.jsx("hr",{}),s.jsx("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Address"}),s.jsxs("h6",{children:[e==null?void 0:e.address,", ",e==null?void 0:e.state,", ",e==null?void 0:e.city,", ",e==null?void 0:e.zip]})]})}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Industry"}),s.jsx("h6",{children:e==null?void 0:e.industry})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"No Of Employees"}),s.jsx("h6",{children:e==null?void 0:e.noOfEmployees})]})]}),s.jsx("hr",{}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:[s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Website"}),s.jsx("h6",{children:e==null?void 0:e.website})]}),s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Notes"}),s.jsx("h6",{children:e==null?void 0:e.notes})]})]}),s.jsx("hr",{}),s.jsx("div",{className:"grid md:grid-cols-2 gap-4 py-1",children:s.jsxs("div",{className:"mb-3",children:[s.jsx("p",{children:"Created On"}),s.jsx("h6",{children:e!=null&&e.createdDate?F(e==null?void 0:e.createdDate).format("MM/DD/YYYY"):""})]})})]})})]})})};export{$ as default};
@@ -1 +0,0 @@
1
- import{j as e,l as re}from"./vendor-mui-69397583.js";import{A as Q}from"./AdaptableCard-df7695d6.js";import{r as i,f as de,L as me}from"./vendor-react-ece1c85f.js";import{l as T,ae as ue,O as pe,Q as Ce,W as U,B as F,Y as X,f as fe,V as Z,Z as he}from"./index-c62ac197.js";import{u as m,t as E,a as xe,c as I,b as be,r as ge,s as J}from"./index-49a94e54.js";import"./Alert-7dfbd254.js";import"./index-6b6d0f06.js";import{C as K}from"./index-c2088808.js";import{D as L}from"./Drawer-949c18c6.js";import"./FormContainer-91c2b0e4.js";import"./Switcher-c8648037.js";import"./index-36228db5.js";import"./Upload-fb34ce03.js";import{A as je,T as k}from"./actioncell-17e12e21.js";import{D as ve}from"./tableV2-4d1c9fd2.js";import{a as we,b as De}from"./AddAccount-a05910e8.js";import{C as Ne}from"./ConfirmDialog-3202eb3d.js";import{e as ye,a as Fe}from"./ContactService-92281a90.js";import{r as Se}from"./index-cebd880b.js";import{a as Ae}from"./DepartmentServices-3d56a9e7.js";import{u as Pe}from"./usePermission-d94b4984.js";import{C as Re}from"./ImportFile-3f60d715.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";import"./AccountServices-62599aae.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-25c4d4ed.js";import"./FileSaver.min-20f3f13a.js";import"./DensitySelector-a2c1c68f.js";import"./NoData-8c485a3a.js";import"./index-36ba4ea7.js";import"./StickyFooter-5b934274.js";import"./index.esm-70ab539c.js";import"./Check-71f21a49.js";import"./createSvgIcon-c5fc0d04.js";import"./DoubleSidedImage-ae98733b.js";import"./index-e4c6057f.js";import"./validationPatterns-77446c46.js";import"./CourseService-f0dc3bf1.js";import"./ApiService-2b99757f.js";import"./papaparse.min-f30b4da6.js";import"./vendor-excel-ee8fc4e5.js";const Le=o=>{const d=T(),C=m(c=>c.ContactsData.data.deleteConfirmation),f=m(c=>c.ContactsData.data.selectedRowData);m(c=>c.ContactsData.data.tableData);const n=()=>{d(E(!1))},g=async()=>{d(E(!1)),await ye(f.id)&&(o!=null&&o.fetchData&&(ue("apiCache-contactsData"),o.fetchData()),pe.push(e.jsx(Ce,{title:"Deleted",type:"success",duration:2500,children:"Contact Successfully Deleted"}),{placement:"top-center"}))};return e.jsx(Ne,{isOpen:C,type:"danger",title:"Delete Contact",confirmButtonColor:"red-600",onClose:n,onRequestClose:n,onCancel:n,onConfirm:g,children:e.jsx("p",{children:"Are you sure you want to delete this Contact? This action cannot be undone."})})},Ie=({onSaveClick:o,onCancel:d,onClearFilers:C})=>e.jsxs("div",{className:"text-right w-full",children:[e.jsx(F,{size:"sm",className:"mr-2",onClick:C,children:"Clear All"}),e.jsx(F,{size:"sm",className:"mr-2",onClick:d,children:"Cancel"}),e.jsx(F,{size:"sm",variant:"solid",onClick:o,children:"Query"})]}),Oe=o=>{i.useRef(null);const d=T(),[C,f]=i.useState(!1),n=m(a=>a.ContactsData.data.filterData),[g,c]=i.useState(n==null?void 0:n.account),[j,v]=i.useState(n==null?void 0:n.position),[S,A]=i.useState([]),w=()=>{f(!1),o.onClose()},O=i.useCallback(async()=>{var a,u;try{const l=await Ae();if(l!=null&&l.data){let x=(u=(a=l==null?void 0:l.data)==null?void 0:a.$values)==null?void 0:u.map(p=>({value:p.id,label:p.positionName}));A(x)}}catch(l){A([]),console.error("Failed to opportunity logs:",l)}},[]);i.useEffect(()=>{P(),O()},[]);const P=()=>{const a=xe({});d(a)},h=m(a=>{var l,x,p;return(p=(x=(l=a==null?void 0:a.ContactsData)==null?void 0:l.data)==null?void 0:x.accountList)==null?void 0:p.map(R=>({value:R.id,label:R.accountName}))}),D=()=>{d(I({account:"",position:""})),c(""),v("")},N=()=>{o.onClose(),f(!1),d(I({account:g,position:j}))};return i.useEffect(()=>{o.isOpen&&f(!0)},[o.isOpen]),i.useEffect(()=>{var a,u;((a=n==null?void 0:n.account)==null?void 0:a.value)===""&&c(""),((u=n==null?void 0:n.position)==null?void 0:u.value)===""&&v("")},[n]),e.jsx(e.Fragment,{children:e.jsxs(L,{title:"Advanced Filter Selection Page",isOpen:C,portalClassName:"w30",footer:e.jsx(Ie,{onCancel:w,onSaveClick:N,onClearFilers:D}),onClose:w,onRequestClose:w,children:[e.jsxs("div",{className:"mb-5",children:[e.jsx("div",{className:"lg:flex md:flex-none sm:flex-none mb-4",children:e.jsx("h5",{children:"Account"})}),e.jsx(U,{size:"sm",className:"mb-4 rounded-xl",placeholder:"Please Select",isMulti:!1,value:g,onChange:a=>c(a),options:h,isClearable:!0})]}),e.jsxs("div",{className:"mb-5",children:[e.jsx("div",{className:"lg:flex md:flex-none sm:flex-none mb-4",children:e.jsx("h5",{children:"Position"})}),e.jsx(U,{size:"sm",className:"mb-4 rounded-xl",placeholder:"Please Select",isMulti:!1,value:j,onChange:a=>v(a),options:S,isClearable:!0})]})]})})};X("ContactsData",ge);X("AccountsData",Se);const St=({accountId:o=null,accountName:d=""})=>{var B,W,H,_;const[C,f]=i.useState([]),[n,g]=i.useState(!1);i.useState(!1);const[c,j]=i.useState(!1),[v,S]=i.useState(!1),[A,w]=i.useState(),[O,P]=i.useState(!1),h=Pe("Contacts"),[D,N]=i.useState({drawerType:""}),a={edit:h.isEdit,delete:h.isDelete,view:h.isView},u=()=>{P(!0)},l=()=>{P(!1)},x=()=>{j(!0)},p=()=>{j(!1)},R=i.useRef(null),ee=de(),b=T(),s=m(t=>t.ContactsData.data.filterData),M=m(t=>t.ContactsData.data.loading),te=m(t=>t.ContactsData.data.contactList),{textTheme:ae}=fe(),{pageIndex:z,pageSize:q,sort:V,query:se,total:ke}=m(t=>t.ContactsData.data.tableData);i.useEffect(()=>{y()},[z,q,V,n,s]);const y=()=>{var r,G;const t=be({pageIndex:z,pageSize:q,sort:V,query:se,...((r=s==null?void 0:s.account)==null?void 0:r.value)&&!o&&{accountId:s.account.value},...((G=s==null?void 0:s.position)==null?void 0:G.value)&&!o&&{position:s.position.value},...o&&{accountId:o}});b(t)};i.useCallback(()=>{R.current.instance().clearFilter()},[]);const oe=t=>{ee("/app/crm/contact-details/"+t.id)},[ie,ne]=i.useState({pageSize:"",pageIndex:""}),le=(t,r)=>{r===k.view&&oe(t),r===k.edit&&(w(t.id),b(J(t)),S(!0)),r===k.delete&&(b(E(!0)),b(J(t)))},Y=()=>{S(!1)},$=t=>{t==="accountId"&&b(I({...s,account:""})),t==="Position"&&b(I({...s,position:""}))},ce=[...a!=null&&a.edit||a!=null&&a.delete?[{dataField:"Action",caption:"Action",width:"130",cellRender:t=>e.jsx("div",{id:"mAction","data-cname":"Action",children:e.jsx(je,{row:t==null?void 0:t.data,actions:a,buttonClick:le})})}]:[],{dataField:"contactName",caption:"Name",width:"230",cellRender:t=>{var r;return e.jsx("div",{"data-cname":"Name",children:e.jsx(me,{to:`/app/crm/contact-details/${(r=t==null?void 0:t.data)==null?void 0:r.id}`,className:`${ae} ml-2 rtl:mr-2`,children:t.value})})}},{dataField:"email",caption:"Email",width:"230"},{dataField:"contactPosistion",caption:"Position",width:"230"},{dataField:"department",caption:"Department",width:"230"},{dataField:"contactNumber",caption:"Phone",width:"230"},{dataField:"contactStatus",caption:"Status",width:"230"},{dataField:"createdDate",caption:"Created On",width:"230",dataType:"date",format:"dd-MM-yyyy",cellRender:t=>{const r=he(t.value).format("MM/DD/YYYY");return e.jsx("div",{"data-cname":"Created On",children:r})}}];return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:o?"topbar py-4 pt-0 border-gray-200 border-b dark:bg-[#292f3c] dark:text-white":"topbar py-4 px-6 border-gray-200 border-b",children:e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Contacts"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 w-full",children:[h.isEdit&&e.jsx(F,{block:!0,variant:"solid",size:"sm",icon:e.jsx(Z,{}),onClick:()=>x(),children:"Add Contact"}),h.isEdit&&e.jsx(F,{block:!0,variant:"solid",size:"sm",icon:e.jsx(Z,{}),onClick:()=>N(t=>({...t,drawerType:"import"})),children:"Import Contacts"})]}),e.jsx(L,{title:"Add Contact",isOpen:c,onClose:p,portalClassName:"w30 prevent-overflow",children:e.jsx(we,{footerWidth:"w30",accountId:o,accountName:d,fetchData:y,onDrawerClose:p})}),e.jsx(L,{title:"Edit Contact",isOpen:v,onClose:Y,portalClassName:"w30 prevent-overflow",children:e.jsx(De,{footerWidth:"w30",id:A,fetchData:y,onDrawerClose:Y})})]})]})}),e.jsxs(Q,{className:o?"h-full bg-transparent borderless my-6":"m-6 h-full p-4 bg-transparent borderless",bodyClass:"h-full",children:[M&&e.jsx(re,{sx:{backgroundColor:"rgba(0, 0, 0, 0.1)","& .MuiLinearProgress-bar":{backgroundColor:"var(--custom-600)"}}}),e.jsxs(Q,{className:"borderless",children:[!o&&e.jsxs("div",{className:"text-right mb-3 ",children:[((B=s==null?void 0:s.account)==null?void 0:B.value)&&e.jsx(K,{title:"Account",value:(W=s==null?void 0:s.account)==null?void 0:W.label,tagId:"accountId",onRemovefilter:$}),((H=s==null?void 0:s.position)==null?void 0:H.value)&&e.jsx(K,{title:"Position",value:(_=s==null?void 0:s.position)==null?void 0:_.label,tagId:"Position",onRemovefilter:$})]}),e.jsx(ve,{columns:ce,tableName:"contact-table",data:te||[],height:o?"calc(100vh - 460px)":"calc(100vh - 290px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:C,setSelectedRowId:f,setFilterValues:()=>{},filterValues:[],identity:"Lead-Listing",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"Lead-Listing-table",handleSearch:()=>{},isColumnResizing:!0,pager:ie,setPager:ne,openFilter:u,isPaginationReq:!0,isFilterReq:!0,isSelectionReq:!1,isLoading:M})]})]}),e.jsx(Le,{fetchData:y}),e.jsx(Oe,{isOpen:O,onClose:l}),e.jsx(L,{title:"Import Contacts",portalClassName:"w30 prevent-overflow",isOpen:(D==null?void 0:D.drawerType)==="import",closable:!0,onClose:()=>N(t=>({...t,drawerType:""})),children:e.jsx(Re,{requiredHeaders:["firstName","lastName","email"],allowedHeaders:["firstName","lastName","email","contactNumber","position","accountId","notes","department","preferredContactTime"],apiUrl:Fe,importType:"Contacts",templateFile:"/data/Contacts_Import_template.csv",fetchData:()=>y(),onDiscard:()=>N(t=>({...t,drawerType:""}))})})]})};export{St as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor-mui-69397583.js";import{A as E}from"./AdaptableCard-df7695d6.js";import{r as m,f as Q}from"./vendor-react-ece1c85f.js";import{a as V,b as Y,u as x,t as M,c as G,g as J,r as K,s as W}from"./index-785ad361.js";import{I as h,S as w,B as N,O as S,Q as A,l as P,Y as X,ab as D,f as ee,V as te}from"./index-c62ac197.js";import{A as se,T as b}from"./actioncell-17e12e21.js";import{D as ne}from"./tableV2-4d1c9fd2.js";import"./Alert-7dfbd254.js";import"./index-6b6d0f06.js";import"./index-c2088808.js";import{D as I}from"./Drawer-949c18c6.js";import{a as g,F as ie}from"./FormContainer-91c2b0e4.js";import"./Switcher-c8648037.js";import"./index-36228db5.js";import"./Upload-fb34ce03.js";import{S as oe}from"./StickyFooter-5b934274.js";import{d as y,c as re,a as k,F as le,b as ae}from"./index.esm-70ab539c.js";import{a as ce}from"./index-e4c6057f.js";import{C as de}from"./ConfirmDialog-3202eb3d.js";import{u as pe}from"./usePermission-d94b4984.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";import"./FileSaver.min-20f3f13a.js";import"./DensitySelector-a2c1c68f.js";import"./NoData-8c485a3a.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-25c4d4ed.js";const me=({touched:s,errors:i,values:a,setFieldValue:p})=>{const c=m.useRef(null);return m.useEffect(()=>{const o=()=>{if(!c.current)return;const r=new window.google.maps.places.Autocomplete(c.current,{types:["address"],componentRestrictions:{country:"us"}});r.addListener("place_changed",()=>{var u;const n=r.getPlace();let d={};(u=n.address_components)==null||u.forEach(l=>{l.types.includes("locality")&&(d.city=l.long_name),l.types.includes("administrative_area_level_1")&&(d.state=l.short_name),l.types.includes("postal_code")&&(d.zip=l.long_name)}),p("address",n.name||""),p("city",d.city||""),p("state",d.state||""),p("zip",d.zip||"")})};if(window.google&&window.google.maps)o();else{const r=setInterval(()=>{window.google&&window.google.maps&&(o(),clearInterval(r))},500);return()=>clearInterval(r)}},[]),e.jsxs(E,{className:"mb-4",children:[e.jsx(g,{label:"Entity Name",asterisk:!0,invalid:i.name&&s.name,errorMessage:i.name,children:e.jsx(y,{name:"name",component:h,placeholder:"Enter entity name"})}),e.jsx(g,{label:"Address",asterisk:!0,invalid:i.address&&s.address,errorMessage:i.address,children:e.jsx(y,{name:"address",children:({field:o})=>e.jsx(h,{...o,ref:c,placeholder:"Search address"})})}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[e.jsx(g,{label:"City",invalid:i.city&&s.city,errorMessage:i.city,children:e.jsx(y,{name:"city",component:h,placeholder:"City"})}),e.jsx(g,{label:"State",invalid:i.state&&s.state,errorMessage:i.state,children:e.jsx(y,{name:"state",component:h,placeholder:"State"})}),e.jsx(g,{label:"Zip",invalid:i.zip&&s.zip,errorMessage:i.zip,children:e.jsx(y,{name:"zip",component:h,placeholder:"Zip"})})]}),e.jsx("div",{className:"mt-6",children:e.jsx(y,{name:"trainingPortal",children:({field:o,value:r})=>e.jsx(w,{...o,onChange:n=>p("trainingPortal",n),checked:a==null?void 0:a.trainingPortal,children:"Training Portal"})})}),e.jsx("div",{className:"mt-6",children:e.jsx(y,{name:"electionMobileApp",children:({field:o,value:r})=>e.jsx(w,{...o,onChange:n=>p("electionMobileApp",n),checked:a==null?void 0:a.electionMobileApp,children:"Election Mobile App Management"})})})]})},ue=re().shape({name:k().required("name is required"),address:k().required("Address is required")}),L=m.forwardRef(({initialData:s,onFormSubmit:i,onDiscard:a},p)=>e.jsx(le,{innerRef:p,initialValues:{name:(s==null?void 0:s.name)??"",address:(s==null?void 0:s.address)??"",city:(s==null?void 0:s.city)??"",state:(s==null?void 0:s.state)??"",zip:(s==null?void 0:s.zip)??"",trainingPortal:(s==null?void 0:s.trainingPortal)??!1,electionMobileApp:(s==null?void 0:s.electionMobileApp)??!1},validationSchema:ue,onSubmit:(c,{setSubmitting:o})=>{i(c,o)},children:({touched:c,errors:o,isSubmitting:r,setFieldValue:n,values:d})=>e.jsx(ae,{children:e.jsxs(ie,{children:[e.jsx(me,{touched:c,errors:o,values:d,setFieldValue:n}),e.jsx(oe,{className:"px-8 flex items-center justify-between py-4",stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(N,{size:"sm",type:"button",onClick:()=>a==null?void 0:a(),children:"Discard"}),e.jsx(N,{size:"sm",variant:"solid",loading:r,icon:e.jsx(ce,{}),type:"submit",children:"Save Entity"})]})})]})})}));L.displayName="CountyForm";const z=({onDrawerClose:s,course:i,refetch:a})=>{const p=async n=>{let d={title:n==null?void 0:n.name,address:n==null?void 0:n.address,city:(n==null?void 0:n.city)??"",state:(n==null?void 0:n.state)??"",zip:(n==null?void 0:n.zip)??"",trainingPortal:n==null?void 0:n.trainingPortal,electionMobileAppManagement:n==null?void 0:n.electionMobileApp};return i!=null&&i.id?await V(i.id,d):await Y(d)},c=()=>{a()},o=async(n,d)=>{d(!0),p(n).then(u=>{u.success&&(s(),c(),S.push(e.jsx(A,{title:"Success",type:"success",duration:2500,children:i?"Entity updated successfully":"Entity created successfully"}),{placement:"top-center"}))}).catch(u=>{var C;console.error("course - error",u),c();const l=(C=u.response)==null?void 0:C.data;d(!1),S.push(e.jsx(A,{title:"Error",type:"danger",duration:2500,children:(l==null?void 0:l.message)||"Failed to save course"}),{placement:"top-center"})})},r=()=>{s()};return e.jsx(L,{type:i?"edit":"new",initialData:i,onFormSubmit:o,onDiscard:r})},fe=({fetchData:s})=>{const i=P(),a=x(r=>r.CountyData.data.deleteConfirmation),p=x(r=>r.CountyData.data.selectedRowData),c=()=>{i(M(!1))},o=async()=>{i(M(!1)),await G(p.id)&&(s(),S.push(e.jsx(A,{title:"Deleted",type:"success",duration:2500,children:"Entity Successfully Deleted"}),{placement:"top-center"}))};return e.jsx(de,{isOpen:a,type:"danger",title:"Delete Entity",confirmButtonColor:"red-600",onClose:c,onRequestClose:c,onCancel:c,onConfirm:o,children:e.jsx("p",{children:"Are you sure you want to delete this Entity? This action cannot be undone."})})};X("CountyData",K);const Ge=()=>{const[s,i]=m.useState([]);m.useState(!1),m.useState(!1);const[a,p]=m.useState(!1),[c,o]=m.useState(!1),[r,n]=m.useState(),[d,u]=m.useState(null),l=pe("Entities"),[C,ye]=m.useState({name:"",company:"",status:"",registrationDate:null}),[he,O]=m.useState(!1),q=()=>O(!0),_=()=>{p(!0)},v=()=>{p(!1),u(null)},T=Q(),F=P();x(t=>t.CountyData.data.filterData),x(t=>t.CountyData.data.loading);const B=x(t=>{var f,R;return(R=(f=t==null?void 0:t.CountyData)==null?void 0:f.data)==null?void 0:R.CountyList});m.useState(!1),D.getState(),ee(),m.useEffect(()=>{j()},[C]);const j=()=>{const t=J();F(t)},U=t=>{T("/app/entity/"+t.id)},Z=t=>{navigator.clipboard.writeText(t),S.push(e.jsx(A,{title:"Copied!",type:"success",duration:1500,children:"copied to clipboard"}),{placement:"top-center"})},$=(t,f)=>{f===b.view&&U(t),f===b.edit&&(n(t.id),u({...t,name:t==null?void 0:t.title,electionMobileApp:t==null?void 0:t.electionMobileAppManagement}),o(!0)),f===b.delete&&(F(M(!0)),F(W(t))),f===b.affiliate&&Z(t==null?void 0:t.affiliateLink)},H=[{dataField:"Action",caption:"Action",width:"130",cellRender:t=>e.jsx("div",{"data-cname":"Action",className:"flex justify-start items-center",children:e.jsx(se,{row:t==null?void 0:t.data,actions:{view:!0,edit:l==null?void 0:l.isEdit,delete:l==null?void 0:l.isDelete},buttonClick:$})})},{dataField:"title",caption:"Name"},{dataField:"address",caption:"Address"},{dataField:"city",caption:"City"},{dataField:"state",caption:"State"},{dataField:"zip",caption:"ZIP"},{dataField:"createdByUserName",caption:"Created By"},{dataField:"createdDate",caption:"Created On",dataType:"date",format:"MM/dd/yyyy"},{dataField:"isActive",caption:"Status",cellRender:t=>t!=null&&t.value?e.jsx("div",{"data-cname":"Status",children:" Active "}):e.jsx("div",{"data-cname":"Status",children:" Inactive"})}];return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Entities"}),e.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center",children:e.jsx(N,{onClick:()=>_(),block:!0,variant:"solid",size:"sm",icon:e.jsx(te,{}),children:"Add Entity"})})]})}),e.jsx(E,{className:"m-6 h-full bg-transparent",bodyClass:"h-full",children:e.jsx(E,{className:"p-4 borderless",children:e.jsx(ne,{columns:H,tableName:"County-table",data:B||[],height:"calc(100vh - 270px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:s,setSelectedRowId:i,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:q})})}),e.jsx(I,{title:"Add Entity",isOpen:a,onClose:v,onRequestClose:v,portalClassName:"w30",children:e.jsx(z,{onDrawerClose:v,refetch:j})}),e.jsx(I,{title:"Edit Entity",isOpen:c,onClose:()=>o(!1),onRequestClose:()=>o(!1),portalClassName:"w30",children:e.jsx(z,{onDrawerClose:()=>o(!1),course:d,refetch:j})}),e.jsx(fe,{fetchData:j})]})};export{Ge as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor-mui-69397583.js";import{Y as F,l as R,B as z,V as W,Z as E,O as q,Q as K,n as g,ah as Q,ef as Z}from"./index-c62ac197.js";import{A as o}from"./AdaptableCard-df7695d6.js";import{j as H,f as J,r as t}from"./vendor-react-ece1c85f.js";import{r as k,u as M,d as X,e as I}from"./index-785ad361.js";import"./Alert-7dfbd254.js";import"./index-6b6d0f06.js";import"./index-c2088808.js";import{D as S}from"./Drawer-949c18c6.js";import"./FormContainer-91c2b0e4.js";import"./Switcher-c8648037.js";import{T as ee,a as se,b as T,c as ae}from"./index-36228db5.js";import"./Upload-fb34ce03.js";import{C as te}from"./ConfirmDialog-3202eb3d.js";import{C as le}from"./tableV3-3d2f4952.js";import{A as re,T as b}from"./actioncell-17e12e21.js";import{U as ie}from"./UserNew-b36c342c.js";import{U as ne}from"./UserEdit-87262ea5.js";import{b as de}from"./UserService-047aef51.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";import"./useControllableState-d0909575.js";import"./useDidUpdate-25c4d4ed.js";import"./FileSaver.min-20f3f13a.js";import"./mapView-ab35acaa.js";import"./esm-f306d015.js";import"./lodash-306e3f66.js";import"./DensitySelector-a2c1c68f.js";import"./NoData-8c485a3a.js";import"./UserForm-31fdd3b3.js";import"./index-36ba4ea7.js";import"./StickyFooter-5b934274.js";import"./index.esm-70ab539c.js";import"./index-77e820d0.js";import"./RoleService-7008da2c.js";import"./PasswordInput-8619a9df.js";import"./index-42e65911.js";import"./index-cebd880b.js";import"./AccountServices-62599aae.js";import"./ContactService-92281a90.js";import"./index-e4c6057f.js";import"./strongPassword-bbec776a.js";import"./validationPatterns-77446c46.js";import"./DoubleSidedImage-ae98733b.js";F("CountyData",k);const ce=m=>{var w;let{id:a}=H();J(),R();const[p,d]=t.useState(!1),[c,r]=t.useState([]),[u,i]=t.useState(!1),[n,f]=t.useState("Add"),[j,y]=t.useState(null),[O,C]=t.useState(!1),[P,v]=t.useState(""),[D,B]=t.useState(""),Y="Users",N=M(s=>{var l;return((l=s.auth.session)==null?void 0:l.permission)||[]});let U=((w=N==null?void 0:N.filter(s=>(s==null?void 0:s.defaultMenuName)===Y))==null?void 0:w[0])||{isDelete:!1,isEdit:!1,isManage:!1,isView:!1};const L={edit:U.isEdit,archive:U.isDelete,loginAsUser:!1},h=async()=>{var s;try{let l=await X(a);r((s=l==null?void 0:l.data)==null?void 0:s.$values)}catch{r([])}};t.useEffect(()=>{a&&h()},[a]);const A=s=>{d(!1)},V=s=>{window.open({}.VITE_CUSTOMER_PORTAL_URL+"/loginAsUser/"+s,"_blank","noreferrer")},_=(s,l)=>{l===b.edit&&(d(!0),B(s.id)),l===b.loginAsUser&&V(s.id),l===b.delete&&(v(s==null?void 0:s.id),y(s),C(!0))},G=[{dataField:"Action",caption:"Action",allowSorting:!1,allowFiltering:!1,allowSearch:!1,cellRender:s=>e.jsx("div",{id:"mAction","data-cname":"Action",children:e.jsx(re,{row:s==null?void 0:s.data,actions:L,buttonClick:_})})},{dataField:"firstName",caption:"First Name",cellRender:s=>e.jsx("div",{"data-cname":"First Name",children:s.data.firstName})},{dataField:"lastName",caption:"Last Name",cellRender:s=>e.jsx("div",{"data-cname":"Last Name",children:s.data.lastName})},{dataField:"email",caption:"Email",cellRender:s=>e.jsx("div",{"data-cname":"Email",children:s.data.email})},{dataField:"phoneNumber",caption:"Phone No",cellRender:s=>e.jsx("div",{"data-cname":"Phone No",children:s.data.phoneNumber})},{dataField:"role",caption:"Role",cellRender:s=>e.jsx("div",{"data-cname":"Role",children:s.data.role})},{dataField:"createdByName",caption:"Created By",cellRender:s=>e.jsx("div",{"data-cname":"Created By",children:s.data.createdByName})},{dataField:"createdDate",caption:"Created On",width:"230",dataType:"date",format:"dd-MM-yyyy",cellRender:s=>{const l=E(s.value).format("MM/DD/YYYY");return e.jsx("div",{"data-cname":"Created On",children:l})}}],x=()=>{v(null),C(!1),y(null)},$=async()=>{const s=await de(P);x(),s&&q.push(e.jsx(K,{title:"Archived",type:"success",duration:2500,children:"User Successfully Archived"}),{placement:"top-center"}),h()};return e.jsxs(e.Fragment,{children:[e.jsx(o,{className:"h-full pt-0 bg-transparent",bodyClass:"h-full",children:e.jsxs(o,{className:"h-full bg-transparent",children:[e.jsx("div",{className:"topbar border-gray-200 border-b dark:bg-[#292f3c] dark:text-white mb-2",children:e.jsxs("div",{className:"lg:flex pb-2 items-center justify-between",children:[e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Users"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx(z,{block:!0,variant:"solid",size:"sm",icon:e.jsx(W,{}),onClick:()=>i(!0),children:"Add User "}),e.jsx(S,{title:`${n} User`,isOpen:u,onClose:()=>i(!1),portalClassName:"w30",children:e.jsx(ie,{accountId:a,footerWidth:"w30",onClose:()=>i(!1),onAddNew:()=>{h(),i(!1)}})})]})]})}),e.jsx(le,{tableName:"County-Users",dataSource:c,height:"calc(100vh - 400px)",columns:G,keyExpr:"$id",stateStorageKey:"documents"})]})}),e.jsx(te,{isOpen:O,type:"danger",title:"Archive User",confirmButtonColor:"red-600",onClose:x,onRequestClose:x,onCancel:x,onConfirm:$,children:e.jsx("p",{children:"Are you sure you want to archive this Users?"})}),D&&e.jsx(S,{title:"Edit User",isOpen:p,onClose:A,portalClassName:"w30",children:e.jsx(ne,{footerWidth:"w30",userId:D,isAccountList:!0,onDrawerClose:A,fetchData:h})})]})};F("CountyData",k);const rs=()=>{const[m,a]=t.useState(""),p=R(),[d,c]=t.useState("Users"),r=location.pathname.substring(location.pathname.lastIndexOf("/")+1),u=M(n=>{var f,j;return((j=(f=n==null?void 0:n.CountyData)==null?void 0:f.data)==null?void 0:j.CountyDetails)||{}}),i=t.useCallback(()=>{if(r){const n=I({id:r});p(n),a(r)}},[]);return t.useEffect(()=>{i()},[r]),t.useState("Vertical View"),t.useState(!0),e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:e.jsx("div",{className:"lg:flex items-center justify-between",children:e.jsx("h3",{className:"mb-4 lg:mb-0 text-white",children:"Entity Details"})})}),e.jsx(o,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:e.jsx(oe,{programId:m,customerInformation:u,fetchData:i,currentTab:d,setCurrentTab:c})})]})},oe=m=>{const{customerInformation:a,fetchData:p,programId:d,currentTab:c,setCurrentTab:r}=m;return e.jsxs(e.Fragment,{children:[e.jsx(g,{id:"hs_view",className:"mb-4",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-12 gap-4",children:[e.jsxs("div",{className:"md:col-span-6 col-span-1",children:[e.jsx("h3",{className:"text-lg font-semibold",children:"Entity Details"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-12 gap-4 pt-4",children:[e.jsx("div",{className:"md:col-span-4 col-span-1",children:e.jsxs("p",{className:"text-gray-700 dark:text-gray-200 text-sm space-y-1",children:[e.jsx("div",{className:"font-bold",children:a==null?void 0:a.title}),e.jsxs("div",{children:["Created Date –"," ",E(a==null?void 0:a.createdDate).format("MM-DD-YYYY")]})]})}),e.jsx("div",{className:"hidden md:block md:col-span-2"}),e.jsxs("div",{className:"md:col-span-6 col-span-1",children:[e.jsx("span",{className:"font-bold",children:"Address"}),e.jsxs("p",{className:"text-gray-700 dark:text-gray-200 text-sm",children:[(a==null?void 0:a.address)??"--",", ",a==null?void 0:a.city,", ",a==null?void 0:a.state,", ",a==null?void 0:a.zip]})]})]})]}),e.jsx("div",{className:"md:col-span-6 col-span-1",children:e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs(g,{className:"p-4 bg-gray-100",children:[e.jsx("h4",{className:"font-semibold mb-1",children:"Access"}),e.jsx("p",{className:"text-sm",children:a!=null&&a.trainingPortal?"Training Portal":""}),e.jsx("p",{className:"text-sm",children:a!=null&&a.electionMobileAppManagement?"Election Mobile App":""})]}),e.jsxs(g,{className:"p-4 bg-gray-100",children:[e.jsx("h4",{className:"font-semibold mb-1",children:"Created By"}),e.jsx("p",{className:"text-sm",children:(a==null?void 0:a.createdByUser)??"--"})]})]})})]})}),e.jsx(ee,{className:"opportunity-tabs",variant:"pill",value:c,onChange:r,children:e.jsxs(o,{className:"p-2 my-2",children:[e.jsxs(se,{className:"flex flex-col sm:flex-row flex-wrap gap-2",children:[e.jsx(T,{icon:e.jsx(Q,{}),className:"w-full sm:w-auto text-center",value:"Users",children:"Users"}),e.jsx(T,{icon:e.jsx(Z,{}),className:"w-full sm:w-auto text-center",value:"Tab 2",children:"Tab 2"})]}),e.jsx(o,{className:"p-4",children:e.jsx("div",{className:"grid grid-cols-12 gap-1 pt-2",children:e.jsx("div",{className:"col-span-12",children:e.jsxs(ae,{value:"Users",children:[" ",e.jsx(ce,{})]})})})})]})})]})};export{oe as CustomerSingleView,rs as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor-mui-69397583.js";import{bd as Je,k as Ke,cb as ce,al as le,B as U,cT as Ve,I as R,W as es,O as f,Q as j,Y as Pe,l as Fe,V as ss,n as se,aG as ts,cU as rs,Z as is}from"./index-c62ac197.js";import{A as de}from"./AdaptableCard-df7695d6.js";import{r as y}from"./vendor-react-ece1c85f.js";import{r as Oe,u as oe,a as ns,b as os}from"./index-d17da176.js";import"./Alert-7dfbd254.js";import"./index-6b6d0f06.js";import"./index-c2088808.js";import{D as ae}from"./Drawer-949c18c6.js";import{F as Ae,a as $}from"./FormContainer-91c2b0e4.js";import"./Switcher-c8648037.js";import{T as cs,a as ls,b as Ne,c as Ie}from"./index-36228db5.js";import{U as ds}from"./Upload-fb34ce03.js";import{C as De}from"./ConfirmDialog-3202eb3d.js";import{u as Ue,S as qe,v as Re,a as Me}from"./sortable.esm-0625cd17.js";import{C as $e,u as as,a as ps,P as us,D as xs,c as hs}from"./core.esm-4386752a.js";import{c as te,a as T,F as pe,b as ue,d as D,h as ke,i as ms}from"./index.esm-70ab539c.js";import{S as xe}from"./StickyFooter-5b934274.js";import{s as fs}from"./index-47dcc43a.js";import{g as js,h as ys,i as gs,j as vs,k as bs,l as ws,m as Ss,n as Cs,o as Ee,p as Ns,q as Is,r as Ms}from"./CourseService-f0dc3bf1.js";import{u as ks}from"./usePermission-d94b4984.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";import"./useControllableState-d0909575.js";import"./useDidUpdate-25c4d4ed.js";import"./ApiService-2b99757f.js";const Es=({m:t,section:i,onEditMaterial:n,onDeleteMaterial:g})=>{const{attributes:o,listeners:d,setNodeRef:a,transform:x,transition:C}=Ue({id:t.id,data:{type:"material",sectionId:i.id}}),v={transform:$e.Transform.toString(x),transition:C};return e.jsxs("div",{ref:a,style:v,...o,...d,className:"flex items-center pl-10 pr-6 py-3 mt-1 gap-4 bg-gray-50",children:[e.jsx(Ve,{size:22,className:"text-custom-500 shrink-0"}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("span",{className:"truncate text-[14px] leading-5 font-semibold",children:t.title})}),e.jsx("span",{className:"text-sm text-gray-600 shrink-0",children:t.duration}),e.jsx("div",{className:"w-8 h-8 flex items-center justify-center rounded-full bg-custom-600 hover:bg-custom-700 cursor-pointer",onPointerDown:b=>b.stopPropagation(),onClick:b=>{b.stopPropagation(),n(t,i.id)},children:e.jsx(ce,{className:"text-white",size:14})}),e.jsx("div",{className:"w-8 h-8 flex items-center justify-center rounded-full bg-red-700 hover:bg-custom-700 cursor-pointer",onPointerDown:b=>b.stopPropagation(),onClick:b=>{b.stopPropagation(),g(t.id,i.id)},children:e.jsx(le,{className:"text-white",size:14})})]})},Ps=({section:t,index:i,onAddMaterial:n,onEdit:g,onDelete:o,onEditMaterial:d,onDeleteMaterial:a,permissions:x,expanded:C,onToggleExpand:v})=>{var w;const{attributes:b,listeners:S,setNodeRef:z,transform:P,transition:u}=Ue({id:t.id,data:{type:"section"}}),N={transform:$e.Transform.toString(P),transition:u},M=((w=t.materials)==null?void 0:w.$values)||[];return e.jsxs("div",{ref:z,style:N,className:"mb-2 border border-gray-200 rounded-lg overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 bg-white hover:bg-gray-50",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{...b,...S,className:"cursor-move p-1 text-gray-400 hover:text-gray-600",children:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[e.jsx("circle",{cx:"3",cy:"3",r:"1"}),e.jsx("circle",{cx:"3",cy:"8",r:"1"}),e.jsx("circle",{cx:"3",cy:"13",r:"1"}),e.jsx("circle",{cx:"8",cy:"3",r:"1"}),e.jsx("circle",{cx:"8",cy:"8",r:"1"}),e.jsx("circle",{cx:"8",cy:"13",r:"1"}),e.jsx("circle",{cx:"13",cy:"3",r:"1"}),e.jsx("circle",{cx:"13",cy:"8",r:"1"}),e.jsx("circle",{cx:"13",cy:"13",r:"1"})]})}),e.jsx("h4",{className:"font-semibold text-gray-900 text-[16px] truncate cursor-pointer",onClick:l=>{l.stopPropagation(),v()},children:t.title})]}),e.jsxs("div",{className:"flex items-center gap-3 text-sm text-white-600",children:[e.jsx("span",{children:t==null?void 0:t.calculatedDuration}),e.jsx("div",{className:"cursor-pointer p-1",onClick:l=>{l.stopPropagation(),v()},children:C?e.jsx(Je,{}):e.jsx(Ke,{})}),(x==null?void 0:x.isEdit)&&e.jsx("div",{className:"w-8 h-8 flex items-center justify-center rounded-full bg-custom-600 hover:bg-custom-700 cursor-pointer",onClick:l=>{l.stopPropagation(),g(t)},children:e.jsx(ce,{className:"text-white",size:16})}),(x==null?void 0:x.isDelete)&&e.jsx("div",{className:"w-8 h-8 flex items-center justify-center rounded-full bg-red-700 hover:bg-red-800 cursor-pointer",onClick:l=>{l.stopPropagation(),o(t.id)},children:e.jsx(le,{className:"text-white",size:16})}),(x==null?void 0:x.isEdit)&&e.jsx(U,{size:"sm",variant:"solid",onClick:l=>{l.stopPropagation(),n(t)},children:"+ Add Material"})]})]}),C&&e.jsx("div",{id:"subModule",className:"divide-y border-t border-gray-200",children:M.length?e.jsx(qe,{items:M.map(l=>l.id),strategy:Re,children:M.map(l=>e.jsx(Es,{m:l,section:t,onEditMaterial:d,onDeleteMaterial:a},l.id))}):e.jsx("p",{className:"px-10 py-3 text-sm text-gray-400",children:"No materials added yet."})})]})},Fs=te().shape({title:T().required("Title is required"),description:T().required("Description is required"),duration:T().required("Duration is required").matches(/^([0-1]?\d|2[0-3]):([0-5]\d):([0-5]\d)$/,"Duration must be in HH:MM:SS format")}),Os=({initialValues:t,onClose:i,onSubmit:n,open:g})=>e.jsx(ae,{title:t?"Edit Section":"Add Section",isOpen:g,onClose:i,onRequestClose:i,portalClassName:"w30",children:e.jsx(pe,{initialValues:t||{id:Date.now().toString(),title:"",description:"",duration:""},validationSchema:Fs,onSubmit:o=>n(o),enableReinitialize:!0,children:({errors:o,touched:d})=>e.jsx(ue,{children:e.jsxs(Ae,{children:[e.jsx($,{label:"Title",invalid:!!o.title&&!!d.title,errorMessage:o.title,children:e.jsx(D,{name:"title",component:R,placeholder:"Enter title"})}),e.jsx($,{label:"Description",invalid:!!o.description&&!!d.description,errorMessage:o.description,children:e.jsx(D,{name:"description",component:R,placeholder:"Enter description"})}),e.jsx($,{label:"Duration",invalid:!!o.duration&&!!d.duration,errorMessage:o.duration,children:e.jsx(D,{name:"duration",component:R,placeholder:"e.g. 01:30:00"})}),e.jsxs(xe,{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(U,{type:"button",onClick:i,children:"Cancel"}),e.jsx(U,{type:"submit",variant:"solid",children:t?"Update":"Save"})]})]})})})}),As=te().shape({sectionId:te().required("Section is required"),title:T().required("Title is required"),duration:T().required("Duration is required"),description:T(),video:ke().required("Video or Vimeo link is required").test("is-valid-video","Must be a valid Vimeo link or a video file",t=>t&&typeof t=="string"?/^(https?:\/\/)?(www\.)?(vimeo\.com\/(manage\/videos\/)?\d+|player\.vimeo\.com\/video\/\d+)(\?.*)?$/.test(t):!1),resources:ms().of(te().shape({title:T().when(["file","link"],{is:(t,i)=>!!t||!!i,then:t=>t.required("Title is required for this resource"),otherwise:t=>t.notRequired()}),link:T().nullable(),file:ke().nullable(),filePreview:T().nullable()}))});function Ds(t){const i=Math.floor(t/3600),n=Math.floor(t%3600/60),g=Math.floor(t%60);return[i.toString().padStart(2,"0"),n.toString().padStart(2,"0"),g.toString().padStart(2,"0")].join(":")}const Us=({sectionOptions:t,defaultSection:i,onClose:n,onSubmit:g,isOpen:o,loading:d,initialValues:a})=>{var S,z,P;const[x,C]=y.useState(null);async function v(u,N){const M=u.split("/").pop();try{const w=await js(M),l=w==null?void 0:w.data;if(l!=null&&l.embedUrl){if(C(l==null?void 0:l.embedUrl),l!=null&&l.duration){const p=Ds(l==null?void 0:l.durationInSeconds);N("duration",p)}}else console.log("No playable URL found. Check privacy settings.")}catch(w){console.error("Failed to fetch playback URL",w)}}const b=a?{id:a==null?void 0:a.id,sectionId:{value:a.sectionId,label:(S=t.find(u=>u.id===a.sectionId))==null?void 0:S.title},title:a.title||"",duration:a.duration||"",description:a.description||"",video:a.videoUrl||"",resources:((P=(z=a.resources)==null?void 0:z.$values)==null?void 0:P.map(u=>({title:u.title,link:u.resourceUrl,file:u.resourceFile,resourceId:u.resourceId,filePreview:u.resourceFile?`${u.resourceFile}`:""})))||[]}:{sectionId:i!=null&&i.id?{label:i==null?void 0:i.title,value:i==null?void 0:i.id}:"",title:"",duration:"",description:"",video:"",resources:[]};return e.jsx(ae,{title:a?"Edit Course Material":"Add Course Material",isOpen:o,onClose:n,onRequestClose:n,portalClassName:"w30",children:e.jsx(pe,{enableReinitialize:!0,initialValues:b,validationSchema:As,onSubmit:u=>{var N;return g((N=u==null?void 0:u.sectionId)==null?void 0:N.value,u)},children:({errors:u,touched:N,setFieldValue:M,values:w})=>e.jsx(ue,{children:e.jsxs(Ae,{className:"pb-32",children:[e.jsx($,{label:"Select Section",invalid:!!u.sectionId&&!!N.sectionId,errorMessage:u.sectionId,children:e.jsx(D,{name:"sectionId",children:({field:l,form:p})=>e.jsx(es,{field:l,form:p,isDisabled:!!(i!=null&&i.id),options:t.map(m=>({value:m.id,label:m.title})),name:"sectionId",onChange:m=>{p.setFieldValue(l.name,m)}})})}),e.jsx($,{label:"Title",invalid:!!u.title&&!!N.title,errorMessage:u.title,children:e.jsx(D,{name:"title",component:R,placeholder:"Enter title"})}),e.jsxs($,{label:"Vimeo Link",invalid:!!u.video&&!!N.video,errorMessage:u.video,children:[e.jsx("div",{className:"flex flex-col gap-2",children:e.jsx(D,{name:"video",component:R,placeholder:"Paste Vimeo link",onBlur:l=>v(l.target.value,M)})}),(x||w.video)&&e.jsx("div",{className:"mt-2 aspect-video",children:e.jsx(fs,{src:x||w.video,width:"100%",height:"300px",controls:!0})})]}),e.jsx($,{label:"Duration",invalid:!!u.duration&&!!N.duration,errorMessage:u.duration,children:e.jsx(D,{name:"duration",component:R,placeholder:"e.g. 01:30:00"})}),e.jsx($,{label:"Description",children:e.jsx(D,{name:"description",component:R,textArea:!0,placeholder:"Enter description"})}),e.jsxs($,{label:"Resources",children:[w.resources.map((l,p)=>e.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[e.jsx(D,{name:`resources[${p}].title`,component:R,placeholder:"Resource title*"}),e.jsx(D,{name:`resources[${p}].link`,component:R,placeholder:"Resource link"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ds,{accept:".pdf,.doc,.docx,.xls,.xlsx,.xlsm,.png,.ppt,.PPT,.pptx,.PPTX",cropNeeded:!1,onChange:m=>{if(m&&m[0]){const Q=m[0],W=URL.createObjectURL(Q);M(`resources[${p}].file`,Q),M(`resources[${p}].filePreview`,W)}}}),(l==null?void 0:l.filePreview)&&e.jsx("a",{href:l==null?void 0:l.filePreview,target:"_blank",rel:"noopener noreferrer",className:"text-custom-600 underline text-sm",children:"View"})]}),e.jsx(U,{type:"button",size:"sm",variant:"danger",onClick:()=>{const m=[...w.resources];m.splice(p,1),M("resources",m)},children:"Remove"})]},p)),e.jsx(U,{size:"sm",type:"button",className:"mt-2",onClick:()=>M("resources",[...w.resources,{title:"",link:"",file:null}]),children:"+ Add Resource"})]}),e.jsxs(xe,{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(U,{type:"button",onClick:n,children:"Cancel"}),e.jsx(U,{type:"submit",loading:d,variant:"solid",children:a?"Update":"Save"})]})]})})})})},qs=({courseId:t,fetchData:i,initialSection:n=[]})=>{const g=as(ps(us)),[o,d]=y.useState(n),[a,x]=y.useState(null),[C,v]=y.useState(!1),[b,S]=y.useState(!1),[z,P]=y.useState(!1),[u,N]=y.useState(!1),M=ks("Course"),[w,l]=y.useState(!1),[p,m]=y.useState(null),[Q,W]=y.useState(!1),[L,he]=y.useState(null),[me,fe]=y.useState({}),je=(r,s)=>{he({type:r,id:s}),W(!0)},Te=async()=>{var c,h;if(!L)return;const{type:r,id:s}=L;try{let k;r==="section"?k=await ys(s):k=await gs(s),k.success&&(i(),f.push(e.jsx(j,{title:"Success",type:"success",children:r==="section"?"Section deleted successfully":"Material deleted successfully"}),{placement:"top-center"}))}catch(k){f.push(e.jsx(j,{title:"Error",type:"danger",children:((h=(c=k==null?void 0:k.response)==null?void 0:c.data)==null?void 0:h.message)||`Failed to delete ${L.type}`}),{placement:"top-center"})}W(!1),he(null)},ze=async r=>{var s,c;try{(await vs(t,r)).success&&(v(!1),i(),f.push(e.jsx(j,{title:"Success",type:"success",duration:2500,children:"Course section created successfully"}),{placement:"top-center"}))}catch(h){f.push(e.jsx(j,{title:"Error",type:"danger",duration:2500,children:((c=(s=h==null?void 0:h.response)==null?void 0:s.data)==null?void 0:c.message)||"Failed to add Sections"}),{placement:"top-center"})}};y.useEffect(()=>{d(n)},[n]);const Le=async(r,s)=>{var c,h,k;P(!0);try{const F={title:s==null?void 0:s.title,duration:s==null?void 0:s.duration,videoUrl:s==null?void 0:s.video,description:s==null?void 0:s.description,resources:((c=s==null?void 0:s.resources)==null?void 0:c.map(O=>({title:O.title,resourceUrl:O.link,file:O.resourceFile,resourceFile:O.file})))||[]};(await bs(r,F)).success&&(S(!1),i(),f.push(e.jsx(j,{title:"Success",type:"success",duration:2500,children:"Course Material added successfully"}),{placement:"top-center"}))}catch(F){f.push(e.jsx(j,{title:"Error",type:"danger",duration:2500,children:((k=(h=F==null?void 0:F.response)==null?void 0:h.data)==null?void 0:k.message)||"Failed to add Material"}),{placement:"top-center"})}P(!1)},Be=async(r,s)=>{var c,h,k;P(!0);try{const F={title:s==null?void 0:s.title,duration:s==null?void 0:s.duration,videoUrl:s==null?void 0:s.video,description:s==null?void 0:s.description,resources:((c=s==null?void 0:s.resources)==null?void 0:c.map(O=>({title:O.title,resourceUrl:O.link,resourceFile:(O==null?void 0:O.file)||null,resourceId:O.resourceId})))||[]};(await ws(p==null?void 0:p.id,F)).success&&(S(!1),l(!1),m(null),i(),f.push(e.jsx(j,{title:"Success",type:"success",duration:2500,children:"Course Material updated successfully"}),{placement:"top-center"}))}catch(F){f.push(e.jsx(j,{title:"Error",type:"danger",duration:2500,children:((k=(h=F==null?void 0:F.response)==null?void 0:h.data)==null?void 0:k.message)||"Failed to update Material"}),{placement:"top-center"})}P(!1)},Ye=async r=>{var s,c;try{(await Ss(r.id,r)).success&&(v(!1),N(!1),i(),f.push(e.jsx(j,{title:"Success",type:"success",children:"Section updated successfully"}),{placement:"top-center"}))}catch(h){f.push(e.jsx(j,{title:"Error",type:"danger",children:((c=(s=h==null?void 0:h.response)==null?void 0:s.data)==null?void 0:c.message)||"Failed to update section"}),{placement:"top-center"})}},He=(r,s)=>{m({...r,sectionId:s}),l(!0),S(!0)},Ge=async r=>{var c;let s={courseId:r.courseId,items:(c=r==null?void 0:r.newOrder)==null?void 0:c.map(h=>({...h,displayOrder:h==null?void 0:h.order}))};return await Cs(s)},_e=async r=>{let s={sourceSectionId:r.sectionId,destinationSectionId:r.sectionId,newSourceOrder:r==null?void 0:r.newOrder.map(c=>({...c,displayOrder:c==null?void 0:c.order})),newDestOrder:r==null?void 0:r.newOrder.map(c=>({...c,displayOrder:c==null?void 0:c.order}))};return await Ee(s)},Qe=async r=>{let s={sourceSectionId:r.sourceSectionId,destinationSectionId:r==null?void 0:r.destinationSectionId,newSourceOrder:r==null?void 0:r.newSourceOrder.map(c=>({...c,displayOrder:c==null?void 0:c.order})),newDestOrder:r==null?void 0:r.newDestOrder.map(c=>({...c,displayOrder:c==null?void 0:c.order}))};return await Ee(s)},We=async r=>{var F,re,O,ye,ge,ve,be,we,Se,Ce;const{active:s,over:c}=r;if(!c||s.id===c.id)return;const h=(F=s.data.current)==null?void 0:F.type,k=(re=c.data.current)==null?void 0:re.type;if(h==="section"){const X=o.findIndex(E=>E.id===s.id),G=o.findIndex(E=>E.id===c.id);if(X===-1||G===-1)return;const B=o.map((E,I)=>({id:E.id,order:I})),Y=o,q=Me(o,X,G),Z=q.map((E,I)=>({id:E.id,order:I}));d(q);const _={courseId:t,movedSectionId:String(s.id),previousOrder:B,newOrder:Z,sourceIndex:X,destinationIndex:G};try{(await Ge(_)).success?(f.push(e.jsx(j,{title:"Success",type:"success",children:"Sections reordered successfully"}),{placement:"top-center"}),await i()):(d(Y),f.push(e.jsx(j,{title:"Error",type:"danger",children:"Failed to reorder sections"}),{placement:"top-center"}))}catch{d(Y),f.push(e.jsx(j,{title:"Error",type:"danger",children:"Failed to reorder sections"}),{placement:"top-center"})}return}if(h==="material"){const X=(O=s.data.current)==null?void 0:O.sectionId,G=o;let B,Y;if(k==="material"){B=(ye=c.data.current)==null?void 0:ye.sectionId;const I=o.findIndex(A=>A.id===B);Y=(((ve=(ge=o[I])==null?void 0:ge.materials)==null?void 0:ve.$values)||[]).findIndex(A=>A.id===c.id)}else if(k==="section"){B=String(c.id);const I=o.findIndex(A=>A.id===B);Y=(((we=(be=o[I])==null?void 0:be.materials)==null?void 0:we.$values)||[]).length}else return;const q=o.findIndex(I=>I.id===X),Z=o.findIndex(I=>I.id===B);if(q===-1||Z===-1)return;const _=[...((Se=o[q].materials)==null?void 0:Se.$values)||[]],E=_.findIndex(I=>I.id===s.id);if(E===-1)return;if(X===B){const I=_.map((J,ee)=>({id:J.id,order:ee})),A=Me(_,E,Y),ne=A.map((J,ee)=>({id:J.id,order:ee})),ie=[...o];ie[q]={...o[q],materials:{$values:A}},d(ie);const V={sectionId:o[q].id,movedMaterialId:String(s.id),previousOrder:I,newOrder:ne,sourceIndex:E,destinationIndex:Y};try{(await _e(V)).success?(f.push(e.jsx(j,{title:"Success",type:"success",children:"Materials reordered successfully"}),{placement:"top-center"}),await i()):(d(G),f.push(e.jsx(j,{title:"Error",type:"danger",children:"Failed to reorder materials"}),{placement:"top-center"}))}catch{d(G),f.push(e.jsx(j,{title:"Error",type:"danger",children:"Failed to reorder materials"}),{placement:"top-center"})}}else{const[I]=_.splice(E,1),A=[...((Ce=o[Z].materials)==null?void 0:Ce.$values)||[]],ne=o[q].materials.$values.map((H,K)=>({id:H.id,order:K})),ie=o[Z].materials.$values.map((H,K)=>({id:H.id,order:K}));A.splice(Y,0,I);const V=[...o];V[q]={...o[q],materials:{$values:_}},V[Z]={...o[Z],materials:{$values:A}};const J=_.map((H,K)=>({id:H.id,order:K})),ee=A.map((H,K)=>({id:H.id,order:K}));d(V);const Ze={movedMaterialId:String(s.id),sourceSectionId:X,destinationSectionId:B,sourceIndex:E,destinationIndex:Y,previousSourceOrder:ne,previousDestOrder:ie,newSourceOrder:J,newDestOrder:ee};try{(await Qe(Ze)).success?(f.push(e.jsx(j,{title:"Success",type:"success",children:"Material moved successfully"}),{placement:"top-center"}),await i()):(d(G),f.push(e.jsx(j,{title:"Error",type:"danger",children:"Failed to move material"}),{placement:"top-center"}))}catch{d(G),f.push(e.jsx(j,{title:"Error",type:"danger",children:"Failed to move material"}),{placement:"top-center"})}}}},Xe=()=>e.jsx(qe,{items:o.map(r=>r.id),strategy:Re,children:e.jsx("div",{children:o.map((r,s)=>e.jsx(Ps,{section:r,permissions:M,index:s,onAddMaterial:c=>{x(c),S(!0)},onEdit:()=>{x(r),N(!0),v(!0)},onEditMaterial:He,onDelete:()=>je("section",r.id),onDeleteMaterial:c=>je("material",c),expanded:me[r.id],onToggleExpand:()=>fe(c=>({...c,[r.id]:!c[r.id]}))},r.id))})});return y.useEffect(()=>(C||b?document.body.style.overflow="hidden":document.body.style.overflow="auto",()=>{document.body.style.overflow="auto"}),[C,b]),y.useEffect(()=>{const r={};o.forEach(s=>{r[s.id]=me[s.id]??!1}),fe(r)},[o]),e.jsxs(de,{className:"h-auto py-2 bg-transparent",children:[M.isEdit&&e.jsx("div",{className:"topbar py-2 border-gray-200 border-b",children:e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("div",{}),e.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center",children:[e.jsx(U,{variant:"solid",size:"sm",onClick:()=>v(!0),children:"+ Add Section"}),e.jsx(U,{variant:"solid",size:"sm",onClick:()=>{x(null),S(!0)},children:"+ Add Course Material"})]})]})}),e.jsx("div",{className:"pt-4",children:e.jsx(xs,{sensors:g,collisionDetection:hs,onDragEnd:We,children:e.jsx(Xe,{})})}),C&&e.jsx(Os,{open:C,onClose:()=>{v(!1),N(!1)},onSubmit:u?Ye:ze,initialValues:u?a:null}),b&&e.jsx(Us,{isOpen:b,sectionOptions:o,defaultSection:a,initialValues:w?p:null,onClose:()=>{S(!1),l(!1),m(null)},onSubmit:w?Be:Le,loading:z}),e.jsx(De,{isOpen:Q,type:"danger",title:(L==null?void 0:L.type)==="section"?"Delete Section":"Delete Material",confirmButtonColor:"red-600",onClose:()=>W(!1),onRequestClose:()=>W(!1),onCancel:()=>W(!1),onConfirm:Te,children:e.jsxs("p",{children:["Are you sure you want to delete this ",L==null?void 0:L.type,"? This action cannot be undone."]})})]})},Rs=te().shape({title:T().required("Title is required"),description:T().required("Description is required")}),$s=({type:t,initialData:i,onFormSubmit:n,onDiscard:g})=>{const o={title:(i==null?void 0:i.title)||"",description:(i==null?void 0:i.description)||""};return e.jsx(pe,{initialValues:o,validationSchema:Rs,onSubmit:(d,{setSubmitting:a})=>{n(d,a)},children:({errors:d,touched:a,isSubmitting:x})=>e.jsxs(ue,{children:[e.jsx($,{label:"Title",asterisk:!0,invalid:!!d.title&&!!a.title,errorMessage:d.title,children:e.jsx(D,{name:"title",placeholder:"Title",component:R,invalid:a.title&&d.title})}),e.jsx($,{label:"Description",asterisk:!0,invalid:!!d.description&&!!a.description,errorMessage:d.description,children:e.jsx(D,{name:"description",textArea:!0,placeholder:"Description",component:R})}),e.jsxs(xe,{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(U,{type:"button",size:"sm",onClick:g,children:"Cancel"}),e.jsx(U,{type:"submit",size:"sm",variant:"solid",loading:x,children:t==="edit"?"Update":"Save"})]})]})})},Ts=({pricingId:t,initialData:i,onDrawerClose:n,fetchData:g,courseId:o})=>{const d=async v=>await Ns(o,v),a=async v=>await Is(t,v),x=async(v,b)=>{b(!0);const S={title:v.title,description:v.description};(t?a:d)(S).then(P=>{P.success&&(f.push(e.jsxs(j,{title:"Success",type:"success",duration:2500,children:["Course option ",t?"updated":"added"," successfully"]}),{placement:"top-center"}),g(),n())}).catch(()=>{f.push(e.jsx(j,{title:"Error",type:"danger",duration:2500,children:"Something went wrong"}),{placement:"top-center"}),b(!1)})},C=()=>{n()};return e.jsx($s,{type:t?"edit":"new",initialData:i,onFormSubmit:x,onDiscard:C})};Pe("CourseData",Oe);const zs=({courseId:t})=>{const[i,n]=y.useState(!1),[g,o]=y.useState(null),[d,a]=y.useState(null),x=Fe(),C=oe(p=>{var m,Q;return(Q=(m=p==null?void 0:p.CourseData)==null?void 0:m.data)==null?void 0:Q.CourseOptionList}),v=oe(p=>{var m;return((m=p==null?void 0:p.CourseData)==null?void 0:m.data)||{}});console.log(C,v);const[b,S]=y.useState(!1),[z,P]=y.useState(null),u=()=>{if(t){const m=ns({id:t});x(m)}};y.useEffect(()=>{u()},[t]);const N=()=>{o(null),a(null),n(!0)},M=p=>{o(p.id),a(p),n(!0)},w=()=>{n(!1)},l=async()=>{if(z){try{(await Ms(z)).success&&(f.push(e.jsx(j,{title:"Deleted",type:"success",duration:2500,children:"Course option deleted successfully"}),{placement:"top-center"}),u())}catch{f.push(e.jsx(j,{title:"Error",type:"danger",duration:2500,children:"Failed to delete course option"}),{placement:"top-center"})}S(!1),P(null)}};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"topbar py-2 px-2 border-gray-200",children:e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h3",{className:"lg:mb-0"}),e.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center",children:e.jsx(U,{onClick:N,block:!0,variant:"solid",size:"sm",icon:e.jsx(ss,{}),children:"Add Option"})})]})}),e.jsx(de,{className:"h-auto py-4 px-6 bg-transparent",bodyClass:"h-auto",children:e.jsx("div",{className:"grid md:grid-cols-3 grid-cols-1 gap-4",children:C==null?void 0:C.map(p=>e.jsxs(se,{className:"p-6 flex flex-col justify-between h-full bg-white rounded-lg shadow-md",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold mb-4 text-gray-900",children:p.title}),e.jsx("p",{className:"text-gray-700 mb-4 leading-relaxed",children:p.description})]}),e.jsxs("div",{className:"mt-2 pt-4 border-gray-200 flex items-center justify-between",children:[e.jsx("div",{className:"w-8 h-8 flex items-center justify-center rounded-full bg-custom-600 hover:bg-custom-700 cursor-pointer",onClick:()=>M(p),children:e.jsx(ce,{className:"text-white",size:16})}),e.jsx("div",{className:"w-8 h-8 flex items-center justify-center rounded-full bg-red-700 hover:bg-custom-700 cursor-pointer",onClick:()=>{P(p.id),S(!0)},children:e.jsx(le,{className:"text-white",size:16})})]})]},p.id))})}),e.jsx(ae,{title:g?"Edit Option":"Add Option",isOpen:i,onClose:w,onRequestClose:w,portalClassName:"w30",children:e.jsx(Ts,{pricingId:g,initialData:d,courseId:t,onDrawerClose:w,fetchData:u})}),e.jsx(De,{isOpen:b,type:"danger",title:"Delete Course Option",confirmButtonColor:"red-600",onClose:()=>S(!1),onRequestClose:()=>S(!1),onCancel:()=>S(!1),onConfirm:l,children:e.jsx("p",{children:"Are you sure you want to delete this Course Option? This action cannot be undone."})})]})};Pe("CourseData",Oe);const jt=()=>{var o;y.useState("");const t=Fe(),i=location.pathname.substring(location.pathname.lastIndexOf("/")+1),n=oe(d=>{var a,x;return(x=(a=d==null?void 0:d.CourseData)==null?void 0:a.data)==null?void 0:x.CourseDetails}),g=()=>{if(i){const a=os({id:i});t(a)}};return y.useEffect(()=>{g()},[i]),e.jsx(e.Fragment,{children:e.jsx("div",{className:"grid grid-cols-12 gap-1 pt-2",children:e.jsx("div",{className:"col-span-12",children:e.jsxs(cs,{defaultValue:"Course Details",children:[e.jsxs(ls,{className:"bg-white pl-4",children:[e.jsx(Ne,{icon:e.jsx(ts,{}),value:"Course Details",children:"Course Details"}),e.jsx(Ne,{icon:e.jsx(rs,{}),value:"Course Price",children:"Course Options"})]}),e.jsx(Ie,{value:"Course Details",className:"bg-transparent",children:e.jsxs(de,{className:"h-full py-2 px-6 bg-transparent",bodyClass:"h-full",children:[e.jsx(se,{children:e.jsxs("div",{className:"grid auto-rows-fr lg:grid-cols-3 sm:grid-cols-1 xs:grid-cols-1 gap-2",children:[e.jsx("div",{className:"col",children:e.jsxs(se,{className:"p-1 bg-zinc-100 mx-2 h-full",children:[e.jsx("h3",{children:"Course Details"}),e.jsxs("div",{children:[e.jsx("span",{className:"font-bold",children:`${n==null?void 0:n.title}`}),e.jsx("p",{className:"text-gray-700 dark:text-gray-200",children:e.jsx("div",{children:n==null?void 0:n.description})})]})]})}),e.jsx("div",{className:"col",children:e.jsxs(se,{className:"p-4 bg-zinc-700 text-white mx-2 h-full",children:[e.jsxs("div",{className:"flex",children:[e.jsx("div",{className:"w-1/2 font-bold",children:"Author :"}),e.jsx("div",{className:"w-1/2",children:n==null?void 0:n.author})]}),e.jsxs("div",{className:"flex",children:[e.jsx("div",{className:"w-1/2 font-bold",children:"Duration :"}),e.jsx("div",{className:"w-1/2",children:n==null?void 0:n.calculatedDuration})]}),e.jsxs("div",{className:"flex",children:[e.jsx("div",{className:"w-1/2 font-bold",children:"Language :"}),e.jsx("div",{className:"w-1/2",children:n==null?void 0:n.language})]}),e.jsxs("div",{className:"flex",children:[e.jsx("div",{className:"w-1/2 font-bold",children:"Created By :"}),e.jsx("div",{className:"w-1/2",children:n==null?void 0:n.author})]}),e.jsxs("div",{className:"flex",children:[e.jsx("div",{className:"w-1/2 font-bold",children:"Created At :"}),e.jsx("div",{className:"w-1/2",children:is(n==null?void 0:n.createdDate).format("MM/DD/YYYY")})]})]})}),e.jsx("div",{className:"col",children:e.jsx(se,{className:"p-4 bg-zinc-900 text-white mx-2 h-full",children:e.jsx("div",{className:"flex h-full",children:n==null?void 0:n.shortDescription})})})]})}),e.jsx(qs,{courseId:i,fetchData:g,initialSection:((o=n==null?void 0:n.sections)==null?void 0:o.$values)||[]})]})}),e.jsx(Ie,{value:"Course Price",children:e.jsx(zs,{courseId:i})})]})})})})};export{jt as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor-mui-69397583.js";import{A as D}from"./AdaptableCard-df7695d6.js";import{r as n,f as Z}from"./vendor-react-ece1c85f.js";import{u as b,t as E,g as ee,r as te,s as se}from"./index-d17da176.js";import{I as j,B as M,O as q,Q as L,l as $,Y as B,f as re,W as oe,V as ae,t as ne}from"./index-c62ac197.js";import{A as ie,T as A}from"./actioncell-17e12e21.js";import{D as le}from"./tableV2-4d1c9fd2.js";import"./Alert-7dfbd254.js";import"./index-6b6d0f06.js";import"./index-c2088808.js";import{D as T}from"./Drawer-949c18c6.js";import{a as C,F as ce}from"./FormContainer-91c2b0e4.js";import"./Switcher-c8648037.js";import"./index-36228db5.js";import{U as de}from"./Upload-fb34ce03.js";import{S as ue}from"./StickyFooter-5b934274.js";import{d as y,c as pe,a as g,F as me,b as he}from"./index.esm-70ab539c.js";import{a as fe}from"./index-e4c6057f.js";import{b as Ce,c as ge,d as be}from"./CourseService-f0dc3bf1.js";import{C as xe}from"./ConfirmDialog-3202eb3d.js";import{u as je}from"./usePermission-d94b4984.js";import{g as ye,r as Se}from"./index-785ad361.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";import"./FileSaver.min-20f3f13a.js";import"./DensitySelector-a2c1c68f.js";import"./NoData-8c485a3a.js";import"./useControllableState-d0909575.js";import"./useDidUpdate-25c4d4ed.js";import"./ApiService-2b99757f.js";const Fe=({touched:t,errors:r,values:o,setFieldValue:c})=>e.jsxs(D,{className:"mb-4",children:[e.jsx(C,{label:"Course Title",asterisk:!0,invalid:r.title&&t.title,errorMessage:r.title,children:e.jsx(y,{name:"title",component:j,placeholder:"Enter course title"})}),e.jsx(C,{label:"Author",asterisk:!0,invalid:r.author&&t.author,errorMessage:r.author,children:e.jsx(y,{name:"author",component:j,placeholder:"Enter author name"})}),e.jsx(C,{label:"Duration",asterisk:!0,invalid:r.duration&&t.duration,errorMessage:r.duration,children:e.jsx(y,{name:"duration",component:j,placeholder:"e.g. 01:30:00"})}),e.jsx(C,{label:"Language",asterisk:!0,invalid:r.language&&t.language,errorMessage:r.language,children:e.jsx(y,{name:"language",component:j,placeholder:"e.g. English"})}),e.jsx(C,{label:"Short Description",asterisk:!0,invalid:r.shortDescription&&t.shortDescription,errorMessage:r.shortDescription,children:e.jsx(y,{name:"shortDescription",component:j,placeholder:"Enter short description"})}),e.jsx(C,{label:"Description",asterisk:!0,invalid:r.description&&t.description,errorMessage:r.description,children:e.jsx(y,{name:"description",as:"textarea",component:j,textArea:!0,rows:4,placeholder:"Enter full description"})}),e.jsx("div",{className:"block mb-6",children:e.jsxs(C,{label:"Course Banner",asterisk:!0,invalid:r.banner&&t.banner,errorMessage:r.banner,children:[e.jsx(de,{draggable:!0,accept:"image/*",cropNeeded:!1,onChange:a=>{if(a&&a[0]){const i=a[0];c("banner",i)}}}),o.banner&&e.jsx("div",{className:"mb-6",children:e.jsx("img",{src:(o==null?void 0:o.banner)instanceof File?URL.createObjectURL(o==null?void 0:o.banner):o==null?void 0:o.banner,alt:"Course Banner Preview",className:"w-full h-40 object-cover rounded-md border"})})]})})]}),Ne=pe().shape({title:g().required("Course title is required"),author:g().required("Author is required"),duration:g().required("Duration is required").matches(/^([0-1]?\d|2[0-3]):([0-5]\d):([0-5]\d)$/,"Duration must be in HH:MM:SS format"),language:g().required("Language is required"),shortDescription:g().required("Short description is required"),description:g().required("Description is required"),banner:g().required("Course banner is required")}),V=n.forwardRef(({initialData:t,onFormSubmit:r,onDiscard:o},c)=>e.jsx(me,{innerRef:c,initialValues:{title:(t==null?void 0:t.title)??"",author:(t==null?void 0:t.author)??"",duration:(t==null?void 0:t.duration)??"",language:(t==null?void 0:t.language)??"",shortDescription:(t==null?void 0:t.shortDescription)??"",description:(t==null?void 0:t.description)??"",banner:(t==null?void 0:t.banner)??""},validationSchema:Ne,onSubmit:(a,{setSubmitting:i})=>{r(a,i)},children:({touched:a,errors:i,isSubmitting:p,setFieldValue:h,values:m})=>e.jsx(he,{children:e.jsxs(ce,{children:[e.jsx(Fe,{touched:a,errors:i,values:m,setFieldValue:h}),e.jsx(ue,{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(M,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>o==null?void 0:o(),children:"Discard"}),e.jsx(M,{size:"sm",variant:"solid",loading:p,icon:e.jsx(fe,{}),type:"submit",children:"Save Course"})]})})]})})}));V.displayName="CourseForm";const U=({onDrawerClose:t,course:r,refetch:o})=>{const c=async h=>{let{title:m,author:d,duration:l,language:f,shortDescription:F,description:N,banner:x}=h;return r!=null&&r.id?await Ce(r.id,m,d,f,F,N,l,void 0,x!=null&&x.name?x:void 0):await ge(m,d,f,F,N,l,x)},a=()=>{o()},i=async(h,m)=>{m(!0),c(h).then(d=>{d.success&&(t(),a(),q.push(e.jsx(L,{title:"Success",type:"success",duration:2500,children:r?"Course updated successfully":"Course created successfully"}),{placement:"top-center"}))}).catch(d=>{var f;console.error("course - error",d),a();const l=(f=d.response)==null?void 0:f.data;m(!1),q.push(e.jsx(L,{title:"Error",type:"danger",duration:2500,children:(l==null?void 0:l.message)||"Failed to save course"}),{placement:"top-center"})})},p=()=>{t()};return e.jsx(V,{type:r?"edit":"new",initialData:r,onFormSubmit:i,onDiscard:p})},we=({fetchData:t})=>{const r=$(),o=b(p=>p.CourseData.data.deleteConfirmation),c=b(p=>p.CourseData.data.selectedRowData),a=()=>{r(E(!1))},i=async()=>{r(E(!1)),await be(c.id)&&(t(),q.push(e.jsx(L,{title:"Deleted",type:"success",duration:2500,children:"Course Successfully Deleted"}),{placement:"top-center"}))};return e.jsx(xe,{isOpen:o,type:"danger",title:"Delete Course",confirmButtonColor:"red-600",onClose:a,onRequestClose:a,onCancel:a,onConfirm:i,children:e.jsx("p",{children:"Are you sure you want to delete this Course? This action cannot be undone."})})};B("CourseData",te);B("CountyData",Se);const it=()=>{const[t,r]=n.useState([]);n.useState(!1),n.useState(!1);const[o,c]=n.useState(!1),[a,i]=n.useState(!1),[p,h]=n.useState(),[m,d]=n.useState(null),l=je("Course"),[f,F]=n.useState(null),[N,x]=n.useState({name:"",company:"",status:"",registrationDate:null}),[ve,P]=n.useState(!1),z=()=>P(!0),H=()=>{c(!0)},R=()=>{c(!1),d(null)},Q=Z(),w=$();b(s=>s.CourseData.data.filterData);const W=b(s=>s.CourseData.data.loading),Y=b(s=>{var u,S;return(S=(u=s==null?void 0:s.CourseData)==null?void 0:u.data)==null?void 0:S.CourseList});n.useState(!1),n.useState("approve"),n.useState(null);const k=b(s=>s.auth.user),_=b(s=>{var u,S,I;return(I=(S=(u=s==null?void 0:s.CountyData)==null?void 0:u.data)==null?void 0:S.CountyList)==null?void 0:I.map(O=>({value:O.id,label:O.title}))});re(),n.useEffect(()=>{v(),w(ye())},[N]);const v=()=>{const s=ee();w(s)},G=s=>{Q("/app/course-detail/"+s.id)},J=s=>{navigator.clipboard.writeText(s),q.push(e.jsx(L,{title:"Copied!",type:"success",duration:1500,children:"copied to clipboard"}),{placement:"top-center"})},K=(s,u)=>{u===A.view&&G(s),u===A.edit&&(h(s.id),d({...s,banner:`${ne.apiBaseUrl}/${s.banner}`}),i(!0)),u===A.delete&&(w(E(!0)),w(se(s))),u===A.affiliate&&J(s==null?void 0:s.affiliateLink)},X=[{dataField:"Action",caption:"Action",width:"130",cellRender:s=>e.jsx("div",{"data-cname":"Action",className:"flex justify-start items-center",children:e.jsx(ie,{row:s==null?void 0:s.data,actions:{view:!0,edit:l==null?void 0:l.isEdit,delete:l==null?void 0:l.isDelete,affiliate:!0},buttonClick:K})})},{dataField:"title",caption:"Title"},{dataField:"author",caption:"Author"},{dataField:"duration",caption:"Duration"},{dataField:"language",caption:"Language"},{dataField:"shortDescription",caption:"Short Description",width:"20%",cssClass:"truncate-cell"},{dataField:"description",caption:"Description",width:"30%",cssClass:"truncate-cell"},{dataField:"createdDate",caption:"Created Date",dataType:"date",format:"MM/dd/yyyy"}];return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("div",{className:"basis-3/4",children:e.jsx("h3",{className:"mb-4 lg:mb-0",children:"Courses"})}),e.jsxs("div",{className:"basis-1/4 flex items-center justify-between gap-2",children:[e.jsx("div",{className:"basis-3/4",children:(k==null?void 0:k.roleName)==="Super Admin"&&e.jsx(oe,{value:f,placeholder:"Select Entity",isClearable:!0,onChange:s=>F(s),options:_,styles:{input:s=>({...s,color:"black"})}})}),e.jsx("div",{className:"basis-1/4",children:e.jsx(M,{onClick:()=>H(),block:!0,variant:"solid",size:"sm",icon:e.jsx(ae,{}),children:"Add Course"})})]})]})}),e.jsx(D,{className:"m-6 h-full bg-transparent",bodyClass:"h-full",children:e.jsx(D,{className:"p-4 borderless",children:e.jsx(le,{columns:X,tableName:"Course-table",data:Y||[],height:"calc(100vh - 270px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:t,setSelectedRowId:r,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:z,isLoading:W})})}),e.jsx(T,{title:"Add Course",isOpen:o,onClose:R,onRequestClose:R,portalClassName:"w30",children:e.jsx(U,{onDrawerClose:R,refetch:v})}),e.jsx(T,{title:"Edit Course",isOpen:a,onClose:()=>i(!1),onRequestClose:()=>i(!1),portalClassName:"w30",children:e.jsx(U,{onDrawerClose:()=>i(!1),course:m,refetch:v})}),e.jsx(we,{fetchData:v})]})};export{it as default};
@@ -1,7 +0,0 @@
1
- import{j as e}from"./vendor-mui-69397583.js";import{r,k as w}from"./vendor-react-ece1c85f.js";import{S as v}from"./index-b028e652.js";import"./Alert-7dfbd254.js";import{B as d}from"./index-c62ac197.js";import"./index-6b6d0f06.js";import"./index-c2088808.js";import"./Drawer-949c18c6.js";import"./FormContainer-91c2b0e4.js";import"./Switcher-c8648037.js";import"./index-36228db5.js";import"./Upload-fb34ce03.js";import{p as s}from"./Notify-bb3ce372.js";import{a as S}from"./DigitalSignature-fff42e33.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";import"./useControllableState-d0909575.js";import"./useDidUpdate-25c4d4ed.js";function G(){const a=r.useRef(null),[u,g]=r.useState(!1),[p,x]=r.useState(null),[n,m]=r.useState(!1),[l]=w(),c=l.get("token"),h=l.get("type")||"signature",[j,f]=r.useState(500);r.useEffect(()=>{const t=()=>{const i=window.innerHeight*.7;f(i)};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]);const b=()=>{var t;return(t=a.current)==null?void 0:t.clear()},y=async()=>{var i;if((i=a.current)!=null&&i.isEmpty()){s("Please sign before submitting.","Signature can't be Empty","warning");return}const t=a.current.getTrimmedCanvas().toDataURL("image/png");if(x(t),!c){s("Invalid or missing token.","Error","danger");return}try{m(!0);const o=await S(c,{signatureValue:t});o.success?(s("Signature submitted successfully.","Success","success"),g(!0)):s(o.message||"Failed to submit signature.","Error","danger")}catch{s("Something went wrong. Please try again.","Error","danger")}finally{m(!1)}};return u?e.jsxs("div",{className:"flex flex-col min-h-[85vh] bg-gray-50 px-3 items-center justify-center text-center",children:[e.jsx("div",{className:"text-4xl mb-2",children:" 🎊"}),e.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-2",children:"Signature Saved Successfully"}),e.jsx("p",{className:"text-sm text-gray-500 mb-4",children:"Thank you for confirming your signature."}),e.jsx("img",{src:p,alt:"Signature preview",className:"rounded-md bg-white p-2 max-h-64 border shadow-sm"}),e.jsx("p",{className:"text-sm text-gray-600 mt-6",children:"You may now safely close this tab."})]}):e.jsxs("div",{className:"flex flex-col items-center min-h-screen bg-gray-50 px-3 pt-4",children:[e.jsx("h1",{className:"text-lg sm:text-xl font-semibold text-gray-800 text-center",children:h==="initials"?"Draw Your Initials":"Draw Your Signature"}),e.jsx("p",{className:"text-sm text-gray-500 mb-3 text-center",children:"Sign inside the box below"}),e.jsx("div",{className:`\r
2
- bg-white border border-gray-300 rounded-md shadow-sm\r
3
- mx-auto \r
4
- w-[90%] sm:w-[90%] lg:w-[60vw]\r
5
- h-[65vh] /* <- updated from 70vh to 65vh */\r
6
- flex items-center justify-center\r
7
- `,children:e.jsx(v,{ref:a,penColor:"black",minWidth:1.8,maxWidth:3.5,velocityFilterWeight:.7,canvasProps:{className:"w-full h-full rounded-md touch-none"}})}),e.jsxs("div",{className:"flex justify-center gap-4 mt-5 pb-5",children:[e.jsx(d,{onClick:b,disabled:n,size:"sm",className:"px-5 py-2 bg-gray-200 text-gray-700 rounded-md",children:"Clear"}),e.jsx(d,{onClick:y,disabled:n,variant:"solid",size:"sm",className:"px-5 py-2 text-white rounded-md",children:n?"Submitting...":"Submit"})]})]})}export{G as default};
@@ -1 +0,0 @@
1
- import{_ as f}from"./vendor-pdf-b2a5d8b1.js";import{j as e}from"./vendor-mui-69397583.js";import{u as j,M as v,U as y,s as E,H as M}from"./ClassicLayout-7d09e5ac.js";import{H as _,a as g}from"./HorizontalMenuContent-96da38e1.js";import{h as i,d,N,P as S,b as C}from"./index-c62ac197.js";import{V as H}from"./Views-74429e81.js";import{c as m,r as p}from"./vendor-react-ece1c85f.js";import{L}from"./Logo-3f3c9ee6.js";import"./SidePanelContent-6b13836f.js";import"./Switcher-c8648037.js";import"./index-ec2010d2.js";import"./index-6b6d0f06.js";import"./useControllableState-d0909575.js";import"./DoubleSidedImage-ae98733b.js";import"./Drawer-949c18c6.js";import"./index-c2088808.js";import"./useDidUpdate-25c4d4ed.js";import"./Alert-7dfbd254.js";import"./FormContainer-91c2b0e4.js";import"./index-36228db5.js";import"./Upload-fb34ce03.js";import"./vendor-devex-33a39e11.js";import"./index-aaad94c2.js";import"./index-e4c6057f.js";import"./index-f6be0390.js";import"./vendor-i18n-2fcb1983.js";import"./index-ea125a16.js";import"./vendor-redux-a1f00e6b.js";import"./vendor-msal-9caa1ed1.js";import"./vendor-charts-eccea5d1.js";const w=r=>{const{className:s,contained:l,menus:n}=r,t=i(o=>o.theme.navMode),a=i(o=>o.theme.themeColor),c=i(o=>o.theme.primaryColorLevel),u=i(o=>o.auth.user.authority),{larger:x}=j(),h=()=>t===N?`bg-${a}-${c} secondary-header-${t}`:`secondary-header-${t}`;return e.jsx(e.Fragment,{children:x.md&&e.jsx("div",{className:d("h-16 flex items-center",h(),s),children:e.jsx("div",{className:d("flex items-center px-4",l&&"container mx-auto"),children:e.jsx(_,{menus:n,manuVariant:t,userAuthority:u})})})})},A=m.lazy(()=>f(()=>import("./AiCa-9c1b25b2.js"),["assets/AiCa-9c1b25b2.js","assets/vendor-mui-69397583.js","assets/vendor-react-ece1c85f.js","assets/index-c62ac197.js","assets/vendor-redux-a1f00e6b.js","assets/vendor-pdf-b2a5d8b1.js","assets/vendor-devex-33a39e11.js","assets/vendor-i18n-2fcb1983.js","assets/vendor-msal-9caa1ed1.js","assets/vendor-charts-eccea5d1.js","assets/index-8c229076.css","assets/MessageInput-6dc83761.js","assets/index-42e65911.js","assets/useDeviceCheck-920641a5.js","assets/Alert-7dfbd254.js","assets/index-6b6d0f06.js","assets/useControllableState-d0909575.js","assets/index-c2088808.js","assets/useDidUpdate-25c4d4ed.js","assets/Drawer-949c18c6.js","assets/FormContainer-91c2b0e4.js","assets/Switcher-c8648037.js","assets/index-36228db5.js","assets/Upload-fb34ce03.js","assets/BrainServices-a4bb698e.js","assets/index-f6be0390.js"])),R=m.memo(r=>{const{menus:s}=r;return e.jsxs(e.Fragment,{children:[e.jsx(g,{}),e.jsx(L,{type:"streamline",imgClass:"mx-auto mobile-only"}),e.jsx(v,{menus:s})]})}),b=m.memo(()=>e.jsxs(e.Fragment,{children:[e.jsx(p.Suspense,{fallback:null,children:e.jsx(A,{})}),e.jsx(y,{hoverable:!1})]})),D=()=>{const[r,s]=p.useState([]);p.useEffect(()=>{l()},[]);const l=async()=>{var t;const n=localStorage.getItem(S);if(n){const a=await C(n,"default");let c=E((t=a==null?void 0:a.data)==null?void 0:t.$values);s(c??[])}};return e.jsx("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(M,{container:!0,className:"shadow dark:shadow-2xl",headerStart:e.jsx(R,{menus:r}),headerEnd:e.jsx(b,{})}),e.jsx(w,{contained:!0,menus:r}),e.jsx(H,{pageContainerType:"contained"})]})})})},ce=m.memo(D);export{ce as default};
@@ -1 +0,0 @@
1
- import{j as s,T as d,I as x,n as u,o as j,r as h,i as p}from"./vendor-mui-69397583.js";import{r as D}from"./vendor-react-ece1c85f.js";import{aB as I,cu as f,cv as C,cw as y}from"./index-c62ac197.js";const L=({density:c,setDensity:r})=>{const[t,n]=D.useState(null),a=!!t,l=e=>{n(e.currentTarget)},o=()=>{n(null)},i=e=>{r(e),o()},m={compact:s.jsx(f,{}),standard:s.jsx(C,{}),comfortable:s.jsx(y,{})};return s.jsxs(s.Fragment,{children:[s.jsx(d,{title:"Density",children:s.jsx(x,{onClick:l,children:s.jsx(I,{style:{fontSize:15}})})}),s.jsx(u,{anchorEl:t,open:a,onClose:o,children:["compact","standard","comfortable"].map(e=>s.jsxs(j,{selected:c===e,onClick:()=>i(e),children:[s.jsx(h,{children:m[e]}),s.jsx(p,{primary:e.charAt(0).toUpperCase()+e.slice(1)})]},e))})]})};export{L as D};
@@ -1 +0,0 @@
1
- import{j as s}from"./vendor-mui-69397583.js";import{r as c}from"./vendor-react-ece1c85f.js";import{Z as h}from"./index-c62ac197.js";import{A as f}from"./AdaptableCard-df7695d6.js";import{o as p}from"./DigitalSignature-fff42e33.js";import{f as v}from"./DateDifference-e47d2393.js";const u=({documentId:r})=>{const[a,x]=c.useState([]),[l,o]=c.useState(!0);return c.useEffect(()=>{if(!r)return;(async()=>{var i,d,m,n;try{o(!0);const e=await p(r);(d=(i=e==null?void 0:e.data)==null?void 0:i.data)!=null&&d.$values&&x(((n=(m=e==null?void 0:e.data)==null?void 0:m.data)==null?void 0:n.$values)??[])}catch(e){console.error("Failed to load activity logs",e)}finally{o(!1)}})()},[r]),s.jsx(f,{className:"shadow-sm rounded-lg activity-card-header",children:s.jsx("div",{className:"p-4",children:s.jsxs("div",{className:"relative pl-4",children:[l&&s.jsx("p",{className:"text-white text-sm",children:"Loading activity..."}),!l&&a.length===0&&s.jsx("p",{className:"text-white text-sm",children:"No activity found."}),s.jsx("div",{className:"space-y-3",children:a==null?void 0:a.map(t=>{var i;return s.jsxs("div",{className:"ticket-activity",children:[s.jsx("div",{className:"t-activity absolute -left-4 top-0 w-3 h-3 rounded-full bg-custom-500 ring-2 ring-white"}),s.jsxs("div",{className:"pl-2",children:[s.jsxs("div",{className:"text-sm text-white",children:[s.jsx("span",{className:"font-bold",children:!(t!=null&&t.partyName)&&(t==null?void 0:t.createdByUserName)})," ",t==null?void 0:t.details]}),s.jsxs("div",{className:"text-xs text-white mt-1",children:[v(t==null?void 0:t.timestamp)," (",(i=h.utc(t==null?void 0:t.timestamp))==null?void 0:i.local().format("DD MMM YY h:mm A"),")"]})]})]},t.id)})})]})})})},L=u;export{L as A};