@bjsdistribution/dms-client-return 0.0.83 → 0.0.84

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 (308) hide show
  1. package/dist/components/order-daily-overview/common/interface.d.ts +0 -80
  2. package/dist/components/order-view/hooks/AddResources.d.ts +2 -0
  3. package/dist/components/order-view/notes/logs/helper.d.ts +1 -2
  4. package/dist/components/order-view/order-actions/actions/add-resources/DocFileUpload.d.ts +3 -0
  5. package/dist/components/order-view/order-actions/actions/clear-booking-status/ClearBookingStatus.d.ts +3 -0
  6. package/dist/components/order-view/order-actions/actions/create-task-reminder/TaskModal.d.ts +4 -0
  7. package/dist/components/order-view/order-actions/actions/remove-from-route/RemoveFromRoute.d.ts +3 -0
  8. package/dist/components/order-view/order-actions/store.d.ts +15 -0
  9. package/dist/components/order-view/order-resources/columns/actions/index.d.ts +12 -2
  10. package/dist/components/order-view/order-resources/columns/index.d.ts +1 -0
  11. package/dist/components/order-view/order-resources/helper.d.ts +2 -2
  12. package/dist/components/order-view/store.d.ts +1 -1
  13. package/dist/components/order-view/types.d.ts +2 -1
  14. package/dist/components/store.d.ts +1 -0
  15. package/dist/dms-client-return.cjs.development.js +2644 -2227
  16. package/dist/dms-client-return.cjs.development.js.map +1 -1
  17. package/dist/dms-client-return.cjs.production.min.js +1 -1
  18. package/dist/dms-client-return.cjs.production.min.js.map +1 -1
  19. package/dist/dms-client-return.esm.js +3062 -2645
  20. package/dist/dms-client-return.esm.js.map +1 -1
  21. package/package.json +2 -2
  22. package/src/components/order-daily-overview/common/interface.ts +0 -85
  23. package/src/components/order-daily-overview/filters/Filters.tsx +0 -56
  24. package/src/components/order-daily-overview/header/input/dropdown/index.tsx +0 -1
  25. package/src/components/order-daily-overview/header/route-header/RouterHeader.tsx +1 -35
  26. package/src/components/order-daily-overview/header/table-filter/TableFilter.tsx +3 -4
  27. package/src/components/order-daily-overview/header-filters/HeaderFilter.tsx +0 -65
  28. package/src/components/order-daily-overview/return-after-table/table-filters/TableFilters.tsx +1 -106
  29. package/src/components/order-daily-overview/store/store.ts +0 -13
  30. package/src/components/order-view/details-filters/left-side-filters/ActionsMenu.tsx +0 -2
  31. package/src/components/order-view/details-filters/left-side-filters/actions/Actions.tsx +0 -13
  32. package/src/components/order-view/fakedata.ts +14 -5
  33. package/src/components/order-view/hooks/AddResources.tsx +54 -0
  34. package/src/components/order-view/index.tsx +23 -1
  35. package/src/components/order-view/notification/FlagTemplate.tsx +1 -1
  36. package/src/components/order-view/notification/Tabs.tsx +0 -2
  37. package/src/components/order-view/order-actions/actions/add-resources/CategoryDropdown.tsx +24 -9
  38. package/src/components/order-view/order-actions/actions/add-resources/DocFileUpload.tsx +141 -49
  39. package/src/components/order-view/order-actions/actions/add-resources/DocumentTypeDropdown.tsx +28 -5
  40. package/src/components/order-view/order-actions/actions/add-resources/Visibility.tsx +31 -14
  41. package/src/components/order-view/order-actions/actions/add-resources/index.tsx +99 -11
  42. package/src/components/order-view/order-actions/actions/cancel-order/index.tsx +0 -4
  43. package/src/components/order-view/order-actions/actions/clear-booking-status/ClearBookingStatus.tsx +113 -0
  44. package/src/components/order-view/order-actions/actions/create-task-reminder/CreateTaskModal.tsx +3 -3
  45. package/src/components/order-view/order-actions/actions/create-task-reminder/TaskModal.tsx +149 -0
  46. package/src/components/order-view/order-actions/actions/remove-from-route/RemoveFromRoute.tsx +91 -0
  47. package/src/components/order-view/order-actions/hooks/useCreateReminder.ts +0 -5
  48. package/src/components/order-view/order-actions/index.tsx +10 -9
  49. package/src/components/order-view/order-actions/store.ts +6 -0
  50. package/src/components/order-view/order-details/expanded-content/orders-section/Carrier.tsx +29 -10
  51. package/src/components/order-view/order-details/expanded-content/orders-section/index.tsx +0 -3
  52. package/src/components/order-view/order-resources/collapsed-content/index.tsx +2 -2
  53. package/src/components/order-view/order-resources/columns/Date.tsx +2 -1
  54. package/src/components/order-view/order-resources/columns/actions/index.tsx +133 -5
  55. package/src/components/order-view/order-resources/columns/index.tsx +1 -0
  56. package/src/components/order-view/order-resources/expanded-content/index.tsx +11 -11
  57. package/src/components/order-view/order-resources/helper.ts +7 -1
  58. package/src/components/order-view/store.ts +5 -10
  59. package/src/components/order-view/system-event-logs/columns/index.tsx +0 -1
  60. package/src/components/order-view/types.ts +6 -3
  61. package/src/components/order-view/utils.ts +17 -1
  62. package/src/components/store.ts +6 -0
  63. package/dist/assets/PostCodeIcon.d.ts +0 -3
  64. package/dist/assets/icons/ArrivalIcon.d.ts +0 -3
  65. package/dist/assets/icons/ArrowIcon.d.ts +0 -3
  66. package/dist/assets/icons/AssemblyIcons.d.ts +0 -3
  67. package/dist/assets/icons/BarCode.d.ts +0 -3
  68. package/dist/assets/icons/BoxIcon.d.ts +0 -3
  69. package/dist/assets/icons/BoxTickIcon.d.ts +0 -3
  70. package/dist/assets/icons/CallIcon.d.ts +0 -3
  71. package/dist/assets/icons/CarIcon.d.ts +0 -3
  72. package/dist/assets/icons/CardsIcon.d.ts +0 -3
  73. package/dist/assets/icons/CbmIcon.d.ts +0 -3
  74. package/dist/assets/icons/ClockIcon.d.ts +0 -3
  75. package/dist/assets/icons/Complete.d.ts +0 -3
  76. package/dist/assets/icons/CompleteIcon.d.ts +0 -3
  77. package/dist/assets/icons/CompletedIcon.d.ts +0 -3
  78. package/dist/assets/icons/DeleteIcon.d.ts +0 -3
  79. package/dist/assets/icons/DownArrowIcon.d.ts +0 -3
  80. package/dist/assets/icons/DownloadIcon.d.ts +0 -3
  81. package/dist/assets/icons/DriverIcon.d.ts +0 -3
  82. package/dist/assets/icons/DropDownLarge.d.ts +0 -3
  83. package/dist/assets/icons/EditIcon.d.ts +0 -3
  84. package/dist/assets/icons/ExportIcon.d.ts +0 -3
  85. package/dist/assets/icons/EyeIcon.d.ts +0 -3
  86. package/dist/assets/icons/FailedIcon.d.ts +0 -3
  87. package/dist/assets/icons/HeavyItemIcon.d.ts +0 -3
  88. package/dist/assets/icons/InComplete.d.ts +0 -3
  89. package/dist/assets/icons/LargeItemIcon.d.ts +0 -3
  90. package/dist/assets/icons/LateIcon.d.ts +0 -3
  91. package/dist/assets/icons/LineIcon.d.ts +0 -3
  92. package/dist/assets/icons/LockIcon.d.ts +0 -3
  93. package/dist/assets/icons/MapIcon.d.ts +0 -3
  94. package/dist/assets/icons/OctaIcon.d.ts +0 -3
  95. package/dist/assets/icons/OntimeTrackingIcons.d.ts +0 -3
  96. package/dist/assets/icons/PaperIcon.d.ts +0 -3
  97. package/dist/assets/icons/PendingIcon.d.ts +0 -3
  98. package/dist/assets/icons/PersonIcon.d.ts +0 -3
  99. package/dist/assets/icons/PointIcon.d.ts +0 -3
  100. package/dist/assets/icons/PrintIcon.d.ts +0 -3
  101. package/dist/assets/icons/PrivateIcon.d.ts +0 -3
  102. package/dist/assets/icons/RecipientIcon.d.ts +0 -3
  103. package/dist/assets/icons/ReminderIcon.d.ts +0 -3
  104. package/dist/assets/icons/RightArrowIcon.d.ts +0 -3
  105. package/dist/assets/icons/RoundCheckbox.d.ts +0 -3
  106. package/dist/assets/icons/StartIcon.d.ts +0 -3
  107. package/dist/assets/icons/TableIcon.d.ts +0 -3
  108. package/dist/assets/icons/TextIcon.d.ts +0 -3
  109. package/dist/assets/icons/ThreeIcon.d.ts +0 -3
  110. package/dist/assets/icons/TickIon.d.ts +0 -3
  111. package/dist/assets/icons/TomtomIcon.d.ts +0 -3
  112. package/dist/assets/icons/TotalOrderIcon.d.ts +0 -3
  113. package/dist/assets/icons/TrackIcon.d.ts +0 -3
  114. package/dist/assets/icons/TruckIcon.d.ts +0 -3
  115. package/dist/assets/icons/UnlockIcon.d.ts +0 -3
  116. package/dist/assets/icons/UserIcon.d.ts +0 -3
  117. package/dist/assets/icons/VehicleIcon.d.ts +0 -3
  118. package/dist/assets/icons/WeightIcon.d.ts +0 -3
  119. package/dist/assets/icons/ZigZagIcon.d.ts +0 -3
  120. package/dist/components/order-daily-overview/common/PrintDropDown.d.ts +0 -8
  121. package/dist/components/order-daily-overview/common/css/TableStyle.d.ts +0 -21
  122. package/dist/components/order-daily-overview/common/css/mediaQuery.d.ts +0 -4
  123. package/dist/components/order-daily-overview/store/filterStore.d.ts +0 -16
  124. package/dist/components/order-daily-overview/store/initialValues.d.ts +0 -16
  125. package/dist/components/order-daily-overview/table/table-data/Fakedata.d.ts +0 -144
  126. package/dist/components/order-view/ProductData.d.ts +0 -14
  127. package/dist/components/order-view/details-filters/left-side-filters/dropdowns/DropDownItem.d.ts +0 -8
  128. package/dist/components/order-view/details-filters/left-side-filters/dropdowns/DropDownMenu.d.ts +0 -10
  129. package/dist/components/order-view/details-filters/left-side-filters/dropdowns/DropdownStyles.d.ts +0 -3
  130. package/dist/components/order-view/general-information/LockOrder.d.ts +0 -4
  131. package/dist/components/order-view/general-information/dropdowns/BjsMenu.d.ts +0 -3
  132. package/dist/components/order-view/general-information/dropdowns/CreateTask.d.ts +0 -3
  133. package/dist/components/order-view/general-information/dropdowns/SendEmail.d.ts +0 -3
  134. package/dist/components/order-view/general-information/dropdowns/SendSms.d.ts +0 -3
  135. package/dist/components/order-view/general-information/dropdowns/Tasks.d.ts +0 -3
  136. package/dist/components/order-view/general-information/dropdowns/Videos.d.ts +0 -3
  137. package/dist/components/order-view/general-information/dropdowns/ViewEpod.d.ts +0 -3
  138. package/dist/components/order-view/general-information/dropdowns/helper.d.ts +0 -1
  139. package/dist/components/order-view/general-information/dropdowns/index.d.ts +0 -3
  140. package/dist/components/order-view/modalsPopup/AddProduct.d.ts +0 -3
  141. package/dist/components/order-view/modalsPopup/BulkUpdateProduct.d.ts +0 -3
  142. package/dist/components/order-view/modalsPopup/DeleteProduct.d.ts +0 -3
  143. package/dist/components/order-view/modalsPopup/ProductAction.d.ts +0 -3
  144. package/dist/components/order-view/modalsPopup/RepackModal.d.ts +0 -3
  145. package/dist/components/order-view/modalsPopup/UnReceiveProduct.d.ts +0 -3
  146. package/dist/components/order-view/modalsPopup/UpdateProducts.d.ts +0 -3
  147. package/dist/components/order-view/modalsPopup/qclogs/AddDefect.d.ts +0 -3
  148. package/dist/components/order-view/modalsPopup/qclogs/DefetcDetails.d.ts +0 -3
  149. package/dist/components/order-view/modalsPopup/qclogs/OtherDamage.d.ts +0 -3
  150. package/dist/components/order-view/modalsPopup/qclogs/RepackDetails.d.ts +0 -3
  151. package/dist/components/order-view/modalsPopup/qclogs/RepackProduct.d.ts +0 -3
  152. package/dist/components/order-view/modalsPopup/qclogs/index.d.ts +0 -3
  153. package/dist/components/order-view/modalsPopup/qclogs/logsTable.d.ts +0 -3
  154. package/dist/components/order-view/notes/logs/columns/Details.d.ts +0 -3
  155. package/dist/components/order-view/notes/logs/columns/index.d.ts +0 -2
  156. package/dist/components/order-view/notification/OrderTemplate.d.ts +0 -3
  157. package/dist/components/order-view/order-actions/actions/cancel-order/CancelOrderTable.d.ts +0 -3
  158. package/dist/components/order-view/order-actions/actions/cancel-order/CancelationNote.d.ts +0 -3
  159. package/dist/components/order-view/order-actions/actions/cancel-order/CancelationReason.d.ts +0 -3
  160. package/dist/components/order-view/order-actions/actions/charge-log/DeleteLogModal.d.ts +0 -3
  161. package/dist/components/order-view/order-actions/actions/charge-log/index.d.ts +0 -3
  162. package/dist/components/order-view/order-actions/actions/escalation/Dropdowns.d.ts +0 -3
  163. package/dist/components/order-view/order-actions/actions/escalation/EscalationModal.d.ts +0 -3
  164. package/dist/components/order-view/order-actions/actions/escalation/NewEscalation.d.ts +0 -3
  165. package/dist/components/order-view/order-actions/actions/escalation/Notes.d.ts +0 -3
  166. package/dist/components/order-view/order-actions/actions/escalation/index.d.ts +0 -3
  167. package/dist/components/order-view/order-actions/actions/escalation/upgrade/index.d.ts +0 -3
  168. package/dist/components/order-view/order-actions/actions/restore-products/RestoreProducts.d.ts +0 -3
  169. package/dist/components/order-view/order-actions/actions/update-product-type/UpdateProductType.d.ts +0 -7
  170. package/dist/components/order-view/order-actions/actions/update-product-type/UpdateProductTypeStyle.d.ts +0 -9
  171. package/dist/components/order-view/order-actions/hooks/useFetchSingleReminder.d.ts +0 -2
  172. package/dist/components/order-view/order-actions/hooks/useUpdateReminder.d.ts +0 -3
  173. package/dist/components/order-view/order-details/expanded-content/orders-section/ValueField.d.ts +0 -3
  174. package/dist/components/order-view/order-resources/columns/Id.d.ts +0 -3
  175. package/dist/components/order-view/products-info/expanded-content/productList.d.ts +0 -0
  176. package/dist/components/order-view/products-info/expanded-content/products/Badge.d.ts +0 -6
  177. package/dist/components/order-view/products-info/expanded-content/products/index.d.ts +0 -7
  178. package/dist/components/order-view/products-info/types.d.ts +0 -1
  179. package/dist/components/order-view/products-info/utils.d.ts +0 -2
  180. package/dist/components/order-view/return-client-products/product-table-footer/ProductDetailsFooter.d.ts +0 -3
  181. package/dist/components/order-view/toolbox-resources/collapsed-content/index.d.ts +0 -3
  182. package/dist/components/order-view/toolbox-resources/expanded-content/index.d.ts +0 -3
  183. package/dist/components/order-view/view-reminder/AssigneeDropdown.d.ts +0 -3
  184. package/dist/components/order-view/view-reminder/ViewReminder.d.ts +0 -3
  185. package/dist/components/order-view/view-reminder/reminder-styles.d.ts +0 -25
  186. package/src/assets/PostCodeIcon.tsx +0 -32
  187. package/src/assets/icons/ArrivalIcon.tsx +0 -11
  188. package/src/assets/icons/ArrowIcon.tsx +0 -11
  189. package/src/assets/icons/AssemblyIcons.tsx +0 -11
  190. package/src/assets/icons/BarCode.tsx +0 -11
  191. package/src/assets/icons/BoxIcon.tsx +0 -19
  192. package/src/assets/icons/BoxTickIcon.tsx +0 -19
  193. package/src/assets/icons/CallIcon.tsx +0 -9
  194. package/src/assets/icons/CarIcon.tsx +0 -10
  195. package/src/assets/icons/CardsIcon.tsx +0 -12
  196. package/src/assets/icons/CbmIcon.tsx +0 -11
  197. package/src/assets/icons/ClockIcon.tsx +0 -10
  198. package/src/assets/icons/Complete.tsx +0 -15
  199. package/src/assets/icons/CompleteIcon.tsx +0 -34
  200. package/src/assets/icons/CompletedIcon.tsx +0 -11
  201. package/src/assets/icons/DeleteIcon.tsx +0 -20
  202. package/src/assets/icons/DownArrowIcon.tsx +0 -18
  203. package/src/assets/icons/DownloadIcon.tsx +0 -26
  204. package/src/assets/icons/DriverIcon.tsx +0 -28
  205. package/src/assets/icons/DropDownLarge.tsx +0 -25
  206. package/src/assets/icons/EditIcon.tsx +0 -34
  207. package/src/assets/icons/ExportIcon.tsx +0 -14
  208. package/src/assets/icons/EyeIcon.tsx +0 -10
  209. package/src/assets/icons/FailedIcon.tsx +0 -44
  210. package/src/assets/icons/HeavyItemIcon.tsx +0 -36
  211. package/src/assets/icons/InComplete.tsx +0 -15
  212. package/src/assets/icons/LargeItemIcon.tsx +0 -60
  213. package/src/assets/icons/LateIcon.tsx +0 -12
  214. package/src/assets/icons/LineIcon.tsx +0 -10
  215. package/src/assets/icons/LockIcon.tsx +0 -35
  216. package/src/assets/icons/MapIcon.tsx +0 -11
  217. package/src/assets/icons/OctaIcon.tsx +0 -10
  218. package/src/assets/icons/OntimeTrackingIcons.tsx +0 -19
  219. package/src/assets/icons/PaperIcon.tsx +0 -10
  220. package/src/assets/icons/PendingIcon.tsx +0 -32
  221. package/src/assets/icons/PersonIcon.tsx +0 -27
  222. package/src/assets/icons/PointIcon.tsx +0 -10
  223. package/src/assets/icons/PrintIcon.tsx +0 -10
  224. package/src/assets/icons/PrivateIcon.tsx +0 -29
  225. package/src/assets/icons/RecipientIcon.tsx +0 -10
  226. package/src/assets/icons/ReminderIcon.tsx +0 -35
  227. package/src/assets/icons/RightArrowIcon.tsx +0 -15
  228. package/src/assets/icons/RoundCheckbox.tsx +0 -11
  229. package/src/assets/icons/StartIcon.tsx +0 -10
  230. package/src/assets/icons/TableIcon.tsx +0 -12
  231. package/src/assets/icons/TextIcon.tsx +0 -10
  232. package/src/assets/icons/ThreeIcon.tsx +0 -19
  233. package/src/assets/icons/TickIon.tsx +0 -10
  234. package/src/assets/icons/TomtomIcon.tsx +0 -23
  235. package/src/assets/icons/TotalOrderIcon.tsx +0 -12
  236. package/src/assets/icons/TrackIcon.tsx +0 -12
  237. package/src/assets/icons/TruckIcon.tsx +0 -20
  238. package/src/assets/icons/UnlockIcon.tsx +0 -35
  239. package/src/assets/icons/UserIcon.tsx +0 -10
  240. package/src/assets/icons/VehicleIcon.tsx +0 -11
  241. package/src/assets/icons/WeightIcon.tsx +0 -11
  242. package/src/assets/icons/ZigZagIcon.tsx +0 -10
  243. package/src/components/order-daily-overview/common/PrintDropDown.tsx +0 -100
  244. package/src/components/order-daily-overview/common/css/TableStyle.tsx +0 -202
  245. package/src/components/order-daily-overview/common/css/mediaQuery.ts +0 -13
  246. package/src/components/order-daily-overview/store/filterStore.ts +0 -100
  247. package/src/components/order-daily-overview/store/initialValues.ts +0 -16
  248. package/src/components/order-daily-overview/table/table-data/Fakedata.tsx +0 -432
  249. package/src/components/order-view/ProductData.tsx +0 -81
  250. package/src/components/order-view/details-filters/left-side-filters/dropdowns/DropDownItem.tsx +0 -33
  251. package/src/components/order-view/details-filters/left-side-filters/dropdowns/DropDownMenu.tsx +0 -42
  252. package/src/components/order-view/details-filters/left-side-filters/dropdowns/DropdownStyles.tsx +0 -25
  253. package/src/components/order-view/general-information/LockOrder.tsx +0 -113
  254. package/src/components/order-view/general-information/dropdowns/BjsMenu.tsx +0 -66
  255. package/src/components/order-view/general-information/dropdowns/CreateTask.tsx +0 -34
  256. package/src/components/order-view/general-information/dropdowns/SendEmail.tsx +0 -14
  257. package/src/components/order-view/general-information/dropdowns/SendSms.tsx +0 -14
  258. package/src/components/order-view/general-information/dropdowns/Tasks.tsx +0 -8
  259. package/src/components/order-view/general-information/dropdowns/Videos.tsx +0 -8
  260. package/src/components/order-view/general-information/dropdowns/ViewEpod.tsx +0 -8
  261. package/src/components/order-view/general-information/dropdowns/helper.tsx +0 -17
  262. package/src/components/order-view/general-information/dropdowns/index.tsx +0 -46
  263. package/src/components/order-view/modalsPopup/AddProduct.tsx +0 -234
  264. package/src/components/order-view/modalsPopup/BulkUpdateProduct.tsx +0 -145
  265. package/src/components/order-view/modalsPopup/DeleteProduct.tsx +0 -117
  266. package/src/components/order-view/modalsPopup/ProductAction.tsx +0 -79
  267. package/src/components/order-view/modalsPopup/RepackModal.tsx +0 -42
  268. package/src/components/order-view/modalsPopup/UnReceiveProduct.tsx +0 -72
  269. package/src/components/order-view/modalsPopup/UpdateProducts.tsx +0 -145
  270. package/src/components/order-view/modalsPopup/qclogs/AddDefect.tsx +0 -135
  271. package/src/components/order-view/modalsPopup/qclogs/DefetcDetails.tsx +0 -97
  272. package/src/components/order-view/modalsPopup/qclogs/OtherDamage.tsx +0 -125
  273. package/src/components/order-view/modalsPopup/qclogs/RepackDetails.tsx +0 -118
  274. package/src/components/order-view/modalsPopup/qclogs/RepackProduct.tsx +0 -63
  275. package/src/components/order-view/modalsPopup/qclogs/index.tsx +0 -62
  276. package/src/components/order-view/modalsPopup/qclogs/logsTable.tsx +0 -74
  277. package/src/components/order-view/notes/logs/columns/Details.tsx +0 -56
  278. package/src/components/order-view/notes/logs/columns/index.tsx +0 -2
  279. package/src/components/order-view/notification/OrderTemplate.tsx +0 -108
  280. package/src/components/order-view/order-actions/actions/cancel-order/CancelOrderTable.tsx +0 -95
  281. package/src/components/order-view/order-actions/actions/cancel-order/CancelationNote.tsx +0 -28
  282. package/src/components/order-view/order-actions/actions/cancel-order/CancelationReason.tsx +0 -18
  283. package/src/components/order-view/order-actions/actions/charge-log/DeleteLogModal.tsx +0 -39
  284. package/src/components/order-view/order-actions/actions/charge-log/index.tsx +0 -171
  285. package/src/components/order-view/order-actions/actions/escalation/Dropdowns.tsx +0 -95
  286. package/src/components/order-view/order-actions/actions/escalation/EscalationModal.tsx +0 -28
  287. package/src/components/order-view/order-actions/actions/escalation/NewEscalation.tsx +0 -139
  288. package/src/components/order-view/order-actions/actions/escalation/Notes.tsx +0 -36
  289. package/src/components/order-view/order-actions/actions/escalation/index.tsx +0 -31
  290. package/src/components/order-view/order-actions/actions/escalation/upgrade/index.tsx +0 -198
  291. package/src/components/order-view/order-actions/actions/restore-products/RestoreProducts.tsx +0 -139
  292. package/src/components/order-view/order-actions/actions/update-product-type/UpdateProductType.tsx +0 -365
  293. package/src/components/order-view/order-actions/actions/update-product-type/UpdateProductTypeStyle.tsx +0 -251
  294. package/src/components/order-view/order-actions/hooks/useFetchSingleReminder.ts +0 -60
  295. package/src/components/order-view/order-actions/hooks/useUpdateReminder.ts +0 -54
  296. package/src/components/order-view/order-details/expanded-content/orders-section/ValueField.tsx +0 -36
  297. package/src/components/order-view/order-resources/columns/Id.tsx +0 -17
  298. package/src/components/order-view/products-info/expanded-content/productList.tsx +0 -28
  299. package/src/components/order-view/products-info/expanded-content/products/Badge.tsx +0 -34
  300. package/src/components/order-view/products-info/expanded-content/products/index.tsx +0 -305
  301. package/src/components/order-view/products-info/types.ts +0 -1
  302. package/src/components/order-view/products-info/utils.ts +0 -14
  303. package/src/components/order-view/return-client-products/product-table-footer/ProductDetailsFooter.tsx +0 -37
  304. package/src/components/order-view/toolbox-resources/collapsed-content/index.tsx +0 -16
  305. package/src/components/order-view/toolbox-resources/expanded-content/index.tsx +0 -84
  306. package/src/components/order-view/view-reminder/AssigneeDropdown.tsx +0 -34
  307. package/src/components/order-view/view-reminder/ViewReminder.tsx +0 -315
  308. package/src/components/order-view/view-reminder/reminder-styles.tsx +0 -174
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
3
  import { useTabType } from '../store';
