Compare commits
2 Commits
e9114b8dc3
...
fc9af4faf8
| Author | SHA1 | Date |
|---|---|---|
|
|
fc9af4faf8 | |
|
|
1e9595a4ff |
|
|
@ -233,15 +233,28 @@ const StepTwoComponent = (props) => {
|
||||||
await getTypeGroup(data.details)
|
await getTypeGroup(data.details)
|
||||||
setSpecialList(data.details || []);
|
setSpecialList(data.details || []);
|
||||||
} else {
|
} else {
|
||||||
await getTypeGroup(specialList)
|
const { data } = await props["qualificationMaintenanceInfo"]({ id: props.formValues.qualificationsId });
|
||||||
for (let i = 0; i < specialList.length; i++) {
|
const newSpecialList = data.details.map(item => {
|
||||||
specialList[i].files = await getFile({
|
const existsItem = specialList.find(specialItem => specialItem.qualificationsDetailId === item.id);
|
||||||
|
if (existsItem) {
|
||||||
|
return { ...item, ...existsItem };
|
||||||
|
}
|
||||||
|
return item;
|
||||||
|
})
|
||||||
|
|
||||||
|
await getTypeGroup(newSpecialList)
|
||||||
|
for (let i = 0; i < newSpecialList.length; i++) {
|
||||||
|
if (newSpecialList[i].applyDetailId) {
|
||||||
|
newSpecialList[i].files = await getFile({
|
||||||
eqType: UPLOAD_FILE_TYPE_ENUM["148"],
|
eqType: UPLOAD_FILE_TYPE_ENUM["148"],
|
||||||
eqForeignKey: specialList[i].applyDetailId
|
eqForeignKey: newSpecialList[i].applyDetailId
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setSpecialList(newSpecialList);
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const getTypeGroup = async (details) => {
|
const getTypeGroup = async (details) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue