diff --git a/client/client/routes.json b/client/client/routes.json index 8290f285b..aa46c5984 100644 --- a/client/client/routes.json +++ b/client/client/routes.json @@ -9,17 +9,20 @@ "state": "client", "abstract": true, "component": "ui-view", + "description": "Clients", "acl": ["employee"] }, { "url": "/index?q", "state": "client.index", - "component": "vn-client-index" + "component": "vn-client-index", + "description": "List" }, { "url": "/create", "state": "client.create", - "component": "vn-client-create" + "component": "vn-client-create", + "description": "New client" }, { "url": "/:id", @@ -31,6 +34,7 @@ "url": "/summary", "state": "client.card.summary", "component": "vn-client-summary", + "description": "Summary", "params": { "client": "$ctrl.client" } @@ -39,11 +43,11 @@ "url": "/basic-data", "state": "client.card.basicData", "component": "vn-client-basic-data", + "description": "Basic data", "params": { "client": "$ctrl.client" }, "menu": { - "description": "Basic data", "icon": "settings" } }, @@ -51,11 +55,11 @@ "url": "/fiscal-data", "state": "client.card.fiscalData", "component": "vn-client-fiscal-data", + "description": "Fiscal data", "params": { "client": "$ctrl.client" }, "menu": { - "description": "Fiscal data", "icon": "account_balance" } }, @@ -63,11 +67,11 @@ "url": "/billing-data", "state": "client.card.billingData", "component": "vn-client-billing-data", + "description": "Pay method", "params": { "client": "$ctrl.client" }, "menu": { - "description": "Pay method", "icon": "icon-payment" } }, @@ -81,33 +85,35 @@ "url": "/index", "state": "client.card.address.index", "component": "vn-client-address-index", + "description": "Addresses", "params": { "client": "$ctrl.client" }, "menu": { - "description": "Addresses", "icon": "local_shipping" } }, { "url": "/create", "state": "client.card.address.create", - "component": "vn-client-address-create" + "component": "vn-client-address-create", + "description": "New address" }, { "url": "/:addressId/edit", "state": "client.card.address.edit", - "component": "vn-client-address-edit" + "component": "vn-client-address-edit", + "description": "Edit address" }, { "url": "/web-access", "state": "client.card.webAccess", "component": "vn-client-web-access", + "description": "Web access", "params": { "client": "$ctrl.client" }, "menu": { - "description": "Web access", "icon": "cloud" } }, @@ -121,18 +127,19 @@ "url": "/index", "state": "client.card.note.index", "component": "vn-client-note", + "description": "Notes", "params": { "client": "$ctrl.client" }, "menu": { - "description": "Notes", "icon": "insert_drive_file" } }, { "url": "/create", "state": "client.card.note.create", - "component": "vn-note-create" + "component": "vn-note-create", + "description": "New note" }, { "url": "/credit", @@ -144,11 +151,11 @@ "url": "/index", "state": "client.card.credit.index", "component": "vn-client-credit-index", + "description": "Credits", "params": { "client": "$ctrl.client" }, "menu": { - "description": "Credit", "icon": "credit_card" } }, @@ -156,6 +163,7 @@ "url": "/create", "state": "client.card.credit.create", "component": "vn-client-credit-create", + "description": "New credit", "params": { "client": "$ctrl.client" } @@ -170,11 +178,11 @@ "url": "/index", "state": "client.card.greuge.index", "component": "vn-client-greuge-index", + "description": "Greuges", "params": { "client": "$ctrl.client" }, "menu": { - "description": "Greuge", "icon": "work" } }, @@ -182,6 +190,7 @@ "url": "/create", "state": "client.card.greuge.create", "component": "vn-client-greuge-create", + "description": "New greuge", "params": { "client": "$ctrl.client" } @@ -190,8 +199,8 @@ "url": "/mandate", "state": "client.card.mandate", "component": "vn-client-mandate", + "description": "Mandates", "menu": { - "description": "Mandate", "icon": "pan_tool" } }, @@ -199,8 +208,8 @@ "url": "/invoice", "state": "client.card.invoice", "component": "vn-client-invoice", + "description": "Invoices", "menu": { - "description": "Invoices", "icon": "icon-invoices" } }, @@ -214,11 +223,11 @@ "url": "/index", "state": "client.card.recovery.index", "component": "vn-client-recovery-index", + "description": "Recoveries", "params": { "client": "$ctrl.client" }, "menu": { - "description": "Recovery", "icon": "icon-recovery" } }, @@ -226,6 +235,7 @@ "url": "/create", "state": "client.card.recovery.create", "component": "vn-client-recovery-create", + "description": "New recovery", "params": { "client": "$ctrl.client" } @@ -241,11 +251,11 @@ "url": "/index", "state": "client.card.creditInsurance.index", "component": "vn-client-credit-insurance-index", + "description": "Credit contracts", "params": { "client": "$ctrl.client" }, "menu": { - "description": "Credit contracts", "icon": "icon-solunion" }, "acl": ["creditInsurance"] @@ -254,6 +264,7 @@ "url": "/create", "state": "client.card.creditInsurance.create", "component": "vn-client-credit-insurance-create", + "description": "New insurance", "params": { "client": "$ctrl.client" } @@ -269,6 +280,7 @@ "url": "/:classificationId/index", "state": "client.card.creditInsurance.insurance.index", "component": "vn-client-credit-insurance-insurance-index", + "description": "Requested credits", "params": { "client": "$ctrl.client" } @@ -277,6 +289,7 @@ "url": "/:classificationId/create", "state": "client.card.creditInsurance.insurance.create", "component": "vn-client-credit-insurance-insurance-create", + "description": "New credit", "params": { "client": "$ctrl.client" } @@ -291,11 +304,11 @@ "url": "/index", "state": "client.card.contact.index", "component": "vn-client-contact-index", + "description": "Contacts", "params": { "client": "$ctrl.client" }, "menu": { - "description": "Contacts", "icon": "contact_phone" } } diff --git a/client/client/src/address/create/index.html b/client/client/src/address/create/index.html index c3d1077dc..c2d8845b8 100644 --- a/client/client/src/address/create/index.html +++ b/client/client/src/address/create/index.html @@ -8,7 +8,7 @@
- Address + New address diff --git a/client/client/src/address/edit/index.html b/client/client/src/address/edit/index.html index 5f926aaec..a7415a795 100644 --- a/client/client/src/address/edit/index.html +++ b/client/client/src/address/edit/index.html @@ -25,7 +25,7 @@ - Address + Edit address {{::observation.description}} - + @@ -66,6 +67,7 @@ diff --git a/client/client/src/credit-insurance/index/locale/es.yml b/client/client/src/credit-insurance/index/locale/es.yml index 75e004721..014faffbe 100644 --- a/client/client/src/credit-insurance/index/locale/es.yml +++ b/client/client/src/credit-insurance/index/locale/es.yml @@ -1,6 +1,4 @@ Contract credit insurance: Contratos de seguro de crédito -New contract: Nuevo contrato Close contract: Cerrar contrato -Edit contract: Modificar contrato View credits: Ver créditos Are you sure you want to close this contract?: ¿Seguro que quieres cerrar este contrato? \ No newline at end of file diff --git a/client/client/src/credit-insurance/insurance/create/locale/es.yml b/client/client/src/credit-insurance/insurance/create/locale/es.yml deleted file mode 100644 index 4c9b75dea..000000000 --- a/client/client/src/credit-insurance/insurance/create/locale/es.yml +++ /dev/null @@ -1 +0,0 @@ -New credit: Nuevo crédito \ No newline at end of file diff --git a/client/client/src/credit-insurance/insurance/index/locale/es.yml b/client/client/src/credit-insurance/insurance/index/locale/es.yml index 637e27fd5..84ce712a0 100644 --- a/client/client/src/credit-insurance/insurance/index/locale/es.yml +++ b/client/client/src/credit-insurance/insurance/index/locale/es.yml @@ -1,2 +1 @@ -Requested credits: Créditos solicitados Created: Creado \ No newline at end of file diff --git a/client/client/src/credit/create/index.html b/client/client/src/credit/create/index.html index f19b0b734..de3c82d1e 100644 --- a/client/client/src/credit/create/index.html +++ b/client/client/src/credit/create/index.html @@ -7,7 +7,7 @@ - Add credit + New credit diff --git a/client/client/src/credit/create/locale/es.yml b/client/client/src/credit/create/locale/es.yml deleted file mode 100644 index e6151420c..000000000 --- a/client/client/src/credit/create/locale/es.yml +++ /dev/null @@ -1 +0,0 @@ -Add credit: Añadir crédito \ No newline at end of file diff --git a/client/client/src/credit/index/index.html b/client/client/src/credit/index/index.html index 0a108ac78..2fe930f0c 100644 --- a/client/client/src/credit/index/index.html +++ b/client/client/src/credit/index/index.html @@ -10,7 +10,7 @@ - Credit + Credits @@ -37,6 +37,7 @@ - + \ No newline at end of file diff --git a/client/client/src/greuge/create/index.html b/client/client/src/greuge/create/index.html index e460bc729..fe457cb9b 100644 --- a/client/client/src/greuge/create/index.html +++ b/client/client/src/greuge/create/index.html @@ -7,7 +7,7 @@ - Add Greuge + New greuge - + \ No newline at end of file diff --git a/client/client/src/greuge/index/locale/es.yml b/client/client/src/greuge/index/locale/es.yml index 5038e95d1..513e6ff7b 100644 --- a/client/client/src/greuge/index/locale/es.yml +++ b/client/client/src/greuge/index/locale/es.yml @@ -1,5 +1,4 @@ Date: Fecha Comment: Comentario Amount: Importe -Type: Tipo -Add Greuge: Añadir Greuge \ No newline at end of file +Type: Tipo \ No newline at end of file diff --git a/client/client/src/index/index.html b/client/client/src/index/index.html index bf278862e..4a51adbf8 100644 --- a/client/client/src/index/index.html +++ b/client/client/src/index/index.html @@ -27,7 +27,7 @@ - + - Mandate + Mandates diff --git a/client/client/src/note/index/index.html b/client/client/src/note/index/index.html index 0e2581997..8e5f1200c 100644 --- a/client/client/src/note/index/index.html +++ b/client/client/src/note/index/index.html @@ -26,6 +26,9 @@ - + diff --git a/client/client/src/recovery/create/index.html b/client/client/src/recovery/create/index.html index c145bc72e..2b6576f4f 100644 --- a/client/client/src/recovery/create/index.html +++ b/client/client/src/recovery/create/index.html @@ -7,7 +7,7 @@ - Add recovery + New recovery - Recovery + Recoveries @@ -49,6 +49,7 @@ - + \ No newline at end of file diff --git a/client/client/src/recovery/index/locale/es.yml b/client/client/src/recovery/index/locale/es.yml index 3ad385a5c..5b21429f4 100644 --- a/client/client/src/recovery/index/locale/es.yml +++ b/client/client/src/recovery/index/locale/es.yml @@ -2,5 +2,4 @@ Since: Desde Employee: Empleado No results: Sin resultados To: Hasta -Recovery: Recobros Finish that recovery period: Terminar el recobro \ No newline at end of file diff --git a/client/core/src/directives/index.js b/client/core/src/directives/index.js index fc1171d03..07ce5dfe2 100644 --- a/client/core/src/directives/index.js +++ b/client/core/src/directives/index.js @@ -9,3 +9,4 @@ import './zoom-image'; import './visible-by'; import './bind'; import './repeat-last'; +import './title'; \ No newline at end of file diff --git a/client/core/src/directives/title.js b/client/core/src/directives/title.js new file mode 100644 index 000000000..17d445c68 --- /dev/null +++ b/client/core/src/directives/title.js @@ -0,0 +1,37 @@ +import ngModule from '../module'; + +/** + * Watch for a state transition to change the page title + * + * @return {Object} The directive + */ + +directive.$inject = ['$transitions', '$translate', '$state']; + +export default function directive($transitions, $translate, $state) { + return { + restrict: 'A', + link: function($scope, $element, $attrs) { + $transitions.onSuccess({}, transition => { + let currentState = transition.targetState(); + let currentRoute = currentState._definition.self; + let parentRoute = currentState._definition.path[1].self; + let moduleName; + + moduleName = $translate.instant(parentRoute.description); + moduleName = moduleName ? `${moduleName} :` : ''; + + if (currentRoute == parentRoute) + moduleName = ''; + + let pageName = $translate.instant(currentRoute.description); + let paramId = $state.params.id ? `${$state.params.id} -` : ''; + + let title = `${moduleName} ${paramId} ${pageName}`; + + $element.html(title); + }); + } + }; +} +ngModule.directive('vnTitle', directive); diff --git a/client/item/routes.json b/client/item/routes.json index 8e28c7dae..21399f9b5 100644 --- a/client/item/routes.json +++ b/client/item/routes.json @@ -8,104 +8,119 @@ "url": "/item", "state": "item", "abstract": true, + "description": "Items", "component": "ui-view" - }, { + }, + { "url": "/index?q", "state": "item.index", - "component": "vn-item-index" - }, { + "component": "vn-item-index", + "description": "List" + }, + { "url": "/create", "state": "item.create", - "component": "vn-item-create" - }, { + "component": "vn-item-create", + "description": "New item" + }, + { "url": "/:id", "state": "item.card", "abstract": true, "component": "vn-item-card" - }, { + }, + { "url" : "/data", "state": "item.card.data", "component": "vn-item-data", + "description": "Basic data", "params": { "item": "$ctrl.item" }, "menu": { - "description": "Basic data", "icon": "settings" }, "acl": ["buyer"] - }, { + }, + { "url" : "/tags", "state": "item.card.tags", "component": "vn-item-tags", + "description": "Tags", "params": { "item-tags": "$ctrl.itemTags" }, "menu": { - "description": "Tags", "icon": "icon-tags" }, "acl": ["buyer"] - }, { + }, + { "url" : "/tax", "state": "item.card.tax", "component": "vn-item-tax", + "description": "Tax", "menu": { - "description": "Tax", "icon": "icon-tax" }, "acl": ["administrative","buyer"] - }, { + }, + { "url" : "/history", "state": "item.card.history", "component": "vn-item-history", + "description": "History", "params": { "item": "$ctrl.item" }, "menu": { - "description": "History", "icon": "history" } - }, { + }, + { "url" : "/niche", "state": "item.card.niche", "component": "vn-item-niche", + "description": "Niches", "params": { "item": "$ctrl.item" }, "menu": { - "description": "Niche", "icon": "place" }, "acl": ["buyer","replenisher"] - }, { + }, + { "url" : "/botanical", "state": "item.card.botanical", "component": "vn-item-botanical", + "description": "Botanical", "params": { "item": "$ctrl.item" }, "menu": { - "description": "Botanical", "icon": "local_florist" }, "acl": ["buyer"] - }, { + }, + { "url" : "/barcode", "state": "item.card.itemBarcode", "component": "vn-item-barcode", + "description": "Barcodes", "params": { "item": "$ctrl.item" }, "menu": { - "description": "Barcode", "icon": "icon-barcode" }, "acl": ["buyer","replenisher"] - }, { + }, + { "url" : "/summary", "state": "item.card.summary", "component": "vn-item-summary", + "description": "Summary", "params": { "item": "$ctrl.item" } @@ -113,11 +128,11 @@ "url" : "/diary?q", "state": "item.card.diary", "component": "vn-item-diary", + "description": "Diary", "params": { "item": "$ctrl.item" }, "menu": { - "description": "Diary", "icon": "icon-transaction" }, "acl": ["employee"] @@ -125,11 +140,11 @@ "url" : "/last-entries", "state": "item.card.last-entries", "component": "vn-item-last-entries", + "description": "Last entries", "params": { "item": "$ctrl.item" }, "menu": { - "description": "Last entries", "icon": "icon-regentry" }, "acl": ["employee"] diff --git a/client/item/src/barcode/index.html b/client/item/src/barcode/index.html index b7187a808..95a059a0e 100644 --- a/client/item/src/barcode/index.html +++ b/client/item/src/barcode/index.html @@ -4,7 +4,7 @@ - Item barcode + Barcodes - Item history + History diff --git a/client/item/src/index/index.html b/client/item/src/index/index.html index a310769c3..88966d729 100644 --- a/client/item/src/index/index.html +++ b/client/item/src/index/index.html @@ -27,7 +27,7 @@ - + diff --git a/client/item/src/last-entries/locale/es.yml b/client/item/src/last-entries/locale/es.yml index fb231ada4..bece49318 100644 --- a/client/item/src/last-entries/locale/es.yml +++ b/client/item/src/last-entries/locale/es.yml @@ -1,4 +1,3 @@ -Last entries: Últimas entradas Since: Desde Landed: Llegada Stems: Tallos diff --git a/client/item/src/locale/es.yml b/client/item/src/locale/es.yml index 500cb1371..56e4bc836 100644 --- a/client/item/src/locale/es.yml +++ b/client/item/src/locale/es.yml @@ -1,4 +1,3 @@ -Items: Artículos Item: Artículo View item: Ver artículo Category: Categoría @@ -7,16 +6,7 @@ Size: Tamaño Type: Tipo Name: Nombre Relevancy: Relevancia -New item: Nuevo artículo -Basic data: Datos básicos -History: Historial -Item history: Historial del artículo -Item tags: Tags del artículo -Tax: IVA -Niche: Nicho Picture: Foto -Barcode: Código barras -Item barcode: Código de barras del artículo Changed by: Cambiado por Action: Acción Date: Fecha @@ -27,20 +17,15 @@ All it's properties will be copied: Todas sus propiedades serán copiadas Yes, clone: Si, clonar Value: Valor Priority: Prioridad -Item tax: Tasas del artículo Country: País Select warehouse: Selecione almacén Class: Clase -Item niches: Nichos del artículo -Item diary: Registro de compra-venta Intrastat code: Código intrastat -Diary: Registro Warehouse: Almacén Code: Código State: Estado In: Entrada Out: Salida -Botanical: Botánico Species: Especie Add tag: Añadir etiqueta Remove tag: Quitar etiqueta @@ -52,4 +37,19 @@ Buyer: Comprador No results: Sin resultados Tag: Etiqueta Worker: Trabajador -Available: Disponible \ No newline at end of file +Available: Disponible + +#Sections +Items: Artículos +List: Listado +New item: Nuevo artículo +Summary: Vista previa +Basic data: Datos básicos +Tax: IVA +History: Historial +Niches: Nichos +Botanical: Botánico +Barcodes: Códigos de barras +Diary: Registro +Item diary: Registro de compra-venta +Last entries: Últimas entradas \ No newline at end of file diff --git a/client/item/src/niche/index.html b/client/item/src/niche/index.html index f432498c3..db573091a 100644 --- a/client/item/src/niche/index.html +++ b/client/item/src/niche/index.html @@ -5,7 +5,7 @@ - Item niches + Niches - Item tags + Tags - Item tax + Tax - +