From 5dc5d67e0471da2ca37a30059635f3e6ccfe9e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Odini?= Date: Mon, 24 Jun 2024 18:32:03 +0200 Subject: [PATCH] refactor(proof edit): allow editing proof currency. additional cleanup (#659) --- src/components/ProofDateCurrencyInputRow.vue | 63 ++++++++++++++++++++ src/components/ProofEditDialog.vue | 22 +++---- src/components/ProofFooter.vue | 2 +- src/components/ProofInputRow.vue | 38 +----------- 4 files changed, 74 insertions(+), 51 deletions(-) create mode 100644 src/components/ProofDateCurrencyInputRow.vue diff --git a/src/components/ProofDateCurrencyInputRow.vue b/src/components/ProofDateCurrencyInputRow.vue new file mode 100644 index 00000000000..d8d439deb2e --- /dev/null +++ b/src/components/ProofDateCurrencyInputRow.vue @@ -0,0 +1,63 @@ + + + diff --git a/src/components/ProofEditDialog.vue b/src/components/ProofEditDialog.vue index ec0dccd38f6..062b3cfbfbc 100644 --- a/src/components/ProofEditDialog.vue +++ b/src/components/ProofEditDialog.vue @@ -14,18 +14,7 @@ -

- {{ $t('Common.Date') }} -

- - - - - +
@@ -33,6 +22,7 @@ @@ -49,7 +39,8 @@ import api from '../services/api' export default { components: { - ProofCard: defineAsyncComponent(() => import('../components/ProofCard.vue')) + ProofCard: defineAsyncComponent(() => import('../components/ProofCard.vue')), + ProofDateCurrencyInputRow: defineAsyncComponent(() => import('../components/ProofDateCurrencyInputRow.vue')), }, props: { proof: { @@ -62,13 +53,16 @@ export default { return { updateProofForm: { type: null, - currency: null, date: null, + currency: null, }, loading: false } }, computed: { + formFilled() { + return Object.values(this.updateProofForm).every(x => !!x) + } }, mounted() { this.initUpdateProofForm() diff --git a/src/components/ProofFooter.vue b/src/components/ProofFooter.vue index 23c7441743f..ecc823b5369 100644 --- a/src/components/ProofFooter.vue +++ b/src/components/ProofFooter.vue @@ -10,7 +10,7 @@ - +