Skip to content

Commit

Permalink
Merge branch 'feat/revert-removing-accounting' into stage
Browse files Browse the repository at this point in the history
  • Loading branch information
TatianaFomina committed Dec 1, 2024
2 parents 950d1bc + 8e65946 commit 1de1b32
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/aside/WorkspaceInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<router-link
v-if="isAdmin"
:to="{
name: 'workspace-settings-billing',
name: 'workspace-settings-used-volume',
params: { workspaceId: workspace.id },
}"
>
Expand Down
14 changes: 12 additions & 2 deletions src/components/modals/ChooseTariffPlanPopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
class="choose-plan__description"
v-html="$t('workspaces.chooseTariffPlanDialog.description', {featuresURL: '#'})"
/>
<div class="choose-plan__plans">

<div :class="{
'choose-plan__plans': true,
'choose-plan__plans--horizontal': plans.length > 3,
}">
<TariffPlan
v-for="plan in plans"
:key="plan.id"
Expand All @@ -23,9 +27,12 @@
:price="plan.monthlyCharge"
:currency="plan.monthlyChargeCurrency"
:selected="plan.id === selectedPlan.id"
:isCurrentPlan="plan.id === workspace.plan.id"
@click.native="selectPlan(plan.id)"
:horizontal="plans.length > 3"
/>
</div>

<UiButton
class="choose-plan__continue-button"
:content="$t('common.continue')"
Expand Down Expand Up @@ -217,9 +224,12 @@ export default Vue.extend({
&__plans {
display: flex;
align-items: center;
justify-content: space-between;
}
&__plans--horizontal {
flex-direction: column;
}
&__continue-button {
margin-top: 30px;
Expand Down
55 changes: 50 additions & 5 deletions src/components/utils/TariffPlan.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<template>
<div
class="tariff-plan"
:class="{'tariff-plan--selected': selected}"
:class="{
'tariff-plan--selected': selected,
'tariff-plan--horizontal': horizontal,
}"
>
<h4 class="tariff-plan__name">
{{ name }}
Expand All @@ -13,12 +16,14 @@
<div class="tariff-plan__price">
{{ price === 0 ? $t('common.free') : `${$options.filters.spacedNumber(price)}${$tc('common.moneyPerMonth', currencySign, { currency: currencySign })}` }}
</div>

<UiButton
small
submit
rounded
:content="$t('common.select')"
:content="isCurrentPlan ? $t('common.selected') : $t('common.select')"
class="tariff-plan__button"
:disabled="isCurrentPlan"
/>
</div>
</div>
Expand Down Expand Up @@ -55,17 +60,31 @@ export default {
type: Number,
required: true,
},
/**
* Currency for price
*/
currency: {
type: String,
required: true
},
/**
* Is plan card selected
* Is plan selected
*/
selected: {
type: Boolean,
default: false,
},
/**
* True if horizontal view enabled
*/
horizontal: {
type: Boolean,
default: false
},
isCurrentPlan: {
type: Boolean,
default: false
}
},
computed: {
currencySign() {
Expand All @@ -92,6 +111,34 @@ export default {
border: 3px solid var(--color-indicator-medium);
}
&--horizontal {
height: auto;
width: auto;
display: flex;
flex-direction: row;
align-items: center;
&:not(:last-of-type) {
margin-bottom: 10px;
}
.tariff-plan__name {
margin-bottom: 0;
width: 100px;
}
.tariff-plan__limit {
width: 300px;
}
.tariff-plan__footer {
margin-left: auto;
}
.tariff-plan__price {
margin-right: 20px
}
}
&__name {
margin: 0 0 10px;
color: var(--color-text-main);
Expand All @@ -117,8 +164,6 @@ export default {
align-items: center;
justify-content: space-between;
margin-top: auto;
/* align-self: flex-end; */
/* margin: 30px 0 0; */
}
&__price {
Expand Down
1 change: 1 addition & 0 deletions src/i18n/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@
"copiedNotification": "Copied!",
"free": "FREE",
"select": "Select",
"selected": "Selected",
"continue": "Continue",
"eventsPerMonth": "events / mo",
"moneyPerMonth": "{currency} / mo",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/messages/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@
"copiedNotification": "Скопировано!",
"free": "БЕСПЛАТНО",
"select": "Выбрать",
"selected": "Выбрано",
"continue": "Продолжить",
"eventsPerMonth": "событий / мес",
"moneyPerMonth": "{currency} / мес",
Expand Down

0 comments on commit 1de1b32

Please sign in to comment.