diff --git a/web-app/src/api/account.ts b/web-app/src/api/account.ts index aa83918..1b25b13 100644 --- a/web-app/src/api/account.ts +++ b/web-app/src/api/account.ts @@ -9,6 +9,7 @@ export interface AccountType { id: string name: string debitsPositive: boolean + emoji: string } export abstract class AccountTypes { @@ -16,21 +17,25 @@ export abstract class AccountTypes { id: 'CHECKING', name: 'Checking', debitsPositive: true, + emoji: '💵', } public static readonly SAVINGS: AccountType = { id: 'SAVINGS', name: 'Savings', debitsPositive: true, + emoji: '💰', } public static readonly CREDIT_CARD: AccountType = { id: 'CREDIT_CARD', name: 'Credit Card', debitsPositive: false, + emoji: '💳', } public static readonly BROKERAGE: AccountType = { id: 'BROKERAGE', name: 'Brokerage', debitsPositive: true, + emoji: '📈', } public static of(id: string): AccountType { diff --git a/web-app/src/components/AccountCard.vue b/web-app/src/components/AccountCard.vue index 2b3334a..c8a21d1 100644 --- a/web-app/src/components/AccountCard.vue +++ b/web-app/src/components/AccountCard.vue @@ -34,28 +34,18 @@ function goToAccount() { } diff --git a/web-app/src/pages/AccountPage.vue b/web-app/src/pages/AccountPage.vue index fe45f7f..b70ad1e 100644 --- a/web-app/src/pages/AccountPage.vue +++ b/web-app/src/pages/AccountPage.vue @@ -1,15 +1,16 @@ diff --git a/web-app/src/pages/forms/EditAccountPage.vue b/web-app/src/pages/forms/EditAccountPage.vue index 457a820..a9e189f 100644 --- a/web-app/src/pages/forms/EditAccountPage.vue +++ b/web-app/src/pages/forms/EditAccountPage.vue @@ -67,27 +67,24 @@ async function doSubmit() { loading.value = false } } + +function onCancel() { + if (editing.value) { + router.replace(`/profiles/${getSelectedProfile(route)}/accounts/${existingAccount.value?.id}`) + } else { + router.replace(`/profiles/${getSelectedProfile(route)}`) + } +}