@itilite/iui-user-management 0.4.36 → 0.4.38
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 +0 -63
- package/dist/index.js +133 -477
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +134 -478
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -459,14 +459,6 @@ var userPanelUrl = {
|
|
|
459
459
|
return "api/v1/user-management/company/" + IUILocalStorageService.getCompanyId() + "/transfer-users";
|
|
460
460
|
}
|
|
461
461
|
};
|
|
462
|
-
var departmentUrl = {
|
|
463
|
-
departmentUrl: function departmentUrl() {
|
|
464
|
-
return "api/v1/user-management/company/" + IUILocalStorageService.getCompanyId() + "/department";
|
|
465
|
-
},
|
|
466
|
-
getDepartmentHead: function getDepartmentHead(departmentId, page) {
|
|
467
|
-
return "api/v1/user-management/company/" + IUILocalStorageService.getCompanyId() + "/department/" + departmentId + "/users?page=" + page;
|
|
468
|
-
}
|
|
469
|
-
};
|
|
470
462
|
|
|
471
463
|
var api = utils.configs.api;
|
|
472
464
|
var NAoptionConfig = {
|
|
@@ -695,46 +687,6 @@ var countryOptions = function countryOptions(search, loadedOptions, _ref5) {
|
|
|
695
687
|
return Promise.reject(e);
|
|
696
688
|
}
|
|
697
689
|
};
|
|
698
|
-
var departmentHeadOptions = function departmentHeadOptions(search, loadedOptions, _ref6) {
|
|
699
|
-
var page = _ref6.page,
|
|
700
|
-
departmentId = _ref6.departmentId;
|
|
701
|
-
try {
|
|
702
|
-
return Promise.resolve(_catch(function () {
|
|
703
|
-
return Promise.resolve(api.get(departmentUrl.getDepartmentHead(departmentId, page) + "&search=" + search).then(function (res) {
|
|
704
|
-
return res.data;
|
|
705
|
-
})).then(function (response) {
|
|
706
|
-
var mappedValue = response.results.map(function (item) {
|
|
707
|
-
return {
|
|
708
|
-
value: item.id,
|
|
709
|
-
label: item.first_name + ' ' + item.last_name,
|
|
710
|
-
type: 'detailed',
|
|
711
|
-
data: item
|
|
712
|
-
};
|
|
713
|
-
});
|
|
714
|
-
console.log(response.next);
|
|
715
|
-
return {
|
|
716
|
-
options: mappedValue,
|
|
717
|
-
hasMore: !!response.next,
|
|
718
|
-
additional: {
|
|
719
|
-
page: page + 1,
|
|
720
|
-
departmentId: departmentId
|
|
721
|
-
}
|
|
722
|
-
};
|
|
723
|
-
});
|
|
724
|
-
}, function () {
|
|
725
|
-
return {
|
|
726
|
-
options: [],
|
|
727
|
-
hasMore: false,
|
|
728
|
-
additional: {
|
|
729
|
-
page: 1,
|
|
730
|
-
departmentId: departmentId
|
|
731
|
-
}
|
|
732
|
-
};
|
|
733
|
-
}));
|
|
734
|
-
} catch (e) {
|
|
735
|
-
return Promise.reject(e);
|
|
736
|
-
}
|
|
737
|
-
};
|
|
738
690
|
|
|
739
691
|
var UserRole = function UserRole(_ref) {
|
|
740
692
|
var _ref$list = _ref.list,
|
|
@@ -1770,7 +1722,7 @@ var verifyUserInfo = function verifyUserInfo(userId) {
|
|
|
1770
1722
|
var submitAddModalData = function submitAddModalData(tableName, data) {
|
|
1771
1723
|
return function (dispatch) {
|
|
1772
1724
|
return new Promise(function (resolve, reject) {
|
|
1773
|
-
api$2.post(
|
|
1725
|
+
api$2.post(userAddEditUrl.dropdownList() + ("?action=add&table=" + tableName), data).then(function (res) {
|
|
1774
1726
|
resolve(res);
|
|
1775
1727
|
})["catch"](function (err) {
|
|
1776
1728
|
var _err$response17, _err$response17$data;
|
|
@@ -1806,7 +1758,6 @@ var OPEN_DIALOG = 'OPEN_DIALOG';
|
|
|
1806
1758
|
var CLOSE_DIALOG = 'CLOSE_DIALOG';
|
|
1807
1759
|
var FETCH_USERPANEL_DATA = 'FETCH_USERPANEL_DATA';
|
|
1808
1760
|
var UNASSIGNED_USERS = 'Not assigned';
|
|
1809
|
-
var FETCH_DEPARTMENT_USERS_DATA = 'FETCH_DEPARTMENT_USERS_DATA';
|
|
1810
1761
|
|
|
1811
1762
|
var api$3 = utils.configs.api;
|
|
1812
1763
|
var IUIToastMessageService$2 = utils.services.IUIToastMessageService;
|
|
@@ -1856,14 +1807,14 @@ var getUserPanalData = function getUserPanalData(params) {
|
|
|
1856
1807
|
var addRecord = function addRecord(tableName, data, getParam) {
|
|
1857
1808
|
return function (dispatch) {
|
|
1858
1809
|
return new Promise(function (resolve, reject) {
|
|
1859
|
-
api$3.post(
|
|
1810
|
+
api$3.post(userPanelUrl.addUnit(tableName), data).then(function (res) {
|
|
1860
1811
|
dispatch(getUserPanalData(getParam));
|
|
1861
1812
|
dispatch(closeDialog());
|
|
1862
1813
|
resolve(res);
|
|
1863
1814
|
})["catch"](function (err) {
|
|
1864
|
-
var _err$
|
|
1815
|
+
var _err$response2, _err$response2$data;
|
|
1865
1816
|
dispatch(userPanelStopLoader());
|
|
1866
|
-
IUIToastMessageService$2.warningNotify((err === null || err === void 0 ? void 0 : (_err$
|
|
1817
|
+
IUIToastMessageService$2.warningNotify((err === null || err === void 0 ? void 0 : (_err$response2 = err.response) === null || _err$response2 === void 0 ? void 0 : (_err$response2$data = _err$response2.data) === null || _err$response2$data === void 0 ? void 0 : _err$response2$data.message) || 'Opps, Something went wrong.');
|
|
1867
1818
|
});
|
|
1868
1819
|
});
|
|
1869
1820
|
};
|
|
@@ -1877,37 +1828,25 @@ var deleteRecord = function deleteRecord(tableName, id, getParam) {
|
|
|
1877
1828
|
dispatch(userPanelStopLoader());
|
|
1878
1829
|
resolve();
|
|
1879
1830
|
})["catch"](function (err) {
|
|
1880
|
-
var _err$
|
|
1881
|
-
IUIToastMessageService$2.warningNotify((err === null || err === void 0 ? void 0 : (_err$
|
|
1831
|
+
var _err$response3, _err$response3$data;
|
|
1832
|
+
IUIToastMessageService$2.warningNotify((err === null || err === void 0 ? void 0 : (_err$response3 = err.response) === null || _err$response3 === void 0 ? void 0 : (_err$response3$data = _err$response3.data) === null || _err$response3$data === void 0 ? void 0 : _err$response3$data.message) || 'Opps, Something went wrong.');
|
|
1882
1833
|
dispatch(userPanelStopLoader());
|
|
1883
1834
|
});
|
|
1884
1835
|
});
|
|
1885
1836
|
};
|
|
1886
1837
|
};
|
|
1887
|
-
var editRecord = function editRecord(tableName, data, getParam
|
|
1838
|
+
var editRecord = function editRecord(tableName, data, getParam) {
|
|
1888
1839
|
return function (dispatch) {
|
|
1889
1840
|
return new Promise(function (resolve, reject) {
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
});
|
|
1900
|
-
} else {
|
|
1901
|
-
api$3.post(userPanelUrl.editUnit(tableName), data).then(function (res) {
|
|
1902
|
-
dispatch(getUserPanalData(getParam));
|
|
1903
|
-
dispatch(closeDialog());
|
|
1904
|
-
resolve();
|
|
1905
|
-
})["catch"](function (err) {
|
|
1906
|
-
var _err$response6, _err$response6$data;
|
|
1907
|
-
dispatch(userPanelStopLoader());
|
|
1908
|
-
IUIToastMessageService$2.warningNotify((err === null || err === void 0 ? void 0 : (_err$response6 = err.response) === null || _err$response6 === void 0 ? void 0 : (_err$response6$data = _err$response6.data) === null || _err$response6$data === void 0 ? void 0 : _err$response6$data.message) || 'Opps, Something went wrong.');
|
|
1909
|
-
});
|
|
1910
|
-
}
|
|
1841
|
+
api$3.post(userPanelUrl.editUnit(tableName), data).then(function (res) {
|
|
1842
|
+
dispatch(getUserPanalData(getParam));
|
|
1843
|
+
dispatch(closeDialog());
|
|
1844
|
+
resolve();
|
|
1845
|
+
})["catch"](function (err) {
|
|
1846
|
+
var _err$response4, _err$response4$data;
|
|
1847
|
+
dispatch(userPanelStopLoader());
|
|
1848
|
+
IUIToastMessageService$2.warningNotify((err === null || err === void 0 ? void 0 : (_err$response4 = err.response) === null || _err$response4 === void 0 ? void 0 : (_err$response4$data = _err$response4.data) === null || _err$response4$data === void 0 ? void 0 : _err$response4$data.message) || 'Opps, Something went wrong.');
|
|
1849
|
+
});
|
|
1911
1850
|
});
|
|
1912
1851
|
};
|
|
1913
1852
|
};
|
|
@@ -1919,8 +1858,8 @@ var moveRecord = function moveRecord(tableName, data, getParam) {
|
|
|
1919
1858
|
dispatch(closeDialog());
|
|
1920
1859
|
resolve(res);
|
|
1921
1860
|
})["catch"](function (err) {
|
|
1922
|
-
var _err$
|
|
1923
|
-
IUIToastMessageService$2.warningNotify((err === null || err === void 0 ? void 0 : (_err$
|
|
1861
|
+
var _err$response5, _err$response5$data;
|
|
1862
|
+
IUIToastMessageService$2.warningNotify((err === null || err === void 0 ? void 0 : (_err$response5 = err.response) === null || _err$response5 === void 0 ? void 0 : (_err$response5$data = _err$response5.data) === null || _err$response5$data === void 0 ? void 0 : _err$response5$data.message) || 'Opps, Something went wrong.');
|
|
1924
1863
|
});
|
|
1925
1864
|
});
|
|
1926
1865
|
};
|
|
@@ -3110,6 +3049,31 @@ var workInfo = [{
|
|
|
3110
3049
|
minLength: 0
|
|
3111
3050
|
},
|
|
3112
3051
|
disableText: 'Please get in touch with your administrator to change this value.'
|
|
3052
|
+
}, {
|
|
3053
|
+
id: 7,
|
|
3054
|
+
label: 'Manager',
|
|
3055
|
+
name: 'manager',
|
|
3056
|
+
required: false,
|
|
3057
|
+
type: 'async_select',
|
|
3058
|
+
fullWidth: false,
|
|
3059
|
+
visibility: true,
|
|
3060
|
+
readOnly: false,
|
|
3061
|
+
placeholder: 'Select manager',
|
|
3062
|
+
tabelName: 'manager',
|
|
3063
|
+
product: 'travel',
|
|
3064
|
+
loadOption: approversOptions
|
|
3065
|
+
}, {
|
|
3066
|
+
id: 8,
|
|
3067
|
+
label: 'Skip manager',
|
|
3068
|
+
name: 'skip_manager',
|
|
3069
|
+
required: false,
|
|
3070
|
+
type: 'async_select',
|
|
3071
|
+
fullWidth: false,
|
|
3072
|
+
visibility: true,
|
|
3073
|
+
readOnly: false,
|
|
3074
|
+
placeholder: 'Select manager',
|
|
3075
|
+
product: 'travel',
|
|
3076
|
+
loadOption: approversOptions
|
|
3113
3077
|
}, {
|
|
3114
3078
|
id: 9,
|
|
3115
3079
|
label: 'Base location',
|
|
@@ -4020,7 +3984,6 @@ var initialState$2 = {
|
|
|
4020
3984
|
previous: null,
|
|
4021
3985
|
results: []
|
|
4022
3986
|
},
|
|
4023
|
-
deptUsers: [],
|
|
4024
3987
|
loading: false
|
|
4025
3988
|
};
|
|
4026
3989
|
var reducer$2 = function reducer(state, action) {
|
|
@@ -4090,12 +4053,6 @@ var reducer$2 = function reducer(state, action) {
|
|
|
4090
4053
|
loading: false
|
|
4091
4054
|
});
|
|
4092
4055
|
}
|
|
4093
|
-
case FETCH_DEPARTMENT_USERS_DATA:
|
|
4094
|
-
{
|
|
4095
|
-
return _extends({}, state, {
|
|
4096
|
-
deptUsers: action.payload
|
|
4097
|
-
});
|
|
4098
|
-
}
|
|
4099
4056
|
default:
|
|
4100
4057
|
return state;
|
|
4101
4058
|
}
|
|
@@ -4874,7 +4831,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
4874
4831
|
isILadmin = _useSelector2.isILadmin,
|
|
4875
4832
|
companyName = _useSelector2.companyName;
|
|
4876
4833
|
var history = reactRouterDom.useHistory();
|
|
4877
|
-
var location = reactRouterDom.useLocation();
|
|
4878
4834
|
var _useState = React.useState({
|
|
4879
4835
|
travel: false,
|
|
4880
4836
|
expense: false
|
|
@@ -4943,6 +4899,14 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
4943
4899
|
},
|
|
4944
4900
|
designation: '',
|
|
4945
4901
|
base_location: '',
|
|
4902
|
+
manager: {
|
|
4903
|
+
value: '',
|
|
4904
|
+
label: 'Select Manager'
|
|
4905
|
+
},
|
|
4906
|
+
skip_manager: {
|
|
4907
|
+
value: '',
|
|
4908
|
+
label: 'Select Manager'
|
|
4909
|
+
},
|
|
4946
4910
|
currency: {
|
|
4947
4911
|
value: defaultCurrency,
|
|
4948
4912
|
label: defaultCurrency
|
|
@@ -5130,18 +5094,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5130
5094
|
var onAddModalClose = function onAddModalClose() {
|
|
5131
5095
|
setAddModalData(_extends({}, defaultAddModalData));
|
|
5132
5096
|
};
|
|
5133
|
-
React.useEffect(function () {
|
|
5134
|
-
var _location$state, _location$state2;
|
|
5135
|
-
if (location !== null && location !== void 0 && (_location$state = location.state) !== null && _location$state !== void 0 && _location$state.id && location !== null && location !== void 0 && (_location$state2 = location.state) !== null && _location$state2 !== void 0 && _location$state2.name) {
|
|
5136
|
-
var _location$state3, _location$state4;
|
|
5137
|
-
setEmployeeInfoInput(_extends({}, employeeInfoInput, {
|
|
5138
|
-
department: {
|
|
5139
|
-
value: location === null || location === void 0 ? void 0 : (_location$state3 = location.state) === null || _location$state3 === void 0 ? void 0 : _location$state3.id,
|
|
5140
|
-
label: location === null || location === void 0 ? void 0 : (_location$state4 = location.state) === null || _location$state4 === void 0 ? void 0 : _location$state4.name
|
|
5141
|
-
}
|
|
5142
|
-
}));
|
|
5143
|
-
}
|
|
5144
|
-
}, []);
|
|
5145
5097
|
var onModalOpen = function onModalOpen(e, id) {
|
|
5146
5098
|
var title = '';
|
|
5147
5099
|
if (id === 'entity') {
|
|
@@ -5167,18 +5119,9 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5167
5119
|
}));
|
|
5168
5120
|
} else {
|
|
5169
5121
|
dispatch(showLoader());
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
name: validatedValue,
|
|
5174
|
-
department_head_id: null
|
|
5175
|
-
};
|
|
5176
|
-
} else {
|
|
5177
|
-
dataObj = {
|
|
5178
|
-
names: [validatedValue]
|
|
5179
|
-
};
|
|
5180
|
-
}
|
|
5181
|
-
dispatch(submitAddModalData(addModalData.id, dataObj)).then(function (res) {
|
|
5122
|
+
dispatch(submitAddModalData(addModalData.id, {
|
|
5123
|
+
names: [validatedValue]
|
|
5124
|
+
})).then(function (res) {
|
|
5182
5125
|
var _extends2, _extends3;
|
|
5183
5126
|
setAddModalData(_extends({}, addModalData, {
|
|
5184
5127
|
isOpen: false
|
|
@@ -5186,8 +5129,8 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5186
5129
|
IUIToastMessageService$4.sNotify(addModalData.title + " added successfully.");
|
|
5187
5130
|
var tempKey = addModalData.id === 'employee_level' ? 'emp_level' : addModalData.id;
|
|
5188
5131
|
setEmployeeInfoInput(_extends({}, employeeInfoInput, (_extends2 = {}, _extends2[tempKey] = {
|
|
5189
|
-
value: res.data.
|
|
5190
|
-
label: res.data.
|
|
5132
|
+
value: res.data.value,
|
|
5133
|
+
label: res.data.label
|
|
5191
5134
|
}, _extends2)));
|
|
5192
5135
|
updateInputChangeLog(_extends({}, inputChangeLog, (_extends3 = {}, _extends3[tempKey] = true, _extends3)));
|
|
5193
5136
|
asyncSelectRefs.current[tempKey].current.blur();
|
|
@@ -5327,7 +5270,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5327
5270
|
var _extends11;
|
|
5328
5271
|
var _name = _ref3._name,
|
|
5329
5272
|
_value = _ref3._value;
|
|
5330
|
-
console.log(_name, _value, 'travel');
|
|
5331
5273
|
setTravelApproversInput(_extends({}, travelApproversInput, (_extends11 = {}, _extends11[_name] = _value, _extends11)));
|
|
5332
5274
|
};
|
|
5333
5275
|
var onExpenseApproversInputChange = function onExpenseApproversInputChange(_ref4) {
|
|
@@ -5846,10 +5788,23 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5846
5788
|
IUIToastMessageService$4.warningNotify(checkAnyError);
|
|
5847
5789
|
return Promise.resolve();
|
|
5848
5790
|
}
|
|
5791
|
+
var manager_info = {
|
|
5792
|
+
manager: '',
|
|
5793
|
+
skip_manager: ''
|
|
5794
|
+
};
|
|
5795
|
+
if (employeeInfoInput.manager.value !== '') {
|
|
5796
|
+
manager_info.manager = employeeInfoInput.manager.value;
|
|
5797
|
+
delete employeeInfoInput.manager;
|
|
5798
|
+
}
|
|
5799
|
+
if (employeeInfoInput.skip_manager.value !== '') {
|
|
5800
|
+
manager_info.skip_manager = employeeInfoInput.skip_manager.value;
|
|
5801
|
+
delete employeeInfoInput.skip_manager;
|
|
5802
|
+
}
|
|
5849
5803
|
var payload = {
|
|
5850
5804
|
personalInfoInput: personalInfoInput,
|
|
5851
5805
|
employeeInfoInput: employeeInfoInput,
|
|
5852
5806
|
customFieldsInput: customFieldsInput,
|
|
5807
|
+
manager_info: manager_info,
|
|
5853
5808
|
productAccess: productAccess,
|
|
5854
5809
|
travelRole: travelRole,
|
|
5855
5810
|
travelApproversInput: travelApproversInput,
|
|
@@ -6012,7 +5967,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6012
5967
|
}
|
|
6013
5968
|
}
|
|
6014
5969
|
}
|
|
6015
|
-
return Promise.resolve();
|
|
6016
5970
|
}
|
|
6017
5971
|
if (isEditMode && editUserId || isProfile) {
|
|
6018
5972
|
dispatch(showLoader());
|
|
@@ -6833,7 +6787,7 @@ var fetchBulkactionHistory = function fetchBulkactionHistory(url) {
|
|
|
6833
6787
|
};
|
|
6834
6788
|
};
|
|
6835
6789
|
|
|
6836
|
-
var styles$5 = {"UUIUserManagementList":"_3WNHx","scrollOverlayMenu":"_2_WEg","overlaysearch":"_1Pbhb","pageHeader":"_1WLpc","buttonWrapper":"_2egTG","headingWrapper":"_1He01","headingSignUpWrapper":"_Q8vqd","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","tooltipText":"_151u_","tooltip":"_-LQNH","importModalBodyContainer":"_25xUk","dividerColor":"_2HZv9","w100":"_3vGmU","downloadTemplateContainer":"_3-Xu_","downloadTemplateDescContainer":"_tLw43","labelContainer":"_7TYUZ","downlTempHeader":"__CZpe","downlTempDescription":"_19jEe","downloadTemplateButton":"_1qXtq","fileUploaderContainer":"_1YVz2","colGap":"_3vnY5","deActivateModalContainer":"_28H9H","backdrop":"_1ky1x","errorText":"_26_if","
|
|
6790
|
+
var styles$5 = {"UUIUserManagementList":"_3WNHx","scrollOverlayMenu":"_2_WEg","overlaysearch":"_1Pbhb","pageHeader":"_1WLpc","buttonWrapper":"_2egTG","headingWrapper":"_1He01","headingSignUpWrapper":"_Q8vqd","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","tooltipText":"_151u_","tooltip":"_-LQNH","importModalBodyContainer":"_25xUk","dividerColor":"_2HZv9","w100":"_3vGmU","downloadTemplateContainer":"_3-Xu_","downloadTemplateDescContainer":"_tLw43","labelContainer":"_7TYUZ","downlTempHeader":"__CZpe","downlTempDescription":"_19jEe","downloadTemplateButton":"_1qXtq","fileUploaderContainer":"_1YVz2","colGap":"_3vnY5","deActivateModalContainer":"_28H9H","backdrop":"_1ky1x","errorText":"_26_if","user_list_page_tabs":"_xWE7K","TabLabelCount":"_13pXn"};
|
|
6837
6791
|
|
|
6838
6792
|
var BulkUploadModal = function BulkUploadModal(props) {
|
|
6839
6793
|
var isOpenImportUsersModal = props.isOpenImportUsersModal,
|
|
@@ -8618,25 +8572,6 @@ function InviteInfoIcon() {
|
|
|
8618
8572
|
}));
|
|
8619
8573
|
}
|
|
8620
8574
|
|
|
8621
|
-
function InfoYellowIcon(props) {
|
|
8622
|
-
return /*#__PURE__*/React__default.createElement("svg", {
|
|
8623
|
-
width: props.width,
|
|
8624
|
-
height: props.height,
|
|
8625
|
-
viewBox: "0 0 20 20",
|
|
8626
|
-
fill: "none",
|
|
8627
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
8628
|
-
}, /*#__PURE__*/React__default.createElement("path", {
|
|
8629
|
-
d: "M11 4.99951C11 5.5518 10.5523 5.99951 10 5.99951C9.44771 5.99951 9 5.5518 9 4.99951C9 4.44723 9.44771 3.99951 10 3.99951C10.5523 3.99951 11 4.44723 11 4.99951Z",
|
|
8630
|
-
fill: "#CA8A04"
|
|
8631
|
-
}), /*#__PURE__*/React__default.createElement("path", {
|
|
8632
|
-
d: "M8 7.99951C7.44772 7.99951 7 8.44723 7 8.99951C7 9.5518 7.44772 9.99951 8 9.99951H9V12.9995H8C7.44772 12.9995 7 13.4472 7 13.9995C7 14.5518 7.44772 14.9995 8 14.9995H12C12.5523 14.9995 13 14.5518 13 13.9995C13 13.4472 12.5523 12.9995 12 12.9995H11V8.99951C11 8.44723 10.5523 7.99951 10 7.99951H8Z",
|
|
8633
|
-
fill: "#CA8A04"
|
|
8634
|
-
}), /*#__PURE__*/React__default.createElement("path", {
|
|
8635
|
-
d: "M0 9.99951C0 15.5224 4.47715 19.9995 10 19.9995C15.5228 19.9995 20 15.5224 20 9.99951C20 4.47666 15.5228 -0.000488281 10 -0.000488281C4.47715 -0.000488281 0 4.47666 0 9.99951ZM10 1.99951C14.4183 1.99951 18 5.58123 18 9.99951C18 14.4178 14.4183 17.9995 10 17.9995C5.58172 17.9995 2 14.4178 2 9.99951C2 5.58123 5.58172 1.99951 10 1.99951Z",
|
|
8636
|
-
fill: "#CA8A04"
|
|
8637
|
-
}));
|
|
8638
|
-
}
|
|
8639
|
-
|
|
8640
8575
|
var IUIToastMessageService$7 = utils.services.IUIToastMessageService;
|
|
8641
8576
|
var env$7 = utils.configs.env;
|
|
8642
8577
|
var UndoButton = function UndoButton(_ref) {
|
|
@@ -8688,12 +8623,9 @@ var UserList = function UserList(_ref2) {
|
|
|
8688
8623
|
var _React$useState3 = React__default.useState('asc'),
|
|
8689
8624
|
order = _React$useState3[0],
|
|
8690
8625
|
setOrder = _React$useState3[1];
|
|
8691
|
-
var _React$useState4 = React__default.useState(
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
var _React$useState5 = React__default.useState('first_name'),
|
|
8695
|
-
orderBy = _React$useState5[0],
|
|
8696
|
-
setOrderBy = _React$useState5[1];
|
|
8626
|
+
var _React$useState4 = React__default.useState('first_name'),
|
|
8627
|
+
orderBy = _React$useState4[0],
|
|
8628
|
+
setOrderBy = _React$useState4[1];
|
|
8697
8629
|
var _useState2 = React.useState(''),
|
|
8698
8630
|
searchValue = _useState2[0],
|
|
8699
8631
|
setSearchValue = _useState2[1];
|
|
@@ -8728,21 +8660,15 @@ var UserList = function UserList(_ref2) {
|
|
|
8728
8660
|
var _useState10 = React.useState(false),
|
|
8729
8661
|
isApiFetching = _useState10[0],
|
|
8730
8662
|
setisApiFetching = _useState10[1];
|
|
8731
|
-
var _useState11 = React.useState(
|
|
8732
|
-
|
|
8733
|
-
|
|
8734
|
-
|
|
8735
|
-
|
|
8736
|
-
|
|
8737
|
-
var
|
|
8738
|
-
|
|
8739
|
-
|
|
8740
|
-
var _useState13 = React.useState(''),
|
|
8741
|
-
userIds = _useState13[0],
|
|
8742
|
-
setUserIds = _useState13[1];
|
|
8743
|
-
var _React$useState6 = React__default.useState(false),
|
|
8744
|
-
overlayMenu = _React$useState6[0],
|
|
8745
|
-
setOverlayMenu = _React$useState6[1];
|
|
8663
|
+
var _useState11 = React.useState(false),
|
|
8664
|
+
showInviteModal = _useState11[0],
|
|
8665
|
+
setToggleInviteModal = _useState11[1];
|
|
8666
|
+
var _useState12 = React.useState(''),
|
|
8667
|
+
userIds = _useState12[0],
|
|
8668
|
+
setUserIds = _useState12[1];
|
|
8669
|
+
var _React$useState5 = React__default.useState(false),
|
|
8670
|
+
overlayMenu = _React$useState5[0],
|
|
8671
|
+
setOverlayMenu = _React$useState5[1];
|
|
8746
8672
|
useScrollPosition.useScrollPosition(function (_ref3) {
|
|
8747
8673
|
var prevPos = _ref3.prevPos,
|
|
8748
8674
|
currPos = _ref3.currPos;
|
|
@@ -8763,33 +8689,33 @@ var UserList = function UserList(_ref2) {
|
|
|
8763
8689
|
behavior: 'smooth'
|
|
8764
8690
|
});
|
|
8765
8691
|
};
|
|
8766
|
-
var _React$
|
|
8767
|
-
signup_page = _React$
|
|
8768
|
-
setSignUpPage = _React$
|
|
8769
|
-
var
|
|
8770
|
-
signup_rowsPerPage =
|
|
8771
|
-
setSignUpRowsPerPage =
|
|
8772
|
-
var _React$
|
|
8773
|
-
signup_order = _React$
|
|
8774
|
-
setSignUpOrder = _React$
|
|
8775
|
-
var _React$
|
|
8776
|
-
signup_orderBy = _React$
|
|
8777
|
-
setSignUpOrderBy = _React$
|
|
8778
|
-
var
|
|
8779
|
-
signup_searchValue =
|
|
8780
|
-
set_signup_SearchValue =
|
|
8692
|
+
var _React$useState6 = React__default.useState(1),
|
|
8693
|
+
signup_page = _React$useState6[0],
|
|
8694
|
+
setSignUpPage = _React$useState6[1];
|
|
8695
|
+
var _useState13 = React.useState(5),
|
|
8696
|
+
signup_rowsPerPage = _useState13[0],
|
|
8697
|
+
setSignUpRowsPerPage = _useState13[1];
|
|
8698
|
+
var _React$useState7 = React__default.useState('asc'),
|
|
8699
|
+
signup_order = _React$useState7[0],
|
|
8700
|
+
setSignUpOrder = _React$useState7[1];
|
|
8701
|
+
var _React$useState8 = React__default.useState('fname'),
|
|
8702
|
+
signup_orderBy = _React$useState8[0],
|
|
8703
|
+
setSignUpOrderBy = _React$useState8[1];
|
|
8704
|
+
var _useState14 = React.useState(''),
|
|
8705
|
+
signup_searchValue = _useState14[0],
|
|
8706
|
+
set_signup_SearchValue = _useState14[1];
|
|
8707
|
+
var _useState15 = React.useState(false),
|
|
8708
|
+
isSignUpSortingChange = _useState15[0],
|
|
8709
|
+
setSignUpSortingChange = _useState15[1];
|
|
8781
8710
|
var _useState16 = React.useState(false),
|
|
8782
|
-
|
|
8783
|
-
|
|
8711
|
+
isSignUpSearchingChange = _useState16[0],
|
|
8712
|
+
setSignUpSearchingChange = _useState16[1];
|
|
8784
8713
|
var _useState17 = React.useState(false),
|
|
8785
|
-
|
|
8786
|
-
|
|
8714
|
+
isSignUpSortingChangeTemp = _useState17[0],
|
|
8715
|
+
setSignUpSortingChangeTemp = _useState17[1];
|
|
8787
8716
|
var _useState18 = React.useState(false),
|
|
8788
|
-
|
|
8789
|
-
|
|
8790
|
-
var _useState19 = React.useState(false),
|
|
8791
|
-
isSignUpSearchingChangeTemp = _useState19[0],
|
|
8792
|
-
setSignUpSearchingChangeTemp = _useState19[1];
|
|
8717
|
+
isSignUpSearchingChangeTemp = _useState18[0],
|
|
8718
|
+
setSignUpSearchingChangeTemp = _useState18[1];
|
|
8793
8719
|
var _useSelector3 = reactRedux.useSelector(function (state) {
|
|
8794
8720
|
return state.userList;
|
|
8795
8721
|
}),
|
|
@@ -9304,82 +9230,6 @@ var UserList = function UserList(_ref2) {
|
|
|
9304
9230
|
}))
|
|
9305
9231
|
}]
|
|
9306
9232
|
}))), /*#__PURE__*/React__default.createElement(iuistyles.IUIModal, {
|
|
9307
|
-
isOpen: deactivateSingle,
|
|
9308
|
-
closeHandler: function closeHandler() {
|
|
9309
|
-
setDeactivateSingle(false);
|
|
9310
|
-
},
|
|
9311
|
-
cancelLabel: "Cancel",
|
|
9312
|
-
submitLabel: "Deactivate",
|
|
9313
|
-
submitHandler: handleDeactivateUsers,
|
|
9314
|
-
headerText: "Deactivate this user?",
|
|
9315
|
-
width: "400px",
|
|
9316
|
-
subHanderText: "",
|
|
9317
|
-
submitBtnClass: styles$5.deactivateBtn,
|
|
9318
|
-
isDisabledSubmitBtn: true
|
|
9319
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9320
|
-
className: styles$5.deactivateSingle
|
|
9321
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9322
|
-
className: styles$5.deactivateAlert
|
|
9323
|
-
}, /*#__PURE__*/React__default.createElement(InfoYellowIcon, {
|
|
9324
|
-
width: "9",
|
|
9325
|
-
height: "9"
|
|
9326
|
-
}), /*#__PURE__*/React__default.createElement(iuistyles.IUITypography, null, /*#__PURE__*/React__default.createElement("b", null, "Anvesh Dunna"), " is linked with multiple roles. You can deactivate them only once you transfer the roles to another user.")), /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9327
|
-
className: "iui__mb-15 iui__mt-15"
|
|
9328
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIAsyncSelect, {
|
|
9329
|
-
isMove: true,
|
|
9330
|
-
additional: {
|
|
9331
|
-
page: 1,
|
|
9332
|
-
product: 'travel',
|
|
9333
|
-
placeholder: 'Select a user'
|
|
9334
|
-
},
|
|
9335
|
-
placeHolderCheck: travelFYI !== undefined && travelFYI.value === '',
|
|
9336
|
-
label: "Transfer admin role to",
|
|
9337
|
-
value: travelFYI,
|
|
9338
|
-
onValueChange: function onValueChange(_ref4) {
|
|
9339
|
-
var _value = _ref4._value;
|
|
9340
|
-
return setTravelFYI(_value);
|
|
9341
|
-
},
|
|
9342
|
-
loadOption: approversOptions,
|
|
9343
|
-
disableText: "Please get in touch with your administrator to change this value."
|
|
9344
|
-
})), /*#__PURE__*/React__default.createElement(iuistyles.IUITypography, {
|
|
9345
|
-
className: clsx('iui__mb-5', styles$5.departmentHeadText)
|
|
9346
|
-
}, "Anvesh Dunna is the department head for: Product Design."), /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9347
|
-
className: "iui__mb-15"
|
|
9348
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIAsyncSelect, {
|
|
9349
|
-
isMove: true,
|
|
9350
|
-
additional: {
|
|
9351
|
-
page: 1,
|
|
9352
|
-
product: 'travel',
|
|
9353
|
-
placeholder: 'Select a user'
|
|
9354
|
-
},
|
|
9355
|
-
placeHolderCheck: travelFYI !== undefined && travelFYI.value === '',
|
|
9356
|
-
label: "Transfer department head role to",
|
|
9357
|
-
value: travelFYI,
|
|
9358
|
-
onValueChange: function onValueChange(_ref5) {
|
|
9359
|
-
var _value = _ref5._value;
|
|
9360
|
-
return setTravelFYI(_value);
|
|
9361
|
-
},
|
|
9362
|
-
loadOption: approversOptions,
|
|
9363
|
-
disableText: "Please get in touch with your administrator to change this value."
|
|
9364
|
-
})), /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9365
|
-
className: "iui__mb-15"
|
|
9366
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIAsyncSelect, {
|
|
9367
|
-
isMove: true,
|
|
9368
|
-
additional: {
|
|
9369
|
-
page: 1,
|
|
9370
|
-
product: 'travel',
|
|
9371
|
-
placeholder: 'Select a user'
|
|
9372
|
-
},
|
|
9373
|
-
placeHolderCheck: travelFYI !== undefined && travelFYI.value === '',
|
|
9374
|
-
label: "Transfer approver role to",
|
|
9375
|
-
value: travelFYI,
|
|
9376
|
-
onValueChange: function onValueChange(_ref6) {
|
|
9377
|
-
var _value = _ref6._value;
|
|
9378
|
-
return setTravelFYI(_value);
|
|
9379
|
-
},
|
|
9380
|
-
loadOption: approversOptions,
|
|
9381
|
-
disableText: "Please get in touch with your administrator to change this value."
|
|
9382
|
-
})))), /*#__PURE__*/React__default.createElement(iuistyles.IUIModal, {
|
|
9383
9233
|
isOpen: Object.values(selected).flat().length > 0 && isOpenDeActivateModal,
|
|
9384
9234
|
closeHandler: closeDeActivateModal,
|
|
9385
9235
|
cancelLabel: "Cancel",
|
|
@@ -9448,8 +9298,8 @@ var UserList = function UserList(_ref2) {
|
|
|
9448
9298
|
errMsg: hasVerificationError
|
|
9449
9299
|
}));
|
|
9450
9300
|
};
|
|
9451
|
-
var TabLabelCount = function TabLabelCount(
|
|
9452
|
-
var count =
|
|
9301
|
+
var TabLabelCount = function TabLabelCount(_ref4) {
|
|
9302
|
+
var count = _ref4.count;
|
|
9453
9303
|
return /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9454
9304
|
className: styles$5.TabLabelCount
|
|
9455
9305
|
}, " ", count, " ");
|
|
@@ -9524,12 +9374,11 @@ function Header(props) {
|
|
|
9524
9374
|
})));
|
|
9525
9375
|
}
|
|
9526
9376
|
|
|
9527
|
-
var styles$7 = {"sidebar__container":"_1EFxC","sidebar__wrapper":"_3Mk3_","sidebar__navlinks":"_29KVG","sidebar__navlinks-title":"_2Eg7m","MuiListItem-button":"_3yWwI","Mui-selected":"_3Ou88","
|
|
9377
|
+
var styles$7 = {"sidebar__container":"_1EFxC","sidebar__wrapper":"_3Mk3_","sidebar__navlinks":"_29KVG","sidebar__navlinks-title":"_2Eg7m","MuiListItem-button":"_3yWwI","Mui-selected":"_3Ou88","buttonWidth":"_13tv0","onBoardText":"_HUoW-","iconStyle":"_3k0Fb","iconLayout":"_v3GT2","baseAlert":"_12zY5","headingWrapper":"_20Qv9","pageHeader":"_36au5","description":"_tULrl","headerText":"_3W_ZV","tableContainer":"_3xdGF"};
|
|
9528
9378
|
|
|
9529
9379
|
function Listview(_ref) {
|
|
9530
9380
|
var data = _ref.data,
|
|
9531
9381
|
name = _ref.name,
|
|
9532
|
-
tableName = _ref.tableName,
|
|
9533
9382
|
handleEditDialog = _ref.handleEditDialog,
|
|
9534
9383
|
handleDeleteDialog = _ref.handleDeleteDialog,
|
|
9535
9384
|
orderBy = _ref.orderBy,
|
|
@@ -9542,82 +9391,16 @@ function Listview(_ref) {
|
|
|
9542
9391
|
handleChangePage = _ref$handleChangePage === void 0 ? function () {} : _ref$handleChangePage,
|
|
9543
9392
|
page = _ref.page,
|
|
9544
9393
|
rowsPerPage = _ref.rowsPerPage;
|
|
9545
|
-
var deptHeadDetails = function deptHeadDetails(data) {
|
|
9546
|
-
var _data$dept_head_detai;
|
|
9547
|
-
if ((data === null || data === void 0 ? void 0 : (_data$dept_head_detai = data.dept_head_details) === null || _data$dept_head_detai === void 0 ? void 0 : _data$dept_head_detai.length) > 0) {
|
|
9548
|
-
return data.dept_head_details[0].first_name + ' ' + data.dept_head_details[0].last_name;
|
|
9549
|
-
}
|
|
9550
|
-
};
|
|
9551
9394
|
var columns = [{
|
|
9552
9395
|
id: 'name',
|
|
9553
9396
|
label: name,
|
|
9554
|
-
width: '
|
|
9555
|
-
sortable: true,
|
|
9556
|
-
cell: function cell(row) {
|
|
9557
|
-
return /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9558
|
-
component: "div"
|
|
9559
|
-
}, row.name);
|
|
9560
|
-
}
|
|
9561
|
-
}, {
|
|
9562
|
-
id: 'no_of_users',
|
|
9563
|
-
label: 'Number of users',
|
|
9564
|
-
width: '40%',
|
|
9565
|
-
sortable: true,
|
|
9566
|
-
cell: function cell(row) {
|
|
9567
|
-
return /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9568
|
-
component: "div"
|
|
9569
|
-
}, row.no_of_users);
|
|
9570
|
-
}
|
|
9571
|
-
}, {
|
|
9572
|
-
id: 'actions',
|
|
9573
|
-
label: 'Actions',
|
|
9574
|
-
width: '20%',
|
|
9575
|
-
cell: function cell(row) {
|
|
9576
|
-
return row.code !== UNASSIGNED_USERS && /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9577
|
-
display: "flex"
|
|
9578
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIButton, {
|
|
9579
|
-
buttonText: "Edit",
|
|
9580
|
-
className: styles$7.buttonWidth,
|
|
9581
|
-
onClick: function onClick() {
|
|
9582
|
-
return handleEditDialog(row);
|
|
9583
|
-
}
|
|
9584
|
-
}), row.no_of_users > 0 ? /*#__PURE__*/React__default.createElement(iuistyles.IUIButton, {
|
|
9585
|
-
buttonText: "Delete",
|
|
9586
|
-
className: styles$7.buttonWidth,
|
|
9587
|
-
onClick: function onClick() {
|
|
9588
|
-
return handleDeleteDialog(row, true);
|
|
9589
|
-
}
|
|
9590
|
-
}) : /*#__PURE__*/React__default.createElement(iuistyles.IUIButton, {
|
|
9591
|
-
buttonText: "Delete",
|
|
9592
|
-
className: styles$7.buttonWidth,
|
|
9593
|
-
onClick: function onClick() {
|
|
9594
|
-
return handleDeleteDialog(row, false);
|
|
9595
|
-
}
|
|
9596
|
-
}));
|
|
9597
|
-
}
|
|
9598
|
-
}];
|
|
9599
|
-
var departmentColumns = [{
|
|
9600
|
-
id: 'name',
|
|
9601
|
-
label: name,
|
|
9602
|
-
width: '30%',
|
|
9397
|
+
width: '45%',
|
|
9603
9398
|
sortable: true,
|
|
9604
9399
|
cell: function cell(row) {
|
|
9605
9400
|
return /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9606
9401
|
component: "div"
|
|
9607
9402
|
}, row.name);
|
|
9608
9403
|
}
|
|
9609
|
-
}, {
|
|
9610
|
-
id: 'department_head',
|
|
9611
|
-
label: 'Department head',
|
|
9612
|
-
width: '30%',
|
|
9613
|
-
sortable: true,
|
|
9614
|
-
cell: function cell(row) {
|
|
9615
|
-
return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9616
|
-
component: "div"
|
|
9617
|
-
}, deptHeadDetails(row)), row.is_default_dept_head && /*#__PURE__*/React__default.createElement(iuistyles.IUITypography, {
|
|
9618
|
-
className: clsx(styles$7.rowText, styles$7.textTransform, styles$7.lightColor)
|
|
9619
|
-
}, "Assigned by default"));
|
|
9620
|
-
}
|
|
9621
9404
|
}, {
|
|
9622
9405
|
id: 'no_of_users',
|
|
9623
9406
|
label: 'Number of users',
|
|
@@ -9631,7 +9414,7 @@ function Listview(_ref) {
|
|
|
9631
9414
|
}, {
|
|
9632
9415
|
id: 'actions',
|
|
9633
9416
|
label: 'Actions',
|
|
9634
|
-
width: '
|
|
9417
|
+
width: '10%',
|
|
9635
9418
|
cell: function cell(row) {
|
|
9636
9419
|
return row.code !== UNASSIGNED_USERS && /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9637
9420
|
display: "flex"
|
|
@@ -9664,7 +9447,7 @@ function Listview(_ref) {
|
|
|
9664
9447
|
hasFilter: true,
|
|
9665
9448
|
isCheckboxTable: false,
|
|
9666
9449
|
count: data.count,
|
|
9667
|
-
columns:
|
|
9450
|
+
columns: columns,
|
|
9668
9451
|
rows: data.results,
|
|
9669
9452
|
page: page,
|
|
9670
9453
|
handleChangePage: handleChangePage,
|
|
@@ -9721,44 +9504,15 @@ function EditPanelDialog(_ref) {
|
|
|
9721
9504
|
var isOpen = _ref.isOpen,
|
|
9722
9505
|
closeHandler = _ref.closeHandler,
|
|
9723
9506
|
onValueChange = _ref.onValueChange,
|
|
9724
|
-
|
|
9507
|
+
submitHandler = _ref.submitHandler,
|
|
9725
9508
|
isError = _ref.isError,
|
|
9726
9509
|
name = _ref.name,
|
|
9727
9510
|
isDisabledSubmitBtn = _ref.isDisabledSubmitBtn,
|
|
9728
|
-
validation = _ref.validation
|
|
9729
|
-
rowData = _ref.rowData,
|
|
9730
|
-
tableName = _ref.tableName,
|
|
9731
|
-
config = _ref.config;
|
|
9511
|
+
validation = _ref.validation;
|
|
9732
9512
|
var _useSelector = reactRedux.useSelector(function (state) {
|
|
9733
9513
|
return state.userPanel;
|
|
9734
9514
|
}),
|
|
9735
9515
|
dialogData = _useSelector.dialogData;
|
|
9736
|
-
var deptHeadDetails = function deptHeadDetails(data) {
|
|
9737
|
-
var _data$dept_head_detai;
|
|
9738
|
-
if ((data === null || data === void 0 ? void 0 : (_data$dept_head_detai = data.dept_head_details) === null || _data$dept_head_detai === void 0 ? void 0 : _data$dept_head_detai.length) > 0) {
|
|
9739
|
-
setHead({
|
|
9740
|
-
value: data.dept_head_details[0].id,
|
|
9741
|
-
label: data.dept_head_details[0].first_name + ' ' + data.dept_head_details[0].last_name
|
|
9742
|
-
});
|
|
9743
|
-
}
|
|
9744
|
-
};
|
|
9745
|
-
var _useState = React.useState({
|
|
9746
|
-
value: '',
|
|
9747
|
-
label: 'Select'
|
|
9748
|
-
}),
|
|
9749
|
-
head = _useState[0],
|
|
9750
|
-
setHead = _useState[1];
|
|
9751
|
-
React.useEffect(function () {
|
|
9752
|
-
deptHeadDetails(rowData);
|
|
9753
|
-
}, [rowData]);
|
|
9754
|
-
var history = reactRouterDom.useHistory();
|
|
9755
|
-
var handleAddPageNavigation = function handleAddPageNavigation() {
|
|
9756
|
-
console.log(rowData);
|
|
9757
|
-
history.push({
|
|
9758
|
-
pathname: config.routes.users.add.path,
|
|
9759
|
-
state: rowData
|
|
9760
|
-
});
|
|
9761
|
-
};
|
|
9762
9516
|
return /*#__PURE__*/React__default.createElement(iuistyles.IUIModal, {
|
|
9763
9517
|
isDisabledSubmitBtn: isDisabledSubmitBtn,
|
|
9764
9518
|
isOpen: isOpen,
|
|
@@ -9766,59 +9520,25 @@ function EditPanelDialog(_ref) {
|
|
|
9766
9520
|
headerText: "Edit " + name.toLowerCase(),
|
|
9767
9521
|
cancelLabel: (_dialogData$labels = dialogData.labels) === null || _dialogData$labels === void 0 ? void 0 : _dialogData$labels.cancelLabel,
|
|
9768
9522
|
submitLabel: (_dialogData$labels2 = dialogData.labels) === null || _dialogData$labels2 === void 0 ? void 0 : _dialogData$labels2.submitLabel,
|
|
9769
|
-
submitHandler:
|
|
9770
|
-
|
|
9771
|
-
},
|
|
9772
|
-
width: tableName === 'department' ? '400px' : '365px',
|
|
9523
|
+
submitHandler: submitHandler,
|
|
9524
|
+
width: "365px",
|
|
9773
9525
|
hideCloseIcon: false,
|
|
9774
9526
|
modalBodyStyle: {
|
|
9775
|
-
|
|
9527
|
+
maxHeight: '400px',
|
|
9528
|
+
overflow: 'auto',
|
|
9529
|
+
margin: '0px'
|
|
9776
9530
|
},
|
|
9777
9531
|
footerStyle: {
|
|
9778
9532
|
justifyContent: 'end'
|
|
9779
9533
|
}
|
|
9780
|
-
}, tableName === 'department' && rowData.no_of_users === 0 && /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9781
|
-
display: "flex",
|
|
9782
|
-
justifyContent: "center",
|
|
9783
|
-
alignItems: "center",
|
|
9784
|
-
flexDirection: "column",
|
|
9785
|
-
style: {
|
|
9786
|
-
marginBottom: '30px'
|
|
9787
|
-
}
|
|
9788
9534
|
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9535
|
+
component: "div",
|
|
9789
9536
|
display: "flex",
|
|
9790
9537
|
justifyContent: "center",
|
|
9791
9538
|
alignItems: "center",
|
|
9792
9539
|
flexDirection: "column",
|
|
9793
|
-
|
|
9794
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.
|
|
9795
|
-
className: styles$7.alertDescContainer
|
|
9796
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9797
|
-
className: styles$7.iconLayout,
|
|
9798
|
-
style: {
|
|
9799
|
-
paddingTop: '4px'
|
|
9800
|
-
}
|
|
9801
|
-
}, /*#__PURE__*/React__default.createElement(BoldInfoIcon, {
|
|
9802
|
-
color: "#CA8A04",
|
|
9803
|
-
width: "25",
|
|
9804
|
-
height: "20",
|
|
9805
|
-
className: styles$7.iconStyle
|
|
9806
|
-
})), /*#__PURE__*/React__default.createElement(iuistyles.IUILabel, {
|
|
9807
|
-
label: "By default, the primary admin gets assigned as the department head. This department has no users, so to change department head, add a new user.",
|
|
9808
|
-
style: {
|
|
9809
|
-
fontWeight: 'normal'
|
|
9810
|
-
}
|
|
9811
|
-
})), /*#__PURE__*/React__default.createElement(iuistyles.IUIButton, {
|
|
9812
|
-
buttonText: "Add user",
|
|
9813
|
-
type: "text",
|
|
9814
|
-
startIcon: /*#__PURE__*/React__default.createElement(AddIcon, {
|
|
9815
|
-
width: "9",
|
|
9816
|
-
height: "9",
|
|
9817
|
-
color: "#EC5D25"
|
|
9818
|
-
}),
|
|
9819
|
-
onClick: handleAddPageNavigation,
|
|
9820
|
-
className: styles$7.addUserButton
|
|
9821
|
-
}))), /*#__PURE__*/React__default.createElement(iuistyles.IUIInput, {
|
|
9540
|
+
padding: "8px 24px"
|
|
9541
|
+
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIInput, {
|
|
9822
9542
|
label: name + " name",
|
|
9823
9543
|
name: "name",
|
|
9824
9544
|
defaultValue: dialogData.data.name,
|
|
@@ -9827,49 +9547,7 @@ function EditPanelDialog(_ref) {
|
|
|
9827
9547
|
isError: isError,
|
|
9828
9548
|
validation: validation,
|
|
9829
9549
|
errorMsg: "Please enter " + name.toLowerCase() + " name.",
|
|
9830
|
-
required: true
|
|
9831
|
-
style: tableName === 'department' && {
|
|
9832
|
-
width: '350px'
|
|
9833
|
-
}
|
|
9834
|
-
}), tableName === 'department' && rowData.no_of_users === 0 && /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9835
|
-
className: "iui__mt-15",
|
|
9836
|
-
style: {
|
|
9837
|
-
width: '100%'
|
|
9838
|
-
}
|
|
9839
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIInput, {
|
|
9840
|
-
label: "Department head",
|
|
9841
|
-
name: "name",
|
|
9842
|
-
defaultValue: head.label,
|
|
9843
|
-
placeholder: "",
|
|
9844
|
-
readOnly: true,
|
|
9845
|
-
style: {
|
|
9846
|
-
width: '350px'
|
|
9847
|
-
}
|
|
9848
|
-
})), tableName === 'department' && rowData.no_of_users > 0 && /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9849
|
-
className: "iui__mt-15",
|
|
9850
|
-
style: {
|
|
9851
|
-
width: '100%'
|
|
9852
|
-
}
|
|
9853
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIAsyncSelect, {
|
|
9854
|
-
noResultsText: true,
|
|
9855
|
-
isMove: true,
|
|
9856
|
-
additional: {
|
|
9857
|
-
page: 1,
|
|
9858
|
-
departmentId: rowData.id
|
|
9859
|
-
},
|
|
9860
|
-
placeHolderCheck: head !== undefined && head.value === '',
|
|
9861
|
-
label: "Department head",
|
|
9862
|
-
value: head,
|
|
9863
|
-
onValueChange: function onValueChange(_ref2) {
|
|
9864
|
-
var _value = _ref2._value;
|
|
9865
|
-
return setHead(_value);
|
|
9866
|
-
},
|
|
9867
|
-
loadOption: departmentHeadOptions,
|
|
9868
|
-
disableText: "Please get in touch with your administrator to change this value.",
|
|
9869
|
-
customLoadingText: "No users found in this department",
|
|
9870
|
-
customLoadingTextStyle: {
|
|
9871
|
-
color: '#374151'
|
|
9872
|
-
}
|
|
9550
|
+
required: true
|
|
9873
9551
|
})));
|
|
9874
9552
|
}
|
|
9875
9553
|
|
|
@@ -10048,15 +9726,12 @@ var UserPanel = function UserPanel(_ref) {
|
|
|
10048
9726
|
var _useState13 = React.useState(false),
|
|
10049
9727
|
isSortingChangeTemp = _useState13[0],
|
|
10050
9728
|
setSortingChangeTemp = _useState13[1];
|
|
10051
|
-
var _useState14 = React.useState(
|
|
10052
|
-
|
|
10053
|
-
|
|
10054
|
-
var _useState15 = React.useState(
|
|
10055
|
-
|
|
10056
|
-
|
|
10057
|
-
var _useState16 = React.useState(5),
|
|
10058
|
-
rowsPerPage = _useState16[0],
|
|
10059
|
-
setRowsPerPage = _useState16[1];
|
|
9729
|
+
var _useState14 = React.useState(1),
|
|
9730
|
+
page = _useState14[0],
|
|
9731
|
+
setPage = _useState14[1];
|
|
9732
|
+
var _useState15 = React.useState(5),
|
|
9733
|
+
rowsPerPage = _useState15[0],
|
|
9734
|
+
setRowsPerPage = _useState15[1];
|
|
10060
9735
|
var orderingParam = orderBy;
|
|
10061
9736
|
var _useSelector = reactRedux.useSelector(function (state) {
|
|
10062
9737
|
return state.userPanel;
|
|
@@ -10152,7 +9827,6 @@ var UserPanel = function UserPanel(_ref) {
|
|
|
10152
9827
|
submitLabel: 'Save'
|
|
10153
9828
|
}, '', data));
|
|
10154
9829
|
setDataList(data.name);
|
|
10155
|
-
setRowData(data);
|
|
10156
9830
|
setEditModal(true);
|
|
10157
9831
|
};
|
|
10158
9832
|
var closeEditDialog = function closeEditDialog() {
|
|
@@ -10167,12 +9841,6 @@ var UserPanel = function UserPanel(_ref) {
|
|
|
10167
9841
|
var payload = {
|
|
10168
9842
|
names: [dataList]
|
|
10169
9843
|
};
|
|
10170
|
-
if (tableName === 'department') {
|
|
10171
|
-
payload = {
|
|
10172
|
-
name: dataList,
|
|
10173
|
-
department_head_id: null
|
|
10174
|
-
};
|
|
10175
|
-
}
|
|
10176
9844
|
var message = title + " added successfully.";
|
|
10177
9845
|
handleApiCall(addRecord, payload, message, 'add');
|
|
10178
9846
|
} else {
|
|
@@ -10186,12 +9854,9 @@ var UserPanel = function UserPanel(_ref) {
|
|
|
10186
9854
|
var message = title + " deleted successfully.";
|
|
10187
9855
|
handleApiCall(deleteRecord, payload, message, 'delete');
|
|
10188
9856
|
};
|
|
10189
|
-
var handleApiCall = function handleApiCall(dispatchFun, payload, message, type
|
|
10190
|
-
if (optionalParams === void 0) {
|
|
10191
|
-
optionalParams = null;
|
|
10192
|
-
}
|
|
9857
|
+
var handleApiCall = function handleApiCall(dispatchFun, payload, message, type) {
|
|
10193
9858
|
dispatch(userPanelShowLoader());
|
|
10194
|
-
dispatch(dispatchFun(tableName, payload, getApiData()
|
|
9859
|
+
dispatch(dispatchFun(tableName, payload, getApiData())).then(function (res) {
|
|
10195
9860
|
IUIToastMessageService$8.sNotify(type === 'move' ? res.data.message : "" + message);
|
|
10196
9861
|
dispatch(userPanelStopLoader());
|
|
10197
9862
|
if (type === 'delete') {
|
|
@@ -10233,14 +9898,8 @@ var UserPanel = function UserPanel(_ref) {
|
|
|
10233
9898
|
name: dataList
|
|
10234
9899
|
}]
|
|
10235
9900
|
};
|
|
10236
|
-
if (tableName === 'department') {
|
|
10237
|
-
payload = {
|
|
10238
|
-
name: dataList,
|
|
10239
|
-
department_head_id: data.value === '' || rowData.is_default_dept_head && rowData.dept_head === data.value ? null : data.value
|
|
10240
|
-
};
|
|
10241
|
-
}
|
|
10242
9901
|
var message = title + " updated successfully.";
|
|
10243
|
-
handleApiCall(editRecord, payload, message, 'edit'
|
|
9902
|
+
handleApiCall(editRecord, payload, message, 'edit');
|
|
10244
9903
|
setErrorEdit(false);
|
|
10245
9904
|
} else {
|
|
10246
9905
|
setErrorEdit(true);
|
|
@@ -10347,10 +10006,7 @@ var UserPanel = function UserPanel(_ref) {
|
|
|
10347
10006
|
submitHandler: handleEditPanel,
|
|
10348
10007
|
isError: errorEdit,
|
|
10349
10008
|
isDisabledSubmitBtn: loading,
|
|
10350
|
-
validation: validation
|
|
10351
|
-
rowData: rowData,
|
|
10352
|
-
tableName: tableName,
|
|
10353
|
-
config: config
|
|
10009
|
+
validation: validation
|
|
10354
10010
|
})) : /*#__PURE__*/React__default.createElement(VerificationError, {
|
|
10355
10011
|
config: config
|
|
10356
10012
|
}));
|