@bjsdistribution/dms-client-return 0.1.99-prod → 0.2.0-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 (48) hide show
  1. package/dist/components/client-portal/OutstandingTable.js +118 -112
  2. package/dist/components/client-portal/OutstandingTable.js.map +1 -1
  3. package/dist/components/fakeData.js.map +1 -1
  4. package/dist/components/order-daily-overview/common/fakedata.js.map +1 -1
  5. package/dist/components/order-daily-overview/return-after-table/table/OrderTable.js +33 -31
  6. package/dist/components/order-daily-overview/return-after-table/table/OrderTable.js.map +1 -1
  7. package/dist/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.js +82 -79
  8. package/dist/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.js.map +1 -1
  9. package/dist/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.js +157 -151
  10. package/dist/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.js.map +1 -1
  11. package/dist/components/order-view/order-actions/Dropdown.js +3 -3
  12. package/dist/components/order-view/order-actions/Dropdown.js.map +1 -1
  13. package/dist/components/order-view/order-actions/actions/cancel-order/CancelOrderTable.js +47 -45
  14. package/dist/components/order-view/order-actions/actions/cancel-order/CancelOrderTable.js.map +1 -1
  15. package/dist/components/order-view/order-actions/actions/cancel-order/ReturnReason.js +36 -23
  16. package/dist/components/order-view/order-actions/actions/cancel-order/ReturnReason.js.map +1 -1
  17. package/dist/components/order-view/order-actions/actions/confirm-order/tables/ProductTable.js +25 -23
  18. package/dist/components/order-view/order-actions/actions/confirm-order/tables/ProductTable.js.map +1 -1
  19. package/dist/components/order-view/order-actions/actions/force-debrief/ForceDebriefModal.js +89 -88
  20. package/dist/components/order-view/order-actions/actions/force-debrief/ForceDebriefModal.js.map +1 -1
  21. package/dist/components/order-view/order-actions/actions/force-debrief/charges/collection-add-ons/index.js +16 -16
  22. package/dist/components/order-view/order-actions/actions/force-debrief/charges/collection-add-ons/index.js.map +1 -1
  23. package/dist/components/order-view/order-actions/actions/force-debrief/escalation/EscalationReason.js +23 -22
  24. package/dist/components/order-view/order-actions/actions/force-debrief/escalation/EscalationReason.js.map +1 -1
  25. package/dist/components/order-view/order-actions/actions/force-debrief/order-info/RadioButtons.js +56 -52
  26. package/dist/components/order-view/order-actions/actions/force-debrief/order-info/RadioButtons.js.map +1 -1
  27. package/dist/components/order-view/order-actions/actions/force-debrief/order-info/dropdowns/FailureReasonDropdown.js +27 -26
  28. package/dist/components/order-view/order-actions/actions/force-debrief/order-info/dropdowns/FailureReasonDropdown.js.map +1 -1
  29. package/dist/components/order-view/order-actions/actions/hold-order/HoldOrderModal.js +29 -29
  30. package/dist/components/order-view/order-actions/actions/hold-order/HoldOrderModal.js.map +1 -1
  31. package/dist/components/order-view/order-actions/actions/split-order/SplitOrderTable.js +72 -71
  32. package/dist/components/order-view/order-actions/actions/split-order/SplitOrderTable.js.map +1 -1
  33. package/dist/components/order-view/order-actions/actions/uncancel-order/UncancelOrderTable.js +37 -35
  34. package/dist/components/order-view/order-actions/actions/uncancel-order/UncancelOrderTable.js.map +1 -1
  35. package/dist/components/order-view/order-details/expanded-content/services-section/OrderServices.js +20 -18
  36. package/dist/components/order-view/order-details/expanded-content/services-section/OrderServices.js.map +1 -1
  37. package/dist/components/order-view/order-details/expanded-content/services-section/ServiceType.js +26 -22
  38. package/dist/components/order-view/order-details/expanded-content/services-section/ServiceType.js.map +1 -1
  39. package/dist/components/order-view/order-details/helper.js.map +1 -1
  40. package/dist/components/order-view/return-client-products/product-table/ReturnProductTable.js +53 -53
  41. package/dist/components/order-view/return-client-products/product-table/ReturnProductTable.js.map +1 -1
  42. package/dist/components/order-view/toolbox-resources/expanded-content/index.js +6 -7
  43. package/dist/components/order-view/toolbox-resources/expanded-content/index.js.map +1 -1
  44. package/dist/components/utils.js +4 -5
  45. package/dist/components/utils.js.map +1 -1
  46. package/dist/types/components/order-view/order-actions/Dropdown.d.ts +1 -0
  47. package/dist/types/components/utils.d.ts +0 -1
  48. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"ReturnOrderFilter.js","sources":["../../../../../src/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport {\n LeftSideConatiner,\n StyledFIlterELements,\n StyledFiter,\n} from '../../filters/FilterStyle';\nimport TableFilters from './TableFilters';\nimport FilterIcon from '../../../../assets/icons/FilterIcon';\nimport DateIcon from '../../../../assets/icons/DateIcon';\n// import StatusIcon from '../../../../assets/icons/StatusIcon';\nimport ClientIcon from '../../../../assets/icons/ClientIcon';\n// import AssigneIcon from '../../../../assets/icons/AssigneIcon';\nimport { DatePicker, Select } from 'antd';\nimport { useAtom } from '../../../order-view/store';\nimport styled from 'styled-components';\nimport dayjs from 'dayjs';\nimport {\n useAssignData,\n // useCustomerData,\n useStatusOrderData,\n} from '../../../store';\nimport StatusIcon from '../../../../assets/icons/StatusIcon';\nimport VehicleIcon from '../../../../assets/icons/VehicleIcon';\nimport {\n ClearAll,\n StyledFilterBtnIcon,\n StyledFilterBtnLabel,\n} from '../../table/table-data/styles';\nimport { filtersReducerReturnAtom } from './ReturnFilterStore';\nimport { useAxios } from '@bjsdistribution/dms-component-library';\nimport { ApiResponse } from '../../common/interface';\n\nconst vehicleTypeOptions = [\n { label: 'LGV', value: 'LGV' },\n { label: 'HGV', value: 'HGV' },\n\n];\n\nconst ReturnOrderFilter = () => {\n const [, dispatch] = useAtom(filtersReducerReturnAtom);\n // const [customers] = useCustomerData();\n const [selectedDate, setSelectedDate] = useState<any | null>();\n const [statusOfOrder] = useStatusOrderData();\n const [selectedClient, setSelectedClient] = useState<any[]>([]);\n const [statusOrder, setStatusOfOrder] = useState<any[]>([]);\n const [selectedVehicleType, setSelectedVehicleType] = useState<string | null>(null);\n\n //API for client data\n const { data: fetchedCustomerData, fetchData } = useAxios<ApiResponse>({\n endpoint: `/v1/return/order/customers/`,\n method: 'GET',\n //@ts-ignore\n pagination: { is_pagination: false },\n });\n\n useEffect(() => {\n fetchData();\n }, []);\n\n // date change here\n const handleDateChange = (dates: any | null) => {\n setSelectedDate(dates ? [dates[0]?.$d, dates[1]?.$d] : null);\n };\n useEffect(() => {\n if (selectedDate) {\n dispatch({\n type: 'SET_DATE_FILTER',\n payload: selectedDate,\n });\n // Reset to the first page\n dispatch({\n type: 'SET_PAGE',\n payload: 1,\n });\n }\n }, [selectedDate]);\n //client options\n const clientOptions = fetchedCustomerData?.data?.map((option: any) => ({\n label:\n option?.customer_name?.charAt(0)?.toUpperCase() +\n option?.customer_name?.slice(1),\n value: option?.customer_id,\n }));\n //status of order\n const orderOptions = statusOfOrder?.map((option: any) => ({\n label:\n option?.status_type?.charAt(0)?.toUpperCase() +\n option?.status_type?.slice(1),\n value: option?.type,\n }));\n const handleClientChange = (value: any[]) => {\n setSelectedClient(value);\n dispatch({\n type: 'SET_CLIENT_FILTER',\n payload: value,\n });\n // Reset to the first page\n dispatch({\n type: 'SET_PAGE',\n payload: 1,\n });\n };\n const handleStatusOfOrder = (value: any[]) => {\n setStatusOfOrder(value);\n dispatch({\n type: 'SET_STATUS_ORDER_FILTER',\n payload: value,\n });\n // Reset to the first page\n dispatch({\n type: 'SET_PAGE',\n payload: 1,\n });\n };\n\n const handleVehicleTypeChange = (value: any) => {\n setSelectedVehicleType(value);\n dispatch({\n type: 'SET_VEHICLE_TYPE_FILTER',\n payload: value,\n });\n dispatch({\n type: 'SET_PAGE',\n payload: 1,\n });\n };\n\n const handleClearVehicleType = () => {\n setSelectedVehicleType(null);\n dispatch({\n type: 'CLEAR_VEHICLE_TYPE_FILTER',\n });\n dispatch({\n type: 'SET_PAGE',\n payload: 1,\n });\n };\n\n const handleClearAll = () => {\n setSelectedDate(null);\n setSelectedClient([]);\n setStatusOfOrder([]);\n setSelectedVehicleType(null);\n dispatch({ type: 'CLEAR_ALL_FILTER' });\n };\n\n const handleClear = () => {\n dispatch({\n type: 'CLEAR_STATUS_ORDER_FILTER',\n });\n\n setStatusOfOrder([]);\n };\n\n const handleClearClient = () => {\n dispatch({\n type: 'CLEAR_CLIENT_FILTER',\n });\n setSelectedClient([]);\n };\n //clearing filters\n useEffect(() => {\n if (selectedDate === null) {\n dispatch({ type: 'CLEAR_DATE' });\n }\n }, [selectedDate]);\n\n return (\n <>\n <StyledFiter>\n <StyledFIlterELements>\n <LeftSideConatiner>\n <div className=\"filtercontainer\">\n <div className=\"filtericon\">\n <FilterIcon />\n </div>\n <div className=\"textcont\">Filters</div>\n </div>\n <div className=\"datefilter\">\n <div className=\"dateiconcontainer\">\n <DateIcon />\n </div>\n <StyledDatePicker>\n <DatePicker.RangePicker\n className=\"custom-datepicker\"\n onChange={handleDateChange}\n style={{ width: '220px' }}\n value={\n selectedDate\n ? [dayjs(selectedDate[0]), dayjs(selectedDate[1])]\n : null\n }\n format=\"DD/MM/YY\"\n placeholder={['Start date', 'End date']}\n needConfirm\n allowClear\n />\n </StyledDatePicker>\n </div>\n <div className=\"datefilter\">\n <div className=\"dateiconcontainer\">\n <StatusIcon />\n </div>\n <StyledAntSelect>\n <Select\n mode=\"multiple\"\n options={orderOptions}\n className=\"custom-select\"\n placeholder=\"Status of Order\"\n onChange={handleStatusOfOrder}\n style={{ minWidth: '250px', maxWidth: '300px' }}\n value={statusOrder}\n onClear={handleClear}\n allowClear\n maxTagCount=\"responsive\"\n />\n </StyledAntSelect>\n </div>\n <div className=\"datefilter\">\n <div className=\"dateiconcontainer\">\n <ClientIcon />\n </div>\n <StyledAntSelect>\n <Select\n mode=\"multiple\"\n options={clientOptions}\n className=\"custom-select\"\n placeholder=\"Clients\"\n onChange={handleClientChange}\n value={selectedClient}\n style={{\n minWidth: '150px',\n width: 'auto',\n cursor: 'pointer',\n }}\n allowClear\n onClear={handleClearClient}\n filterOption={(input: any, option: any) =>\n (option?.label ?? '')\n .toLowerCase()\n .includes(input.toLowerCase())\n }\n showSearch\n maxTagCount=\"responsive\"\n />\n </StyledAntSelect>\n </div>\n\n <div className=\"datefilter\">\n <div className=\"dateiconcontainer\">\n <VehicleIcon />\n </div>\n <StyledAntSelect>\n <Select\n options={vehicleTypeOptions}\n className=\"custom-select\"\n placeholder=\"Vehicle Type\"\n onChange={handleVehicleTypeChange}\n value={selectedVehicleType}\n style={{ minWidth: '150px' }}\n allowClear\n onClear={handleClearVehicleType}\n />\n </StyledAntSelect>\n </div>\n\n {selectedDate ||\n statusOrder?.length ||\n selectedClient?.length ||\n selectedVehicleType ? (\n <>\n <ClearAll onClick={handleClearAll}>\n <StyledFilterBtnIcon>\n <i className=\"cross\"></i>\n </StyledFilterBtnIcon>\n <StyledFilterBtnLabel>Clear all</StyledFilterBtnLabel>\n </ClearAll>\n </>\n ) : null}\n\n </LeftSideConatiner>\n </StyledFIlterELements>\n <TableFilters />\n </StyledFiter>\n </>\n );\n};\nconst StyledDatePicker = styled.div`\n .custom-datepicker {\n border: none;\n }\n`;\n// const DropdownContainer = styled.div``;\nexport const StyledAntSelect = styled.div`\n .custom-select {\n border: none;\n width: 80px;\n }\n .ant-select-selector {\n border: 1px solid #ffffff !important;\n }\n :where(.css-dev-only-do-not-override-m4timi).ant-select-single:not(.ant-select-customize-input)\n .ant-select-selector {\n padding: 0 5px;\n }\n :where(.css-dev-only-do-not-override-m4timi).ant-select-outlined:not(.ant-select-customize-input)\n .ant-select-selector {\n border: none;\n }\n .roundbox {\n display: flex;\n width: 18px;\n height: 18px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n border-radius: 18px;\n background: #fff;\n box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);\n left: 359px;\n position: absolute;\n border-radius: 18px;\n background: #fff;\n box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);\n top: 16px;\n }\n .ant-select-clear {\n top: 40% !important;\n font-size: 18px !important;\n }\n`;\nexport default ReturnOrderFilter;\n"],"names":["vehicleTypeOptions","ReturnOrderFilter","dispatch","useAtom","filtersReducerReturnAtom","selectedDate","setSelectedDate","useState","statusOfOrder","useStatusOrderData","selectedClient","setSelectedClient","statusOrder","setStatusOfOrder","selectedVehicleType","setSelectedVehicleType","fetchedCustomerData","fetchData","useAxios","useEffect","handleDateChange","dates","clientOptions","option","orderOptions","handleClientChange","value","handleStatusOfOrder","handleVehicleTypeChange","handleClearVehicleType","handleClearAll","handleClear","handleClearClient","jsx","Fragment","StyledFiter","StyledFIlterELements","LeftSideConatiner","jsxs","FilterIcon","DateIcon","StyledDatePicker","DatePicker","dayjs","StatusIcon","StyledAntSelect","Select","ClientIcon","input","VehicleIcon","ClearAll","StyledFilterBtnIcon","StyledFilterBtnLabel","TableFilters","styled"],"mappings":";;;;;;;;;;;;;;;;;;AAgCA,MAAMA,IAAqB;AAAA,EACzB,EAAE,OAAO,OAAO,OAAO,MAAA;AAAA,EACvB,EAAE,OAAO,OAAO,OAAO,MAAA;AAEzB,GAEMC,KAAoB,MAAM;AAC9B,QAAM,GAAGC,CAAQ,IAAIC,EAAQC,CAAwB,GAE/C,CAACC,GAAcC,CAAe,IAAIC,EAAA,GAClC,CAACC,CAAa,IAAIC,EAAA,GAClB,CAACC,GAAgBC,CAAiB,IAAIJ,EAAgB,CAAA,CAAE,GACxD,CAACK,GAAaC,CAAgB,IAAIN,EAAgB,CAAA,CAAE,GACpD,CAACO,GAAqBC,CAAsB,IAAIR,EAAwB,IAAI,GAG5E,EAAE,MAAMS,GAAqB,WAAAC,EAAA,IAAcC,EAAsB;AAAA,IACrE,UAAU;AAAA,IACV,QAAQ;AAAA;AAAA,IAER,YAAY,EAAE,eAAe,GAAA;AAAA,EAAM,CACpC;AAED,EAAAC,EAAU,MAAM;AACd,IAAAF,EAAA;AAAA,EACF,GAAG,CAAA,CAAE;AAGL,QAAMG,IAAmB,CAACC,MAAsB;AAC9C,IAAAf,EAAgBe,IAAQ,CAACA,EAAM,CAAC,GAAG,IAAIA,EAAM,CAAC,GAAG,EAAE,IAAI,IAAI;AAAA,EAC7D;AACA,EAAAF,EAAU,MAAM;AACd,IAA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A,EACd,CACF;AAAA,MAAA,GACF;AAAA,MAEA,gBAAAV,EAAC,OAAA,EAAI,WAAU,cACb,UAAA;AAAA,QAAA,gBAAAL,EAAC,OAAA,EAAI,WAAU,qBACb,UAAA,gBAAAA,EAACgB,KAAY,GACf;AAAA,0BACCJ,GAAA,EACC,UAAA,gBAAAZ;AAAA,UAACa;AAAA,UAAA;AAAA,YACC,SAAS9C;AAAA,YACT,WAAU;AAAA,YACV,aAAY;AAAA,YACZ,UAAU4B;AAAA,YACV,OAAOd;AAAA,YACP,OAAO,EAAE,UAAU,QAAA;AAAA,YACnB,YAAU;AAAA,YACV,SAASe;AAAA,UAAA;AAAA,QAAA,EACX,CACF;AAAA,MAAA,GACF;AAAA,MAECxB,KACCO,GAAa,UACbF,GAAgB,UAChBI,IACA,gBAAAmB,EAAAC,GAAA,EACE,UAAA,gBAAAI,EAACY,GAAA,EAAS,SAASpB,GACjB,UAAA;AAAA,QAAA,gBAAAG,EAACkB,GAAA,EACC,UAAA,gBAAAlB,EAAC,KAAA,EAAE,WAAU,SAAQ,GACvB;AAAA,QACA,gBAAAA,EAACmB,KAAqB,UAAA,YAAA,CAAS;AAAA,MAAA,EAAA,CACjC,GACF,IACE;AAAA,IAAA,EAAA,CAEN,EAAA,CACF;AAAA,sBACCC,GAAA,CAAA,CAAa;AAAA,EAAA,EAAA,CAChB,EAAA,CACF;AAEJ,GACMZ,IAAmBa,EAAO;AAAA;AAAA;AAAA;AAAA,GAMnBT,IAAkBS,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
