@bjsdistribution/dms-client-return 0.0.39 → 0.0.40
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.
- package/dist/dms-client-return.cjs.development.js +10 -9
- package/dist/dms-client-return.cjs.development.js.map +1 -1
- package/dist/dms-client-return.cjs.production.min.js +1 -1
- package/dist/dms-client-return.cjs.production.min.js.map +1 -1
- package/dist/dms-client-return.esm.js +10 -9
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +13 -9
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +4 -2
- package/src/components/order-daily-overview/table/ReturnTable.tsx +4 -2
- package/src/components/order-view/details-filters/left-side-filters/dropdowns/PrintDropDownReturn.tsx +0 -2
- package/src/components/order-view/modalsPopup/CreateReturnModal.tsx +1 -1
package/package.json
CHANGED
|
@@ -48,15 +48,19 @@ function SelectionFilter() {
|
|
|
48
48
|
const [actionTypeOptions, setActionTypeOptions] = useActionTypeOptions();
|
|
49
49
|
const [locationOptions, setLocationOptions] = useLocationOptions();
|
|
50
50
|
|
|
51
|
-
const clientOptions = customers
|
|
52
|
-
|
|
53
|
-
option
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
const clientOptions = customers
|
|
52
|
+
?.filter(
|
|
53
|
+
(option: any) => 'customer_id' in option && option.customer_id != null
|
|
54
|
+
)
|
|
55
|
+
.map((option: any) => ({
|
|
56
|
+
label:
|
|
57
|
+
option?.customer_name?.charAt(0)?.toUpperCase() +
|
|
58
|
+
option?.customer_name?.slice(1),
|
|
59
|
+
value: option?.customer_id,
|
|
60
|
+
actions: option?.actions,
|
|
61
|
+
return_locations: option?.return_locations,
|
|
62
|
+
account_number: option?.account_number,
|
|
63
|
+
}));
|
|
60
64
|
|
|
61
65
|
//client change
|
|
62
66
|
const handleClientChange = (value: any, option: any) => {
|
|
@@ -306,7 +306,6 @@ const ReturnOrderTable = () => {
|
|
|
306
306
|
|
|
307
307
|
const mergedPayload = Object.values(groupedPayload);
|
|
308
308
|
setGrouped(mergedPayload);
|
|
309
|
-
console.log(mergedPayload, 'mergedPayload');
|
|
310
309
|
}, [newpayload]);
|
|
311
310
|
|
|
312
311
|
return (
|
|
@@ -428,7 +427,10 @@ const ReturnOrderTable = () => {
|
|
|
428
427
|
<div className="awaiting">Awaiting</div>
|
|
429
428
|
)}
|
|
430
429
|
</td>
|
|
431
|
-
<td>
|
|
430
|
+
<td>
|
|
431
|
+
{' '}
|
|
432
|
+
{displayValueOrNA(item?.return_locations?.location_name)}
|
|
433
|
+
</td>
|
|
432
434
|
<td>
|
|
433
435
|
<ul style={{ listStyleType: 'none', padding: 0 }}>
|
|
434
436
|
<li
|
|
@@ -32,7 +32,7 @@ interface ApiResponse {
|
|
|
32
32
|
const ReturnTable: React.FC = () => {
|
|
33
33
|
const [clientData] = useClientData();
|
|
34
34
|
const [updatedData, setUpdatedData] = useState<any>([]);
|
|
35
|
-
const [statsLoading
|
|
35
|
+
const [statsLoading] = useStatsLoading();
|
|
36
36
|
const [, setOrderStaticData] = useOrderStaticData();
|
|
37
37
|
const [, dispatch] = useAtom(filtersReducerAtom);
|
|
38
38
|
const navigate = useNavigate();
|
|
@@ -93,7 +93,7 @@ const ReturnTable: React.FC = () => {
|
|
|
93
93
|
});
|
|
94
94
|
|
|
95
95
|
useEffect(() => {
|
|
96
|
-
setLoading(staticDataLoading);
|
|
96
|
+
// setLoading(staticDataLoading);
|
|
97
97
|
if (fetchedStaticData && fetchedStaticData.data) {
|
|
98
98
|
const result = fetchedStaticData?.data;
|
|
99
99
|
setOrderStaticData(result[0]);
|
|
@@ -148,6 +148,8 @@ const ReturnTable: React.FC = () => {
|
|
|
148
148
|
// navigate(`/filter/${customerId}`);
|
|
149
149
|
};
|
|
150
150
|
|
|
151
|
+
console.log(statsLoading, 'statsLoading');
|
|
152
|
+
|
|
151
153
|
return (
|
|
152
154
|
<>
|
|
153
155
|
{statsLoading && <Loader />}
|
|
@@ -11,8 +11,6 @@ const PrintDropDownReturn = ({
|
|
|
11
11
|
}: {
|
|
12
12
|
legacyProductId: number;
|
|
13
13
|
}) => {
|
|
14
|
-
console.log(legacyProductId, 'legacyProductId');
|
|
15
|
-
|
|
16
14
|
const downloadFiles = () => {
|
|
17
15
|
const url = `https://us.toolbox.bjshomedelivery.com/offload/return_label?gsit_products_id=${legacyProductId}`;
|
|
18
16
|
window.open(url, '_blank'); // Opens the URL in a new tab
|
|
@@ -76,7 +76,7 @@ const CreateReturnModal = () => {
|
|
|
76
76
|
onChange={() => handleSelectLocations(returnLoc.id)}
|
|
77
77
|
/>
|
|
78
78
|
<StyledText style={{ marginLeft: '8px' }}>
|
|
79
|
-
{displayValueOrNA(returnLoc?.
|
|
79
|
+
{displayValueOrNA(returnLoc?.return_locations?.location_name)}
|
|
80
80
|
</StyledText>
|
|
81
81
|
</li>
|
|
82
82
|
))}
|