Skip to content

Commit

Permalink
Fix visual problems
Browse files Browse the repository at this point in the history
  • Loading branch information
TatianaFomina committed Nov 17, 2024
1 parent 10f8d44 commit 97f9058
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/components/modals/ChooseTariffPlanPopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
:name="plan.name"
:limit="plan.eventsLimit"
:price="plan.monthlyCharge"
:currency="plan.monthlyChargeCurrency"
:selected="plan.id === selectedPlan.id"
@click.native="selectPlan(plan.id)"
/>
Expand Down
9 changes: 5 additions & 4 deletions src/components/modals/PaymentDetailsDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
{{ $t('common.price') }}
</div>
<div class="payment-details__details-item-value">
{{ priceWithDollar }}
{{ price }}
</div>
</div>

Expand Down Expand Up @@ -194,6 +194,7 @@ import { PayWithCardInput } from '../../api/billing';
import { BusinessOperation } from '../../types/business-operation';
import { BusinessOperationStatus } from '../../types/business-operation-status';
import UiCheckboxWithLabel from '../forms/UiCheckboxWithLabel/UiCheckboxWithLabel.vue';
import { getCurrencySign } from '@/utils';
/**
* Id for the 'New card' option in select
Expand Down Expand Up @@ -348,8 +349,8 @@ export default Vue.extend({
*
* example: 100$
*/
priceWithDollar(): string {
return `${this.plan.monthlyCharge}$`;
price(): string {
return `${this.plan.monthlyCharge}${getCurrencySign(this.plan.monthlyChargeCurrency)}`;
},
/**
Expand Down Expand Up @@ -726,7 +727,7 @@ export default Vue.extend({
display: flex;
&-button {
margin-right: 118px;
margin-right: auto;
}
&-cp-logo {
Expand Down
25 changes: 22 additions & 3 deletions src/components/utils/TariffPlan.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
{{ name }}
</h4>
<div class="tariff-plan__limit">
{{ limit | spacedNumber }} {{ $t('common.eventsPerMonth') }}
{{ limit | spacedNumber }} <span class="tariff-plan__limit-text">{{ $t('common.eventsPerMonth') }}</span>
</div>
<div class="tariff-plan__footer">
<div class="tariff-plan__price">
{{ price === 0 ? $t('common.free') : `${$options.filters.spacedNumber(price)}${$t('common.dollarsPerMonth')}` }}
{{ price === 0 ? $t('common.free') : `${$options.filters.spacedNumber(price)}${$tc('common.moneyPerMonth', currencySign, { currency: currencySign })}` }}
</div>
<UiButton
small
Expand All @@ -25,6 +25,7 @@
</template>

<script>
import { getCurrencySign } from '@/utils';
import UiButton from './UiButton';
export default {
Expand Down Expand Up @@ -54,6 +55,10 @@ export default {
type: Number,
required: true,
},
currency: {
type: String,
required: true
},
/**
* Is plan card selected
*/
Expand All @@ -62,6 +67,11 @@ export default {
default: false,
},
},
computed: {
currencySign() {
return getCurrencySign(this.currency)
}
}
};
</script>

Expand All @@ -73,6 +83,9 @@ export default {
background: var(--color-bg-main);
border-radius: 7px;
cursor: pointer;
height: 140px;
display: flex;
flex-direction: column;
&--selected {
padding: 17px 22px;
Expand All @@ -95,11 +108,17 @@ export default {
letter-spacing: 0;
}
&__limit-text {
white-space: nowrap;
}
&__footer {
display: flex;
align-items: center;
justify-content: space-between;
margin: 30px 0 0;
margin-top: auto;
/* align-self: flex-end; */
/* margin: 30px 0 0; */
}
&__price {
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@
"select": "Select",
"continue": "Continue",
"eventsPerMonth": "events / mo",
"dollarsPerMonth": "$ / mo",
"moneyPerMonth": "{currency} / mo",
"loading": "Loading...",
"months": [
"january",
Expand Down
4 changes: 2 additions & 2 deletions src/i18n/messages/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,8 @@
"free": "БЕСПЛАТНО",
"select": "Выбрать",
"continue": "Продолжить",
"eventsPerMonth": "соб. / мес",
"dollarsPerMonth": "$ / мес",
"eventsPerMonth": "событий / мес",
"moneyPerMonth": "{currency} / мес",
"loading": "Загрузка...",
"months": [
"января",
Expand Down

0 comments on commit 97f9058

Please sign in to comment.