@itilite/iui-user-management 0.4.37 → 0.4.39
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 +183 -534
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +184 -535
- 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,29 +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, _location$state5, _location$state6;
|
|
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
|
-
if (location !== null && location !== void 0 && (_location$state5 = location.state) !== null && _location$state5 !== void 0 && _location$state5.is_default_dept_head && location !== null && location !== void 0 && (_location$state6 = location.state) !== null && _location$state6 !== void 0 && _location$state6.dept_head_details.length) {
|
|
5145
|
-
var _location$state7, _location$state8, _location$state9, _extends2;
|
|
5146
|
-
var _name = 'sequence-2';
|
|
5147
|
-
var _value = {
|
|
5148
|
-
label: location === null || location === void 0 ? void 0 : (_location$state7 = location.state) === null || _location$state7 === void 0 ? void 0 : _location$state7.dept_head_details[0].email,
|
|
5149
|
-
type: 'detailed',
|
|
5150
|
-
value: location === null || location === void 0 ? void 0 : (_location$state8 = location.state) === null || _location$state8 === void 0 ? void 0 : _location$state8.dept_head_details[0].email,
|
|
5151
|
-
data: location === null || location === void 0 ? void 0 : (_location$state9 = location.state) === null || _location$state9 === void 0 ? void 0 : _location$state9.dept_head_details[0]
|
|
5152
|
-
};
|
|
5153
|
-
setTravelApproversInput(_extends({}, travelApproversInput, (_extends2 = {}, _extends2[_name] = _value, _extends2)));
|
|
5154
|
-
}
|
|
5155
|
-
}, []);
|
|
5156
5097
|
var onModalOpen = function onModalOpen(e, id) {
|
|
5157
5098
|
var title = '';
|
|
5158
5099
|
if (id === 'entity') {
|
|
@@ -5178,43 +5119,24 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5178
5119
|
}));
|
|
5179
5120
|
} else {
|
|
5180
5121
|
dispatch(showLoader());
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
department_head_id: null
|
|
5186
|
-
};
|
|
5187
|
-
} else {
|
|
5188
|
-
dataObj = {
|
|
5189
|
-
names: [validatedValue]
|
|
5190
|
-
};
|
|
5191
|
-
}
|
|
5192
|
-
dispatch(submitAddModalData(addModalData.id, dataObj)).then(function (res) {
|
|
5193
|
-
var _extends5;
|
|
5194
|
-
console.log(res);
|
|
5122
|
+
dispatch(submitAddModalData(addModalData.id, {
|
|
5123
|
+
names: [validatedValue]
|
|
5124
|
+
})).then(function (res) {
|
|
5125
|
+
var _extends2, _extends3;
|
|
5195
5126
|
setAddModalData(_extends({}, addModalData, {
|
|
5196
5127
|
isOpen: false
|
|
5197
5128
|
}));
|
|
5198
5129
|
IUIToastMessageService$4.sNotify(addModalData.title + " added successfully.");
|
|
5199
5130
|
var tempKey = addModalData.id === 'employee_level' ? 'emp_level' : addModalData.id;
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
}, _extends3)));
|
|
5206
|
-
} else {
|
|
5207
|
-
var _extends4;
|
|
5208
|
-
setEmployeeInfoInput(_extends({}, employeeInfoInput, (_extends4 = {}, _extends4[tempKey] = {
|
|
5209
|
-
value: res.data.value,
|
|
5210
|
-
label: res.data.label
|
|
5211
|
-
}, _extends4)));
|
|
5212
|
-
}
|
|
5213
|
-
updateInputChangeLog(_extends({}, inputChangeLog, (_extends5 = {}, _extends5[tempKey] = true, _extends5)));
|
|
5131
|
+
setEmployeeInfoInput(_extends({}, employeeInfoInput, (_extends2 = {}, _extends2[tempKey] = {
|
|
5132
|
+
value: res.data.value,
|
|
5133
|
+
label: res.data.label
|
|
5134
|
+
}, _extends2)));
|
|
5135
|
+
updateInputChangeLog(_extends({}, inputChangeLog, (_extends3 = {}, _extends3[tempKey] = true, _extends3)));
|
|
5214
5136
|
asyncSelectRefs.current[tempKey].current.blur();
|
|
5215
5137
|
clearCacheForAsyncDropdown(function (prevState) {
|
|
5216
|
-
var
|
|
5217
|
-
return _extends({}, prevState, (
|
|
5138
|
+
var _extends4;
|
|
5139
|
+
return _extends({}, prevState, (_extends4 = {}, _extends4[tempKey] = prevState[tempKey] + 1, _extends4));
|
|
5218
5140
|
});
|
|
5219
5141
|
dispatch(stopLoader());
|
|
5220
5142
|
});
|
|
@@ -5233,8 +5155,8 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5233
5155
|
try {
|
|
5234
5156
|
var _temp6 = function _temp6() {
|
|
5235
5157
|
if (Object.hasOwnProperty.call(inputChangeLog, _name)) {
|
|
5236
|
-
var
|
|
5237
|
-
updateInputChangeLog(_extends({}, inputChangeLog, (
|
|
5158
|
+
var _extends5;
|
|
5159
|
+
updateInputChangeLog(_extends({}, inputChangeLog, (_extends5 = {}, _extends5[_name] = true, _extends5)));
|
|
5238
5160
|
}
|
|
5239
5161
|
};
|
|
5240
5162
|
var _name = args._name,
|
|
@@ -5257,8 +5179,8 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5257
5179
|
updateError('contact_country_code', _isError, _errorMsg);
|
|
5258
5180
|
} else {
|
|
5259
5181
|
var _temp8 = function _temp8() {
|
|
5260
|
-
var
|
|
5261
|
-
setPersonalInfoInput(_extends({}, personalInfoInput, (
|
|
5182
|
+
var _extends6;
|
|
5183
|
+
setPersonalInfoInput(_extends({}, personalInfoInput, (_extends6 = {}, _extends6[_name] = _value, _extends6)));
|
|
5262
5184
|
updateError(_name, _isError, _errorMsg);
|
|
5263
5185
|
};
|
|
5264
5186
|
var _temp9 = function () {
|
|
@@ -5306,7 +5228,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5306
5228
|
}
|
|
5307
5229
|
};
|
|
5308
5230
|
var onEmployeeInfoChange = function onEmployeeInfoChange(args) {
|
|
5309
|
-
var
|
|
5231
|
+
var _extends7;
|
|
5310
5232
|
var _name = args._name,
|
|
5311
5233
|
_value = args._value,
|
|
5312
5234
|
_isError = args._isError,
|
|
@@ -5315,11 +5237,11 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5315
5237
|
_name: _name,
|
|
5316
5238
|
_value: _value
|
|
5317
5239
|
});
|
|
5318
|
-
setEmployeeInfoInput(_extends({}, employeeInfoInput, (
|
|
5240
|
+
setEmployeeInfoInput(_extends({}, employeeInfoInput, (_extends7 = {}, _extends7[_name] = _value, _extends7)));
|
|
5319
5241
|
updateError(_name, _isError, _errorMsg);
|
|
5320
5242
|
if (Object.hasOwnProperty.call(inputChangeLog, _name)) {
|
|
5321
|
-
var
|
|
5322
|
-
updateInputChangeLog(_extends({}, inputChangeLog, (
|
|
5243
|
+
var _extends8;
|
|
5244
|
+
updateInputChangeLog(_extends({}, inputChangeLog, (_extends8 = {}, _extends8[_name] = true, _extends8)));
|
|
5323
5245
|
}
|
|
5324
5246
|
};
|
|
5325
5247
|
var getUserTagTypeId = function getUserTagTypeId(name) {
|
|
@@ -5329,9 +5251,9 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5329
5251
|
return tag.id;
|
|
5330
5252
|
};
|
|
5331
5253
|
var onUserTagTypeChange = function onUserTagTypeChange(args) {
|
|
5332
|
-
var
|
|
5254
|
+
var _extends9;
|
|
5333
5255
|
var e = args._event;
|
|
5334
|
-
setUserTagType(_extends({}, userTagType, (
|
|
5256
|
+
setUserTagType(_extends({}, userTagType, (_extends9 = {}, _extends9[e.target.name] = userTagType[e.target.name] ? false : getUserTagTypeId(e.target.name), _extends9)));
|
|
5335
5257
|
if (Object.hasOwnProperty.call(inputChangeLog, 'userTagType')) {
|
|
5336
5258
|
updateInputChangeLog(_extends({}, inputChangeLog, {
|
|
5337
5259
|
userTagType: true
|
|
@@ -5339,23 +5261,22 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5339
5261
|
}
|
|
5340
5262
|
};
|
|
5341
5263
|
var onCustomFieldsChange = function onCustomFieldsChange(_ref2) {
|
|
5342
|
-
var
|
|
5264
|
+
var _extends10;
|
|
5343
5265
|
var _name = _ref2._name,
|
|
5344
5266
|
_value = _ref2._value;
|
|
5345
|
-
setCustomFieldsInput(_extends({}, customFieldsInput, (
|
|
5267
|
+
setCustomFieldsInput(_extends({}, customFieldsInput, (_extends10 = {}, _extends10[_name] = _value, _extends10)));
|
|
5346
5268
|
};
|
|
5347
5269
|
var onTravelApproversInputChange = function onTravelApproversInputChange(_ref3) {
|
|
5348
|
-
var
|
|
5270
|
+
var _extends11;
|
|
5349
5271
|
var _name = _ref3._name,
|
|
5350
5272
|
_value = _ref3._value;
|
|
5351
|
-
|
|
5352
|
-
setTravelApproversInput(_extends({}, travelApproversInput, (_extends13 = {}, _extends13[_name] = _value, _extends13)));
|
|
5273
|
+
setTravelApproversInput(_extends({}, travelApproversInput, (_extends11 = {}, _extends11[_name] = _value, _extends11)));
|
|
5353
5274
|
};
|
|
5354
5275
|
var onExpenseApproversInputChange = function onExpenseApproversInputChange(_ref4) {
|
|
5355
|
-
var
|
|
5276
|
+
var _extends12;
|
|
5356
5277
|
var _name = _ref4._name,
|
|
5357
5278
|
_value = _ref4._value;
|
|
5358
|
-
setExpenseApproversInput(_extends({}, expenseApproversInput, (
|
|
5279
|
+
setExpenseApproversInput(_extends({}, expenseApproversInput, (_extends12 = {}, _extends12[_name] = _value, _extends12)));
|
|
5359
5280
|
};
|
|
5360
5281
|
var onMemInfoInputChange = function onMemInfoInputChange(index, key, val) {
|
|
5361
5282
|
var _membershipInfoInput = [].concat(membershipInfoInput);
|
|
@@ -5389,39 +5310,39 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5389
5310
|
setMembershipInfoInput(_membershipInfoInputTemp);
|
|
5390
5311
|
};
|
|
5391
5312
|
var travelPreferenceOnChange = function travelPreferenceOnChange(args) {
|
|
5392
|
-
var
|
|
5313
|
+
var _extends13;
|
|
5393
5314
|
var _name = args._name,
|
|
5394
5315
|
_value = args._value,
|
|
5395
5316
|
_isError = args._isError,
|
|
5396
5317
|
_errorMsg = args._errorMsg;
|
|
5397
|
-
settravelPreferenceInfo(_extends({}, travelPreferenceInfo, (
|
|
5318
|
+
settravelPreferenceInfo(_extends({}, travelPreferenceInfo, (_extends13 = {}, _extends13[_name] = _value, _extends13)));
|
|
5398
5319
|
if (Object.hasOwnProperty.call(inputChangeLog, _name)) {
|
|
5399
|
-
var
|
|
5400
|
-
updateInputChangeLog(_extends({}, inputChangeLog, (
|
|
5320
|
+
var _extends14;
|
|
5321
|
+
updateInputChangeLog(_extends({}, inputChangeLog, (_extends14 = {}, _extends14[_name] = true, _extends14)));
|
|
5401
5322
|
}
|
|
5402
5323
|
updateError(_name, _isError, _errorMsg);
|
|
5403
5324
|
};
|
|
5404
5325
|
var onSecureTraveelerInfoInputChange = function onSecureTraveelerInfoInputChange(args) {
|
|
5405
|
-
var
|
|
5326
|
+
var _extends15;
|
|
5406
5327
|
var _name = args._name,
|
|
5407
5328
|
_value = args._value,
|
|
5408
5329
|
_isError = args._isError,
|
|
5409
5330
|
_errorMsg = args._errorMsg;
|
|
5410
|
-
setSecureTravelInputInfo(_extends({}, secureTravelInputInfo, (
|
|
5331
|
+
setSecureTravelInputInfo(_extends({}, secureTravelInputInfo, (_extends15 = {}, _extends15[_name] = _value, _extends15)));
|
|
5411
5332
|
if (Object.hasOwnProperty.call(inputChangeLog, _name)) {
|
|
5412
|
-
var
|
|
5413
|
-
updateInputChangeLog(_extends({}, inputChangeLog, (
|
|
5333
|
+
var _extends16;
|
|
5334
|
+
updateInputChangeLog(_extends({}, inputChangeLog, (_extends16 = {}, _extends16[_name] = true, _extends16)));
|
|
5414
5335
|
}
|
|
5415
5336
|
updateError(_name, _isError, _errorMsg);
|
|
5416
5337
|
};
|
|
5417
5338
|
var onPassportInfoInputChange = function onPassportInfoInputChange(args) {
|
|
5418
5339
|
try {
|
|
5419
5340
|
var _temp14 = function _temp14() {
|
|
5420
|
-
var
|
|
5421
|
-
setPassportInfoInput(_extends({}, passportInfoInput, (
|
|
5341
|
+
var _extends17;
|
|
5342
|
+
setPassportInfoInput(_extends({}, passportInfoInput, (_extends17 = {}, _extends17[_name] = _value, _extends17)));
|
|
5422
5343
|
if (Object.hasOwnProperty.call(inputChangeLog, _name)) {
|
|
5423
|
-
var
|
|
5424
|
-
updateInputChangeLog(_extends({}, inputChangeLog, (
|
|
5344
|
+
var _extends18;
|
|
5345
|
+
updateInputChangeLog(_extends({}, inputChangeLog, (_extends18 = {}, _extends18[_name] = true, _extends18)));
|
|
5425
5346
|
}
|
|
5426
5347
|
updateError(_name, _isError, _errorMsg);
|
|
5427
5348
|
};
|
|
@@ -5527,8 +5448,8 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5527
5448
|
return _errorArray;
|
|
5528
5449
|
});
|
|
5529
5450
|
setErrorMsgs(function (prevState) {
|
|
5530
|
-
var
|
|
5531
|
-
return _extends({}, prevState, (
|
|
5451
|
+
var _extends19;
|
|
5452
|
+
return _extends({}, prevState, (_extends19 = {}, _extends19[_name] = _errorMsg, _extends19));
|
|
5532
5453
|
});
|
|
5533
5454
|
};
|
|
5534
5455
|
var dispatch = reactRedux.useDispatch();
|
|
@@ -5602,6 +5523,20 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5602
5523
|
value: '',
|
|
5603
5524
|
label: 'Select employee level'
|
|
5604
5525
|
},
|
|
5526
|
+
manager: res.manager_info.manager !== '' ? {
|
|
5527
|
+
value: res.manager_info.manager,
|
|
5528
|
+
label: res.manager_info.manager
|
|
5529
|
+
} : {
|
|
5530
|
+
value: '',
|
|
5531
|
+
label: 'Select Manager'
|
|
5532
|
+
},
|
|
5533
|
+
skip_manager: res.manager_info.skip_manager !== '' ? {
|
|
5534
|
+
value: res.manager_info.skip_manager,
|
|
5535
|
+
label: res.manager_info.skip_manager
|
|
5536
|
+
} : {
|
|
5537
|
+
value: '',
|
|
5538
|
+
label: 'Select Manager'
|
|
5539
|
+
},
|
|
5605
5540
|
employee_id: res.employee_info.employee_id || '',
|
|
5606
5541
|
entity: res.employee_info.entity ? {
|
|
5607
5542
|
value: res.employee_info.entity.id,
|
|
@@ -5867,10 +5802,23 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
5867
5802
|
IUIToastMessageService$4.warningNotify(checkAnyError);
|
|
5868
5803
|
return Promise.resolve();
|
|
5869
5804
|
}
|
|
5805
|
+
var manager_info = {
|
|
5806
|
+
manager: '',
|
|
5807
|
+
skip_manager: ''
|
|
5808
|
+
};
|
|
5809
|
+
if (employeeInfoInput.manager.value !== '') {
|
|
5810
|
+
manager_info.manager = employeeInfoInput.manager.value;
|
|
5811
|
+
delete employeeInfoInput.manager;
|
|
5812
|
+
}
|
|
5813
|
+
if (employeeInfoInput.skip_manager.value !== '') {
|
|
5814
|
+
manager_info.skip_manager = employeeInfoInput.skip_manager.value;
|
|
5815
|
+
delete employeeInfoInput.skip_manager;
|
|
5816
|
+
}
|
|
5870
5817
|
var payload = {
|
|
5871
5818
|
personalInfoInput: personalInfoInput,
|
|
5872
5819
|
employeeInfoInput: employeeInfoInput,
|
|
5873
5820
|
customFieldsInput: customFieldsInput,
|
|
5821
|
+
manager_info: manager_info,
|
|
5874
5822
|
productAccess: productAccess,
|
|
5875
5823
|
travelRole: travelRole,
|
|
5876
5824
|
travelApproversInput: travelApproversInput,
|
|
@@ -6033,7 +5981,6 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6033
5981
|
}
|
|
6034
5982
|
}
|
|
6035
5983
|
}
|
|
6036
|
-
return Promise.resolve();
|
|
6037
5984
|
}
|
|
6038
5985
|
if (isEditMode && editUserId || isProfile) {
|
|
6039
5986
|
dispatch(showLoader());
|
|
@@ -6854,7 +6801,7 @@ var fetchBulkactionHistory = function fetchBulkactionHistory(url) {
|
|
|
6854
6801
|
};
|
|
6855
6802
|
};
|
|
6856
6803
|
|
|
6857
|
-
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","
|
|
6804
|
+
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"};
|
|
6858
6805
|
|
|
6859
6806
|
var BulkUploadModal = function BulkUploadModal(props) {
|
|
6860
6807
|
var isOpenImportUsersModal = props.isOpenImportUsersModal,
|
|
@@ -8639,25 +8586,6 @@ function InviteInfoIcon() {
|
|
|
8639
8586
|
}));
|
|
8640
8587
|
}
|
|
8641
8588
|
|
|
8642
|
-
function InfoYellowIcon(props) {
|
|
8643
|
-
return /*#__PURE__*/React__default.createElement("svg", {
|
|
8644
|
-
width: props.width,
|
|
8645
|
-
height: props.height,
|
|
8646
|
-
viewBox: "0 0 20 20",
|
|
8647
|
-
fill: "none",
|
|
8648
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
8649
|
-
}, /*#__PURE__*/React__default.createElement("path", {
|
|
8650
|
-
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",
|
|
8651
|
-
fill: "#CA8A04"
|
|
8652
|
-
}), /*#__PURE__*/React__default.createElement("path", {
|
|
8653
|
-
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",
|
|
8654
|
-
fill: "#CA8A04"
|
|
8655
|
-
}), /*#__PURE__*/React__default.createElement("path", {
|
|
8656
|
-
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",
|
|
8657
|
-
fill: "#CA8A04"
|
|
8658
|
-
}));
|
|
8659
|
-
}
|
|
8660
|
-
|
|
8661
8589
|
var IUIToastMessageService$7 = utils.services.IUIToastMessageService;
|
|
8662
8590
|
var env$7 = utils.configs.env;
|
|
8663
8591
|
var UndoButton = function UndoButton(_ref) {
|
|
@@ -8709,12 +8637,9 @@ var UserList = function UserList(_ref2) {
|
|
|
8709
8637
|
var _React$useState3 = React__default.useState('asc'),
|
|
8710
8638
|
order = _React$useState3[0],
|
|
8711
8639
|
setOrder = _React$useState3[1];
|
|
8712
|
-
var _React$useState4 = React__default.useState(
|
|
8713
|
-
|
|
8714
|
-
|
|
8715
|
-
var _React$useState5 = React__default.useState('first_name'),
|
|
8716
|
-
orderBy = _React$useState5[0],
|
|
8717
|
-
setOrderBy = _React$useState5[1];
|
|
8640
|
+
var _React$useState4 = React__default.useState('first_name'),
|
|
8641
|
+
orderBy = _React$useState4[0],
|
|
8642
|
+
setOrderBy = _React$useState4[1];
|
|
8718
8643
|
var _useState2 = React.useState(''),
|
|
8719
8644
|
searchValue = _useState2[0],
|
|
8720
8645
|
setSearchValue = _useState2[1];
|
|
@@ -8749,21 +8674,15 @@ var UserList = function UserList(_ref2) {
|
|
|
8749
8674
|
var _useState10 = React.useState(false),
|
|
8750
8675
|
isApiFetching = _useState10[0],
|
|
8751
8676
|
setisApiFetching = _useState10[1];
|
|
8752
|
-
var _useState11 = React.useState(
|
|
8753
|
-
|
|
8754
|
-
|
|
8755
|
-
|
|
8756
|
-
|
|
8757
|
-
|
|
8758
|
-
var
|
|
8759
|
-
|
|
8760
|
-
|
|
8761
|
-
var _useState13 = React.useState(''),
|
|
8762
|
-
userIds = _useState13[0],
|
|
8763
|
-
setUserIds = _useState13[1];
|
|
8764
|
-
var _React$useState6 = React__default.useState(false),
|
|
8765
|
-
overlayMenu = _React$useState6[0],
|
|
8766
|
-
setOverlayMenu = _React$useState6[1];
|
|
8677
|
+
var _useState11 = React.useState(false),
|
|
8678
|
+
showInviteModal = _useState11[0],
|
|
8679
|
+
setToggleInviteModal = _useState11[1];
|
|
8680
|
+
var _useState12 = React.useState(''),
|
|
8681
|
+
userIds = _useState12[0],
|
|
8682
|
+
setUserIds = _useState12[1];
|
|
8683
|
+
var _React$useState5 = React__default.useState(false),
|
|
8684
|
+
overlayMenu = _React$useState5[0],
|
|
8685
|
+
setOverlayMenu = _React$useState5[1];
|
|
8767
8686
|
useScrollPosition.useScrollPosition(function (_ref3) {
|
|
8768
8687
|
var prevPos = _ref3.prevPos,
|
|
8769
8688
|
currPos = _ref3.currPos;
|
|
@@ -8784,33 +8703,33 @@ var UserList = function UserList(_ref2) {
|
|
|
8784
8703
|
behavior: 'smooth'
|
|
8785
8704
|
});
|
|
8786
8705
|
};
|
|
8787
|
-
var _React$
|
|
8788
|
-
signup_page = _React$
|
|
8789
|
-
setSignUpPage = _React$
|
|
8790
|
-
var
|
|
8791
|
-
signup_rowsPerPage =
|
|
8792
|
-
setSignUpRowsPerPage =
|
|
8793
|
-
var _React$
|
|
8794
|
-
signup_order = _React$
|
|
8795
|
-
setSignUpOrder = _React$
|
|
8796
|
-
var _React$
|
|
8797
|
-
signup_orderBy = _React$
|
|
8798
|
-
setSignUpOrderBy = _React$
|
|
8799
|
-
var
|
|
8800
|
-
signup_searchValue =
|
|
8801
|
-
set_signup_SearchValue =
|
|
8706
|
+
var _React$useState6 = React__default.useState(1),
|
|
8707
|
+
signup_page = _React$useState6[0],
|
|
8708
|
+
setSignUpPage = _React$useState6[1];
|
|
8709
|
+
var _useState13 = React.useState(5),
|
|
8710
|
+
signup_rowsPerPage = _useState13[0],
|
|
8711
|
+
setSignUpRowsPerPage = _useState13[1];
|
|
8712
|
+
var _React$useState7 = React__default.useState('asc'),
|
|
8713
|
+
signup_order = _React$useState7[0],
|
|
8714
|
+
setSignUpOrder = _React$useState7[1];
|
|
8715
|
+
var _React$useState8 = React__default.useState('fname'),
|
|
8716
|
+
signup_orderBy = _React$useState8[0],
|
|
8717
|
+
setSignUpOrderBy = _React$useState8[1];
|
|
8718
|
+
var _useState14 = React.useState(''),
|
|
8719
|
+
signup_searchValue = _useState14[0],
|
|
8720
|
+
set_signup_SearchValue = _useState14[1];
|
|
8721
|
+
var _useState15 = React.useState(false),
|
|
8722
|
+
isSignUpSortingChange = _useState15[0],
|
|
8723
|
+
setSignUpSortingChange = _useState15[1];
|
|
8802
8724
|
var _useState16 = React.useState(false),
|
|
8803
|
-
|
|
8804
|
-
|
|
8725
|
+
isSignUpSearchingChange = _useState16[0],
|
|
8726
|
+
setSignUpSearchingChange = _useState16[1];
|
|
8805
8727
|
var _useState17 = React.useState(false),
|
|
8806
|
-
|
|
8807
|
-
|
|
8728
|
+
isSignUpSortingChangeTemp = _useState17[0],
|
|
8729
|
+
setSignUpSortingChangeTemp = _useState17[1];
|
|
8808
8730
|
var _useState18 = React.useState(false),
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
var _useState19 = React.useState(false),
|
|
8812
|
-
isSignUpSearchingChangeTemp = _useState19[0],
|
|
8813
|
-
setSignUpSearchingChangeTemp = _useState19[1];
|
|
8731
|
+
isSignUpSearchingChangeTemp = _useState18[0],
|
|
8732
|
+
setSignUpSearchingChangeTemp = _useState18[1];
|
|
8814
8733
|
var _useSelector3 = reactRedux.useSelector(function (state) {
|
|
8815
8734
|
return state.userList;
|
|
8816
8735
|
}),
|
|
@@ -9325,82 +9244,6 @@ var UserList = function UserList(_ref2) {
|
|
|
9325
9244
|
}))
|
|
9326
9245
|
}]
|
|
9327
9246
|
}))), /*#__PURE__*/React__default.createElement(iuistyles.IUIModal, {
|
|
9328
|
-
isOpen: deactivateSingle,
|
|
9329
|
-
closeHandler: function closeHandler() {
|
|
9330
|
-
setDeactivateSingle(false);
|
|
9331
|
-
},
|
|
9332
|
-
cancelLabel: "Cancel",
|
|
9333
|
-
submitLabel: "Deactivate",
|
|
9334
|
-
submitHandler: handleDeactivateUsers,
|
|
9335
|
-
headerText: "Deactivate this user?",
|
|
9336
|
-
width: "400px",
|
|
9337
|
-
subHanderText: "",
|
|
9338
|
-
submitBtnClass: styles$5.deactivateBtn,
|
|
9339
|
-
isDisabledSubmitBtn: true
|
|
9340
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9341
|
-
className: styles$5.deactivateSingle
|
|
9342
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9343
|
-
className: styles$5.deactivateAlert
|
|
9344
|
-
}, /*#__PURE__*/React__default.createElement(InfoYellowIcon, {
|
|
9345
|
-
width: "9",
|
|
9346
|
-
height: "9"
|
|
9347
|
-
}), /*#__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, {
|
|
9348
|
-
className: "iui__mb-15 iui__mt-15"
|
|
9349
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIAsyncSelect, {
|
|
9350
|
-
isMove: true,
|
|
9351
|
-
additional: {
|
|
9352
|
-
page: 1,
|
|
9353
|
-
product: 'travel',
|
|
9354
|
-
placeholder: 'Select a user'
|
|
9355
|
-
},
|
|
9356
|
-
placeHolderCheck: travelFYI !== undefined && travelFYI.value === '',
|
|
9357
|
-
label: "Transfer admin role to",
|
|
9358
|
-
value: travelFYI,
|
|
9359
|
-
onValueChange: function onValueChange(_ref4) {
|
|
9360
|
-
var _value = _ref4._value;
|
|
9361
|
-
return setTravelFYI(_value);
|
|
9362
|
-
},
|
|
9363
|
-
loadOption: approversOptions,
|
|
9364
|
-
disableText: "Please get in touch with your administrator to change this value."
|
|
9365
|
-
})), /*#__PURE__*/React__default.createElement(iuistyles.IUITypography, {
|
|
9366
|
-
className: clsx('iui__mb-5', styles$5.departmentHeadText)
|
|
9367
|
-
}, "Anvesh Dunna is the department head for: Product Design."), /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9368
|
-
className: "iui__mb-15"
|
|
9369
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIAsyncSelect, {
|
|
9370
|
-
isMove: true,
|
|
9371
|
-
additional: {
|
|
9372
|
-
page: 1,
|
|
9373
|
-
product: 'travel',
|
|
9374
|
-
placeholder: 'Select a user'
|
|
9375
|
-
},
|
|
9376
|
-
placeHolderCheck: travelFYI !== undefined && travelFYI.value === '',
|
|
9377
|
-
label: "Transfer department head role to",
|
|
9378
|
-
value: travelFYI,
|
|
9379
|
-
onValueChange: function onValueChange(_ref5) {
|
|
9380
|
-
var _value = _ref5._value;
|
|
9381
|
-
return setTravelFYI(_value);
|
|
9382
|
-
},
|
|
9383
|
-
loadOption: approversOptions,
|
|
9384
|
-
disableText: "Please get in touch with your administrator to change this value."
|
|
9385
|
-
})), /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9386
|
-
className: "iui__mb-15"
|
|
9387
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIAsyncSelect, {
|
|
9388
|
-
isMove: true,
|
|
9389
|
-
additional: {
|
|
9390
|
-
page: 1,
|
|
9391
|
-
product: 'travel',
|
|
9392
|
-
placeholder: 'Select a user'
|
|
9393
|
-
},
|
|
9394
|
-
placeHolderCheck: travelFYI !== undefined && travelFYI.value === '',
|
|
9395
|
-
label: "Transfer approver role to",
|
|
9396
|
-
value: travelFYI,
|
|
9397
|
-
onValueChange: function onValueChange(_ref6) {
|
|
9398
|
-
var _value = _ref6._value;
|
|
9399
|
-
return setTravelFYI(_value);
|
|
9400
|
-
},
|
|
9401
|
-
loadOption: approversOptions,
|
|
9402
|
-
disableText: "Please get in touch with your administrator to change this value."
|
|
9403
|
-
})))), /*#__PURE__*/React__default.createElement(iuistyles.IUIModal, {
|
|
9404
9247
|
isOpen: Object.values(selected).flat().length > 0 && isOpenDeActivateModal,
|
|
9405
9248
|
closeHandler: closeDeActivateModal,
|
|
9406
9249
|
cancelLabel: "Cancel",
|
|
@@ -9469,8 +9312,8 @@ var UserList = function UserList(_ref2) {
|
|
|
9469
9312
|
errMsg: hasVerificationError
|
|
9470
9313
|
}));
|
|
9471
9314
|
};
|
|
9472
|
-
var TabLabelCount = function TabLabelCount(
|
|
9473
|
-
var count =
|
|
9315
|
+
var TabLabelCount = function TabLabelCount(_ref4) {
|
|
9316
|
+
var count = _ref4.count;
|
|
9474
9317
|
return /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9475
9318
|
className: styles$5.TabLabelCount
|
|
9476
9319
|
}, " ", count, " ");
|
|
@@ -9545,12 +9388,11 @@ function Header(props) {
|
|
|
9545
9388
|
})));
|
|
9546
9389
|
}
|
|
9547
9390
|
|
|
9548
|
-
var styles$7 = {"sidebar__container":"_1EFxC","sidebar__wrapper":"_3Mk3_","sidebar__navlinks":"_29KVG","sidebar__navlinks-title":"_2Eg7m","MuiListItem-button":"_3yWwI","Mui-selected":"_3Ou88","
|
|
9391
|
+
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"};
|
|
9549
9392
|
|
|
9550
9393
|
function Listview(_ref) {
|
|
9551
9394
|
var data = _ref.data,
|
|
9552
9395
|
name = _ref.name,
|
|
9553
|
-
tableName = _ref.tableName,
|
|
9554
9396
|
handleEditDialog = _ref.handleEditDialog,
|
|
9555
9397
|
handleDeleteDialog = _ref.handleDeleteDialog,
|
|
9556
9398
|
orderBy = _ref.orderBy,
|
|
@@ -9563,82 +9405,16 @@ function Listview(_ref) {
|
|
|
9563
9405
|
handleChangePage = _ref$handleChangePage === void 0 ? function () {} : _ref$handleChangePage,
|
|
9564
9406
|
page = _ref.page,
|
|
9565
9407
|
rowsPerPage = _ref.rowsPerPage;
|
|
9566
|
-
var deptHeadDetails = function deptHeadDetails(data) {
|
|
9567
|
-
var _data$dept_head_detai;
|
|
9568
|
-
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) {
|
|
9569
|
-
return data.dept_head_details[0].first_name + ' ' + data.dept_head_details[0].last_name;
|
|
9570
|
-
}
|
|
9571
|
-
};
|
|
9572
9408
|
var columns = [{
|
|
9573
9409
|
id: 'name',
|
|
9574
9410
|
label: name,
|
|
9575
|
-
width: '
|
|
9576
|
-
sortable: true,
|
|
9577
|
-
cell: function cell(row) {
|
|
9578
|
-
return /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9579
|
-
component: "div"
|
|
9580
|
-
}, row.name);
|
|
9581
|
-
}
|
|
9582
|
-
}, {
|
|
9583
|
-
id: 'no_of_users',
|
|
9584
|
-
label: 'Number of users',
|
|
9585
|
-
width: '40%',
|
|
9586
|
-
sortable: true,
|
|
9587
|
-
cell: function cell(row) {
|
|
9588
|
-
return /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9589
|
-
component: "div"
|
|
9590
|
-
}, row.no_of_users);
|
|
9591
|
-
}
|
|
9592
|
-
}, {
|
|
9593
|
-
id: 'actions',
|
|
9594
|
-
label: 'Actions',
|
|
9595
|
-
width: '20%',
|
|
9596
|
-
cell: function cell(row) {
|
|
9597
|
-
return row.code !== UNASSIGNED_USERS && /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9598
|
-
display: "flex"
|
|
9599
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIButton, {
|
|
9600
|
-
buttonText: "Edit",
|
|
9601
|
-
className: styles$7.buttonWidth,
|
|
9602
|
-
onClick: function onClick() {
|
|
9603
|
-
return handleEditDialog(row);
|
|
9604
|
-
}
|
|
9605
|
-
}), row.no_of_users > 0 ? /*#__PURE__*/React__default.createElement(iuistyles.IUIButton, {
|
|
9606
|
-
buttonText: "Delete",
|
|
9607
|
-
className: styles$7.buttonWidth,
|
|
9608
|
-
onClick: function onClick() {
|
|
9609
|
-
return handleDeleteDialog(row, true);
|
|
9610
|
-
}
|
|
9611
|
-
}) : /*#__PURE__*/React__default.createElement(iuistyles.IUIButton, {
|
|
9612
|
-
buttonText: "Delete",
|
|
9613
|
-
className: styles$7.buttonWidth,
|
|
9614
|
-
onClick: function onClick() {
|
|
9615
|
-
return handleDeleteDialog(row, false);
|
|
9616
|
-
}
|
|
9617
|
-
}));
|
|
9618
|
-
}
|
|
9619
|
-
}];
|
|
9620
|
-
var departmentColumns = [{
|
|
9621
|
-
id: 'name',
|
|
9622
|
-
label: name,
|
|
9623
|
-
width: '30%',
|
|
9411
|
+
width: '45%',
|
|
9624
9412
|
sortable: true,
|
|
9625
9413
|
cell: function cell(row) {
|
|
9626
9414
|
return /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9627
9415
|
component: "div"
|
|
9628
9416
|
}, row.name);
|
|
9629
9417
|
}
|
|
9630
|
-
}, {
|
|
9631
|
-
id: 'department_head',
|
|
9632
|
-
label: 'Department head',
|
|
9633
|
-
width: '30%',
|
|
9634
|
-
sortable: true,
|
|
9635
|
-
cell: function cell(row) {
|
|
9636
|
-
return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9637
|
-
component: "div"
|
|
9638
|
-
}, deptHeadDetails(row)), row.is_default_dept_head && /*#__PURE__*/React__default.createElement(iuistyles.IUITypography, {
|
|
9639
|
-
className: clsx(styles$7.rowText, styles$7.textTransform, styles$7.lightColor)
|
|
9640
|
-
}, "Assigned by default"));
|
|
9641
|
-
}
|
|
9642
9418
|
}, {
|
|
9643
9419
|
id: 'no_of_users',
|
|
9644
9420
|
label: 'Number of users',
|
|
@@ -9652,7 +9428,7 @@ function Listview(_ref) {
|
|
|
9652
9428
|
}, {
|
|
9653
9429
|
id: 'actions',
|
|
9654
9430
|
label: 'Actions',
|
|
9655
|
-
width: '
|
|
9431
|
+
width: '10%',
|
|
9656
9432
|
cell: function cell(row) {
|
|
9657
9433
|
return row.code !== UNASSIGNED_USERS && /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9658
9434
|
display: "flex"
|
|
@@ -9685,7 +9461,7 @@ function Listview(_ref) {
|
|
|
9685
9461
|
hasFilter: true,
|
|
9686
9462
|
isCheckboxTable: false,
|
|
9687
9463
|
count: data.count,
|
|
9688
|
-
columns:
|
|
9464
|
+
columns: columns,
|
|
9689
9465
|
rows: data.results,
|
|
9690
9466
|
page: page,
|
|
9691
9467
|
handleChangePage: handleChangePage,
|
|
@@ -9742,44 +9518,15 @@ function EditPanelDialog(_ref) {
|
|
|
9742
9518
|
var isOpen = _ref.isOpen,
|
|
9743
9519
|
closeHandler = _ref.closeHandler,
|
|
9744
9520
|
onValueChange = _ref.onValueChange,
|
|
9745
|
-
|
|
9521
|
+
submitHandler = _ref.submitHandler,
|
|
9746
9522
|
isError = _ref.isError,
|
|
9747
9523
|
name = _ref.name,
|
|
9748
9524
|
isDisabledSubmitBtn = _ref.isDisabledSubmitBtn,
|
|
9749
|
-
validation = _ref.validation
|
|
9750
|
-
rowData = _ref.rowData,
|
|
9751
|
-
tableName = _ref.tableName,
|
|
9752
|
-
config = _ref.config;
|
|
9525
|
+
validation = _ref.validation;
|
|
9753
9526
|
var _useSelector = reactRedux.useSelector(function (state) {
|
|
9754
9527
|
return state.userPanel;
|
|
9755
9528
|
}),
|
|
9756
9529
|
dialogData = _useSelector.dialogData;
|
|
9757
|
-
var deptHeadDetails = function deptHeadDetails(data) {
|
|
9758
|
-
var _data$dept_head_detai;
|
|
9759
|
-
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) {
|
|
9760
|
-
setHead({
|
|
9761
|
-
value: data.dept_head_details[0].id,
|
|
9762
|
-
label: data.dept_head_details[0].first_name + ' ' + data.dept_head_details[0].last_name
|
|
9763
|
-
});
|
|
9764
|
-
}
|
|
9765
|
-
};
|
|
9766
|
-
var _useState = React.useState({
|
|
9767
|
-
value: '',
|
|
9768
|
-
label: 'Select'
|
|
9769
|
-
}),
|
|
9770
|
-
head = _useState[0],
|
|
9771
|
-
setHead = _useState[1];
|
|
9772
|
-
React.useEffect(function () {
|
|
9773
|
-
deptHeadDetails(rowData);
|
|
9774
|
-
}, [rowData]);
|
|
9775
|
-
var history = reactRouterDom.useHistory();
|
|
9776
|
-
var handleAddPageNavigation = function handleAddPageNavigation() {
|
|
9777
|
-
console.log(rowData);
|
|
9778
|
-
history.push({
|
|
9779
|
-
pathname: config.routes.users.add.path,
|
|
9780
|
-
state: rowData
|
|
9781
|
-
});
|
|
9782
|
-
};
|
|
9783
9530
|
return /*#__PURE__*/React__default.createElement(iuistyles.IUIModal, {
|
|
9784
9531
|
isDisabledSubmitBtn: isDisabledSubmitBtn,
|
|
9785
9532
|
isOpen: isOpen,
|
|
@@ -9787,59 +9534,25 @@ function EditPanelDialog(_ref) {
|
|
|
9787
9534
|
headerText: "Edit " + name.toLowerCase(),
|
|
9788
9535
|
cancelLabel: (_dialogData$labels = dialogData.labels) === null || _dialogData$labels === void 0 ? void 0 : _dialogData$labels.cancelLabel,
|
|
9789
9536
|
submitLabel: (_dialogData$labels2 = dialogData.labels) === null || _dialogData$labels2 === void 0 ? void 0 : _dialogData$labels2.submitLabel,
|
|
9790
|
-
submitHandler:
|
|
9791
|
-
|
|
9792
|
-
},
|
|
9793
|
-
width: tableName === 'department' ? '400px' : '365px',
|
|
9537
|
+
submitHandler: submitHandler,
|
|
9538
|
+
width: "365px",
|
|
9794
9539
|
hideCloseIcon: false,
|
|
9795
9540
|
modalBodyStyle: {
|
|
9796
|
-
|
|
9541
|
+
maxHeight: '400px',
|
|
9542
|
+
overflow: 'auto',
|
|
9543
|
+
margin: '0px'
|
|
9797
9544
|
},
|
|
9798
9545
|
footerStyle: {
|
|
9799
9546
|
justifyContent: 'end'
|
|
9800
9547
|
}
|
|
9801
|
-
}, tableName === 'department' && rowData.no_of_users === 0 && /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9802
|
-
display: "flex",
|
|
9803
|
-
justifyContent: "center",
|
|
9804
|
-
alignItems: "center",
|
|
9805
|
-
flexDirection: "column",
|
|
9806
|
-
style: {
|
|
9807
|
-
marginBottom: '30px'
|
|
9808
|
-
}
|
|
9809
9548
|
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9549
|
+
component: "div",
|
|
9810
9550
|
display: "flex",
|
|
9811
9551
|
justifyContent: "center",
|
|
9812
9552
|
alignItems: "center",
|
|
9813
9553
|
flexDirection: "column",
|
|
9814
|
-
|
|
9815
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.
|
|
9816
|
-
className: styles$7.alertDescContainer
|
|
9817
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9818
|
-
className: styles$7.iconLayout,
|
|
9819
|
-
style: {
|
|
9820
|
-
paddingTop: '4px'
|
|
9821
|
-
}
|
|
9822
|
-
}, /*#__PURE__*/React__default.createElement(BoldInfoIcon, {
|
|
9823
|
-
color: "#CA8A04",
|
|
9824
|
-
width: "25",
|
|
9825
|
-
height: "20",
|
|
9826
|
-
className: styles$7.iconStyle
|
|
9827
|
-
})), /*#__PURE__*/React__default.createElement(iuistyles.IUILabel, {
|
|
9828
|
-
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.",
|
|
9829
|
-
style: {
|
|
9830
|
-
fontWeight: 'normal'
|
|
9831
|
-
}
|
|
9832
|
-
})), /*#__PURE__*/React__default.createElement(iuistyles.IUIButton, {
|
|
9833
|
-
buttonText: "Add user",
|
|
9834
|
-
type: "text",
|
|
9835
|
-
startIcon: /*#__PURE__*/React__default.createElement(AddIcon, {
|
|
9836
|
-
width: "9",
|
|
9837
|
-
height: "9",
|
|
9838
|
-
color: "#EC5D25"
|
|
9839
|
-
}),
|
|
9840
|
-
onClick: handleAddPageNavigation,
|
|
9841
|
-
className: styles$7.addUserButton
|
|
9842
|
-
}))), /*#__PURE__*/React__default.createElement(iuistyles.IUIInput, {
|
|
9554
|
+
padding: "8px 24px"
|
|
9555
|
+
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIInput, {
|
|
9843
9556
|
label: name + " name",
|
|
9844
9557
|
name: "name",
|
|
9845
9558
|
defaultValue: dialogData.data.name,
|
|
@@ -9848,49 +9561,7 @@ function EditPanelDialog(_ref) {
|
|
|
9848
9561
|
isError: isError,
|
|
9849
9562
|
validation: validation,
|
|
9850
9563
|
errorMsg: "Please enter " + name.toLowerCase() + " name.",
|
|
9851
|
-
required: true
|
|
9852
|
-
style: tableName === 'department' && {
|
|
9853
|
-
width: '350px'
|
|
9854
|
-
}
|
|
9855
|
-
}), tableName === 'department' && rowData.no_of_users === 0 && /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9856
|
-
className: "iui__mt-15",
|
|
9857
|
-
style: {
|
|
9858
|
-
width: '100%'
|
|
9859
|
-
}
|
|
9860
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIInput, {
|
|
9861
|
-
label: "Department head",
|
|
9862
|
-
name: "name",
|
|
9863
|
-
defaultValue: head.label,
|
|
9864
|
-
placeholder: "",
|
|
9865
|
-
readOnly: true,
|
|
9866
|
-
style: {
|
|
9867
|
-
width: '350px'
|
|
9868
|
-
}
|
|
9869
|
-
})), tableName === 'department' && rowData.no_of_users > 0 && /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9870
|
-
className: "iui__mt-15",
|
|
9871
|
-
style: {
|
|
9872
|
-
width: '100%'
|
|
9873
|
-
}
|
|
9874
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIAsyncSelect, {
|
|
9875
|
-
noResultsText: true,
|
|
9876
|
-
isMove: true,
|
|
9877
|
-
additional: {
|
|
9878
|
-
page: 1,
|
|
9879
|
-
departmentId: rowData.id
|
|
9880
|
-
},
|
|
9881
|
-
placeHolderCheck: head !== undefined && head.value === '',
|
|
9882
|
-
label: "Department head",
|
|
9883
|
-
value: head,
|
|
9884
|
-
onValueChange: function onValueChange(_ref2) {
|
|
9885
|
-
var _value = _ref2._value;
|
|
9886
|
-
return setHead(_value);
|
|
9887
|
-
},
|
|
9888
|
-
loadOption: departmentHeadOptions,
|
|
9889
|
-
disableText: "Please get in touch with your administrator to change this value.",
|
|
9890
|
-
customLoadingText: "No users found in this department",
|
|
9891
|
-
customLoadingTextStyle: {
|
|
9892
|
-
color: '#374151'
|
|
9893
|
-
}
|
|
9564
|
+
required: true
|
|
9894
9565
|
})));
|
|
9895
9566
|
}
|
|
9896
9567
|
|
|
@@ -10069,15 +9740,12 @@ var UserPanel = function UserPanel(_ref) {
|
|
|
10069
9740
|
var _useState13 = React.useState(false),
|
|
10070
9741
|
isSortingChangeTemp = _useState13[0],
|
|
10071
9742
|
setSortingChangeTemp = _useState13[1];
|
|
10072
|
-
var _useState14 = React.useState(
|
|
10073
|
-
|
|
10074
|
-
|
|
10075
|
-
var _useState15 = React.useState(
|
|
10076
|
-
|
|
10077
|
-
|
|
10078
|
-
var _useState16 = React.useState(5),
|
|
10079
|
-
rowsPerPage = _useState16[0],
|
|
10080
|
-
setRowsPerPage = _useState16[1];
|
|
9743
|
+
var _useState14 = React.useState(1),
|
|
9744
|
+
page = _useState14[0],
|
|
9745
|
+
setPage = _useState14[1];
|
|
9746
|
+
var _useState15 = React.useState(5),
|
|
9747
|
+
rowsPerPage = _useState15[0],
|
|
9748
|
+
setRowsPerPage = _useState15[1];
|
|
10081
9749
|
var orderingParam = orderBy;
|
|
10082
9750
|
var _useSelector = reactRedux.useSelector(function (state) {
|
|
10083
9751
|
return state.userPanel;
|
|
@@ -10173,7 +9841,6 @@ var UserPanel = function UserPanel(_ref) {
|
|
|
10173
9841
|
submitLabel: 'Save'
|
|
10174
9842
|
}, '', data));
|
|
10175
9843
|
setDataList(data.name);
|
|
10176
|
-
setRowData(data);
|
|
10177
9844
|
setEditModal(true);
|
|
10178
9845
|
};
|
|
10179
9846
|
var closeEditDialog = function closeEditDialog() {
|
|
@@ -10188,12 +9855,6 @@ var UserPanel = function UserPanel(_ref) {
|
|
|
10188
9855
|
var payload = {
|
|
10189
9856
|
names: [dataList]
|
|
10190
9857
|
};
|
|
10191
|
-
if (tableName === 'department') {
|
|
10192
|
-
payload = {
|
|
10193
|
-
name: dataList,
|
|
10194
|
-
department_head_id: null
|
|
10195
|
-
};
|
|
10196
|
-
}
|
|
10197
9858
|
var message = title + " added successfully.";
|
|
10198
9859
|
handleApiCall(addRecord, payload, message, 'add');
|
|
10199
9860
|
} else {
|
|
@@ -10207,12 +9868,9 @@ var UserPanel = function UserPanel(_ref) {
|
|
|
10207
9868
|
var message = title + " deleted successfully.";
|
|
10208
9869
|
handleApiCall(deleteRecord, payload, message, 'delete');
|
|
10209
9870
|
};
|
|
10210
|
-
var handleApiCall = function handleApiCall(dispatchFun, payload, message, type
|
|
10211
|
-
if (optionalParams === void 0) {
|
|
10212
|
-
optionalParams = null;
|
|
10213
|
-
}
|
|
9871
|
+
var handleApiCall = function handleApiCall(dispatchFun, payload, message, type) {
|
|
10214
9872
|
dispatch(userPanelShowLoader());
|
|
10215
|
-
dispatch(dispatchFun(tableName, payload, getApiData()
|
|
9873
|
+
dispatch(dispatchFun(tableName, payload, getApiData())).then(function (res) {
|
|
10216
9874
|
IUIToastMessageService$8.sNotify(type === 'move' ? res.data.message : "" + message);
|
|
10217
9875
|
dispatch(userPanelStopLoader());
|
|
10218
9876
|
if (type === 'delete') {
|
|
@@ -10254,14 +9912,8 @@ var UserPanel = function UserPanel(_ref) {
|
|
|
10254
9912
|
name: dataList
|
|
10255
9913
|
}]
|
|
10256
9914
|
};
|
|
10257
|
-
if (tableName === 'department') {
|
|
10258
|
-
payload = {
|
|
10259
|
-
name: dataList,
|
|
10260
|
-
department_head_id: data.value === '' || rowData.is_default_dept_head && rowData.dept_head === data.value ? null : data.value
|
|
10261
|
-
};
|
|
10262
|
-
}
|
|
10263
9915
|
var message = title + " updated successfully.";
|
|
10264
|
-
handleApiCall(editRecord, payload, message, 'edit'
|
|
9916
|
+
handleApiCall(editRecord, payload, message, 'edit');
|
|
10265
9917
|
setErrorEdit(false);
|
|
10266
9918
|
} else {
|
|
10267
9919
|
setErrorEdit(true);
|
|
@@ -10368,10 +10020,7 @@ var UserPanel = function UserPanel(_ref) {
|
|
|
10368
10020
|
submitHandler: handleEditPanel,
|
|
10369
10021
|
isError: errorEdit,
|
|
10370
10022
|
isDisabledSubmitBtn: loading,
|
|
10371
|
-
validation: validation
|
|
10372
|
-
rowData: rowData,
|
|
10373
|
-
tableName: tableName,
|
|
10374
|
-
config: config
|
|
10023
|
+
validation: validation
|
|
10375
10024
|
})) : /*#__PURE__*/React__default.createElement(VerificationError, {
|
|
10376
10025
|
config: config
|
|
10377
10026
|
}));
|