@salesgenterp/ui-components 0.4.168 → 0.4.169
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 +42 -33
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +42 -33
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3661,7 +3661,7 @@ var getLocalTime = function getLocalTime(_ref) {
|
|
|
3661
3661
|
}
|
|
3662
3662
|
return convertedTime;
|
|
3663
3663
|
};
|
|
3664
|
-
var getUTCTime
|
|
3664
|
+
var getUTCTime = function getUTCTime(_ref2) {
|
|
3665
3665
|
var time = _ref2.time,
|
|
3666
3666
|
_ref2$format = _ref2.format,
|
|
3667
3667
|
format = _ref2$format === void 0 ? DATE_FORMATS.DEFAULT_DATE_TIME_FORMAT : _ref2$format,
|
|
@@ -3698,6 +3698,17 @@ var getRandomString = function getRandomString(length) {
|
|
|
3698
3698
|
}
|
|
3699
3699
|
return text;
|
|
3700
3700
|
};
|
|
3701
|
+
var currentTimeText = function currentTimeText() {
|
|
3702
|
+
var data = [[0, 4, 'Good night'], [5, 11, 'Good morning'], [12, 16, 'Good afternoon'], [17, 19, 'Good evening'], [20, 24, 'Good night']];
|
|
3703
|
+
var hr = new Date().getHours();
|
|
3704
|
+
var text = '';
|
|
3705
|
+
for (var i = 0; i < data.length; i++) {
|
|
3706
|
+
if (hr >= data[i][0] && hr <= data[i][1]) {
|
|
3707
|
+
text = data[i][2];
|
|
3708
|
+
}
|
|
3709
|
+
}
|
|
3710
|
+
return text;
|
|
3711
|
+
};
|
|
3701
3712
|
|
|
3702
3713
|
var _templateObject$9;
|
|
3703
3714
|
var SideMenuItemComponent = function SideMenuItemComponent(props) {
|
|
@@ -3751,7 +3762,7 @@ var SideMenuItem = function SideMenuItem(props) {
|
|
|
3751
3762
|
tabValue = props.tabValue,
|
|
3752
3763
|
onTabChange = props.onTabChange;
|
|
3753
3764
|
var isExpandable = items && items.length > 0;
|
|
3754
|
-
var _React$useState = React__default.useState(name === 'My Account' ? true :
|
|
3765
|
+
var _React$useState = React__default.useState(name === 'My Account' ? true : true),
|
|
3755
3766
|
open = _React$useState[0],
|
|
3756
3767
|
setOpen = _React$useState[1];
|
|
3757
3768
|
function handleClick() {
|
|
@@ -4618,6 +4629,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
4618
4629
|
var _useState3 = React.useState({}),
|
|
4619
4630
|
selectDates = _useState3[0],
|
|
4620
4631
|
setSelectDates = _useState3[1];
|
|
4632
|
+
console.log('selectDates: ', selectDates);
|
|
4621
4633
|
var _useState4 = React.useState(getRandomString()),
|
|
4622
4634
|
triggerTableData = _useState4[0],
|
|
4623
4635
|
setTriggerTableData = _useState4[1];
|
|
@@ -4781,19 +4793,12 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
4781
4793
|
}, /*#__PURE__*/React__default.createElement(Root$2, {
|
|
4782
4794
|
backgroundColor: backgroundColor
|
|
4783
4795
|
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(TitleContainer, {
|
|
4796
|
+
fontColor: fontColor,
|
|
4784
4797
|
primaryColor: primaryColor,
|
|
4785
4798
|
backgroundColor: backgroundColor
|
|
4786
|
-
}, /*#__PURE__*/React__default.createElement("span", null,
|
|
4787
|
-
variant: "h4",
|
|
4788
|
-
gutterBottom: true,
|
|
4789
|
-
fontColor: fontColor
|
|
4790
|
-
}, /*#__PURE__*/React__default.createElement("b", {
|
|
4791
|
-
style: {
|
|
4792
|
-
fontSize: '2rem'
|
|
4793
|
-
}
|
|
4794
|
-
}, "Welcome Back To Your Dashboard"))), /*#__PURE__*/React__default.createElement(TotalRoot, null, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
4799
|
+
}, /*#__PURE__*/React__default.createElement("span", null, currentTimeText()), ' ', /*#__PURE__*/React__default.createElement("b", null, customerData === null || customerData === void 0 ? void 0 : (_customerData$custome = customerData.customerDto) === null || _customerData$custome === void 0 ? void 0 : _customerData$custome.name, "!"))), /*#__PURE__*/React__default.createElement(TotalRoot, null, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
4795
4800
|
container: true,
|
|
4796
|
-
spacing:
|
|
4801
|
+
spacing: 3
|
|
4797
4802
|
}, totalDataSource === null || totalDataSource === void 0 ? void 0 : totalDataSource.map(function (data) {
|
|
4798
4803
|
var _data$name, _data$name2, _data$name3;
|
|
4799
4804
|
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;
|
|
@@ -4817,14 +4822,13 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
4817
4822
|
}, isAmount ? /*#__PURE__*/React__default.createElement(md.MdMonetizationOn, null) : /*#__PURE__*/React__default.createElement(gr.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)))));
|
|
4818
4823
|
}))), /*#__PURE__*/React__default.createElement(CategoriesContainer, null, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
4819
4824
|
container: true,
|
|
4820
|
-
spacing:
|
|
4825
|
+
spacing: 3,
|
|
4826
|
+
alignItems: "center"
|
|
4821
4827
|
}, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
4822
4828
|
item: true,
|
|
4823
4829
|
xs: 12,
|
|
4824
4830
|
sm: 6,
|
|
4825
|
-
md: 8
|
|
4826
|
-
justifyContent: "space-between",
|
|
4827
|
-
alignItems: "center"
|
|
4831
|
+
md: 8
|
|
4828
4832
|
}, /*#__PURE__*/React__default.createElement(ImageContainer, {
|
|
4829
4833
|
component: "img",
|
|
4830
4834
|
image: "/images/categories1.png",
|
|
@@ -4833,9 +4837,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
4833
4837
|
item: true,
|
|
4834
4838
|
xs: 12,
|
|
4835
4839
|
sm: 6,
|
|
4836
|
-
md: 4
|
|
4837
|
-
justifyContent: "space-between",
|
|
4838
|
-
alignItems: "center"
|
|
4840
|
+
md: 4
|
|
4839
4841
|
}, /*#__PURE__*/React__default.createElement(ImageContainer, {
|
|
4840
4842
|
component: "img",
|
|
4841
4843
|
image: "/images/categories2.png",
|
|
@@ -4861,7 +4863,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
4861
4863
|
justifyContent: "space-between",
|
|
4862
4864
|
alignItems: "center"
|
|
4863
4865
|
}, /*#__PURE__*/React__default.createElement(TypographyContainer, {
|
|
4864
|
-
variant: "
|
|
4866
|
+
variant: "h4",
|
|
4865
4867
|
gutterBottom: true,
|
|
4866
4868
|
fontColor: fontColor,
|
|
4867
4869
|
style: {
|
|
@@ -4875,7 +4877,9 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
4875
4877
|
}, /*#__PURE__*/React__default.createElement(DateRangePicker, {
|
|
4876
4878
|
fontColor: fontColor,
|
|
4877
4879
|
primaryColor: primaryColor,
|
|
4878
|
-
onChange: onDateChange
|
|
4880
|
+
onChange: onDateChange,
|
|
4881
|
+
initialStartDate: null,
|
|
4882
|
+
initialEndDate: null
|
|
4879
4883
|
}))),
|
|
4880
4884
|
listUpdate: triggerTableData,
|
|
4881
4885
|
pagination: false,
|
|
@@ -5021,7 +5025,9 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
5021
5025
|
})))))))));
|
|
5022
5026
|
};
|
|
5023
5027
|
var Root$2 = styled__default.div(_templateObject$d || (_templateObject$d = _taggedTemplateLiteralLoose([""])));
|
|
5024
|
-
var TitleContainer = styled__default.h4(_templateObject2$b || (_templateObject2$b = _taggedTemplateLiteralLoose(["\n span
|
|
5028
|
+
var TitleContainer = styled__default.h4(_templateObject2$b || (_templateObject2$b = _taggedTemplateLiteralLoose(["\n span {\n color: ", ";\n font-size: 2.7rem;\n font-weight: 500;\n // font-family: Poppins;\n }\n b {\n color: ", ";\n font-size: 2.7rem;\n // font-family: Poppins;\n }\n"])), function (props) {
|
|
5029
|
+
return props.fontColor;
|
|
5030
|
+
}, function (props) {
|
|
5025
5031
|
return props.primaryColor;
|
|
5026
5032
|
});
|
|
5027
5033
|
var MeetContainer = styled__default.h4(_templateObject3$b || (_templateObject3$b = _taggedTemplateLiteralLoose(["\n margin-bottom: 1rem;\n // font-family: Poppins;\n span > b {\n color: ", ";\n font-size: 1.3rem;\n }\n b {\n color: ", ";\n font-size: 1.3rem;\n }\n"])), function (props) {
|
|
@@ -5044,14 +5050,16 @@ var SocialIconContainer = styled__default.a(_templateObject8$3 || (_templateObje
|
|
|
5044
5050
|
}, function (props) {
|
|
5045
5051
|
return props.fontColor;
|
|
5046
5052
|
});
|
|
5047
|
-
var ImageContainer = styled__default(material.CardMedia)(_templateObject9$3 || (_templateObject9$3 = _taggedTemplateLiteralLoose(["\n max-width: 100%;\n img {\n max-width: 100%;\n }\n"])));
|
|
5053
|
+
var ImageContainer = styled__default(material.CardMedia)(_templateObject9$3 || (_templateObject9$3 = _taggedTemplateLiteralLoose(["\n max-width: 100%;\n border-radius: 14px;\n img {\n max-width: 100%;\n }\n"])));
|
|
5048
5054
|
var TotalRoot = styled__default.div(_templateObject10$2 || (_templateObject10$2 = _taggedTemplateLiteralLoose(["\n margin: 2rem 0;\n"])));
|
|
5049
|
-
var TotalContainer = styled__default(material.Stack)(_templateObject11$1 || (_templateObject11$1 = _taggedTemplateLiteralLoose(["\n border-radius: 14px;\n background-color: ", ";\n padding: 1.4rem;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px 0px;\n // font-family: Poppins !important;\n :hover {\n background-color: ", ";\n p,\n h3,\n svg {\n color: #fff !important;\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.
|
|
5055
|
+
var TotalContainer = styled__default(material.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 // font-family: Poppins !important;\n :hover {\n background-color: ", ";\n p,\n h3,\n svg {\n color: #fff !important;\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: ", "20;\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) {
|
|
5050
5056
|
return props.secondaryColor;
|
|
5051
5057
|
}, function (props) {
|
|
5052
5058
|
return props.primaryColor;
|
|
5053
5059
|
}, function (props) {
|
|
5054
5060
|
return props.fontColor;
|
|
5061
|
+
}, function (props) {
|
|
5062
|
+
return props.fontColor;
|
|
5055
5063
|
}, function (props) {
|
|
5056
5064
|
return props.primaryColor;
|
|
5057
5065
|
}, function (props) {
|
|
@@ -6725,10 +6733,10 @@ var Statement = function Statement(_ref) {
|
|
|
6725
6733
|
customerData = _useState[0],
|
|
6726
6734
|
setCustomerData = _useState[1];
|
|
6727
6735
|
var _useState2 = React.useState({
|
|
6728
|
-
startDate: getUTCTime
|
|
6736
|
+
startDate: getUTCTime({
|
|
6729
6737
|
time: moment$1().startOf('month')
|
|
6730
6738
|
}),
|
|
6731
|
-
endDate: getUTCTime
|
|
6739
|
+
endDate: getUTCTime({
|
|
6732
6740
|
time: moment$1().endOf('month')
|
|
6733
6741
|
})
|
|
6734
6742
|
}),
|
|
@@ -6739,10 +6747,10 @@ var Statement = function Statement(_ref) {
|
|
|
6739
6747
|
setTriggerTableData = _useState3[1];
|
|
6740
6748
|
var onDateChange = function onDateChange(data) {
|
|
6741
6749
|
setQueryParams({
|
|
6742
|
-
startDate: getUTCTime
|
|
6750
|
+
startDate: getUTCTime({
|
|
6743
6751
|
time: data === null || data === void 0 ? void 0 : data.startDate
|
|
6744
6752
|
}),
|
|
6745
|
-
endDate: getUTCTime
|
|
6753
|
+
endDate: getUTCTime({
|
|
6746
6754
|
time: data === null || data === void 0 ? void 0 : data.endDate
|
|
6747
6755
|
})
|
|
6748
6756
|
});
|
|
@@ -7074,9 +7082,9 @@ var AccountDetails = function AccountDetails(_ref) {
|
|
|
7074
7082
|
var _ref$apiEndPoint = _ref.apiEndPoint,
|
|
7075
7083
|
apiEndPoint = _ref$apiEndPoint === void 0 ? 'https://dev.salesgent.xyz/api' : _ref$apiEndPoint,
|
|
7076
7084
|
_ref$token = _ref.token,
|
|
7077
|
-
token = _ref$token === void 0 ? 'eyJhbGciOiJIUzI1NiJ9.
|
|
7085
|
+
token = _ref$token === void 0 ? 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJzYWxlc2dlbnRlcnBAZ21haWwuY29tIiwidGllciI6MiwidXNlclR5cGUiOiJDdXN0b21lciIsInRva2VuVHlwZSI6ImFjY2VzcyIsInN0b3JlSWQiOjIsImV4cCI6MTY2ODgwNDM2NywidXNlcklkIjoyNDU1LCJpYXQiOjE2Njg3NjgzNjcsInJlc2V0UGFzc3dvcmRSZXF1aXJlZCI6ZmFsc2V9.sTXu_hUvO4DVsqi1gt_INjqNLm3ZTgD4T4T9m9wQmuE' : _ref$token,
|
|
7078
7086
|
_ref$primaryColor = _ref.primaryColor,
|
|
7079
|
-
primaryColor = _ref$primaryColor === void 0 ? '#
|
|
7087
|
+
primaryColor = _ref$primaryColor === void 0 ? '#D2122E' : _ref$primaryColor,
|
|
7080
7088
|
secondaryColor = _ref.secondaryColor,
|
|
7081
7089
|
backgroundColor = _ref.backgroundColor,
|
|
7082
7090
|
fontColor = _ref.fontColor,
|
|
@@ -7105,7 +7113,7 @@ var AccountDetails = function AccountDetails(_ref) {
|
|
|
7105
7113
|
return (data === null || data === void 0 ? void 0 : data.defaultStore) === true;
|
|
7106
7114
|
})) === null || _storeData$find === void 0 ? void 0 : _storeData$find.id) || 2;
|
|
7107
7115
|
var _useState4 = React.useState({
|
|
7108
|
-
primaryColor: primaryColor || '#
|
|
7116
|
+
primaryColor: primaryColor || '#D2122E',
|
|
7109
7117
|
secondaryColor: secondaryColor || '#FFFFFF',
|
|
7110
7118
|
backgroundColor: backgroundColor || '#F5F5F5',
|
|
7111
7119
|
fontColor: fontColor || '#391111',
|
|
@@ -7342,7 +7350,7 @@ var Root$4 = styled__default(material.Box)(_templateObject$u || (_templateObject
|
|
|
7342
7350
|
}, function (props) {
|
|
7343
7351
|
return props.isNightMode ? '#40404f' : "rgba(" + hexToRgbA(props.primaryColor) + ",0.1)";
|
|
7344
7352
|
});
|
|
7345
|
-
var MainContainer = styled__default.div(_templateObject2$l || (_templateObject2$l = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n margin: auto;\n min-height: 100vh;\n background-color: ", ";\n max-width: ", ";\n padding:
|
|
7353
|
+
var MainContainer = styled__default.div(_templateObject2$l || (_templateObject2$l = _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) {
|
|
7346
7354
|
return props.backgroundColor;
|
|
7347
7355
|
}, function (props) {
|
|
7348
7356
|
return props.open ? '1700px' : '1400px';
|
|
@@ -7372,7 +7380,8 @@ var Main = styles.styled('main', {
|
|
|
7372
7380
|
}, {
|
|
7373
7381
|
background: backgroundColor,
|
|
7374
7382
|
borderRadius: 14,
|
|
7375
|
-
height: '100%'
|
|
7383
|
+
height: '100%',
|
|
7384
|
+
overflow: 'auto'
|
|
7376
7385
|
});
|
|
7377
7386
|
});
|
|
7378
7387
|
var ContainerDrawer = styled__default(material.Drawer)(_templateObject3$g || (_templateObject3$g = _taggedTemplateLiteralLoose(["\n // height: 100%;\n margin-right: ", ";\n .MuiDrawer-paper {\n padding: 1rem;\n position: relative;\n z-index: 1;\n background: ", ";\n border-radius: 14px;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px 0px;\n }\n"])), function (props) {
|