@bjsdistribution/dms-client-return 0.1.56-prod → 0.1.57-prod

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 (57) hide show
  1. package/dist/common/date-picker/CustomDatePicker.d.ts +1 -11
  2. package/dist/common/date-picker/FilterByType.d.ts +1 -3
  3. package/dist/common/date-picker/header/ClearDate.d.ts +1 -4
  4. package/dist/common/date-picker/header/DatePickerHeader.d.ts +1 -5
  5. package/dist/common/date-picker/header/Header.d.ts +1 -3
  6. package/dist/common/date-picker/legend/DateLegend.d.ts +1 -7
  7. package/dist/common/date-picker/legend/index.d.ts +1 -3
  8. package/dist/common/date-picker/modal/Modal.d.ts +1 -6
  9. package/dist/common/date-picker/range-date-filter/Seperator.d.ts +1 -3
  10. package/dist/common/date-picker/single-date-filter/SingleDateFilter.d.ts +1 -8
  11. package/dist/components/client-portal/ReturnRTFilters.d.ts +3 -5
  12. package/dist/components/order-daily-overview/filters/BulkFilterStyle.d.ts +2 -3
  13. package/dist/components/order-daily-overview/filters/FilterStyle.d.ts +8 -9
  14. package/dist/components/order-daily-overview/header/checkbox-wrapper/CheckBoxWrapper.d.ts +2 -2
  15. package/dist/components/order-daily-overview/header/route-header/ClientRouterHeader.d.ts +1 -1
  16. package/dist/components/order-daily-overview/header/route-header/RouterHeader.d.ts +1 -1
  17. package/dist/components/order-daily-overview/header/route-header/RouterHeaderStyle.d.ts +4 -5
  18. package/dist/components/order-daily-overview/header/table-filter/TableFilterStyle.d.ts +4 -5
  19. package/dist/components/order-daily-overview/header-filters/Styledfilters.d.ts +14 -27
  20. package/dist/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.d.ts +1 -1
  21. package/dist/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.d.ts +21 -23
  22. package/dist/components/order-daily-overview/shared/elements/PrintDropDown.d.ts +2 -4
  23. package/dist/components/order-daily-overview/shared/utlis.d.ts +2 -2
  24. package/dist/components/order-daily-overview/table/table-data/styles.d.ts +37 -44
  25. package/dist/components/order-daily-overview/table-view/PaginationStyle.d.ts +9 -12
  26. package/dist/components/order-daily-overview/table-view/TableStyle.d.ts +29 -38
  27. package/dist/components/order-view/details-filters/left-side-filters/actions/ActionStyles.d.ts +3 -4
  28. package/dist/components/order-view/details-filters/left-side-filters/dropdowns/PrintDropDownReturn.d.ts +2 -4
  29. package/dist/components/order-view/generic-table/AuditLogs.d.ts +1 -1
  30. package/dist/components/order-view/modalsPopup/CreateReturnModal.d.ts +1 -1
  31. package/dist/components/order-view/notes/logs/NotestableStyles.d.ts +2 -3
  32. package/dist/components/order-view/order-actions/actions/cancel-order/CancelOrderTable.d.ts +2 -2
  33. package/dist/components/order-view/order-actions/actions/charge-log/index.d.ts +8 -8
  34. package/dist/components/order-view/order-actions/actions/confirm-order/tables/ReminderStyles.d.ts +8 -9
  35. package/dist/components/order-view/order-actions/actions/create-task-reminder/SharedComponents.d.ts +9 -22
  36. package/dist/components/order-view/order-actions/actions/force-debrief/ForceDebriefModal.d.ts +2 -2
  37. package/dist/components/order-view/order-actions/actions/force-debrief/styles.d.ts +7 -8
  38. package/dist/components/order-view/order-actions/actions/modalstyle.d.ts +33 -35
  39. package/dist/components/order-view/order-actions/actions/send-sms/SendSmsModal.d.ts +1 -1
  40. package/dist/components/order-view/order-actions/actions/uncancel-order/UncancelOrderTable.d.ts +2 -2
  41. package/dist/components/order-view/order-actions/utils.d.ts +1 -1
  42. package/dist/components/order-view/order-details/expanded-content/orders-section/Depot.d.ts +1 -2
  43. package/dist/components/order-view/return-client-products/product-table/ReturnProductTable.d.ts +1 -1
  44. package/dist/components/order-view/store.d.ts +1 -1
  45. package/dist/components/order-view/view-reminder/ViewReminder.d.ts +1 -1
  46. package/dist/components/order-view/view-reminder/reminder-styles.d.ts +19 -27
  47. package/dist/dms-client-return.cjs.development.js +2321 -2257
  48. package/dist/dms-client-return.cjs.development.js.map +1 -1
  49. package/dist/dms-client-return.cjs.production.min.js +1 -1
  50. package/dist/dms-client-return.cjs.production.min.js.map +1 -1
  51. package/dist/dms-client-return.esm.js +2321 -2257
  52. package/dist/dms-client-return.esm.js.map +1 -1
  53. package/package.json +1 -1
  54. package/src/components/order-view/order-actions/actions/force-debrief/ForceDebriefModal.tsx +16 -0
  55. package/src/components/order-view/order-actions/actions/force-debrief/escalation/EscalationCategory.tsx +7 -7
  56. package/src/components/order-view/order-actions/actions/force-debrief/escalation/EscalationLevel.tsx +11 -13
  57. package/src/components/order-view/order-actions/actions/force-debrief/escalation/EscalationReason.tsx +2 -5
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.56-prod",
2
+ "version": "0.1.57-prod",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -431,6 +431,22 @@ function ForceDebriefModal(props: IProps) {
431
431
  }
