@itilite/iui-user-management 0.0.11 → 0.0.13
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.css +3 -0
- package/dist/index.js +36 -36
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +37 -37
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
- package/dist/style.css +0 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IUIAsyncSelect, IUIBox, IUILabel, IUIFileUpload, IUICheckboxButton, IUIPhone, IUISelect, IUIDatePicker, IUIInput, IUIDivider, IUIGrid, IUITypography, IUIRadio, IUIButton, IUIModal, IUIAccordion, IUIAccordionSummary, IUIAccordionDetails, IUIIconButton, IUICard, IUIBackdrop, IUICircularProgress, IUIBreadCrumb, IUIDropzone, IUIStepper, IUIFormControlLabel, IUICheckBox, IUIPrimaryRadio, IUITable, IUISkeleton, IUIFormGroup, IUIDropdownButton } from '@itilite/iuistyles';
|
|
1
|
+
import { IUIAsyncSelect, IUIBox, IUILabel, IUIFileUpload, IUICheckboxButton, IUIPhone, IUISelect, IUIDatePicker, IUIInput, IUIDivider, IUIGrid, IUITypography, IUIRadio, IUIButton, IUIModal, IUIAccordion, IUIAccordionSummary, IUIAccordionDetails, IUIIconButton, IUICard, IUIBackdrop, IUICircularProgress, IUIBreadCrumb, IUIDropzone, IUIStepper, IUIFormControlLabel, IUICheckBox, IUIPrimaryRadio, IUITable, IUISkeleton, IUIProfileBox, IUIFormGroup, IUIDropdownButton } from '@itilite/iuistyles';
|
|
2
2
|
import React, { useState, useEffect, Fragment as Fragment$1 } from 'react';
|
|
3
3
|
import { configs, services, utilUrls } from '@itilite/utils';
|
|
4
4
|
import moment from 'moment';
|
|
@@ -3304,6 +3304,7 @@ var initialState = {
|
|
|
3304
3304
|
maxTravelApprovers: 10,
|
|
3305
3305
|
maxExpenseApprovers: 10,
|
|
3306
3306
|
maxCustomAttributes: 10,
|
|
3307
|
+
maxMembershipInput: 15,
|
|
3307
3308
|
dateFormat: 'dd MMM yyyy',
|
|
3308
3309
|
countryCode: 'IN',
|
|
3309
3310
|
defaultCurrency: 'INR',
|
|
@@ -4129,6 +4130,11 @@ var AdditionalInfo = function AdditionalInfo(_ref) {
|
|
|
4129
4130
|
secureTravelInfo = _useSelector.secureTravelInfo,
|
|
4130
4131
|
travelPreference = _useSelector.travelPreference;
|
|
4131
4132
|
|
|
4133
|
+
var _useSelector2 = useSelector(function (state) {
|
|
4134
|
+
return state.userAddEdit;
|
|
4135
|
+
}),
|
|
4136
|
+
maxMembershipInput = _useSelector2.maxMembershipInput;
|
|
4137
|
+
|
|
4132
4138
|
var dropdownList = useSelector(function (state) {
|
|
4133
4139
|
return state.userAddEdit.dropdownList;
|
|
4134
4140
|
});
|
|
@@ -4216,7 +4222,7 @@ var AdditionalInfo = function AdditionalInfo(_ref) {
|
|
|
4216
4222
|
}, /*#__PURE__*/React.createElement(IUILabel, {
|
|
4217
4223
|
label: "Membership information",
|
|
4218
4224
|
headerType: true,
|
|
4219
|
-
description: "You can add up to
|
|
4225
|
+
description: "You can add up to " + maxMembershipInput + " membership details"
|
|
4220
4226
|
})), /*#__PURE__*/React.createElement(IUIGrid, {
|
|
4221
4227
|
item: true,
|
|
4222
4228
|
sm: 12,
|
|
@@ -4258,7 +4264,7 @@ var AdditionalInfo = function AdditionalInfo(_ref) {
|
|
|
4258
4264
|
return addMemInfoInput('hotel');
|
|
4259
4265
|
}
|
|
4260
4266
|
}))), membershipInfoInput.length > 0 && membershipInfoInput.map(function (val, index) {
|
|
4261
|
-
if (index
|
|
4267
|
+
if (index >= maxMembershipInput) {
|
|
4262
4268
|
return null;
|
|
4263
4269
|
}
|
|
4264
4270
|
|
|
@@ -4306,7 +4312,7 @@ var AdditionalInfo = function AdditionalInfo(_ref) {
|
|
|
4306
4312
|
width: "14",
|
|
4307
4313
|
height: "14"
|
|
4308
4314
|
})))));
|
|
4309
|
-
}), membershipInfoInput.length <
|
|
4315
|
+
}), membershipInfoInput.length < maxMembershipInput && membershipInfoInput.length > 0 && /*#__PURE__*/React.createElement(IUIGrid, {
|
|
4310
4316
|
item: true,
|
|
4311
4317
|
md: 8,
|
|
4312
4318
|
lg: 8,
|
|
@@ -4513,7 +4519,8 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
4513
4519
|
fieldsVisibility = _useSelector.fieldsVisibility,
|
|
4514
4520
|
isRendered = _useSelector.isRendered,
|
|
4515
4521
|
maxTravelApprovers = _useSelector.maxTravelApprovers,
|
|
4516
|
-
maxExpenseApprovers = _useSelector.maxExpenseApprovers
|
|
4522
|
+
maxExpenseApprovers = _useSelector.maxExpenseApprovers,
|
|
4523
|
+
maxMembershipInput = _useSelector.maxMembershipInput;
|
|
4517
4524
|
|
|
4518
4525
|
var _useSelector2 = useSelector(function (state) {
|
|
4519
4526
|
return state.common;
|
|
@@ -4853,7 +4860,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
4853
4860
|
};
|
|
4854
4861
|
|
|
4855
4862
|
var addMemInfoInput = function addMemInfoInput(membershipType) {
|
|
4856
|
-
if (membershipInfoInput.length >=
|
|
4863
|
+
if (membershipInfoInput.length >= maxMembershipInput) return;
|
|
4857
4864
|
setMembershipInfoInput([].concat(membershipInfoInput, [{
|
|
4858
4865
|
membership_type: membershipType,
|
|
4859
4866
|
name: '',
|
|
@@ -6416,7 +6423,7 @@ var fetchBulkactionHistory = function fetchBulkactionHistory(url) {
|
|
|
6416
6423
|
};
|
|
6417
6424
|
};
|
|
6418
6425
|
|
|
6419
|
-
var styles$5 = {"UUIUserManagementList":"_3WNHx","pageHeader":"_1WLpc","buttonWrapper":"_2egTG","headingWrapper":"_1He01","heading":"_1uPaO","headingLarge":"_2FsLd","headingMedium":"_nGXA9","headingSmall":"_2rpwF","description":"_25vb9","headerText":"_1Ny9J","letterImage":"_2hr3R","tablewrapper":"_1-RPw","rowText":"_1LXyO","textTransform":"_3kFQS","lightColor":"_3Ghgw","importModalBodyContainer":"_25xUk","dividerColor":"_2HZv9","w100":"_3vGmU","downloadTemplateContainer":"_3-Xu_","downloadTemplateDescContainer":"_tLw43","labelContainer":"_7TYUZ","downlTempHeader":"__CZpe","downlTempDescription":"_19jEe","colGap":"_3vnY5","deActivateModalContainer":"_28H9H","backdrop":"_1ky1x","errorText":"_26_if"};
|
|
6426
|
+
var styles$5 = {"UUIUserManagementList":"_3WNHx","pageHeader":"_1WLpc","buttonWrapper":"_2egTG","headingWrapper":"_1He01","heading":"_1uPaO","headingLarge":"_2FsLd","headingMedium":"_nGXA9","headingSmall":"_2rpwF","description":"_25vb9","headerText":"_1Ny9J","letterImage":"_2hr3R","tablewrapper":"_1-RPw","rowText":"_1LXyO","textTransform":"_3kFQS","lightColor":"_3Ghgw","avatarClassName":"_2qO_X","importModalBodyContainer":"_25xUk","dividerColor":"_2HZv9","w100":"_3vGmU","downloadTemplateContainer":"_3-Xu_","downloadTemplateDescContainer":"_tLw43","labelContainer":"_7TYUZ","downlTempHeader":"__CZpe","downlTempDescription":"_19jEe","colGap":"_3vnY5","deActivateModalContainer":"_28H9H","backdrop":"_1ky1x","errorText":"_26_if"};
|
|
6420
6427
|
|
|
6421
6428
|
var BulkUploadModal = function BulkUploadModal(props) {
|
|
6422
6429
|
var isOpenImportUsersModal = props.isOpenImportUsersModal,
|
|
@@ -7270,7 +7277,9 @@ var BulkActionHistoryTable = function BulkActionHistoryTable(props) {
|
|
|
7270
7277
|
_props$handleDownload = props.handleDownloadRecords,
|
|
7271
7278
|
handleDownloadRecords = _props$handleDownload === void 0 ? function () {} : _props$handleDownload,
|
|
7272
7279
|
_props$handleNavigate = props.handleNavigateToImportUserPage,
|
|
7273
|
-
handleNavigateToImportUserPage = _props$handleNavigate === void 0 ? function () {} : _props$handleNavigate
|
|
7280
|
+
handleNavigateToImportUserPage = _props$handleNavigate === void 0 ? function () {} : _props$handleNavigate,
|
|
7281
|
+
_props$isRowClickable = props.isRowClickable,
|
|
7282
|
+
isRowClickable = _props$isRowClickable === void 0 ? function () {} : _props$isRowClickable;
|
|
7274
7283
|
|
|
7275
7284
|
var getStatusIcon = function getStatusIcon(status) {
|
|
7276
7285
|
switch (status) {
|
|
@@ -7469,7 +7478,7 @@ var BulkActionHistoryTable = function BulkActionHistoryTable(props) {
|
|
|
7469
7478
|
onRequestSort: onRequestSort,
|
|
7470
7479
|
onSearchHandler: onSearchHandler,
|
|
7471
7480
|
handleRowClick: handleNavigateToImportUserPage,
|
|
7472
|
-
isRowClickable:
|
|
7481
|
+
isRowClickable: isRowClickable
|
|
7473
7482
|
});
|
|
7474
7483
|
};
|
|
7475
7484
|
|
|
@@ -7599,8 +7608,13 @@ var BulkActionHistory = function BulkActionHistory(_ref) {
|
|
|
7599
7608
|
setSearchingChangeTemp(!isSearchingChangeTemp);
|
|
7600
7609
|
};
|
|
7601
7610
|
|
|
7602
|
-
var handleNavigateToImportUserPage = function handleNavigateToImportUserPage(event,
|
|
7603
|
-
|
|
7611
|
+
var handleNavigateToImportUserPage = function handleNavigateToImportUserPage(event, data) {
|
|
7612
|
+
if (data.history_info.type === 'deactivate') return false;
|
|
7613
|
+
history.push(config.routes.bulkUpload["import"].path.replace(":" + config.routes.bulkUpload["import"].paramKeys.jobId, data.id));
|
|
7614
|
+
};
|
|
7615
|
+
|
|
7616
|
+
var isRowClickable = function isRowClickable(data) {
|
|
7617
|
+
return data.history_info.type !== 'deactivate';
|
|
7604
7618
|
};
|
|
7605
7619
|
|
|
7606
7620
|
var handleDownloadRecords = function handleDownloadRecords(e, type, jobId) {
|
|
@@ -7730,7 +7744,8 @@ var BulkActionHistory = function BulkActionHistory(_ref) {
|
|
|
7730
7744
|
onRequestSort: onRequestSort,
|
|
7731
7745
|
onSearchHandler: onSearchHandler,
|
|
7732
7746
|
handleDownloadRecords: handleDownloadRecords,
|
|
7733
|
-
handleNavigateToImportUserPage: handleNavigateToImportUserPage
|
|
7747
|
+
handleNavigateToImportUserPage: handleNavigateToImportUserPage,
|
|
7748
|
+
isRowClickable: isRowClickable
|
|
7734
7749
|
}))));
|
|
7735
7750
|
};
|
|
7736
7751
|
|
|
@@ -7815,37 +7830,22 @@ var StickyHeadTable = function StickyHeadTable(props) {
|
|
|
7815
7830
|
_props$disableRowChec = props.disableRowCheckbox,
|
|
7816
7831
|
disableRowCheckbox = _props$disableRowChec === void 0 ? false : _props$disableRowChec,
|
|
7817
7832
|
searchValue = props.searchValue;
|
|
7818
|
-
|
|
7819
|
-
var getFirstLetterofName = function getFirstLetterofName(firstName, lastName) {
|
|
7820
|
-
return firstName.charAt(0).toUpperCase() + lastName.charAt(0).toUpperCase();
|
|
7821
|
-
};
|
|
7822
|
-
|
|
7823
7833
|
var columns = [{
|
|
7824
7834
|
id: 'first_name',
|
|
7825
7835
|
label: 'Name',
|
|
7826
7836
|
minWidth: 250,
|
|
7827
7837
|
sortable: true,
|
|
7828
7838
|
cell: function cell(row) {
|
|
7829
|
-
return /*#__PURE__*/React.createElement(
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
})), /*#__PURE__*/React.createElement(IUIBox, {
|
|
7840
|
-
component: "div",
|
|
7841
|
-
display: "flex",
|
|
7842
|
-
flexDirection: "column",
|
|
7843
|
-
width: 200
|
|
7844
|
-
}, /*#__PURE__*/React.createElement(IUITypography, {
|
|
7845
|
-
className: clsx(styles$5.rowText, styles$5.textTransform)
|
|
7846
|
-
}, row.first_name + ' ' + row.last_name), /*#__PURE__*/React.createElement(IUITypography, {
|
|
7847
|
-
className: clsx(styles$5.rowText, styles$5.lightColor)
|
|
7848
|
-
}, row.email)));
|
|
7839
|
+
return /*#__PURE__*/React.createElement(IUIProfileBox, {
|
|
7840
|
+
firstName: row.first_name,
|
|
7841
|
+
lastName: row.last_name,
|
|
7842
|
+
isLetterAvatar: true,
|
|
7843
|
+
primaryText: row.first_name + ' ' + row.last_name,
|
|
7844
|
+
secondaryText: row.email,
|
|
7845
|
+
letterAvatarTextColor: "black",
|
|
7846
|
+
letterAvatarBackgroundColor: "#d3d3d3",
|
|
7847
|
+
avatarClassName: styles$5.avatarClassName
|
|
7848
|
+
});
|
|
7849
7849
|
}
|
|
7850
7850
|
}, {
|
|
7851
7851
|
id: 'emp_info__department__name',
|