1
+ {"version":3,"file":"ReturnOrderFilter.js","sources":["../../../../../src/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport {\n LeftSideConatiner,\n StyledFIlterELements,\n StyledFiter,\n} from '../../filters/FilterStyle';\nimport TableFilters from './TableFilters';\nimport FilterIcon from '../../../../assets/icons/FilterIcon';\nimport DateIcon from '../../../../assets/icons/DateIcon';\n// import StatusIcon from '../../../../assets/icons/StatusIcon';\nimport ClientIcon from '../../../../assets/icons/ClientIcon';\n// import AssigneIcon from '../../../../assets/icons/AssigneIcon';\nimport { DatePicker, Select } from 'antd';\nimport { useAtom } from '../../../order-view/store';\nimport styled from 'styled-components';\nimport dayjs from 'dayjs';\nimport {\n useAssignData,\n useClientPortal,\n // useCustomerData,\n useStatusOrderData,\n} from '../../../store';\nimport StatusIcon from '../../../../assets/icons/StatusIcon';\nimport VehicleIcon from '../../../../assets/icons/VehicleIcon';\nimport {\n ClearAll,\n StyledFilterBtnIcon,\n StyledFilterBtnLabel,\n} from '../../table/table-data/styles';\nimport { filtersReducerReturnAtom } from './ReturnFilterStore';\nimport { toReverseDeliveryLabel, useAxios } from '@bjsdistribution/dms-component-library';\nimport { ApiResponse } from '../../common/interface';\n\nconst vehicleTypeOptions = [\n { label: 'LGV', value: 'LGV' },\n { label: 'HGV', value: 'HGV' },\n\n];\n\nconst ReturnOrderFilter = () => {\n const [, dispatch] = useAtom(filtersReducerReturnAtom);\n // const [customers] = useCustomerData();\n const [selectedDate, setSelectedDate] = useState<any | null>();\n const [statusOfOrder] = useStatusOrderData();\n const [selectedAssignee, setSelectedAssignee] = useState<any | null>();\n const [assignData] = useAssignData();\n const [isClientPortal] = useClientPortal();\n const [selectedClient, setSelectedClient] = useState<any[]>([]);\n const [statusOrder, setStatusOfOrder] = useState<any[]>([]);\n const [selectedVehicleType, setSelectedVehicleType] = useState<string | null>(null);\n\n //API for client data\n const { data: fetchedCustomerData, fetchData } = useAxios<ApiResponse>({\n endpoint: `/v1/return/order/customers/`,\n method: 'GET',\n //@ts-ignore\n pagination: { is_pagination: false },\n });\n\n useEffect(() => {\n fetchData();\n }, []);\n\n // date change here\n const handleDateChange = (dates: any | null) => {\n setSelectedDate(dates ? [dates[0]?.$d, dates[1]?.$d] : null);\n };\n useEffect(() => {\n if (selectedDate) {\n dispatch({\n type: 'SET_DATE_FILTER',\n payload: selectedDate,\n });\n // Reset to the first page\n dispatch({\n type: 'SET_PAGE',\n payload: 1,\n });\n }\n }, [selectedDate]);\n //client options\n const clientOptions = fetchedCustomerData?.data?.map((option: any) => ({\n label:\n option?.customer_name?.charAt(0)?.toUpperCase() +\n option?.customer_name?.slice(1),\n value: option?.customer_id,\n }));\n //status of order\n const orderOptions = statusOfOrder?.map((option: any) => {\n const statusLabel =\n option?.status_type?.charAt(0)?.toUpperCase() +\n option?.status_type?.slice(1);\n return {\n label: isClientPortal ? statusLabel : toReverseDeliveryLabel(statusLabel),\n value: option?.type,\n };\n });\n const handleClientChange = (value: any) => {\n if (value === selectedClient) return;\n setSelectedClient(value);\n dispatch({\n type: 'SET_CLIENT_FILTER',\n payload: value,\n });\n // Reset to the first page\n dispatch({\n type: 'SET_PAGE',\n payload: 1,\n });\n };\n const handleStatusOfOrder = (value: any[]) => {\n setStatusOfOrder(value);\n dispatch({\n type: 'SET_STATUS_ORDER_FILTER',\n payload: value,\n });\n // Reset to the first page\n dispatch({\n type: 'SET_PAGE',\n payload: 1,\n });\n };\n\n const handleVehicleTypeChange = (value: any) => {\n setSelectedVehicleType(value);\n dispatch({\n type: 'SET_VEHICLE_TYPE_FILTER',\n payload: value,\n });\n dispatch({\n type: 'SET_PAGE',\n payload: 1,\n });\n };\n\n const handleClearVehicleType = () => {\n setSelectedVehicleType(null);\n dispatch({\n type: 'CLEAR_VEHICLE_TYPE_FILTER',\n });\n dispatch({\n type: 'SET_PAGE',\n payload: 1,\n });\n };\n\n const handleClearAll = () => {\n setSelectedDate(null);\n setSelectedClient([]);\n setStatusOfOrder([]);\n setSelectedVehicleType(null);\n dispatch({ type: 'CLEAR_ALL_FILTER' });\n };\n\n const handleClear = () => {\n dispatch({\n type: 'CLEAR_STATUS_ORDER_FILTER',\n });\n\n setStatusOfOrder([]);\n };\n\n const handleClearClient = () => {\n dispatch({\n type: 'CLEAR_CLIENT_FILTER',\n });\n setSelectedClient([]);\n };\n //clearing filters\n useEffect(() => {\n if (selectedDate === null) {\n dispatch({ type: 'CLEAR_DATE' });\n }\n }, [selectedDate]);\n\n return (\n <>\n <StyledFiter>\n <StyledFIlterELements>\n <LeftSideConatiner>\n <div className=\"filtercontainer\">\n <div className=\"filtericon\">\n <FilterIcon />\n </div>\n <div className=\"textcont\">Filters</div>\n </div>\n <div className=\"datefilter\">\n <div className=\"dateiconcontainer\">\n <DateIcon />\n </div>\n <StyledDatePicker>\n <DatePicker.RangePicker\n className=\"custom-datepicker\"\n onChange={handleDateChange}\n style={{ width: '220px' }}\n value={\n selectedDate\n ? [dayjs(selectedDate[0]), dayjs(selectedDate[1])]\n : null\n }\n format=\"DD/MM/YY\"\n placeholder={['Start date', 'End date']}\n needConfirm\n allowClear\n />\n </StyledDatePicker>\n </div>\n <div className=\"datefilter\">\n <div className=\"dateiconcontainer\">\n <StatusIcon />\n </div>\n <StyledAntSelect>\n <Select\n mode=\"multiple\"\n options={orderOptions}\n className=\"custom-select\"\n placeholder=\"Status of Order\"\n onChange={handleStatusOfOrder}\n style={{ minWidth: '250px', maxWidth: '300px' }}\n value={statusOrder}\n onClear={handleClear}\n allowClear\n maxTagCount=\"responsive\"\n />\n </StyledAntSelect>\n </div>\n <div className=\"datefilter\">\n <div className=\"dateiconcontainer\">\n <ClientIcon />\n </div>\n <StyledAntSelect>\n <Select\n mode=\"multiple\"\n options={clientOptions}\n className=\"custom-select\"\n placeholder=\"Clients\"\n onChange={handleClientChange}\n value={selectedClient}\n style={{\n minWidth: '150px',\n width: 'auto',\n cursor: 'pointer',\n }}\n allowClear\n onClear={handleClearClient}\n filterOption={(input: any, option: any) =>\n (option?.label ?? '')\n .toLowerCase()\n .includes(input.toLowerCase())\n }\n showSearch\n maxTagCount=\"responsive\"\n />\n </StyledAntSelect>\n </div>\n\n <div className=\"datefilter\">\n <div className=\"dateiconcontainer\">\n <VehicleIcon />\n </div>\n <StyledAntSelect>\n <Select\n options={vehicleTypeOptions}\n className=\"custom-select\"\n placeholder=\"Vehicle Type\"\n onChange={handleVehicleTypeChange}\n value={selectedVehicleType}\n style={{ minWidth: '150px' }}\n allowClear\n onClear={handleClearVehicleType}\n />\n </StyledAntSelect>\n </div>\n\n {selectedDate ||\n statusOrder?.length ||\n selectedClient?.length ||\n selectedVehicleType ? (\n <>\n <ClearAll onClick={handleClearAll}>\n <StyledFilterBtnIcon>\n <i className=\"cross\"></i>\n </StyledFilterBtnIcon>\n <StyledFilterBtnLabel>Clear all</StyledFilterBtnLabel>\n </ClearAll>\n </>\n ) : null}\n\n </LeftSideConatiner>\n </StyledFIlterELements>\n <TableFilters />\n </StyledFiter>\n </>\n );\n};\nconst StyledDatePicker = styled.div`\n .custom-datepicker {\n border: none;\n }\n`;\n// const DropdownContainer = styled.div``;\nexport const StyledAntSelect = styled.div`\n .custom-select {\n border: none;\n width: 80px;\n }\n .ant-select-selector {\n border: 1px solid #ffffff !important;\n }\n :where(.css-dev-only-do-not-override-m4timi).ant-select-single:not(.ant-select-customize-input)\n .ant-select-selector {\n padding: 0 5px;\n }\n :where(.css-dev-only-do-not-override-m4timi).ant-select-outlined:not(.ant-select-customize-input)\n .ant-select-selector {\n border: none;\n }\n .roundbox {\n display: flex;\n width: 18px;\n height: 18px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n border-radius: 18px;\n background: #fff;\n box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);\n left: 359px;\n position: absolute;\n border-radius: 18px;\n background: #fff;\n box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);\n top: 16px;\n }\n .ant-select-clear {\n top: 40% !important;\n font-size: 18px !important;\n }\n`;\nexport default ReturnOrderFilter;\n"],"names":["vehicleTypeOptions","ReturnOrderFilter","dispatch","useAtom","filtersReducerReturnAtom","selectedDate","setSelectedDate","useState","statusOfOrder","useStatusOrderData","selectedAssignee","setSelectedAssignee","assignData","useAssignData","isClientPortal","useClientPortal","selectedClient","setSelectedClient","statusOrder","setStatusOfOrder","selectedVehicleType","setSelectedVehicleType","fetchedCustomerData","fetchData","useAxios","useEffect","handleDateChange","dates","clientOptions","option","orderOptions","statusLabel","toReverseDeliveryLabel","handleClientChange","value","handleStatusOfOrder","handleVehicleTypeChange","handleClearVehicleType","handleClearAll","handleClear","handleClearClient","jsx","Fragment","StyledFiter","StyledFIlterELements","LeftSideConatiner","jsxs","FilterIcon","DateIcon","StyledDatePicker","DatePicker","dayjs","StatusIcon","StyledAntSelect","Select","ClientIcon","input","VehicleIcon","ClearAll","StyledFilterBtnIcon","StyledFilterBtnLabel","TableFilters","styled"],"mappings":";;;;;;;;;;;;;;;;;;AAiCA,MAAMA,KAAqB;AAAA,EACzB,EAAE,OAAO,OAAO,OAAO,MAAA;AAAA,EACvB,EAAE,OAAO,OAAO,OAAO,MAAA;AAEzB,GAEMC,KAAoB,MAAM;AAC9B,QAAM,GAAGC,CAAQ,IAAIC,EAAQC,CAAwB,GAE/C,CAACC,GAAcC,CAAe,IAAIC,EAAA,GAClC,CAACC,CAAa,IAAIC,EAAA,GAClB,CAACC,IAAkBC,EAAmB,IAAIJ,EAAA,GAC1C,CAACK,EAAU,IAAIC,EAAA,GACf,CAACC,CAAc,IAAIC,EAAA,GACnB,CAACC,GAAgBC,CAAiB,IAAIV,EAAgB,CAAA,CAAE,GACxD,CAACW,GAAaC,CAAgB,IAAIZ,EAAgB,CAAA,CAAE,GACpD,CAACa,GAAqBC,CAAsB,IAAId,EAAwB,IAAI,GAG5E,EAAE,MAAMe,GAAqB,WAAAC,EAAA,IAAcC,EAAsB;AAAA,IACrE,UAAU;AAAA,IACV,QAAQ;AAAA;AAAA,IAER,YAAY,EAAE,eAAe,GAAA;AAAA,EAAM,CACpC;AAED,EAAAC,EAAU,MAA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AA,GAMnBT,IAAkBS,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
@@ -1,76 +1,76 @@
1
- import { jsx as e, Fragment as lt, jsxs as a } from "react/jsx-runtime";
2
- import { useApiHook as it, Checkbox as B } from "@bjsdistribution/dms-component-library";
3
- import { notification as st, Skeleton as dt, Empty as ut, Tooltip as ht } from "antd";
4
- import { format as pt } from "date-fns";
5
- import { useAtom as _t } from "jotai";
6
- import { useRef as H, useState as mt, useMemo as ft, useEffect as b } from "react";
7
- import gt from "../../../../assets/icons/DownIcon.js";
8
- import Ct from "../../../../assets/icons/PrinterIcon.js";
9
- import K from "../../../../common/CaretDownFilledIcon.js";
10
- import yt from "../../../../common/SortIcon.js";
11
- import St from "../../../order-view/details-filters/left-side-filters/dropdowns/PrintDropDownReturn.js";
12
- import { useReturnData as Nt, usefetchAgain as wt } from "../../../order-view/store.js";
13
- import { useSelectedOrders as Dt, useSelectAll as bt, useReturnPayload as kt, useNewReturnPayload as At, useGroupedPayload as It, useLocationData as Pt, useFlatCustomerData as Rt } from "../../../store.js";
14
- import { filtersReducerAtom as Ot } from "../../header-filters/filterStore.js";
1
+ import { jsx as t, Fragment as se, jsxs as a } from "react/jsx-runtime";
2
+ import { useApiHook as de, Checkbox as H, toReverseDeliveryLabel as K } from "@bjsdistribution/dms-component-library";
3
+ import { notification as ue, Skeleton as he, Empty as pe, Tooltip as _e } from "antd";
4
+ import { format as fe } from "date-fns";
5
+ import { useAtom as me } from "jotai";
6
+ import { useRef as V, useState as ge, useMemo as Ce, useEffect as b } from "react";
7
+ import ye from "../../../../assets/icons/DownIcon.js";
8
+ import Se from "../../../../assets/icons/PrinterIcon.js";
9
+ import $ from "../../../../common/CaretDownFilledIcon.js";
10
+ import Ne from "../../../../common/SortIcon.js";
11
+ import De from "../../../order-view/details-filters/left-side-filters/dropdowns/PrintDropDownReturn.js";
12
+ import { useReturnData as we, usefetchAgain as be } from "../../../order-view/store.js";
13
+ import { useSelectedOrders as Pe, useSelectAll as Re, useReturnPayload as ke, useNewReturnPayload as Ae, useGroupedPayload as Ie, useLocationData as ve, useClientPortal as Le, useFlatCustomerData as Oe } from "../../../store.js";
14
+ import { filtersReducerAtom as Ee } from "../../header-filters/filterStore.js";
15
15
  import { displayValueOrNA as s } from "../../shared/utlis.js";
16
- import { useLoading as Lt, usePrintOptionTOggle as vt, UsePaginationData as Et } from "../../store/store.js";
17
- import { EmptyDataContainer as Tt } from "../../table/table-data/styles.js";
18
- import { StyledTableWrapper as Ut, StyledTable as Ft, CustomDrop as Wt } from "./returnstyles.js";
19
- import { useSearchParams as xt, NavLink as Mt } from "react-router-dom";
20
- import { WEIGHT_UNIT as V, VOLUME_UNIT as jt, getAccountTypeLabel as $ } from "../../../../common/utils.js";
21
- const Gt = [
16
+ import { useLoading as Te, usePrintOptionTOggle as Ue, UsePaginationData as Fe } from "../../store/store.js";
17
+ import { EmptyDataContainer as We } from "../../table/table-data/styles.js";
18
+ import { StyledTableWrapper as xe, StyledTable as Me, CustomDrop as je } from "./returnstyles.js";
19
+ import { useSearchParams as Ge, NavLink as Be } from "react-router-dom";
20
+ import { WEIGHT_UNIT as J, VOLUME_UNIT as He, getAccountTypeLabel as Y } from "../../../../common/utils.js";
21
+ const Ke = [
22
22
  "RTS",
23
23
  "CLAIMS PAID",
24
24
  "DISPOSE",
25
25
  "RE-ALLOCATE",
26
26
  "RECYCLE",
27
27
  "UNKNOWN"
28
- ], y = (_) => Gt.includes(_?.product_return_action) && _?.return_location !== "null" && _?.return_location !== null, se = () => {
29
- const [_] = _t(Ot), [S, k] = Dt(), [J, A] = bt(), { "x-filters": Y, "x-pagination": Bt } = _, [h, E] = Nt(), [q, T] = Lt(), z = H(null), I = H(null), [U, F] = vt(), [, Q] = kt(), [P, N] = At(), [, R] = It(), [O] = Pt(), [, X] = Et(), [Z] = wt(), [tt] = xt(), L = tt.get("customerId"), [m, et] = mt(null), f = (t) => {
30
- et((n) => n?.key === t && n.direction === "asc" ? { key: t, direction: "desc" } : { key: t, direction: "asc" });
31
- }, W = ft(() => {
32
- if (!h || !m) return h;
33
- const { key: t, direction: n } = m;
28
+ ], y = (_) => Ke.includes(_?.product_return_action) && _?.return_location !== "null" && _?.return_location !== null, ht = () => {
29
+ const [_] = me(Ee), [S, P] = Pe(), [q, R] = Re(), { "x-filters": z, "x-pagination": Ve } = _, [h, T] = we(), [Q, U] = Te(), X = V(null), k = V(null), [F, W] = Ue(), [, Z] = ke(), [A, N] = Ae(), [, I] = Ie(), [v] = ve(), [, ee] = Fe(), [te] = be(), [L] = Le(), [ne] = Ge(), O = ne.get("customerId"), [f, re] = ge(null), m = (e) => {
30
+ re((n) => n?.key === e && n.direction === "asc" ? { key: e, direction: "desc" } : { key: e, direction: "asc" });
31
+ }, x = Ce(() => {
32
+ if (!h || !f) return h;
33
+ const { key: e, direction: n } = f;
34
34
  return [...h].sort((o, c) => {
35
- const l = o[t], i = c[t];
35
+ const l = o[e], i = c[e];
36
36
  return typeof l == "number" && typeof i == "number" ? n === "asc" ? l - i : i - l : typeof l == "string" && typeof i == "string" ? n === "asc" ? l.localeCompare(i) : i.localeCompare(l) : 0;
37
37
  });
38
- }, [h, m]), g = (t) => !m || m.key !== t ? /* @__PURE__ */ e(yt, {}) : m.direction === "asc" ? /* @__PURE__ */ e(K, {}) : /* @__PURE__ */ e(K, {}), nt = (t) => {
39
- F((n) => n === t ? null : t);
38
+ }, [h, f]), g = (e) => !f || f.key !== e ? /* @__PURE__ */ t(Ne, {}) : f.direction === "asc" ? /* @__PURE__ */ t($, {}) : /* @__PURE__ */ t($, {}), oe = (e) => {
39
+ W((n) => n === e ? null : e);
40
40
  };
41
- b(() => (document.addEventListener("mousedown", x), () => {
42
- document.removeEventListener("mousedown", x);
41
+ b(() => (document.addEventListener("mousedown", M), () => {
42
+ document.removeEventListener("mousedown", M);
43
43
  }), []);
44
- const x = (t) => {
45
- I.current && !I.current.contains(t.target) && F(null);
44
+ const M = (e) => {
45
+ k.current && !k.current.contains(e.target) && W(null);
46
46
  }, {
47
47
  data: p,
48
- loading: w,
49
- paginationData: M,
50
- setShouldPerformAction: rt
51
- } = it({
48
+ loading: D,
49
+ paginationData: j,
50
+ setShouldPerformAction: ce
51
+ } = de({
52
52
  endpoint: "/v1/return/product/pending/",
53
53
  method: "GET",
54
- filters: Y,
54
+ filters: z,
55
55
  pagination: { is_pagination: !1 },
56
56
  performAction: !1,
57
57
  showLoader: !1
58
58
  });
59
59
  b(() => {
60
- if (T(w), p && p?.data && (E(p?.data), M))
60
+ if (U(D), p && p?.data && (T(p?.data), j))
61
61
  try {
62
- const { count: t, ...n } = JSON.parse(M);
63
- X(n);
64
- } catch (t) {
65
- console.error("Error parsing paginationData:", t), st.error({
62
+ const { count: e, ...n } = JSON.parse(j);
63
+ ee(n);
64
+ } catch (e) {
65
+ console.error("Error parsing paginationData:", e), ue.error({
66
66
  message: "Error",
67
67
  description: "Failed to parse pagination data"
68
68
  });
69
69
  }
70
- }, [p, w]), b(() => {
71
- if (T(w), rt(!0), p && p?.data && O) {
72
- const t = p.data.map((n) => {
73
- const o = O.find(
70
+ }, [p, D]), b(() => {
71
+ if (U(D), ce(!0), p && p?.data && v) {
72
+ const e = p.data.map((n) => {
73
+ const o = v.find(
74
74
  (c) => c?.token === n?.return_location
75
75
  );
76
76
  return {
@@ -78,17 +78,17 @@ const Gt = [
78
78
  new_location: o ? o?.location_name : null
79
79
  };
80
80
  });
81
- E(t);
81
+ T(e);
82
82
  }
83
- }, [p, w, O, _, Z]);
84
- const [ot] = Rt(), j = ot?.find((t) => {
85
- const n = t?.customer_id?.toString();
86
- return n && n === L;
87
- }), G = j?.account_number;
88
- console.log(j, "selectedCustomer");
89
- const ct = (t) => {
90
- const n = t.target.checked;
91
- if (A(n), n) {
83
+ }, [p, D, v, _, te]);
84
+ const [ae] = Oe(), G = ae?.find((e) => {
85
+ const n = e?.customer_id?.toString();
86
+ return n && n === O;
87
+ }), B = G?.account_number;
88
+ console.log(G, "selectedCustomer");
89
+ const le = (e) => {
90
+ const n = e.target.checked;
91
+ if (R(n), n) {
92
92
  const o = h?.find(
93
93
  (r) => y(r)
94
94
  ), c = S.length > 0 ? S[0]?.product_return_action : o?.product_return_action;
@@ -104,68 +104,68 @@ const Gt = [
104
104
  return_location_token: r?.return_location
105
105
  })), d = l.map((r) => ({
106
106
  id: r.id,
107
- account_number: G,
108
- customer_id: Number(L),
107
+ account_number: B,
108
+ customer_id: Number(O),
109
109
  products: [r?.legacy_product_id],
110
110
  return_action: r?.product_return_action,
111
111
  return_location_token: r?.return_location || null
112
112
  }));
113
- console.log(d, "newPayloadnewPayload"), k(i), N(d);
113
+ console.log(d, "newPayloadnewPayload"), P(i), N(d);
114
114
  } else
115
- k([]), N([]), R([]);
116
- }, at = (t, n, o, c, l) => {
117
- k((i) => {
115
+ P([]), N([]), I([]);
116
+ }, ie = (e, n, o, c, l) => {
117
+ P((i) => {
118
118
  if (i?.some(
119
- (r) => r.id === t
119
+ (r) => r.id === e
120
120
  )) {
121
121
  const r = i.filter(
122
- (u) => u.id !== t
122
+ (u) => u.id !== e
123
123
  );
124
- Q((u) => ({
124
+ Z((u) => ({
125
125
  ...u,
126
126
  products: l,
127
127
  return_action: c || null,
128
128
  return_location_token: n || null
129
129
  })), N(
130
- (u) => u.filter((C) => C.id !== t)
130
+ (u) => u.filter((C) => C.id !== e)
131
131
  );
132
- const D = c, v = h?.filter(
133
- (u) => y(u) && u?.product_return_action === D
132
+ const w = c, E = h?.filter(
133
+ (u) => y(u) && u?.product_return_action === w
134
134
  )?.length;
135
- return A(
136
- r?.length > 0 && r?.length === v
135
+ return R(
136
+ r?.length > 0 && r?.length === E
137
137
  ), r;
138
138
  } else {
139
139
  const r = {
140
- id: t,
141
- account_number: G,
142
- customer_id: Number(L),
140
+ id: e,
141
+ account_number: B,
142
+ customer_id: Number(O),
143
143
  products: [l],
144
144
  return_action: c || null,
145
145
  return_location_token: n || null
146
146
  };
147
147
  N((C) => [...C, r]);
148
- const D = [
148
+ const w = [
149
149
  ...i,
150
150
  {
151
- id: t,
151
+ id: e,
152
152
  return_location: n,
153
153
  return_location_name: o,
154
154
  product_return_action: c
155
155
  }
156
- ], v = c, u = h?.filter(
157
- (C) => y(C) && C?.product_return_action === v
156
+ ], E = c, u = h?.filter(
157
+ (C) => y(C) && C?.product_return_action === E
158
158
  )?.length;
159
- return A(D?.length === u), D;
159
+ return R(w?.length === u), w;
160
160
  }
161
161
  });
162
162
  };
163
163
  return b(() => {
164
- if (P?.length === 0) {
165
- R([]);
164
+ if (A?.length === 0) {
165
+ I([]);
166
166
  return;
167
167
  }
168
- const t = P?.reduce((o, c) => {
168
+ const e = A?.reduce((o, c) => {
169
169
  const { return_location_token: l, id: i } = c, d = l || `no_token_${i}`;
170
170
  return o[d] || (o[d] = {
171
171
  ...c,
@@ -174,71 +174,73 @@ const Gt = [
174
174
  }), o[d].products = [...o[d].products, ...c.products], o[d].return_action = Array.from(
175
175
  /* @__PURE__ */ new Set([...o[d].return_action, ...c.return_action])
176
176
  ), o;
177
- }, {}), n = Object.values(t);
178
- R(n);
179
- }, [P]), /* @__PURE__ */ e(lt, { children: /* @__PURE__ */ e(Ut, { className: "fortables", children: /* @__PURE__ */ a(Ft, { children: [
180
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ a("tr", { children: [
181
- h?.some((t) => y(t)) ? /* @__PURE__ */ e("th", { className: "emailInvoiceCheckbox", children: /* @__PURE__ */ e(B, { checked: J, onChange: ct }) }) : /* @__PURE__ */ e("th", {}),
182
- /* @__PURE__ */ e("th", { onClick: () => f("location"), children: /* @__PURE__ */ a("div", { className: "sortIconClass", children: [
177
+ }, {}), n = Object.values(e);
178
+ I(n);
179
+ }, [A]), /* @__PURE__ */ t(se, { children: /* @__PURE__ */ t(xe, { className: "fortables", children: /* @__PURE__ */ a(Me, { children: [
180
+ /* @__PURE__ */ t("thead", { children: /* @__PURE__ */ a("tr", { children: [
181
+ h?.some((e) => y(e)) ? /* @__PURE__ */ t("th", { className: "emailInvoiceCheckbox", children: /* @__PURE__ */ t(H, { checked: q, onChange: le }) }) : /* @__PURE__ */ t("th", {}),
182
+ /* @__PURE__ */ t("th", { onClick: () => m("location"), children: /* @__PURE__ */ a("div", { className: "sortIconClass", children: [
183
183
  "Product Location ",
184
184
  g("location")
185
185
  ] }) }),
186
- /* @__PURE__ */ e("th", { onClick: () => f("return_location_name"), children: /* @__PURE__ */ a("div", { className: "sortIconClass", children: [
186
+ /* @__PURE__ */ t("th", { onClick: () => m("return_location_name"), children: /* @__PURE__ */ a("div", { className: "sortIconClass", children: [
187
187
  "Return Location ",
188
188
  g("return_location_name")
189
189
  ] }) }),
190
- /* @__PURE__ */ e("th", { children: "Client" }),
191
- /* @__PURE__ */ e("th", { onClick: () => f("recipient_name"), children: /* @__PURE__ */ a("div", { className: "sortIconClass", children: [
190
+ /* @__PURE__ */ t("th", { children: "Client" }),
191
+ /* @__PURE__ */ t("th", { onClick: () => m("recipient_name"), children: /* @__PURE__ */ a("div", { className: "sortIconClass", children: [
192
192
  "Recipient ",
193
193
  g("recipient_name")
194
194
  ] }) }),
195
- /* @__PURE__ */ e("th", { children: "Return Action" }),
196
- /* @__PURE__ */ e("th", { children: "Code" }),
197
- /* @__PURE__ */ e("th", { children: "Description" }),
198
- /* @__PURE__ */ e("th", { children: "Part" }),
199
- /* @__PURE__ */ e("th", { onClick: () => f("weight"), children: /* @__PURE__ */ a("div", { className: "sortIconClass", children: [
195
+ /* @__PURE__ */ t("th", { children: "Return Action" }),
196
+ /* @__PURE__ */ t("th", { children: "Code" }),
197
+ /* @__PURE__ */ t("th", { children: "Description" }),
198
+ /* @__PURE__ */ t("th", { children: "Part" }),
199
+ /* @__PURE__ */ t("th", { onClick: () => m("weight"), children: /* @__PURE__ */ a("div", { className: "sortIconClass", children: [
200
200
  "Weight (",
201
- V,
201
+ J,
202
202
  ") ",
203
203
  g("weight")
204
204
  ] }) }),
205
- /* @__PURE__ */ e("th", { children: jt }),
206
- /* @__PURE__ */ e("th", { onClick: () => f("return_reason"), children: /* @__PURE__ */ a("div", { className: "sortIconClass", children: [
205
+ /* @__PURE__ */ t("th", { children: He }),
206
+ /* @__PURE__ */ t("th", { onClick: () => m("return_reason"), children: /* @__PURE__ */ a("div", { className: "sortIconClass", children: [
207
207
  "Return Reason ",
208
208
  g("return_reason")
209
209
  ] }) }),
210
- /* @__PURE__ */ e("th", { children: "Collected" }),
211
- /* @__PURE__ */ e("th", { onClick: () => f("collection_reason"), children: /* @__PURE__ */ a("div", { className: "sortIconClass", children: [
212
- "Collection Reason ",
210
+ /* @__PURE__ */ t("th", { children: "Collected Date" }),
211
+ /* @__PURE__ */ t("th", { onClick: () => m("collection_reason"), children: /* @__PURE__ */ a("div", { className: "sortIconClass", children: [
212
+ L ? "Collection" : "Reverse Delivery",
213
+ " Reason",
214
+ " ",
213
215
  g("collection_reason")
214
216
  ] }) }),
215
- /* @__PURE__ */ e("th", { className: "emailInvoiceShare", children: "Labels" })
217
+ /* @__PURE__ */ t("th", { className: "emailInvoiceShare", children: "Labels" })
216
218
  ] }) }),
217
- /* @__PURE__ */ e("tbody", { children: q ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: 14, children: /* @__PURE__ */ e(dt, { active: !0 }) }) }) : W?.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: 14, children: /* @__PURE__ */ e(Tt, { children: /* @__PURE__ */ e(ut, {}) }) }) }) : W?.map((t, n) => /* @__PURE__ */ a("tr", { children: [
218
- /* @__PURE__ */ e("td", { children: y(t) ? (() => {
219
- const o = S?.length > 0 && S[0]?.product_return_action !== t?.product_return_action;
220
- return /* @__PURE__ */ e(
221
- ht,
219
+ /* @__PURE__ */ t("tbody", { children: Q ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", { colSpan: 14, children: /* @__PURE__ */ t(he, { active: !0 }) }) }) : x?.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", { colSpan: 14, children: /* @__PURE__ */ t(We, { children: /* @__PURE__ */ t(pe, {}) }) }) }) : x?.map((e, n) => /* @__PURE__ */ a("tr", { children: [
220
+ /* @__PURE__ */ t("td", { children: y(e) ? (() => {
221
+ const o = S?.length > 0 && S[0]?.product_return_action !== e?.product_return_action;
222
+ return /* @__PURE__ */ t(
223
+ _e,
222
224
  {
223
225
  title: o ? "Cannot select different return actions" : "",
224
- children: /* @__PURE__ */ e(
226
+ children: /* @__PURE__ */ t(
225
227
  "span",
226
228
  {
227
229
  className: o ? "disabled-wrapper" : "",
228
- children: /* @__PURE__ */ e(
229
- B,
230
+ children: /* @__PURE__ */ t(
231
+ H,
230
232
  {
231
233
  className: "custom-check",
232
234
  disabled: o,
233
235
  checked: S.some(
234
- (c) => c?.id === t?.id
236
+ (c) => c?.id === e?.id
235
237
  ),
236
- onChange: () => at(
237
- t?.id,
238
- t?.return_location,
239
- t?.return_location_name,
240
- t?.product_return_action,
241
- t?.legacy_product_id
238
+ onChange: () => ie(
239
+ e?.id,
240
+ e?.return_location,
241
+ e?.return_location_name,
242
+ e?.product_return_action,
243
+ e?.legacy_product_id
242
244
  )
243
245
  }
244
246
  )
@@ -247,21 +249,21 @@ const Gt = [
247
249
  }
248
250
  );
249
251
  })() : null }),
250
- /* @__PURE__ */ e("td", { children: t?.location !== null && t?.location !== void 0 ? t?.location : /* @__PURE__ */ e("div", { className: "awaiting", children: "Awaiting" }) }),
252
+ /* @__PURE__ */ t("td", { children: e?.location !== null && e?.location !== void 0 ? e?.location : /* @__PURE__ */ t("div", { className: "awaiting", children: "Awaiting" }) }),
251
253
  /* @__PURE__ */ a("td", { children: [
252
254
  " ",
253
- s(t?.return_location_name)
255
+ s(e?.return_location_name)
254
256
  ] }),
255
- /* @__PURE__ */ a("td", { title: t?.client_name ?? "", children: [
256
- s(t?.client_name),
257
- $(t?.owner_id) && /* @__PURE__ */ a("span", { children: [
257
+ /* @__PURE__ */ a("td", { title: e?.client_name ?? "", children: [
258
+ s(e?.client_name),
259
+ Y(e?.owner_id) && /* @__PURE__ */ a("span", { children: [
258
260
  " (",
259
- $(t?.owner_id),
261
+ Y(e?.owner_id),
260
262
  ")"
261
263
  ] })
262
264
  ] }),
263
- /* @__PURE__ */ e("td", { children: /* @__PURE__ */ a("ul", { style: { listStyleType: "none", padding: 0 }, children: [
264
- /* @__PURE__ */ e(
265
+ /* @__PURE__ */ t("td", { children: /* @__PURE__ */ a("ul", { style: { listStyleType: "none", padding: 0 }, children: [
266
+ /* @__PURE__ */ t(
265
267
  "li",
266
268
  {
267
269
  style: {
@@ -269,42 +271,46 @@ const Gt = [
269
271
  fontWeight: 600,
270
272
  paddingLeft: 0
271
273
  },
272
- children: /* @__PURE__ */ e(Mt, { to: `/orders/view/${t?.order_id}`, children: s(t?.recipient_name) })
274
+ children: /* @__PURE__ */ t(Be, { to: `/orders/view/${e?.order_id}`, children: s(e?.recipient_name) })
273
275
  }
274
276
  ),
275
- /* @__PURE__ */ e("li", { style: { color: "#888075" }, children: s(t?.postcode) })
277
+ /* @__PURE__ */ t("li", { style: { color: "#888075" }, children: s(e?.postcode) })
276
278
  ] }) }),
277
- /* @__PURE__ */ e("td", { children: s(t?.product_return_action) }),
278
- /* @__PURE__ */ e("td", { children: s(t?.code) }),
279
- /* @__PURE__ */ e("td", { children: s(t?.description) }),
280
- /* @__PURE__ */ e("td", { children: s(t?.part) }),
279
+ /* @__PURE__ */ t("td", { children: s(e?.product_return_action) }),
280
+ /* @__PURE__ */ t("td", { children: s(e?.code) }),
281
+ /* @__PURE__ */ t("td", { children: s(e?.description) }),
282
+ /* @__PURE__ */ t("td", { children: s(e?.part) }),
281
283
  /* @__PURE__ */ a("td", { children: [
282
- s(t?.weight),
284
+ s(e?.weight),
283
285
  " ",
284
- t?.weight && t?.weight !== null ? V : ""
286
+ e?.weight && e?.weight !== null ? J : ""
285
287
  ] }),
286
- /* @__PURE__ */ e("td", { children: s(t?.cube) }),
287
- /* @__PURE__ */ e("td", { children: s(t?.return_reason) }),
288
- /* @__PURE__ */ e("td", { children: t?.collected_at ? pt(new Date(t?.collected_at), "dd/MM/yyyy") : "UNKNOWN" }),
289
- /* @__PURE__ */ e("td", { children: s(t?.collection_reason) }),
290
- /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e("ul", { className: "actionbox", children: /* @__PURE__ */ e(
291
- Wt,
288
+ /* @__PURE__ */ t("td", { children: s(e?.cube) }),
289
+ /* @__PURE__ */ t("td", { children: s(
290
+ L ? e?.return_reason : K(e?.return_reason)
291
+ ) }),
292
+ /* @__PURE__ */ t("td", { children: e?.collected_at ? fe(new Date(e?.collected_at), "dd/MM/yyyy") : "UNKNOWN" }),
293
+ /* @__PURE__ */ t("td", { children: s(
294
+ L ? e?.collection_reason : K(e?.collection_reason)
295
+ ) }),
296
+ /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("ul", { className: "actionbox", children: /* @__PURE__ */ t(
297
+ je,
292
298
  {
293
- ref: z,
294
- className: U === n ? "active" : "",
299
+ ref: X,
300
+ className: F === n ? "active" : "",
295
301
  children: /* @__PURE__ */ a(
296
302
  "li",
297
303
  {
298
304
  className: "shareIconContainer",
299
- onClick: () => nt(n),
305
+ onClick: () => oe(n),
300
306
  children: [
301
- /* @__PURE__ */ e(Ct, {}),
302
- /* @__PURE__ */ e(gt, {}),
303
- U === n && /* @__PURE__ */ e("div", { ref: I, children: /* @__PURE__ */ e(
304
- St,
307
+ /* @__PURE__ */ t(Se, {}),
308
+ /* @__PURE__ */ t(ye, {}),
309
+ F === n && /* @__PURE__ */ t("div", { ref: k, children: /* @__PURE__ */ t(
310
+ De,
305
311
  {
306
- legacyURL: t?.return_order_product_label,
307
- legacyProductID: t?.legacy_product_id
312
+ legacyURL: e?.return_order_product_label,
313
+ legacyProductID: e?.legacy_product_id
308
314
  }
309
315
  ) })
310
316
  ]
@@ -312,10 +318,10 @@ const Gt = [
312
318
  )
313
319
  }
314
320
  ) }) })
315
- ] }, t.id)) })
321
+ ] }, e.id)) })
316
322
  ] }) }) });
317
323
  };
318
324
  export {
319
- se as default
325
+ ht as default
320
326
  };
321
327
  //# sourceMappingURL=ReturnOrderTable.js.map