@bjsdistribution/dms-client-return 0.0.2 → 0.0.3
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/interface.d.ts +22 -0
- package/dist/components/order-daily-overview/header-filters/Styledfilters.d.ts +1 -2
- package/dist/components/order-daily-overview/header-filters/filterStore.d.ts +16 -0
- package/dist/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.d.ts +1 -0
- package/dist/components/order-daily-overview/shared/utlis.d.ts +2 -2
- package/dist/components/order-daily-overview/store/store.d.ts +4 -0
- package/dist/components/order-view/details-filters/left-side-filters/dropdowns/PrintDropDown.d.ts +3 -1
- package/dist/components/order-view/store.d.ts +5 -1
- package/dist/components/store.d.ts +5 -2
- package/dist/components/types.d.ts +1 -1
- package/dist/dms-client-return.cjs.development.js +1065 -964
- 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 +1067 -966
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/order-daily-overview/common/fakedata.tsx +5 -6
- package/src/components/order-daily-overview/common/interface.ts +120 -97
- package/src/components/order-daily-overview/filters/Filters.tsx +1 -8
- package/src/components/order-daily-overview/header-filters/HeaderFilter.tsx +56 -67
- package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +160 -223
- package/src/components/order-daily-overview/header-filters/Styledfilters.tsx +19 -7
- package/src/components/order-daily-overview/header-filters/filterStore.ts +145 -0
- package/src/components/order-daily-overview/index.tsx +59 -6
- package/src/components/order-daily-overview/return-after-table/ReturnAfterTable.tsx +24 -1
- package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +177 -234
- package/src/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.tsx +63 -6
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnFilter.tsx +5 -47
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +51 -185
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.ts +62 -0
- package/src/components/order-daily-overview/store/store.ts +23 -12
- package/src/components/order-daily-overview/table/ReturnTable.tsx +193 -205
- package/src/components/order-view/details-filters/DetailsFilters.tsx +3 -2
- package/src/components/order-view/details-filters/left-side-filters/dropdowns/PrintDropDown.tsx +57 -46
- package/src/components/order-view/general-information/Status.tsx +1 -1
- package/src/components/order-view/index.tsx +6 -4
- package/src/components/order-view/modalsPopup/UnReceiveProduct.tsx +1 -1
- package/src/components/order-view/order-actions/actions/escalation/EscalationModal.tsx +1 -1
- package/src/components/order-view/order-details/expanded-content/customer-section/RecipientName.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/customer-section/contact-info/ContactEmail.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/customer-section/contact-info/ContactHome.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/customer-section/contact-info/ContactMobile.tsx +1 -1
- package/src/components/order-view/order-details/expanded-content/customer-section/contact-info/ContactWork.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/customer-section/location-info/Address.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/customer-section/location-info/Latitude.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/customer-section/location-info/Longitude.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/customer-section/location-info/Postcode.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/customer-section/location-info/What3words.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/footer/index.tsx +3 -2
- package/src/components/order-view/order-details/expanded-content/index.tsx +1 -1
- package/src/components/order-view/order-details/expanded-content/instruction-section/index.tsx +2 -1
- package/src/components/order-view/order-details/expanded-content/orders-section/Carrier.tsx +7 -1
- package/src/components/order-view/order-details/expanded-content/orders-section/DeliveryDate.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/orders-section/Depot.tsx +14 -1
- package/src/components/order-view/order-details/expanded-content/orders-section/Droptime.tsx +2 -1
- package/src/components/order-view/order-details/expanded-content/orders-section/OrderNumber.tsx +2 -1
- package/src/components/order-view/order-details/expanded-content/orders-section/RecipientReference.tsx +2 -1
- package/src/components/order-view/order-details/expanded-content/orders-section/ScheduleAfter.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/orders-section/VehicleType.tsx +13 -1
- package/src/components/order-view/order-details/expanded-content/services-section/DeliveryPoint.tsx +13 -1
- package/src/components/order-view/order-details/expanded-content/services-section/ServiceType.tsx +13 -1
- package/src/components/order-view/order-details/expanded-content/services-section/TimedService.tsx +14 -1
- package/src/components/order-view/return-client-products/product-table/ReturnProductTable.tsx +2 -2
- package/src/components/order-view/store.ts +40 -12
- package/src/components/store.ts +26 -4
- package/src/components/types.ts +2 -6
- package/dist/components/order-daily-overview/table/InfiniteScrolling.d.ts +0 -5
- package/dist/components/order-daily-overview/table/Return.d.ts +0 -3
- package/dist/components/order-daily-overview/table/table-data/MyTable.d.ts +0 -18
- package/dist/components/order-daily-overview/table/table-data/Table.d.ts +0 -18
- package/src/components/order-daily-overview/table/InfiniteScrolling.tsx +0 -54
- package/src/components/order-daily-overview/table/Return.tsx +0 -156
- package/src/components/order-daily-overview/table/table-data/MyTable.tsx +0 -433
- package/src/components/order-daily-overview/table/table-data/Table.tsx +0 -445
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useEffect, useState, useRef, Suspense } from 'react';
|
|
2
2
|
import { useLocation, Routes, Route } from 'react-router-dom';
|
|
3
3
|
import styled, { css, keyframes } from 'styled-components';
|
|
4
|
-
import { Label as Label$h, Input as Input$1, TextArea, FormSection, displayValueOrNA, SelectDropdown, RadioButtonGroup as RadioButtonGroup$1, Switch, Button as Button$1, useApiHook, Alert, Checkbox as Checkbox$1, AntSelect, SectionHeader, CrossIcon, AntTable, CustomRating, DeleteIcon, CancelationModal, CancelAndCompleteAction, getBaseEndpoint,
|
|
4
|
+
import { Label as Label$h, Input as Input$1, TextArea, FormSection, displayValueOrNA, SelectDropdown, dropdownStyles, RadioButtonGroup as RadioButtonGroup$1, Switch, Button as Button$1, useApiHook, Alert, Checkbox as Checkbox$1, AntSelect, SectionHeader, CrossIcon, AntTable, CustomRating, DeleteIcon, CancelationModal, CancelAndCompleteAction, getBaseEndpoint, filterDropdownStyles, BackgroundModal as BackgroundModal$1 } from '@bjsdistribution/dms-component-library';
|
|
5
5
|
import { useAtom, atom } from 'jotai';
|
|
6
6
|
import { atomWithReducer } from 'jotai/utils';
|
|
7
|
-
import { DatePicker, Upload, message, Input as Input$2, Select, Skeleton, Empty
|
|
7
|
+
import { DatePicker, Upload, message, Input as Input$2, Select, Skeleton, Empty } from 'antd';
|
|
8
8
|
import dayjs from 'dayjs';
|
|
9
9
|
import Scrollbars from 'react-custom-scrollbars-2';
|
|
10
10
|
import { createPortal } from 'react-dom';
|
|
@@ -549,6 +549,9 @@ var IconContainer = /*#__PURE__*/styled.div(_templateObject$1 || (_templateObjec
|
|
|
549
549
|
var currentActionAtom = /*#__PURE__*/atom(undefined);
|
|
550
550
|
var isOnHold = /*#__PURE__*/atom(false);
|
|
551
551
|
var orderStaticDataAtom = /*#__PURE__*/atom({});
|
|
552
|
+
var clientDataAtom = /*#__PURE__*/atom([]);
|
|
553
|
+
var returnDataAtom = /*#__PURE__*/atom([]);
|
|
554
|
+
var returnAfterOrderAtom = /*#__PURE__*/atom([]);
|
|
552
555
|
var ordersInitialValue = {
|
|
553
556
|
depot_id: null,
|
|
554
557
|
gsit_order_id: null,
|
|
@@ -622,6 +625,15 @@ function useCurrentAction() {
|
|
|
622
625
|
function useOrderStaticData() {
|
|
623
626
|
return useAtom(orderStaticDataAtom);
|
|
624
627
|
}
|
|
628
|
+
function useClientData() {
|
|
629
|
+
return useAtom(clientDataAtom);
|
|
630
|
+
}
|
|
631
|
+
function useReturnData() {
|
|
632
|
+
return useAtom(returnDataAtom);
|
|
633
|
+
}
|
|
634
|
+
function useReturnAfterOrderData() {
|
|
635
|
+
return useAtom(returnAfterOrderAtom);
|
|
636
|
+
}
|
|
625
637
|
function useIsOnHoldOrder() {
|
|
626
638
|
return useAtom(isOnHold);
|
|
627
639
|
}
|
|
@@ -752,7 +764,7 @@ function RecipientName() {
|
|
|
752
764
|
}
|
|
753
765
|
var Wrapper = /*#__PURE__*/styled.div(_templateObject$2 || (_templateObject$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 5px;\n"])));
|
|
754
766
|
var Container$1 = /*#__PURE__*/styled.div(_templateObject2$1 || (_templateObject2$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n"])));
|
|
755
|
-
var InputStyled = /*#__PURE__*/styled(Input$1)(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* Hide autofill suggestions in Safari */\n &:-webkit-autofill {\n -webkit-box-shadow: 0 0 0 100px white inset;\n -webkit-text-fill-color: black;\n }\n\n &:-webkit-autofill::first-line {\n font-family: 'inherit';\n font-size: inherit;\n }\n"])));
|
|
767
|
+
var InputStyled = /*#__PURE__*/styled(Input$1)(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* Hide autofill suggestions in Safari */\n border-radius: 25px;\n &:-webkit-autofill {\n -webkit-box-shadow: 0 0 0 100px white inset;\n -webkit-text-fill-color: black;\n }\n\n &:-webkit-autofill::first-line {\n font-family: 'inherit';\n font-size: inherit;\n }\n"])));
|
|
756
768
|
|
|
757
769
|
var _templateObject$3, _templateObject2$2, _templateObject3$1;
|
|
758
770
|
function Address() {
|
|
@@ -790,7 +802,7 @@ function Address() {
|
|
|
790
802
|
}
|
|
791
803
|
var Wrapper$1 = /*#__PURE__*/styled.div(_templateObject$3 || (_templateObject$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 5px;\n"])));
|
|
792
804
|
var Container$2 = /*#__PURE__*/styled.div(_templateObject2$2 || (_templateObject2$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n"])));
|
|
793
|
-
var TextContainer = /*#__PURE__*/styled(TextArea)(_templateObject3$1 || (_templateObject3$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n resize: none;\n height: 70%;\n"])));
|
|
805
|
+
var TextContainer = /*#__PURE__*/styled(TextArea)(_templateObject3$1 || (_templateObject3$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n resize: none;\n height: 70%;\n border-radius: 15px;\n"])));
|
|
794
806
|
|
|
795
807
|
var _templateObject$4, _templateObject2$3;
|
|
796
808
|
// import { LocationIcon } from '../../../../assets/icons';
|
|
@@ -826,7 +838,10 @@ function Postcode() {
|
|
|
826
838
|
placeholder: "Enter Postcode",
|
|
827
839
|
value: (orderRecipient == null ? void 0 : orderRecipient.postcode) || '',
|
|
828
840
|
onChange: onChange,
|
|
829
|
-
autoComplete: "off"
|
|
841
|
+
autoComplete: "off",
|
|
842
|
+
style: {
|
|
843
|
+
borderRadius: '25px'
|
|
844
|
+
}
|
|
830
845
|
}));
|
|
831
846
|
}
|
|
832
847
|
var Wrapper$2 = /*#__PURE__*/styled.div(_templateObject$4 || (_templateObject$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 5px;\n"])));
|
|
@@ -895,7 +910,7 @@ function Latitude() {
|
|
|
895
910
|
onChange: onChange
|
|
896
911
|
}));
|
|
897
912
|
}
|
|
898
|
-
var CustomInput = /*#__PURE__*/styled(Input$1)(_templateObject$5 || (_templateObject$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n &:focus-visible {\n outline: none;\n }\n"])));
|
|
913
|
+
var CustomInput = /*#__PURE__*/styled(Input$1)(_templateObject$5 || (_templateObject$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 25px;\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n &:focus-visible {\n outline: none;\n }\n"])));
|
|
899
914
|
var Container$4 = /*#__PURE__*/styled.div(_templateObject2$4 || (_templateObject2$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n"])));
|
|
900
915
|
|
|
901
916
|
var _templateObject$6, _templateObject2$5;
|
|
@@ -929,7 +944,7 @@ function Longitude() {
|
|
|
929
944
|
onChange: onChange
|
|
930
945
|
}));
|
|
931
946
|
}
|
|
932
|
-
var CustomInput$1 = /*#__PURE__*/styled(Input$1)(_templateObject$6 || (_templateObject$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n &:focus-visible {\n outline: none;\n }\n"])));
|
|
947
|
+
var CustomInput$1 = /*#__PURE__*/styled(Input$1)(_templateObject$6 || (_templateObject$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 25px;\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n &:focus-visible {\n outline: none;\n }\n"])));
|
|
933
948
|
var Container$5 = /*#__PURE__*/styled.div(_templateObject2$5 || (_templateObject2$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n"])));
|
|
934
949
|
|
|
935
950
|
var _templateObject$7, _templateObject2$6, _templateObject3$2, _templateObject4, _templateObject5;
|
|
@@ -977,7 +992,7 @@ function What3words() {
|
|
|
977
992
|
}
|
|
978
993
|
var What3wordsPrefix = /*#__PURE__*/styled.div(_templateObject$7 || (_templateObject$7 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: absolute;\n top: 13px;\n left: 12px;\n"])));
|
|
979
994
|
var Wrapper$3 = /*#__PURE__*/styled.div(_templateObject2$6 || (_templateObject2$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n"])));
|
|
980
|
-
var CustomInput$2 = /*#__PURE__*/styled(Input$1)(_templateObject3$2 || (_templateObject3$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n &:focus-visible {\n outline: none;\n }\n padding-left: 40px;\n"])));
|
|
995
|
+
var CustomInput$2 = /*#__PURE__*/styled(Input$1)(_templateObject3$2 || (_templateObject3$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 25px;\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n &:focus-visible {\n outline: none;\n }\n padding-left: 40px;\n"])));
|
|
981
996
|
var Container$6 = /*#__PURE__*/styled.div(_templateObject4 || (_templateObject4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n"])));
|
|
982
997
|
var ErrorText = /*#__PURE__*/styled.span(_templateObject5 || (_templateObject5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: red;\n font-size: 0.85rem;\n margin-top: 4px;\n"])));
|
|
983
998
|
|
|
@@ -1029,7 +1044,7 @@ function ContactHome() {
|
|
|
1029
1044
|
})));
|
|
1030
1045
|
}
|
|
1031
1046
|
var Wrapper$4 = /*#__PURE__*/styled.div(_templateObject$9 || (_templateObject$9 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 5px;\n"])));
|
|
1032
|
-
var CustomInput$3 = /*#__PURE__*/styled(Input$1)(_templateObject2$8 || (_templateObject2$8 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 80%;\n // @media (max-width: 1024px) {\n // width: 80%;\n // }\n\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n &:focus-visible {\n outline: none;\n }\n"])));
|
|
1047
|
+
var CustomInput$3 = /*#__PURE__*/styled(Input$1)(_templateObject2$8 || (_templateObject2$8 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 80%;\n border-radius: 25px;\n // @media (max-width: 1024px) {\n // width: 80%;\n // }\n\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n &:focus-visible {\n outline: none;\n }\n"])));
|
|
1033
1048
|
var InputContainer = /*#__PURE__*/styled.div(_templateObject3$4 || (_templateObject3$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 7px;\n align-items: center;\n"])));
|
|
1034
1049
|
var MainContainer = /*#__PURE__*/styled.div(_templateObject4$1 || (_templateObject4$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n"])));
|
|
1035
1050
|
|
|
@@ -1073,7 +1088,7 @@ function ContactWork() {
|
|
|
1073
1088
|
}
|
|
1074
1089
|
var InputContainer$1 = /*#__PURE__*/styled.div(_templateObject$a || (_templateObject$a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 7px;\n align-items: center;\n"])));
|
|
1075
1090
|
var Wrapper$5 = /*#__PURE__*/styled.div(_templateObject2$9 || (_templateObject2$9 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 5px;\n"])));
|
|
1076
|
-
var CustomInput$4 = /*#__PURE__*/styled(Input$1)(_templateObject3$5 || (_templateObject3$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 100%;\n\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n &:focus-visible {\n outline: none;\n }\n"])));
|
|
1091
|
+
var CustomInput$4 = /*#__PURE__*/styled(Input$1)(_templateObject3$5 || (_templateObject3$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 25px;\n width: 100%;\n\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n &:focus-visible {\n outline: none;\n }\n"])));
|
|
1077
1092
|
var Container$8 = /*#__PURE__*/styled.div(_templateObject4$2 || (_templateObject4$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n"])));
|
|
1078
1093
|
|
|
1079
1094
|
var _templateObject$b;
|
|
@@ -1122,7 +1137,7 @@ function ContactMobile() {
|
|
|
1122
1137
|
}
|
|
1123
1138
|
var InputContainer$2 = /*#__PURE__*/styled.div(_templateObject$c || (_templateObject$c = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 7px;\n align-items: center;\n"])));
|
|
1124
1139
|
var Wrapper$6 = /*#__PURE__*/styled.div(_templateObject2$a || (_templateObject2$a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 5px;\n"])));
|
|
1125
|
-
var CustomInput$5 = /*#__PURE__*/styled(Input$1)(_templateObject3$6 || (_templateObject3$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 80%;\n
|
|
1140
|
+
var CustomInput$5 = /*#__PURE__*/styled(Input$1)(_templateObject3$6 || (_templateObject3$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 80%;\n border-radius: 25px;\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n &:focus-visible {\n outline: none;\n }\n"])));
|
|
1126
1141
|
var Container$a = /*#__PURE__*/styled.div(_templateObject4$3 || (_templateObject4$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n"])));
|
|
1127
1142
|
|
|
1128
1143
|
var _templateObject$d, _templateObject2$b, _templateObject3$7;
|
|
@@ -1169,7 +1184,10 @@ function ContactEmail() {
|
|
|
1169
1184
|
type: "email",
|
|
1170
1185
|
placeholder: "Email",
|
|
1171
1186
|
value: (orderRecipient == null ? void 0 : orderRecipient.contact_email) || '',
|
|
1172
|
-
onChange: onChange
|
|
1187
|
+
onChange: onChange,
|
|
1188
|
+
style: {
|
|
1189
|
+
borderRadius: '25px'
|
|
1190
|
+
}
|
|
1173
1191
|
}), errors.emailError && React.createElement(ErrorText$1, null, errors.emailError));
|
|
1174
1192
|
}
|
|
1175
1193
|
var Wrapper$7 = /*#__PURE__*/styled.div(_templateObject$d || (_templateObject$d = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 5px;\n"])));
|
|
@@ -1226,7 +1244,10 @@ function RecipientReference() {
|
|
|
1226
1244
|
type: "text",
|
|
1227
1245
|
placeholder: "Enter Recipient Reference",
|
|
1228
1246
|
value: orderDetails.recipient_reference || '',
|
|
1229
|
-
onChange: onChange
|
|
1247
|
+
onChange: onChange,
|
|
1248
|
+
style: {
|
|
1249
|
+
borderRadius: '25px'
|
|
1250
|
+
}
|
|
1230
1251
|
}));
|
|
1231
1252
|
}
|
|
1232
1253
|
var Container$e = /*#__PURE__*/styled.div(_templateObject$h || (_templateObject$h = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n"])));
|
|
@@ -1256,7 +1277,15 @@ function DepotDropdown() {
|
|
|
1256
1277
|
return x.value === orderDetails.depot_id;
|
|
1257
1278
|
}),
|
|
1258
1279
|
options: depotOptions || [],
|
|
1259
|
-
onChange: onChange
|
|
1280
|
+
onChange: onChange,
|
|
1281
|
+
styles: _extends({}, dropdownStyles, {
|
|
1282
|
+
control: function control(styles) {
|
|
1283
|
+
return _extends({}, styles, {
|
|
1284
|
+
borderRadius: '25px',
|
|
1285
|
+
cursor: 'pointer'
|
|
1286
|
+
});
|
|
1287
|
+
}
|
|
1288
|
+
})
|
|
1260
1289
|
}));
|
|
1261
1290
|
}
|
|
1262
1291
|
var FormContainer = /*#__PURE__*/styled.div(_templateObject$i || (_templateObject$i = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n"])));
|
|
@@ -1292,7 +1321,7 @@ function Droptime() {
|
|
|
1292
1321
|
onChange: onChange
|
|
1293
1322
|
}));
|
|
1294
1323
|
}
|
|
1295
|
-
var CustomInput$6 = /*#__PURE__*/styled(Input$1)(_templateObject$j || (_templateObject$j = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n &:focus-visible {\n outline: none;\n }\n"])));
|
|
1324
|
+
var CustomInput$6 = /*#__PURE__*/styled(Input$1)(_templateObject$j || (_templateObject$j = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 25px;\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n &:focus-visible {\n outline: none;\n }\n"])));
|
|
1296
1325
|
var Container$f = /*#__PURE__*/styled.div(_templateObject2$f || (_templateObject2$f = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n"])));
|
|
1297
1326
|
|
|
1298
1327
|
var _templateObject$k;
|
|
@@ -1332,7 +1361,10 @@ function DeliveryDate() {
|
|
|
1332
1361
|
}), React.createElement(DatePicker, {
|
|
1333
1362
|
onChange: onChange,
|
|
1334
1363
|
value: actionDate === null ? actionDate : dayjs(actionDate),
|
|
1335
|
-
format: "DD/MM/YY"
|
|
1364
|
+
format: "DD/MM/YY",
|
|
1365
|
+
style: {
|
|
1366
|
+
borderRadius: '25px'
|
|
1367
|
+
}
|
|
1336
1368
|
}));
|
|
1337
1369
|
}
|
|
1338
1370
|
var MainContainer$1 = /*#__PURE__*/styled.div(_templateObject$k || (_templateObject$k = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n"])));
|
|
@@ -1349,7 +1381,10 @@ function Carrier() {
|
|
|
1349
1381
|
name: "carrier",
|
|
1350
1382
|
type: "text",
|
|
1351
1383
|
placeholder: "Carrier",
|
|
1352
|
-
disabled: true
|
|
1384
|
+
disabled: true,
|
|
1385
|
+
style: {
|
|
1386
|
+
borderRadius: '25PX'
|
|
1387
|
+
}
|
|
1353
1388
|
}));
|
|
1354
1389
|
}
|
|
1355
1390
|
var Wrapper$9 = /*#__PURE__*/styled.div(_templateObject$l || (_templateObject$l = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 5px;\n"])));
|
|
@@ -1379,7 +1414,10 @@ function OrderNumber() {
|
|
|
1379
1414
|
type: "text",
|
|
1380
1415
|
placeholder: "Order Number",
|
|
1381
1416
|
value: (orderDetails == null ? void 0 : orderDetails.order_number) || '',
|
|
1382
|
-
onChange: onChange
|
|
1417
|
+
onChange: onChange,
|
|
1418
|
+
style: {
|
|
1419
|
+
borderRadius: '25px'
|
|
1420
|
+
}
|
|
1383
1421
|
}));
|
|
1384
1422
|
}
|
|
1385
1423
|
var Wrapper$a = /*#__PURE__*/styled.div(_templateObject$m || (_templateObject$m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 5px;\n"])));
|
|
@@ -1422,7 +1460,10 @@ function ScheduleAfter() {
|
|
|
1422
1460
|
}), React.createElement(DatePicker, {
|
|
1423
1461
|
onChange: onChange,
|
|
1424
1462
|
value: scheduleDate === null ? scheduleDate : dayjs(scheduleDate),
|
|
1425
|
-
format: "DD/MM/YY"
|
|
1463
|
+
format: "DD/MM/YY",
|
|
1464
|
+
style: {
|
|
1465
|
+
borderRadius: '25px'
|
|
1466
|
+
}
|
|
1426
1467
|
}));
|
|
1427
1468
|
}
|
|
1428
1469
|
var MainContainer$2 = /*#__PURE__*/styled.div(_templateObject$n || (_templateObject$n = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n"])));
|
|
@@ -1446,7 +1487,15 @@ function VehicleTypeDropdown() {
|
|
|
1446
1487
|
inputId: "vehicleType",
|
|
1447
1488
|
openMenuOnFocus: true,
|
|
1448
1489
|
isDisabled: true,
|
|
1449
|
-
value: vehicleTypeOptions[1]
|
|
1490
|
+
value: vehicleTypeOptions[1],
|
|
1491
|
+
styles: _extends({}, dropdownStyles, {
|
|
1492
|
+
control: function control(styles) {
|
|
1493
|
+
return _extends({}, styles, {
|
|
1494
|
+
borderRadius: '25px',
|
|
1495
|
+
cursor: 'pointer'
|
|
1496
|
+
});
|
|
1497
|
+
}
|
|
1498
|
+
})
|
|
1450
1499
|
}));
|
|
1451
1500
|
}
|
|
1452
1501
|
var FormContainer$1 = /*#__PURE__*/styled.div(_templateObject$o || (_templateObject$o = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n"])));
|
|
@@ -1543,8 +1592,8 @@ function InstructionSection() {
|
|
|
1543
1592
|
label: "Instructions / Notes"
|
|
1544
1593
|
}), React.createElement(FormInputs$2, null, React.createElement(OrderStatusNote, null), React.createElement(DeliveryInstructions, null), React.createElement(OtherInstructions, null)));
|
|
1545
1594
|
}
|
|
1546
|
-
var FormInputs$2 = /*#__PURE__*/styled.div(_templateObject$t || (_templateObject$t = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap:
|
|
1547
|
-
var CustomFormSection$2 = /*#__PURE__*/styled(FormSection)(_templateObject2$m || (_templateObject2$m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n border-radius: 8px;\n background: #f8fafc;\n box-shadow: 0px 1px 3px 0px rgba(16, 24, 40, 0.1);\n"])));
|
|
1595
|
+
var FormInputs$2 = /*#__PURE__*/styled.div(_templateObject$t || (_templateObject$t = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 7px;\n flex: 1;\n"])));
|
|
1596
|
+
var CustomFormSection$2 = /*#__PURE__*/styled(FormSection)(_templateObject2$m || (_templateObject2$m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n border-radius: 8px;\n background: #f8fafc;\n box-shadow: 0px 1px 3px 0px rgba(16, 24, 40, 0.1);\n padding: 10px !important;\n"])));
|
|
1548
1597
|
|
|
1549
1598
|
var _templateObject$u;
|
|
1550
1599
|
function TimedServiceDropdown() {
|
|
@@ -1580,7 +1629,15 @@ function TimedServiceDropdown() {
|
|
|
1580
1629
|
return f.value === timesServiceId;
|
|
1581
1630
|
}),
|
|
1582
1631
|
inputId: "timedServiceDropdown",
|
|
1583
|
-
onChange: onChange
|
|
1632
|
+
onChange: onChange,
|
|
1633
|
+
styles: _extends({}, dropdownStyles, {
|
|
1634
|
+
control: function control(styles) {
|
|
1635
|
+
return _extends({}, styles, {
|
|
1636
|
+
borderRadius: '25px',
|
|
1637
|
+
cursor: 'pointer'
|
|
1638
|
+
});
|
|
1639
|
+
}
|
|
1640
|
+
})
|
|
1584
1641
|
}));
|
|
1585
1642
|
}
|
|
1586
1643
|
var Container$l = /*#__PURE__*/styled.div(_templateObject$u || (_templateObject$u = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n"])));
|
|
@@ -1617,7 +1674,15 @@ function ServiceTypeDropdown() {
|
|
|
1617
1674
|
}),
|
|
1618
1675
|
inputId: "serviceTypeDropdown",
|
|
1619
1676
|
openMenuOnFocus: true,
|
|
1620
|
-
onChange: onChange
|
|
1677
|
+
onChange: onChange,
|
|
1678
|
+
styles: _extends({}, dropdownStyles, {
|
|
1679
|
+
control: function control(styles) {
|
|
1680
|
+
return _extends({}, styles, {
|
|
1681
|
+
borderRadius: '25px',
|
|
1682
|
+
cursor: 'pointer'
|
|
1683
|
+
});
|
|
1684
|
+
}
|
|
1685
|
+
})
|
|
1621
1686
|
}));
|
|
1622
1687
|
}
|
|
1623
1688
|
var Container$m = /*#__PURE__*/styled.div(_templateObject$v || (_templateObject$v = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n"])));
|
|
@@ -1657,7 +1722,15 @@ function DeliveryPointDropdown() {
|
|
|
1657
1722
|
return f.value === deliveryPointId;
|
|
1658
1723
|
}),
|
|
1659
1724
|
openMenuOnFocus: true,
|
|
1660
|
-
onChange: onChange
|
|
1725
|
+
onChange: onChange,
|
|
1726
|
+
styles: _extends({}, dropdownStyles, {
|
|
1727
|
+
control: function control(styles) {
|
|
1728
|
+
return _extends({}, styles, {
|
|
1729
|
+
borderRadius: '25px',
|
|
1730
|
+
cursor: 'pointer'
|
|
1731
|
+
});
|
|
1732
|
+
}
|
|
1733
|
+
})
|
|
1661
1734
|
}));
|
|
1662
1735
|
}
|
|
1663
1736
|
var Container$n = /*#__PURE__*/styled.div(_templateObject$w || (_templateObject$w = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 6px;\n flex: 1;\n"])));
|
|
@@ -1990,14 +2063,14 @@ function OrderDetailsFooter() {
|
|
|
1990
2063
|
onClick: onSave
|
|
1991
2064
|
}, "Save Details"));
|
|
1992
2065
|
}
|
|
1993
|
-
var Container$t = /*#__PURE__*/styled.div(_templateObject$D || (_templateObject$D = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n padding: 10px 15px;\n align-items: flex-start;\n border-top: 1px solid #edebe8;\n background: #f8fafc;\n /* margin: 0px -15px -15px -15px; */\n border-radius: 0px 0px 8px 8px;\n margin-bottom: 22px
|
|
2066
|
+
var Container$t = /*#__PURE__*/styled.div(_templateObject$D || (_templateObject$D = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n padding: 10px 15px;\n align-items: flex-start;\n border-top: 1px solid #edebe8;\n background: #f8fafc;\n /* margin: 0px -15px -15px -15px; */\n border-radius: 0px 0px 8px 8px;\n /* margin-bottom: 22px; */\n position: relative;\n align-items: center;\n /* top: 21px; */\n"])));
|
|
1994
2067
|
|
|
1995
2068
|
var _templateObject$E, _templateObject2$q, _templateObject3$d;
|
|
1996
2069
|
function ExpandedContent() {
|
|
1997
2070
|
return React.createElement(MainContainer$3, null, React.createElement(Container$u, null, React.createElement(HalfWidth, null, React.createElement(CustomerSection, null)), React.createElement(HalfWidth, null, React.createElement(OrdersSection, null)), React.createElement(InstructionSection, null)), React.createElement(ServicesSection, null), React.createElement(OrderDetailsFooter, null));
|
|
1998
2071
|
}
|
|
1999
2072
|
var HalfWidth = /*#__PURE__*/styled.div(_templateObject$E || (_templateObject$E = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 20px;\n\n @media (min-width: 769px) {\n flex-direction: row; /* Change to row for large screens */\n width: 50%;\n }\n\n @media (min-width: 1024px) {\n width: auto;\n }\n\n @media (min-width: 1440px) {\n width: 50%;\n }\n"])));
|
|
2000
|
-
var Container$u = /*#__PURE__*/styled.div(_templateObject2$q || (_templateObject2$q = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n gap:
|
|
2073
|
+
var Container$u = /*#__PURE__*/styled.div(_templateObject2$q || (_templateObject2$q = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n gap: 20px;\n justify-content: space-between;\n\n @media (min-width: 769px) {\n flex-direction: row;\n }\n\n @media (min-width: 1024px) {\n justify-content: flex-start;\n }\n"])));
|
|
2001
2074
|
// const InstructionContainer = styled.div`
|
|
2002
2075
|
// display: flex;
|
|
2003
2076
|
// justify-content: center;
|
|
@@ -2850,7 +2923,7 @@ var renderIcon = function renderIcon(value, orderStatus) {
|
|
|
2850
2923
|
};
|
|
2851
2924
|
var BoxContainer = /*#__PURE__*/styled.div(_templateObject$R || (_templateObject$R = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border: 1px solid #e3e3e3;\n display: flex;\n justify-content: space-evenly;\n border-radius: 8px;\n background: #f8fafc;\n align-items: center;\n height: 5%;\n"])));
|
|
2852
2925
|
var Heading = /*#__PURE__*/styled.div(_templateObject2$x || (_templateObject2$x = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-family: 'lato', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 18px;\n"])));
|
|
2853
|
-
var Container$A = /*#__PURE__*/styled.div(_templateObject3$i || (_templateObject3$i = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n
|
|
2926
|
+
var Container$A = /*#__PURE__*/styled.div(_templateObject3$i || (_templateObject3$i = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: 35px;\n"])));
|
|
2854
2927
|
var TextContainer$1 = /*#__PURE__*/styled.div(_templateObject4$6 || (_templateObject4$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n gap: 10px;\n display: flex;\n align-items: center;\n"])));
|
|
2855
2928
|
|
|
2856
2929
|
var _templateObject$S;
|
|
@@ -2860,28 +2933,11 @@ function GeneralHeader() {
|
|
|
2860
2933
|
}
|
|
2861
2934
|
var Section = /*#__PURE__*/styled.div(_templateObject$S || (_templateObject$S = /*#__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"])));
|
|
2862
2935
|
|
|
2863
|
-
var _templateObject19, _templateObject20;
|
|
2864
|
-
var StyledTable = /*#__PURE__*/styled.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 }\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 }\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"])));
|
|
2936
|
+
var _templateObject19, _templateObject20, _templateObject21;
|
|
2937
|
+
var StyledTable = /*#__PURE__*/styled.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 }\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 }\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"])));
|
|
2865
2938
|
// Styled components
|
|
2866
2939
|
var StyledTableWrapper = /*#__PURE__*/styled.div(_templateObject20 || (_templateObject20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n overflow-x: auto;\n max-height: calc(100vh - 396px);\n scrollbar-width: none;\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"])));
|
|
2867
|
-
|
|
2868
|
-
var staticData = /*#__PURE__*/atom({});
|
|
2869
|
-
function useStaticData() {
|
|
2870
|
-
return useAtom(staticData);
|
|
2871
|
-
}
|
|
2872
|
-
var emailInvoiceData = /*#__PURE__*/atom({});
|
|
2873
|
-
function useEmailInvoice() {
|
|
2874
|
-
return useAtom(emailInvoiceData);
|
|
2875
|
-
}
|
|
2876
|
-
var selectedEmailList = /*#__PURE__*/atom([]);
|
|
2877
|
-
function useSelectedEmail() {
|
|
2878
|
-
return useAtom(selectedEmailList);
|
|
2879
|
-
}
|
|
2880
|
-
// Sticky menu state
|
|
2881
|
-
var stickyStatus = /*#__PURE__*/atom(false);
|
|
2882
|
-
var useStickyStatus = function useStickyStatus() {
|
|
2883
|
-
return useAtom(stickyStatus);
|
|
2884
|
-
};
|
|
2940
|
+
var CustomDrop = /*#__PURE__*/styled.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"])));
|
|
2885
2941
|
|
|
2886
2942
|
var ActionIcon = function ActionIcon() {
|
|
2887
2943
|
return React.createElement("svg", {
|
|
@@ -2900,10 +2956,32 @@ var ActionIcon = function ActionIcon() {
|
|
|
2900
2956
|
}));
|
|
2901
2957
|
};
|
|
2902
2958
|
|
|
2959
|
+
var customerData = /*#__PURE__*/atom([]);
|
|
2960
|
+
var actionTypeData = /*#__PURE__*/atom([]);
|
|
2961
|
+
var locationData = /*#__PURE__*/atom([]);
|
|
2962
|
+
var selectedOrderlList = /*#__PURE__*/atom([]);
|
|
2963
|
+
function useSelectedOrders() {
|
|
2964
|
+
return useAtom(selectedOrderlList);
|
|
2965
|
+
}
|
|
2966
|
+
// Sticky menu state
|
|
2967
|
+
var stickyStatus = /*#__PURE__*/atom(false);
|
|
2968
|
+
var useStickyStatus = function useStickyStatus() {
|
|
2969
|
+
return useAtom(stickyStatus);
|
|
2970
|
+
};
|
|
2971
|
+
function useCustomerData() {
|
|
2972
|
+
return useAtom(customerData);
|
|
2973
|
+
}
|
|
2974
|
+
function useActionType() {
|
|
2975
|
+
return useAtom(actionTypeData);
|
|
2976
|
+
}
|
|
2977
|
+
function useLocationData() {
|
|
2978
|
+
return useAtom(locationData);
|
|
2979
|
+
}
|
|
2980
|
+
|
|
2903
2981
|
var ReturnProductTable = function ReturnProductTable() {
|
|
2904
|
-
var
|
|
2905
|
-
selectedInvoices =
|
|
2906
|
-
setSelectedInvoices =
|
|
2982
|
+
var _useSelectedOrders = useSelectedOrders(),
|
|
2983
|
+
selectedInvoices = _useSelectedOrders[0],
|
|
2984
|
+
setSelectedInvoices = _useSelectedOrders[1];
|
|
2907
2985
|
var _useState = useState(false),
|
|
2908
2986
|
selectAll = _useState[0],
|
|
2909
2987
|
setSelectAll = _useState[1];
|
|
@@ -3066,7 +3144,11 @@ function CollapsedContent$2() {
|
|
|
3066
3144
|
// `;
|
|
3067
3145
|
var Container$E = /*#__PURE__*/styled.div(_templateObject$W || (_templateObject$W = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n gap: 30px;\n"])));
|
|
3068
3146
|
|
|
3069
|
-
//
|
|
3147
|
+
// Dropdown
|
|
3148
|
+
var PrintOptionTOggle = /*#__PURE__*/atom(null);
|
|
3149
|
+
var usePrintOptionTOggle = function usePrintOptionTOggle() {
|
|
3150
|
+
return useAtom(PrintOptionTOggle);
|
|
3151
|
+
};
|
|
3070
3152
|
// Overview Table
|
|
3071
3153
|
var atomRoutesTable = /*#__PURE__*/atom([]);
|
|
3072
3154
|
var useRoutesTable = function useRoutesTable() {
|
|
@@ -3076,6 +3158,22 @@ var loading = /*#__PURE__*/atom(false);
|
|
|
3076
3158
|
var useLoading = function useLoading() {
|
|
3077
3159
|
return useAtom(loading);
|
|
3078
3160
|
};
|
|
3161
|
+
var selectedAction = /*#__PURE__*/atom(null);
|
|
3162
|
+
function useSelectedAction() {
|
|
3163
|
+
return useAtom(selectedAction);
|
|
3164
|
+
}
|
|
3165
|
+
var selectedLocation = /*#__PURE__*/atom(null);
|
|
3166
|
+
function useSelectedLocation() {
|
|
3167
|
+
return useAtom(selectedLocation);
|
|
3168
|
+
}
|
|
3169
|
+
var selectedClient = /*#__PURE__*/atom(null);
|
|
3170
|
+
function useSelectedClient() {
|
|
3171
|
+
return useAtom(selectedClient);
|
|
3172
|
+
}
|
|
3173
|
+
var clientTableName = /*#__PURE__*/atom(null);
|
|
3174
|
+
function useTableName() {
|
|
3175
|
+
return useAtom(clientTableName);
|
|
3176
|
+
}
|
|
3079
3177
|
// Paginations
|
|
3080
3178
|
var atomPaginationData = /*#__PURE__*/atom({
|
|
3081
3179
|
firstPage: 1,
|
|
@@ -3097,6 +3195,7 @@ var countStatus = /*#__PURE__*/atom([]);
|
|
|
3097
3195
|
var useCountData = function useCountData() {
|
|
3098
3196
|
return useAtom(countStatus);
|
|
3099
3197
|
};
|
|
3198
|
+
//
|
|
3100
3199
|
// ROUTE DETAILS PAGE STATES ->
|
|
3101
3200
|
// const orderId = atom<number | undefined>(undefined);
|
|
3102
3201
|
// export const useOrderId = () => {
|
|
@@ -7535,10 +7634,154 @@ var Details = function Details() {
|
|
|
7535
7634
|
var DetailsContainer = /*#__PURE__*/styled.div(_templateObject$1V || (_templateObject$1V = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 10px;\n > svg {\n transform: scale(0.6);\n }\n"])));
|
|
7536
7635
|
var Typo = /*#__PURE__*/styled.div(_templateObject2$1k || (_templateObject2$1k = /*#__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"])));
|
|
7537
7636
|
|
|
7538
|
-
var
|
|
7539
|
-
|
|
7637
|
+
var CollectionLabelIcon = function CollectionLabelIcon() {
|
|
7638
|
+
return React.createElement("svg", {
|
|
7639
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7640
|
+
width: "16",
|
|
7641
|
+
height: "16",
|
|
7642
|
+
viewBox: "0 0 16 16",
|
|
7643
|
+
fill: "none"
|
|
7644
|
+
}, React.createElement("g", {
|
|
7645
|
+
clipPath: "url(#clip0_137_17799)"
|
|
7646
|
+
}, React.createElement("path", {
|
|
7647
|
+
d: "M4.31833 0.0159435H12.1831C12.6855 0.0335435 13.0735 0.179144 13.3087 0.503944C13.4959 0.761544 13.5927 1.08634 13.6127 1.49674L13.6119 3.17114H14.5711C15.0727 3.18874 15.4607 3.33354 15.6959 3.65834C15.8831 3.91594 15.9799 4.24154 15.9999 4.65194V11.1295C15.9983 11.6303 15.9631 12.0047 15.8247 12.2639C15.6103 12.6639 15.2135 12.8423 14.5527 12.8951L13.6127 12.8943V14.4535C13.6127 14.8191 13.5471 15.1407 13.4071 15.4135C13.2103 15.7959 12.8351 15.9887 12.3535 15.9999H3.77993C3.30473 15.9999 2.91433 15.8263 2.67113 15.4703C2.47673 15.1847 2.37513 14.8471 2.36313 14.4535V12.8943H1.54713C0.957534 12.8943 0.507134 12.7183 0.267934 12.3087C0.0895338 12.0031 0.00633383 11.6119 0.00153383 11.1279V4.81994C-0.0160662 4.31114 0.0879338 3.89434 0.341534 3.58554C0.647934 3.21114 1.17913 3.11034 1.90633 3.17114L2.41273 3.17034L2.41353 1.66474C2.39593 1.15594 2.49993 0.739944 2.75353 0.430344C3.05993 0.0567435 3.59193 -0.0440565 4.31833 0.0159435ZM12.5415 9.72074H3.43433V14.4367C3.43993 14.6183 3.48233 14.7567 3.55593 14.8655C3.58233 14.9039 3.63593 14.9279 3.77993 14.9279H12.3407C12.3754 14.9275 12.4101 14.9259 12.4447 14.9231H12.4543C12.5103 14.8151 12.5423 14.6591 12.5423 14.4535L12.5415 9.72074ZM11.4391 13.3479C11.5813 13.3479 11.7176 13.4044 11.8181 13.5049C11.9187 13.6055 11.9751 13.7418 11.9751 13.8839C11.9751 14.0261 11.9187 14.1624 11.8181 14.263C11.7176 14.3635 11.5813 14.4199 11.4391 14.4199H4.57513C4.43298 14.4199 4.29664 14.3635 4.19612 14.263C4.0956 14.1624 4.03913 14.0261 4.03913 13.8839C4.03913 13.7418 4.0956 13.6055 4.19612 13.5049C4.29664 13.4044 4.43298 13.3479 4.57513 13.3479H11.4391ZM11.4391 11.8303C11.5813 11.8303 11.7176 11.8868 11.8181 11.9873C11.9187 12.0879 11.9751 12.2242 11.9751 12.3663C11.9751 12.5085 11.9187 12.6448 11.8181 12.7454C11.7176 12.8459 11.5813 12.9023 11.4391 12.9023H4.57513C4.43298 12.9023 4.29664 12.8459 4.19612 12.7454C4.0956 12.6448 4.03913 12.5085 4.03913 12.3663C4.03913 12.2242 4.0956 12.0879 4.19612 11.9873C4.29664 11.8868 4.43298 11.8303 4.57513 11.8303H11.4391ZM1.86313 4.24154C1.40793 4.24314 1.30313 4.24314 1.20713 4.35354C1.11113 4.46554 1.06313 4.51194 1.07273 4.80154V11.1231C1.07593 11.4303 1.08553 11.5775 1.15513 11.6895C1.22473 11.8015 1.29913 11.8231 1.54713 11.8231L2.36313 11.8223V9.72074H2.25593C2.11378 9.72074 1.97744 9.66427 1.87692 9.56375C1.7764 9.46323 1.71993 9.3269 1.71993 9.18474C1.71993 9.04259 1.7764 8.90625 1.87692 8.80573C1.97744 8.70522 2.11378 8.64874 2.25593 8.64874H13.7791C13.9213 8.64874 14.0576 8.70522 14.1581 8.80573C14.2587 8.90625 14.3151 9.04259 14.3151 9.18474C14.3151 9.3269 14.2587 9.46323 14.1581 9.56375C14.0576 9.66427 13.9213 9.72074 13.7791 9.72074H13.6127V11.8223L14.5087 11.8247C14.6751 11.8111 14.7703 11.8287 14.8567 11.7383C14.9431 11.6471 14.9279 11.4263 14.9287 11.1279V4.67834C14.9199 4.48794 14.9023 4.42394 14.8431 4.35434C14.7839 4.28394 14.7391 4.25034 14.5527 4.24314L1.86313 4.24154ZM11.4391 10.3135C11.5813 10.3135 11.7176 10.37 11.8181 10.4705C11.9187 10.5711 11.9751 10.7074 11.9751 10.8495C11.9751 10.9917 11.9187 11.128 11.8181 11.2286C11.7176 11.3291 11.5813 11.3855 11.4391 11.3855H4.57513C4.43298 11.3855 4.29664 11.3291 4.19612 11.2286C4.0956 11.128 4.03913 10.9917 4.03913 10.8495C4.03913 10.7074 4.0956 10.5711 4.19612 10.4705C4.29664 10.37 4.43298 10.3135 4.57513 10.3135H11.4391ZM12.8671 4.73114C13.0783 4.73125 13.2874 4.77294 13.4824 4.85385C13.6775 4.93476 13.8547 5.05329 14.0039 5.20268C14.1532 5.35207 14.2715 5.5294 14.3522 5.72453C14.433 5.91966 14.4744 6.12878 14.4743 6.33994C14.4742 6.55111 14.4325 6.76019 14.3516 6.95524C14.2707 7.15029 14.1522 7.3275 14.0028 7.47674C13.8534 7.62598 13.6761 7.74434 13.481 7.82505C13.2858 7.90576 13.0767 7.94725 12.8655 7.94714C12.4391 7.94693 12.0301 7.77732 11.7287 7.47561C11.4273 7.1739 11.2581 6.76481 11.2583 6.33834C11.2585 5.91188 11.4282 5.50296 11.7299 5.20155C12.0316 4.90014 12.4407 4.73093 12.8671 4.73114ZM12.8671 5.80314C12.725 5.80314 12.5886 5.85962 12.4881 5.96013C12.3876 6.06065 12.3311 6.19699 12.3311 6.33914C12.3311 6.4813 12.3876 6.61763 12.4881 6.71815C12.5886 6.81867 12.725 6.87514 12.8671 6.87514C13.0093 6.87514 13.1456 6.81867 13.2461 6.71815C13.3467 6.61763 13.4031 6.4813 13.4031 6.33914C13.4031 6.19699 13.3467 6.06065 13.2461 5.96013C13.1456 5.85962 13.0093 5.80314 12.8671 5.80314ZM3.58233 1.11034C3.51673 1.19034 3.47513 1.35754 3.48473 1.64634L3.48393 3.17034L12.5407 3.17114L12.5415 1.52314C12.5319 1.33354 12.4943 1.20554 12.4415 1.13354C12.4375 1.12714 12.3519 1.09514 12.1647 1.08874L4.27513 1.08634C3.82953 1.05034 3.59433 1.09514 3.58233 1.11034Z",
|
|
7648
|
+
fill: "#FEBA30"
|
|
7649
|
+
})), React.createElement("defs", null, React.createElement("clipPath", {
|
|
7650
|
+
id: "clip0_137_17799"
|
|
7651
|
+
}, React.createElement("rect", {
|
|
7652
|
+
width: "16",
|
|
7653
|
+
height: "16",
|
|
7654
|
+
fill: "white"
|
|
7655
|
+
}))));
|
|
7656
|
+
};
|
|
7657
|
+
|
|
7658
|
+
var CustomerLabelIcon = function CustomerLabelIcon() {
|
|
7659
|
+
return React.createElement("svg", {
|
|
7660
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7661
|
+
width: "16",
|
|
7662
|
+
height: "16",
|
|
7663
|
+
viewBox: "0 0 16 16",
|
|
7664
|
+
fill: "none"
|
|
7665
|
+
}, React.createElement("g", {
|
|
7666
|
+
clipPath: "url(#clip0_137_17783)"
|
|
7667
|
+
}, React.createElement("path", {
|
|
7668
|
+
d: "M4.31833 0.0159435H12.1831C12.6855 0.0335435 13.0735 0.179144 13.3087 0.503944C13.4959 0.761544 13.5927 1.08634 13.6127 1.49674L13.6119 3.17114H14.5711C15.0727 3.18874 15.4607 3.33354 15.6959 3.65834C15.8831 3.91594 15.9799 4.24154 15.9999 4.65194V11.1295C15.9983 11.6303 15.9631 12.0047 15.8247 12.2639C15.6103 12.6639 15.2135 12.8423 14.5527 12.8951L13.6127 12.8943V14.4535C13.6127 14.8191 13.5471 15.1407 13.4071 15.4135C13.2103 15.7959 12.8351 15.9887 12.3535 15.9999H3.77993C3.30473 15.9999 2.91433 15.8263 2.67113 15.4703C2.47673 15.1847 2.37513 14.8471 2.36313 14.4535V12.8943H1.54713C0.957534 12.8943 0.507134 12.7183 0.267934 12.3087C0.0895338 12.0031 0.00633383 11.6119 0.00153383 11.1279V4.81994C-0.0160662 4.31114 0.0879338 3.89434 0.341534 3.58554C0.647934 3.21114 1.17913 3.11034 1.90633 3.17114L2.41273 3.17034L2.41353 1.66474C2.39593 1.15594 2.49993 0.739944 2.75353 0.430344C3.05993 0.0567435 3.59193 -0.0440565 4.31833 0.0159435ZM12.5415 9.72074H3.43433V14.4367C3.43993 14.6183 3.48233 14.7567 3.55593 14.8655C3.58233 14.9039 3.63593 14.9279 3.77993 14.9279H12.3407C12.3754 14.9275 12.4101 14.9259 12.4447 14.9231H12.4543C12.5103 14.8151 12.5423 14.6591 12.5423 14.4535L12.5415 9.72074ZM11.4391 13.3479C11.5813 13.3479 11.7176 13.4044 11.8181 13.5049C11.9187 13.6055 11.9751 13.7418 11.9751 13.8839C11.9751 14.0261 11.9187 14.1624 11.8181 14.263C11.7176 14.3635 11.5813 14.4199 11.4391 14.4199H4.57513C4.43298 14.4199 4.29664 14.3635 4.19612 14.263C4.0956 14.1624 4.03913 14.0261 4.03913 13.8839C4.03913 13.7418 4.0956 13.6055 4.19612 13.5049C4.29664 13.4044 4.43298 13.3479 4.57513 13.3479H11.4391ZM11.4391 11.8303C11.5813 11.8303 11.7176 11.8868 11.8181 11.9873C11.9187 12.0879 11.9751 12.2242 11.9751 12.3663C11.9751 12.5085 11.9187 12.6448 11.8181 12.7454C11.7176 12.8459 11.5813 12.9023 11.4391 12.9023H4.57513C4.43298 12.9023 4.29664 12.8459 4.19612 12.7454C4.0956 12.6448 4.03913 12.5085 4.03913 12.3663C4.03913 12.2242 4.0956 12.0879 4.19612 11.9873C4.29664 11.8868 4.43298 11.8303 4.57513 11.8303H11.4391ZM1.86313 4.24154C1.40793 4.24314 1.30313 4.24314 1.20713 4.35354C1.11113 4.46554 1.06313 4.51194 1.07273 4.80154V11.1231C1.07593 11.4303 1.08553 11.5775 1.15513 11.6895C1.22473 11.8015 1.29913 11.8231 1.54713 11.8231L2.36313 11.8223V9.72074H2.25593C2.11378 9.72074 1.97744 9.66427 1.87692 9.56375C1.7764 9.46323 1.71993 9.3269 1.71993 9.18474C1.71993 9.04259 1.7764 8.90625 1.87692 8.80573C1.97744 8.70522 2.11378 8.64874 2.25593 8.64874H13.7791C13.9213 8.64874 14.0576 8.70522 14.1581 8.80573C14.2587 8.90625 14.3151 9.04259 14.3151 9.18474C14.3151 9.3269 14.2587 9.46323 14.1581 9.56375C14.0576 9.66427 13.9213 9.72074 13.7791 9.72074H13.6127V11.8223L14.5087 11.8247C14.6751 11.8111 14.7703 11.8287 14.8567 11.7383C14.9431 11.6471 14.9279 11.4263 14.9287 11.1279V4.67834C14.9199 4.48794 14.9023 4.42394 14.8431 4.35434C14.7839 4.28394 14.7391 4.25034 14.5527 4.24314L1.86313 4.24154ZM11.4391 10.3135C11.5813 10.3135 11.7176 10.37 11.8181 10.4705C11.9187 10.5711 11.9751 10.7074 11.9751 10.8495C11.9751 10.9917 11.9187 11.128 11.8181 11.2286C11.7176 11.3291 11.5813 11.3855 11.4391 11.3855H4.57513C4.43298 11.3855 4.29664 11.3291 4.19612 11.2286C4.0956 11.128 4.03913 10.9917 4.03913 10.8495C4.03913 10.7074 4.0956 10.5711 4.19612 10.4705C4.29664 10.37 4.43298 10.3135 4.57513 10.3135H11.4391ZM12.8671 4.73114C13.0783 4.73125 13.2874 4.77294 13.4824 4.85385C13.6775 4.93476 13.8547 5.05329 14.0039 5.20268C14.1532 5.35207 14.2715 5.5294 14.3522 5.72453C14.433 5.91966 14.4744 6.12878 14.4743 6.33994C14.4742 6.55111 14.4325 6.76019 14.3516 6.95524C14.2707 7.15029 14.1522 7.3275 14.0028 7.47674C13.8534 7.62598 13.6761 7.74434 13.481 7.82505C13.2858 7.90576 13.0767 7.94725 12.8655 7.94714C12.4391 7.94693 12.0301 7.77732 11.7287 7.47561C11.4273 7.1739 11.2581 6.76481 11.2583 6.33834C11.2585 5.91188 11.4282 5.50296 11.7299 5.20155C12.0316 4.90014 12.4407 4.73093 12.8671 4.73114ZM12.8671 5.80314C12.725 5.80314 12.5886 5.85962 12.4881 5.96013C12.3876 6.06065 12.3311 6.19699 12.3311 6.33914C12.3311 6.4813 12.3876 6.61763 12.4881 6.71815C12.5886 6.81867 12.725 6.87514 12.8671 6.87514C13.0093 6.87514 13.1456 6.81867 13.2461 6.71815C13.3467 6.61763 13.4031 6.4813 13.4031 6.33914C13.4031 6.19699 13.3467 6.06065 13.2461 5.96013C13.1456 5.85962 13.0093 5.80314 12.8671 5.80314ZM3.58233 1.11034C3.51673 1.19034 3.47513 1.35754 3.48473 1.64634L3.48393 3.17034L12.5407 3.17114L12.5415 1.52314C12.5319 1.33354 12.4943 1.20554 12.4415 1.13354C12.4375 1.12714 12.3519 1.09514 12.1647 1.08874L4.27513 1.08634C3.82953 1.05034 3.59433 1.09514 3.58233 1.11034Z",
|
|
7669
|
+
fill: "#E95252"
|
|
7670
|
+
})), React.createElement("defs", null, React.createElement("clipPath", {
|
|
7671
|
+
id: "clip0_137_17783"
|
|
7672
|
+
}, React.createElement("rect", {
|
|
7673
|
+
width: "16",
|
|
7674
|
+
height: "16",
|
|
7675
|
+
fill: "white"
|
|
7676
|
+
}))));
|
|
7677
|
+
};
|
|
7678
|
+
|
|
7679
|
+
var DeliveryNotes = function DeliveryNotes() {
|
|
7680
|
+
return React.createElement("svg", {
|
|
7681
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7682
|
+
width: "16",
|
|
7683
|
+
height: "16",
|
|
7684
|
+
viewBox: "0 0 16 16",
|
|
7685
|
+
fill: "none"
|
|
7686
|
+
}, React.createElement("g", {
|
|
7687
|
+
clipPath: "url(#clip0_137_17767)"
|
|
7688
|
+
}, React.createElement("path", {
|
|
7689
|
+
d: "M4.31833 0.0159435H12.1831C12.6855 0.0335435 13.0735 0.179144 13.3087 0.503944C13.4959 0.761544 13.5927 1.08634 13.6127 1.49674L13.6119 3.17114H14.5711C15.0727 3.18874 15.4607 3.33354 15.6959 3.65834C15.8831 3.91594 15.9799 4.24154 15.9999 4.65194V11.1295C15.9983 11.6303 15.9631 12.0047 15.8247 12.2639C15.6103 12.6639 15.2135 12.8423 14.5527 12.8951L13.6127 12.8943V14.4535C13.6127 14.8191 13.5471 15.1407 13.4071 15.4135C13.2103 15.7959 12.8351 15.9887 12.3535 15.9999H3.77993C3.30473 15.9999 2.91433 15.8263 2.67113 15.4703C2.47673 15.1847 2.37513 14.8471 2.36313 14.4535V12.8943H1.54713C0.957534 12.8943 0.507134 12.7183 0.267934 12.3087C0.0895338 12.0031 0.00633383 11.6119 0.00153383 11.1279V4.81994C-0.0160662 4.31114 0.0879338 3.89434 0.341534 3.58554C0.647934 3.21114 1.17913 3.11034 1.90633 3.17114L2.41273 3.17034L2.41353 1.66474C2.39593 1.15594 2.49993 0.739944 2.75353 0.430344C3.05993 0.0567435 3.59193 -0.0440565 4.31833 0.0159435ZM12.5415 9.72074H3.43433V14.4367C3.43993 14.6183 3.48233 14.7567 3.55593 14.8655C3.58233 14.9039 3.63593 14.9279 3.77993 14.9279H12.3407C12.3754 14.9275 12.4101 14.9259 12.4447 14.9231H12.4543C12.5103 14.8151 12.5423 14.6591 12.5423 14.4535L12.5415 9.72074ZM11.4391 13.3479C11.5813 13.3479 11.7176 13.4044 11.8181 13.5049C11.9187 13.6055 11.9751 13.7418 11.9751 13.8839C11.9751 14.0261 11.9187 14.1624 11.8181 14.263C11.7176 14.3635 11.5813 14.4199 11.4391 14.4199H4.57513C4.43298 14.4199 4.29664 14.3635 4.19612 14.263C4.0956 14.1624 4.03913 14.0261 4.03913 13.8839C4.03913 13.7418 4.0956 13.6055 4.19612 13.5049C4.29664 13.4044 4.43298 13.3479 4.57513 13.3479H11.4391ZM11.4391 11.8303C11.5813 11.8303 11.7176 11.8868 11.8181 11.9873C11.9187 12.0879 11.9751 12.2242 11.9751 12.3663C11.9751 12.5085 11.9187 12.6448 11.8181 12.7454C11.7176 12.8459 11.5813 12.9023 11.4391 12.9023H4.57513C4.43298 12.9023 4.29664 12.8459 4.19612 12.7454C4.0956 12.6448 4.03913 12.5085 4.03913 12.3663C4.03913 12.2242 4.0956 12.0879 4.19612 11.9873C4.29664 11.8868 4.43298 11.8303 4.57513 11.8303H11.4391ZM1.86313 4.24154C1.40793 4.24314 1.30313 4.24314 1.20713 4.35354C1.11113 4.46554 1.06313 4.51194 1.07273 4.80154V11.1231C1.07593 11.4303 1.08553 11.5775 1.15513 11.6895C1.22473 11.8015 1.29913 11.8231 1.54713 11.8231L2.36313 11.8223V9.72074H2.25593C2.11378 9.72074 1.97744 9.66427 1.87692 9.56375C1.7764 9.46323 1.71993 9.3269 1.71993 9.18474C1.71993 9.04259 1.7764 8.90625 1.87692 8.80573C1.97744 8.70522 2.11378 8.64874 2.25593 8.64874H13.7791C13.9213 8.64874 14.0576 8.70522 14.1581 8.80573C14.2587 8.90625 14.3151 9.04259 14.3151 9.18474C14.3151 9.3269 14.2587 9.46323 14.1581 9.56375C14.0576 9.66427 13.9213 9.72074 13.7791 9.72074H13.6127V11.8223L14.5087 11.8247C14.6751 11.8111 14.7703 11.8287 14.8567 11.7383C14.9431 11.6471 14.9279 11.4263 14.9287 11.1279V4.67834C14.9199 4.48794 14.9023 4.42394 14.8431 4.35434C14.7839 4.28394 14.7391 4.25034 14.5527 4.24314L1.86313 4.24154ZM11.4391 10.3135C11.5813 10.3135 11.7176 10.37 11.8181 10.4705C11.9187 10.5711 11.9751 10.7074 11.9751 10.8495C11.9751 10.9917 11.9187 11.128 11.8181 11.2286C11.7176 11.3291 11.5813 11.3855 11.4391 11.3855H4.57513C4.43298 11.3855 4.29664 11.3291 4.19612 11.2286C4.0956 11.128 4.03913 10.9917 4.03913 10.8495C4.03913 10.7074 4.0956 10.5711 4.19612 10.4705C4.29664 10.37 4.43298 10.3135 4.57513 10.3135H11.4391ZM12.8671 4.73114C13.0783 4.73125 13.2874 4.77294 13.4824 4.85385C13.6775 4.93476 13.8547 5.05329 14.0039 5.20268C14.1532 5.35207 14.2715 5.5294 14.3522 5.72453C14.433 5.91966 14.4744 6.12878 14.4743 6.33994C14.4742 6.55111 14.4325 6.76019 14.3516 6.95524C14.2707 7.15029 14.1522 7.3275 14.0028 7.47674C13.8534 7.62598 13.6761 7.74434 13.481 7.82505C13.2858 7.90576 13.0767 7.94725 12.8655 7.94714C12.4391 7.94693 12.0301 7.77732 11.7287 7.47561C11.4273 7.1739 11.2581 6.76481 11.2583 6.33834C11.2585 5.91188 11.4282 5.50296 11.7299 5.20155C12.0316 4.90014 12.4407 4.73093 12.8671 4.73114ZM12.8671 5.80314C12.725 5.80314 12.5886 5.85962 12.4881 5.96013C12.3876 6.06065 12.3311 6.19699 12.3311 6.33914C12.3311 6.4813 12.3876 6.61763 12.4881 6.71815C12.5886 6.81867 12.725 6.87514 12.8671 6.87514C13.0093 6.87514 13.1456 6.81867 13.2461 6.71815C13.3467 6.61763 13.4031 6.4813 13.4031 6.33914C13.4031 6.19699 13.3467 6.06065 13.2461 5.96013C13.1456 5.85962 13.0093 5.80314 12.8671 5.80314ZM3.58233 1.11034C3.51673 1.19034 3.47513 1.35754 3.48473 1.64634L3.48393 3.17034L12.5407 3.17114L12.5415 1.52314C12.5319 1.33354 12.4943 1.20554 12.4415 1.13354C12.4375 1.12714 12.3519 1.09514 12.1647 1.08874L4.27513 1.08634C3.82953 1.05034 3.59433 1.09514 3.58233 1.11034Z",
|
|
7690
|
+
fill: "#6396E5"
|
|
7691
|
+
})), React.createElement("defs", null, React.createElement("clipPath", {
|
|
7692
|
+
id: "clip0_137_17767"
|
|
7693
|
+
}, React.createElement("rect", {
|
|
7694
|
+
width: "16",
|
|
7695
|
+
height: "16",
|
|
7696
|
+
fill: "white"
|
|
7697
|
+
}))));
|
|
7698
|
+
};
|
|
7699
|
+
|
|
7700
|
+
var LoadSheetIcon = function LoadSheetIcon() {
|
|
7701
|
+
return React.createElement("svg", {
|
|
7702
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7703
|
+
width: "16",
|
|
7704
|
+
height: "16",
|
|
7705
|
+
viewBox: "0 0 16 16",
|
|
7706
|
+
fill: "none"
|
|
7707
|
+
}, React.createElement("path", {
|
|
7708
|
+
d: "M0.571246 2.66577C0.419742 2.66577 0.274444 2.72595 0.167314 2.83308C0.0601847 2.94021 0 3.08551 0 3.23701V7.80698C0 8.2615 0.180554 8.69739 0.501942 9.01878C0.823331 9.34017 1.25923 9.52072 1.71374 9.52072H5.52205C5.97656 9.52072 6.41245 9.34017 6.73384 9.01878C7.05523 8.69739 7.23579 8.2615 7.23579 7.80698V3.23701C7.23579 3.08551 7.1756 2.94021 7.06847 2.83308C6.96134 2.72595 6.81604 2.66577 6.66454 2.66577H6.47412V1.90411C6.47412 1.56986 6.38613 1.24151 6.219 0.952046C6.05187 0.662584 5.81149 0.422215 5.52203 0.255096C5.23256 0.0879774 4.9042 -2.12281e-06 4.56996 0C4.23571 2.12289e-06 3.90736 0.0879859 3.61789 0.255108C3.32843 0.0879859 3.00007 2.12289e-06 2.66583 0C2.33158 -2.12281e-06 2.00323 0.0879774 1.71376 0.255096C1.42429 0.422215 1.18392 0.662584 1.01679 0.952046C0.84966 1.24151 0.76167 1.56986 0.761662 1.90411V2.66501L0.571246 2.66577ZM4.56997 2.66577V1.90411C4.56997 1.63905 4.51589 1.38618 4.41764 1.15768C4.52831 1.13509 4.64263 1.13739 4.7523 1.16443C4.86197 1.19147 4.96426 1.24257 5.05175 1.31402C5.13924 1.38547 5.20974 1.47548 5.25815 1.57754C5.30655 1.6796 5.33165 1.79115 5.33163 1.90411V2.66577H4.56997ZM3.42748 1.90411V2.66577H1.90415V1.90411C1.90415 1.7021 1.9844 1.50837 2.12724 1.36553C2.27008 1.22269 2.46381 1.14244 2.66582 1.14244C2.86782 1.14244 3.06155 1.22269 3.20439 1.36553C3.34723 1.50837 3.42748 1.7021 3.42748 1.90411ZM0.761662 12.377V10.092C1.0549 10.2146 1.37632 10.2824 1.71374 10.2824H1.90415V12.377C1.90414 12.5182 1.95644 12.6544 2.05097 12.7593C2.14549 12.8643 2.27553 12.9305 2.41599 12.9452C2.57398 12.4998 2.86611 12.1144 3.25218 11.8419C3.63825 11.5694 4.09927 11.4233 4.57181 11.4236C5.04434 11.424 5.50516 11.5708 5.89084 11.8438C6.27653 12.1168 6.56811 12.5026 6.72547 12.9482H8.50928C8.66687 12.5028 8.95859 12.1172 9.34432 11.8444C9.73004 11.5716 10.1908 11.4251 10.6633 11.4249V3.23701C10.6633 3.08551 10.6031 2.94021 10.4959 2.83308C10.3888 2.72595 10.2435 2.66577 10.092 2.66577H7.86949C7.73736 2.38798 7.51357 2.16419 7.23579 2.03207V1.90411C7.23579 1.77462 7.22665 1.64743 7.20913 1.52328H10.092C10.5465 1.52328 10.9824 1.70383 11.3038 2.02522C11.6252 2.34661 11.8058 2.7825 11.8058 3.23701V3.80826H12.9863C13.649 3.80826 14.2522 4.18985 14.5356 4.78852L15.8304 7.5206C15.9385 7.74986 15.9949 8.00045 15.9949 8.25408V12.377C15.9949 12.8315 15.8143 13.2674 15.493 13.5888C15.1716 13.9101 14.7357 14.0907 14.2812 14.0907H12.917C12.8275 14.6236 12.5519 15.1075 12.1394 15.4564C11.7269 15.8054 11.204 15.9969 10.6636 15.9969C10.1233 15.9969 9.60043 15.8054 9.18789 15.4564C8.77535 15.1075 8.49984 14.6236 8.41027 14.0907H6.82297C6.73393 14.6249 6.45806 15.1101 6.04455 15.4598C5.63104 15.8095 5.10676 16.0009 4.56522 16C4.02367 15.9991 3.50004 15.8059 3.08772 15.4548C2.67539 15.1037 2.40116 14.6176 2.31393 14.0831C1.88927 14.0429 1.49486 13.8458 1.2078 13.5303C0.920737 13.2147 0.76166 12.8035 0.761662 12.377ZM12.8188 12.9482H14.2812C14.4327 12.9482 14.578 12.888 14.6851 12.7809C14.7922 12.6738 14.8524 12.5285 14.8524 12.377V12.1865H13.9003C13.7488 12.1865 13.6035 12.1264 13.4964 12.0192C13.3893 11.9121 13.3291 11.7668 13.3291 11.6153C13.3291 11.4638 13.3893 11.3185 13.4964 11.2114C13.6035 11.1042 13.7488 11.044 13.9003 11.044H14.8524V8.75906H11.8058V11.7303C12.2774 12.003 12.6365 12.4348 12.8188 12.9482ZM11.8058 4.95075V7.61657H14.611L13.5043 5.27751C13.458 5.17973 13.3848 5.09712 13.2934 5.03927C13.202 4.98143 13.096 4.95073 12.9879 4.95075H11.8058ZM4.56997 14.8524C4.87298 14.8524 5.16358 14.732 5.37783 14.5177C5.59209 14.3035 5.71246 14.0129 5.71246 13.7099C5.71246 13.4069 5.59209 13.1163 5.37783 12.902C5.16358 12.6877 4.87298 12.5674 4.56997 12.5674C4.26696 12.5674 3.97636 12.6877 3.76211 12.902C3.54785 13.1163 3.42748 13.4069 3.42748 13.7099C3.42748 14.0129 3.54785 14.3035 3.76211 14.5177C3.97636 14.732 4.26696 14.8524 4.56997 14.8524ZM11.8058 13.7099C11.8058 13.4069 11.6854 13.1163 11.4711 12.902C11.2569 12.6877 10.9663 12.5674 10.6633 12.5674C10.3603 12.5674 10.0697 12.6877 9.8554 12.902C9.64114 13.1163 9.52077 13.4069 9.52077 13.7099C9.52077 14.0129 9.64114 14.3035 9.8554 14.5177C10.0697 14.732 10.3603 14.8524 10.6633 14.8524C10.9663 14.8524 11.2569 14.732 11.4711 14.5177C11.6854 14.3035 11.8058 14.0129 11.8058 13.7099ZM1.90415 1.90411C1.90415 1.79595 1.927 1.69313 1.96737 1.59944L1.90415 1.90411Z",
|
|
7709
|
+
fill: "#FEBA30"
|
|
7710
|
+
}));
|
|
7711
|
+
};
|
|
7712
|
+
|
|
7713
|
+
var RunsheetIcon = function RunsheetIcon() {
|
|
7714
|
+
return React.createElement("svg", {
|
|
7715
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7716
|
+
width: "20",
|
|
7717
|
+
height: "20",
|
|
7718
|
+
viewBox: "0 0 20 20",
|
|
7719
|
+
fill: "none"
|
|
7720
|
+
}, React.createElement("rect", {
|
|
7721
|
+
width: "20",
|
|
7722
|
+
height: "20",
|
|
7723
|
+
fill: "white"
|
|
7724
|
+
}), React.createElement("path", {
|
|
7725
|
+
d: "M6.5 12C6.36739 12 6.24021 11.9473 6.14645 11.8536C6.05268 11.7598 6 11.6326 6 11.5C6 11.3674 6.05268 11.2402 6.14645 11.1464C6.24021 11.0527 6.36739 11 6.5 11H13.5C13.6326 11 13.7598 11.0527 13.8536 11.1464C13.9473 11.2402 14 11.3674 14 11.5C14 11.6326 13.9473 11.7598 13.8536 11.8536C13.7598 11.9473 13.6326 12 13.5 12H6.5ZM6.5 15C6.36739 15 6.24021 14.9473 6.14645 14.8536C6.05268 14.7598 6 14.6326 6 14.5C6 14.3674 6.05268 14.2402 6.14645 14.1464C6.24021 14.0527 6.36739 14 6.5 14H13.5C13.6326 14 13.7598 14.0527 13.8536 14.1464C13.9473 14.2402 14 14.3674 14 14.5C14 14.6326 13.9473 14.7598 13.8536 14.8536C13.7598 14.9473 13.6326 15 13.5 15H6.5Z",
|
|
7726
|
+
fill: "#FEBA30"
|
|
7727
|
+
}), React.createElement("path", {
|
|
7728
|
+
fillRule: "evenodd",
|
|
7729
|
+
clipRule: "evenodd",
|
|
7730
|
+
d: "M11.185 1H4.5C4.10218 1 3.72064 1.15804 3.43934 1.43934C3.15804 1.72064 3 2.10218 3 2.5V17.5C3 17.8978 3.15804 18.2794 3.43934 18.5607C3.72064 18.842 4.10218 19 4.5 19H15.5C15.8978 19 16.2794 18.842 16.5607 18.5607C16.842 18.2794 17 17.8978 17 17.5V7.202C16.9999 6.82647 16.859 6.46464 16.605 6.188L12.291 1.486C12.1504 1.33275 11.9795 1.2104 11.7891 1.12673C11.5987 1.04307 11.393 0.99991 11.185 1ZM4 2.5C4 2.36739 4.05268 2.24022 4.14645 2.14645C4.24021 2.05268 4.36739 2 4.5 2H11.185C11.2544 1.99992 11.323 2.01429 11.3865 2.04218C11.4501 2.07007 11.5071 2.11087 11.554 2.162L15.868 6.864C15.9528 6.95616 15.9999 7.07678 16 7.202V17.5C16 17.6326 15.9473 17.7598 15.8536 17.8536C15.7598 17.9473 15.6326 18 15.5 18H4.5C4.36739 18 4.24021 17.9473 4.14645 17.8536C4.05268 17.7598 4 17.6326 4 17.5V2.5Z",
|
|
7731
|
+
fill: "#3A3630"
|
|
7732
|
+
}), React.createElement("path", {
|
|
7733
|
+
d: "M11 7H16.5C16.6326 7 16.7598 7.05268 16.8536 7.14645C16.9473 7.24021 17 7.36739 17 7.5C17 7.63261 16.9473 7.75979 16.8536 7.85355C16.7598 7.94732 16.6326 8 16.5 8H10.5C10.3674 8 10.2402 7.94732 10.1464 7.85355C10.0527 7.75979 10 7.63261 10 7.5V1.5C10 1.36739 10.0527 1.24021 10.1464 1.14645C10.2402 1.05268 10.3674 1 10.5 1C10.6326 1 10.7598 1.05268 10.8536 1.14645C10.9473 1.24021 11 1.36739 11 1.5V7Z",
|
|
7734
|
+
fill: "#3A3630"
|
|
7735
|
+
}));
|
|
7736
|
+
};
|
|
7737
|
+
|
|
7738
|
+
var PrintIconMap = {
|
|
7739
|
+
runSheet: RunsheetIcon,
|
|
7740
|
+
loadSheet: LoadSheetIcon,
|
|
7741
|
+
deliveryLables: DeliveryNotes,
|
|
7742
|
+
customerLables: CustomerLabelIcon,
|
|
7743
|
+
collectionLables: CollectionLabelIcon
|
|
7744
|
+
};
|
|
7745
|
+
|
|
7746
|
+
var optionsPrint = [{
|
|
7747
|
+
icon: 'runSheet',
|
|
7748
|
+
label: 'Print Runsheet'
|
|
7749
|
+
}, {
|
|
7750
|
+
icon: 'loadSheet',
|
|
7751
|
+
label: 'Print Loadsheet'
|
|
7752
|
+
}, {
|
|
7753
|
+
icon: 'deliveryLables',
|
|
7754
|
+
label: 'Print Delivery Labels'
|
|
7755
|
+
}, {
|
|
7756
|
+
icon: 'customerLables',
|
|
7757
|
+
label: 'Print Customer Labels'
|
|
7758
|
+
}, {
|
|
7759
|
+
icon: 'collectionLables',
|
|
7760
|
+
label: 'Print Collection Labels'
|
|
7761
|
+
}];
|
|
7762
|
+
|
|
7763
|
+
var _templateObject$1W, _templateObject2$1l;
|
|
7764
|
+
// import { PrintIconMap } from '../utils';
|
|
7765
|
+
// import { optionsPrint } from '../fakeData';
|
|
7766
|
+
// import { PrintData } from '../interface';
|
|
7767
|
+
var options$2 = optionsPrint;
|
|
7768
|
+
var PrintDropDown = function PrintDropDown() {
|
|
7769
|
+
var downloadFiles = function downloadFiles() {};
|
|
7770
|
+
return React.createElement(OptionsList, null, options$2.map(function (item, index) {
|
|
7771
|
+
var IconComponent = PrintIconMap[item.icon];
|
|
7772
|
+
return React.createElement(OptionsListLi, {
|
|
7773
|
+
key: index,
|
|
7774
|
+
onClick: downloadFiles
|
|
7775
|
+
}, IconComponent && React.createElement(IconComponent, null), " ", item.label);
|
|
7776
|
+
}));
|
|
7777
|
+
};
|
|
7778
|
+
var OptionsList = /*#__PURE__*/styled.ul(_templateObject$1W || (_templateObject$1W = /*#__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\n top: 530px;\n right: 25px;\n z-index: 99;\n min-width: 194px;\n"])));
|
|
7779
|
+
var OptionsListLi = /*#__PURE__*/styled.li(_templateObject2$1l || (_templateObject2$1l = /*#__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"])));
|
|
7540
7780
|
|
|
7541
7781
|
var _templateObject$1X;
|
|
7782
|
+
var DropDownContainer$1 = /*#__PURE__*/styled.div(_templateObject$1X || (_templateObject$1X = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 20px;\n border-right: 1px solid #d0d5dd;\n padding: 4px;\n @media screen and (max-width: 1220px) {\n font-size: 12px;\n }\n"])));
|
|
7783
|
+
|
|
7784
|
+
var _templateObject$1Y;
|
|
7542
7785
|
var DropDownItem = function DropDownItem(_ref) {
|
|
7543
7786
|
var label = _ref.label,
|
|
7544
7787
|
icon = _ref.icon,
|
|
@@ -7547,9 +7790,9 @@ var DropDownItem = function DropDownItem(_ref) {
|
|
|
7547
7790
|
onClick: onClick
|
|
7548
7791
|
}, React.createElement("label", null, label), icon);
|
|
7549
7792
|
};
|
|
7550
|
-
var Flex$4 = /*#__PURE__*/styled.div(_templateObject$
|
|
7793
|
+
var Flex$4 = /*#__PURE__*/styled.div(_templateObject$1Y || (_templateObject$1Y = /*#__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"])));
|
|
7551
7794
|
|
|
7552
|
-
var _templateObject$
|
|
7795
|
+
var _templateObject$1Z;
|
|
7553
7796
|
var DropDownMenu = function DropDownMenu(_ref) {
|
|
7554
7797
|
var options = _ref.options,
|
|
7555
7798
|
onSelect = _ref.onSelect;
|
|
@@ -7564,7 +7807,7 @@ var DropDownMenu = function DropDownMenu(_ref) {
|
|
|
7564
7807
|
});
|
|
7565
7808
|
}));
|
|
7566
7809
|
};
|
|
7567
|
-
var DropDownContent = /*#__PURE__*/styled.div(_templateObject$
|
|
7810
|
+
var DropDownContent = /*#__PURE__*/styled.div(_templateObject$1Z || (_templateObject$1Z = /*#__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"])));
|
|
7568
7811
|
|
|
7569
7812
|
var DropDownLarge = function DropDownLarge() {
|
|
7570
7813
|
return React.createElement("svg", {
|
|
@@ -7588,53 +7831,6 @@ var DropDownLarge = function DropDownLarge() {
|
|
|
7588
7831
|
};
|
|
7589
7832
|
|
|
7590
7833
|
var Options = [{
|
|
7591
|
-
label: 'Return notes',
|
|
7592
|
-
value: 'return-notes'
|
|
7593
|
-
}, {
|
|
7594
|
-
label: 'Product Labels',
|
|
7595
|
-
value: 'product-labels'
|
|
7596
|
-
}, {
|
|
7597
|
-
label: 'Returns Cover Note',
|
|
7598
|
-
value: 'cover-note'
|
|
7599
|
-
}];
|
|
7600
|
-
var PrintDropDown = function PrintDropDown() {
|
|
7601
|
-
var _useState = useState(false),
|
|
7602
|
-
isOpen = _useState[0],
|
|
7603
|
-
setIsOpen = _useState[1];
|
|
7604
|
-
var dropdownRef = useRef(null);
|
|
7605
|
-
var handleClick = function handleClick() {
|
|
7606
|
-
setIsOpen(function (prev) {
|
|
7607
|
-
return !prev;
|
|
7608
|
-
});
|
|
7609
|
-
};
|
|
7610
|
-
var handleSelect = function handleSelect(value) {
|
|
7611
|
-
console.log("Selected: " + value);
|
|
7612
|
-
setIsOpen(false);
|
|
7613
|
-
};
|
|
7614
|
-
useEffect(function () {
|
|
7615
|
-
var handleClickOutside = function handleClickOutside(event) {
|
|
7616
|
-
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
7617
|
-
setIsOpen(false);
|
|
7618
|
-
}
|
|
7619
|
-
};
|
|
7620
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
7621
|
-
return function () {
|
|
7622
|
-
document.removeEventListener('mousedown', handleClickOutside);
|
|
7623
|
-
};
|
|
7624
|
-
}, []);
|
|
7625
|
-
return React.createElement(DropDownContainer$1, {
|
|
7626
|
-
ref: dropdownRef
|
|
7627
|
-
}, React.createElement(DropDownItem, {
|
|
7628
|
-
label: "Print",
|
|
7629
|
-
icon: React.createElement(DropDownLarge, null),
|
|
7630
|
-
onClick: handleClick
|
|
7631
|
-
}), isOpen && React.createElement(DropDownMenu, {
|
|
7632
|
-
options: Options,
|
|
7633
|
-
onSelect: handleSelect
|
|
7634
|
-
}));
|
|
7635
|
-
};
|
|
7636
|
-
|
|
7637
|
-
var Options$1 = [{
|
|
7638
7834
|
label: 'Create Reminder',
|
|
7639
7835
|
value: 'create-reminder'
|
|
7640
7836
|
}, {
|
|
@@ -7694,13 +7890,13 @@ var OptionsDropDown = function OptionsDropDown() {
|
|
|
7694
7890
|
icon: React.createElement(DropDownLarge, null),
|
|
7695
7891
|
onClick: handleClick
|
|
7696
7892
|
}), isOpen && React.createElement(DropDownMenu, {
|
|
7697
|
-
options: Options
|
|
7893
|
+
options: Options,
|
|
7698
7894
|
onSelect: handleSelect
|
|
7699
7895
|
}));
|
|
7700
7896
|
};
|
|
7701
7897
|
|
|
7702
7898
|
// import { countReducerAtom } from '../../../store/store';
|
|
7703
|
-
var Options$
|
|
7899
|
+
var Options$1 = [{
|
|
7704
7900
|
label: 'Add Order Resource ',
|
|
7705
7901
|
value: 'add-order-resources'
|
|
7706
7902
|
}, {
|
|
@@ -7744,23 +7940,23 @@ var MenuDropDown = function MenuDropDown() {
|
|
|
7744
7940
|
icon: React.createElement(DropDownLarge, null),
|
|
7745
7941
|
onClick: handleClick
|
|
7746
7942
|
}), isOpen && React.createElement(DropDownMenu, {
|
|
7747
|
-
options: Options$
|
|
7943
|
+
options: Options$1,
|
|
7748
7944
|
onSelect: handleSelect
|
|
7749
7945
|
}));
|
|
7750
7946
|
};
|
|
7751
7947
|
|
|
7752
|
-
var _templateObject$
|
|
7948
|
+
var _templateObject$1_;
|
|
7753
7949
|
// components
|
|
7754
7950
|
function DropDowns$1() {
|
|
7755
7951
|
return React.createElement(React.Fragment, null, React.createElement(DashBoardWrapper, null, React.createElement(MenuDropDown, null), React.createElement(OptionsDropDown, null), React.createElement(PrintDropDown, null)));
|
|
7756
7952
|
}
|
|
7757
|
-
var DashBoardWrapper = /*#__PURE__*/styled.section(_templateObject$
|
|
7953
|
+
var DashBoardWrapper = /*#__PURE__*/styled.section(_templateObject$1_ || (_templateObject$1_ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 0 5px;\n display: flex;\n align-content: center;\n gap: 10px;\n"])));
|
|
7758
7954
|
|
|
7759
|
-
var _templateObject2$
|
|
7760
|
-
var Typo$1 = /*#__PURE__*/styled.div(_templateObject2$
|
|
7955
|
+
var _templateObject2$1m, _templateObject3$L;
|
|
7956
|
+
var Typo$1 = /*#__PURE__*/styled.div(_templateObject2$1m || (_templateObject2$1m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n text-align: center;\n font-size: 14px;\n font-style: normal;\n color: #3a3630;\n font-weight: 400;\n line-height: 15px;\n text-transform: uppercase;\n @media screen and (max-width: 1220px) {\n font-size: 13px;\n }\n"])));
|
|
7761
7957
|
var StyledBulkItem = /*#__PURE__*/styled.div(_templateObject3$L || (_templateObject3$L = /*#__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: 6px 4px;\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: #3a3630;\n text-align: center;\n font-family: 'Open Sans';\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 18px;\n cursor: pointer;\n }\n\n &.noPadding {\n padding: 0;\n }\n"])));
|
|
7762
7958
|
|
|
7763
|
-
var _templateObject$
|
|
7959
|
+
var _templateObject$1$;
|
|
7764
7960
|
var ActionItem = function ActionItem(_ref) {
|
|
7765
7961
|
var name = _ref.name,
|
|
7766
7962
|
onClick = _ref.onClick,
|
|
@@ -7769,9 +7965,9 @@ var ActionItem = function ActionItem(_ref) {
|
|
|
7769
7965
|
onClick: onClick
|
|
7770
7966
|
}, React.createElement(Typo$1, null, name), icon && React.createElement(IconWrapper, null, icon));
|
|
7771
7967
|
};
|
|
7772
|
-
var IconWrapper = /*#__PURE__*/styled.div(_templateObject$
|
|
7968
|
+
var IconWrapper = /*#__PURE__*/styled.div(_templateObject$1$ || (_templateObject$1$ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n height: 24px;\n width: 34px;\n\n & > svg {\n width: 100%;\n transform: scale(0.7);\n }\n"])));
|
|
7773
7969
|
|
|
7774
|
-
var _templateObject$
|
|
7970
|
+
var _templateObject$20;
|
|
7775
7971
|
var Actions = function Actions() {
|
|
7776
7972
|
var _useAtom = useAtom(countReducerAtom),
|
|
7777
7973
|
dispatch = _useAtom[1];
|
|
@@ -7790,24 +7986,23 @@ var Actions = function Actions() {
|
|
|
7790
7986
|
}
|
|
7791
7987
|
})));
|
|
7792
7988
|
};
|
|
7793
|
-
var Flex$5 = /*#__PURE__*/styled.div(_templateObject$
|
|
7989
|
+
var Flex$5 = /*#__PURE__*/styled.div(_templateObject$20 || (_templateObject$20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n height: 31px;\n"])));
|
|
7794
7990
|
|
|
7795
|
-
var _templateObject$
|
|
7991
|
+
var _templateObject$21;
|
|
7796
7992
|
var ActionsMenu = function ActionsMenu() {
|
|
7797
7993
|
return React.createElement(Flex$6, null, React.createElement(DropDowns$1, null), React.createElement(Actions, null));
|
|
7798
7994
|
};
|
|
7799
|
-
var Flex$6 = /*#__PURE__*/styled.div(_templateObject$
|
|
7995
|
+
var Flex$6 = /*#__PURE__*/styled.div(_templateObject$21 || (_templateObject$21 = /*#__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"])));
|
|
7800
7996
|
|
|
7801
|
-
var _templateObject$
|
|
7997
|
+
var _templateObject$22;
|
|
7802
7998
|
var DetailsFilters = function DetailsFilters() {
|
|
7803
7999
|
return React.createElement(Flex$7, null, React.createElement(Details, null), React.createElement(ActionsMenu, null));
|
|
7804
8000
|
};
|
|
7805
|
-
var Flex$7 = /*#__PURE__*/styled.div(_templateObject$
|
|
8001
|
+
var Flex$7 = /*#__PURE__*/styled.div(_templateObject$22 || (_templateObject$22 = /*#__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: -40px;\n justify-content: space-between;\n"])));
|
|
7806
8002
|
|
|
7807
|
-
var _templateObject$
|
|
8003
|
+
var _templateObject$23, _templateObject2$1n, _templateObject3$M, _templateObject4$t, _templateObject5$h, _templateObject6$c, _templateObject7$a;
|
|
7808
8004
|
function OrderView() {
|
|
7809
8005
|
var _useOrderId = useOrderId(),
|
|
7810
|
-
orderId = _useOrderId[0],
|
|
7811
8006
|
setOrderId = _useOrderId[1];
|
|
7812
8007
|
var splitPath = function splitPath(str) {
|
|
7813
8008
|
var _str$split;
|
|
@@ -7831,6 +8026,7 @@ function OrderView() {
|
|
|
7831
8026
|
setDepotOptions = _useDepotOptions[1];
|
|
7832
8027
|
var location = useLocation();
|
|
7833
8028
|
var paths = splitPath(location.pathname);
|
|
8029
|
+
var orderId = 192;
|
|
7834
8030
|
var _useApiHook = useApiHook({
|
|
7835
8031
|
endpoint: "orders/" + orderId,
|
|
7836
8032
|
method: 'GET',
|
|
@@ -7861,7 +8057,7 @@ function OrderView() {
|
|
|
7861
8057
|
fetchedDepotData = _useApiHook4.data,
|
|
7862
8058
|
depotDataLoading = _useApiHook4.loading;
|
|
7863
8059
|
useEffect(function () {
|
|
7864
|
-
|
|
8060
|
+
{
|
|
7865
8061
|
setShouldPerformAction(true);
|
|
7866
8062
|
setPerformAction(true);
|
|
7867
8063
|
}
|
|
@@ -7924,237 +8120,350 @@ function OrderView() {
|
|
|
7924
8120
|
onClose: function onClose() {}
|
|
7925
8121
|
})), 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(Order, null), React.createElement(SystemLogs, null))), React.createElement(OrderActions, null)))));
|
|
7926
8122
|
}
|
|
7927
|
-
var Section$1 = /*#__PURE__*/styled.div(_templateObject$
|
|
8123
|
+
var Section$1 = /*#__PURE__*/styled.div(_templateObject$23 || (_templateObject$23 = /*#__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 padding: 12px;\n"])));
|
|
7928
8124
|
/* // `; */
|
|
7929
|
-
var DashBoardWrapper$1 = /*#__PURE__*/styled.section(_templateObject2$
|
|
8125
|
+
var DashBoardWrapper$1 = /*#__PURE__*/styled.section(_templateObject2$1n || (_templateObject2$1n = /*#__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 0px;\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"])));
|
|
7930
8126
|
var NotifyContainer = /*#__PURE__*/styled.div(_templateObject3$M || (_templateObject3$M = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-left: 18px;\n"])));
|
|
7931
8127
|
var MainContainer$a = /*#__PURE__*/styled.div(_templateObject4$t || (_templateObject4$t = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding-bottom: 30px;\n"])));
|
|
7932
8128
|
var SplitLayout$1 = /*#__PURE__*/styled.div(_templateObject5$h || (_templateObject5$h = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n @media (max-width: 1024px) {\n display: contents;\n }\n"])));
|
|
7933
8129
|
var NotesContainer = /*#__PURE__*/styled.div(_templateObject6$c || (_templateObject6$c = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n"])));
|
|
7934
8130
|
var TablesContainer = /*#__PURE__*/styled.div(_templateObject7$a || (_templateObject7$a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 15px;\n"])));
|
|
7935
8131
|
|
|
7936
|
-
var _templateObject3$N, _templateObject5$i,
|
|
7937
|
-
var CoverPage = /*#__PURE__*/styled.div(_templateObject3$N || (_templateObject3$N = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n border-radius: 16px;\n border: 1px solid #e3e3e3;\n background: #fff;\n box-shadow: 0px 4px 30px 0px rgba(46, 45, 116, 0.05);\n padding:
|
|
7938
|
-
var Wrapper$k = /*#__PURE__*/styled.div(_templateObject5$i || (_templateObject5$i = /*#__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 flex: 1 0 0;\n border-radius: 15px;\n background: #
|
|
7939
|
-
var StyledAntSelect$5 = /*#__PURE__*/styled(Select)(_templateObject6$d || (_templateObject6$d = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .ant-select-selector {\n /* width: 22vw; */\n border-radius: 22px;\n }\n"])));
|
|
8132
|
+
var _templateObject3$N, _templateObject5$i, _templateObject7$b, _templateObject8$6, _templateObject9$3, _templateObject10$3, _templateObject11$2, _templateObject14$2;
|
|
8133
|
+
var CoverPage = /*#__PURE__*/styled.div(_templateObject3$N || (_templateObject3$N = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n border-radius: 16px;\n border: 1px solid #e3e3e3;\n background: #fff;\n box-shadow: 0px 4px 30px 0px rgba(46, 45, 116, 0.05);\n padding: 20px 20px 20px 20px;\n top: -60px;\n"])));
|
|
8134
|
+
var Wrapper$k = /*#__PURE__*/styled.div(_templateObject5$i || (_templateObject5$i = /*#__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 flex: 1 0 0;\n border-radius: 15px;\n background: #f8fafc;\n"])));
|
|
7940
8135
|
var Label$g = /*#__PURE__*/styled.div(_templateObject7$b || (_templateObject7$b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #8e8a85;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n"])));
|
|
7941
8136
|
var FilterRow = /*#__PURE__*/styled.div(_templateObject8$6 || (_templateObject8$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 20px;\n align-self: stretch;\n justify-content: space-between;\n"])));
|
|
7942
8137
|
var FilterColumn = /*#__PURE__*/styled.div(_templateObject9$3 || (_templateObject9$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 6px;\n align-self: stretch;\n margin: 10px;\n"])));
|
|
7943
8138
|
var RightColumn$1 = /*#__PURE__*/styled.div(_templateObject10$3 || (_templateObject10$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex-direction: row;\n display: flex;\n"])));
|
|
7944
8139
|
var LeftColumn = /*#__PURE__*/styled.div(_templateObject11$2 || (_templateObject11$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex-direction: row;\n display: flex;\n"])));
|
|
7945
|
-
var ApplyButton = /*#__PURE__*/styled(
|
|
8140
|
+
var ApplyButton = /*#__PURE__*/styled.button(_templateObject14$2 || (_templateObject14$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 15px;\n display: flex;\n padding: 7px 12px;\n justify-content: center;\n align-items: center;\n font-size: 14px;\n font-family: 'Lato', sans-serif;\n background: transparent;\n color: #3a3620;\n border: 1px solid #3a3630;\n\n &:not(:disabled):hover {\n background: #feba30;\n }\n\n &:disabled {\n background: #ccc;\n cursor: not-allowed;\n opacity: 0.6;\n }\n"])));
|
|
7946
8141
|
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
|
|
7962
|
-
|
|
7963
|
-
|
|
7964
|
-
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
|
|
7976
|
-
|
|
7977
|
-
|
|
7978
|
-
|
|
7979
|
-
|
|
7980
|
-
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
|
|
7985
|
-
|
|
7986
|
-
|
|
7987
|
-
|
|
7988
|
-
|
|
7989
|
-
|
|
7990
|
-
|
|
7991
|
-
|
|
7992
|
-
|
|
7993
|
-
|
|
7994
|
-
|
|
7995
|
-
|
|
7996
|
-
|
|
7997
|
-
|
|
7998
|
-
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
|
|
8002
|
-
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
8050
|
-
|
|
8051
|
-
|
|
8052
|
-
|
|
8053
|
-
|
|
8054
|
-
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
|
|
8062
|
-
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
//
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
|
|
8090
|
-
|
|
8091
|
-
}
|
|
8092
|
-
|
|
8093
|
-
|
|
8094
|
-
|
|
8095
|
-
|
|
8096
|
-
|
|
8097
|
-
}
|
|
8098
|
-
|
|
8099
|
-
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
|
|
8103
|
-
|
|
8104
|
-
|
|
8105
|
-
|
|
8106
|
-
|
|
8107
|
-
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
|
|
8118
|
-
|
|
8119
|
-
|
|
8142
|
+
// let todayDate = new Date();
|
|
8143
|
+
var initialState$1 = {
|
|
8144
|
+
'x-filters': [
|
|
8145
|
+
// {
|
|
8146
|
+
// field: 'action_date',
|
|
8147
|
+
// op: '>=',
|
|
8148
|
+
// value: `${format(new Date(todayDate), 'yyyy-MM-dd')}T00:00:00+00:00`,
|
|
8149
|
+
// },
|
|
8150
|
+
// {
|
|
8151
|
+
// field: 'action_date',
|
|
8152
|
+
// op: '<=',
|
|
8153
|
+
// value: `${format(new Date(todayDate), 'yyyy-MM-dd')}T23:59:59+00:00`,
|
|
8154
|
+
// },
|
|
8155
|
+
// { field: 'status', op: 'count', value: '' },
|
|
8156
|
+
],
|
|
8157
|
+
'x-pagination': {
|
|
8158
|
+
page: 1,
|
|
8159
|
+
per_page: 50
|
|
8160
|
+
}
|
|
8161
|
+
};
|
|
8162
|
+
var filterReducer = function filterReducer(state, action) {
|
|
8163
|
+
switch (action.type) {
|
|
8164
|
+
case 'SET_DATE_FILTER':
|
|
8165
|
+
return _extends({}, state, {
|
|
8166
|
+
'x-filters': [].concat(state['x-filters'].filter(function (f) {
|
|
8167
|
+
return f.field !== 'action_date' && f.field !== 'status';
|
|
8168
|
+
}), [{
|
|
8169
|
+
field: 'action_date',
|
|
8170
|
+
op: '>=',
|
|
8171
|
+
value: format(new Date(action.payload), 'yyyy-MM-dd') + "T00:00:00+00:00"
|
|
8172
|
+
}, {
|
|
8173
|
+
field: 'action_date',
|
|
8174
|
+
op: '<=',
|
|
8175
|
+
value: format(new Date(action.payload), 'yyyy-MM-dd') + "T23:59:59+00:00"
|
|
8176
|
+
}, {
|
|
8177
|
+
field: 'status',
|
|
8178
|
+
op: 'count',
|
|
8179
|
+
value: ''
|
|
8180
|
+
}])
|
|
8181
|
+
});
|
|
8182
|
+
case 'SET_CLIENT_FILTER':
|
|
8183
|
+
return _extends({}, state, {
|
|
8184
|
+
'x-filters': [].concat(state['x-filters'].filter(function (f) {
|
|
8185
|
+
return f.field !== 'order.customer_id';
|
|
8186
|
+
}), [{
|
|
8187
|
+
field: 'order.customer_id',
|
|
8188
|
+
op: '=',
|
|
8189
|
+
value: action.payload
|
|
8190
|
+
}])
|
|
8191
|
+
});
|
|
8192
|
+
case 'SET_ACTIONS_FILTER':
|
|
8193
|
+
return _extends({}, state, {
|
|
8194
|
+
'x-filters': [].concat(state['x-filters'].filter(function (f) {
|
|
8195
|
+
return f.field !== 'product_return_action_id';
|
|
8196
|
+
}), [{
|
|
8197
|
+
field: 'product_return_action_id',
|
|
8198
|
+
op: '=',
|
|
8199
|
+
value: action.payload
|
|
8200
|
+
}])
|
|
8201
|
+
});
|
|
8202
|
+
case 'SET_LOCATION_FILTER':
|
|
8203
|
+
return _extends({}, state, {
|
|
8204
|
+
'x-filters': [].concat(state['x-filters'].filter(function (f) {
|
|
8205
|
+
return f.field !== 'return_location';
|
|
8206
|
+
}), [{
|
|
8207
|
+
field: 'return_location',
|
|
8208
|
+
op: '=',
|
|
8209
|
+
value: action.payload
|
|
8210
|
+
}])
|
|
8211
|
+
});
|
|
8212
|
+
case 'SET_PAGE':
|
|
8213
|
+
return _extends({}, state, {
|
|
8214
|
+
'x-pagination': _extends({}, state['x-pagination'], {
|
|
8215
|
+
page: action.payload
|
|
8216
|
+
})
|
|
8217
|
+
});
|
|
8218
|
+
case 'SET_PERPAGE':
|
|
8219
|
+
return _extends({}, state, {
|
|
8220
|
+
'x-pagination': _extends({}, state['x-pagination'], {
|
|
8221
|
+
per_page: action.payload
|
|
8222
|
+
})
|
|
8223
|
+
});
|
|
8224
|
+
case 'CLEAR_FILTERS':
|
|
8225
|
+
return _extends({}, state);
|
|
8226
|
+
default:
|
|
8227
|
+
return state;
|
|
8228
|
+
}
|
|
8229
|
+
};
|
|
8230
|
+
var filtersStateAtom = /*#__PURE__*/atom(initialState$1);
|
|
8231
|
+
var filtersReducerAtom = /*#__PURE__*/atom(function (get) {
|
|
8232
|
+
return get(filtersStateAtom);
|
|
8233
|
+
}, function (get, set, action) {
|
|
8234
|
+
return set(filtersStateAtom, filterReducer(get(filtersStateAtom), action));
|
|
8235
|
+
});
|
|
8236
|
+
|
|
8237
|
+
var _templateObject$24;
|
|
8238
|
+
function SelectionFilter() {
|
|
8239
|
+
var _useCustomerData = useCustomerData(),
|
|
8240
|
+
customers = _useCustomerData[0];
|
|
8241
|
+
var _useActionType = useActionType(),
|
|
8242
|
+
actionType = _useActionType[0];
|
|
8243
|
+
var _useLocationData = useLocationData(),
|
|
8244
|
+
locationData = _useLocationData[0];
|
|
8245
|
+
var _useState = useState([]),
|
|
8246
|
+
filteredLocationOptions = _useState[0],
|
|
8247
|
+
setFilteredLocationOptions = _useState[1];
|
|
8248
|
+
var _useState2 = useState(),
|
|
8249
|
+
getUuid = _useState2[0],
|
|
8250
|
+
setUuid = _useState2[1];
|
|
8251
|
+
var _useSelectedAction = useSelectedAction(),
|
|
8252
|
+
selectedFilterValue = _useSelectedAction[0],
|
|
8253
|
+
setSelectedFilterValue = _useSelectedAction[1];
|
|
8254
|
+
var _useAtom = useAtom(filtersReducerAtom),
|
|
8255
|
+
dispatch = _useAtom[1];
|
|
8256
|
+
var _useSelectedLocation = useSelectedLocation(),
|
|
8257
|
+
selectedLocationValue = _useSelectedLocation[0],
|
|
8258
|
+
setSelectedLocationValue = _useSelectedLocation[1];
|
|
8259
|
+
var _useSelectedClient = useSelectedClient(),
|
|
8260
|
+
selectedClientId = _useSelectedClient[0],
|
|
8261
|
+
setSelectedClient = _useSelectedClient[1];
|
|
8262
|
+
var _useTableName = useTableName(),
|
|
8263
|
+
setClientLabel = _useTableName[1];
|
|
8264
|
+
var _useState3 = useState(),
|
|
8265
|
+
name = _useState3[0],
|
|
8266
|
+
setName = _useState3[1];
|
|
8267
|
+
var _useState4 = useState(false),
|
|
8268
|
+
isButtonEnabled = _useState4[0],
|
|
8269
|
+
setIsButtonEnabled = _useState4[1];
|
|
8270
|
+
//client options
|
|
8271
|
+
var clientOptions = customers == null ? void 0 : customers.map(function (option) {
|
|
8272
|
+
var _option$customer_name, _option$customer_name2;
|
|
8273
|
+
return {
|
|
8274
|
+
label: (option == null || (_option$customer_name = option.customer_name) == null || (_option$customer_name = _option$customer_name.charAt(0)) == null ? void 0 : _option$customer_name.toUpperCase()) + (option == null || (_option$customer_name2 = option.customer_name) == null ? void 0 : _option$customer_name2.slice(1)),
|
|
8275
|
+
value: (option == null ? void 0 : option.id) + "_" + (option == null ? void 0 : option.uuid),
|
|
8276
|
+
id: option == null ? void 0 : option.id,
|
|
8277
|
+
uuid: option == null ? void 0 : option.uuid
|
|
8278
|
+
};
|
|
8279
|
+
});
|
|
8280
|
+
var actionTypeOptions = actionType == null ? void 0 : actionType.map(function (option) {
|
|
8281
|
+
var _option$type, _option$type2;
|
|
8282
|
+
return {
|
|
8283
|
+
label: (option == null || (_option$type = option.type) == null || (_option$type = _option$type.charAt(0)) == null ? void 0 : _option$type.toUpperCase()) + (option == null || (_option$type2 = option.type) == null ? void 0 : _option$type2.slice(1)),
|
|
8284
|
+
value: option == null ? void 0 : option.id
|
|
8285
|
+
};
|
|
8286
|
+
});
|
|
8287
|
+
var LocationOptions = locationData == null ? void 0 : locationData.map(function (option) {
|
|
8288
|
+
return {
|
|
8289
|
+
label: option == null ? void 0 : option.location_name,
|
|
8290
|
+
value: option == null ? void 0 : option.customer_id
|
|
8291
|
+
};
|
|
8292
|
+
});
|
|
8293
|
+
//client change
|
|
8294
|
+
var handleSelectChange = function handleSelectChange(value, option) {
|
|
8295
|
+
console.log(value, 'value');
|
|
8296
|
+
var selectedLabel = option == null ? void 0 : option.label;
|
|
8297
|
+
var selectedValue = option == null ? void 0 : option.id;
|
|
8298
|
+
var selectedUuids = option == null ? void 0 : option.uuid;
|
|
8299
|
+
setSelectedClient(selectedValue);
|
|
8300
|
+
setName(selectedLabel);
|
|
8301
|
+
localStorage.setItem('clientName', selectedLabel);
|
|
8302
|
+
var filteredSubLocations = locationData == null ? void 0 : locationData.filter(function (subCat) {
|
|
8303
|
+
return (subCat == null ? void 0 : subCat.customer_id) === selectedUuids;
|
|
8304
|
+
}).map(function (subCat) {
|
|
8305
|
+
return {
|
|
8306
|
+
label: subCat == null ? void 0 : subCat.location_name,
|
|
8307
|
+
value: subCat == null ? void 0 : subCat.customer_id
|
|
8308
|
+
};
|
|
8309
|
+
});
|
|
8310
|
+
setFilteredLocationOptions(filteredSubLocations);
|
|
8311
|
+
setUuid('');
|
|
8312
|
+
};
|
|
8313
|
+
useEffect(function () {}, [getUuid, filteredLocationOptions]);
|
|
8314
|
+
//location change
|
|
8315
|
+
var handleLocationChange = function handleLocationChange(value, option) {
|
|
8316
|
+
var selectedLabel = option == null ? void 0 : option.label;
|
|
8317
|
+
console.log(value, 'value');
|
|
8318
|
+
setSelectedLocationValue(selectedLabel);
|
|
8319
|
+
if (selectedLocationValue === selectedLabel) {
|
|
8320
|
+
dispatch({
|
|
8321
|
+
type: 'CLEAR_ALL_FILTERS',
|
|
8322
|
+
payload: null
|
|
8323
|
+
});
|
|
8324
|
+
}
|
|
8325
|
+
};
|
|
8326
|
+
//action type
|
|
8327
|
+
var handleActionClick = function handleActionClick(value) {
|
|
8328
|
+
setSelectedFilterValue(value);
|
|
8329
|
+
if (selectedFilterValue === value) {
|
|
8330
|
+
dispatch({
|
|
8331
|
+
type: 'CLEAR_ALL_FILTERS',
|
|
8332
|
+
payload: null
|
|
8333
|
+
});
|
|
8334
|
+
}
|
|
8335
|
+
};
|
|
8336
|
+
//Apply filters
|
|
8337
|
+
var applyFilters = function applyFilters() {
|
|
8338
|
+
if (storedName) {
|
|
8339
|
+
setClientLabel(storedName);
|
|
8340
|
+
}
|
|
8341
|
+
if (selectedClientId) {
|
|
8342
|
+
dispatch({
|
|
8343
|
+
type: 'SET_CLIENT_FILTER',
|
|
8344
|
+
payload: selectedClientId
|
|
8345
|
+
});
|
|
8346
|
+
}
|
|
8347
|
+
if (selectedFilterValue) {
|
|
8348
|
+
dispatch({
|
|
8349
|
+
type: 'SET_ACTIONS_FILTER',
|
|
8350
|
+
payload: selectedFilterValue
|
|
8351
|
+
});
|
|
8352
|
+
}
|
|
8353
|
+
if (selectedLocationValue) {
|
|
8354
|
+
dispatch({
|
|
8355
|
+
type: 'SET_LOCATION_FILTER',
|
|
8356
|
+
payload: selectedLocationValue
|
|
8357
|
+
});
|
|
8358
|
+
}
|
|
8359
|
+
};
|
|
8360
|
+
var storedName = localStorage.getItem('clientName');
|
|
8361
|
+
useEffect(function () {
|
|
8362
|
+
if (selectedClientId || selectedFilterValue || selectedLocationValue) {
|
|
8363
|
+
setIsButtonEnabled(true);
|
|
8364
|
+
} else {
|
|
8365
|
+
setIsButtonEnabled(false);
|
|
8366
|
+
}
|
|
8367
|
+
}, [storedName, selectedFilterValue, selectedLocationValue]);
|
|
8368
|
+
console.log('check', storedName, selectedFilterValue, selectedLocationValue);
|
|
8120
8369
|
return React.createElement(Wrapper$k, null, React.createElement(FilterRow, null, React.createElement(LeftColumn, null, React.createElement(FilterColumn, null, React.createElement(Label$g, null, "Clients"), React.createElement(StyledAntSelect$5, {
|
|
8121
|
-
options:
|
|
8370
|
+
options: clientOptions,
|
|
8122
8371
|
placeholder: "Select Client Name",
|
|
8123
|
-
onChange:
|
|
8124
|
-
mode: "multiple",
|
|
8372
|
+
onChange: handleSelectChange,
|
|
8125
8373
|
style: {
|
|
8126
8374
|
minWidth: '14vw'
|
|
8127
|
-
}
|
|
8375
|
+
},
|
|
8376
|
+
allowClear: true,
|
|
8377
|
+
value: name
|
|
8128
8378
|
})), React.createElement(FilterColumn, null, React.createElement(Label$g, null, "Action Type"), React.createElement(StyledAntSelect$5, {
|
|
8129
|
-
options:
|
|
8379
|
+
options: actionTypeOptions,
|
|
8130
8380
|
placeholder: "Select Action Type",
|
|
8131
|
-
|
|
8132
|
-
onChange:
|
|
8381
|
+
value: selectedFilterValue,
|
|
8382
|
+
onChange: handleActionClick,
|
|
8133
8383
|
style: {
|
|
8134
8384
|
minWidth: '14vw'
|
|
8135
8385
|
},
|
|
8136
|
-
|
|
8137
|
-
mode: "multiple"
|
|
8386
|
+
allowClear: true
|
|
8138
8387
|
})), React.createElement(FilterColumn, null, React.createElement(Label$g, null, "Location "), React.createElement(StyledAntSelect$5, {
|
|
8139
|
-
options:
|
|
8388
|
+
options: (filteredLocationOptions == null ? void 0 : filteredLocationOptions.length) > 0 ? filteredLocationOptions : LocationOptions,
|
|
8389
|
+
value: selectedLocationValue,
|
|
8140
8390
|
placeholder: "Select Location",
|
|
8141
|
-
onChange:
|
|
8142
|
-
mode: "multiple",
|
|
8391
|
+
onChange: handleLocationChange,
|
|
8143
8392
|
style: {
|
|
8144
8393
|
minWidth: '14vw'
|
|
8145
|
-
}
|
|
8394
|
+
},
|
|
8395
|
+
allowClear: true
|
|
8146
8396
|
}))), React.createElement(RightColumn$1, null, React.createElement(ApplyButton, {
|
|
8147
|
-
|
|
8397
|
+
onClick: applyFilters,
|
|
8398
|
+
disabled: !isButtonEnabled
|
|
8148
8399
|
}, "Apply"))));
|
|
8149
8400
|
}
|
|
8401
|
+
var StyledAntSelect$5 = /*#__PURE__*/styled(Select)(_templateObject$24 || (_templateObject$24 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .ant-select-selector {\n /* width: 22vw; */\n border-radius: 22px;\n }\n"])));
|
|
8150
8402
|
|
|
8151
8403
|
function HeaderFilter() {
|
|
8404
|
+
var _useCustomerData = useCustomerData(),
|
|
8405
|
+
setCustomers = _useCustomerData[1];
|
|
8406
|
+
var _useActionType = useActionType(),
|
|
8407
|
+
setActionType = _useActionType[1];
|
|
8408
|
+
var _useLocationData = useLocationData(),
|
|
8409
|
+
setLocationData = _useLocationData[1];
|
|
8410
|
+
//API for client data
|
|
8411
|
+
var _useApiHook = useApiHook({
|
|
8412
|
+
endpoint: "/customers/",
|
|
8413
|
+
method: 'GET',
|
|
8414
|
+
pagination: {
|
|
8415
|
+
page: 1,
|
|
8416
|
+
per_page: 50
|
|
8417
|
+
}
|
|
8418
|
+
}),
|
|
8419
|
+
fetchedCustomerData = _useApiHook.data,
|
|
8420
|
+
loading = _useApiHook.loading;
|
|
8421
|
+
//API for action type
|
|
8422
|
+
var _useApiHook2 = useApiHook({
|
|
8423
|
+
endpoint: "/orders/getStaticData/all/",
|
|
8424
|
+
method: 'GET',
|
|
8425
|
+
pagination: {
|
|
8426
|
+
page: 1,
|
|
8427
|
+
per_page: 50
|
|
8428
|
+
}
|
|
8429
|
+
}),
|
|
8430
|
+
fetchedStaticData = _useApiHook2.data,
|
|
8431
|
+
actionLoading = _useApiHook2.loading;
|
|
8432
|
+
//API for return locations
|
|
8433
|
+
var _useApiHook3 = useApiHook({
|
|
8434
|
+
endpoint: "/return_locations/",
|
|
8435
|
+
method: 'GET',
|
|
8436
|
+
pagination: {
|
|
8437
|
+
page: 1,
|
|
8438
|
+
per_page: 50
|
|
8439
|
+
}
|
|
8440
|
+
}),
|
|
8441
|
+
fetchedLocationData = _useApiHook3.data,
|
|
8442
|
+
locationloading = _useApiHook3.loading;
|
|
8443
|
+
useEffect(function () {
|
|
8444
|
+
if (fetchedCustomerData && fetchedCustomerData != null && fetchedCustomerData.data) {
|
|
8445
|
+
setCustomers(fetchedCustomerData == null ? void 0 : fetchedCustomerData.data);
|
|
8446
|
+
}
|
|
8447
|
+
}, [loading, fetchedCustomerData]);
|
|
8448
|
+
useEffect(function () {
|
|
8449
|
+
if (fetchedStaticData && fetchedStaticData != null && fetchedStaticData.data) {
|
|
8450
|
+
var _fetchedStaticData$da;
|
|
8451
|
+
setActionType(fetchedStaticData == null || (_fetchedStaticData$da = fetchedStaticData.data) == null ? void 0 : _fetchedStaticData$da.flatMap(function (i) {
|
|
8452
|
+
return i.order_contact_action_type;
|
|
8453
|
+
}));
|
|
8454
|
+
}
|
|
8455
|
+
}, [actionLoading, fetchedStaticData]);
|
|
8456
|
+
useEffect(function () {
|
|
8457
|
+
if (fetchedLocationData && fetchedLocationData != null && fetchedLocationData.data) {
|
|
8458
|
+
setLocationData(fetchedLocationData == null ? void 0 : fetchedLocationData.data);
|
|
8459
|
+
}
|
|
8460
|
+
}, [locationloading, fetchedLocationData]);
|
|
8152
8461
|
return React.createElement(CoverPage, null, React.createElement(SelectionFilter, null));
|
|
8153
8462
|
}
|
|
8154
8463
|
|
|
8155
|
-
var _templateObject$
|
|
8464
|
+
var _templateObject$25, _templateObject4$u, _templateObject5$j, _templateObject7$c, _templateObject8$7;
|
|
8156
8465
|
//Left side
|
|
8157
|
-
var LeftSideConatiner = /*#__PURE__*/styled.div(_templateObject$
|
|
8466
|
+
var LeftSideConatiner = /*#__PURE__*/styled.div(_templateObject$25 || (_templateObject$25 = /*#__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: 8px;\n border-radius: 20px;\n border: 1px solid var(--tonal-brown-10, #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 .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 }\n }\n"])));
|
|
8158
8467
|
//
|
|
8159
8468
|
var StyledFiter = /*#__PURE__*/styled.div(_templateObject4$u || (_templateObject4$u = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n"])));
|
|
8160
8469
|
var StyledFIlterELements = /*#__PURE__*/styled.div(_templateObject5$j || (_templateObject5$j = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 0;\n gap: 10px;\n align-items: center;\n"])));
|
|
@@ -8162,10 +8471,10 @@ var Text$8 = /*#__PURE__*/styled.div(_templateObject7$c || (_templateObject7$c =
|
|
|
8162
8471
|
// Right side filter
|
|
8163
8472
|
var StyledTableFilter = /*#__PURE__*/styled.div(_templateObject8$7 || (_templateObject8$7 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
8164
8473
|
|
|
8165
|
-
var _templateObject2$
|
|
8166
|
-
var StyledBulkItem$1 = /*#__PURE__*/styled.div(_templateObject2$
|
|
8474
|
+
var _templateObject2$1o;
|
|
8475
|
+
var StyledBulkItem$1 = /*#__PURE__*/styled.div(_templateObject2$1o || (_templateObject2$1o = /*#__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"])));
|
|
8167
8476
|
|
|
8168
|
-
var _templateObject$
|
|
8477
|
+
var _templateObject$26, _templateObject2$1p;
|
|
8169
8478
|
var SearchType = function SearchType() {
|
|
8170
8479
|
var _useState = useState(''),
|
|
8171
8480
|
searchText = _useState[0],
|
|
@@ -8180,8 +8489,8 @@ var SearchType = function SearchType() {
|
|
|
8180
8489
|
onChange: handleInputChange
|
|
8181
8490
|
}));
|
|
8182
8491
|
};
|
|
8183
|
-
var Search = /*#__PURE__*/styled.div(_templateObject$
|
|
8184
|
-
var SearchInput = /*#__PURE__*/styled.input(_templateObject2$
|
|
8492
|
+
var Search = /*#__PURE__*/styled.div(_templateObject$26 || (_templateObject$26 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n svg {\n position: absolute;\n left: 12px;\n top: 50%;\n transform: translateY(-50%);\n }\n"])));
|
|
8493
|
+
var SearchInput = /*#__PURE__*/styled.input(_templateObject2$1p || (_templateObject2$1p = /*#__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"])));
|
|
8185
8494
|
|
|
8186
8495
|
function DownloadIcon() {
|
|
8187
8496
|
return React.createElement("svg", {
|
|
@@ -8201,7 +8510,7 @@ function DownloadIcon() {
|
|
|
8201
8510
|
}));
|
|
8202
8511
|
}
|
|
8203
8512
|
|
|
8204
|
-
var _templateObject$
|
|
8513
|
+
var _templateObject$27, _templateObject2$1q, _templateObject3$O, _templateObject4$v, _templateObject5$k, _templateObject6$d;
|
|
8205
8514
|
var RightFilters = function RightFilters() {
|
|
8206
8515
|
return React.createElement(Container$13, null, React.createElement(TextConatiner, null, React.createElement(Text$9, null, "Create Return")), React.createElement(StyledBulkItem$1, null, React.createElement(SearchType, null)), React.createElement(IconConatiner, null, React.createElement(Mid, null, React.createElement(IconText, null, "Export"), React.createElement(DownloadIcon, null))));
|
|
8207
8516
|
// return (
|
|
@@ -8217,40 +8526,23 @@ var RightFilters = function RightFilters() {
|
|
|
8217
8526
|
// // </StyledBulkFilterCover>
|
|
8218
8527
|
// );
|
|
8219
8528
|
};
|
|
8220
|
-
var Container$13 = /*#__PURE__*/styled.div(_templateObject$
|
|
8221
|
-
var Mid = /*#__PURE__*/styled.div(_templateObject2$
|
|
8529
|
+
var Container$13 = /*#__PURE__*/styled.div(_templateObject$27 || (_templateObject$27 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n/* align-items: flex-start; */\ngap: 16px;\nalign-items: center;\n\n"])));
|
|
8530
|
+
var Mid = /*#__PURE__*/styled.div(_templateObject2$1q || (_templateObject2$1q = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 4px 10px;\n align-items: center;\n gap: 8px;\n align-self: stretch;\n border-radius: 15px 0px 0px 15px;\n"])));
|
|
8222
8531
|
var TextConatiner = /*#__PURE__*/styled.div(_templateObject3$O || (_templateObject3$O = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 7px 12px;\n justify-content: center;\n align-items: center;\n gap: 2px;\n border-radius: 15px;\n background: rgba(136, 128, 117, 0.35);\n"])));
|
|
8223
8532
|
var Text$9 = /*#__PURE__*/styled.div(_templateObject4$v || (_templateObject4$v = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #888075;\n font-family: \"'Lato\";\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: 20px;\n"])));
|
|
8224
8533
|
var IconConatiner = /*#__PURE__*/styled.div(_templateObject5$k || (_templateObject5$k = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* display: flex;\n height: 34px;\n padding: 4px 10px; \n align-items: flex-start;\n border-radius: 8px 8px 8px 8px; */\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n background: #f0f2f2;\n border: 1px solid #e2e0db;\n display: flex;\n padding: 7px 12px;\n justify-content: center;\n align-items: center;\n gap: 2px;\n border-radius: 15px;\n height: 34px;\n"])));
|
|
8225
|
-
var IconText = /*#__PURE__*/styled.div(_templateObject6$
|
|
8534
|
+
var IconText = /*#__PURE__*/styled.div(_templateObject6$d || (_templateObject6$d = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #3a3630;\n text-align: center;\n\n /* body/captions */\n font-family: 'Lato';\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px;\n"])));
|
|
8226
8535
|
|
|
8227
8536
|
var ReturnFilter = function ReturnFilter() {
|
|
8228
|
-
return React.createElement(React.Fragment, null, React.createElement(StyledFiter, null, React.createElement(StyledFIlterELements, null, React.createElement(
|
|
8537
|
+
return React.createElement(React.Fragment, null, React.createElement(StyledFiter, null, React.createElement(StyledFIlterELements, null, React.createElement(StyledTableFilter, null)), React.createElement(RightFilters, null)));
|
|
8229
8538
|
};
|
|
8230
8539
|
|
|
8231
|
-
var _templateObject$
|
|
8540
|
+
var _templateObject$28, _templateObject2$1r, _templateObject32$1;
|
|
8232
8541
|
// Styled components
|
|
8233
|
-
var StyledTableWrapper$1 = /*#__PURE__*/styled.div(_templateObject$
|
|
8234
|
-
var StyledTable$1 = /*#__PURE__*/styled.table(_templateObject2$
|
|
8235
|
-
var StyledTdBasic = /*#__PURE__*/styled.td(_templateObject4$w || (_templateObject4$w = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #3a3630;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n padding: 15px;\n background: #fff;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-right: none;\n border-left: none;\n"])));
|
|
8236
|
-
var Header$2 = /*#__PURE__*/styled.th(_templateObject28 || (_templateObject28 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\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: 1px solid rgba(0, 0, 0, 0.08);\n border-right: none;\n border-left: none;\n text-align: left;\n"])));
|
|
8237
|
-
var Back = /*#__PURE__*/styled.div(_templateObject29 || (_templateObject29 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 20px;\n border: 1px solid var(--contextual-blue, #6396e5);\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n color: #6396e5;\n align-content: center;\n padding: 4px 12px;\n height: 28px;\n cursor: pointer;\n &:hover {\n background-color: #89b8ff;\n color: white;\n }\n"])));
|
|
8238
|
-
var Remove = /*#__PURE__*/styled.div(_templateObject30$1 || (_templateObject30$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 20px;\n border: 1px solid rgba(233, 82, 82, 0.5);\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n color: #e95252;\n align-content: center;\n padding: 4px 12px;\n height: 28px;\n cursor: pointer;\n &:hover {\n background-color: #ff7b7b;\n color: white;\n }\n"])));
|
|
8239
|
-
var Buttons$1 = /*#__PURE__*/styled.div(_templateObject31$1 || (_templateObject31$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n gap: 10px;\n white-space: nowrap;\n align-items: center;\n"])));
|
|
8542
|
+
var StyledTableWrapper$1 = /*#__PURE__*/styled.div(_templateObject$28 || (_templateObject$28 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n overflow-x: auto;\n max-height: calc(100vh - 396px);\n scrollbar-width: none;\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"])));
|
|
8543
|
+
var StyledTable$1 = /*#__PURE__*/styled.table(_templateObject2$1r || (_templateObject2$1r = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-spacing: 0 10px;\n width: 100%;\n min-width: 1600px;\n thead {\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\n .shareIconContainer {\n display: flex;\n width: 24px;\n height: 24px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 10px;\n flex-shrink: 0;\n border-radius: 15px;\n background: #edebe8;\n cursor: pointer;\n }\n .statuscontainer {\n display: flex;\n padding: 6px 10px;\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 }\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"])));
|
|
8240
8544
|
var EmptyDataContainer = /*#__PURE__*/styled.div(_templateObject32$1 || (_templateObject32$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n"])));
|
|
8241
8545
|
|
|
8242
|
-
var getIntegerValue = function getIntegerValue(value) {
|
|
8243
|
-
return value != null ? value : 0;
|
|
8244
|
-
};
|
|
8245
|
-
var getStringValue = function getStringValue(value) {
|
|
8246
|
-
return value === '' ? 'N/A' : value;
|
|
8247
|
-
};
|
|
8248
|
-
var FormattedDate = function FormattedDate(_ref) {
|
|
8249
|
-
var date = _ref.date;
|
|
8250
|
-
var formattedDate = format(new Date(date), 'dd/MM/yyyy');
|
|
8251
|
-
return formattedDate;
|
|
8252
|
-
};
|
|
8253
|
-
|
|
8254
8546
|
var PrinterIcon = function PrinterIcon() {
|
|
8255
8547
|
return React.createElement("svg", {
|
|
8256
8548
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -8280,33 +8572,52 @@ function DownIcon() {
|
|
|
8280
8572
|
}));
|
|
8281
8573
|
}
|
|
8282
8574
|
|
|
8283
|
-
// import React, { useEffect } from 'react';
|
|
8284
8575
|
var ReturnOrderTable = function ReturnOrderTable(_ref) {
|
|
8285
8576
|
var loadingskeleton = _ref.loadingskeleton;
|
|
8286
|
-
var
|
|
8287
|
-
|
|
8288
|
-
var
|
|
8289
|
-
|
|
8290
|
-
|
|
8291
|
-
setSelectedInvoices = _useSelectedEmail[1];
|
|
8577
|
+
var _useAtom = useAtom(filtersReducerAtom),
|
|
8578
|
+
state = _useAtom[0];
|
|
8579
|
+
var _useSelectedOrders = useSelectedOrders(),
|
|
8580
|
+
selectedReturnOrder = _useSelectedOrders[0],
|
|
8581
|
+
setSelectedReturnOrder = _useSelectedOrders[1];
|
|
8292
8582
|
var _useState = useState(false),
|
|
8293
8583
|
selectAll = _useState[0],
|
|
8294
8584
|
setSelectAll = _useState[1];
|
|
8585
|
+
var filters = state['x-filters'],
|
|
8586
|
+
pagination = state['x-pagination'];
|
|
8587
|
+
var _useReturnData = useReturnData(),
|
|
8588
|
+
returnData = _useReturnData[0],
|
|
8589
|
+
setReturnData = _useReturnData[1];
|
|
8590
|
+
var _useLoading = useLoading(),
|
|
8591
|
+
setLoading = _useLoading[1];
|
|
8592
|
+
var _useApiHook = useApiHook({
|
|
8593
|
+
endpoint: '/return_order_products/',
|
|
8594
|
+
method: 'GET',
|
|
8595
|
+
filters: filters,
|
|
8596
|
+
pagination: pagination
|
|
8597
|
+
}),
|
|
8598
|
+
fetchedOrderData = _useApiHook.data,
|
|
8599
|
+
staticDataLoading = _useApiHook.loading;
|
|
8600
|
+
useEffect(function () {
|
|
8601
|
+
setLoading(staticDataLoading);
|
|
8602
|
+
if (fetchedOrderData && fetchedOrderData != null && fetchedOrderData.data) {
|
|
8603
|
+
setReturnData(fetchedOrderData == null ? void 0 : fetchedOrderData.data);
|
|
8604
|
+
}
|
|
8605
|
+
}, [fetchedOrderData, staticDataLoading]);
|
|
8295
8606
|
var handleSelectAll = function handleSelectAll(e) {
|
|
8296
8607
|
setSelectAll(e.target.checked);
|
|
8297
8608
|
if (e.target.checked) {
|
|
8298
|
-
|
|
8609
|
+
setSelectedReturnOrder(returnData.map(function (invoice) {
|
|
8299
8610
|
return {
|
|
8300
8611
|
id: invoice.id,
|
|
8301
8612
|
status_id: 3
|
|
8302
8613
|
};
|
|
8303
8614
|
}));
|
|
8304
8615
|
} else {
|
|
8305
|
-
|
|
8616
|
+
setSelectedReturnOrder([]);
|
|
8306
8617
|
}
|
|
8307
8618
|
};
|
|
8308
8619
|
var handleSelectInvoice = function handleSelectInvoice(id) {
|
|
8309
|
-
|
|
8620
|
+
setSelectedReturnOrder(function (prevSelectedInvoices) {
|
|
8310
8621
|
var isSelected = prevSelectedInvoices == null ? void 0 : prevSelectedInvoices.some(function (invoice) {
|
|
8311
8622
|
return invoice.id === id;
|
|
8312
8623
|
});
|
|
@@ -8337,19 +8648,20 @@ var ReturnOrderTable = function ReturnOrderTable(_ref) {
|
|
|
8337
8648
|
active: true
|
|
8338
8649
|
})), React.createElement("td", {
|
|
8339
8650
|
colSpan: 6
|
|
8340
|
-
})) : (
|
|
8341
|
-
colSpan:
|
|
8342
|
-
}, React.createElement(EmptyDataContainer, null, React.createElement(Empty, null)))) :
|
|
8651
|
+
})) : (returnData == null ? void 0 : returnData.length) === 0 ? React.createElement("tr", null, React.createElement("td", {
|
|
8652
|
+
colSpan: 14
|
|
8653
|
+
}, React.createElement(EmptyDataContainer, null, React.createElement(Empty, null)))) : returnData == null ? void 0 : returnData.map(function (item) {
|
|
8654
|
+
var _item$order_data, _item$order_data2, _item$return_reasons, _item$collection_reas;
|
|
8343
8655
|
return React.createElement("tr", {
|
|
8344
|
-
key:
|
|
8656
|
+
key: item.id
|
|
8345
8657
|
}, React.createElement("td", null, React.createElement(Checkbox$1, {
|
|
8346
|
-
checked:
|
|
8347
|
-
return (selectedInvoice == null ? void 0 : selectedInvoice.id) ===
|
|
8658
|
+
checked: selectedReturnOrder == null ? void 0 : selectedReturnOrder.some(function (selectedInvoice) {
|
|
8659
|
+
return (selectedInvoice == null ? void 0 : selectedInvoice.id) === item.id;
|
|
8348
8660
|
}),
|
|
8349
8661
|
onChange: function onChange() {
|
|
8350
|
-
return handleSelectInvoice(
|
|
8662
|
+
return handleSelectInvoice(item.id);
|
|
8351
8663
|
}
|
|
8352
|
-
})), React.createElement("td", null,
|
|
8664
|
+
})), React.createElement("td", null, "N/A"), React.createElement("td", null, item == null ? void 0 : item.return_location), React.createElement("td", null, React.createElement("ul", {
|
|
8353
8665
|
style: {
|
|
8354
8666
|
listStyleType: 'none',
|
|
8355
8667
|
padding: 0
|
|
@@ -8360,25 +8672,23 @@ var ReturnOrderTable = function ReturnOrderTable(_ref) {
|
|
|
8360
8672
|
fontWeight: 600,
|
|
8361
8673
|
paddingLeft: 0
|
|
8362
8674
|
}
|
|
8363
|
-
},
|
|
8675
|
+
}, item == null || (_item$order_data = item.order_data) == null || (_item$order_data = _item$order_data.order_recipient) == null ? void 0 : _item$order_data.recipient_name), React.createElement("li", {
|
|
8364
8676
|
style: {
|
|
8365
8677
|
color: '#888075'
|
|
8366
8678
|
}
|
|
8367
|
-
},
|
|
8368
|
-
date: invoice == null ? void 0 : invoice.date
|
|
8369
|
-
})), React.createElement("td", null, invoice == null ? void 0 : invoice.vat_rate_amount), React.createElement("td", null, invoice == null ? void 0 : invoice.customer_name), React.createElement("td", null, invoice == null ? void 0 : invoice.customer_name), React.createElement("td", null, invoice == null ? void 0 : invoice.customer_name), React.createElement("td", null, invoice == null ? void 0 : invoice.customer_name), React.createElement("td", null, invoice == null ? void 0 : invoice.customer_name), React.createElement("td", null, invoice == null ? void 0 : invoice.customer_name), React.createElement("td", null, React.createElement("div", {
|
|
8679
|
+
}, 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.createElement("td", null, item == null ? void 0 : item.code), React.createElement("td", null, item == null ? void 0 : item.description), React.createElement("td", null, "N/A"), React.createElement("td", null, item == null ? void 0 : item.weight), React.createElement("td", null, item == null ? void 0 : item.cube), React.createElement("td", null, item == null || (_item$return_reasons = item.return_reasons) == null ? void 0 : _item$return_reasons.reason), React.createElement("td", null, "N/A"), React.createElement("td", null, item == null || (_item$collection_reas = item.collection_reasons) == null ? void 0 : _item$collection_reas.reason), React.createElement("td", null, React.createElement("div", {
|
|
8370
8680
|
className: "shareIconContainer"
|
|
8371
8681
|
}, React.createElement(PrinterIcon, null), React.createElement(DownIcon, null))));
|
|
8372
8682
|
})))));
|
|
8373
8683
|
};
|
|
8374
8684
|
|
|
8375
|
-
var _templateObject$
|
|
8685
|
+
var _templateObject$29;
|
|
8376
8686
|
var ReturnTable = function ReturnTable() {
|
|
8377
8687
|
return React.createElement("div", null, React.createElement(DashBoardWrapper$2, null, React.createElement(RouterHeader, null), React.createElement("div", {
|
|
8378
8688
|
className: "Tableconatiner"
|
|
8379
8689
|
}, React.createElement(HeaderFilter, null), React.createElement(ReturnFilter, null), React.createElement(ReturnOrderTable, null))));
|
|
8380
8690
|
};
|
|
8381
|
-
var DashBoardWrapper$2 = /*#__PURE__*/styled.section(_templateObject$
|
|
8691
|
+
var DashBoardWrapper$2 = /*#__PURE__*/styled.section(_templateObject$29 || (_templateObject$29 = /*#__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"])));
|
|
8382
8692
|
|
|
8383
8693
|
function LoadIcon() {
|
|
8384
8694
|
return React.createElement("svg", {
|
|
@@ -8396,16 +8706,11 @@ function LoadIcon() {
|
|
|
8396
8706
|
}));
|
|
8397
8707
|
}
|
|
8398
8708
|
|
|
8399
|
-
// import React, { useEffect } from 'react';
|
|
8400
|
-
// import { StyledAntSelect } from '../../Header-filters/Styledfilters';
|
|
8401
8709
|
var OrderTable = function OrderTable(_ref) {
|
|
8402
8710
|
var loadingskeleton = _ref.loadingskeleton;
|
|
8403
|
-
var
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
var _useSelectedEmail = useSelectedEmail(),
|
|
8407
|
-
selectedInvoices = _useSelectedEmail[0],
|
|
8408
|
-
setSelectedInvoices = _useSelectedEmail[1];
|
|
8711
|
+
var _useSelectedOrders = useSelectedOrders(),
|
|
8712
|
+
selectedOrders = _useSelectedOrders[0],
|
|
8713
|
+
setSelectedReturnOrder = _useSelectedOrders[1];
|
|
8409
8714
|
var _useState = useState(false),
|
|
8410
8715
|
selectAll = _useState[0],
|
|
8411
8716
|
setSelectAll = _useState[1];
|
|
@@ -8414,27 +8719,51 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
8414
8719
|
};
|
|
8415
8720
|
var defaultPopupClassName = 'dropDownStyle';
|
|
8416
8721
|
var defaultSelectWrapperClass = 'rounded';
|
|
8722
|
+
var dropdownRefParent = useRef(null);
|
|
8723
|
+
var dropdownRef = useRef(null);
|
|
8724
|
+
var _usePrintOptionTOggle = usePrintOptionTOggle(),
|
|
8725
|
+
printToogle = _usePrintOptionTOggle[0],
|
|
8726
|
+
setPrintToggle = _usePrintOptionTOggle[1];
|
|
8727
|
+
var _useReturnAfterOrderD = useReturnAfterOrderData(),
|
|
8728
|
+
returnAfterOrder = _useReturnAfterOrderD[0];
|
|
8729
|
+
var OpenDropDown = function OpenDropDown(index) {
|
|
8730
|
+
setPrintToggle(function (prevIndex) {
|
|
8731
|
+
return prevIndex === index ? null : index;
|
|
8732
|
+
});
|
|
8733
|
+
};
|
|
8734
|
+
// Close dropdown outside click
|
|
8735
|
+
useEffect(function () {
|
|
8736
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
8737
|
+
return function () {
|
|
8738
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
8739
|
+
};
|
|
8740
|
+
}, []);
|
|
8741
|
+
var handleClickOutside = function handleClickOutside(event) {
|
|
8742
|
+
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
8743
|
+
setPrintToggle(null);
|
|
8744
|
+
}
|
|
8745
|
+
};
|
|
8417
8746
|
var handleSelectAll = function handleSelectAll(e) {
|
|
8418
8747
|
setSelectAll(e.target.checked);
|
|
8419
8748
|
if (e.target.checked) {
|
|
8420
|
-
|
|
8749
|
+
setSelectedReturnOrder(returnAfterOrder.map(function (e) {
|
|
8421
8750
|
return {
|
|
8422
|
-
id:
|
|
8751
|
+
id: e.id,
|
|
8423
8752
|
status_id: 3
|
|
8424
8753
|
};
|
|
8425
8754
|
}));
|
|
8426
8755
|
} else {
|
|
8427
|
-
|
|
8756
|
+
setSelectedReturnOrder([]);
|
|
8428
8757
|
}
|
|
8429
8758
|
};
|
|
8430
8759
|
var handleSelectInvoice = function handleSelectInvoice(id) {
|
|
8431
|
-
|
|
8432
|
-
var isSelected = prevSelectedInvoices == null ? void 0 : prevSelectedInvoices.some(function (
|
|
8433
|
-
return
|
|
8760
|
+
setSelectedReturnOrder(function (prevSelectedInvoices) {
|
|
8761
|
+
var isSelected = prevSelectedInvoices == null ? void 0 : prevSelectedInvoices.some(function (item) {
|
|
8762
|
+
return item.id === id;
|
|
8434
8763
|
});
|
|
8435
8764
|
if (isSelected) {
|
|
8436
|
-
return prevSelectedInvoices.filter(function (
|
|
8437
|
-
return
|
|
8765
|
+
return prevSelectedInvoices.filter(function (items) {
|
|
8766
|
+
return items.id !== id;
|
|
8438
8767
|
});
|
|
8439
8768
|
} else {
|
|
8440
8769
|
return [].concat(prevSelectedInvoices, [{
|
|
@@ -8444,6 +8773,43 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
8444
8773
|
}
|
|
8445
8774
|
});
|
|
8446
8775
|
};
|
|
8776
|
+
console.log('', returnAfterOrder);
|
|
8777
|
+
var assigneOptions = [{
|
|
8778
|
+
label: 'BJS Distribution',
|
|
8779
|
+
value: 'bjs-dist'
|
|
8780
|
+
}, {
|
|
8781
|
+
label: 'Haulage',
|
|
8782
|
+
value: 'haulage'
|
|
8783
|
+
}];
|
|
8784
|
+
var getStatusClass = function getStatusClass(status) {
|
|
8785
|
+
switch (status) {
|
|
8786
|
+
case 'Cancelled':
|
|
8787
|
+
return {
|
|
8788
|
+
color: '#E95252',
|
|
8789
|
+
background: 'rgba(233, 82, 82, 0.15)'
|
|
8790
|
+
};
|
|
8791
|
+
case 'Pending':
|
|
8792
|
+
return {
|
|
8793
|
+
color: '#F4A503',
|
|
8794
|
+
background: '#FFF1D6'
|
|
8795
|
+
};
|
|
8796
|
+
case 'Awaiting':
|
|
8797
|
+
return {
|
|
8798
|
+
color: '#845ADF',
|
|
8799
|
+
background: 'rgba(132, 90, 223, 0.15)'
|
|
8800
|
+
};
|
|
8801
|
+
case 'Completed':
|
|
8802
|
+
return {
|
|
8803
|
+
color: '#1F9254',
|
|
8804
|
+
background: 'rgba(41, 204, 106, 0.15)'
|
|
8805
|
+
};
|
|
8806
|
+
default:
|
|
8807
|
+
return {
|
|
8808
|
+
color: '#000',
|
|
8809
|
+
background: '#fff'
|
|
8810
|
+
};
|
|
8811
|
+
}
|
|
8812
|
+
};
|
|
8447
8813
|
return React.createElement(React.Fragment, null, React.createElement(StyledTableWrapper, {
|
|
8448
8814
|
id: "tableScrolling"
|
|
8449
8815
|
}, React.createElement(StyledTable, null, React.createElement("thead", null, React.createElement("tr", null, React.createElement("th", {
|
|
@@ -8461,19 +8827,30 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
8461
8827
|
active: true
|
|
8462
8828
|
})), React.createElement("td", {
|
|
8463
8829
|
colSpan: 6
|
|
8464
|
-
})) : (
|
|
8830
|
+
})) : (returnAfterOrder == null ? void 0 : returnAfterOrder.length) === 0 ? React.createElement("tr", null, React.createElement("td", {
|
|
8465
8831
|
colSpan: 7
|
|
8466
|
-
}, React.createElement(EmptyDataContainer, null, React.createElement(Empty, null)))) :
|
|
8832
|
+
}, React.createElement(EmptyDataContainer, null, React.createElement(Empty, null)))) : returnAfterOrder == null ? void 0 : returnAfterOrder.map(function (item, index) {
|
|
8833
|
+
var _item$order_recipient, _item$order_recipient2, _item$customer_data;
|
|
8834
|
+
var statusMapping = {
|
|
8835
|
+
CO: 'Cancelled',
|
|
8836
|
+
OO: 'On Hold',
|
|
8837
|
+
SC: 'Sub-Contracted',
|
|
8838
|
+
AR: 'Awaiting Route',
|
|
8839
|
+
SD: 'Completed',
|
|
8840
|
+
AD: 'Outstanding'
|
|
8841
|
+
};
|
|
8842
|
+
var status = statusMapping[item == null ? void 0 : item.status] || 'Unknown';
|
|
8843
|
+
var statusClass = getStatusClass(status);
|
|
8467
8844
|
return React.createElement("tr", {
|
|
8468
|
-
key:
|
|
8845
|
+
key: item.id
|
|
8469
8846
|
}, React.createElement("td", null, React.createElement(Checkbox$1, {
|
|
8470
|
-
checked:
|
|
8471
|
-
return (selectedInvoice == null ? void 0 : selectedInvoice.id) ===
|
|
8847
|
+
checked: selectedOrders == null ? void 0 : selectedOrders.some(function (selectedInvoice) {
|
|
8848
|
+
return (selectedInvoice == null ? void 0 : selectedInvoice.id) === item.id;
|
|
8472
8849
|
}),
|
|
8473
8850
|
onChange: function onChange() {
|
|
8474
|
-
return handleSelectInvoice(
|
|
8851
|
+
return handleSelectInvoice(item.id);
|
|
8475
8852
|
}
|
|
8476
|
-
})), React.createElement("td", null,
|
|
8853
|
+
})), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.created_at)), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.return_locations)), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.pick_up_location)), React.createElement("td", null, React.createElement("ul", {
|
|
8477
8854
|
style: {
|
|
8478
8855
|
listStyleType: 'none',
|
|
8479
8856
|
padding: 0
|
|
@@ -8484,17 +8861,15 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
8484
8861
|
fontWeight: 600,
|
|
8485
8862
|
paddingLeft: 0
|
|
8486
8863
|
}
|
|
8487
|
-
},
|
|
8864
|
+
}, displayValueOrNA(item == null || (_item$order_recipient = item.order_recipient) == null ? void 0 : _item$order_recipient.recipient_name)), React.createElement("li", {
|
|
8488
8865
|
style: {
|
|
8489
8866
|
color: '#888075'
|
|
8490
8867
|
}
|
|
8491
|
-
},
|
|
8492
|
-
|
|
8493
|
-
})), React.createElement("td", null, invoice == null ? void 0 : invoice.vat_rate_amount), React.createElement("td", null, invoice == null ? void 0 : invoice.customer_name), React.createElement("td", null, invoice == null ? void 0 : invoice.customer_name), React.createElement("td", null, invoice == null ? void 0 : invoice.customer_name), React.createElement("td", null, invoice == null ? void 0 : invoice.customer_name), React.createElement("td", null, invoice == null ? void 0 : invoice.customer_name), React.createElement("td", null, React.createElement(AntSelect, {
|
|
8494
|
-
options: [],
|
|
8868
|
+
}, displayValueOrNA(item == null || (_item$order_recipient2 = item.order_recipient) == null ? void 0 : _item$order_recipient2.postcode)))), React.createElement("td", null, displayValueOrNA(item == null || (_item$customer_data = item.customer_data) == null ? void 0 : _item$customer_data.customer_name)), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.consignment)), React.createElement("td", null, "N/A"), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.box_count)), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.weight), "KG"), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.cube)), React.createElement("td", null, React.createElement(AntSelect, {
|
|
8869
|
+
options: assigneOptions,
|
|
8495
8870
|
placeholder: "Select",
|
|
8496
8871
|
onChange: function onChange() {},
|
|
8497
|
-
defaultValue
|
|
8872
|
+
// defaultValue={item?.customer_name || ''}
|
|
8498
8873
|
style: defaultSelectStyle,
|
|
8499
8874
|
disabled: false,
|
|
8500
8875
|
// onSearch={handleSearch}
|
|
@@ -8507,18 +8882,26 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
8507
8882
|
listStyleType: 'none'
|
|
8508
8883
|
}
|
|
8509
8884
|
}, React.createElement("li", {
|
|
8510
|
-
className: "statustext"
|
|
8511
|
-
},
|
|
8885
|
+
className: "statustext " + statusClass
|
|
8886
|
+
}, status))), React.createElement("td", null, React.createElement("ul", {
|
|
8512
8887
|
className: "actionbox"
|
|
8888
|
+
}, React.createElement(CustomDrop, {
|
|
8889
|
+
ref: dropdownRefParent,
|
|
8890
|
+
className: printToogle === index ? 'active' : ''
|
|
8513
8891
|
}, React.createElement("li", {
|
|
8514
|
-
className: "shareIconContainer"
|
|
8515
|
-
|
|
8892
|
+
className: "shareIconContainer",
|
|
8893
|
+
onClick: function onClick() {
|
|
8894
|
+
return OpenDropDown(index);
|
|
8895
|
+
}
|
|
8896
|
+
}, React.createElement(PrinterIcon, null), React.createElement(DownIcon, null)), printToogle == index && React.createElement("div", {
|
|
8897
|
+
ref: dropdownRef
|
|
8898
|
+
}, React.createElement(PrintDropDown, null))), React.createElement("li", {
|
|
8516
8899
|
className: "downloadcontainer"
|
|
8517
8900
|
}, React.createElement(LoadIcon, null)))));
|
|
8518
8901
|
})))));
|
|
8519
8902
|
};
|
|
8520
8903
|
|
|
8521
|
-
var _templateObject$
|
|
8904
|
+
var _templateObject$2a, _templateObject2$1s, _templateObject3$P, _templateObject4$w;
|
|
8522
8905
|
var TableFilters = function TableFilters() {
|
|
8523
8906
|
return React.createElement(Container$14, null, React.createElement(StyledBulkItem$1, null, React.createElement(SearchType, null)), React.createElement(IconConatiner$1, null, React.createElement(Mid$1, null, React.createElement(IconText$1, null, "Export"), React.createElement(DownloadIcon, null))));
|
|
8524
8907
|
// return (
|
|
@@ -8534,8 +8917,8 @@ var TableFilters = function TableFilters() {
|
|
|
8534
8917
|
// // </StyledBulkFilterCover>
|
|
8535
8918
|
// );
|
|
8536
8919
|
};
|
|
8537
|
-
var Container$14 = /*#__PURE__*/styled.div(_templateObject$
|
|
8538
|
-
var Mid$1 = /*#__PURE__*/styled.div(_templateObject2$
|
|
8920
|
+
var Container$14 = /*#__PURE__*/styled.div(_templateObject$2a || (_templateObject$2a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n /* align-items: flex-start; */\n gap: 16px;\n align-items: center;\n"])));
|
|
8921
|
+
var Mid$1 = /*#__PURE__*/styled.div(_templateObject2$1s || (_templateObject2$1s = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 10px 10px 10px 10px;\n align-items: center;\n gap: 8px;\n align-self: stretch;\n /* border-radius: 15px 15px 15px 15px; */\n"])));
|
|
8539
8922
|
// const TextConatiner = styled.div`
|
|
8540
8923
|
// display: flex;
|
|
8541
8924
|
// padding: 7px 12px;
|
|
@@ -8554,7 +8937,7 @@ var Mid$1 = /*#__PURE__*/styled.div(_templateObject2$1r || (_templateObject2$1r
|
|
|
8554
8937
|
// line-height: 20px;
|
|
8555
8938
|
// `;
|
|
8556
8939
|
var IconConatiner$1 = /*#__PURE__*/styled.div(_templateObject3$P || (_templateObject3$P = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* display: flex;\n height: 34px;\n padding: 4px 10px; \n align-items: flex-start;\n border-radius: 8px 8px 8px 8px; */\n\n ///working\n /* box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n background: #f0f2f2;\n border: 1px solid #e2e0db;\n display: flex;\n padding: 7px 12px;\n justify-content: center;\n align-items: center;\n gap: 2px;\n border-radius: 15px;\n height: 34px; */\n ///////\n\n display: flex;\n height: 34px;\n padding: 1px;\n align-items: flex-start;\n background: #f0f2f2;\n border: 1px solid #e2e0db;\n border-radius: 20px 20px 20px 20px;\n\n /* shadow/shadow-xs */\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n"])));
|
|
8557
|
-
var IconText$1 = /*#__PURE__*/styled.div(_templateObject4$
|
|
8940
|
+
var IconText$1 = /*#__PURE__*/styled.div(_templateObject4$w || (_templateObject4$w = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #3a3630;\n text-align: center;\n\n /* body/captions */\n font-family: 'Lato';\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px;\n"])));
|
|
8558
8941
|
|
|
8559
8942
|
var FilterIcon = function FilterIcon() {
|
|
8560
8943
|
return React.createElement("svg", {
|
|
@@ -8673,6 +9056,44 @@ var AssigneIcon = function AssigneIcon() {
|
|
|
8673
9056
|
};
|
|
8674
9057
|
|
|
8675
9058
|
var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
9059
|
+
var _useState = useState(false),
|
|
9060
|
+
isDatePickerVisible = _useState[0],
|
|
9061
|
+
setDatePickerVisible = _useState[1];
|
|
9062
|
+
var handleDateIconClick = function handleDateIconClick() {
|
|
9063
|
+
setDatePickerVisible(function (prevState) {
|
|
9064
|
+
return !prevState;
|
|
9065
|
+
});
|
|
9066
|
+
};
|
|
9067
|
+
var _useOrderDetails = useOrderDetails(),
|
|
9068
|
+
orderDetails = _useOrderDetails[0],
|
|
9069
|
+
setOrderDetails = _useOrderDetails[1];
|
|
9070
|
+
var _usePrevOrderDetails = usePrevOrderDetails(),
|
|
9071
|
+
prevOrderDetails = _usePrevOrderDetails[0];
|
|
9072
|
+
var actionDate = orderDetails != null && orderDetails.action_date ? new Date(orderDetails == null ? void 0 : orderDetails.action_date) : null;
|
|
9073
|
+
var onChange = function onChange(date, _dateString) {
|
|
9074
|
+
var selectedDate = date == null ? void 0 : date.format('YYYY-MM-DDTHH:mm:ss');
|
|
9075
|
+
if (selectedDate !== undefined && prevOrderDetails.action_date !== undefined) {
|
|
9076
|
+
if (new Date(selectedDate).toLocaleDateString() === new Date(prevOrderDetails.action_date).toLocaleDateString()) {
|
|
9077
|
+
setOrderDetails(function (prev) {
|
|
9078
|
+
return _extends({}, prev, {
|
|
9079
|
+
action_date: prevOrderDetails.action_date
|
|
9080
|
+
});
|
|
9081
|
+
});
|
|
9082
|
+
} else {
|
|
9083
|
+
setOrderDetails(function (prev) {
|
|
9084
|
+
return _extends({}, prev, {
|
|
9085
|
+
action_date: selectedDate
|
|
9086
|
+
});
|
|
9087
|
+
});
|
|
9088
|
+
}
|
|
9089
|
+
} else {
|
|
9090
|
+
setOrderDetails(function (prev) {
|
|
9091
|
+
return _extends({}, prev, {
|
|
9092
|
+
action_date: null
|
|
9093
|
+
});
|
|
9094
|
+
});
|
|
9095
|
+
}
|
|
9096
|
+
};
|
|
8676
9097
|
return React.createElement(React.Fragment, null, React.createElement(StyledFiter, null, React.createElement(StyledFIlterELements, null, React.createElement(LeftSideConatiner, null, React.createElement("div", {
|
|
8677
9098
|
className: "filtercontainer"
|
|
8678
9099
|
}, React.createElement("div", {
|
|
@@ -8682,10 +9103,15 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
8682
9103
|
}, "Filters")), React.createElement("div", {
|
|
8683
9104
|
className: "datefilter"
|
|
8684
9105
|
}, React.createElement("div", {
|
|
8685
|
-
className: "dateiconcontainer"
|
|
9106
|
+
className: "dateiconcontainer",
|
|
9107
|
+
onClick: handleDateIconClick
|
|
8686
9108
|
}, React.createElement(DateIcon, null)), React.createElement("div", {
|
|
8687
9109
|
className: "datetext"
|
|
8688
|
-
}, "Date"), React.createElement(
|
|
9110
|
+
}, "Date"), isDatePickerVisible && React.createElement(DatePicker, {
|
|
9111
|
+
onChange: onChange,
|
|
9112
|
+
value: actionDate === null ? actionDate : dayjs(actionDate),
|
|
9113
|
+
format: "DD/MM/YY"
|
|
9114
|
+
}), React.createElement("div", {
|
|
8689
9115
|
className: "roundbox"
|
|
8690
9116
|
}, React.createElement(DownArrowIcon, null))), React.createElement("div", {
|
|
8691
9117
|
className: "datefilter"
|
|
@@ -8714,13 +9140,31 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
8714
9140
|
}, React.createElement(DownArrowIcon, null))))), React.createElement(TableFilters, null)));
|
|
8715
9141
|
};
|
|
8716
9142
|
|
|
8717
|
-
var _templateObject$
|
|
9143
|
+
var _templateObject$2b;
|
|
8718
9144
|
var ReturnAfterTable = function ReturnAfterTable() {
|
|
9145
|
+
var _useReturnAfterOrderD = useReturnAfterOrderData(),
|
|
9146
|
+
returnAfterOrder = _useReturnAfterOrderD[0],
|
|
9147
|
+
setReturnOrderData = _useReturnAfterOrderD[1];
|
|
9148
|
+
var _useLoading = useLoading(),
|
|
9149
|
+
setLoading = _useLoading[1];
|
|
9150
|
+
var _useApiHook = useApiHook({
|
|
9151
|
+
endpoint: '/return_orders/?skip_filters=0',
|
|
9152
|
+
method: 'GET'
|
|
9153
|
+
}),
|
|
9154
|
+
fetchedReturnOrderData = _useApiHook.data,
|
|
9155
|
+
staticDataLoading = _useApiHook.loading;
|
|
9156
|
+
useEffect(function () {
|
|
9157
|
+
setLoading(staticDataLoading);
|
|
9158
|
+
if (fetchedReturnOrderData && fetchedReturnOrderData != null && fetchedReturnOrderData.data) {
|
|
9159
|
+
setReturnOrderData(fetchedReturnOrderData == null ? void 0 : fetchedReturnOrderData.data);
|
|
9160
|
+
}
|
|
9161
|
+
}, [fetchedReturnOrderData, staticDataLoading]);
|
|
9162
|
+
console.log('returnAfterOrder', returnAfterOrder);
|
|
8719
9163
|
return React.createElement("div", null, React.createElement(DashBoardWrapper$3, null, React.createElement(RouterHeader, null), React.createElement("div", {
|
|
8720
9164
|
className: "Tableconatiner"
|
|
8721
9165
|
}, React.createElement(HeaderFilter, null), React.createElement(ReturnOrderFilter, null), React.createElement(OrderTable, null))));
|
|
8722
9166
|
};
|
|
8723
|
-
var DashBoardWrapper$3 = /*#__PURE__*/styled.section(_templateObject$
|
|
9167
|
+
var DashBoardWrapper$3 = /*#__PURE__*/styled.section(_templateObject$2b || (_templateObject$2b = /*#__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"])));
|
|
8724
9168
|
|
|
8725
9169
|
var BulkFilter = function BulkFilter() {
|
|
8726
9170
|
// const [printToogle, setPrintToggle] = useMenuDropDown();
|
|
@@ -8749,76 +9193,10 @@ var BulkFilter = function BulkFilter() {
|
|
|
8749
9193
|
);
|
|
8750
9194
|
};
|
|
8751
9195
|
|
|
8752
|
-
var todayDate = /*#__PURE__*/new Date();
|
|
8753
|
-
var initialState$1 = {
|
|
8754
|
-
'x-filters': [{
|
|
8755
|
-
field: 'action_date',
|
|
8756
|
-
op: '>=',
|
|
8757
|
-
value: /*#__PURE__*/format( /*#__PURE__*/new Date(todayDate), 'yyyy-MM-dd') + "T00:00:00+00:00"
|
|
8758
|
-
}, {
|
|
8759
|
-
field: 'action_date',
|
|
8760
|
-
op: '<=',
|
|
8761
|
-
value: /*#__PURE__*/format( /*#__PURE__*/new Date(todayDate), 'yyyy-MM-dd') + "T23:59:59+00:00"
|
|
8762
|
-
}, {
|
|
8763
|
-
field: 'status',
|
|
8764
|
-
op: 'count',
|
|
8765
|
-
value: ''
|
|
8766
|
-
}],
|
|
8767
|
-
'x-pagination': {
|
|
8768
|
-
page: 1,
|
|
8769
|
-
per_page: 50
|
|
8770
|
-
}
|
|
8771
|
-
};
|
|
8772
|
-
var filterReducer = function filterReducer(state, action) {
|
|
8773
|
-
switch (action.type) {
|
|
8774
|
-
case 'SET_DATE_FILTER':
|
|
8775
|
-
return _extends({}, state, {
|
|
8776
|
-
'x-filters': [].concat(state['x-filters'].filter(function (f) {
|
|
8777
|
-
return f.field !== 'action_date' && f.field !== 'status';
|
|
8778
|
-
}), [{
|
|
8779
|
-
field: 'action_date',
|
|
8780
|
-
op: '>=',
|
|
8781
|
-
value: format(new Date(action.payload), 'yyyy-MM-dd') + "T00:00:00+00:00"
|
|
8782
|
-
}, {
|
|
8783
|
-
field: 'action_date',
|
|
8784
|
-
op: '<=',
|
|
8785
|
-
value: format(new Date(action.payload), 'yyyy-MM-dd') + "T23:59:59+00:00"
|
|
8786
|
-
}, {
|
|
8787
|
-
field: 'status',
|
|
8788
|
-
op: 'count',
|
|
8789
|
-
value: ''
|
|
8790
|
-
}])
|
|
8791
|
-
});
|
|
8792
|
-
case 'SET_PAGE':
|
|
8793
|
-
return _extends({}, state, {
|
|
8794
|
-
'x-pagination': _extends({}, state['x-pagination'], {
|
|
8795
|
-
page: action.payload
|
|
8796
|
-
})
|
|
8797
|
-
});
|
|
8798
|
-
case 'SET_PERPAGE':
|
|
8799
|
-
return _extends({}, state, {
|
|
8800
|
-
'x-pagination': _extends({}, state['x-pagination'], {
|
|
8801
|
-
per_page: action.payload
|
|
8802
|
-
})
|
|
8803
|
-
});
|
|
8804
|
-
default:
|
|
8805
|
-
return state;
|
|
8806
|
-
}
|
|
8807
|
-
};
|
|
8808
|
-
var filtersStateAtom = /*#__PURE__*/atom(initialState$1);
|
|
8809
|
-
var filtersReducerAtom = /*#__PURE__*/atom(function (get) {
|
|
8810
|
-
return get(filtersStateAtom);
|
|
8811
|
-
}, function (get, set, action) {
|
|
8812
|
-
return set(filtersStateAtom, filterReducer(get(filtersStateAtom), action));
|
|
8813
|
-
});
|
|
8814
|
-
|
|
8815
9196
|
var _excluded$2 = ["count"];
|
|
8816
9197
|
var Filters = function Filters() {
|
|
8817
|
-
// const [apiData, setApiData] = useState<TableRowType[] | undefined>(undefined);
|
|
8818
|
-
// Stats and variables
|
|
8819
9198
|
var _useRoutesTable = useRoutesTable(),
|
|
8820
9199
|
setData = _useRoutesTable[1];
|
|
8821
|
-
// const [loading, setLoading] = useLoading();
|
|
8822
9200
|
var _useAtom = useAtom(filtersReducerAtom),
|
|
8823
9201
|
state = _useAtom[0];
|
|
8824
9202
|
var _UsePaginationData = UsePaginationData(),
|
|
@@ -8856,15 +9234,15 @@ var Filters = function Filters() {
|
|
|
8856
9234
|
// const ToggleView = () => {
|
|
8857
9235
|
// setDataView(!DataView);
|
|
8858
9236
|
// };
|
|
8859
|
-
return React.createElement(React.Fragment, null, React.createElement(StyledFiter, null, React.createElement(StyledFIlterELements, null, React.createElement(
|
|
9237
|
+
return React.createElement(React.Fragment, null, React.createElement(StyledFiter, null, React.createElement(StyledFIlterELements, null, React.createElement(StyledTableFilter, null)), React.createElement(BulkFilter, null)));
|
|
8860
9238
|
};
|
|
8861
9239
|
|
|
8862
|
-
var _templateObject$
|
|
8863
|
-
var StyledContainer = /*#__PURE__*/styled.div(_templateObject$
|
|
8864
|
-
var StyledContentWrapper = /*#__PURE__*/styled.div(_templateObject2$
|
|
9240
|
+
var _templateObject$2c, _templateObject2$1t, _templateObject3$Q, _templateObject4$x, _templateObject6$e, _templateObject7$d;
|
|
9241
|
+
var StyledContainer = /*#__PURE__*/styled.div(_templateObject$2c || (_templateObject$2c = /*#__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"])));
|
|
9242
|
+
var StyledContentWrapper = /*#__PURE__*/styled.div(_templateObject2$1t || (_templateObject2$1t = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 12px;\n"])));
|
|
8865
9243
|
var StyledInfoBox = /*#__PURE__*/styled.div(_templateObject3$Q || (_templateObject3$Q = /*#__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"])));
|
|
8866
|
-
var StyledLabel$2 = /*#__PURE__*/styled.div(_templateObject4$
|
|
8867
|
-
var StyledPaginationWrapper = /*#__PURE__*/styled.div(_templateObject6$
|
|
9244
|
+
var StyledLabel$2 = /*#__PURE__*/styled.div(_templateObject4$x || (_templateObject4$x = /*#__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"])));
|
|
9245
|
+
var StyledPaginationWrapper = /*#__PURE__*/styled.div(_templateObject6$e || (_templateObject6$e = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 0;\n background-color: white;\n border: 1px solid rgba(208, 213, 221, 0.5);\n border-radius: 9999px;\n"])));
|
|
8868
9246
|
var StyledPaginationItem = /*#__PURE__*/styled.button(_templateObject7$d || (_templateObject7$d = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n background: ", ";\n color: ", ";\n border: none;\n border-left: 1px solid rgba(208, 213, 221, 0.5);\n padding: 0.5em 1em;\n border-radius: 0;\n cursor: pointer;\n &:hover {\n background: rgba(208, 213, 221, 0.8);\n color: #000;\n }\n &:disabled {\n background: #f0f0f0;\n cursor: not-allowed;\n }\n &:first-child {\n border-radius: 100px;\n padding: 0 1em;\n display: flex;\n align-items: center;\n }\n &:last-child {\n border-radius: 0 100px 100px 0;\n padding: 0 1em;\n display: flex;\n align-items: center;\n }\n"])), function (_ref) {
|
|
8869
9247
|
var active = _ref.active;
|
|
8870
9248
|
return active ? 'rgba(208, 213, 221, 0.80)' : 'white';
|
|
@@ -8899,6 +9277,69 @@ var NextIcon = function NextIcon() {
|
|
|
8899
9277
|
}));
|
|
8900
9278
|
};
|
|
8901
9279
|
|
|
9280
|
+
var todayDate = /*#__PURE__*/new Date();
|
|
9281
|
+
var initialState$2 = {
|
|
9282
|
+
'x-filters': [{
|
|
9283
|
+
field: 'action_date',
|
|
9284
|
+
op: '>=',
|
|
9285
|
+
value: /*#__PURE__*/format( /*#__PURE__*/new Date(todayDate), 'yyyy-MM-dd') + "T00:00:00+00:00"
|
|
9286
|
+
}, {
|
|
9287
|
+
field: 'action_date',
|
|
9288
|
+
op: '<=',
|
|
9289
|
+
value: /*#__PURE__*/format( /*#__PURE__*/new Date(todayDate), 'yyyy-MM-dd') + "T23:59:59+00:00"
|
|
9290
|
+
}, {
|
|
9291
|
+
field: 'status',
|
|
9292
|
+
op: 'count',
|
|
9293
|
+
value: ''
|
|
9294
|
+
}],
|
|
9295
|
+
'x-pagination': {
|
|
9296
|
+
page: 1,
|
|
9297
|
+
per_page: 50
|
|
9298
|
+
}
|
|
9299
|
+
};
|
|
9300
|
+
var filterReducer$1 = function filterReducer(state, action) {
|
|
9301
|
+
switch (action.type) {
|
|
9302
|
+
case 'SET_DATE_FILTER':
|
|
9303
|
+
return _extends({}, state, {
|
|
9304
|
+
'x-filters': [].concat(state['x-filters'].filter(function (f) {
|
|
9305
|
+
return f.field !== 'action_date' && f.field !== 'status';
|
|
9306
|
+
}), [{
|
|
9307
|
+
field: 'action_date',
|
|
9308
|
+
op: '>=',
|
|
9309
|
+
value: format(new Date(action.payload), 'yyyy-MM-dd') + "T00:00:00+00:00"
|
|
9310
|
+
}, {
|
|
9311
|
+
field: 'action_date',
|
|
9312
|
+
op: '<=',
|
|
9313
|
+
value: format(new Date(action.payload), 'yyyy-MM-dd') + "T23:59:59+00:00"
|
|
9314
|
+
}, {
|
|
9315
|
+
field: 'status',
|
|
9316
|
+
op: 'count',
|
|
9317
|
+
value: ''
|
|
9318
|
+
}])
|
|
9319
|
+
});
|
|
9320
|
+
case 'SET_PAGE':
|
|
9321
|
+
return _extends({}, state, {
|
|
9322
|
+
'x-pagination': _extends({}, state['x-pagination'], {
|
|
9323
|
+
page: action.payload
|
|
9324
|
+
})
|
|
9325
|
+
});
|
|
9326
|
+
case 'SET_PERPAGE':
|
|
9327
|
+
return _extends({}, state, {
|
|
9328
|
+
'x-pagination': _extends({}, state['x-pagination'], {
|
|
9329
|
+
per_page: action.payload
|
|
9330
|
+
})
|
|
9331
|
+
});
|
|
9332
|
+
default:
|
|
9333
|
+
return state;
|
|
9334
|
+
}
|
|
9335
|
+
};
|
|
9336
|
+
var filtersStateAtom$1 = /*#__PURE__*/atom(initialState$2);
|
|
9337
|
+
var filtersReducerAtom$1 = /*#__PURE__*/atom(function (get) {
|
|
9338
|
+
return get(filtersStateAtom$1);
|
|
9339
|
+
}, function (get, set, action) {
|
|
9340
|
+
return set(filtersStateAtom$1, filterReducer$1(get(filtersStateAtom$1), action));
|
|
9341
|
+
});
|
|
9342
|
+
|
|
8902
9343
|
var PAGE_SIZE_OPTIONS = [50, 100, 150];
|
|
8903
9344
|
var MAX_PAGES_TO_SHOW = 5;
|
|
8904
9345
|
var Pagination = function Pagination(_ref) {
|
|
@@ -8907,7 +9348,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
8907
9348
|
itemsPerPage = _ref.itemsPerPage,
|
|
8908
9349
|
onPageChange = _ref.onPageChange,
|
|
8909
9350
|
onItemsPerPageChange = _ref.onItemsPerPageChange;
|
|
8910
|
-
var _useAtom = useAtom(filtersReducerAtom),
|
|
9351
|
+
var _useAtom = useAtom(filtersReducerAtom$1),
|
|
8911
9352
|
dispatch = _useAtom[1];
|
|
8912
9353
|
var totalPages = Math.ceil(totalItems / itemsPerPage);
|
|
8913
9354
|
var startItem = (currentPage - 1) * itemsPerPage + 1;
|
|
@@ -8983,492 +9424,127 @@ var Pagination = function Pagination(_ref) {
|
|
|
8983
9424
|
}, React.createElement(NextIcon, null)))));
|
|
8984
9425
|
};
|
|
8985
9426
|
|
|
8986
|
-
var
|
|
8987
|
-
|
|
8988
|
-
|
|
8989
|
-
|
|
8990
|
-
|
|
8991
|
-
|
|
8992
|
-
|
|
8993
|
-
|
|
8994
|
-
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
}
|
|
8998
|
-
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
}, React.createElement("path", {
|
|
9007
|
-
d: "M6.875 18C7.59541 17.9999 8.29374 18.2486 8.85181 18.7042C9.40989 19.1598 9.79342 19.7941 9.9375 20.5H18.75V8H5C4.33696 8 3.70107 8.26339 3.23223 8.73223C2.76339 9.20107 2.5 9.83696 2.5 10.5V20.5H3.8125C3.95658 19.7941 4.34011 19.1598 4.89819 18.7042C5.45626 18.2486 6.15459 17.9999 6.875 18ZM6.875 24.25C6.15459 24.2501 5.45626 24.0014 4.89819 23.5458C4.34011 23.0902 3.95658 22.4559 3.8125 21.75H1.25V10.5C1.25 9.50544 1.64509 8.55161 2.34835 7.84835C3.05161 7.14509 4.00544 6.75 5 6.75H18.75C19.0815 6.75 19.3995 6.8817 19.6339 7.11612C19.8683 7.35054 20 7.66848 20 8V10.5H23.75L27.5 15.5V21.75H24.9375C24.7941 22.4564 24.4108 23.0915 23.8527 23.5477C23.2945 24.0039 22.5958 24.2531 21.875 24.2531C21.1542 24.2531 20.4555 24.0039 19.8973 23.5477C19.3392 23.0915 18.9559 22.4564 18.8125 21.75H9.9375C9.79342 22.4559 9.40989 23.0902 8.85181 23.5458C8.29374 24.0014 7.59541 24.2501 6.875 24.25ZM6.875 19.25C6.37772 19.25 5.90081 19.4475 5.54917 19.7992C5.19754 20.1508 5 20.6277 5 21.125C5 21.6223 5.19754 22.0992 5.54917 22.4508C5.90081 22.8025 6.37772 23 6.875 23C7.37228 23 7.84919 22.8025 8.20083 22.4508C8.55246 22.0992 8.75 21.6223 8.75 21.125C8.75 20.6277 8.55246 20.1508 8.20083 19.7992C7.84919 19.4475 7.37228 19.25 6.875 19.25ZM21.875 18C22.5954 17.9999 23.2937 18.2486 23.8518 18.7042C24.4099 19.1598 24.7934 19.7941 24.9375 20.5H26.25V15.9L25.95 15.5H20V18.625C20.525 18.2375 21.175 18 21.875 18ZM21.875 19.25C21.3777 19.25 20.9008 19.4475 20.5492 19.7992C20.1975 20.1508 20 20.6277 20 21.125C20 21.6223 20.1975 22.0992 20.5492 22.4508C20.9008 22.8025 21.3777 23 21.875 23C22.3723 23 22.8492 22.8025 23.2008 22.4508C23.5525 22.0992 23.75 21.6223 23.75 21.125C23.75 20.6277 23.5525 20.1508 23.2008 19.7992C22.8492 19.4475 22.3723 19.25 21.875 19.25ZM20 11.75V14.25H25L23.125 11.75H20Z",
|
|
9008
|
-
fill: "#3A3630",
|
|
9009
|
-
fillOpacity: "0.7"
|
|
9010
|
-
}));
|
|
9011
|
-
};
|
|
9012
|
-
|
|
9013
|
-
var VehicleIcon = function VehicleIcon() {
|
|
9014
|
-
return React.createElement("svg", {
|
|
9015
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
9016
|
-
width: "25",
|
|
9017
|
-
height: "31",
|
|
9018
|
-
viewBox: "0 0 30 31",
|
|
9019
|
-
fill: "none"
|
|
9020
|
-
}, React.createElement("path", {
|
|
9021
|
-
d: "M6.875 18C7.59541 17.9999 8.29374 18.2486 8.85181 18.7042C9.40989 19.1598 9.79342 19.7941 9.9375 20.5H18.75V8H5C4.33696 8 3.70107 8.26339 3.23223 8.73223C2.76339 9.20107 2.5 9.83696 2.5 10.5V20.5H3.8125C3.95658 19.7941 4.34011 19.1598 4.89819 18.7042C5.45626 18.2486 6.15459 17.9999 6.875 18ZM6.875 24.25C6.15459 24.2501 5.45626 24.0014 4.89819 23.5458C4.34011 23.0902 3.95658 22.4559 3.8125 21.75H1.25V10.5C1.25 9.50544 1.64509 8.55161 2.34835 7.84835C3.05161 7.14509 4.00544 6.75 5 6.75H18.75C19.0815 6.75 19.3995 6.8817 19.6339 7.11612C19.8683 7.35054 20 7.66848 20 8V10.5H23.75L27.5 15.5V21.75H24.9375C24.7941 22.4564 24.4108 23.0915 23.8527 23.5477C23.2945 24.0039 22.5958 24.2531 21.875 24.2531C21.1542 24.2531 20.4555 24.0039 19.8973 23.5477C19.3392 23.0915 18.9559 22.4564 18.8125 21.75H9.9375C9.79342 22.4559 9.40989 23.0902 8.85181 23.5458C8.29374 24.0014 7.59541 24.2501 6.875 24.25ZM6.875 19.25C6.37772 19.25 5.90081 19.4475 5.54917 19.7992C5.19754 20.1508 5 20.6277 5 21.125C5 21.6223 5.19754 22.0992 5.54917 22.4508C5.90081 22.8025 6.37772 23 6.875 23C7.37228 23 7.84919 22.8025 8.20083 22.4508C8.55246 22.0992 8.75 21.6223 8.75 21.125C8.75 20.6277 8.55246 20.1508 8.20083 19.7992C7.84919 19.4475 7.37228 19.25 6.875 19.25ZM21.875 18C22.5954 17.9999 23.2937 18.2486 23.8518 18.7042C24.4099 19.1598 24.7934 19.7941 24.9375 20.5H26.25V15.9L25.95 15.5H20V18.625C20.525 18.2375 21.175 18 21.875 18ZM21.875 19.25C21.3777 19.25 20.9008 19.4475 20.5492 19.7992C20.1975 20.1508 20 20.6277 20 21.125C20 21.6223 20.1975 22.0992 20.5492 22.4508C20.9008 22.8025 21.3777 23 21.875 23C22.3723 23 22.8492 22.8025 23.2008 22.4508C23.5525 22.0992 23.75 21.6223 23.75 21.125C23.75 20.6277 23.5525 20.1508 23.2008 19.7992C22.8492 19.4475 22.3723 19.25 21.875 19.25ZM20 11.75V14.25H25L23.125 11.75H20Z",
|
|
9022
|
-
fill: "#3A3630",
|
|
9023
|
-
fillOpacity: "0.7"
|
|
9024
|
-
}));
|
|
9025
|
-
};
|
|
9026
|
-
|
|
9027
|
-
var _templateObject$2b;
|
|
9028
|
-
var getColor = function getColor(data) {
|
|
9029
|
-
switch (data == null ? void 0 : data.value) {
|
|
9030
|
-
case 1:
|
|
9031
|
-
return '#FFF1D6';
|
|
9032
|
-
case 2:
|
|
9033
|
-
return '#ffcbcb';
|
|
9034
|
-
case 3:
|
|
9035
|
-
return '#ceffd6';
|
|
9036
|
-
default:
|
|
9037
|
-
return 'grey';
|
|
9038
|
-
}
|
|
9039
|
-
};
|
|
9040
|
-
var getStatusColor$1 = function getStatusColor(data) {
|
|
9041
|
-
switch (data == null ? void 0 : data.value) {
|
|
9042
|
-
case 1:
|
|
9043
|
-
return '#FEBA30';
|
|
9044
|
-
case 2:
|
|
9045
|
-
return '#E95252';
|
|
9046
|
-
case 3:
|
|
9047
|
-
return '#1F9254';
|
|
9048
|
-
default:
|
|
9049
|
-
return 'grey';
|
|
9050
|
-
}
|
|
9051
|
-
};
|
|
9052
|
-
var CustomSelectDropdown = /*#__PURE__*/styled(Select)(_templateObject$2b || (_templateObject$2b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .ant-select-selector {\n background-color: ", " !important;\n color: ", " !important;\n border-color: ", ";\n border-radius: 25px !important;\n border: none !important;\n min-width: 100px;\n padding: 0 10px;\n }\n .ant-select-arrow {\n display: none;\n }\n .ant-select-selection-item {\n font-weight: 600;\n font-size: 12px;\n }\n"])), function (props) {
|
|
9053
|
-
return getColor(props.value);
|
|
9054
|
-
}, function (props) {
|
|
9055
|
-
return getStatusColor$1(props.value);
|
|
9056
|
-
}, function (props) {
|
|
9057
|
-
return getStatusColor$1(props.value);
|
|
9058
|
-
});
|
|
9059
|
-
|
|
9060
|
-
var _templateObject$2c, _templateObject2$1t, _templateObject3$R, _templateObject4$z;
|
|
9061
|
-
// import GreenDotIcon from '../../assets/GreenDotIcon';
|
|
9062
|
-
// import RedDotIcon from '../../assets/RedDotIcon';
|
|
9063
|
-
// import OrangeDotIcon from '../../assets/OrangeDotIcon';
|
|
9064
|
-
var selectedValueAtom = /*#__PURE__*/atom(null);
|
|
9065
|
-
var selectedIDAtom = /*#__PURE__*/atom(null);
|
|
9066
|
-
// Function to render nested content
|
|
9067
|
-
var MyTable = function MyTable(_ref) {
|
|
9068
|
-
var _staticData$invoice_d;
|
|
9069
|
-
var columns = _ref.columns,
|
|
9070
|
-
data = _ref.data,
|
|
9071
|
-
loadingskeleton = _ref.loadingskeleton,
|
|
9072
|
-
view = _ref.view;
|
|
9073
|
-
var _useStaticData = useStaticData(),
|
|
9074
|
-
staticData = _useStaticData[0];
|
|
9075
|
-
var statusOptions = staticData == null || (_staticData$invoice_d = staticData.invoice_discount_status) == null ? void 0 : _staticData$invoice_d.map(function (item) {
|
|
9076
|
-
var _item$status, _item$status2;
|
|
9077
|
-
return {
|
|
9078
|
-
value: item == null ? void 0 : item.id,
|
|
9079
|
-
label: item == null ? void 0 : item.status,
|
|
9080
|
-
icon: (item == null || (_item$status = item.status) == null ? void 0 : _item$status.toLowerCase()) === 'pending' ? React.createElement(ArrivalIcon, null) : (item == null || (_item$status2 = item.status) == null ? void 0 : _item$status2.toLowerCase()) === 'approved' ? React.createElement(ArrivalIcon, null) : React.createElement(VehicleIcon, null)
|
|
9081
|
-
};
|
|
9082
|
-
});
|
|
9083
|
-
var renderContent = function renderContent(content) {
|
|
9084
|
-
if (Array.isArray(content)) {
|
|
9085
|
-
return React.createElement("div", null, content.map(function (item, index) {
|
|
9086
|
-
return React.createElement("div", {
|
|
9087
|
-
key: index
|
|
9088
|
-
}, renderContent(item));
|
|
9089
|
-
}));
|
|
9090
|
-
} else if (typeof content === 'object' && content !== null) {
|
|
9091
|
-
return React.createElement("div", null, Object.entries(content).map(function (_ref2) {
|
|
9092
|
-
var key = _ref2[0],
|
|
9093
|
-
value = _ref2[1];
|
|
9094
|
-
return React.createElement("div", {
|
|
9095
|
-
key: key
|
|
9096
|
-
}, renderContent(value));
|
|
9097
|
-
}));
|
|
9098
|
-
}
|
|
9099
|
-
return content;
|
|
9100
|
-
};
|
|
9101
|
-
// const [, dispatch] = useAtom(countReducerAtom);
|
|
9102
|
-
var _useAtom = useAtom(selectedValueAtom),
|
|
9103
|
-
setSelectedValue = _useAtom[1];
|
|
9104
|
-
var _useAtom2 = useAtom(selectedIDAtom),
|
|
9105
|
-
setSelectedID = _useAtom2[1];
|
|
9106
|
-
var handleSelect = function handleSelect(id) {
|
|
9107
|
-
setSelectedID(id);
|
|
9108
|
-
};
|
|
9109
|
-
var handleOption = function handleOption(event) {
|
|
9110
|
-
var selectedValue = event;
|
|
9111
|
-
setSelectedValue(selectedValue);
|
|
9112
|
-
};
|
|
9113
|
-
var renderCellContent = function renderCellContent(column, tableRow) {
|
|
9114
|
-
var _tableRow$invoice_dis, _tableRow$grand_total, _tableRow$grand_total2, _tableRow$invoice_dis2, _tableRow$grand_total3, _tableRow$grand_total4;
|
|
9115
|
-
var cellData = tableRow[column == null ? void 0 : column.accessor];
|
|
9116
|
-
var statusID = tableRow == null || (_tableRow$invoice_dis = tableRow.invoice_discount_queues) == null ? void 0 : _tableRow$invoice_dis.status_id;
|
|
9117
|
-
var selectedOption = statusOptions == null ? void 0 : statusOptions.find(function (option) {
|
|
9118
|
-
return (option == null ? void 0 : option.value) === statusID;
|
|
9119
|
-
});
|
|
9120
|
-
switch (column.accessor) {
|
|
9121
|
-
case 'action':
|
|
9122
|
-
return React.createElement(Buttons$1, null, React.createElement(Back, {
|
|
9123
|
-
onClick: function onClick() {
|
|
9124
|
-
return console.log('Action button clicked');
|
|
9125
|
-
}
|
|
9126
|
-
}, "Back to debrief"), React.createElement(Remove, {
|
|
9127
|
-
onClick: function onClick() {
|
|
9128
|
-
return console.log('Another button clicked');
|
|
9129
|
-
}
|
|
9130
|
-
}, "Remove from Invoice"));
|
|
9131
|
-
case 'invoice_date':
|
|
9132
|
-
if (!cellData) {
|
|
9133
|
-
return null;
|
|
9134
|
-
}
|
|
9135
|
-
var formattedInvoiceDate = format(new Date(cellData), 'dd/MM/yyyy');
|
|
9136
|
-
return React.createElement("span", null, formattedInvoiceDate);
|
|
9137
|
-
case 'date':
|
|
9138
|
-
if (!cellData) {
|
|
9139
|
-
return null;
|
|
9140
|
-
}
|
|
9141
|
-
var formattedDate = format(new Date(cellData), 'dd/MM/yyyy');
|
|
9142
|
-
return React.createElement("span", null, formattedDate);
|
|
9143
|
-
case 'total_orders':
|
|
9144
|
-
return React.createElement("span", {
|
|
9145
|
-
style: {
|
|
9146
|
-
backgroundColor: 'rgba(153, 153, 153, 0.10)',
|
|
9147
|
-
padding: '3px 12px',
|
|
9148
|
-
borderRadius: '4px',
|
|
9149
|
-
color: '#6A7378'
|
|
9150
|
-
}
|
|
9151
|
-
}, view !== 'rfi' ? cellData : tableRow == null || (_tableRow$grand_total = tableRow.grand_total) == null ? void 0 : _tableRow$grand_total.total_orders);
|
|
9152
|
-
case 'total_amount':
|
|
9153
|
-
var val = +(tableRow == null || (_tableRow$grand_total2 = tableRow.grand_total) == null ? void 0 : _tableRow$grand_total2.total_amount);
|
|
9154
|
-
return React.createElement("span", {
|
|
9155
|
-
style: {
|
|
9156
|
-
backgroundColor: 'rgba(153, 153, 153, 0.10)',
|
|
9157
|
-
padding: '3px 12px',
|
|
9158
|
-
borderRadius: '4px',
|
|
9159
|
-
color: '#6A7378'
|
|
9160
|
-
}
|
|
9161
|
-
}, view !== 'rfi' ? cellData == null ? void 0 : cellData.toLocaleString() : val == null ? void 0 : val.toLocaleString());
|
|
9162
|
-
case 'discount':
|
|
9163
|
-
return React.createElement("span", {
|
|
9164
|
-
style: {
|
|
9165
|
-
display: 'flex',
|
|
9166
|
-
flexDirection: 'row',
|
|
9167
|
-
gap: '5px',
|
|
9168
|
-
alignItems: 'center'
|
|
9169
|
-
}
|
|
9170
|
-
}, React.createElement(Percentage, null, tableRow == null || (_tableRow$invoice_dis2 = tableRow.invoice_discount_queues) == null ? void 0 : _tableRow$invoice_dis2.new_discount, '%'), React.createElement("span", {
|
|
9171
|
-
style: {
|
|
9172
|
-
alignItems: 'center',
|
|
9173
|
-
fontSize: '14px',
|
|
9174
|
-
color: '#3A3630'
|
|
9175
|
-
}
|
|
9176
|
-
}, getIntegerValue(cellData)));
|
|
9177
|
-
case 'total':
|
|
9178
|
-
var totalVal = +(tableRow == null || (_tableRow$grand_total3 = tableRow.grand_total) == null ? void 0 : _tableRow$grand_total3.grand_total);
|
|
9179
|
-
return React.createElement("span", null, '£', view !== 'rfi' ? cellData == null ? void 0 : cellData.toLocaleString() : totalVal == null ? void 0 : totalVal.toLocaleString());
|
|
9180
|
-
case 'amount':
|
|
9181
|
-
return React.createElement("span", null, '£', cellData == null ? void 0 : cellData.toLocaleString());
|
|
9182
|
-
case 'zone':
|
|
9183
|
-
return React.createElement("span", {
|
|
9184
|
-
style: {
|
|
9185
|
-
backgroundColor: 'rgba(153, 153, 153, 0.10)',
|
|
9186
|
-
padding: '3px 12px',
|
|
9187
|
-
borderRadius: '4px'
|
|
9188
|
-
}
|
|
9189
|
-
}, cellData);
|
|
9190
|
-
case 'vat_rate':
|
|
9191
|
-
return React.createElement("span", {
|
|
9192
|
-
style: {
|
|
9193
|
-
backgroundColor: 'rgba(153, 153, 153, 0.10)',
|
|
9194
|
-
padding: '3px 12px',
|
|
9195
|
-
borderRadius: '4px'
|
|
9196
|
-
}
|
|
9197
|
-
}, " ", view !== 'rfi' ? cellData : tableRow == null || (_tableRow$grand_total4 = tableRow.grand_total) == null ? void 0 : _tableRow$grand_total4.vat_rate, '%');
|
|
9198
|
-
case 'products':
|
|
9199
|
-
return React.createElement("span", {
|
|
9200
|
-
style: {
|
|
9201
|
-
backgroundColor: 'rgba(153, 153, 153, 0.10)',
|
|
9202
|
-
padding: '3px 12px',
|
|
9203
|
-
borderRadius: '4px'
|
|
9204
|
-
}
|
|
9205
|
-
}, cellData);
|
|
9206
|
-
case 'customer_name':
|
|
9207
|
-
return React.createElement("span", {
|
|
9208
|
-
style: {
|
|
9209
|
-
color: '#0099ff',
|
|
9210
|
-
fontWeight: 600,
|
|
9211
|
-
cursor: 'pointer'
|
|
9212
|
-
},
|
|
9213
|
-
onClick: function onClick() {
|
|
9214
|
-
return column.callback !== undefined && (column == null ? void 0 : column.callback({
|
|
9215
|
-
label: tableRow == null ? void 0 : tableRow.customer_name,
|
|
9216
|
-
value: tableRow == null ? void 0 : tableRow.customer_id
|
|
9217
|
-
}));
|
|
9218
|
-
}
|
|
9219
|
-
}, cellData);
|
|
9220
|
-
case 'status_id':
|
|
9221
|
-
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
9222
|
-
onClick: function onClick() {
|
|
9223
|
-
return handleSelect(tableRow == null ? void 0 : tableRow.id);
|
|
9224
|
-
}
|
|
9225
|
-
}, React.createElement(DropdownContainer, null, React.createElement(ConfigProvider, {
|
|
9226
|
-
theme: {
|
|
9227
|
-
components: {
|
|
9228
|
-
Select: {
|
|
9229
|
-
/* here is your component tokens */
|
|
9230
|
-
optionPadding: '10px 6px',
|
|
9231
|
-
optionFontSize: 13,
|
|
9232
|
-
optionHeight: 16,
|
|
9233
|
-
optionSelectedFontWeight: 400
|
|
9234
|
-
}
|
|
9235
|
-
}
|
|
9236
|
-
}
|
|
9237
|
-
}, React.createElement(CustomSelectDropdown, {
|
|
9238
|
-
value: selectedOption,
|
|
9239
|
-
options: statusOptions,
|
|
9240
|
-
onChange: handleOption,
|
|
9241
|
-
variant: "borderless",
|
|
9242
|
-
optionRender: function optionRender(option) {
|
|
9243
|
-
return React.createElement("div", {
|
|
9244
|
-
style: {
|
|
9245
|
-
display: 'flex',
|
|
9246
|
-
gap: '8px',
|
|
9247
|
-
alignItems: 'center'
|
|
9248
|
-
}
|
|
9249
|
-
}, React.createElement("span", {
|
|
9250
|
-
style: {
|
|
9251
|
-
display: 'flex'
|
|
9252
|
-
},
|
|
9253
|
-
"aria-label": option.data.label
|
|
9254
|
-
}, option.data.icon), React.createElement("span", {
|
|
9255
|
-
style: {
|
|
9256
|
-
color: '#8D8F90'
|
|
9257
|
-
}
|
|
9258
|
-
}, option.data.label));
|
|
9259
|
-
}
|
|
9260
|
-
}), React.createElement(IconContainer$4, null, React.createElement(ArrowIcon, null))))));
|
|
9261
|
-
default:
|
|
9262
|
-
return renderContent(cellData);
|
|
9427
|
+
var ReturnTable$1 = function ReturnTable(_ref) {
|
|
9428
|
+
var loadingskeleton = _ref.loadingskeleton;
|
|
9429
|
+
var _useClientData = useClientData(),
|
|
9430
|
+
clientData = _useClientData[0];
|
|
9431
|
+
var _useLoading = useLoading(),
|
|
9432
|
+
setLoading = _useLoading[1];
|
|
9433
|
+
var _useOrderStaticData = useOrderStaticData(),
|
|
9434
|
+
setOrderStaticData = _useOrderStaticData[1];
|
|
9435
|
+
var _useApiHook = useApiHook({
|
|
9436
|
+
endpoint: "/orders/getStaticData/all/",
|
|
9437
|
+
method: 'GET'
|
|
9438
|
+
}),
|
|
9439
|
+
fetchedStaticData = _useApiHook.data,
|
|
9440
|
+
staticDataLoading = _useApiHook.loading;
|
|
9441
|
+
console.log('fetchedStaticData', fetchedStaticData);
|
|
9442
|
+
useEffect(function () {
|
|
9443
|
+
setLoading(staticDataLoading);
|
|
9444
|
+
if (fetchedStaticData && fetchedStaticData.data) {
|
|
9445
|
+
var result = fetchedStaticData == null ? void 0 : fetchedStaticData.data;
|
|
9446
|
+
setOrderStaticData(result[0]);
|
|
9263
9447
|
}
|
|
9264
|
-
};
|
|
9265
|
-
return React.createElement(
|
|
9448
|
+
}, [staticDataLoading, fetchedStaticData]);
|
|
9449
|
+
return React.createElement(React.Fragment, null, React.createElement(StyledTableWrapper$1, {
|
|
9266
9450
|
id: "tableScrolling"
|
|
9267
|
-
}, React.createElement(StyledTable$1, {
|
|
9268
|
-
|
|
9269
|
-
}, React.createElement("thead", null, React.createElement("tr", null, columns == null ? void 0 : columns.map(function (column) {
|
|
9270
|
-
return React.createElement(Header$2, {
|
|
9271
|
-
key: column.accessor
|
|
9272
|
-
}, column.Header);
|
|
9273
|
-
}))), React.createElement("tbody", null, loadingskeleton ? React.createElement("tr", null, React.createElement("td", {
|
|
9274
|
-
colSpan: (columns == null ? void 0 : columns.length) || 7
|
|
9451
|
+
}, React.createElement(StyledTable$1, null, React.createElement("thead", null, React.createElement("tr", null, React.createElement("th", null, "Trading Name"), React.createElement("th", null, "Client"), React.createElement("th", null, "Orders"), React.createElement("th", null, "Products"), React.createElement("th", null, "Dispose"), React.createElement("th", null, "Re-allocate"), React.createElement("th", null, "Re-Del"), React.createElement("th", null, "Recycle"), React.createElement("th", null, "Unknown"))), React.createElement("tbody", null, loadingskeleton ? React.createElement("tr", null, React.createElement("td", {
|
|
9452
|
+
colSpan: 9
|
|
9275
9453
|
}, React.createElement(Skeleton, {
|
|
9276
9454
|
active: true
|
|
9277
|
-
}))) :
|
|
9455
|
+
}))) : (clientData == null ? void 0 : clientData.length) === 0 ? React.createElement("tr", null, React.createElement("td", {
|
|
9456
|
+
colSpan: 9
|
|
9457
|
+
}, React.createElement(EmptyDataContainer, null, React.createElement(Empty, null)))) : Object.keys(clientData[0]).map(function (key) {
|
|
9458
|
+
var clientReturn = clientData[0][key];
|
|
9278
9459
|
return React.createElement("tr", {
|
|
9279
|
-
key:
|
|
9280
|
-
},
|
|
9281
|
-
|
|
9282
|
-
|
|
9283
|
-
|
|
9284
|
-
|
|
9285
|
-
|
|
9286
|
-
|
|
9287
|
-
|
|
9288
|
-
|
|
9289
|
-
|
|
9290
|
-
|
|
9291
|
-
|
|
9292
|
-
|
|
9293
|
-
|
|
9294
|
-
|
|
9295
|
-
|
|
9296
|
-
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
|
|
9306
|
-
|
|
9307
|
-
|
|
9308
|
-
|
|
9309
|
-
|
|
9310
|
-
|
|
9311
|
-
|
|
9312
|
-
|
|
9313
|
-
|
|
9314
|
-
|
|
9315
|
-
|
|
9316
|
-
|
|
9317
|
-
|
|
9318
|
-
|
|
9319
|
-
|
|
9320
|
-
|
|
9321
|
-
|
|
9322
|
-
|
|
9323
|
-
|
|
9324
|
-
|
|
9325
|
-
|
|
9326
|
-
|
|
9327
|
-
|
|
9328
|
-
|
|
9329
|
-
|
|
9330
|
-
|
|
9331
|
-
|
|
9332
|
-
|
|
9333
|
-
|
|
9334
|
-
|
|
9335
|
-
|
|
9336
|
-
|
|
9337
|
-
|
|
9338
|
-
|
|
9339
|
-
|
|
9340
|
-
|
|
9341
|
-
|
|
9342
|
-
|
|
9343
|
-
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
9347
|
-
|
|
9348
|
-
|
|
9349
|
-
|
|
9350
|
-
|
|
9351
|
-
|
|
9352
|
-
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
showIcon: false
|
|
9357
|
-
}, {
|
|
9358
|
-
Header: 'Re-allocate',
|
|
9359
|
-
accessor: 'total_amount',
|
|
9360
|
-
sortable: true,
|
|
9361
|
-
showIcon: true
|
|
9362
|
-
}, {
|
|
9363
|
-
Header: 'Re-Del',
|
|
9364
|
-
accessor: 'total_amount',
|
|
9365
|
-
sortable: true,
|
|
9366
|
-
showIcon: true
|
|
9367
|
-
}, {
|
|
9368
|
-
Header: 'Recycle',
|
|
9369
|
-
accessor: 'total_orders',
|
|
9370
|
-
sortable: true,
|
|
9371
|
-
showIcon: false
|
|
9372
|
-
}, {
|
|
9373
|
-
Header: 'unknown',
|
|
9374
|
-
accessor: 'total_amount',
|
|
9375
|
-
sortable: true,
|
|
9376
|
-
showIcon: true
|
|
9377
|
-
}];
|
|
9378
|
-
// const [invoiceData, setInvoiceData] = useInvoiceData();
|
|
9379
|
-
// const [
|
|
9380
|
-
// readyForInvoiceOverview,
|
|
9381
|
-
// setReadyForInvoiceOverview,
|
|
9382
|
-
// ] = useReadyForInvoiceOverview();
|
|
9383
|
-
// const [filterApplied] = usefilterApplied();
|
|
9384
|
-
// const { 'x-filters': filters, 'x-pagination': pagination } = filterState;
|
|
9385
|
-
// const {
|
|
9386
|
-
// data: fetchedOverviewData,
|
|
9387
|
-
// setShouldPerformAction, // need for infinite
|
|
9388
|
-
// paginationData, // need for infinite
|
|
9389
|
-
// loadingskeleton, // need for infinite
|
|
9390
|
-
// } = useApiHook<ApiResponse>({
|
|
9391
|
-
// endpoint: `/invoices/ready_for_invoice/overview/`,
|
|
9392
|
-
// method: 'GET',
|
|
9393
|
-
// filters: filters,
|
|
9394
|
-
// pagination: pagination,
|
|
9395
|
-
// performAction: true,
|
|
9396
|
-
// });
|
|
9397
|
-
// // infinite scrolling code start here
|
|
9398
|
-
// const { page, scrollActivated } = useInfiniteScroll(
|
|
9399
|
-
// paginationData,
|
|
9400
|
-
// setShouldPerformAction,
|
|
9401
|
-
// 'tableScrolling'
|
|
9402
|
-
// );
|
|
9403
|
-
// useEffect(() => {
|
|
9404
|
-
// dispatchOverviewFilter({ type: 'SET_PAGE', payload: page });
|
|
9405
|
-
// }, [page]);
|
|
9406
|
-
// useEffect(() => {
|
|
9407
|
-
// if (fetchedOverviewData && fetchedOverviewData?.data) {
|
|
9408
|
-
// const invoiceData = fetchedOverviewData?.data;
|
|
9409
|
-
// if (scrollActivated) {
|
|
9410
|
-
// setReadyForInvoiceOverview((prev: any) => {
|
|
9411
|
-
// const newData = invoiceData?.filter(
|
|
9412
|
-
// (newItem: any) =>
|
|
9413
|
-
// !prev?.some((prevItem: any) => prevItem?.id === newItem?.id)
|
|
9414
|
-
// );
|
|
9415
|
-
// return [...prev, ...newData];
|
|
9416
|
-
// });
|
|
9417
|
-
// } else {
|
|
9418
|
-
// setReadyForInvoiceOverview(invoiceData);
|
|
9419
|
-
// }
|
|
9420
|
-
// }
|
|
9421
|
-
// }, [fetchedOverviewData, scrollActivated]);
|
|
9422
|
-
// const renderContent = () => {
|
|
9423
|
-
// <MyTable
|
|
9424
|
-
// columns={columns}
|
|
9425
|
-
// data={data}
|
|
9426
|
-
// loading={false}
|
|
9427
|
-
// // loadingskeleton={loadingskeleton}
|
|
9428
|
-
// view="rfi"
|
|
9429
|
-
// />
|
|
9430
|
-
// switch (readyForInvoiceView) {
|
|
9431
|
-
// case 'client':
|
|
9432
|
-
// return (
|
|
9433
|
-
// <div
|
|
9434
|
-
// style={{
|
|
9435
|
-
// display: 'flex',
|
|
9436
|
-
// flexDirection: 'column',
|
|
9437
|
-
// gap: '10px',
|
|
9438
|
-
// marginTop: '10px',
|
|
9439
|
-
// }}
|
|
9440
|
-
// >
|
|
9441
|
-
// {/* <ClientView /> */}
|
|
9442
|
-
// </div>
|
|
9443
|
-
// );
|
|
9444
|
-
// default:
|
|
9445
|
-
// return (
|
|
9446
|
-
// <MyTable
|
|
9447
|
-
// columns={columns}
|
|
9448
|
-
// data={data}
|
|
9449
|
-
// loading={false}
|
|
9450
|
-
// // loadingskeleton={loadingskeleton}
|
|
9451
|
-
// view="rfi"
|
|
9452
|
-
// />
|
|
9453
|
-
// );
|
|
9454
|
-
// }
|
|
9455
|
-
// };
|
|
9456
|
-
return React.createElement("div", {
|
|
9457
|
-
style: {
|
|
9458
|
-
textTransform: 'capitalize',
|
|
9459
|
-
overflow: 'auto'
|
|
9460
|
-
}
|
|
9461
|
-
}, React.createElement(MyTable, {
|
|
9462
|
-
columns: columns,
|
|
9463
|
-
data: data,
|
|
9464
|
-
loading: false,
|
|
9465
|
-
// loadingskeleton={loadingskeleton}
|
|
9466
|
-
view: "rfi"
|
|
9467
|
-
}));
|
|
9460
|
+
key: key
|
|
9461
|
+
}, React.createElement("td", null, clientReturn == null ? void 0 : clientReturn.trading_as), React.createElement("td", null, ' ', React.createElement("ul", {
|
|
9462
|
+
style: {
|
|
9463
|
+
listStyleType: 'none',
|
|
9464
|
+
padding: 0
|
|
9465
|
+
}
|
|
9466
|
+
}, React.createElement("li", {
|
|
9467
|
+
style: {
|
|
9468
|
+
color: '#0099ff',
|
|
9469
|
+
fontWeight: 600,
|
|
9470
|
+
paddingLeft: 0
|
|
9471
|
+
}
|
|
9472
|
+
}, clientReturn == null ? void 0 : clientReturn.customer_name)), ' '), React.createElement("td", null, React.createElement("div", {
|
|
9473
|
+
style: {
|
|
9474
|
+
background: 'rgba(153, 153, 153, 0.10)',
|
|
9475
|
+
padding: '3px 12px',
|
|
9476
|
+
borderRadius: '4px',
|
|
9477
|
+
color: '#6A7378',
|
|
9478
|
+
display: 'flex',
|
|
9479
|
+
justifyContent: 'center'
|
|
9480
|
+
}
|
|
9481
|
+
}, clientReturn == null ? void 0 : clientReturn.return_orders)), React.createElement("td", null, React.createElement("div", {
|
|
9482
|
+
style: {
|
|
9483
|
+
background: 'rgba(153, 153, 153, 0.10)',
|
|
9484
|
+
padding: '3px 12px',
|
|
9485
|
+
borderRadius: '4px',
|
|
9486
|
+
color: '#6A7378',
|
|
9487
|
+
display: 'flex',
|
|
9488
|
+
justifyContent: 'center'
|
|
9489
|
+
}
|
|
9490
|
+
}, clientReturn == null ? void 0 : clientReturn.return_order_products)), React.createElement("td", null, React.createElement("div", {
|
|
9491
|
+
style: {
|
|
9492
|
+
background: 'rgba(153, 153, 153, 0.10)',
|
|
9493
|
+
padding: '3px 12px',
|
|
9494
|
+
borderRadius: '4px',
|
|
9495
|
+
color: '#6A7378',
|
|
9496
|
+
display: 'flex',
|
|
9497
|
+
justifyContent: 'center'
|
|
9498
|
+
}
|
|
9499
|
+
}, clientReturn == null ? void 0 : clientReturn.DISPOSE)), React.createElement("td", null, React.createElement("div", {
|
|
9500
|
+
style: {
|
|
9501
|
+
background: 'rgba(153, 153, 153, 0.10)',
|
|
9502
|
+
padding: '3px 12px',
|
|
9503
|
+
borderRadius: '4px',
|
|
9504
|
+
color: '#6A7378',
|
|
9505
|
+
display: 'flex',
|
|
9506
|
+
justifyContent: 'center'
|
|
9507
|
+
}
|
|
9508
|
+
}, clientReturn == null ? void 0 : clientReturn['RE-ALLOCATE'])), React.createElement("td", null, React.createElement("div", {
|
|
9509
|
+
style: {
|
|
9510
|
+
background: 'rgba(153, 153, 153, 0.10)',
|
|
9511
|
+
padding: '3px 12px',
|
|
9512
|
+
borderRadius: '4px',
|
|
9513
|
+
color: '#6A7378',
|
|
9514
|
+
display: 'flex',
|
|
9515
|
+
justifyContent: 'center'
|
|
9516
|
+
}
|
|
9517
|
+
}, clientReturn == null ? void 0 : clientReturn['RE-DEL'])), React.createElement("td", null, React.createElement("div", {
|
|
9518
|
+
style: {
|
|
9519
|
+
background: 'rgba(153, 153, 153, 0.10)',
|
|
9520
|
+
padding: '3px 12px',
|
|
9521
|
+
borderRadius: '4px',
|
|
9522
|
+
color: '#6A7378',
|
|
9523
|
+
display: 'flex',
|
|
9524
|
+
justifyContent: 'center'
|
|
9525
|
+
}
|
|
9526
|
+
}, clientReturn == null ? void 0 : clientReturn.RECYCLE)), React.createElement("td", null, React.createElement("div", {
|
|
9527
|
+
style: {
|
|
9528
|
+
background: 'rgba(153, 153, 153, 0.10)',
|
|
9529
|
+
padding: '3px 12px',
|
|
9530
|
+
borderRadius: '4px',
|
|
9531
|
+
color: '#6A7378',
|
|
9532
|
+
display: 'flex',
|
|
9533
|
+
justifyContent: 'center'
|
|
9534
|
+
}
|
|
9535
|
+
}, clientReturn == null ? void 0 : clientReturn.UNKNOWN)));
|
|
9536
|
+
})))));
|
|
9468
9537
|
};
|
|
9469
9538
|
|
|
9470
|
-
var _templateObject$2d;
|
|
9539
|
+
var _templateObject$2d, _templateObject2$1u;
|
|
9471
9540
|
// import Loader from '../loader/Loader';
|
|
9541
|
+
// interface ApiResponse {
|
|
9542
|
+
// message: string;
|
|
9543
|
+
// code: number;
|
|
9544
|
+
// error: string | null;
|
|
9545
|
+
// error_traceback: string | null;
|
|
9546
|
+
// data: [];
|
|
9547
|
+
// }
|
|
9472
9548
|
function ReturnMainTable() {
|
|
9473
9549
|
var _UsePaginationData = UsePaginationData(),
|
|
9474
9550
|
paginationObj = _UsePaginationData[0];
|
|
@@ -9477,6 +9553,8 @@ function ReturnMainTable() {
|
|
|
9477
9553
|
var _useItemsPerPage = useItemsPerPage(),
|
|
9478
9554
|
itemsPerPage = _useItemsPerPage[0],
|
|
9479
9555
|
setItemsPerPage = _useItemsPerPage[1];
|
|
9556
|
+
var _useTableName = useTableName(),
|
|
9557
|
+
selectedClient = _useTableName[0];
|
|
9480
9558
|
var page = paginationObj.page,
|
|
9481
9559
|
total = paginationObj.total;
|
|
9482
9560
|
var _useStickyStatus = useStickyStatus(),
|
|
@@ -9488,11 +9566,33 @@ function ReturnMainTable() {
|
|
|
9488
9566
|
setItemsPerPage(itemsPerPage);
|
|
9489
9567
|
};
|
|
9490
9568
|
////
|
|
9569
|
+
var _useLoading = useLoading(),
|
|
9570
|
+
setLoading = _useLoading[1];
|
|
9571
|
+
var _useClientData = useClientData(),
|
|
9572
|
+
setClientData = _useClientData[1];
|
|
9573
|
+
var _useApiHook = useApiHook({
|
|
9574
|
+
endpoint: "/return_orders/get/client-returns/",
|
|
9575
|
+
method: 'GET'
|
|
9576
|
+
}),
|
|
9577
|
+
fetchedClientData = _useApiHook.data,
|
|
9578
|
+
staticDataLoading = _useApiHook.loading;
|
|
9579
|
+
console.log('fetchedClientData', fetchedClientData == null ? void 0 : fetchedClientData.data);
|
|
9580
|
+
useEffect(function () {
|
|
9581
|
+
setLoading(staticDataLoading);
|
|
9582
|
+
if (fetchedClientData && fetchedClientData.data) {
|
|
9583
|
+
var result = fetchedClientData == null ? void 0 : fetchedClientData.data;
|
|
9584
|
+
setClientData(result);
|
|
9585
|
+
// Flatten the nested objects into an array
|
|
9586
|
+
// const data = Object.values(fetchedClientData.data);
|
|
9587
|
+
// console.log('data', data);
|
|
9588
|
+
// setClientData(data);
|
|
9589
|
+
}
|
|
9590
|
+
}, [staticDataLoading]);
|
|
9491
9591
|
return React.createElement(React.Fragment, null, React.createElement(DashBoardWrapper$4, {
|
|
9492
9592
|
className: " " + (isScrolled ? 'stickyTableHead' : '')
|
|
9493
9593
|
}, React.createElement(RouterHeader, null), React.createElement("div", {
|
|
9494
9594
|
className: "Tableconatiner"
|
|
9495
|
-
}, React.createElement(HeaderFilter, null), React.createElement(Filters, null), React.createElement(ReturnTable$1, null), total > 0 && React.createElement(Pagination, {
|
|
9595
|
+
}, React.createElement(HeaderFilter, null), React.createElement(Row$3, null, React.createElement(Text$8, null, " ", selectedClient ? selectedClient : 'Client Return'), selectedClient ? React.createElement(ReturnFilter, null) : React.createElement(Filters, null)), selectedClient ? React.createElement(ReturnOrderTable, null) : React.createElement(ReturnTable$1, null), total > 0 && React.createElement(Pagination, {
|
|
9496
9596
|
currentPage: page,
|
|
9497
9597
|
totalItems: total,
|
|
9498
9598
|
itemsPerPage: itemsPerPage,
|
|
@@ -9500,7 +9600,8 @@ function ReturnMainTable() {
|
|
|
9500
9600
|
onItemsPerPageChange: handleItemsPerPageChange
|
|
9501
9601
|
}))));
|
|
9502
9602
|
}
|
|
9503
|
-
var
|
|
9603
|
+
var Row$3 = /*#__PURE__*/styled.div(_templateObject$2d || (_templateObject$2d = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
|
|
9604
|
+
var DashBoardWrapper$4 = /*#__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"])));
|
|
9504
9605
|
|
|
9505
9606
|
function ReturnClient() {
|
|
9506
9607
|
var LoadingMessage = function LoadingMessage() {
|