Skip to content

Commit

Permalink
Merge pull request #305 from letehaha/fix/refunds-linking
Browse files Browse the repository at this point in the history
fix: Refunds linking
  • Loading branch information
letehaha committed Sep 11, 2024
2 parents e8195d0 + 5aa6607 commit 33c404f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ const emit = defineEmits<{
}>();
const emptyField = () => {
emit("update:refunds", props.isThereOriginalRefunds ? null : undefined);
emit("update:refundedBy", props.isThereOriginalRefunds ? null : undefined);
emit("update:refunds", props.isThereOriginalRefunds && props.refunds ? null : undefined);
emit("update:refundedBy", props.isThereOriginalRefunds && props.refundedBy ? null : undefined);
};
const refundTransactions = computed(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,15 @@ export const prepareTxUpdationParams = ({
editionParams.refundedByTxIds = form.refundedByTxs
? form.refundedByTxs.map((i) => i.id)
: null;
} else if (form.refundsTx === null && form.refundedByTxs === undefined) {
editionParams.refundsTxId = null;
} else if (form.refundedByTxs === null && form.refundsTx === undefined) {
editionParams.refundedByTxIds = null;
} else {
editionParams.refundsTxId = form.refundsTx ? form.refundsTx.id : null;
editionParams.refundsTxId = form.refundsTx ? form.refundsTx.id : undefined;
editionParams.refundedByTxIds = form.refundedByTxs
? form.refundedByTxs.map((i) => i.id)
: null;
: undefined;
}
}

Expand Down

0 comments on commit 33c404f

Please sign in to comment.