@designcrowd/fe-shared-lib 1.2.11-ml-currency → 1.2.11-ml-407-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,10 +5,6 @@
5
5
  </span>
6
6
  </template>
7
7
  <script>
8
-
9
- import i18next from "i18next";
10
- import {setSharedLibLocaleAsync} from "../../../useSharedLibTranslate";
11
-
12
8
  export default {
13
9
  props: {
14
10
  amount: {
@@ -26,11 +22,6 @@ export default {
26
22
  required: false,
27
23
  default: null,
28
24
  },
29
- localeCurrency: {
30
- type: String,
31
- required: false,
32
- default: null,
33
- },
34
25
  fraction: {
35
26
  type: [Number, String],
36
27
  required: false,
@@ -57,9 +48,6 @@ export default {
57
48
  default: false,
58
49
  },
59
50
  },
60
- setup() {
61
- setSharedLibLocaleAsync();
62
- },
63
51
  computed: {
64
52
  amountFormatted() {
65
53
  if (this.isDomainCredit) {
@@ -70,19 +58,6 @@ export default {
70
58
  return 'Free';
71
59
  }
72
60
 
73
- if (this.localeCurrency != null)
74
- {
75
- let amount = i18next.t('{{val, currency}}', {
76
- ns: 'fe-shared-lib',
77
- val: this.amount,
78
- currency: this.currency.iso4127Code,
79
- locale: this.localeCurrency,
80
- minimumFractionDigits: this.fraction
81
- });
82
-
83
- return this.standardiseAmount(amount);
84
- }
85
-
86
61
  const parsedAmount = Number.parseFloat(this.amount);
87
62
 
88
63
  if (Number.isNaN(parsedAmount)) {
@@ -101,7 +76,7 @@ export default {
101
76
  return this.showAbbreviation && this.amount > 0 ? this.currency?.abbreviation?.trim() : '';
102
77
  },
103
78
  currencySymbol() {
104
- if (!this.amount || this.amount === 0 || this.localeCurrency) {
79
+ if (!this.amount || this.amount === 0) {
105
80
  return '';
106
81
  }
107
82
 
@@ -127,18 +102,5 @@ export default {
127
102
  return this.wrapInParentheses ? ')' : '';
128
103
  },
129
104
  },
130
- methods: {
131
- standardiseAmount(amount) {
132
- if (this.currency.iso4127Code == 'AUD') {
133
- return amount.replace('A$', this.currency.symbol);
134
- }
135
-
136
- if (this.currency.iso4127Code == 'ZAR') {
137
- return amount.replace(this.currency.iso4127Code, this.currency.symbol);
138
- }
139
-
140
- return amount;
141
- }
142
- },
143
105
  };
144
106
  </script>
@@ -57,7 +57,7 @@
57
57
  </p>
58
58
  <div class="tw-flex tw-flex-col">
59
59
  <div>
60
- <form id="signin" action="/identity/account/signin" method="post" @submit="validate">
60
+ <form id="signin" :action="getSignInAction" method="post" @submit="validate">
61
61
  <input name="__RequestVerificationToken" type="hidden" :value="antiForgeryToken" />
62
62
  <label for="userName" class="tw-sr-only"> {{ emailLabel }} </label>
63
63
  <input
@@ -170,6 +170,7 @@ import themeMixin from '../../mixins/themeMixin';
170
170
  import { SIGN_IN } from '../../constants/partner-dictionary-constants';
171
171
  import isValidEmail from '../../helpers/email-validator';
172
172
  import SocialSignIn from './SocialSignIn.vue';
173
+ import { getCurrentLocale } from '../../../useSharedLibTranslate';
173
174
 
174
175
  export default {
175
176
  components: {
@@ -334,6 +335,9 @@ export default {
334
335
  isLoading() {
335
336
  return this.emailLoading || this.facebookLoading || this.googleLoading;
336
337
  },
338
+ currentLocale() {
339
+ return getCurrentLocale();
340
+ },
337
341
  submissionButtonLabelLowercase() {
338
342
  return this.submissionButtonLabel.toLowerCase();
339
343
  },
@@ -369,6 +373,11 @@ export default {
369
373
  }
370
374
  return this.signUpText;
371
375
  },
376
+ getSignInAction() {
377
+ const params = new URLSearchParams();
378
+ params.set('locale', this.currentLocale);
379
+ return `/identity/account/signin?${params.toString()}`;
380
+ },
372
381
  },
373
382
  watch: {
374
383
  capturePassword() {