Skip to content

Commit

Permalink
Merge branch 'fix/template-category-color' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuseduardomedeiros committed Sep 18, 2024
2 parents c8d7c06 + 7fa545f commit cc5d9f5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/components/billing/Card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
v-if="isModalAddCreditCardOpen"
@close="isModalAddCreditCardOpen = false"
:scheme="scheme"
:name="type"
:name="$t(`billing.payment.plans.${type}.title`)"
:price="`R$ ${formatPrice(price)}`"
@complete="onAddedCreditCard"
@error="isModalAddCreditCardFailOpen = true"
Expand Down
2 changes: 1 addition & 1 deletion src/locales/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -3583,7 +3583,7 @@
"integrations": {
"pt-br": "Integrações",
"en": "Integrations",
"es": "Integración"
"es": "Integraciones"
},
"sales": {
"pt-br": "Vendas",
Expand Down
29 changes: 18 additions & 11 deletions src/views/register/forms/TemplateGallery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
</div>

<UnnnicTag
v-for="value in categories"
:key="value"
:text="value"
:class="[
'category',
`category--${clearString(value)}`,
`category--${clearString(categoriesMap[value] || '')}`,
{ 'category--selected': value === category },
]"
clickable
disabled
v-for="value in categories"
:key="value"
@click="category === value ? (category = null) : (category = value)"
></UnnnicTag>
/>
</div>

<div class="templates">
Expand Down Expand Up @@ -62,7 +62,7 @@
:class="[
'category',
'category--selected',
`category--${clearString(category)}`,
`category--${clearString(categoriesMap[category] || '')}`,
]"
disabled
></UnnnicTag>
Expand Down Expand Up @@ -96,7 +96,7 @@
:class="[
'category',
'category--selected',
`category--${clearString(category)}`,
`category--${clearString(categoriesMap[category] || '')}`,
]"
disabled
></UnnnicTag>
Expand Down Expand Up @@ -403,11 +403,18 @@ export default {
);
},
categoriesMap() {
return {
[this.$t('projects.create.format.categories.sales')]: 'sales',
[this.$t('projects.create.format.categories.support')]: 'support',
[this.$t('projects.create.format.categories.integrations')]:
'integrations',
};
},
templates() {
let filtered = this.$store.state.Project.templates.data;
console.log(this.category);
if (this.category) {
filtered = filtered.filter((template) =>
template.category.includes(this.category),
Expand Down Expand Up @@ -479,9 +486,9 @@ export default {
user-select: none;
$category-colors: 'recommended' $unnnic-color-aux-blue-500,
'vendas' $unnnic-color-aux-purple-500,
'suporte' $unnnic-color-aux-orange-500,
'integracoes' $unnnic-color-aux-yellow-500;
'sales' $unnnic-color-aux-purple-500,
'support' $unnnic-color-aux-orange-500,
'integrations' $unnnic-color-aux-yellow-500;
@each $name, $color in $category-colors {
&--#{$name}.category--selected {
Expand Down

0 comments on commit cc5d9f5

Please sign in to comment.