Skip to content

Commit

Permalink
Merge pull request #340 from weni-ai/feat/active-catalog-modal
Browse files Browse the repository at this point in the history
Feat: Active catalog modal
  • Loading branch information
paulobernardoaf authored Oct 30, 2023
2 parents 44b6506 + e4737d7 commit 5a67a12
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
17 changes: 15 additions & 2 deletions src/components/whatsAppCatalogs/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,27 @@
scheme="feedback-red"
:validate="connectedCatalog.name"
:validatePlaceholder="connectedCatalog.name"
:title="$t('WhatsApp.catalog.list.disable_modal.title')"
:title="
catalogToEnable
? $t('WhatsApp.catalog.list.disable_modal.title_active')
: $t('WhatsApp.catalog.list.disable_modal.title')
"
:actionPrimaryLabel="$t('WhatsApp.catalog.list.disable_modal.confirm')"
:actionSecondaryLabel="$t('general.Cancel')"
@click-action-secondary="closeModal"
@click-action-primary="handleCatalogConfirmation"
>
<template slot="description">
{{ $t('WhatsApp.catalog.list.disable_modal.description') }}
<div v-if="catalogToEnable">
{{
$t('WhatsApp.catalog.list.disable_modal.description_active', {
name: connectedCatalog.name,
})
}}
</div>
<div v-else>
{{ $t('WhatsApp.catalog.list.disable_modal.description') }}
</div>
<div>
{{ $t('WhatsApp.catalog.list.disable_modal.label', { name: connectedCatalog.name }) }}
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,9 @@
},
"disable_modal": {
"title": "Are you really going to disable the catalogue?",
"title_active": "You already have another active catalog",
"description": "To continue sending your products on Whatsapp you need an active catalogue.",
"description_active": "This action will automatically deactivate the catalog “{name}”",
"label": "Type “{name}” to confirm",
"confirm": "Disable"
},
Expand Down
2 changes: 2 additions & 0 deletions src/locales/es_es.json
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,9 @@
},
"disable_modal": {
"title": "¿De verdad vas a desactivar el catálogo?",
"title_active": "Ya tienes otro catálogo activo",
"description": "Para seguir enviando tus productos por Whatsapp necesitas un catálogo activo.",
"description_active": "Esta acción desactivará automáticamente el catálogo. “{name}”",
"label": "Escriba “{name}” para confirmar",
"confirm": "Desactivar"
},
Expand Down
4 changes: 3 additions & 1 deletion src/locales/pt_br.json
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,10 @@
"inactive_catalog": "Inativo"
},
"disable_modal": {
"title": "Vai mesmo desativar o catálogo?",
"title": "Vai mesmo desabilitar o catálogo?",
"title_active": "Você já tem outro catálogo ativo",
"description": "Para continuar enviando seus produtos no Whatsapp você precisa de um catálogo ativo.",
"description_active": "Essa ação vai desativar automaticamente o catálogo “{name}”",
"label": "Digite “{name}” para confirmar",
"confirm": "Desabilitar"
},
Expand Down

0 comments on commit 5a67a12

Please sign in to comment.