From 2802e06030f00562ee8d3f57dfeffdf3bbea63a4 Mon Sep 17 00:00:00 2001 From: Elsio Sanchez <45974454+elsiosanchez@users.noreply.github.com> Date: Wed, 2 Dec 2020 12:34:15 -0400 Subject: [PATCH] add traduction and icon (#552) --- src/components/ADempiere/Form/ProductInfo/index.vue | 7 +++---- src/components/ADempiere/Form/ProductInfo/productList.vue | 1 - src/lang/ADempiere/en.js | 4 +++- src/lang/ADempiere/es.js | 4 +++- src/router/modules/ADempiere/staticRoutes.js | 1 + .../modules/ADempiere/pointOfSales/listProductPrice.js | 3 ++- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/components/ADempiere/Form/ProductInfo/index.vue b/src/components/ADempiere/Form/ProductInfo/index.vue index 211a3d08..85195ede 100644 --- a/src/components/ADempiere/Form/ProductInfo/index.vue +++ b/src/components/ADempiere/Form/ProductInfo/index.vue @@ -56,11 +56,13 @@ export default { } } }, + beforeMount() { + this.$store.dispatch('listPointOfSalesFromServer') + }, methods: { formatPrice, formatQuantity, shortcutKeyMethod(event) { - console.log(event) switch (event.srcKey) { case 'refreshList': case 'refreshList2': @@ -74,7 +76,6 @@ export default { callBack([]) return } - console.log(stringToMatch, callBack) let results = this.listWithPrice if (stringToMatch) { @@ -96,8 +97,6 @@ export default { // Remote search if (this.isEmptyValue(results) && String(stringToMatch.length > 3)) { clearTimeout(this.timeOut) - const epa = this.$store.getters.getSearchProduct - console.log({ epa }) this.timeOut = setTimeout(() => { this.$store.dispatch('listProductPriceFromServerProductInfo', { containerUuid: 'Products-Price-List-ProductInfo', diff --git a/src/components/ADempiere/Form/ProductInfo/productList.vue b/src/components/ADempiere/Form/ProductInfo/productList.vue index fc86f3e9..91fb755c 100644 --- a/src/components/ADempiere/Form/ProductInfo/productList.vue +++ b/src/components/ADempiere/Form/ProductInfo/productList.vue @@ -166,7 +166,6 @@ export default { } }, created() { - this.$store.dispatch('listPointOfSalesFromServer') this.unsubscribe = this.subscribeChanges() if (this.isReadyFromGetData) { diff --git a/src/lang/ADempiere/en.js b/src/lang/ADempiere/en.js index 67bf3b8a..80d5dff0 100644 --- a/src/lang/ADempiere/en.js +++ b/src/lang/ADempiere/en.js @@ -11,6 +11,7 @@ export default { page404: '404', profile: 'Profile', ProcessActivity: 'Process Logs', + ProductInfo: 'Product Information', role: 'Role', organization: 'Organization', warehouse: 'Warehouse', @@ -48,7 +49,8 @@ export default { invalidEmailFormat: 'Invalid email format', recordLocked: 'This record has been locked', recordUnlocked: 'This record has been unlocked', - noRoleAccess: 'With your current role and settings, you cannot view this information.' + noRoleAccess: 'With your current role and settings, you cannot view this information.', + errorPointOfSale: 'No point of sale selected' }, navbar: { badge: { diff --git a/src/lang/ADempiere/es.js b/src/lang/ADempiere/es.js index e64b11c3..0caa5831 100644 --- a/src/lang/ADempiere/es.js +++ b/src/lang/ADempiere/es.js @@ -11,6 +11,7 @@ export default { page404: '404', profile: 'Perfil', ProcessActivity: 'Histórico Procesos', + ProductInfo: 'Informacion de Producto', role: 'Rol', organization: 'Organización', warehouse: 'Almacén', @@ -48,7 +49,8 @@ export default { invalidEmailFormat: 'Formato de correo electronico invalido', recordLocked: 'Este registro ha sido bloqueado', recordUnlocked: 'Este registro ha sido desbloqueado', - noRoleAccess: 'Con su rol y configuración actuales, no puede ver esta información.' + noRoleAccess: 'Con su rol y configuración actuales, no puede ver esta información.', + errorPointOfSale: 'Sin punto de venta seleccionado' }, navbar: { badge: { diff --git a/src/router/modules/ADempiere/staticRoutes.js b/src/router/modules/ADempiere/staticRoutes.js index 094f2d03..a38f2d8a 100644 --- a/src/router/modules/ADempiere/staticRoutes.js +++ b/src/router/modules/ADempiere/staticRoutes.js @@ -110,6 +110,7 @@ const staticRoutes = [ name: 'ProductInfo', meta: { title: 'ProductInfo', + icon: 'search', isIndex: true } } diff --git a/src/store/modules/ADempiere/pointOfSales/listProductPrice.js b/src/store/modules/ADempiere/pointOfSales/listProductPrice.js index 2fa46ce3..ef763dd4 100644 --- a/src/store/modules/ADempiere/pointOfSales/listProductPrice.js +++ b/src/store/modules/ADempiere/pointOfSales/listProductPrice.js @@ -4,6 +4,7 @@ import { } from '@/api/ADempiere/form/point-of-sales.js' import { isEmptyValue, extractPagingToken } from '@/utils/ADempiere/valueUtils.js' import { showMessage } from '@/utils/ADempiere/notification.js' +import language from '@/lang' const withoutResponse = { isLoaded: false, @@ -57,7 +58,7 @@ const listProductPrice = { }) { const posUuid = rootGetters.getPointOfSalesUuid if (isEmptyValue(posUuid)) { - const message = 'Sin punto de venta seleccionado' + const message = language.t('notifications.errorPointOfSale') showMessage({ type: 'info', message