@bjsdistribution/dms-client-return 0.0.11 → 0.0.12
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/components/order-daily-overview/common/fakedata.d.ts +4 -0
- package/dist/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.d.ts +1 -1
- package/dist/components/order-view/details-filters/left-side-filters/dropdowns/{PrintDropDown.d.ts → PrintDropDownReturn.d.ts} +2 -2
- package/dist/components/store.d.ts +6 -1
- package/dist/dms-client-return.cjs.development.js +279 -112
- 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 +280 -113
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/order-daily-overview/common/fakedata.tsx +4 -0
- package/src/components/order-daily-overview/header-filters/HeaderFilter.tsx +10 -1
- package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +15 -7
- package/src/components/order-daily-overview/index.tsx +1 -1
- package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +4 -8
- package/src/components/order-daily-overview/return-after-table/table-filters/ReturnFilterStore.ts +12 -14
- package/src/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.tsx +32 -33
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +74 -30
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.ts +3 -0
- package/src/components/order-daily-overview/table-view/Pagination.tsx +15 -14
- package/src/components/order-view/details-filters/left-side-filters/dropdowns/{PrintDropDown.tsx → PrintDropDownReturn.tsx} +4 -4
- package/src/components/order-view/modalsPopup/CreateReturnModal.tsx +74 -36
- package/src/components/order-view/modalsPopup/ModalManager.tsx +47 -12
- package/src/components/store.ts +35 -0
|
@@ -3151,7 +3151,7 @@ function GeneralHeader() {
|
|
|
3151
3151
|
var Section = /*#__PURE__*/styled__default.div(_templateObject$V || (_templateObject$V = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* display: flex;\n background: #ffffff;\n // padding: 15px;\n flex-direction: column;\n gap: 14px;\n border-radius: 12px;\n box-shadow: 0px 4px 30px 0px rgba(46, 45, 116, 0.05);\n border: 1px solid #e0e0e0; */\n"])));
|
|
3152
3152
|
|
|
3153
3153
|
var _templateObject19, _templateObject20, _templateObject21;
|
|
3154
|
-
var StyledTable = /*#__PURE__*/styled__default.table(_templateObject19 || (_templateObject19 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-spacing: 0 10px;\n width: 100%;\n /* min-width: 1600px; */\n thead {\n white-space: nowrap;\n tr {\n border-radius: 40px;\n border-spacing: 0 10px;\n .emailInvoiceCheckbox {\n padding-right: 0px;\n width: 0;\n > div {\n width: fit-content;\n }\n }\n .emailInvoiceNo {\n padding-left: 0px;\n }\n .emailInvoiceShare {\n width: 100px;\n }\n th {\n color: #3a3630;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n padding: 11px 15px;\n background: #f0f2f2;\n border-right: none;\n border-left: none;\n text-align: left;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-width: 1px 0;\n &:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n &:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n }\n }\n }\n tbody {\n tr {\n td {\n color: #3a3630;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n padding: 12px 15px;\n background: #fff;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-right: none;\n border-left: none;\n .actionbox {\n display: flex;\n gap: 5px;\n }\n .shareIconContainer {\n display: flex;\n padding: 2px 12px;\n align-items: center;\n gap: 8px;\n border-radius: 20px;\n border: 1px solid var(--tonal-brown-101, #e2e0db);\n background: #fff;\n list-style-type: none;\n /* padding-left: 0; */\n /* fontWeight: 600,\n paddingLeft: 0, */\n cursor: pointer;\n position: relative;\n }\n .statusCancelled {\n color: #e95252;\n /* background: rgba(233, 82, 82, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusOnHold {\n color: #f4a503;\n /* background: #fff1d6; */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusSubContracted {\n color: #845adf;\n /* background: rgba(132, 90, 223, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusAwaiting {\n color: #845adf;\n /* background: rgba(132, 90, 223, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusCompleted {\n color: #1f9254;\n /* background: rgba(41, 204, 106, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusOutstanding {\n color: #f4a503;\n /* background: #fff1d6; */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusUnknown {\n color: #000;\n /* background: #fff; */\n padding: 4px 8px;\n border-radius: 4px;\n }\n .statustext {\n color: #1f9254;\n font-family: 'Open Sans';\n font-size: 12px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n }\n .downloadcontainer {\n display: flex;\n padding: 2px 12px;\n align-items: center;\n\n width: 28px;\n height: 28px;\n flex-direction: column;\n\n border-radius: 14px;\n border: 1px solid #e2e0db;\n background: #fff;\n }\n .statuscontainer {\n display: flex;\n padding: 5px 30px 5px 30px;\n justify-content: center;\n align-items: center;\n gap: 5px;\n flex: 1 0 0;\n border-radius: 22px;\n background: rgba(41, 204, 106, 0.15);\n }\n .awaiting {\n display: flex;\n min-width: 85px;\n padding: 6px 10px;\n justify-content: center;\n align-items: center;\n gap: 5px;\n border-radius: 22px;\n background: rgba(233, 82, 82, 0.15);\n color: #e95252;\n font-family: 'Open Sans';\n font-size: 12px;\n font-weight: 600;\n }\n ul > li > a {\n text-decoration: none !important;\n color: #0099ff;\n }\n }\n &:nth-child(even) td {\n background: #f6fbff;\n }\n td:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n td:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n .flex {\n display: flex;\n flex-direction: row;\n gap: 5px;\n height: 29px;\n align-items: center;\n }\n\n &.insideTable {\n td {\n border-radius: 0;\n border: none;\n &:last-child {\n border-radius: 0;\n border-right: none;\n }\n }\n table {\n border-spacing: 0;\n width: 100%;\n border-radius: 5px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n overflow: hidden;\n border-top-left-radius: 15px;\n border-top-right-radius: 15px;\n thead {\n tr {\n border-bottom: none;\n th {\n padding: 14px 20px;\n text-align: left;\n border-top: 0;\n border-right: 0;\n border-left: 0;\n background: #f8fafc;\n\n &:first-child {\n border-radius: 0;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n border-top-left-radius: 15px;\n }\n &:last-child {\n border-radius: 0;\n }\n }\n }\n }\n tbody {\n tr {\n td {\n padding: 14px 20px;\n text-align: left;\n border-bottom: 1px solid rgba(58, 54, 48, 0.15);\n background: #fff;\n > svg {\n transform: scale(1.5);\n background-color: #edebe8;\n border-radius: 20px;\n padding: 5px;\n }\n &:last-child {\n border-radius: 0;\n border-right: none;\n }\n }\n }\n }\n }\n }\n }\n }\n .actions {\n display: flex;\n align-items: center;\n gap: 20px;\n > svg {\n transform: scale(1.5);\n background-color: #edebe8;\n border-radius: 20px;\n padding: 5px;\n }\n\n .close-icon {\n transform: scale(1.3);\n background-color: transparent;\n border-radius: 0;\n padding: 0;\n }\n }\n"])));
|
|
3154
|
+
var StyledTable = /*#__PURE__*/styled__default.table(_templateObject19 || (_templateObject19 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-spacing: 0 10px;\n width: 100%;\n /* min-width: 1600px; */\n thead {\n white-space: nowrap;\n tr {\n border-radius: 40px;\n border-spacing: 0 10px;\n .emailInvoiceCheckbox {\n padding-right: 0px;\n width: 0;\n > div {\n width: fit-content;\n }\n }\n .custom-check {\n position: relative;\n }\n .emailInvoiceNo {\n padding-left: 0px;\n }\n .emailInvoiceShare {\n width: 100px;\n }\n th {\n color: #3a3630;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n padding: 11px 15px;\n background: #f0f2f2;\n border-right: none;\n border-left: none;\n text-align: left;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-width: 1px 0;\n &:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n &:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n }\n }\n }\n tbody {\n tr {\n td {\n color: #3a3630;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n padding: 12px 15px;\n background: #fff;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-right: none;\n border-left: none;\n .actionbox {\n display: flex;\n gap: 5px;\n }\n .shareIconContainer {\n display: flex;\n padding: 2px 12px;\n align-items: center;\n gap: 8px;\n border-radius: 20px;\n border: 1px solid var(--tonal-brown-101, #e2e0db);\n background: #fff;\n list-style-type: none;\n /* padding-left: 0; */\n /* fontWeight: 600,\n paddingLeft: 0, */\n cursor: pointer;\n position: relative;\n }\n .statusCancelled {\n color: #e95252;\n /* background: rgba(233, 82, 82, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusOnHold {\n color: #f4a503;\n /* background: #fff1d6; */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusSubContracted {\n color: #845adf;\n /* background: rgba(132, 90, 223, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusAwaiting {\n color: #845adf;\n /* background: rgba(132, 90, 223, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusCompleted {\n color: #1f9254;\n /* background: rgba(41, 204, 106, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusOutstanding {\n color: #f4a503;\n /* background: #fff1d6; */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusUnknown {\n color: #000;\n /* background: #fff; */\n padding: 4px 8px;\n border-radius: 4px;\n }\n .statustext {\n color: #1f9254;\n font-family: 'Open Sans';\n font-size: 12px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n }\n .downloadcontainer {\n display: flex;\n padding: 2px 12px;\n align-items: center;\n\n width: 28px;\n height: 28px;\n flex-direction: column;\n\n border-radius: 14px;\n border: 1px solid #e2e0db;\n background: #fff;\n }\n .statuscontainer {\n display: flex;\n padding: 5px 30px 5px 30px;\n justify-content: center;\n align-items: center;\n gap: 5px;\n flex: 1 0 0;\n border-radius: 22px;\n background: rgba(41, 204, 106, 0.15);\n }\n .awaiting {\n display: flex;\n min-width: 85px;\n padding: 6px 10px;\n justify-content: center;\n align-items: center;\n gap: 5px;\n border-radius: 22px;\n background: rgba(233, 82, 82, 0.15);\n color: #e95252;\n font-family: 'Open Sans';\n font-size: 12px;\n font-weight: 600;\n }\n ul > li > a {\n text-decoration: none !important;\n color: #0099ff;\n }\n }\n &:nth-child(even) td {\n background: #f6fbff;\n }\n td:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n td:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n .flex {\n display: flex;\n flex-direction: row;\n gap: 5px;\n height: 29px;\n align-items: center;\n }\n\n &.insideTable {\n td {\n border-radius: 0;\n border: none;\n &:last-child {\n border-radius: 0;\n border-right: none;\n }\n }\n table {\n border-spacing: 0;\n width: 100%;\n border-radius: 5px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n overflow: hidden;\n border-top-left-radius: 15px;\n border-top-right-radius: 15px;\n thead {\n tr {\n border-bottom: none;\n th {\n padding: 14px 20px;\n text-align: left;\n border-top: 0;\n border-right: 0;\n border-left: 0;\n background: #f8fafc;\n\n &:first-child {\n border-radius: 0;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n border-top-left-radius: 15px;\n }\n &:last-child {\n border-radius: 0;\n }\n }\n }\n }\n tbody {\n tr {\n td {\n padding: 14px 20px;\n text-align: left;\n border-bottom: 1px solid rgba(58, 54, 48, 0.15);\n background: #fff;\n > svg {\n transform: scale(1.5);\n background-color: #edebe8;\n border-radius: 20px;\n padding: 5px;\n }\n &:last-child {\n border-radius: 0;\n border-right: none;\n }\n }\n }\n }\n }\n }\n }\n }\n .actions {\n display: flex;\n align-items: center;\n gap: 20px;\n > svg {\n transform: scale(1.5);\n background-color: #edebe8;\n border-radius: 20px;\n padding: 5px;\n }\n\n .close-icon {\n transform: scale(1.3);\n background-color: transparent;\n border-radius: 0;\n padding: 0;\n }\n }\n"])));
|
|
3155
3155
|
// Styled components
|
|
3156
3156
|
var StyledTableWrapper = /*#__PURE__*/styled__default.div(_templateObject20 || (_templateObject20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n overflow-x: auto;\n max-height: calc(100vh - 396px);\n scrollbar-width: none;\n height: 600px;\n /* box-shadow: 0px 0px 30px 6px rgba(46, 45, 116, 0.05); */\n &::-webkit-scrollbar {\n width: 5px;\n border-radius: 100px;\n height: 5px;\n }\n\n &::-webkit-scrollbar-track {\n background: #777;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #7b61ff;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background: #7b61ff;\n }\n"])));
|
|
3157
3157
|
var CustomDrop = /*#__PURE__*/styled__default.div(_templateObject21 || (_templateObject21 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* border-radius: 20px;\n border: 1px solid #e2e0db;\n background: #fff;\n display: flex;\n padding: 4px 8px;\n gap: 8px;\n align-items: center; */\n cursor: pointer;\n &.active .drop {\n transform: rotate(180deg);\n }\n"])));
|
|
@@ -3186,6 +3186,11 @@ var locationData = /*#__PURE__*/jotai.atom([]);
|
|
|
3186
3186
|
var createReturnPayload = /*#__PURE__*/jotai.atom(CreateReturnInitial);
|
|
3187
3187
|
var newPayload = /*#__PURE__*/jotai.atom([]);
|
|
3188
3188
|
var grpPayload = /*#__PURE__*/jotai.atom([]);
|
|
3189
|
+
var statusOfOrder = /*#__PURE__*/jotai.atom([]);
|
|
3190
|
+
var selectedLocationConfirm = /*#__PURE__*/jotai.atom([]);
|
|
3191
|
+
var selectAll = /*#__PURE__*/jotai.atom(false);
|
|
3192
|
+
var postLoading = /*#__PURE__*/jotai.atom(false);
|
|
3193
|
+
var _final = /*#__PURE__*/jotai.atom([]);
|
|
3189
3194
|
var selectedOrderlList = /*#__PURE__*/jotai.atom([]);
|
|
3190
3195
|
function useSelectedOrders() {
|
|
3191
3196
|
return jotai.useAtom(selectedOrderlList);
|
|
@@ -3213,6 +3218,21 @@ function useNewReturnPayload() {
|
|
|
3213
3218
|
function useGroupedPayload() {
|
|
3214
3219
|
return jotai.useAtom(grpPayload);
|
|
3215
3220
|
}
|
|
3221
|
+
function useStatusOrderData() {
|
|
3222
|
+
return jotai.useAtom(statusOfOrder);
|
|
3223
|
+
}
|
|
3224
|
+
function useSelectedConfirmLoc() {
|
|
3225
|
+
return jotai.useAtom(selectedLocationConfirm);
|
|
3226
|
+
}
|
|
3227
|
+
function useSelectAll() {
|
|
3228
|
+
return jotai.useAtom(selectAll);
|
|
3229
|
+
}
|
|
3230
|
+
function usePostLoading() {
|
|
3231
|
+
return jotai.useAtom(postLoading);
|
|
3232
|
+
}
|
|
3233
|
+
function useFinalPayload() {
|
|
3234
|
+
return jotai.useAtom(_final);
|
|
3235
|
+
}
|
|
3216
3236
|
|
|
3217
3237
|
var ReturnProductTable = function ReturnProductTable() {
|
|
3218
3238
|
var _useSelectedOrders = useSelectedOrders(),
|
|
@@ -8343,6 +8363,12 @@ function SelectionFilter() {
|
|
|
8343
8363
|
setStoredCustomerId = _useState6[1];
|
|
8344
8364
|
var _useNewReturnPayload = useNewReturnPayload(),
|
|
8345
8365
|
setNewPayload = _useNewReturnPayload[1];
|
|
8366
|
+
var _useGroupedPayload = useGroupedPayload(),
|
|
8367
|
+
setGrouped = _useGroupedPayload[1];
|
|
8368
|
+
var _useSelectedOrders = useSelectedOrders(),
|
|
8369
|
+
setSelectedReturnOrder = _useSelectedOrders[1];
|
|
8370
|
+
var _useSelectAll = useSelectAll(),
|
|
8371
|
+
setSelectAll = _useSelectAll[1];
|
|
8346
8372
|
//client options
|
|
8347
8373
|
var clientOptions = customers == null ? void 0 : customers.map(function (option) {
|
|
8348
8374
|
var _option$customer_name, _option$customer_name2;
|
|
@@ -8365,7 +8391,7 @@ function SelectionFilter() {
|
|
|
8365
8391
|
var LocationOptions = locationData == null ? void 0 : locationData.map(function (option) {
|
|
8366
8392
|
return {
|
|
8367
8393
|
label: option == null ? void 0 : option.location_name,
|
|
8368
|
-
value: option == null ? void 0 : option.
|
|
8394
|
+
value: option == null ? void 0 : option.token
|
|
8369
8395
|
};
|
|
8370
8396
|
});
|
|
8371
8397
|
//client change
|
|
@@ -8391,7 +8417,6 @@ function SelectionFilter() {
|
|
|
8391
8417
|
customer_id: storedCustomerId
|
|
8392
8418
|
});
|
|
8393
8419
|
});
|
|
8394
|
-
console.log(selectedUuids, 'selectedUuids');
|
|
8395
8420
|
var filteredSubLocations = locationData == null ? void 0 : locationData.filter(function (subCat) {
|
|
8396
8421
|
return (subCat == null ? void 0 : subCat.customer_id) === selectedUuids;
|
|
8397
8422
|
}).map(function (subCat) {
|
|
@@ -8402,6 +8427,10 @@ function SelectionFilter() {
|
|
|
8402
8427
|
});
|
|
8403
8428
|
setFilteredLocationOptions(filteredSubLocations);
|
|
8404
8429
|
setUuid('');
|
|
8430
|
+
setSelectedReturnOrder([]);
|
|
8431
|
+
setNewPayload([]);
|
|
8432
|
+
setGrouped([]);
|
|
8433
|
+
setSelectAll(false);
|
|
8405
8434
|
};
|
|
8406
8435
|
React.useEffect(function () {
|
|
8407
8436
|
var accountNumberFromStorage = localStorage.getItem('account_number');
|
|
@@ -8425,8 +8454,7 @@ function SelectionFilter() {
|
|
|
8425
8454
|
//location change
|
|
8426
8455
|
var handleLocationChange = function handleLocationChange(value, option) {
|
|
8427
8456
|
var selectedLabel = option == null ? void 0 : option.label;
|
|
8428
|
-
|
|
8429
|
-
setSelectedLocationValue(selectedLabel);
|
|
8457
|
+
setSelectedLocationValue(value);
|
|
8430
8458
|
if (selectedLocationValue === selectedLabel) {
|
|
8431
8459
|
dispatch({
|
|
8432
8460
|
type: 'CLEAR_ALL_FILTERS',
|
|
@@ -8485,8 +8513,8 @@ function SelectionFilter() {
|
|
|
8485
8513
|
setIsButtonEnabled(false);
|
|
8486
8514
|
}
|
|
8487
8515
|
}, [storedName, selectedFilterValue, selectedLocationValue]);
|
|
8488
|
-
console.log(filteredLocationOptions, 'filteredLocationOptions');
|
|
8489
|
-
console.log('check', storedName, selectedFilterValue, selectedLocationValue);
|
|
8516
|
+
// console.log(filteredLocationOptions, 'filteredLocationOptions');
|
|
8517
|
+
// console.log('check', storedName, selectedFilterValue, selectedLocationValue);
|
|
8490
8518
|
return React__default.createElement(Wrapper$k, null, React__default.createElement(FilterRow, null, React__default.createElement(LeftColumn, null, React__default.createElement(FilterColumn, null, React__default.createElement(Label$g, null, "Clients"), React__default.createElement(StyledAntSelect$5, {
|
|
8491
8519
|
options: clientOptions,
|
|
8492
8520
|
placeholder: "Select Client Name",
|
|
@@ -8528,6 +8556,8 @@ function HeaderFilter() {
|
|
|
8528
8556
|
setActionType = _useActionType[1];
|
|
8529
8557
|
var _useLocationData = useLocationData(),
|
|
8530
8558
|
setLocationData = _useLocationData[1];
|
|
8559
|
+
var _useStatusOrderData = useStatusOrderData(),
|
|
8560
|
+
setStatusOfOrders = _useStatusOrderData[1];
|
|
8531
8561
|
//API for client data
|
|
8532
8562
|
var _useApiHook = dmsComponentLibrary.useApiHook({
|
|
8533
8563
|
endpoint: "/customers/",
|
|
@@ -8568,10 +8598,13 @@ function HeaderFilter() {
|
|
|
8568
8598
|
}, [loading, fetchedCustomerData]);
|
|
8569
8599
|
React.useEffect(function () {
|
|
8570
8600
|
if (fetchedStaticData && fetchedStaticData != null && fetchedStaticData.data) {
|
|
8571
|
-
var _fetchedStaticData$da;
|
|
8601
|
+
var _fetchedStaticData$da, _fetchedStaticData$da2;
|
|
8572
8602
|
setActionType(fetchedStaticData == null || (_fetchedStaticData$da = fetchedStaticData.data) == null ? void 0 : _fetchedStaticData$da.flatMap(function (i) {
|
|
8573
8603
|
return i == null ? void 0 : i.order_product_return_action;
|
|
8574
8604
|
}));
|
|
8605
|
+
setStatusOfOrders(fetchedStaticData == null || (_fetchedStaticData$da2 = fetchedStaticData.data) == null ? void 0 : _fetchedStaticData$da2.flatMap(function (i) {
|
|
8606
|
+
return i == null ? void 0 : i.order_stock_alias;
|
|
8607
|
+
}));
|
|
8575
8608
|
}
|
|
8576
8609
|
}, [actionLoading, fetchedStaticData]);
|
|
8577
8610
|
React.useEffect(function () {
|
|
@@ -8827,29 +8860,17 @@ var displayValueOrNA = function displayValueOrNA(value) {
|
|
|
8827
8860
|
return value;
|
|
8828
8861
|
};
|
|
8829
8862
|
|
|
8830
|
-
var
|
|
8831
|
-
icon: 'runSheet',
|
|
8832
|
-
label: 'Print Runsheet'
|
|
8833
|
-
}, {
|
|
8834
|
-
icon: 'loadSheet',
|
|
8835
|
-
label: 'Print Loadsheet'
|
|
8836
|
-
}, {
|
|
8863
|
+
var optionsForReturnPrint = [{
|
|
8837
8864
|
icon: 'deliveryLables',
|
|
8838
|
-
label: 'Print
|
|
8839
|
-
}, {
|
|
8840
|
-
icon: 'customerLables',
|
|
8841
|
-
label: 'Print Customer Labels'
|
|
8842
|
-
}, {
|
|
8843
|
-
icon: 'collectionLables',
|
|
8844
|
-
label: 'Print Collection Labels'
|
|
8865
|
+
label: 'Print Return Labels'
|
|
8845
8866
|
}];
|
|
8846
8867
|
|
|
8847
8868
|
var _templateObject$23, _templateObject2$1t;
|
|
8848
8869
|
// import { PrintIconMap } from '../utils';
|
|
8849
8870
|
// import { optionsPrint } from '../fakeData';
|
|
8850
8871
|
// import { PrintData } from '../interface';
|
|
8851
|
-
var options$2 =
|
|
8852
|
-
var
|
|
8872
|
+
var options$2 = optionsForReturnPrint;
|
|
8873
|
+
var PrintDropDownReturn = function PrintDropDownReturn() {
|
|
8853
8874
|
var downloadFiles = function downloadFiles() {};
|
|
8854
8875
|
return React__default.createElement(OptionsList, null, options$2.map(function (item, index) {
|
|
8855
8876
|
var IconComponent = PrintIconMap[item.icon];
|
|
@@ -8862,22 +8883,22 @@ var PrintDropDown = function PrintDropDown() {
|
|
|
8862
8883
|
var OptionsList = /*#__PURE__*/styled__default.ul(_templateObject$23 || (_templateObject$23 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n list-style: none;\n box-sizing: border-box;\n border-radius: 6px;\n border: 1px solid rgba(224, 226, 231, 0.5);\n background: #fff;\n box-shadow: 0px 4px 30px 0px rgba(46, 45, 116, 0.05);\n width: 177px;\n padding: 5px 1px 3px 1px;\n position: absolute;\n top: 26px;\n right: 0;\n z-index: 99;\n min-width: 194px;\n"])));
|
|
8863
8884
|
var OptionsListLi = /*#__PURE__*/styled__default.li(_templateObject2$1t || (_templateObject2$1t = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-bottom: 1px solid #f0f2f2;\n padding: 8px 10px;\n display: flex;\n gap: 12px;\n align-items: center;\n font-size: 13px;\n cursor: pointer;\n &:last-child {\n border: none;\n }\n"])));
|
|
8864
8885
|
|
|
8865
|
-
var ReturnOrderTable = function ReturnOrderTable(
|
|
8866
|
-
var loadingskeleton = _ref.loadingskeleton;
|
|
8886
|
+
var ReturnOrderTable = function ReturnOrderTable() {
|
|
8867
8887
|
var _useAtom = jotai.useAtom(filtersReducerAtom),
|
|
8868
8888
|
state = _useAtom[0];
|
|
8869
8889
|
var _useSelectedOrders = useSelectedOrders(),
|
|
8870
8890
|
selectedReturnOrder = _useSelectedOrders[0],
|
|
8871
8891
|
setSelectedReturnOrder = _useSelectedOrders[1];
|
|
8872
|
-
var
|
|
8873
|
-
selectAll =
|
|
8874
|
-
setSelectAll =
|
|
8892
|
+
var _useSelectAll = useSelectAll(),
|
|
8893
|
+
selectAll = _useSelectAll[0],
|
|
8894
|
+
setSelectAll = _useSelectAll[1];
|
|
8875
8895
|
var filters = state['x-filters'],
|
|
8876
8896
|
pagination = state['x-pagination'];
|
|
8877
8897
|
var _useReturnData = useReturnData(),
|
|
8878
8898
|
returnData = _useReturnData[0],
|
|
8879
8899
|
setReturnData = _useReturnData[1];
|
|
8880
8900
|
var _useLoading = useLoading(),
|
|
8901
|
+
load = _useLoading[0],
|
|
8881
8902
|
setLoading = _useLoading[1];
|
|
8882
8903
|
var dropdownRefParent = React.useRef(null);
|
|
8883
8904
|
var dropdownRef = React.useRef(null);
|
|
@@ -8892,6 +8913,8 @@ var ReturnOrderTable = function ReturnOrderTable(_ref) {
|
|
|
8892
8913
|
setNewPayload = _useNewReturnPayload[1];
|
|
8893
8914
|
var _useGroupedPayload = useGroupedPayload(),
|
|
8894
8915
|
setGrouped = _useGroupedPayload[1];
|
|
8916
|
+
var _useLocationData = useLocationData(),
|
|
8917
|
+
locationData = _useLocationData[0];
|
|
8895
8918
|
var OpenDropDown = function OpenDropDown(index) {
|
|
8896
8919
|
setPrintToggle(function (prevIndex) {
|
|
8897
8920
|
return prevIndex === index ? null : index;
|
|
@@ -8916,56 +8939,75 @@ var ReturnOrderTable = function ReturnOrderTable(_ref) {
|
|
|
8916
8939
|
pagination: pagination
|
|
8917
8940
|
}),
|
|
8918
8941
|
fetchedOrderData = _useApiHook.data,
|
|
8919
|
-
|
|
8942
|
+
returnDataLoad = _useApiHook.loading;
|
|
8920
8943
|
React.useEffect(function () {
|
|
8921
|
-
setLoading(
|
|
8944
|
+
setLoading(returnDataLoad);
|
|
8922
8945
|
if (fetchedOrderData && fetchedOrderData != null && fetchedOrderData.data) {
|
|
8923
8946
|
setReturnData(fetchedOrderData == null ? void 0 : fetchedOrderData.data);
|
|
8924
8947
|
}
|
|
8925
|
-
}, [fetchedOrderData,
|
|
8948
|
+
}, [fetchedOrderData, returnDataLoad]);
|
|
8949
|
+
React.useEffect(function () {
|
|
8950
|
+
setLoading(returnDataLoad);
|
|
8951
|
+
if (fetchedOrderData && fetchedOrderData != null && fetchedOrderData.data && locationData) {
|
|
8952
|
+
var updatedReturnData = fetchedOrderData.data.map(function (returnItem) {
|
|
8953
|
+
var matchingLocation = locationData.find(function (location) {
|
|
8954
|
+
return (location == null ? void 0 : location.token) === (returnItem == null ? void 0 : returnItem.return_location);
|
|
8955
|
+
});
|
|
8956
|
+
return _extends({}, returnItem, {
|
|
8957
|
+
new_location: matchingLocation ? matchingLocation.location_name : null
|
|
8958
|
+
});
|
|
8959
|
+
});
|
|
8960
|
+
setReturnData(updatedReturnData);
|
|
8961
|
+
}
|
|
8962
|
+
}, [fetchedOrderData, returnDataLoad, locationData]);
|
|
8926
8963
|
var handleSelectAll = function handleSelectAll(e) {
|
|
8927
8964
|
setSelectAll(e.target.checked);
|
|
8928
8965
|
if (e.target.checked) {
|
|
8929
8966
|
setSelectedReturnOrder(returnData == null ? void 0 : returnData.map(function (loc) {
|
|
8930
|
-
var _loc$return_locations;
|
|
8931
8967
|
return {
|
|
8932
8968
|
id: loc.id,
|
|
8933
8969
|
return_locations: loc == null ? void 0 : loc.return_locations,
|
|
8934
8970
|
return_location: loc == null ? void 0 : loc.return_location,
|
|
8935
|
-
products: loc.
|
|
8971
|
+
products: loc == null ? void 0 : loc.legacy_product_id,
|
|
8936
8972
|
order_product_return_action: loc == null ? void 0 : loc.order_product_return_action,
|
|
8937
|
-
return_location_token: loc == null
|
|
8973
|
+
return_location_token: loc == null ? void 0 : loc.return_location,
|
|
8974
|
+
new_location: loc == null ? void 0 : loc.new_location
|
|
8938
8975
|
};
|
|
8939
8976
|
}));
|
|
8940
8977
|
setNewPayload(returnData == null ? void 0 : returnData.map(function (loc) {
|
|
8941
|
-
var _loc$order_product_re
|
|
8978
|
+
var _loc$order_product_re;
|
|
8942
8979
|
return {
|
|
8943
8980
|
id: loc.id,
|
|
8944
8981
|
account_number: createReturn == null ? void 0 : createReturn.account_number,
|
|
8945
|
-
customer_id: createReturn == null ? void 0 : createReturn.customer_id,
|
|
8946
|
-
products: loc.
|
|
8947
|
-
return_action:
|
|
8948
|
-
return_location_token:
|
|
8982
|
+
customer_id: +(createReturn == null ? void 0 : createReturn.customer_id),
|
|
8983
|
+
products: [loc == null ? void 0 : loc.legacy_product_id],
|
|
8984
|
+
return_action: [loc == null || (_loc$order_product_re = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re.type] || null,
|
|
8985
|
+
return_location_token: (loc == null ? void 0 : loc.return_location) || null,
|
|
8986
|
+
new_location: loc == null ? void 0 : loc.new_location
|
|
8949
8987
|
};
|
|
8950
8988
|
}));
|
|
8951
8989
|
} else {
|
|
8952
8990
|
setSelectedReturnOrder([]);
|
|
8991
|
+
setNewPayload([]);
|
|
8992
|
+
setGrouped([]);
|
|
8953
8993
|
}
|
|
8954
8994
|
};
|
|
8955
|
-
var handleSelectOrderReturn = function handleSelectOrderReturn(id, return_location, return_locations, order_product_return_action) {
|
|
8995
|
+
var handleSelectOrderReturn = function handleSelectOrderReturn(id, return_location, return_locations, order_product_return_action, new_location, legacy_product_id) {
|
|
8956
8996
|
setSelectedReturnOrder(function (prevSelectedLocations) {
|
|
8957
8997
|
var isSelected = prevSelectedLocations == null ? void 0 : prevSelectedLocations.some(function (loc) {
|
|
8958
8998
|
return loc.id === id;
|
|
8959
8999
|
});
|
|
9000
|
+
console.log(new_location, 'new_location');
|
|
8960
9001
|
if (isSelected) {
|
|
8961
9002
|
var updatedSelectedLocations = prevSelectedLocations.filter(function (loc) {
|
|
8962
9003
|
return loc.id !== id;
|
|
8963
9004
|
});
|
|
8964
9005
|
setReturnPayload(function (prevState) {
|
|
8965
9006
|
return _extends({}, prevState, {
|
|
8966
|
-
products:
|
|
9007
|
+
products: legacy_product_id,
|
|
8967
9008
|
return_action: (order_product_return_action == null ? void 0 : order_product_return_action.type) || null,
|
|
8968
|
-
return_location_token:
|
|
9009
|
+
return_location_token: return_location || null,
|
|
9010
|
+
new_location: new_location
|
|
8969
9011
|
});
|
|
8970
9012
|
});
|
|
8971
9013
|
setNewPayload(function (prevPayload) {
|
|
@@ -8978,26 +9020,28 @@ var ReturnOrderTable = function ReturnOrderTable(_ref) {
|
|
|
8978
9020
|
var newReturnPayload = {
|
|
8979
9021
|
id: id,
|
|
8980
9022
|
account_number: createReturn == null ? void 0 : createReturn.account_number,
|
|
8981
|
-
customer_id: createReturn == null ? void 0 : createReturn.customer_id,
|
|
8982
|
-
products:
|
|
8983
|
-
return_action:
|
|
8984
|
-
return_location_token:
|
|
9023
|
+
customer_id: +(createReturn == null ? void 0 : createReturn.customer_id),
|
|
9024
|
+
products: [legacy_product_id],
|
|
9025
|
+
return_action: [order_product_return_action == null ? void 0 : order_product_return_action.type] || null,
|
|
9026
|
+
return_location_token: return_location || null
|
|
8985
9027
|
};
|
|
8986
9028
|
setNewPayload(function (prevPayload) {
|
|
8987
9029
|
return [].concat(prevPayload, [newReturnPayload]);
|
|
8988
9030
|
});
|
|
8989
9031
|
setReturnPayload(function (prevState) {
|
|
8990
9032
|
return _extends({}, prevState, {
|
|
8991
|
-
products:
|
|
9033
|
+
products: legacy_product_id,
|
|
8992
9034
|
return_action: (order_product_return_action == null ? void 0 : order_product_return_action.type) || null,
|
|
8993
|
-
return_location_token:
|
|
9035
|
+
return_location_token: return_location || null,
|
|
9036
|
+
new_location: new_location
|
|
8994
9037
|
});
|
|
8995
9038
|
});
|
|
8996
9039
|
return [].concat(prevSelectedLocations, [{
|
|
8997
9040
|
id: id,
|
|
8998
9041
|
return_location: return_location,
|
|
8999
9042
|
return_locations: return_locations,
|
|
9000
|
-
order_product_return_action: order_product_return_action
|
|
9043
|
+
order_product_return_action: order_product_return_action,
|
|
9044
|
+
new_location: new_location
|
|
9001
9045
|
}]);
|
|
9002
9046
|
}
|
|
9003
9047
|
});
|
|
@@ -9030,7 +9074,7 @@ var ReturnOrderTable = function ReturnOrderTable(_ref) {
|
|
|
9030
9074
|
onChange: handleSelectAll
|
|
9031
9075
|
})), React__default.createElement("th", null, "Product Location"), React__default.createElement("th", null, "Return Location"), React__default.createElement("th", null, "Recipient"), React__default.createElement("th", null, "Code"), React__default.createElement("th", null, "Description"), React__default.createElement("th", null, "Part"), React__default.createElement("th", null, "Weight"), React__default.createElement("th", null, "CBM"), React__default.createElement("th", null, "Return Reason"), React__default.createElement("th", null, "Collected"), React__default.createElement("th", null, "Collection Reason"), React__default.createElement("th", {
|
|
9032
9076
|
className: "emailInvoiceShare"
|
|
9033
|
-
}, "Labels"))), React__default.createElement("tbody", null,
|
|
9077
|
+
}, "Labels"))), React__default.createElement("tbody", null, load ? React__default.createElement("tr", null, React__default.createElement("td", {
|
|
9034
9078
|
colSpan: 6
|
|
9035
9079
|
}, React__default.createElement(antd.Skeleton, {
|
|
9036
9080
|
active: true
|
|
@@ -9039,19 +9083,20 @@ var ReturnOrderTable = function ReturnOrderTable(_ref) {
|
|
|
9039
9083
|
})) : (returnData == null ? void 0 : returnData.length) === 0 ? React__default.createElement("tr", null, React__default.createElement("td", {
|
|
9040
9084
|
colSpan: 14
|
|
9041
9085
|
}, React__default.createElement(EmptyDataContainer, null, React__default.createElement(antd.Empty, null)))) : returnData == null ? void 0 : returnData.map(function (item, index) {
|
|
9042
|
-
var _item$orders_products, _item$order_data, _item$order_data2, _item$return_reasons, _item$collection_reas;
|
|
9086
|
+
var _item$orders_products, _item$orders_products2, _item$order_data, _item$order_data2, _item$return_reasons, _item$order_product_r, _item$collection_reas;
|
|
9043
9087
|
return React__default.createElement("tr", {
|
|
9044
9088
|
key: item.id
|
|
9045
9089
|
}, React__default.createElement("td", null, React__default.createElement(dmsComponentLibrary.Checkbox, {
|
|
9090
|
+
className: "custom-check",
|
|
9046
9091
|
checked: selectedReturnOrder == null ? void 0 : selectedReturnOrder.some(function (selectedInvoice) {
|
|
9047
9092
|
return (selectedInvoice == null ? void 0 : selectedInvoice.id) === item.id;
|
|
9048
9093
|
}),
|
|
9049
9094
|
onChange: function onChange() {
|
|
9050
|
-
return handleSelectOrderReturn(item.id, item.return_location, item.return_locations, item.order_product_return_action);
|
|
9095
|
+
return handleSelectOrderReturn(item.id, item.return_location, item.return_locations, item.order_product_return_action, item.new_location, item.legacy_product_id);
|
|
9051
9096
|
}
|
|
9052
|
-
})), React__default.createElement("td", null, item
|
|
9097
|
+
})), React__default.createElement("td", null, (item == null || (_item$orders_products = item.orders_products_stock) == null ? void 0 : _item$orders_products.location) !== null && (item == null || (_item$orders_products2 = item.orders_products_stock) == null ? void 0 : _item$orders_products2.location) !== undefined ? item.orders_products_stock.location : React__default.createElement("div", {
|
|
9053
9098
|
className: "awaiting"
|
|
9054
|
-
}, "
|
|
9099
|
+
}, "Awaiting")), React__default.createElement("td", null, " ", displayValueOrNA(item == null ? void 0 : item.new_location)), React__default.createElement("td", null, React__default.createElement("ul", {
|
|
9055
9100
|
style: {
|
|
9056
9101
|
listStyleType: 'none',
|
|
9057
9102
|
padding: 0
|
|
@@ -9066,7 +9111,7 @@ var ReturnOrderTable = function ReturnOrderTable(_ref) {
|
|
|
9066
9111
|
style: {
|
|
9067
9112
|
color: '#888075'
|
|
9068
9113
|
}
|
|
9069
|
-
}, displayValueOrNA(item == null || (_item$order_data2 = item.order_data) == null || (_item$order_data2 = _item$order_data2.order_recipient) == null ? void 0 : _item$order_data2.postcode)))), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.code)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.description)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.parts_count)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.weight), "KG"), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.cube)), React__default.createElement("td", null, displayValueOrNA(item == null || (_item$return_reasons = item.return_reasons) == null ? void 0 : _item$return_reasons.reason)), React__default.createElement("td", null,
|
|
9114
|
+
}, displayValueOrNA(item == null || (_item$order_data2 = item.order_data) == null || (_item$order_data2 = _item$order_data2.order_recipient) == null ? void 0 : _item$order_data2.postcode)))), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.code)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.description)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.parts_count)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.weight), "KG"), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.cube)), React__default.createElement("td", null, displayValueOrNA(item == null || (_item$return_reasons = item.return_reasons) == null ? void 0 : _item$return_reasons.reason)), React__default.createElement("td", null, displayValueOrNA(item == null || (_item$order_product_r = item.order_product_returns) == null ? void 0 : _item$order_product_r.collected_at)), React__default.createElement("td", null, displayValueOrNA(item == null || (_item$collection_reas = item.collection_reasons) == null ? void 0 : _item$collection_reas.reason)), React__default.createElement("td", null, React__default.createElement("ul", {
|
|
9070
9115
|
className: "actionbox"
|
|
9071
9116
|
}, React__default.createElement(CustomDrop, {
|
|
9072
9117
|
ref: dropdownRefParent,
|
|
@@ -9078,7 +9123,7 @@ var ReturnOrderTable = function ReturnOrderTable(_ref) {
|
|
|
9078
9123
|
}
|
|
9079
9124
|
}, React__default.createElement(PrinterIcon, null), React__default.createElement(DownIcon, null), printToogle == index && React__default.createElement("div", {
|
|
9080
9125
|
ref: dropdownRef
|
|
9081
|
-
}, React__default.createElement(
|
|
9126
|
+
}, React__default.createElement(PrintDropDownReturn, null)))))));
|
|
9082
9127
|
})))));
|
|
9083
9128
|
};
|
|
9084
9129
|
|
|
@@ -9749,17 +9794,26 @@ var repackModal = function repackModal() {
|
|
|
9749
9794
|
var StyledConatiner$1 = /*#__PURE__*/styled__default.div(_templateObject$2f || (_templateObject$2f = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* text-wrap: nowrap; */\n"])));
|
|
9750
9795
|
|
|
9751
9796
|
var _templateObject$2g, _templateObject2$1D, _templateObject3$X;
|
|
9797
|
+
var _excluded$2 = ["id"];
|
|
9752
9798
|
var CreateReturnModal = function CreateReturnModal() {
|
|
9753
|
-
var
|
|
9754
|
-
selectedlocation =
|
|
9755
|
-
setSelectedLocations =
|
|
9799
|
+
var _useSelectedConfirmLo = useSelectedConfirmLoc(),
|
|
9800
|
+
selectedlocation = _useSelectedConfirmLo[0],
|
|
9801
|
+
setSelectedLocations = _useSelectedConfirmLo[1];
|
|
9756
9802
|
var _useSelectedOrders = useSelectedOrders(),
|
|
9757
9803
|
selectedReturnOrder = _useSelectedOrders[0];
|
|
9804
|
+
var _usePostLoading = usePostLoading(),
|
|
9805
|
+
load = _usePostLoading[0];
|
|
9806
|
+
var _useGroupedPayload = useGroupedPayload(),
|
|
9807
|
+
groupedPayload = _useGroupedPayload[0];
|
|
9808
|
+
var _useSelectedConfirmLo2 = useSelectedConfirmLoc(),
|
|
9809
|
+
forDisabledCheck = _useSelectedConfirmLo2[0];
|
|
9810
|
+
var _useFinalPayload = useFinalPayload(),
|
|
9811
|
+
setNew = _useFinalPayload[1];
|
|
9758
9812
|
var handleSelectLocations = function handleSelectLocations(id) {
|
|
9759
9813
|
setSelectedLocations(function (prevSelectedLocations) {
|
|
9760
|
-
var isSelected = prevSelectedLocations.includes(id);
|
|
9814
|
+
var isSelected = prevSelectedLocations == null ? void 0 : prevSelectedLocations.includes(id);
|
|
9761
9815
|
if (isSelected) {
|
|
9762
|
-
return prevSelectedLocations.filter(function (selectedId) {
|
|
9816
|
+
return prevSelectedLocations == null ? void 0 : prevSelectedLocations.filter(function (selectedId) {
|
|
9763
9817
|
return selectedId !== id;
|
|
9764
9818
|
});
|
|
9765
9819
|
} else {
|
|
@@ -9767,7 +9821,30 @@ var CreateReturnModal = function CreateReturnModal() {
|
|
|
9767
9821
|
}
|
|
9768
9822
|
});
|
|
9769
9823
|
};
|
|
9770
|
-
|
|
9824
|
+
var uniqueLocations = selectedReturnOrder == null ? void 0 : selectedReturnOrder.reduce(function (acc, current) {
|
|
9825
|
+
var x = acc.find(function (item) {
|
|
9826
|
+
return item.return_location === current.return_location;
|
|
9827
|
+
});
|
|
9828
|
+
if (!x) {
|
|
9829
|
+
acc.push(current);
|
|
9830
|
+
}
|
|
9831
|
+
return acc;
|
|
9832
|
+
}, []);
|
|
9833
|
+
React.useEffect(function () {
|
|
9834
|
+
if ((groupedPayload == null ? void 0 : groupedPayload.length) > 0 && (forDisabledCheck == null ? void 0 : forDisabledCheck.length) > 0) {
|
|
9835
|
+
var matchedItems = groupedPayload == null ? void 0 : groupedPayload.filter(function (item) {
|
|
9836
|
+
return forDisabledCheck.includes(item.id);
|
|
9837
|
+
});
|
|
9838
|
+
if (matchedItems.length > 0) {
|
|
9839
|
+
var finalPayload = matchedItems == null ? void 0 : matchedItems.map(function (_ref) {
|
|
9840
|
+
var rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
9841
|
+
return rest;
|
|
9842
|
+
});
|
|
9843
|
+
setNew(finalPayload);
|
|
9844
|
+
}
|
|
9845
|
+
}
|
|
9846
|
+
}, [forDisabledCheck]);
|
|
9847
|
+
return React__default.createElement(React__default.Fragment, null, load && React__default.createElement(Loader, null), React__default.createElement(Wrapper$l, null, React__default.createElement(dmsComponentLibrary.Alert, {
|
|
9771
9848
|
onClose: function onClose() {},
|
|
9772
9849
|
description: "",
|
|
9773
9850
|
type: "info",
|
|
@@ -9778,7 +9855,7 @@ var CreateReturnModal = function CreateReturnModal() {
|
|
|
9778
9855
|
listStyle: 'none',
|
|
9779
9856
|
padding: 0
|
|
9780
9857
|
}
|
|
9781
|
-
},
|
|
9858
|
+
}, uniqueLocations == null ? void 0 : uniqueLocations.map(function (returnLoc) {
|
|
9782
9859
|
return React__default.createElement("li", {
|
|
9783
9860
|
key: returnLoc.id,
|
|
9784
9861
|
style: {
|
|
@@ -9787,7 +9864,7 @@ var CreateReturnModal = function CreateReturnModal() {
|
|
|
9787
9864
|
alignItems: 'center'
|
|
9788
9865
|
}
|
|
9789
9866
|
}, React__default.createElement(dmsComponentLibrary.Checkbox, {
|
|
9790
|
-
checked: selectedlocation.includes(returnLoc.id),
|
|
9867
|
+
checked: selectedlocation == null ? void 0 : selectedlocation.includes(returnLoc.id),
|
|
9791
9868
|
onChange: function onChange() {
|
|
9792
9869
|
return handleSelectLocations(returnLoc.id);
|
|
9793
9870
|
}
|
|
@@ -9795,14 +9872,13 @@ var CreateReturnModal = function CreateReturnModal() {
|
|
|
9795
9872
|
style: {
|
|
9796
9873
|
marginLeft: '8px'
|
|
9797
9874
|
}
|
|
9798
|
-
}, returnLoc == null ? void 0 : returnLoc.
|
|
9799
|
-
}))));
|
|
9875
|
+
}, displayValueOrNA(returnLoc == null ? void 0 : returnLoc.new_location)));
|
|
9876
|
+
})))));
|
|
9800
9877
|
};
|
|
9801
9878
|
var StyledText$1 = /*#__PURE__*/styled__default.div(_templateObject$2g || (_templateObject$2g = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #8d8f90;\n font-family: Poppins;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n"])));
|
|
9802
9879
|
var Container$1b = /*#__PURE__*/styled__default.div(_templateObject2$1D || (_templateObject2$1D = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
9803
9880
|
var Wrapper$l = /*#__PURE__*/styled__default.div(_templateObject3$X || (_templateObject3$X = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 15px;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n gap: 15px;\n align-self: stretch;\n border-radius: 8px;\n background: #f8fafc;\n box-shadow: 0px 1px 3px 0px rgba(16, 24, 40, 0.1);\n"])));
|
|
9804
9881
|
|
|
9805
|
-
var _excluded$2 = ["id"];
|
|
9806
9882
|
var ModalManager = function ModalManager() {
|
|
9807
9883
|
var _useAtom = jotai.useAtom(countReducerAtom),
|
|
9808
9884
|
popupName = _useAtom[0],
|
|
@@ -9826,9 +9902,21 @@ var ModalManager = function ModalManager() {
|
|
|
9826
9902
|
selectedTab = _useAtom3[0];
|
|
9827
9903
|
var _useState = React.useState(false),
|
|
9828
9904
|
setIsFormValid = _useState[1];
|
|
9905
|
+
var _useFinalPayload = useFinalPayload(),
|
|
9906
|
+
newGrouped = _useFinalPayload[0],
|
|
9907
|
+
setNewGrouped = _useFinalPayload[1];
|
|
9908
|
+
var _usePostLoading = usePostLoading(),
|
|
9909
|
+
SetPostLoading = _usePostLoading[1];
|
|
9910
|
+
var _useSelectedOrders = useSelectedOrders(),
|
|
9911
|
+
setSelectedReturnOrder = _useSelectedOrders[1];
|
|
9912
|
+
var _useSelectedConfirmLo = useSelectedConfirmLoc(),
|
|
9913
|
+
setCheck = _useSelectedConfirmLo[1];
|
|
9829
9914
|
var _useNewReturnPayload = useNewReturnPayload(),
|
|
9830
|
-
newPayload = _useNewReturnPayload[0],
|
|
9831
9915
|
setNewPayload = _useNewReturnPayload[1];
|
|
9916
|
+
var _useGroupedPayload = useGroupedPayload(),
|
|
9917
|
+
setGrouped = _useGroupedPayload[1];
|
|
9918
|
+
var _useSelectAll = useSelectAll(),
|
|
9919
|
+
setSelectAll = _useSelectAll[1];
|
|
9832
9920
|
console.log(orderProduct, 'abcabcabcabcabcabcabcabcabcabcabc');
|
|
9833
9921
|
var _closeModal = function closeModal() {
|
|
9834
9922
|
dispatch({
|
|
@@ -10004,23 +10092,40 @@ var ModalManager = function ModalManager() {
|
|
|
10004
10092
|
var _useApiHook3 = dmsComponentLibrary.useApiHook({
|
|
10005
10093
|
endpoint: "return_orders/",
|
|
10006
10094
|
method: 'POST',
|
|
10007
|
-
body:
|
|
10095
|
+
body: newGrouped,
|
|
10008
10096
|
performAction: false
|
|
10009
10097
|
}),
|
|
10010
10098
|
response = _useApiHook3.data,
|
|
10011
|
-
setShouldPerformAction = _useApiHook3.setShouldPerformAction
|
|
10099
|
+
setShouldPerformAction = _useApiHook3.setShouldPerformAction,
|
|
10100
|
+
confirmLoading = _useApiHook3.loading;
|
|
10101
|
+
React.useEffect(function () {
|
|
10102
|
+
SetPostLoading(confirmLoading);
|
|
10103
|
+
}, [confirmLoading]);
|
|
10104
|
+
console.log(response);
|
|
10105
|
+
React.useEffect(function () {
|
|
10106
|
+
if (response === null || response && response != null && response.data) {
|
|
10107
|
+
dispatch({
|
|
10108
|
+
type: 'close'
|
|
10109
|
+
});
|
|
10110
|
+
setNewGrouped([]);
|
|
10111
|
+
setSelectedReturnOrder([]);
|
|
10112
|
+
setCheck([]);
|
|
10113
|
+
setNewPayload([]);
|
|
10114
|
+
setGrouped([]);
|
|
10115
|
+
setShouldPerformAction(false);
|
|
10116
|
+
setSelectAll(false);
|
|
10117
|
+
}
|
|
10118
|
+
}, [response]);
|
|
10012
10119
|
var handleConfirmReturn = function handleConfirmReturn() {
|
|
10013
|
-
|
|
10014
|
-
|
|
10015
|
-
return _extends({}, rest);
|
|
10016
|
-
});
|
|
10017
|
-
console.log(response);
|
|
10018
|
-
if (payloadWithoutId) {
|
|
10019
|
-
setNewPayload(payloadWithoutId);
|
|
10120
|
+
setShouldPerformAction(false);
|
|
10121
|
+
if (newGrouped.length > 0) {
|
|
10020
10122
|
setShouldPerformAction(true);
|
|
10021
10123
|
} else {
|
|
10022
10124
|
setShouldPerformAction(false);
|
|
10023
10125
|
}
|
|
10126
|
+
dispatch({
|
|
10127
|
+
type: 'close'
|
|
10128
|
+
});
|
|
10024
10129
|
};
|
|
10025
10130
|
return React__default.createElement(React__default.Fragment, null, (popupName == null ? void 0 : popupName.state) == 'create-return' && React__default.createElement(dmsComponentLibrary.AntModal, {
|
|
10026
10131
|
openStatus: (popupName == null ? void 0 : popupName.state) == 'create-return' ? true : false,
|
|
@@ -10036,8 +10141,7 @@ var ModalManager = function ModalManager() {
|
|
|
10036
10141
|
name: 'Submit',
|
|
10037
10142
|
btnStyle: 'rounded',
|
|
10038
10143
|
onClick: handleConfirmReturn,
|
|
10039
|
-
type: 'button'
|
|
10040
|
-
disabled: !newPayload
|
|
10144
|
+
type: 'button'
|
|
10041
10145
|
}],
|
|
10042
10146
|
btnAlign: 'justifyEnd'
|
|
10043
10147
|
},
|
|
@@ -10289,7 +10393,7 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
10289
10393
|
onChange: function onChange() {
|
|
10290
10394
|
return handleSelectInvoice(item.id);
|
|
10291
10395
|
}
|
|
10292
|
-
})), React__default.createElement("td", null, formatDate$1(new Date(item == null ? void 0 : item.created_at))), React__default.createElement("td", null,
|
|
10396
|
+
})), React__default.createElement("td", null, formatDate$1(new Date(item == null ? void 0 : item.created_at))), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.return_locations)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.pick_up_location)), React__default.createElement("td", {
|
|
10293
10397
|
onClick: function onClick() {
|
|
10294
10398
|
return setOrderId(item.id);
|
|
10295
10399
|
}
|
|
@@ -10306,11 +10410,11 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
10306
10410
|
}
|
|
10307
10411
|
}, React__default.createElement(reactRouterDom.NavLink, {
|
|
10308
10412
|
to: "" + item.id
|
|
10309
|
-
},
|
|
10413
|
+
}, displayValueOrNA(item == null || (_item$order_recipient = item.order_recipient) == null ? void 0 : _item$order_recipient.recipient_name))), React__default.createElement("li", {
|
|
10310
10414
|
style: {
|
|
10311
10415
|
color: '#888075'
|
|
10312
10416
|
}
|
|
10313
|
-
},
|
|
10417
|
+
}, displayValueOrNA(item == null || (_item$order_recipient2 = item.order_recipient) == null ? void 0 : _item$order_recipient2.postcode)))), React__default.createElement("td", null, displayValueOrNA(item == null || (_item$customer_data = item.customer_data) == null ? void 0 : _item$customer_data.customer_name)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.consignment)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.order_number)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.box_count)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.weight), " KG"), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.cube)), React__default.createElement("td", null, React__default.createElement(dmsComponentLibrary.AntSelect, {
|
|
10314
10418
|
options: assigneOptions,
|
|
10315
10419
|
placeholder: "Select",
|
|
10316
10420
|
onChange: function onChange() {},
|
|
@@ -10340,7 +10444,7 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
10340
10444
|
}
|
|
10341
10445
|
}, React__default.createElement(PrinterIcon, null), React__default.createElement(DownIcon, null), printToogle == index && React__default.createElement("div", {
|
|
10342
10446
|
ref: dropdownRef
|
|
10343
|
-
}, React__default.createElement(
|
|
10447
|
+
}, React__default.createElement(PrintDropDownReturn, null)))), React__default.createElement("li", {
|
|
10344
10448
|
className: "downloadcontainer"
|
|
10345
10449
|
}, React__default.createElement(LoadIcon, null)))));
|
|
10346
10450
|
})))));
|
|
@@ -10476,20 +10580,16 @@ var filterReducer$1 = function filterReducer(state, action) {
|
|
|
10476
10580
|
value: action.payload
|
|
10477
10581
|
}])
|
|
10478
10582
|
});
|
|
10479
|
-
|
|
10480
|
-
|
|
10481
|
-
|
|
10482
|
-
|
|
10483
|
-
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
// value: action.payload,
|
|
10490
|
-
// },
|
|
10491
|
-
// ],
|
|
10492
|
-
// };
|
|
10583
|
+
case 'SET_STATUS_ORDER_FILTER':
|
|
10584
|
+
return _extends({}, state, {
|
|
10585
|
+
'x-filters': [].concat(state['x-filters'].filter(function (f) {
|
|
10586
|
+
return f.field !== 'status_id';
|
|
10587
|
+
}), [{
|
|
10588
|
+
field: 'status_id',
|
|
10589
|
+
op: '=',
|
|
10590
|
+
value: action.payload
|
|
10591
|
+
}])
|
|
10592
|
+
});
|
|
10493
10593
|
// case 'SET_LOCATION_FILTER':
|
|
10494
10594
|
// return {
|
|
10495
10595
|
// ...state,
|
|
@@ -10527,6 +10627,50 @@ var filtersReducerAtom$1 = /*#__PURE__*/jotai.atom(function (get) {
|
|
|
10527
10627
|
return set(filtersStateAtom$1, filterReducer$1(get(filtersStateAtom$1), action));
|
|
10528
10628
|
});
|
|
10529
10629
|
|
|
10630
|
+
var StatusIcon = function StatusIcon() {
|
|
10631
|
+
return React__default.createElement("svg", {
|
|
10632
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10633
|
+
width: "13",
|
|
10634
|
+
height: "12",
|
|
10635
|
+
viewBox: "0 0 13 12",
|
|
10636
|
+
fill: "none"
|
|
10637
|
+
}, React__default.createElement("path", {
|
|
10638
|
+
d: "M2.60002 6V4.83333C2.60002 3.90507 2.96877 3.01483 3.62514 2.35845C4.28152 1.70208 5.17176 1.33333 6.10002 1.33333C7.02827 1.33333 7.91851 1.70208 8.57489 2.35845C9.23127 3.01483 9.60002 3.90507 9.60002 4.83333V6M1.43335 9.5C1.43335 9.80941 1.55627 10.1062 1.77506 10.325C1.99385 10.5437 2.2906 10.6667 2.60002 10.6667C2.90944 10.6667 3.20618 10.5437 3.42497 10.325C3.64377 10.1062 3.76668 9.80941 3.76668 9.5C3.76668 9.19058 3.64377 8.89383 3.42497 8.67504C3.20618 8.45625 2.90944 8.33333 2.60002 8.33333C2.2906 8.33333 1.99385 8.45625 1.77506 8.67504C1.55627 8.89383 1.43335 9.19058 1.43335 9.5ZM8.43335 9.5C8.43335 9.80941 8.55627 10.1062 8.77506 10.325C8.99385 10.5437 9.2906 10.6667 9.60002 10.6667C9.90944 10.6667 10.2062 10.5437 10.425 10.325C10.6438 10.1062 10.7667 9.80941 10.7667 9.5C10.7667 9.19058 10.6438 8.89383 10.425 8.67504C10.2062 8.45625 9.90944 8.33333 9.60002 8.33333C9.2906 8.33333 8.99385 8.45625 8.77506 8.67504C8.55627 8.89383 8.43335 9.19058 8.43335 9.5Z",
|
|
10639
|
+
stroke: "#6D6B68",
|
|
10640
|
+
"stroke-width": "2",
|
|
10641
|
+
"stroke-linecap": "round",
|
|
10642
|
+
"stroke-linejoin": "round"
|
|
10643
|
+
}), React__default.createElement("path", {
|
|
10644
|
+
d: "M7.8501 4.25L9.6001 6L11.3501 4.25",
|
|
10645
|
+
stroke: "#6D6B68",
|
|
10646
|
+
"stroke-width": "2",
|
|
10647
|
+
"stroke-linecap": "round",
|
|
10648
|
+
"stroke-linejoin": "round"
|
|
10649
|
+
}));
|
|
10650
|
+
};
|
|
10651
|
+
|
|
10652
|
+
var AssigneIcon = function AssigneIcon() {
|
|
10653
|
+
return React__default.createElement("svg", {
|
|
10654
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10655
|
+
width: "15",
|
|
10656
|
+
height: "14",
|
|
10657
|
+
viewBox: "0 0 15 14",
|
|
10658
|
+
fill: "none"
|
|
10659
|
+
}, React__default.createElement("g", {
|
|
10660
|
+
"clip-path": "url(#clip0_504_13636)"
|
|
10661
|
+
}, React__default.createElement("path", {
|
|
10662
|
+
d: "M4.4751 1.16667H12.6418V6.70834H11.4751V2.33334H10.3084V5.61051L8.55843 4.7355L6.80843 5.61051V2.33334H5.64176V5.54167H4.4751V1.16667ZM7.9751 2.33334V3.72284L8.55843 3.43117L9.14176 3.72284V2.33334H7.9751ZM5.02051 7.72917C4.92474 7.72892 4.82985 7.74755 4.74127 7.78398C4.65269 7.82041 4.57215 7.87394 4.50426 7.9415L3.30843 9.13734V11.375H6.59085L9.97593 10.5292L12.0363 9.6495C12.1064 9.61158 12.1601 9.54908 12.1871 9.47399C12.214 9.3989 12.2123 9.31652 12.1822 9.24263C12.1521 9.16875 12.0958 9.10857 12.0241 9.07364C11.9524 9.0387 11.8703 9.03147 11.7936 9.05334L11.7819 9.05625L8.0416 9.91667H5.93343V8.75H7.75635C7.89172 8.75 8.02154 8.69623 8.11727 8.60051C8.21299 8.50479 8.26676 8.37496 8.26676 8.23959C8.26676 8.10422 8.21299 7.97439 8.11727 7.87867C8.02154 7.78295 7.89172 7.72917 7.75635 7.72917H5.02051ZM9.42585 8.40117L11.4978 7.92459C11.7185 7.86656 11.9496 7.85988 12.1732 7.90505C12.3969 7.95022 12.6072 8.04605 12.7881 8.18518C12.969 8.3243 13.1155 8.50302 13.2166 8.70762C13.3176 8.91221 13.3704 9.13724 13.3709 9.36542C13.3707 9.64241 13.2934 9.91388 13.1478 10.1495C13.0021 10.3851 12.7938 10.5755 12.5461 10.6995L12.5303 10.7077L10.3487 11.6381L6.73435 12.5417H0.100098V8.3125H2.4836L3.6806 7.1155C3.85696 6.93974 4.06622 6.80044 4.29643 6.70555C4.52663 6.61067 4.77327 6.56206 5.02226 6.5625H7.75635C7.99023 6.56247 8.22153 6.61136 8.4354 6.70603C8.64926 6.8007 8.84096 6.93905 8.99818 7.11221C9.15541 7.28536 9.27467 7.48948 9.34832 7.71146C9.42198 7.93345 9.44838 8.16838 9.42585 8.40117ZM2.14176 9.47917H1.26676V11.375H2.14176V9.47917Z",
|
|
10663
|
+
fill: "#6D6B68"
|
|
10664
|
+
})), React__default.createElement("defs", null, React__default.createElement("clipPath", {
|
|
10665
|
+
id: "clip0_504_13636"
|
|
10666
|
+
}, React__default.createElement("rect", {
|
|
10667
|
+
width: "14",
|
|
10668
|
+
height: "14",
|
|
10669
|
+
fill: "white",
|
|
10670
|
+
transform: "translate(0.100098)"
|
|
10671
|
+
}))));
|
|
10672
|
+
};
|
|
10673
|
+
|
|
10530
10674
|
var _templateObject$2j, _templateObject2$1G;
|
|
10531
10675
|
var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
10532
10676
|
var _useAtom = jotai.useAtom(filtersReducerAtom$1),
|
|
@@ -10536,6 +10680,8 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
10536
10680
|
var _useState = React.useState(),
|
|
10537
10681
|
selectedDate = _useState[0],
|
|
10538
10682
|
setSelectedDate = _useState[1];
|
|
10683
|
+
var _useStatusOrderData = useStatusOrderData(),
|
|
10684
|
+
statusOfOrder = _useStatusOrderData[0];
|
|
10539
10685
|
// const zoneOptions = [
|
|
10540
10686
|
// { label: 'Zone 1', value: 'zone1' },
|
|
10541
10687
|
// { label: 'Zone 2', value: 'zone2' },
|
|
@@ -10565,6 +10711,14 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
10565
10711
|
value: option == null ? void 0 : option.id
|
|
10566
10712
|
};
|
|
10567
10713
|
});
|
|
10714
|
+
//status of order
|
|
10715
|
+
var orderOptions = statusOfOrder == null ? void 0 : statusOfOrder.map(function (option) {
|
|
10716
|
+
var _option$status_type, _option$status_type2;
|
|
10717
|
+
return {
|
|
10718
|
+
label: (option == null || (_option$status_type = option.status_type) == null || (_option$status_type = _option$status_type.charAt(0)) == null ? void 0 : _option$status_type.toUpperCase()) + (option == null || (_option$status_type2 = option.status_type) == null ? void 0 : _option$status_type2.slice(1)),
|
|
10719
|
+
value: option == null ? void 0 : option.id
|
|
10720
|
+
};
|
|
10721
|
+
});
|
|
10568
10722
|
var handleClientChange = function handleClientChange(value) {
|
|
10569
10723
|
console.log(value, 'value');
|
|
10570
10724
|
dispatch({
|
|
@@ -10572,6 +10726,13 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
10572
10726
|
payload: value
|
|
10573
10727
|
});
|
|
10574
10728
|
};
|
|
10729
|
+
var handleStatusOfOrder = function handleStatusOfOrder(value) {
|
|
10730
|
+
console.log(value, 'value');
|
|
10731
|
+
dispatch({
|
|
10732
|
+
type: 'SET_STATUS_ORDER_FILTER',
|
|
10733
|
+
payload: value
|
|
10734
|
+
});
|
|
10735
|
+
};
|
|
10575
10736
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(StyledFiter, null, React__default.createElement(StyledFIlterELements, null, React__default.createElement(LeftSideConatiner, null, React__default.createElement("div", {
|
|
10576
10737
|
className: "filtercontainer"
|
|
10577
10738
|
}, React__default.createElement("div", {
|
|
@@ -10596,6 +10757,19 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
10596
10757
|
className: "datefilter"
|
|
10597
10758
|
}, React__default.createElement("div", {
|
|
10598
10759
|
className: "dateiconcontainer"
|
|
10760
|
+
}, React__default.createElement(StatusIcon, null)), React__default.createElement(StyledAntSelect$d, null, React__default.createElement(antd.Select, {
|
|
10761
|
+
options: orderOptions,
|
|
10762
|
+
className: "custom-select",
|
|
10763
|
+
placeholder: "Status of Order",
|
|
10764
|
+
onChange: handleStatusOfOrder,
|
|
10765
|
+
style: {
|
|
10766
|
+
minWidth: '130px'
|
|
10767
|
+
},
|
|
10768
|
+
allowClear: true
|
|
10769
|
+
}))), React__default.createElement("div", {
|
|
10770
|
+
className: "datefilter"
|
|
10771
|
+
}, React__default.createElement("div", {
|
|
10772
|
+
className: "dateiconcontainer"
|
|
10599
10773
|
}, React__default.createElement(ClientIcon, null)), React__default.createElement(StyledAntSelect$d, null, React__default.createElement(antd.Select, {
|
|
10600
10774
|
options: clientOptions,
|
|
10601
10775
|
className: "custom-select",
|
|
@@ -10605,19 +10779,12 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
10605
10779
|
width: '125px',
|
|
10606
10780
|
border: 'none'
|
|
10607
10781
|
},
|
|
10608
|
-
|
|
10609
|
-
|
|
10610
|
-
|
|
10611
|
-
|
|
10612
|
-
|
|
10613
|
-
|
|
10614
|
-
title: omittedValues.map(function (_ref) {
|
|
10615
|
-
var label = _ref.label;
|
|
10616
|
-
return label;
|
|
10617
|
-
}).join(', ')
|
|
10618
|
-
}, React__default.createElement("span", null, omittedValues.length + " selected"));
|
|
10619
|
-
}
|
|
10620
|
-
}))))), React__default.createElement(TableFilters, null)));
|
|
10782
|
+
allowClear: true
|
|
10783
|
+
}))), React__default.createElement("div", {
|
|
10784
|
+
className: "datefilter"
|
|
10785
|
+
}, React__default.createElement("div", {
|
|
10786
|
+
className: "dateiconcontainer"
|
|
10787
|
+
}, React__default.createElement(AssigneIcon, null))))), React__default.createElement(TableFilters, null)));
|
|
10621
10788
|
};
|
|
10622
10789
|
var StyledDatePicker = /*#__PURE__*/styled__default.div(_templateObject$2j || (_templateObject$2j = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .custom-datepicker {\n border: none;\n }\n"])));
|
|
10623
10790
|
// const DropdownContainer = styled.div``;
|
|
@@ -10806,7 +10973,7 @@ function ReturnMainTable() {
|
|
|
10806
10973
|
}),
|
|
10807
10974
|
fetchedClientData = _useApiHook.data,
|
|
10808
10975
|
staticDataLoading = _useApiHook.loading;
|
|
10809
|
-
console.log('fetchedClientData', fetchedClientData
|
|
10976
|
+
// console.log('fetchedClientData', fetchedClientData?.data);
|
|
10810
10977
|
React.useEffect(function () {
|
|
10811
10978
|
setLoading(staticDataLoading);
|
|
10812
10979
|
if (fetchedClientData && fetchedClientData.data) {
|