From ece213d69f73a3976ddae63d5fc0b7b072844e52 Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Mon, 17 Oct 2022 12:37:38 +0530 Subject: [PATCH 1/4] refactor: add FormHeader - add custom vue type shims --- fyo/utils/translation.ts | 4 ++-- src/components/FormHeader.vue | 28 ++++++++++++++++++++++++++++ src/pages/InvoiceForm.vue | 30 +++++++++--------------------- src/pages/JournalEntryForm.vue | 26 +++++++------------------- src/shims-vue-custom.d.ts | 10 ++++++++++ 5 files changed, 56 insertions(+), 42 deletions(-) create mode 100644 src/components/FormHeader.vue create mode 100644 src/shims-vue-custom.d.ts diff --git a/fyo/utils/translation.ts b/fyo/utils/translation.ts index 944c275a..4c80b0e4 100644 --- a/fyo/utils/translation.ts +++ b/fyo/utils/translation.ts @@ -7,8 +7,8 @@ import { } from '../../utils/translationHelpers'; import { ValueError } from './errors'; -type TranslationArgs = boolean | number | string; -type TranslationLiteral = TemplateStringsArray | TranslationArgs; +export type TranslationArgs = boolean | number | string; +export type TranslationLiteral = TemplateStringsArray | TranslationArgs; class TranslationString { args: TranslationLiteral[]; diff --git a/src/components/FormHeader.vue b/src/components/FormHeader.vue new file mode 100644 index 00000000..7664dd0b --- /dev/null +++ b/src/components/FormHeader.vue @@ -0,0 +1,28 @@ + + diff --git a/src/pages/InvoiceForm.vue b/src/pages/InvoiceForm.vue index f2c792ca..c3ee79d1 100644 --- a/src/pages/InvoiceForm.vue +++ b/src/pages/InvoiceForm.vue @@ -45,28 +45,14 @@