From 0dd6a274448c512f90d62945f21297df8420f6b7 Mon Sep 17 00:00:00 2001 From: Svetoslav Borislavov Date: Wed, 26 Jun 2024 11:54:34 +0300 Subject: [PATCH 1/3] feat: added confirm delete account modal Signed-off-by: Svetoslav Borislavov --- .../components/Account/DeleteAccount.vue | 49 ++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/front-end/src/renderer/pages/CreateTransaction/components/Account/DeleteAccount.vue b/front-end/src/renderer/pages/CreateTransaction/components/Account/DeleteAccount.vue index 2ea49259f..9cc0d732d 100644 --- a/front-end/src/renderer/pages/CreateTransaction/components/Account/DeleteAccount.vue +++ b/front-end/src/renderer/pages/CreateTransaction/components/Account/DeleteAccount.vue @@ -25,6 +25,8 @@ import { isUserLoggedIn, isLoggedInOrganization } from '@renderer/utils/userStor import AppButton from '@renderer/components/ui/AppButton.vue'; import AppInput from '@renderer/components/ui/AppInput.vue'; +import AppModal from '@renderer/components/ui/AppModal.vue'; +import AppCustomIcon from '@renderer/components/ui/AppCustomIcon.vue'; import KeyStructureModal from '@renderer/components/KeyStructureModal.vue'; import TransactionProcessor from '@renderer/components/Transaction/TransactionProcessor.vue'; import TransactionHeaderControls from '@renderer/components/Transaction/TransactionHeaderControls.vue'; @@ -57,6 +59,7 @@ const approvers = ref([]); const selectedKey = ref(); const isKeyStructureModalShown = ref(false); +const isConfirmModalShown = ref(false); const isExecuted = ref(false); const isSubmitted = ref(false); @@ -79,9 +82,17 @@ const transactionKey = computed(() => { }); /* Handlers */ +const handleFormSubmit = e => { + e.preventDefault(); + + isConfirmModalShown.value = true; +}; + const handleCreate = async e => { e.preventDefault(); + isConfirmModalShown.value = false; + try { if (!isAccountId(payerData.accountId.value) || !payerData.key.value) { throw Error('Invalid Payer ID'); @@ -197,7 +208,7 @@ const columnClass = 'col-4 col-xxxl-3';