Skip to content

Commit

Permalink
changing org form feedback when submitting
Browse files Browse the repository at this point in the history
  • Loading branch information
Zio-4 committed May 30, 2024
1 parent 853f1c7 commit 9aa8a51
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/CreateOrgs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@
<div class="grid">
<div class="col-12">
<PvButton
:label="`Create ${orgTypeLabel}`"
:disabled="orgTypeLabel === 'Org'"
:label="submitted ? `Creating ${orgTypeLabel}` : `Create ${orgTypeLabel}`"
:disabled="orgTypeLabel === 'Org' || v$.$invalid || submitted"
:icon="submitted ? 'pi pi-spin pi-spinner' : ''"
data-cy="button-create-org"
@click="submit"
/>
Expand Down Expand Up @@ -427,6 +428,7 @@ const submit = async () => {
.catch((error) => {
toast.add({ severity: 'error', summary: 'Error', detail: error.message, life: 3000 });
console.error('Error creating org:', error);
submitted.value = false;
});
} else {
await roarfirekit.value
Expand All @@ -439,6 +441,7 @@ const submit = async () => {
.catch((error) => {
toast.add({ severity: 'error', summary: 'Error', detail: error.message, life: 3000 });
console.error('Error creating org:', error);
submitted.value = false;
});
}
} else {
Expand Down

0 comments on commit 9aa8a51

Please sign in to comment.