upodated rep file upload
This commit is contained in:
@@ -141,14 +141,15 @@ const RepCompleteSubmit = (props) => {
|
||||
|
||||
let buildAppealFilesArray = [];
|
||||
|
||||
let filesUploadObj =
|
||||
formObj.representationForm.values.representationDocuments;
|
||||
let filesUploadObj = props.currentView.fileList;
|
||||
|
||||
// formObj.representationForm.values.representationDocuments;
|
||||
|
||||
for (let key in filesUploadObj) {
|
||||
typeof filesUploadObj[key].name != "undefined" &&
|
||||
buildAppealFilesArray.push({
|
||||
"name": filesUploadObj[key].name,
|
||||
"size": filesUploadObj[key].size,
|
||||
"size": filesUploadObj[key].contentLength,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -163,8 +164,6 @@ const RepCompleteSubmit = (props) => {
|
||||
// ? formObj.representationForm.values.filesList
|
||||
// : [];
|
||||
|
||||
console.log(buildAppealFilesArray);
|
||||
|
||||
let arrUniq = [
|
||||
...new Map(buildAppealFilesArray.map((v) => [v.name, v])).values(),
|
||||
];
|
||||
@@ -177,9 +176,7 @@ const RepCompleteSubmit = (props) => {
|
||||
// (obj1, i, arr) => arr.findIndex((obj2) => obj2.name === obj1.name) === i
|
||||
// );
|
||||
|
||||
console.log(arrUniq, buildAppealFilesArray);
|
||||
|
||||
arrUniq = arrUniq.concat(filesUploadObj);
|
||||
//arrUniq = arrUniq.concat(filesUploadObj);
|
||||
|
||||
function removeNullObjects(arr) {
|
||||
if (arr.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user