@itilite/iui-user-management 1.3.6 → 1.3.8

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 CHANGED
@@ -920,6 +920,10 @@ p._3pOsV {
920
920
  background-color: #e11d48 !important;
921
921
  }
922
922
 
923
+ ._xWE7K header {
924
+ box-shadow: none;
925
+ background: transparent;
926
+ }
923
927
  ._xWE7K ._13pXn {
924
928
  display: inline;
925
929
  padding: 2px 4px;
package/dist/index.js CHANGED
@@ -1118,6 +1118,24 @@ var formatUpdateUserPayload = function formatUpdateUserPayload(payload, inputCha
1118
1118
  });
1119
1119
  }
1120
1120
  }
1121
+ if (payload.uploadedFiles && payload.uploadedFiles.length > 0) {
1122
+ res.fields.files = payload.uploadedFiles.filter(function (_file) {
1123
+ return !_file.isExistingFile;
1124
+ }).map(function (_file) {
1125
+ return {
1126
+ file_type: _file.file_type,
1127
+ file_path: _file.file_path,
1128
+ user_file_name: _file.user_file_name,
1129
+ upload: _file.upload
1130
+ };
1131
+ });
1132
+ }
1133
+ if (payload.filesForDelete.length > 0) {
1134
+ res.fields.filesToDelete = payload.filesForDelete;
1135
+ }
1136
+ if (payload.profilePicDelete.length > 0) {
1137
+ res.fields.profilePicDelete = payload.profilePicDelete;
1138
+ }
1121
1139
  }
1122
1140
  return res;
1123
1141
  };
@@ -5812,6 +5830,24 @@ var UserAddEdit = function UserAddEdit(props) {
5812
5830
  return _extends({}, prevState, expenseApprovers);
5813
5831
  });
5814
5832
  }
5833
+ var _uploadedDocs2 = [];
5834
+ res.files.forEach(function (_file) {
5835
+ _uploadedDocs2.push({
5836
+ user_file_name: _file.user_file_name,
5837
+ id: _file.id,
5838
+ isExistingFile: true,
5839
+ file_type: _file.file_type
5840
+ });
5841
+ });
5842
+ if (res && res.profile_pic) {
5843
+ _uploadedDocs2.push({
5844
+ user_file_name: res.profile_pic.user_file_name,
5845
+ id: res.profile_pic.id,
5846
+ isExistingFile: true,
5847
+ file_type: res.profile_pic.file_type
5848
+ });
5849
+ }
5850
+ setUploadedFiles(_uploadedDocs2);
5815
5851
  }
5816
5852
  })["catch"](function () {})["finally"](function () {
5817
5853
  dispatch(stopLoader());
@@ -6389,9 +6425,6 @@ var UserAddEdit = function UserAddEdit(props) {
6389
6425
  if (!p.visibility) {
6390
6426
  return null;
6391
6427
  }
6392
- if (p.name === 'profile_pic' && config.env.isExpenseProduct) {
6393
- return null;
6394
- }
6395
6428
  return /*#__PURE__*/React__default.createElement(iuistyles.IUIGrid, {
6396
6429
  item: true,
6397
6430
  sm: 12,
@@ -8915,28 +8948,31 @@ var UserList = function UserList(_ref2) {
8915
8948
  var _SelectedUsersNotApprover = [].concat(selectedUsersNotApprover);
8916
8949
  var _SelectedUsersApprover = [].concat(selectedUsersApprover);
8917
8950
  var _selected = Object.values(selected).flat();
8918
- var uniqueArray1 = [].concat(new Set(_SelectedUsersNotApprover.map(function (item) {
8919
- return item.id;
8920
- }))).map(function (id) {
8921
- return _SelectedUsersNotApprover.find(function (a) {
8922
- return a.id === id;
8923
- });
8924
- });
8925
- var uniqueArray2 = [].concat(new Set(_SelectedUsersApprover.map(function (item) {
8926
- return item.id;
8927
- }))).map(function (id) {
8928
- return _SelectedUsersApprover.find(function (a) {
8929
- return a.id === id;
8930
- });
8931
- });
8932
- _SelectedUsersNotApprover = uniqueArray1.filter(function (item) {
8933
- return _selected.includes(item.id.toString());
8951
+ var temp1 = {};
8952
+ var temp2 = {};
8953
+ var tempArray1 = [];
8954
+ var tempArray2 = [];
8955
+ _SelectedUsersNotApprover.map(function (item) {
8956
+ if (temp1[item.id] !== item) {
8957
+ temp1[item.id] = item;
8958
+ }
8934
8959
  });
8935
- _SelectedUsersApprover = uniqueArray2.filter(function (item) {
8936
- return _selected.includes(item.id.toString());
8960
+ _SelectedUsersApprover.map(function (item) {
8961
+ if (temp2[item.id] !== item) {
8962
+ temp2[item.id] = item;
8963
+ }
8937
8964
  });
8938
- setSelectedUsersNotApprover(_SelectedUsersNotApprover);
8939
- setSelectedUsersApprover(_SelectedUsersApprover);
8965
+ for (var i = 0; i < _selected.length; i++) {
8966
+ if (temp1[_selected[i]] != undefined) {
8967
+ if (_selected[i] == temp1[_selected[i]].id) {
8968
+ tempArray1.push(temp1[_selected[i]]);
8969
+ }
8970
+ } else if (temp2[_selected[i]].id != undefined) {
8971
+ if (_selected[i] == temp2[_selected[i]].id) tempArray2.push(temp2[_selected[i]]);
8972
+ }
8973
+ }
8974
+ setSelectedUsersNotApprover(tempArray1);
8975
+ setSelectedUsersApprover(tempArray2);
8940
8976
  setIsBulkDeactivateModalOpen(true);
8941
8977
  } else {
8942
8978
  setOpenDeActivateModalFlag(true);
@@ -9694,7 +9730,10 @@ var UserList = function UserList(_ref2) {
9694
9730
  }));
9695
9731
  })), selectedUsersNotApprover !== null && selectedUsersNotApprover !== void 0 && selectedUsersNotApprover.length ? /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, null, /*#__PURE__*/React__default.createElement("hr", {
9696
9732
  style: {
9697
- borderColor: '#E5E9ED'
9733
+ borderColor: '#E5E9ED',
9734
+ borderLeft: 'none',
9735
+ borderTop: 'none',
9736
+ borderRight: 'none'
9698
9737
  }
9699
9738
  }), /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
9700
9739
  className: "iui__my-15"