@salesgenterp/ui-components 0.4.551 → 0.4.552

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.
@@ -1,8 +1,8 @@
1
- import { Skeleton as Skeleton$1, CircularProgress, TextField, Button, IconButton, Stack, Typography, Grid, InputAdornment, Popover, TableHead, TableRow, TableSortLabel, Paper, TableContainer as TableContainer$4, Table, TableBody, TableCell, TablePagination, Dialog, DialogContent, DialogActions, DialogTitle as DialogTitle$1, RadioGroup, Radio, FormControlLabel, FormLabel, FormControl, FormHelperText, Select as Select$1, InputLabel, MenuItem, CardMedia, Divider, Tabs, Box, Tab, CardContent, ListItemIcon, ListItem, Collapse, List, ListItemText, Checkbox as Checkbox$1, Card as Card$1, CardHeader as CardHeader$1, CssBaseline, Toolbar, Drawer, useMediaQuery as useMediaQuery$1, Tooltip, Pagination, CardActionArea, Avatar as Avatar$1, alpha, Stepper, Step, StepLabel, StepContent, Container as Container$4 } from '@mui/material';
1
+ import { Skeleton as Skeleton$1, CircularProgress, TextField, Button, IconButton, Stack, Typography, Grid, InputAdornment, Popover, TableHead, TableRow, TableSortLabel, Paper, TableContainer as TableContainer$4, Table, TableBody, TableCell, TablePagination, Dialog, DialogContent, DialogActions, DialogTitle as DialogTitle$1, RadioGroup, Radio, FormControlLabel, FormLabel, FormControl, FormHelperText, Select as Select$1, InputLabel, MenuItem, CardMedia, Divider, Tabs, Tooltip, Box, Tab, CardContent, ListItemIcon, ListItem, Collapse, List, ListItemText, Checkbox as Checkbox$1, Card as Card$1, CardHeader as CardHeader$1, CssBaseline, Toolbar, Drawer, useMediaQuery as useMediaQuery$1, Pagination, CardActionArea, Avatar as Avatar$1, alpha, Stepper, Step, StepLabel, StepContent, Container as Container$4 } from '@mui/material';
2
2
  import { styled as styled$1 } from '@mui/material/styles';
3
3
  import useMediaQuery from '@mui/material/useMediaQuery';
4
- import React__default, { useState, useEffect, forwardRef, createElement, useCallback, memo, Fragment as Fragment$1, useRef, useMemo } from 'react';
5
- import { MdVisibilityOff, MdVisibility, MdClose, MdMonetizationOn, MdOutlineStorefront, MdRemoveRedEye, MdOutlineFileDownload, MdPersonOutline, MdOutlineCall, MdMailOutline, MdExpandMore, MdExpandLess, MdStore, MdOutlineMenuOpen, MdMenu, MdDarkMode, MdOutlineDarkMode, MdLocalOffer, MdDelete, MdCheckCircle, MdArrowBack, MdOutlineCircle, MdOutlineStickyNote2, MdOutlineNumbers, MdDateRange, MdOutlineWarehouse } from 'react-icons/md';
4
+ import React__default, { useState, useEffect, forwardRef, memo, createElement, useCallback, Fragment as Fragment$1, useRef, useMemo } from 'react';
5
+ import { MdVisibilityOff, MdVisibility, MdClose, MdMonetizationOn, MdAdd, MdOutlineStorefront, MdRemoveRedEye, MdOutlineFileDownload, MdPersonOutline, MdOutlineCall, MdMailOutline, MdExpandMore, MdExpandLess, MdStore, MdOutlineMenuOpen, MdMenu, MdDarkMode, MdOutlineDarkMode, MdLocalOffer, MdDelete, MdCheckCircle, MdArrowBack, MdOutlineCircle, MdOutlineStickyNote2, MdOutlineNumbers, MdDateRange, MdOutlineWarehouse } from 'react-icons/md';
6
6
  import styled, { css, ThemeProvider, keyframes } from 'styled-components';
7
7
  import { isEmpty, isString, toNumber, reduce, concat, omit, replace, template, isArray, some, toLower, isPlainObject, includes, values, cloneDeep, filter, sortBy, isObject, sumBy, get, isNumber, remove } from 'lodash';
8
8
  import axios from 'axios';
@@ -2831,7 +2831,301 @@ var InfoContainer = styled.div(_templateObject$9 || (_templateObject$9 = _tagged
2831
2831
  return props.fontColor;
2832
2832
  });
2833
2833
 
