@salesgenterp/ui-components 0.4.555 → 0.4.557
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 +268 -40
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +269 -41
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -683,6 +683,63 @@ function useSystemFeatureList(_ref) {
|
|
|
683
683
|
status: status
|
|
684
684
|
};
|
|
685
685
|
}
|
|
686
|
+
function useSystemFeatureByFieldName(_ref2) {
|
|
687
|
+
var apiEndPoint = _ref2.apiEndPoint,
|
|
688
|
+
token = _ref2.token,
|
|
689
|
+
moduleName = _ref2.moduleName,
|
|
690
|
+
featureName = _ref2.featureName,
|
|
691
|
+
listUpdate = _ref2.listUpdate;
|
|
692
|
+
var _useState5 = React.useState(),
|
|
693
|
+
data = _useState5[0],
|
|
694
|
+
setData = _useState5[1];
|
|
695
|
+
var _useState6 = React.useState(false),
|
|
696
|
+
loading = _useState6[0],
|
|
697
|
+
setLoading = _useState6[1];
|
|
698
|
+
var _useState7 = React.useState(false),
|
|
699
|
+
error = _useState7[0],
|
|
700
|
+
setError = _useState7[1];
|
|
701
|
+
var _useState8 = React.useState(false),
|
|
702
|
+
status = _useState8[0],
|
|
703
|
+
setStatus = _useState8[1];
|
|
704
|
+
var _useSystemFeatureList = useSystemFeatureList({
|
|
705
|
+
apiEndPoint: apiEndPoint,
|
|
706
|
+
token: token,
|
|
707
|
+
moduleName: moduleName,
|
|
708
|
+
listUpdate: listUpdate
|
|
709
|
+
}),
|
|
710
|
+
systemFeatureList = _useSystemFeatureList.systemFeatureList;
|
|
711
|
+
React.useEffect(function () {
|
|
712
|
+
try {
|
|
713
|
+
if (apiEndPoint && token && moduleName && systemFeatureList) {
|
|
714
|
+
setError(false);
|
|
715
|
+
setStatus(null);
|
|
716
|
+
setLoading(true);
|
|
717
|
+
try {
|
|
718
|
+
var _systemFeatureList$fi, _systemFeatureList$fi2;
|
|
719
|
+
var modifyData = systemFeatureList === null || systemFeatureList === void 0 ? void 0 : (_systemFeatureList$fi = systemFeatureList.find(function (item) {
|
|
720
|
+
return (item === null || item === void 0 ? void 0 : item.moduleName) === moduleName;
|
|
721
|
+
})) === null || _systemFeatureList$fi === void 0 ? void 0 : (_systemFeatureList$fi2 = _systemFeatureList$fi.systemFeatureList) === null || _systemFeatureList$fi2 === void 0 ? void 0 : _systemFeatureList$fi2.find(function (item) {
|
|
722
|
+
return (item === null || item === void 0 ? void 0 : item.featureName) === featureName;
|
|
723
|
+
});
|
|
724
|
+
setData(modifyData);
|
|
725
|
+
setLoading(false);
|
|
726
|
+
} catch (e) {
|
|
727
|
+
setLoading(false);
|
|
728
|
+
setError(true);
|
|
729
|
+
setStatus(403);
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
} catch (e) {
|
|
733
|
+
Promise.reject(e);
|
|
734
|
+
}
|
|
735
|
+
}, [moduleName, listUpdate, systemFeatureList]);
|
|
736
|
+
return {
|
|
737
|
+
systemFeatureData: data,
|
|
738
|
+
systemFeatureDataLoading: loading,
|
|
739
|
+
error: error,
|
|
740
|
+
status: status
|
|
741
|
+
};
|
|
742
|
+
}
|
|
686
743
|
function useAllSystemFeatureValues(_ref4) {
|
|
687
744
|
var apiEndPoint = _ref4.apiEndPoint,
|
|
688
745
|
token = _ref4.token,
|
|
@@ -3138,7 +3195,7 @@ var ExcessPaymentDialog = function ExcessPaymentDialog(_ref2) {
|
|
|
3138
3195
|
textAlign: 'center',
|
|
3139
3196
|
padding: '16px 8px'
|
|
3140
3197
|
}
|
|
3141
|
-
}, "This
|
|
3198
|
+
}, "This payment link has expired because it has already been used. The payment may have been completed by you or another recipient.");
|
|
3142
3199
|
}
|
|
3143
3200
|
return /*#__PURE__*/React__default.createElement(AsyncDataLoadComponent, {
|
|
3144
3201
|
apiEndPoint: apiEndPoint,
|
|
@@ -3187,8 +3244,41 @@ var totalIcons = [{
|
|
|
3187
3244
|
name: 'Excess Payment',
|
|
3188
3245
|
icon: /*#__PURE__*/React__default.createElement(tb.TbFileDollar, null)
|
|
3189
3246
|
}];
|
|
3247
|
+
var DASHBOARD_ORDER_LIST_BY_NAME = {
|
|
3248
|
+
'Sales Order List': {
|
|
3249
|
+
tabValue: 0,
|
|
3250
|
+
label: 'Sales Orders'
|
|
3251
|
+
},
|
|
3252
|
+
'Invoice List': {
|
|
3253
|
+
tabValue: 1,
|
|
3254
|
+
label: 'Recent Invoices'
|
|
3255
|
+
},
|
|
3256
|
+
'Quotation List': {
|
|
3257
|
+
tabValue: 2,
|
|
3258
|
+
label: 'Quotations'
|
|
3259
|
+
},
|
|
3260
|
+
'Credit Memo RMA List': {
|
|
3261
|
+
tabValue: 3,
|
|
3262
|
+
label: 'Return Orders'
|
|
3263
|
+
}
|
|
3264
|
+
};
|
|
3265
|
+
var parseDashboardOrderListIds = function parseDashboardOrderListIds(value) {
|
|
3266
|
+
if (value == null || value === '' || value === false) return [];
|
|
3267
|
+
if (Array.isArray(value)) {
|
|
3268
|
+
return value.map(function (id) {
|
|
3269
|
+
return Number(id);
|
|
3270
|
+
}).filter(function (id) {
|
|
3271
|
+
return !Number.isNaN(id);
|
|
3272
|
+
});
|
|
3273
|
+
}
|
|
3274
|
+
return String(value).split(',').map(function (id) {
|
|
3275
|
+
return Number(String(id).trim());
|
|
3276
|
+
}).filter(function (id) {
|
|
3277
|
+
return !Number.isNaN(id);
|
|
3278
|
+
});
|
|
3279
|
+
};
|
|
3190
3280
|
var Dashboard = function Dashboard(_ref) {
|
|
3191
|
-
var _queryParams$excessPa, _customerData$custome, _selectDates$
|
|
3281
|
+
var _queryParams$excessPa, _customerData$custome, _selectDates$getDateK, _selectDates$getDateK2, _customerData$custome2, _customerData$custome3, _customerData$custome4;
|
|
3192
3282
|
var apiEndPoint = _ref.apiEndPoint,
|
|
3193
3283
|
serviceApiEndPoint = _ref.serviceApiEndPoint,
|
|
3194
3284
|
token = _ref.token,
|
|
@@ -3214,9 +3304,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3214
3304
|
hideTotalCardInDashboardSummary = _ref.hideTotalCardInDashboardSummary,
|
|
3215
3305
|
_ref$showOnlyRecentOr = _ref.showOnlyRecentOrder,
|
|
3216
3306
|
showOnlyRecentOrder = _ref$showOnlyRecentOr === void 0 ? false : _ref$showOnlyRecentOr,
|
|
3217
|
-
hidePayActionButton = _ref.hidePayActionButton
|
|
3218
|
-
hideInvoiceTab = _ref.hideInvoiceTab,
|
|
3219
|
-
hideSalesOrderTab = _ref.hideSalesOrderTab;
|
|
3307
|
+
hidePayActionButton = _ref.hidePayActionButton;
|
|
3220
3308
|
var _useState = React.useState({}),
|
|
3221
3309
|
customerData = _useState[0],
|
|
3222
3310
|
setCustomerData = _useState[1];
|
|
@@ -3234,6 +3322,14 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3234
3322
|
salesOrders: {
|
|
3235
3323
|
startDate: null,
|
|
3236
3324
|
endDate: null
|
|
3325
|
+
},
|
|
3326
|
+
quotations: {
|
|
3327
|
+
startDate: null,
|
|
3328
|
+
endDate: null
|
|
3329
|
+
},
|
|
3330
|
+
returnOrders: {
|
|
3331
|
+
startDate: null,
|
|
3332
|
+
endDate: null
|
|
3237
3333
|
}
|
|
3238
3334
|
}),
|
|
3239
3335
|
selectDates = _useState4[0],
|
|
@@ -3251,17 +3347,47 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3251
3347
|
}),
|
|
3252
3348
|
isExcessPaymentModal = _useState7[0],
|
|
3253
3349
|
setIsExcessPaymentModal = _useState7[1];
|
|
3254
|
-
var
|
|
3350
|
+
var _ref2 = useSystemFeatureByFieldName({
|
|
3351
|
+
apiEndPoint: apiEndPoint,
|
|
3352
|
+
token: token,
|
|
3353
|
+
moduleName: 'Ecommerce',
|
|
3354
|
+
featureName: 'dashboardOrderList'
|
|
3355
|
+
}) || {},
|
|
3356
|
+
dashboardOrderListFeature = _ref2.systemFeatureData;
|
|
3357
|
+
var selectedDashboardOrderIds = React.useMemo(function () {
|
|
3358
|
+
return parseDashboardOrderListIds(dashboardOrderListFeature === null || dashboardOrderListFeature === void 0 ? void 0 : dashboardOrderListFeature.featureValue);
|
|
3359
|
+
}, [dashboardOrderListFeature === null || dashboardOrderListFeature === void 0 ? void 0 : dashboardOrderListFeature.featureValue]);
|
|
3360
|
+
var featureValueListById = React.useMemo(function () {
|
|
3361
|
+
var list = dashboardOrderListFeature === null || dashboardOrderListFeature === void 0 ? void 0 : dashboardOrderListFeature.featureValueList;
|
|
3362
|
+
if (!Array.isArray(list)) return {};
|
|
3363
|
+
return list.reduce(function (acc, item) {
|
|
3364
|
+
if ((item === null || item === void 0 ? void 0 : item.id) != null && item !== null && item !== void 0 && item.name) {
|
|
3365
|
+
acc[Number(item.id)] = item.name;
|
|
3366
|
+
}
|
|
3367
|
+
return acc;
|
|
3368
|
+
}, {});
|
|
3369
|
+
}, [dashboardOrderListFeature === null || dashboardOrderListFeature === void 0 ? void 0 : dashboardOrderListFeature.featureValueList]);
|
|
3370
|
+
var visibleTabs = React.useMemo(function () {
|
|
3371
|
+
if (!(selectedDashboardOrderIds !== null && selectedDashboardOrderIds !== void 0 && selectedDashboardOrderIds.length)) return [];
|
|
3372
|
+
return selectedDashboardOrderIds.map(function (id) {
|
|
3373
|
+
var featureName = featureValueListById === null || featureValueListById === void 0 ? void 0 : featureValueListById[id];
|
|
3374
|
+
return featureName ? DASHBOARD_ORDER_LIST_BY_NAME === null || DASHBOARD_ORDER_LIST_BY_NAME === void 0 ? void 0 : DASHBOARD_ORDER_LIST_BY_NAME[featureName] : null;
|
|
3375
|
+
}).filter(Boolean);
|
|
3376
|
+
}, [selectedDashboardOrderIds, featureValueListById]);
|
|
3377
|
+
var _useState8 = React.useState(null),
|
|
3255
3378
|
value = _useState8[0],
|
|
3256
3379
|
setValue = _useState8[1];
|
|
3257
3380
|
React.useEffect(function () {
|
|
3258
|
-
if (
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3381
|
+
if (!(visibleTabs !== null && visibleTabs !== void 0 && visibleTabs.length)) return;
|
|
3382
|
+
var isCurrentVisible = value != null && visibleTabs.some(function (tab) {
|
|
3383
|
+
return (tab === null || tab === void 0 ? void 0 : tab.tabValue) === value;
|
|
3384
|
+
});
|
|
3385
|
+
if (!isCurrentVisible) {
|
|
3386
|
+
var _visibleTabs$0$tabVal, _visibleTabs$;
|
|
3387
|
+
setValue((_visibleTabs$0$tabVal = visibleTabs === null || visibleTabs === void 0 ? void 0 : (_visibleTabs$ = visibleTabs[0]) === null || _visibleTabs$ === void 0 ? void 0 : _visibleTabs$.tabValue) != null ? _visibleTabs$0$tabVal : null);
|
|
3388
|
+
setTriggerTableData(getRandomString());
|
|
3263
3389
|
}
|
|
3264
|
-
}, [
|
|
3390
|
+
}, [visibleTabs, value]);
|
|
3265
3391
|
var handleChange = function handleChange(event, newValue) {
|
|
3266
3392
|
setValue(newValue);
|
|
3267
3393
|
setTriggerTableData(getRandomString());
|
|
@@ -3272,11 +3398,23 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3272
3398
|
'aria-controls': "simple-tabpanel-" + index
|
|
3273
3399
|
};
|
|
3274
3400
|
}
|
|
3401
|
+
var getInvoicePathByTab = function getInvoicePathByTab(tabValue) {
|
|
3402
|
+
if (tabValue === 0) return 'salesOrder';
|
|
3403
|
+
if (tabValue === 1) return 'sales-order';
|
|
3404
|
+
if (tabValue === 2) return 'quotation';
|
|
3405
|
+
if (tabValue === 3) return 'rma/product';
|
|
3406
|
+
};
|
|
3275
3407
|
var openInvoiceData = function openInvoiceData(orderId) {
|
|
3276
3408
|
if (serviceApiEndPoint) {
|
|
3277
|
-
window.open(serviceApiEndPoint + "/" + (value
|
|
3409
|
+
window.open(serviceApiEndPoint + "/" + getInvoicePathByTab(value) + "/invoice/" + orderId + "?token=" + token + "&defaultStoreId=" + defaultStoreId + "&storeIdList=" + storeIdList + "&isEcommerce=true", '_blank', 'noopener,noreferrer');
|
|
3278
3410
|
}
|
|
3279
3411
|
};
|
|
3412
|
+
var getDateKey = function getDateKey(tabValue) {
|
|
3413
|
+
if (tabValue === 0) return 'salesOrders';
|
|
3414
|
+
if (tabValue === 1) return 'recentInvoices';
|
|
3415
|
+
if (tabValue === 2) return 'quotations';
|
|
3416
|
+
if (tabValue === 3) return 'returnOrders';
|
|
3417
|
+
};
|
|
3280
3418
|
var onDateChange = function onDateChange(data) {
|
|
3281
3419
|
var startDate = moment(data === null || data === void 0 ? void 0 : data.startDate).startOf('day');
|
|
3282
3420
|
var endDate = moment(data === null || data === void 0 ? void 0 : data.endDate).endOf('day');
|
|
@@ -3290,7 +3428,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3290
3428
|
};
|
|
3291
3429
|
setSelectDates(function (prev) {
|
|
3292
3430
|
var _extends2;
|
|
3293
|
-
return _extends({}, prev, (_extends2 = {}, _extends2[value
|
|
3431
|
+
return _extends({}, prev, (_extends2 = {}, _extends2[getDateKey(value)] = newDates, _extends2));
|
|
3294
3432
|
});
|
|
3295
3433
|
setTriggerTableData(getRandomString());
|
|
3296
3434
|
};
|
|
@@ -3303,6 +3441,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3303
3441
|
token: token
|
|
3304
3442
|
})).then(function (data) {
|
|
3305
3443
|
if (data) {
|
|
3444
|
+
var _link$parentNode;
|
|
3306
3445
|
var blob = new Blob([data]);
|
|
3307
3446
|
var url1 = window.URL.createObjectURL(blob);
|
|
3308
3447
|
var link = document.createElement('a');
|
|
@@ -3310,7 +3449,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3310
3449
|
link.setAttribute('download', "invoice-" + orderId + ".xls");
|
|
3311
3450
|
document.body.appendChild(link);
|
|
3312
3451
|
link.click();
|
|
3313
|
-
link.parentNode.removeChild(link);
|
|
3452
|
+
(_link$parentNode = link.parentNode) === null || _link$parentNode === void 0 ? void 0 : _link$parentNode.removeChild(link);
|
|
3314
3453
|
}
|
|
3315
3454
|
});
|
|
3316
3455
|
} catch (e) {
|
|
@@ -3360,13 +3499,11 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3360
3499
|
}, {
|
|
3361
3500
|
id: 'trackingNumber',
|
|
3362
3501
|
label: 'Tracking No.',
|
|
3363
|
-
format: function format(value,
|
|
3364
|
-
var trackingNumber = _ref2.trackingNumber,
|
|
3365
|
-
trackingNumberUrl = _ref2.trackingNumberUrl;
|
|
3502
|
+
format: function format(value, record) {
|
|
3366
3503
|
return /*#__PURE__*/React__default.createElement("a", {
|
|
3367
|
-
href: trackingNumberUrl,
|
|
3504
|
+
href: record === null || record === void 0 ? void 0 : record.trackingNumberUrl,
|
|
3368
3505
|
target: '_blank'
|
|
3369
|
-
}, trackingNumber);
|
|
3506
|
+
}, record === null || record === void 0 ? void 0 : record.trackingNumber);
|
|
3370
3507
|
}
|
|
3371
3508
|
}, !hideInvoiceAction && {
|
|
3372
3509
|
id: 'orderId',
|
|
@@ -3463,6 +3600,101 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3463
3600
|
})));
|
|
3464
3601
|
}
|
|
3465
3602
|
}];
|
|
3603
|
+
var quotaionColumns = [{
|
|
3604
|
+
id: 'quotationId',
|
|
3605
|
+
label: 'ID'
|
|
3606
|
+
}, {
|
|
3607
|
+
id: 'insertedTimestamp',
|
|
3608
|
+
label: 'Date',
|
|
3609
|
+
format: function format(value) {
|
|
3610
|
+
return getLocalTime({
|
|
3611
|
+
time: value
|
|
3612
|
+
});
|
|
3613
|
+
}
|
|
3614
|
+
}, {
|
|
3615
|
+
id: 'totalAmount',
|
|
3616
|
+
label: 'Total Amount',
|
|
3617
|
+
format: function format(value) {
|
|
3618
|
+
return renderMoney(value);
|
|
3619
|
+
}
|
|
3620
|
+
}, {
|
|
3621
|
+
id: 'status',
|
|
3622
|
+
label: 'Status',
|
|
3623
|
+
format: function format(value) {
|
|
3624
|
+
return /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3625
|
+
container: true
|
|
3626
|
+
}, /*#__PURE__*/React__default.createElement(StatusContainer, {
|
|
3627
|
+
item: true,
|
|
3628
|
+
primaryColor: primaryColor
|
|
3629
|
+
}, value));
|
|
3630
|
+
}
|
|
3631
|
+
}, !hideInvoiceAction && {
|
|
3632
|
+
id: 'quotationId',
|
|
3633
|
+
label: 'Action',
|
|
3634
|
+
align: 'center',
|
|
3635
|
+
format: function format(value, record) {
|
|
3636
|
+
return /*#__PURE__*/React__default.createElement("span", null, /*#__PURE__*/React__default.createElement(material.IconButton, {
|
|
3637
|
+
onClick: function onClick() {
|
|
3638
|
+
return openInvoiceData(value);
|
|
3639
|
+
},
|
|
3640
|
+
style: {
|
|
3641
|
+
color: primaryColor,
|
|
3642
|
+
padding: 2
|
|
3643
|
+
}
|
|
3644
|
+
}, /*#__PURE__*/React__default.createElement(md.MdRemoveRedEye, {
|
|
3645
|
+
style: {
|
|
3646
|
+
fontSize: '1.6rem'
|
|
3647
|
+
}
|
|
3648
|
+
})));
|
|
3649
|
+
}
|
|
3650
|
+
}];
|
|
3651
|
+
var returnOrderColumns = [{
|
|
3652
|
+
id: 'returnOrderId',
|
|
3653
|
+
label: 'ID'
|
|
3654
|
+
}, {
|
|
3655
|
+
id: 'insertedTimestamp',
|
|
3656
|
+
label: 'Date',
|
|
3657
|
+
format: function format(value) {
|
|
3658
|
+
return getLocalTime({
|
|
3659
|
+
time: value
|
|
3660
|
+
});
|
|
3661
|
+
}
|
|
3662
|
+
}, {
|
|
3663
|
+
id: 'totalAmount',
|
|
3664
|
+
label: 'Total Amount',
|
|
3665
|
+
format: function format(value) {
|
|
3666
|
+
return renderMoney(value);
|
|
3667
|
+
}
|
|
3668
|
+
}, {
|
|
3669
|
+
id: 'status',
|
|
3670
|
+
label: 'Status',
|
|
3671
|
+
format: function format(value) {
|
|
3672
|
+
return /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3673
|
+
container: true
|
|
3674
|
+
}, /*#__PURE__*/React__default.createElement(StatusContainer, {
|
|
3675
|
+
item: true,
|
|
3676
|
+
primaryColor: primaryColor
|
|
3677
|
+
}, value));
|
|
3678
|
+
}
|
|
3679
|
+
}];
|
|
3680
|
+
var tableColumnsByTab = {
|
|
3681
|
+
0: salesOrderColumns,
|
|
3682
|
+
1: columns,
|
|
3683
|
+
2: quotaionColumns,
|
|
3684
|
+
3: returnOrderColumns
|
|
3685
|
+
};
|
|
3686
|
+
var tableApiPathByTab = {
|
|
3687
|
+
0: 'salesOrderTable',
|
|
3688
|
+
1: 'orderTable',
|
|
3689
|
+
2: 'quotationTable',
|
|
3690
|
+
3: 'returnOrderTable'
|
|
3691
|
+
};
|
|
3692
|
+
var tableTitleByTab = {
|
|
3693
|
+
0: 'Sales orders',
|
|
3694
|
+
1: 'Recent Invoices',
|
|
3695
|
+
2: 'Quotations',
|
|
3696
|
+
3: 'Return Orders'
|
|
3697
|
+
};
|
|
3466
3698
|
React.useEffect(function () {
|
|
3467
3699
|
(function () {
|
|
3468
3700
|
try {
|
|
@@ -3699,10 +3931,10 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3699
3931
|
style: {
|
|
3700
3932
|
marginTop: '1rem'
|
|
3701
3933
|
}
|
|
3702
|
-
})))))), /*#__PURE__*/React__default.createElement(TableContainer, null, /*#__PURE__*/React__default.createElement(APITable, {
|
|
3934
|
+
})))))), (visibleTabs === null || visibleTabs === void 0 ? void 0 : visibleTabs.length) > 0 && value != null && /*#__PURE__*/React__default.createElement(TableContainer, null, /*#__PURE__*/React__default.createElement(APITable, {
|
|
3703
3935
|
key: value,
|
|
3704
3936
|
cacheFilters: true,
|
|
3705
|
-
extraFilterParams:
|
|
3937
|
+
extraFilterParams: selectDates === null || selectDates === void 0 ? void 0 : selectDates[getDateKey(value)],
|
|
3706
3938
|
tableHeaderContent: /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3707
3939
|
container: true,
|
|
3708
3940
|
justifyContent: "space-between",
|
|
@@ -3721,11 +3953,13 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3721
3953
|
"aria-label": "basic tabs example",
|
|
3722
3954
|
primaryColor: primaryColor,
|
|
3723
3955
|
fontColor: fontColor
|
|
3724
|
-
},
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3956
|
+
}, visibleTabs === null || visibleTabs === void 0 ? void 0 : visibleTabs.map(function (tab) {
|
|
3957
|
+
return /*#__PURE__*/React__default.createElement(material.Tab, _extends({
|
|
3958
|
+
key: tab === null || tab === void 0 ? void 0 : tab.tabValue,
|
|
3959
|
+
label: tab === null || tab === void 0 ? void 0 : tab.label,
|
|
3960
|
+
value: tab === null || tab === void 0 ? void 0 : tab.tabValue
|
|
3961
|
+
}, a11yProps(tab === null || tab === void 0 ? void 0 : tab.tabValue)));
|
|
3962
|
+
})))), /*#__PURE__*/React__default.createElement(TypographyContainer$2, {
|
|
3729
3963
|
variant: "h4",
|
|
3730
3964
|
gutterBottom: true,
|
|
3731
3965
|
fontColor: fontColor,
|
|
@@ -3735,14 +3969,14 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3735
3969
|
padding: '1rem 0',
|
|
3736
3970
|
margin: 0
|
|
3737
3971
|
}
|
|
3738
|
-
},
|
|
3972
|
+
}, tableTitleByTab === null || tableTitleByTab === void 0 ? void 0 : tableTitleByTab[value]), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3739
3973
|
item: true
|
|
3740
3974
|
}, /*#__PURE__*/React__default.createElement(DateRangePicker, {
|
|
3741
3975
|
fontColor: fontColor,
|
|
3742
3976
|
primaryColor: primaryColor,
|
|
3743
3977
|
onChange: onDateChange,
|
|
3744
|
-
initialStartDate:
|
|
3745
|
-
initialEndDate:
|
|
3978
|
+
initialStartDate: selectDates === null || selectDates === void 0 ? void 0 : (_selectDates$getDateK = selectDates[getDateKey(value)]) === null || _selectDates$getDateK === void 0 ? void 0 : _selectDates$getDateK.startDate,
|
|
3979
|
+
initialEndDate: selectDates === null || selectDates === void 0 ? void 0 : (_selectDates$getDateK2 = selectDates[getDateKey(value)]) === null || _selectDates$getDateK2 === void 0 ? void 0 : _selectDates$getDateK2.endDate
|
|
3746
3980
|
}))),
|
|
3747
3981
|
listUpdate: triggerTableData,
|
|
3748
3982
|
pagination: false,
|
|
@@ -3750,9 +3984,9 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3750
3984
|
x: 1000
|
|
3751
3985
|
},
|
|
3752
3986
|
tableId: "master-child-map",
|
|
3753
|
-
columns:
|
|
3987
|
+
columns: (tableColumnsByTab === null || tableColumnsByTab === void 0 ? void 0 : tableColumnsByTab[value]) || salesOrderColumns,
|
|
3754
3988
|
apiData: {
|
|
3755
|
-
url: "/ecommerce/dashboard/" + (
|
|
3989
|
+
url: "/ecommerce/dashboard/" + ((tableApiPathByTab === null || tableApiPathByTab === void 0 ? void 0 : tableApiPathByTab[value]) || 'salesOrderTable'),
|
|
3756
3990
|
apiEndPoint: apiEndPoint,
|
|
3757
3991
|
token: token
|
|
3758
3992
|
},
|
|
@@ -5724,7 +5958,7 @@ var UpcomingACHPayments = function UpcomingACHPayments(_ref) {
|
|
|
5724
5958
|
var TableContainer$2 = styled__default.div(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose(["\n margin: 1.2rem 0;\n border-radius: 14px;\n"])));
|
|
5725
5959
|
|
|
5726
5960
|
var _templateObject$m, _templateObject2$d, _templateObject3$9, _templateObject4$7;
|
|
5727
|
-
var _excluded$5 = ["apiEndPoint", "serviceApiEndPoint", "token", "primaryColor", "secondaryColor", "backgroundColor", "fontColor", "darkMode", "onChangeColors", "path", "onChangePath", "maxWidth", "logoUrl", "sectionLeftImageSection", "exploreCategoryImage", "sectionRightImageSection", "discountImageSection", "disabledUpdateProfileFromDashboard", "hideTotalCardInDashboardSummary", "showOnlyRecentOrder", "hidePayActionButton", "
|
|
5961
|
+
var _excluded$5 = ["apiEndPoint", "serviceApiEndPoint", "token", "primaryColor", "secondaryColor", "backgroundColor", "fontColor", "darkMode", "onChangeColors", "path", "onChangePath", "maxWidth", "logoUrl", "sectionLeftImageSection", "exploreCategoryImage", "sectionRightImageSection", "discountImageSection", "disabledUpdateProfileFromDashboard", "hideTotalCardInDashboardSummary", "showOnlyRecentOrder", "hidePayActionButton", "hideAddAccessPaymentButton"];
|
|
5728
5962
|
var AccountDetails = function AccountDetails(_ref) {
|
|
5729
5963
|
var _storeData$map, _storeData$find, _storeData$;
|
|
5730
5964
|
var apiEndPoint = _ref.apiEndPoint,
|
|
@@ -5754,10 +5988,6 @@ var AccountDetails = function AccountDetails(_ref) {
|
|
|
5754
5988
|
showOnlyRecentOrder = _ref$showOnlyRecentOr === void 0 ? false : _ref$showOnlyRecentOr,
|
|
5755
5989
|
_ref$hidePayActionBut = _ref.hidePayActionButton,
|
|
5756
5990
|
hidePayActionButton = _ref$hidePayActionBut === void 0 ? false : _ref$hidePayActionBut,
|
|
5757
|
-
_ref$hideSalesOrderTa = _ref.hideSalesOrderTab,
|
|
5758
|
-
hideSalesOrderTab = _ref$hideSalesOrderTa === void 0 ? false : _ref$hideSalesOrderTa,
|
|
5759
|
-
_ref$hideInvoiceTab = _ref.hideInvoiceTab,
|
|
5760
|
-
hideInvoiceTab = _ref$hideInvoiceTab === void 0 ? false : _ref$hideInvoiceTab,
|
|
5761
5991
|
_ref$hideAddAccessPay = _ref.hideAddAccessPaymentButton,
|
|
5762
5992
|
hideAddAccessPaymentButton = _ref$hideAddAccessPay === void 0 ? false : _ref$hideAddAccessPay,
|
|
5763
5993
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
@@ -5932,8 +6162,6 @@ var AccountDetails = function AccountDetails(_ref) {
|
|
|
5932
6162
|
hideTotalCardInDashboardSummary: hideTotalCardInDashboardSummary,
|
|
5933
6163
|
showOnlyRecentOrder: showOnlyRecentOrder,
|
|
5934
6164
|
hidePayActionButton: hidePayActionButton,
|
|
5935
|
-
hideSalesOrderTab: hideSalesOrderTab,
|
|
5936
|
-
hideInvoiceTab: hideInvoiceTab,
|
|
5937
6165
|
hideAddAccessPaymentButton: hideAddAccessPaymentButton
|
|
5938
6166
|
});
|
|
5939
6167
|
case 'myProfile':
|
|
@@ -10518,7 +10746,7 @@ var checkMinMaxQty = function checkMinMaxQty(_ref2) {
|
|
|
10518
10746
|
};
|
|
10519
10747
|
|
|
10520
10748
|
var _templateObject$B, _templateObject2$r, _templateObject3$l;
|
|
10521
|
-
var CartDrawerProduct = styled__default.div(_templateObject$B || (_templateObject$B = _taggedTemplateLiteralLoose(["\n width: 100%;\n max-width: 100%;\n display: flex;\n flex-direction: row;\n height:
|
|
10749
|
+
var CartDrawerProduct = styled__default.div(_templateObject$B || (_templateObject$B = _taggedTemplateLiteralLoose(["\n width: 100%;\n max-width: 100%;\n display: flex;\n flex-direction: row;\n height: 113px;\n justify-content: space-around;\n align-items: center;\n overflow: hidden;\n margin-bottom: 1rem;\n user-select: none;\n background: #f2f2f290;\n border: 1px solid #f2f2f290;\n padding: 0.5rem;\n border-radius: 12px;\n box-sizing: border-box;\n\n img {\n width: 20%;\n max-height: 100%;\n /* aspect-ratio: 1; */\n object-fit: contain;\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 .name {\n font-size: 0.9rem;\n line-height: 1.2rem;\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 }\n }\n }\n @media only screen and (max-width: 768px) {\n .closeIcon {\n font-size: 1rem;\n }\n }\n @media only screen and (max-width: 340px) {\n .middleSection {\n h6 {\n font-size: 0.9rem;\n }\n }\n }\n"])), function (props) {
|
|
10522
10750
|
return props.color || 'grey';
|
|
10523
10751
|
});
|
|
10524
10752
|
var CartDrawerQtBox = styled__default.div(_templateObject2$r || (_templateObject2$r = _taggedTemplateLiteralLoose(["\n height: 30px;\n width: 86px;\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: #323232;\n padding: 0 0.5rem;\n border-radius: 5px;\n max-width: 100%;\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 input {\n width: 40px;\n height: 100%;\n text-align: center;\n border: none;\n }\n }\n @media only screen and (max-width: 600px) {\n min-width: 55px;\n aspect-ratio: 1/2;\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"])));
|