@bjsdistribution/dms-client-return 0.0.55 → 0.0.56
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-view/details-filters/left-side-filters/dropdowns/MenuDropDown.d.ts +2 -2
- package/dist/components/order-view/details-filters/left-side-filters/dropdowns/OptionsDropDown.d.ts +2 -2
- package/dist/components/order-view/fakedata.d.ts +1 -1
- package/dist/components/order-view/store.d.ts +2 -2
- package/dist/dms-client-return.cjs.development.js +415 -384
- 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 +415 -384
- 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 +1 -1
- package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +1 -1
- package/src/components/order-daily-overview/table/ReturnTable.tsx +2 -2
- package/src/components/order-view/details-filters/left-side-filters/dropdowns/DropDowns.tsx +1 -1
- package/src/components/order-view/details-filters/left-side-filters/dropdowns/MenuDropDown.tsx +57 -45
- package/src/components/order-view/details-filters/left-side-filters/dropdowns/OptionsDropDown.tsx +74 -61
- package/src/components/order-view/fakedata.ts +6 -69
- package/src/components/order-view/general-information/dropdowns/Print.tsx +57 -35
- package/src/components/order-view/general-information/dropdowns/index.tsx +1 -2
- package/src/components/order-view/hooks/useUpdateOrder.ts +0 -3
- package/src/components/order-view/index.tsx +81 -56
- package/src/components/order-view/modalsPopup/DeleteProduct.tsx +2 -2
- package/src/components/order-view/modalsPopup/ModalManager.tsx +1 -1
- package/src/components/order-view/notes/order-dropdown/NewReturnDropdown.tsx +3 -1
- package/src/components/order-view/order-actions/actions/change-customer-account/ChangeCustomerAccModal.tsx +3 -3
- package/src/components/order-view/order-actions/actions/confirm-order/tables/NotesTable.tsx +3 -1
- package/src/components/order-view/order-actions/actions/unhold-order/UnholdOrder.tsx +72 -7
- package/src/components/order-view/order-details/expanded-content/footer/index.tsx +5 -3
- package/src/components/order-view/return-client-products/product-table/ReturnProductTable.tsx +9 -3
- package/src/components/order-view/store.ts +14 -13
- package/src/index.tsx +4 -20
- package/dist/components/order-view/general-information/dropdowns/Options.d.ts +0 -3
- package/src/components/order-view/general-information/dropdowns/Options.tsx +0 -68
|
@@ -548,7 +548,6 @@ function CopyText(props) {
|
|
|
548
548
|
var IconContainer = /*#__PURE__*/styled.div(_templateObject$1 || (_templateObject$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: pointer;\n"])));
|
|
549
549
|
|
|
550
550
|
var currentActionAtom = /*#__PURE__*/atom(undefined);
|
|
551
|
-
var isOnHold = /*#__PURE__*/atom(false);
|
|
552
551
|
var orderStaticDataAtom = /*#__PURE__*/atom({});
|
|
553
552
|
var customerInfoAtom = /*#__PURE__*/atom({
|
|
554
553
|
recipient_name: '',
|
|
@@ -638,9 +637,6 @@ function useOrderStaticData() {
|
|
|
638
637
|
function useCustomerInfo() {
|
|
639
638
|
return useAtom(customerInfoAtom);
|
|
640
639
|
}
|
|
641
|
-
function useIsOnHoldOrder() {
|
|
642
|
-
return useAtom(isOnHold);
|
|
643
|
-
}
|
|
644
640
|
//value
|
|
645
641
|
var orderId = /*#__PURE__*/atom([]);
|
|
646
642
|
var useOrderId = function useOrderId() {
|
|
@@ -751,9 +747,9 @@ var returnDataAtom = /*#__PURE__*/atom([]);
|
|
|
751
747
|
function useReturnData() {
|
|
752
748
|
return useAtom(returnDataAtom);
|
|
753
749
|
}
|
|
754
|
-
var
|
|
755
|
-
function
|
|
756
|
-
return useAtom(
|
|
750
|
+
var apiCalling = /*#__PURE__*/atom(false);
|
|
751
|
+
function useApiCalling() {
|
|
752
|
+
return useAtom(apiCalling);
|
|
757
753
|
}
|
|
758
754
|
var liveRecalling = /*#__PURE__*/atom(false);
|
|
759
755
|
//re api call of live status
|
|
@@ -2380,8 +2376,6 @@ var Container$s = /*#__PURE__*/styled.div(_templateObject3$c || (_templateObject
|
|
|
2380
2376
|
function useUpdateOrder() {
|
|
2381
2377
|
var controller;
|
|
2382
2378
|
var ssoToken = getCookie('id_token');
|
|
2383
|
-
var _useUpdateApiCall = useUpdateApiCall(),
|
|
2384
|
-
setCallApi = _useUpdateApiCall[1]; //single detail
|
|
2385
2379
|
var update = /*#__PURE__*/function () {
|
|
2386
2380
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
2387
2381
|
var endpoint, signal, requestOptions, response, json;
|
|
@@ -2424,10 +2418,9 @@ function useUpdateOrder() {
|
|
|
2424
2418
|
message: 'Success',
|
|
2425
2419
|
description: 'Order has been updated.'
|
|
2426
2420
|
});
|
|
2427
|
-
setCallApi(true);
|
|
2428
2421
|
return _context.abrupt("return", json);
|
|
2429
|
-
case
|
|
2430
|
-
_context.prev =
|
|
2422
|
+
case 18:
|
|
2423
|
+
_context.prev = 18;
|
|
2431
2424
|
_context.t0 = _context["catch"](4);
|
|
2432
2425
|
// setLoading(false);
|
|
2433
2426
|
// console.log(err, 'error');
|
|
@@ -2435,14 +2428,14 @@ function useUpdateOrder() {
|
|
|
2435
2428
|
message: 'Error',
|
|
2436
2429
|
description: "" + _context.t0 || 'An error has occurred. Please try again later.'
|
|
2437
2430
|
});
|
|
2438
|
-
case
|
|
2439
|
-
_context.prev =
|
|
2440
|
-
return _context.finish(
|
|
2441
|
-
case
|
|
2431
|
+
case 21:
|
|
2432
|
+
_context.prev = 21;
|
|
2433
|
+
return _context.finish(21);
|
|
2434
|
+
case 23:
|
|
2442
2435
|
case "end":
|
|
2443
2436
|
return _context.stop();
|
|
2444
2437
|
}
|
|
2445
|
-
}, _callee, null, [[4,
|
|
2438
|
+
}, _callee, null, [[4, 18, 21, 23]]);
|
|
2446
2439
|
}));
|
|
2447
2440
|
return function update(_x) {
|
|
2448
2441
|
return _ref.apply(this, arguments);
|
|
@@ -2465,8 +2458,8 @@ function OrderDetailsFooter() {
|
|
|
2465
2458
|
var _useAtom = useAtom(errorAtom),
|
|
2466
2459
|
errorState = _useAtom[0];
|
|
2467
2460
|
// const [, setLogsCallAPi] = useLogsCallAPi();
|
|
2468
|
-
var
|
|
2469
|
-
setCallApi =
|
|
2461
|
+
var _useApiCalling = useApiCalling(),
|
|
2462
|
+
setCallApi = _useApiCalling[1]; //single detail
|
|
2470
2463
|
// const [, setNoteLoadingStore] = UseNotesLoading();
|
|
2471
2464
|
var errorFound = function errorFound() {
|
|
2472
2465
|
var isError = errorState.w3wError.length > 0 || errorState.emailError.length > 0 || errorState.homeContactError.length > 0 || errorState.workCOntanctError.length > 0 || errorState.mobileError.length > 0 || errorState.postCodeError.length > 0;
|
|
@@ -2497,12 +2490,12 @@ function OrderDetailsFooter() {
|
|
|
2497
2490
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2498
2491
|
while (1) switch (_context.prev = _context.next) {
|
|
2499
2492
|
case 0:
|
|
2493
|
+
setCallApi(true);
|
|
2500
2494
|
payload = compareOrderDetailsStates(prevOrderDetails, orderDetails);
|
|
2501
|
-
_context.next =
|
|
2495
|
+
_context.next = 4;
|
|
2502
2496
|
return updateOrder([payload]);
|
|
2503
|
-
case
|
|
2497
|
+
case 4:
|
|
2504
2498
|
response = _context.sent;
|
|
2505
|
-
setCallApi(false);
|
|
2506
2499
|
// setLogsCallAPi(prev => !prev);
|
|
2507
2500
|
if (response && (response == null || (_response$data = response.data) == null ? void 0 : _response$data.length) > 0) {
|
|
2508
2501
|
setOrderDetails(response == null ? void 0 : response.data[0]);
|
|
@@ -3620,7 +3613,7 @@ var ReturnProductTable = function ReturnProductTable() {
|
|
|
3620
3613
|
if (isresponse && isresponse.data) {
|
|
3621
3614
|
notification.success({
|
|
3622
3615
|
message: 'Success',
|
|
3623
|
-
description: '
|
|
3616
|
+
description: 'Successfully Delete Order Product.'
|
|
3624
3617
|
});
|
|
3625
3618
|
handleRemoveRow();
|
|
3626
3619
|
setSelectedRowId(null);
|
|
@@ -3642,7 +3635,7 @@ var ReturnProductTable = function ReturnProductTable() {
|
|
|
3642
3635
|
if (selectAll) {
|
|
3643
3636
|
setSelectedProducts([]);
|
|
3644
3637
|
} else {
|
|
3645
|
-
var allProductIds = productData.map(function (product) {
|
|
3638
|
+
var allProductIds = productData == null ? void 0 : productData.map(function (product) {
|
|
3646
3639
|
return product.id;
|
|
3647
3640
|
});
|
|
3648
3641
|
setSelectedProducts(allProductIds);
|
|
@@ -3670,6 +3663,7 @@ var ReturnProductTable = function ReturnProductTable() {
|
|
|
3670
3663
|
});
|
|
3671
3664
|
return matchedReason ? matchedReason.label : 'N/A';
|
|
3672
3665
|
};
|
|
3666
|
+
var disableCheckbox = (productData == null ? void 0 : productData.length) == 0;
|
|
3673
3667
|
return React.createElement("div", null, loading && React.createElement(Loader, {
|
|
3674
3668
|
title: "Deleting"
|
|
3675
3669
|
}), React.createElement(StyledTableWrapper, {
|
|
@@ -3678,6 +3672,7 @@ var ReturnProductTable = function ReturnProductTable() {
|
|
|
3678
3672
|
}, React.createElement(StyledTable$1, null, React.createElement("thead", null, React.createElement("tr", null, React.createElement("th", {
|
|
3679
3673
|
className: "emailproductsCheckbox"
|
|
3680
3674
|
}, React.createElement(Checkbox$1, {
|
|
3675
|
+
disabled: disableCheckbox,
|
|
3681
3676
|
checked: selectAll,
|
|
3682
3677
|
onChange: handleSelectAll
|
|
3683
3678
|
})), React.createElement("th", null, "Location"), React.createElement("th", null, "Sender"), React.createElement("th", null, "Code"), React.createElement("th", null, "Description"), React.createElement("th", null, "Return Reason"), React.createElement("th", null, "Part"), React.createElement("th", null, "Action"))), React.createElement("tbody", null, productData && (productData == null ? void 0 : productData.length) > 0 ? productData == null ? void 0 : productData.map(function (product) {
|
|
@@ -3736,6 +3731,8 @@ var NewReturnDropdown = function NewReturnDropdown() {
|
|
|
3736
3731
|
var _useState3 = useState(),
|
|
3737
3732
|
idProduct = _useState3[0],
|
|
3738
3733
|
setId = _useState3[1];
|
|
3734
|
+
var _useOrderId = useOrderId(),
|
|
3735
|
+
orderId = _useOrderId[0];
|
|
3739
3736
|
var id = orderData == null ? void 0 : orderData.customer_id;
|
|
3740
3737
|
useEffect(function () {
|
|
3741
3738
|
var allProductIds = (productData == null ? void 0 : productData.map(function (product) {
|
|
@@ -3755,6 +3752,10 @@ var NewReturnDropdown = function NewReturnDropdown() {
|
|
|
3755
3752
|
field: 'status',
|
|
3756
3753
|
op: '!=',
|
|
3757
3754
|
value: 'SD'
|
|
3755
|
+
}, {
|
|
3756
|
+
field: 'id',
|
|
3757
|
+
op: '!=',
|
|
3758
|
+
value: orderId
|
|
3758
3759
|
}];
|
|
3759
3760
|
if ((idProduct == null ? void 0 : idProduct.length) > 0 && idProduct[0]) {
|
|
3760
3761
|
filters.push({
|
|
@@ -5435,7 +5436,11 @@ function NotesTable() {
|
|
|
5435
5436
|
fontWeight: 'bold',
|
|
5436
5437
|
textTransform: 'capitalize'
|
|
5437
5438
|
}
|
|
5438
|
-
}, order == null ? void 0 : order.created_by), React.createElement("div", null, format(new Date(order == null ? void 0 : order.created_at), "dd/MM/yyyy '@' HH:mm"))), React.createElement("td",
|
|
5439
|
+
}, order == null ? void 0 : order.created_by), React.createElement("div", null, format(new Date(order == null ? void 0 : order.created_at), "dd/MM/yyyy '@' HH:mm"))), React.createElement("td", {
|
|
5440
|
+
dangerouslySetInnerHTML: {
|
|
5441
|
+
__html: order == null ? void 0 : order.description
|
|
5442
|
+
}
|
|
5443
|
+
}));
|
|
5439
5444
|
})))));
|
|
5440
5445
|
}
|
|
5441
5446
|
var Title$4 = /*#__PURE__*/styled.h2(_templateObject$1m || (_templateObject$1m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #3a3630;\n font-family: 'Roboto', sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n text-transform: uppercase;\n padding: 0;\n margin: 0;\n"])));
|
|
@@ -5740,51 +5745,27 @@ function SendEmailModal() {
|
|
|
5740
5745
|
})));
|
|
5741
5746
|
}
|
|
5742
5747
|
|
|
5743
|
-
var
|
|
5744
|
-
|
|
5745
|
-
|
|
5748
|
+
var bjsMenu = [
|
|
5749
|
+
// {
|
|
5750
|
+
// label: 'Add Order Resources',
|
|
5751
|
+
// value: 'add-resources',
|
|
5752
|
+
// },
|
|
5753
|
+
{
|
|
5754
|
+
label: 'Split Order',
|
|
5755
|
+
value: 'split-order'
|
|
5756
|
+
}];
|
|
5757
|
+
var optionsMenu = [{
|
|
5758
|
+
label: 'Create Reminder',
|
|
5759
|
+
value: 'create-task'
|
|
5746
5760
|
}, {
|
|
5747
5761
|
label: 'Confirm',
|
|
5748
5762
|
value: 'confirm-order'
|
|
5749
5763
|
}, {
|
|
5750
|
-
label: '
|
|
5751
|
-
value: 'force-debrief'
|
|
5752
|
-
}, {
|
|
5753
|
-
label: 'Charge Log',
|
|
5754
|
-
value: 'charge-log'
|
|
5755
|
-
}, {
|
|
5756
|
-
label: 'Log Feedback',
|
|
5757
|
-
value: 'log-feedback'
|
|
5758
|
-
}, {
|
|
5759
|
-
label: 'On Hold',
|
|
5764
|
+
label: 'Hold',
|
|
5760
5765
|
value: 'hold-order'
|
|
5761
|
-
}, {
|
|
5762
|
-
label: 'Un Hold',
|
|
5763
|
-
value: 'unhold-order'
|
|
5764
|
-
}, {
|
|
5765
|
-
label: 'Change Customer Account',
|
|
5766
|
-
value: 'change-customer-account'
|
|
5767
|
-
}, {
|
|
5768
|
-
label: 'Proximity Report',
|
|
5769
|
-
value: 'promixity-report'
|
|
5770
|
-
}, {
|
|
5771
|
-
label: 'Raise Collection',
|
|
5772
|
-
value: 'raise-collection'
|
|
5773
|
-
}, {
|
|
5774
|
-
label: 'Remove from Route',
|
|
5775
|
-
value: 'remove-from-route'
|
|
5776
|
-
}, {
|
|
5777
|
-
label: 'Add New Flag',
|
|
5778
|
-
value: 'add-new-flag'
|
|
5779
|
-
}, {
|
|
5780
|
-
label: 'Un-Release Order',
|
|
5781
|
-
value: 'unrelease-order'
|
|
5782
5766
|
}, {
|
|
5783
5767
|
label: 'Cancel',
|
|
5784
5768
|
value: 'cancel-order'
|
|
5785
|
-
}, {
|
|
5786
|
-
label: 'Clear Booking Status',
|
|
5787
|
-
value: 'clear-booking-status'
|
|
5788
5769
|
}];
|
|
5789
5770
|
var PrintMenu = [{
|
|
5790
5771
|
label: 'Return Notes',
|
|
@@ -5818,7 +5799,7 @@ function ChangeCustomerAccModal() {
|
|
|
5818
5799
|
infoText: "632801 (OFS)",
|
|
5819
5800
|
submitBtnTitle: "Save Details"
|
|
5820
5801
|
}, React.createElement(ContentContainer$5, null, React.createElement(SplitLayout, null, React.createElement(Row$4, null, React.createElement(Label$d, null, "New Customer"), React.createElement(AntSelect, {
|
|
5821
|
-
options:
|
|
5802
|
+
options: optionsMenu,
|
|
5822
5803
|
placeholder: "Select Customer",
|
|
5823
5804
|
onChange: handleSelectChange,
|
|
5824
5805
|
disabled: false,
|
|
@@ -5830,7 +5811,7 @@ function ChangeCustomerAccModal() {
|
|
|
5830
5811
|
popupClassName: 'dropDownStyle',
|
|
5831
5812
|
selectWrapperClass: 'rounded'
|
|
5832
5813
|
})), React.createElement(Row$4, null, React.createElement(Label$d, null, "New Trading Name"), React.createElement(AntSelect, {
|
|
5833
|
-
options:
|
|
5814
|
+
options: optionsMenu,
|
|
5834
5815
|
placeholder: "Select Trading Name",
|
|
5835
5816
|
onChange: handleSelectChange,
|
|
5836
5817
|
disabled: false,
|
|
@@ -6312,20 +6293,71 @@ function ChargeLog() {
|
|
|
6312
6293
|
|
|
6313
6294
|
var _templateObject$1s;
|
|
6314
6295
|
var UnholdOrder = function UnholdOrder() {
|
|
6296
|
+
var _useOrderId = useOrderId(),
|
|
6297
|
+
orderId = _useOrderId[0];
|
|
6315
6298
|
var _useCurrentAction = useCurrentAction(),
|
|
6316
6299
|
setCurrentAction = _useCurrentAction[1];
|
|
6317
|
-
var
|
|
6318
|
-
|
|
6300
|
+
var _useOrderDetails = useOrderDetails(),
|
|
6301
|
+
setOrderDetails = _useOrderDetails[1];
|
|
6302
|
+
var _usePrevOrderDetails = usePrevOrderDetails(),
|
|
6303
|
+
setPrevOrderDetails = _usePrevOrderDetails[1];
|
|
6304
|
+
var _useLoading = useLoading(),
|
|
6305
|
+
setLoading = _useLoading[1];
|
|
6306
|
+
var _useApiHook = useApiHook({
|
|
6307
|
+
endpoint: "orders/" + orderId + "/unhold/?unhold_reason=\"unhold\"",
|
|
6308
|
+
method: 'POST',
|
|
6309
|
+
performAction: false
|
|
6310
|
+
}),
|
|
6311
|
+
response = _useApiHook.data,
|
|
6312
|
+
setPerformAction = _useApiHook.setShouldPerformAction;
|
|
6313
|
+
var _useApiHook2 = useApiHook({
|
|
6314
|
+
endpoint: "orders/" + orderId,
|
|
6315
|
+
method: 'GET',
|
|
6316
|
+
performAction: false
|
|
6317
|
+
}),
|
|
6318
|
+
fetchedData = _useApiHook2.data,
|
|
6319
|
+
loading = _useApiHook2.loading,
|
|
6320
|
+
setShouldPerformAction = _useApiHook2.setShouldPerformAction;
|
|
6321
|
+
useEffect(function () {
|
|
6322
|
+
var _fetchedData$data;
|
|
6323
|
+
setLoading(loading);
|
|
6324
|
+
if (fetchedData && fetchedData.data) {
|
|
6325
|
+
var requiredData = fetchedData == null ? void 0 : fetchedData.data;
|
|
6326
|
+
setOrderDetails(requiredData[0]);
|
|
6327
|
+
setPrevOrderDetails(requiredData[0]);
|
|
6328
|
+
setCurrentAction(undefined);
|
|
6329
|
+
}
|
|
6330
|
+
if (fetchedData && (fetchedData == null ? void 0 : fetchedData.data) === null || (fetchedData == null || (_fetchedData$data = fetchedData.data) == null ? void 0 : _fetchedData$data.length) === 0) {
|
|
6331
|
+
setCurrentAction(undefined);
|
|
6332
|
+
}
|
|
6333
|
+
}, [loading]);
|
|
6334
|
+
useEffect(function () {
|
|
6335
|
+
if (response) {
|
|
6336
|
+
//@ts-ignore
|
|
6337
|
+
if (response != null && response.data && (response == null ? void 0 : response.code) === 200) {
|
|
6338
|
+
setShouldPerformAction(true);
|
|
6339
|
+
} else {
|
|
6340
|
+
notification.error({
|
|
6341
|
+
message: 'Error',
|
|
6342
|
+
description:
|
|
6343
|
+
//@ts-ignore
|
|
6344
|
+
(response == null ? void 0 : response.error_traceback) || 'An error has occurred. Please try again later.'
|
|
6345
|
+
});
|
|
6346
|
+
setCurrentAction(undefined);
|
|
6347
|
+
}
|
|
6348
|
+
}
|
|
6349
|
+
}, [response]);
|
|
6319
6350
|
var saveButton = function saveButton() {
|
|
6320
|
-
|
|
6321
|
-
|
|
6351
|
+
if (orderId) {
|
|
6352
|
+
setPerformAction(true);
|
|
6353
|
+
}
|
|
6322
6354
|
};
|
|
6323
6355
|
var closeModal = function closeModal() {
|
|
6324
6356
|
setCurrentAction(undefined);
|
|
6325
6357
|
};
|
|
6326
6358
|
return React.createElement(CancelationModal, {
|
|
6327
|
-
title: "
|
|
6328
|
-
description: "Are you sure, you want to
|
|
6359
|
+
title: "Unhold Order",
|
|
6360
|
+
description: "Are you sure, you want to UnHold the Order?",
|
|
6329
6361
|
actions: React.createElement(CustomCancelAndCompleteAction, {
|
|
6330
6362
|
cancelLabel: "Cancel",
|
|
6331
6363
|
onCancel: closeModal,
|
|
@@ -8181,187 +8213,133 @@ var DetailsContainer = /*#__PURE__*/styled.div(_templateObject$1J || (_templateO
|
|
|
8181
8213
|
var Typo = /*#__PURE__*/styled.div(_templateObject2$1m || (_templateObject2$1m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 20px;\n font-style: normal;\n font-weight: 600;\n line-height: 32px; /* 160% */\n text-transform: uppercase;\n margin: 0;\n padding: 0;\n\n @media screen and (max-width: 1220px) {\n font-size: 14px;\n }\n"])));
|
|
8182
8214
|
|
|
8183
8215
|
var _templateObject$1K;
|
|
8184
|
-
|
|
8185
|
-
|
|
8186
|
-
var _templateObject$1L;
|
|
8187
|
-
var DropDownItem = function DropDownItem(_ref) {
|
|
8188
|
-
var label = _ref.label,
|
|
8189
|
-
icon = _ref.icon,
|
|
8190
|
-
onClick = _ref.onClick;
|
|
8191
|
-
return React.createElement(Flex$2, {
|
|
8192
|
-
onClick: onClick
|
|
8193
|
-
}, React.createElement("label", null, label), icon);
|
|
8194
|
-
};
|
|
8195
|
-
var Flex$2 = /*#__PURE__*/styled.div(_templateObject$1L || (_templateObject$1L = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n align-items: center;\n display: flex;\n position: relative;\n label {\n color: #3a3630;\n font-size: 14px;\n line-height: 18px;\n cursor: pointer;\n }\n"])));
|
|
8196
|
-
|
|
8197
|
-
var _templateObject$1M;
|
|
8198
|
-
var DropDownMenu = function DropDownMenu(_ref) {
|
|
8199
|
-
var options = _ref.options,
|
|
8200
|
-
onSelect = _ref.onSelect;
|
|
8201
|
-
return React.createElement(DropDownContent, null, options.map(function (option) {
|
|
8202
|
-
return React.createElement(DropDownItem, {
|
|
8203
|
-
key: option.value,
|
|
8204
|
-
label: option.label,
|
|
8205
|
-
icon: '',
|
|
8206
|
-
onClick: function onClick() {
|
|
8207
|
-
return onSelect(option.value);
|
|
8208
|
-
}
|
|
8209
|
-
});
|
|
8210
|
-
}));
|
|
8211
|
-
};
|
|
8212
|
-
var DropDownContent = /*#__PURE__*/styled.div(_templateObject$1M || (_templateObject$1M = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 173px;\n position: absolute;\n flex-direction: column;\n align-items: flex-start;\n gap: 7px;\n padding-left: 28px;\n top: 46px;\n background-color: white;\n border: 1px solid #ddd;\n box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);\n z-index: 1;\n border-radius: 10px;\n padding: 8px 8px 10px 16px;\n"])));
|
|
8213
|
-
|
|
8214
|
-
var DropDownLarge = function DropDownLarge() {
|
|
8215
|
-
return React.createElement("svg", {
|
|
8216
|
-
className: "arrowDown",
|
|
8217
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
8218
|
-
width: "24",
|
|
8219
|
-
height: "24",
|
|
8220
|
-
viewBox: "0 0 24 24",
|
|
8221
|
-
fill: "none"
|
|
8222
|
-
}, React.createElement("rect", {
|
|
8223
|
-
width: "24",
|
|
8224
|
-
height: "24",
|
|
8225
|
-
fill: "none"
|
|
8226
|
-
}), React.createElement("path", {
|
|
8227
|
-
opacity: "0.4",
|
|
8228
|
-
fillRule: "evenodd",
|
|
8229
|
-
clipRule: "evenodd",
|
|
8230
|
-
d: "M6.69128 9.8912C6.82628 9.75637 7.00928 9.68063 7.20008 9.68063C7.39088 9.68063 7.57388 9.75637 7.70888 9.8912L12.0001 14.1824L16.2913 9.8912C16.4278 9.76402 16.6083 9.69478 16.7948 9.69807C16.9814 9.70136 17.1593 9.77693 17.2912 9.90884C17.4232 10.0408 17.4987 10.2187 17.502 10.4053C17.5053 10.5918 17.4361 10.7723 17.3089 10.9088L12.5089 15.7088C12.3739 15.8436 12.1909 15.9194 12.0001 15.9194C11.8093 15.9194 11.6263 15.8436 11.4913 15.7088L6.69128 10.9088C6.55645 10.7738 6.48071 10.5908 6.48071 10.4C6.48071 10.2092 6.55645 10.0262 6.69128 9.8912Z",
|
|
8231
|
-
fill: "#3A3630"
|
|
8232
|
-
}));
|
|
8233
|
-
};
|
|
8234
|
-
|
|
8235
|
-
var Options = [{
|
|
8236
|
-
label: 'Create Reminder',
|
|
8237
|
-
value: 'create-task'
|
|
8238
|
-
}, {
|
|
8239
|
-
label: 'Confirm',
|
|
8240
|
-
value: 'confirm-order'
|
|
8241
|
-
},
|
|
8242
|
-
// { label: 'Force Debrief', value: 'force-debrief' },
|
|
8243
|
-
// { label: 'Clear Booking Status', value: 'booking-status' },
|
|
8244
|
-
// { label: 'Remove From Route', value: 'remove-route' },
|
|
8245
|
-
{
|
|
8246
|
-
label: 'Hold',
|
|
8247
|
-
value: 'hold-order'
|
|
8248
|
-
},
|
|
8249
|
-
// { label: 'Flag', value: 'view-flag' },
|
|
8250
|
-
{
|
|
8251
|
-
label: 'Cancel',
|
|
8252
|
-
value: 'cancel-order'
|
|
8253
|
-
}, {
|
|
8254
|
-
label: 'Charge Log',
|
|
8255
|
-
value: 'charge-log'
|
|
8256
|
-
}];
|
|
8257
|
-
var OptionsDropDown = function OptionsDropDown() {
|
|
8258
|
-
var _useState = useState(false),
|
|
8259
|
-
isOpen = _useState[0],
|
|
8260
|
-
setIsOpen = _useState[1];
|
|
8261
|
-
var dropdownRef = useRef(null);
|
|
8216
|
+
function Options() {
|
|
8262
8217
|
var _useCurrentAction = useCurrentAction(),
|
|
8263
8218
|
setCurrentAction = _useCurrentAction[1];
|
|
8264
|
-
var
|
|
8265
|
-
|
|
8266
|
-
// console.log(action, 'action');
|
|
8267
|
-
var handleClick = function handleClick() {
|
|
8268
|
-
setIsOpen(function (prev) {
|
|
8269
|
-
return !prev;
|
|
8270
|
-
});
|
|
8219
|
+
var handleSelectChange = function handleSelectChange(selectedOption) {
|
|
8220
|
+
setCurrentAction(selectedOption.value);
|
|
8271
8221
|
};
|
|
8272
|
-
var
|
|
8273
|
-
|
|
8274
|
-
|
|
8275
|
-
|
|
8276
|
-
|
|
8222
|
+
var _useOrderDetails = useOrderDetails(),
|
|
8223
|
+
orderDetails = _useOrderDetails[0];
|
|
8224
|
+
var isOrderOnHold = (orderDetails == null ? void 0 : orderDetails.status) === 'OO';
|
|
8225
|
+
var isOrderCancelled = (orderDetails == null ? void 0 : orderDetails.status) === 'CO';
|
|
8226
|
+
var filteredOptions = optionsMenu.filter(function (option) {
|
|
8227
|
+
var shouldExclude = false;
|
|
8228
|
+
if (isOrderOnHold && option.value === 'hold-order') {
|
|
8229
|
+
shouldExclude = true;
|
|
8230
|
+
}
|
|
8231
|
+
if (isOrderCancelled && option.value === 'cancel-order') {
|
|
8232
|
+
shouldExclude = true;
|
|
8233
|
+
}
|
|
8234
|
+
if (!isOrderCancelled || isOrderOnHold) {
|
|
8235
|
+
if (option.value === 'uncancel-order') {
|
|
8236
|
+
shouldExclude = true;
|
|
8237
|
+
}
|
|
8277
8238
|
}
|
|
8239
|
+
if (!isOrderOnHold && option.value === 'unhold-order') {
|
|
8240
|
+
shouldExclude = true;
|
|
8241
|
+
}
|
|
8242
|
+
return !shouldExclude;
|
|
8278
8243
|
});
|
|
8279
|
-
|
|
8280
|
-
|
|
8281
|
-
|
|
8282
|
-
};
|
|
8283
|
-
useEffect(function () {
|
|
8284
|
-
var handleClickOutside = function handleClickOutside(event) {
|
|
8285
|
-
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
8286
|
-
setIsOpen(false);
|
|
8287
|
-
}
|
|
8288
|
-
};
|
|
8289
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
8290
|
-
return function () {
|
|
8291
|
-
document.removeEventListener('mousedown', handleClickOutside);
|
|
8292
|
-
};
|
|
8293
|
-
}, []);
|
|
8294
|
-
return React.createElement(DropDownContainer$1, {
|
|
8295
|
-
ref: dropdownRef
|
|
8296
|
-
}, React.createElement(DropDownItem, {
|
|
8297
|
-
label: "Options",
|
|
8298
|
-
icon: React.createElement(DropDownLarge, null),
|
|
8299
|
-
onClick: handleClick
|
|
8300
|
-
}), isOpen && React.createElement(DropDownMenu, {
|
|
8244
|
+
return React.createElement(Option, null, React.createElement(SelectDropdown, {
|
|
8245
|
+
placeholder: "OPTIONS",
|
|
8246
|
+
inputId: "bjsmenu",
|
|
8301
8247
|
options: filteredOptions,
|
|
8302
|
-
|
|
8248
|
+
onChange: handleSelectChange,
|
|
8249
|
+
isSearchable: false,
|
|
8250
|
+
styles: _extends({}, dropdownStyles, filterDropdownStyles, {
|
|
8251
|
+
container: function container(styles) {
|
|
8252
|
+
return _extends({}, styles, {
|
|
8253
|
+
cursor: 'pointer'
|
|
8254
|
+
});
|
|
8255
|
+
},
|
|
8256
|
+
menu: function menu(styles) {
|
|
8257
|
+
return _extends({}, styles, {
|
|
8258
|
+
top: '113%',
|
|
8259
|
+
borderRadius: '5px',
|
|
8260
|
+
width: 'max-content',
|
|
8261
|
+
cursor: 'pointer'
|
|
8262
|
+
});
|
|
8263
|
+
},
|
|
8264
|
+
control: function control(styles) {
|
|
8265
|
+
return _extends({}, styles, {
|
|
8266
|
+
width: '105px',
|
|
8267
|
+
boxShadow: 'none',
|
|
8268
|
+
borderColor: 'transparent',
|
|
8269
|
+
cursor: 'pointer',
|
|
8270
|
+
backgroundColor: 'transparent',
|
|
8271
|
+
'&:hover': {
|
|
8272
|
+
boxShadow: 'none',
|
|
8273
|
+
borderColor: 'transparent'
|
|
8274
|
+
}
|
|
8275
|
+
});
|
|
8276
|
+
}
|
|
8277
|
+
}),
|
|
8278
|
+
value: "OPTIONS"
|
|
8303
8279
|
}));
|
|
8304
|
-
}
|
|
8280
|
+
}
|
|
8281
|
+
var Option = /*#__PURE__*/styled.div(_templateObject$1K || (_templateObject$1K = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
8305
8282
|
|
|
8306
|
-
|
|
8307
|
-
|
|
8308
|
-
{
|
|
8309
|
-
label: 'Split Order ',
|
|
8310
|
-
value: 'split-order'
|
|
8311
|
-
}];
|
|
8312
|
-
var MenuDropDown = function MenuDropDown() {
|
|
8313
|
-
var _useState = useState(false),
|
|
8314
|
-
isOpen = _useState[0],
|
|
8315
|
-
setIsOpen = _useState[1];
|
|
8316
|
-
var dropdownRef = useRef(null);
|
|
8283
|
+
function BjsMenu() {
|
|
8284
|
+
var _orderStatus$;
|
|
8317
8285
|
var _useCurrentAction = useCurrentAction(),
|
|
8318
8286
|
setCurrentAction = _useCurrentAction[1];
|
|
8319
|
-
var
|
|
8320
|
-
|
|
8321
|
-
return !prev;
|
|
8322
|
-
});
|
|
8323
|
-
};
|
|
8324
|
-
var handleSelect = function handleSelect(selectedOption) {
|
|
8325
|
-
setCurrentAction(selectedOption);
|
|
8326
|
-
setIsOpen(false);
|
|
8287
|
+
var handleSelectChange = function handleSelectChange(selectedOption) {
|
|
8288
|
+
setCurrentAction(selectedOption.value);
|
|
8327
8289
|
};
|
|
8328
|
-
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
|
|
8290
|
+
var _useStatusDetails = useStatusDetails(),
|
|
8291
|
+
orderStatus = _useStatusDetails[0];
|
|
8292
|
+
var isReleased = (_orderStatus$ = orderStatus[0]) == null ? void 0 : _orderStatus$.released;
|
|
8293
|
+
var filteredOptions = bjsMenu.filter(function (option) {
|
|
8294
|
+
if (isReleased) {
|
|
8295
|
+
return option.value !== 'release-order';
|
|
8296
|
+
} else {
|
|
8297
|
+
return option;
|
|
8298
|
+
}
|
|
8299
|
+
});
|
|
8300
|
+
return React.createElement(SelectDropdown, {
|
|
8301
|
+
placeholder: "BJS MENU",
|
|
8302
|
+
inputId: "bjsmenu",
|
|
8303
|
+
options: filteredOptions,
|
|
8304
|
+
onChange: handleSelectChange,
|
|
8305
|
+
isSearchable: false,
|
|
8306
|
+
styles: _extends({}, dropdownStyles, filterDropdownStyles, {
|
|
8307
|
+
container: function container(styles) {
|
|
8308
|
+
return _extends({}, styles, {
|
|
8309
|
+
cursor: 'pointer'
|
|
8310
|
+
});
|
|
8311
|
+
},
|
|
8312
|
+
menu: function menu(styles) {
|
|
8313
|
+
return _extends({}, styles, {
|
|
8314
|
+
top: '113%',
|
|
8315
|
+
borderRadius: '5px',
|
|
8316
|
+
width: 'max-content',
|
|
8317
|
+
cursor: 'pointer'
|
|
8318
|
+
});
|
|
8319
|
+
},
|
|
8320
|
+
control: function control(styles) {
|
|
8321
|
+
return _extends({}, styles, {
|
|
8322
|
+
width: '105px',
|
|
8323
|
+
boxShadow: 'none',
|
|
8324
|
+
borderColor: 'transparent',
|
|
8325
|
+
cursor: 'pointer',
|
|
8326
|
+
backgroundColor: 'transparent',
|
|
8327
|
+
'&:hover': {
|
|
8328
|
+
boxShadow: 'none',
|
|
8329
|
+
borderColor: 'transparent'
|
|
8330
|
+
}
|
|
8331
|
+
});
|
|
8332
8332
|
}
|
|
8333
|
-
}
|
|
8334
|
-
|
|
8335
|
-
|
|
8336
|
-
|
|
8337
|
-
};
|
|
8338
|
-
}, []);
|
|
8339
|
-
return React.createElement(DropDownContainer$1, {
|
|
8340
|
-
ref: dropdownRef
|
|
8341
|
-
}, React.createElement(DropDownItem, {
|
|
8342
|
-
label: "BJS MENU",
|
|
8343
|
-
icon: React.createElement(DropDownLarge, null),
|
|
8344
|
-
onClick: handleClick
|
|
8345
|
-
}), isOpen && React.createElement(DropDownMenu, {
|
|
8346
|
-
options: Options$1,
|
|
8347
|
-
onSelect: handleSelect
|
|
8348
|
-
}));
|
|
8349
|
-
};
|
|
8333
|
+
}),
|
|
8334
|
+
value: "BJS MENU"
|
|
8335
|
+
});
|
|
8336
|
+
}
|
|
8350
8337
|
|
|
8338
|
+
var _templateObject$1L;
|
|
8351
8339
|
function Print() {
|
|
8352
8340
|
var _useOrderDetails = useOrderDetails(),
|
|
8353
8341
|
orderDetails = _useOrderDetails[0];
|
|
8354
8342
|
var gsitId = orderDetails == null ? void 0 : orderDetails.gsit_order_id;
|
|
8355
|
-
var dropdownRef = useRef(null);
|
|
8356
|
-
// console.log(gsitId, 'gsitId');
|
|
8357
|
-
var _useState = useState(false),
|
|
8358
|
-
isOpen = _useState[0],
|
|
8359
|
-
setIsOpen = _useState[1];
|
|
8360
|
-
var handleClick = function handleClick() {
|
|
8361
|
-
setIsOpen(function (prev) {
|
|
8362
|
-
return !prev;
|
|
8363
|
-
});
|
|
8364
|
-
};
|
|
8365
8343
|
var getEnvironment = function getEnvironment() {
|
|
8366
8344
|
console.log('project env', process.env.REACT_APP_API_PATH);
|
|
8367
8345
|
return process.env.REACT_APP_API_PATH === 'https://us.dms.api.bjshomedelivery.com' ? 'us' : 'development';
|
|
@@ -8377,68 +8355,94 @@ function Print() {
|
|
|
8377
8355
|
if (val === 'Proof Of Delivery') {
|
|
8378
8356
|
return '';
|
|
8379
8357
|
}
|
|
8380
|
-
if (val === '
|
|
8358
|
+
if (val === 'proofofdelivery(doc)') {
|
|
8381
8359
|
return '';
|
|
8382
8360
|
}
|
|
8383
|
-
if (val === '
|
|
8361
|
+
if (val === 'orderdeliverylabels') {
|
|
8384
8362
|
return baseUrl + "/generate_labels?pdf=true&product_type=Deliver&order_id=" + gsitId;
|
|
8385
8363
|
}
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
else {
|
|
8364
|
+
if (val === 'ordercollectionlabels') {
|
|
8365
|
+
return baseUrl + "/generate_labels?pdf=true&product_type=Collect&order_id=" + gsitId;
|
|
8366
|
+
}
|
|
8367
|
+
if (val === 'orderreturnlabels') {
|
|
8368
|
+
return baseUrl + "/generate_labels?pdf=true&product_type=Return&order_id=" + gsitId;
|
|
8369
|
+
}
|
|
8370
|
+
if (val === 'returnscovernote') {
|
|
8371
|
+
return '';
|
|
8372
|
+
} else {
|
|
8396
8373
|
return '';
|
|
8397
8374
|
}
|
|
8398
8375
|
};
|
|
8399
8376
|
var handleSelectChange = function handleSelectChange(selectedOption) {
|
|
8377
|
+
console.log(selectedOption);
|
|
8400
8378
|
var selectedValue = selectedOption == null ? void 0 : selectedOption.value;
|
|
8401
|
-
console.log(selectedValue, 'erf');
|
|
8402
8379
|
if (selectedValue) {
|
|
8403
8380
|
console.log(selectedValue);
|
|
8404
8381
|
var url = getUrl(selectedValue);
|
|
8405
8382
|
console.log('Generated URL:', url);
|
|
8383
|
+
// You can navigate to the URL or handle it further here
|
|
8406
8384
|
window.open(url, '_blank');
|
|
8407
8385
|
}
|
|
8408
8386
|
};
|
|
8409
|
-
return React.createElement(
|
|
8410
|
-
|
|
8411
|
-
}, React.createElement(DropDownItem, {
|
|
8412
|
-
label: "PRINT",
|
|
8413
|
-
icon: React.createElement(DropDownLarge, null),
|
|
8414
|
-
onClick: handleClick
|
|
8415
|
-
}), isOpen && React.createElement(DropDownMenu, {
|
|
8387
|
+
return React.createElement(Container$13, null, React.createElement(SelectDropdown, {
|
|
8388
|
+
placeholder: "PRINT",
|
|
8416
8389
|
options: PrintMenu,
|
|
8417
|
-
|
|
8390
|
+
value: "PRINT",
|
|
8391
|
+
isSearchable: false,
|
|
8392
|
+
onChange: handleSelectChange,
|
|
8393
|
+
styles: _extends({}, dropdownStyles, filterDropdownStyles, {
|
|
8394
|
+
container: function container(styles) {
|
|
8395
|
+
return _extends({}, styles, {
|
|
8396
|
+
cursor: 'pointer'
|
|
8397
|
+
});
|
|
8398
|
+
},
|
|
8399
|
+
menu: function menu(styles) {
|
|
8400
|
+
return _extends({}, styles, {
|
|
8401
|
+
top: '113%',
|
|
8402
|
+
borderRadius: '5px',
|
|
8403
|
+
width: 'max-content',
|
|
8404
|
+
cursor: 'pointer'
|
|
8405
|
+
});
|
|
8406
|
+
},
|
|
8407
|
+
control: function control(styles) {
|
|
8408
|
+
return _extends({}, styles, {
|
|
8409
|
+
width: '90px',
|
|
8410
|
+
boxShadow: 'none',
|
|
8411
|
+
borderColor: 'transparent',
|
|
8412
|
+
cursor: 'pointer',
|
|
8413
|
+
backgroundColor: 'transparent',
|
|
8414
|
+
'&:hover': {
|
|
8415
|
+
boxShadow: 'none',
|
|
8416
|
+
borderColor: 'transparent'
|
|
8417
|
+
}
|
|
8418
|
+
});
|
|
8419
|
+
}
|
|
8420
|
+
})
|
|
8418
8421
|
}));
|
|
8419
8422
|
}
|
|
8423
|
+
var Container$13 = /*#__PURE__*/styled.div(_templateObject$1L || (_templateObject$1L = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
8420
8424
|
|
|
8421
|
-
var _templateObject$
|
|
8425
|
+
var _templateObject$1M;
|
|
8422
8426
|
// components
|
|
8423
8427
|
function DropDowns$1() {
|
|
8424
|
-
return React.createElement(React.Fragment, null, React.createElement(DashBoardWrapper, null, React.createElement(
|
|
8428
|
+
return React.createElement(React.Fragment, null, React.createElement(DashBoardWrapper, null, React.createElement(BjsMenu, null), React.createElement(Options, null), React.createElement(Print, null)));
|
|
8425
8429
|
}
|
|
8426
|
-
var DashBoardWrapper = /*#__PURE__*/styled.section(_templateObject$
|
|
8430
|
+
var DashBoardWrapper = /*#__PURE__*/styled.section(_templateObject$1M || (_templateObject$1M = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 0 5px;\n display: flex;\n align-self: center;\n gap: 10px;\n"])));
|
|
8427
8431
|
|
|
8428
|
-
var _templateObject$
|
|
8432
|
+
var _templateObject$1N;
|
|
8429
8433
|
// import Actions from './actions/Actions';
|
|
8430
8434
|
var ActionsMenu = function ActionsMenu() {
|
|
8431
|
-
return React.createElement(Flex$
|
|
8435
|
+
return React.createElement(Flex$2, null, React.createElement(DropDowns$1, null));
|
|
8432
8436
|
};
|
|
8433
|
-
var Flex$
|
|
8437
|
+
var Flex$2 = /*#__PURE__*/styled.div(_templateObject$1N || (_templateObject$1N = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n display: flex;\n height: 34px;\n padding: 1px;\n align-items: flex-start;\n border-radius: 20px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: #f0f2f2;\n cursor: pointer;\n"])));
|
|
8434
8438
|
|
|
8435
|
-
var _templateObject$
|
|
8439
|
+
var _templateObject$1O;
|
|
8436
8440
|
var DetailsFilters = function DetailsFilters() {
|
|
8437
|
-
return React.createElement(Flex$
|
|
8441
|
+
return React.createElement(Flex$3, null, React.createElement(Details, null), React.createElement(ActionsMenu, null));
|
|
8438
8442
|
};
|
|
8439
|
-
var Flex$
|
|
8443
|
+
var Flex$3 = /*#__PURE__*/styled.div(_templateObject$1O || (_templateObject$1O = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 40px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: linear-gradient(180deg, #fff 0%, #f9fcff 100%);\n\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n /* z-index: 9999; */\n display: flex;\n padding: 10px;\n flex-direction: row;\n gap: 10px;\n align-self: stretch;\n position: relative;\n margin-bottom: -71px;\n width: 97%;\n margin-left: 21px;\n top: -132px;\n justify-content: space-between;\n"])));
|
|
8440
8444
|
|
|
8441
|
-
var _templateObject$
|
|
8445
|
+
var _templateObject$1P, _templateObject2$1n, _templateObject3$O, _templateObject4$s;
|
|
8442
8446
|
function OrderView() {
|
|
8443
8447
|
notification.config({
|
|
8444
8448
|
top: 150
|
|
@@ -8449,13 +8453,6 @@ function OrderView() {
|
|
|
8449
8453
|
var _useGsitOrderId = useGsitOrderId(),
|
|
8450
8454
|
gsitOrderId = _useGsitOrderId[0],
|
|
8451
8455
|
setGsitOrderId = _useGsitOrderId[1];
|
|
8452
|
-
var splitPath = function splitPath(str) {
|
|
8453
|
-
var _str$split;
|
|
8454
|
-
var parts = str == null || (_str$split = str.split('/')) == null ? void 0 : _str$split.filter(function (part) {
|
|
8455
|
-
return part !== '';
|
|
8456
|
-
}); // Filter out empty parts
|
|
8457
|
-
return parts;
|
|
8458
|
-
};
|
|
8459
8456
|
// For API Call
|
|
8460
8457
|
var _useOrderDetails = useOrderDetails(),
|
|
8461
8458
|
orderDetails = _useOrderDetails[0],
|
|
@@ -8472,12 +8469,8 @@ function OrderView() {
|
|
|
8472
8469
|
setDepotOptions = _useDepotOptions[1];
|
|
8473
8470
|
var _useCustomerInfo = useCustomerInfo(),
|
|
8474
8471
|
setCustomerInfo = _useCustomerInfo[1];
|
|
8475
|
-
var location = useLocation();
|
|
8476
|
-
var paths = splitPath(location.pathname);
|
|
8477
8472
|
var _useLocationOptions = useLocationOptions(),
|
|
8478
8473
|
setLocationOptions = _useLocationOptions[1];
|
|
8479
|
-
var _useUpdateApiCall = useUpdateApiCall(),
|
|
8480
|
-
apiCalling = _useUpdateApiCall[0];
|
|
8481
8474
|
var _useOrderProductsReso = useOrderProductsResources(),
|
|
8482
8475
|
orderResources = _useOrderProductsReso[0],
|
|
8483
8476
|
setOrderResources = _useOrderProductsReso[1];
|
|
@@ -8496,30 +8489,83 @@ function OrderView() {
|
|
|
8496
8489
|
var _useLiveRecalling = useLiveRecalling(),
|
|
8497
8490
|
liveRecalling = _useLiveRecalling[0];
|
|
8498
8491
|
var systemLogsData = useSystemLogs();
|
|
8492
|
+
var _useAssignData = useAssignData(),
|
|
8493
|
+
setAssignData = _useAssignData[1];
|
|
8494
|
+
// query param
|
|
8495
|
+
var location = useLocation();
|
|
8496
|
+
var _useState2 = useState([]),
|
|
8497
|
+
filters = _useState2[0],
|
|
8498
|
+
setFilters = _useState2[1];
|
|
8499
|
+
// for third party apps
|
|
8499
8500
|
var _useApiHook = useApiHook({
|
|
8500
|
-
endpoint: "orders/"
|
|
8501
|
+
endpoint: "orders/",
|
|
8501
8502
|
method: 'GET',
|
|
8503
|
+
filters: filters,
|
|
8502
8504
|
performAction: false
|
|
8503
8505
|
}),
|
|
8504
|
-
|
|
8505
|
-
|
|
8506
|
-
|
|
8506
|
+
fetchedDataExternal = _useApiHook.data,
|
|
8507
|
+
loadingExternal = _useApiHook.loading,
|
|
8508
|
+
setShouldPerformExternal = _useApiHook.setShouldPerformAction;
|
|
8509
|
+
useEffect(function () {
|
|
8510
|
+
var searchParams = new URLSearchParams(location.search);
|
|
8511
|
+
if (searchParams != null && searchParams.toString()) {
|
|
8512
|
+
var dynamicFilters = [];
|
|
8513
|
+
searchParams == null || searchParams.forEach(function (value, key) {
|
|
8514
|
+
if (key === 'order') {
|
|
8515
|
+
dynamicFilters.push({
|
|
8516
|
+
field: 'gsit_order_id',
|
|
8517
|
+
op: '=',
|
|
8518
|
+
value: value
|
|
8519
|
+
});
|
|
8520
|
+
} else {
|
|
8521
|
+
dynamicFilters.push({
|
|
8522
|
+
field: key,
|
|
8523
|
+
op: '=',
|
|
8524
|
+
value: value
|
|
8525
|
+
});
|
|
8526
|
+
}
|
|
8527
|
+
});
|
|
8528
|
+
setFilters(dynamicFilters);
|
|
8529
|
+
if (filters) {
|
|
8530
|
+
var _fetchedDataExternal$;
|
|
8531
|
+
setShouldPerformExternal(true);
|
|
8532
|
+
setOrderId(fetchedDataExternal == null || (_fetchedDataExternal$ = fetchedDataExternal.data[0]) == null ? void 0 : _fetchedDataExternal$.id);
|
|
8533
|
+
}
|
|
8534
|
+
} else {
|
|
8535
|
+
var paths = location.pathname.split('/');
|
|
8536
|
+
setOrderId(paths[paths.length - 1]);
|
|
8537
|
+
}
|
|
8538
|
+
}, [location.search, loadingExternal]);
|
|
8507
8539
|
var _useApiHook2 = useApiHook({
|
|
8540
|
+
endpoint: "orders/" + orderId,
|
|
8541
|
+
method: 'GET',
|
|
8542
|
+
performAction: false
|
|
8543
|
+
}),
|
|
8544
|
+
fetchedData = _useApiHook2.data,
|
|
8545
|
+
loading = _useApiHook2.loading,
|
|
8546
|
+
orderUpdate = _useApiHook2.setShouldPerformAction;
|
|
8547
|
+
useEffect(function () {
|
|
8548
|
+
if (orderId) {
|
|
8549
|
+
orderUpdate(true);
|
|
8550
|
+
liveRecalling ? setLivePerformAction(false) : setLivePerformAction(true);
|
|
8551
|
+
}
|
|
8552
|
+
}, [orderId, liveRecalling]);
|
|
8553
|
+
var _useApiHook3 = useApiHook({
|
|
8508
8554
|
endpoint: "/orders/getStaticData/all/",
|
|
8509
8555
|
method: 'GET'
|
|
8510
8556
|
}),
|
|
8511
|
-
fetchedStaticData =
|
|
8512
|
-
staticDataLoading =
|
|
8557
|
+
fetchedStaticData = _useApiHook3.data,
|
|
8558
|
+
staticDataLoading = _useApiHook3.loading;
|
|
8513
8559
|
//Order status api
|
|
8514
|
-
var
|
|
8560
|
+
var _useApiHook4 = useApiHook({
|
|
8515
8561
|
endpoint: "/orders/get_live_status/" + orderId,
|
|
8516
8562
|
method: 'GET',
|
|
8517
8563
|
performAction: false
|
|
8518
8564
|
}),
|
|
8519
|
-
fetchedStatusData =
|
|
8520
|
-
statusDataLoading =
|
|
8521
|
-
setLivePerformAction =
|
|
8522
|
-
var
|
|
8565
|
+
fetchedStatusData = _useApiHook4.data,
|
|
8566
|
+
statusDataLoading = _useApiHook4.loading,
|
|
8567
|
+
setLivePerformAction = _useApiHook4.setShouldPerformAction;
|
|
8568
|
+
var _useApiHook5 = useApiHook({
|
|
8523
8569
|
endpoint: "/depot/",
|
|
8524
8570
|
method: 'GET',
|
|
8525
8571
|
filters: [{
|
|
@@ -8528,32 +8574,17 @@ function OrderView() {
|
|
|
8528
8574
|
value: true
|
|
8529
8575
|
}]
|
|
8530
8576
|
}),
|
|
8531
|
-
fetchedDepotData =
|
|
8532
|
-
depotDataLoading =
|
|
8533
|
-
useEffect(function () {
|
|
8534
|
-
if (orderId) {
|
|
8535
|
-
orderUpdate(true);
|
|
8536
|
-
liveRecalling ? setLivePerformAction(false) : setLivePerformAction(true);
|
|
8537
|
-
}
|
|
8538
|
-
}, [orderId, liveRecalling]);
|
|
8539
|
-
useEffect(function () {
|
|
8540
|
-
orderUpdate(true);
|
|
8541
|
-
apiCalling ? orderUpdate(true) : orderUpdate(false);
|
|
8542
|
-
}, [apiCalling]);
|
|
8543
|
-
useEffect(function () {
|
|
8544
|
-
if (paths.length > 1) {
|
|
8545
|
-
setOrderId(paths[2]);
|
|
8546
|
-
}
|
|
8547
|
-
// for local
|
|
8548
|
-
// if (paths.length >= 0) {
|
|
8549
|
-
// setOrderId(paths[1]);
|
|
8550
|
-
// }
|
|
8551
|
-
}, [paths]);
|
|
8577
|
+
fetchedDepotData = _useApiHook5.data,
|
|
8578
|
+
depotDataLoading = _useApiHook5.loading;
|
|
8552
8579
|
useEffect(function () {
|
|
8553
8580
|
setLoading(staticDataLoading);
|
|
8554
8581
|
if (fetchedStaticData && fetchedStaticData.data) {
|
|
8582
|
+
var _fetchedStaticData$da;
|
|
8555
8583
|
var result = fetchedStaticData == null ? void 0 : fetchedStaticData.data;
|
|
8556
8584
|
setOrderStaticData(result[0]);
|
|
8585
|
+
setAssignData(fetchedStaticData == null || (_fetchedStaticData$da = fetchedStaticData.data) == null ? void 0 : _fetchedStaticData$da.flatMap(function (i) {
|
|
8586
|
+
return i == null ? void 0 : i.resource_visibility_type;
|
|
8587
|
+
}));
|
|
8557
8588
|
}
|
|
8558
8589
|
}, [staticDataLoading]);
|
|
8559
8590
|
useEffect(function () {
|
|
@@ -8585,7 +8616,7 @@ function OrderView() {
|
|
|
8585
8616
|
}
|
|
8586
8617
|
}
|
|
8587
8618
|
return function () {
|
|
8588
|
-
setOrderId(null);
|
|
8619
|
+
// setOrderId(null);
|
|
8589
8620
|
};
|
|
8590
8621
|
}, [statusDataLoading, fetchedStatusData]);
|
|
8591
8622
|
useEffect(function () {
|
|
@@ -8605,17 +8636,17 @@ function OrderView() {
|
|
|
8605
8636
|
}
|
|
8606
8637
|
}
|
|
8607
8638
|
return function () {
|
|
8608
|
-
setOrderId(null);
|
|
8639
|
+
// setOrderId(null);
|
|
8609
8640
|
};
|
|
8610
8641
|
}, [depotDataLoading]);
|
|
8611
8642
|
// Order resources
|
|
8612
|
-
var
|
|
8643
|
+
var _useApiHook6 = useApiHook({
|
|
8613
8644
|
endpoint: "/orders/" + orderId + "/order_resources/",
|
|
8614
8645
|
method: 'GET',
|
|
8615
8646
|
performAction: false
|
|
8616
8647
|
}),
|
|
8617
|
-
fetchedResourcesData =
|
|
8618
|
-
setActions =
|
|
8648
|
+
fetchedResourcesData = _useApiHook6.data,
|
|
8649
|
+
setActions = _useApiHook6.setShouldPerformAction;
|
|
8619
8650
|
useEffect(function () {
|
|
8620
8651
|
if (orderId) {
|
|
8621
8652
|
setActions(true);
|
|
@@ -8626,17 +8657,17 @@ function OrderView() {
|
|
|
8626
8657
|
setOrderResources(fetchedResourcesData);
|
|
8627
8658
|
}
|
|
8628
8659
|
return function () {
|
|
8629
|
-
setOrderId(null);
|
|
8660
|
+
// setOrderId(null);
|
|
8630
8661
|
};
|
|
8631
8662
|
}, [fetchedResourcesData, orderResources, setOrderResources]);
|
|
8632
8663
|
// Toolbox resources
|
|
8633
|
-
var
|
|
8664
|
+
var _useApiHook7 = useApiHook({
|
|
8634
8665
|
endpoint: "/orders/" + orderId + "/toolbox_resources/",
|
|
8635
8666
|
method: 'GET',
|
|
8636
8667
|
performAction: false
|
|
8637
8668
|
}),
|
|
8638
|
-
fetchedToolboxData =
|
|
8639
|
-
setAction =
|
|
8669
|
+
fetchedToolboxData = _useApiHook7.data,
|
|
8670
|
+
setAction = _useApiHook7.setShouldPerformAction;
|
|
8640
8671
|
useEffect(function () {
|
|
8641
8672
|
if (orderId) {
|
|
8642
8673
|
setAction(true);
|
|
@@ -8647,16 +8678,9 @@ function OrderView() {
|
|
|
8647
8678
|
setOrderToolbox(fetchedToolboxData);
|
|
8648
8679
|
}
|
|
8649
8680
|
return function () {
|
|
8650
|
-
setOrderId(undefined);
|
|
8681
|
+
// setOrderId(undefined);
|
|
8651
8682
|
};
|
|
8652
8683
|
}, [fetchedToolboxData, orderToolbox, setOrderToolbox]);
|
|
8653
|
-
useEffect(function () {
|
|
8654
|
-
if (GsitCUstomerId != null && GsitCUstomerId.id) {
|
|
8655
|
-
shouldFetch(true);
|
|
8656
|
-
} else {
|
|
8657
|
-
shouldFetch(false);
|
|
8658
|
-
}
|
|
8659
|
-
}, [GsitCUstomerId]);
|
|
8660
8684
|
useEffect(function () {
|
|
8661
8685
|
return function () {
|
|
8662
8686
|
setGsitCUstomerId(function (prev) {
|
|
@@ -8666,14 +8690,21 @@ function OrderView() {
|
|
|
8666
8690
|
});
|
|
8667
8691
|
};
|
|
8668
8692
|
}, []);
|
|
8669
|
-
var
|
|
8693
|
+
var _useApiHook8 = useApiHook({
|
|
8670
8694
|
endpoint: "/return_locations/?customer_id=" + (GsitCUstomerId == null ? void 0 : GsitCUstomerId.id),
|
|
8671
8695
|
method: 'GET',
|
|
8672
8696
|
performAction: false
|
|
8673
8697
|
}),
|
|
8674
|
-
fetchedLocationData =
|
|
8675
|
-
dataLoading =
|
|
8676
|
-
shouldFetch =
|
|
8698
|
+
fetchedLocationData = _useApiHook8.data,
|
|
8699
|
+
dataLoading = _useApiHook8.loading,
|
|
8700
|
+
shouldFetch = _useApiHook8.setShouldPerformAction;
|
|
8701
|
+
useEffect(function () {
|
|
8702
|
+
if (GsitCUstomerId != null && GsitCUstomerId.id) {
|
|
8703
|
+
shouldFetch(true);
|
|
8704
|
+
} else {
|
|
8705
|
+
shouldFetch(false);
|
|
8706
|
+
}
|
|
8707
|
+
}, [GsitCUstomerId]);
|
|
8677
8708
|
useEffect(function () {
|
|
8678
8709
|
if (fetchedLocationData && fetchedLocationData != null && fetchedLocationData.data) {
|
|
8679
8710
|
var _fetchedLocationData$;
|
|
@@ -8721,7 +8752,7 @@ function OrderView() {
|
|
|
8721
8752
|
}, [gsitId]);
|
|
8722
8753
|
return React.createElement(MainContainer$b, null, React.createElement(GeneralHeader, null), React.createElement(DetailsFilters, null), React.createElement(OrderDetails$1, null), React.createElement(ProductsInfo, null), React.createElement(SplitLayout$1, null, React.createElement(NotesContainer, null, React.createElement(Notes, null)), React.createElement(TablesContainer, null, React.createElement(SystemLogs, null))), React.createElement(OrderActions, null));
|
|
8723
8754
|
}
|
|
8724
|
-
var MainContainer$b = /*#__PURE__*/styled.div(_templateObject$
|
|
8755
|
+
var MainContainer$b = /*#__PURE__*/styled.div(_templateObject$1P || (_templateObject$1P = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding-bottom: 30px;\n"])));
|
|
8725
8756
|
var SplitLayout$1 = /*#__PURE__*/styled.div(_templateObject2$1n || (_templateObject2$1n = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n @media (max-width: 1024px) {\n display: contents;\n }\n"])));
|
|
8726
8757
|
var NotesContainer = /*#__PURE__*/styled.div(_templateObject3$O || (_templateObject3$O = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n"])));
|
|
8727
8758
|
var TablesContainer = /*#__PURE__*/styled.div(_templateObject4$s || (_templateObject4$s = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 15px;\n"])));
|
|
@@ -8843,7 +8874,7 @@ var filtersReducerAtom = /*#__PURE__*/atom(function (get) {
|
|
|
8843
8874
|
return set(filtersStateAtom, filterReducer(get(filtersStateAtom), action));
|
|
8844
8875
|
});
|
|
8845
8876
|
|
|
8846
|
-
var _templateObject$
|
|
8877
|
+
var _templateObject$1Q;
|
|
8847
8878
|
function SelectionFilter() {
|
|
8848
8879
|
var _useCustomerData = useCustomerData(),
|
|
8849
8880
|
customers = _useCustomerData[0];
|
|
@@ -8982,7 +9013,7 @@ function SelectionFilter() {
|
|
|
8982
9013
|
if (!currentSearch.includes('filter')) {
|
|
8983
9014
|
console.log('inside include');
|
|
8984
9015
|
// for dev
|
|
8985
|
-
navigate("/
|
|
9016
|
+
navigate("/filter?" + queryParams.toString());
|
|
8986
9017
|
// for local
|
|
8987
9018
|
//navigate(`/filter?${queryParams.toString()}`);
|
|
8988
9019
|
}
|
|
@@ -9151,7 +9182,7 @@ function SelectionFilter() {
|
|
|
9151
9182
|
disabled: !isButtonEnabled
|
|
9152
9183
|
}, "Apply"))));
|
|
9153
9184
|
}
|
|
9154
|
-
var StyledAntSelect$2 = /*#__PURE__*/styled(Select)(_templateObject$
|
|
9185
|
+
var StyledAntSelect$2 = /*#__PURE__*/styled(Select)(_templateObject$1Q || (_templateObject$1Q = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .ant-select-selector {\n /* width: 22vw; */\n border-radius: 22px;\n }\n .ant-select-clear {\n top: 40% !important;\n font-size: 18px !important;\n }\n"])));
|
|
9155
9186
|
|
|
9156
9187
|
// import { ApiResponse } from '../../types';
|
|
9157
9188
|
// import { useApiHook } from '@bjsdistribution/dms-component-library';
|
|
@@ -9215,9 +9246,9 @@ function HeaderFilter() {
|
|
|
9215
9246
|
return React.createElement(CoverPage, null, React.createElement(SelectionFilter, null));
|
|
9216
9247
|
}
|
|
9217
9248
|
|
|
9218
|
-
var _templateObject$
|
|
9249
|
+
var _templateObject$1R, _templateObject4$t, _templateObject5$i, _templateObject7$c, _templateObject8$8;
|
|
9219
9250
|
//Left side
|
|
9220
|
-
var LeftSideConatiner = /*#__PURE__*/styled.div(_templateObject$
|
|
9251
|
+
var LeftSideConatiner = /*#__PURE__*/styled.div(_templateObject$1R || (_templateObject$1R = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 1px 5px 1px 1.1px;\n align-items: center;\n gap: 10px;\n border-radius: 40px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: var(--Flowkit-White, #fff);\n\n .filtercontainer {\n display: flex;\n padding: 8px 8px 8px 4px;\n align-items: center;\n gap: 4px;\n align-self: stretch;\n border-radius: 20px 0px 0px 20px;\n border-right: 1px solid rgba(0, 0, 0, 0.04);\n background: var(--BjsColor-Bg-F0F2F2, #f0f2f2);\n\n .filtericon {\n display: flex;\n padding: 7px 0px 5px 5px;\n align-items: flex-start;\n gap: 10px;\n border-radius: 30px;\n }\n .textcont {\n color: #758588;\n text-align: center;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: normal;\n }\n }\n .datefilter {\n display: flex;\n height: 36px;\n padding: 6px 8px;\n justify-content: center;\n align-items: center;\n gap: 2px;\n border-radius: 20px;\n border: 1px solid #edebe8;\n\n .dateiconcontainer {\n display: flex;\n width: 24px;\n height: 24px;\n padding: 5px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n border-radius: 20px;\n border: 1px solid var(--tonal-brown-101, #e2e0db);\n background: #f1f5f6;\n }\n .datetext {\n color: #6a7378;\n\n /* body/captions */\n font-family: 'Lato';\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px; /* 123.077% */\n }\n }\n"])));
|
|
9221
9252
|
//
|
|
9222
9253
|
var StyledFiter = /*#__PURE__*/styled.div(_templateObject4$t || (_templateObject4$t = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
|
|
9223
9254
|
var StyledFIlterELements = /*#__PURE__*/styled.div(_templateObject5$i || (_templateObject5$i = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 0;\n gap: 10px;\n align-items: center;\n"])));
|
|
@@ -9225,7 +9256,7 @@ var Text$8 = /*#__PURE__*/styled.div(_templateObject7$c || (_templateObject7$c =
|
|
|
9225
9256
|
// Right side filter
|
|
9226
9257
|
var StyledTableFilter = /*#__PURE__*/styled.div(_templateObject8$8 || (_templateObject8$8 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
9227
9258
|
|
|
9228
|
-
var _templateObject$
|
|
9259
|
+
var _templateObject$1S, _templateObject2$1o;
|
|
9229
9260
|
// import { StyledBulkItem } from '../../filters/BulkFilterStyle';
|
|
9230
9261
|
// import SearchType from '../../header/route-header/search/SearchType';
|
|
9231
9262
|
// import DownloadIcon from '../../../../assets/icons/DownloadIcon';
|
|
@@ -9234,7 +9265,7 @@ var RightFilters = function RightFilters() {
|
|
|
9234
9265
|
dispatch = _useAtom[1];
|
|
9235
9266
|
var _useSelectedOrders = useSelectedOrders(),
|
|
9236
9267
|
selectedReturnOrder = _useSelectedOrders[0];
|
|
9237
|
-
return React.createElement(Container$
|
|
9268
|
+
return React.createElement(Container$14, null, React.createElement(ButtonText, {
|
|
9238
9269
|
onClick: function onClick() {
|
|
9239
9270
|
return dispatch({
|
|
9240
9271
|
type: 'create-return'
|
|
@@ -9243,7 +9274,7 @@ var RightFilters = function RightFilters() {
|
|
|
9243
9274
|
disabled: (selectedReturnOrder == null ? void 0 : selectedReturnOrder.length) === 0
|
|
9244
9275
|
}, "Create Return"));
|
|
9245
9276
|
};
|
|
9246
|
-
var Container$
|
|
9277
|
+
var Container$14 = /*#__PURE__*/styled.div(_templateObject$1S || (_templateObject$1S = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n /* align-items: flex-start; */\n gap: 16px;\n align-items: center;\n"])));
|
|
9247
9278
|
// const Mid = styled.div`
|
|
9248
9279
|
// display: flex;
|
|
9249
9280
|
// padding: 4px 10px;
|
|
@@ -9268,8 +9299,8 @@ var ReturnFilter = function ReturnFilter() {
|
|
|
9268
9299
|
return React.createElement(React.Fragment, null, React.createElement(StyledFiter, null, React.createElement(Text$8, null, customerName), React.createElement(StyledFIlterELements, null, React.createElement(StyledTableFilter, null)), React.createElement(RightFilters, null)));
|
|
9269
9300
|
};
|
|
9270
9301
|
|
|
9271
|
-
var _templateObject$
|
|
9272
|
-
var ColumStyle = /*#__PURE__*/styled.div(_templateObject$
|
|
9302
|
+
var _templateObject$1T, _templateObject2$1p, _templateObject3$Q, _templateObject4$u, _templateObject34, _templateObject35, _templateObject36, _templateObject37;
|
|
9303
|
+
var ColumStyle = /*#__PURE__*/styled.div(_templateObject$1T || (_templateObject$1T = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 67px;\n align-items: center;\n gap: 7px;\n"])));
|
|
9273
9304
|
var GreyBox = /*#__PURE__*/styled.div(_templateObject2$1p || (_templateObject2$1p = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 3px 12px;\n align-items: flex-start;\n gap: 24px;\n border-radius: 6px;\n background: rgba(153, 153, 153, 0.1);\n"])));
|
|
9274
9305
|
// Styled components
|
|
9275
9306
|
var StyledTableWrapper$2 = /*#__PURE__*/styled.div(_templateObject3$Q || (_templateObject3$Q = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n overflow-x: auto;\n max-height: calc(100vh - 396px);\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"])));
|
|
@@ -9466,7 +9497,7 @@ var optionsForReturnPrint = [{
|
|
|
9466
9497
|
label: 'Print Return Labels'
|
|
9467
9498
|
}];
|
|
9468
9499
|
|
|
9469
|
-
var _templateObject$
|
|
9500
|
+
var _templateObject$1U, _templateObject2$1q;
|
|
9470
9501
|
var options = optionsForReturnPrint;
|
|
9471
9502
|
var PrintDropDownReturn = function PrintDropDownReturn(_ref) {
|
|
9472
9503
|
var legacyProductId = _ref.legacyProductId;
|
|
@@ -9482,7 +9513,7 @@ var PrintDropDownReturn = function PrintDropDownReturn(_ref) {
|
|
|
9482
9513
|
}, IconComponent && React.createElement(IconComponent, null), " ", item.label);
|
|
9483
9514
|
}));
|
|
9484
9515
|
};
|
|
9485
|
-
var OptionsList = /*#__PURE__*/styled.ul(_templateObject$
|
|
9516
|
+
var OptionsList = /*#__PURE__*/styled.ul(_templateObject$1U || (_templateObject$1U = /*#__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"])));
|
|
9486
9517
|
var OptionsListLi = /*#__PURE__*/styled.li(_templateObject2$1q || (_templateObject2$1q = /*#__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"])));
|
|
9487
9518
|
|
|
9488
9519
|
function CaretDownFilledIcon(props) {
|
|
@@ -9875,7 +9906,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
9875
9906
|
})))));
|
|
9876
9907
|
};
|
|
9877
9908
|
|
|
9878
|
-
var _templateObject$
|
|
9909
|
+
var _templateObject$1V, _templateObject2$1r;
|
|
9879
9910
|
var DefectsModal = function DefectsModal() {
|
|
9880
9911
|
var options = [{
|
|
9881
9912
|
value: 'bjsCouriers',
|
|
@@ -9927,10 +9958,10 @@ var DefectsModal = function DefectsModal() {
|
|
|
9927
9958
|
}
|
|
9928
9959
|
}))));
|
|
9929
9960
|
};
|
|
9930
|
-
var StyledConatiner = /*#__PURE__*/styled.div(_templateObject$
|
|
9961
|
+
var StyledConatiner = /*#__PURE__*/styled.div(_templateObject$1V || (_templateObject$1V = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* tex: nowrap; */\n"])));
|
|
9931
9962
|
var GLobalPopupContent = /*#__PURE__*/styled.div(_templateObject2$1r || (_templateObject2$1r = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
9932
9963
|
|
|
9933
|
-
var _templateObject$
|
|
9964
|
+
var _templateObject$1W, _templateObject2$1s, _templateObject3$R;
|
|
9934
9965
|
var _excluded$4 = ["id"];
|
|
9935
9966
|
var CreateReturnModal = function CreateReturnModal() {
|
|
9936
9967
|
var _useSelectedConfirmLo = useSelectedConfirmLoc(),
|
|
@@ -9983,7 +10014,7 @@ var CreateReturnModal = function CreateReturnModal() {
|
|
|
9983
10014
|
type: "info",
|
|
9984
10015
|
title: "Do you wish to proceed?",
|
|
9985
10016
|
showOkButton: false
|
|
9986
|
-
}), React.createElement(Container$
|
|
10017
|
+
}), React.createElement(Container$15, null, React.createElement("ul", {
|
|
9987
10018
|
style: {
|
|
9988
10019
|
listStyle: 'none',
|
|
9989
10020
|
padding: 0
|
|
@@ -10009,8 +10040,8 @@ var CreateReturnModal = function CreateReturnModal() {
|
|
|
10009
10040
|
}, displayValueOrNA(returnLoc == null || (_returnLoc$return_loc = returnLoc.return_locations) == null ? void 0 : _returnLoc$return_loc.location_name)));
|
|
10010
10041
|
})))));
|
|
10011
10042
|
};
|
|
10012
|
-
var StyledText$1 = /*#__PURE__*/styled.div(_templateObject$
|
|
10013
|
-
var Container$
|
|
10043
|
+
var StyledText$1 = /*#__PURE__*/styled.div(_templateObject$1W || (_templateObject$1W = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #8d8f90;\n font-family: Poppins;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n"])));
|
|
10044
|
+
var Container$15 = /*#__PURE__*/styled.div(_templateObject2$1s || (_templateObject2$1s = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10014
10045
|
var Wrapper$l = /*#__PURE__*/styled.div(_templateObject3$R || (_templateObject3$R = /*#__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"])));
|
|
10015
10046
|
|
|
10016
10047
|
var ModalManager = function ModalManager() {
|
|
@@ -10114,7 +10145,7 @@ var ModalManager = function ModalManager() {
|
|
|
10114
10145
|
// for local
|
|
10115
10146
|
// navigate('/order-return');
|
|
10116
10147
|
// for dev
|
|
10117
|
-
navigate('/
|
|
10148
|
+
navigate('/orders/view/return');
|
|
10118
10149
|
}
|
|
10119
10150
|
}, [postLoading]);
|
|
10120
10151
|
return React.createElement(React.Fragment, null, (popupName == null ? void 0 : popupName.state) === 'create-return' && React.createElement(React.Fragment, null, React.createElement(AntModal, {
|
|
@@ -10160,8 +10191,8 @@ var ModalManager = function ModalManager() {
|
|
|
10160
10191
|
}));
|
|
10161
10192
|
};
|
|
10162
10193
|
|
|
10163
|
-
var _templateObject$
|
|
10164
|
-
var StyledContainer = /*#__PURE__*/styled.div(_templateObject$
|
|
10194
|
+
var _templateObject$1X, _templateObject2$1t, _templateObject3$S, _templateObject4$v, _templateObject6$c, _templateObject7$d;
|
|
10195
|
+
var StyledContainer = /*#__PURE__*/styled.div(_templateObject$1X || (_templateObject$1X = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n align-items: center;\n align-self: stretch;\n padding: 0;\n max-width: 100%;\n margin-top: 11px;\n margin-bottom: 0;\n"])));
|
|
10165
10196
|
var StyledContentWrapper = /*#__PURE__*/styled.div(_templateObject2$1t || (_templateObject2$1t = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 12px;\n"])));
|
|
10166
10197
|
var StyledInfoBox = /*#__PURE__*/styled.div(_templateObject3$S || (_templateObject3$S = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 20px;\n border: 1px solid #e2e0db;\n background: #fff;\n color: #8e8a85;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n letter-spacing: 0.07px;\n padding: 6px 10px;\n"])));
|
|
10167
10198
|
var StyledLabel$2 = /*#__PURE__*/styled.div(_templateObject4$v || (_templateObject4$v = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #8e8a85;\n\n font-size: 13px;\n font-weight: 400;\n line-height: 16px;\n display: flex;\n align-items: center;\n"])));
|
|
@@ -10284,7 +10315,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
10284
10315
|
}, React.createElement(NextIcon, null)))));
|
|
10285
10316
|
};
|
|
10286
10317
|
|
|
10287
|
-
var _templateObject$
|
|
10318
|
+
var _templateObject$1Y, _templateObject2$1u;
|
|
10288
10319
|
// import { useLocation } from 'react-router-dom';
|
|
10289
10320
|
var ReturnTable = function ReturnTable() {
|
|
10290
10321
|
var _UsePaginationData = UsePaginationData(),
|
|
@@ -10309,7 +10340,7 @@ var ReturnTable = function ReturnTable() {
|
|
|
10309
10340
|
// }, [location]);
|
|
10310
10341
|
return React.createElement("div", null, React.createElement(DashBoardWrapper$1, null, React.createElement("div", {
|
|
10311
10342
|
className: "Tableconatiner"
|
|
10312
|
-
}, React.createElement(HeaderFilter, null), React.createElement(Container$
|
|
10343
|
+
}, React.createElement(HeaderFilter, null), React.createElement(Container$16, null, React.createElement(ReturnFilter, null), React.createElement(ReturnOrderTable, null), total > 0 && React.createElement(Pagination, {
|
|
10313
10344
|
currentPage: page,
|
|
10314
10345
|
totalItems: total,
|
|
10315
10346
|
itemsPerPage: itemsPerPage,
|
|
@@ -10317,7 +10348,7 @@ var ReturnTable = function ReturnTable() {
|
|
|
10317
10348
|
onItemsPerPageChange: handleItemsPerPageChange
|
|
10318
10349
|
})))), React.createElement(ModalManager, null));
|
|
10319
10350
|
};
|
|
10320
|
-
var Container$
|
|
10351
|
+
var Container$16 = /*#__PURE__*/styled.div(_templateObject$1Y || (_templateObject$1Y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -46px;\n"])));
|
|
10321
10352
|
var DashBoardWrapper$1 = /*#__PURE__*/styled.section(_templateObject2$1u || (_templateObject2$1u = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .Tableconatiner {\n border-radius: 12px;\n background: #fff;\n box-shadow: -2px 0px 12px 0px rgba(56, 71, 109, 0.1);\n display: block;\n padding: 15px 20px;\n }\n .headerWrap,\n .tableData,\n .styleCovered {\n transition: all ease 0.5s;\n }\n &.stickyTableHead {\n h2 {\n font-size: 21px;\n }\n .headerWrap {\n height: 84px;\n padding: 10px;\n border-radius: 0px 0px 15px 15px;\n > div {\n position: relative;\n z-index: 10;\n }\n }\n .styleCovered {\n margin-top: -32px;\n width: 67%;\n float: right;\n gap: 5px;\n padding-right: 11px;\n\n li {\n padding: 4px 10px 5px 5px;\n gap: 5px;\n .svgCover {\n width: 30px;\n height: 30px;\n svg {\n height: auto;\n width: 58%;\n }\n }\n .countDigit {\n font-size: 19px;\n }\n }\n .countMess {\n font-size: 13px;\n }\n }\n .dmsBulkFilter {\n min-height: unset;\n gap: 4px;\n > div {\n padding: 4px 12px;\n label {\n font-size: 11px;\n }\n }\n }\n\n .StyledFilterList {\n gap: 4px;\n li {\n height: 29px;\n padding: 3px 8px;\n gap: 4px;\n .StyledFilterBtnIcon {\n width: 20px;\n height: 20px;\n svh {\n width: 10px;\n height: auto;\n }\n }\n .StyledFilterBtnLabel {\n font-size: 13px;\n }\n }\n }\n .StyledFilterLabel {\n padding-left: 10px;\n span {\n font-size: 13px;\n }\n }\n .cardcontainer.tableData {\n max-height: calc(100vh - 310px);\n min-height: calc(100vh - 310px);\n }\n\n .tableData {\n max-height: calc(100vh - 320px);\n min-height: calc(100vh - 320px);\n\n margin-top: 8px;\n thead {\n position: sticky;\n top: 0;\n z-index: 9;\n th {\n font-size: 13px;\n padding: 2px 15px;\n }\n }\n }\n }\n"])));
|
|
10322
10353
|
|
|
10323
10354
|
function LoadIcon() {
|
|
@@ -10336,7 +10367,7 @@ function LoadIcon() {
|
|
|
10336
10367
|
}));
|
|
10337
10368
|
}
|
|
10338
10369
|
|
|
10339
|
-
var _templateObject$
|
|
10370
|
+
var _templateObject$1Z, _templateObject2$1v;
|
|
10340
10371
|
var PrintDropDown = function PrintDropDown(_ref) {
|
|
10341
10372
|
var legacyProductId = _ref.legacyProductId;
|
|
10342
10373
|
var downloadFiles = function downloadFiles(type) {
|
|
@@ -10362,7 +10393,7 @@ var PrintDropDown = function PrintDropDown(_ref) {
|
|
|
10362
10393
|
}, IconComponent && React.createElement(IconComponent, null), item.label);
|
|
10363
10394
|
}));
|
|
10364
10395
|
};
|
|
10365
|
-
var OptionsList$1 = /*#__PURE__*/styled.ul(_templateObject$
|
|
10396
|
+
var OptionsList$1 = /*#__PURE__*/styled.ul(_templateObject$1Z || (_templateObject$1Z = /*#__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: 34px;\n right: 0;\n z-index: 99;\n min-width: 194px;\n"])));
|
|
10366
10397
|
var OptionsListLi$1 = /*#__PURE__*/styled.li(_templateObject2$1v || (_templateObject2$1v = /*#__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: ", ";\n color: ", ";\n &:last-child {\n border: none;\n }\n &:hover {\n background-color: ", ";\n }\n"])), function (_ref2) {
|
|
10367
10398
|
var disabled = _ref2.disabled;
|
|
10368
10399
|
return disabled ? 'not-allowed' : 'pointer';
|
|
@@ -10374,7 +10405,7 @@ var OptionsListLi$1 = /*#__PURE__*/styled.li(_templateObject2$1v || (_templateOb
|
|
|
10374
10405
|
return disabled ? 'transparent' : '#f0f0f0';
|
|
10375
10406
|
});
|
|
10376
10407
|
|
|
10377
|
-
var _templateObject$
|
|
10408
|
+
var _templateObject$1_;
|
|
10378
10409
|
var OrderTable = function OrderTable(_ref) {
|
|
10379
10410
|
var loadingskeleton = _ref.loadingskeleton;
|
|
10380
10411
|
// const [, setSelectedReturnOrder] = useSelectedOrders();
|
|
@@ -10643,7 +10674,7 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
10643
10674
|
paddingLeft: 0
|
|
10644
10675
|
}
|
|
10645
10676
|
}, React.createElement(NavLink, {
|
|
10646
|
-
to: "" + item.id
|
|
10677
|
+
to: "/" + item.id
|
|
10647
10678
|
}, displayValueOrNA(item == null || (_item$order_recipient = item.order_recipient) == null ? void 0 : _item$order_recipient.recipient_name))), React.createElement("li", {
|
|
10648
10679
|
style: {
|
|
10649
10680
|
color: '#888075'
|
|
@@ -10690,12 +10721,12 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
10690
10721
|
}, React.createElement(LoadIcon, null)))));
|
|
10691
10722
|
})))));
|
|
10692
10723
|
};
|
|
10693
|
-
var StyledAntSelect$3 = /*#__PURE__*/styled(Select)(_templateObject$
|
|
10724
|
+
var StyledAntSelect$3 = /*#__PURE__*/styled(Select)(_templateObject$1_ || (_templateObject$1_ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .ant-select-selector {\n /* width: 22vw; */\n border-radius: 22px;\n }\n .ant-select-clear {\n top: 40% !important;\n font-size: 18px !important;\n }\n"])));
|
|
10694
10725
|
|
|
10695
|
-
var _templateObject$
|
|
10726
|
+
var _templateObject$1$;
|
|
10696
10727
|
// import DownloadIcon from '../../../../assets/icons/DownloadIcon';
|
|
10697
10728
|
var TableFilters = function TableFilters() {
|
|
10698
|
-
return React.createElement(Container$
|
|
10729
|
+
return React.createElement(Container$17, null);
|
|
10699
10730
|
// return (
|
|
10700
10731
|
// // <StyledBulkFilterCover>
|
|
10701
10732
|
// <StyledBulkItem>
|
|
@@ -10709,7 +10740,7 @@ var TableFilters = function TableFilters() {
|
|
|
10709
10740
|
// // </StyledBulkFilterCover>
|
|
10710
10741
|
// );
|
|
10711
10742
|
};
|
|
10712
|
-
var Container$
|
|
10743
|
+
var Container$17 = /*#__PURE__*/styled.div(_templateObject$1$ || (_templateObject$1$ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n /* align-items: flex-start; */\n gap: 16px;\n align-items: center;\n"])));
|
|
10713
10744
|
|
|
10714
10745
|
var FilterIcon = function FilterIcon() {
|
|
10715
10746
|
return React.createElement("svg", {
|
|
@@ -10942,7 +10973,7 @@ var filtersReducerReturnAtom = /*#__PURE__*/atom(function (get) {
|
|
|
10942
10973
|
return set(filtersStateAtom$1, filterReducer$1(get(filtersStateAtom$1), action));
|
|
10943
10974
|
});
|
|
10944
10975
|
|
|
10945
|
-
var _templateObject$
|
|
10976
|
+
var _templateObject$20, _templateObject2$1w;
|
|
10946
10977
|
var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
10947
10978
|
var _useAtom = useAtom(filtersReducerReturnAtom),
|
|
10948
10979
|
dispatch = _useAtom[1];
|
|
@@ -11157,7 +11188,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
11157
11188
|
className: "cross"
|
|
11158
11189
|
})), React.createElement(StyledFilterBtnLabel, null, "Clear all"))) : null)), React.createElement(TableFilters, null)));
|
|
11159
11190
|
};
|
|
11160
|
-
var StyledDatePicker = /*#__PURE__*/styled.div(_templateObject$
|
|
11191
|
+
var StyledDatePicker = /*#__PURE__*/styled.div(_templateObject$20 || (_templateObject$20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .custom-datepicker {\n border: none;\n }\n"])));
|
|
11161
11192
|
// const DropdownContainer = styled.div``;
|
|
11162
11193
|
var StyledAntSelect$4 = /*#__PURE__*/styled.div(_templateObject2$1w || (_templateObject2$1w = /*#__PURE__*/_taggedTemplateLiteralLoose(["\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"])));
|
|
11163
11194
|
|
|
@@ -11245,7 +11276,7 @@ var ReturnPagination = function ReturnPagination(_ref) {
|
|
|
11245
11276
|
}, React.createElement(NextIcon, null)))));
|
|
11246
11277
|
};
|
|
11247
11278
|
|
|
11248
|
-
var _templateObject$
|
|
11279
|
+
var _templateObject$21, _templateObject2$1x;
|
|
11249
11280
|
var _excluded$5 = ["count"];
|
|
11250
11281
|
var ReturnAfterTable = function ReturnAfterTable() {
|
|
11251
11282
|
var _useReturnAfterOrderD = useReturnAfterOrderData(),
|
|
@@ -11308,7 +11339,7 @@ var ReturnAfterTable = function ReturnAfterTable() {
|
|
|
11308
11339
|
}, [fetchedReturnOrderData, loading, returnAfterOrder]);
|
|
11309
11340
|
return React.createElement("div", null, React.createElement(DashBoardWrapper$2, null, React.createElement("div", {
|
|
11310
11341
|
className: "Tableconatiner"
|
|
11311
|
-
}, React.createElement(Container$
|
|
11342
|
+
}, React.createElement(Container$18, null, React.createElement(ReturnOrderFilter, null), React.createElement(OrderTable, null), total > 0 && React.createElement(ReturnPagination, {
|
|
11312
11343
|
currentPage: page,
|
|
11313
11344
|
totalItems: total,
|
|
11314
11345
|
itemsPerPage: itemsPerPage,
|
|
@@ -11316,13 +11347,13 @@ var ReturnAfterTable = function ReturnAfterTable() {
|
|
|
11316
11347
|
onItemsPerPageChange: handleItemsPerPageChange
|
|
11317
11348
|
})))));
|
|
11318
11349
|
};
|
|
11319
|
-
var Container$
|
|
11350
|
+
var Container$18 = /*#__PURE__*/styled.div(_templateObject$21 || (_templateObject$21 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n /* top: -30px; */\n"])));
|
|
11320
11351
|
var DashBoardWrapper$2 = /*#__PURE__*/styled.section(_templateObject2$1x || (_templateObject2$1x = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .Tableconatiner {\n border-radius: 12px;\n background: #fff;\n box-shadow: -2px 0px 12px 0px rgba(56, 71, 109, 0.1);\n display: block;\n padding: 15px 20px;\n }\n .headerWrap,\n .tableData,\n .styleCovered {\n transition: all ease 0.5s;\n }\n &.stickyTableHead {\n h2 {\n font-size: 21px;\n }\n .headerWrap {\n height: 84px;\n padding: 10px;\n border-radius: 0px 0px 15px 15px;\n > div {\n position: relative;\n z-index: 10;\n }\n }\n .styleCovered {\n margin-top: -32px;\n width: 67%;\n float: right;\n gap: 5px;\n padding-right: 11px;\n\n li {\n padding: 4px 10px 5px 5px;\n gap: 5px;\n .svgCover {\n width: 30px;\n height: 30px;\n svg {\n height: auto;\n width: 58%;\n }\n }\n .countDigit {\n font-size: 19px;\n }\n }\n .countMess {\n font-size: 13px;\n }\n }\n .dmsBulkFilter {\n min-height: unset;\n gap: 4px;\n > div {\n padding: 4px 12px;\n label {\n font-size: 11px;\n }\n }\n }\n\n .StyledFilterList {\n gap: 4px;\n li {\n height: 29px;\n padding: 3px 8px;\n gap: 4px;\n .StyledFilterBtnIcon {\n width: 20px;\n height: 20px;\n svh {\n width: 10px;\n height: auto;\n }\n }\n .StyledFilterBtnLabel {\n font-size: 13px;\n }\n }\n }\n .StyledFilterLabel {\n padding-left: 10px;\n span {\n font-size: 13px;\n }\n }\n .cardcontainer.tableData {\n max-height: calc(100vh - 310px);\n min-height: calc(100vh - 310px);\n }\n\n .tableData {\n max-height: calc(100vh - 320px);\n min-height: calc(100vh - 320px);\n\n margin-top: 8px;\n thead {\n position: sticky;\n top: 0;\n z-index: 9;\n th {\n font-size: 13px;\n padding: 2px 15px;\n }\n }\n }\n }\n"])));
|
|
11321
11352
|
|
|
11322
11353
|
var _templateObject2$1y;
|
|
11323
11354
|
var StyledBulkItem = /*#__PURE__*/styled.div(_templateObject2$1y || (_templateObject2$1y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 8px 12px;\n display: flex;\n align-items: center;\n /* border-right: 1px solid #d0d5dd; */\n gap: 8px;\n cursor: pointer;\n position: relative;\n\n @media screen and (max-width: 1030px) {\n padding: 8px 11px;\n }\n\n ul {\n margin: 0;\n padding: 0;\n list-style: none;\n box-sizing: border-box;\n top: 54px;\n }\n &:last-child {\n border-right: none;\n }\n &.active svg.arrowDown {\n transform: rotate(180deg);\n }\n label {\n color: #6a7378;\n text-align: center;\n font-family: 'Open Sans';\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 18px;\n cursor: pointer;\n }\n\n &.noPadding {\n padding: 0;\n }\n"])));
|
|
11324
11355
|
|
|
11325
|
-
var _templateObject$
|
|
11356
|
+
var _templateObject$22, _templateObject2$1z;
|
|
11326
11357
|
var SearchType = function SearchType() {
|
|
11327
11358
|
var _useState = useState(''),
|
|
11328
11359
|
searchText = _useState[0],
|
|
@@ -11337,7 +11368,7 @@ var SearchType = function SearchType() {
|
|
|
11337
11368
|
onChange: handleInputChange
|
|
11338
11369
|
}));
|
|
11339
11370
|
};
|
|
11340
|
-
var Search = /*#__PURE__*/styled.div(_templateObject$
|
|
11371
|
+
var Search = /*#__PURE__*/styled.div(_templateObject$22 || (_templateObject$22 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n svg {\n position: absolute;\n left: 12px;\n top: 50%;\n transform: translateY(-50%);\n }\n"])));
|
|
11341
11372
|
var SearchInput = /*#__PURE__*/styled.input(_templateObject2$1z || (_templateObject2$1z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 20px;\n border: 1px solid #e0e2e7;\n background: #fff;\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n display: flex;\n padding: 8.5px 12px;\n align-items: center;\n gap: 8px;\n align-self: stretch;\n padding-left: 39px;\n"])));
|
|
11342
11373
|
|
|
11343
11374
|
var BulkFilter = function BulkFilter() {
|
|
@@ -11514,7 +11545,7 @@ var ReturnTable$1 = function ReturnTable() {
|
|
|
11514
11545
|
customerId: customerId == null ? void 0 : customerId.toString()
|
|
11515
11546
|
});
|
|
11516
11547
|
//for dev
|
|
11517
|
-
navigate("/
|
|
11548
|
+
navigate("/filter?" + queryParams.toString());
|
|
11518
11549
|
//for local
|
|
11519
11550
|
//navigate(`/filter?${queryParams.toString()}`);
|
|
11520
11551
|
};
|
|
@@ -11540,7 +11571,7 @@ var ReturnTable$1 = function ReturnTable() {
|
|
|
11540
11571
|
type: RTS
|
|
11541
11572
|
});
|
|
11542
11573
|
//for dev
|
|
11543
|
-
navigate("/
|
|
11574
|
+
navigate("/filter?" + queryParams.toString());
|
|
11544
11575
|
//for local
|
|
11545
11576
|
//navigate(`/filter?${queryParams.toString()}`);
|
|
11546
11577
|
};
|
|
@@ -11677,7 +11708,7 @@ var overviewfiltersReducerAtom = /*#__PURE__*/atom(function (get) {
|
|
|
11677
11708
|
return set(filtersStateAtom$2, filterReducer$2(get(filtersStateAtom$2), action));
|
|
11678
11709
|
});
|
|
11679
11710
|
|
|
11680
|
-
var _templateObject$
|
|
11711
|
+
var _templateObject$23, _templateObject2$1A, _templateObject3$T;
|
|
11681
11712
|
var _excluded$7 = ["count"];
|
|
11682
11713
|
function ReturnMainTable() {
|
|
11683
11714
|
var _useAtom = useAtom(overviewfiltersReducerAtom),
|
|
@@ -11739,7 +11770,7 @@ function ReturnMainTable() {
|
|
|
11739
11770
|
className: " " + (isScrolled ? 'stickyTableHead' : '')
|
|
11740
11771
|
}, React.createElement("div", {
|
|
11741
11772
|
className: "Tableconatiner"
|
|
11742
|
-
}, React.createElement(HeaderFilter, null), React.createElement(Container$
|
|
11773
|
+
}, React.createElement(HeaderFilter, null), React.createElement(Container$19, null, React.createElement(Row$7, null, React.createElement(Text$8, null, "Client Return"), customerId ? React.createElement(ReturnFilter, null) : React.createElement(Filters, null)), React.createElement(ReturnTable$1, null)), total > 0 && React.createElement(Pagination, {
|
|
11743
11774
|
currentPage: page,
|
|
11744
11775
|
totalItems: total,
|
|
11745
11776
|
itemsPerPage: itemsPerPage,
|
|
@@ -11747,25 +11778,25 @@ function ReturnMainTable() {
|
|
|
11747
11778
|
onItemsPerPageChange: handleItemsPerPageChange
|
|
11748
11779
|
}))));
|
|
11749
11780
|
}
|
|
11750
|
-
var Row$7 = /*#__PURE__*/styled.div(_templateObject$
|
|
11751
|
-
var Container$
|
|
11781
|
+
var Row$7 = /*#__PURE__*/styled.div(_templateObject$23 || (_templateObject$23 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
|
|
11782
|
+
var Container$19 = /*#__PURE__*/styled.div(_templateObject2$1A || (_templateObject2$1A = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -46px;\n"])));
|
|
11752
11783
|
var DashBoardWrapper$3 = /*#__PURE__*/styled.section(_templateObject3$T || (_templateObject3$T = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .Tableconatiner {\n border-radius: 12px;\n background: #fff;\n box-shadow: -2px 0px 12px 0px rgba(56, 71, 109, 0.1);\n display: block;\n padding: 15px 20px;\n }\n .headerWrap,\n .tableData,\n .styleCovered {\n transition: all ease 0.5s;\n }\n &.stickyTableHead {\n h2 {\n font-size: 21px;\n }\n .headerWrap {\n height: 84px;\n padding: 10px;\n border-radius: 0px 0px 15px 15px;\n > div {\n position: relative;\n z-index: 10;\n }\n }\n .styleCovered {\n margin-top: -32px;\n width: 67%;\n float: right;\n gap: 5px;\n padding-right: 11px;\n\n li {\n padding: 4px 10px 5px 5px;\n gap: 5px;\n .svgCover {\n width: 30px;\n height: 30px;\n svg {\n height: auto;\n width: 58%;\n }\n }\n .countDigit {\n font-size: 19px;\n }\n }\n .countMess {\n font-size: 13px;\n }\n }\n .dmsBulkFilter {\n min-height: unset;\n gap: 4px;\n > div {\n padding: 4px 12px;\n label {\n font-size: 11px;\n }\n }\n }\n\n .StyledFilterList {\n gap: 4px;\n li {\n height: 29px;\n padding: 3px 8px;\n gap: 4px;\n .StyledFilterBtnIcon {\n width: 20px;\n height: 20px;\n svh {\n width: 10px;\n height: auto;\n }\n }\n .StyledFilterBtnLabel {\n font-size: 13px;\n }\n }\n }\n .StyledFilterLabel {\n padding-left: 10px;\n span {\n font-size: 13px;\n }\n }\n .cardcontainer.tableData {\n max-height: calc(100vh - 310px);\n min-height: calc(100vh - 310px);\n }\n\n .tableData {\n max-height: calc(100vh - 320px);\n min-height: calc(100vh - 320px);\n\n margin-top: 8px;\n thead {\n position: sticky;\n top: 0;\n z-index: 9;\n th {\n font-size: 13px;\n padding: 2px 15px;\n }\n }\n }\n }\n"])));
|
|
11753
11784
|
|
|
11754
|
-
var _templateObject$
|
|
11755
|
-
var HeaderWrapper = /*#__PURE__*/styled.div(_templateObject$
|
|
11785
|
+
var _templateObject$24, _templateObject2$1B;
|
|
11786
|
+
var HeaderWrapper = /*#__PURE__*/styled.div(_templateObject$24 || (_templateObject$24 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 20px;\n gap: 10px;\n border-radius: 0px 0px 30px 30px;\n background: #313130;\n height: 151px;\n background: url(./assets/bgBlack.png) no-repeat;\n background-size: cover;\n background-color: #000000d9;\n"])));
|
|
11756
11787
|
var StyledFlex = /*#__PURE__*/styled.div(_templateObject2$1B || (_templateObject2$1B = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n"])));
|
|
11757
11788
|
|
|
11758
|
-
var _templateObject$
|
|
11789
|
+
var _templateObject$25;
|
|
11759
11790
|
var HeaderTitle = function HeaderTitle(props) {
|
|
11760
11791
|
return React.createElement(React.Fragment, null, React.createElement(Title$7, null, props.title));
|
|
11761
11792
|
};
|
|
11762
|
-
var Title$7 = /*#__PURE__*/styled.h2(_templateObject$
|
|
11793
|
+
var Title$7 = /*#__PURE__*/styled.h2(_templateObject$25 || (_templateObject$25 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0px;\n padding: 0px;\n color: #fff;\n font-size: 26px;\n font-style: normal;\n font-weight: 700;\n line-height: 36px;\n text-transform: uppercase;\n margin-bottom: 8px;\n"])));
|
|
11763
11794
|
|
|
11764
|
-
var _templateObject$
|
|
11795
|
+
var _templateObject$26, _templateObject2$1C;
|
|
11765
11796
|
function Breadcrumb(props) {
|
|
11766
11797
|
return React.createElement(BreadcrumbContainer, null, React.createElement(BreadcrumbList, null, props.title || ''), React.createElement(BreadcrumbList, null, props.subtitle || ''), props.subPart && React.createElement(React.Fragment, null, React.createElement(BreadcrumbList, null, props.subPart)));
|
|
11767
11798
|
}
|
|
11768
|
-
var BreadcrumbContainer = /*#__PURE__*/styled.div(_templateObject$
|
|
11799
|
+
var BreadcrumbContainer = /*#__PURE__*/styled.div(_templateObject$26 || (_templateObject$26 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n"])));
|
|
11769
11800
|
var BreadcrumbList = /*#__PURE__*/styled.span(_templateObject2$1C || (_templateObject2$1C = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #edebe8;\n font-family: 'Open Sans', sans-serif;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px;\n"])));
|
|
11770
11801
|
|
|
11771
11802
|
var RouterHeader = function RouterHeader(_ref) {
|
|
@@ -11824,7 +11855,7 @@ function ReturnClient() {
|
|
|
11824
11855
|
};
|
|
11825
11856
|
var paths = splitPath(location.pathname);
|
|
11826
11857
|
useEffect(function () {
|
|
11827
|
-
if (paths[paths.length - 1] === '
|
|
11858
|
+
if (paths[paths.length - 1] === 'orders/view/return') {
|
|
11828
11859
|
setActionTypeOptions([]);
|
|
11829
11860
|
setLocationOptions([]);
|
|
11830
11861
|
setSelectedClient(null);
|
|
@@ -11896,10 +11927,10 @@ function ReturnClient() {
|
|
|
11896
11927
|
path: "",
|
|
11897
11928
|
element: React.createElement(ReturnMainTable, null)
|
|
11898
11929
|
}), React.createElement(Route, {
|
|
11899
|
-
path: "
|
|
11930
|
+
path: "overview",
|
|
11900
11931
|
element: React.createElement(ReturnAfterTable, null)
|
|
11901
11932
|
}), React.createElement(Route, {
|
|
11902
|
-
path: "
|
|
11933
|
+
path: "/:id",
|
|
11903
11934
|
element: React.createElement(OrderView, null)
|
|
11904
11935
|
}), React.createElement(Route, {
|
|
11905
11936
|
path: "filter",
|