diff --git a/front/core/styles/salixfont.css b/front/core/styles/salixfont.css index 24ff5f0ca..bfd4b0f6e 100644 --- a/front/core/styles/salixfont.css +++ b/front/core/styles/salixfont.css @@ -1,8 +1,8 @@ @font-face { font-family: 'salixfont'; - src: url('./salixfont.ttf?wiyr0v') format('truetype'), - url('./salixfont.woff?wiyr0v') format('woff'), - url('./salixfont.svg?wiyr0v#salixfont') format('svg'); + src: url('./salixfont.ttf?1qesj4') format('truetype'), + url('./salixfont.woff?1qesj4') format('woff'), + url('./salixfont.svg?1qesj4#salixfont') format('svg'); font-weight: normal; font-style: normal; } @@ -22,6 +22,27 @@ -moz-osx-font-smoothing: grayscale; } +.icon-columndelete:before { + content: "\e90f"; +} +.icon-columnadd:before { + content: "\e944"; +} +.icon-linesplit:before { + content: "\e945"; +} +.icon-linedelete:before { + content: "\e946"; +} +.icon-item:before { + content: "\e941"; +} +.icon-basket:before { + content: "\e942"; +} +.icon-worker:before { + content: "\e943"; +} .icon-reserve:before { content: "\e92f"; } @@ -76,9 +97,6 @@ .icon-credit:before { content: "\e90e"; } -.icon-deleteline:before { - content: "\e90f"; -} .icon-delivery:before { content: "\e910"; } @@ -163,7 +181,7 @@ .icon-plant:before { content: "\e92b"; } -.icon-polizon:before { +.icon-stowaway:before { content: "\e92c"; } .icon-recovery:before { @@ -172,9 +190,6 @@ .icon-regentry:before { content: "\e92e"; } -.icon-reserved:before { - content: "\e92f"; -} .icon-risk:before { content: "\e930"; } @@ -219,4 +234,4 @@ } .icon-web:before { content: "\e93e"; -} \ No newline at end of file +} diff --git a/front/core/styles/salixfont.eot b/front/core/styles/salixfont.eot index f0f829362..c816a300f 100644 Binary files a/front/core/styles/salixfont.eot and b/front/core/styles/salixfont.eot differ diff --git a/front/core/styles/salixfont.svg b/front/core/styles/salixfont.svg index f6248c6bc..aa5ec8c3c 100644 --- a/front/core/styles/salixfont.svg +++ b/front/core/styles/salixfont.svg @@ -22,7 +22,7 @@ - + @@ -72,4 +72,10 @@ + + + + + + \ No newline at end of file diff --git a/front/core/styles/salixfont.ttf b/front/core/styles/salixfont.ttf index 19ca515e4..3bf8cbdda 100644 Binary files a/front/core/styles/salixfont.ttf and b/front/core/styles/salixfont.ttf differ diff --git a/front/core/styles/salixfont.woff b/front/core/styles/salixfont.woff index 1f875e934..75b97ffde 100644 Binary files a/front/core/styles/salixfont.woff and b/front/core/styles/salixfont.woff differ diff --git a/front/module-import.js b/front/module-import.js index 575787ee8..ec6940184 100755 --- a/front/module-import.js +++ b/front/module-import.js @@ -14,5 +14,6 @@ export default function moduleImport(moduleName) { case 'claim' : return import('claim/front'); case 'agency' : return import('agency/front'); case 'travel' : return import('travel/front'); + case 'worker' : return import('worker/front'); } } diff --git a/front/salix/locale/es.yml b/front/salix/locale/es.yml index 3caa41911..7929ed9f1 100644 --- a/front/salix/locale/es.yml +++ b/front/salix/locale/es.yml @@ -12,6 +12,7 @@ Claims: Reclamaciones Data saved!: ¡Datos guardados! Home: Inicio Items: Artículos +Workers: Trabajadores Locator: Localizador Logout: Cerrar sesión Modules access : Acceso a módulos diff --git a/modules/agency/front/routes.json b/modules/agency/front/routes.json index a773c5552..708545fa6 100644 --- a/modules/agency/front/routes.json +++ b/modules/agency/front/routes.json @@ -3,6 +3,10 @@ "name": "Agencies", "icon" : "local_shipping", "validations" : true, + "menu": [ + {"state": "zone.card.basicData", "icon": "settings"}, + {"state": "zone.card.location", "icon": "my_location"} + ], "routes": [ { "url": "/zone", @@ -10,28 +14,24 @@ "abstract": true, "component": "ui-view", "description": "Zones" - }, - { + }, { "url": "/index?q", "state": "zone.index", "component": "vn-zone-index", "description": "Zones", "acl": ["developer"] - }, - { + }, { "url": "/create", "state": "zone.create", "component": "vn-zone-create", "description": "New zone" - }, - { + }, { "url": "/:id", "state": "zone.card", "component": "vn-zone-card", "abstract": true, "description": "Detail" - }, - { + }, { "url": "/location?q", "state": "zone.card.location", "component": "vn-zone-location", @@ -39,8 +39,7 @@ "params": { "zone": "$ctrl.zone" } - }, - { + }, { "url": "/basic-data", "state": "zone.card.basicData", "component": "vn-zone-basic-data", @@ -49,9 +48,5 @@ "zone": "$ctrl.zone" } } - ], - "menu": [ - {"state": "zone.card.basicData", "icon": "settings"}, - {"state": "zone.card.location", "icon": "my_location"} ] } \ No newline at end of file diff --git a/modules/claim/front/routes.json b/modules/claim/front/routes.json index b1ee4cc14..eca447b90 100644 --- a/modules/claim/front/routes.json +++ b/modules/claim/front/routes.json @@ -4,6 +4,15 @@ "icon": "icon-claims", "validations": true, "dependencies": ["item", "client"], + "menu": [ + {"state": "claim.card.basicData", "icon": "settings"}, + {"state": "claim.card.detail", "icon": "icon-details"}, + {"state": "claim.card.development", "icon": "icon-traceability"}, + {"state": "claim.card.action", "icon": "icon-actions"} + ], + "keybindings": [ + {"key": "r", "state": "claim.index"} + ], "routes": [ { "url": "/claim", @@ -11,20 +20,17 @@ "abstract": true, "component": "ui-view", "description": "Claims" - }, - { + }, { "url": "/index?q", "state": "claim.index", "component": "vn-claim-index", "description": "Claims" - }, - { + }, { "url": "/:id", "state": "claim.card", "abstract": true, "component": "vn-claim-card" - }, - { + }, { "url": "/summary", "state": "claim.card.summary", "component": "vn-claim-summary", @@ -32,8 +38,7 @@ "params": { "claim": "$ctrl.claim" } - }, - { + }, { "url": "/basic-data", "state": "claim.card.basicData", "component": "vn-claim-basic-data", @@ -42,8 +47,7 @@ "claim": "$ctrl.claim" }, "acl": ["salesPerson"] - }, - { + }, { "url": "/detail", "state": "claim.card.detail", "component": "vn-claim-detail", @@ -52,8 +56,7 @@ "claim": "$ctrl.claim" }, "acl": ["salesPerson"] - }, - { + }, { "url": "/development", "state": "claim.card.development", "component": "vn-claim-development", @@ -62,8 +65,7 @@ "claim": "$ctrl.claim" }, "acl": ["salesAssistant"] - }, - { + }, { "url": "/action", "state": "claim.card.action", "component": "vn-claim-action", @@ -73,14 +75,5 @@ }, "acl": ["salesAssistant"] } - ], - "menu": [ - {"state": "claim.card.basicData", "icon": "settings"}, - {"state": "claim.card.detail", "icon": "icon-details"}, - {"state": "claim.card.development", "icon": "icon-traceability"}, - {"state": "claim.card.action", "icon": "icon-actions"} - ], - "keybindings": [ - {"key": "r", "state": "claim.index"} ] } \ No newline at end of file diff --git a/modules/client/front/routes.json b/modules/client/front/routes.json index db4feab0e..1e7cf533c 100644 --- a/modules/client/front/routes.json +++ b/modules/client/front/routes.json @@ -3,327 +3,6 @@ "name": "Clients", "icon": "person", "validations" : true, - "routes": [ - { - "url": "/client", - "state": "client", - "abstract": true, - "component": "ui-view", - "description": "Clients", - "acl": ["employee"] - }, - { - "url": "/index?q", - "state": "client.index", - "component": "vn-client-index", - "description": "Clients" - }, - { - "url": "/create", - "state": "client.create", - "component": "vn-client-create", - "description": "New client" - }, - { - "url": "/:id", - "state": "client.card", - "abstract": true, - "component": "vn-client-card" - }, - { - "url": "/summary", - "state": "client.card.summary", - "component": "vn-client-summary", - "description": "Summary", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/basic-data", - "state": "client.card.basicData", - "component": "vn-client-basic-data", - "description": "Basic data", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/fiscal-data", - "state": "client.card.fiscalData", - "component": "vn-client-fiscal-data", - "description": "Fiscal data", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/billing-data", - "state": "client.card.billingData", - "component": "vn-client-billing-data", - "description": "Pay method", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/address", - "state": "client.card.address", - "component": "ui-view", - "abstract": true - }, - { - "url": "/index", - "state": "client.card.address.index", - "component": "vn-client-address-index", - "description": "Addresses", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/create", - "state": "client.card.address.create", - "component": "vn-client-address-create", - "description": "New address" - }, - { - "url": "/:addressId/edit", - "state": "client.card.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" - } - }, - { - "url": "/note", - "state": "client.card.note", - "component": "ui-view", - "abstract": true - }, - { - "url": "/index", - "state": "client.card.note.index", - "component": "vn-client-note", - "description": "Notes", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/create", - "state": "client.card.note.create", - "component": "vn-note-create", - "description": "New note" - }, - { - "url": "/credit", - "abstract": true, - "state": "client.card.credit", - "component": "ui-view" - }, - { - "url": "/index", - "state": "client.card.credit.index", - "component": "vn-client-credit-index", - "description": "Credits", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/create", - "state": "client.card.credit.create", - "component": "vn-client-credit-create", - "description": "New credit", - "acl": ["teamBoss"], - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/greuge", - "abstract": true, - "state": "client.card.greuge", - "component": "ui-view" - }, - { - "url": "/index", - "state": "client.card.greuge.index", - "component": "vn-client-greuge-index", - "description": "Greuges", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/create", - "state": "client.card.greuge.create", - "component": "vn-client-greuge-create", - "description": "New greuge", - "acl": ["salesAssistant"], - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/mandate", - "state": "client.card.mandate", - "component": "vn-client-mandate", - "description": "Mandates" - }, - { - "url": "/risk", - "abstract": true, - "state": "client.card.risk", - "component": "ui-view" - }, - { - "url": "/index", - "state": "client.card.risk.index", - "component": "vn-client-risk-index", - "description": "Balance", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/create?payed&companyFk&bankFk&payedAmount", - "state": "client.card.risk.create", - "component": "vn-client-risk-create", - "description": "New payment", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/recovery", - "abstract": true, - "state": "client.card.recovery", - "component": "ui-view" - }, - { - "url": "/index", - "state": "client.card.recovery.index", - "component": "vn-client-recovery-index", - "description": "Recoveries", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/create", - "state": "client.card.recovery.create", - "component": "vn-client-recovery-create", - "description": "New recovery", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/credit-insurance", - "abstract": true, - "state": "client.card.creditInsurance", - "component": "ui-view", - "acl": ["creditInsurance"] - }, - { - "url": "/index", - "state": "client.card.creditInsurance.index", - "component": "vn-client-credit-insurance-index", - "description": "Credit contracts", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/create", - "state": "client.card.creditInsurance.create", - "component": "vn-client-credit-insurance-create", - "description": "New insurance", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/insurance", - "abstract": true, - "state": "client.card.creditInsurance.insurance", - "component": "ui-view", - "acl": ["creditInsurance"] - }, - { - "url": "/:classificationId/index", - "state": "client.card.creditInsurance.insurance.index", - "component": "vn-client-credit-insurance-insurance-index", - "description": "Requested credits", - "acl": ["creditInsurance"], - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/:classificationId/create", - "state": "client.card.creditInsurance.insurance.create", - "component": "vn-client-credit-insurance-insurance-create", - "description": "New credit", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/contact", - "state": "client.card.contact", - "component": "vn-client-contact", - "description": "Contacts", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/sample", - "abstract": true, - "state": "client.card.sample", - "component": "ui-view" - }, - { - "url": "/index", - "state": "client.card.sample.index", - "component": "vn-client-sample-index", - "description": "Samples", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/create", - "state": "client.card.sample.create", - "component": "vn-client-sample-create", - "description": "Send sample", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/web-payment", - "state": "client.card.webPayment", - "component": "vn-client-web-payment", - "description": "Web Payment" - }, - { - "url" : "/log", - "state": "client.card.log", - "component": "vn-client-log", - "description": "Log" - } - ], "menu": [ {"state": "client.card.basicData", "icon": "settings"}, {"state": "client.card.fiscalData", "icon": "account_balance"}, @@ -350,5 +29,286 @@ ], "keybindings": [ {"key": "c", "state": "client.index"} + ], + "routes": [ + { + "url": "/client", + "state": "client", + "abstract": true, + "component": "ui-view", + "description": "Clients", + "acl": ["employee"] + }, { + "url": "/index?q", + "state": "client.index", + "component": "vn-client-index", + "description": "Clients" + }, { + "url": "/create", + "state": "client.create", + "component": "vn-client-create", + "description": "New client" + }, { + "url": "/:id", + "state": "client.card", + "abstract": true, + "component": "vn-client-card" + }, { + "url": "/summary", + "state": "client.card.summary", + "component": "vn-client-summary", + "description": "Summary", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/basic-data", + "state": "client.card.basicData", + "component": "vn-client-basic-data", + "description": "Basic data", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/fiscal-data", + "state": "client.card.fiscalData", + "component": "vn-client-fiscal-data", + "description": "Fiscal data", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/billing-data", + "state": "client.card.billingData", + "component": "vn-client-billing-data", + "description": "Pay method", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/address", + "state": "client.card.address", + "component": "ui-view", + "abstract": true + }, { + "url": "/index", + "state": "client.card.address.index", + "component": "vn-client-address-index", + "description": "Addresses", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/create", + "state": "client.card.address.create", + "component": "vn-client-address-create", + "description": "New address" + }, { + "url": "/:addressId/edit", + "state": "client.card.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" + } + }, { + "url": "/note", + "state": "client.card.note", + "component": "ui-view", + "abstract": true + }, { + "url": "/index", + "state": "client.card.note.index", + "component": "vn-client-note", + "description": "Notes", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/create", + "state": "client.card.note.create", + "component": "vn-note-create", + "description": "New note" + }, { + "url": "/credit", + "abstract": true, + "state": "client.card.credit", + "component": "ui-view" + }, { + "url": "/index", + "state": "client.card.credit.index", + "component": "vn-client-credit-index", + "description": "Credits", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/create", + "state": "client.card.credit.create", + "component": "vn-client-credit-create", + "description": "New credit", + "acl": ["teamBoss"], + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/greuge", + "abstract": true, + "state": "client.card.greuge", + "component": "ui-view" + }, { + "url": "/index", + "state": "client.card.greuge.index", + "component": "vn-client-greuge-index", + "description": "Greuges", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/create", + "state": "client.card.greuge.create", + "component": "vn-client-greuge-create", + "description": "New greuge", + "acl": ["salesAssistant"], + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/mandate", + "state": "client.card.mandate", + "component": "vn-client-mandate", + "description": "Mandates" + }, { + "url": "/risk", + "abstract": true, + "state": "client.card.risk", + "component": "ui-view" + }, { + "url": "/index", + "state": "client.card.risk.index", + "component": "vn-client-risk-index", + "description": "Balance", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/create?payed&companyFk&bankFk&payedAmount", + "state": "client.card.risk.create", + "component": "vn-client-risk-create", + "description": "New payment", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/recovery", + "abstract": true, + "state": "client.card.recovery", + "component": "ui-view" + }, { + "url": "/index", + "state": "client.card.recovery.index", + "component": "vn-client-recovery-index", + "description": "Recoveries", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/create", + "state": "client.card.recovery.create", + "component": "vn-client-recovery-create", + "description": "New recovery", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/credit-insurance", + "abstract": true, + "state": "client.card.creditInsurance", + "component": "ui-view", + "acl": ["creditInsurance"] + }, { + "url": "/index", + "state": "client.card.creditInsurance.index", + "component": "vn-client-credit-insurance-index", + "description": "Credit contracts", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/create", + "state": "client.card.creditInsurance.create", + "component": "vn-client-credit-insurance-create", + "description": "New insurance", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/insurance", + "abstract": true, + "state": "client.card.creditInsurance.insurance", + "component": "ui-view", + "acl": ["creditInsurance"] + }, { + "url": "/:classificationId/index", + "state": "client.card.creditInsurance.insurance.index", + "component": "vn-client-credit-insurance-insurance-index", + "description": "Requested credits", + "acl": ["creditInsurance"], + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/:classificationId/create", + "state": "client.card.creditInsurance.insurance.create", + "component": "vn-client-credit-insurance-insurance-create", + "description": "New credit", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/contact", + "state": "client.card.contact", + "component": "vn-client-contact", + "description": "Contacts", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/sample", + "abstract": true, + "state": "client.card.sample", + "component": "ui-view" + }, { + "url": "/index", + "state": "client.card.sample.index", + "component": "vn-client-sample-index", + "description": "Samples", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/create", + "state": "client.card.sample.create", + "component": "vn-client-sample-create", + "description": "Send sample", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/web-payment", + "state": "client.card.webPayment", + "component": "vn-client-web-payment", + "description": "Web Payment" + }, { + "url" : "/log", + "state": "client.card.log", + "component": "vn-client-log", + "description": "Log" + } ] } diff --git a/modules/item/front/routes.json b/modules/item/front/routes.json index 5fd566896..b81625e06 100644 --- a/modules/item/front/routes.json +++ b/modules/item/front/routes.json @@ -4,119 +4,6 @@ "icon": "inbox", "validations" : true, "dependencies": ["client"], - "routes": [ - { - "url": "/item", - "state": "item", - "abstract": true, - "description": "Items", - "component": "ui-view" - }, - { - "url": "/index?q", - "state": "item.index", - "component": "vn-item-index", - "description": "Items" - }, - { - "url": "/create", - "state": "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" - }, - "acl": ["buyer"] - }, - { - "url" : "/tags", - "state": "item.card.tags", - "component": "vn-item-tags", - "description": "Tags", - "params": { - "item-tags": "$ctrl.itemTags" - }, - "acl": ["buyer"] - }, - { - "url" : "/tax", - "state": "item.card.tax", - "component": "vn-item-tax", - "description": "Tax", - "acl": ["administrative","buyer"] - }, - { - "url" : "/niche", - "state": "item.card.niche", - "component": "vn-item-niche", - "description": "Niches", - "params": { - "item": "$ctrl.item" - }, - "acl": ["buyer","replenisher"] - }, - { - "url" : "/botanical", - "state": "item.card.botanical", - "component": "vn-item-botanical", - "description": "Botanical", - "params": { - "item": "$ctrl.item" - }, - "acl": ["buyer"] - }, - { - "url" : "/barcode", - "state": "item.card.itemBarcode", - "component": "vn-item-barcode", - "description": "Barcodes", - "params": { - "item": "$ctrl.item" - }, - "acl": ["buyer","replenisher"] - }, - { - "url" : "/summary", - "state": "item.card.summary", - "component": "vn-item-summary", - "description": "Summary", - "params": { - "item": "$ctrl.item" - } - }, - { - "url" : "/diary?warehouseFk&ticketFk", - "state": "item.card.diary", - "component": "vn-item-diary", - "description": "Diary", - "params": { - "item": "$ctrl.item" - }, - "acl": ["employee"] - }, - { - "url" : "/last-entries", - "state": "item.card.last-entries", - "component": "vn-item-last-entries", - "description": "Last entries", - "params": { - "item": "$ctrl.item" - }, - "acl": ["employee"] - } - ], "menu": [ {"state": "item.card.data", "icon": "settings"}, {"state": "item.card.tags", "icon": "icon-tags"}, @@ -129,5 +16,106 @@ ], "keybindings": [ {"key": "a", "state": "item.index"} + ], + "routes": [ + { + "url": "/item", + "state": "item", + "abstract": true, + "description": "Items", + "component": "ui-view" + }, { + "url": "/index?q", + "state": "item.index", + "component": "vn-item-index", + "description": "Items" + }, { + "url": "/create", + "state": "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" + }, + "acl": ["buyer"] + }, { + "url" : "/tags", + "state": "item.card.tags", + "component": "vn-item-tags", + "description": "Tags", + "params": { + "item-tags": "$ctrl.itemTags" + }, + "acl": ["buyer"] + }, { + "url" : "/tax", + "state": "item.card.tax", + "component": "vn-item-tax", + "description": "Tax", + "acl": ["administrative","buyer"] + }, { + "url" : "/niche", + "state": "item.card.niche", + "component": "vn-item-niche", + "description": "Niches", + "params": { + "item": "$ctrl.item" + }, + "acl": ["buyer","replenisher"] + }, { + "url" : "/botanical", + "state": "item.card.botanical", + "component": "vn-item-botanical", + "description": "Botanical", + "params": { + "item": "$ctrl.item" + }, + "acl": ["buyer"] + }, { + "url" : "/barcode", + "state": "item.card.itemBarcode", + "component": "vn-item-barcode", + "description": "Barcodes", + "params": { + "item": "$ctrl.item" + }, + "acl": ["buyer","replenisher"] + }, { + "url" : "/summary", + "state": "item.card.summary", + "component": "vn-item-summary", + "description": "Summary", + "params": { + "item": "$ctrl.item" + } + }, { + "url" : "/diary?warehouseFk&ticketFk", + "state": "item.card.diary", + "component": "vn-item-diary", + "description": "Diary", + "params": { + "item": "$ctrl.item" + }, + "acl": ["employee"] + }, { + "url" : "/last-entries", + "state": "item.card.last-entries", + "component": "vn-item-last-entries", + "description": "Last entries", + "params": { + "item": "$ctrl.item" + }, + "acl": ["employee"] + } ] } \ No newline at end of file diff --git a/modules/order/front/routes.json b/modules/order/front/routes.json index 5431eda00..dda5ed646 100644 --- a/modules/order/front/routes.json +++ b/modules/order/front/routes.json @@ -4,6 +4,12 @@ "icon": "shopping_cart", "validations": true, "dependencies": ["item", "ticket"], + "menu": [ + {"state": "order.card.basicData", "icon": "settings"}, + {"state": "order.card.catalog", "icon": "shopping_cart"}, + {"state": "order.card.volume", "icon": "icon-volume"}, + {"state": "order.card.line", "icon": "icon-lines"} + ], "routes": [ { "url": "/order", @@ -11,20 +17,17 @@ "abstract": true, "component": "ui-view", "description": "Orders" - }, - { + }, { "url": "/index?q", "state": "order.index", "component": "vn-order-index", "description": "Orders" - }, - { + }, { "url": "/:id", "state": "order.card", "abstract": true, "component": "vn-order-card" - }, - { + }, { "url": "/summary", "state": "order.card.summary", "component": "vn-order-summary", @@ -32,8 +35,7 @@ "params": { "order": "$ctrl.order" } - }, - { + }, { "url": "/catalog?category&type", "state": "order.card.catalog", "component": "vn-order-catalog", @@ -41,8 +43,7 @@ "params": { "order": "$ctrl.order" } - }, - { + }, { "url": "/volume", "state": "order.card.volume", "component": "vn-order-volume", @@ -50,8 +51,7 @@ "params": { "order": "$ctrl.order" } - }, - { + }, { "url": "/line", "state": "order.card.line", "component": "vn-order-line", @@ -59,14 +59,12 @@ "params": { "order": "$ctrl.order" } - }, - { + }, { "url": "/create?clientFk", "state": "order.create", "component": "vn-order-create", "description": "New order" - }, - { + }, { "url": "/basic-data", "state": "order.card.basicData", "component": "vn-order-basic-data", @@ -75,11 +73,5 @@ "order": "$ctrl.order" } } - ], - "menu": [ - {"state": "order.card.basicData", "icon": "settings"}, - {"state": "order.card.catalog", "icon": "shopping_cart"}, - {"state": "order.card.volume", "icon": "icon-volume"}, - {"state": "order.card.line", "icon": "icon-lines"} ] } \ No newline at end of file diff --git a/modules/ticket/front/routes.json b/modules/ticket/front/routes.json index 1d64252a6..091b84b2e 100644 --- a/modules/ticket/front/routes.json +++ b/modules/ticket/front/routes.json @@ -4,228 +4,6 @@ "icon": "icon-ticket", "validations": true, "dependencies": ["item", "client"], - "routes": [ - { - "url": "/ticket", - "state": "ticket", - "abstract": true, - "component": "ui-view", - "description": "Tickets" - }, - { - "url": "/index?q", - "state": "ticket.index", - "component": "vn-ticket-index", - "description": "Tickets" - }, - { - "url": "/:id", - "state": "ticket.card", - "abstract": true, - "component": "vn-ticket-card" - }, - { - "url": "/summary", - "state": "ticket.card.summary", - "component": "vn-ticket-summary", - "description": "Summary", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url" : "/data", - "state": "ticket.card.data", - "component": "vn-ticket-data", - "abstract": true, - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url" : "/step-one", - "state": "ticket.card.data.stepOne", - "component": "vn-ticket-data-step-one", - "description": "Basic data", - "params": { - "ticket": "$ctrl.data" - } - }, - { - "url" : "/step-two", - "state": "ticket.card.data.stepTwo", - "component": "vn-ticket-data-step-two", - "description": "Price difference", - "params": { - "ticket": "$ctrl.data" - } - }, - { - "url" : "/step-three", - "state": "ticket.card.data.stepThree", - "component": "vn-ticket-data-step-three", - "description": "Charge", - "params": { - "ticket": "$ctrl.data" - } - }, - { - "url" : "/sale", - "state": "ticket.card.sale", - "component": "vn-ticket-sale", - "description": "Sale", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url": "/observation", - "state": "ticket.card.observation", - "component": "vn-ticket-observation", - "description": "Notes", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url": "/volume", - "state": "ticket.card.volume", - "component": "vn-ticket-volume", - "description": "Volume", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url": "/expedition", - "state": "ticket.card.expedition", - "component": "vn-ticket-expedition", - "description": "Expedition", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url" : "/package", - "abstract": true, - "state": "ticket.card.package", - "component": "ui-view" - }, - { - "url" : "/index", - "state": "ticket.card.package.index", - "component": "vn-ticket-package-index", - "description": "Packages", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url": "/tracking", - "state": "ticket.card.tracking", - "abstract": true, - "component": "ui-view" - }, - { - "url" : "/index", - "state": "ticket.card.tracking.index", - "component": "vn-ticket-tracking-index", - "description": "Tracking", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url": "/edit", - "state": "ticket.card.tracking.edit", - "component": "vn-ticket-tracking-edit", - "description": "New state", - "params": { - "ticket": "$ctrl.ticket" - }, - "acl": ["production", "administrative", "salesPerson"] - }, - { - "url" : "/sale-checked", - "state": "ticket.card.saleChecked", - "component": "vn-ticket-sale-checked", - "description": "Sale checked", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url" : "/components", - "state": "ticket.card.components", - "component": "vn-ticket-components", - "description": "Components", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url" : "/sale-tracking", - "state": "ticket.card.saleTracking", - "component": "vn-ticket-sale-tracking", - "description": "Sale tracking", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url" : "/picture", - "state": "ticket.card.picture", - "component": "vn-ticket-picture", - "description": "Pictures", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url" : "/log", - "state": "ticket.card.log", - "component": "vn-ticket-log", - "description": "Log" - }, - { - "url" : "/weekly", - "state": "ticket.weekly", - "component": "vn-ticket-weekly", - "description": "Weekly" - }, - { - "url": "/request", - "state": "ticket.card.request", - "abstract": true, - "component": "ui-view" - }, - { - "url": "/service", - "state": "ticket.card.service", - "component": "vn-ticket-service", - "description": "Service" - }, - { - "url" : "/index", - "state": "ticket.card.request.index", - "component": "vn-ticket-request-index", - "description": "Purchase request", - "acl": ["salesPerson"] - }, - { - "url" : "/create", - "state": "ticket.card.request.create", - "component": "vn-ticket-request-create", - "description": "Purchase request", - "acl": ["salesPerson"] - }, - { - "url": "/create?clientFk", - "state": "ticket.create", - "component": "vn-ticket-create", - "description": "New ticket" - } - ], "menu": [ {"state": "ticket.card.data.stepOne", "icon": "settings"}, {"state": "ticket.card.sale", "icon": "icon-lines"}, @@ -244,5 +22,200 @@ ], "keybindings": [ {"key": "t", "state": "ticket.index"} + ], + "routes": [ + { + "url": "/ticket", + "state": "ticket", + "abstract": true, + "component": "ui-view", + "description": "Tickets" + }, { + "url": "/index?q", + "state": "ticket.index", + "component": "vn-ticket-index", + "description": "Tickets" + }, { + "url": "/:id", + "state": "ticket.card", + "abstract": true, + "component": "vn-ticket-card" + }, { + "url": "/summary", + "state": "ticket.card.summary", + "component": "vn-ticket-summary", + "description": "Summary", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url" : "/data", + "state": "ticket.card.data", + "component": "vn-ticket-data", + "abstract": true, + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url" : "/step-one", + "state": "ticket.card.data.stepOne", + "component": "vn-ticket-data-step-one", + "description": "Basic data", + "params": { + "ticket": "$ctrl.data" + } + }, { + "url" : "/step-two", + "state": "ticket.card.data.stepTwo", + "component": "vn-ticket-data-step-two", + "description": "Price difference", + "params": { + "ticket": "$ctrl.data" + } + }, { + "url" : "/step-three", + "state": "ticket.card.data.stepThree", + "component": "vn-ticket-data-step-three", + "description": "Charge", + "params": { + "ticket": "$ctrl.data" + } + }, { + "url" : "/sale", + "state": "ticket.card.sale", + "component": "vn-ticket-sale", + "description": "Sale", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url": "/observation", + "state": "ticket.card.observation", + "component": "vn-ticket-observation", + "description": "Notes", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url": "/volume", + "state": "ticket.card.volume", + "component": "vn-ticket-volume", + "description": "Volume", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url": "/expedition", + "state": "ticket.card.expedition", + "component": "vn-ticket-expedition", + "description": "Expedition", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url" : "/package", + "abstract": true, + "state": "ticket.card.package", + "component": "ui-view" + }, { + "url" : "/index", + "state": "ticket.card.package.index", + "component": "vn-ticket-package-index", + "description": "Packages", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url": "/tracking", + "state": "ticket.card.tracking", + "abstract": true, + "component": "ui-view" + }, { + "url" : "/index", + "state": "ticket.card.tracking.index", + "component": "vn-ticket-tracking-index", + "description": "Tracking", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url": "/edit", + "state": "ticket.card.tracking.edit", + "component": "vn-ticket-tracking-edit", + "description": "New state", + "params": { + "ticket": "$ctrl.ticket" + }, + "acl": ["production", "administrative", "salesPerson"] + }, { + "url" : "/sale-checked", + "state": "ticket.card.saleChecked", + "component": "vn-ticket-sale-checked", + "description": "Sale checked", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url" : "/components", + "state": "ticket.card.components", + "component": "vn-ticket-components", + "description": "Components", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url" : "/sale-tracking", + "state": "ticket.card.saleTracking", + "component": "vn-ticket-sale-tracking", + "description": "Sale tracking", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url" : "/picture", + "state": "ticket.card.picture", + "component": "vn-ticket-picture", + "description": "Pictures", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url" : "/log", + "state": "ticket.card.log", + "component": "vn-ticket-log", + "description": "Log" + }, { + "url" : "/weekly", + "state": "ticket.weekly", + "component": "vn-ticket-weekly", + "description": "Weekly" + }, { + "url": "/request", + "state": "ticket.card.request", + "abstract": true, + "component": "ui-view" + }, { + "url": "/service", + "state": "ticket.card.service", + "component": "vn-ticket-service", + "description": "Service" + }, { + "url" : "/index", + "state": "ticket.card.request.index", + "component": "vn-ticket-request-index", + "description": "Purchase request", + "acl": ["salesPerson"] + }, { + "url" : "/create", + "state": "ticket.card.request.create", + "component": "vn-ticket-request-create", + "description": "Purchase request", + "acl": ["salesPerson"] + }, { + "url": "/create?clientFk", + "state": "ticket.create", + "component": "vn-ticket-create", + "description": "New ticket" + } ] } \ No newline at end of file diff --git a/modules/travel/front/routes.json b/modules/travel/front/routes.json index 0271c6486..979ae361a 100644 --- a/modules/travel/front/routes.json +++ b/modules/travel/front/routes.json @@ -9,8 +9,7 @@ "abstract": true, "component": "ui-view", "description": "Travels" - }, - { + }, { "url": "/index?q", "state": "travel.index", "component": "vn-travel-index", diff --git a/back/methods/worker-mana/getCurrentWorkerMana.js b/modules/worker/back/methods/worker-mana/getCurrentWorkerMana.js similarity index 100% rename from back/methods/worker-mana/getCurrentWorkerMana.js rename to modules/worker/back/methods/worker-mana/getCurrentWorkerMana.js diff --git a/back/methods/worker-mana/specs/getCurrentWorkerMana.spec.js b/modules/worker/back/methods/worker-mana/specs/getCurrentWorkerMana.spec.js similarity index 100% rename from back/methods/worker-mana/specs/getCurrentWorkerMana.spec.js rename to modules/worker/back/methods/worker-mana/specs/getCurrentWorkerMana.spec.js diff --git a/modules/worker/back/model-config.json b/modules/worker/back/model-config.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/modules/worker/back/model-config.json @@ -0,0 +1 @@ +{} diff --git a/back/models/worker-mana.js b/modules/worker/back/models/worker-mana.js similarity index 100% rename from back/models/worker-mana.js rename to modules/worker/back/models/worker-mana.js diff --git a/back/models/worker-mana.json b/modules/worker/back/models/worker-mana.json similarity index 100% rename from back/models/worker-mana.json rename to modules/worker/back/models/worker-mana.json diff --git a/back/models/worker-team-collegues.json b/modules/worker/back/models/worker-team-collegues.json similarity index 100% rename from back/models/worker-team-collegues.json rename to modules/worker/back/models/worker-team-collegues.json diff --git a/back/models/worker-team.json b/modules/worker/back/models/worker-team.json similarity index 100% rename from back/models/worker-team.json rename to modules/worker/back/models/worker-team.json diff --git a/back/models/worker.json b/modules/worker/back/models/worker.json similarity index 100% rename from back/models/worker.json rename to modules/worker/back/models/worker.json diff --git a/modules/worker/front/basic-data/index.html b/modules/worker/front/basic-data/index.html new file mode 100644 index 000000000..391628ecf --- /dev/null +++ b/modules/worker/front/basic-data/index.html @@ -0,0 +1,32 @@ + + + +
+ + + + + + + + + + + +
diff --git a/modules/worker/front/basic-data/index.js b/modules/worker/front/basic-data/index.js new file mode 100644 index 000000000..3b324a17c --- /dev/null +++ b/modules/worker/front/basic-data/index.js @@ -0,0 +1,29 @@ +import ngModule from '../module'; + +class Controller { + constructor($, $state) { + Object.assign(this, { + $, + $state + }); + } + + onSubmit() { + this.$.watcher.submit().then(() => { + this.card.reload(); + }); + } +} + +Controller.$inject = ['$scope', '$state']; + +ngModule.component('vnWorkerBasicData', { + template: require('./index.html'), + controller: Controller, + bindings: { + worker: '<' + }, + require: { + card: '^vnWorkerCard' + } +}); diff --git a/modules/worker/front/card/index.html b/modules/worker/front/card/index.html new file mode 100644 index 000000000..c7c2f5b41 --- /dev/null +++ b/modules/worker/front/card/index.html @@ -0,0 +1,7 @@ + +
+ + +
+
+
diff --git a/modules/worker/front/card/index.js b/modules/worker/front/card/index.js new file mode 100644 index 000000000..1e574aa1c --- /dev/null +++ b/modules/worker/front/card/index.js @@ -0,0 +1,28 @@ +import ngModule from '../module'; + +class Controller { + constructor($http, $stateParams) { + Object.assign(this, { + $http, + $stateParams, + }); + } + + $onInit() { + this.reload(); + } + + reload() { + let query = `api/Workers/${this.$stateParams.id}`; + this.$http.get(query).then(res => { + this.worker = res.data; + }); + } +} + +Controller.$inject = ['$http', '$stateParams']; + +ngModule.component('vnWorkerCard', { + template: require('./index.html'), + controller: Controller +}); diff --git a/modules/worker/front/descriptor/index.html b/modules/worker/front/descriptor/index.html new file mode 100644 index 000000000..9fdb87c1d --- /dev/null +++ b/modules/worker/front/descriptor/index.html @@ -0,0 +1,21 @@ +
+ + + + + + + + + +
+ + + + + + +
+
\ No newline at end of file diff --git a/modules/worker/front/descriptor/index.js b/modules/worker/front/descriptor/index.js new file mode 100644 index 000000000..c8c2cb5e6 --- /dev/null +++ b/modules/worker/front/descriptor/index.js @@ -0,0 +1,8 @@ +import ngModule from '../module'; + +ngModule.component('vnWorkerDescriptor', { + template: require('./index.html'), + bindings: { + worker: '<' + } +}); diff --git a/modules/worker/front/index.js b/modules/worker/front/index.js new file mode 100644 index 000000000..8b0bf8c6d --- /dev/null +++ b/modules/worker/front/index.js @@ -0,0 +1,8 @@ +export * from './module'; + +import './index/'; +import './summary'; +import './card'; +import './descriptor'; +import './search-panel'; +import './basic-data'; diff --git a/modules/worker/front/index/index.html b/modules/worker/front/index/index.html new file mode 100644 index 000000000..137543771 --- /dev/null +++ b/modules/worker/front/index/index.html @@ -0,0 +1,59 @@ + + +
+
+ + + + + + + + +
{{::$ctrl.worker.name}}
+ + + + +
+ + + + +
+
+ + No results + + + Enter a new search + +
+ +
+
+ + + + + \ No newline at end of file diff --git a/modules/worker/front/index/index.js b/modules/worker/front/index/index.js new file mode 100644 index 000000000..6619250af --- /dev/null +++ b/modules/worker/front/index/index.js @@ -0,0 +1,38 @@ +import ngModule from '../module'; + +export default class Controller { + constructor($) { + Object.assign(this, { + $, + selectedWorker: null + }); + } + + exprBuilder(param, value) { + switch (param) { + case 'search': + return /^\d+$/.test(value) + ? {id: value} + : {name: {like: `%${value}%`}}; + case 'name': + return {[param]: {like: `%${value}%`}}; + case 'id': + return {[param]: value}; + } + } + + preview(event, worker) { + if (event.defaultPrevented) return; + event.preventDefault(); + this.selectedWorker = worker; + this.$.preview.show(); + event.stopImmediatePropagation(); + } +} + +Controller.$inject = ['$scope']; + +ngModule.component('vnWorkerIndex', { + template: require('./index.html'), + controller: Controller +}); diff --git a/modules/worker/front/locale/en.yml b/modules/worker/front/locale/en.yml new file mode 100644 index 000000000..0d0641a66 --- /dev/null +++ b/modules/worker/front/locale/en.yml @@ -0,0 +1 @@ +Workers: Workers \ No newline at end of file diff --git a/modules/worker/front/locale/es.yml b/modules/worker/front/locale/es.yml new file mode 100644 index 000000000..32af56e16 --- /dev/null +++ b/modules/worker/front/locale/es.yml @@ -0,0 +1 @@ +Workers: Trabajadores \ No newline at end of file diff --git a/modules/worker/front/module.js b/modules/worker/front/module.js new file mode 100644 index 000000000..938d46892 --- /dev/null +++ b/modules/worker/front/module.js @@ -0,0 +1,3 @@ +import {ng} from 'core/vendor'; + +export default ng.module('worker', ['vnCore']); diff --git a/modules/worker/front/routes.json b/modules/worker/front/routes.json new file mode 100644 index 000000000..e13413d0f --- /dev/null +++ b/modules/worker/front/routes.json @@ -0,0 +1,46 @@ +{ + "module": "worker", + "name": "Workers", + "icon" : "icon-worker", + "validations" : true, + "menu": [ + {"state": "worker.card.basicData", "icon": "settings"} + ], + "routes": [ + { + "url": "/worker", + "state": "worker", + "abstract": true, + "component": "ui-view", + "description": "Workers" + }, { + "url": "/index?q", + "state": "worker.index", + "component": "vn-worker-index", + "description": "Workers", + "acl": ["developer"] + }, { + "url" : "/summary", + "state": "worker.card.summary", + "component": "vn-worker-summary", + "description": "Summary", + "params": { + "worker": "$ctrl.worker" + } + }, { + "url": "/:id", + "state": "worker.card", + "component": "vn-worker-card", + "abstract": true, + "description": "Detail" + }, { + "url": "/basic-data", + "state": "worker.card.basicData", + "component": "vn-worker-basic-data", + "description": "Basic data", + "params": { + "worker": "$ctrl.worker" + } + } + ] +} \ No newline at end of file diff --git a/modules/worker/front/search-panel/index.html b/modules/worker/front/search-panel/index.html new file mode 100644 index 000000000..02b8bcb36 --- /dev/null +++ b/modules/worker/front/search-panel/index.html @@ -0,0 +1,27 @@ +
+
+ + + + + + + + + + + + + +
+
\ No newline at end of file diff --git a/modules/worker/front/search-panel/index.js b/modules/worker/front/search-panel/index.js new file mode 100644 index 000000000..ef85c998b --- /dev/null +++ b/modules/worker/front/search-panel/index.js @@ -0,0 +1,7 @@ +import ngModule from '../module'; +import SearchPanel from 'core/components/searchbar/search-panel'; + +ngModule.component('vnWorkerSearchPanel', { + template: require('./index.html'), + controller: SearchPanel +}); diff --git a/modules/worker/front/summary/index.html b/modules/worker/front/summary/index.html new file mode 100644 index 000000000..63dae45d4 --- /dev/null +++ b/modules/worker/front/summary/index.html @@ -0,0 +1,15 @@ + +
{{worker.name}}
+ + + + + + + + + + +
\ No newline at end of file diff --git a/modules/worker/front/summary/index.js b/modules/worker/front/summary/index.js new file mode 100644 index 000000000..20b08c7ab --- /dev/null +++ b/modules/worker/front/summary/index.js @@ -0,0 +1,34 @@ +import ngModule from '../module'; + +class Controller { + constructor($, $http) { + Object.assign(this, { + $, + $http + }); + } + + get worker() { + return this._worker; + } + + set worker(value) { + this._worker = value; + this.$.worker = null; + if (value) { + this.$http.get(`api/Workers/${value.id}`).then(res => { + this.$.worker = res.data; + }); + } + } +} + +Controller.$inject = ['$scope', '$http']; + +ngModule.component('vnWorkerSummary', { + template: require('./index.html'), + controller: Controller, + bindings: { + worker: '<' + } +});