432
432
  }
433
433
 
434
+ // Validate escalation fields early – before any API calls
435
+ if (activeTab === 'failure' && isEscalationEnabled) {
436
+ if (
437
+ !escalationCategory?.value ||
438
+ !escalationLevel?.value ||
439
+ !escalationReason?.value
440
+ ) {
441
+ notification.error({
442
+ message: 'Error',
443
+ description:
444
+ 'Escalation Category, Level and Reason are all mandatory',
445
+ });
446
+ return;
447
+ }
448
+ }
449
+
434
450
  if (isDifferent()) {
435
451
  await ordersUpdateApi();
436
452
  }
@@ -19,10 +19,11 @@ function EscalationCategory() {
19
19
  const faultNonFaultReasons = orderStaticData?.fault_non_fault_reasons;
20
20
  const escalationTypes = orderStaticData?.escalation_types;
21
21
 
22
- const escalationCategoryOptions = orderStaticData?.escalation_category?.map(
23
- (category: any) => ({
24
- label: category?.type,
25
- value: category?.id,
22
+ // Use escalation_types directly as category options (same as orders force-debrief)
23
+ const escalationCategoryOptions = escalationTypes?.map(
24
+ (type: any) => ({
25
+ label: type?.name,
26
+ value: type?.id,
26
27
  })
27
28
  );
28
29
 
@@ -30,10 +31,9 @@ function EscalationCategory() {
30
31
  const escTypeId = faultNonFaultReasons?.find(
31
32
  (x: any) => x?.order_reason_id === failureReason?.id
32
33
  )?.escalation_type_id;
33
- const escCategoryId = escalationTypes?.find((x: any) => x?.id === escTypeId)
34
- ?.escalation_category_id;
34
+ // escalationCategory.value is now escalation_type.id directly
35
35
  const selectedOption = escalationCategoryOptions?.find(
36
- (option: any) => option?.value === escCategoryId
36
+ (option: any) => option?.value === escTypeId
37
37
  );
38
38
  setEscalationCategory(selectedOption);
39
39
  }, [failureReason]);
@@ -15,22 +15,20 @@ function EscalationLevel() {
15
15
  const [orderStaticData] = useOrderStaticData();
16
16
  const [escalationCategory] = useEscalationCategory();
17
17
  const [escalationLevel, setEscalationLevel] = useEscalationLevel();
18
- const escalationLevelOptions = orderStaticData?.escalation_levels?.map(
19
- (escalation: any) => {
20
- return {
21
- label: escalation?.type,
22
- value: escalation?.id,
23
- };
24
- }
25
- );
26
18
  const escalationTypes = orderStaticData?.escalation_types;
27
- useEffect(() => {
28
- const selectedEscalationLevelId = escalationTypes?.find(
29
- (item: any) => item?.escalation_category_id === escalationCategory?.value
30
- )?.escalation_level_id;
31
19
 
20
+ // Use escalation_types as level options (same as orders force-debrief)
21
+ const escalationLevelOptions = escalationTypes?.map(
22
+ (type: any) => ({
23
+ label: type?.level,
24
+ value: type?.id,
25
+ })
26
+ );
27
+
28
+ useEffect(() => {
29
+ // escalationCategory.value is now the escalation_type.id directly
32
30
  const defaultLevel = escalationLevelOptions?.find(
33
- (item: any) => item.value === selectedEscalationLevelId
31
+ (item: any) => item.value === escalationCategory?.value
34
32
  );
35
33
 
36
34
  setEscalationLevel(defaultLevel);
@@ -27,11 +27,8 @@ function EscalationReason() {
27
27
  setIsFailureReasonChanged,
28
28
  ] = useIsFailureReasonChanged();
29
29
 
30
- const escalationTypes = orderStaticData?.escalation_types;
31
-
32
- const escalationTypeId = escalationTypes?.find(
33
- (item: any) => item?.escalation_category_id === escalationCategory?.value
34
- )?.id;
30
+ // escalationCategory.value is now escalation_type.id directly (same as orders force-debrief)
31
+ const escalationTypeId = escalationCategory?.value;
35
32
 
36
33
  const escalationReasons = orderStaticData?.escalation_reasons?.filter(
37
34
  (x: any) => x?.escalation_type_id === escalationTypeId