@salesgenterp/ui-components 0.4.553 → 0.4.554
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 +15 -16
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +17 -18
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -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,
|
|
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';
|
|
2
2
|
import { styled as styled$1 } from '@mui/material/styles';
|
|
3
3
|
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
4
4
|
import React__default, { useState, useEffect, forwardRef, memo, createElement, useCallback, Fragment as Fragment$1, useRef, useMemo } from 'react';
|
|
5
|
-
import { MdVisibilityOff, MdVisibility, MdClose, MdMonetizationOn,
|
|
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';
|
|
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';
|
|
@@ -3171,8 +3171,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3171
3171
|
showOnlyRecentOrder = _ref$showOnlyRecentOr === void 0 ? false : _ref$showOnlyRecentOr,
|
|
3172
3172
|
hidePayActionButton = _ref.hidePayActionButton,
|
|
3173
3173
|
hideInvoiceTab = _ref.hideInvoiceTab,
|
|
3174
|
-
hideSalesOrderTab = _ref.hideSalesOrderTab
|
|
3175
|
-
hideAddAccessPaymentButton = _ref.hideAddAccessPaymentButton;
|
|
3174
|
+
hideSalesOrderTab = _ref.hideSalesOrderTab;
|
|
3176
3175
|
var _useState = useState({}),
|
|
3177
3176
|
customerData = _useState[0],
|
|
3178
3177
|
setCustomerData = _useState[1];
|
|
@@ -3459,6 +3458,19 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3459
3458
|
Promise.reject(e);
|
|
3460
3459
|
}
|
|
3461
3460
|
}, [queryParams]);
|
|
3461
|
+
useEffect(function () {
|
|
3462
|
+
try {
|
|
3463
|
+
try {
|
|
3464
|
+
if (queryParams !== null && queryParams !== void 0 && queryParams.excessModal) {
|
|
3465
|
+
setIsExcessPaymentModal({
|
|
3466
|
+
open: true
|
|
3467
|
+
});
|
|
3468
|
+
}
|
|
3469
|
+
} catch (error) {}
|
|
3470
|
+
} catch (e) {
|
|
3471
|
+
Promise.reject(e);
|
|
3472
|
+
}
|
|
3473
|
+
}, [queryParams]);
|
|
3462
3474
|
var totalDataSource = filter(convertCamCaseToSnake(dashboardData) || [], function (data) {
|
|
3463
3475
|
var list = ['totalNumberOfOrders', 'totalAmountSpend'];
|
|
3464
3476
|
return hideTotalCardInDashboardSummary ? !includesCaseInsensitive(list, data === null || data === void 0 ? void 0 : data.name) : data;
|
|
@@ -3539,7 +3551,6 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3539
3551
|
}, totalDataSource === null || totalDataSource === void 0 ? void 0 : totalDataSource.map(function (data) {
|
|
3540
3552
|
var _data$name, _data$name2, _data$name3, _totalIcons$find;
|
|
3541
3553
|
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';
|
|
3542
|
-
var isExcessPayment = (data === null || data === void 0 ? void 0 : data.name) === 'Excess Payment';
|
|
3543
3554
|
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
3544
3555
|
item: true,
|
|
3545
3556
|
xs: 12,
|
|
@@ -3563,19 +3574,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3563
3574
|
style: {
|
|
3564
3575
|
flex: 1
|
|
3565
3576
|
}
|
|
3566
|
-
}, /*#__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)))
|
|
3567
|
-
title: "Add Excess Payment",
|
|
3568
|
-
arrow: true
|
|
3569
|
-
}, /*#__PURE__*/React__default.createElement(AddExcessPaymentButton, {
|
|
3570
|
-
className: "add-excess-payment-btn",
|
|
3571
|
-
primaryColor: primaryColor,
|
|
3572
|
-
onClick: function onClick() {
|
|
3573
|
-
return setIsExcessPaymentModal({
|
|
3574
|
-
open: true
|
|
3575
|
-
});
|
|
3576
|
-
},
|
|
3577
|
-
"aria-label": "Add excess payment"
|
|
3578
|
-
}, /*#__PURE__*/React__default.createElement(MdAdd, null), /*#__PURE__*/React__default.createElement("span", null, "Add")))));
|
|
3577
|
+
}, /*#__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)))));
|
|
3579
3578
|
}))), !hideBannerSection && /*#__PURE__*/React__default.createElement(BannerContainer, null, /*#__PURE__*/React__default.createElement(Grid, {
|
|
3580
3579
|
container: true,
|
|
3581
3580
|
spacing: 3,
|