@xframework-ca-test/cli 1.0.33 → 1.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +60 -46
  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 +0,0 @@
1
- import{w as Fe,x as We,y as V,j as e,z as He,B as Ye,C as Qe,D as Ge,E as z,F as Ae,G as Ie,H as P,J as Oe,s as G,K as Je,N as Se,O as De}from"./vendor-mui-69397583.js";import{r as j,u as L,f as H,j as Ke}from"./vendor-react-ece1c85f.js";import{a as Ze}from"./index-f6be0390.js";import{Y as $,l as I,I as E,B as F,O as N,Q as S,V as J,cJ as Xe,Z as Re,S as et,cK as tt,cL as st,cd as at,cM as it,cN as nt,cO as lt,W as rt}from"./index-c62ac197.js";import{r as T,u as v,e as $e,f as Q,h as he,i as ne,j as le,k as ot,l as Te,m as xe,n as re,o as oe,p as ct,q as Ee,v as fe,w as ce,x as de,y as dt,z as Me,A as je,B as pe,C as ue,D as pt}from"./index-dc103f22.js";import{A as k}from"./AdaptableCard-df7695d6.js";import{C as me}from"./CustomerInfoField-fff65ace.js";import{d as ut}from"./Check-71f21a49.js";import{f as ze,t as mt,u as ht,v as xt,w as ft,x as jt,y as gt,z as yt,A as bt,d as wt,e as Ct,B as Nt,b as St,c as Dt,C as vt,D as kt}from"./OpportunityServices-fa4fabfd.js";import{T as ge}from"./index-36228db5.js";import{D as ie}from"./tableV2-4d1c9fd2.js";import{A as K,T as M}from"./actioncell-17e12e21.js";import"./Alert-7dfbd254.js";import"./index-6b6d0f06.js";import{a as Ft,P as At}from"./index-c2088808.js";import{D as B}from"./Drawer-949c18c6.js";import{F as Z,a as O}from"./FormContainer-91c2b0e4.js";import"./Switcher-c8648037.js";import"./Upload-fb34ce03.js";import{c as W,a as _,F as X,b as ee,d as R}from"./index.esm-70ab539c.js";import{S as te}from"./StickyFooter-5b934274.js";import{C as se}from"./ConfirmDialog-3202eb3d.js";import{d as It}from"./FolderOpen-88bfcc74.js";import{N as Ot}from"./NoData-8c485a3a.js";import{A as Rt}from"./AddEditFile-063c229b.js";import{r as ae}from"./createSvgIcon-c5fc0d04.js";import{h as $t}from"./index-36ba4ea7.js";import{a as Tt}from"./index-e4c6057f.js";import{P as Et}from"./permissionHoc-6f787658.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"./FileSaver.min-20f3f13a.js";import"./DensitySelector-a2c1c68f.js";import"./useDidUpdate-25c4d4ed.js";const Mt=Fe(We)(({theme:a})=>({[`&.${V.alternativeLabel}`]:{top:10,left:"calc(-50% + 16px)",right:"calc(50% + 16px)"},[`&.${V.active}`]:{[`& .${V.line}`]:{borderColor:"var(--custom-600)"}},[`&.${V.completed}`]:{[`& .${V.line}`]:{borderColor:"var(--custom-600)"}},[`& .${V.line}`]:{borderColor:"#eaeaf0",borderTopWidth:3,borderRadius:1,...a.applyStyles("dark",{borderColor:a.palette.grey[800]})}})),zt=Fe("div")(({theme:a})=>({color:"#eaeaf0",display:"flex",height:22,alignItems:"center","& .QontoStepIcon-completedIcon":{color:"var(--custom-600)",zIndex:1,fontSize:25},"& .QontoStepIcon-circle":{width:12,height:12,borderRadius:"50%",backgroundColor:"currentColor"},...a.applyStyles("dark",{color:a.palette.grey[700]}),variants:[{props:({ownerState:o})=>o.active,style:{color:"var(--custom-600)"}}]}));function Lt(a){const{active:o,completed:d,className:n}=a;return e.jsx(zt,{ownerState:{active:o},className:n,children:d?e.jsx(ut,{className:"QontoStepIcon-completedIcon"}):e.jsx("div",{className:"QontoStepIcon-circle"})})}function qt(a){const{oppId:o,handleChange:d}=a,[n,p]=j.useState([]),l=j.useCallback(async()=>{var g,c;try{const b=await ze();b!=null&&b.data&&p((c=(g=b==null?void 0:b.data)==null?void 0:g.$values)==null?void 0:c.map(m=>m))}catch{p([])}},[]);j.useEffect(()=>{l()},[l]);const y=n.findIndex(g=>(g==null?void 0:g.id)===a.activeStep),C=async g=>{var c;d(g,(g==null?void 0:g.displayOrder)>=((c=n[y])==null?void 0:c.displayOrder)?"Add":"Sub")};return e.jsx(He,{sx:{width:"80%",marginTop:"20px"},spacing:4,children:e.jsx(Ye,{alternativeLabel:!0,activeStep:y,connector:e.jsx(Mt,{}),children:n.map(g=>e.jsx(Qe,{onClick:()=>C(g),children:e.jsx(Ge,{style:{cursor:"pointer"},StepIconComponent:Lt,children:g==null?void 0:g.stageName})},g==null?void 0:g.stageName))})})}$("opportunity",T);const Pt=W().shape({title:_().required("Title is Required")}),_t=a=>{const{type:o,footerWidth:d,ref:n,initialData:p,id:l}=a,y=I();L();const{IsNotesDrawerOpen:C,loading:g,selectedNote:c}=v(i=>i.opportunity.notes),b=async i=>{var s;try{return await mt(i)}catch(r){return(s=r==null?void 0:r.response)==null?void 0:s.data}},m=async i=>{var r;const{id:s}=i;try{return await ht(s,i)}catch(t){return(r=t==null?void 0:t.response)==null?void 0:r.data}},x=i=>{y($e({IsNotesDrawerOpen:!C,type:i}))},u=async(i,s)=>{const r=(f,D)=>{const A={title:f.title??"",description:f.description??"",opportunityId:l};return D==="Add"?A:{id:f.id??"",...A}},t=(f,D)=>{f.success?(y(Q(l)),y(he(l)),x("Add"),s(!1),N.push(e.jsx(S,{title:"Success",type:"success",duration:2500,children:`Note Successfully ${D}`}),{placement:"top-center"})):N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:f.message}),{placement:"top-center"})},h=r(i,o);let w;try{o==="Add"?(w=await b(h),t(w,"Added")):o==="Edit"&&(w=await m(h),t(w,"Updated"))}catch(f){console.error("Error during form submission:",f),s(!1),N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:`An error occurred during ${o} Note`}),{placement:"top-center"})}};return e.jsx(X,{innerRef:n,initialValues:{...p},validationSchema:Pt,onSubmit:(i,{setSubmitting:s})=>{const r=i;u==null||u(r,s)},children:({values:i,touched:s,errors:r,isSubmitting:t})=>e.jsx(ee,{children:e.jsx(Z,{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.jsxs(k,{className:"mb-4",children:[e.jsx(O,{asterisk:!0,label:"Title",invalid:r.title&&s.title,errorMessage:r.title,children:e.jsx(R,{type:"text",autoComplete:"off",name:"title",placeholder:"Title",component:E})}),e.jsx(O,{label:"Description",invalid:r.description||s.description,errorMessage:r.description,children:e.jsx(R,{textArea:!0,autoComplete:"off",name:"description",placeholder:"Description",component:E})}),e.jsx(te,{className:`px-8 flex items-center justify-between py-4 ${d}`,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(F,{size:"sm",className:"mr-2",type:"button",disabled:t,onClick:()=>x("Add"),children:"Cancel"}),e.jsx(F,{size:"sm",variant:"solid",type:"submit",loading:t,children:`${o} Note`})]})})]})})})})})})};$("opportunity",T);const Bt={edit:!0,delete:!0},Vt=({opportunityId:a})=>{const[o,d]=j.useState([]),[n,p]=j.useState({pageSize:"",pageIndex:""}),l=I();H(),L();const{IsNotesDrawerOpen:y,loading:C,notesList:g,selectedNote:c,type:b,deleteConfirmation:m}=v(t=>t.opportunity.notes),x=t=>{l($e({IsNotesDrawerOpen:!y,type:t})),l(ne({}))},u=(t,h)=>{h===M.edit&&(x("Edit"),l(ne(t))),h===M.delete&&(l(le(!0)),l(ne(t)))},i=[{dataField:"Action",caption:"Action",width:"130",cellRender:t=>e.jsx("div",{id:"mAction","data-cname":"Action",children:e.jsx(K,{row:t==null?void 0:t.data,actions:Bt,buttonClick:u})})},{dataField:"title",caption:"Title",width:"230"},{dataField:"description",caption:"Description",width:"230"},{dataField:"createdBy",caption:"Created By",width:"230"},{dataField:"createdDate",caption:"Created Date",width:"230",dataType:"date",format:"MM/dd/yyyy"}];j.useEffect(()=>{l(he(a))},[]);const s=()=>{l(le(!m))},r=async()=>{l(le(!1)),await ot(c==null?void 0:c.id)&&(l(he(a)),N.push(e.jsx(S,{title:"Deleted",type:"success",duration:2500,children:"Note Successfully Deleted"}),{placement:"top-center"}))};return e.jsx(e.Fragment,{children:e.jsxs(k,{className:"h-full bg-transparent borderless",bodyClass:"h-full",children:[e.jsxs("div",{className:"lg:flex items-center justify-between mb-4 gap-3",children:[e.jsx("div",{className:"mb-4 lg:mb-0",children:e.jsx("h4",{className:"text-lg py-3",children:" Notes "})}),e.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center gap-3",children:e.jsx(F,{size:"sm",icon:e.jsx(J,{}),onClick:()=>x("Add"),children:"Add Note"})})]}),e.jsx(ie,{columns:i,tableName:"Notes",height:"calc(100vh - 400px)",data:g||[],defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:o,setSelectedRowId:d,setFilterValues:()=>{},filterValues:[],identity:"Billing.BillingItems",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"billing-table",handleSearch:()=>{},isColumnResizing:!0,pager:n,setPager:p,isFilterReq:!1,isPaginationReq:!0,isSelectionReq:!1}),e.jsx(B,{title:`${b} Notes`,isOpen:y,onClose:()=>x("Add"),portalClassName:"w30",children:e.jsx(_t,{footerWidth:"w30",type:b,initialData:b==="Add"?{title:"",description:""}:c,id:a})}),e.jsx(se,{isOpen:m,type:"danger",title:"Delete Note",confirmButtonColor:"red-600",onClose:s,onRequestClose:s,onCancel:s,onConfirm:r,children:e.jsx("p",{children:"Are you sure you want to delete this Note?"})})]})})};$("opportunity",T);const Ut=W().shape({emailSubject:_().required("Subject is Required"),receipients:_().required("Email addresses are required").test("is-valid-email","Invalid email format",a=>a?a.split(",").map(d=>d.trim()).every(d=>/\S+@\S+\.\S+/.test(d)):!0).test("unique-emails","Duplicate emails are not allowed",a=>{if(!a)return!0;const o=a.split(",").map(n=>n.trim()),d=new Set(o);return o.length===d.size})}),Wt=a=>{const{type:o,footerWidth:d,ref:n,initialData:p,id:l}=a,y=I();L();const C=async x=>{var u;try{return await xt(x)}catch(i){return(u=i==null?void 0:i.response)==null?void 0:u.data}},g=async x=>{var u;try{return await ft(x)}catch(i){return(u=i==null?void 0:i.response)==null?void 0:u.data}},c=v(x=>x.opportunity),b=()=>{y(Te(!c))},m=async(x,u)=>{const i=(h,w)=>{const f={emailDate:new Date,emailSubject:h.emailSubject??"",recipients:h.receipients??"",description:h.description??"",opportunityId:l};return w==="Add"?f:{id:h.id??"",...f}},s=(h,w)=>{h.success?(y(xe(l)),b(),u(!1),N.push(e.jsx(S,{title:"Success",type:"success",duration:2500,children:`Email Successfully ${w}`}),{placement:"top-center"})):N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:h.message}),{placement:"top-center"})},r=i(x,o);let t;try{o==="Add"?(t=await C(r),s(t,"Added")):o==="Edit"&&(t=await g(r),s(t,"Updated"))}catch(h){console.error("Error during form submission:",h),u(!1),N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:`An error occurred during ${o} Notes`}),{placement:"top-center"})}};return e.jsx(X,{innerRef:n,initialValues:{...p},validationSchema:Ut,onSubmit:(x,{setSubmitting:u})=>{const i=x;m==null||m(i,u)},children:({values:x,touched:u,errors:i,isSubmitting:s,setFieldValue:r})=>e.jsx(ee,{children:e.jsx(Z,{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.jsxs(k,{className:"mb-4",children:[e.jsx(O,{asterisk:!0,label:"Subject",invalid:i.emailSubject&&u.emailSubject,errorMessage:i.emailSubject,children:e.jsx(R,{type:"text",autoComplete:"off",name:"emailSubject",placeholder:"Subject",component:E})}),e.jsx(O,{asterisk:!0,label:"Recipient(s)",invalid:i.receipients&&u.receipients,errorMessage:i.receipients,children:e.jsx(R,{name:"receipients",placeholder:"Recipient(s)",type:"text",component:E,onChange:t=>{const w=t.target.value.split(",").map(f=>f.trim()).join(",");r("receipients",w)}})}),e.jsx(O,{label:"Note",invalid:i.description&&u.description,errorMessage:i.description,children:e.jsx(R,{textArea:!0,autoComplete:"off",name:"description",placeholder:"Note",component:E})}),e.jsx(te,{className:`px-8 flex items-center justify-between py-4 ${d}`,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(F,{size:"sm",className:"mr-2",disabled:s,onClick:()=>b(),children:"Cancel"}),e.jsx(F,{size:"sm",variant:"solid",type:"submit",loading:s,children:`${o} Email`})]})})]})})})})})})};$("opportunity",T);const Ht={edit:!0,delete:!0},Yt=({opportunityId:a})=>{const[o,d]=j.useState([]),[n,p]=j.useState({pageSize:"",pageIndex:""}),l=I();L();const{IsEmailDrawerOpen:y,loading:C,emailsList:g,selectedEmail:c,type:b,deleteConfirmation:m}=v(t=>t.opportunity.emails),x=t=>{l(re({})),l(Te({IsEmailDrawerOpen:!y,type:t}))},u=(t,h)=>{h===M.edit&&(x("Edit"),l(re(t))),h===M.delete&&(l(oe(!0)),l(re(t)))},i=[{dataField:"Action",caption:"Action",width:"130",cellRender:t=>e.jsx("div",{id:"mAction","data-cname":"Action",children:e.jsx(K,{row:t==null?void 0:t.data,actions:Ht,buttonClick:u})})},{dataField:"emailDate",caption:"Date",width:"230",dataType:"date",format:"MM/dd/yyyy"},{dataField:"emailSubject",caption:"Subject",width:"230"},{dataField:"recipients",caption:"Recipients",width:"230"},{dataField:"createdBy",caption:"Created By",width:"230"}];j.useEffect(()=>{l(xe(a))},[]);const s=()=>{l(oe(!m))},r=async()=>{l(oe(!1)),await ct(c==null?void 0:c.id)&&(l(xe(a)),N.push(e.jsx(S,{title:"Deleted",type:"success",duration:2500,children:"Email Successfully Deleted"}),{placement:"top-center"}))};return e.jsx(e.Fragment,{children:e.jsxs(k,{className:"h-full bg-transparent borderless",bodyClass:"h-full",children:[e.jsxs("div",{className:"lg:flex items-center justify-between mb-4 gap-3",children:[e.jsx("div",{className:"mb-4 lg:mb-0",children:e.jsx("h4",{className:"text-lg py-3",children:" Emails "})}),e.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center gap-3",children:e.jsx(F,{size:"sm",icon:e.jsx(J,{}),onClick:()=>x("Add"),children:"Add Email"})})]}),e.jsx(ie,{columns:i,tableName:"Email",data:g||[],height:"calc(100vh - 400px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:o,setSelectedRowId:d,setFilterValues:()=>{},filterValues:[],identity:"Billing.BillingItems",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"billing-table",handleSearch:()=>{},isColumnResizing:!0,pager:n,setPager:p,isFilterReq:!1,isPaginationReq:!0,isSelectionReq:!1}),e.jsx(B,{title:`${b} Email`,isOpen:y,onClose:()=>x("Add"),portalClassName:"w30",children:e.jsx(Wt,{footerWidth:"w30",type:b,initialData:b==="Add"?{emailDate:new Date,emailSubject:"",receipients:"",description:""}:{...c,receipients:c==null?void 0:c.recipients},id:a})}),e.jsx(se,{isOpen:m,type:"danger",title:"Delete Email",confirmButtonColor:"red-600",onClose:s,onRequestClose:s,onCancel:s,onConfirm:r,children:e.jsx("p",{children:"Are you sure you want to delete this Email?"})})]})})};$("opportunity",T);const Qt=W().shape({subject:_().required("Subject is Required")}),Gt=a=>{const{type:o,footerWidth:d,ref:n,initialData:p,id:l}=a,y=I();L();const{IsTasksDrawerOpen:C,loading:g}=v(u=>u.opportunity.tasks),c=async u=>{var i;try{return await jt(u)}catch(s){return(i=s==null?void 0:s.response)==null?void 0:i.data}},b=async u=>{var s;const{id:i}=u;try{return await gt(i,u)}catch(r){return(s=r==null?void 0:r.response)==null?void 0:s.data}},m=u=>{y(Ee({IsNotesDrawerOpen:!C,type:u}))},x=async(u,i)=>{const s=(w,f)=>{const D={subject:w.subject??"",description:w.description??"",opportunityId:l};return f==="Add"?D:{id:w.id??"",...D}},r=(w,f)=>{w.success?(y(Q(l)),y(fe(l)),m("Add"),i(!1),N.push(e.jsx(S,{title:"Success",type:"success",duration:2500,children:`Task Successfully ${f}`}),{placement:"top-center"})):N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:w.message}),{placement:"top-center"})},t=s(u,o);let h;try{o==="Add"?(h=await c(t),r(h,"Added")):o==="Edit"&&(h=await b(t),r(h,"Updated"))}catch(w){console.error("Error during form submission:",w),i(!1),N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:`An error occurred during ${o} Task`}),{placement:"top-center"})}};return e.jsx(X,{innerRef:n,initialValues:{...p},validationSchema:Qt,onSubmit:(u,{setSubmitting:i})=>{const s=u;x==null||x(s,i)},children:({values:u,touched:i,errors:s,isSubmitting:r})=>e.jsx(ee,{children:e.jsx(Z,{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.jsxs(k,{className:"mb-4",children:[e.jsx(O,{asterisk:!0,label:"Subject",invalid:s.subject&&i.subject,errorMessage:s.subject,children:e.jsx(R,{type:"text",autoComplete:"off",name:"subject",placeholder:"Subject",component:E})}),e.jsx(O,{label:"Note",invalid:s.description&&i.description,errorMessage:s.description,children:e.jsx(R,{textArea:!0,autoComplete:"off",name:"description",placeholder:"Note",component:E})}),e.jsx(te,{className:`px-8 flex items-center justify-between py-4 ${d}`,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(F,{size:"sm",className:"mr-2",type:"button",disabled:r,onClick:()=>m("Add"),children:"Cancel"}),e.jsx(F,{size:"sm",variant:"solid",type:"submit",loading:r,children:`${o} Task`})]})})]})})})})})})};$("opportunity",T);const Jt={edit:!0,delete:!0},Kt=({opportunityId:a})=>{const[o,d]=j.useState([]),[n,p]=j.useState({pageSize:"",pageIndex:""}),l=I();L();const{IsTaskDrawerOpen:y,loading:C,tasksList:g,selectedTask:c,type:b,deleteConfirmation:m}=v(t=>t.opportunity.tasks);v(t=>t.opportunity);const x=t=>{l(Ee({IsTaskDrawerOpen:!y,type:t})),l(ce({}))},u=(t,h)=>{h===M.edit&&(x("Edit"),l(ce(t))),h===M.delete&&(l(de(!0)),l(ce(t)))},i=[{dataField:"Action",caption:"Action",width:"130",cellRender:t=>e.jsx("div",{id:"mAction","data-cname":"Action",children:e.jsx(K,{row:t==null?void 0:t.data,actions:Jt,buttonClick:u})})},{dataField:"subject",caption:"Subject",width:"230"},{dataField:"description",caption:"Description",width:"230"},{dataField:"createdDate",caption:"Created Date",width:"230",dataType:"date",format:"MM/dd/yyyy"}];j.useEffect(()=>{l(fe(a))},[]);const s=()=>{l(de(!m))},r=async()=>{l(de(!1)),await dt(c==null?void 0:c.id)&&(l(fe(a)),N.push(e.jsx(S,{title:"Deleted",type:"success",duration:2500,children:"Task Successfully Deleted"}),{placement:"top-center"}))};return e.jsx(e.Fragment,{children:e.jsxs(k,{className:"h-full bg-transparent borderless",bodyClass:"h-full",children:[e.jsxs("div",{className:"lg:flex items-center justify-between mb-4 gap-3",children:[e.jsx("div",{className:"mb-4 lg:mb-0",children:e.jsx("h4",{className:"text-lg py-3",children:" Tasks "})}),e.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center gap-3",children:e.jsx(F,{size:"sm",icon:e.jsx(J,{}),onClick:()=>x("Add"),children:"Add Task"})})]}),e.jsx(ie,{columns:i,tableName:"tasks",data:g||[],height:"calc(100vh - 400px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:o,setSelectedRowId:d,setFilterValues:()=>{},filterValues:[],identity:"Billing.BillingItems",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"billing-table",handleSearch:()=>{},isColumnResizing:!0,pager:n,setPager:p,isFilterReq:!1,isPaginationReq:!0,isSelectionReq:!1}),e.jsx(B,{title:`${b} Task`,isOpen:y,onClose:()=>x("Add"),portalClassName:"w30",children:e.jsx(Gt,{footerWidth:"w30",type:b,initialData:b==="Add"?{subject:"",description:""}:c,id:a})}),e.jsx(se,{isOpen:m,type:"danger",title:"Delete Task",confirmButtonColor:"red-600",onClose:s,onRequestClose:s,onCancel:s,onConfirm:r,children:e.jsx("p",{children:"Are you sure you want to delete this Task?"})})]})})};$("opportunity",T);const Zt=W().shape({title:_().required("Title is Required"),phoneNumber:_().matches(/^[0-9()\-\s]+$/,"Phone must only contain numbers, parentheses, dashes, and spaces").test("is-ten-digits","Please enter valid Phone No",a=>a?a.replace(/[()\-\s]/g,"").length===10:!0).required("Phone Number Required")}),Xt=a=>{let{value:o}=a.target;o=o.replace(/\D/g,"");var d=o.length;d>0&&(o="("+o),d>3&&(o=o.slice(0,4)+") "+o.slice(4,11)),d>6&&(o=o.slice(0,9)+"-"+o.slice(9)),a.target.value=o},es=a=>{const{type:o,footerWidth:d,ref:n,initialData:p,id:l}=a,y=I();L();const{IsCallDrawerOpen:C,loading:g,selectedCall:c}=v(i=>i.opportunity.calls),b=async i=>{var s;try{return await yt(i)}catch(r){return(s=r==null?void 0:r.response)==null?void 0:s.data}},m=async i=>{var r;const{id:s}=i;try{return await bt(s,i)}catch(t){return(r=t==null?void 0:t.response)==null?void 0:r.data}},x=i=>{y(Me({IsCallDrawerOpen:!C,type:i}))},u=async(i,s)=>{const r=(f,D)=>{const A={callDate:f.callDate??new Date,title:f.title??"",phoneNumber:f.phoneNumber??"",description:f.description??"",opportunityId:l};return D==="Add"?A:{id:f.id??"",...A}},t=(f,D)=>{f.success?(y(Q(l)),y(je(l)),x("Add"),s(!1),N.push(e.jsx(S,{title:"Success",type:"success",duration:2500,children:`Call Successfully ${D}`}),{placement:"top-center"})):N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:f.message}),{placement:"top-center"})},h=r(i,o);let w;try{o==="Add"?(w=await b(h),t(w,"Added")):o==="Edit"&&(w=await m(h),t(w,"Updated"))}catch(f){console.error("Error during form submission:",f),s(!1),N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:`An error occurred during ${o} Call`}),{placement:"top-center"})}};return e.jsx(X,{innerRef:n,initialValues:{...p},validationSchema:Zt,onSubmit:(i,{setSubmitting:s})=>{const r=i;u==null||u(r,s)},children:({values:i,touched:s,errors:r,isSubmitting:t})=>e.jsx(ee,{children:e.jsx(Z,{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.jsxs(k,{className:"mb-4",children:[e.jsx(O,{label:"Date",invalid:r.callDate&&s.callDate,errorMessage:r.callDate,children:e.jsx(R,{name:"callDate",placeholder:"Date",children:({field:h,form:w})=>e.jsx(Ft,{field:h,form:w,inputFormat:"MM/DD/YYYY",value:i.callDate?new Date(i.callDate):new Date,onChange:f=>{w.setFieldValue(h.name,f)}})})}),e.jsx(O,{asterisk:!0,label:"Title",invalid:r.title&&s.title,errorMessage:r.title,children:e.jsx(R,{type:"text",autoComplete:"off",name:"title",placeholder:"Title",component:E})}),e.jsx(O,{label:"Phone No.",asterisk:!0,invalid:r.phoneNumber&&s.phoneNumber,errorMessage:r.phoneNumber,children:e.jsx(R,{onInput:h=>{Xt(h)},type:"text",autoComplete:"off",name:"phoneNumber",placeholder:"Phone",component:E})}),e.jsx(O,{label:"Note",invalid:r.description&&s.description,errorMessage:r.description,children:e.jsx(R,{textArea:!0,autoComplete:"off",name:"description",placeholder:"Note",component:E})}),e.jsx(te,{className:`px-8 flex items-center justify-between py-4 ${d}`,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(F,{size:"sm",className:"mr-2",type:"button",disabled:t,onClick:()=>x("Add"),children:"Cancel"}),e.jsx(F,{size:"sm",variant:"solid",type:"submit",loading:t,children:`${o} Call`})]})})]})})})})})})};$("opportunity",T);const ts={edit:!0,delete:!0},ss=({opportunityId:a})=>{const[o,d]=j.useState([]),[n,p]=j.useState({pageSize:"",pageIndex:""}),l=I();L();const{IsCallDrawerOpen:y,loading:C,callsList:g,selectedCall:c,type:b,deleteConfirmation:m}=v(t=>t.opportunity.calls);v(t=>t.opportunity.callss);const x=t=>{l(Me({IsCallDrawerOpen:!y,type:t})),l(pe({}))},u=(t,h)=>{h===M.edit&&(x("Edit"),l(pe(t))),h===M.delete&&(l(ue(!0)),l(pe(t)))},i=[{dataField:"Action",caption:"Action",width:"130",cellRender:t=>e.jsx("div",{id:"mAction","data-cname":"Action",children:e.jsx(K,{row:t==null?void 0:t.data,actions:ts,buttonClick:u})})},{dataField:"callDate",caption:"Date",width:"230",dataType:"date",format:"MM/dd/yyyy"},{dataField:"title",caption:"Title",width:"230"},{dataField:"phoneNumber",caption:"Phone No.",width:"230"},{dataField:"description",caption:"Note",width:"230",cellRender:t=>{const h=t.value.replace(/<[^>]*>/g,"");return e.jsx("div",{"data-cname":"Note",children:e.jsx("span",{children:h})})}},{dataField:"createdDate",caption:"Created Date",width:"230",dataType:"date",format:"MM/dd/yyyy"}];j.useEffect(()=>{l(je(a))},[]);const s=()=>{l(ue(!m))},r=async()=>{l(ue(!1)),await pt(c==null?void 0:c.id)&&(l(je(a)),N.push(e.jsx(S,{title:"Deleted",type:"success",duration:2500,children:"Call Successfully Deleted"}),{placement:"top-center"}))};return e.jsx(e.Fragment,{children:e.jsxs(k,{className:"h-full bg-transparent borderless",bodyClass:"h-full",children:[e.jsxs("div",{className:"lg:flex items-center justify-between mb-4 gap-3",children:[e.jsx("div",{className:"mb-4 lg:mb-0",children:e.jsx("h4",{className:"text-lg py-3",children:" Calls "})}),e.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center gap-3",children:e.jsx(F,{size:"sm",icon:e.jsx(J,{}),onClick:()=>x("Add"),children:"Add Call"})})]}),e.jsx(ie,{columns:i,tableName:"Calls",height:"calc(100vh - 400px)",data:g||[],initialColumOrder:[],defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:o,setSelectedRowId:d,setFilterValues:()=>{},filterValues:[],identity:"Billing.BillingItems",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"billing-table",handleSearch:()=>{},isColumnResizing:!0,pager:n,setPager:p,isFilterReq:!1,isPaginationReq:!0,isSelectionReq:!1}),e.jsx(B,{title:`${b} Call`,isOpen:y,onClose:()=>x("Add"),portalClassName:"w30",children:e.jsx(es,{footerWidth:"w30",type:b,initialData:c,id:a})}),e.jsx(se,{isOpen:m,type:"danger",title:"Delete Call",confirmButtonColor:"red-600",onClose:s,onRequestClose:s,onCancel:s,onConfirm:r,children:e.jsx("p",{children:"Are you sure you want to delete this Call?"})})]})})};$("opportunity",T);const as=()=>(j.useState([]),I(),H(),v(a=>a.opportunity.data.IsDrawerOpen),v(a=>a.opportunity.data.opportunityList),v(a=>a.opportunity.data.IsDetailsOpen),j.useState("Activity"),e.jsx(e.Fragment,{children:e.jsx(k,{className:"h-full py-4 bg-transparent",bodyClass:"h-full",children:e.jsx(k,{className:"p-4 flex flex-col items-center justify-center h-96",children:e.jsx("h1",{className:"text-3xl font-sans text-custom-600 dark:text-custom-100 bg-transparent",children:"Coming Soon..."})})})})),is={edit:!0,delete:!0},ns=({files:a,fetchData:o,opportunityId:d,setType:n,setSelectedFile:p,setDrawerOpen:l})=>{const[y,C]=j.useState(!1);j.useState(null);const[g,c]=j.useState(!1),[b,m]=j.useState(""),x=t=>{},u=(t,h)=>{console.log(t,h),M.view,h===M.edit&&(l(!0),n("Edit"),p(t)),h===M.delete&&(m(t==null?void 0:t.fileId),c(!0))},i=async t=>{const h=await wt(d,t),w=h.headers["content-type"],f=new Blob([h.data],{type:w}),D=URL.createObjectURL(f);if(w.startsWith("image/")||w==="application/pdf")window.open(D,"_blank");else{const A=document.createElement("a");A.href=D,A.download=`file-${t}`,document.body.appendChild(A),A.click(),document.body.removeChild(A)}},s=()=>{m(null),c(!1)},r=async()=>{await Ct(d,b)&&N.push(e.jsx(S,{title:"Deleted",type:"success",duration:2500,children:"File Successfully Deleted"}),{placement:"top-center"}),o(),s()};return e.jsxs(z,{children:[(a==null?void 0:a.length)>0?a.map((t,h)=>e.jsxs(Ae,{expanded:y===t.fileName,onChange:()=>x(t.fileName),sx:{mb:1},children:[e.jsx(Ie,{"aria-controls":`${t.fileName}-content`,id:`${t.fileName}-header`,className:"dark:bg-[#292f3c] dark:text-white",children:e.jsxs(z,{display:"flex",flexDirection:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",width:"100%",gap:1,className:"dark:bg-[#292f3c] dark:text-white",children:[e.jsxs(z,{display:"flex",alignItems:"center",children:[e.jsx(It,{sx:{color:"var(--custom-600)"}}),e.jsx(P,{variant:"h6",sx:{ml:1},onClick:()=>i(t.fileId),children:t.fileName})]}),e.jsx(z,{mt:{xs:1,sm:0},children:e.jsx(K,{row:t,actions:is,buttonClick:u})})]})}),e.jsx(Oe,{className:"dark:bg-[#292f3c] dark:text-white"})]},h)):e.jsxs(e.Fragment,{children:[" ",e.jsx(Ot,{})," "]}),e.jsx(se,{isOpen:g,type:"danger",title:"Delete file",confirmButtonColor:"red-600",onClose:s,onRequestClose:s,onCancel:s,onConfirm:r,children:e.jsx("p",{children:"Are you sure you want to delete this File?"})})]})};$("opportunity",T);const ls=({opportunityId:a})=>{j.useState([]),j.useState({pageSize:"",pageIndex:""}),I(),H(),v(s=>s.opportunity.data.opportunityList),v(s=>s.opportunity.data.IsDetailsOpen);const[o,d]=j.useState(!1),[n,p]=j.useState("Add"),[l,y]=j.useState([]),[C,g]=j.useState(""),[c,b]=j.useState(null);j.useState("Activity");const m=()=>{p("Add"),d(!o)},x=async(s,r)=>{var t,h,w,f;try{const D=n==="Edit"?await St(a,c==null?void 0:c.fileId,s==null?void 0:s.fileName,(h=(t=s==null?void 0:s.files)==null?void 0:t[0])!=null&&h.isViewOnly||(w=s==null?void 0:s.files)==null?void 0:w[0]):await Dt(a,s==null?void 0:s.fileName,(f=s==null?void 0:s.files)==null?void 0:f[0]);D.success?(i(),N.push(e.jsx(S,{title:"Success",type:"success",duration:2500,children:`File ${n==="Edit"?"Updated":"Uploaded"} Successfully`}),{placement:"top-center"})):N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:D.message}),{placement:"top-center"})}catch(D){console.error("Failed to opportunity logs:",D),N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:"Something went Wrong"}),{placement:"top-center"})}r(!1),m()},u=()=>{console.log("Form canceled"),m()},i=j.useCallback(async s=>{var r;try{const t=await Nt(a,s);t!=null&&t.data&&y((r=t==null?void 0:t.data)==null?void 0:r.$values)}catch(t){y([]),console.error("Failed to opportunity logs:",t)}},[C]);return j.useEffect(()=>{i(C)},[i,a]),e.jsx(e.Fragment,{children:e.jsxs(k,{className:"h-full bg-transparent borderless",bodyClass:"h-full",children:[e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h4",{className:"text-lg py-3",children:" Files"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center gap-3",children:[e.jsx(F,{size:"sm",icon:e.jsx(J,{}),onClick:()=>d(!0),children:"Add File"}),e.jsx(B,{title:`${n} File`,isOpen:o,onClose:()=>m(),portalClassName:"w30",children:e.jsx(Rt,{footerWidth:"w30",initialData:n==="Add"?{files:[],fileName:""}:{files:[{name:c==null?void 0:c.fileName,type:"applicatiojjn/zip",size:26775,isViewOnly:!0}],fileName:c==null?void 0:c.fileName},onSubmit:x,onCancel:u})})]})]}),e.jsx(E,{className:"max-w-md md:w-52 md:mb-0 mb-4 mb-2",size:"sm",placeholder:"Search Files",prefix:e.jsx(Xe,{className:"text-lg"}),onChange:s=>g(s.target.value),value:C}),e.jsx(ns,{files:l,fetchData:i,opportunityId:a,setType:p,setSelectedFile:b,setDrawerOpen:d})]})})};$("opportunity",T);const rs=()=>(j.useState([]),I(),H(),v(a=>a.opportunity.data.IsDrawerOpen),v(a=>a.opportunity.data.opportunityList),v(a=>a.opportunity.data.IsDetailsOpen),j.useState("Activity"),e.jsx(e.Fragment,{children:e.jsx(k,{className:"h-full py-4 bg-transparent borderless",bodyClass:"h-full",children:e.jsx(k,{className:"p-4 flex flex-col items-center justify-center h-96",children:e.jsx("h1",{className:"text-3xl font-sans text-custom-600 dark:text-custom-100 bg-transparent",children:"Coming Soon..."})})})}));var ye={},os=G;Object.defineProperty(ye,"__esModule",{value:!0});var Le=ye.default=void 0,cs=os(ae()),ds=e;Le=ye.default=(0,cs.default)((0,ds.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");var be={},ps=G;Object.defineProperty(be,"__esModule",{value:!0});var qe=be.default=void 0,us=ps(ae()),ms=e;qe=be.default=(0,us.default)((0,ms.jsx)("path",{d:"M19 3H4.99C3.89 3 3 3.9 3 5l.01 14c0 1.1.89 2 1.99 2h10l6-6V5c0-1.1-.9-2-2-2M7 8h10v2H7zm5 6H7v-2h5zm2 5.5V14h5.5z"}),"StickyNote2");var we={},hs=G;Object.defineProperty(we,"__esModule",{value:!0});var Pe=we.default=void 0,xs=hs(ae()),fs=e;Pe=we.default=(0,xs.default)((0,fs.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 4-8 5-8-5V6l8 5 8-5z"}),"Email");var Ce={},js=G;Object.defineProperty(Ce,"__esModule",{value:!0});var _e=Ce.default=void 0,gs=js(ae()),ys=e;_e=Ce.default=(0,gs.default)((0,ys.jsx)("path",{d:"M20.01 15.38c-1.23 0-2.42-.2-3.53-.56-.35-.12-.74-.03-1.01.24l-1.57 1.97c-2.83-1.35-5.48-3.9-6.89-6.83l1.95-1.66c.27-.28.35-.67.24-1.02-.37-1.11-.56-2.3-.56-3.53 0-.54-.45-.99-.99-.99H4.19C3.65 3 3 3.24 3 3.99 3 13.28 10.73 21 20.01 21c.71 0 .99-.63.99-1.18v-3.45c0-.54-.45-.99-.99-.99"}),"Call");const bs=a=>({Note:e.jsx(qe,{color:"primary",sx:{color:"var(--custom-600)"}}),Email:e.jsx(Pe,{sx:{color:"var(--custom-600)"}}),Call:e.jsx(_e,{sx:{color:"var(--custom-600)"}})})[a]||null,ws=({allActivities:a})=>{const[o,d]=j.useState(!1);j.useState(null),j.useState(0);const n=p=>{d(o===p?!1:p)};return e.jsx(z,{children:(a==null?void 0:a.length)>0?a==null?void 0:a.map((p,l)=>e.jsxs(Ae,{expanded:o===p.id,onChange:()=>n(p.id),sx:{mb:1,border:"1px solid #e0e0e0",borderRadius:"8px"},children:[e.jsxs(Ie,{"aria-controls":`${p.type}-content`,id:`${p.type}-header`,className:"dark:bg-[#292f3c] dark:text-white",children:[e.jsx(Le,{sx:{mr:2}}),e.jsxs(z,{display:"flex",flexDirection:{xs:"column",sm:"row"},alignItems:{xs:"flex-start",sm:"center"},justifyContent:"space-between",width:"100%",gap:1,className:"dark:bg-[#292f3c] dark:text-white",children:[e.jsxs(z,{display:"flex",alignItems:"center",flex:"1",children:[bs(p.activityType),e.jsxs(P,{sx:{ml:1,fontWeight:"bold"},className:"flex-1",children:[p.activityType,e.jsxs("span",{style:{fontWeight:"normal"},children:[" ",`${p==null?void 0:p.operation} By `]}),p.modifiedBy]})]}),e.jsx(P,{variant:"body2",color:"textSecondary",className:"dark:bg-[#292f3c] dark:text-white",children:p!=null&&p.modifiedDate?Re(p==null?void 0:p.modifiedDate).locale(navigator.language).format("MM-DD-YYYY HH:mm:ss"):""})]})]}),e.jsx(Oe,{className:"dark:bg-[#292f3c] dark:text-white",children:e.jsx(P,{color:"textSecondary",className:"dark:text-white",children:p.activityTypeTitle})})]},l)):e.jsx(e.Fragment,{children:"No Records Found"})})},Cs={All:"","Past 24hr":"last_day","This week":"last_week","This Month":"last_month","Last 3 months":"last_3_months","Last 6 months":"last_6_months"},ve={"Newest first":"newestFirst",Date:"date",Closet:"closet"},Ns=({onFilterApply:a,selectedActivityTypes:o,setSelectedActivityTypes:d,selectedDateRange:n,setSelectedDateRange:p,selectedSortOptions:l,setSelectedSortOptions:y})=>{const C=(m,x)=>{x&&d(x)},g=(m,x)=>{x&&p(x)},c={px:3,py:1,fontSize:"0.875rem",border:"1px solid #ccc","&:not(:first-of-type)":{borderLeft:"1px solid #ccc"},"&.Mui-selected":{backgroundColor:"white",color:"#F25A43",border:"1px solid #F25A43"}},b=(m,x,u)=>{x.target.checked?y(i=>[...i,u]):y(i=>i.filter(s=>s!==u))};return e.jsxs(e.Fragment,{children:[e.jsx(P,{variant:"subtitle1",sx:{mb:1},children:"Sort By"}),e.jsx(z,{children:["Newest first","Date","Closet"].map(m=>e.jsxs(z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[e.jsx(P,{children:m}),e.jsx(Je,{control:e.jsx(et,{}),checked:l.includes(ve[m]),onChange:(x,u)=>b(x,u,ve[m]),label:"",labelPlacement:"end",sx:{marginRight:0}})]},m))}),e.jsx(P,{variant:"subtitle1",sx:{mt:2,mb:1},children:"Activity Type"}),e.jsx(Se,{value:o,onChange:C,"aria-label":"Activity Type",sx:{flexWrap:"wrap",gap:1},children:["Note","Email","Call","Task","Estimate","Files"].map(m=>e.jsx(De,{value:m,sx:c,className:"dark:text-white",children:m},m))}),e.jsx(P,{variant:"subtitle1",sx:{mt:2,mb:1},children:"Date"}),e.jsx(Se,{value:n,onChange:g,exclusive:!0,"aria-label":"Date Range",sx:{flexWrap:"wrap",gap:1},children:["All","Past 24hr","This week","This Month","Last 3 months","Last 6 months"].map(m=>e.jsx(De,{value:Cs[m],sx:c,className:"dark:text-white",children:m},m))})]})};var Ne={},Ss=G;Object.defineProperty(Ne,"__esModule",{value:!0});var Be=Ne.default=void 0,Ds=Ss(ae()),vs=e;Be=Ne.default=(0,Ds.default)((0,vs.jsx)("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterListOutlined");$("opportunity",T);const ks=({opportunityId:a})=>{j.useState([]),I(),H();const{result:o,stageData:d}=v(r=>r.opportunity.data.opportunityDetails||{});v(r=>r.opportunity.data.IsDetailsOpen);const[n,p]=j.useState(!1),[l,y]=j.useState([]),[C,g]=j.useState([]),[c,b]=j.useState(""),[m,x]=j.useState([]);j.useState("Activity");const u=()=>{p(!n)},i=()=>{s(C,m,c),u()},s=j.useCallback(async(r,t,h)=>{var w;try{const f=await vt(a,{activityType:r,operation:"",sortBy:t,duration:h});f!=null&&f.data&&y((w=f==null?void 0:f.data)==null?void 0:w.$values)}catch(f){y([]),console.error("Failed to opportunity logs:",f)}},[]);return j.useEffect(()=>{s(C,m,c)},[s,a,o]),e.jsx(e.Fragment,{children:e.jsxs(k,{className:"h-full bg-transparent borderless",bodyClass:"h-full",children:[e.jsxs("div",{className:"lg:flex items-center justify-between",children:[e.jsx("h4",{className:"text-lg py-3",children:" Activity"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx(F,{block:!0,variant:"plain",size:"sm",icon:e.jsx(Be,{}),onClick:()=>p(!0)}),e.jsx(B,{title:"Filters",isOpen:n,onClose:()=>u(),onRequestClose:()=>u(),portalClassName:"w30",footerClass:"flex",footer:e.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(F,{variant:"default",size:"md",onClick:u,children:"Cancel"}),e.jsx(F,{variant:"solid",size:"md",onClick:i,children:"Apply"})]}),children:e.jsx(Ns,{onFilterApply:i,selectedActivityTypes:C,setSelectedActivityTypes:g,selectedDateRange:c,setSelectedDateRange:b,selectedSortOptions:m,setSelectedSortOptions:x})})]})]}),e.jsx(ws,{allActivities:l})]})})},{TabNav:U,TabList:Fs,TabContent:q}=ge,As=({currentTab:a,setCurrentTab:o,opportunityId:d})=>e.jsxs(ge,{className:"opportunity-tabs",variant:"pill",value:a,onChange:o,children:[e.jsx(ge,{className:"opportunity-tabs",variant:"pill",value:a,onChange:o,children:e.jsx(k,{className:"p-2 my-2",children:e.jsxs(Fs,{className:"flex flex-col sm:flex-row flex-wrap gap-2",children:[e.jsx(U,{icon:e.jsx(tt,{}),className:"w-full sm:w-auto text-center",value:"Activity",children:"Activity"}),e.jsx(U,{icon:e.jsx(st,{}),className:"w-full sm:w-auto text-center",value:"Notes",children:"Notes"}),e.jsx(U,{icon:e.jsx(at,{}),className:"w-full sm:w-auto text-center",value:"Email",children:"Emails"}),e.jsx(U,{icon:e.jsx(it,{}),className:"w-full sm:w-auto text-center",value:"Calls",children:"Calls"}),e.jsx(U,{icon:e.jsx(nt,{}),className:"w-full sm:w-auto text-center",value:"Task",children:"Tasks"}),e.jsx(U,{icon:e.jsx(lt,{}),className:"w-full sm:w-auto text-center",value:"Files",children:"Files"})]})})}),e.jsx(k,{className:"my-2",children:e.jsxs("div",{className:"p-3",children:[e.jsx(q,{value:"Activity",children:e.jsx(ks,{opportunityId:d})}),e.jsx(q,{value:"Notes",children:e.jsx(Vt,{opportunityId:d})}),e.jsx(q,{value:"Email",children:e.jsx(Yt,{opportunityId:d})}),e.jsx(q,{value:"Calls",children:e.jsx(ss,{opportunityId:d})}),e.jsx(q,{value:"Task",children:e.jsx(Kt,{opportunityId:d})}),e.jsx(q,{value:"Estimates",children:e.jsx(as,{})}),e.jsx(q,{value:"Files",children:e.jsx(ls,{opportunityId:d})}),e.jsx(q,{value:"Details",children:e.jsx(rs,{})})]})})]}),Is=a=>{I();const{touched:o,errors:d,type:n}=a,[p,l]=j.useState([]),y=j.useCallback(async()=>{var C,g;try{const c=await ze();c!=null&&c.data&&l((g=c==null?void 0:c.data)==null?void 0:g.$values.slice((C=c==null?void 0:c.data)==null?void 0:C.$values.findIndex(b=>b.conversion===!0)))}catch{l([])}},[]);return j.useEffect(()=>{y()},[y]),e.jsxs(k,{className:"mb-4",children:[e.jsx(O,{asterisk:!0,label:"Opportunity Stage",invalid:d.opportunityStatus&&o.opportunityStatus,errorMessage:d.opportunityStatus,children:e.jsx(R,{name:"opportunityStatus",children:({field:C,form:g})=>e.jsx(rt,{field:C,form:g,options:p.map(c=>({label:c.stageName,value:c.id})),name:"opportunityStatus",onChange:c=>{g.setFieldValue(C.name,c)}})})}),e.jsx(O,{label:"Notes",invalid:d.notes&&o.notes,errorMessage:d.notes,children:e.jsx(R,{type:"text",autoComplete:"off",name:"notes",placeholder:"Notes",component:E,textArea:!0})})]})},{useUniqueId:Os}=$t,ke=W().shape({opportunityStatus:W().required("Status Required"),notes:_()}),Ve=j.forwardRef((a,o)=>{const{type:d,footerWidth:n,initialData:p={id:"",opportunityStatus:"",notes:""},onFormSubmit:l,onDiscard:y,onDelete:C}=a,g=Os("OpportunityStatus-");return e.jsx(e.Fragment,{children:e.jsx(X,{innerRef:o,initialValues:{...p},validationSchema:ke,onSubmit:(c,{setSubmitting:b})=>{const m=c;console.log("formsubmit",m),d==="new"&&(m.id=g),l==null||l(m,b)},children:({values:c,touched:b,errors:m,isSubmitting:x})=>e.jsx(ee,{children:e.jsxs(Z,{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(Is,{type:d,touched:b,errors:m})})}),e.jsx(te,{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(F,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>y==null?void 0:y(),children:"Discard"}),e.jsx(F,{size:"sm",variant:"solid",loading:x,icon:e.jsx(Tt,{}),type:"submit",children:"Save"})]})})]})})})})});Ve.displayName="OpportunityStatusForm";$("opportunity",T);const Rs=()=>{var h,w;let{id:a}=Ke();const o=H();L();const d=I();j.useState(0);const{result:n,stageData:p}=v(f=>f.opportunity.data.opportunityDetails||{}),[l,y]=j.useState(""),[C,g]=j.useState(!1),[c,b]=j.useState("Activity"),m=()=>{o("/modules/opportunities")};j.useEffect(()=>{a&&(d(Q(a)),y(a))},[a]);const x=()=>{d(Q(l))},u=(f,D)=>{if((p==null?void 0:p.id)!==f.id)if(f!=null&&f.conversion)s();else{const A={OpportunityStageId:f.id};i(A).then(Y=>{Y.success&&(N.push(e.jsx(S,{title:"Success",type:"success",duration:2500,children:"Opportunity status successfully updated"}),{placement:"top-center"}),x())}).catch(Y=>{var Ue=Y.response.data;N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:Ue.message}),{placement:"top-center"})})}},i=async f=>await kt(l,f),s=()=>{g(!0)},r=()=>{g(!1)},t=async f=>{const D={OpportunityStageId:f.opportunityStatus.value};i(D).then(A=>{A.success&&(N.push(e.jsx(S,{title:"Success",type:"success",duration:2500,children:"Opportunity status successfully updated"}),{placement:"top-center"}),x(),r())}).catch(A=>{var Y=A.response.data;N.push(e.jsx(S,{title:"Error",type:"danger",duration:2500,children:Y.message}),{placement:"top-center"})})};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"topbar py-4 px-6 border-gray-200 border-b dark:bg-[#292f3c] dark:text-white",children:e.jsx("div",{className:"lg:flex items-center justify-between mb-4 lg:mb-0",children:e.jsxs("h3",{className:"flex items-center mb-4 lg:mb-0",children:[e.jsx(Ze,{onClick:m})," Opportunity Details"]})})}),e.jsxs(k,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:[e.jsxs(k,{className:"p-4",children:[e.jsx("div",{className:"w-full pb-4",children:e.jsx("h3",{className:"text-lg",children:n==null?void 0:n.opportunityName})}),e.jsxs("div",{className:"flex flex-col md:flex-row md:justify-between pb-4 border-b border-gray-200",children:[e.jsx("div",{className:"w-full flex md:flex-1 pt-4 flex justify-center md:justify-start md:space-betweent",children:e.jsxs("div",{className:"flex flex-col md:flex-row gap-4 text-center md:text-left w-full md:gap-8",children:[e.jsxs("div",{className:"w-full md:w-1/2",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Account:"})," ",(h=n==null?void 0:n.account)==null?void 0:h.accountName]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Contact Name:"})," ",(w=n==null?void 0:n.contact)==null?void 0:w.contactName]})]}),e.jsxs("div",{className:"w-full md:w-1/2",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Service Type:"})," ",n==null?void 0:n.serviceType]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Industry:"})," ",n==null?void 0:n.industry]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Product:"})," ",n==null?void 0:n.product]})]})]})}),e.jsx("div",{className:"w-full md:flex-1 mt-5 md:mt-0 flex justify-center md:justify-between",children:e.jsx("div",{className:"w-[400px] md:w-full",children:e.jsx(qt,{activeStep:p==null?void 0:p.id,oppId:l,handleChange:u})})}),e.jsx("div",{className:"w-full md:w-auto mt-5 md:mt-0 pl-[calc(50%-42.5px)] md:pl-0",children:e.jsx(At,{variant:"circle",percent:(n==null?void 0:n.confidencePercentage)||0,width:85})})]}),e.jsx("div",{className:"flex justify-center lg:justify-start",children:e.jsx("div",{className:"flex pt-4 pb-2 flex-col lg:flex-row items-center lg:items-start gap-8 w-full lg:w-auto",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:flex-wrap gap-4 sm:gap-8 justify-center",children:[e.jsx(me,{title:"Start Date",value:n!=null&&n.startDate?Re(n==null?void 0:n.startDate).format("DD MMM, YYYY"):"--"}),e.jsx(me,{title:"Annual Revenue",value:n!=null&&n.estAnnualRevenue?`$${n==null?void 0:n.estAnnualRevenue.toLocaleString()}`:"--"}),e.jsx(me,{title:"Potential Revenue",value:n!=null&&n.potential?`$${n==null?void 0:n.potential.toLocaleString()}`:"--"})]})})}),e.jsx(B,{title:"Opportunity Stage",isOpen:C,onClose:r,onRequestClose:r,portalClassName:"w30",children:e.jsx(Ve,{footerWidth:"w30",type:"new",onFormSubmit:t,onDiscard:r})})]}),l!=""&&e.jsx(As,{currentTab:c,setCurrentTab:b,opportunityId:l})]})]})},ga=Et(Rs,"Opportunities");export{ga as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor-mui-69397583.js";import{r as l}from"./vendor-react-ece1c85f.js";import{h as k}from"./vendor-charts-eccea5d1.js";import"./Alert-7dfbd254.js";import{eb as L,a5 as A,ec as Q,t as B,Z as E}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{h as q}from"./index-bea4c3dc.js";import{u as F,G as R,M as $}from"./esm-f306d015.js";import{u as V}from"./vendor-i18n-2fcb1983.js";import{C as W}from"./tableV3-3d2f4952.js";const ne=()=>e.jsxs(e.Fragment,{children:[e.jsx("style",{}),e.jsxs("svg",{viewBox:"0 0 11.054 6.629",width:"1em",height:"1em",fill:"#ff0000",children:[e.jsx("path",{d:"M10.461.206H2.37v1.11c0,.605-.495,1.101-1.101,1.101h-.666v3.619c0,.327.265.593.593.593h9.265c.327,0,.593-.265.593-.593V.799c0-.327-.265-.593-.593-.593Z",style:{fill:"#cdcdcd",opacity:".12"}}),e.jsx("rect",{x:"9.23",y:".771",width:".385",height:".305",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"8.791",y:".771",width:".385",height:".305",style:{fill:"#727272"}}),e.jsx("rect",{x:"9.684",y:".771",width:".385",height:".305",style:{fill:"#727272"}}),e.jsx("rect",{x:"10.131",y:".771",width:".385",height:".305",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"2.794",y:".547",width:"1.134",height:".656",style:{fill:"#727272"}}),e.jsx("rect",{x:"2.794",y:"1.441",width:"4.424",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"7.441",y:"1.441",width:"3.075",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"2.794",y:"2.165",width:"4.424",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"7.441",y:"2.165",width:"3.075",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"2.794",y:"2.889",width:"4.424",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"7.441",y:"2.889",width:"3.075",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"2.794",y:"3.613",width:"4.424",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"7.441",y:"3.613",width:"3.075",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"2.794",y:"4.437",width:"4.424",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"7.441",y:"4.437",width:"3.075",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"2.794",y:"5.161",width:"4.424",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"7.441",y:"5.161",width:"3.075",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("path",{d:"M.38.256C.548.122.748.029.964.006c.868-.091,1.483.838,1.052,1.603-.411.731-1.476.722-1.88-.012C.063,1.466-.009,1.238,0,1.088c.008-.119.144-.111.157-.021.01.076.007.145.026.225.085.369.406.653.78.7.703.088,1.241-.623.962-1.277C1.686.154.967-.023.495.366l.146.011c.08.035.068.142-.021.15-.077.007-.238.007-.315,0-.052-.005-.076-.031-.082-.083l.009-.335c.015-.048.074-.062.116-.04.008.004.033.032.033.038v.147Z",style:{fill:"#727272"}}),e.jsx("path",{d:"M1.059.466c.015-.068.142-.08.157.015-.015.225.021.479,0,.701-.005.053-.028.083-.082.089-.084.009-.37.011-.449-.002-.058-.01-.088-.067-.058-.119.005-.009.035-.036.042-.036h.39V.466Z",style:{fill:"#727272"}})]})]}),oe=()=>e.jsxs(e.Fragment,{children:[e.jsx("style",{}),e.jsxs("svg",{viewBox:"0 0 11.137 5.585",width:"1em",height:"1em",fill:"#ff0000",children:[e.jsx("path",{d:"M10.544.122H2.456v1.109c0,.605-.495,1.1-1.1,1.1h-.665v2.661c0,.327.265.593.593.593h9.261c.327,0,.593-.265.593-.593V.715c0-.327-.265-.593-.593-.593Z",style:{fill:"#cdcdcd",opacity:".32"}}),e.jsx("rect",{x:"2.88",y:".462",width:"1.134",height:".656",style:{fill:"#727272"}}),e.jsx("rect",{x:"2.88",y:"2.08",width:"4.422",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"7.525",y:"2.08",width:"3.073",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"2.88",y:"2.803",width:"4.422",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"7.525",y:"2.803",width:"3.073",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"2.88",y:"3.587",width:"4.422",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"7.525",y:"3.587",width:"3.073",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"2.88",y:"4.31",width:"4.422",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"7.525",y:"4.31",width:"3.073",height:".481",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"0",y:"0",width:"2.034",height:"2.034",rx:".975",ry:".975",style:{fill:"#727272"}}),e.jsx("path",{d:"M.828.418h.378l-.044.741h-.286l-.048-.741ZM1.019,1.24c.103,0,.187.087.187.189,0,.101-.085.187-.187.187s-.187-.087-.187-.187c0-.103.085-.189.187-.189Z",style:{fill:"#fff"}})]})]}),ae=()=>e.jsxs(e.Fragment,{children:[e.jsx("style",{}),e.jsxs("svg",{viewBox:"0 0 65 65",width:"1em",height:"1em",fill:"#ff0000",children:[e.jsx("rect",{x:"15.8",y:"19.3",width:"7.6",height:"28.7",style:{fill:"#2d2d2d"}}),e.jsx("rect",{x:"26.1",y:"24.6",width:"7.6",height:"23.5",style:{fill:"#6d6d6d",opacity:".1"}}),e.jsx("rect",{x:"36.5",y:"19.3",width:"7.6",height:"28.7",style:{fill:"#2d2d2d"}}),e.jsx("rect",{x:"46.8",y:"29.1",width:"7.6",height:"18.9",style:{fill:"#6d6d6d",opacity:".1"}}),e.jsx("polygon",{points:"8.7 55.3 8.7 5.4 6.9 5.4 6.9 55.3 6.9 57.1 8.7 57.1 58.5 57.1 58.5 55.3 8.7 55.3",style:{fill:"#f15a22",opacity:".1"}})]})]}),de=()=>e.jsxs(e.Fragment,{children:[e.jsx("style",{}),e.jsxs("svg",{viewBox:"0 0 11.181 5.888",width:"1em",height:"1em",fill:"#ff0000",children:[e.jsx("rect",{x:"0",y:"0",width:"11.181",height:"5.888",rx:".927",ry:".927",style:{fill:"#cdcdcd",opacity:".32"}}),e.jsx("rect",{x:"3.842",y:"1.843",width:"1.709",height:".79",style:{fill:"#727272"}}),e.jsx("rect",{x:"3.842",y:"3.107",width:"6.666",height:".723",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:"3.842",y:"4.022",width:"3.863",height:".723",style:{fill:"#cdcdcd"}}),e.jsx("rect",{x:".391",y:"1.639",width:"2.942",height:"2.942",rx:"1.433",ry:"1.433",style:{fill:"#727272"}})]})]}),ve=()=>e.jsxs(e.Fragment,{children:[e.jsx("style",{}),e.jsxs("svg",{fill:"#ff0000",width:"1em",height:"1em",viewBox:"0 0 10.982 6.612",children:[e.jsx("path",{d:"M2.807.09S-.121,4.166.004,4.119s2.308-.03,2.308-.03L5.036,0l-2.229.09Z",style:{fill:"#f2f2f2",opacity:".1"}}),e.jsx("polygon",{points:"4.111 5.209 2.312 4.088 5.036 0 6.827 1.087 4.111 5.209",style:{fill:"#a5a5a5"}}),e.jsx("polygon",{points:"9.086 1.13 6.505 5.415 4.111 5.209 6.827 1.087 9.086 1.13",style:{fill:"#f2f2f2",opacity:".1"}}),e.jsx("polygon",{points:"8.18 6.321 6.505 5.415 9.086 1.13 10.982 2.29 8.18 6.321",style:{fill:"#a5a5a5"}}),e.jsx("path",{d:"M6.03,1.094c.836-.078,1.66.493,1.858,1.311.174.716-.18,1.525-.481,2.169-.329.704-.763,1.393-1.195,2.037-.06.015-.098-.068-.129-.104-.52-.601-1.593-2.758-1.643-3.534-.062-.959.63-1.788,1.589-1.878ZM7.386,2.841c0-.662-.537-1.199-1.199-1.199s-1.199.537-1.199,1.199.537,1.199,1.199,1.199,1.199-.537,1.199-1.199Z",style:{fill:"#111"}})]})]}),xe=()=>e.jsxs(e.Fragment,{children:[e.jsx("style",{}),e.jsx("svg",{viewBox:"0 0 493.78 334.31",width:"1em",height:"1em",fill:"currentColor",children:e.jsx("path",{d:"M487.32,0H6.46C2.89,0,0,2.89,0,6.46v48.25h493.78V6.46c0-3.57-2.89-6.46-6.46-6.46ZM110.01,39.23H32.52v-16.68h77.5v16.68ZM388.63,39.23h-22.99v-16.68h22.99v16.68ZM414.86,39.23h-22.99v-16.68h22.99v16.68ZM442,39.23h-22.99v-16.68h22.99v16.68ZM468.69,39.23h-22.99v-16.68h22.99v16.68ZM0,280.87h493.78V60.14H0v220.73ZM389.71,80.17h78.98v15.43h-78.98v-15.43ZM389.71,98.78h78.98v15.43h-78.98v-15.43ZM389.71,117.4h78.98v15.43h-78.98v-15.43ZM389.71,136.01h78.98v15.43h-78.98v-15.43ZM389.71,154.62h78.98v15.43h-78.98v-15.43ZM389.71,173.23h78.98v15.43h-78.98v-15.43ZM389.71,191.85h78.98v15.43h-78.98v-15.43ZM389.71,210.46h78.98v15.43h-78.98v-15.43ZM389.71,229.07h78.98v15.43h-78.98v-15.43ZM389.71,247.68h78.98v15.43h-78.98v-15.43ZM306.96,80.17h78.98v15.43h-78.98v-15.43ZM306.96,98.78h78.98v15.43h-78.98v-15.43ZM306.96,117.4h78.98v15.43h-78.98v-15.43ZM306.96,136.01h78.98v15.43h-78.98v-15.43ZM306.96,154.62h78.98v15.43h-78.98v-15.43ZM306.96,173.23h78.98v15.43h-78.98v-15.43ZM306.96,191.85h78.98v15.43h-78.98v-15.43ZM306.96,210.46h78.98v15.43h-78.98v-15.43ZM306.96,229.07h78.98v15.43h-78.98v-15.43ZM306.96,247.68h78.98v15.43h-78.98v-15.43ZM222.6,80.17h78.98v15.43h-78.98v-15.43ZM222.6,98.78h78.98v15.43h-78.98v-15.43ZM222.6,117.4h78.98v15.43h-78.98v-15.43ZM222.6,136.01h78.98v15.43h-78.98v-15.43ZM222.6,154.62h78.98v15.43h-78.98v-15.43ZM222.6,173.23h78.98v15.43h-78.98v-15.43ZM222.6,191.85h78.98v15.43h-78.98v-15.43ZM222.6,210.46h78.98v15.43h-78.98v-15.43ZM222.6,229.07h78.98v15.43h-78.98v-15.43ZM222.6,247.68h78.98v15.43h-78.98v-15.43ZM139.33,80.17h78.98v15.43h-78.98v-15.43ZM139.33,98.78h78.98v15.43h-78.98v-15.43ZM139.33,117.4h78.98v15.43h-78.98v-15.43ZM139.33,136.01h78.98v15.43h-78.98v-15.43ZM139.33,154.62h78.98v15.43h-78.98v-15.43ZM139.33,173.23h78.98v15.43h-78.98v-15.43ZM139.33,191.85h78.98v15.43h-78.98v-15.43ZM139.33,210.46h78.98v15.43h-78.98v-15.43ZM139.33,229.07h78.98v15.43h-78.98v-15.43ZM139.33,247.68h78.98v15.43h-78.98v-15.43ZM56.59,80.17h78.98v15.43H56.59v-15.43ZM56.59,98.78h78.98v15.43H56.59v-15.43ZM56.59,117.4h78.98v15.43H56.59v-15.43ZM56.59,136.01h78.98v15.43H56.59v-15.43ZM56.59,154.62h78.98v15.43H56.59v-15.43ZM56.59,173.23h78.98v15.43H56.59v-15.43ZM56.59,191.85h78.98v15.43H56.59v-15.43ZM56.59,210.46h78.98v15.43H56.59v-15.43ZM56.59,229.07h78.98v15.43H56.59v-15.43ZM56.59,247.68h78.98v15.43H56.59v-15.43ZM32.52,80.17h20.5v15.43h-20.5v-15.43ZM32.52,98.78h20.5v15.43h-20.5v-15.43ZM32.52,117.4h20.5v15.43h-20.5v-15.43ZM32.52,136.01h20.5v15.43h-20.5v-15.43ZM32.52,154.62h20.5v15.43h-20.5v-15.43ZM32.52,173.23h20.5v15.43h-20.5v-15.43ZM32.52,191.85h20.5v15.43h-20.5v-15.43ZM32.52,210.46h20.5v15.43h-20.5v-15.43ZM32.52,229.07h20.5v15.43h-20.5v-15.43ZM32.52,247.68h20.5v15.43h-20.5v-15.43ZM0,327.85c0,3.57,2.89,6.46,6.46,6.46h480.85c3.57,0,6.46-2.89,6.46-6.46v-41.55H0v41.55ZM447.31,297.91h22.99v16.68h-22.99v-16.68ZM421.08,297.91h22.99v16.68h-22.99v-16.68ZM32.52,297.91h77.5v16.68H32.52v-16.68Z"})})]}),G=({user:s,action:r,timestamp:t})=>e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-center mb-2 gap-1",children:[e.jsx("span",{className:"font-semibold text-gray-800 text-sm sm:text-base",children:s}),e.jsx("span",{className:"text-xs sm:text-sm text-gray-500",children:t})]}),e.jsx("p",{className:"text-gray-700 text-sm sm:text-base",children:r})]}),me=()=>{const s=[{id:1,user:"John Doe",action:"Created a new post",timestamp:"2025-04-08 14:25:00"},{id:2,user:"Jane Smith",action:"Updated profile picture",timestamp:"2025-04-08 13:00:45"},{id:3,user:"Michael Lee",action:"Deleted a comment",timestamp:"2025-04-07 09:10:30"},{id:4,user:"Sarah Connor",action:"Logged in",timestamp:"2025-04-06 18:30:15"}];return e.jsx("div",{className:"bg-white",children:s.map(r=>e.jsx(G,{user:r.user,action:r.action,timestamp:r.timestamp},r.id))})};async function b(s){return(await L.executeSavedQuery(s)).data}async function ue(s){return(await L.saveWidgetQuery(s)).data}async function ye(s,r){return(await L.updateSavedQuery(s,r)).data}const fe=({widgetData:s})=>{var v,c,y,o;const r=(v=s==null?void 0:s.configuration)==null?void 0:v.sqlQuery,t=(s==null?void 0:s.configuration)||{},[h,i]=l.useState([]),[n,x]=l.useState([]),[m,a]=l.useState(!1),d=l.useCallback(async()=>{var p,M,f,Z;if(r)try{a(!0);const j=await b({sqlQuery:r,maxRows:50}),C=((p=j==null?void 0:j.data)==null?void 0:p.$values)||[],g=(M=t==null?void 0:t.xAxisCol)==null?void 0:M.value,H=(f=t==null?void 0:t.yAxisCol)==null?void 0:f.value;x(C.map(N=>N[g])),i([{name:((Z=s==null?void 0:s.configuration)==null?void 0:Z.name)||"Bar Data",data:C.map(N=>Number(N[H])||0)}])}catch(j){console.error("Failed to fetch bar chart data",j),x([]),i([])}finally{a(!1)}},[r]);l.useEffect(()=>{d()},[d]);const u={chart:{type:"bar",height:350,toolbar:{show:!1}},plotOptions:{bar:{columnWidth:"55%",borderRadius:4}},dataLabels:{enabled:!1},xaxis:{categories:n,title:{text:((c=t==null?void 0:t.xAxisCol)==null?void 0:c.value)||"Label"}},yaxis:{title:{text:((y=t==null?void 0:t.yAxisCol)==null?void 0:y.value)||"Value"}},title:{text:((o=s==null?void 0:s.configuration)==null?void 0:o.name)||"Bar Chart",align:"center"}};return m?e.jsx("div",{className:"p-4",children:"Loading..."}):e.jsx(k,{options:u,series:h,type:"bar",height:350})},z=({mode:s="icon",icon:r,imageUrl:t})=>{const h=q[r||""]||Q;return e.jsx(A,{size:55,className:"avatar-icon flex items-center justify-center text-orange-600 dark:text-orange-100 bg-transparent",icon:s==="image"&&t?e.jsx("img",{src:t,alt:"stat-icon",className:"w-6 h-6 object-contain"}):e.jsx(h,{})})},I=({count:s,label:r,widgetData:t})=>{var h,i,n;return e.jsx("div",{className:"transition-all cursor-pointer",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(z,{mode:(h=t==null?void 0:t.configuration)==null?void 0:h.mode,icon:(i=t==null?void 0:t.configuration)==null?void 0:i.icon,imageUrl:(n=t==null?void 0:t.configuration)==null?void 0:n.imageUrl}),e.jsx("div",{children:e.jsxs("div",{className:"flex gap-1.5 items-end mb-2",children:[e.jsx("h3",{className:"font-bold leading-none",children:s}),e.jsx("p",{className:"font-semibold",children:r})]})})]})})},pe=({widgetData:s})=>{var n;const[r,t]=l.useState(0),[h,i]=l.useState(!1);return l.useEffect(()=>{(async()=>{var m,a,d,u,v,c,y;if((m=s==null?void 0:s.configuration)!=null&&m.sqlQuery)try{i(!0);const o=await b({sqlQuery:s.configuration.sqlQuery,maxRows:1}),p=((y=(d=(a=o==null?void 0:o.data)==null?void 0:a.$values)==null?void 0:d[0])==null?void 0:y[(c=(v=(u=o==null?void 0:o.columns)==null?void 0:u.$values)==null?void 0:v[0])==null?void 0:c.name])??0;t(p)}catch(o){console.error("Count API failed",o)}finally{i(!1)}})()},[s]),e.jsx("div",{className:"space-y-4",children:e.jsx(I,{count:h?"—":r,label:(n=s==null?void 0:s.configuration)==null?void 0:n.name,widgetData:s})})},je=({widgetData:s})=>{var v,c;const r=(v=s==null?void 0:s.configuration)==null?void 0:v.sqlQuery,t=(s==null?void 0:s.configuration)||{},[h,i]=l.useState([]),[n,x]=l.useState([]),[m,a]=l.useState(!1),d=l.useCallback(async()=>{var y,o,p,M;if(r)try{a(!0);const f=await b({sqlQuery:r,maxRows:100}),Z=((y=f==null?void 0:f.data)==null?void 0:y.$values)||[],j=(o=t==null?void 0:t.xAxisCol)==null?void 0:o.value,C=(p=t==null?void 0:t.yAxisCol)==null?void 0:p.value;x(Z.map(g=>g[j])),i([{name:((M=s==null?void 0:s.configuration)==null?void 0:M.name)||"Line Data",data:Z.map(g=>Number(g[C]))}])}catch(f){console.error("Failed to fetch line chart data",f),x([]),i([])}finally{a(!1)}},[r]);l.useEffect(()=>{d()},[d]);const u={chart:{type:"line",height:350,toolbar:{show:!1}},stroke:{curve:"smooth",width:3},markers:{size:5},xaxis:{categories:n},yaxis:{title:{text:"Value"}},title:{text:((c=s==null?void 0:s.configuration)==null?void 0:c.name)||"Line Chart",align:"center"}};return m?e.jsx("div",{className:"p-4",children:"Loading..."}):e.jsx(k,{options:u,series:h,type:"line",height:350})},P={width:"100%",height:"400px"},w={lat:40.7128,lng:-74.006},Me=()=>{const{t:s,i18n:r}=V(),{isLoaded:t}=F({id:"google-map-wetrack",googleMapsApiKey:B.googleMapKey||"VITE_GOOGLE_MAPS_API_KEY_PLACEHOLDER"});return t&&e.jsx(R,{mapContainerStyle:P,center:w,zoom:12,children:e.jsx($,{position:w})},`map-${r.language}`)},S=({icon:s,title:r,message:t,bgColor:h})=>e.jsxs("div",{className:`w-full mt-6 p-4 ${h} text-white rounded-lg`,children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"w-6 h-6 mr-3",children:s}),e.jsx("span",{className:"font-semibold text-base sm:text-lg",children:r})]}),e.jsx("p",{className:"mt-2 text-sm sm:text-base",children:t})]}),Ze=()=>e.jsxs("div",{className:"px-4",children:[e.jsx(S,{title:"New Message",message:"You have received a new message from John Doe. Check your inbox for more details!",bgColor:"bg-blue-500",icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v3m0 0v3m0-3H9m3 0h3m-7 2a2 2 0 100 4 2 2 0 000-4zm4 0a2 2 0 100 4 2 2 0 000-4z"})})}),e.jsx(S,{title:"Warning!",message:"There is a potential issue with your recent submission. Please review it.",bgColor:"bg-orange-500",icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v3m0 0v3m0-3H9m3 0h3m-7 2a2 2 0 100 4 2 2 0 000-4zm4 0a2 2 0 100 4 2 2 0 000-4z"})})}),e.jsx(S,{title:"Error!",message:"There was an error while processing your request. Please try again later.",bgColor:"bg-red-500",icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M18 6L6 18M6 6l12 12"})})})]}),O=(s=[])=>s.map(r=>{const t=r.name.toLowerCase().includes("date");return{dataField:r.name,caption:r.name.replace(/([A-Z])/g," $1").trim(),width:220,cellRender:h=>{const i=h.value;if(!i)return e.jsx("div",{"data-cname":r.name});if(t){const n=E(i);return e.jsx("div",{"data-cname":r.name,children:n.isValid()?n.format("MM/DD/YYYY"):i})}return e.jsx("div",{"data-cname":r.name,children:i})}}}),ge=({widgetData:s})=>{var a;console.log("widgetData",s);const[r,t]=l.useState([]),[h,i]=l.useState([]),[n,x]=l.useState(!1),m=l.useCallback(async()=>{var d,u,v;if((d=s==null?void 0:s.configuration)!=null&&d.sqlQuery)try{x(!0);const c=await b({sqlQuery:s.configuration.sqlQuery,maxRows:100});t(((u=c==null?void 0:c.data)==null?void 0:u.$values)||[]),i(O(((v=c==null?void 0:c.columns)==null?void 0:v.$values)||[]))}catch(c){console.error("Failed to fetch opportunity status",c),t([]),i([])}finally{x(!1)}},[s]);return l.useEffect(()=>{m()},[m]),e.jsx(W,{tableName:((a=s==null?void 0:s.configuration)==null?void 0:a.name)||"Data Grid",className:"pt-2",dataSource:r,columns:h,height:"500px",keyExpr:"$id",stateStorageKey:"opportunities-status",openFilter:()=>{},isFilterReq:!0,isLoading:n})};export{me as A,fe as B,ae as C,je as L,Me as M,Ze as N,ge as O,xe as a,pe as b,de as c,ve as d,b as e,ne as f,oe as g,ue as s,ye as u};
@@ -1 +0,0 @@
1
- import{j as a}from"./vendor-mui-69397583.js";import{r as l}from"./vendor-react-ece1c85f.js";import{I,bV as N,bW as S,bX as k}from"./index-c62ac197.js";import{F as A}from"./index-42e65911.js";const z=({onVisibleChange:r,showPasswordStrength:o=!1,field:e,form:t,errors:p,touched:u,...v})=>{var h;const[m,i]=l.useState("password"),[c,w]=l.useState({minLength:!1,lowercase:!1,uppercase:!1,numbers:!1,specialChars:!1}),b=t.values[e.name],x=s=>{w({minLength:s.length>=8,lowercase:/[a-z]/.test(s),uppercase:/[A-Z]/.test(s),numbers:/[0-9]/.test(s),specialChars:/[!@#$%^&*(),.?":{}|<>]/.test(s)})},j=s=>{const n=s.target.value.trim();t.setFieldValue(e.name,n),x(n)},g=l.useMemo(()=>Object.values(c).every(Boolean),[c]),y=s=>{s.preventDefault();const n=m==="password"?"text":"password";i(n),r==null||r(n==="text")};l.useEffect(()=>{o&&x((t==null?void 0:t.values[e==null?void 0:e.name])||"")},[t==null?void 0:t.values[e==null?void 0:e.name],o]);const P=s=>s?"text-teal-500":"text-red-500",C=s=>s?a.jsx(k,{className:"mr-2"}):a.jsx(A,{className:"mr-2"});return a.jsxs("div",{className:"relative",children:[a.jsx(I,{...v,type:m,autoComplete:"on",value:b,onChange:j,invalid:(p==null?void 0:p[e==null?void 0:e.name])&&(u==null?void 0:u[e==null?void 0:e.name]),suffix:a.jsx("span",{className:"cursor-pointer text-xl",onClick:y,children:m==="password"?a.jsx(N,{}):a.jsx(S,{})})}),o&&!g&&((h=t==null?void 0:t.values[e==null?void 0:e.name])==null?void 0:h.length)>0&&a.jsx("div",{className:"absolute left-0 mt-2 w-full bg-white border border-gray-300 rounded-lg shadow-lg p-2 z-10",children:[{condition:c.minLength,label:"Minimum length of 8 characters"},{condition:c.lowercase,label:"At least one lowercase letter"},{condition:c.uppercase,label:"At least one uppercase letter"},{condition:c.numbers,label:"At least one number"},{condition:c.specialChars,label:"At least one special character"}].map(({condition:s,label:n})=>a.jsx("div",{children:a.jsxs("span",{className:`text-sm flex items-center ${P(s)}`,children:[C(s),n]})},n))})]})};export{z as P};
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor-mui-69397583.js";import{a as w,F as v,I as d,ai as y,cd as A,cM as D,a5 as S,c_ as U,B as f,ej as P,O as R,Q as C}from"./index-c62ac197.js";import{U as E}from"./Upload-fb34ce03.js";import{S as I}from"./Switcher-c8648037.js";import{F as $}from"./FormContainer-91c2b0e4.js";import{F as q,a as c,u as O,e as Q,b as k}from"./index-51ee35f9.js";import{c as G,a as m,h as L,e as T,F as z,b as V,d as u}from"./index.esm-70ab539c.js";import{r as B}from"./vendor-react-ece1c85f.js";import{Q as Z}from"./index-0ec48d3d.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"./PreferenceService-75bf9db6.js";const J=i=>{let{value:a}=i.target;a=a.replace(/\D/g,"");var n=a.length;n>0&&(a="("+a),n>3&&(a=a.slice(0,4)+") "+a.slice(4,11)),n>6&&(a=a.slice(0,9)+"-"+a.slice(9)),i.target.value=a},M=G().shape({name:m().min(3,"Too Short!").max(40,"Too Long!").required("User Name Required"),email:m().matches(/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,}$/,"Invalid email").required("Email Required"),title:m(),avatar:L(),lang:m(),timeZone:m(),syncData:T(),phoneNo:m().required("Phone No Required").matches(/^[0-9()\-\s]+$/,"Phone must only contain numbers, parentheses, dashes, and spaces").test("is-ten-digits","Please enter valid Phone No",i=>i?i.replace(/[()\-\s]/g,"").length===10:!0)}),me=()=>{const i=w(),a=v(s=>s.auth.user),[n,x]=B.useState(null),F={name:a.userName,email:a.email,title:"",avatar:a.avatar||"",timeZone:"",lang:"",syncData:!1,twoFactor:a.twoFactorEnabled||!1,twoFactorForAllUsers:a.twoFactorForAllUsers||!1,phoneNo:a.phone},j=(s,r,t)=>{t.length>0?(x(t[0]),s.setFieldValue(r.name,t[0])):(x(null),s.setFieldValue(r.name,null))},g=async(s,r)=>{var p,h,l;if(n){const o=await i(O({file:n}));s.avatar=o}a.twoFactorForAllUsers&&(localStorage.setItem("twoFactorEnabled",s.twoFactor.toString()),await Q(s.twoFactor??!1));const t=await k(s);if(t&&t.userDetails){localStorage.setItem("updatedUserDetails",JSON.stringify(t.userDetails)),i(P({...t==null?void 0:t.userDetails,userName:`${(p=t==null?void 0:t.userDetails)==null?void 0:p.firstName} ${(h=t==null?void 0:t.userDetails)==null?void 0:h.lastName}`,phone:(l=t==null?void 0:t.userDetails)==null?void 0:l.phoneNumber}));const o=localStorage.getItem("updatedUserDetails");o&&JSON.parse(o),R.push(e.jsx(C,{title:"Profile Updated",type:"success"}),{placement:"top-center"})}r(!1)};return e.jsx(z,{enableReinitialize:!0,initialValues:F,validationSchema:M,onSubmit:(s,{setSubmitting:r})=>{r(!0),setTimeout(()=>{g(s,r)},1e3)},children:({values:s,touched:r,errors:t,isSubmitting:p,resetForm:h})=>{const l={touched:r,errors:t};return e.jsx(V,{children:e.jsxs($,{children:[e.jsx(q,{title:"General",desc:"Basic info, like your name and address that will displayed in public"}),e.jsx(c,{name:"name",label:"Name",...l,children:e.jsx(u,{type:"text",autoComplete:"off",name:"name",placeholder:"Name",component:d,prefix:e.jsx(y,{className:"text-xl"})})}),e.jsx(c,{name:"email",label:"Email",...l,children:e.jsx(u,{disabled:!0,readOnly:!0,type:"email",autoComplete:"off",name:"email",placeholder:"Email",component:d,prefix:e.jsx(A,{className:"text-xl"})})}),e.jsx(c,{name:"phoneNo",label:"Phone Number",...l,children:e.jsx(u,{type:"text",autoComplete:"off",onInput:o=>{J(o)},name:"phoneNo",placeholder:"Phone No",component:d,prefix:e.jsx(D,{className:"text-xl"})})}),e.jsx(c,{name:"avatar",label:"Avatar",...l,children:e.jsx(u,{name:"avatar",children:({field:o,form:b})=>e.jsx(E,{className:"cursor-pointer",showList:!1,uploadLimit:1,aspectRatio:1,objectFit:"contain",onChange:N=>j(b,o,N),children:e.jsx(S,{className:"border-2 border-white dark:border-gray-800 shadow-lg",size:60,shape:"circle",icon:e.jsx(U,{}),src:o.value instanceof File?URL.createObjectURL(o.value):o.value})})})}),a.twoFactorForAllUsers&&e.jsx(c,{name:"twoFactor",label:"Two Factor Authentication",...l,border:!1,children:e.jsx(u,{name:"twoFactor",component:I})}),a.twoFactorEnabled&&e.jsx(c,{name:"AuthenticatorQr",label:"Authenticator Qr",...l,border:!1,children:e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[e.jsx(Z,{value:a.authenticatorUrl||""}),e.jsxs("p",{className:"text-sm text-gray-700 leading-relaxed pt-2 dark:text-gray-400",children:[e.jsx("span",{children:"Scan the QR code using Google or Microsoft Authenticator to set up 2FA."}),e.jsx("br",{}),e.jsx("span",{children:"If you choose to use the Authenticator app for 2FA, enter the OTP shown in the app each time you log in."}),e.jsx("br",{}),e.jsx("span",{children:"Get an authenticator app from the App Store or Google Play."})]})]})}),e.jsxs("div",{className:"mt-4 ltr:text-right",children:[e.jsx(f,{className:"ltr:mr-2 rtl:ml-2",type:"button",onClick:()=>h(),children:"Reset"}),e.jsx(f,{variant:"solid",loading:p,type:"submit",children:p?"Updating":"Update"})]})]})})}})};export{me as default};
@@ -1 +0,0 @@
1
- import{j as o}from"./vendor-mui-69397583.js";import{f as w,r as F}from"./vendor-react-ece1c85f.js";import{F as b,Y as A,l as C,E as I,c9 as m,O as f,Q as g}from"./index-c62ac197.js";import{D as k}from"./DoubleSidedImage-ae98733b.js";import{b as L,c as M,a as T}from"./vendor-redux-a1f00e6b.js";import{c as $,d as v,e as B}from"./RoleService-7008da2c.js";import{R as G}from"./RoleForm-cc251eba.js";const R="RoleEditState",c=L(R+"/getTRole",async t=>(await $(t.id)).data),O=async t=>(await v(t)).data,Q=async t=>(await B(t)).success,U={loading:!0,roleData:{id:"",role:"",description:""}},W=M({name:`${R}/state`,initialState:U,reducers:{},extraReducers:t=>{t.addCase(c.fulfilled,(s,i)=>{s.roleData=i.payload,s.loading=!1}).addCase(c.pending,s=>{s.loading=!0})}}),Y=W.reducer,_=T({data:Y}),h=b;A("RoleEditState",_);const q=t=>{const{roleId:s,onDrawerClose:i,footerWidth:x}=t,D=C(),d=w(),r=h(e=>{var n,a;return(a=(n=e.RoleEditState)==null?void 0:n.data)==null?void 0:a.roleData}),l=h(e=>{var n,a;return(a=(n=e.RoleEditState)==null?void 0:n.data)==null?void 0:a.loading}),S=e=>{D(c({id:e}))},y=async(e,n)=>{var u;n(!0);const a=await O({id:e.id??"",name:e.name??"",description:e.description});n(!1),a!=null&&a.success?p("updated"):N(((u=a==null?void 0:a.data)==null?void 0:u.message)||"Something went wrong"),t==null||t.fetchData(),i(null)},E=()=>{i()},j=async e=>{e(!1),await Q(s??"")&&(p("deleted"),i(null))},N=e=>{f.push(o.jsx(g,{title:"Failed",type:"danger",duration:2500,children:e}),{placement:"top-center"}),d("/app/settings/role")},p=e=>{f.push(o.jsxs(g,{title:"Success",type:"success",duration:2500,children:["Role Successfully ",e]}),{placement:"top-center"}),d("/app/settings/role")};return F.useEffect(()=>{S(s)},[s]),o.jsxs(o.Fragment,{children:[o.jsx(I,{loading:l,children:!m(r)&&o.jsx(o.Fragment,{children:o.jsx(G,{type:"edit",footerWidth:x,initialData:r,onFormSubmit:y,onDiscard:E,onDelete:j})})}),!l&&m(r)&&o.jsxs("div",{className:"h-full flex flex-col items-center justify-center",children:[o.jsx(k,{src:"/img/others/img-2.png",darkModeSrc:"/img/others/img-2-dark.png",alt:"No product found!"}),o.jsx("h3",{className:"mt-8",children:"No role found!"})]})]})},Z=q;export{Z as R,Q as d};
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor-mui-69397583.js";import{r as y}from"./vendor-react-ece1c85f.js";import{a as p,F as b}from"./FormContainer-91c2b0e4.js";import{I as u,B as d,al as w}from"./index-c62ac197.js";import{h as S}from"./index-36ba4ea7.js";import{S as A}from"./StickyFooter-5b934274.js";import{C as T}from"./ConfirmDialog-3202eb3d.js";import{d as x,a as I,c as k,F as v,b as D}from"./index.esm-70ab539c.js";import{A as E}from"./AdaptableCard-df7695d6.js";import{a as F}from"./index-e4c6057f.js";import{V as f,i as N}from"./validationPatterns-77446c46.js";const q=t=>{const{touched:r,errors:s,type:i}=t;return e.jsxs(E,{className:"mb-4",children:[e.jsx(p,{asterisk:!0,label:"Role",invalid:s.name&&r.name,errorMessage:s.name,children:e.jsx(x,{type:"text",autoComplete:"off",name:"name",placeholder:"Role",component:u})}),e.jsx(p,{asterisk:!0,label:"Description",invalid:s.description&&r.description,errorMessage:s.description,children:e.jsx(x,{textArea:!0,type:"text",autoComplete:"off",name:"description",placeholder:"Description",component:u})})]})},B={TEXT_INPUT:100,TEXT_AREA:255,PASSWORD:50,USERNAME:30},{TEXT_INPUT:h,TEXT_AREA:j}=B,{useUniqueId:O}=S,g=I().matches(f.sqlInjectionSafe,"Invalid input: SQL keywords not allowed").matches(f.noSpecialChars,"Special characters like < > = { } are not allowed").test("no-base64","Base64 encoded content is not allowed",t=>t?!N(t.trim()):!0),M=k().shape({name:g.required("Role Required").max(h,`Maximum ${h} characters allowed`),description:g.required("Description Required").max(j,`Maximum ${j} characters allowed`)}),_=({onDelete:t})=>{const[r,s]=y.useState(!1),i=()=>{s(!0)},o=()=>{s(!1)},a=()=>{t==null||t(s)};return e.jsxs(e.Fragment,{children:[e.jsx(d,{className:"text-red-600",variant:"plain",size:"sm",icon:e.jsx(w,{}),type:"button",onClick:i,children:"Delete"}),e.jsx(T,{isOpen:r,type:"danger",title:"Delete product",confirmButtonColor:"red-600",onClose:o,onRequestClose:o,onCancel:o,onConfirm:a,children:e.jsx("p",{children:"Are you sure you want to delete this role? All record related to this role will be deleted as well. This action cannot be undone."})})]})},X=y.forwardRef((t,r)=>{const{type:s,footerWidth:i,initialData:o={id:"",name:"",description:""},onFormSubmit:a,onDiscard:l,onDelete:C}=t,R=O("Role-");return e.jsx(e.Fragment,{children:e.jsx(v,{innerRef:r,initialValues:{...o},validationSchema:M,onSubmit:(m,{setSubmitting:c})=>{const n=m;s==="new"&&(n.id=R),a==null||a(n,c)},children:({values:m,touched:c,errors:n,isSubmitting:$})=>e.jsx(D,{children:e.jsxs(b,{children:[e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-1 gap-4",children:e.jsx("div",{className:"lg:col-span-2",children:e.jsx(q,{type:s,touched:c,errors:n})})}),e.jsxs(A,{className:`px-8 flex items-center justify-between py-4 ${i}`,stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:[e.jsx("div",{children:s==="edit"&&e.jsx(_,{onDelete:C})}),e.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(d,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>l==null?void 0:l(),children:"Discard"}),e.jsx(d,{size:"sm",variant:"solid",icon:e.jsx(F,{}),type:"submit",children:"Save"})]})]})]})})})})});X.displayName="RoleForm";export{X as R};
@@ -1 +0,0 @@
1
- import{j as t,s as xe}from"./vendor-mui-69397583.js";import{A as _}from"./AdaptableCard-df7695d6.js";import{r as m,f as Q}from"./vendor-react-ece1c85f.js";import{b as ye,c as ge,a as De}from"./vendor-redux-a1f00e6b.js";import{eg as G,F as Ce,eh as be,l as H,I as U,W as M,Z as I,B,Y as ae,E as se,O,Q as R,f as je,V as Te,S as ve}from"./index-c62ac197.js";import{C as ie}from"./ConfirmDialog-3202eb3d.js";import{a as j,F as Ae}from"./FormContainer-91c2b0e4.js";import{h as Fe}from"./index-36ba4ea7.js";import{S as Ie}from"./StickyFooter-5b934274.js";import{u as ke,d as T,c as q,a as w,k as Ne,F as Oe,b as Re}from"./index.esm-70ab539c.js";import{a as Le}from"./index-e4c6057f.js";import"./Alert-7dfbd254.js";import"./index-6b6d0f06.js";import{a as $e,T as Me}from"./index-c2088808.js";import{D as ee}from"./Drawer-949c18c6.js";import"./Switcher-c8648037.js";import"./index-36228db5.js";import"./Upload-fb34ce03.js";import{a as qe}from"./CourseService-f0dc3bf1.js";import{r as He}from"./createSvgIcon-c5fc0d04.js";import{A as Ee,T as V}from"./actioncell-17e12e21.js";import{u as Ve}from"./usePermission-d94b4984.js";import{u as Ye}from"./useDeviceCheck-920641a5.js";import{D as ze}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"./useControllableState-d0909575.js";import"./useDidUpdate-25c4d4ed.js";import"./ApiService-2b99757f.js";import"./FileSaver.min-20f3f13a.js";import"./DensitySelector-a2c1c68f.js";import"./NoData-8c485a3a.js";async function Ge(a){return(await G.apiV10CourseSchedulePost(a)).data}async function Pe(a){return(await G.apiV10CourseScheduleGet(a)).data}async function Ue(a,s){return(await G.apiV10CourseScheduleIdPut(a,s)).data}async function ne(a){return(await G.apiV10CourseScheduleIdDelete(a)).data}const re="ScheduleData",Y=ye(`${re}/getScheduleData`,async a=>{const s=await Pe(a);return s==null?void 0:s.data}),we={total:0,pageIndex:1,pageSize:10,query:"",sort:{order:"",key:""}},_e={loading:!1,deleteConfirmation:!1,selectedRowData:"",tableData:we,filterData:{name:"",category:["bags","cloths","devices","shoes","watches"],status:[0,1,2],productStatus:0},ScheduleList:[]},oe=ge({name:`${re}`,initialState:_e,reducers:{setTableData:(a,s)=>{a.tableData=s.payload},toggleDeleteConfirmation:(a,s)=>{a.deleteConfirmation=s.payload},setSelectedRowData:(a,s)=>{a.selectedRowData=s.payload}},extraReducers:a=>{a.addCase(Y.fulfilled,(s,n)=>{var u,o;s.ScheduleList=((o=(u=n==null?void 0:n.payload)==null?void 0:u.result)==null?void 0:o.$values)||[],s.loading=!1}).addCase(Y.pending,s=>{s.loading=!0}).addCase(Y.rejected,(s,n)=>{s.ScheduleList=[],s.loading=!1})}}),{setTableData:Pt,toggleDeleteConfirmation:W,setSelectedRowData:Be}=oe.actions,We=oe.reducer,le=De({data:We}),z=Ce;async function Qe(a){return(await be.apiV10LocationGet(a)).data}const Ze=a=>{var y,b,F,L;H();const{touched:s,errors:n,type:u,values:o}=a;ke();const[f,r]=m.useState([]),[p,i]=m.useState([]),h=["In-person","Online","In-person & Online"].map((l,c)=>({label:l,value:c+1})),S=["Guided","NonGuided"].map((l,c)=>({label:l,value:c+1})),C=[{label:"30 Mins",value:1},{label:"1 Hour",value:2},{label:"1.5 Hour",value:3},{label:"2 Hour",value:4},{label:"2.5 Hour",value:5},{label:"3 Hour",value:6},{label:"3.5 Hour",value:7},{label:"4 Hour",value:8},{label:"4.5 Hour",value:9},{label:"5 Hour",value:10},{label:"5.5 Hour",value:11},{label:"6 Hour",value:12}],D=m.useCallback(async()=>{var l,c,d,k;try{const g=await Qe({status:!1}),A=(c=(l=g==null?void 0:g.data)==null?void 0:l.result)==null?void 0:c.$values.map(N=>({value:N.id,label:`${N.title}`}));r(A)}catch(g){r([]),console.error("Failed to fetch US states:",g)}try{const g=await qe({status:!1}),A=(k=(d=g==null?void 0:g.data)==null?void 0:d.finalResults)==null?void 0:k.$values.map(N=>({value:N.id,label:`${N.title}`}));i(A)}catch(g){i([]),console.error("Failed to fetch US states:",g)}},[]);return m.useEffect(()=>{D()},[]),t.jsxs(_,{className:"mb-4",children:[t.jsx(j,{asterisk:!0,label:"Title",invalid:n.title&&s.title,errorMessage:n.title,children:t.jsx(T,{type:"text",autoComplete:"off",name:"title",placeholder:"Title",component:U})}),t.jsx(j,{asterisk:!0,label:"Course",invalid:n.courseId&&s.courseId,errorMessage:n.courseId,children:t.jsx(T,{name:"courseId",children:({field:l,form:c})=>t.jsx(M,{field:l,form:c,options:p,name:"courseId",onChange:d=>{c.setFieldValue(l.name,d)}})})}),t.jsx(j,{label:"Date",asterisk:!0,invalid:n.date&&s.date,errorMessage:n.date,children:t.jsx(T,{name:"date",children:({field:l,form:c})=>t.jsx(t.Fragment,{children:t.jsx($e,{name:"date",placeholder:"Date",field:l,value:o==null?void 0:o.date,onChange:d=>{d&&c.setFieldValue("date",d)}})})})}),t.jsx(j,{label:"Course Start Time",asterisk:!0,invalid:n.courseStartTime&&s.courseStartTime,errorMessage:n.courseStartTime,children:t.jsx(T,{name:"courseStartTime",placeholder:"Course Start Time",children:({field:l,form:c})=>t.jsx(Me,{name:"courseStartTime",id:"courseStartTime",field:l,defaultValue:c.values.courseStartTime?new Date(I().format("YYYY-MM-DD")+`T${c.values.courseStartTime}`)||"":void 0,format:"12",clearable:!1,onChange:d=>{var k=I(d).format("HH:mm:ss");c.setFieldValue("courseStartTime",k)}})})}),t.jsx(j,{asterisk:!0,label:"Course Duration",invalid:n.courseDuration&&s.courseDuration,errorMessage:n.courseDuration,children:t.jsx(T,{name:"courseDuration",children:({field:l,form:c})=>t.jsx(M,{field:l,form:c,options:C,name:"courseDuration",onChange:d=>{c.setFieldValue(l.name,d)}})})}),t.jsx(j,{asterisk:!0,label:"Course Type",invalid:n.courseType&&s.courseType,errorMessage:n.courseType,children:t.jsx(T,{name:"courseType",children:({field:l,form:c})=>t.jsx(M,{field:l,form:c,options:h,name:"courseType",onChange:d=>{c.setFieldValue(l.name,d)}})})}),(((y=o==null?void 0:o.courseType)==null?void 0:y.value)==2||((b=o==null?void 0:o.courseType)==null?void 0:b.value)==3)&&t.jsx(j,{asterisk:!0,label:"Assistance Level",invalid:n.guidedType&&s.guidedType,errorMessage:n.guidedType,children:t.jsx(T,{name:"guidedType",children:({field:l,form:c})=>t.jsx(M,{field:l,form:c,options:S,name:"guidedType",onChange:d=>{c.setFieldValue(l.name,d)}})})}),(((F=o==null?void 0:o.courseType)==null?void 0:F.value)==2||((L=o==null?void 0:o.courseType)==null?void 0:L.value)==3)&&t.jsx(j,{label:"Link",invalid:n.link&&s.link,errorMessage:n.link,children:t.jsx(T,{type:"text",autoComplete:"off",name:"link",placeholder:"Link",component:U})}),t.jsx(j,{label:"Location",invalid:n.location&&s.location,errorMessage:n.location,children:t.jsx(T,{name:"location",children:({field:l,form:c})=>t.jsx(M,{field:l,form:c,options:f,name:"location",onChange:d=>{c.setFieldValue(l.name,d)}})})}),t.jsx(j,{asterisk:!0,label:"No. of Seats",invalid:n.noOfSeats&&s.noOfSeats,errorMessage:n.noOfSeats,children:t.jsx(T,{type:"number",autoComplete:"off",name:"noOfSeats",placeholder:"No. of Seats",component:U})})]})},{useUniqueId:Je}=Fe,te=q().shape({date:w().required("Date is required"),courseStartTime:w().required("Start Time is required"),courseDuration:q().required("Course Duration is required"),courseId:q().required("Course is required"),title:w().required("Title is required"),noOfSeats:Ne().required("Number of seats is required"),courseType:q().required("Course Type is required"),guidedType:q().nullable().when("courseType",{is:a=>(a==null?void 0:a.value)===2||(a==null?void 0:a.value)===3,then:a=>a.required("Assistance Level is required"),otherwise:a=>a.notRequired()})}),Z=m.forwardRef((a,s)=>{const{type:n,initialData:u={date:"",courseStartTime:"",courseDuration:"",title:"",location:"",noOfSeats:"",courseType:"",link:"",guidedType:"",courseId:""},onFormSubmit:o,onDiscard:f,onDelete:r}=a,p=Je("LeadSource-");return t.jsx(t.Fragment,{children:t.jsx(Oe,{innerRef:s,initialValues:{...u},validationSchema:te,onSubmit:(i,{setSubmitting:h})=>{const S=i;n==="new"&&(S.id=p),o==null||o(S,h)},children:({values:i,touched:h,errors:S,isSubmitting:C})=>t.jsx(Re,{children:t.jsxs(Ae,{children:[t.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-1 gap-4",children:t.jsx("div",{className:"lg:col-span-2 pb-8",children:t.jsx(Ze,{type:n,touched:h,errors:S,values:i})})}),t.jsx(Ie,{className:"px-8 flex items-center justify-between py-4",stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:t.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[t.jsx(B,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>f==null?void 0:f(),children:"Discard"}),t.jsx(B,{size:"sm",variant:"solid",loading:C,icon:t.jsx(Le,{}),type:"submit",children:"Save"})]})})]})})})})});Z.displayName="ScheduleForm";function Ke(a){return a=String(a).trim(),/^\d+$/.test(a)?`${parseInt(a,10).toString().padStart(2,"0")}:00:00`:/^\d{2}:\d{2}:\d{2}$/.test(a)?a:" "}ae("ScheduleData",le);const Xe=a=>{const{id:s,onDrawerClose:n,refetchDataAfterUpdate:u}=a;H(),Q();const o=async(i,h)=>{var D,y,b,F;h(!0);const S={title:(i==null?void 0:i.title)??"",duration:((D=i.courseDuration)==null?void 0:D.value)??"",courseId:(i==null?void 0:i.courseId.value)??"",startTime:Ke(i.courseStartTime)??"",scheduleDate:i.date?I(i.date).format("YYYY-MM-DD"):"",locationId:((y=i.location)==null?void 0:y.value)??null,noOfSeats:i.noOfSeats??"",courseType:((b=i==null?void 0:i.courseType)==null?void 0:b.value)??null,isGuided:!!((F=i==null?void 0:i.guidedType)!=null&&F.value),link:(i==null?void 0:i.link)??""},C=await Ue(i==null?void 0:i.id,S);h(!1),C&&(p("updated"),u(),n())},f=()=>{n()},r=async i=>{i(!1)},p=i=>{O.push(t.jsxs(R,{title:"Success",type:"success",duration:2500,children:["Election Schedule Successfully ",i]}),{placement:"top-center"})};return t.jsx(t.Fragment,{children:t.jsx(se,{loading:!1,children:t.jsx(Z,{type:"edit",initialData:a.selectedData,onFormSubmit:o,onDiscard:f,onDelete:r})})})};function et(a){return a=String(a).trim(),/^\d+$/.test(a)?`${parseInt(a,10).toString().padStart(2,"0")}:00:00`:/^\d{2}:\d{2}:\d{2}$/.test(a)?a:" "}const tt=a=>{const{onDrawerClose:s,refetchDataAfterUpdate:n}=a;Q(),H(),m.useState(!1);const u=async r=>await Ge(r),o=async(r,p)=>{var h,S,C,D;p(!0);const i={title:(r==null?void 0:r.title)??"",duration:((h=r.courseDuration)==null?void 0:h.value)??"",courseId:(r==null?void 0:r.courseId.value)??"",startTime:et(r.courseStartTime)??"",scheduleDate:r.date?I(r.date).format("YYYY-MM-DD"):"",locationId:((S=r.location)==null?void 0:S.value)??null,noOfSeats:r.noOfSeats??"",courseType:((C=r==null?void 0:r.courseType)==null?void 0:C.value)??null,isGuided:!!((D=r==null?void 0:r.guidedType)!=null&&D.value),link:(r==null?void 0:r.link)??""};u(i).then(y=>{y.success&&(O.push(t.jsx(R,{title:"Success",type:"success",duration:2500,children:"Course Schedule Successfully Added"}),{placement:"top-center"}),n(),s())}).catch(y=>{console.log("category - error",y);var b=y.response.data;p(!1),O.push(t.jsx(R,{title:"Error",type:"danger",duration:2500,children:b.message}),{placement:"top-center"})})},f=()=>{s()};return t.jsx(t.Fragment,{children:t.jsx(Z,{type:"new",onFormSubmit:o,onDiscard:f})})};var J={},at=xe;Object.defineProperty(J,"__esModule",{value:!0});var K=J.default=void 0,st=at(He()),it=t;K=J.default=(0,st.default)((0,it.jsx)("path",{d:"M15 16h4v2h-4zm0-8h7v2h-7zm0 4h6v2h-6zM3 18c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V8H3zm2-8h6v8H5zm5-6H6L5 5H2v2h12V5h-3z"}),"DeleteSweepOutlined");const nt=({refetchDataAfterUpdate:a})=>{const s=H(),n=z(r=>{var p,i;return(i=(p=r.ScheduleData)==null?void 0:p.data)==null?void 0:i.deleteConfirmation}),u=z(r=>{var p,i;return(i=(p=r.ScheduleData)==null?void 0:p.data)==null?void 0:i.selectedRowData}),o=()=>{s(W(!1))},f=async()=>{s(W(!1)),await ne(u.id,{isActive:!u.isActive})&&(a(),O.push(t.jsx(R,{title:`Marked ${u.isActive?"Inactive":"Active"}`,type:"success",duration:2500,children:`Election Schedule Successfully Marked ${u.isActive?"Inactive":"Active"}`}),{placement:"top-center"}))};return t.jsx(ie,{isOpen:n,type:"danger",title:"Are You Sure?",icon:t.jsx(K,{className:"text-red-600 w-6 h-6"}),confirmButtonColor:"red-600",confirmText:u.isActive?"Inactive":"Active",onClose:o,onRequestClose:o,onCancel:o,onConfirm:f,children:t.jsx("p",{className:"text-center text-gray-600",children:`Are you sure you want to mark this Election Schedule ${u.isActive?"Inactive":"Active"} Please confirm to proceed.`})})};ae("ScheduleData",le);const rt={InPerson:1,Online:2,InPersonOnline:3},ce=[{label:"30 Mins",value:1},{label:"1 Hour",value:2},{label:"1.5 Hour",value:3},{label:"2 Hour",value:4},{label:"2.5 Hour",value:5},{label:"3 Hour",value:6},{label:"3.5 Hour",value:7},{label:"4 Hour",value:8},{label:"4.5 Hour",value:9},{label:"5 Hour",value:10},{label:"5.5 Hour",value:11},{label:"6 Hour",value:12}],ot=a=>{var s;return((s=ce.find(n=>n.value===a))==null?void 0:s.label)||"-"},Ut=()=>{const[a,s]=m.useState([]);m.useState(!1),m.useState(!1);const[n,u]=m.useState(!1),[o,f]=m.useState(!1),[r,p]=m.useState(),i=Ve("Election Schedules"),[h,S]=m.useState(null),[C,D]=m.useState(!1),[y,b]=m.useState(!1);i.isEdit,i.isDelete;const F=()=>{u(!0)},L=()=>{u(!1)};m.useRef(null),Q();const l=H(),c=z(e=>{var x,v;return(v=(x=e==null?void 0:e.ScheduleData)==null?void 0:x.data)==null?void 0:v.ScheduleList}),d=z(e=>{var x,v;return(v=(x=e==null?void 0:e.ScheduleData)==null?void 0:x.data)==null?void 0:v.loading}),[k,g]=m.useState(""),[A,N]=m.useState({label:"All",value:null});je(),m.useEffect(()=>{$()},[A]);const $=()=>{const e=Y({status:A==null?void 0:A.value});l(e)},de=e=>{},ue=e=>{const x=ce.find(P=>P.value===e.duration)||null;let v={...e,date:new Date(e.scheduleDate),courseStartTime:e.startTime,courseDuration:x,location:{label:e!=null&&e.locationName?`${e.locationName}`:"",value:e.locationId},courseType:{label:e!=null&&e.courseType?`${e.courseType}`:"",value:rt[e==null?void 0:e.courseType]},guidedType:e!=null&&e.isGuided?{label:e!=null&&e.assistanceType?`${e.assistanceType}`:"NonGuided",value:e.assistanceType==="NonGuided"?2:1}:null,link:e==null?void 0:e.link,courseId:{label:e.title,value:e==null?void 0:e.courseId}};g(v),f(!0)},me=e=>{l(W(!0)),l(Be(e))},pe=async()=>{try{b(!0),D(!1),await ne(h.id)&&($(),O.push(t.jsx(R,{title:"Archived",type:"success",duration:2500,children:" Schedule Successfully Archived"}),{placement:"top-center"}))}catch(e){console.log(e)}finally{b(!1),E()}},he=e=>{const x=I().startOf("day"),v=I(e.startDate).startOf("day"),P=I(e.endDate).endOf("day");if(x.isBetween(v,P,null,"[]")&&(e!=null&&e.isActive)){O.push(t.jsx(R,{title:"Action Not Allowed",type:"warning",duration:5e3,children:`Current Election - ${e==null?void 0:e.title} Is not eligible for Archival as it's within the date range.`}),{placement:"top-center"});return}S(e),D(!0)},fe=(e,x)=>{x===V.edit&&ue(e),x===V.delete&&me(e),x===V.view&&de(e==null?void 0:e.data),x===V.archive&&he(e==null?void 0:e.data)},E=()=>{D(!1),S(null)},X=()=>{f(!1)};Ye();const Se=[{dataField:"Action",caption:"Action",width:"130",cellRender:e=>t.jsx("div",{"data-cname":"Action",className:"flex justify-start items-center",children:t.jsx(Ee,{row:e==null?void 0:e.data,actions:{edit:!0,delete:!0},buttonClick:fe})})},{dataField:"scheduleDate",caption:"Date",dataType:"date",format:"MM/dd/yyyy"},{dataField:"courseName",caption:"Schedule Name"},{dataField:"title",caption:"Course Name"},{dataField:"startTime",caption:"Start Time"},{dataField:"duration",caption:"Course Duration",cellRender:({data:e})=>t.jsx("div",{"data-cname":"Course Duration",children:ot(e==null?void 0:e.duration)})},{dataField:"locationName",caption:"Location",cellRender:({data:e})=>e.locationName?t.jsx("div",{"data-cname":"Location",children:`${e==null?void 0:e.locationName} - ${e.address}, ${e.address2} ${e.address2?",":""}${e.city}, ${e.state}, ${e.zip}`}):null},{dataField:"isActive",caption:"Active",cellRender:({data:e})=>t.jsx("div",{"data-cname":"Active",children:t.jsx(ve,{checked:e.isActive})})},{dataField:"code",caption:"Code",dataType:"string"},{dataField:"noOfSeats",caption:"Seats",cellRender:({data:e})=>t.jsxs("div",{"data-cname":"noOfSeats",children:[e.regularCheckins,"/",e==null?void 0:e.noOfSeats]})},{dataField:"waitingList",caption:"Waiting List"}];return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:t.jsxs("div",{className:"lg:flex items-center justify-between",children:[t.jsx("h3",{className:"mb-4 lg:mb-0",children:"Course Schedule"}),t.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center",children:t.jsx(B,{onClick:()=>F(),block:!0,variant:"solid",size:"sm",icon:t.jsx(Te,{}),children:"Add Course Schedule"})})]})}),(d||y)&&t.jsx("div",{className:"flex justify-center items-center absolute inset-0 bg-gray-300 bg-opacity-20 z-50",children:t.jsx(se,{loading:!0})}),t.jsx(_,{className:"m-6 h-full py-4 pb-0 px-6 bg-transparent",bodyClass:"h-full",children:t.jsx(_,{className:"p-4 pb-0",children:t.jsx(ze,{columns:Se,tableName:"Course-schedule-table",data:c||[],height:"calc(100vh - 270px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:a,setSelectedRowId:s,setFilterValues:()=>{},filterValues:[],identity:"Lead-Listing",isColumnReorderReq:!0,setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"Lead-Listing-table",handleSearch:()=>{},isColumnResizing:!0,isPaginationReq:!0,isSelectionReq:!1,isFilterReq:!0,openFilter:()=>{},isLoading:d||y})})}),t.jsx(nt,{refetchDataAfterUpdate:$}),t.jsx(ee,{title:"Add Course Schedule",isOpen:n,onClose:L,onRequestClose:()=>{},portalClassName:"w30",children:t.jsx(tt,{onDrawerClose:L,refetchDataAfterUpdate:$})}),t.jsx(ee,{title:"Edit Course Schedule",isOpen:o,onClose:X,onRequestClose:()=>{},portalClassName:"w30",children:t.jsx(Xe,{id:r,selectedData:k,onDrawerClose:X,refetchDataAfterUpdate:$})}),t.jsx(ie,{isOpen:C,type:"danger",title:"Are You Sure?",icon:t.jsx(K,{className:"text-red-600 w-6 h-6"}),confirmButtonColor:"red-600",confirmText:"Archive",onClose:E,onRequestClose:E,onCancel:E,onConfirm:pe,children:t.jsx("p",{className:"text-center text-gray-600",children:`Are you sure, you want to Archive ${h==null?void 0:h.title}. This will Archive all Courses and Participants data for this Election?`})})]})};export{Ut as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor-mui-69397583.js";import{A as K}from"./AdaptableCard-df7695d6.js";import{r as a,f as P}from"./vendor-react-ece1c85f.js";import{u as h,t as k,A as z,r as U,s as Q}from"./AddEditTranslation-43beae49.js";import{l as B,I as D,B as L,O as w,Q as M,cb as Y,Y as _,V as G}from"./index-c62ac197.js";import"./Alert-7dfbd254.js";import"./index-6b6d0f06.js";import"./index-c2088808.js";import{D as N}from"./Drawer-949c18c6.js";import{a as j,F as J}from"./FormContainer-91c2b0e4.js";import"./Switcher-c8648037.js";import{T as X,a as Z,b as ee}from"./index-36228db5.js";import"./Upload-fb34ce03.js";import{A as te,T as V}from"./actioncell-17e12e21.js";import{D as ie}from"./tableV2-4d1c9fd2.js";import{C as ne}from"./ConfirmDialog-3202eb3d.js";import{u as oe}from"./usePermission-d94b4984.js";import{h as ae}from"./index-36ba4ea7.js";import{S as le}from"./StickyFooter-5b934274.js";import{d as F,c as re,a as E,F as se,b as de}from"./index.esm-70ab539c.js";import{a as ce}from"./index-e4c6057f.js";import"./index-fcc1c999.js";import"./Notify-bb3ce372.js";import"./vendor-redux-a1f00e6b.js";import"./CompanyService-1bf7c3c8.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 me=({fetchData:l})=>{const t=B(),i=h(m=>m.TranslationData.data.deleteConfirmation);h(m=>m.TranslationData.data.selectedRowData);const c=()=>{t(k(!1))},u=async()=>{};return e.jsx(ne,{isOpen:i,type:"danger",title:"Delete Screen",confirmButtonColor:"red-600",onClose:c,onRequestClose:c,onCancel:c,onConfirm:u,children:e.jsx("p",{children:"Are you sure you want to delete this Screen?"})})},ue=({touched:l,errors:t,type:i})=>(a.useState(!1),e.jsxs(K,{className:"mb-4",children:[e.jsx("div",{className:"flex-1",children:e.jsx(j,{asterisk:!0,label:"Screen Name",invalid:t.name&&l.name,errorMessage:t.name,children:e.jsx(F,{type:"text",autoComplete:"off",name:"name",placeholder:"Screen Name",component:D})})}),e.jsx("div",{className:"flex-1",children:e.jsx(j,{asterisk:!0,label:"Screen Code",invalid:t.screenCode&&l.screenCode,errorMessage:t.screenCode,children:e.jsx(F,{type:"text",disabled:i!=="new",autoComplete:"off",name:"screenCode",placeholder:"Screen Code",component:D})})}),e.jsx("div",{className:"mb-5",children:e.jsx(j,{asterisk:!0,label:"Description",invalid:t.description&&l.description,errorMessage:t.description,children:e.jsx(F,{type:"text",textArea:!0,autoComplete:"off",name:"description",placeholder:"Description",component:D})})})]})),{useUniqueId:Se}=ae,pe=re().shape({name:E().required("Screen name is required"),screenCode:E().required("Screen code is required"),description:E().required("Description is required")}),A=a.forwardRef((l,t)=>{const{type:i,initialData:c={id:"",name:"",description:"",screenCode:""},onFormSubmit:u,onDiscard:m,onDelete:g}=l,x=Se("FAQ-");return e.jsx(e.Fragment,{children:e.jsx(se,{innerRef:t,initialValues:{...c},validationSchema:pe,onSubmit:(s,{setSubmitting:o})=>{const r={...s};i==="new"&&(r.id=x),u==null||u(r,o)},children:({touched:s,errors:o,isSubmitting:r})=>e.jsx(de,{children:e.jsxs(J,{children:[e.jsx("div",{className:"grid grid-cols-1 gap-4",children:e.jsx("div",{className:"pb-8",children:e.jsx(ue,{type:i,touched:s,errors:o})})}),e.jsx(le,{className:"px-8 flex items-center justify-between py-4",stickyClass:"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"md:flex items-center justify-between w-full",children:[e.jsx(L,{size:"sm",className:"ltr:mr-3 rtl:ml-3",type:"button",onClick:()=>m==null?void 0:m(),children:"Discard"}),e.jsx(L,{size:"sm",variant:"solid",loading:r,icon:e.jsx(ce,{}),type:"submit",children:"Save"})]})})]})})})})});A.displayName="ScreenForm";const v=l=>{const{onDrawerClose:t,faqId:i,fetchData:c,initialData:u}=l;P(),B(),a.useState(!1);const m=async o=>{},g=async o=>{},x=async(o,r)=>{r(!0),o==null||o.name,o==null||o.description,o==null||o.screenCode,(i?g:m)().then(S=>{S.success&&(w.push(e.jsxs(M,{title:"Success",type:"success",duration:2500,children:["Screen ",i?"Updated":"Added"," Successfully"]}),{placement:"top-center"}),c(),t())}).catch(S=>{var H;var d=(H=S.response)==null?void 0:H.data;r(!1),w.push(e.jsx(M,{title:"Error",type:"danger",duration:2500,children:(d==null?void 0:d.message)||"Something went wrong"}),{placement:"top-center"})})},s=()=>{t()};return e.jsx(A,{type:i?"edit":"new",initialData:u||void 0,onFormSubmit:x,onDiscard:s})},xe={ElectionInformation:{image:"/screens/Welcome - Election.png",hotspots:[{id:"ElectionInformation.Header.Title",x:68,y:21.3,label:"ElectionInformation.Header.Title",translationKey:"ElectionInformation.Header.Title"},{id:"ElectionInformation.Header.SubTitle",x:96,y:25,label:"ElectionInformation.Header.SubTitle",translationKey:"ElectionInformation.Header.SubTitle"},{id:"ElectionInformation.Footer.Title",x:90,y:83.5,label:"ElectionInformation.Footer.Title",translationKey:"ElectionInformation.Footer.Title"},{id:"ElectionInformation.Footer.Button.Text",x:59,y:90.5,label:"ElectionInformation.Footer.Button.Text",translationKey:"ElectionInformation.Footer.Button.Text"}]},ElectionDates:{image:"/screens/ElectionDates.png",hotspots:[{id:"ElectionDates.Header.Title",x:62,y:9.2,label:"ElectionDates.Header.Title",translationKey:"ElectionDates.Header.Title"},{id:"ElectionDates.Footer.SearchPlaceholder",x:34,y:90.2,label:"ElectionDates.Footer.SearchPlaceholder",translationKey:"ElectionDates.Footer.SearchPlaceholder"}]},Settings:{image:"/screens/Settings.png",hotspots:[{id:"Settings.Notifications.Title",x:45.5,y:94.5,label:"Settings.Notifications.Title",translationKey:"Settings.Notifications.Title"},{id:"Settings.Notifications.Subtitle",x:53,y:97,label:"Settings.Notifications.Subtitle",translationKey:"Settings.Notifications.Subtitle"}]},Welcome:{image:"/screens/Welcome.png",hotspots:[{id:"Welcome.Header.Title",x:62,y:21.5,label:"Welcome.Header.Title",translationKey:"Welcome.Header.Title"},{id:"Welcome.Header.SubTitle",x:79,y:24.5,label:"Welcome.Header.SubTitle",translationKey:"Welcome.Header.SubTitle"},{id:"Welcome.Footer.Title",x:84,y:83.5,label:"Welcome.Footer.Title",translationKey:"Welcome.Footer.Title"},{id:"Footer.Button.Text",x:59,y:90.5,label:"Footer.Button.Text",translationKey:"Footer.Button.Text"}]},PollingLocations:{image:"/screens/Welcome - Locations.png",hotspots:[{id:"PollingLocations.Header.Title",x:62,y:21.5,label:"PollingLocations.Header.Title",translationKey:"PollingLocations.Header.Title"},{id:"PollingLocations.Header.SubTitle",x:90,y:24.5,label:"PollingLocations.Header.SubTitle",translationKey:"PollingLocations.Header.SubTitle"},{id:"PollingLocations.Footer.Title",x:97.5,y:83.5,label:"PollingLocations.Footer.Title",translationKey:"PollingLocations.Footer.Title"},{id:"PollingLocations.Footer.Button.Text",x:59,y:90.5,label:"PollingLocations.Footer.Button.Text",translationKey:"PollingLocations.Footer.Button.Text"}]},VotingCenter:{image:"/screens/Voting Centers - Map.png",hotspots:[{id:"VotingCenter.Header.Title",x:40,y:9,label:"VotingCenter.Header.Title",translationKey:"VotingCenter.Header.Title"},{id:"VotingCenter.Header.LowTime",x:27,y:15.5,label:"VotingCenter.Header.LowTime",translationKey:"VotingCenter.Header.LowTime"},{id:"VotingCenter.Header.Mins",x:24,y:17,label:"VotingCenter.Header.Mins",translationKey:"VotingCenter.Header.Mins"},{id:"VotingCenter.Header.ModerateTime",x:65,y:15.5,label:"VotingCenter.Header.ModerateTime",translationKey:"VotingCenter.Header.ModerateTime"},{id:"VotingCenter.Header.Mins",x:57,y:17,label:"VotingCenter.Header.Mins",translationKey:"VotingCenter.Header.Mins"},{id:"VotingCenter.Header.LongTime",x:92.5,y:15.5,label:"VotingCenter.Header.LongTime",translationKey:"VotingCenter.Header.LongTime"},{id:"VotingCenter.Header.Mins",x:90,y:17,label:"VotingCenter.Header.Mins",translationKey:"VotingCenter.Header.Mins"},{id:"VotingCenter.Header.Description",x:82,y:28,label:"VotingCenter.Header.Description",translationKey:"VotingCenter.Header.Description"},{id:"VotingCenter.Section.EarlyVoting",x:39,y:33.7,label:"VotingCenter.Section.EarlyVoting",translationKey:"VotingCenter.Section.EarlyVoting"},{id:"VotingCenter.Section.ElectionDay",x:81,y:33.7,label:"VotingCenter.Section.ElectionDay",translationKey:"VotingCenter.Section.ElectionDay"},{id:"VotingCenter.Section.Distance",x:84,y:54.3,label:"VotingCenter.Section.Distance",translationKey:"VotingCenter.Section.Distance"},{id:"VotingCenter.Section.Directions",x:36,y:64,label:"VotingCenter.Section.Directions",translationKey:"VotingCenter.Section.Directions"},{id:"VotingCenter.Section.LastUpdated",x:90,y:65.7,label:"VotingCenter.Section.LastUpdated",translationKey:"VotingCenter.Section.LastUpdated"}]},Home:{homeScreens:{Banner1:{image:"/screens/Welcome - Landing.png",hotspots:[{id:"Home.Header.Slider1.Subtitle1.Title",x:59,y:20,label:"Home.Header.Slider1.Title",translationKey:"Home.Header.Slider1.Title",isBannerNeeded:!0},{id:"Home.Header.Slider1.Subtitle1.Label",x:73,y:22,label:"Home.Header.Slider1.Subtitle1.Label",translationKey:"Home.Header.Slider1.Subtitle1.Label"},{id:"Home.Header.Slider1.Subtitle2.Label",x:94,y:24,label:"Home.Header.Slider1.Subtitle2.Label",translationKey:"Home.Header.Slider1.Subtitle2.Label"},{id:"Home.Header.Slider1.Button",x:57,y:27.7,label:"Home.Header.Slider1.Button",translationKey:"Home.Header.Slider1.Button",isRedirectionNeeded:!0},{id:"Home.Section.VotingCenter.Title",x:34,y:42,label:"Find a Voting Center",translationKey:"Home.Section.VotingCenter.Title",isIconNeeded:!0},{id:"Home.Section.VotingCenter.Description",x:42,y:50,label:"Find a Voting Center",translationKey:"Home.Section.VotingCenter.Description"},{id:"Home.Section.Ballot.Title",x:83,y:42,label:"What’s on My Ballot?",translationKey:"Home.Section.Ballot.Title",isIconNeeded:!0,isRedirectionNeeded:!0},{id:"Home.Section.Ballot.Description",x:90,y:50,label:"What’s on My Ballot?",translationKey:"Home.Section.Ballot.Description"},{id:"Home.Section.Faq.Title",x:36,y:60,label:"Voting FAQ",translationKey:"Home.Section.Faq.Title",isIconNeeded:!0},{id:"Home.Section.Faq.Description",x:42,y:68,label:"Voting FAQ",translationKey:"Home.Section.Faq.Description"},{id:"Home.Section.ElectionDates.Title",x:83,y:60,label:"Election Dates & Reminders",translationKey:"Home.Section.ElectionDates.Title",isIconNeeded:!0},{id:"Home.Section.ElectionDates.Description",x:91,y:67.5,label:"Home.Section.ElectionDates.Description",translationKey:"Home.Section.ElectionDates.Description"},{id:"Home.Section.RegistrationStatus.Title",x:35,y:77,label:"Check Your Voter Registration Status",translationKey:"Home.Section.RegistrationStatus.Title",isIconNeeded:!0,isRedirectionNeeded:!0},{id:"Home.Section.RegistrationStatus.Description",x:43,y:85.5,label:"Check Your Voter Registration Status",translationKey:"Home.Section.RegistrationStatus.Description"},{id:"Home.Section.ElectionResults.Title",x:82,y:77,label:"Election Results",translationKey:"Home.Section.ElectionResults.Title",isIconNeeded:!0,isRedirectionNeeded:!0},{id:"Home.Section.ElectionResults.Description",x:90,y:85.5,label:"Election Results",translationKey:"Home.Section.ElectionResults.Description"}]},Banner2:{image:"/screens/Home-Banner2.png",hotspots:[{id:"Home.Header.Slider2.Title",x:63,y:24.2,label:"Home.Header.Slider2.Title",translationKey:"Home.Header.Slider2.Title",isBannerNeeded:!0},{id:"Home.Header.Slider2.Subtitle1.Label",x:77,y:26.5,label:"Home.Header.Slider2.Subtitle1.Label",translationKey:"Home.Header.Slider2.Subtitle1.Label"},{id:"Home.Header.Slider2.Subtitle2.Label",x:94.2,y:28,label:"Home.Header.Slider2.Subtitle2.Label",translationKey:"Home.Header.Slider2.Subtitle2.Label"},{id:"Home.Header.Slider2.Button",x:57,y:31.2,label:"Home.Header.Slider2.Button",translationKey:"Home.Header.Slider2.Button",isRedirectionNeeded:!0}]},Banner3:{image:"/screens/Home-Banner3.png",hotspots:[{id:"Home.Header.Slider3.Title",x:71,y:24.3,label:"Home.Header.Slider3.Title",translationKey:"Home.Header.Slider3.Title",isBannerNeeded:!0},{id:"Home.Header.Slider3.Subtitle1.Label",x:56,y:26.5,label:"Home.Header.Slider3.Subtitle1.Label",translationKey:"Home.Header.Slider3.Subtitle1.Label"},{id:"Home.Header.Slider3.Subtitle2.Label",x:50,y:28.4,label:"Home.Header.Slider3.Subtitle2.Label",translationKey:"Home.Header.Slider3.Subtitle2.Label"},{id:"Home.Header.Slider3.Button",x:52,y:31.5,label:"Home.Header.Slider3.Button",translationKey:"Home.Header.Slider3.Button",isRedirectionNeeded:!0}]}}}},ge=({screenId:l})=>{var S;const t=xe[l],[i,c]=a.useState(null),[u,m]=a.useState(void 0),[g,x]=a.useState(!1),[s,o]=a.useState("Banner1");if(a.useEffect(()=>{c(null),m(void 0),x(!1)},[s,l]),!t)return e.jsxs("div",{className:"text-red-600",children:["No config found for: ",l]});const r=l==="Home"&&(t!=null&&t.homeScreens)?t.homeScreens[s]:t,b=async d=>{};return e.jsxs("div",{children:[l==="Home"&&t.homeScreens&&e.jsx("div",{className:"mb-4 flex gap-2",children:e.jsx(X,{variant:"pill",className:"p-0",value:s,onClick:()=>c(null),onChange:o,children:e.jsx(Z,{className:"flex flex-col sm:flex-row gap-2",children:Object.keys(t.homeScreens).map(d=>e.jsx(ee,{value:d,children:d},d))})})}),e.jsxs("div",{className:"flex gap-4",children:[e.jsxs("div",{className:"relative flex-1 max-w-xl border rounded shadow h-full",children:[e.jsx("img",{src:r.image,alt:l,className:"w-full h-auto block select-none rounded"}),(S=r==null?void 0:r.hotspots)==null?void 0:S.map(d=>e.jsx("div",{className:"absolute flex items-center gap-1",style:{top:`${d.y}%`,left:`${d.x}%`,transform:"translate(-50%, -50%)"},children:e.jsx(Y,{className:"text-white bg-red-800 rounded-full p-1 shadow cursor-pointer hover:text-white",size:22,title:`Edit: ${d.label}`,onClick:()=>b()})},`${d.id}`))]}),e.jsx("div",{className:"flex-1 border rounded p-4 shadow h-full",children:i?e.jsx(e.Fragment,{children:g?e.jsx("p",{className:"text-gray-500",children:"Loading translation..."}):e.jsx(z,{categoryId:u,onDrawerClose:()=>c(null),fetchData:()=>{},initialValues:{translationKey:i.translationKey},isBannerNeeded:i==null?void 0:i.isBannerNeeded,isIconNeeded:i==null?void 0:i.isIconNeeded,isRedirectionNeeded:i==null?void 0:i.isRedirectionNeeded})}):e.jsx("div",{className:"text-gray-500 text-center mt-10",children:"📝 Click a pencil icon to edit translation"})})]})]})};_("TranslationData",U);const Xe=()=>{const[l,t]=a.useState([]);a.useState(!1),a.useState(!1);const[i,c]=a.useState(!1),[u,m]=a.useState(!1),[g,x]=a.useState(),s=oe("Mobile Screens"),[o,r]=a.useState(null),[b,S]=a.useState(!1),d={edit:s==null?void 0:s.isEdit,delete:s==null?void 0:s.isDelete,view:!1,translation:!0},H=()=>{c(!0)},C=()=>{c(!1)};P();const I=B();h(n=>{var p,y;return(y=(p=n==null?void 0:n.TranslationData)==null?void 0:p.data)==null?void 0:y.loading}),h(n=>{var p,y;return(y=(p=n==null?void 0:n.TranslationData)==null?void 0:p.data)==null?void 0:y.ScreenList}),a.useEffect(()=>{f()},[]);const f=()=>{},[q,W]=a.useState({pageSize:"",pageIndex:""}),O=(n,p)=>{p===V.edit&&(x(n.id),r({name:n==null?void 0:n.screenName,description:n==null?void 0:n.description,screenCode:n==null?void 0:n.screenCode}),m(!0)),p===V.delete&&(I(k(!0)),I(Q(n))),p===V.translation&&(r(n),S(!0))},T=()=>{m(!1),r(null)},R=()=>{S(!1),r(null)},$=[{dataField:"Action",caption:"Action",width:"10%",cellRender:n=>e.jsx("div",{"data-cname":"Action",children:e.jsx(te,{row:n==null?void 0:n.data,actions:d,buttonClick:O})})},{dataField:"screenName",caption:"Screen Name",width:"30%"},{dataField:"screenCode",caption:"Screen Code",width:"25%"},{dataField:"description",caption:"Description",width:"35%"}];return e.jsxs(e.Fragment,{children:[e.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:"Mobile Screens"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx(L,{onClick:()=>H(),block:!0,variant:"solid",size:"sm",icon:e.jsx(G,{}),children:"Add Screen"}),e.jsx(N,{title:"Add Screen",isOpen:i,onClose:C,onRequestClose:C,portalClassName:"w30",children:e.jsx(v,{onDrawerClose:C,fetchData:f})}),e.jsx(N,{title:"Edit Screen",isOpen:u,onClose:T,onRequestClose:T,portalClassName:"w30",children:e.jsx(v,{faqId:g,initialData:o,onDrawerClose:T,fetchData:f})})]})]})}),e.jsx(K,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:e.jsx(K,{className:"p-4",children:e.jsx(ie,{columns:$,tableName:"Screen-table",data:[],height:"calc(100vh - 280px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:l,setSelectedRowId:t,setFilterValues:()=>{},filterValues:[],identity:"Lead-Listing",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"Lead-Listing-table",handleSearch:()=>{},isColumnResizing:!0,pager:q,setPager:W,isPaginationReq:!0})})}),e.jsx(me,{fetchData:f}),e.jsx(N,{title:"Translate",isOpen:b,onClose:R,onRequestClose:R,portalClassName:"w100",children:o&&e.jsx(ge,{screenId:o==null?void 0:o.screenCode})})]})};export{Xe as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor-mui-69397583.js";import{d as i,aS as C,h as n,l as u,f,aT as k,aU as y,aV as N,aW as D,aX as L,aY as S,L as T,z as w,W as d,aZ as E,a_ as M,a$ as _,b0 as I,b1 as R,B as Y,b2 as h,N as c,b3 as A}from"./index-c62ac197.js";import{r as O}from"./vendor-react-ece1c85f.js";import{S as P}from"./Switcher-c8648037.js";import{R as U,a as H}from"./index-ec2010d2.js";import{S as v,B as $,I as z,R as m}from"./index-6b6d0f06.js";import{D as B}from"./DoubleSidedImage-ae98733b.js";const ie=a=>{const t=r=>{const{className:l,hoverable:s=!0}=r;return e.jsx(a,{...r,className:i("header-action-item",s&&"header-action-item-hoverable",l)})};return t.displayName=`withHeaderItem(${a.displayName||a.name||"Component"})`,t},G=()=>{const[a,t]=C(),r=O.useCallback(s=>{t(s?"dark":"light")},[t]),l=s=>e.jsx("div",{className:"text-lg",children:s});return e.jsx("div",{children:e.jsx(P,{defaultChecked:a,onChange:s=>r(s),unCheckedContent:l(e.jsx(U,{})),checkedContent:l(e.jsx(H,{}))})})},V=[{value:N,label:"Classic",src:"/img/thumbs/layouts/classic.jpg",srcDark:"/img/thumbs/layouts/classic-dark.jpg"},{value:D,label:"Mordern",src:"/img/thumbs/layouts/modern.jpg",srcDark:"/img/thumbs/layouts/modern-dark.jpg"},{value:L,label:"Simple",src:"/img/thumbs/layouts/simple.jpg",srcDark:"/img/thumbs/layouts/simple-dark.jpg"},{value:S,label:"Decked",src:"/img/thumbs/layouts/decked.jpg",srcDark:"/img/thumbs/layouts/decked-dark.jpg"},{value:T,label:"Blank",src:"/img/thumbs/layouts/blank.jpg",srcDark:"/img/thumbs/layouts/blank-dark.jpg"}],F=()=>{const a=n(s=>s.theme.layout.type),t=u(),r=s=>{t(w(s))},{textTheme:l}=f();return e.jsx("div",{children:e.jsx(v,{className:"w-full",value:[a],onChange:s=>r(s[0]),children:e.jsx("div",{className:"grid grid-cols-3 gap-4 w-full",children:V.map(s=>e.jsx(v.Item,{value:s.value,children:({active:o,onSegmentItemClick:g,disabled:p})=>e.jsxs("div",{className:"text-center",children:[e.jsx(k,{hoverable:!0,active:o,disabled:p,defaultGutter:!1,className:"relative min-h-[80px] w-full",customCheck:e.jsx(y,{className:i(l,"absolute top-2 right-2 text-lg")}),onSegmentItemClick:g,children:e.jsx(B,{className:"rounded-md",src:s.src,darkModeSrc:s.srcDark,alt:""})}),e.jsx("div",{className:i(o&&l,"mt-2 font-semibold"),children:s.label})]})},s.value))})})})},{Control:W}=I,x=[{label:"Red",value:"red"},{label:"Orange",value:"orange"},{label:"Amber",value:"amber"},{label:"Yellow",value:"yellow"},{label:"Lime",value:"lime"},{label:"Green",value:"green"},{label:"Emerald",value:"emerald"},{label:"Teal",value:"teal"},{label:"Cyan",value:"cyan"},{label:"Sky",value:"sky"},{label:"Blue",value:"blue"},{label:"Indigo",value:"indigo"},{label:"Violet",value:"violet"},{label:"Purple",value:"purple"},{label:"Fuchsia",value:"fuchsia"},{label:"Pink",value:"pink"},{label:"Rose",value:"rose"}],b=[{label:"400",value:400},{label:"500",value:500},{label:"600",value:600},{label:"700",value:700},{label:"800",value:800},{label:"900",value:900}],j=({className:a,themeColor:t})=>{const r=n(l=>l.theme.primaryColorLevel);return e.jsx($,{className:a,innerClass:i(`bg-${t}-${r}`)})},K=({innerProps:a,label:t,data:r,isSelected:l})=>e.jsxs("div",{className:`flex items-center justify-between p-2 ${l?"bg-gray-100 dark:bg-gray-500":"hover:bg-gray-50 dark:hover:bg-gray-600"}`,...a,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(j,{themeColor:r.value}),e.jsx("span",{children:t})]}),l&&e.jsx(E,{className:"text-emerald-500 text-xl"})]}),X=({children:a,...t})=>{const r=t.getValue()[0],l=n(s=>s.theme.themeColor);return e.jsxs(W,{...t,children:[r&&e.jsx(j,{themeColor:l,className:"ltr:ml-4 rtl:mr-4"}),a]})},Z=()=>{const a=u(),t=n(o=>o.theme.themeColor),r=n(o=>o.theme.primaryColorLevel),l=({value:o})=>{a(M(o))},s=({value:o})=>{a(_(o))};return e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(d,{size:"sm",options:x,components:{Option:K,Control:X},value:x.filter(o=>o.value===t),onChange:o=>l(o)}),e.jsx(d,{size:"sm",options:b,value:b.filter(o=>o.value===r),onChange:o=>s(o)})]})},q=[{value:h.DIR_LTR,label:"LTR"},{value:h.DIR_RTL,label:"RTL"}],J=({callBackClose:a})=>{const[t,r]=R(),l=s=>{r(s),a==null||a()};return e.jsx(z,{size:"sm",children:q.map(s=>e.jsx(Y,{active:t===s.value,onClick:()=>l(s.value),children:s.label},s.value))})},Q=()=>{const a=n(l=>l.theme.navMode),t=u(),r=l=>{t(A(l))};return e.jsxs(m.Group,{value:a===c?c:"default",onChange:r,children:[e.jsx(m,{value:"default",children:"Default"}),e.jsx(m,{value:c,children:"Themed"})]})},ee=({callBackClose:a})=>e.jsx("div",{className:"flex flex-col h-full justify-between",children:e.jsxs("div",{className:"flex flex-col gap-y-10 mb-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h6",{children:"Dark Mode"}),e.jsx("span",{children:"Switch theme to dark mode"})]}),e.jsx(G,{})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h6",{children:"Direction"}),e.jsx("span",{children:"Select a direction"})]}),e.jsx(J,{callBackClose:a})]}),e.jsxs("div",{children:[e.jsx("h6",{className:"mb-3",children:"Nav Mode"}),e.jsx(Q,{})]}),e.jsxs("div",{children:[e.jsx("h6",{className:"mb-3",children:"Theme"}),e.jsx(Z,{})]}),e.jsxs("div",{children:[e.jsx("h6",{className:"mb-3",children:"Layout"}),e.jsx(F,{})]})]})}),ce=a=>e.jsx(ee,{...a});export{ce as S,ie as w};
@@ -1,2 +0,0 @@
1
- import{j as e}from"./vendor-mui-69397583.js";import{n as ve,u as ye,M as be,U as je,s as Te,H as Se}from"./ClassicLayout-7d09e5ac.js";import{H as we,a as ke}from"./HorizontalMenuContent-96da38e1.js";import{g as ge,r as A,L as Ce,f as Oe,c as K}from"./vendor-react-ece1c85f.js";import{_ as Re,i as xe,c as Ee,d as ee,e as le,D as Ie,B as Ne,f as Me,g as Pe,h as ce,j as ze,P as Ae,b as Fe}from"./index-c62ac197.js";import{w as Le}from"./SidePanelContent-6b13836f.js";import{A as We}from"./ApiService-2b99757f.js";import{V as $e}from"./Views-74429e81.js";import{L as He}from"./Logo-3f3c9ee6.js";import"./vendor-pdf-b2a5d8b1.js";import"./Drawer-949c18c6.js";import"./index-c2088808.js";import"./useDidUpdate-25c4d4ed.js";import"./useControllableState-d0909575.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"./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";import"./index-ec2010d2.js";import"./DoubleSidedImage-ae98733b.js";async function Be(p){return We.fetchData({url:"/search/query",method:"post",data:p})}var De=Re,Ue=function(){return De.Date.now()},qe=Ue,Ge=/\s/;function Ye(p){for(var l=p.length;l--&&Ge.test(p.charAt(l)););return l}var Je=Ye,Xe=Je,Ke=/^\s+/;function Qe(p){return p&&p.slice(0,Xe(p)+1).replace(Ke,"")}var Ze=Qe,Ve=Ze,de=xe,_e=Ee,ue=0/0,et=/^[-+]0x[0-9a-f]+$/i,tt=/^0b[01]+$/i,rt=/^0o[0-7]+$/i,nt=parseInt;function it(p){if(typeof p=="number")return p;if(_e(p))return ue;if(de(p)){var l=typeof p.valueOf=="function"?p.valueOf():p;p=de(l)?l+"":l}if(typeof p!="string")return p===0?p:+p;p=Ve(p);var g=tt.test(p);return g||rt.test(p)?nt(p.slice(2),g?2:8):et.test(p)?ue:+p}var at=it,st=xe,ie=qe,fe=at,ot="Expected a function",lt=Math.max,ct=Math.min;function dt(p,l,g){var t,r,i,u,o,v,d=0,a=!1,h=!1,x=!0;if(typeof p!="function")throw new TypeError(ot);l=fe(l)||0,st(g)&&(a=!!g.leading,h="maxWait"in g,i=h?lt(fe(g.maxWait)||0,l):i,x="trailing"in g?!!g.trailing:x);function y(z){var W=t,S=r;return t=r=void 0,d=z,u=p.apply(S,W),u}function c(z){return d=z,o=setTimeout(f,l),a?y(z):u}function m(z){var W=z-v,S=z-d,$=l-W;return h?ct($,i-S):$}function T(z){var W=z-v,S=z-d;return v===void 0||W>=l||W<0||h&&S>=i}function f(){var z=ie();if(T(z))return w(z);o=setTimeout(f,m(z))}function w(z){return o=void 0,x&&t?y(z):(t=r=void 0,u)}function j(){o!==void 0&&clearTimeout(o),d=0,t=v=r=o=void 0}function O(){return o===void 0?u:w(ie())}function F(){var z=ie(),W=T(z);if(t=arguments,r=this,v=z,W){if(o===void 0)return c(v);if(h)return clearTimeout(o),o=setTimeout(f,l),y(v)}return o===void 0&&(o=setTimeout(f,l)),u}return F.cancel=j,F.flush=O,F}var ut=dt;const ft=ge(ut);var me={exports:{}};(function(p){p.exports=function(l){var g={};function t(r){if(g[r])return g[r].exports;var i=g[r]={exports:{},id:r,loaded:!1};return l[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}return t.m=l,t.c=g,t.p="",t(0)}([function(l,g,t){l.exports=t(1)},function(l,g,t){Object.defineProperty(g,"__esModule",{value:!0});function r(o){return o&&o.__esModule?o:{default:o}}var i=t(2),u=r(i);g.default=u.default,l.exports=g.default},function(l,g,t){Object.defineProperty(g,"__esModule",{value:!0});var r=Object.assign||function(c){for(var m=1;m<arguments.length;m++){var T=arguments[m];for(var f in T)Object.prototype.hasOwnProperty.call(T,f)&&(c[f]=T[f])}return c};g.default=y;function i(c){return c&&c.__esModule?c:{default:c}}function u(c,m){var T={};for(var f in c)m.indexOf(f)>=0||Object.prototype.hasOwnProperty.call(c,f)&&(T[f]=c[f]);return T}var o=t(3),v=t(4),d=i(v),a=t(14),h=t(15),x=i(h);y.propTypes={activeClassName:d.default.string,activeIndex:d.default.number,activeStyle:d.default.object,autoEscape:d.default.bool,className:d.default.string,findChunks:d.default.func,highlightClassName:d.default.oneOfType([d.default.object,d.default.string]),highlightStyle:d.default.object,highlightTag:d.default.oneOfType([d.default.node,d.default.func,d.default.string]),sanitize:d.default.func,searchWords:d.default.arrayOf(d.default.oneOfType([d.default.string,d.default.instanceOf(RegExp)])).isRequired,textToHighlight:d.default.string.isRequired,unhighlightTag:d.default.oneOfType([d.default.node,d.default.func,d.default.string]),unhighlightClassName:d.default.string,unhighlightStyle:d.default.object};function y(c){var m=c.activeClassName,T=m===void 0?"":m,f=c.activeIndex,w=f===void 0?-1:f,j=c.activeStyle,O=c.autoEscape,F=c.caseSensitive,z=F===void 0?!1:F,W=c.className,S=c.findChunks,$=c.highlightClassName,B=$===void 0?"":$,G=c.highlightStyle,Y=G===void 0?{}:G,Q=c.highlightTag,te=Q===void 0?"mark":Q,re=c.sanitize,J=c.searchWords,Z=c.textToHighlight,D=c.unhighlightTag,V=D===void 0?"span":D,_=c.unhighlightClassName,ne=_===void 0?"":_,s=c.unhighlightStyle,b=u(c,["activeClassName","activeIndex","activeStyle","autoEscape","caseSensitive","className","findChunks","highlightClassName","highlightStyle","highlightTag","sanitize","searchWords","textToHighlight","unhighlightTag","unhighlightClassName","unhighlightStyle"]),N=(0,o.findAll)({autoEscape:O,caseSensitive:z,findChunks:S,sanitize:re,searchWords:J,textToHighlight:Z}),R=te,k=-1,E="",C=void 0,I=function(L){var H={};for(var U in L)H[U.toLowerCase()]=L[U];return H},M=(0,x.default)(I);return(0,a.createElement)("span",r({className:W},b,{children:N.map(function(P,L){var H=Z.substr(P.start,P.end-P.start);if(P.highlight){k++;var U=void 0;typeof B=="object"?z?U=B[H]:(B=M(B),U=B[H.toLowerCase()]):U=B;var se=k===+w;E=U+" "+(se?T:""),C=se===!0&&j!=null?Object.assign({},Y,j):Y;var oe={children:H,className:E,key:L,style:C};return typeof R!="string"&&(oe.highlightIndex=k),(0,a.createElement)(R,oe)}else return(0,a.createElement)(V,{children:H,className:ne,key:L,style:s})})}))}l.exports=g.default},function(l,g){l.exports=function(t){var r={};function i(u){if(r[u])return r[u].exports;var o=r[u]={exports:{},id:u,loaded:!1};return t[u].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}return i.m=t,i.c=r,i.p="",i(0)}([function(t,r,i){t.exports=i(1)},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var u=i(2);Object.defineProperty(r,"combineChunks",{enumerable:!0,get:function(){return u.combineChunks}}),Object.defineProperty(r,"fillInChunks",{enumerable:!0,get:function(){return u.fillInChunks}}),Object.defineProperty(r,"findAll",{enumerable:!0,get:function(){return u.findAll}}),Object.defineProperty(r,"findChunks",{enumerable:!0,get:function(){return u.findChunks}})},function(t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.findAll=function(h){var x=h.autoEscape,y=h.caseSensitive,c=y===void 0?!1:y,m=h.findChunks,T=m===void 0?u:m,f=h.sanitize,w=h.searchWords,j=h.textToHighlight;return o({chunksToHighlight:i({chunks:T({autoEscape:x,caseSensitive:c,sanitize:f,searchWords:w,textToHighlight:j})}),totalLength:j?j.length:0})};var i=r.combineChunks=function(h){var x=h.chunks;return x=x.sort(function(y,c){return y.start-c.start}).reduce(function(y,c){if(y.length===0)return[c];var m=y.pop();if(c.start<=m.end){var T=Math.max(m.end,c.end);y.push({start:m.start,end:T})}else y.push(m,c);return y},[]),x},u=function(h){var x=h.autoEscape,y=h.caseSensitive,c=h.sanitize,m=c===void 0?v:c,T=h.searchWords,f=h.textToHighlight;return f=m(f),T.filter(function(w){return w}).reduce(function(w,j){j=m(j),x&&(j=d(j));for(var O=new RegExp(j,y?"g":"gi"),F=void 0;F=O.exec(f);){var z=F.index,W=O.lastIndex;W>z&&w.push({start:z,end:W}),F.index==O.lastIndex&&O.lastIndex++}return w},[])};r.findChunks=u;var o=r.fillInChunks=function(h){var x=h.chunksToHighlight,y=h.totalLength,c=[],m=function(w,j,O){j-w>0&&c.push({start:w,end:j,highlight:O})};if(x.length===0)m(0,y,!1);else{var T=0;x.forEach(function(f){m(T,f.start,!1),m(f.start,f.end,!0),T=f.end}),m(T,y,!1)}return c};function v(a){return a}function d(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}}])},function(l,g,t){(function(r){l.exports=t(13)()}).call(g,t(5))},function(l,g){var t=l.exports={},r,i;function u(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?r=setTimeout:r=u}catch{r=u}try{typeof clearTimeout=="function"?i=clearTimeout:i=o}catch{i=o}})();function v(w){if(r===setTimeout)return setTimeout(w,0);if((r===u||!r)&&setTimeout)return r=setTimeout,setTimeout(w,0);try{return r(w,0)}catch{try{return r.call(null,w,0)}catch{return r.call(this,w,0)}}}function d(w){if(i===clearTimeout)return clearTimeout(w);if((i===o||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(w);try{return i(w)}catch{try{return i.call(null,w)}catch{return i.call(this,w)}}}var a=[],h=!1,x,y=-1;function c(){!h||!x||(h=!1,x.length?a=x.concat(a):y=-1,a.length&&m())}function m(){if(!h){var w=v(c);h=!0;for(var j=a.length;j;){for(x=a,a=[];++y<j;)x&&x[y].run();y=-1,j=a.length}x=null,h=!1,d(w)}}t.nextTick=function(w){var j=new Array(arguments.length-1);if(arguments.length>1)for(var O=1;O<arguments.length;O++)j[O-1]=arguments[O];a.push(new T(w,j)),a.length===1&&!h&&v(m)};function T(w,j){this.fun=w,this.array=j}T.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={};function f(){}t.on=f,t.addListener=f,t.once=f,t.off=f,t.removeListener=f,t.removeAllListeners=f,t.emit=f,t.prependListener=f,t.prependOnceListener=f,t.listeners=function(w){return[]},t.binding=function(w){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(w){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},function(l,g,t){(function(r){var i=t(7),u=t(8),o=t(9),v=t(10),d=t(11),a=t(12);l.exports=function(h,x){var y=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function m(s){var b=s&&(y&&s[y]||s[c]);if(typeof b=="function")return b}var T="<<anonymous>>",f={array:F("array"),bool:F("boolean"),func:F("function"),number:F("number"),object:F("object"),string:F("string"),symbol:F("symbol"),any:z(),arrayOf:W,element:S(),instanceOf:$,node:Q(),objectOf:G,oneOf:B,oneOfType:Y,shape:te,exact:re};function w(s,b){return s===b?s!==0||1/s===1/b:s!==s&&b!==b}function j(s){this.message=s,this.stack=""}j.prototype=Error.prototype;function O(s){function b(R,k,E,C,I,M,P){return C=C||T,M=M||E,P!==d&&x&&u(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"),k[E]==null?R?k[E]===null?new j("The "+I+" `"+M+"` is marked as required "+("in `"+C+"`, but its value is `null`.")):new j("The "+I+" `"+M+"` is marked as required in "+("`"+C+"`, but its value is `undefined`.")):null:s(k,E,C,I,M)}var N=b.bind(null,!1);return N.isRequired=b.bind(null,!0),N}function F(s){function b(N,R,k,E,C,I){var M=N[R],P=D(M);if(P!==s){var L=V(M);return new j("Invalid "+E+" `"+C+"` of type "+("`"+L+"` supplied to `"+k+"`, expected ")+("`"+s+"`."))}return null}return O(b)}function z(){return O(i.thatReturnsNull)}function W(s){function b(N,R,k,E,C){if(typeof s!="function")return new j("Property `"+C+"` of component `"+k+"` has invalid PropType notation inside arrayOf.");var I=N[R];if(!Array.isArray(I)){var M=D(I);return new j("Invalid "+E+" `"+C+"` of type "+("`"+M+"` supplied to `"+k+"`, expected an array."))}for(var P=0;P<I.length;P++){var L=s(I,P,k,E,C+"["+P+"]",d);if(L instanceof Error)return L}return null}return O(b)}function S(){function s(b,N,R,k,E){var C=b[N];if(!h(C)){var I=D(C);return new j("Invalid "+k+" `"+E+"` of type "+("`"+I+"` supplied to `"+R+"`, expected a single ReactElement."))}return null}return O(s)}function $(s){function b(N,R,k,E,C){if(!(N[R]instanceof s)){var I=s.name||T,M=ne(N[R]);return new j("Invalid "+E+" `"+C+"` of type "+("`"+M+"` supplied to `"+k+"`, expected ")+("instance of `"+I+"`."))}return null}return O(b)}function B(s){if(!Array.isArray(s))return i.thatReturnsNull;function b(N,R,k,E,C){for(var I=N[R],M=0;M<s.length;M++)if(w(I,s[M]))return null;var P=JSON.stringify(s);return new j("Invalid "+E+" `"+C+"` of value `"+I+"` "+("supplied to `"+k+"`, expected one of "+P+"."))}return O(b)}function G(s){function b(N,R,k,E,C){if(typeof s!="function")return new j("Property `"+C+"` of component `"+k+"` has invalid PropType notation inside objectOf.");var I=N[R],M=D(I);if(M!=="object")return new j("Invalid "+E+" `"+C+"` of type "+("`"+M+"` supplied to `"+k+"`, expected an object."));for(var P in I)if(I.hasOwnProperty(P)){var L=s(I,P,k,E,C+"."+P,d);if(L instanceof Error)return L}return null}return O(b)}function Y(s){if(!Array.isArray(s))return i.thatReturnsNull;for(var b=0;b<s.length;b++){var N=s[b];if(typeof N!="function")return o(!1,"Invalid argument supplied to oneOfType. Expected an array of check functions, but received %s at index %s.",_(N),b),i.thatReturnsNull}function R(k,E,C,I,M){for(var P=0;P<s.length;P++){var L=s[P];if(L(k,E,C,I,M,d)==null)return null}return new j("Invalid "+I+" `"+M+"` supplied to "+("`"+C+"`."))}return O(R)}function Q(){function s(b,N,R,k,E){return J(b[N])?null:new j("Invalid "+k+" `"+E+"` supplied to "+("`"+R+"`, expected a ReactNode."))}return O(s)}function te(s){function b(N,R,k,E,C){var I=N[R],M=D(I);if(M!=="object")return new j("Invalid "+E+" `"+C+"` of type `"+M+"` "+("supplied to `"+k+"`, expected `object`."));for(var P in s){var L=s[P];if(L){var H=L(I,P,k,E,C+"."+P,d);if(H)return H}}return null}return O(b)}function re(s){function b(N,R,k,E,C){var I=N[R],M=D(I);if(M!=="object")return new j("Invalid "+E+" `"+C+"` of type `"+M+"` "+("supplied to `"+k+"`, expected `object`."));var P=v({},N[R],s);for(var L in P){var H=s[L];if(!H)return new j("Invalid "+E+" `"+C+"` key `"+L+"` supplied to `"+k+"`.\nBad object: "+JSON.stringify(N[R],null," ")+`
2
- Valid keys: `+JSON.stringify(Object.keys(s),null," "));var U=H(I,L,k,E,C+"."+L,d);if(U)return U}return null}return O(b)}function J(s){switch(typeof s){case"number":case"string":case"undefined":return!0;case"boolean":return!s;case"object":if(Array.isArray(s))return s.every(J);if(s===null||h(s))return!0;var b=m(s);if(b){var N=b.call(s),R;if(b!==s.entries){for(;!(R=N.next()).done;)if(!J(R.value))return!1}else for(;!(R=N.next()).done;){var k=R.value;if(k&&!J(k[1]))return!1}}else return!1;return!0;default:return!1}}function Z(s,b){return s==="symbol"||b["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&b instanceof Symbol}function D(s){var b=typeof s;return Array.isArray(s)?"array":s instanceof RegExp?"object":Z(b,s)?"symbol":b}function V(s){if(typeof s>"u"||s===null)return""+s;var b=D(s);if(b==="object"){if(s instanceof Date)return"date";if(s instanceof RegExp)return"regexp"}return b}function _(s){var b=V(s);switch(b){case"array":case"object":return"an "+b;case"boolean":case"date":case"regexp":return"a "+b;default:return b}}function ne(s){return!s.constructor||!s.constructor.name?T:s.constructor.name}return f.checkPropTypes=a,f.PropTypes=f,f}}).call(g,t(5))},function(l,g){function t(i){return function(){return i}}var r=function(){};r.thatReturns=t,r.thatReturnsFalse=t(!1),r.thatReturnsTrue=t(!0),r.thatReturnsNull=t(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(i){return i},l.exports=r},function(l,g,t){(function(r){function i(u,o,v,d,a,h,x,y){if(!u){var c;if(o===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var m=[v,d,a,h,x,y],T=0;c=new Error(o.replace(/%s/g,function(){return m[T++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}l.exports=i}).call(g,t(5))},function(l,g,t){(function(r){var i=t(7),u=i;l.exports=u}).call(g,t(5))},function(l,g){var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function u(v){if(v==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(v)}function o(){try{if(!Object.assign)return!1;var v=new String("abc");if(v[5]="de",Object.getOwnPropertyNames(v)[0]==="5")return!1;for(var d={},a=0;a<10;a++)d["_"+String.fromCharCode(a)]=a;var h=Object.getOwnPropertyNames(d).map(function(y){return d[y]});if(h.join("")!=="0123456789")return!1;var x={};return"abcdefghijklmnopqrst".split("").forEach(function(y){x[y]=y}),Object.keys(Object.assign({},x)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}l.exports=o()?Object.assign:function(v,d){for(var a,h=u(v),x,y=1;y<arguments.length;y++){a=Object(arguments[y]);for(var c in a)r.call(a,c)&&(h[c]=a[c]);if(t){x=t(a);for(var m=0;m<x.length;m++)i.call(a,x[m])&&(h[x[m]]=a[x[m]])}}return h}},function(l,g){var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";l.exports=t},function(l,g,t){(function(r){function i(u,o,v,d,a){}l.exports=i}).call(g,t(5))},function(l,g,t){var r=t(7),i=t(8),u=t(11);l.exports=function(){function o(a,h,x,y,c,m){m!==u&&i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}o.isRequired=o;function v(){return o}var d={array:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:v,element:o,instanceOf:v,node:o,objectOf:v,oneOf:v,oneOfType:v,shape:v,exact:v};return d.checkPropTypes=r,d.PropTypes=d,d}},function(l,g){l.exports=A},function(l,g){var t=function(u,o){return u===o};function r(i){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,o=void 0,v=[],d=void 0,a=!1,h=function(c,m){return u(c,v[m])},x=function(){for(var c=arguments.length,m=Array(c),T=0;T<c;T++)m[T]=arguments[T];return a&&o===this&&m.length===v.length&&m.every(h)||(a=!0,o=this,v=m,d=i.apply(this,m)),d};return x}l.exports=r}])})(me);var ht=me.exports;const pt=ge(ht),ae=[{title:"Recommended",data:[{title:"Cofiguration",url:"/app/configuration/role-list",icon:"guide",category:"cofiguration",categoryTitle:"Cofiguration"},{title:"Accounts",url:"/app/account/settings/profile",icon:"account",category:"Accounts",categoryTitle:"Accounts"}]}],gt=p=>{const{icon:l,label:g,url:t="",isLast:r,keyWord:i,onNavigate:u}=p,{textTheme:o}=Me();return e.jsx(Ce,{to:t,onClick:u,children:e.jsxs("div",{className:ee("flex items-center justify-between rounded-lg p-3.5 cursor-pointer user-select","bg-gray-50 dark:bg-gray-700/60 hover:bg-gray-100 dark:hover:bg-gray-700/90",!r&&"mb-3"),children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:ee("mr-4 rounded-md ring-1 ring-slate-900/5 shadow-sm text-xl group-hover:shadow h-6 w-6 flex items-center justify-center bg-white dark:bg-gray-700",o,"dark:text-gray-100"),children:l&&ve[l]}),e.jsx("div",{className:"text-gray-900 dark:text-gray-300",children:e.jsx(pt,{autoEscape:!0,highlightClassName:ee(o,"underline bg-transparent font-semibold dark:text-white"),searchWords:[i],textToHighlight:g})})]}),e.jsx(Pe,{className:"text-lg"})]})})},xt=({className:p})=>{var m;const[l,g]=A.useState(!1),[t,r]=A.useState(ae),[i,u]=A.useState(!1),o=A.useRef(null),v=()=>{u(!1),r(ae)},d=()=>{g(!0)},a=()=>{g(!1),i&&setTimeout(()=>{v()},300)},h=ft(x,200);async function x(T){if(!T){r(ae);return}i&&u(!1);const f=await Be({query:T});f.data&&(f.data.length===0&&u(!0),r(f.data))}const y=T=>{h(T.target.value)};A.useEffect(()=>{if(l){const T=setTimeout(()=>{var f;return(f=o.current)==null?void 0:f.focus()},100);return()=>{clearTimeout(T)}}},[l]);const c=()=>{a()};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:ee(p,"!p-0 !bg-transparent !rounded-none"),onClick:d,children:e.jsxs("div",{className:"flex items-center gap-2 px-3 py-[7px] rounded-full border border-white/[.12] bg-white/[.06] hover:bg-white/[.11] text-white/50 hover:text-white/80 transition-colors cursor-pointer",children:[e.jsx(le,{className:"text-sm flex-shrink-0"}),e.jsx("span",{className:"text-[13px] font-medium hidden md:block leading-none pr-0.5",children:"Search…"})]})}),e.jsx(Ie,{contentClassName:"p-0",isOpen:l,closable:!1,onRequestClose:a,children:e.jsxs("div",{children:[e.jsxs("div",{className:"px-4 flex items-center justify-between border-b border-gray-200 dark:border-gray-600",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(le,{className:"text-xl"}),e.jsx("input",{ref:o,className:"ring-0 outline-none block w-full p-4 text-base bg-transparent text-gray-900 dark:text-gray-100",placeholder:"Search...",onChange:y})]}),e.jsx(Ne,{size:"xs",onClick:a,children:"Esc"})]}),e.jsxs("div",{className:"py-6 px-5 max-h-[550px] overflow-y-auto",children:[t.map(T=>e.jsxs("div",{className:"mb-6",children:[e.jsx("h6",{className:"mb-3",children:T.title}),T.data.map((f,w)=>{var j;return e.jsx(gt,{icon:f.icon,label:f.title,url:f.url,keyWord:((j=o.current)==null?void 0:j.value)||"",onNavigate:c},f.title+w)})]},T.title)),t.length===0&&i&&e.jsxs("div",{className:"my-10 text-center text-lg",children:[e.jsx("span",{children:"No results for "}),e.jsxs("span",{className:"heading-text",children:["'",(m=o.current)==null?void 0:m.value,"'"]})]})]})]})})]})},mt=Le(xt),vt=p=>{const l=ce(i=>i.theme.mode),g=ce(i=>i.auth.user.authority),{menus:t}=p,{larger:r}=ye();return e.jsx(e.Fragment,{children:r.md&&e.jsx(we,{manuVariant:l,userAuthority:g,menus:t})})},n={ink:"#1B1B1B",orange:"#F15A22",muted:"#646464",line:"#E9E9E9",soft:"#F6F4F1",cream:"#FBF2EA",green:"#16A34A"},q=({name:p,size:l=16,stroke:g=1.7})=>{const t={width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:g,strokeLinecap:"round",strokeLinejoin:"round"},r={plus:e.jsx("path",{d:"M12 5v14M5 12h14"}),x:e.jsx("path",{d:"M18 6L6 18M6 6l12 12"}),chevronDown:e.jsx("path",{d:"M6 9l6 6 6-6"}),chevronRight:e.jsx("path",{d:"M9 6l6 6-6 6"}),folder:e.jsx("path",{d:"M3 7a2 2 0 012-2h4l2 2h8a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2z"}),file:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"}),e.jsx("path",{d:"M14 2v6h6"})]}),fileText:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"}),e.jsx("path",{d:"M14 2v6h6M16 13H8M16 17H8M10 9H8"})]}),table:e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),e.jsx("path",{d:"M3 9h18M3 15h18M9 3v18M15 3v18"})]}),barChart:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M3 3v18h18"}),e.jsx("rect",{x:"7",y:"12",width:"3",height:"6"}),e.jsx("rect",{x:"12",y:"8",width:"3",height:"10"}),e.jsx("rect",{x:"17",y:"5",width:"3",height:"13"})]}),kpi:e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),e.jsx("path",{d:"M7 14l3-3 3 3 4-5"})]}),map:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M9 4l-6 2v14l6-2 6 2 6-2V4l-6 2z"}),e.jsx("path",{d:"M9 4v14M15 6v14"})]}),calendar:e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"}),e.jsx("path",{d:"M16 2v4M8 2v4M3 10h18"})]}),chat:e.jsx("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"}),alert:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M10.3 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"}),e.jsx("path",{d:"M12 9v4M12 17h.01"})]}),grid:e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1"}),e.jsx("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1"}),e.jsx("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1"}),e.jsx("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1"})]}),donut:e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:"12",cy:"12",r:"9"}),e.jsx("circle",{cx:"12",cy:"12",r:"4"})]}),layout:e.jsxs(e.Fragment,{children:[e.jsx("rect",{x:"3",y:"3",width:"7",height:"9",rx:"1.5"}),e.jsx("rect",{x:"14",y:"3",width:"7",height:"5",rx:"1.5"}),e.jsx("rect",{x:"14",y:"12",width:"7",height:"9",rx:"1.5"}),e.jsx("rect",{x:"3",y:"16",width:"7",height:"5",rx:"1.5"})]}),check:e.jsx("path",{d:"M20 6L9 17l-5-5"}),arrowRight:e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M5 12h14"}),e.jsx("path",{d:"M13 5l7 7-7 7"})]})};return e.jsx("svg",{...t,children:r[p]??null})},he=[{id:"operations",label:"Operations",children:[{id:"fleet",label:"Fleet"},{id:"transloads",label:"Transloads"},{id:"incidents",label:"Incidents"}]},{id:"compliance",label:"Compliance",children:[{id:"audits",label:"Audits"},{id:"permits",label:"Permits"}]},{id:"people",label:"People",children:[{id:"directory",label:"Directory"},{id:"training",label:"Training"}]},{id:"analytics",label:"Analytics",children:[{id:"exec",label:"Executive overview"},{id:"ops-kpis",label:"Ops KPIs"}]}],X={fontSize:12,fontWeight:700,color:n.muted,textTransform:"uppercase",letterSpacing:"0.06em",display:"block",marginBottom:6},pe={width:"100%",padding:"8px 10px",border:`1.5px solid ${n.line}`,borderRadius:6,fontSize:14,outline:"none",boxSizing:"border-box",color:n.ink,background:"#fff"},yt=({value:p,onChange:l})=>{const[g,t]=A.useState(p.mode||"child"),[r,i]=A.useState(p.parent||"operations"),[u,o]=A.useState("operations"),v=(a,h)=>{if(t(a),i(h),a==="parent")l({mode:"parent"});else{const x=he.find(y=>y.id===h);l({mode:"child",parent:h,parentLabel:x==null?void 0:x.label})}},d=({active:a,title:h,desc:x,onClick:y})=>e.jsxs("div",{onClick:y,style:{display:"flex",alignItems:"flex-start",gap:12,padding:"12px 14px",borderRadius:8,border:`2px solid ${a?n.orange:n.line}`,background:a?n.cream:"#fff",cursor:"pointer",marginBottom:8},children:[e.jsx("div",{style:{width:18,height:18,borderRadius:"50%",border:`2px solid ${a?n.orange:"#CCC"}`,background:a?n.orange:"transparent",flexShrink:0,marginTop:1,display:"flex",alignItems:"center",justifyContent:"center"},children:a&&e.jsx("div",{style:{width:6,height:6,borderRadius:"50%",background:"#fff"}})}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:15,fontWeight:700,color:n.ink},children:h}),e.jsx("div",{style:{fontSize:15,color:n.muted,marginTop:2},children:x})]})]});return e.jsxs("div",{children:[e.jsx(d,{active:g==="child",title:"Place under an existing parent",desc:"Adds this as a child link inside a current navigation group.",onClick:()=>v("child",r)}),e.jsx(d,{active:g==="parent",title:"Make it its own top-level parent",desc:"Adds a new section to the main navigation bar.",onClick:()=>{t("parent"),l({mode:"parent"})}}),g==="child"&&e.jsxs("div",{style:{marginTop:4},children:[e.jsx("div",{style:{fontSize:15,color:n.muted,marginBottom:6},children:"Pick the parent group:"}),e.jsxs("div",{style:{border:`1px solid ${n.line}`,borderRadius:8,overflow:"hidden"},children:[he.map(a=>e.jsxs("div",{children:[e.jsxs("div",{onClick:()=>{const h=u===a.id?null:a.id;o(h),v("child",a.id)},style:{display:"flex",alignItems:"center",gap:8,padding:"9px 12px",borderBottom:`1px solid ${n.line}`,cursor:"pointer",background:r===a.id?n.cream:"#fff",fontSize:15,fontWeight:600,color:n.ink},children:[e.jsx(q,{name:"folder",size:14}),a.label,e.jsx("span",{style:{marginLeft:"auto",fontSize:14,color:n.muted,background:n.soft,borderRadius:999,padding:"1px 6px"},children:a.children.length}),e.jsx(q,{name:u===a.id?"chevronDown":"chevronRight",size:12})]}),u===a.id&&a.children.map(h=>e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px 8px 32px",borderBottom:"1px solid #F8F8F8",fontSize:14,color:n.muted,background:"#FAFAFA"},children:[e.jsx(q,{name:"file",size:12}),h.label]},h.id))]},a.id)),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"9px 12px",fontSize:15,color:n.muted,cursor:"pointer"},onMouseEnter:a=>a.currentTarget.style.background=n.soft,onMouseLeave:a=>a.currentTarget.style.background="transparent",children:[e.jsx(q,{name:"plus",size:14}),"Create new parent group…"]})]})]})]})},bt=({onClose:p,onCreate:l})=>{const g=Oe(),t="page",[r,i]=A.useState(1),[u,o]=A.useState(""),[v,d]=A.useState(""),[a,h]=A.useState("fileText"),[x,y]=A.useState({mode:"child",parent:"operations",parentLabel:"Operations"}),[c,m]=A.useState("team"),[T]=A.useState("5m"),[f,w]=A.useState("title"),j=A.useRef(void 0),O=A.useRef(void 0),F=r===1&&!u.trim();A.useEffect(()=>{if(r===1){if(clearTimeout(j.current),clearTimeout(O.current),!u.trim()){w("title");return}if(!v.trim()){j.current=setTimeout(()=>w("desc"),3e3);return}return w("desc"),O.current=setTimeout(()=>w("next"),5e3),()=>{clearTimeout(j.current),clearTimeout(O.current)}}},[u,v,r]),A.useEffect(()=>{r>=2&&w("next")},[r]);const z=["fileText","layout","table","map","calendar","chat"],W=()=>{const S={kind:t,title:u.trim(),desc:v.trim(),nav:x,icon:a,refresh:T,audience:c,slots:[]};l&&l(S),p(),g("/build/page-builder",{state:{openBuilder:!0,artifact:S}})};return e.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.45)",zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center"},onClick:S=>{S.target===S.currentTarget&&p()},children:e.jsxs("div",{style:{background:"#fff",borderRadius:20,width:560,maxHeight:"90vh",display:"flex",flexDirection:"column",boxShadow:"0 30px 80px rgba(0,0,0,0.22)",overflow:"hidden"},children:[e.jsxs("div",{style:{padding:"18px 22px",borderBottom:`1px solid ${n.line}`,display:"flex",alignItems:"center",gap:12},children:[e.jsx("div",{style:{width:36,height:36,borderRadius:9,background:n.cream,display:"grid",placeItems:"center",color:n.orange,flexShrink:0},children:e.jsx(q,{name:"layout",size:18})}),e.jsxs("div",{style:{flex:1},children:[e.jsx("h3",{style:{fontWeight:900,fontSize:18,color:n.ink,margin:0},children:"Build a Page"}),e.jsx("div",{style:{fontSize:14,color:n.muted,marginTop:2},children:"End-user screen with mixed components."})]}),e.jsx("button",{onClick:p,style:{width:28,height:28,borderRadius:7,border:`1px solid ${n.line}`,background:n.soft,display:"grid",placeItems:"center",cursor:"pointer"},children:e.jsx(q,{name:"x",size:13})})]}),e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"14px 22px",borderBottom:`1px solid ${n.line}`,gap:0},children:[["Basics",1],["Navigation",2],["Review",3]].map(([S,$],B)=>{const G=r>$,Y=r===$;return e.jsxs(K.Fragment,{children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx("div",{style:{width:26,height:26,borderRadius:"50%",background:G?n.green:Y?n.orange:n.line,color:G||Y?"#fff":n.muted,display:"grid",placeItems:"center",fontSize:15,fontWeight:700,flexShrink:0},children:G?e.jsx(q,{name:"check",size:11,stroke:3}):$}),e.jsx("span",{style:{fontSize:14,fontWeight:700,color:Y?n.ink:n.muted},children:S})]}),B<2&&e.jsx("div",{style:{flex:1,height:1,background:n.line,margin:"0 12px"}})]},S)})}),e.jsxs("div",{style:{flex:1,overflow:"auto",padding:22},children:[r===1&&e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:14},children:[e.jsxs("div",{style:{padding:"12px 14px",borderRadius:10,border:`2px solid ${f==="title"?n.orange:n.line}`,background:f==="title"?n.cream:"#fff",transition:"border-color 0.2s, background 0.2s"},children:[e.jsxs("label",{style:{...X,color:f==="title"?n.orange:n.muted},children:["Page title ",e.jsx("span",{style:{color:"#DC2626"},children:"*"})]}),e.jsx("div",{style:{fontSize:15,color:n.muted,marginBottom:8},children:"Shown in the nav, the breadcrumb and the browser tab."}),e.jsx("input",{style:{...pe},value:u,onChange:S=>o(S.target.value),placeholder:"e.g. Driver Performance",autoFocus:!0,onFocus:S=>S.currentTarget.style.borderColor=n.orange,onBlur:S=>S.currentTarget.style.borderColor=n.line})]}),e.jsxs("div",{style:{padding:"12px 14px",borderRadius:10,border:`2px solid ${f==="desc"?n.orange:n.line}`,background:f==="desc"?n.cream:"#fff",transition:"border-color 0.2s, background 0.2s"},children:[e.jsxs("label",{style:{...X,color:f==="desc"?n.orange:n.muted},children:["Description ",e.jsx("span",{style:{fontSize:14,color:n.muted,fontWeight:400,textTransform:"none",letterSpacing:"normal"},children:"optional"})]}),e.jsx("div",{style:{fontSize:15,color:n.muted,marginBottom:8},children:"A short one-liner that helps your team find this page later."}),e.jsx("textarea",{style:{...pe,resize:"none",height:68},value:v,onChange:S=>d(S.target.value),placeholder:"Track on-time delivery, idle time and route adherence per driver.",onFocus:S=>S.currentTarget.style.borderColor=n.orange,onBlur:S=>S.currentTarget.style.borderColor=n.line})]}),e.jsxs("div",{children:[e.jsx("label",{style:X,children:"Icon"}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:z.map(S=>e.jsxs("button",{onClick:()=>h(S),style:{display:"inline-flex",alignItems:"center",gap:6,padding:"6px 10px",borderRadius:8,border:`1.5px solid ${a===S?n.orange:n.line}`,background:a===S?n.cream:"transparent",color:a===S?n.orange:n.muted,fontSize:14,fontWeight:700,cursor:"pointer"},children:[e.jsx(q,{name:S,size:12}),S]},S))})]})]}),r===2&&e.jsxs("div",{children:[e.jsxs("label",{style:X,children:["Navigation location ",e.jsx("span",{style:{color:"#DC2626"},children:"*"})]}),e.jsx("div",{style:{fontSize:15,color:n.muted,marginBottom:12},children:"Where should this page appear in the navigation?"}),e.jsx(yt,{value:x,onChange:y}),e.jsxs("div",{style:{marginTop:14,padding:"10px 14px",background:n.soft,borderRadius:8,fontSize:12},children:["Will be reachable at:",e.jsxs("div",{style:{fontFamily:"IBM Plex Mono, monospace",fontSize:15,color:n.orange,marginTop:4},children:["/",x.mode==="parent"?u.toLowerCase().replace(/\s+/g,"-")||"new-parent":`${x.parent}/${(u||"untitled").toLowerCase().replace(/\s+/g,"-")}`]})]})]}),r===3&&e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:14},children:[e.jsxs("div",{children:[e.jsx("label",{style:X,children:"Audience"}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:[["team","My team"],["org","Whole org"],["execs","Executives only"],["external","External clients"]].map(([S,$])=>e.jsx("button",{onClick:()=>m(S),style:{padding:"6px 12px",borderRadius:8,border:`1.5px solid ${c===S?n.orange:n.line}`,background:c===S?n.cream:"transparent",color:c===S?n.orange:n.muted,fontSize:14,fontWeight:700,cursor:"pointer"},children:$},S))})]}),e.jsxs("div",{style:{background:"#FAFAFA",border:`1px solid ${n.line}`,borderRadius:10,padding:"14px 16px"},children:[e.jsx("div",{style:{fontWeight:700,fontSize:15,color:n.muted,letterSpacing:"0.06em",textTransform:"uppercase",marginBottom:10},children:"Review"}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"100px 1fr",gap:"8px 14px",fontSize:13},children:[e.jsx("div",{style:{color:n.muted},children:"Type"}),e.jsx("div",{children:e.jsx("b",{children:"Page"})}),e.jsx("div",{style:{color:n.muted},children:"Title"}),e.jsx("div",{children:e.jsx("b",{children:u||"—"})}),e.jsx("div",{style:{color:n.muted},children:"Description"}),e.jsx("div",{children:v||e.jsx("i",{style:{color:n.muted},children:"(none)"})}),e.jsx("div",{style:{color:n.muted},children:"Navigation"}),e.jsx("div",{children:x.mode==="parent"?e.jsx("span",{children:"New top-level parent"}):e.jsxs("span",{children:["Under ",e.jsx("b",{children:x.parentLabel})]})}),e.jsx("div",{style:{color:n.muted},children:"Audience"}),e.jsx("div",{children:c})]})]})]})]}),e.jsxs("div",{style:{padding:"14px 22px",borderTop:`1px solid ${n.line}`,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs("div",{style:{fontSize:14,color:n.muted},children:["Step ",r," of 3"]}),e.jsxs("div",{style:{display:"flex",gap:8},children:[r>1&&e.jsx("button",{onClick:()=>i(S=>S-1),style:{padding:"8px 16px",fontSize:15,fontWeight:700,color:n.muted,border:`1px solid ${n.line}`,borderRadius:8,background:"transparent",cursor:"pointer"},children:"Back"}),e.jsx("button",{onClick:p,style:{padding:"8px 16px",fontSize:15,fontWeight:700,color:n.muted,border:`1px solid ${n.line}`,borderRadius:8,background:"transparent",cursor:"pointer"},children:"Cancel"}),r<3?e.jsxs("button",{onClick:()=>i(S=>S+1),disabled:F,style:{display:"flex",alignItems:"center",gap:6,padding:"8px 20px",fontSize:15,fontWeight:700,color:"#fff",background:F?"#CCC":n.orange,border:"none",borderRadius:8,cursor:F?"not-allowed":"pointer",opacity:F?.6:1},children:["Continue ",e.jsx(q,{name:"arrowRight",size:14,stroke:2.2})]}):e.jsx("button",{onClick:W,style:{display:"flex",alignItems:"center",gap:6,padding:"8px 20px",fontSize:15,fontWeight:700,color:"#fff",background:n.orange,border:"none",borderRadius:8,cursor:"pointer"},children:"Create page"})]})]})]})})},jt=K.memo(p=>{const{menus:l}=p;return e.jsxs(e.Fragment,{children:[e.jsx(ke,{}),e.jsx(He,{type:"streamline",mode:"dark",logoWidth:"30px",imgClass:"mx-auto mobile-only"}),e.jsx(be,{menus:l}),e.jsx("div",{className:"hidden md:block h-[18px] w-px bg-white/[.14] mx-3 flex-shrink-0"}),e.jsx("div",{className:"hidden md:flex flex-1 min-w-0",children:e.jsx(vt,{menus:l})})]})}),Tt=K.memo(({onOpen:p})=>e.jsxs("button",{onClick:p,className:"hidden md:flex items-center gap-1.5 text-[12px] font-bold text-white/65 hover:text-white border border-white/[.14] hover:border-white/[.28] rounded-md px-2.5 py-[5px] mr-1 transition-colors flex-shrink-0 cursor-pointer bg-transparent",children:[e.jsx(ze,{className:"text-sm"})," Builder"]})),St=K.memo(({onOpenWizard:p})=>e.jsxs(e.Fragment,{children:[e.jsx(Tt,{onOpen:p}),e.jsx(mt,{}),e.jsx(je,{hoverable:!1})]})),wt=()=>{const[p,l]=A.useState([]),[g,t]=A.useState(!1);A.useEffect(()=>{r()},[]);const r=async()=>{var u;const i=localStorage.getItem(Ae);if(i){const o=await Fe(i,"default"),v=Te((u=o==null?void 0:o.data)==null?void 0:u.$values);l(v??[])}else l([])};return e.jsxs("div",{className:"app-layout-simple flex flex-auto flex-col min-h-screen",children:[e.jsx("div",{className:"flex flex-auto min-w-0",children:e.jsxs("div",{className:"flex flex-col flex-auto min-h-screen min-w-0 relative w-full",children:[e.jsx(Se,{className:"header-ca-ink",headerStart:e.jsx(jt,{menus:p}),headerEnd:e.jsx(St,{onOpenWizard:()=>t(!0)})}),e.jsx($e,{pageContainerType:"default"})]})}),g&&e.jsx(bt,{onClose:()=>t(!1)})]})},rr=K.memo(wt);export{rr as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor-mui-69397583.js";import{c as r,r as i}from"./vendor-react-ece1c85f.js";import{M as c,U as p,s as d,H as x}from"./ClassicLayout-7d09e5ac.js";import{V as f}from"./Views-74429e81.js";import{P as u,b as j}from"./index-c62ac197.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"./vendor-pdf-b2a5d8b1.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"./Logo-3f3c9ee6.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 h=r.memo(({menus:s})=>e.jsx(e.Fragment,{children:e.jsx(c,{menus:s})})),v=r.memo(()=>e.jsx(e.Fragment,{children:e.jsx(p,{hoverable:!1})})),S=()=>{const[s,m]=i.useState([]);i.useEffect(()=>{l()},[]);const l=async()=>{var a;const t=localStorage.getItem(u);if(t){const o=await j(t,"default"),n=d((a=o==null?void 0:o.data)==null?void 0:a.$values);m(n??[])}};return e.jsx("div",{className:"app-layout-stacked-side flex flex-auto flex-col",children:e.jsxs("div",{className:"flex flex-auto min-w-0",children:[e.jsx("nav",{className:"stacked-side-nav",children:s.map(t=>e.jsx("div",{children:t.name},t.id))}),e.jsxs("div",{className:"flex flex-col flex-auto min-h-screen min-w-0 relative w-full",children:[e.jsx(x,{className:"shadow dark:shadow-2xl",headerStart:e.jsx(h,{menus:s}),headerEnd:e.jsx(v,{})}),e.jsx("div",{className:"h-full flex flex-auto flex-col",children:e.jsx(f,{})})]})]})})},Q=r.memo(S);export{Q as default};
@@ -1 +0,0 @@
1
- import{j as l}from"./vendor-mui-69397583.js";import{r as s}from"./vendor-react-ece1c85f.js";import{d}from"./index-c62ac197.js";const x=o=>{const{children:c,className:n,stickyClass:i,...a}=o,[f,m]=s.useState(!1),e=s.useRef(null);return s.useEffect(()=>{const t=e.current,r=new IntersectionObserver(([u])=>m(u.intersectionRatio<1),{threshold:[1]});return r.observe(t),function(){r.unobserve(t)}},[]),l.jsx("div",{id:"actions-footer",ref:e,className:d("sticky",n,f&&i),...a,children:c})};export{x as S};
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor-mui-69397583.js";import{A as M}from"./AdaptableCard-df7695d6.js";import{r as l,f as z}from"./vendor-react-ece1c85f.js";import{a as B,u as L,g as P,r as V}from"./index-16bb10a6.js";import{F as G,W as E,B as T,Y as H,l as U,ab as W,f as Z,Z as $}from"./index-c62ac197.js";import{D as _}from"./tableV2-4d1c9fd2.js";import"./Alert-7dfbd254.js";import{B as c}from"./index-6b6d0f06.js";import{a as J,C as k}from"./index-c2088808.js";import{D as K}from"./Drawer-949c18c6.js";import{a as Y}from"./FormContainer-91c2b0e4.js";import"./Switcher-c8648037.js";import"./index-36228db5.js";import"./Upload-fb34ce03.js";import{f as Q}from"./UserService-047aef51.js";import{A as X,T as ee}from"./actioncell-17e12e21.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 te=({onSaveClick:a,onCancel:d,onClearFilters:t})=>e.jsxs("div",{className:"text-right w-full",children:[e.jsx(T,{size:"sm",className:"mr-2",onClick:t,children:"Clear All"}),e.jsx(T,{size:"sm",className:"mr-2",onClick:d,children:"Cancel"}),e.jsx(T,{size:"sm",variant:"solid",onClick:a,children:"Apply"})]}),ae=a=>{var g,b,C,s;const[d,t]=l.useState(!1),[D,F]=l.useState(((g=a==null?void 0:a.filters)==null?void 0:g.name)||""),[m,f]=l.useState(((b=a==null?void 0:a.filters)==null?void 0:b.company)||null),[h,x]=l.useState(((C=a==null?void 0:a.filters)==null?void 0:C.status)||null),[S,p]=l.useState(((s=a==null?void 0:a.filters)==null?void 0:s.registrationDate)||null),[N,R]=l.useState([]),[w,O]=l.useState([]),A=G(n=>{var o;return(o=n.auth.session)==null?void 0:o.tenantId});l.useEffect(()=>{(async()=>{var o,i,y;try{const I=await Q({},A,!0,"Customer");R((o=I.data.$values)==null?void 0:o.map(u=>({value:u.id,label:`${u.firstName} ${u.lastName}`})));const q=await B();O((y=(i=q==null?void 0:q.data)==null?void 0:i.finalResults)==null?void 0:y.$values.map(u=>({value:u.id,label:u.title})))}catch(I){console.error("Failed to fetch options",I)}})()},[]);const r=()=>{t(!1),a.onClose()},j=()=>{a.setFilters({company:{label:"",value:""},status:{label:"",value:""},registrationDate:null}),f(null),x(null),p(null),t(!1),a.onClose()},v=()=>{a.setFilters({company:m,status:h,registrationDate:S}),t(!1),a.onClose()};return l.useEffect(()=>{a.isOpen&&t(!0)},[a.isOpen]),l.useEffect(()=>{var n,o,i,y;F(((n=a.filters)==null?void 0:n.name)||""),f(((o=a.filters)==null?void 0:o.company)||null),x(((i=a.filters)==null?void 0:i.status)||null),p(((y=a.filters)==null?void 0:y.registrationDate)||null)},[a.filters]),e.jsxs(K,{title:"Filters",isOpen:d,portalClassName:"w30",footer:e.jsx(te,{onCancel:r,onSaveClick:v,onClearFilters:j}),onClose:r,onRequestClose:r,children:[e.jsx("div",{className:"mb-5",children:e.jsx(Y,{label:"Date",children:e.jsx(J,{value:S,onChange:p,placeholder:"Select date"})})}),e.jsx("div",{className:"mb-5",children:e.jsx(Y,{label:"Type",children:e.jsx(E,{options:w,value:h,onChange:n=>x(n),placeholder:"Select Type",isClearable:!0})})}),e.jsx("div",{className:"mb-5",children:e.jsx(Y,{label:"Customer",children:e.jsx(E,{options:N,value:m,onChange:n=>f(n),placeholder:"Select Customer",isClearable:!0})})})]})},se=a=>{switch(a){case"ReOpened":return e.jsx(c,{content:"Reopened",className:"text-yellow-700 bg-yellow-100 border border-yellow-300 px-2 py-0.5 rounded-full text-xs font-medium"});case"PendingCustomerConfirmation":return e.jsx(c,{content:"PendingCustomerConfirmation",className:"text-yellow-700 bg-yellow-100 border border-yellow-300 px-2 py-0.5 rounded-full text-xs font-medium"});case"Open":return e.jsx(c,{content:"Open",className:"text-orange-700 bg-orange-100 border border-orange-300 px-2 py-0.5 rounded-full text-xs font-medium"});case"NeedReview":return e.jsx(c,{content:"NeedReview",className:"text-orange-700 bg-orange-100 border border-orange-300 px-2 py-0.5 rounded-full text-xs font-medium"});case"Closed":return e.jsx(c,{content:"Closed",className:"text-red-700 bg-red-100 border border-red-300 px-2 py-0.5 rounded-full text-xs font-medium"});case"Resolved":return e.jsx(c,{content:"Resolved",className:"text-green-700 bg-green-100 border border-green-300 px-2 py-0.5 rounded-full text-xs font-medium"});default:return e.jsx(c,{content:a,className:"text-gray-700 bg-gray-100 border border-gray-300 px-2 py-0.5 rounded-full text-xs font-medium"})}};H("SupportData",V);const le={edit:!1,delete:!1,view:!0},qe=()=>{var j,v,g,b,C;const[a,d]=l.useState([]);l.useState(!1),l.useState(!1),l.useState(!1),l.useState(!1),l.useState(),l.useState(null);const[t,D]=l.useState({name:"",company:"",status:"",registrationDate:null}),[F,m]=l.useState(!1),f=()=>m(!0),h=()=>m(!1);l.useState(null),l.useState([new Date,new Date]);const x=z(),S=U();L(s=>s.SupportData.data.filterData);const p=L(s=>s.SupportData.data.loading),N=L(s=>{var n,o;return(o=(n=s==null?void 0:s.SupportData)==null?void 0:n.data)==null?void 0:o.ticketList});l.useState(!1),l.useState(null),W.getState(),Z(),l.useEffect(()=>{R()},[t]);const R=()=>{var o,i;const s={name:t.name||null,company:((o=t==null?void 0:t.company)==null?void 0:o.value)||null,status:((i=t==null?void 0:t.status)==null?void 0:i.value)||null,registrationDate:t.registrationDate?$(t.registrationDate).format("YYYY-MM-DD"):null},n=P(s);S(n)},w=s=>{x("/app/ticket-details/"+s.id)},O=(s,n)=>{n===ee.view&&w(s)},A=[{dataField:"Action",caption:"Action",cellRender:s=>e.jsx("div",{children:e.jsx(X,{row:s==null?void 0:s.data,actions:le,buttonClick:O})})},{dataField:"customer",caption:"Customer Name"},{dataField:"title",caption:"Title",cssClass:"truncate-cell"},{dataField:"description",caption:"Description",width:500,cssClass:"truncate-cell"},{dataField:"supportCategory",caption:"Request Category"},{dataField:"createdDate",caption:"Requested Date",dataType:"date",format:"MM/dd/yyyy"},{dataField:"status",caption:"Status",cellRender:s=>{var n;return e.jsx("div",{"data-cname":"Status",children:se((n=s==null?void 0:s.data)==null?void 0:n.status)})}}],r=s=>{D(n=>({...n,[s]:void 0}))};return e.jsxs(e.Fragment,{children:[e.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:"Support Request"}),e.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center"})]})}),e.jsx(M,{className:"m-6 h-full bg-transparent",bodyClass:"h-full",children:e.jsxs(M,{className:"p-4 borderless",children:[e.jsxs("div",{className:"text-right mb-3",children:[((j=t==null?void 0:t.company)==null?void 0:j.value)&&e.jsx(k,{title:"Customer",value:(v=t==null?void 0:t.company)==null?void 0:v.label,onRemovefilter:r,tagId:"company"}),((g=t==null?void 0:t.status)==null?void 0:g.value)&&e.jsx(k,{title:"Type",value:(b=t==null?void 0:t.status)==null?void 0:b.label,onRemovefilter:r,tagId:"status"}),(t==null?void 0:t.registrationDate)&&e.jsx(k,{title:"Date",value:(C=$(t.registrationDate))==null?void 0:C.format("MM/DD/YYYY"),onRemovefilter:r,tagId:"registrationDate"})]}),e.jsx(_,{columns:A,tableName:"SupportRequest-table",data:N||[],height:"calc(100vh - 270px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:a,setSelectedRowId:d,setFilterValues:()=>{},filterValues:[],identity:"Lead-Listing",isColumnReorderReq:!0,setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"Lead-Listing-table",handleSearch:()=>{},isColumnResizing:!0,isPaginationReq:!0,isSelectionReq:!1,isFilterReq:!0,openFilter:f,isLoading:p})]})}),e.jsx(ae,{isOpen:F,onClose:h,filters:t,setFilters:D})]})};export{qe as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor-mui-69397583.js";import{A as T}from"./AdaptableCard-df7695d6.js";import{j as J,r,f as K}from"./vendor-react-ece1c85f.js";import{u as p,d as X,r as Z}from"./index-f1576468.js";import{Y as _,l as G,ab as I,f as ee,B as A,V as se,O as C,Q as k}from"./index-c62ac197.js";import"./Alert-7dfbd254.js";import"./index-6b6d0f06.js";import"./index-c2088808.js";import{D as te}from"./Drawer-949c18c6.js";import"./FormContainer-91c2b0e4.js";import"./Switcher-c8648037.js";import"./index-36228db5.js";import"./Upload-fb34ce03.js";import{m as re}from"./TimeLogService-cd7b2f61.js";import{A as ae,I as $,b as ie}from"./InlineSignaturePad-09c06619.js";import{L as oe}from"./Logo-3f3c9ee6.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"./index-b028e652.js";import"./StickyFooter-5b934274.js";import"./index-e4c6057f.js";const ne=[{key:"auto",name:"Immediately"},{key:"onClick",name:"On Button Click"}],le=[{key:"dragAndDrop",name:"Drag and drop"},{key:"select",name:"Select"}],de=["nextColumn","widget"];_("TimeLogData",Z);const Ve=()=>{var w,L;let{id:d}=J();r.useState([]);const[B,ce]=r.useState(!1);r.useState(!1);const[M,F]=r.useState(!1);r.useState(!1),r.useState(),r.useState(),r.useState("");const c=()=>{F(!1)};r.useState(!0),r.useState(!0),r.useState(ne[0].key);const u=r.useRef(null);r.useState(de[0]),r.useState(le[1].key),r.useState(!0),r.useState(!0),r.useState(!0),r.useState(!0);const E=K(),R=G(),j=p(t=>{var a,s;return(s=(a=t==null?void 0:t.TimeLogData)==null?void 0:a.data)==null?void 0:s.filterData}),x=p(t=>t.TimeLogData.data.TimeLogListByBatchId),[v,U]=r.useState(),[ue,P]=r.useState();r.useState("");const[f,y]=r.useState(!1),[z,xe]=r.useState([]),{auth:h}=I.getState(),l=((L=(w=h==null?void 0:h.session)==null?void 0:w.userId)==null?void 0:L.toString())??"";ee();const{pageIndex:S,pageSize:N,sort:b,query:O,total:he}=p(t=>t.TimeLogData.data.tableData);r.useEffect(()=>{x.map((t,a)=>{t.approverList.$values.map((s,i)=>{!f&&s.aproverUserId==l&&s.isReadyForApprove&&s.approverSignatureId})})},[x]),r.useEffect(()=>{D()},[S,N,b,B,j]);const D=()=>{const t=X({pageIndex:S,pageSize:N,sort:b,query:O,filterData:j,id:d});R(t)};r.useCallback(()=>{var t;(t=u==null?void 0:u.current)==null||t.instance().clearFilter()},[]);const g=(t,a)=>{U(t),P(a),t&&a&&y(!0)},V=(t,a)=>{if(t&&a){const s=new Date(t),o=new Date(a).getTime()-s.getTime();if(o>0){const n=Math.floor(o/1e3/60),m=Math.floor(n/60),Y=n%60;return`${m}h ${Y}m`}else return""}},q=t=>{let a=0;if(t.forEach(s=>{if(s!=null&&s.startTime&&(s!=null&&s.endTime)){const i=new Date(s==null?void 0:s.startTime),o=new Date(s==null?void 0:s.endTime);a=a+(o.getTime()-i.getTime())}}),a>0){const s=Math.floor(a/1e3/60),i=Math.floor(s/60),o=s%60;return`${i}h ${o}m`}else return""},W=async t=>await re(t),H=()=>{y(!1);const t={signatureFile:v,userId:l,signatureName:"signature1"};console.log("signaturepayload",t),v&&ie(t).then(a=>{var o;const s=(o=a==null?void 0:a.data)==null?void 0:o.id;W({userId:l,timeLogBatchId:d,signatureId:s,timeLogApprovalList:z}).then(n=>{n.success&&(D(),C.push(e.jsx(k,{title:"Success",type:"success",duration:2500,children:"Approved Successfully"}),{placement:"top-center"}),c())}).catch(n=>{var m=n.response.data;C.push(e.jsx(k,{title:"Error",type:"danger",duration:2500,children:m.message}),{placement:"top-center"})})})},Q=()=>{E("/app/pages/TimeLogapproval")};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:"Time Logs"}),e.jsxs("div",{className:"flex flex-col lg:flex-row lg:items-center",children:[e.jsx(A,{style:{marginRight:"0.5rem"},onClick:()=>Q(),block:!0,variant:"solid",size:"sm",children:"View TimeLog Approvals"}),f&&e.jsx(A,{onClick:()=>H(),block:!0,variant:"solid",size:"sm",icon:e.jsx(se,{}),children:"Approve All Time Log"}),e.jsx(te,{title:"Add Signature",isOpen:M,onClose:c,portalClassName:"w30",children:e.jsx(ae,{onSignSubmit:g,batchId:d,onDrawerClose:c})})]})]})}),e.jsx(T,{className:"m-6 h-full py-4 px-6 bg-transparent ",bodyClass:"h-full",children:e.jsx(e.Fragment,{children:x.map((t,a)=>e.jsx(e.Fragment,{children:e.jsxs(T,{className:"time-log p-10 w-[90%] m-auto borderless",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"pb-5",children:[e.jsx(oe,{type:"full",imgClass:"w-[220px]"}),e.jsxs("div",{children:[e.jsx("strong",{children:"Client Name:"})," ","ContentActive"]})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("h6",{children:"Employee Weekly TimeSheet"}),e.jsxs("div",{children:[e.jsx("strong",{children:"Week of Date:(Mon-Sun):"})," ",new Date(t.startDate).toLocaleDateString()," ","to"," ",new Date(t.endDate).toLocaleDateString()]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Employee Name:"})," ",t.fullName]})]})]}),e.jsxs("table",{className:"time-log-table w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-left",children:[e.jsx("th",{}),e.jsx("th",{className:"text-left",children:"Date"}),e.jsx("th",{children:"Description"}),e.jsx("th",{children:"Hours"}),e.jsx("th",{children:"Per Diem"}),e.jsx("th",{children:"Details/Comments"})]})}),e.jsxs("tbody",{children:[t.timelogs.$values.map((s,i)=>e.jsxs("tr",{children:[e.jsx("td",{children:i+1}),e.jsxs("td",{children:[" ",new Date(s.startTime).toLocaleString()]}),e.jsx("td",{children:s.timeLogTypeName}),e.jsxs("td",{children:[" ",V(s.startTime,s.endTime)]}),e.jsx("td",{children:"-"}),e.jsx("td",{children:"details"})]})),e.jsxs("tr",{children:[e.jsx("td",{}),e.jsx("td",{}),e.jsx("td",{children:e.jsx("strong",{children:"Totals"})}),e.jsx("td",{children:e.jsx("strong",{children:q(t.timelogs.$values)})}),e.jsx("td",{}),e.jsx("td",{})]})]})]}),e.jsx("div",{children:e.jsx("p",{className:"text-xs py-8",children:"*All employees are required to sign out next to the total hours. By signing you are attesting to the hours to be paid, and that all authorized break and rest periods have periods have been provided and you have not suffered any work related injury on this day"})}),e.jsxs("div",{className:`grid gap-4 ${t.approverList.$values.length<=2?"grid-cols-2":"grid-cols-3"}`,children:[e.jsxs("div",{className:`${t.approverList.$values.length<=2?"sig-ext":"sig-nrml"}`,children:[e.jsx("div",{className:"lg:flex border-b-2 flex my-auto items-center h-[142px]",children:t.approverList.$values.map((s,i)=>{if(s.isSelfApprove)return s.approverSignatureId?e.jsx("div",{className:"sign-line",children:e.jsx("img",{src:"\\"+s.signaturepath,className:"w-[170px] py-4"})}):s.aproverUserId&&s.aproverUserId.toLowerCase()==l.toLowerCase()?e.jsx(e.Fragment,{children:e.jsx($,{onSignSubmit:g})}):e.jsx(e.Fragment,{children:e.jsx("div",{className:"sign-line"})})})}),e.jsxs("div",{className:"flex mb-4",children:[e.jsx("div",{className:"w-1/2 my-auto py-4 text-left",children:t.fullName}),e.jsx("div",{className:"w-1/2 my-auto py-4 text-right",children:t.approverList.$values.map((s,i)=>{if(s.isSelfApprove&&s.approverSignatureId)return e.jsx("p",{children:new Date(s==null?void 0:s.approvedDate).toLocaleString()})})})]})]}),t.approverList.$values.map((s,i)=>{if(!s.isSelfApprove)return s.aproverUserId&&s.aproverUserId.toLowerCase()==l.toLowerCase()&&s.isReadyForApprove&&!s.approverSignatureId?e.jsxs("div",{children:[e.jsx("div",{className:"lg:flex border-b-2 flex my-auto items-center h-[142px]",children:e.jsx($,{onSignSubmit:g})}),e.jsxs("div",{className:"flex mb-4",children:[e.jsx("div",{className:"w-1/2 my-auto py-4 text-left",children:s==null?void 0:s.approverName}),e.jsx("div",{className:"w-1/2 my-auto py-4 text-right"})]})]}):s.approverSignatureId||s.signaturepath?e.jsxs("div",{children:[e.jsx("div",{className:"lg:flex border-b-2 flex my-auto items-center h-[142px]",children:e.jsx("div",{className:"sign-line",children:e.jsx("img",{src:"\\"+s.signaturepath,className:"w-[170px] py-4"})})}),e.jsxs("div",{className:"flex mb-4",children:[e.jsx("div",{className:"w-1/2 my-auto py-4 text-left",children:s==null?void 0:s.approverName}),e.jsx("div",{className:"w-1/2 my-auto py-4 text-right",children:e.jsx("p",{children:new Date(s==null?void 0:s.approvedDate).toLocaleString()})})]})]}):e.jsxs("div",{id:"no-sig",children:[e.jsx("div",{className:"lg:flex border-b-2 flex my-auto items-center h-[142px]",children:e.jsx("div",{className:"sign-line"})}),e.jsxs("div",{className:"flex mb-4",children:[e.jsx("div",{className:"w-1/2 my-auto py-4 text-left",children:s==null?void 0:s.approverName}),e.jsx("div",{className:"w-1/2 my-auto py-4 text-right"})]})]})})]})]})}))})})]})};export{Ve as default};
@@ -1 +0,0 @@
1
- import{j as i}from"./vendor-mui-69397583.js";import{A as f}from"./AdaptableCard-df7695d6.js";import{r as t,f as V}from"./vendor-react-ece1c85f.js";import{u as l,c as z,r as O,b as y,t as H}from"./index-f1576468.js";import{Y as W,ab as q,l as P,f as Y,B as _}from"./index-c62ac197.js";import{A as $,T as c}from"./actioncell-17e12e21.js";import{D as J}from"./tableV2-4d1c9fd2.js";import"./vendor-redux-a1f00e6b.js";import"./TimeLogService-cd7b2f61.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";const K=[{key:"auto",name:"Immediately"},{key:"onClick",name:"On Button Click"}],Q=[{key:"dragAndDrop",name:"Drag and drop"},{key:"select",name:"Select"}],X=["nextColumn","widget"],Z={delete:!0,view:!0};W("TimeLogData",O);const be=()=>{const[x,S]=t.useState([]),[w,G]=t.useState(!1);t.useState(!1),t.useState(!1);const[ee,A]=t.useState(!1),[te,L]=t.useState(),[ae,b]=t.useState(),[ie,C]=t.useState(!0),[se,D]=t.useState(!0),[oe,F]=t.useState(K[0].key),d=t.useRef(null);t.useState(X[0]),t.useState(Q[1].key),t.useState(!0),t.useState(!0),t.useState(!0),t.useState(!0);const p=V();t.useState("");const{auth:n}=q.getState(),o=P(),u=l(e=>{var a,s;return(s=(a=e==null?void 0:e.TimeLogData)==null?void 0:a.data)==null?void 0:s.filterData}),{loading:T}=l(e=>e.TimeLogData.data),j=l(e=>e.TimeLogData.data.AllTimeLogApprovalList);Y();const{pageIndex:m,pageSize:g,sort:v,query:R,total:re}=l(e=>e.TimeLogData.data.tableData);t.useEffect(()=>{k()},[m,g,v,w,u]);const k=()=>{var s,h;const e=((h=(s=n==null?void 0:n.session)==null?void 0:s.userId)==null?void 0:h.toString())??"",a=z({pageIndex:m,pageSize:g,sort:v,query:R,filterData:u,userId:e});o(a)},r=t.useCallback(()=>{var e;(e=d==null?void 0:d.current)==null||e.instance().clearFilter()},[]);t.useCallback(e=>{C(e.value),r()},[r]),t.useCallback(e=>{D(e.value),r()},[r]),t.useCallback(e=>{F(e.value)},[]);const I=e=>{p("/app/pages/TimeLogApproval/view/"+e.timeLogApprovalBatchId)},[U,M]=t.useState({pageSize:"",pageIndex:""}),N=(e,a)=>{a===c.view&&I(e),a===c.edit&&(L(e.id),b(e),o(y(e)),A(!0)),a===c.delete&&(o(H(!0)),o(y(e)))},E=[{dataField:"Action",caption:"Action",width:"75",cellRender:e=>i.jsx("div",{id:"mAction","data-cname":"Action",children:i.jsx($,{row:e==null?void 0:e.data,actions:Z,buttonClick:N})})},{dataField:"startDate",caption:"Start Date",width:"150",dataType:"datetime",format:"MM/dd/yyyy"},{dataField:"endDate",caption:"End Date",width:"150",dataType:"datetime",format:"MM/dd/yyyy"},{dataField:"approveStatus",caption:"Approved",width:"150"},{dataField:"approvedUsers",caption:"Approved Users",width:"300",cellRender:e=>{var a;return i.jsx("div",{id:"div-approvedUsers","data-cname":"Approved Users",style:{width:"100%",textWrap:"initial"},children:(a=e==null?void 0:e.data)==null?void 0:a.approvedUsers})}},{dataField:"nextApproveUsers",caption:"Next Approve Users",width:"300",cellRender:e=>{var a;return i.jsx("div",{id:"div-nextApproveUsers","data-cname":"Next Approve Users",style:{width:"100%",textWrap:"initial"},children:(a=e==null?void 0:e.data)==null?void 0:a.nextApproveUsers})}},{dataField:"approvalUsers",caption:"Approval Users",width:"300",cellRender:e=>{var a;return i.jsx("div",{id:"div-approvalUsers","data-cname":"Approval Users",style:{width:"100%",textWrap:"initial"},children:(a=e==null?void 0:e.data)==null?void 0:a.approvalUsers})}},{dataField:"approvalCreatedBy",caption:"Created By",width:"250"},{dataField:"createdDate",caption:"Created On",width:"150",dataType:"date",format:"MM/dd/yyyy"}],B=()=>{p("/app/pages/TimeLog")};return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"topbar py-4 px-6 border-gray-200 border-b",children:i.jsxs("div",{className:"lg:flex items-center justify-between",children:[i.jsx("h3",{className:"mb-4 lg:mb-0",children:"Time Log Approvals"}),i.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center",children:i.jsx(_,{style:{marginRight:"0.5rem"},onClick:()=>B(),block:!0,variant:"solid",size:"sm",children:"View TimeLog List"})})]})}),i.jsx(f,{className:"m-6 h-full py-4 px-6 bg-transparent",bodyClass:"h-full",children:i.jsx(f,{className:"borderless",children:i.jsx(J,{columns:E,tableName:"time-log-approval",data:j||[],height:"calc(100vh - 320px)",defaultHiddenColumn:[],fetchData:()=>{},id_label:"$id",selectedRowId:x,setSelectedRowId:S,setFilterValues:()=>{},filterValues:[],identity:"Lead-Listing",setInLineFilters:()=>{},inLineFilter:[],inLineFilterMobileView:[],setInLineFiltersMobileView:()=>{},setColSorting:()=>{},ImpColumnName:"DocumentId",idName:"app-key-Listing-table",handleSearch:()=>{},isColumnResizing:!0,pager:U,setPager:M,isPaginationReq:!0,isLoading:T})})})]})};export{be as default};