@salesgenterp/ui-components 0.4.280 → 0.4.281
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/index.js +933 -1284
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +935 -1286
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -804,7 +804,10 @@ var APIStaticPage = function APIStaticPage(_ref) {
|
|
|
804
804
|
mapSrc = _ref.mapSrc,
|
|
805
805
|
googleReCaptchaKey = _ref.googleReCaptchaKey,
|
|
806
806
|
apiEndPoint = _ref.apiEndPoint,
|
|
807
|
-
id = _ref.id
|
|
807
|
+
id = _ref.id,
|
|
808
|
+
extra = _ref.extra,
|
|
809
|
+
pageData = _ref.pageData,
|
|
810
|
+
hideRouteBar = _ref.hideRouteBar;
|
|
808
811
|
var _useState = React.useState(false),
|
|
809
812
|
contactUsForm = _useState[0],
|
|
810
813
|
setContactUsForm = _useState[1];
|
|
@@ -818,15 +821,15 @@ var APIStaticPage = function APIStaticPage(_ref) {
|
|
|
818
821
|
if (apiEndPoint) {
|
|
819
822
|
(function () {
|
|
820
823
|
return _catch(function () {
|
|
821
|
-
var
|
|
822
|
-
if (id) {
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
setStaticPage(
|
|
828
|
-
var _temp = function (_response$title) {
|
|
829
|
-
if ((
|
|
824
|
+
var _temp4 = function () {
|
|
825
|
+
if (id || pageData) {
|
|
826
|
+
var _temp3 = function _temp3() {
|
|
827
|
+
if (pageData) {
|
|
828
|
+
_response2 = pageData;
|
|
829
|
+
}
|
|
830
|
+
setStaticPage(_response2);
|
|
831
|
+
var _temp = function (_response, _response$title) {
|
|
832
|
+
if (((_response = _response2) === null || _response === void 0 ? void 0 : (_response$title = _response.title) === null || _response$title === void 0 ? void 0 : _response$title.toLowerCase()) === 'contact us') {
|
|
830
833
|
return Promise.resolve(API$1({
|
|
831
834
|
apiEndPoint: apiEndPoint,
|
|
832
835
|
url: "/store"
|
|
@@ -838,10 +841,22 @@ var APIStaticPage = function APIStaticPage(_ref) {
|
|
|
838
841
|
}
|
|
839
842
|
}();
|
|
840
843
|
if (_temp && _temp.then) return _temp.then(function () {});
|
|
841
|
-
}
|
|
844
|
+
};
|
|
845
|
+
var _response2;
|
|
846
|
+
var _temp2 = function () {
|
|
847
|
+
if (id) {
|
|
848
|
+
return Promise.resolve(API$1({
|
|
849
|
+
apiEndPoint: apiEndPoint,
|
|
850
|
+
url: "/ecommerce/staticPage/" + id
|
|
851
|
+
})).then(function (_API) {
|
|
852
|
+
_response2 = _API;
|
|
853
|
+
});
|
|
854
|
+
}
|
|
855
|
+
}();
|
|
856
|
+
return _temp2 && _temp2.then ? _temp2.then(_temp3) : _temp3(_temp2);
|
|
842
857
|
}
|
|
843
858
|
}();
|
|
844
|
-
if (
|
|
859
|
+
if (_temp4 && _temp4.then) return _temp4.then(function () {});
|
|
845
860
|
}, function () {});
|
|
846
861
|
})();
|
|
847
862
|
}
|
|
@@ -865,7 +880,7 @@ var APIStaticPage = function APIStaticPage(_ref) {
|
|
|
865
880
|
style: {
|
|
866
881
|
maxWidth: maxWidth || 1470
|
|
867
882
|
}
|
|
868
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
883
|
+
}, !hideRouteBar && /*#__PURE__*/React__default.createElement("div", {
|
|
869
884
|
className: "route-bar"
|
|
870
885
|
}, /*#__PURE__*/React__default.createElement("p", null, /*#__PURE__*/React__default.createElement(ai.AiOutlineHome, null), "\xA0Home\xA0", /*#__PURE__*/React__default.createElement(ai.AiOutlineRight, null), "\xA0", staticPage === null || staticPage === void 0 ? void 0 : staticPage.header)), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
871
886
|
container: true,
|
|
@@ -875,7 +890,7 @@ var APIStaticPage = function APIStaticPage(_ref) {
|
|
|
875
890
|
item: true,
|
|
876
891
|
sm: 12,
|
|
877
892
|
md: contactUsForm ? 6 : 12
|
|
878
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
893
|
+
}, extra && extra, /*#__PURE__*/React__default.createElement("div", {
|
|
879
894
|
dangerouslySetInnerHTML: {
|
|
880
895
|
__html: data || ''
|
|
881
896
|
}
|
|
@@ -2606,7 +2621,7 @@ var InputContainer = styled__default(InputLabel)(_templateObject2$6 || (_templat
|
|
|
2606
2621
|
|
|
2607
2622
|
var _templateObject$d, _templateObject2$7, _templateObject3$4, _templateObject4$3;
|
|
2608
2623
|
var Statement = function Statement(_ref) {
|
|
2609
|
-
var _customerData$
|
|
2624
|
+
var _customerData$custome3, _customerData$custome4, _customerData$custome5;
|
|
2610
2625
|
var apiEndPoint = _ref.apiEndPoint,
|
|
2611
2626
|
serviceApiEndPoint = _ref.serviceApiEndPoint,
|
|
2612
2627
|
token = _ref.token,
|
|
@@ -2645,7 +2660,7 @@ var Statement = function Statement(_ref) {
|
|
|
2645
2660
|
};
|
|
2646
2661
|
var onChangeStore = function onChangeStore(data) {
|
|
2647
2662
|
setQueryParams(_extends({}, queryParams, {
|
|
2648
|
-
|
|
2663
|
+
customerIds: data
|
|
2649
2664
|
}));
|
|
2650
2665
|
setTriggerTableData(getRandomString());
|
|
2651
2666
|
};
|
|
@@ -2710,8 +2725,8 @@ var Statement = function Statement(_ref) {
|
|
|
2710
2725
|
})();
|
|
2711
2726
|
}, []);
|
|
2712
2727
|
var print = function print() {
|
|
2713
|
-
var _customerData$custome
|
|
2714
|
-
var location = "/cusomter/statement?token=" + token + "&startDate=" + queryParams.startDate + "&endDate=" + queryParams.endDate + "&
|
|
2728
|
+
var _customerData$custome;
|
|
2729
|
+
var location = "/cusomter/statement?token=" + token + "&startDate=" + queryParams.startDate + "&endDate=" + queryParams.endDate + "&customerIds=" + (customerData === null || customerData === void 0 ? void 0 : (_customerData$custome = customerData.customerDto) === null || _customerData$custome === void 0 ? void 0 : _customerData$custome.id) + "&storeIdList=" + storeIdList + "&defaultStoreId=" + defaultStoreId;
|
|
2715
2730
|
var pdfUrl = "" + serviceApiEndPoint + location;
|
|
2716
2731
|
var w = window.open(pdfUrl);
|
|
2717
2732
|
w.print();
|
|
@@ -2719,9 +2734,9 @@ var Statement = function Statement(_ref) {
|
|
|
2719
2734
|
var getStatementAPIData = function getStatementAPIData(_ref2) {
|
|
2720
2735
|
var params = _ref2.params;
|
|
2721
2736
|
try {
|
|
2722
|
-
var _customerData$
|
|
2737
|
+
var _customerData$custome2;
|
|
2723
2738
|
return Promise.resolve(API$1({
|
|
2724
|
-
url: "/ecommerce/customer/report/statement?
|
|
2739
|
+
url: "/ecommerce/customer/report/statement?customerIds=" + (customerData === null || customerData === void 0 ? void 0 : (_customerData$custome2 = customerData.customerDto) === null || _customerData$custome2 === void 0 ? void 0 : _customerData$custome2.id) + "&storeIds=" + storeIdList + "&page=0&size=20",
|
|
2725
2740
|
apiEndPoint: apiEndPoint,
|
|
2726
2741
|
token: token,
|
|
2727
2742
|
queryParams: _extends({}, params, queryParams)
|
|
@@ -2767,15 +2782,15 @@ var Statement = function Statement(_ref) {
|
|
|
2767
2782
|
container: true,
|
|
2768
2783
|
justifyContent: "flex-end",
|
|
2769
2784
|
alignItems: "center"
|
|
2770
|
-
}, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2785
|
+
}, (customerData === null || customerData === void 0 ? void 0 : (_customerData$custome3 = customerData.customerList) === null || _customerData$custome3 === void 0 ? void 0 : _customerData$custome3[0]) && /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2771
2786
|
item: true
|
|
2772
2787
|
}, /*#__PURE__*/React__default.createElement(MuiSelect, {
|
|
2773
|
-
label: "Select
|
|
2774
|
-
defaultValue: customerData === null || customerData === void 0 ? void 0 : (_customerData$
|
|
2788
|
+
label: "Select Customer",
|
|
2789
|
+
defaultValue: customerData === null || customerData === void 0 ? void 0 : (_customerData$custome4 = customerData.customerList) === null || _customerData$custome4 === void 0 ? void 0 : (_customerData$custome5 = _customerData$custome4[0]) === null || _customerData$custome5 === void 0 ? void 0 : _customerData$custome5.id,
|
|
2775
2790
|
onChange: onChangeStore,
|
|
2776
|
-
options: (customerData === null || customerData === void 0 ? void 0 : customerData.
|
|
2791
|
+
options: (customerData === null || customerData === void 0 ? void 0 : customerData.customerList) || [],
|
|
2777
2792
|
valueKey: "id",
|
|
2778
|
-
labelKey: "
|
|
2793
|
+
labelKey: "customerName",
|
|
2779
2794
|
fontColor: fontColor,
|
|
2780
2795
|
primaryColor: primaryColor
|
|
2781
2796
|
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
@@ -2810,6 +2825,55 @@ var StatusContainer$1 = styled__default(material.Grid)(_templateObject3$4 || (_t
|
|
|
2810
2825
|
var TableContainer$1 = styled__default.div(_templateObject4$3 || (_templateObject4$3 = _taggedTemplateLiteralLoose(["\n margin: 1.2rem 0;\n border-radius: 14px;\n"])));
|
|
2811
2826
|
|
|
2812
2827
|
var _templateObject$e, _templateObject2$8;
|
|
2828
|
+
var FormCheckbox = function FormCheckbox(props) {
|
|
2829
|
+
var label = props.label,
|
|
2830
|
+
name = props.name,
|
|
2831
|
+
control = props.control,
|
|
2832
|
+
rules = props.rules,
|
|
2833
|
+
required = props.required,
|
|
2834
|
+
disabled = props.disabled,
|
|
2835
|
+
onChangeField = props.onChangeField;
|
|
2836
|
+
return /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
2837
|
+
name: name,
|
|
2838
|
+
control: control,
|
|
2839
|
+
rules: _extends({
|
|
2840
|
+
required: required ? 'This field is required' : false
|
|
2841
|
+
}, rules),
|
|
2842
|
+
render: function render(_ref) {
|
|
2843
|
+
var _ref$field = _ref.field,
|
|
2844
|
+
_onChange = _ref$field.onChange,
|
|
2845
|
+
value = _ref$field.value,
|
|
2846
|
+
error = _ref.fieldState.error;
|
|
2847
|
+
return /*#__PURE__*/React__default.createElement(material.FormControl, {
|
|
2848
|
+
fullWidth: true,
|
|
2849
|
+
required: required,
|
|
2850
|
+
margin: "normal",
|
|
2851
|
+
disabled: disabled
|
|
2852
|
+
}, /*#__PURE__*/React__default.createElement(FormControlLabelContainer, {
|
|
2853
|
+
label: label,
|
|
2854
|
+
fontColor: props.fontColor,
|
|
2855
|
+
control: /*#__PURE__*/React__default.createElement(CheckboxField, _extends({
|
|
2856
|
+
size: "small",
|
|
2857
|
+
onChange: function onChange(e) {
|
|
2858
|
+
_onChange(e.target.checked);
|
|
2859
|
+
onChangeField && onChangeField(e.target.checked);
|
|
2860
|
+
},
|
|
2861
|
+
checked: value
|
|
2862
|
+
}, props))
|
|
2863
|
+
}), /*#__PURE__*/React__default.createElement(material.FormHelperText, {
|
|
2864
|
+
error: error
|
|
2865
|
+
}, error !== null && error !== void 0 && error.message ? error.message : ''));
|
|
2866
|
+
}
|
|
2867
|
+
});
|
|
2868
|
+
};
|
|
2869
|
+
var CheckboxField = styled__default(material.Checkbox)(_templateObject$e || (_templateObject$e = _taggedTemplateLiteralLoose(["\n svg {\n color: ", " !important;\n }\n"])), function (props) {
|
|
2870
|
+
return props.primaryColor;
|
|
2871
|
+
});
|
|
2872
|
+
var FormControlLabelContainer = styled__default(material.FormControlLabel)(_templateObject2$8 || (_templateObject2$8 = _taggedTemplateLiteralLoose(["\n .MuiTypography-root {\n color: ", " !important;\n }\n"])), function (props) {
|
|
2873
|
+
return props.fontColor;
|
|
2874
|
+
});
|
|
2875
|
+
|
|
2876
|
+
var _templateObject$f, _templateObject2$9;
|
|
2813
2877
|
var FormSelect = function FormSelect(props) {
|
|
2814
2878
|
var label = props.label,
|
|
2815
2879
|
name = props.name,
|
|
@@ -2863,14 +2927,14 @@ var FormSelect = function FormSelect(props) {
|
|
|
2863
2927
|
}
|
|
2864
2928
|
});
|
|
2865
2929
|
};
|
|
2866
|
-
var SelectField = styled__default(material.Select)(_templateObject$
|
|
2930
|
+
var SelectField = styled__default(material.Select)(_templateObject$f || (_templateObject$f = _taggedTemplateLiteralLoose(["\n color: ", " !important;\n svg,\n input {\n color: ", " !important;\n }\n fieldset {\n border-color: ", " !important;\n }\n"])), function (props) {
|
|
2867
2931
|
return props.fontColor;
|
|
2868
2932
|
}, function (props) {
|
|
2869
2933
|
return props.fontColor;
|
|
2870
2934
|
}, function (props) {
|
|
2871
2935
|
return props.fontColor;
|
|
2872
2936
|
});
|
|
2873
|
-
var InputContainer$1 = styled__default(material.InputLabel)(_templateObject2$
|
|
2937
|
+
var InputContainer$1 = styled__default(material.InputLabel)(_templateObject2$9 || (_templateObject2$9 = _taggedTemplateLiteralLoose(["\n color: ", " !important;\n"])), function (props) {
|
|
2874
2938
|
return props.fontColor;
|
|
2875
2939
|
});
|
|
2876
2940
|
|
|
@@ -2904,15 +2968,18 @@ var getCountry = function getCountry(_ref2) {
|
|
|
2904
2968
|
}
|
|
2905
2969
|
};
|
|
2906
2970
|
|
|
2907
|
-
var _templateObject$
|
|
2908
|
-
var
|
|
2971
|
+
var _templateObject$g;
|
|
2972
|
+
var AddEditAddress = function AddEditAddress(_ref) {
|
|
2909
2973
|
var apiEndPoint = _ref.apiEndPoint,
|
|
2910
2974
|
token = _ref.token,
|
|
2911
|
-
getStoreDataList = _ref.getStoreDataList,
|
|
2912
2975
|
setOpenModal = _ref.setOpenModal,
|
|
2976
|
+
addressDetails = _ref.addressDetails,
|
|
2977
|
+
customer = _ref.customer,
|
|
2978
|
+
getAllStoreAddress = _ref.getAllStoreAddress,
|
|
2913
2979
|
primaryColor = _ref.primaryColor,
|
|
2914
2980
|
fontColor = _ref.fontColor;
|
|
2915
2981
|
var _useState = React.useState(false),
|
|
2982
|
+
isLoading = _useState[0],
|
|
2916
2983
|
setIsLoading = _useState[1];
|
|
2917
2984
|
var _useState2 = React.useState([]),
|
|
2918
2985
|
country = _useState2[0],
|
|
@@ -2920,14 +2987,15 @@ var AddStore = function AddStore(_ref) {
|
|
|
2920
2987
|
var _useState3 = React.useState([]),
|
|
2921
2988
|
states = _useState3[0],
|
|
2922
2989
|
setStates = _useState3[1];
|
|
2990
|
+
var _useState4 = React.useState(addressDetails),
|
|
2991
|
+
addressData = _useState4[0],
|
|
2992
|
+
setAddressData = _useState4[1];
|
|
2923
2993
|
var _useForm = reactHookForm.useForm({
|
|
2924
|
-
defaultValues: {}
|
|
2994
|
+
defaultValues: _extends({}, addressDetails)
|
|
2925
2995
|
}),
|
|
2926
2996
|
handleSubmit = _useForm.handleSubmit,
|
|
2927
2997
|
control = _useForm.control,
|
|
2928
|
-
setValue = _useForm.setValue
|
|
2929
|
-
watch = _useForm.watch;
|
|
2930
|
-
var selectedCountry = watch('address.countryId');
|
|
2998
|
+
setValue = _useForm.setValue;
|
|
2931
2999
|
var getCountryData = function getCountryData() {
|
|
2932
3000
|
try {
|
|
2933
3001
|
var _temp = _catch(function () {
|
|
@@ -2936,7 +3004,16 @@ var AddStore = function AddStore(_ref) {
|
|
|
2936
3004
|
token: token
|
|
2937
3005
|
})).then(function (countryData) {
|
|
2938
3006
|
setCountry(countryData);
|
|
2939
|
-
setValue('
|
|
3007
|
+
setValue('countryId', (addressDetails === null || addressDetails === void 0 ? void 0 : addressDetails.countryId) || countryData[0].id);
|
|
3008
|
+
var statesById = (addressDetails === null || addressDetails === void 0 ? void 0 : addressDetails.countryId) || countryData[0].id;
|
|
3009
|
+
return Promise.resolve(getStatesById({
|
|
3010
|
+
id: statesById,
|
|
3011
|
+
apiEndPoint: apiEndPoint,
|
|
3012
|
+
token: token
|
|
3013
|
+
})).then(function (statesData) {
|
|
3014
|
+
setStates(statesData);
|
|
3015
|
+
setValue('stateId', (addressDetails === null || addressDetails === void 0 ? void 0 : addressDetails.stateId) || statesData[0].id);
|
|
3016
|
+
});
|
|
2940
3017
|
});
|
|
2941
3018
|
}, function () {});
|
|
2942
3019
|
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
@@ -2946,104 +3023,57 @@ var AddStore = function AddStore(_ref) {
|
|
|
2946
3023
|
};
|
|
2947
3024
|
React.useEffect(function () {
|
|
2948
3025
|
(function () {
|
|
2949
|
-
getCountryData();
|
|
3026
|
+
return Promise.resolve(getCountryData()).then(function () {});
|
|
2950
3027
|
})();
|
|
2951
3028
|
}, []);
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
} catch (e) {
|
|
2969
|
-
Promise.reject(e);
|
|
2970
|
-
}
|
|
2971
|
-
})();
|
|
2972
|
-
}, [selectedCountry]);
|
|
2973
|
-
var addStoreData = function addStoreData(formData) {
|
|
3029
|
+
var onUpdateCountry = function onUpdateCountry(data) {
|
|
3030
|
+
try {
|
|
3031
|
+
var _data$target;
|
|
3032
|
+
return Promise.resolve(getStatesById({
|
|
3033
|
+
id: data === null || data === void 0 ? void 0 : (_data$target = data.target) === null || _data$target === void 0 ? void 0 : _data$target.value,
|
|
3034
|
+
apiEndPoint: apiEndPoint,
|
|
3035
|
+
token: token
|
|
3036
|
+
})).then(function (statesData) {
|
|
3037
|
+
setStates(statesData);
|
|
3038
|
+
setValue('stateId', statesData[0].id);
|
|
3039
|
+
});
|
|
3040
|
+
} catch (e) {
|
|
3041
|
+
return Promise.reject(e);
|
|
3042
|
+
}
|
|
3043
|
+
};
|
|
3044
|
+
var updateAddressData = function updateAddressData(formData) {
|
|
2974
3045
|
try {
|
|
2975
|
-
var
|
|
3046
|
+
var _temp3 = function _temp3() {
|
|
2976
3047
|
setIsLoading(false);
|
|
2977
3048
|
};
|
|
2978
3049
|
setIsLoading(true);
|
|
2979
|
-
var
|
|
3050
|
+
var _temp2 = _catch(function () {
|
|
3051
|
+
var _customer$customerDto, _customer$customerDto2;
|
|
2980
3052
|
return Promise.resolve(API$1({
|
|
2981
3053
|
apiEndPoint: apiEndPoint,
|
|
2982
3054
|
token: token,
|
|
2983
|
-
url:
|
|
2984
|
-
body:
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
defaultBillingAddress: true,
|
|
2995
|
-
defaultShippingAddress: true
|
|
2996
|
-
}),
|
|
2997
|
-
errorMessage: 'Error in adding the store address.',
|
|
2998
|
-
successMessage: 'Store created successfully.'
|
|
2999
|
-
})).then(function () {
|
|
3000
|
-
setOpenModal(false);
|
|
3001
|
-
getStoreDataList();
|
|
3055
|
+
url: "/ecommerce/customer/" + (customer === null || customer === void 0 ? void 0 : (_customer$customerDto = customer.customerDto) === null || _customer$customerDto === void 0 ? void 0 : _customer$customerDto.id) + "/address",
|
|
3056
|
+
body: _extends({
|
|
3057
|
+
customerId: customer === null || customer === void 0 ? void 0 : (_customer$customerDto2 = customer.customerDto) === null || _customer$customerDto2 === void 0 ? void 0 : _customer$customerDto2.id
|
|
3058
|
+
}, addressData, formData),
|
|
3059
|
+
method: addressDetails ? 'PUT' : 'POST',
|
|
3060
|
+
errorMessage: 'Error in updating the address.',
|
|
3061
|
+
successMessage: 'Address updated successfully.'
|
|
3062
|
+
})).then(function (data) {
|
|
3063
|
+
setAddressData(data);
|
|
3064
|
+
setOpenModal({
|
|
3065
|
+
open: false
|
|
3002
3066
|
});
|
|
3067
|
+
getAllStoreAddress && getAllStoreAddress();
|
|
3003
3068
|
});
|
|
3004
3069
|
}, function () {});
|
|
3005
|
-
return Promise.resolve(
|
|
3070
|
+
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(_temp3) : _temp3(_temp2));
|
|
3006
3071
|
} catch (e) {
|
|
3007
3072
|
return Promise.reject(e);
|
|
3008
3073
|
}
|
|
3009
3074
|
};
|
|
3010
3075
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("form", null, /*#__PURE__*/React__default.createElement(HeaderContainer, {
|
|
3011
3076
|
fontColor: fontColor
|
|
3012
|
-
}, "Store Details"), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3013
|
-
container: true,
|
|
3014
|
-
columnSpacing: 2
|
|
3015
|
-
}, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3016
|
-
item: true,
|
|
3017
|
-
xs: 12,
|
|
3018
|
-
md: 6
|
|
3019
|
-
}, /*#__PURE__*/React__default.createElement(FormTextField, {
|
|
3020
|
-
label: "Store Name",
|
|
3021
|
-
name: "storeDetails.storeName",
|
|
3022
|
-
required: true,
|
|
3023
|
-
control: control,
|
|
3024
|
-
fontColor: fontColor
|
|
3025
|
-
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3026
|
-
item: true,
|
|
3027
|
-
xs: 12,
|
|
3028
|
-
md: 6
|
|
3029
|
-
}, /*#__PURE__*/React__default.createElement(FormTextField, {
|
|
3030
|
-
label: "Email",
|
|
3031
|
-
name: "storeDetails.email",
|
|
3032
|
-
type: "email",
|
|
3033
|
-
control: control,
|
|
3034
|
-
fontColor: fontColor
|
|
3035
|
-
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3036
|
-
item: true,
|
|
3037
|
-
xs: 12,
|
|
3038
|
-
md: 6
|
|
3039
|
-
}, /*#__PURE__*/React__default.createElement(FormTextField, {
|
|
3040
|
-
label: "Phone",
|
|
3041
|
-
name: "storeDetails.phone",
|
|
3042
|
-
type: "number",
|
|
3043
|
-
control: control,
|
|
3044
|
-
fontColor: fontColor
|
|
3045
|
-
}))), /*#__PURE__*/React__default.createElement(HeaderContainer, {
|
|
3046
|
-
fontColor: fontColor
|
|
3047
3077
|
}, "Store Address"), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3048
3078
|
container: true,
|
|
3049
3079
|
columnSpacing: 2
|
|
@@ -3053,7 +3083,7 @@ var AddStore = function AddStore(_ref) {
|
|
|
3053
3083
|
md: 6
|
|
3054
3084
|
}, /*#__PURE__*/React__default.createElement(FormTextField, {
|
|
3055
3085
|
label: "Address 1",
|
|
3056
|
-
name: "
|
|
3086
|
+
name: "address1",
|
|
3057
3087
|
multiline: true,
|
|
3058
3088
|
rows: 3,
|
|
3059
3089
|
required: true,
|
|
@@ -3065,7 +3095,7 @@ var AddStore = function AddStore(_ref) {
|
|
|
3065
3095
|
md: 6
|
|
3066
3096
|
}, /*#__PURE__*/React__default.createElement(FormTextField, {
|
|
3067
3097
|
label: "Address 2",
|
|
3068
|
-
name: "
|
|
3098
|
+
name: "address2",
|
|
3069
3099
|
rows: 3,
|
|
3070
3100
|
multiline: true,
|
|
3071
3101
|
control: control,
|
|
@@ -3076,12 +3106,13 @@ var AddStore = function AddStore(_ref) {
|
|
|
3076
3106
|
md: 6
|
|
3077
3107
|
}, /*#__PURE__*/React__default.createElement(FormSelect, {
|
|
3078
3108
|
label: "Country",
|
|
3079
|
-
name: "
|
|
3109
|
+
name: "countryId",
|
|
3080
3110
|
required: true,
|
|
3081
3111
|
control: control,
|
|
3082
3112
|
options: country,
|
|
3083
3113
|
valueKey: "id",
|
|
3084
3114
|
labelKey: "code",
|
|
3115
|
+
onChangeField: onUpdateCountry,
|
|
3085
3116
|
fontColor: fontColor
|
|
3086
3117
|
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3087
3118
|
item: true,
|
|
@@ -3089,7 +3120,7 @@ var AddStore = function AddStore(_ref) {
|
|
|
3089
3120
|
md: 6
|
|
3090
3121
|
}, /*#__PURE__*/React__default.createElement(FormSelect, {
|
|
3091
3122
|
label: "State",
|
|
3092
|
-
name: "
|
|
3123
|
+
name: "stateId",
|
|
3093
3124
|
required: true,
|
|
3094
3125
|
control: control,
|
|
3095
3126
|
options: states,
|
|
@@ -3102,7 +3133,7 @@ var AddStore = function AddStore(_ref) {
|
|
|
3102
3133
|
md: 6
|
|
3103
3134
|
}, /*#__PURE__*/React__default.createElement(FormTextField, {
|
|
3104
3135
|
label: "Zip",
|
|
3105
|
-
name: "
|
|
3136
|
+
name: "zip",
|
|
3106
3137
|
type: "number",
|
|
3107
3138
|
required: true,
|
|
3108
3139
|
control: control,
|
|
@@ -3113,7 +3144,7 @@ var AddStore = function AddStore(_ref) {
|
|
|
3113
3144
|
md: 6
|
|
3114
3145
|
}, /*#__PURE__*/React__default.createElement(FormTextField, {
|
|
3115
3146
|
label: "City",
|
|
3116
|
-
name: "
|
|
3147
|
+
name: "city",
|
|
3117
3148
|
required: true,
|
|
3118
3149
|
control: control,
|
|
3119
3150
|
fontColor: fontColor
|
|
@@ -3123,517 +3154,108 @@ var AddStore = function AddStore(_ref) {
|
|
|
3123
3154
|
md: 12
|
|
3124
3155
|
}, /*#__PURE__*/React__default.createElement(FormTextField, {
|
|
3125
3156
|
label: "Phone",
|
|
3126
|
-
name: "
|
|
3157
|
+
name: "phone",
|
|
3127
3158
|
type: "number",
|
|
3128
3159
|
control: control,
|
|
3129
3160
|
fontColor: fontColor
|
|
3161
|
+
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3162
|
+
item: true,
|
|
3163
|
+
xs: 12,
|
|
3164
|
+
md: 6
|
|
3165
|
+
}, /*#__PURE__*/React__default.createElement(FormCheckbox, {
|
|
3166
|
+
label: "Default Billing Address",
|
|
3167
|
+
name: "defaultBillingAddress",
|
|
3168
|
+
control: control,
|
|
3169
|
+
primaryColor: primaryColor,
|
|
3170
|
+
fontColor: fontColor
|
|
3171
|
+
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3172
|
+
item: true,
|
|
3173
|
+
xs: 12,
|
|
3174
|
+
md: 6
|
|
3175
|
+
}, /*#__PURE__*/React__default.createElement(FormCheckbox, {
|
|
3176
|
+
label: "Default Shipping Address",
|
|
3177
|
+
name: "defaultShippingAddress",
|
|
3178
|
+
control: control,
|
|
3179
|
+
primaryColor: primaryColor,
|
|
3180
|
+
fontColor: fontColor
|
|
3130
3181
|
}))), /*#__PURE__*/React__default.createElement(MuiButton, {
|
|
3131
3182
|
variant: "contained",
|
|
3132
3183
|
primaryColor: primaryColor,
|
|
3133
|
-
onClick: handleSubmit(
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
}
|
|
3137
|
-
}, "Add Store")));
|
|
3184
|
+
onClick: handleSubmit(updateAddressData),
|
|
3185
|
+
loading: isLoading
|
|
3186
|
+
}, addressDetails ? 'Update Address' : 'Add Address')));
|
|
3138
3187
|
};
|
|
3139
|
-
var HeaderContainer = styled__default.h2(_templateObject$
|
|
3188
|
+
var HeaderContainer = styled__default.h2(_templateObject$g || (_templateObject$g = _taggedTemplateLiteralLoose(["\n color: ", ";\n margin-top: 1rem;\n font-size: 1.3rem;\n font-weight: 500;\n"])), function (props) {
|
|
3140
3189
|
return props.fontColor;
|
|
3141
3190
|
});
|
|
3142
3191
|
|
|
3143
|
-
var _templateObject$
|
|
3144
|
-
var
|
|
3145
|
-
|
|
3192
|
+
var _templateObject$h;
|
|
3193
|
+
var _excluded$1 = ["children", "onClose", "fontColor"];
|
|
3194
|
+
var MuiModal = function MuiModal(props) {
|
|
3195
|
+
var fontColor = props.fontColor,
|
|
3196
|
+
children = props.children,
|
|
3197
|
+
onClose = props.onClose,
|
|
3198
|
+
title = props.title,
|
|
3199
|
+
secondaryColor = props.secondaryColor;
|
|
3200
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ModalContainer, _extends({}, props, {
|
|
3201
|
+
onClose: onClose,
|
|
3202
|
+
secondaryColor: secondaryColor
|
|
3203
|
+
}), /*#__PURE__*/React__default.createElement(BootstrapDialogTitle, {
|
|
3204
|
+
id: "customized-dialog-title",
|
|
3205
|
+
onClose: onClose,
|
|
3206
|
+
fontColor: fontColor
|
|
3207
|
+
}, title || 'Modal'), /*#__PURE__*/React__default.createElement(material.DialogContent, {
|
|
3208
|
+
dividers: true
|
|
3209
|
+
}, children)));
|
|
3210
|
+
};
|
|
3211
|
+
function BootstrapDialogTitle(props) {
|
|
3212
|
+
var children = props.children,
|
|
3213
|
+
onClose = props.onClose,
|
|
3214
|
+
fontColor = props.fontColor,
|
|
3215
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$1);
|
|
3216
|
+
return /*#__PURE__*/React__default.createElement(material.DialogTitle, _extends({
|
|
3217
|
+
sx: {
|
|
3218
|
+
m: 0,
|
|
3219
|
+
p: 2,
|
|
3220
|
+
color: fontColor
|
|
3221
|
+
}
|
|
3222
|
+
}, other), children, onClose ? /*#__PURE__*/React__default.createElement(material.IconButton, {
|
|
3223
|
+
"aria-label": "close",
|
|
3224
|
+
onClick: onClose,
|
|
3225
|
+
sx: {
|
|
3226
|
+
position: 'absolute',
|
|
3227
|
+
right: 8,
|
|
3228
|
+
top: 8,
|
|
3229
|
+
color: fontColor,
|
|
3230
|
+
'& svg': {
|
|
3231
|
+
fontSize: 20
|
|
3232
|
+
}
|
|
3233
|
+
}
|
|
3234
|
+
}, /*#__PURE__*/React__default.createElement(md.MdClose, null)) : null);
|
|
3235
|
+
}
|
|
3236
|
+
var ModalContainer = styled__default(material.Dialog)(_templateObject$h || (_templateObject$h = _taggedTemplateLiteralLoose(["\n .MuiPaper-root {\n background: ", ";\n }\n"])), function (props) {
|
|
3237
|
+
return props.secondaryColor;
|
|
3238
|
+
});
|
|
3239
|
+
|
|
3240
|
+
var _templateObject$i, _templateObject2$a, _templateObject3$5, _templateObject4$4, _templateObject5$3, _templateObject6$2;
|
|
3241
|
+
var StoreDetails = function StoreDetails(_ref) {
|
|
3242
|
+
var _storeAddresses$filte;
|
|
3243
|
+
var apiEndPoint = _ref.apiEndPoint,
|
|
3244
|
+
token = _ref.token,
|
|
3245
|
+
primaryColor = _ref.primaryColor,
|
|
3146
3246
|
secondaryColor = _ref.secondaryColor,
|
|
3147
3247
|
backgroundColor = _ref.backgroundColor,
|
|
3148
3248
|
fontColor = _ref.fontColor,
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
}, storeDataList === null || storeDataList === void 0 ? void 0 : storeDataList.map(function (store) {
|
|
3155
|
-
return /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3156
|
-
item: true,
|
|
3157
|
-
sm: 12,
|
|
3158
|
-
md: 6,
|
|
3159
|
-
lg: 4
|
|
3160
|
-
}, /*#__PURE__*/React__default.createElement(StoreContainer, {
|
|
3161
|
-
primaryColor: primaryColor,
|
|
3162
|
-
secondaryColor: secondaryColor,
|
|
3163
|
-
backgroundColor: backgroundColor,
|
|
3164
|
-
fontColor: fontColor
|
|
3165
|
-
}, /*#__PURE__*/React__default.createElement(material.CardHeader, {
|
|
3166
|
-
title: /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3167
|
-
container: true,
|
|
3168
|
-
justifyContent: "space-between",
|
|
3169
|
-
alignItems: "center"
|
|
3170
|
-
}, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3171
|
-
item: true
|
|
3172
|
-
}, /*#__PURE__*/React__default.createElement("span", {
|
|
3173
|
-
style: {
|
|
3174
|
-
display: 'flex'
|
|
3175
|
-
}
|
|
3176
|
-
}, /*#__PURE__*/React__default.createElement(md.MdStore, {
|
|
3177
|
-
style: {
|
|
3178
|
-
margin: 'auto'
|
|
3179
|
-
}
|
|
3180
|
-
}), /*#__PURE__*/React__default.createElement("h3", null, store === null || store === void 0 ? void 0 : store.storeName))), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3181
|
-
item: true
|
|
3182
|
-
}, /*#__PURE__*/React__default.createElement(material.IconButton, {
|
|
3183
|
-
style: {
|
|
3184
|
-
color: primaryColor
|
|
3185
|
-
},
|
|
3186
|
-
onClick: function onClick() {
|
|
3187
|
-
setSelectedStore(store);
|
|
3188
|
-
}
|
|
3189
|
-
}, /*#__PURE__*/React__default.createElement(md.MdModeEdit, null))))
|
|
3190
|
-
}), /*#__PURE__*/React__default.createElement(material.CardContent, null, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("p", null, "Phone No: ", (store === null || store === void 0 ? void 0 : store.phone) || '-'), /*#__PURE__*/React__default.createElement("p", null, "Email: ", (store === null || store === void 0 ? void 0 : store.email) || '-')))));
|
|
3191
|
-
})));
|
|
3192
|
-
};
|
|
3193
|
-
var StoreContainer = styled__default(material.Card)(_templateObject$g || (_templateObject$g = _taggedTemplateLiteralLoose(["\n border-radius: 14px !important;\n background-color: ", " !important;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px 0px !important;\n .MuiCardHeader-root {\n background-color: ", ";\n padding: 4px 14px;\n svg,\n h3 {\n color: #fff;\n font-size: 1.3rem;\n }\n h3 {\n font-weight: 500;\n margin-left: 6px;\n }\n }\n p {\n font-size: 1.2rem;\n font-weight: 500;\n color: ", ";\n margin-bottom: 1rem;\n word-break: break-word;\n }\n"])), function (props) {
|
|
3194
|
-
return props.secondaryColor;
|
|
3195
|
-
}, function (props) {
|
|
3196
|
-
return props.primaryColor;
|
|
3197
|
-
}, function (props) {
|
|
3198
|
-
return props.fontColor;
|
|
3199
|
-
});
|
|
3200
|
-
|
|
3201
|
-
var _templateObject$h, _templateObject2$9;
|
|
3202
|
-
var FormCheckbox = function FormCheckbox(props) {
|
|
3203
|
-
var label = props.label,
|
|
3204
|
-
name = props.name,
|
|
3205
|
-
control = props.control,
|
|
3206
|
-
rules = props.rules,
|
|
3207
|
-
required = props.required,
|
|
3208
|
-
disabled = props.disabled,
|
|
3209
|
-
onChangeField = props.onChangeField;
|
|
3210
|
-
return /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
3211
|
-
name: name,
|
|
3212
|
-
control: control,
|
|
3213
|
-
rules: _extends({
|
|
3214
|
-
required: required ? 'This field is required' : false
|
|
3215
|
-
}, rules),
|
|
3216
|
-
render: function render(_ref) {
|
|
3217
|
-
var _ref$field = _ref.field,
|
|
3218
|
-
_onChange = _ref$field.onChange,
|
|
3219
|
-
value = _ref$field.value,
|
|
3220
|
-
error = _ref.fieldState.error;
|
|
3221
|
-
return /*#__PURE__*/React__default.createElement(material.FormControl, {
|
|
3222
|
-
fullWidth: true,
|
|
3223
|
-
required: required,
|
|
3224
|
-
margin: "normal",
|
|
3225
|
-
disabled: disabled
|
|
3226
|
-
}, /*#__PURE__*/React__default.createElement(FormControlLabelContainer, {
|
|
3227
|
-
label: label,
|
|
3228
|
-
fontColor: props.fontColor,
|
|
3229
|
-
control: /*#__PURE__*/React__default.createElement(CheckboxField, _extends({
|
|
3230
|
-
size: "small",
|
|
3231
|
-
onChange: function onChange(e) {
|
|
3232
|
-
_onChange(e.target.checked);
|
|
3233
|
-
onChangeField && onChangeField(e.target.checked);
|
|
3234
|
-
},
|
|
3235
|
-
checked: value
|
|
3236
|
-
}, props))
|
|
3237
|
-
}), /*#__PURE__*/React__default.createElement(material.FormHelperText, {
|
|
3238
|
-
error: error
|
|
3239
|
-
}, error !== null && error !== void 0 && error.message ? error.message : ''));
|
|
3240
|
-
}
|
|
3241
|
-
});
|
|
3242
|
-
};
|
|
3243
|
-
var CheckboxField = styled__default(material.Checkbox)(_templateObject$h || (_templateObject$h = _taggedTemplateLiteralLoose(["\n svg {\n color: ", " !important;\n }\n"])), function (props) {
|
|
3244
|
-
return props.primaryColor;
|
|
3245
|
-
});
|
|
3246
|
-
var FormControlLabelContainer = styled__default(material.FormControlLabel)(_templateObject2$9 || (_templateObject2$9 = _taggedTemplateLiteralLoose(["\n .MuiTypography-root {\n color: ", " !important;\n }\n"])), function (props) {
|
|
3247
|
-
return props.fontColor;
|
|
3248
|
-
});
|
|
3249
|
-
|
|
3250
|
-
var _templateObject$i;
|
|
3251
|
-
var AddEditAddress = function AddEditAddress(_ref) {
|
|
3252
|
-
var apiEndPoint = _ref.apiEndPoint,
|
|
3253
|
-
token = _ref.token,
|
|
3254
|
-
setOpenModal = _ref.setOpenModal,
|
|
3255
|
-
addressDetails = _ref.addressDetails,
|
|
3256
|
-
storeData = _ref.storeData,
|
|
3257
|
-
getStoreData = _ref.getStoreData,
|
|
3258
|
-
primaryColor = _ref.primaryColor,
|
|
3259
|
-
fontColor = _ref.fontColor;
|
|
3260
|
-
var _useState = React.useState(false),
|
|
3261
|
-
setIsLoading = _useState[1];
|
|
3262
|
-
var _useState2 = React.useState([]),
|
|
3263
|
-
country = _useState2[0],
|
|
3264
|
-
setCountry = _useState2[1];
|
|
3265
|
-
var _useState3 = React.useState([]),
|
|
3266
|
-
states = _useState3[0],
|
|
3267
|
-
setStates = _useState3[1];
|
|
3268
|
-
var _useState4 = React.useState(addressDetails),
|
|
3269
|
-
addressData = _useState4[0],
|
|
3270
|
-
setAddressData = _useState4[1];
|
|
3271
|
-
var _useForm = reactHookForm.useForm({
|
|
3272
|
-
defaultValues: _extends({}, addressDetails)
|
|
3273
|
-
}),
|
|
3274
|
-
handleSubmit = _useForm.handleSubmit,
|
|
3275
|
-
control = _useForm.control,
|
|
3276
|
-
setValue = _useForm.setValue;
|
|
3277
|
-
var getCountryData = function getCountryData() {
|
|
3278
|
-
try {
|
|
3279
|
-
var _temp = _catch(function () {
|
|
3280
|
-
return Promise.resolve(getCountry({
|
|
3281
|
-
apiEndPoint: apiEndPoint,
|
|
3282
|
-
token: token
|
|
3283
|
-
})).then(function (countryData) {
|
|
3284
|
-
setCountry(countryData);
|
|
3285
|
-
setValue('countryId', (addressDetails === null || addressDetails === void 0 ? void 0 : addressDetails.countryId) || countryData[0].id);
|
|
3286
|
-
var statesById = (addressDetails === null || addressDetails === void 0 ? void 0 : addressDetails.countryId) || countryData[0].id;
|
|
3287
|
-
return Promise.resolve(getStatesById({
|
|
3288
|
-
id: statesById,
|
|
3289
|
-
apiEndPoint: apiEndPoint,
|
|
3290
|
-
token: token
|
|
3291
|
-
})).then(function (statesData) {
|
|
3292
|
-
setStates(statesData);
|
|
3293
|
-
setValue('stateId', (addressDetails === null || addressDetails === void 0 ? void 0 : addressDetails.stateId) || statesData[0].id);
|
|
3294
|
-
});
|
|
3295
|
-
});
|
|
3296
|
-
}, function () {});
|
|
3297
|
-
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
3298
|
-
} catch (e) {
|
|
3299
|
-
return Promise.reject(e);
|
|
3300
|
-
}
|
|
3301
|
-
};
|
|
3302
|
-
React.useEffect(function () {
|
|
3303
|
-
(function () {
|
|
3304
|
-
return Promise.resolve(getCountryData()).then(function () {});
|
|
3305
|
-
})();
|
|
3306
|
-
}, []);
|
|
3307
|
-
var onUpdateCountry = function onUpdateCountry(data) {
|
|
3308
|
-
try {
|
|
3309
|
-
var _data$target;
|
|
3310
|
-
return Promise.resolve(getStatesById({
|
|
3311
|
-
id: data === null || data === void 0 ? void 0 : (_data$target = data.target) === null || _data$target === void 0 ? void 0 : _data$target.value,
|
|
3312
|
-
apiEndPoint: apiEndPoint,
|
|
3313
|
-
token: token
|
|
3314
|
-
})).then(function (statesData) {
|
|
3315
|
-
setStates(statesData);
|
|
3316
|
-
setValue('stateId', statesData[0].id);
|
|
3317
|
-
});
|
|
3318
|
-
} catch (e) {
|
|
3319
|
-
return Promise.reject(e);
|
|
3320
|
-
}
|
|
3321
|
-
};
|
|
3322
|
-
var updateAddressData = function updateAddressData(formData) {
|
|
3323
|
-
try {
|
|
3324
|
-
var _temp3 = function _temp3() {
|
|
3325
|
-
setIsLoading(false);
|
|
3326
|
-
};
|
|
3327
|
-
setIsLoading(true);
|
|
3328
|
-
var _temp2 = _catch(function () {
|
|
3329
|
-
return Promise.resolve(API$1({
|
|
3330
|
-
apiEndPoint: apiEndPoint,
|
|
3331
|
-
token: token,
|
|
3332
|
-
url: addressDetails ? "/ecommerce/customer/store/" + addressDetails.customerStoreId + "/address/" + addressDetails.id : "/ecommerce/customer/store/" + (storeData === null || storeData === void 0 ? void 0 : storeData.id) + "/address",
|
|
3333
|
-
body: _extends({}, addressData, formData),
|
|
3334
|
-
method: addressDetails ? 'PUT' : 'POST',
|
|
3335
|
-
errorMessage: 'Error in updating the address.',
|
|
3336
|
-
successMessage: 'Address updated successfully.'
|
|
3337
|
-
})).then(function (data) {
|
|
3338
|
-
setAddressData(data);
|
|
3339
|
-
setOpenModal({
|
|
3340
|
-
open: false
|
|
3341
|
-
});
|
|
3342
|
-
getStoreData();
|
|
3343
|
-
});
|
|
3344
|
-
}, function () {});
|
|
3345
|
-
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(_temp3) : _temp3(_temp2));
|
|
3346
|
-
} catch (e) {
|
|
3347
|
-
return Promise.reject(e);
|
|
3348
|
-
}
|
|
3349
|
-
};
|
|
3350
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("form", null, /*#__PURE__*/React__default.createElement(HeaderContainer$1, {
|
|
3351
|
-
fontColor: fontColor
|
|
3352
|
-
}, "Store Address"), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3353
|
-
container: true,
|
|
3354
|
-
columnSpacing: 2
|
|
3355
|
-
}, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3356
|
-
item: true,
|
|
3357
|
-
xs: 12,
|
|
3358
|
-
md: 6
|
|
3359
|
-
}, /*#__PURE__*/React__default.createElement(FormTextField, {
|
|
3360
|
-
label: "Address 1",
|
|
3361
|
-
name: "address1",
|
|
3362
|
-
multiline: true,
|
|
3363
|
-
rows: 3,
|
|
3364
|
-
required: true,
|
|
3365
|
-
control: control,
|
|
3366
|
-
fontColor: fontColor
|
|
3367
|
-
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3368
|
-
item: true,
|
|
3369
|
-
xs: 12,
|
|
3370
|
-
md: 6
|
|
3371
|
-
}, /*#__PURE__*/React__default.createElement(FormTextField, {
|
|
3372
|
-
label: "Address 2",
|
|
3373
|
-
name: "address2",
|
|
3374
|
-
rows: 3,
|
|
3375
|
-
multiline: true,
|
|
3376
|
-
control: control,
|
|
3377
|
-
fontColor: fontColor
|
|
3378
|
-
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3379
|
-
item: true,
|
|
3380
|
-
xs: 12,
|
|
3381
|
-
md: 6
|
|
3382
|
-
}, /*#__PURE__*/React__default.createElement(FormSelect, {
|
|
3383
|
-
label: "Country",
|
|
3384
|
-
name: "countryId",
|
|
3385
|
-
required: true,
|
|
3386
|
-
control: control,
|
|
3387
|
-
options: country,
|
|
3388
|
-
valueKey: "id",
|
|
3389
|
-
labelKey: "code",
|
|
3390
|
-
onChangeField: onUpdateCountry,
|
|
3391
|
-
fontColor: fontColor
|
|
3392
|
-
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3393
|
-
item: true,
|
|
3394
|
-
xs: 12,
|
|
3395
|
-
md: 6
|
|
3396
|
-
}, /*#__PURE__*/React__default.createElement(FormSelect, {
|
|
3397
|
-
label: "State",
|
|
3398
|
-
name: "stateId",
|
|
3399
|
-
required: true,
|
|
3400
|
-
control: control,
|
|
3401
|
-
options: states,
|
|
3402
|
-
valueKey: "id",
|
|
3403
|
-
labelKey: "name",
|
|
3404
|
-
fontColor: fontColor
|
|
3405
|
-
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3406
|
-
item: true,
|
|
3407
|
-
xs: 12,
|
|
3408
|
-
md: 6
|
|
3409
|
-
}, /*#__PURE__*/React__default.createElement(FormTextField, {
|
|
3410
|
-
label: "Zip",
|
|
3411
|
-
name: "zip",
|
|
3412
|
-
type: "number",
|
|
3413
|
-
required: true,
|
|
3414
|
-
control: control,
|
|
3415
|
-
fontColor: fontColor
|
|
3416
|
-
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3417
|
-
item: true,
|
|
3418
|
-
xs: 12,
|
|
3419
|
-
md: 6
|
|
3420
|
-
}, /*#__PURE__*/React__default.createElement(FormTextField, {
|
|
3421
|
-
label: "City",
|
|
3422
|
-
name: "city",
|
|
3423
|
-
required: true,
|
|
3424
|
-
control: control,
|
|
3425
|
-
fontColor: fontColor
|
|
3426
|
-
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3427
|
-
item: true,
|
|
3428
|
-
xs: 12,
|
|
3429
|
-
md: 12
|
|
3430
|
-
}, /*#__PURE__*/React__default.createElement(FormTextField, {
|
|
3431
|
-
label: "Phone",
|
|
3432
|
-
name: "phone",
|
|
3433
|
-
type: "number",
|
|
3434
|
-
control: control,
|
|
3435
|
-
fontColor: fontColor
|
|
3436
|
-
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3437
|
-
item: true,
|
|
3438
|
-
xs: 12,
|
|
3439
|
-
md: 6
|
|
3440
|
-
}, /*#__PURE__*/React__default.createElement(FormCheckbox, {
|
|
3441
|
-
label: "Default Billing Address",
|
|
3442
|
-
name: "defaultBillingAddress",
|
|
3443
|
-
control: control,
|
|
3444
|
-
primaryColor: primaryColor,
|
|
3445
|
-
fontColor: fontColor
|
|
3446
|
-
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3447
|
-
item: true,
|
|
3448
|
-
xs: 12,
|
|
3449
|
-
md: 6
|
|
3450
|
-
}, /*#__PURE__*/React__default.createElement(FormCheckbox, {
|
|
3451
|
-
label: "Default Shipping Address",
|
|
3452
|
-
name: "defaultShippingAddress",
|
|
3453
|
-
control: control,
|
|
3454
|
-
primaryColor: primaryColor,
|
|
3455
|
-
fontColor: fontColor
|
|
3456
|
-
}))), /*#__PURE__*/React__default.createElement(MuiButton, {
|
|
3457
|
-
variant: "contained",
|
|
3458
|
-
primaryColor: primaryColor,
|
|
3459
|
-
onClick: handleSubmit(updateAddressData)
|
|
3460
|
-
}, addressDetails ? 'Update Address' : 'Add Address')));
|
|
3461
|
-
};
|
|
3462
|
-
var HeaderContainer$1 = styled__default.h2(_templateObject$i || (_templateObject$i = _taggedTemplateLiteralLoose(["\n color: ", ";\n margin-top: 1rem;\n font-size: 1.3rem;\n font-weight: 500;\n"])), function (props) {
|
|
3463
|
-
return props.fontColor;
|
|
3464
|
-
});
|
|
3465
|
-
|
|
3466
|
-
var _templateObject$j;
|
|
3467
|
-
var _excluded$1 = ["children", "onClose", "fontColor"];
|
|
3468
|
-
var MuiModal = function MuiModal(props) {
|
|
3469
|
-
var fontColor = props.fontColor,
|
|
3470
|
-
children = props.children,
|
|
3471
|
-
onClose = props.onClose,
|
|
3472
|
-
title = props.title,
|
|
3473
|
-
secondaryColor = props.secondaryColor;
|
|
3474
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ModalContainer, _extends({}, props, {
|
|
3475
|
-
onClose: onClose,
|
|
3476
|
-
secondaryColor: secondaryColor
|
|
3477
|
-
}), /*#__PURE__*/React__default.createElement(BootstrapDialogTitle, {
|
|
3478
|
-
id: "customized-dialog-title",
|
|
3479
|
-
onClose: onClose,
|
|
3480
|
-
fontColor: fontColor
|
|
3481
|
-
}, title || 'Modal'), /*#__PURE__*/React__default.createElement(material.DialogContent, {
|
|
3482
|
-
dividers: true
|
|
3483
|
-
}, children)));
|
|
3484
|
-
};
|
|
3485
|
-
function BootstrapDialogTitle(props) {
|
|
3486
|
-
var children = props.children,
|
|
3487
|
-
onClose = props.onClose,
|
|
3488
|
-
fontColor = props.fontColor,
|
|
3489
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$1);
|
|
3490
|
-
return /*#__PURE__*/React__default.createElement(material.DialogTitle, _extends({
|
|
3491
|
-
sx: {
|
|
3492
|
-
m: 0,
|
|
3493
|
-
p: 2,
|
|
3494
|
-
color: fontColor
|
|
3495
|
-
}
|
|
3496
|
-
}, other), children, onClose ? /*#__PURE__*/React__default.createElement(material.IconButton, {
|
|
3497
|
-
"aria-label": "close",
|
|
3498
|
-
onClick: onClose,
|
|
3499
|
-
sx: {
|
|
3500
|
-
position: 'absolute',
|
|
3501
|
-
right: 8,
|
|
3502
|
-
top: 8,
|
|
3503
|
-
color: fontColor,
|
|
3504
|
-
'& svg': {
|
|
3505
|
-
fontSize: 20
|
|
3506
|
-
}
|
|
3507
|
-
}
|
|
3508
|
-
}, /*#__PURE__*/React__default.createElement(md.MdClose, null)) : null);
|
|
3509
|
-
}
|
|
3510
|
-
var ModalContainer = styled__default(material.Dialog)(_templateObject$j || (_templateObject$j = _taggedTemplateLiteralLoose(["\n .MuiPaper-root {\n background: ", ";\n }\n"])), function (props) {
|
|
3511
|
-
return props.secondaryColor;
|
|
3512
|
-
});
|
|
3513
|
-
|
|
3514
|
-
var _templateObject$k, _templateObject2$a, _templateObject3$5, _templateObject4$4, _templateObject5$3, _templateObject6$2;
|
|
3515
|
-
var StoreDetails = function StoreDetails(_ref) {
|
|
3516
|
-
var _storeAddresses$filte;
|
|
3517
|
-
var apiEndPoint = _ref.apiEndPoint,
|
|
3518
|
-
token = _ref.token,
|
|
3519
|
-
primaryColor = _ref.primaryColor,
|
|
3520
|
-
secondaryColor = _ref.secondaryColor,
|
|
3521
|
-
backgroundColor = _ref.backgroundColor,
|
|
3522
|
-
fontColor = _ref.fontColor,
|
|
3523
|
-
storeData = _ref.storeData;
|
|
3524
|
-
var _useState = React.useState(false),
|
|
3525
|
-
isLoading = _useState[0],
|
|
3526
|
-
setIsLoading = _useState[1];
|
|
3527
|
-
var _useState2 = React.useState(storeData),
|
|
3528
|
-
storeDetails = _useState2[0],
|
|
3529
|
-
setStoreDetails = _useState2[1];
|
|
3530
|
-
var _useState3 = React.useState([]),
|
|
3531
|
-
storeAddresses = _useState3[0],
|
|
3532
|
-
setStoreAddresses = _useState3[1];
|
|
3533
|
-
var _useState4 = React.useState({
|
|
3249
|
+
storeData = _ref.storeData,
|
|
3250
|
+
getAllStoreAddress = _ref.getAllStoreAddress,
|
|
3251
|
+
customer = _ref.customer;
|
|
3252
|
+
var storeAddresses = storeData;
|
|
3253
|
+
var _useState = React.useState({
|
|
3534
3254
|
open: false
|
|
3535
3255
|
}),
|
|
3536
|
-
openModal =
|
|
3537
|
-
setOpenModal =
|
|
3538
|
-
|
|
3539
|
-
defaultValues: _extends({}, storeDetails)
|
|
3540
|
-
}),
|
|
3541
|
-
handleSubmit = _useForm.handleSubmit,
|
|
3542
|
-
control = _useForm.control;
|
|
3543
|
-
var getStoreData = function getStoreData() {
|
|
3544
|
-
try {
|
|
3545
|
-
var _temp = _catch(function () {
|
|
3546
|
-
return Promise.resolve(API$1({
|
|
3547
|
-
apiEndPoint: apiEndPoint,
|
|
3548
|
-
token: token,
|
|
3549
|
-
url: "/ecommerce/customer/store/" + (storeData === null || storeData === void 0 ? void 0 : storeData.id) + "/address"
|
|
3550
|
-
})).then(function (data) {
|
|
3551
|
-
setStoreAddresses(data);
|
|
3552
|
-
});
|
|
3553
|
-
}, function () {});
|
|
3554
|
-
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
3555
|
-
} catch (e) {
|
|
3556
|
-
return Promise.reject(e);
|
|
3557
|
-
}
|
|
3558
|
-
};
|
|
3559
|
-
React.useEffect(function () {
|
|
3560
|
-
(function () {
|
|
3561
|
-
return Promise.resolve(getStoreData()).then(function () {});
|
|
3562
|
-
})();
|
|
3563
|
-
}, []);
|
|
3564
|
-
var updateStoreData = function updateStoreData(formData) {
|
|
3565
|
-
try {
|
|
3566
|
-
var _temp3 = function _temp3() {
|
|
3567
|
-
setIsLoading(false);
|
|
3568
|
-
};
|
|
3569
|
-
setIsLoading(true);
|
|
3570
|
-
var _temp2 = _catch(function () {
|
|
3571
|
-
return Promise.resolve(API$1({
|
|
3572
|
-
apiEndPoint: apiEndPoint,
|
|
3573
|
-
token: token,
|
|
3574
|
-
url: "/ecommerce/customer/store/" + storeData.id,
|
|
3575
|
-
body: _extends({}, storeDetails, formData),
|
|
3576
|
-
method: 'PUT',
|
|
3577
|
-
errorMessage: 'Error in updating the store.',
|
|
3578
|
-
successMessage: 'Store updated successfully.'
|
|
3579
|
-
})).then(function (response) {
|
|
3580
|
-
setStoreDetails(_extends({}, storeDetails, response));
|
|
3581
|
-
});
|
|
3582
|
-
}, function () {});
|
|
3583
|
-
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(_temp3) : _temp3(_temp2));
|
|
3584
|
-
} catch (e) {
|
|
3585
|
-
return Promise.reject(e);
|
|
3586
|
-
}
|
|
3587
|
-
};
|
|
3588
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(RootContainer$3, {
|
|
3589
|
-
secondaryColor: secondaryColor
|
|
3590
|
-
}, /*#__PURE__*/React__default.createElement(TypographyContainer$5, {
|
|
3591
|
-
fontColor: fontColor,
|
|
3592
|
-
style: {
|
|
3593
|
-
fontSize: '1.2rem'
|
|
3594
|
-
}
|
|
3595
|
-
}, "Update Store Details"), /*#__PURE__*/React__default.createElement("form", null, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3596
|
-
container: true,
|
|
3597
|
-
columnSpacing: 2
|
|
3598
|
-
}, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3599
|
-
item: true,
|
|
3600
|
-
xs: 12,
|
|
3601
|
-
md: 6
|
|
3602
|
-
}, /*#__PURE__*/React__default.createElement(FormTextField, {
|
|
3603
|
-
label: "Store Name",
|
|
3604
|
-
name: "storeName",
|
|
3605
|
-
required: true,
|
|
3606
|
-
control: control,
|
|
3607
|
-
fontColor: fontColor
|
|
3608
|
-
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3609
|
-
item: true,
|
|
3610
|
-
xs: 12,
|
|
3611
|
-
md: 6
|
|
3612
|
-
}, /*#__PURE__*/React__default.createElement(FormTextField, {
|
|
3613
|
-
label: "Email",
|
|
3614
|
-
name: "email",
|
|
3615
|
-
type: "email",
|
|
3616
|
-
control: control,
|
|
3617
|
-
fontColor: fontColor
|
|
3618
|
-
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3619
|
-
item: true,
|
|
3620
|
-
xs: 12,
|
|
3621
|
-
md: 6
|
|
3622
|
-
}, /*#__PURE__*/React__default.createElement(FormTextField, {
|
|
3623
|
-
label: "Phone",
|
|
3624
|
-
name: "phone",
|
|
3625
|
-
type: "number",
|
|
3626
|
-
control: control,
|
|
3627
|
-
fontColor: fontColor
|
|
3628
|
-
}))), /*#__PURE__*/React__default.createElement(MuiButton, {
|
|
3629
|
-
variant: "contained",
|
|
3630
|
-
loading: isLoading,
|
|
3631
|
-
primaryColor: primaryColor,
|
|
3632
|
-
onClick: handleSubmit(updateStoreData),
|
|
3633
|
-
style: {
|
|
3634
|
-
marginTop: 12
|
|
3635
|
-
}
|
|
3636
|
-
}, "Update Store Details"))), openModal.open && /*#__PURE__*/React__default.createElement(Modal, {
|
|
3256
|
+
openModal = _useState[0],
|
|
3257
|
+
setOpenModal = _useState[1];
|
|
3258
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, openModal.open && /*#__PURE__*/React__default.createElement(Modal, {
|
|
3637
3259
|
onClose: function onClose() {
|
|
3638
3260
|
return setOpenModal({
|
|
3639
3261
|
open: false
|
|
@@ -3650,13 +3272,13 @@ var StoreDetails = function StoreDetails(_ref) {
|
|
|
3650
3272
|
token: token,
|
|
3651
3273
|
setOpenModal: setOpenModal,
|
|
3652
3274
|
addressDetails: openModal === null || openModal === void 0 ? void 0 : openModal.addressDetails,
|
|
3653
|
-
|
|
3654
|
-
|
|
3275
|
+
customer: customer,
|
|
3276
|
+
getAllStoreAddress: getAllStoreAddress,
|
|
3655
3277
|
primaryColor: primaryColor,
|
|
3656
3278
|
secondaryColor: secondaryColor,
|
|
3657
3279
|
backgroundColor: backgroundColor,
|
|
3658
3280
|
fontColor: fontColor
|
|
3659
|
-
})), /*#__PURE__*/React__default.createElement(HeaderContainer$
|
|
3281
|
+
})), /*#__PURE__*/React__default.createElement(HeaderContainer$1, null, /*#__PURE__*/React__default.createElement(TypographyContainer$5, {
|
|
3660
3282
|
fontColor: fontColor,
|
|
3661
3283
|
style: {
|
|
3662
3284
|
fontSize: 22
|
|
@@ -3693,170 +3315,56 @@ var StoreDetails = function StoreDetails(_ref) {
|
|
|
3693
3315
|
}, /*#__PURE__*/React__default.createElement(material.CardHeader, {
|
|
3694
3316
|
title: /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3695
3317
|
container: true,
|
|
3696
|
-
justifyContent: "space-between",
|
|
3697
|
-
alignItems: "center"
|
|
3698
|
-
}, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3699
|
-
item: true
|
|
3700
|
-
}, /*#__PURE__*/React__default.createElement("span", {
|
|
3701
|
-
style: {
|
|
3702
|
-
display: 'flex'
|
|
3703
|
-
}
|
|
3704
|
-
}, /*#__PURE__*/React__default.createElement(md.MdStore, {
|
|
3705
|
-
style: {
|
|
3706
|
-
margin: 'auto'
|
|
3707
|
-
}
|
|
3708
|
-
}), /*#__PURE__*/React__default.createElement("h3", null, "Address " + (index + 1)))), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3709
|
-
item: true
|
|
3710
|
-
}, /*#__PURE__*/React__default.createElement(material.IconButton, {
|
|
3711
|
-
style: {
|
|
3712
|
-
color: primaryColor
|
|
3713
|
-
},
|
|
3714
|
-
onClick: function onClick() {
|
|
3715
|
-
setOpenModal({
|
|
3716
|
-
open: true,
|
|
3717
|
-
addressDetails: address
|
|
3718
|
-
});
|
|
3719
|
-
}
|
|
3720
|
-
}, /*#__PURE__*/React__default.createElement(md.MdModeEdit, null))))
|
|
3721
|
-
}), /*#__PURE__*/React__default.createElement(material.CardContent, null, /*#__PURE__*/React__default.createElement(AddressCardContainer, {
|
|
3722
|
-
primaryColor: primaryColor
|
|
3723
|
-
}, (address === null || address === void 0 ? void 0 : address.address1) && /*#__PURE__*/React__default.createElement("p", null, address === null || address === void 0 ? void 0 : address.address1), (address === null || address === void 0 ? void 0 : address.address2) && /*#__PURE__*/React__default.createElement("p", null, address === null || address === void 0 ? void 0 : address.address2), ((address === null || address === void 0 ? void 0 : address.city) || (address === null || address === void 0 ? void 0 : address.state)) && /*#__PURE__*/React__default.createElement("p", null, (address === null || address === void 0 ? void 0 : address.city) + (address === null || address === void 0 ? void 0 : address.state)), (address === null || address === void 0 ? void 0 : address.country) && /*#__PURE__*/React__default.createElement("p", null, address === null || address === void 0 ? void 0 : address.country), /*#__PURE__*/React__default.createElement("p", null, address === null || address === void 0 ? void 0 : address.phone), (address === null || address === void 0 ? void 0 : address.defaultBillingAddress) && /*#__PURE__*/React__default.createElement("p", null, /*#__PURE__*/React__default.createElement("span", null, "Default billing address")), (address === null || address === void 0 ? void 0 : address.defaultShippingAddress) && /*#__PURE__*/React__default.createElement("p", null, /*#__PURE__*/React__default.createElement("span", null, "Default shipping address"))))));
|
|
3724
|
-
})));
|
|
3725
|
-
};
|
|
3726
|
-
var RootContainer$3 = styled__default(material.Stack)(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose(["\n background-color: ", " !important;\n border-radius: 14px !important;\n padding: 1.3rem;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px 0px;\n"])), function (props) {
|
|
3727
|
-
return props.secondaryColor;
|
|
3728
|
-
});
|
|
3729
|
-
var AddressContainer = styled__default(material.Card)(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteralLoose(["\n border-radius: 14px !important;\n background-color: ", " !important;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px 0px !important;\n .MuiCardHeader-root {\n background-color: ", ";\n padding: 4px 14px;\n svg,\n h3 {\n color: #fff;\n font-size: 1.3rem;\n }\n h3 {\n font-weight: 500;\n margin-left: 6px;\n }\n }\n p {\n font-size: 0.9rem;\n font-weight: 400;\n color: ", ";\n margin-bottom: 1rem;\n word-break: break-word;\n }\n"])), function (props) {
|
|
3730
|
-
return props.secondaryColor;
|
|
3731
|
-
}, function (props) {
|
|
3732
|
-
return props.primaryColor;
|
|
3733
|
-
}, function (props) {
|
|
3734
|
-
return props.fontColor;
|
|
3735
|
-
});
|
|
3736
|
-
var Modal = styled__default(MuiModal)(_templateObject3$5 || (_templateObject3$5 = _taggedTemplateLiteralLoose([""])));
|
|
3737
|
-
var TypographyContainer$5 = styled__default(material.Typography)(_templateObject4$4 || (_templateObject4$4 = _taggedTemplateLiteralLoose(["\n color: ", ";\n display: flex;\n align-items: center;\n"])), function (props) {
|
|
3738
|
-
return props.fontColor;
|
|
3739
|
-
});
|
|
3740
|
-
var HeaderContainer$2 = styled__default.div(_templateObject5$3 || (_templateObject5$3 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 1.3rem 0;\n"])));
|
|
3741
|
-
var AddressCardContainer = styled__default.div(_templateObject6$2 || (_templateObject6$2 = _taggedTemplateLiteralLoose(["\n p {\n font-size: 1.1rem;\n margin-bottom: 0.3rem;\n span {\n color: ", ";\n font-size: 1.1rem;\n }\n }\n"])), function (props) {
|
|
3742
|
-
return props.primaryColor;
|
|
3743
|
-
});
|
|
3744
|
-
|
|
3745
|
-
var _templateObject$l, _templateObject2$b;
|
|
3746
|
-
var StoreManager = function StoreManager(_ref) {
|
|
3747
|
-
var _storeData$managerDet;
|
|
3748
|
-
var apiEndPoint = _ref.apiEndPoint,
|
|
3749
|
-
token = _ref.token,
|
|
3750
|
-
storeData = _ref.storeData,
|
|
3751
|
-
primaryColor = _ref.primaryColor,
|
|
3752
|
-
secondaryColor = _ref.secondaryColor,
|
|
3753
|
-
fontColor = _ref.fontColor;
|
|
3754
|
-
var _useState = React.useState(false),
|
|
3755
|
-
isLoading = _useState[0],
|
|
3756
|
-
setIsLoading = _useState[1];
|
|
3757
|
-
var _useState2 = React.useState(storeData === null || storeData === void 0 ? void 0 : storeData.managerDetails),
|
|
3758
|
-
managerData = _useState2[0],
|
|
3759
|
-
setManagerData = _useState2[1];
|
|
3760
|
-
var managerId = storeData === null || storeData === void 0 ? void 0 : (_storeData$managerDet = storeData.managerDetails) === null || _storeData$managerDet === void 0 ? void 0 : _storeData$managerDet.customerId;
|
|
3761
|
-
var updateManager = function updateManager(formData) {
|
|
3762
|
-
try {
|
|
3763
|
-
var _temp2 = function _temp2() {
|
|
3764
|
-
setIsLoading(false);
|
|
3765
|
-
};
|
|
3766
|
-
setIsLoading(true);
|
|
3767
|
-
var _temp = _catch(function () {
|
|
3768
|
-
return Promise.resolve(API$1({
|
|
3769
|
-
apiEndPoint: apiEndPoint,
|
|
3770
|
-
token: token,
|
|
3771
|
-
url: managerId ? "ecommerce/customer/store/" + (storeData === null || storeData === void 0 ? void 0 : storeData.id) + "/manager/" + managerId : "ecommerce/customer/store/" + (storeData === null || storeData === void 0 ? void 0 : storeData.id) + "/manager",
|
|
3772
|
-
body: _extends({}, managerData, formData),
|
|
3773
|
-
method: managerId ? 'PUT' : 'POST',
|
|
3774
|
-
errorMessage: 'Error in updating the manager details.',
|
|
3775
|
-
successMessage: 'Manager details updated successfully.'
|
|
3776
|
-
})).then(function (response) {
|
|
3777
|
-
setManagerData(_extends({}, managerData, response));
|
|
3778
|
-
});
|
|
3779
|
-
}, function () {});
|
|
3780
|
-
return Promise.resolve(_temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp));
|
|
3781
|
-
} catch (e) {
|
|
3782
|
-
return Promise.reject(e);
|
|
3783
|
-
}
|
|
3784
|
-
};
|
|
3785
|
-
var _useForm = reactHookForm.useForm({
|
|
3786
|
-
defaultValues: _extends({}, storeData === null || storeData === void 0 ? void 0 : storeData.managerDetails)
|
|
3787
|
-
}),
|
|
3788
|
-
handleSubmit = _useForm.handleSubmit,
|
|
3789
|
-
control = _useForm.control;
|
|
3790
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(RootContainer$4, {
|
|
3791
|
-
secondaryColor: secondaryColor
|
|
3792
|
-
}, /*#__PURE__*/React__default.createElement(TypographyContainer$6, {
|
|
3793
|
-
fontColor: fontColor,
|
|
3794
|
-
style: {
|
|
3795
|
-
fontSize: '1.2rem'
|
|
3796
|
-
}
|
|
3797
|
-
}, "Update Manager Details"), /*#__PURE__*/React__default.createElement("form", null, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3798
|
-
container: true,
|
|
3799
|
-
columnSpacing: 2
|
|
3800
|
-
}, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3801
|
-
item: true,
|
|
3802
|
-
xs: 12,
|
|
3803
|
-
md: 6
|
|
3804
|
-
}, /*#__PURE__*/React__default.createElement(FormTextField, {
|
|
3805
|
-
label: "First Name",
|
|
3806
|
-
name: "firstName",
|
|
3807
|
-
required: true,
|
|
3808
|
-
control: control,
|
|
3809
|
-
fontColor: fontColor
|
|
3810
|
-
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3811
|
-
item: true,
|
|
3812
|
-
xs: 12,
|
|
3813
|
-
md: 6
|
|
3814
|
-
}, /*#__PURE__*/React__default.createElement(FormTextField, {
|
|
3815
|
-
label: "Last Name",
|
|
3816
|
-
name: "lastName",
|
|
3817
|
-
required: true,
|
|
3818
|
-
control: control,
|
|
3819
|
-
fontColor: fontColor
|
|
3820
|
-
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3821
|
-
item: true,
|
|
3822
|
-
xs: 12,
|
|
3823
|
-
md: 6
|
|
3824
|
-
}, /*#__PURE__*/React__default.createElement(FormTextField, {
|
|
3825
|
-
label: "Email",
|
|
3826
|
-
name: "email",
|
|
3827
|
-
type: "email",
|
|
3828
|
-
required: true,
|
|
3829
|
-
control: control,
|
|
3830
|
-
fontColor: fontColor
|
|
3831
|
-
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3832
|
-
item: true,
|
|
3833
|
-
xs: 12,
|
|
3834
|
-
md: 6
|
|
3835
|
-
}, /*#__PURE__*/React__default.createElement(FormTextField, {
|
|
3836
|
-
label: "Phone",
|
|
3837
|
-
name: "phone",
|
|
3838
|
-
type: "number",
|
|
3839
|
-
required: true,
|
|
3840
|
-
control: control,
|
|
3841
|
-
fontColor: fontColor
|
|
3842
|
-
}))), /*#__PURE__*/React__default.createElement(MuiButton, {
|
|
3843
|
-
variant: "contained",
|
|
3844
|
-
loading: isLoading,
|
|
3845
|
-
onClick: handleSubmit(updateManager),
|
|
3846
|
-
primaryColor: primaryColor,
|
|
3847
|
-
style: {
|
|
3848
|
-
marginTop: 12
|
|
3849
|
-
}
|
|
3850
|
-
}, managerId ? 'Update Manager' : 'Add Manager'))));
|
|
3318
|
+
justifyContent: "space-between",
|
|
3319
|
+
alignItems: "center"
|
|
3320
|
+
}, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3321
|
+
item: true
|
|
3322
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
3323
|
+
style: {
|
|
3324
|
+
display: 'flex'
|
|
3325
|
+
}
|
|
3326
|
+
}, /*#__PURE__*/React__default.createElement(md.MdStore, {
|
|
3327
|
+
style: {
|
|
3328
|
+
margin: 'auto'
|
|
3329
|
+
}
|
|
3330
|
+
}), /*#__PURE__*/React__default.createElement("h3", null, "Address " + (index + 1)))), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3331
|
+
item: true
|
|
3332
|
+
}, /*#__PURE__*/React__default.createElement(material.IconButton, {
|
|
3333
|
+
style: {
|
|
3334
|
+
color: primaryColor
|
|
3335
|
+
},
|
|
3336
|
+
onClick: function onClick() {
|
|
3337
|
+
setOpenModal({
|
|
3338
|
+
open: true,
|
|
3339
|
+
addressDetails: address
|
|
3340
|
+
});
|
|
3341
|
+
}
|
|
3342
|
+
}, /*#__PURE__*/React__default.createElement(md.MdModeEdit, null))))
|
|
3343
|
+
}), /*#__PURE__*/React__default.createElement(material.CardContent, null, /*#__PURE__*/React__default.createElement(AddressCardContainer, {
|
|
3344
|
+
primaryColor: primaryColor
|
|
3345
|
+
}, (address === null || address === void 0 ? void 0 : address.address1) && /*#__PURE__*/React__default.createElement("p", null, address === null || address === void 0 ? void 0 : address.address1), (address === null || address === void 0 ? void 0 : address.address2) && /*#__PURE__*/React__default.createElement("p", null, address === null || address === void 0 ? void 0 : address.address2), ((address === null || address === void 0 ? void 0 : address.city) || (address === null || address === void 0 ? void 0 : address.state)) && /*#__PURE__*/React__default.createElement("p", null, (address === null || address === void 0 ? void 0 : address.city) + (address === null || address === void 0 ? void 0 : address.state)), (address === null || address === void 0 ? void 0 : address.country) && /*#__PURE__*/React__default.createElement("p", null, address === null || address === void 0 ? void 0 : address.country), /*#__PURE__*/React__default.createElement("p", null, address === null || address === void 0 ? void 0 : address.phone), (address === null || address === void 0 ? void 0 : address.defaultBillingAddress) && /*#__PURE__*/React__default.createElement("p", null, /*#__PURE__*/React__default.createElement("span", null, "Default billing address")), (address === null || address === void 0 ? void 0 : address.defaultShippingAddress) && /*#__PURE__*/React__default.createElement("p", null, /*#__PURE__*/React__default.createElement("span", null, "Default shipping address"))))));
|
|
3346
|
+
})));
|
|
3851
3347
|
};
|
|
3852
|
-
var RootContainer$
|
|
3348
|
+
var RootContainer$3 = styled__default(material.Stack)(_templateObject$i || (_templateObject$i = _taggedTemplateLiteralLoose(["\n background-color: ", " !important;\n border-radius: 14px !important;\n padding: 1.3rem;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px 0px;\n"])), function (props) {
|
|
3349
|
+
return props.secondaryColor;
|
|
3350
|
+
});
|
|
3351
|
+
var AddressContainer = styled__default(material.Card)(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteralLoose(["\n border-radius: 14px !important;\n background-color: ", " !important;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px 0px !important;\n .MuiCardHeader-root {\n background-color: ", ";\n padding: 4px 14px;\n svg,\n h3 {\n color: #fff;\n font-size: 1.3rem;\n }\n h3 {\n font-weight: 500;\n margin-left: 6px;\n }\n }\n p {\n font-size: 0.9rem;\n font-weight: 400;\n color: ", ";\n margin-bottom: 1rem;\n word-break: break-word;\n }\n"])), function (props) {
|
|
3853
3352
|
return props.secondaryColor;
|
|
3353
|
+
}, function (props) {
|
|
3354
|
+
return props.primaryColor;
|
|
3355
|
+
}, function (props) {
|
|
3356
|
+
return props.fontColor;
|
|
3854
3357
|
});
|
|
3855
|
-
var
|
|
3358
|
+
var Modal = styled__default(MuiModal)(_templateObject3$5 || (_templateObject3$5 = _taggedTemplateLiteralLoose([""])));
|
|
3359
|
+
var TypographyContainer$5 = styled__default(material.Typography)(_templateObject4$4 || (_templateObject4$4 = _taggedTemplateLiteralLoose(["\n color: ", ";\n display: flex;\n align-items: center;\n"])), function (props) {
|
|
3856
3360
|
return props.fontColor;
|
|
3857
3361
|
});
|
|
3362
|
+
var HeaderContainer$1 = styled__default.div(_templateObject5$3 || (_templateObject5$3 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 1.3rem 0;\n"])));
|
|
3363
|
+
var AddressCardContainer = styled__default.div(_templateObject6$2 || (_templateObject6$2 = _taggedTemplateLiteralLoose(["\n p {\n font-size: 1.1rem;\n margin-bottom: 0.3rem;\n span {\n color: ", ";\n font-size: 1.1rem;\n }\n }\n"])), function (props) {
|
|
3364
|
+
return props.primaryColor;
|
|
3365
|
+
});
|
|
3858
3366
|
|
|
3859
|
-
var _templateObject$
|
|
3367
|
+
var _templateObject$j;
|
|
3860
3368
|
var _excluded$2 = ["children", "value", "index"];
|
|
3861
3369
|
function TabPanel(props) {
|
|
3862
3370
|
var children = props.children,
|
|
@@ -3883,7 +3391,7 @@ function a11yProps(index) {
|
|
|
3883
3391
|
var StoreTabs = function StoreTabs(_ref) {
|
|
3884
3392
|
var apiEndPoint = _ref.apiEndPoint,
|
|
3885
3393
|
token = _ref.token,
|
|
3886
|
-
|
|
3394
|
+
customer = _ref.customer,
|
|
3887
3395
|
primaryColor = _ref.primaryColor,
|
|
3888
3396
|
secondaryColor = _ref.secondaryColor,
|
|
3889
3397
|
backgroundColor = _ref.backgroundColor,
|
|
@@ -3900,22 +3408,35 @@ var StoreTabs = function StoreTabs(_ref) {
|
|
|
3900
3408
|
React.useEffect(function () {
|
|
3901
3409
|
(function () {
|
|
3902
3410
|
try {
|
|
3903
|
-
var _temp =
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
errorMessage: 'Error in getting store data.'
|
|
3909
|
-
})).then(function (data) {
|
|
3910
|
-
setStoreData(data);
|
|
3911
|
-
});
|
|
3912
|
-
}, function () {});
|
|
3411
|
+
var _temp = function (_customer$customerDto) {
|
|
3412
|
+
if (customer !== null && customer !== void 0 && (_customer$customerDto = customer.customerDto) !== null && _customer$customerDto !== void 0 && _customer$customerDto.id) {
|
|
3413
|
+
return Promise.resolve(getAllStoreAddress()).then(function () {});
|
|
3414
|
+
}
|
|
3415
|
+
}();
|
|
3913
3416
|
return _temp && _temp.then ? _temp.then(function () {}) : void 0;
|
|
3914
3417
|
} catch (e) {
|
|
3915
3418
|
Promise.reject(e);
|
|
3916
3419
|
}
|
|
3917
3420
|
})();
|
|
3918
|
-
}, []);
|
|
3421
|
+
}, [customer]);
|
|
3422
|
+
var getAllStoreAddress = function getAllStoreAddress() {
|
|
3423
|
+
try {
|
|
3424
|
+
var _temp2 = _catch(function () {
|
|
3425
|
+
var _customer$customerDto2;
|
|
3426
|
+
return Promise.resolve(API$1({
|
|
3427
|
+
apiEndPoint: apiEndPoint,
|
|
3428
|
+
token: token,
|
|
3429
|
+
url: "/ecommerce/customer/" + (customer === null || customer === void 0 ? void 0 : (_customer$customerDto2 = customer.customerDto) === null || _customer$customerDto2 === void 0 ? void 0 : _customer$customerDto2.id) + "/address",
|
|
3430
|
+
errorMessage: 'Error in getting store data.'
|
|
3431
|
+
})).then(function (data) {
|
|
3432
|
+
setStoreData(data);
|
|
3433
|
+
});
|
|
3434
|
+
}, function () {});
|
|
3435
|
+
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
|
|
3436
|
+
} catch (e) {
|
|
3437
|
+
return Promise.reject(e);
|
|
3438
|
+
}
|
|
3439
|
+
};
|
|
3919
3440
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(material.Box, {
|
|
3920
3441
|
sx: {
|
|
3921
3442
|
width: '100%'
|
|
@@ -3933,9 +3454,7 @@ var StoreTabs = function StoreTabs(_ref) {
|
|
|
3933
3454
|
fontColor: fontColor
|
|
3934
3455
|
}, /*#__PURE__*/React__default.createElement(material.Tab, _extends({
|
|
3935
3456
|
label: "Store Details"
|
|
3936
|
-
}, a11yProps(0))), /*#__PURE__*/React__default.createElement(
|
|
3937
|
-
label: "Store Manager"
|
|
3938
|
-
}, a11yProps(1))))), storeData && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(TabPanel, {
|
|
3457
|
+
}, a11yProps(0))))), storeData && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(TabPanel, {
|
|
3939
3458
|
value: value,
|
|
3940
3459
|
index: 0
|
|
3941
3460
|
}, /*#__PURE__*/React__default.createElement(StoreDetails, {
|
|
@@ -3945,21 +3464,12 @@ var StoreTabs = function StoreTabs(_ref) {
|
|
|
3945
3464
|
primaryColor: primaryColor,
|
|
3946
3465
|
secondaryColor: secondaryColor,
|
|
3947
3466
|
backgroundColor: backgroundColor,
|
|
3948
|
-
fontColor: fontColor
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
index: 1
|
|
3952
|
-
}, /*#__PURE__*/React__default.createElement(StoreManager, {
|
|
3953
|
-
apiEndPoint: apiEndPoint,
|
|
3954
|
-
token: token,
|
|
3955
|
-
storeData: storeData,
|
|
3956
|
-
primaryColor: primaryColor,
|
|
3957
|
-
secondaryColor: secondaryColor,
|
|
3958
|
-
backgroundColor: backgroundColor,
|
|
3959
|
-
fontColor: fontColor
|
|
3467
|
+
fontColor: fontColor,
|
|
3468
|
+
getAllStoreAddress: getAllStoreAddress,
|
|
3469
|
+
customer: customer
|
|
3960
3470
|
})))));
|
|
3961
3471
|
};
|
|
3962
|
-
var TabsContainer = styled__default(material.Tabs)(_templateObject$
|
|
3472
|
+
var TabsContainer = styled__default(material.Tabs)(_templateObject$j || (_templateObject$j = _taggedTemplateLiteralLoose(["\n button {\n color: ", " !important;\n font-size: 1.1rem;\n }\n .Mui-selected {\n color: ", " !important;\n }\n .MuiTabs-indicator {\n background-color: ", " !important;\n }\n"])), function (props) {
|
|
3963
3473
|
return props.fontColor;
|
|
3964
3474
|
}, function (props) {
|
|
3965
3475
|
return props.primaryColor;
|
|
@@ -3967,7 +3477,7 @@ var TabsContainer = styled__default(material.Tabs)(_templateObject$m || (_templa
|
|
|
3967
3477
|
return props.primaryColor;
|
|
3968
3478
|
});
|
|
3969
3479
|
|
|
3970
|
-
var _templateObject$
|
|
3480
|
+
var _templateObject$k, _templateObject2$b, _templateObject3$6;
|
|
3971
3481
|
var StoreList = function StoreList(_ref) {
|
|
3972
3482
|
var apiEndPoint = _ref.apiEndPoint,
|
|
3973
3483
|
token = _ref.token,
|
|
@@ -3975,114 +3485,47 @@ var StoreList = function StoreList(_ref) {
|
|
|
3975
3485
|
secondaryColor = _ref.secondaryColor,
|
|
3976
3486
|
backgroundColor = _ref.backgroundColor,
|
|
3977
3487
|
fontColor = _ref.fontColor;
|
|
3978
|
-
var _useState = React.useState(
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
selectedStore = _useState2[0],
|
|
3983
|
-
setSelectedStore = _useState2[1];
|
|
3984
|
-
var _useState3 = React.useState(),
|
|
3985
|
-
storeDataList = _useState3[0],
|
|
3986
|
-
setStoreDataList = _useState3[1];
|
|
3987
|
-
var getStoreDataList = function getStoreDataList() {
|
|
3488
|
+
var _useState = React.useState(),
|
|
3489
|
+
customer = _useState[0],
|
|
3490
|
+
setCustomer = _useState[1];
|
|
3491
|
+
React.useEffect(function () {
|
|
3988
3492
|
try {
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
});
|
|
3998
|
-
}, function () {});
|
|
3999
|
-
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
3493
|
+
return Promise.resolve(API$1({
|
|
3494
|
+
apiEndPoint: apiEndPoint,
|
|
3495
|
+
token: token,
|
|
3496
|
+
url: "/ecommerce/customer",
|
|
3497
|
+
errorMessage: 'Error in getting user profile data.'
|
|
3498
|
+
})).then(function (data) {
|
|
3499
|
+
setCustomer(data);
|
|
3500
|
+
});
|
|
4000
3501
|
} catch (e) {
|
|
4001
|
-
|
|
3502
|
+
Promise.reject(e);
|
|
4002
3503
|
}
|
|
4003
|
-
};
|
|
4004
|
-
|
|
4005
|
-
(function () {
|
|
4006
|
-
return Promise.resolve(getStoreDataList()).then(function () {});
|
|
4007
|
-
})();
|
|
4008
|
-
}, []);
|
|
4009
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, openModal && /*#__PURE__*/React__default.createElement(Modal$1, {
|
|
4010
|
-
onClose: function onClose() {
|
|
4011
|
-
return setOpenModal(false);
|
|
4012
|
-
},
|
|
4013
|
-
"aria-labelledby": "customized-dialog-title",
|
|
4014
|
-
open: openModal,
|
|
4015
|
-
title: "Add Store",
|
|
4016
|
-
maxWidth: "lg",
|
|
4017
|
-
fontColor: fontColor,
|
|
4018
|
-
secondaryColor: secondaryColor
|
|
4019
|
-
}, /*#__PURE__*/React__default.createElement(AddStore, {
|
|
4020
|
-
apiEndPoint: apiEndPoint,
|
|
4021
|
-
token: token,
|
|
4022
|
-
setOpenModal: setOpenModal,
|
|
4023
|
-
getStoreDataList: getStoreDataList,
|
|
4024
|
-
primaryColor: primaryColor,
|
|
4025
|
-
secondaryColor: secondaryColor,
|
|
4026
|
-
backgroundColor: backgroundColor,
|
|
4027
|
-
fontColor: fontColor
|
|
4028
|
-
})), /*#__PURE__*/React__default.createElement(StoreHeader, null, /*#__PURE__*/React__default.createElement("span", {
|
|
3504
|
+
}, [token]);
|
|
3505
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(StoreHeader, null, /*#__PURE__*/React__default.createElement("span", {
|
|
4029
3506
|
className: "manageStore"
|
|
4030
|
-
},
|
|
4031
|
-
variant: "text",
|
|
4032
|
-
onClick: function onClick() {
|
|
4033
|
-
setSelectedStore(null);
|
|
4034
|
-
},
|
|
4035
|
-
style: {
|
|
4036
|
-
color: fontColor,
|
|
4037
|
-
marginRight: 6
|
|
4038
|
-
}
|
|
4039
|
-
}, /*#__PURE__*/React__default.createElement(md.MdKeyboardArrowLeft, {
|
|
4040
|
-
style: {
|
|
4041
|
-
fontSize: 24,
|
|
4042
|
-
color: fontColor
|
|
4043
|
-
}
|
|
4044
|
-
}), /*#__PURE__*/React__default.createElement("span", null, "Back")), /*#__PURE__*/React__default.createElement(TypographyContainer$7, {
|
|
3507
|
+
}, /*#__PURE__*/React__default.createElement(TypographyContainer$6, {
|
|
4045
3508
|
fontColor: fontColor,
|
|
4046
3509
|
style: {
|
|
4047
3510
|
fontSize: 22
|
|
4048
3511
|
}
|
|
4049
|
-
}, "Manage Store")),
|
|
4050
|
-
variant: "contained",
|
|
4051
|
-
primaryColor: primaryColor,
|
|
4052
|
-
onClick: function onClick() {
|
|
4053
|
-
return setOpenModal(true);
|
|
4054
|
-
}
|
|
4055
|
-
}, /*#__PURE__*/React__default.createElement(md.MdAdd, {
|
|
4056
|
-
style: {
|
|
4057
|
-
marginRight: 4,
|
|
4058
|
-
fontSize: 15
|
|
4059
|
-
}
|
|
4060
|
-
}), "Add Store")), selectedStore ? /*#__PURE__*/React__default.createElement(StoreTabs, {
|
|
4061
|
-
apiEndPoint: apiEndPoint,
|
|
4062
|
-
token: token,
|
|
4063
|
-
primaryColor: primaryColor,
|
|
4064
|
-
secondaryColor: secondaryColor,
|
|
4065
|
-
backgroundColor: backgroundColor,
|
|
4066
|
-
fontColor: fontColor,
|
|
4067
|
-
selectedStore: selectedStore
|
|
4068
|
-
}) : /*#__PURE__*/React__default.createElement(ViewStoreList, {
|
|
3512
|
+
}, "Manage Store"))), /*#__PURE__*/React__default.createElement(StoreTabs, {
|
|
4069
3513
|
apiEndPoint: apiEndPoint,
|
|
4070
3514
|
token: token,
|
|
4071
3515
|
primaryColor: primaryColor,
|
|
4072
3516
|
secondaryColor: secondaryColor,
|
|
4073
3517
|
backgroundColor: backgroundColor,
|
|
4074
3518
|
fontColor: fontColor,
|
|
4075
|
-
|
|
4076
|
-
storeDataList: storeDataList
|
|
3519
|
+
customer: customer
|
|
4077
3520
|
}));
|
|
4078
3521
|
};
|
|
4079
|
-
var Modal$1 = styled__default(MuiModal)(_templateObject$
|
|
4080
|
-
var StoreHeader = styled__default.div(_templateObject2$
|
|
4081
|
-
var TypographyContainer$
|
|
3522
|
+
var Modal$1 = styled__default(MuiModal)(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose([""])));
|
|
3523
|
+
var StoreHeader = styled__default.div(_templateObject2$b || (_templateObject2$b = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 1rem 0;\n .manageStore {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n"])));
|
|
3524
|
+
var TypographyContainer$6 = styled__default(material.Typography)(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteralLoose(["\n color: ", ";\n display: flex;\n align-items: center;\n"])), function (props) {
|
|
4082
3525
|
return props.fontColor;
|
|
4083
3526
|
});
|
|
4084
3527
|
|
|
4085
|
-
var _templateObject$
|
|
3528
|
+
var _templateObject$l, _templateObject2$c, _templateObject3$7, _templateObject4$5;
|
|
4086
3529
|
var AccountDetails = function AccountDetails(_ref) {
|
|
4087
3530
|
var _storeData$map, _storeData$find, _storeData$;
|
|
4088
3531
|
var _ref$apiEndPoint = _ref.apiEndPoint,
|
|
@@ -4271,7 +3714,7 @@ var AccountDetails = function AccountDetails(_ref) {
|
|
|
4271
3714
|
defaultStoreId: defaultStoreId
|
|
4272
3715
|
});
|
|
4273
3716
|
default:
|
|
4274
|
-
return /*#__PURE__*/React__default.createElement(TypographyContainer$
|
|
3717
|
+
return /*#__PURE__*/React__default.createElement(TypographyContainer$7, {
|
|
4275
3718
|
fontColor: colors.fontColor
|
|
4276
3719
|
}, "Empty");
|
|
4277
3720
|
}
|
|
@@ -4335,7 +3778,7 @@ var AccountDetails = function AccountDetails(_ref) {
|
|
|
4335
3778
|
color: colors.fontColor
|
|
4336
3779
|
}
|
|
4337
3780
|
}
|
|
4338
|
-
}, open ? /*#__PURE__*/React__default.createElement(md.MdOutlineMenuOpen, null) : /*#__PURE__*/React__default.createElement(md.MdMenu, null)), /*#__PURE__*/React__default.createElement(TypographyContainer$
|
|
3781
|
+
}, open ? /*#__PURE__*/React__default.createElement(md.MdOutlineMenuOpen, null) : /*#__PURE__*/React__default.createElement(md.MdMenu, null)), /*#__PURE__*/React__default.createElement(TypographyContainer$7, {
|
|
4339
3782
|
variant: "h6",
|
|
4340
3783
|
noWrap: true,
|
|
4341
3784
|
component: "div",
|
|
@@ -4360,14 +3803,14 @@ var AccountDetails = function AccountDetails(_ref) {
|
|
|
4360
3803
|
}
|
|
4361
3804
|
}, isNightMode ? /*#__PURE__*/React__default.createElement(md.MdDarkMode, null) : /*#__PURE__*/React__default.createElement(md.MdOutlineDarkMode, null)))), /*#__PURE__*/React__default.createElement("div", null, apiEndPoint && token && renderListItemComponent()))))));
|
|
4362
3805
|
};
|
|
4363
|
-
var Root$5 = styled__default(material.Box)(_templateObject$
|
|
3806
|
+
var Root$5 = styled__default(material.Box)(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose(["\n // background-image: url(", ");\n // background-position: center;\n // background-repeat: no-repeat;\n // background-size: cover;\n padding: 1.4rem;\n background-color: ", ";\n"])), function (props) {
|
|
4364
3807
|
var _props$theme;
|
|
4365
3808
|
return (_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.backgroundImage;
|
|
4366
3809
|
}, function (props) {
|
|
4367
3810
|
var _props$theme2, _props$theme3, _props$theme4;
|
|
4368
3811
|
return (_props$theme2 = props.theme) !== null && _props$theme2 !== void 0 && _props$theme2.isNightMode ? (_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.secondaryColor : "rgba(" + hexToRgbA((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.primaryColor) + ",0.1)";
|
|
4369
3812
|
});
|
|
4370
|
-
var MainContainer = styled__default.div(_templateObject2$
|
|
3813
|
+
var MainContainer = styled__default.div(_templateObject2$c || (_templateObject2$c = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n margin: auto;\n min-height: 100vh;\n background-color: ", ";\n max-width: ", ";\n padding: 2rem;\n border-radius: 14px;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px 0px;\n"])), function (props) {
|
|
4371
3814
|
return props.backgroundColor;
|
|
4372
3815
|
}, function (props) {
|
|
4373
3816
|
return props.open ? '1800px' : '1600px';
|
|
@@ -4407,7 +3850,7 @@ var ContainerDrawer = styled__default(material.Drawer)(_templateObject3$7 || (_t
|
|
|
4407
3850
|
}, function (props) {
|
|
4408
3851
|
return props.primaryColor || transparent;
|
|
4409
3852
|
});
|
|
4410
|
-
var TypographyContainer$
|
|
3853
|
+
var TypographyContainer$7 = styled__default(material.Typography)(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteralLoose(["\n color: ", ";\n display: flex;\n align-items: center;\n"])), function (props) {
|
|
4411
3854
|
return props.fontColor;
|
|
4412
3855
|
});
|
|
4413
3856
|
|
|
@@ -4488,7 +3931,7 @@ var AsyncDataLoad = function AsyncDataLoad(_ref) {
|
|
|
4488
3931
|
};
|
|
4489
3932
|
var AsyncDataLoadComponent = React.memo(AsyncDataLoad);
|
|
4490
3933
|
|
|
4491
|
-
var _templateObject$
|
|
3934
|
+
var _templateObject$m, _templateObject2$d, _templateObject3$8, _templateObject4$6, _templateObject5$4, _templateObject6$3, _templateObject7$2, _templateObject8$2;
|
|
4492
3935
|
var BrandStock = function BrandStock(_ref) {
|
|
4493
3936
|
var _Object$keys, _Object$keys2, _data$brands;
|
|
4494
3937
|
var storeData = _ref.storeData,
|
|
@@ -4638,8 +4081,8 @@ var BrandStock = function BrandStock(_ref) {
|
|
|
4638
4081
|
}));
|
|
4639
4082
|
})), (data === null || data === void 0 ? void 0 : data.returnPolicy) && /*#__PURE__*/React__default.createElement(ReturnPolicyContainer, null, /*#__PURE__*/React__default.createElement("h2", null, "Return Policy"), data === null || data === void 0 ? void 0 : data.returnPolicy))));
|
|
4640
4083
|
};
|
|
4641
|
-
var Root$6 = styled__default.div(_templateObject$
|
|
4642
|
-
var TitleContainer$1 = styled__default.div(_templateObject2$
|
|
4084
|
+
var Root$6 = styled__default.div(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["\n padding: 1rem;\n"])));
|
|
4085
|
+
var TitleContainer$1 = styled__default.div(_templateObject2$d || (_templateObject2$d = _taggedTemplateLiteralLoose(["\n padding: 0 1rem;\n display: flex;\n justify-content: space-between;\n"])));
|
|
4643
4086
|
var MainContainer$1 = styled__default.div(_templateObject3$8 || (_templateObject3$8 = _taggedTemplateLiteralLoose(["\n max-width: 600px;\n margin: auto;\n .logo {\n display: flex;\n }\n .logoImage {\n max-width: min(400px, 100%);\n max-height: 200px;\n margin: auto;\n }\n"])));
|
|
4644
4087
|
var DetailsContainer = styled__default.div(_templateObject4$6 || (_templateObject4$6 = _taggedTemplateLiteralLoose(["\n margin: 1.2rem 0;\n text-align: center;\n p {\n font-size: 16px;\n font-weight: 500;\n }\n span {\n font-size: 15px;\n }\n .lineContainer {\n display: flex;\n justify-content: center;\n align-items: center;\n margin: 0.5rem 0;\n span {\n margin-right: 6px;\n }\n }\n"])));
|
|
4645
4088
|
var BrandContainer = styled__default.div(_templateObject5$4 || (_templateObject5$4 = _taggedTemplateLiteralLoose(["\n .brandImage {\n max-width: 100%;\n margin: 1rem auto;\n }\n"])));
|
|
@@ -4651,11 +4094,11 @@ var TableCellContainer$1 = styled__default(TableCell)(_templateObject8$2 || (_te
|
|
|
4651
4094
|
return props.availableQuantity ? props.stockCol && 'green' : '#ffffff';
|
|
4652
4095
|
});
|
|
4653
4096
|
|
|
4654
|
-
var _templateObject$
|
|
4655
|
-
var CartDrawerContainer = styled__default.div(_templateObject$
|
|
4097
|
+
var _templateObject$n, _templateObject2$e, _templateObject3$9, _templateObject4$7, _templateObject5$5, _templateObject6$4, _templateObject7$3;
|
|
4098
|
+
var CartDrawerContainer = styled__default.div(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n width: 100%;\n max-width: ", ";\n height: 100%;\n /* padding: 1em;\n padding-top: 0rem; */\n position: relative;\n /* min-width: 100%; */\n min-height: 100vh;\n max-height: 100vh;\n overflow-y: auto;\n\n display: flex;\n flex-direction: column;\n /* border: 1px solid; */\n"])), function (props) {
|
|
4656
4099
|
return props.maxWidth || '650px';
|
|
4657
4100
|
});
|
|
4658
|
-
var CartDrawerBar = styled__default.div(_templateObject2$
|
|
4101
|
+
var CartDrawerBar = styled__default.div(_templateObject2$e || (_templateObject2$e = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n position: sticky;\n box-sizing: border-box;\n top: 0;\n left: -1em;\n padding: 1em;\n height: 4.6rem;\n font-size: 1.6rem;\n background-color: white;\n font-weight: bold;\n padding-left: 1rem;\n z-index: 2;\n h2 {\n font-size: 1.5em;\n }\n .icon {\n cursor: pointer;\n font-size: 1em;\n }\n @media only screen and (max-width: 640px) {\n font-size: 1rem;\n height: 4rem;\n }\n"])));
|
|
4659
4102
|
var CartDrawerProductContainer = styled__default.div(_templateObject3$9 || (_templateObject3$9 = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: max-content;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n position: relative;\n /* height: 900px; */\n padding: 1rem;\n min-height: 74vh;\n opacity: ", ";\n @media only screen and (max-width: 748px) {\n min-height: 75vh;\n }\n /* background-color: red; */\n"])), function (props) {
|
|
4660
4103
|
return props.opacity;
|
|
4661
4104
|
});
|
|
@@ -4672,11 +4115,11 @@ var CartDrawerEmptyCart = styled__default.div(_templateObject7$3 || (_templateOb
|
|
|
4672
4115
|
return props.color || 'red';
|
|
4673
4116
|
});
|
|
4674
4117
|
|
|
4675
|
-
var _templateObject$
|
|
4676
|
-
var CartDrawerProduct = styled__default.div(_templateObject$
|
|
4118
|
+
var _templateObject$o, _templateObject2$f, _templateObject3$a;
|
|
4119
|
+
var CartDrawerProduct = styled__default.div(_templateObject$o || (_templateObject$o = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n flex-direction: row;\n height: 100px;\n justify-content: space-around;\n align-items: center;\n overflow: hidden;\n margin-bottom: 2rem;\n user-select: none;\n\n img {\n width: 20%;\n max-height: 100%;\n /* aspect-ratio: 1; */\n object-fit: cover;\n }\n .middleSection {\n width: 60%;\n padding-left: 0.8rem;\n height: 100%;\n h6 {\n font-size: 1.1rem;\n font-weight: bold;\n margin: 0;\n\n span {\n font-size: 0.8rem;\n color: grey;\n text-decoration: line-through;\n margin-right: 0.5rem;\n }\n }\n .name {\n font-size: 0.9rem;\n line-height: 1.2rem;\n max-height: 2.45rem;\n width: 100%;\n word-wrap: break-word;\n overflow: hidden;\n text-overflow: ellipsis;\n transition: 0.3s;\n cursor: pointer;\n &:hover {\n color: ", ";\n }\n }\n }\n .endSection {\n width: 20%;\n height: 95%;\n .icon {\n cursor: pointer;\n transition: 0.4s;\n &:hover {\n color: red;\n /* opacity: 0.7; */\n }\n }\n }\n @media only screen and (max-width: 768px) {\n .closeIcon {\n font-size: 1rem;\n }\n height: 80px;\n .middleSection {\n .name {\n max-height: 2.4rem;\n height: 2.4rem;\n }\n }\n }\n @media only screen and (max-width: 340px) {\n height: 80px;\n .middleSection {\n h6 {\n font-size: 0.9rem;\n }\n .name {\n font-size: 0.7rem;\n height: 1.45rem;\n }\n }\n }\n"])), function (props) {
|
|
4677
4120
|
return props.color || 'grey';
|
|
4678
4121
|
});
|
|
4679
|
-
var CartDrawerQtBox = styled__default.div(_templateObject2$
|
|
4122
|
+
var CartDrawerQtBox = styled__default.div(_templateObject2$f || (_templateObject2$f = _taggedTemplateLiteralLoose(["\n height: 34px;\n width: 82px;\n border: 1px solid rgb(211, 210, 210);\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 13.5px;\n color: #333;\n padding: 0 0.5rem;\n border-radius: 5px;\n max-width: 100%;\n\n span {\n cursor: pointer;\n height: 100%;\n display: grid;\n place-items: center;\n }\n .qt {\n font-size: 12px;\n color: black;\n font-weight: 500;\n cursor: auto;\n }\n @media only screen and (max-width: 640px) {\n min-width: 55px;\n aspect-ratio: 1/2;\n /* min-height: 28px; */\n font-size: 10px;\n }\n @media only screen and (max-width: 340px) {\n min-width: 50px;\n aspect-ratio: 1/2;\n height: 22px;\n font-size: 8px;\n }\n"])));
|
|
4680
4123
|
var CartDrawerLoader = styled__default.div(_templateObject3$a || (_templateObject3$a = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 30%;\n width: 100px;\n height: 100px;\n display: grid;\n place-items: center;\n"])));
|
|
4681
4124
|
|
|
4682
4125
|
var CartDrawerProductCard = function CartDrawerProductCard(_ref) {
|
|
@@ -4796,13 +4239,13 @@ var CartDrawer = function CartDrawer(_ref) {
|
|
|
4796
4239
|
}, "continue to checkout"))));
|
|
4797
4240
|
};
|
|
4798
4241
|
|
|
4799
|
-
var _templateObject$
|
|
4800
|
-
var CartPageSection = styled__default.section(_templateObject$
|
|
4242
|
+
var _templateObject$p, _templateObject2$g, _templateObject3$b, _templateObject4$8, _templateObject5$6, _templateObject6$5, _templateObject7$4, _templateObject8$3, _templateObject9$2;
|
|
4243
|
+
var CartPageSection = styled__default.section(_templateObject$p || (_templateObject$p = _taggedTemplateLiteralLoose(["\n background: ", ";\n max-width: 100%;\n width: fit-content;\n background: ", ";\n overflow: hidden;\n border-radius: 28px;\n\n @media screen and (max-width: 1340px) {\n padding: 0 1em;\n }\n @media screen and (max-width: 640px) {\n padding: 0 1em;\n }\n"])), function (props) {
|
|
4801
4244
|
return props.bg;
|
|
4802
4245
|
}, function (props) {
|
|
4803
4246
|
return props.bg || '#FAE8E5';
|
|
4804
4247
|
});
|
|
4805
|
-
var CartPageContainer = styled__default.div(_templateObject2$
|
|
4248
|
+
var CartPageContainer = styled__default.div(_templateObject2$g || (_templateObject2$g = _taggedTemplateLiteralLoose(["\n max-width: ", ";\n width: ", ";\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: flex-start;\n border-radius: 28px 28px 28px 14px;\n padding: 2em 2.5em;\n padding-bottom: 3em;\n border-radius: 28px;\n opacity: ", ";\n .scrollDiv {\n width: 68%;\n height: 630px;\n max-height: 630px;\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n\n margin-right: 0.3em;\n &::-webkit-scrollbar {\n width: ", ";\n }\n\n /* Track */\n &::-webkit-scrollbar-track {\n background: ", ";\n\n border-radius: 16px;\n }\n\n /* Handle */\n &::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 16px;\n }\n /* box-shadow: 0px 20px 35px rgba(0, 0, 0, 0.05); */\n }\n table {\n border-collapse: separate;\n border-spacing: 0 4px;\n row-gap: 4px;\n }\n\n td {\n /* border: solid 1px #000; */\n border-style: none solid solid none;\n /* padding: 10px; */\n /* margin-bottom:5px; */\n }\n\n tr:first-child td:first-child {\n border-top-left-radius: 10px;\n }\n tr td:last-child {\n border-top-right-radius: 10px;\n border-bottom-right-radius: 10px;\n }\n\n tr td:first-child {\n border-bottom-left-radius: 10px;\n border-top-left-radius: 10px;\n }\n tr td:last-child {\n border-bottom-right-radius: 10px;\n }\n\n tr td {\n border-top-style: solid;\n }\n tr td:first-child {\n border-left-style: solid;\n }\n\n @media only screen and (max-width: 1340px) {\n flex-direction: column;\n align-items: center;\n padding: 0.5em;\n .scrollDiv {\n width: 100%;\n margin: 0;\n margin-bottom: 2em;\n padding: 0 0.4em;\n }\n }\n"])), function (props) {
|
|
4806
4249
|
return props.maxWidth || '1620px';
|
|
4807
4250
|
}, function (props) {
|
|
4808
4251
|
return "min(" + (props.maxWidth || '1620px') + ",100%)";
|
|
@@ -5946,9 +5389,9 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
5946
5389
|
}
|
|
5947
5390
|
});
|
|
5948
5391
|
|
|
5949
|
-
var _templateObject$
|
|
5950
|
-
var ProductImage = styled__default.img(_templateObject$
|
|
5951
|
-
var ProductName = styled__default.h6(_templateObject2$
|
|
5392
|
+
var _templateObject$q, _templateObject2$h, _templateObject3$c, _templateObject4$9, _templateObject5$7, _templateObject6$6;
|
|
5393
|
+
var ProductImage = styled__default.img(_templateObject$q || (_templateObject$q = _taggedTemplateLiteralLoose(["\n min-width: 50px;\n min-height: 58px;\n @media only screen and (max-width: 640px) {\n margin: 0.5em 0;\n padding-right: 0.5em;\n }\n"])));
|
|
5394
|
+
var ProductName = styled__default.h6(_templateObject2$h || (_templateObject2$h = _taggedTemplateLiteralLoose(["\n font-size: ", ";\n padding: 0;\n line-height: 1.3em;\n max-height: ", ";\n height: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n height: fit-content;\n"])), function (props) {
|
|
5952
5395
|
return props.size || '1em';
|
|
5953
5396
|
}, function (props) {
|
|
5954
5397
|
return props.maxHeight ? props.maxHeight + "em" : '2.75em';
|
|
@@ -6315,9 +5758,9 @@ function EnhancedTable(_ref) {
|
|
|
6315
5758
|
}, "remove selected"), /*#__PURE__*/React.createElement("button", null, "updated cart")));
|
|
6316
5759
|
}
|
|
6317
5760
|
|
|
6318
|
-
var _templateObject$
|
|
6319
|
-
var CartPageCard = styled__default.div(_templateObject$
|
|
6320
|
-
var CartPageImg = styled__default.img(_templateObject2$
|
|
5761
|
+
var _templateObject$r, _templateObject2$i, _templateObject3$d, _templateObject4$a, _templateObject5$8, _templateObject6$7, _templateObject7$5;
|
|
5762
|
+
var CartPageCard = styled__default.div(_templateObject$r || (_templateObject$r = _taggedTemplateLiteralLoose(["\n width: min(97%, 485px);\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding: 1em;\n background: #ffffff;\n box-shadow: 0px 20px 35px rgba(0, 0, 0, 0.05);\n border-radius: 20px;\n position: relative;\n"])));
|
|
5763
|
+
var CartPageImg = styled__default.img(_templateObject2$i || (_templateObject2$i = _taggedTemplateLiteralLoose(["\n /* width: 95px; */\n width: ", ";\n height: ", ";\n position: relative;\n margin-right: 1em;\n"])), function (props) {
|
|
6321
5764
|
return props.width || 'auto';
|
|
6322
5765
|
}, function (props) {
|
|
6323
5766
|
return props.height || '81px';
|
|
@@ -6400,8 +5843,8 @@ var CartPageMainRetail = function CartPageMainRetail(_ref) {
|
|
|
6400
5843
|
})));
|
|
6401
5844
|
};
|
|
6402
5845
|
|
|
6403
|
-
var _templateObject$
|
|
6404
|
-
var CartSummaryContainer = styled__default.div(_templateObject$
|
|
5846
|
+
var _templateObject$s, _templateObject2$j, _templateObject3$e, _templateObject4$b, _templateObject5$9, _templateObject6$8, _templateObject7$6, _templateObject8$4;
|
|
5847
|
+
var CartSummaryContainer = styled__default.div(_templateObject$s || (_templateObject$s = _taggedTemplateLiteralLoose(["\n width: 26.375em;\n max-width: ", ";\n display: flex;\n flex-direction: column;\n background: ", ";\n color: ", ";\n border-radius: 20px;\n padding: 2em 3em;\n align-items: center;\n min-height: 580px;\n /* margin-top: 3em; */\n p {\n font-size: 1.189em;\n font-weight: 600;\n align-self: flex-start;\n color: inherit;\n margin: 0;\n padding: 0;\n }\n .continueShopping {\n font-size: 0.75em;\n color: inherit;\n text-transform: capitalize;\n height: 20px;\n border-bottom: 1px solid;\n border-color: ", ";\n cursor: pointer;\n }\n @media only screen and (max-width: 1340px) {\n margin-top: 4em;\n }\n"])), function (props) {
|
|
6405
5848
|
return props.maxWidth || '26.375em';
|
|
6406
5849
|
}, function (props) {
|
|
6407
5850
|
return props.background || '#667080';
|
|
@@ -6410,7 +5853,7 @@ var CartSummaryContainer = styled__default.div(_templateObject$v || (_templateOb
|
|
|
6410
5853
|
}, function (props) {
|
|
6411
5854
|
return props.color || 'white';
|
|
6412
5855
|
});
|
|
6413
|
-
var CartSummaryRow = styled__default.div(_templateObject2$
|
|
5856
|
+
var CartSummaryRow = styled__default.div(_templateObject2$j || (_templateObject2$j = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n color: inherit;\n h6,\n h5 {\n margin: 0;\n font-size: 1em;\n font-weight: 700;\n color: inherit;\n text-transform: capitalize;\n }\n h5 {\n font-size: ", ";\n }\n"])), function (props) {
|
|
6414
5857
|
return props.justify || 'space-between';
|
|
6415
5858
|
}, function (props) {
|
|
6416
5859
|
return props.h5 || '1.31em';
|
|
@@ -6746,7 +6189,7 @@ var GTagManager = function GTagManager(_ref) {
|
|
|
6746
6189
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
6747
6190
|
};
|
|
6748
6191
|
|
|
6749
|
-
var _templateObject$
|
|
6192
|
+
var _templateObject$t, _templateObject2$k;
|
|
6750
6193
|
var BannerImages = function BannerImages(_ref) {
|
|
6751
6194
|
var config = _ref.config,
|
|
6752
6195
|
sliderImages = _ref.sliderImages,
|
|
@@ -6787,10 +6230,10 @@ var BannerImages = function BannerImages(_ref) {
|
|
|
6787
6230
|
}))));
|
|
6788
6231
|
})));
|
|
6789
6232
|
};
|
|
6790
|
-
var Image = styled__default.img(_templateObject$
|
|
6791
|
-
var BannerContainer$1 = styled__default.section(_templateObject2$
|
|
6233
|
+
var Image = styled__default.img(_templateObject$t || (_templateObject$t = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: auto;\n cursor: pointer;\n transition: all 0.5s;\n &:hover {\n transform: scale(1.02);\n }\n"])));
|
|
6234
|
+
var BannerContainer$1 = styled__default.section(_templateObject2$k || (_templateObject2$k = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n font-size: 0;\n"])));
|
|
6792
6235
|
|
|
6793
|
-
var _templateObject$
|
|
6236
|
+
var _templateObject$u, _templateObject2$l, _templateObject3$f;
|
|
6794
6237
|
var LandingCarousel = function LandingCarousel(_ref) {
|
|
6795
6238
|
var _config$spaceBetweenC, _config$colLg, _ref2, _ref3, _config$colSm, _ref4, _config$colMd, _config$colLg2;
|
|
6796
6239
|
var config = _ref.config,
|
|
@@ -6857,15 +6300,15 @@ var LandingCarousel = function LandingCarousel(_ref) {
|
|
|
6857
6300
|
})));
|
|
6858
6301
|
})));
|
|
6859
6302
|
};
|
|
6860
|
-
var Image$1 = styled__default.img(_templateObject$
|
|
6861
|
-
var Root$7 = styled__default.div(_templateObject2$
|
|
6303
|
+
var Image$1 = styled__default.img(_templateObject$u || (_templateObject$u = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: auto;\n transition: all 0.5s;\n &:hover {\n transform: scale(1.05);\n }\n"])));
|
|
6304
|
+
var Root$7 = styled__default.div(_templateObject2$l || (_templateObject2$l = _taggedTemplateLiteralLoose([""])));
|
|
6862
6305
|
var ReactSlick = styled__default(Slider)(_templateObject3$f || (_templateObject3$f = _taggedTemplateLiteralLoose(["\n .slick-list {\n margin: 0 -", "px;\n }\n .slideItem {\n padding: 0 ", "px;\n overflow: hidden;\n }\n line-height: 0;\n .slick-dots {\n bottom: 0;\n li {\n margin: 0;\n button:before {\n color: #ffffff !important;\n font-size: 10px;\n }\n }\n }\n .slick-prev,\n .slick-next {\n color: #ffffff;\n z-index: 1;\n width: 26px;\n height: 26px;\n }\n .slick-prev {\n left: 12px;\n }\n .slick-next {\n right: 12px;\n }\n"])), function (props) {
|
|
6863
6306
|
return props === null || props === void 0 ? void 0 : props.spaceBetweenCol;
|
|
6864
6307
|
}, function (props) {
|
|
6865
6308
|
return props === null || props === void 0 ? void 0 : props.spaceBetweenCol;
|
|
6866
6309
|
});
|
|
6867
6310
|
|
|
6868
|
-
var _templateObject$
|
|
6311
|
+
var _templateObject$v, _templateObject2$m;
|
|
6869
6312
|
var HomeBanner = function HomeBanner(_ref) {
|
|
6870
6313
|
var _ref$apiEndPoint = _ref.apiEndPoint,
|
|
6871
6314
|
apiEndPoint = _ref$apiEndPoint === void 0 ? 'https://dev.salesgent.xyz/api' : _ref$apiEndPoint,
|
|
@@ -6959,10 +6402,10 @@ var HomeBanner = function HomeBanner(_ref) {
|
|
|
6959
6402
|
})));
|
|
6960
6403
|
})))));
|
|
6961
6404
|
};
|
|
6962
|
-
var Root$8 = styled__default.div(_templateObject$
|
|
6963
|
-
var MainContainer$2 = styled__default.div(_templateObject2$
|
|
6405
|
+
var Root$8 = styled__default.div(_templateObject$v || (_templateObject$v = _taggedTemplateLiteralLoose([""])));
|
|
6406
|
+
var MainContainer$2 = styled__default.div(_templateObject2$m || (_templateObject2$m = _taggedTemplateLiteralLoose([""])));
|
|
6964
6407
|
|
|
6965
|
-
var _templateObject$
|
|
6408
|
+
var _templateObject$w, _templateObject2$n, _templateObject3$g, _templateObject4$c, _templateObject5$a, _templateObject6$9;
|
|
6966
6409
|
var OutOfStock = function OutOfStock(_ref) {
|
|
6967
6410
|
var _product$body, _product$body$content, _product$body2, _product$body2$conten, _product$masterProduc, _product$header;
|
|
6968
6411
|
var product = _ref.product,
|
|
@@ -7193,8 +6636,8 @@ var OutOfStock = function OutOfStock(_ref) {
|
|
|
7193
6636
|
}
|
|
7194
6637
|
}), /*#__PURE__*/React__default.createElement("span", null, subscribed ? 'Subscribed Successfully' : 'Subscribe')))))));
|
|
7195
6638
|
};
|
|
7196
|
-
var VariantsContainer = styled__default.div(_templateObject$
|
|
7197
|
-
var MainCheckbox = styled__default(Checkbox)(_templateObject2$
|
|
6639
|
+
var VariantsContainer = styled__default.div(_templateObject$w || (_templateObject$w = _taggedTemplateLiteralLoose(["\n ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 5px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(178, 169, 169, 1);\n box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n }\n"])));
|
|
6640
|
+
var MainCheckbox = styled__default(Checkbox)(_templateObject2$n || (_templateObject2$n = _taggedTemplateLiteralLoose(["\n &.Mui-checked,\n &.MuiCheckbox-indeterminate {\n color: ", ";\n }\n"])), function (props) {
|
|
7198
6641
|
return props.theme.primaryColor;
|
|
7199
6642
|
});
|
|
7200
6643
|
var EmailInput = styled__default(InputBase)(_templateObject3$g || (_templateObject3$g = _taggedTemplateLiteralLoose(["\n border: 1px solid #a9a9a9;\n padding: 3px 10px;\n fontsize: 12px;\n width: 100%;\n border-radius: 3px;\n"])));
|
|
@@ -7230,12 +6673,12 @@ var StyledSubscribe = styled__default.button(_templateObject6$9 || (_templateObj
|
|
|
7230
6673
|
return props.Loading || props.subscribed ? 'none' : 'auto';
|
|
7231
6674
|
});
|
|
7232
6675
|
|
|
7233
|
-
var _templateObject$
|
|
6676
|
+
var _templateObject$x;
|
|
7234
6677
|
var NoData = function NoData(_ref) {
|
|
7235
6678
|
_objectDestructuringEmpty(_ref);
|
|
7236
6679
|
return /*#__PURE__*/React__default.createElement(CustomNoRowsOverlay, null);
|
|
7237
6680
|
};
|
|
7238
|
-
var Container = styled__default.div(_templateObject$
|
|
6681
|
+
var Container = styled__default.div(_templateObject$x || (_templateObject$x = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n & .ant-empty-img-1 {\n fill: #aeb8c2;\n }\n & .ant-empty-img-2 {\n fill: #f5f5f7;\n }\n & .ant-empty-img-3 {\n fill: #dce0e6;\n }\n & .ant-empty-img-4 {\n fill: #fff;\n }\n & ant-empty-img-5 {\n fill-opacity: 0.8;\n fill: #f5f5f5;\n }\n"])));
|
|
7239
6682
|
var CustomNoRowsOverlay = function CustomNoRowsOverlay(_ref2) {
|
|
7240
6683
|
_objectDestructuringEmpty(_ref2);
|
|
7241
6684
|
return /*#__PURE__*/React__default.createElement(Container, null, /*#__PURE__*/React__default.createElement("svg", {
|
|
@@ -7702,12 +7145,12 @@ var AsyncSelect = function AsyncSelect(_ref3) {
|
|
|
7702
7145
|
return /*#__PURE__*/React__default.createElement(AsyncSelectField, props);
|
|
7703
7146
|
};
|
|
7704
7147
|
|
|
7705
|
-
var _templateObject$
|
|
7706
|
-
var Container$1 = styled__default.div(_templateObject$
|
|
7148
|
+
var _templateObject$y;
|
|
7149
|
+
var Container$1 = styled__default.div(_templateObject$y || (_templateObject$y = _taggedTemplateLiteralLoose([""])));
|
|
7707
7150
|
|
|
7708
|
-
var _templateObject$
|
|
7709
|
-
var ProductImage$1 = styled__default.img(_templateObject$
|
|
7710
|
-
var ProductName$1 = styled__default.h6(_templateObject2$
|
|
7151
|
+
var _templateObject$z, _templateObject2$o, _templateObject3$h, _templateObject4$d, _templateObject5$b, _templateObject6$a;
|
|
7152
|
+
var ProductImage$1 = styled__default.img(_templateObject$z || (_templateObject$z = _taggedTemplateLiteralLoose(["\n min-width: 50px;\n min-height: 58px;\n @media only screen and (max-width: 640px) {\n margin: 0.5em 0;\n padding-right: 0.5em;\n }\n"])));
|
|
7153
|
+
var ProductName$1 = styled__default.h6(_templateObject2$o || (_templateObject2$o = _taggedTemplateLiteralLoose(["\n font-size: ", ";\n padding: 0;\n line-height: 1.3em;\n max-height: ", ";\n height: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n height: fit-content;\n"])), function (props) {
|
|
7711
7154
|
return props.size || '1em';
|
|
7712
7155
|
}, function (props) {
|
|
7713
7156
|
return props.maxHeight ? props.maxHeight + "em" : '2.75em';
|
|
@@ -7836,13 +7279,13 @@ var CardRow$1 = function CardRow(_ref) {
|
|
|
7836
7279
|
}))));
|
|
7837
7280
|
};
|
|
7838
7281
|
|
|
7839
|
-
var _templateObject$
|
|
7840
|
-
var CartPageSection$1 = styled__default.section(_templateObject$
|
|
7282
|
+
var _templateObject$A, _templateObject2$p, _templateObject3$i, _templateObject4$e, _templateObject5$c, _templateObject6$b, _templateObject7$7, _templateObject8$5, _templateObject9$3;
|
|
7283
|
+
var CartPageSection$1 = styled__default.section(_templateObject$A || (_templateObject$A = _taggedTemplateLiteralLoose(["\n background: ", ";\n max-width: 100%;\n width: fit-content;\n background: ", ";\n overflow: hidden;\n border-radius: 28px;\n\n @media screen and (max-width: 1340px) {\n padding: 0 1em;\n }\n @media screen and (max-width: 640px) {\n padding: 0 1em;\n }\n"])), function (props) {
|
|
7841
7284
|
return props.bg;
|
|
7842
7285
|
}, function (props) {
|
|
7843
7286
|
return props.bg || '#FAE8E5';
|
|
7844
7287
|
});
|
|
7845
|
-
var CartPageContainer$1 = styled__default.div(_templateObject2$
|
|
7288
|
+
var CartPageContainer$1 = styled__default.div(_templateObject2$p || (_templateObject2$p = _taggedTemplateLiteralLoose(["\n max-width: ", ";\n width: ", ";\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: flex-start;\n border-radius: 28px 28px 28px 14px;\n padding: 2em 2.5em;\n padding-bottom: 3em;\n border-radius: 28px;\n opacity: ", ";\n .scrollDiv {\n width: 68%;\n height: 630px;\n max-height: 630px;\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n\n margin-right: 0.3em;\n &::-webkit-scrollbar {\n width: ", ";\n }\n\n /* Track */\n &::-webkit-scrollbar-track {\n background: ", ";\n\n border-radius: 16px;\n }\n\n /* Handle */\n &::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 16px;\n border: 2px solid;\n }\n /* box-shadow: 0px 20px 35px rgba(0, 0, 0, 0.05); */\n }\n table {\n border-collapse: separate;\n border-spacing: 0 4px;\n row-gap: 4px;\n }\n\n td {\n /* border: solid 1px #000; */\n border-style: none solid solid none;\n /* padding: 10px; */\n /* margin-bottom:5px; */\n }\n\n tr:first-child td:first-child {\n border-top-left-radius: 10px;\n }\n tr td:last-child {\n border-top-right-radius: 10px;\n border-bottom-right-radius: 10px;\n }\n\n tr td:first-child {\n border-bottom-left-radius: 10px;\n border-top-left-radius: 10px;\n }\n tr td:last-child {\n border-bottom-right-radius: 10px;\n }\n\n tr td {\n border-top-style: solid;\n }\n tr td:first-child {\n border-left-style: solid;\n }\n\n @media only screen and (max-width: 1340px) {\n flex-direction: column;\n align-items: center;\n padding: 0.5em;\n .scrollDiv {\n width: 100%;\n margin: 0;\n margin-bottom: 2em;\n padding: 0 0.4em;\n }\n }\n"])), function (props) {
|
|
7846
7289
|
return props.maxWidth || '1620px';
|
|
7847
7290
|
}, function (props) {
|
|
7848
7291
|
return "min(" + (props.maxWidth || '1620px') + ",100%)";
|
|
@@ -8295,14 +7738,14 @@ var SnowfallComponent = function SnowfallComponent(_ref) {
|
|
|
8295
7738
|
}) : null;
|
|
8296
7739
|
};
|
|
8297
7740
|
|
|
8298
|
-
var _templateObject$
|
|
8299
|
-
var StaticContainer$1 = styled__default.div(_templateObject$
|
|
7741
|
+
var _templateObject$B;
|
|
7742
|
+
var StaticContainer$1 = styled__default.div(_templateObject$B || (_templateObject$B = _taggedTemplateLiteralLoose(["\n padding: 1rem;\n width: 100%;\n color: #606060;\n .top-bar {\n background-color: #f5f5f5;\n padding: 1rem;\n text-align: center;\n font-size: 3.2rem;\n font-weight: bold;\n text-transform: uppercase;\n color: ", ";\n }\n .route-bar {\n text-transform: capitalize;\n p {\n padding: 0;\n word-spacing: 5px;\n display: flex;\n align-items: center;\n color: #606060;\n }\n }\n .data-container {\n margin: auto;\n }\n hr {\n border-bottom: 2px solid #eceff8;\n border-top: 0px;\n margin: 1rem 0;\n }\n li {\n margin-left: 1rem;\n }\n a {\n color: ", ";\n }\n p {\n margin: 1rem 0;\n width: 100%;\n color: #606060;\n }\n"])), function (props) {
|
|
8300
7743
|
return props.theme.primaryColor;
|
|
8301
7744
|
}, function (props) {
|
|
8302
7745
|
return props.theme.primaryColor;
|
|
8303
7746
|
});
|
|
8304
7747
|
|
|
8305
|
-
var _templateObject$
|
|
7748
|
+
var _templateObject$C;
|
|
8306
7749
|
var StaticPage = function StaticPage(_ref) {
|
|
8307
7750
|
var _data$content;
|
|
8308
7751
|
var _ref$colors = _ref.colors,
|
|
@@ -8366,9 +7809,9 @@ var StaticPage = function StaticPage(_ref) {
|
|
|
8366
7809
|
logoUrl: logoUrl
|
|
8367
7810
|
}))))))));
|
|
8368
7811
|
};
|
|
8369
|
-
var Root$a = styled__default(material.Box)(_templateObject$
|
|
7812
|
+
var Root$a = styled__default(material.Box)(_templateObject$C || (_templateObject$C = _taggedTemplateLiteralLoose([""])));
|
|
8370
7813
|
|
|
8371
|
-
var _templateObject$
|
|
7814
|
+
var _templateObject$D, _templateObject2$q;
|
|
8372
7815
|
var ThankYou = function ThankYou(_ref) {
|
|
8373
7816
|
var _ref$id = _ref.id,
|
|
8374
7817
|
id = _ref$id === void 0 ? 0 : _ref$id,
|
|
@@ -8427,8 +7870,8 @@ var ThankYou = function ThankYou(_ref) {
|
|
|
8427
7870
|
onClick: onContinue
|
|
8428
7871
|
}, /*#__PURE__*/React__default.createElement("p", null, "Continue Shopping"))))))));
|
|
8429
7872
|
};
|
|
8430
|
-
var Root$b = styled__default(material.Box)(_templateObject$
|
|
8431
|
-
var StyledButton = styled__default.button(_templateObject2$
|
|
7873
|
+
var Root$b = styled__default(material.Box)(_templateObject$D || (_templateObject$D = _taggedTemplateLiteralLoose([""])));
|
|
7874
|
+
var StyledButton = styled__default.button(_templateObject2$q || (_templateObject2$q = _taggedTemplateLiteralLoose(["\n outline: none;\n border: 1px solid;\n border-color: ", ";\n background: none;\n border-radius: 14px;\n padding: 10px 20px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n transition: background 0.5s ease;\n width: 200px;\n color: ", ";\n text-transform: uppercase;\n &:hover {\n cursor: pointer;\n background: ", ";\n color: #fff;\n }\n"])), function (props) {
|
|
8432
7875
|
return props.theme.primaryColor;
|
|
8433
7876
|
}, function (props) {
|
|
8434
7877
|
return props.theme.primaryColor;
|
|
@@ -8436,32 +7879,35 @@ var StyledButton = styled__default.button(_templateObject2$r || (_templateObject
|
|
|
8436
7879
|
return props.theme.primaryColor;
|
|
8437
7880
|
});
|
|
8438
7881
|
|
|
8439
|
-
var _templateObject$
|
|
8440
|
-
var
|
|
7882
|
+
var _templateObject$E, _templateObject2$r, _templateObject3$j, _templateObject4$f, _templateObject5$d, _templateObject6$c, _templateObject7$8, _templateObject8$6;
|
|
7883
|
+
var CheckoutRootContainer = styled__default.div(_templateObject$E || (_templateObject$E = _taggedTemplateLiteralLoose(["\n width: 100%;\n padding: 4rem;\n background-color: ", ";\n font-size: 16px;\n\n div,\n button,\n span {\n font-size: 16px;\n }\n @media only screen and (max-width: 1620px) {\n padding: 3em 0.5em;\n }\n @media screen and (max-width: 840px) {\n div,\n button,\n span {\n font-size: 12px;\n }\n padding: 2rem 0.5rem;\n }\n"])), function (props) {
|
|
7884
|
+
return props.bg;
|
|
7885
|
+
});
|
|
7886
|
+
var CheckoutPageContainer = styled__default.div(_templateObject2$r || (_templateObject2$r = _taggedTemplateLiteralLoose(["\n width: 100%;\n max-width: ", ";\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: flex-start;\n background-color: ", ";\n margin: 0 auto;\n padding: 2.375em 3.5em 2.5em 4.5em;\n padding-left: min(4.5em, 2.5vw);\n color: rgba(50, 50, 50, 1);\n /* max-height: 90vh; */\n overflow: hidden;\n /* background: gainsboro; */\n border-radius: 28px;\n /* background-color: #fff8f6; */\n @media only screen and (max-width: 1508px) {\n flex-direction: column;\n align-items: center;\n max-height: max-content;\n }\n @media only screen and (max-width: 788px) {\n padding: 1em 0.5em;\n }\n .icon {\n font-size: 12px;\n }\n ////////////checkout and cart fonts\n /////////////////\n /* /////remove arrows from number input */\n /* Chrome, Safari, Edge, Opera */\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n /* Firefox */\n input[type='number'] {\n -moz-appearance: textfield;\n }\n\n /* //////mui inputs */\n\n .checkout .MuiOutlinedInput-notchedOutline,\n .checkout .css-1d3z3hw-MuiOutlinedInput-notchedOutline {\n border: none !important;\n outline: none !important;\n }\n /* ////checkbox */\n .checkout .Mui-checked {\n color: #060606 !important;\n }\n\n /* //////select inputs */\n // .checkout .MuiInputLabel-formControl,\n // .checkout .Mui-focused {\n // color: grey !important;\n // font-size: 0.875em;\n // }\n .checkout .MuiInputBase-root .checkout .MuiOutlinedInput-root,\n .checkout .MuiInputBase-colorPrimary,\n .checkout .MuiInputBase-fullWidth,\n .checkout .MuiInputBase-formControl,\n .checkout .css-md26zr-MuiInputBase-root-MuiOutlinedInput-root {\n border-radius: 10px;\n }\n // /* /////stepper length */\n .checkout .MuiStepConnector-line,\n .MuiStepConnector-lineVertical {\n min-height: 60px !important;\n }\n\n @media only screen and (max-width: 640px) {\n .checkout .MuiStepConnector-line,\n .MuiStepConnector-lineVertical {\n min-height: 40px !important;\n }\n }\n"])), function (props) {
|
|
8441
7887
|
return props.maxWidth || '1605px';
|
|
8442
7888
|
}, function (props) {
|
|
8443
7889
|
return props.bg || '#fff8f6';
|
|
8444
7890
|
});
|
|
8445
|
-
var Row = styled__default.div(
|
|
8446
|
-
var CheckoutMainWithHeader = styled__default(material.Stack)(
|
|
8447
|
-
var CheckoutMain = styled__default.div(
|
|
7891
|
+
var Row = styled__default.div(_templateObject3$j || (_templateObject3$j = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n"])));
|
|
7892
|
+
var CheckoutMainWithHeader = styled__default(material.Stack)(_templateObject4$f || (_templateObject4$f = _taggedTemplateLiteralLoose([""])));
|
|
7893
|
+
var CheckoutMain = styled__default.div(_templateObject5$d || (_templateObject5$d = _taggedTemplateLiteralLoose(["\n width: 100%;\n max-width: 1008px;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n margin-right: 2em;\n max-height: 65vh;\n padding-right: 2em;\n overflow-y: auto;\n position: relative;\n padding-top: 2em;\n padding-bottom: 3em;\n /* width */\n ::-webkit-scrollbar {\n width: 10px;\n background: ", ";\n border-radius: 16px;\n }\n\n /* Track */\n ::-webkit-scrollbar-track {\n background: ", ";\n border-radius: 16px;\n }\n\n /* Handle */\n ::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 16px;\n }\n @media only screen and (max-width: 1488px) {\n margin-bottom: 3em;\n min-height: max-content;\n max-height: max-content;\n margin-right: 0;\n overflow: visible;\n }\n @media only screen and (max-width: 788px) {\n max-width: 100vw;\n padding-right: 0;\n width: 98vw;\n min-width: 90vw;\n padding-top: 1em;\n }\n /* overflow: hidden; */\n"])), function (props) {
|
|
8448
7894
|
return props.bg || 'rgba(102,112,128,0.5)';
|
|
8449
7895
|
}, function (props) {
|
|
8450
7896
|
return props.bg || 'rgba(102,112,128,0.5)';
|
|
8451
7897
|
}, function (props) {
|
|
8452
7898
|
return props.color;
|
|
8453
7899
|
});
|
|
8454
|
-
var CheckoutHeading = styled__default.div(
|
|
8455
|
-
var CheckoutHeader = styled__default(Row)(
|
|
8456
|
-
var CheckoutStepIcon = styled__default.div(
|
|
7900
|
+
var CheckoutHeading = styled__default.div(_templateObject6$c || (_templateObject6$c = _taggedTemplateLiteralLoose(["\n margin-left: 2.5em;\n margin-bottom: 2em;\n h5 {\n font-size: 2.3em;\n font-weight: 600;\n text-transform: capitalize;\n }\n p {\n font-size: 0.875em;\n margin-top: 0.5em;\n }\n @media only screen and (max-width: 788px) {\n margin-left: 0;\n padding-left: 1em;\n }\n"])));
|
|
7901
|
+
var CheckoutHeader = styled__default(Row)(_templateObject7$8 || (_templateObject7$8 = _taggedTemplateLiteralLoose(["\n overflow: auto;\n justify-content: space-around;\n display: flex;\n flex-direction: row;\n align-items: center;\n position: sticky;\n top: 0;\n background-color: white;\n z-index: 1;\n justify-content: flex-start;\n min-height: 4.18em;\n max-height: 4.1875em;\n max-width: 57.43em;\n width: 98%;\n background: #ffffff;\n border-radius: 20px;\n margin-bottom: 1em;\n margin-right: 0.35em;\n color: #7d7b7b;\n padding: 0 2em;\n margin-right: 5em;\n .row {\n display: flex;\n color: inherit;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n text-transform: capitalize;\n margin-right: 2.4%;\n .icon {\n font-size: 14px;\n font-weight: 400;\n display: grid;\n place-items: center;\n margin-right: 6px;\n color: inherit;\n }\n p,\n span {\n font-size: 0.95em;\n color: inherit;\n }\n }\n .checked {\n p,\n span {\n color: #323232;\n }\n .icon {\n color: #249937;\n }\n }\n @media only screen and (max-width: 1508px) {\n margin-right: 2em;\n }\n @media only screen and (max-width: 788px) {\n width: 100%;\n padding: 2em 1em;\n margin: 1.4em 0;\n .row {\n margin-right: 4.5%;\n p {\n font-size: 12px;\n }\n span {\n display: none;\n }\n }\n }\n"])));
|
|
7902
|
+
var CheckoutStepIcon = styled__default.div(_templateObject8$6 || (_templateObject8$6 = _taggedTemplateLiteralLoose(["\n width: 20px;\n height: 20px;\n border-radius: 50%;\n font-size: 5px;\n display: grid;\n place-items: center;\n margin: auto;\n padding: 0;\n margin-left: 2px;\n .circle {\n width: 16px;\n height: 16px;\n border-radius: 50%;\n font-size: 5px;\n display: grid;\n place-items: center;\n margin: auto;\n padding: 0;\n }\n .ic {\n font-size: 8px;\n }\n"])));
|
|
8457
7903
|
|
|
8458
|
-
var _templateObject$
|
|
8459
|
-
var CheckoutSummaryContainer = styled__default.div(_templateObject$
|
|
7904
|
+
var _templateObject$F, _templateObject2$s, _templateObject3$k;
|
|
7905
|
+
var CheckoutSummaryContainer = styled__default.div(_templateObject$F || (_templateObject$F = _taggedTemplateLiteralLoose(["\n background: ", ";\n color: ", ";\n border-radius: 20px;\n padding: max(1.5em, 30px);\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n max-width: 422px;\n min-width: min(412px, 95%);\n font-size: 16px;\n margin-top: 6.15em;\n @media only screen and (max-width: 1508px) {\n margin-top: 0;\n }\n"])), function (props) {
|
|
8460
7906
|
return props.bg || 'rgba(255, 240, 236, 1)';
|
|
8461
7907
|
}, function (props) {
|
|
8462
7908
|
return props.color || ' rgba(50, 50, 50, 1)';
|
|
8463
7909
|
});
|
|
8464
|
-
var TextRow = styled__default.div(_templateObject2$
|
|
7910
|
+
var TextRow = styled__default.div(_templateObject2$s || (_templateObject2$s = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n max-width: 90%;\n margin-bottom: 1em;\n padding-bottom: 1em;\n width: 90%;\n border-bottom: 1px solid #f7f7f7;\n .text {\n font-size: 1.1em;\n text-transform: capitalize;\n }\n .total {\n font-size: 1.65em;\n font-weight: 800;\n }\n"])));
|
|
8465
7911
|
var FilledInfo = styled__default.div(_templateObject3$k || (_templateObject3$k = _taggedTemplateLiteralLoose(["\n margin-bottom: 2em;\n .heading {\n font-size: 1.25em;\n font-weight: 800;\n margin-bottom: 0.8em;\n }\n\n p {\n font-size: 0.875em;\n text-transform: capitalize;\n max-width: 60%;\n }\n .bold {\n font-weight: 700;\n margin-bottom: 0.8em;\n max-width: 300px;\n width: fit-content;\n }\n .payment {\n width: 70px;\n height: 48px;\n background: #ffffff;\n border-radius: 15.875px;\n display: grid;\n place-items: center;\n overflow: hidden;\n }\n .blank {\n padding-bottom: 2em;\n opacity: 0;\n }\n"])));
|
|
8466
7912
|
|
|
8467
7913
|
var CheckoutSummary = function CheckoutSummary(_ref) {
|
|
@@ -8493,15 +7939,15 @@ var CheckoutSummary = function CheckoutSummary(_ref) {
|
|
|
8493
7939
|
}
|
|
8494
7940
|
}, renderMoney(discountTotal || 0))) : null, /*#__PURE__*/React__default.createElement(FilledInfo, null, /*#__PURE__*/React__default.createElement("h6", {
|
|
8495
7941
|
className: "heading"
|
|
8496
|
-
}, "Billing Information"), billingInformation
|
|
7942
|
+
}, "Billing Information"), billingInformation ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("p", {
|
|
8497
7943
|
className: "bold"
|
|
8498
|
-
}, billingInformation === null || billingInformation === void 0 ? void 0 : billingInformation.
|
|
7944
|
+
}, (billingInformation === null || billingInformation === void 0 ? void 0 : billingInformation.address1) + " " + ((billingInformation === null || billingInformation === void 0 ? void 0 : billingInformation.address2) || '')), /*#__PURE__*/React__default.createElement("p", null, (billingInformation === null || billingInformation === void 0 ? void 0 : billingInformation.city) + ", " + (billingInformation === null || billingInformation === void 0 ? void 0 : billingInformation.state) + ", " + (billingInformation === null || billingInformation === void 0 ? void 0 : billingInformation.zip) + ", " + (billingInformation === null || billingInformation === void 0 ? void 0 : billingInformation.country))) : /*#__PURE__*/React__default.createElement("p", {
|
|
8499
7945
|
className: "blank bold"
|
|
8500
7946
|
}, "- - - - -", /*#__PURE__*/React__default.createElement("br", null), "- - -")), /*#__PURE__*/React__default.createElement(FilledInfo, null, /*#__PURE__*/React__default.createElement("h6", {
|
|
8501
7947
|
className: "heading"
|
|
8502
|
-
}, "Shipping information"), shippingInformation
|
|
7948
|
+
}, "Shipping information"), shippingInformation ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("p", {
|
|
8503
7949
|
className: "bold"
|
|
8504
|
-
}, shippingInformation === null || shippingInformation === void 0 ? void 0 : shippingInformation.
|
|
7950
|
+
}, (shippingInformation === null || shippingInformation === void 0 ? void 0 : shippingInformation.address1) + " " + ((shippingInformation === null || shippingInformation === void 0 ? void 0 : shippingInformation.address2) || '')), /*#__PURE__*/React__default.createElement("p", null, (shippingInformation === null || shippingInformation === void 0 ? void 0 : shippingInformation.city) + ", " + (shippingInformation === null || shippingInformation === void 0 ? void 0 : shippingInformation.state) + ", " + (shippingInformation === null || shippingInformation === void 0 ? void 0 : shippingInformation.zip) + ", " + (shippingInformation === null || shippingInformation === void 0 ? void 0 : shippingInformation.country))) : /*#__PURE__*/React__default.createElement("p", {
|
|
8505
7951
|
className: "blank bold"
|
|
8506
7952
|
}, "- - - - -", /*#__PURE__*/React__default.createElement("br", null), "- - -")), /*#__PURE__*/React__default.createElement(FilledInfo, null, /*#__PURE__*/React__default.createElement("h6", {
|
|
8507
7953
|
className: "heading"
|
|
@@ -8516,9 +7962,9 @@ var CheckoutSummary = function CheckoutSummary(_ref) {
|
|
|
8516
7962
|
}, paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.name)));
|
|
8517
7963
|
};
|
|
8518
7964
|
|
|
8519
|
-
var _templateObject$
|
|
8520
|
-
var StepContainer = styled__default.div(_templateObject$
|
|
8521
|
-
var StepsContent = styled__default.div(_templateObject2$
|
|
7965
|
+
var _templateObject$G, _templateObject2$t, _templateObject3$l, _templateObject4$g, _templateObject5$e, _templateObject6$d, _templateObject7$9, _templateObject8$7, _templateObject9$4, _templateObject10$2, _templateObject11$1, _templateObject12$1, _templateObject13$1, _templateObject14$1, _templateObject15$1, _templateObject16$1, _templateObject17$1, _templateObject18$1;
|
|
7966
|
+
var StepContainer = styled__default.div(_templateObject$G || (_templateObject$G = _taggedTemplateLiteralLoose(["\n width: 100%;\n min-width: 57.43em;\n max-width: 57.43em;\n background: white;\n padding: 1em 2em;\n background: #ffffff;\n border-radius: 20px;\n margin-left: 2em;\n margin-top: -2em;\n margin-bottom: 1em;\n @media screen and (max-width: 1305px) {\n width: 80vw;\n min-width: 0;\n }\n @media screen and (max-width: 768px) {\n width: 96%;\n margin-left: 1em;\n padding: 0.8em;\n }\n @media screen and (max-width: 540px) {\n width: 94%;\n margin-left: 1.2em;\n }\n"])));
|
|
7967
|
+
var StepsContent = styled__default.div(_templateObject2$t || (_templateObject2$t = _taggedTemplateLiteralLoose(["\n padding-left: 1.565em;\n min-height: max-content;\n .MuiOutlinedInput-root {\n background: ", ";\n }\n\n p {\n font-size: 0.75em;\n }\n .bold {\n text-transform: uppercase;\n word-spacing: 5px;\n margin-top: 0.95em;\n span {\n font-weight: 600;\n cursor: pointer;\n font-size: 0.94rem;\n }\n .red {\n color: ", ";\n }\n }\n @media screen and (max-width: 768px) {\n padding: 0;\n width: 100%;\n }\n"])), function (props) {
|
|
8522
7968
|
return 'transparent' + '!important';
|
|
8523
7969
|
}, function (props) {
|
|
8524
7970
|
return props.bg || 'red';
|
|
@@ -8566,7 +8012,7 @@ var SaveButton = styled__default.button.attrs({
|
|
|
8566
8012
|
}, function (props) {
|
|
8567
8013
|
return props.disabled ? 'not-allowed' : 'pointer';
|
|
8568
8014
|
});
|
|
8569
|
-
var ButtonRowContainer = styled__default.div(_templateObject8$
|
|
8015
|
+
var ButtonRowContainer = styled__default.div(_templateObject8$7 || (_templateObject8$7 = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n button {\n width: 4.862em;\n height: 1.96em;\n border-radius: 0.43em;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n font-weight: 600;\n letter-spacing: 1px;\n color: white;\n background-color: ", ";\n border: 2px solid\n ", ";\n cursor: ", ";\n }\n .back {\n font-size: 0.875em;\n font-weight: 500;\n justify-content: flex-start;\n margin-right: 0.2em;\n color: #323232;\n background: transparent;\n border: none;\n cursor: ", ";\n font-size: 0.8em;\n transition: 0.4s;\n .icon {\n font-size: 1.2em;\n margin-right: 2px;\n }\n &:hover,\n &:focus {\n letter-spacing: 1px;\n outline: none;\n }\n }\n"])), function (props) {
|
|
8570
8016
|
return props.color || '#fd0015';
|
|
8571
8017
|
}, function (props) {
|
|
8572
8018
|
return props.color ? material.alpha(props.color, 0.87) : 'rgba(254, 81, 96, 0.87)';
|
|
@@ -8790,155 +8236,74 @@ var Step0 = function Step0(_ref) {
|
|
|
8790
8236
|
}, /*#__PURE__*/React__default.createElement(CheckoutInput, {
|
|
8791
8237
|
controlls: {
|
|
8792
8238
|
name: 'email',
|
|
8793
|
-
placeholder: 'E-Mail Address',
|
|
8794
|
-
control: control,
|
|
8795
|
-
autoFocus: true,
|
|
8796
|
-
type: 'email',
|
|
8797
|
-
required: true
|
|
8798
|
-
}
|
|
8799
|
-
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
8800
|
-
item: true,
|
|
8801
|
-
sm: 6.5,
|
|
8802
|
-
xs: 12
|
|
8803
|
-
}, /*#__PURE__*/React__default.createElement(CheckoutInput, {
|
|
8804
|
-
controlls: {
|
|
8805
|
-
name: 'password',
|
|
8806
|
-
placeholder: 'Password',
|
|
8807
|
-
control: control,
|
|
8808
|
-
type: 'password',
|
|
8809
|
-
required: true
|
|
8810
|
-
}
|
|
8811
|
-
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
8812
|
-
item: true,
|
|
8813
|
-
sm: 4
|
|
8814
|
-
}), /*#__PURE__*/React__default.createElement(CheckBoxRow, {
|
|
8815
|
-
padding: ".8em 0 0 0"
|
|
8816
|
-
}, /*#__PURE__*/React__default.createElement(material.Checkbox, {
|
|
8817
|
-
size: "small"
|
|
8818
|
-
}), /*#__PURE__*/React__default.createElement("p", null, "Remember me")), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
8819
|
-
item: true,
|
|
8820
|
-
xs: 12
|
|
8821
|
-
}, /*#__PURE__*/React__default.createElement(CommonCheckoutBtn, {
|
|
8822
|
-
padding: ".8em 3em",
|
|
8823
|
-
uppercase: true,
|
|
8824
|
-
type: "submit",
|
|
8825
|
-
className: "primaryBgColor",
|
|
8826
|
-
color: styles === null || styles === void 0 ? void 0 : (_styles$button2 = styles.button) === null || _styles$button2 === void 0 ? void 0 : _styles$button2.bg
|
|
8827
|
-
}, loading ? /*#__PURE__*/React__default.createElement(material.CircularProgress, {
|
|
8828
|
-
color: "inherit",
|
|
8829
|
-
size: 15
|
|
8830
|
-
}) : 'Login')))));
|
|
8831
|
-
};
|
|
8832
|
-
|
|
8833
|
-
var ButtonRow = function ButtonRow(_ref) {
|
|
8834
|
-
var handleBack = _ref.handleBack,
|
|
8835
|
-
handleNext = _ref.handleNext,
|
|
8836
|
-
backDisabled = _ref.backDisabled,
|
|
8837
|
-
nextDisabled = _ref.nextDisabled,
|
|
8838
|
-
color = _ref.color;
|
|
8839
|
-
return /*#__PURE__*/React__default.createElement(ButtonRowContainer, {
|
|
8840
|
-
disabledBack: backDisabled,
|
|
8841
|
-
disabledNext: nextDisabled,
|
|
8842
|
-
color: color
|
|
8843
|
-
}, /*#__PURE__*/React__default.createElement("button", {
|
|
8844
|
-
className: "back",
|
|
8845
|
-
tabIndex: "1",
|
|
8846
|
-
onClick: function onClick() {
|
|
8847
|
-
if (backDisabled) return;
|
|
8848
|
-
handleBack();
|
|
8849
|
-
}
|
|
8850
|
-
}, /*#__PURE__*/React__default.createElement(md.MdArrowBack, {
|
|
8851
|
-
className: "icon"
|
|
8852
|
-
}), "Back"), /*#__PURE__*/React__default.createElement("button", {
|
|
8853
|
-
disabled: nextDisabled,
|
|
8854
|
-
tabIndex: "1",
|
|
8855
|
-
onClick: function onClick() {
|
|
8856
|
-
if (nextDisabled) return;
|
|
8857
|
-
handleNext();
|
|
8858
|
-
},
|
|
8859
|
-
className: "checkout-btn"
|
|
8860
|
-
}, "Next"));
|
|
8861
|
-
};
|
|
8862
|
-
|
|
8863
|
-
var StoreForm = function StoreForm(_ref) {
|
|
8864
|
-
var control = _ref.control,
|
|
8865
|
-
_onSubmit = _ref.onSubmit,
|
|
8866
|
-
handleSubmit = _ref.handleSubmit,
|
|
8867
|
-
color = _ref.color;
|
|
8868
|
-
return /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
8869
|
-
container: true,
|
|
8870
|
-
columnSpacing: 1,
|
|
8871
|
-
component: "form",
|
|
8872
|
-
rowSpacing: 1,
|
|
8873
|
-
paddingY: 4,
|
|
8874
|
-
onSubmit: function onSubmit(e) {
|
|
8875
|
-
e.preventDefault();
|
|
8876
|
-
handleSubmit(_onSubmit)(e);
|
|
8877
|
-
}
|
|
8878
|
-
}, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
8879
|
-
item: true,
|
|
8880
|
-
xs: 12,
|
|
8881
|
-
sm: 10
|
|
8882
|
-
}, /*#__PURE__*/React__default.createElement(CheckoutInput, {
|
|
8883
|
-
controlls: {
|
|
8884
|
-
name: 'storeName',
|
|
8885
|
-
placeholder: 'Store Name',
|
|
8886
|
-
control: control,
|
|
8887
|
-
required: true
|
|
8888
|
-
}
|
|
8889
|
-
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
8890
|
-
item: true,
|
|
8891
|
-
xs: 6,
|
|
8892
|
-
sm: 3.33
|
|
8893
|
-
}, /*#__PURE__*/React__default.createElement(CheckoutInput, {
|
|
8894
|
-
controlls: {
|
|
8895
|
-
name: 'taxNumber',
|
|
8896
|
-
placeholder: 'Tax number',
|
|
8897
|
-
control: control,
|
|
8898
|
-
type: 'number',
|
|
8899
|
-
required: true
|
|
8900
|
-
}
|
|
8901
|
-
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
8902
|
-
item: true,
|
|
8903
|
-
xs: 6,
|
|
8904
|
-
sm: 3.33
|
|
8905
|
-
}, /*#__PURE__*/React__default.createElement(CheckoutInput, {
|
|
8906
|
-
controlls: {
|
|
8907
|
-
name: 'Mobile',
|
|
8908
|
-
placeholder: 'Mobile',
|
|
8909
|
-
control: control,
|
|
8910
|
-
type: 'number',
|
|
8911
|
-
required: true
|
|
8912
|
-
}
|
|
8913
|
-
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
8914
|
-
item: true,
|
|
8915
|
-
xs: 6,
|
|
8916
|
-
sm: 3.33
|
|
8917
|
-
}, /*#__PURE__*/React__default.createElement(CheckoutInput, {
|
|
8918
|
-
controlls: {
|
|
8919
|
-
name: 'email',
|
|
8920
|
-
placeholder: 'Email',
|
|
8239
|
+
placeholder: 'E-Mail Address',
|
|
8921
8240
|
control: control,
|
|
8241
|
+
autoFocus: true,
|
|
8242
|
+
type: 'email',
|
|
8922
8243
|
required: true
|
|
8923
8244
|
}
|
|
8924
8245
|
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
8925
8246
|
item: true,
|
|
8926
|
-
|
|
8927
|
-
|
|
8247
|
+
sm: 6.5,
|
|
8248
|
+
xs: 12
|
|
8928
8249
|
}, /*#__PURE__*/React__default.createElement(CheckoutInput, {
|
|
8929
8250
|
controlls: {
|
|
8930
|
-
name: '
|
|
8931
|
-
placeholder: '
|
|
8251
|
+
name: 'password',
|
|
8252
|
+
placeholder: 'Password',
|
|
8932
8253
|
control: control,
|
|
8933
|
-
|
|
8254
|
+
type: 'password',
|
|
8934
8255
|
required: true
|
|
8935
8256
|
}
|
|
8936
8257
|
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
8937
8258
|
item: true,
|
|
8938
|
-
|
|
8939
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
8259
|
+
sm: 4
|
|
8260
|
+
}), /*#__PURE__*/React__default.createElement(CheckBoxRow, {
|
|
8261
|
+
padding: ".8em 0 0 0"
|
|
8262
|
+
}, /*#__PURE__*/React__default.createElement(material.Checkbox, {
|
|
8263
|
+
size: "small"
|
|
8264
|
+
}), /*#__PURE__*/React__default.createElement("p", null, "Remember me")), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
8265
|
+
item: true,
|
|
8266
|
+
xs: 12
|
|
8267
|
+
}, /*#__PURE__*/React__default.createElement(CommonCheckoutBtn, {
|
|
8268
|
+
padding: ".8em 3em",
|
|
8269
|
+
uppercase: true,
|
|
8270
|
+
type: "submit",
|
|
8271
|
+
className: "primaryBgColor",
|
|
8272
|
+
color: styles === null || styles === void 0 ? void 0 : (_styles$button2 = styles.button) === null || _styles$button2 === void 0 ? void 0 : _styles$button2.bg
|
|
8273
|
+
}, loading ? /*#__PURE__*/React__default.createElement(material.CircularProgress, {
|
|
8274
|
+
color: "inherit",
|
|
8275
|
+
size: 15
|
|
8276
|
+
}) : 'Login')))));
|
|
8277
|
+
};
|
|
8278
|
+
|
|
8279
|
+
var ButtonRow = function ButtonRow(_ref) {
|
|
8280
|
+
var handleBack = _ref.handleBack,
|
|
8281
|
+
handleNext = _ref.handleNext,
|
|
8282
|
+
backDisabled = _ref.backDisabled,
|
|
8283
|
+
nextDisabled = _ref.nextDisabled,
|
|
8284
|
+
color = _ref.color;
|
|
8285
|
+
return /*#__PURE__*/React__default.createElement(ButtonRowContainer, {
|
|
8286
|
+
disabledBack: backDisabled,
|
|
8287
|
+
disabledNext: nextDisabled,
|
|
8940
8288
|
color: color
|
|
8941
|
-
}, "
|
|
8289
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
8290
|
+
className: "back",
|
|
8291
|
+
tabIndex: "1",
|
|
8292
|
+
onClick: function onClick() {
|
|
8293
|
+
if (backDisabled) return;
|
|
8294
|
+
handleBack();
|
|
8295
|
+
}
|
|
8296
|
+
}, /*#__PURE__*/React__default.createElement(md.MdArrowBack, {
|
|
8297
|
+
className: "icon"
|
|
8298
|
+
}), "Back"), /*#__PURE__*/React__default.createElement("button", {
|
|
8299
|
+
disabled: nextDisabled,
|
|
8300
|
+
tabIndex: "1",
|
|
8301
|
+
onClick: function onClick() {
|
|
8302
|
+
if (nextDisabled) return;
|
|
8303
|
+
handleNext();
|
|
8304
|
+
},
|
|
8305
|
+
className: "checkout-btn"
|
|
8306
|
+
}, "Next"));
|
|
8942
8307
|
};
|
|
8943
8308
|
|
|
8944
8309
|
var AddressForm = function AddressForm(_ref) {
|
|
@@ -9056,42 +8421,30 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
9056
8421
|
};
|
|
9057
8422
|
|
|
9058
8423
|
var Step1 = function Step1(_ref) {
|
|
9059
|
-
var _addressList$, _styles$input,
|
|
8424
|
+
var _customer$customerDto, _addressList, _addressList$, _styles$input, _addressList4, _styles$input2, _addressList5, _styles$button, _styles$button2;
|
|
9060
8425
|
var handleNext = _ref.handleNext,
|
|
9061
8426
|
setShipping = _ref.setShipping,
|
|
9062
8427
|
setBilling = _ref.setBilling,
|
|
9063
|
-
addStore = _ref.addStore,
|
|
9064
8428
|
addStoreAddress = _ref.addStoreAddress,
|
|
9065
|
-
_ref$stores = _ref.stores,
|
|
9066
|
-
stores = _ref$stores === void 0 ? [] : _ref$stores,
|
|
9067
|
-
selectedStore = _ref.selectedStore,
|
|
9068
|
-
setSelectedStore = _ref.setSelectedStore,
|
|
9069
8429
|
countries = _ref.countries,
|
|
9070
8430
|
setSelectedCountry = _ref.setSelectedCountry,
|
|
9071
8431
|
states = _ref.states,
|
|
9072
8432
|
styles = _ref.styles,
|
|
9073
|
-
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
handleSubmit = _useForm.handleSubmit;
|
|
8433
|
+
setShippingAddressId = _ref.setShippingAddressId,
|
|
8434
|
+
customer = _ref.customer,
|
|
8435
|
+
billingAddressId = _ref.billingAddressId;
|
|
9077
8436
|
var _useState = React.useState(false),
|
|
9078
8437
|
showShipping = _useState[0],
|
|
9079
8438
|
setShowShipping = _useState[1];
|
|
9080
|
-
var
|
|
9081
|
-
addressControl =
|
|
9082
|
-
watch =
|
|
9083
|
-
handleSubmitAddress =
|
|
9084
|
-
var StoresList = [].concat(stores, [{
|
|
9085
|
-
storeName: 'Add Store',
|
|
9086
|
-
id: 99999999
|
|
9087
|
-
}]);
|
|
8439
|
+
var _useForm = reactHookForm.useForm(),
|
|
8440
|
+
addressControl = _useForm.control,
|
|
8441
|
+
watch = _useForm.watch,
|
|
8442
|
+
handleSubmitAddress = _useForm.handleSubmit;
|
|
9088
8443
|
var selectedCountry = watch('country');
|
|
9089
|
-
var selectedStores = stores === null || stores === void 0 ? void 0 : stores.find(function (store) {
|
|
9090
|
-
return (store === null || store === void 0 ? void 0 : store.id) === selectedStore;
|
|
9091
|
-
});
|
|
9092
8444
|
var addressList = [];
|
|
9093
|
-
if (
|
|
9094
|
-
|
|
8445
|
+
if (customer !== null && customer !== void 0 && (_customer$customerDto = customer.customerDto) !== null && _customer$customerDto !== void 0 && _customer$customerDto.customerStoreAddressList) {
|
|
8446
|
+
var _customer$customerDto2;
|
|
8447
|
+
addressList = [].concat(customer === null || customer === void 0 ? void 0 : (_customer$customerDto2 = customer.customerDto) === null || _customer$customerDto2 === void 0 ? void 0 : _customer$customerDto2.customerStoreAddressList, [{
|
|
9095
8448
|
address1: 'Add billing Address',
|
|
9096
8449
|
id: 99999999
|
|
9097
8450
|
}]);
|
|
@@ -9101,22 +8454,16 @@ var Step1 = function Step1(_ref) {
|
|
|
9101
8454
|
id: 99999999
|
|
9102
8455
|
}];
|
|
9103
8456
|
}
|
|
9104
|
-
var _useState2 = React.useState((_addressList$ =
|
|
8457
|
+
var _useState2 = React.useState(billingAddressId || ((_addressList = addressList) === null || _addressList === void 0 ? void 0 : (_addressList$ = _addressList[0]) === null || _addressList$ === void 0 ? void 0 : _addressList$.id)),
|
|
9105
8458
|
address = _useState2[0],
|
|
9106
8459
|
setAddress = _useState2[1];
|
|
9107
|
-
var onSubmit = function onSubmit(data) {
|
|
9108
|
-
var _stores$;
|
|
9109
|
-
addStore(data);
|
|
9110
|
-
setSelectedStore((_stores$ = stores[0]) === null || _stores$ === void 0 ? void 0 : _stores$.id);
|
|
9111
|
-
};
|
|
9112
8460
|
var addAddress = function addAddress(data) {
|
|
9113
|
-
var
|
|
8461
|
+
var _addressList2, _addressList2$;
|
|
9114
8462
|
var modifyData = _extends({}, data, {
|
|
9115
|
-
customerStoreId: selectedStores === null || selectedStores === void 0 ? void 0 : selectedStores.id,
|
|
9116
8463
|
active: true
|
|
9117
8464
|
});
|
|
9118
8465
|
addStoreAddress(modifyData);
|
|
9119
|
-
setAddress((
|
|
8466
|
+
setAddress(billingAddressId || ((_addressList2 = addressList) === null || _addressList2 === void 0 ? void 0 : (_addressList2$ = _addressList2[0]) === null || _addressList2$ === void 0 ? void 0 : _addressList2$.id));
|
|
9120
8467
|
};
|
|
9121
8468
|
var next = function next() {
|
|
9122
8469
|
setBilling(address);
|
|
@@ -9127,9 +8474,9 @@ var Step1 = function Step1(_ref) {
|
|
|
9127
8474
|
setSelectedCountry(selectedCountry);
|
|
9128
8475
|
}, [selectedCountry]);
|
|
9129
8476
|
React.useEffect(function () {
|
|
9130
|
-
var
|
|
9131
|
-
setAddress((
|
|
9132
|
-
}, [
|
|
8477
|
+
var _addressList3, _addressList3$;
|
|
8478
|
+
setAddress(billingAddressId || ((_addressList3 = addressList) === null || _addressList3 === void 0 ? void 0 : (_addressList3$ = _addressList3[0]) === null || _addressList3$ === void 0 ? void 0 : _addressList3$.id));
|
|
8479
|
+
}, []);
|
|
9133
8480
|
return /*#__PURE__*/React__default.createElement(StepContainer, null, /*#__PURE__*/React__default.createElement(StepsHeaderComponent, {
|
|
9134
8481
|
text: 'billing information',
|
|
9135
8482
|
icon: /*#__PURE__*/React__default.createElement(bi.BiNotepad, {
|
|
@@ -9138,32 +8485,6 @@ var Step1 = function Step1(_ref) {
|
|
|
9138
8485
|
}), /*#__PURE__*/React__default.createElement(StepsContent, {
|
|
9139
8486
|
bg: styles === null || styles === void 0 ? void 0 : (_styles$input = styles.input) === null || _styles$input === void 0 ? void 0 : _styles$input.bg
|
|
9140
8487
|
}, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
9141
|
-
container: true,
|
|
9142
|
-
rowSpacing: 2,
|
|
9143
|
-
columnSpacing: 1
|
|
9144
|
-
}, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
9145
|
-
item: true,
|
|
9146
|
-
xs: 12,
|
|
9147
|
-
sm: 10
|
|
9148
|
-
}, /*#__PURE__*/React__default.createElement(Select, {
|
|
9149
|
-
className: "checkout-input",
|
|
9150
|
-
bg: styles === null || styles === void 0 ? void 0 : (_styles$input2 = styles.input) === null || _styles$input2 === void 0 ? void 0 : _styles$input2.bg
|
|
9151
|
-
}, /*#__PURE__*/React__default.createElement("select", {
|
|
9152
|
-
value: selectedStore,
|
|
9153
|
-
onChange: function onChange(e) {
|
|
9154
|
-
return setSelectedStore(parseInt(e.target.value));
|
|
9155
|
-
}
|
|
9156
|
-
}, StoresList === null || StoresList === void 0 ? void 0 : StoresList.map(function (store, i) {
|
|
9157
|
-
return /*#__PURE__*/React__default.createElement("option", {
|
|
9158
|
-
key: i,
|
|
9159
|
-
value: store === null || store === void 0 ? void 0 : store.id
|
|
9160
|
-
}, store === null || store === void 0 ? void 0 : store.storeName);
|
|
9161
|
-
}))))), selectedStore === 99999999 && /*#__PURE__*/React__default.createElement(StoreForm, {
|
|
9162
|
-
control: control,
|
|
9163
|
-
onSubmit: onSubmit,
|
|
9164
|
-
handleSubmit: handleSubmit,
|
|
9165
|
-
color: styles === null || styles === void 0 ? void 0 : (_styles$button = styles.button) === null || _styles$button === void 0 ? void 0 : _styles$button.bg
|
|
9166
|
-
}), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
9167
8488
|
container: true
|
|
9168
8489
|
}, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
9169
8490
|
item: true,
|
|
@@ -9172,17 +8493,17 @@ var Step1 = function Step1(_ref) {
|
|
|
9172
8493
|
sx: {
|
|
9173
8494
|
padding: '1em 0'
|
|
9174
8495
|
}
|
|
9175
|
-
}, ((
|
|
8496
|
+
}, ((_addressList4 = addressList) === null || _addressList4 === void 0 ? void 0 : _addressList4.length) > 0 && /*#__PURE__*/React__default.createElement(Select, {
|
|
9176
8497
|
style: {
|
|
9177
|
-
backgroundColor: styles === null || styles === void 0 ? void 0 : (_styles$
|
|
8498
|
+
backgroundColor: styles === null || styles === void 0 ? void 0 : (_styles$input2 = styles.input) === null || _styles$input2 === void 0 ? void 0 : _styles$input2.bg
|
|
9178
8499
|
}
|
|
9179
8500
|
}, /*#__PURE__*/React__default.createElement("select", {
|
|
9180
8501
|
value: address,
|
|
9181
8502
|
onChange: function onChange(e) {
|
|
9182
|
-
|
|
8503
|
+
setShippingAddressId(e.target.value);
|
|
9183
8504
|
setAddress(parseInt(e.target.value));
|
|
9184
8505
|
}
|
|
9185
|
-
}, (
|
|
8506
|
+
}, (_addressList5 = addressList) === null || _addressList5 === void 0 ? void 0 : _addressList5.map(function (address, i) {
|
|
9186
8507
|
return /*#__PURE__*/React__default.createElement("option", {
|
|
9187
8508
|
key: i,
|
|
9188
8509
|
value: address.id
|
|
@@ -9193,7 +8514,7 @@ var Step1 = function Step1(_ref) {
|
|
|
9193
8514
|
onSubmit: addAddress,
|
|
9194
8515
|
countries: countries,
|
|
9195
8516
|
states: states,
|
|
9196
|
-
color: styles === null || styles === void 0 ? void 0 : (_styles$
|
|
8517
|
+
color: styles === null || styles === void 0 ? void 0 : (_styles$button = styles.button) === null || _styles$button === void 0 ? void 0 : _styles$button.bg
|
|
9197
8518
|
}), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
9198
8519
|
item: true,
|
|
9199
8520
|
xs: 12
|
|
@@ -9215,22 +8536,21 @@ var Step1 = function Step1(_ref) {
|
|
|
9215
8536
|
icon: /*#__PURE__*/React__default.createElement(md.MdOutlineCircle, null),
|
|
9216
8537
|
checkedIcon: /*#__PURE__*/React__default.createElement(gr.GrRadialSelected, null)
|
|
9217
8538
|
}), /*#__PURE__*/React__default.createElement("p", null, "Ship to a different address ")), /*#__PURE__*/React__default.createElement(ButtonRow, {
|
|
9218
|
-
color: styles === null || styles === void 0 ? void 0 : (_styles$
|
|
8539
|
+
color: styles === null || styles === void 0 ? void 0 : (_styles$button2 = styles.button) === null || _styles$button2 === void 0 ? void 0 : _styles$button2.bg,
|
|
9219
8540
|
backDisabled: true,
|
|
9220
8541
|
handleNext: function handleNext() {
|
|
9221
8542
|
next();
|
|
9222
8543
|
},
|
|
9223
|
-
nextDisabled: !
|
|
8544
|
+
nextDisabled: !address || address === 99999999
|
|
9224
8545
|
})));
|
|
9225
8546
|
};
|
|
9226
8547
|
|
|
9227
|
-
var _templateObject$
|
|
8548
|
+
var _templateObject$H;
|
|
9228
8549
|
var Step2 = function Step2(_ref) {
|
|
9229
|
-
var _filter, _addressList$, _addressList, _JSON$parse2, _styles$
|
|
8550
|
+
var _filter, _customer$customerDto, _addressList$, _addressList, _styles$button2, _JSON$parse2, _styles$button3;
|
|
9230
8551
|
var apiEndPoint = _ref.apiEndPoint,
|
|
9231
8552
|
token = _ref.token,
|
|
9232
8553
|
cartData = _ref.cartData,
|
|
9233
|
-
storeDetails = _ref.storeDetails,
|
|
9234
8554
|
handleBack = _ref.handleBack,
|
|
9235
8555
|
_handleNext = _ref.handleNext,
|
|
9236
8556
|
_ref$options = _ref.options,
|
|
@@ -9241,14 +8561,13 @@ var Step2 = function Step2(_ref) {
|
|
|
9241
8561
|
addShipping = _ref.addShipping,
|
|
9242
8562
|
setSelectedCountry = _ref.setSelectedCountry,
|
|
9243
8563
|
showShipping = _ref.showShipping,
|
|
9244
|
-
selectedStore = _ref.selectedStore,
|
|
9245
|
-
stores = _ref.stores,
|
|
9246
8564
|
styles = _ref.styles,
|
|
9247
|
-
|
|
8565
|
+
shippingAddressId = _ref.shippingAddressId,
|
|
9248
8566
|
shippingMethod = _ref.shippingMethod,
|
|
9249
8567
|
storeCredits = _ref.storeCredits,
|
|
9250
8568
|
discountCoupons = _ref.discountCoupons,
|
|
9251
|
-
showShippingPriceRangeLimit = _ref.showShippingPriceRangeLimit
|
|
8569
|
+
showShippingPriceRangeLimit = _ref.showShippingPriceRangeLimit,
|
|
8570
|
+
customer = _ref.customer;
|
|
9252
8571
|
var discountTotal = 0;
|
|
9253
8572
|
discountCoupons === null || discountCoupons === void 0 ? void 0 : discountCoupons.forEach(function (element) {
|
|
9254
8573
|
discountTotal = discountTotal + element.amount;
|
|
@@ -9280,13 +8599,11 @@ var Step2 = function Step2(_ref) {
|
|
|
9280
8599
|
expandCarrier = _React$useState2[0],
|
|
9281
8600
|
setExpandCarrier = _React$useState2[1];
|
|
9282
8601
|
var selectedCountry = watch('country');
|
|
9283
|
-
var shipStore =
|
|
9284
|
-
var selectedStores = stores === null || stores === void 0 ? void 0 : stores.find(function (store) {
|
|
9285
|
-
return (store === null || store === void 0 ? void 0 : store.id) === selectedStore;
|
|
9286
|
-
});
|
|
8602
|
+
var shipStore = null;
|
|
9287
8603
|
var addressList = [];
|
|
9288
|
-
if (
|
|
9289
|
-
|
|
8604
|
+
if (customer !== null && customer !== void 0 && (_customer$customerDto = customer.customerDto) !== null && _customer$customerDto !== void 0 && _customer$customerDto.customerStoreAddressList) {
|
|
8605
|
+
var _customer$customerDto2;
|
|
8606
|
+
addressList = [].concat(customer === null || customer === void 0 ? void 0 : (_customer$customerDto2 = customer.customerDto) === null || _customer$customerDto2 === void 0 ? void 0 : _customer$customerDto2.customerStoreAddressList, [{
|
|
9290
8607
|
address1: 'Add Address',
|
|
9291
8608
|
id: 99999999
|
|
9292
8609
|
}]);
|
|
@@ -9296,12 +8613,11 @@ var Step2 = function Step2(_ref) {
|
|
|
9296
8613
|
id: 99999999
|
|
9297
8614
|
}];
|
|
9298
8615
|
}
|
|
9299
|
-
var _useState = React.useState(parseInt(
|
|
8616
|
+
var _useState = React.useState(parseInt(shippingAddressId) || ((_addressList$ = addressList[0]) === null || _addressList$ === void 0 ? void 0 : _addressList$.id)),
|
|
9300
8617
|
address = _useState[0],
|
|
9301
8618
|
setAddress = _useState[1];
|
|
9302
8619
|
var onSubmit = function onSubmit(data) {
|
|
9303
8620
|
var modifyData = _extends({}, data, {
|
|
9304
|
-
customerStoreId: selectedStores === null || selectedStores === void 0 ? void 0 : selectedStores.id,
|
|
9305
8621
|
active: true
|
|
9306
8622
|
});
|
|
9307
8623
|
addShipping(modifyData);
|
|
@@ -9312,8 +8628,8 @@ var Step2 = function Step2(_ref) {
|
|
|
9312
8628
|
}, [selectedCountry]);
|
|
9313
8629
|
React.useEffect(function () {
|
|
9314
8630
|
var _addressList$2;
|
|
9315
|
-
setAddress(parseInt(
|
|
9316
|
-
}, [
|
|
8631
|
+
setAddress(parseInt(shippingAddressId) || ((_addressList$2 = addressList[0]) === null || _addressList$2 === void 0 ? void 0 : _addressList$2.id));
|
|
8632
|
+
}, []);
|
|
9317
8633
|
var deliveryOption = function deliveryOption(option, i) {
|
|
9318
8634
|
var _styles$input, _styles$input2, _styles$button, _option$amount, _option$amount2;
|
|
9319
8635
|
return /*#__PURE__*/React__default.createElement(DeliveryOptionContainer, {
|
|
@@ -9353,21 +8669,21 @@ var Step2 = function Step2(_ref) {
|
|
|
9353
8669
|
}) : "$" + (option === null || option === void 0 ? void 0 : (_option$amount = option.amount) === null || _option$amount === void 0 ? void 0 : _option$amount.toFixed(2)) : "$" + (option === null || option === void 0 ? void 0 : (_option$amount2 = option.amount) === null || _option$amount2 === void 0 ? void 0 : _option$amount2.toFixed(2)))), (option === null || option === void 0 ? void 0 : option.id) === (expandCarrier === null || expandCarrier === void 0 ? void 0 : expandCarrier.id) && ((option === null || option === void 0 ? void 0 : option.code) || (option === null || option === void 0 ? void 0 : option.parentShippingId)) && /*#__PURE__*/React__default.createElement(InnerOptionRow, {
|
|
9354
8670
|
carrier: expandCarrier,
|
|
9355
8671
|
shipStore: shipStore,
|
|
9356
|
-
|
|
8672
|
+
customer: customer,
|
|
9357
8673
|
cartData: cartData
|
|
9358
8674
|
}));
|
|
9359
8675
|
};
|
|
9360
8676
|
var InnerOption = function InnerOption(_ref2) {
|
|
9361
|
-
var
|
|
8677
|
+
var _customer$customerDto3, _customer$customerDto4, _customer$customerDto5;
|
|
9362
8678
|
var carrier = _ref2.carrier,
|
|
9363
8679
|
shipStore = _ref2.shipStore,
|
|
9364
|
-
|
|
8680
|
+
customer = _ref2.customer,
|
|
9365
8681
|
cartData = _ref2.cartData;
|
|
9366
8682
|
var shipObj = {
|
|
9367
8683
|
carrierCode: carrier === null || carrier === void 0 ? void 0 : carrier.code,
|
|
9368
8684
|
serviceCode: carrier === null || carrier === void 0 ? void 0 : carrier.serviceCode,
|
|
9369
8685
|
fromPostalCode: shipStore === null || shipStore === void 0 ? void 0 : shipStore.zip,
|
|
9370
|
-
toPostalCode:
|
|
8686
|
+
toPostalCode: customer === null || customer === void 0 ? void 0 : (_customer$customerDto3 = customer.customerDto) === null || _customer$customerDto3 === void 0 ? void 0 : (_customer$customerDto4 = _customer$customerDto3.customerStoreAddressList) === null || _customer$customerDto4 === void 0 ? void 0 : (_customer$customerDto5 = _customer$customerDto4[0]) === null || _customer$customerDto5 === void 0 ? void 0 : _customer$customerDto5.zip,
|
|
9371
8687
|
toCountry: 'US',
|
|
9372
8688
|
weight: {
|
|
9373
8689
|
value: (cartData === null || cartData === void 0 ? void 0 : cartData.totalWeight) || 1,
|
|
@@ -9456,7 +8772,8 @@ var Step2 = function Step2(_ref) {
|
|
|
9456
8772
|
onSubmit: onSubmit,
|
|
9457
8773
|
handleSubmit: handleSubmit,
|
|
9458
8774
|
countries: countries,
|
|
9459
|
-
states: states
|
|
8775
|
+
states: states,
|
|
8776
|
+
color: styles === null || styles === void 0 ? void 0 : (_styles$button2 = styles.button) === null || _styles$button2 === void 0 ? void 0 : _styles$button2.bg
|
|
9460
8777
|
}), /*#__PURE__*/React__default.createElement(StepsHeaderComponent, {
|
|
9461
8778
|
text: 'shipping method',
|
|
9462
8779
|
icon: /*#__PURE__*/React__default.createElement(fi.FiTruck, {
|
|
@@ -9500,10 +8817,10 @@ var Step2 = function Step2(_ref) {
|
|
|
9500
8817
|
_handleNext();
|
|
9501
8818
|
},
|
|
9502
8819
|
nextDisabled: !method || showShipping && !address || (address === null || address === void 0 ? void 0 : address.id) === 99999999,
|
|
9503
|
-
color: styles === null || styles === void 0 ? void 0 : (_styles$
|
|
8820
|
+
color: styles === null || styles === void 0 ? void 0 : (_styles$button3 = styles.button) === null || _styles$button3 === void 0 ? void 0 : _styles$button3.bg
|
|
9504
8821
|
})));
|
|
9505
8822
|
};
|
|
9506
|
-
var ImageContainer$1 = styled__default(material.CardMedia)(_templateObject$
|
|
8823
|
+
var ImageContainer$1 = styled__default(material.CardMedia)(_templateObject$H || (_templateObject$H = _taggedTemplateLiteralLoose(["\n max-width: 100%;\n max-height: 3rem,\n border-radius: 14px;\n img {\n max-width: 100%;\n }\n"])));
|
|
9507
8824
|
|
|
9508
8825
|
var CreditCardForm = function CreditCardForm(_ref) {
|
|
9509
8826
|
var _React$createElement, _React$createElement2;
|
|
@@ -9872,7 +9189,7 @@ var PaymentForm = /*#__PURE__*/function (_React$Component) {
|
|
|
9872
9189
|
}(React__default.Component);
|
|
9873
9190
|
|
|
9874
9191
|
var Step3 = function Step3(_ref) {
|
|
9875
|
-
var
|
|
9192
|
+
var _customer$customerDto, _selectedMethod$name, _filter, _styles$button2;
|
|
9876
9193
|
var apiEndPoint = _ref.apiEndPoint,
|
|
9877
9194
|
token = _ref.token,
|
|
9878
9195
|
authoriseDotNet = _ref.authoriseDotNet,
|
|
@@ -9887,8 +9204,8 @@ var Step3 = function Step3(_ref) {
|
|
|
9887
9204
|
countries = _ref.countries,
|
|
9888
9205
|
setSelectedCountry = _ref.setSelectedCountry,
|
|
9889
9206
|
shippingMethod = _ref.shippingMethod,
|
|
9890
|
-
|
|
9891
|
-
var _useState = React.useState(payments && payments[0]),
|
|
9207
|
+
customer = _ref.customer;
|
|
9208
|
+
var _useState = React.useState(payments && (payments === null || payments === void 0 ? void 0 : payments[0])),
|
|
9892
9209
|
selectedMethod = _useState[0],
|
|
9893
9210
|
setSelectedMethod = _useState[1];
|
|
9894
9211
|
var _useState2 = React.useState(true),
|
|
@@ -9897,7 +9214,7 @@ var Step3 = function Step3(_ref) {
|
|
|
9897
9214
|
var _useState3 = React.useState(null),
|
|
9898
9215
|
card = _useState3[0],
|
|
9899
9216
|
setCard = _useState3[1];
|
|
9900
|
-
var customerId =
|
|
9217
|
+
var customerId = customer === null || customer === void 0 ? void 0 : (_customer$customerDto = customer.customerDto) === null || _customer$customerDto === void 0 ? void 0 : _customer$customerDto.id;
|
|
9901
9218
|
var _useState4 = React.useState(),
|
|
9902
9219
|
creditCardListData = _useState4[0],
|
|
9903
9220
|
setCreditCardListData = _useState4[1];
|
|
@@ -10103,19 +9420,40 @@ var Step4 = function Step4(_ref) {
|
|
|
10103
9420
|
shippingMethod = _ref.shippingMethod,
|
|
10104
9421
|
_ref$discountCoupons = _ref.discountCoupons,
|
|
10105
9422
|
discountCoupons = _ref$discountCoupons === void 0 ? [] : _ref$discountCoupons,
|
|
10106
|
-
shippingText = _ref.shippingText
|
|
9423
|
+
shippingText = _ref.shippingText,
|
|
9424
|
+
customer = _ref.customer;
|
|
10107
9425
|
var _React$useState = React__default.useState(false),
|
|
10108
9426
|
checked = _React$useState[0],
|
|
10109
9427
|
setChecked = _React$useState[1];
|
|
10110
|
-
var _React$useState2 = React__default.useState(
|
|
10111
|
-
|
|
10112
|
-
|
|
9428
|
+
var _React$useState2 = React__default.useState(false),
|
|
9429
|
+
openConsentForm = _React$useState2[0],
|
|
9430
|
+
setOpenConsentForm = _React$useState2[1];
|
|
9431
|
+
var _React$useState3 = React__default.useState(''),
|
|
9432
|
+
comments = _React$useState3[0],
|
|
9433
|
+
setComments = _React$useState3[1];
|
|
10113
9434
|
var discountTotal = 0;
|
|
10114
9435
|
discountCoupons === null || discountCoupons === void 0 ? void 0 : discountCoupons.forEach(function (element) {
|
|
10115
9436
|
discountTotal = discountTotal + element.amount;
|
|
10116
9437
|
});
|
|
10117
9438
|
var storeCr = storeCredits > (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice) + ((shippingMethod === null || shippingMethod === void 0 ? void 0 : shippingMethod.amount) || 0) ? (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice) + ((shippingMethod === null || shippingMethod === void 0 ? void 0 : shippingMethod.amount) || 0) : storeCredits;
|
|
10118
|
-
return /*#__PURE__*/React__default.createElement(
|
|
9439
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, openConsentForm && /*#__PURE__*/React__default.createElement(ConsentForm, {
|
|
9440
|
+
open: openConsentForm,
|
|
9441
|
+
onCancel: function onCancel() {
|
|
9442
|
+
try {
|
|
9443
|
+
setOpenConsentForm(false);
|
|
9444
|
+
return Promise.resolve();
|
|
9445
|
+
} catch (e) {
|
|
9446
|
+
return Promise.reject(e);
|
|
9447
|
+
}
|
|
9448
|
+
},
|
|
9449
|
+
onSubmit: function onSubmit() {
|
|
9450
|
+
try {
|
|
9451
|
+
return Promise.resolve(placeOrder(comments)).then(function () {});
|
|
9452
|
+
} catch (e) {
|
|
9453
|
+
return Promise.reject(e);
|
|
9454
|
+
}
|
|
9455
|
+
}
|
|
9456
|
+
}), /*#__PURE__*/React__default.createElement(StepContainer, null, /*#__PURE__*/React__default.createElement(StepsHeaderComponent, {
|
|
10119
9457
|
text: 'Order Review',
|
|
10120
9458
|
icon: /*#__PURE__*/React__default.createElement(md.MdOutlineStickyNote2, {
|
|
10121
9459
|
className: "icon"
|
|
@@ -10334,22 +9672,37 @@ var Step4 = function Step4(_ref) {
|
|
|
10334
9672
|
}
|
|
10335
9673
|
}, "back"), /*#__PURE__*/React__default.createElement("button", {
|
|
10336
9674
|
onClick: function onClick(e) {
|
|
10337
|
-
|
|
10338
|
-
|
|
10339
|
-
|
|
10340
|
-
|
|
10341
|
-
|
|
9675
|
+
try {
|
|
9676
|
+
e.preventDefault();
|
|
9677
|
+
var _temp2 = function () {
|
|
9678
|
+
if (checked) {
|
|
9679
|
+
var _temp = function (_customer$customerDto) {
|
|
9680
|
+
if (customer !== null && customer !== void 0 && (_customer$customerDto = customer.customerDto) !== null && _customer$customerDto !== void 0 && _customer$customerDto.taxable && shippingMethod !== null && shippingMethod !== void 0 && shippingMethod.id) {
|
|
9681
|
+
return Promise.resolve(placeOrder(comments)).then(function () {});
|
|
9682
|
+
} else {
|
|
9683
|
+
return Promise.resolve(placeOrder(comments)).then(function () {});
|
|
9684
|
+
}
|
|
9685
|
+
}();
|
|
9686
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
9687
|
+
} else {
|
|
9688
|
+
alert('please accept the privacy policy');
|
|
9689
|
+
}
|
|
9690
|
+
}();
|
|
9691
|
+
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
|
|
9692
|
+
} catch (e) {
|
|
9693
|
+
return Promise.reject(e);
|
|
10342
9694
|
}
|
|
10343
9695
|
},
|
|
10344
9696
|
type: "submit",
|
|
10345
|
-
className: "primaryBgColor"
|
|
9697
|
+
className: "primaryBgColor",
|
|
9698
|
+
disabled: loading
|
|
10346
9699
|
}, loading ? /*#__PURE__*/React__default.createElement(material.CircularProgress, {
|
|
10347
9700
|
color: "inherit",
|
|
10348
9701
|
size: 15,
|
|
10349
9702
|
style: {
|
|
10350
9703
|
margin: '0 2.8em'
|
|
10351
9704
|
}
|
|
10352
|
-
}) : 'place order')))))));
|
|
9705
|
+
}) : 'place order'))))))));
|
|
10353
9706
|
};
|
|
10354
9707
|
|
|
10355
9708
|
var steps = [{
|
|
@@ -10379,54 +9732,349 @@ var steps = [{
|
|
|
10379
9732
|
})
|
|
10380
9733
|
}];
|
|
10381
9734
|
var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
10382
|
-
var _styles$input, _styles$checkoutSumma, _styles$checkoutSumma2;
|
|
9735
|
+
var _styles$input, _customer$customerDto9, _customer$customerDto10, _customer$customerDto11, _customer$customerDto12, _styles$checkoutSumma, _styles$checkoutSumma2;
|
|
10383
9736
|
var apiEndPoint = _ref.apiEndPoint,
|
|
10384
9737
|
token = _ref.token,
|
|
10385
9738
|
authoriseDotNet = _ref.authoriseDotNet,
|
|
10386
|
-
storeDetails = _ref.storeDetails,
|
|
10387
|
-
currStep = _ref.currStep,
|
|
10388
9739
|
styles = _ref.styles,
|
|
10389
|
-
handleNext = _ref.handleNext,
|
|
10390
|
-
handleBack = _ref.handleBack,
|
|
10391
|
-
loading = _ref.loading,
|
|
10392
|
-
handleLogin = _ref.handleLogin,
|
|
10393
|
-
userName = _ref.userName,
|
|
10394
|
-
addStore = _ref.addStore,
|
|
10395
|
-
setBilling = _ref.setBilling,
|
|
10396
|
-
setShowShipping = _ref.setShowShipping,
|
|
10397
|
-
userStores = _ref.userStores,
|
|
10398
|
-
selectedStore = _ref.selectedStore,
|
|
10399
|
-
setSelectedStore = _ref.setSelectedStore,
|
|
10400
|
-
addStoreAddress = _ref.addStoreAddress,
|
|
10401
|
-
setSelectedCountry = _ref.setSelectedCountry,
|
|
10402
|
-
countries = _ref.countries,
|
|
10403
|
-
states = _ref.states,
|
|
10404
|
-
setShipping = _ref.setShipping,
|
|
10405
|
-
showShipping = _ref.showShipping,
|
|
10406
|
-
deliveryOptions = _ref.deliveryOptions,
|
|
10407
|
-
setPaymentDetails = _ref.setPaymentDetails,
|
|
10408
|
-
paymentMethods = _ref.paymentMethods,
|
|
10409
|
-
storeCredits = _ref.storeCredits,
|
|
10410
|
-
selectedStoreCredits = _ref.selectedStoreCredits,
|
|
10411
9740
|
cartData = _ref.cartData,
|
|
10412
|
-
|
|
10413
|
-
clickRedirect = _ref.clickRedirect,
|
|
10414
|
-
ordering = _ref.ordering,
|
|
10415
|
-
deliveryCharges = _ref.deliveryCharges,
|
|
9741
|
+
handleLogin = _ref.handleLogin,
|
|
10416
9742
|
placeOrder = _ref.placeOrder,
|
|
10417
|
-
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
shippingMethod = _ref.shippingMethod,
|
|
10421
|
-
discountCoupons = _ref.discountCoupons,
|
|
9743
|
+
_ref$discountCoupons = _ref.discountCoupons,
|
|
9744
|
+
discountCoupons = _ref$discountCoupons === void 0 ? [] : _ref$discountCoupons,
|
|
9745
|
+
clickRedirect = _ref.clickRedirect,
|
|
10422
9746
|
shippingText = _ref.shippingText,
|
|
10423
|
-
showShippingPriceRangeLimit = _ref.showShippingPriceRangeLimit
|
|
10424
|
-
|
|
10425
|
-
|
|
10426
|
-
|
|
9747
|
+
showShippingPriceRangeLimit = _ref.showShippingPriceRangeLimit,
|
|
9748
|
+
taxPercentage = _ref.taxPercentage;
|
|
9749
|
+
var _useState = React.useState(false),
|
|
9750
|
+
loginLoading = _useState[0],
|
|
9751
|
+
setLoginLoading = _useState[1];
|
|
9752
|
+
var _useState2 = React.useState(false),
|
|
9753
|
+
ordering = _useState2[0],
|
|
9754
|
+
setOrdering = _useState2[1];
|
|
9755
|
+
var _useState3 = React.useState(),
|
|
9756
|
+
customer = _useState3[0],
|
|
9757
|
+
setCustomer = _useState3[1];
|
|
9758
|
+
var _useState4 = React.useState(0),
|
|
9759
|
+
currStep = _useState4[0],
|
|
9760
|
+
setCurrStep = _useState4[1];
|
|
9761
|
+
var _useState5 = React.useState([]),
|
|
9762
|
+
deliveryOptions = _useState5[0],
|
|
9763
|
+
setDeliveryOptions = _useState5[1];
|
|
9764
|
+
var _useState6 = React.useState([]),
|
|
9765
|
+
paymentMethods = _useState6[0],
|
|
9766
|
+
setPaymentMethods = _useState6[1];
|
|
9767
|
+
var _useState7 = React.useState(),
|
|
9768
|
+
billingAddressId = _useState7[0],
|
|
9769
|
+
setBillingAddressId = _useState7[1];
|
|
9770
|
+
var _useState8 = React.useState(),
|
|
9771
|
+
shippingAddressId = _useState8[0],
|
|
9772
|
+
setShippingAddressId = _useState8[1];
|
|
9773
|
+
var _useState9 = React.useState(false),
|
|
9774
|
+
showShipping = _useState9[0],
|
|
9775
|
+
setShowShipping = _useState9[1];
|
|
9776
|
+
var _useState10 = React.useState(),
|
|
9777
|
+
shippingMethod = _useState10[0],
|
|
9778
|
+
setShippingMethod = _useState10[1];
|
|
9779
|
+
var _useState11 = React.useState(),
|
|
9780
|
+
selectedPaymentMethod = _useState11[0],
|
|
9781
|
+
setSelectedPaymentMethod = _useState11[1];
|
|
9782
|
+
var _useState12 = React.useState(),
|
|
9783
|
+
selectedStoreCredits = _useState12[0],
|
|
9784
|
+
setStoreCredits = _useState12[1];
|
|
9785
|
+
var _useState13 = React.useState(),
|
|
9786
|
+
selectedCountry = _useState13[0],
|
|
9787
|
+
setSelectedCountry = _useState13[1];
|
|
9788
|
+
var _useState14 = React.useState([]),
|
|
9789
|
+
countries = _useState14[0],
|
|
9790
|
+
setCountries = _useState14[1];
|
|
9791
|
+
var _useState15 = React.useState([]),
|
|
9792
|
+
states = _useState15[0],
|
|
9793
|
+
setStates = _useState15[1];
|
|
9794
|
+
var _useState16 = React.useState(),
|
|
9795
|
+
card = _useState16[0],
|
|
9796
|
+
setCard = _useState16[1];
|
|
9797
|
+
var discountTotal = 0;
|
|
9798
|
+
discountCoupons === null || discountCoupons === void 0 ? void 0 : discountCoupons.forEach(function (element) {
|
|
9799
|
+
discountTotal = discountTotal + element.amount;
|
|
9800
|
+
});
|
|
9801
|
+
React.useEffect(function () {
|
|
9802
|
+
if (apiEndPoint && token) {
|
|
9803
|
+
(function () {
|
|
9804
|
+
return _catch(function () {
|
|
9805
|
+
return Promise.resolve(getCountry({
|
|
9806
|
+
apiEndPoint: apiEndPoint,
|
|
9807
|
+
token: token
|
|
9808
|
+
})).then(function (countryData) {
|
|
9809
|
+
var _countryData$;
|
|
9810
|
+
if (!countryData) return;
|
|
9811
|
+
setSelectedCountry(countryData === null || countryData === void 0 ? void 0 : (_countryData$ = countryData[0]) === null || _countryData$ === void 0 ? void 0 : _countryData$.id);
|
|
9812
|
+
setCountries(countryData);
|
|
9813
|
+
});
|
|
9814
|
+
}, function () {});
|
|
9815
|
+
})();
|
|
9816
|
+
}
|
|
9817
|
+
}, [token]);
|
|
9818
|
+
React.useEffect(function () {
|
|
9819
|
+
if (apiEndPoint && token) {
|
|
9820
|
+
(function () {
|
|
9821
|
+
return _catch(function () {
|
|
9822
|
+
var _temp = function () {
|
|
9823
|
+
if (selectedCountry) {
|
|
9824
|
+
return Promise.resolve(getStatesById({
|
|
9825
|
+
id: selectedCountry,
|
|
9826
|
+
apiEndPoint: apiEndPoint,
|
|
9827
|
+
token: token
|
|
9828
|
+
})).then(function (statesData) {
|
|
9829
|
+
setStates(statesData);
|
|
9830
|
+
});
|
|
9831
|
+
}
|
|
9832
|
+
}();
|
|
9833
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
9834
|
+
}, function () {});
|
|
9835
|
+
})();
|
|
9836
|
+
}
|
|
9837
|
+
}, [selectedCountry, token]);
|
|
9838
|
+
React.useEffect(function () {
|
|
9839
|
+
(function () {
|
|
9840
|
+
try {
|
|
9841
|
+
var _temp7 = function () {
|
|
9842
|
+
if (apiEndPoint && token) {
|
|
9843
|
+
var _temp6 = function _temp6() {
|
|
9844
|
+
function _temp4() {
|
|
9845
|
+
var _temp2 = _catch(function () {
|
|
9846
|
+
return Promise.resolve(API$1({
|
|
9847
|
+
apiEndPoint: apiEndPoint,
|
|
9848
|
+
token: token,
|
|
9849
|
+
url: "/store/paymentMode"
|
|
9850
|
+
})).then(function (data) {
|
|
9851
|
+
setPaymentMethods(data);
|
|
9852
|
+
});
|
|
9853
|
+
}, function () {});
|
|
9854
|
+
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
9855
|
+
}
|
|
9856
|
+
var _temp3 = _catch(function () {
|
|
9857
|
+
return Promise.resolve(API$1({
|
|
9858
|
+
apiEndPoint: apiEndPoint,
|
|
9859
|
+
token: token,
|
|
9860
|
+
url: "/shipping/options"
|
|
9861
|
+
})).then(function (data) {
|
|
9862
|
+
setDeliveryOptions(data);
|
|
9863
|
+
});
|
|
9864
|
+
}, function () {});
|
|
9865
|
+
return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
|
|
9866
|
+
};
|
|
9867
|
+
var _temp5 = _catch(function () {
|
|
9868
|
+
return Promise.resolve(API$1({
|
|
9869
|
+
apiEndPoint: apiEndPoint,
|
|
9870
|
+
token: token,
|
|
9871
|
+
url: "/ecommerce/customer"
|
|
9872
|
+
})).then(function (data) {
|
|
9873
|
+
setCustomer(data);
|
|
9874
|
+
});
|
|
9875
|
+
}, function () {});
|
|
9876
|
+
return _temp5 && _temp5.then ? _temp5.then(_temp6) : _temp6(_temp5);
|
|
9877
|
+
}
|
|
9878
|
+
}();
|
|
9879
|
+
return _temp7 && _temp7.then ? _temp7.then(function () {}) : void 0;
|
|
9880
|
+
} catch (e) {
|
|
9881
|
+
Promise.reject(e);
|
|
9882
|
+
}
|
|
9883
|
+
})();
|
|
9884
|
+
}, [token]);
|
|
9885
|
+
React.useEffect(function () {
|
|
9886
|
+
if (customer) {
|
|
9887
|
+
if (currStep === 0) setCurrStep(1);
|
|
9888
|
+
} else {
|
|
9889
|
+
setCurrStep(0);
|
|
9890
|
+
}
|
|
9891
|
+
}, [customer, currStep]);
|
|
9892
|
+
var onLoginCustomer = function onLoginCustomer(data) {
|
|
9893
|
+
try {
|
|
9894
|
+
var _temp9 = function _temp9() {
|
|
9895
|
+
setLoginLoading(false);
|
|
9896
|
+
};
|
|
9897
|
+
setLoginLoading(true);
|
|
9898
|
+
var _temp8 = _catch(function () {
|
|
9899
|
+
return Promise.resolve(handleLogin(data)).then(function () {});
|
|
9900
|
+
}, function () {});
|
|
9901
|
+
return Promise.resolve(_temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8));
|
|
9902
|
+
} catch (e) {
|
|
9903
|
+
return Promise.reject(e);
|
|
9904
|
+
}
|
|
9905
|
+
};
|
|
9906
|
+
var addStoreAddress = function addStoreAddress(data) {
|
|
9907
|
+
try {
|
|
9908
|
+
var _temp11 = _catch(function () {
|
|
9909
|
+
var _customer$customerDto, _customer$customerDto2;
|
|
9910
|
+
return Promise.resolve(API$1({
|
|
9911
|
+
apiEndPoint: apiEndPoint,
|
|
9912
|
+
token: token,
|
|
9913
|
+
method: 'POST',
|
|
9914
|
+
url: "/ecommerce/customer/" + (customer === null || customer === void 0 ? void 0 : (_customer$customerDto = customer.customerDto) === null || _customer$customerDto === void 0 ? void 0 : _customer$customerDto.id) + "/address",
|
|
9915
|
+
body: _extends({}, data, {
|
|
9916
|
+
customerId: customer === null || customer === void 0 ? void 0 : (_customer$customerDto2 = customer.customerDto) === null || _customer$customerDto2 === void 0 ? void 0 : _customer$customerDto2.id
|
|
9917
|
+
}),
|
|
9918
|
+
successMessage: 'Address added successfully.',
|
|
9919
|
+
errorMessage: 'Error in added the address.'
|
|
9920
|
+
})).then(function (result) {
|
|
9921
|
+
var _temp10 = function () {
|
|
9922
|
+
if (result) {
|
|
9923
|
+
return Promise.resolve(API$1({
|
|
9924
|
+
apiEndPoint: apiEndPoint,
|
|
9925
|
+
token: token,
|
|
9926
|
+
url: "/ecommerce/customer"
|
|
9927
|
+
})).then(function (customerData) {
|
|
9928
|
+
setCustomer(customerData);
|
|
9929
|
+
});
|
|
9930
|
+
}
|
|
9931
|
+
}();
|
|
9932
|
+
if (_temp10 && _temp10.then) return _temp10.then(function () {});
|
|
9933
|
+
});
|
|
9934
|
+
}, function () {});
|
|
9935
|
+
return Promise.resolve(_temp11 && _temp11.then ? _temp11.then(function () {}) : void 0);
|
|
9936
|
+
} catch (e) {
|
|
9937
|
+
return Promise.reject(e);
|
|
9938
|
+
}
|
|
9939
|
+
};
|
|
9940
|
+
var handleBack = function handleBack() {
|
|
9941
|
+
setCurrStep(function (prev) {
|
|
9942
|
+
return prev > 1 ? prev - 1 : prev;
|
|
9943
|
+
});
|
|
9944
|
+
};
|
|
9945
|
+
var handleNext = function handleNext() {
|
|
9946
|
+
setCurrStep(function (prev) {
|
|
9947
|
+
return prev < 4 ? prev + 1 : prev;
|
|
9948
|
+
});
|
|
9949
|
+
};
|
|
9950
|
+
var setBilling = function setBilling(data) {
|
|
9951
|
+
setBillingAddressId(data);
|
|
9952
|
+
};
|
|
9953
|
+
var setShipping = function setShipping(shippingAddressId, shippingMethod) {
|
|
9954
|
+
setShippingAddressId(shippingAddressId);
|
|
9955
|
+
setShippingMethod(shippingMethod);
|
|
9956
|
+
};
|
|
9957
|
+
var setPaymentDetails = function setPaymentDetails(storeCr, paymentMethod, cr) {
|
|
9958
|
+
var _customer$customerDto3;
|
|
9959
|
+
if (storeCr && (customer === null || customer === void 0 ? void 0 : (_customer$customerDto3 = customer.customerDto) === null || _customer$customerDto3 === void 0 ? void 0 : _customer$customerDto3.storeCredit) > 0) {
|
|
9960
|
+
var _customer$customerDto4;
|
|
9961
|
+
setStoreCredits({
|
|
9962
|
+
id: 5,
|
|
9963
|
+
amount: customer === null || customer === void 0 ? void 0 : (_customer$customerDto4 = customer.customerDto) === null || _customer$customerDto4 === void 0 ? void 0 : _customer$customerDto4.storeCredit
|
|
9964
|
+
});
|
|
9965
|
+
} else {
|
|
9966
|
+
setStoreCredits(null);
|
|
9967
|
+
}
|
|
9968
|
+
if (cr && cr !== false) {
|
|
9969
|
+
setCard(cr);
|
|
9970
|
+
} else {
|
|
9971
|
+
setCard(false);
|
|
9972
|
+
}
|
|
9973
|
+
if (paymentMethod) {
|
|
9974
|
+
setSelectedPaymentMethod(paymentMethod);
|
|
9975
|
+
}
|
|
9976
|
+
};
|
|
9977
|
+
var onPlaceOrder = function onPlaceOrder(note) {
|
|
9978
|
+
try {
|
|
9979
|
+
var _temp13 = function _temp13() {
|
|
9980
|
+
setOrdering(false);
|
|
9981
|
+
};
|
|
9982
|
+
setOrdering(true);
|
|
9983
|
+
var _temp12 = _catch(function () {
|
|
9984
|
+
var _shippingMethod$amoun, _cartData$totalCartPr, _ref2;
|
|
9985
|
+
var tax = taxPercentage ? taxPercentage / 100 * (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice) : 0;
|
|
9986
|
+
var authorizeCustomerCardData = {
|
|
9987
|
+
authorizeDotNetCustomerProfileId: selectedPaymentMethod === null || selectedPaymentMethod === void 0 ? void 0 : selectedPaymentMethod.authorizeDotNetCustomerProfileId,
|
|
9988
|
+
authorizeDotNetCustomerPaymentProfileId: selectedPaymentMethod === null || selectedPaymentMethod === void 0 ? void 0 : selectedPaymentMethod.authorizeDotNetCustomerPaymentProfileId
|
|
9989
|
+
};
|
|
9990
|
+
var orderDto = {
|
|
9991
|
+
customerBillingAddressId: billingAddressId,
|
|
9992
|
+
customerId: null,
|
|
9993
|
+
customerNotes: '',
|
|
9994
|
+
customerShippingAddressId: shippingAddressId,
|
|
9995
|
+
discount: 0,
|
|
9996
|
+
internalNotes: '',
|
|
9997
|
+
invoiceTimestamp: null,
|
|
9998
|
+
paymentTermsId: 1,
|
|
9999
|
+
preferredPaymentMethodId: selectedPaymentMethod === null || selectedPaymentMethod === void 0 ? void 0 : selectedPaymentMethod.id,
|
|
10000
|
+
preferredPaymentModeId: selectedPaymentMethod === null || selectedPaymentMethod === void 0 ? void 0 : selectedPaymentMethod.id,
|
|
10001
|
+
preferredShippingModeId: shippingMethod === null || shippingMethod === void 0 ? void 0 : shippingMethod.id,
|
|
10002
|
+
primarySalesRepresentativeId: 1,
|
|
10003
|
+
shipTimestamp: null,
|
|
10004
|
+
shippingAmount: shippingMethod === null || shippingMethod === void 0 ? void 0 : (_shippingMethod$amoun = shippingMethod.amount) === null || _shippingMethod$amoun === void 0 ? void 0 : _shippingMethod$amoun.toFixed(2),
|
|
10005
|
+
orderNotes: note,
|
|
10006
|
+
status: 'Pro Forma',
|
|
10007
|
+
storeId: 1,
|
|
10008
|
+
subTotal: cartData === null || cartData === void 0 ? void 0 : (_cartData$totalCartPr = cartData.totalCartPrice) === null || _cartData$totalCartPr === void 0 ? void 0 : _cartData$totalCartPr.toFixed(2),
|
|
10009
|
+
taxAmount: tax === null || tax === void 0 ? void 0 : tax.toFixed(2),
|
|
10010
|
+
totalAmount: (_ref2 = (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice) + tax + ((shippingMethod === null || shippingMethod === void 0 ? void 0 : shippingMethod.amount) || 0)) === null || _ref2 === void 0 ? void 0 : _ref2.toFixed(2),
|
|
10011
|
+
totalQuantity: cartData === null || cartData === void 0 ? void 0 : cartData.totalCartQuantity
|
|
10012
|
+
};
|
|
10013
|
+
var orderPaymentList;
|
|
10014
|
+
var ecommerceCustomPaymentDto = null;
|
|
10015
|
+
if (card) {
|
|
10016
|
+
var cardData = authoriseDotNet ? {
|
|
10017
|
+
firstName: card === null || card === void 0 ? void 0 : card.firstName,
|
|
10018
|
+
lastName: card === null || card === void 0 ? void 0 : card.lastName
|
|
10019
|
+
} : {
|
|
10020
|
+
cardName: (card === null || card === void 0 ? void 0 : card.firstName) + (card === null || card === void 0 ? void 0 : card.firstName) ? ' ' : '' + (card === null || card === void 0 ? void 0 : card.lastName)
|
|
10021
|
+
};
|
|
10022
|
+
ecommerceCustomPaymentDto = _extends({}, cardData, {
|
|
10023
|
+
cardNumber: card === null || card === void 0 ? void 0 : card.cardNumber,
|
|
10024
|
+
expirationMonth: card === null || card === void 0 ? void 0 : card.expirationMonth,
|
|
10025
|
+
expirationYear: card === null || card === void 0 ? void 0 : card.expirationYear,
|
|
10026
|
+
cvv: card === null || card === void 0 ? void 0 : card.cvv,
|
|
10027
|
+
address: card === null || card === void 0 ? void 0 : card.address,
|
|
10028
|
+
city: card === null || card === void 0 ? void 0 : card.city,
|
|
10029
|
+
stateId: card === null || card === void 0 ? void 0 : card.stateId,
|
|
10030
|
+
zipcode: card === null || card === void 0 ? void 0 : card.zipcode,
|
|
10031
|
+
countryId: card === null || card === void 0 ? void 0 : card.countryId
|
|
10032
|
+
});
|
|
10033
|
+
}
|
|
10034
|
+
if (selectedStoreCredits && (selectedStoreCredits === null || selectedStoreCredits === void 0 ? void 0 : selectedStoreCredits.amount) > (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice) + tax + ((shippingMethod === null || shippingMethod === void 0 ? void 0 : shippingMethod.amount) || 0) - discountTotal) {
|
|
10035
|
+
var _ref3;
|
|
10036
|
+
orderPaymentList = [{
|
|
10037
|
+
amount: (_ref3 = (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice) + tax + ((shippingMethod === null || shippingMethod === void 0 ? void 0 : shippingMethod.amount) || 0) - discountTotal) === null || _ref3 === void 0 ? void 0 : _ref3.toFixed(2),
|
|
10038
|
+
paymentModeId: selectedStoreCredits === null || selectedStoreCredits === void 0 ? void 0 : selectedStoreCredits.id
|
|
10039
|
+
}];
|
|
10040
|
+
} else if (selectedStoreCredits && (selectedStoreCredits === null || selectedStoreCredits === void 0 ? void 0 : selectedStoreCredits.amount) < (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice) + tax + ((shippingMethod === null || shippingMethod === void 0 ? void 0 : shippingMethod.amount) || 0) - discountTotal) {
|
|
10041
|
+
var _selectedStoreCredits, _ref4;
|
|
10042
|
+
orderPaymentList = [{
|
|
10043
|
+
amount: selectedStoreCredits === null || selectedStoreCredits === void 0 ? void 0 : (_selectedStoreCredits = selectedStoreCredits.amount) === null || _selectedStoreCredits === void 0 ? void 0 : _selectedStoreCredits.toFixed(2),
|
|
10044
|
+
paymentModeId: selectedStoreCredits === null || selectedStoreCredits === void 0 ? void 0 : selectedStoreCredits.id
|
|
10045
|
+
}, _extends({
|
|
10046
|
+
amount: (_ref4 = (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice) + tax + ((shippingMethod === null || shippingMethod === void 0 ? void 0 : shippingMethod.amount) || 0) - (selectedStoreCredits === null || selectedStoreCredits === void 0 ? void 0 : selectedStoreCredits.amount) - discountTotal) === null || _ref4 === void 0 ? void 0 : _ref4.toFixed(2),
|
|
10047
|
+
paymentModeId: selectedPaymentMethod === null || selectedPaymentMethod === void 0 ? void 0 : selectedPaymentMethod.id
|
|
10048
|
+
}, authorizeCustomerCardData)];
|
|
10049
|
+
} else {
|
|
10050
|
+
var _ref5;
|
|
10051
|
+
orderPaymentList = [_extends({
|
|
10052
|
+
amount: (_ref5 = (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice) + tax + ((shippingMethod === null || shippingMethod === void 0 ? void 0 : shippingMethod.amount) || 0) - discountTotal) === null || _ref5 === void 0 ? void 0 : _ref5.toFixed(2),
|
|
10053
|
+
paymentModeId: selectedPaymentMethod === null || selectedPaymentMethod === void 0 ? void 0 : selectedPaymentMethod.id,
|
|
10054
|
+
customerOrderCard: ecommerceCustomPaymentDto
|
|
10055
|
+
}, authorizeCustomerCardData)];
|
|
10056
|
+
}
|
|
10057
|
+
var paymentDtoList = orderPaymentList;
|
|
10058
|
+
var body = {
|
|
10059
|
+
orderDto: orderDto,
|
|
10060
|
+
paymentDtoList: paymentDtoList,
|
|
10061
|
+
discountCouponList: discountCoupons
|
|
10062
|
+
};
|
|
10063
|
+
if (ecommerceCustomPaymentDto) {
|
|
10064
|
+
body.ecommerceCustomPaymentDto;
|
|
10065
|
+
}
|
|
10066
|
+
return Promise.resolve(placeOrder(body)).then(function () {});
|
|
10067
|
+
}, function () {});
|
|
10068
|
+
return Promise.resolve(_temp12 && _temp12.then ? _temp12.then(_temp13) : _temp13(_temp12));
|
|
10069
|
+
} catch (e) {
|
|
10070
|
+
return Promise.reject(e);
|
|
10071
|
+
}
|
|
10072
|
+
};
|
|
10427
10073
|
return /*#__PURE__*/React__default.createElement(styled.ThemeProvider, {
|
|
10428
10074
|
theme: styles || {}
|
|
10429
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
10075
|
+
}, /*#__PURE__*/React__default.createElement(CheckoutRootContainer, {
|
|
10076
|
+
bg: styles === null || styles === void 0 ? void 0 : styles.bg
|
|
10077
|
+
}, /*#__PURE__*/React__default.createElement(material.CssBaseline, null), /*#__PURE__*/React__default.createElement(CheckoutPageContainer, {
|
|
10430
10078
|
className: "checkout",
|
|
10431
10079
|
bg: styles === null || styles === void 0 ? void 0 : styles.bg
|
|
10432
10080
|
}, /*#__PURE__*/React__default.createElement(material.Stack, {
|
|
@@ -10436,7 +10084,7 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
10436
10084
|
style: {
|
|
10437
10085
|
color: styles === null || styles === void 0 ? void 0 : styles.h1Color
|
|
10438
10086
|
}
|
|
10439
|
-
}, /*#__PURE__*/React__default.createElement("h5", null, "
|
|
10087
|
+
}, /*#__PURE__*/React__default.createElement("h5", null, "Payment Details"), /*#__PURE__*/React__default.createElement("p", null, "Complete your purchase by providing your payment details")), /*#__PURE__*/React__default.createElement(CheckoutMainWithHeader, {
|
|
10440
10088
|
flexDirection: "column",
|
|
10441
10089
|
alignItems: "flex-end"
|
|
10442
10090
|
}, /*#__PURE__*/React__default.createElement(CheckoutHeader, null, steps === null || steps === void 0 ? void 0 : steps.map(function (item, i) {
|
|
@@ -10456,7 +10104,7 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
10456
10104
|
width: '100%'
|
|
10457
10105
|
}
|
|
10458
10106
|
}, steps === null || steps === void 0 ? void 0 : steps.map(function (item, index) {
|
|
10459
|
-
var _styles$stepperIcon, _styles$stepperIcon2;
|
|
10107
|
+
var _styles$stepperIcon, _styles$stepperIcon2, _customer$customerDto5, _customer$customerDto6, _customer$customerDto7, _customer$customerDto8;
|
|
10460
10108
|
return /*#__PURE__*/React__default.createElement(material.Step, {
|
|
10461
10109
|
key: index
|
|
10462
10110
|
}, /*#__PURE__*/React__default.createElement(material.StepLabel, {
|
|
@@ -10489,12 +10137,12 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
10489
10137
|
text: item.text,
|
|
10490
10138
|
icon: item.icon,
|
|
10491
10139
|
single: true,
|
|
10492
|
-
username: index === 0 ?
|
|
10140
|
+
username: index === 0 ? customer === null || customer === void 0 ? void 0 : (_customer$customerDto5 = customer.customerDto) === null || _customer$customerDto5 === void 0 ? void 0 : _customer$customerDto5.firstName : '',
|
|
10493
10141
|
primaryColor: styles === null || styles === void 0 ? void 0 : styles.primaryColor,
|
|
10494
10142
|
closed: true,
|
|
10495
10143
|
handleClick: function handleClick() {
|
|
10496
10144
|
if (currStep > index) {
|
|
10497
|
-
handleBack(
|
|
10145
|
+
handleBack();
|
|
10498
10146
|
}
|
|
10499
10147
|
}
|
|
10500
10148
|
})), index === 0 && /*#__PURE__*/React__default.createElement(material.StepContent, {
|
|
@@ -10503,41 +10151,39 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
10503
10151
|
}
|
|
10504
10152
|
}, /*#__PURE__*/React__default.createElement(Step0, {
|
|
10505
10153
|
currStep: currStep,
|
|
10506
|
-
loading:
|
|
10507
|
-
userName:
|
|
10154
|
+
loading: loginLoading,
|
|
10155
|
+
userName: customer === null || customer === void 0 ? void 0 : (_customer$customerDto6 = customer.customerDto) === null || _customer$customerDto6 === void 0 ? void 0 : _customer$customerDto6.firstName,
|
|
10508
10156
|
handleBack: handleBack,
|
|
10509
10157
|
handleNext: handleNext,
|
|
10510
|
-
handleLogin:
|
|
10511
|
-
|
|
10512
|
-
|
|
10158
|
+
handleLogin: onLoginCustomer,
|
|
10159
|
+
styles: styles,
|
|
10160
|
+
clickRedirect: clickRedirect
|
|
10513
10161
|
})), index === 1 && /*#__PURE__*/React__default.createElement(material.StepContent, {
|
|
10514
10162
|
sx: {
|
|
10515
10163
|
padding: 0
|
|
10516
10164
|
}
|
|
10517
10165
|
}, /*#__PURE__*/React__default.createElement(Step1, {
|
|
10166
|
+
customer: customer,
|
|
10518
10167
|
styles: styles,
|
|
10519
10168
|
currstep: currStep,
|
|
10520
10169
|
handleBack: handleBack,
|
|
10521
10170
|
handleNext: handleNext,
|
|
10522
10171
|
setShipping: setShowShipping,
|
|
10523
10172
|
setBilling: setBilling,
|
|
10524
|
-
|
|
10525
|
-
addStore: addStore,
|
|
10526
|
-
selectedStore: selectedStore,
|
|
10527
|
-
setSelectedStore: setSelectedStore,
|
|
10528
|
-
setShippingAddressIdFromStep1: setShippingAddressIdFromStep1,
|
|
10173
|
+
setShippingAddressId: setShippingAddressId,
|
|
10529
10174
|
countries: countries,
|
|
10530
10175
|
states: states,
|
|
10531
10176
|
addStoreAddress: addStoreAddress,
|
|
10532
|
-
setSelectedCountry: setSelectedCountry
|
|
10177
|
+
setSelectedCountry: setSelectedCountry,
|
|
10178
|
+
billingAddressId: billingAddressId
|
|
10533
10179
|
})), index === 2 && /*#__PURE__*/React__default.createElement(material.StepContent, {
|
|
10534
10180
|
sx: {
|
|
10535
10181
|
padding: 0
|
|
10536
10182
|
}
|
|
10537
10183
|
}, /*#__PURE__*/React__default.createElement(Step2, {
|
|
10184
|
+
customer: customer,
|
|
10538
10185
|
apiEndPoint: apiEndPoint,
|
|
10539
10186
|
token: token,
|
|
10540
|
-
storeDetails: storeDetails,
|
|
10541
10187
|
cartData: cartData,
|
|
10542
10188
|
currstep: currStep,
|
|
10543
10189
|
handleBack: handleBack,
|
|
@@ -10547,25 +10193,23 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
10547
10193
|
countries: countries,
|
|
10548
10194
|
setShipping: setShipping,
|
|
10549
10195
|
showShipping: showShipping,
|
|
10550
|
-
selectedStore: selectedStore,
|
|
10551
|
-
stores: userStores,
|
|
10552
10196
|
shippingMethod: shippingMethod,
|
|
10553
|
-
storeCredits:
|
|
10197
|
+
storeCredits: customer === null || customer === void 0 ? void 0 : (_customer$customerDto7 = customer.customerDto) === null || _customer$customerDto7 === void 0 ? void 0 : _customer$customerDto7.storeCredit,
|
|
10554
10198
|
discountCoupons: discountCoupons,
|
|
10555
|
-
shippingAddressIdFromStep1: shippingAddressIdFromStep1,
|
|
10556
10199
|
addShipping: addStoreAddress,
|
|
10557
10200
|
setSelectedCountry: setSelectedCountry,
|
|
10558
10201
|
styles: styles,
|
|
10559
|
-
showShippingPriceRangeLimit: showShippingPriceRangeLimit
|
|
10202
|
+
showShippingPriceRangeLimit: showShippingPriceRangeLimit,
|
|
10203
|
+
shippingAddressId: shippingAddressId
|
|
10560
10204
|
})), index === 3 && /*#__PURE__*/React__default.createElement(material.StepContent, {
|
|
10561
10205
|
sx: {
|
|
10562
10206
|
padding: 0
|
|
10563
10207
|
}
|
|
10564
10208
|
}, /*#__PURE__*/React__default.createElement(Step3, {
|
|
10209
|
+
customer: customer,
|
|
10565
10210
|
apiEndPoint: apiEndPoint,
|
|
10566
10211
|
authoriseDotNet: authoriseDotNet,
|
|
10567
10212
|
token: token,
|
|
10568
|
-
store: userStores,
|
|
10569
10213
|
shippingMethod: shippingMethod,
|
|
10570
10214
|
currstep: currStep,
|
|
10571
10215
|
handleBack: handleBack,
|
|
@@ -10574,7 +10218,7 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
10574
10218
|
payments: paymentMethods,
|
|
10575
10219
|
states: states,
|
|
10576
10220
|
countries: countries,
|
|
10577
|
-
storeCredits:
|
|
10221
|
+
storeCredits: customer === null || customer === void 0 ? void 0 : (_customer$customerDto8 = customer.customerDto) === null || _customer$customerDto8 === void 0 ? void 0 : _customer$customerDto8.storeCredit,
|
|
10578
10222
|
total: cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice,
|
|
10579
10223
|
styles: styles,
|
|
10580
10224
|
setSelectedCountry: setSelectedCountry
|
|
@@ -10583,27 +10227,32 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
10583
10227
|
padding: 0
|
|
10584
10228
|
}
|
|
10585
10229
|
}, /*#__PURE__*/React__default.createElement(Step4, {
|
|
10230
|
+
customer: customer,
|
|
10586
10231
|
shippingMethod: shippingMethod,
|
|
10587
10232
|
currstep: currStep,
|
|
10588
10233
|
handleBack: handleBack,
|
|
10589
10234
|
handleNext: handleNext,
|
|
10590
10235
|
cartData: cartData,
|
|
10591
|
-
vat: vat,
|
|
10592
10236
|
clickRedirect: clickRedirect,
|
|
10593
10237
|
loading: ordering,
|
|
10594
|
-
deliveryCharges:
|
|
10595
|
-
|
|
10596
|
-
placeOrder: placeOrder,
|
|
10238
|
+
deliveryCharges: (shippingMethod === null || shippingMethod === void 0 ? void 0 : shippingMethod.amount) || 0,
|
|
10239
|
+
placeOrder: onPlaceOrder,
|
|
10597
10240
|
styles: styles,
|
|
10598
|
-
storeCredits: selectedStoreCredits,
|
|
10241
|
+
storeCredits: selectedStoreCredits === null || selectedStoreCredits === void 0 ? void 0 : selectedStoreCredits.amount,
|
|
10599
10242
|
discountCoupons: discountCoupons,
|
|
10600
10243
|
shippingText: shippingText
|
|
10601
10244
|
})));
|
|
10602
10245
|
}))))), /*#__PURE__*/React__default.createElement(CheckoutSummary, {
|
|
10603
|
-
billingInformation:
|
|
10604
|
-
|
|
10246
|
+
billingInformation: customer === null || customer === void 0 ? void 0 : (_customer$customerDto9 = customer.customerDto) === null || _customer$customerDto9 === void 0 ? void 0 : (_customer$customerDto10 = _customer$customerDto9.customerStoreAddressList) === null || _customer$customerDto10 === void 0 ? void 0 : _customer$customerDto10.find(function (item) {
|
|
10247
|
+
return (item === null || item === void 0 ? void 0 : item.id) === billingAddressId;
|
|
10248
|
+
}),
|
|
10249
|
+
shippingInformation: customer === null || customer === void 0 ? void 0 : (_customer$customerDto11 = customer.customerDto) === null || _customer$customerDto11 === void 0 ? void 0 : (_customer$customerDto12 = _customer$customerDto11.customerStoreAddressList) === null || _customer$customerDto12 === void 0 ? void 0 : _customer$customerDto12.find(function (item) {
|
|
10250
|
+
return (item === null || item === void 0 ? void 0 : item.id) === shippingAddressId;
|
|
10251
|
+
}),
|
|
10605
10252
|
shippingMethod: shippingMethod,
|
|
10606
|
-
paymentMethod: selectedPaymentMethod
|
|
10253
|
+
paymentMethod: selectedPaymentMethod || (selectedStoreCredits ? {
|
|
10254
|
+
name: 'store credits'
|
|
10255
|
+
} : null),
|
|
10607
10256
|
total: cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice,
|
|
10608
10257
|
bg: styles === null || styles === void 0 ? void 0 : (_styles$checkoutSumma = styles.checkoutSummary) === null || _styles$checkoutSumma === void 0 ? void 0 : _styles$checkoutSumma.bg,
|
|
10609
10258
|
color: styles === null || styles === void 0 ? void 0 : (_styles$checkoutSumma2 = styles.checkoutSummary) === null || _styles$checkoutSumma2 === void 0 ? void 0 : _styles$checkoutSumma2.color,
|