@itilite/iui-user-management 0.4.905 → 0.4.907
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 -18
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +15 -18
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2960,7 +2960,7 @@ var personalInfo = [{
|
|
|
2960
2960
|
id: 4,
|
|
2961
2961
|
label: 'Phone number',
|
|
2962
2962
|
name: 'contact_number',
|
|
2963
|
-
required:
|
|
2963
|
+
required: false,
|
|
2964
2964
|
type: 'phone',
|
|
2965
2965
|
fullWidth: false,
|
|
2966
2966
|
visibility: true,
|
|
@@ -5995,9 +5995,11 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5995
5995
|
}
|
|
5996
5996
|
}
|
|
5997
5997
|
for (var _key in employeeInfo) {
|
|
5998
|
+
console.log('key', _key);
|
|
5998
5999
|
if (Object.hasOwnProperty.call(employeeInfo, _key)) {
|
|
5999
|
-
|
|
6000
|
-
|
|
6000
|
+
var _employeeInfoInput$_k;
|
|
6001
|
+
console.log('employeeInfo0000', (_employeeInfoInput$_k = employeeInfoInput[_key]) === null || _employeeInfoInput$_k === void 0 ? void 0 : _employeeInfoInput$_k.value, 'sajkdhjasj');
|
|
6002
|
+
if (employeeInfo[_key] === false && employeeInfoInput[_key] !== undefined && (typeof employeeInfoInput[_key] === 'string' && !employeeInfoInput[_key] || typeof employeeInfoInput[_key] === 'object' && !employeeInfoInput[_key].value || !employeeInfoInput[_key].value) === '' && fieldsVisibility.employee_info[_key] !== 2) {
|
|
6001
6003
|
_isError = true;
|
|
6002
6004
|
if (_errorArray.indexOf(_key) === -1) _errorArray.push(_key);
|
|
6003
6005
|
_errorMsgs[_key] = ErrorMessages[_key];
|
|
@@ -6255,15 +6257,10 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6255
6257
|
dispatch(verifyUserInfo(verifyUserId)).then(function (res) {
|
|
6256
6258
|
setPersonalInfoInput(function (prevState) {
|
|
6257
6259
|
return _extends({}, prevState, {
|
|
6258
|
-
first_name: res.
|
|
6259
|
-
last_name: res.
|
|
6260
|
+
first_name: res.first_name,
|
|
6261
|
+
last_name: res.last_name,
|
|
6260
6262
|
email: res.email,
|
|
6261
|
-
contact_number: res.
|
|
6262
|
-
dob: function () {
|
|
6263
|
-
var dt = new Date(res.dob);
|
|
6264
|
-
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
6265
|
-
return dt.getDate() + " " + months[dt.getMonth()] + " " + dt.getFullYear();
|
|
6266
|
-
}(),
|
|
6263
|
+
contact_number: res === null || res === void 0 ? void 0 : res.contact_number,
|
|
6267
6264
|
gender: function () {
|
|
6268
6265
|
if (res.gender === 'male') return 'Male';else if (res.gender === 'female') return 'Female';else if (res.gender === 'others') return 'Others';else return '';
|
|
6269
6266
|
}()
|
|
@@ -8617,17 +8614,17 @@ var SingupRequests = function SingupRequests(props) {
|
|
|
8617
8614
|
return dt.getDate() + " " + months[dt.getMonth()] + " " + dt.getFullYear();
|
|
8618
8615
|
};
|
|
8619
8616
|
var columns = [{
|
|
8620
|
-
id: '
|
|
8617
|
+
id: 'first_name',
|
|
8621
8618
|
label: 'Name',
|
|
8622
8619
|
minWidth: 250,
|
|
8623
8620
|
sortable: true,
|
|
8624
8621
|
cell: function cell(row) {
|
|
8625
8622
|
var _row$profile_pic2;
|
|
8626
8623
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(iuistyles.IUIProfileBox, {
|
|
8627
|
-
firstName: row.
|
|
8628
|
-
lastName: row.
|
|
8624
|
+
firstName: row.first_name,
|
|
8625
|
+
lastName: row.last_name,
|
|
8629
8626
|
isLetterAvatar: row.profile_pic && row.profile_pic.presigned_url ? false : true,
|
|
8630
|
-
primaryText: row.
|
|
8627
|
+
primaryText: row.first_name + ' ' + row.last_name,
|
|
8631
8628
|
secondaryText: row.email,
|
|
8632
8629
|
letterAvatarTextColor: "black",
|
|
8633
8630
|
letterAvatarBackgroundColor: "#d3d3d3",
|
|
@@ -8636,7 +8633,7 @@ var SingupRequests = function SingupRequests(props) {
|
|
|
8636
8633
|
}));
|
|
8637
8634
|
}
|
|
8638
8635
|
}, {
|
|
8639
|
-
id: '
|
|
8636
|
+
id: 'created_at',
|
|
8640
8637
|
label: 'Requested on',
|
|
8641
8638
|
minWidth: 100,
|
|
8642
8639
|
sortable: true,
|
|
@@ -8646,7 +8643,7 @@ var SingupRequests = function SingupRequests(props) {
|
|
|
8646
8643
|
width: 100
|
|
8647
8644
|
}, /*#__PURE__*/React__default.createElement(iuistyles.IUITypography, {
|
|
8648
8645
|
className: clsx(styles$5.rowText, styles$5.textTransform)
|
|
8649
|
-
}, formatDate(row.
|
|
8646
|
+
}, formatDate(row.created_at)));
|
|
8650
8647
|
}
|
|
8651
8648
|
}, {
|
|
8652
8649
|
id: 'actions',
|
|
@@ -8919,7 +8916,7 @@ var UserList = function UserList(_ref2) {
|
|
|
8919
8916
|
var _React$useState11 = React__default.useState('asc'),
|
|
8920
8917
|
signup_order = _React$useState11[0],
|
|
8921
8918
|
setSignUpOrder = _React$useState11[1];
|
|
8922
|
-
var _React$useState12 = React__default.useState('
|
|
8919
|
+
var _React$useState12 = React__default.useState('first_name'),
|
|
8923
8920
|
signup_orderBy = _React$useState12[0],
|
|
8924
8921
|
setSignUpOrderBy = _React$useState12[1];
|
|
8925
8922
|
var _useState22 = React.useState(''),
|