@itilite/iui-user-management 0.4.218 → 0.4.220
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +36 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +36 -3
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
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,
|