4
- // import OrderTemplate from './OrderTemplate';
5
4
  import FlagTemplate from './FlagTemplate';
6
5
  import ReminderTemplate from './ReminderTemplate';
7
6
 
@@ -27,7 +26,6 @@ function Tabs({
27
26
  <Container className="tab-content">
28
27
  {activeTab === 'active' && (
29
28
  <>
30
- {/* <OrderTemplate /> */}
31
29
  {initialReminders.map((item: any, index: any) => (
32
30
  <ReminderTemplate
33
31
  key={index}
@@ -1,23 +1,38 @@
1
1
  import React from 'react';
2
2
  import OrderActionsDropdown from '../../Dropdown';
3
+ import { useOrderStaticData } from '../../../store';
4
+ import { useAtom } from 'jotai';
5
+ import { selectedCategoryIdAtom } from '../../store';
3
6
 
4
7
  function CategoryDropdown() {
5
- const onSelect = () => {};
6
- const onSearch = () => {};
8
+ const [staticOrderData] = useOrderStaticData();
9
+ const [, setSelectedCategoryId] = useAtom(selectedCategoryIdAtom);
7
10
 
8
- const options = [
9
- { label: 'small', value: 'small' },
10
- { label: 'medium', value: 'medium' },
11
- { label: 'large', value: 'large' },
12
- ];
11
+ const categoryOptions = staticOrderData?.resource_category_type?.map(
12
+ (x: any) => ({
13
+ id: x?.id,
14
+ type: x?.type,
15
+ value: x?.value,
16
+ })
17
+ );
18
+
19
+ const onSelect = (selectedValue: any) => {
20
+ const selectedOption = categoryOptions?.find(
21
+ (option: any) => option?.value === selectedValue
22
+ );
23
+
24
+ if (selectedOption) {
25
+ setSelectedCategoryId(selectedOption.value);
26
+ }
27
+ };
13
28
 
14
29
  return (
15
30
  <OrderActionsDropdown
16
31
  label="Category"
32
+ required
17
33
  placeholder="Select Category"
18
- options={options}
34
+ options={categoryOptions}
19
35
  onSelect={onSelect}
20
- onSearch={onSearch}
21
36
  />
22
37
  );
23
38
  }
@@ -1,65 +1,136 @@
1
- import React from 'react';
2
- import type { UploadProps } from 'antd';
3
- import { message, Upload } from 'antd';
1
+ import React, { useRef, useState } from 'react';
4
2
  import styled from 'styled-components';
5
3
  import { Button } from '@bjsdistribution/dms-component-library';
6
4
  import UploadIcon from '../../../../../assets/icons/UploadIcon';
5
+ import { atom, useAtom } from 'jotai';
6
+ import { notification } from 'antd';
7
7
 
8
- const { Dragger } = Upload;
8
+ export const uploadedFilesAtom = atom<File[]>([]);
9
9
 
10
- const props: UploadProps = {
11
- name: 'file',
12
- multiple: true,
13
- action: 'sdfkj',
14
- onChange(info) {
15
- const { status } = info.file;
16
- if (status !== 'uploading') {
17
- console.log(info.file, info.fileList);
10
+ // Allowed photo and video file types
11
+ const fileTypes = ['image/jpeg', 'image/png', 'video/mp4'];
12
+
13
+ function DocFileUpload() {
14
+ const [uploadedFiles, setUploadedFiles] = useAtom(uploadedFilesAtom);
15
+ const [dragging, setDragging] = useState(false);
16
+ const fileInputRef = useRef<HTMLInputElement>(null);
17
+
18
+ const handleFileUpload = (files: FileList | null) => {
19
+ if (files) {
20
+ const validFiles = Array.from(files).filter(file =>
21
+ fileTypes.includes(file.type)
22
+ );
23
+
24
+ if (validFiles.length > 0) {
25
+ setUploadedFiles(prev => [...prev, ...validFiles]);
26
+ validFiles.forEach(file => {
27
+ notification.success({
28
+ message: 'Success',
29
+ description: `${file.name} added successfully.`,
30
+ });
31
+ });
32
+ } else {
33
+ notification.error({
34
+ message: 'Error',
35
+ description: 'Only photos (JPEG, PNG) and videos (MP4) are allowed.',
36
+ });
37
+ }
18
38
  }
19
- if (status === 'done') {
20
- message.success(`${info.file.name} file uploaded successfully.`);
21
- } else if (status === 'error') {
22
- message.error(`${info.file.name} file upload failed.`);
39
+ };
40
+
41
+ const handleDragOver = (e: React.DragEvent) => {
42
+ e.preventDefault();
43
+ setDragging(true);
44
+ };
45
+
46
+ const handleDragLeave = () => {
47
+ setDragging(false);
48
+ };
49
+
50
+ const handleDrop = (e: React.DragEvent) => {
51
+ e.preventDefault();
52
+ setDragging(false);
53
+ handleFileUpload(e.dataTransfer.files);
54
+ };
55
+
56
+ const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
57
+ handleFileUpload(e.target.files);
58
+ };
59
+
60
+ const handleButtonClick = () => {
61
+ if (fileInputRef.current) {
62
+ fileInputRef.current.click();
23
63
  }
24
- },
25
- onDrop(e) {
26
- console.log('Dropped files', e.dataTransfer.files);
27
- },
28
- };
64
+ };
29
65
 
30
- function DocFileUpload () {
31
66
  return (
32
67
  <MainContainer>
33
- <Dragger {...props}>
68
+ <DraggerContainer
69
+ onDragOver={handleDragOver}
70
+ onDragLeave={handleDragLeave}
71
+ onDrop={handleDrop}
72
+ dragging={dragging}
73
+ >
34
74
  <Container>
35
- <UploadButton colors='secondary' shape='rounded'>
36
- Upload Button
75
+ <UploadButton
76
+ colors="secondary"
77
+ shape="rounded"
78
+ onClick={handleButtonClick}
79
+ >
80
+ UPLOAD FILE
37
81
  </UploadButton>
82
+ <FileInput
83
+ type="file"
84
+ required
85
+ multiple
86
+ onChange={handleInputChange}
87
+ accept="image/jpeg, image/png, video/mp4"
88
+ ref={fileInputRef}
89
+ />
38
90
  <IconContainer>
39
- <UploadIcon />
91
+ <UploadIcon />
40
92
  </IconContainer>
41
93
  <TextContainer>
42
94
  <Text1>or drag and drop your file </Text1>
43
- <Text2>Excel (.xls / .xlsx) or CSV (.csv) Only</Text2>
95
+ <Text2>Photos (JPEG, PNG) or Videos (MP4) Only</Text2>
44
96
  </TextContainer>
45
97
  </Container>
46
- </Dragger>
98
+ </DraggerContainer>
99
+
100
+ {/* Uploaded Files List */}
101
+ {uploadedFiles.length > 0 && (
102
+ <UploadedFilesContainer>
103
+ <FilesTitle>Uploaded Files:</FilesTitle>
104
+ <FilesList>
105
+ {uploadedFiles.map((file, index) => (
106
+ <FileItem key={index}>
107
+ {file.name} - {(file.size / 1024).toFixed(2)} KB
108
+ </FileItem>
109
+ ))}
110
+ </FilesList>
111
+ </UploadedFilesContainer>
112
+ )}
47
113
  </MainContainer>
48
- )
114
+ );
49
115
  }
116
+
50
117
  const MainContainer = styled.div`
51
118
  width: 100%;
52
- .ant-upload-wrapper .ant-upload-drag .ant-upload {
53
- padding: 0;
54
- }
55
- .ant-upload-wrapper, .ant-upload-drag, .ant-upload {
56
- border: none;
57
- background: transparent;
58
- }
59
- `
119
+ `;
120
+
121
+ const DraggerContainer = styled.div<{ dragging: boolean }>`
122
+ width: 100%;
123
+ padding: 6px;
124
+ border-radius: 30px;
125
+ border: ${props =>
126
+ props.dragging ? '2px dashed #0465ac' : '1px solid #e0e2e7'};
127
+ background-color: #fff;
128
+ transition: border-color 0.3s ease;
129
+ cursor: pointer;
130
+ `;
60
131
 
61
132
  const Text2 = styled.p`
62
- color: #BCBAB7;
133
+ color: #bcbab7;
63
134
  text-align: center;
64
135
  font-family: 'Roboto', sans-serif;
65
136
  font-size: 13px;
@@ -68,14 +139,12 @@ const Text2 = styled.p`
68
139
  text-transform: lowercase;
69
140
  padding: 0;
70
141
  margin: 0;
71
- `
72
-
73
- const TextContainer = styled.div`
74
-
75
142
  `;
76
143
 
144
+ const TextContainer = styled.div``;
145
+
77
146
  const Text1 = styled.p`
78
- color: #AEA9A1;
147
+ color: #aea9a1;
79
148
  text-align: left;
80
149
  font-family: 'Roboto', sans-serif;
81
150
  font-size: 14px;
@@ -87,7 +156,7 @@ const Text1 = styled.p`
87
156
  `;
88
157
 
89
158
  const IconContainer = styled.div`
90
- border: 1px dashed #0465AC;
159
+ border: 1px dashed #0465ac;
91
160
  padding: 5px;
92
161
  display: flex;
93
162
  align-items: center;
@@ -106,12 +175,35 @@ const Container = styled.div`
106
175
  align-items: center;
107
176
  align-self: stretch;
108
177
  border-radius: 30px;
109
- border: 1px solid #E0E2E7;
110
- background: #FFF;
178
+ background: #fff;
179
+ `;
111
180
 
112
-
181
+ const FileInput = styled.input`
182
+ display: none;
113
183
  `;
114
184
 
115
- // const Text = styled.p``;
185
+ const UploadedFilesContainer = styled.div`
186
+ margin-top: 20px;
187
+ border-top: 1px solid #e0e2e7;
188
+ padding-top: 10px;
189
+ `;
190
+
191
+ const FilesTitle = styled.h4`
192
+ font-family: 'Roboto', sans-serif;
193
+ font-size: 16px;
194
+ color: #0465ac;
195
+ `;
196
+
197
+ const FilesList = styled.ul`
198
+ list-style-type: none;
199
+ padding: 0;
200
+ `;
201
+
202
+ const FileItem = styled.li`
203
+ font-family: 'Roboto', sans-serif;
204
+ font-size: 14px;
205
+ color: #333;
206
+ margin: 5px 0;
207
+ `;
116
208
 
117
- export default DocFileUpload;
209
+ export default DocFileUpload;
@@ -1,16 +1,39 @@
1
1
  import React from 'react';
2
2
  import OrderActionsDropdown from '../../Dropdown';
3
+ import { useAtom } from 'jotai';
4
+ import { useOrderStaticData } from '../../../store';
5
+ import { selectedDocumentTypeAtom } from '../../store';
3
6
 
4
7
  function DocumentTypeDropdown() {
5
- const onSelect = () => {};
6
- const onSearch = () => {};
8
+ const [hello, setSelectedDocumentType] = useAtom(selectedDocumentTypeAtom);
9
+ const [staticOrderData] = useOrderStaticData();
10
+
11
+ const documentOptions = staticOrderData?.resource_document_type?.map(
12
+ (x: any) => ({
13
+ id: x?.id,
14
+ type: x?.type,
15
+ value: x?.value,
16
+ })
17
+ );
18
+
19
+ const onSelectCancelReason = (selectedValue: any) => {
20
+ const selectedOption = documentOptions?.find(
21
+ (option: any) => option?.value === selectedValue
22
+ );
23
+ if (selectedOption) {
24
+ setSelectedDocumentType(selectedOption.value);
25
+ }
26
+ };
27
+
28
+ console.log(hello, 'hellohello');
29
+
7
30
  return (
8
31
  <OrderActionsDropdown
9
32
  label="Document Type"
33
+ required
10
34
  placeholder="Select Document Type"
11
- options={[]}
12
- onSelect={onSelect}
13
- onSearch={onSearch}
35
+ options={documentOptions}
36
+ onSelect={onSelectCancelReason}
14
37
  />
15
38
  );
16
39
  }
@@ -1,23 +1,40 @@
1
1
  import { RadioButtonGroup } from '@bjsdistribution/dms-component-library';
2
2
  import React from 'react';
3
-
4
- const visibilityOptions = [
5
- {
6
- label: 'Public',
7
- value: 'public',
8
- },
9
- {
10
- label: 'Private',
11
- value: 'private',
12
- },
13
- ];
3
+ import { useAtom, useOrderStaticData } from '../../../store';
4
+ import { capitalize } from '../../../utils';
5
+ import { selectedVisibilityAtom } from '../../store';
14
6
 
15
7
  function VisibilityRadioButtons() {
16
- const handleRadioButtonChange = () => {};
8
+ const [staticOrderData] = useOrderStaticData();
9
+ const [selectedVisibility, setSelectedVisibility] = useAtom(
10
+ selectedVisibilityAtom
11
+ );
12
+
13
+ const visibilityOptions = staticOrderData?.resource_visibility_type?.map(
14
+ (option: any) => ({
15
+ label: capitalize(option.type.replaceAll('_', ' ')),
16
+ value: option.value.toString(),
17
+ })
18
+ );
19
+
20
+ const handleRadioButtonChange = (
21
+ event: React.ChangeEvent<HTMLInputElement>
22
+ ) => {
23
+ const selectedValue = event.target.value;
24
+
25
+ const selectedOption = visibilityOptions?.find(
26
+ (option: any) => option.value === selectedValue
27
+ );
28
+
29
+ if (selectedOption) {
30
+ setSelectedVisibility(selectedOption.value);
31
+ console.log(selectedOption, 'selectedOption');
32
+ }
33
+ };
34
+
17
35
  return (
18
- // refer product information for implementation
19
36
  <RadioButtonGroup
20
- selectedValue={'public'}
37
+ selectedValue={selectedVisibility || []}
21
38
  heading="Visibility"
22
39
  options={visibilityOptions || []}
23
40
  required={false}
@@ -1,43 +1,132 @@
1
- import React from 'react';
1
+ import React, { useEffect, useState } from 'react';
2
2
  import OrderActionModal from '../../../../../common/modals/order-action-modal/OrderActionModal';
3
3
  import DocumentTypeDropdown from './DocumentTypeDropdown';
4
4
  import styled from 'styled-components';
5
5
  import CategoryDropdown from './CategoryDropdown';
6
6
  import VisibilityRadioButtons from './Visibility';
7
- import DocFileUpload from './DocFileUpload';
8
- import { useCurrentAction } from '../../../store';
9
- // import DocFileUpload from './DocFileUpload';
7
+ import DocFileUpload, { uploadedFilesAtom } from './DocFileUpload';
8
+ import {
9
+ useAtom,
10
+ useCurrentAction,
11
+ useCustomerInfo,
12
+ useOrderStaticData,
13
+ } from '../../../store';
14
+ import {
15
+ selectedCategoryIdAtom,
16
+ selectedDocumentTypeAtom,
17
+ selectedTypeAtom,
18
+ setResourcesCall,
19
+ } from '../../store';
20
+ import OrderActionsDropdown from '../../Dropdown';
21
+ import { notification } from 'antd';
22
+ import useUploadFiles from '../../../hooks/AddResources';
10
23
 
11
24
  function AddResources() {
12
25
  const [, setCurrentAction] = useCurrentAction();
26
+ const [staticOrderData] = useOrderStaticData();
27
+ const [, setSelectedType] = useAtom(selectedTypeAtom);
28
+ const [uploadedFiles, setUploadedFiles] = useAtom(uploadedFilesAtom);
29
+ const uploadFiles = useUploadFiles();
30
+ const [isFormValid, setIsFormValid] = useState(false);
31
+ const [selectedCategoryId] = useAtom(selectedCategoryIdAtom);
32
+ const [selectedDocumentType] = useAtom(selectedDocumentTypeAtom);
33
+ const [selectedType] = useAtom(selectedTypeAtom);
34
+ const [, setResources] = useAtom(setResourcesCall);
13
35
 
14
36
  const onClose = () => {
15
37
  setCurrentAction(undefined);
38
+ setUploadedFiles([]);
16
39
  };
17
40
 
41
+ const [customerInfo] = useCustomerInfo();
42
+ const infoText = `${customerInfo?.recipient_name}, ${customerInfo?.postcode}`;
43
+ const typeOptions = staticOrderData?.resource_type?.map((x: any) => ({
44
+ id: x?.id,
45
+ type: x?.type,
46
+ value: x?.value,
47
+ }));
48
+
49
+ const onSelectCancelReason = (selectedValue: any) => {
50
+ const selectedOption = typeOptions?.find(
51
+ (option: any) => option?.value === selectedValue
52
+ );
53
+ if (selectedOption) {
54
+ setSelectedType(selectedOption.value);
55
+ }
56
+ };
57
+ const handleSubmit = async () => {
58
+ if (!uploadedFiles) {
59
+ notification.error({ message: 'No files selected' });
60
+ return;
61
+ }
62
+
63
+ const formData = new FormData();
64
+ if (uploadedFiles) {
65
+ Array.from(uploadedFiles).forEach(uploadedFiles => {
66
+ formData.append('files', uploadedFiles); // Adjust the key as per your API requirement
67
+ });
68
+ }
69
+
70
+ try {
71
+ const response = await uploadFiles(formData);
72
+ console.log('Upload successful:', response);
73
+ notification.success({ message: 'Files uploaded successfully' });
74
+ onClose(); // Close modal after successful upload
75
+ setResources(false);
76
+
77
+ setTimeout(() => {
78
+ setResources(true);
79
+ }, 1000);
80
+ } catch (error) {
81
+ console.error('Upload failed:', error);
82
+ }
83
+ };
84
+
85
+ useEffect(() => {
86
+ setIsFormValid(
87
+ !!selectedType &&
88
+ !!selectedDocumentType &&
89
+ !!selectedCategoryId &&
90
+ uploadedFiles?.length > 0
91
+ );
92
+ }, [selectedDocumentType, selectedCategoryId, uploadedFiles]);
93
+
18
94
  return (
19
95
  <OrderActionModal
20
- headerTitle="Add New Resource"
96
+ headerTitle="ADD RESOURCE"
21
97
  showAdditionalInfo
22
- infoText="NICK OLIVER, YO42 2ST"
98
+ infoText={infoText}
23
99
  onCloseHeader={onClose}
24
- onSubmit={() => {}}
100
+ onSubmit={handleSubmit}
101
+ isSubmitDisabled={!isFormValid}
25
102
  >
26
103
  <ContentContainer>
27
104
  <Top>
28
105
  <DocumentTypeDropdown />
106
+
107
+ <OrderActionsDropdown
108
+ label="Type"
109
+ required
110
+ placeholder="Select Type"
111
+ options={typeOptions}
112
+ onSelect={onSelectCancelReason}
113
+ />
114
+
29
115
  <CategoryDropdown />
30
116
  <VisibilityRadioButtons />
31
117
  </Top>
32
118
  <Bottom>
33
- <Label>File</Label>
34
- <DocFileUpload />
119
+ <Label>File</Label> <RequiredAsterisk>*</RequiredAsterisk>
120
+ <DocFileUpload />{' '}
35
121
  </Bottom>
36
122
  </ContentContainer>
37
123
  </OrderActionModal>
38
124
  );
39
125
  }
40
-
126
+ const RequiredAsterisk = styled.span`
127
+ color: red;
128
+ margin-left: 2px;
129
+ `;
41
130
  const Label = styled.label`
42
131
  color: #6a7378;
43
132
  font-family: 'Lato', sans-serif;
@@ -59,7 +148,6 @@ const Top = styled.div`
59
148
  `;
60
149
 
61
150
  const ContentContainer = styled.div`
62
- /* display: flex; */
63
151
  padding: 15px 12px;
64
152
  flex: 1 0 0;
65
153
  border-radius: 15px;
@@ -3,7 +3,6 @@ import React, { useEffect, useState } from 'react';
3
3
  import OrderActionModal from '../../../../../common/modals/order-action-modal/OrderActionModal';
4
4
  import ReturnAction from './ReturnAction';
5
5
  import ReturnReason from './ReturnReason';
6
- // import CancelOrderTable from './CancelOrderTable';
7
6
  import {
8
7
  useCurrentAction,
9
8
  useCustomerInfo,
@@ -165,9 +164,6 @@ function CancelOrder() {
165
164
  </Container>
166
165
  </TopRight>
167
166
  </Top>
168
- {/* <Bottom>
169
- <CancelOrderTable />
170
- </Bottom> */}
171
167
  </ContentContainer>
172
168
  </OrderActionModal>
173
169
  );
@@ -0,0 +1,113 @@
1
+ import {
2
+ CancelAndCompleteAction,
3
+ CancelationModal,
4
+ useApiHook,
5
+ } from '@bjsdistribution/dms-component-library';
6
+ import React, { useEffect } from 'react';
7
+ import styled from 'styled-components';
8
+ import {
9
+ useCurrentAction,
10
+ useLiveRecalling,
11
+ useOrderDetails,
12
+ useOrderId,
13
+ usePrevOrderDetails,
14
+ } from '../../../store';
15
+ import { ApiResponse, OrdersType } from '../../../types';
16
+ import { useLoading } from '../../../../order-daily-overview/store/store';
17
+ import { notification } from 'antd';
18
+
19
+ const ClearBookingStatus = () => {
20
+ const [orderId] = useOrderId();
21
+ const [, setOrderDetails] = useOrderDetails();
22
+ const [, setPrevOrderDetails] = usePrevOrderDetails();
23
+ const [, setLoading] = useLoading();
24
+ const [, setCurrentAction] = useCurrentAction();
25
+ const [liveRecalling, setRecalling] = useLiveRecalling();
26
+
27
+ const {
28
+ data: response,
29
+ setShouldPerformAction: setPerformAction,
30
+ } = useApiHook<{
31
+ data: ApiResponse[];
32
+ }>({
33
+ endpoint: `orders/${orderId}/clear-date/`,
34
+ method: 'POST',
35
+ performAction: false,
36
+ });
37
+ const { data: fetchedData, loading, setShouldPerformAction } = useApiHook<{
38
+ data: OrdersType[];
39
+ }>({
40
+ endpoint: `orders/${orderId}`,
41
+ method: 'GET',
42
+ performAction: false,
43
+ });
44
+
45
+ useEffect(() => {
46
+ setLoading(loading);
47
+ if (fetchedData && fetchedData.data) {
48
+ const requiredData = fetchedData?.data;
49
+ setOrderDetails(requiredData[0]);
50
+ setPrevOrderDetails(requiredData[0]);
51
+ setCurrentAction(undefined);
52
+ }
53
+ if (
54
+ (fetchedData && fetchedData?.data === null) ||
55
+ fetchedData?.data?.length === 0
56
+ ) {
57
+ setCurrentAction(undefined);
58
+ }
59
+ }, [loading]);
60
+
61
+ useEffect(() => {
62
+ if (response) {
63
+ //@ts-ignore
64
+ if (response?.data && response?.code === 200) {
65
+ setShouldPerformAction(true);
66
+ setRecalling(true);
67
+ setTimeout(() => {
68
+ setRecalling(false);
69
+ }, 2000);
70
+ } else {
71
+ notification.error({
72
+ message: 'Error',
73
+ description:
74
+ //@ts-ignore
75
+ response?.error_traceback ||
76
+ 'An error has occurred. Please try again later.',
77
+ });
78
+ setCurrentAction(undefined);
79
+ }
80
+ }
81
+ }, [response, liveRecalling]);
82
+
83
+ const saveButton = () => {
84
+ if (orderId) {
85
+ setRecalling(false);
86
+ setPerformAction(true);
87
+ }
88
+ };
89
+
90
+ const closeModal = () => {
91
+ setCurrentAction(undefined);
92
+ };
93
+ return (
94
+ <CancelationModal
95
+ title="Clear Booking Status"
96
+ description="Are you sure, you want to clear booking status of the Order?"
97
+ actions={
98
+ <CustomCancelAndCompleteAction
99
+ cancelLabel="Cancel"
100
+ onCancel={closeModal}
101
+ completeLabel="Confirm"
102
+ onComplete={saveButton}
103
+ />
104
+ }
105
+ />
106
+ );
107
+ };
108
+
109
+ const CustomCancelAndCompleteAction = styled(CancelAndCompleteAction)`
110
+ justify-content: center;
111
+ `;
112
+
113
+ export default ClearBookingStatus;