From 31a5771546cffe3d2d973ae25f05fa951dd66fa5 Mon Sep 17 00:00:00 2001 From: Raphael Odini Date: Mon, 21 Oct 2024 13:01:36 +0200 Subject: [PATCH] refactor(Proof add): rename ProofDateCurrencyInputRow to ProofMetadataInputRow --- src/components/ProofEditDialog.vue | 4 ++-- src/components/ProofInputRow.vue | 8 ++++---- ...eCurrencyInputRow.vue => ProofMetadataInputRow.vue} | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) rename src/components/{ProofDateCurrencyInputRow.vue => ProofMetadataInputRow.vue} (82%) diff --git a/src/components/ProofEditDialog.vue b/src/components/ProofEditDialog.vue index dfbfc2db0b6..a74e082b9fc 100644 --- a/src/components/ProofEditDialog.vue +++ b/src/components/ProofEditDialog.vue @@ -15,7 +15,7 @@ - + @@ -43,7 +43,7 @@ export default { components: { ProofCard: defineAsyncComponent(() => import('../components/ProofCard.vue')), ProofTypeInputRow: defineAsyncComponent(() => import('../components/ProofTypeInputRow.vue')), - ProofDateCurrencyInputRow: defineAsyncComponent(() => import('../components/ProofDateCurrencyInputRow.vue')), + ProofMetadataInputRow: defineAsyncComponent(() => import('../components/ProofMetadataInputRow.vue')), }, props: { proof: { diff --git a/src/components/ProofInputRow.vue b/src/components/ProofInputRow.vue index 14a7aecada1..baef24a5389 100644 --- a/src/components/ProofInputRow.vue +++ b/src/components/ProofInputRow.vue @@ -5,7 +5,7 @@ - + @@ -62,7 +62,7 @@ export default { components: { ProofTypeInputRow: defineAsyncComponent(() => import('../components/ProofTypeInputRow.vue')), ProofImageInputRow: defineAsyncComponent(() => import('../components/ProofImageInputRow.vue')), - ProofDateCurrencyInputRow: defineAsyncComponent(() => import('../components/ProofDateCurrencyInputRow.vue')), + ProofMetadataInputRow: defineAsyncComponent(() => import('../components/ProofMetadataInputRow.vue')), ProofCard: defineAsyncComponent(() => import('../components/ProofCard.vue')), LocationInputRow: defineAsyncComponent(() => import('../components/LocationInputRow.vue')), }, @@ -95,12 +95,12 @@ export default { proofImageFormFilled() { return !!this.proofImage }, - proofDateCurrencyFormFilled() { + proofMetadataFormFilled() { let keys = ['date', 'currency'] return Object.keys(this.proofForm).filter(k => keys.includes(k)).every(k => !!this.proofForm[k]) }, proofFormFilled() { - return this.proofTypeFormFilled && this.proofImageFormFilled && this.proofDateCurrencyFormFilled + return this.proofTypeFormFilled && this.proofImageFormFilled && this.proofMetadataFormFilled }, }, watch: { diff --git a/src/components/ProofDateCurrencyInputRow.vue b/src/components/ProofMetadataInputRow.vue similarity index 82% rename from src/components/ProofDateCurrencyInputRow.vue rename to src/components/ProofMetadataInputRow.vue index d8d439deb2e..3921324166a 100644 --- a/src/components/ProofDateCurrencyInputRow.vue +++ b/src/components/ProofMetadataInputRow.vue @@ -5,7 +5,7 @@ {{ $t('Common.Date') }} ({ date: this.currentDate, currency: null }) }, @@ -51,9 +51,9 @@ export default { }, computed: { ...mapStores(useAppStore), - proofDateCurrencyFormFilled() { + proofMetadataFormFilled() { let keys = ['date', 'currency'] - return Object.keys(this.proofDateCurrencyForm).filter(k => keys.includes(k)).every(k => !!this.proofDateCurrencyForm[k]) + return Object.keys(this.proofMetadataForm).filter(k => keys.includes(k)).every(k => !!this.proofMetadataForm[k]) }, userFavoriteCurrencies() { return this.appStore.getUserFavoriteCurrencies