From e852b02a595258f10851c58333283898cca47ee2 Mon Sep 17 00:00:00 2001 From: dq18 <21193194+dq18@users.noreply.github.com> Date: Sun, 10 Mar 2024 19:23:56 +0100 Subject: [PATCH] feat: allow using multiple currencies in Add Prices form (#397) Co-authored-by: dq18 <> --- public/currency-exchange-svgrepo-com.svg | 56 ++++++++++++++++++++ src/components/ChangeCurrencyDialog.vue | 67 ++++++++++++++++++++++++ src/i18n/locales/en.json | 9 ++++ src/views/AddPriceMultiple.vue | 35 +++++++++++-- src/views/AddPriceSingle.vue | 30 ++++++++++- 5 files changed, 191 insertions(+), 6 deletions(-) create mode 100644 public/currency-exchange-svgrepo-com.svg create mode 100644 src/components/ChangeCurrencyDialog.vue diff --git a/public/currency-exchange-svgrepo-com.svg b/public/currency-exchange-svgrepo-com.svg new file mode 100644 index 0000000000..6c85fde957 --- /dev/null +++ b/public/currency-exchange-svgrepo-com.svg @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/ChangeCurrencyDialog.vue b/src/components/ChangeCurrencyDialog.vue new file mode 100644 index 0000000000..1ea552ff2a --- /dev/null +++ b/src/components/ChangeCurrencyDialog.vue @@ -0,0 +1,67 @@ + + + \ No newline at end of file diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 1e4442c9b0..bff13407cc 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -39,6 +39,7 @@ "Create": "Create", "PriceDetails": { "Discount": "Discount?", + "Currency": "Currency", "Label": "Price", "LabelDiscounted": "Discounted price", "LabelFull": "Full price", @@ -120,6 +121,14 @@ "Yes": "Yes", "No": "No" }, + "ChangeCurrencyDialog": { + "Title": "Choose one of your favorite currencies", + "Currency": "Currency", + "AddCurrencies": "Add currencies in Settings", + "AddCurrenciesWarning":"You will be redirected to the Settings page but will lose any info you have entered on this page.", + "Select": "Select {currency_code}" + + }, "UserRecentProofsDialog": { "SelectRecentProof": "Select one of your recent proofs" }, diff --git a/src/views/AddPriceMultiple.vue b/src/views/AddPriceMultiple.vue index e12b79821f..6dabd307f4 100644 --- a/src/views/AddPriceMultiple.vue +++ b/src/views/AddPriceMultiple.vue @@ -232,7 +232,12 @@ min="0" hide-details="auto" :suffix="productPriceForm.currency" - > + > + + + + + \ No newline at end of file diff --git a/src/views/AddPriceSingle.vue b/src/views/AddPriceSingle.vue index 18553dd220..131cd14eb3 100644 --- a/src/views/AddPriceSingle.vue +++ b/src/views/AddPriceSingle.vue @@ -122,7 +122,12 @@ min="0" hide-details="auto" :suffix="addPriceSingleForm.currency" - > + > + + + + + \ No newline at end of file