prevent billable rate change modals from immediately sumbitting when pressing enter on the previous form

This commit is contained in:
Gregor Vostrak
2025-04-23 14:24:36 +02:00
parent c17c5dc6c0
commit 89131b9e77
3 changed files with 12 additions and 3 deletions

View File

@@ -33,7 +33,10 @@ async function submit() {
props.projectMember.billable_rate !==
projectMemberBody.value.billable_rate
) {
showBillableRateModal.value = true;
// make sure that the alert modal is not immediately submitted when user presses enter
setTimeout(() => {
showBillableRateModal.value = true;
}, 0);
return;
}
await updateProjectMember(props.projectMember.id, projectMemberBody.value);