- {{ $t('WhatsApp.config.templates.title') }}
+
+
+ {{ $t('WhatsApp.config.templates.title') }}
+
+
+
+ {{ $t('WhatsApp.config.templates.button') }}
+
+
+
+ {{ $t('WhatsApp.config.catalog.title') }}
+
-
- {{ $t('WhatsApp.config.templates.button') }}
-
+
+ {{ $t('WhatsApp.config.catalog.button') }}
+
+
@@ -93,6 +110,10 @@
const { code, uuid } = this.appInfo;
this.$router.push({ path: `/apps/my/${code}/${uuid}/templates` });
},
+ navigateToCatalogs() {
+ const { code, uuid } = this.appInfo;
+ this.$router.push({ path: `/apps/my/${code}/${uuid}/catalogs` });
+ },
},
computed: {
QRCodeUrl() {
@@ -222,20 +243,23 @@
gap: $unnnic-spacing-stack-lg;
&__templates {
- flex: 1;
display: flex;
- flex-direction: column;
+ justify-content: space-between;
gap: $unnnic-spacing-stack-sm;
- &__title {
- font-weight: $unnnic-font-weight-black;
- font-size: $unnnic-font-size-body-lg;
- line-height: $unnnic-font-size-body-lg + $unnnic-line-height-md;
- color: $unnnic-color-neutral-darkest;
- }
+ &__buttons {
+ width: 100%;
- &__button {
- max-width: 160px;
+ &__title {
+ font-weight: $unnnic-font-weight-bold;
+ font-size: $unnnic-font-size-body-lg;
+ line-height: $unnnic-font-size-body-lg + $unnnic-line-height-md;
+ color: $unnnic-color-neutral-darkest;
+ margin-bottom: $unnnic-spacing-sm;
+ }
+ &__button {
+ width: 100%;
+ }
}
}
diff --git a/src/components/whatsAppCatalogs/Card.vue b/src/components/whatsAppCatalogs/Card.vue
new file mode 100644
index 00000000..fe962f79
--- /dev/null
+++ b/src/components/whatsAppCatalogs/Card.vue
@@ -0,0 +1,166 @@
+
+
+
+
+
+
+ {{ $t('WhatsApp.catalog.list.disable_modal.description') }}
+
+
+
+
+
+
+
+
diff --git a/src/components/whatsAppCatalogs/Table.vue b/src/components/whatsAppCatalogs/Table.vue
new file mode 100644
index 00000000..2c885f29
--- /dev/null
+++ b/src/components/whatsAppCatalogs/Table.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/locales/pt_br.json b/src/locales/pt_br.json
index d9579fd7..11b80a9e 100644
--- a/src/locales/pt_br.json
+++ b/src/locales/pt_br.json
@@ -457,6 +457,37 @@
"templates": {
"button": "Ver meus templates",
"title": "Templates"
+ },
+ "catalog": {
+ "button": "Ver lista de catálogos",
+ "title": "Catálogo"
+ }
+ },
+ "catalog": {
+ "list": {
+ "title": "Lista de catálogos",
+ "description": "Adicione todos os itens que você quer anunciar ou vender",
+ "advanced_settings": "Configurações avançadas",
+ "identification": "Identificação",
+ "actions": {
+ "enabled_cart": "Carrinho habilitado",
+ "disabled_cart": "Carrinho desabilitado",
+ "enabled_catalog": "Catálogo habilitado",
+ "disabled_catalog": "Desabilitado"
+ },
+ "disable_modal": {
+ "title": "Vai mesmo desabilitar o catálogo?",
+ "description": "Para continuar enviando seus produtos no Whatsapp você precisa de um catálogo ativo.",
+ "label": "Digite “desabilitar catálogo” para confirmar",
+ "placeholder": "desabilitar catálogo",
+ "confirm": "Desabilitar"
+ },
+ "advanced_configurations_modal": {
+ "title": "Configurações avançadas",
+ "description": "Configure o nível de precisão do envio automático dos seus produtos",
+ "recomendation": "Configuração recomendada: 1.55",
+ "confirm": "Salvar"
+ }
}
},
"templates": {
diff --git a/src/router.js b/src/router.js
index 6a0096e5..01f45de4 100644
--- a/src/router.js
+++ b/src/router.js
@@ -64,6 +64,20 @@ const routes = [
},
],
},
+ {
+ path: '/apps/my/:appCode/:appUuid/catalogs',
+ component: () => import('@/views/whatsAppCatalogs/Base.vue'),
+ children: [
+ {
+ name: 'WhatsApp Catalogs Table',
+ path: '',
+ component: () => import('@/views/whatsAppCatalogs/Table.vue'),
+ meta: {
+ crumb_title: 'WhatsApp.catalog.list.title',
+ },
+ },
+ ],
+ },
{
path: '/loginexternal/:token/:project/:flowOrg',
name: 'externalLogin',
diff --git a/src/store/appType/channels/whatsapp_cloud/actions.js b/src/store/appType/channels/whatsapp_cloud/actions.js
index a599978f..986be54a 100644
--- a/src/store/appType/channels/whatsapp_cloud/actions.js
+++ b/src/store/appType/channels/whatsapp_cloud/actions.js
@@ -35,4 +35,24 @@ export default {
setSelectedPhoneNumber({ commit }, { data }) {
commit('SET_SELECTED_PHONE_NUMBER', data);
},
+ async getWhatsAppCloudCatalogs({ commit }, { appUuid, params }) {
+ commit('GET_WHATSAPP_CATALOGS_REQUEST');
+ try {
+ const { data } = await whatsAppCloud.getWhatsAppCloudCatalogs(appUuid, params);
+ commit('GET_WHATSAPP_CATALOGS_SUCCESS', data);
+ } catch (err) {
+ captureSentryException(err);
+ commit('GET_WHATSAPP_CATALOGS_ERROR', err);
+ }
+ },
+ async fetchCatalogData({ commit }, { appUuid, catalogUuid }) {
+ commit('FETCH_WHATSAPP_CATALOG_REQUEST');
+ try {
+ const { data } = await whatsAppCloud.fetchCatalogData(appUuid, catalogUuid);
+ commit('FETCH_WHATSAPP_CATALOG_SUCCESS', data);
+ } catch (err) {
+ captureSentryException(err);
+ commit('FETCH_WHATSAPP_CATALOG_ERROR', err);
+ }
+ },
};
diff --git a/src/store/appType/channels/whatsapp_cloud/mutations.js b/src/store/appType/channels/whatsapp_cloud/mutations.js
index b4665fef..412eef3a 100644
--- a/src/store/appType/channels/whatsapp_cloud/mutations.js
+++ b/src/store/appType/channels/whatsapp_cloud/mutations.js
@@ -44,4 +44,28 @@ export default {
SET_SELECTED_PHONE_NUMBER(state, data) {
state.selectedPhoneNumber = data;
},
+ GET_WHATSAPP_CATALOGS_REQUEST(state) {
+ state.loadingWhatsAppCloudCatalogs = true;
+ state.errorWhatsAppCloudCatalogs = null;
+ },
+ GET_WHATSAPP_CATALOGS_SUCCESS(state, data) {
+ state.whatsAppCloudCatalogs = data;
+ state.loadingWhatsAppCloudCatalogs = false;
+ },
+ GET_WHATSAPP_CATALOGS_ERROR(state, data) {
+ state.errorWhatsAppCloudCatalogs = data;
+ state.loadingWhatsAppCloudCatalogs = false;
+ },
+ FETCH_WHATSAPP_CATALOG_REQUEST(state) {
+ state.loadingFetchWhatsAppCloudCatalog = true;
+ state.errorFetchWhatsAppCloudCatalog = null;
+ },
+ FETCH_WHATSAPP_CATALOG_SUCCESS(state, data) {
+ state.whatsAppCloudCatalog = data;
+ state.loadingFetchWhatsAppCloudCatalog = false;
+ },
+ FETCH_WHATSAPP_CATALOG_ERROR(state, data) {
+ state.errorFetchWhatsAppCloudCatalog = data;
+ state.loadingFetchWhatsAppCloudCatalog = false;
+ },
};
diff --git a/src/store/appType/channels/whatsapp_cloud/state.js b/src/store/appType/channels/whatsapp_cloud/state.js
index 7524d4c8..ec2d063f 100644
--- a/src/store/appType/channels/whatsapp_cloud/state.js
+++ b/src/store/appType/channels/whatsapp_cloud/state.js
@@ -12,4 +12,12 @@ export default {
loadingWhatsAppCloudConfigure: false,
errorCloudConfigure: false,
+
+ whatsAppCloudCatalogs: null,
+ loadingWhatsAppCloudCatalogs: false,
+ errorWhatsAppCloudCatalogs: false,
+
+ whatsAppCloudCatalog: null,
+ loadingFetchWhatsAppCloudCatalog: false,
+ errorFetchWhatsAppCloudCatalog: false,
};
diff --git a/src/views/whatsAppCatalogs/Base.vue b/src/views/whatsAppCatalogs/Base.vue
new file mode 100644
index 00000000..3694d387
--- /dev/null
+++ b/src/views/whatsAppCatalogs/Base.vue
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/whatsAppCatalogs/Table.vue b/src/views/whatsAppCatalogs/Table.vue
new file mode 100644
index 00000000..63fa8d2f
--- /dev/null
+++ b/src/views/whatsAppCatalogs/Table.vue
@@ -0,0 +1,19 @@
+
+
+
+
+