2834
- var _templateObject$a, _templateObject2$5, _templateObject3$3, _templateObject4$2, _templateObject5$1, _templateObject6$1, _templateObject7$1, _templateObject8$1, _templateObject9$1, _templateObject10$1, _templateObject11$1, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19;
2834
+ var AsyncDataLoad = function AsyncDataLoad(_ref) {
2835
+ var apiEndPoint = _ref.apiEndPoint,
2836
+ token = _ref.token,
2837
+ children = _ref.children,
2838
+ onError = _ref.onError,
2839
+ skeletonHeight = _ref.skeletonHeight,
2840
+ loadingView = _ref.loadingView,
2841
+ errorView = _ref.errorView,
2842
+ asyncService = _ref.asyncService,
2843
+ triggerChange = _ref.triggerChange,
2844
+ apiConfig = _ref.apiConfig;
2845
+ var _useState = useState({
2846
+ status: 'loading',
2847
+ data: {}
2848
+ }),
2849
+ apiState = _useState[0],
2850
+ setApiState = _useState[1];
2851
+ var getAPIData = function getAPIData() {
2852
+ try {
2853
+ var _temp3 = _catch(function () {
2854
+ function _temp2() {
2855
+ setApiState({
2856
+ status: API_STATUSES.SUCCESS,
2857
+ data: data
2858
+ });
2859
+ }
2860
+ setApiState({
2861
+ status: API_STATUSES.LOADING,
2862
+ data: {}
2863
+ });
2864
+ var data;
2865
+ var _temp = function () {
2866
+ if (asyncService) {
2867
+ return Promise.resolve(asyncService()).then(function (_asyncService) {
2868
+ data = _asyncService;
2869
+ });
2870
+ } else {
2871
+ return Promise.resolve(API(_extends({
2872
+ apiEndPoint: apiEndPoint,
2873
+ token: token,
2874
+ hideErrorMessage: true
2875
+ }, apiConfig))).then(function (_API) {
2876
+ data = _API;
2877
+ });
2878
+ }
2879
+ }();
2880
+ return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
2881
+ }, function (e) {
2882
+ setApiState({
2883
+ status: API_STATUSES.ERROR,
2884
+ data: {}
2885
+ });
2886
+ if (onError) {
2887
+ onError(e);
2888
+ }
2889
+ });
2890
+ return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
2891
+ } catch (e) {
2892
+ return Promise.reject(e);
2893
+ }
2894
+ };
2895
+ useEffect(function () {
2896
+ if (apiConfig || asyncService) {
2897
+ (function () {
2898
+ return getAPIData();
2899
+ })();
2900
+ }
2901
+ }, [apiConfig, triggerChange]);
2902
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, apiState.status === API_STATUSES.LOADING ? loadingView ? loadingView : /*#__PURE__*/React__default.createElement(Loader, {
2903
+ skeleton: skeletonHeight,
2904
+ height: skeletonHeight
2905
+ }) : null, apiState.status === API_STATUSES.SUCCESS ? typeof children === 'function' ? children(apiState.data) : {
2906
+ children: children
2907
+ } : null, apiState.status === API_STATUSES.ERROR ? errorView ? errorView : 'NO DATA' : null);
2908
+ };
2909
+ var AsyncDataLoadComponent = memo(AsyncDataLoad);
2910
+
2911
+ var getUpcomingAchPayments = function getUpcomingAchPayments(_ref) {
2912
+ var apiEndPoint = _ref.apiEndPoint,
2913
+ token = _ref.token;
2914
+ try {
2915
+ return Promise.resolve(API({
2916
+ url: '/ecommerce/order/payment/upcoming-auto-ach',
2917
+ apiEndPoint: apiEndPoint,
2918
+ token: token
2919
+ }));
2920
+ } catch (e) {
2921
+ return Promise.reject(e);
2922
+ }
2923
+ };
2924
+ var saveExcessPayment = function saveExcessPayment(_ref2) {
2925
+ var apiEndPoint = _ref2.apiEndPoint,
2926
+ token = _ref2.token,
2927
+ payload = _ref2.payload;
2928
+ try {
2929
+ return Promise.resolve(API({
2930
+ url: '/ecommerce/order/payment/excess',
2931
+ apiEndPoint: apiEndPoint,
2932
+ token: token,
2933
+ method: 'POST',
2934
+ body: payload
2935
+ }));
2936
+ } catch (e) {
2937
+ return Promise.reject(e);
2938
+ }
2939
+ };
2940
+
2941
+ var ExcessPaymentForm = function ExcessPaymentForm(_ref) {
2942
+ var paymentMethods = _ref.paymentMethods,
2943
+ control = _ref.control,
2944
+ styles = _ref.styles,
2945
+ handleSubmit = _ref.handleSubmit,
2946
+ onSubmit = _ref.onSubmit,
2947
+ onClose = _ref.onClose,
2948
+ loading = _ref.loading;
2949
+ return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("form", null, /*#__PURE__*/React__default.createElement(Grid, {
2950
+ container: true,
2951
+ spacing: 2
2952
+ }, /*#__PURE__*/React__default.createElement(Grid, {
2953
+ item: true,
2954
+ xs: 12
2955
+ }, /*#__PURE__*/React__default.createElement(FormSelect, {
2956
+ label: "Payment Method",
2957
+ name: "paymentModeId",
2958
+ required: true,
2959
+ control: control,
2960
+ options: paymentMethods,
2961
+ valueKey: "id",
2962
+ labelKey: "name",
2963
+ placeholder: "Select Payment Mode",
2964
+ fontColor: styles === null || styles === void 0 ? void 0 : styles.fontColor
2965
+ })), /*#__PURE__*/React__default.createElement(Grid, {
2966
+ item: true,
2967
+ xs: 12
2968
+ }, /*#__PURE__*/React__default.createElement(FormTextField, {
2969
+ label: "Excess Amount",
2970
+ name: "excessAmount",
2971
+ type: "number",
2972
+ required: true,
2973
+ control: control,
2974
+ fontColor: styles === null || styles === void 0 ? void 0 : styles.fontColor
2975
+ })), /*#__PURE__*/React__default.createElement(Grid, {
2976
+ item: true,
2977
+ xs: 12
2978
+ }, /*#__PURE__*/React__default.createElement(FormTextField, {
2979
+ label: "Transaction Id",
2980
+ name: "transactionId",
2981
+ control: control,
2982
+ fontColor: styles === null || styles === void 0 ? void 0 : styles.fontColor
2983
+ })), /*#__PURE__*/React__default.createElement(Grid, {
2984
+ item: true,
2985
+ xs: 12
2986
+ }, /*#__PURE__*/React__default.createElement(FormTextField, {
2987
+ label: "Notes",
2988
+ name: "notes",
2989
+ control: control,
2990
+ fontColor: styles === null || styles === void 0 ? void 0 : styles.fontColor,
2991
+ multiline: true,
2992
+ rows: 3
2993
+ })))), /*#__PURE__*/React__default.createElement(DialogActions, {
2994
+ sx: {
2995
+ justifyContent: 'center',
2996
+ px: 0,
2997
+ pt: 2
2998
+ }
2999
+ }, /*#__PURE__*/React__default.createElement(Grid, {
3000
+ container: true,
3001
+ spacing: 4,
3002
+ alignItems: "center",
3003
+ justifyContent: "center"
3004
+ }, /*#__PURE__*/React__default.createElement(Grid, {
3005
+ item: true
3006
+ }, /*#__PURE__*/React__default.createElement(MuiButton, {
3007
+ primaryColor: styles === null || styles === void 0 ? void 0 : styles.primaryColor,
3008
+ sx: {
3009
+ fontSize: '1.3rem'
3010
+ },
3011
+ onClick: handleSubmit(onSubmit),
3012
+ loading: loading,
3013
+ size: "small"
3014
+ }, "Save")), /*#__PURE__*/React__default.createElement(Grid, {
3015
+ item: true
3016
+ }, /*#__PURE__*/React__default.createElement(MuiButton, {
3017
+ primaryColor: styles === null || styles === void 0 ? void 0 : styles.primaryColor,
3018
+ sx: {
3019
+ fontSize: '1.3rem'
3020
+ },
3021
+ onClick: onClose,
3022
+ size: "small"
3023
+ }, "Cancel")))));
3024
+ };
3025
+ var ExcessPaymentDialog = function ExcessPaymentDialog(_ref2) {
3026
+ var visible = _ref2.visible,
3027
+ onClose = _ref2.onClose,
3028
+ defaultStoreId = _ref2.defaultStoreId,
3029
+ apiEndPoint = _ref2.apiEndPoint,
3030
+ token = _ref2.token,
3031
+ styles = _ref2.styles,
3032
+ onSave = _ref2.onSave,
3033
+ customerData = _ref2.customerData;
3034
+ var _useForm = useForm({
3035
+ defaultValues: {
3036
+ paymentModeId: '',
3037
+ excessAmount: '',
3038
+ transactionId: '',
3039
+ notes: ''
3040
+ }
3041
+ }),
3042
+ handleSubmit = _useForm.handleSubmit,
3043
+ control = _useForm.control,
3044
+ reset = _useForm.reset;
3045
+ var _useState = useState(false),
3046
+ loading = _useState[0],
3047
+ setLoading = _useState[1];
3048
+ useEffect(function () {
3049
+ if (!visible) {
3050
+ reset({
3051
+ paymentModeId: '',
3052
+ excessAmount: '',
3053
+ transactionId: '',
3054
+ notes: ''
3055
+ });
3056
+ }
3057
+ }, [visible, reset]);
3058
+ var onSubmit = function onSubmit(formData) {
3059
+ try {
3060
+ var _customerData$custome;
3061
+ var payload = {
3062
+ customerId: customerData === null || customerData === void 0 ? void 0 : (_customerData$custome = customerData.customerDto) === null || _customerData$custome === void 0 ? void 0 : _customerData$custome.id,
3063
+ insertedTimestamp: getUTCTime({
3064
+ time: new Date()
3065
+ }),
3066
+ paymentModeId: Number(formData === null || formData === void 0 ? void 0 : formData.paymentModeId),
3067
+ excessAmount: Number(formData === null || formData === void 0 ? void 0 : formData.excessAmount),
3068
+ storeId: defaultStoreId,
3069
+ amount: Number(formData === null || formData === void 0 ? void 0 : formData.excessAmount),
3070
+ transactionId: (formData === null || formData === void 0 ? void 0 : formData.transactionId) || null,
3071
+ notes: (formData === null || formData === void 0 ? void 0 : formData.notes) || null
3072
+ };
3073
+ var _temp = _finallyRethrows(function () {
3074
+ return _catch(function () {
3075
+ setLoading(true);
3076
+ return Promise.resolve(saveExcessPayment({
3077
+ apiEndPoint: apiEndPoint,
3078
+ token: token,
3079
+ payload: payload
3080
+ })).then(function (response) {
3081
+ onSave && onSave(payload);
3082
+ });
3083
+ }, function () {});
3084
+ }, function (_wasThrown, _result) {
3085
+ setLoading(false);
3086
+ if (_wasThrown) throw _result;
3087
+ return _result;
3088
+ });
3089
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
3090
+ } catch (e) {
3091
+ return Promise.reject(e);
3092
+ }
3093
+ };
3094
+ return /*#__PURE__*/React__default.createElement(Dialog, {
3095
+ open: visible,
3096
+ onClose: onClose,
3097
+ fullWidth: true,
3098
+ maxWidth: "sm"
3099
+ }, /*#__PURE__*/React__default.createElement(DialogTitle$1, null, "Excess Payment"), /*#__PURE__*/React__default.createElement(DialogContent, null, /*#__PURE__*/React__default.createElement(AsyncDataLoadComponent, {
3100
+ apiEndPoint: apiEndPoint,
3101
+ token: token,
3102
+ asyncService: function asyncService() {
3103
+ try {
3104
+ return Promise.resolve(getPaymentMethods({
3105
+ apiEndPoint: apiEndPoint,
3106
+ token: token
3107
+ }));
3108
+ } catch (e) {
3109
+ return Promise.reject(e);
3110
+ }
3111
+ }
3112
+ }, function (data) {
3113
+ var paymentMethods = (data === null || data === void 0 ? void 0 : data.filter(function (item) {
3114
+ return item === null || item === void 0 ? void 0 : item.ecommerce;
3115
+ })) || [];
3116
+ return /*#__PURE__*/React__default.createElement(ExcessPaymentForm, {
3117
+ loading: loading,
3118
+ paymentMethods: paymentMethods,
3119
+ control: control,
3120
+ styles: styles,
3121
+ handleSubmit: handleSubmit,
3122
+ onSubmit: onSubmit,
3123
+ onClose: onClose
3124
+ });
3125
+ })));
3126
+ };
3127
+
3128
+ var _templateObject$a, _templateObject2$5, _templateObject3$3, _templateObject4$2, _templateObject5$1, _templateObject6$1, _templateObject7$1, _templateObject8$1, _templateObject9$1, _templateObject10$1, _templateObject11$1, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20;
2835
3129
  var totalIcons = [{
2836
3130
  name: '',
2837
3131
  icon: /*#__PURE__*/React__default.createElement(AiOutlineShoppingCart, null)
@@ -2844,6 +3138,9 @@ var totalIcons = [{
2844
3138
  }, {
2845
3139
  name: 'Total Number Of Orders',
2846
3140
  icon: /*#__PURE__*/React__default.createElement(GiCardboardBoxClosed, null)
3141
+ }, {
3142
+ name: 'Excess Payment',
3143
+ icon: /*#__PURE__*/React__default.createElement(TbFileDollar, null)
2847
3144
  }];
2848
3145
  var Dashboard = function Dashboard(_ref) {
2849
3146
  var _customerData$custome, _selectDates$salesOrd, _selectDates$recentIn, _selectDates$salesOrd2, _selectDates$recentIn2, _customerData$custome2, _customerData$custome3, _customerData$custome4;
@@ -2874,14 +3171,18 @@ var Dashboard = function Dashboard(_ref) {
2874
3171
  showOnlyRecentOrder = _ref$showOnlyRecentOr === void 0 ? false : _ref$showOnlyRecentOr,
2875
3172
  hidePayActionButton = _ref.hidePayActionButton,
2876
3173
  hideInvoiceTab = _ref.hideInvoiceTab,
2877
- hideSalesOrderTab = _ref.hideSalesOrderTab;
3174
+ hideSalesOrderTab = _ref.hideSalesOrderTab,
3175
+ hideAddAccessPaymentButton = _ref.hideAddAccessPaymentButton;
2878
3176
  var _useState = useState({}),
2879
3177
  customerData = _useState[0],
2880
3178
  setCustomerData = _useState[1];
2881
3179
  var _useState2 = useState({}),
2882
3180
  dashboardData = _useState2[0],
2883
3181
  setDashboardData = _useState2[1];
2884
- var _useState3 = useState({
3182
+ var _useState3 = useState(),
3183
+ refetchDashboardData = _useState3[0],
3184
+ setRefetchDashboardData = _useState3[1];
3185
+ var _useState4 = useState({
2885
3186
  recentInvoices: {
2886
3187
  startDate: null,
2887
3188
  endDate: null
@@ -2891,25 +3192,30 @@ var Dashboard = function Dashboard(_ref) {
2891
3192
  endDate: null
2892
3193
  }
2893
3194
  }),
2894
- selectDates = _useState3[0],
2895
- setSelectDates = _useState3[1];
2896
- var _useState4 = useState(getRandomString()),
2897
- triggerTableData = _useState4[0],
2898
- setTriggerTableData = _useState4[1];
2899
- var _useState5 = useState({
3195
+ selectDates = _useState4[0],
3196
+ setSelectDates = _useState4[1];
3197
+ var _useState5 = useState(getRandomString()),
3198
+ triggerTableData = _useState5[0],
3199
+ setTriggerTableData = _useState5[1];
3200
+ var _useState6 = useState({
2900
3201
  open: false,
2901
3202
  url: ''
2902
3203
  }),
2903
- invoiceModal = _useState5[0],
2904
- setInvoiceModal = _useState5[1];
2905
- var _useState6 = useState({
3204
+ invoiceModal = _useState6[0],
3205
+ setInvoiceModal = _useState6[1];
3206
+ var _useState7 = useState({
2906
3207
  open: false
2907
3208
  }),
2908
- isPaymentModal = _useState6[0],
2909
- setIsPaymentModal = _useState6[1];
2910
- var _useState7 = useState(0),
2911
- value = _useState7[0],
2912
- setValue = _useState7[1];
3209
+ isPaymentModal = _useState7[0],
3210
+ setIsPaymentModal = _useState7[1];
3211
+ var _useState8 = useState({
3212
+ open: false
3213
+ }),
3214
+ isExcessPaymentModal = _useState8[0],
3215
+ setIsExcessPaymentModal = _useState8[1];
3216
+ var _useState9 = useState(0),
3217
+ value = _useState9[0],
3218
+ setValue = _useState9[1];
2913
3219
  useEffect(function () {
2914
3220
  if (hideSalesOrderTab) {
2915
3221
  setValue(1);
@@ -3145,7 +3451,7 @@ var Dashboard = function Dashboard(_ref) {
3145
3451
  Promise.reject(e);
3146
3452
  }
3147
3453
  })();
3148
- }, []);
3454
+ }, [refetchDashboardData]);
3149
3455
  useEffect(function () {
3150
3456
  try {
3151
3457
  try {
@@ -3198,6 +3504,30 @@ var Dashboard = function Dashboard(_ref) {
3198
3504
  orderId: isPaymentModal === null || isPaymentModal === void 0 ? void 0 : isPaymentModal.orderId,
3199
3505
  setTriggerTableData: setTriggerTableData,
3200
3506
  styles: styles
3507
+ }), (isExcessPaymentModal === null || isExcessPaymentModal === void 0 ? void 0 : isExcessPaymentModal.open) && /*#__PURE__*/React__default.createElement(ExcessPaymentDialog, {
3508
+ customerData: customerData,
3509
+ apiEndPoint: apiEndPoint,
3510
+ token: token,
3511
+ defaultStoreId: defaultStoreId,
3512
+ styles: styles,
3513
+ onSave: function onSave(payload) {
3514
+ try {
3515
+ setRefetchDashboardData(getRandomString());
3516
+ alert("Excess Payment $" + (payload === null || payload === void 0 ? void 0 : payload.excessAmount) + " added successfully");
3517
+ setIsExcessPaymentModal({
3518
+ open: false
3519
+ });
3520
+ return Promise.resolve();
3521
+ } catch (e) {
3522
+ return Promise.reject(e);
3523
+ }
3524
+ },
3525
+ visible: isExcessPaymentModal === null || isExcessPaymentModal === void 0 ? void 0 : isExcessPaymentModal.open,
3526
+ onClose: function onClose() {
3527
+ return setIsExcessPaymentModal({
3528
+ open: false
3529
+ });
3530
+ }
3201
3531
  }), /*#__PURE__*/React__default.createElement(Grid, {
3202
3532
  container: true,
3203
3533
  columnSpacing: 4
@@ -3215,7 +3545,8 @@ var Dashboard = function Dashboard(_ref) {
3215
3545
  spacing: 3
3216
3546
  }, totalDataSource === null || totalDataSource === void 0 ? void 0 : totalDataSource.map(function (data) {
3217
3547
  var _data$name, _data$name2, _data$name3, _totalIcons$find;
3218
- var isAmount = (data === null || data === void 0 ? void 0 : (_data$name = data.name) === null || _data$name === void 0 ? void 0 : _data$name.indexOf('Amount')) > 1 || (data === null || data === void 0 ? void 0 : (_data$name2 = data.name) === null || _data$name2 === void 0 ? void 0 : _data$name2.indexOf('Credit')) > 1 || (data === null || data === void 0 ? void 0 : (_data$name3 = data.name) === null || _data$name3 === void 0 ? void 0 : _data$name3.indexOf('Price')) > 1;
3548
+ var isAmount = (data === null || data === void 0 ? void 0 : (_data$name = data.name) === null || _data$name === void 0 ? void 0 : _data$name.indexOf('Amount')) > 1 || (data === null || data === void 0 ? void 0 : (_data$name2 = data.name) === null || _data$name2 === void 0 ? void 0 : _data$name2.indexOf('Credit')) > 1 || (data === null || data === void 0 ? void 0 : (_data$name3 = data.name) === null || _data$name3 === void 0 ? void 0 : _data$name3.indexOf('Price')) > 1 || (data === null || data === void 0 ? void 0 : data.name) === 'Excess Payment';
3549
+ var isExcessPayment = (data === null || data === void 0 ? void 0 : data.name) === 'Excess Payment';
3219
3550
  return /*#__PURE__*/React__default.createElement(Grid, {
3220
3551
  item: true,
3221
3552
  xs: 12,
@@ -3235,7 +3566,23 @@ var Dashboard = function Dashboard(_ref) {
3235
3566
  className: "icon-container"
3236
3567
  }, (totalIcons === null || totalIcons === void 0 ? void 0 : (_totalIcons$find = totalIcons.find(function (icons) {
3237
3568
  return (icons === null || icons === void 0 ? void 0 : icons.name) === (data === null || data === void 0 ? void 0 : data.name);
3238
- })) === null || _totalIcons$find === void 0 ? void 0 : _totalIcons$find.icon) || (isAmount ? /*#__PURE__*/React__default.createElement(MdMonetizationOn, null) : /*#__PURE__*/React__default.createElement(GrStackOverflow, null))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("p", null, data === null || data === void 0 ? void 0 : data.name), /*#__PURE__*/React__default.createElement("h3", null, "" + (isAmount ? renderMoney(data === null || data === void 0 ? void 0 : data.value) : data === null || data === void 0 ? void 0 : data.value)))));
3569
+ })) === null || _totalIcons$find === void 0 ? void 0 : _totalIcons$find.icon) || (isAmount ? /*#__PURE__*/React__default.createElement(MdMonetizationOn, null) : /*#__PURE__*/React__default.createElement(GrStackOverflow, null))), /*#__PURE__*/React__default.createElement("div", {
3570
+ style: {
3571
+ flex: 1
3572
+ }
3573
+ }, /*#__PURE__*/React__default.createElement("p", null, data === null || data === void 0 ? void 0 : data.name), /*#__PURE__*/React__default.createElement("h3", null, "" + (isAmount ? renderMoney(data === null || data === void 0 ? void 0 : data.value) : data === null || data === void 0 ? void 0 : data.value))), isExcessPayment && !hideAddAccessPaymentButton && /*#__PURE__*/React__default.createElement(Tooltip, {
3574
+ title: "Add Excess Payment",
3575
+ arrow: true
3576
+ }, /*#__PURE__*/React__default.createElement(AddExcessPaymentButton, {
3577
+ className: "add-excess-payment-btn",
3578
+ primaryColor: primaryColor,
3579
+ onClick: function onClick() {
3580
+ return setIsExcessPaymentModal({
3581
+ open: true
3582
+ });
3583
+ },
3584
+ "aria-label": "Add excess payment"
3585
+ }, /*#__PURE__*/React__default.createElement(MdAdd, null), /*#__PURE__*/React__default.createElement("span", null, "Add")))));
3239
3586
  }))), !hideBannerSection && /*#__PURE__*/React__default.createElement(BannerContainer, null, /*#__PURE__*/React__default.createElement(Grid, {
3240
3587
  container: true,
3241
3588
  spacing: 3,
@@ -3554,10 +3901,12 @@ var SocialIconContainer = styled.a(_templateObject8$1 || (_templateObject8$1 = _
3554
3901
  });
3555
3902
  var ImageContainer = styled(CardMedia)(_templateObject9$1 || (_templateObject9$1 = _taggedTemplateLiteralLoose(["\n max-width: 100%;\n border-radius: 14px;\n img {\n max-width: 100%;\n }\n"])));
3556
3903
  var TotalRoot = styled.div(_templateObject10$1 || (_templateObject10$1 = _taggedTemplateLiteralLoose(["\n margin: 2rem 0;\n"])));
3557
- var TotalContainer = styled(Stack)(_templateObject11$1 || (_templateObject11$1 = _taggedTemplateLiteralLoose(["\n border-radius: 14px;\n background-color: ", ";\n padding: 1.8rem 1.4rem;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px 0px;\n :hover {\n background-color: ", ";\n p,\n h3 {\n color: #fff !important;\n }\n .icon-container {\n background: #fff;\n }\n }\n p {\n font-size: 1rem;\n font-weight: 600;\n color: ", ";\n margin-bottom: 0rem;\n }\n h3 {\n font-size: 1.7rem;\n font-weight: 600;\n color: ", ";\n }\n .icon-container {\n background: ", ";\n border-radius: 14px;\n padding: 0.6rem;\n display: flex;\n margin: auto 0;\n svg {\n font-size: 2.6rem;\n color: ", ";\n }\n }\n"])), function (props) {
3904
+ var TotalContainer = styled(Stack)(_templateObject11$1 || (_templateObject11$1 = _taggedTemplateLiteralLoose(["\n border-radius: 14px;\n background-color: ", ";\n padding: 1.8rem 1.4rem;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px 0px;\n align-items: center;\n :hover {\n background-color: ", ";\n p,\n h3 {\n color: #fff !important;\n }\n .icon-container {\n background: #fff;\n }\n .add-excess-payment-btn {\n background: #fff;\n color: ", ";\n }\n }\n p {\n font-size: 1rem;\n font-weight: 600;\n color: ", ";\n margin-bottom: 0rem;\n }\n h3 {\n font-size: 1.7rem;\n font-weight: 600;\n color: ", ";\n }\n .icon-container {\n background: ", ";\n border-radius: 14px;\n padding: 0.6rem;\n display: flex;\n margin: auto 0;\n svg {\n font-size: 2.6rem;\n color: ", ";\n }\n }\n"])), function (props) {
3558
3905
  return props.secondaryColor;
3559
3906
  }, function (props) {
3560
3907
  return props.primaryColor;
3908
+ }, function (props) {
3909
+ return props.primaryColor;
3561
3910
  }, function (props) {
3562
3911
  return props.fontColor;
3563
3912
  }, function (props) {
@@ -3567,12 +3916,15 @@ var TotalContainer = styled(Stack)(_templateObject11$1 || (_templateObject11$1 =
3567
3916
  }, function (props) {
3568
3917
  return props.primaryColor;
3569
3918
  });
3570
- var BannerContainer = styled(Stack)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteralLoose([""])));
3571
- var CategoryContainer = styled.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n padding: 1.8rem;\n border-radius: 14px;\n"])), function (props) {
3919
+ var AddExcessPaymentButton = styled.button(_templateObject12 || (_templateObject12 = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n margin-left: auto;\n border: none;\n cursor: pointer;\n border-radius: 999px;\n padding: 0.45rem 0.9rem 0.45rem 0.55rem;\n background: ", ";\n color: #fff;\n font-size: 0.85rem;\n font-weight: 600;\n line-height: 1;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);\n transition: transform 0.15s ease, box-shadow 0.15s ease;\n\n svg {\n font-size: 1.35rem;\n }\n\n &:hover {\n transform: translateY(-1px);\n box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);\n }\n\n &:active {\n transform: translateY(0);\n }\n"])), function (props) {
3920
+ return props.primaryColor;
3921
+ });
3922
+ var BannerContainer = styled(Stack)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteralLoose([""])));
3923
+ var CategoryContainer = styled.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n padding: 1.8rem;\n border-radius: 14px;\n"])), function (props) {
3572
3924
  var _props$theme;
3573
3925
  return (_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.primaryColor;
3574
3926
  });
3575
- var CategoryText = styled.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteralLoose(["\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n h3 {\n color: #fff;\n font-size: 2rem;\n font-weight: 700;\n margin: 1rem 0;\n }\n p {\n color: #fff;\n font-size: 1.2rem;\n text-transform: capitalize;\n }\n button {\n padding: 0.5rem 2rem;\n margin-top: 1rem;\n background-color: ", ";\n color: ", ";\n border-radius: 14px;\n font-size: 1.2rem;\n font-weight: 600;\n &:hover {\n background-color: ", ";\n color: #fff;\n }\n }\n"])), function (props) {
3927
+ var CategoryText = styled.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteralLoose(["\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n h3 {\n color: #fff;\n font-size: 2rem;\n font-weight: 700;\n margin: 1rem 0;\n }\n p {\n color: #fff;\n font-size: 1.2rem;\n text-transform: capitalize;\n }\n button {\n padding: 0.5rem 2rem;\n margin-top: 1rem;\n background-color: ", ";\n color: ", ";\n border-radius: 14px;\n font-size: 1.2rem;\n font-weight: 600;\n &:hover {\n background-color: ", ";\n color: #fff;\n }\n }\n"])), function (props) {
3576
3928
  var _props$theme2;
3577
3929
  return (_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.secondaryColor;
3578
3930
  }, function (props) {
@@ -3582,19 +3934,19 @@ var CategoryText = styled.div(_templateObject14 || (_templateObject14 = _taggedT
3582
3934
  var _props$theme4;
3583
3935
  return (_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.primaryColor;
3584
3936
  });
3585
- var DiscoverContainer = styled.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n padding: 1.8rem;\n border-radius: 14px;\n h3,\n svg {\n color: ", ";\n font-size: 2rem;\n font-weight: 700;\n line-height: 2rem;\n }\n"])), function (props) {
3937
+ var DiscoverContainer = styled.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteralLoose(["\n background-color: ", ";\n padding: 1.8rem;\n border-radius: 14px;\n h3,\n svg {\n color: ", ";\n font-size: 2rem;\n font-weight: 700;\n line-height: 2rem;\n }\n"])), function (props) {
3586
3938
  var _props$theme5, _props$theme6, _props$theme7;
3587
3939
  return (_props$theme5 = props.theme) !== null && _props$theme5 !== void 0 && _props$theme5.isNightMode ? (_props$theme6 = props.theme) === null || _props$theme6 === void 0 ? void 0 : _props$theme6.secondaryColor : "rgba(" + hexToRgbA((_props$theme7 = props.theme) === null || _props$theme7 === void 0 ? void 0 : _props$theme7.primaryColor) + ",0.1)";
3588
3940
  }, function (props) {
3589
3941
  var _props$theme8;
3590
3942
  return (_props$theme8 = props.theme) === null || _props$theme8 === void 0 ? void 0 : _props$theme8.fontColor;
3591
3943
  });
3592
- var StatusContainer = styled(Stack)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteralLoose(["\n box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px 0px;\n padding: 4px 8px;\n border-radius: 6px;\n background-color: ", ";\n color: #fff;\n width: max-content;\n"])), function (props) {
3944
+ var StatusContainer = styled(Stack)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteralLoose(["\n box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px 0px;\n padding: 4px 8px;\n border-radius: 6px;\n background-color: ", ";\n color: #fff;\n width: max-content;\n"])), function (props) {
3593
3945
  return props.primaryColor;
3594
3946
  });
3595
- var TableContainer = styled.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteralLoose(["\n margin-top: 2rem;\n border-radius: 14px;\n"])));
3596
- var InvoiceDialog = styled(Dialog)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteralLoose(["\n iframe {\n width: 900px;\n border: none;\n height: 600px;\n }\n"])));
3597
- var TabsContainer = styled(Tabs)(_templateObject19 || (_templateObject19 = _taggedTemplateLiteralLoose(["\n button {\n color: ", " !important;\n font-size: 1.1rem;\n font-weight: 600;\n }\n .Mui-selected {\n color: ", " !important;\n }\n .MuiTabs-indicator {\n background-color: ", " !important;\n }\n"])), function (props) {
3947
+ var TableContainer = styled.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteralLoose(["\n margin-top: 2rem;\n border-radius: 14px;\n"])));
3948
+ var InvoiceDialog = styled(Dialog)(_templateObject19 || (_templateObject19 = _taggedTemplateLiteralLoose(["\n iframe {\n width: 900px;\n border: none;\n height: 600px;\n }\n"])));
3949
+ var TabsContainer = styled(Tabs)(_templateObject20 || (_templateObject20 = _taggedTemplateLiteralLoose(["\n button {\n color: ", " !important;\n font-size: 1.1rem;\n font-weight: 600;\n }\n .Mui-selected {\n color: ", " !important;\n }\n .MuiTabs-indicator {\n background-color: ", " !important;\n }\n"])), function (props) {
3598
3950
  return props.fontColor;
3599
3951
  }, function (props) {
3600
3952
  return props.primaryColor;
@@ -4929,7 +5281,7 @@ var getDropzoneRejectionError = function getDropzoneRejectionError(fileRejection
4929
5281
  return (error === null || error === void 0 ? void 0 : error.message) || 'Invalid file';
4930
5282
  };
4931
5283
 
4932
- var _templateObject$k, _templateObject2$c, _templateObject3$8, _templateObject4$6, _templateObject5$4, _templateObject6$3, _templateObject7$2, _templateObject8$2, _templateObject9$2, _templateObject10$2, _templateObject11$2, _templateObject12$1, _templateObject13$1, _templateObject14$1, _templateObject15$1, _templateObject16$1, _templateObject17$1, _templateObject18$1, _templateObject19$1, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34;
5284
+ var _templateObject$k, _templateObject2$c, _templateObject3$8, _templateObject4$6, _templateObject5$4, _templateObject6$3, _templateObject7$2, _templateObject8$2, _templateObject9$2, _templateObject10$2, _templateObject11$2, _templateObject12$1, _templateObject13$1, _templateObject14$1, _templateObject15$1, _templateObject16$1, _templateObject17$1, _templateObject18$1, _templateObject19$1, _templateObject20$1, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34;
4933
5285
  var DEFAULT_PRIMARY_COLOR = "#437c0f";
4934
5286
  var Container = styled.div(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose(["\n width: 100%;\n min-height: 80vh;\n display: flex;\n justify-content: center;\n align-items: center;\n background: #f6f6f6;\n padding: 2rem 1rem;\n"])));
4935
5287
  var Card = styled.div(_templateObject2$c || (_templateObject2$c = _taggedTemplateLiteralLoose(["\n width: min(100%, 720px);\n background: #fff;\n border: 1px solid #cac8c8;\n border-radius: 8px;\n padding: 1.5rem;\n"])));
@@ -4969,7 +5321,7 @@ var DropzoneBtn = styled.span(_templateObject16$1 || (_templateObject16$1 = _tag
4969
5321
  var DropzoneText = styled.span(_templateObject17$1 || (_templateObject17$1 = _taggedTemplateLiteralLoose(["\n font-size: 0.875rem;\n color: #666;\n"])));
4970
5322
  var DropzoneError = styled.p(_templateObject18$1 || (_templateObject18$1 = _taggedTemplateLiteralLoose(["\n margin: 0.5rem 0 0;\n font-size: 0.8rem;\n color: #c62828;\n"])));
4971
5323
  var SelectedFileRow = styled.div(_templateObject19$1 || (_templateObject19$1 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 1rem;\n padding: 0.6rem 0.75rem;\n border: 1px solid #e0e0e0;\n border-radius: 6px;\n background: #fafafa;\n"])));
4972
- var SelectedFileInfo = styled.div(_templateObject20 || (_templateObject20 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 0.5rem;\n min-width: 0;\n flex: 1;\n"])));
5324
+ var SelectedFileInfo = styled.div(_templateObject20$1 || (_templateObject20$1 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 0.5rem;\n min-width: 0;\n flex: 1;\n"])));
4973
5325
  var SelectedFileName = styled.span(_templateObject21 || (_templateObject21 = _taggedTemplateLiteralLoose(["\n font-size: 0.875rem;\n color: #333;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])));
4974
5326
  var ClearFileBtn = styled.button(_templateObject22 || (_templateObject22 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n background: none;\n color: #c62828;\n font-size: 1.1rem;\n cursor: pointer;\n flex-shrink: 0;\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n"])));
4975
5327
  var UploadedFiles = styled.ul(_templateObject23 || (_templateObject23 = _taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n\n li {\n display: flex;\n align-items: center;\n gap: 0.75rem;\n font-size: 0.875rem;\n color: #555;\n padding: 0.65rem 0.75rem;\n background: #fff;\n border: 1px solid #eee;\n border-radius: 4px;\n }\n"])));
@@ -5285,20 +5637,6 @@ var getDocumentTypes = function getDocumentTypes(_ref3) {
5285
5637
  }
5286
5638
  };
5287
5639
 
5288
- var getUpcomingAchPayments = function getUpcomingAchPayments(_ref) {
5289
- var apiEndPoint = _ref.apiEndPoint,
5290
- token = _ref.token;
5291
- try {
5292
- return Promise.resolve(API({
5293
- url: '/ecommerce/order/payment/upcoming-auto-ach',
5294
- apiEndPoint: apiEndPoint,
5295
- token: token
5296
- }));
5297
- } catch (e) {
5298
- return Promise.reject(e);
5299
- }
5300
- };
5301
-
5302
5640
  var _templateObject$l;
5303
5641
  var columns = [{
5304
5642
  id: 'orderId',
@@ -5362,7 +5700,7 @@ var UpcomingACHPayments = function UpcomingACHPayments(_ref) {
5362
5700
  var TableContainer$2 = styled.div(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose(["\n margin: 1.2rem 0;\n border-radius: 14px;\n"])));
5363
5701
 
5364
5702
  var _templateObject$m, _templateObject2$d, _templateObject3$9, _templateObject4$7;
5365
- var _excluded$5 = ["apiEndPoint", "serviceApiEndPoint", "token", "primaryColor", "secondaryColor", "backgroundColor", "fontColor", "darkMode", "onChangeColors", "path", "onChangePath", "maxWidth", "logoUrl", "sectionLeftImageSection", "exploreCategoryImage", "sectionRightImageSection", "discountImageSection", "disabledUpdateProfileFromDashboard", "hideTotalCardInDashboardSummary", "showOnlyRecentOrder", "hidePayActionButton", "hideSalesOrderTab", "hideInvoiceTab"];
5703
+ var _excluded$5 = ["apiEndPoint", "serviceApiEndPoint", "token", "primaryColor", "secondaryColor", "backgroundColor", "fontColor", "darkMode", "onChangeColors", "path", "onChangePath", "maxWidth", "logoUrl", "sectionLeftImageSection", "exploreCategoryImage", "sectionRightImageSection", "discountImageSection", "disabledUpdateProfileFromDashboard", "hideTotalCardInDashboardSummary", "showOnlyRecentOrder", "hidePayActionButton", "hideSalesOrderTab", "hideInvoiceTab", "hideAddAccessPaymentButton"];
5366
5704
  var AccountDetails = function AccountDetails(_ref) {
5367
5705
  var _storeData$map, _storeData$find, _storeData$;
5368
5706
  var apiEndPoint = _ref.apiEndPoint,
@@ -5396,6 +5734,8 @@ var AccountDetails = function AccountDetails(_ref) {
5396
5734
  hideSalesOrderTab = _ref$hideSalesOrderTa === void 0 ? false : _ref$hideSalesOrderTa,
5397
5735
  _ref$hideInvoiceTab = _ref.hideInvoiceTab,
5398
5736
  hideInvoiceTab = _ref$hideInvoiceTab === void 0 ? false : _ref$hideInvoiceTab,
5737
+ _ref$hideAddAccessPay = _ref.hideAddAccessPaymentButton,
5738
+ hideAddAccessPaymentButton = _ref$hideAddAccessPay === void 0 ? false : _ref$hideAddAccessPay,
5399
5739
  props = _objectWithoutPropertiesLoose(_ref, _excluded$5);
5400
5740
  var _useAllSystemFeatureV = useAllSystemFeatureValues({
5401
5741
  apiEndPoint: apiEndPoint,
@@ -5569,7 +5909,8 @@ var AccountDetails = function AccountDetails(_ref) {
5569
5909
  showOnlyRecentOrder: showOnlyRecentOrder,
5570
5910
  hidePayActionButton: hidePayActionButton,
5571
5911
  hideSalesOrderTab: hideSalesOrderTab,
5572
- hideInvoiceTab: hideInvoiceTab
5912
+ hideInvoiceTab: hideInvoiceTab,
5913
+ hideAddAccessPaymentButton: hideAddAccessPaymentButton
5573
5914
  });
5574
5915
  case 'myProfile':
5575
5916
  return /*#__PURE__*/React__default.createElement(MyProfile, {
@@ -5786,83 +6127,6 @@ var TypographyContainer$7 = styled(Typography)(_templateObject4$7 || (_templateO
5786
6127
  return props.fontColor;
5787
6128
  });
5788
6129
 
5789
- var AsyncDataLoad = function AsyncDataLoad(_ref) {
5790
- var apiEndPoint = _ref.apiEndPoint,
5791
- token = _ref.token,
5792
- children = _ref.children,
5793
- onError = _ref.onError,
5794
- skeletonHeight = _ref.skeletonHeight,
5795
- loadingView = _ref.loadingView,
5796
- errorView = _ref.errorView,
5797
- asyncService = _ref.asyncService,
5798
- triggerChange = _ref.triggerChange,
5799
- apiConfig = _ref.apiConfig;
5800
- var _useState = useState({
5801
- status: 'loading',
5802
- data: {}
5803
- }),
5804
- apiState = _useState[0],
5805
- setApiState = _useState[1];
5806
- var getAPIData = function getAPIData() {
5807
- try {
5808
- var _temp3 = _catch(function () {
5809
- function _temp2() {
5810
- setApiState({
5811
- status: API_STATUSES.SUCCESS,
5812
- data: data
5813
- });
5814
- }
5815
- setApiState({
5816
- status: API_STATUSES.LOADING,
5817
- data: {}
5818
- });
5819
- var data;
5820
- var _temp = function () {
5821
- if (asyncService) {
5822
- return Promise.resolve(asyncService()).then(function (_asyncService) {
5823
- data = _asyncService;
5824
- });
5825
- } else {
5826
- return Promise.resolve(API(_extends({
5827
- apiEndPoint: apiEndPoint,
5828
- token: token,
5829
- hideErrorMessage: true
5830
- }, apiConfig))).then(function (_API) {
5831
- data = _API;
5832
- });
5833
- }
5834
- }();
5835
- return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
5836
- }, function (e) {
5837
- setApiState({
5838
- status: API_STATUSES.ERROR,
5839
- data: {}
5840
- });
5841
- if (onError) {
5842
- onError(e);
5843
- }
5844
- });
5845
- return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
5846
- } catch (e) {
5847
- return Promise.reject(e);
5848
- }
5849
- };
5850
- useEffect(function () {
5851
- if (apiConfig || asyncService) {
5852
- (function () {
5853
- return getAPIData();
5854
- })();
5855
- }
5856
- }, [apiConfig, triggerChange]);
5857
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, apiState.status === API_STATUSES.LOADING ? loadingView ? loadingView : /*#__PURE__*/React__default.createElement(Loader, {
5858
- skeleton: skeletonHeight,
5859
- height: skeletonHeight
5860
- }) : null, apiState.status === API_STATUSES.SUCCESS ? typeof children === 'function' ? children(apiState.data) : {
5861
- children: children
5862
- } : null, apiState.status === API_STATUSES.ERROR ? errorView ? errorView : 'NO DATA' : null);
5863
- };
5864
- var AsyncDataLoadComponent = memo(AsyncDataLoad);
5865
-
5866
6130
  var _templateObject$n, _templateObject2$e, _templateObject3$a;
5867
6131
  var BannerImages = function BannerImages(_ref) {
5868
6132
  var config = _ref.config,
@@ -7907,7 +8171,7 @@ var TotalAfterDiscount = function TotalAfterDiscount(_ref2) {
7907
8171
  }, renderMoney(totalAmount)) : /*#__PURE__*/createElement(Fragment$1, null), /*#__PURE__*/createElement("b", null, renderMoney(total))));
7908
8172
  };
7909
8173
 
7910
- var _templateObject$v, _templateObject2$m, _templateObject3$g, _templateObject4$d, _templateObject5$9, _templateObject6$7, _templateObject7$6, _templateObject8$5, _templateObject9$5, _templateObject10$4, _templateObject11$3, _templateObject12$2, _templateObject13$2, _templateObject14$2, _templateObject15$2, _templateObject16$2, _templateObject17$2, _templateObject18$2, _templateObject19$2, _templateObject20$1, _templateObject21$1, _templateObject22$1, _templateObject23$1, _templateObject24$1, _templateObject25$1, _templateObject26$1, _templateObject27$1, _templateObject28$1, _templateObject29$1, _templateObject30$1, _templateObject31$1, _templateObject32$1, _templateObject33$1, _templateObject34$1, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54, _templateObject55, _templateObject56, _templateObject57, _templateObject58, _templateObject59;
8174
+ var _templateObject$v, _templateObject2$m, _templateObject3$g, _templateObject4$d, _templateObject5$9, _templateObject6$7, _templateObject7$6, _templateObject8$5, _templateObject9$5, _templateObject10$4, _templateObject11$3, _templateObject12$2, _templateObject13$2, _templateObject14$2, _templateObject15$2, _templateObject16$2, _templateObject17$2, _templateObject18$2, _templateObject19$2, _templateObject20$2, _templateObject21$1, _templateObject22$1, _templateObject23$1, _templateObject24$1, _templateObject25$1, _templateObject26$1, _templateObject27$1, _templateObject28$1, _templateObject29$1, _templateObject30$1, _templateObject31$1, _templateObject32$1, _templateObject33$1, _templateObject34$1, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54, _templateObject55, _templateObject56, _templateObject57, _templateObject58, _templateObject59;
7911
8175
  var DEFAULT_PRIMARY_COLOR$1 = '#437C0F';
7912
8176
  var formatCurrency = function formatCurrency(amount) {
7913
8177
  return Number(amount).toLocaleString('en-US', {
@@ -8517,7 +8781,7 @@ var HeaderIconWrap = styled.div(_templateObject19$2 || (_templateObject19$2 = _t
8517
8781
  var $accentColor = _ref21.$accentColor;
8518
8782
  return $accentColor + "cc";
8519
8783
  });
8520
- var HeaderCopy = styled.div(_templateObject20$1 || (_templateObject20$1 = _taggedTemplateLiteralLoose(["\n flex: 1;\n min-width: 0;\n z-index: 1;\n"])));
8784
+ var HeaderCopy = styled.div(_templateObject20$2 || (_templateObject20$2 = _taggedTemplateLiteralLoose(["\n flex: 1;\n min-width: 0;\n z-index: 1;\n"])));
8521
8785
  var Eyebrow = styled.span(_templateObject21$1 || (_templateObject21$1 = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n font-size: 0.6rem;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.08em;\n color: ", ";\n\n svg {\n font-size: 0.65rem;\n }\n"])), function (_ref22) {
8522
8786
  var $accentColor = _ref22.$accentColor;
8523
8787
  return $accentColor;