Skip to content

Commit

Permalink
PR changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Oliveira committed Feb 26, 2024
1 parent c7f0109 commit 6b92ac6
Showing 1 changed file with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -497,18 +497,20 @@ export class ObsAdapterHelper {
const payload = this.getObsNodePayload(child);
if (payload.length > 0) {
isGroupChanged = true;
if (payload[0].uuid) {
if (payload[0].voided) {
childrenPayload.find(
(obs) => obs.uuid == payload[0].uuid
).voided = true;
payload.forEach(obs => {
if (obs.uuid) {
if (obs.voided) {
childrenPayload.find(
(obs) => obs.uuid == obs.uuid
).voided = true;
} else {
childrenPayload.find((obs) => obs.uuid == obs.uuid).value =
obs.value;
}
} else {
childrenPayload.find((obs) => obs.uuid == payload[0].uuid).value =
payload[0].value;
childrenPayload = childrenPayload.concat(payload);
}
} else {
childrenPayload = childrenPayload.concat(payload);
}
});
}
});

Expand Down Expand Up @@ -576,7 +578,7 @@ export class ObsAdapterHelper {
formFieldPath: oldObs.formFieldPath
};
}

getObsNodePayload(node: NodeBase): Array<any> {
let payload = [];
switch (this.getObsNodeType(node)) {
Expand Down

0 comments on commit 6b92ac6

Please sign in to comment.