From 3bb1c92cf514edea4a699848f448d644810955e5 Mon Sep 17 00:00:00 2001 From: Joan Date: Wed, 23 May 2018 14:26:51 +0200 Subject: [PATCH] Client routes refactor #261 --- client/client/routes.json | 145 ++++++++++-------- .../create}/address-create.spec.js | 2 +- .../create/index.html} | 4 +- .../create/index.js} | 6 +- .../create}/locale/es.yml | 0 .../edit}/address-edit.spec.js | 2 +- .../edit/index.html} | 0 .../address-edit.js => address/edit/index.js} | 12 +- .../edit}/locale/es.yml | 0 .../index/index.html} | 4 +- .../addresses.js => address/index/index.js} | 12 +- .../index}/locale/es.yml | 0 .../{basic-data.html => index.html} | 0 .../basic-data/{basic-data.js => index.js} | 2 +- .../src/billing-data/billing-data.spec.js | 2 +- .../{billing-data.html => index.html} | 0 .../{billing-data.js => index.js} | 2 +- client/client/src/card/card.spec.js | 2 +- .../client/src/card/{card.html => index.html} | 2 +- client/client/src/card/{card.js => index.js} | 2 +- client/client/src/client.js | 54 +++---- client/client/src/create/create.spec.js | 4 +- .../src/create/{create.html => index.html} | 2 +- .../client/src/create/{create.js => index.js} | 4 +- .../create/index.html} | 0 .../create/index.js} | 8 +- .../index/credit-insurance-index.spec.js} | 2 +- .../index/index.html} | 4 +- .../index/index.js} | 6 +- .../index}/locale/es.yml | 0 .../insurance/create/index.html} | 2 +- .../insurance/create/index.js} | 6 +- .../insurance/create}/locale/es.yml | 0 .../index}/credit-insurance-list.spec.js | 2 +- .../insurance/index/index.html} | 2 +- .../insurance/index/index.js} | 6 +- .../insurance/index}/locale/es.yml | 0 client/client/src/credit-list/credit-list.js | 7 - .../create}/credit-create.spec.js | 4 +- .../create/index.html} | 0 .../create/index.js} | 6 +- .../create}/locale/es.yml | 0 .../index/index.html} | 2 +- client/client/src/credit/index/index.js | 7 + .../index}/locale/es.yml | 0 .../client/src/descriptor/descriptor.spec.js | 2 +- .../{descriptor.html => index.html} | 2 +- .../descriptor/{descriptor.js => index.js} | 8 +- .../src/fiscal-data/fiscal-data.spec.js | 2 +- .../{fiscal-data.html => index.html} | 0 .../fiscal-data/{fiscal-data.js => index.js} | 8 +- client/client/src/greuge-list/greuge-list.js | 7 - .../create}/greuge-create.spec.js | 4 +- .../create/index.html} | 0 .../create/index.js} | 12 +- .../index/index.html} | 2 +- client/client/src/greuge/index/index.js | 7 + .../index}/locale/es.yml | 0 client/client/src/index/index.html | 2 +- client/client/src/index/index.spec.js | 2 +- client/client/src/index/item-client.html | 2 +- .../invoices.html => invoice/index.html} | 0 .../invoices.js => invoice/index.js} | 4 +- .../src/{invoices => invoice}/locale/es.yml | 0 .../src/mandate/{mandate.html => index.html} | 0 .../src/mandate/{mandate.js => index.js} | 2 +- .../create/index.html} | 2 +- .../note-create.js => note/create/index.js} | 4 +- .../create}/locale/es.yml | 0 .../create}/note-create.spec.js | 2 +- .../notes.html => note/index/index.html} | 0 .../{notes/notes.js => note/index/index.js} | 8 +- .../src/{notes => note/index}/notes.spec.js | 4 +- .../create/index.html} | 0 .../create/index.js} | 12 +- .../create}/locale/es.yml | 0 .../create}/recovery-create.spec.js | 4 +- .../index/index.html} | 2 +- .../index/index.js} | 14 +- .../index}/locale/es.yml | 0 .../{search-panel.html => index.html} | 0 .../{search-panel.js => index.js} | 2 +- .../{client-summary.html => index.html} | 0 .../summary/{client-summary.js => index.js} | 2 +- .../{web-access.html => index.html} | 0 .../web-access/{web-access.js => index.js} | 2 +- .../client/src/web-access/web-access.spec.js | 2 +- e2e/helpers/selectors.js | 40 ++--- .../client-module/01_create_client.spec.js | 10 +- .../client-module/02_edit_basic_data.spec.js | 2 +- .../client-module/03_edit_fiscal_data.spec.js | 10 +- .../client-module/04_edit_pay_method.spec.js | 2 +- .../client-module/05_add_address.spec.js | 18 +-- .../06_add_address_notes.spec.js | 6 +- .../client-module/07_edit_web_access.spec.js | 2 +- e2e/paths/client-module/08_add_notes.spec.js | 10 +- e2e/paths/client-module/09_add_credit.spec.js | 6 +- e2e/paths/client-module/10_add_greuge.spec.js | 6 +- e2e/paths/client-module/11_mandate.spec.js | 2 +- .../12_lock_of_verified_data.spec.js | 11 +- e2e/paths/client-module/13_invoices.spec.js | 6 +- e2e/smokes/01_client_path.spec.js | 6 +- 102 files changed, 300 insertions(+), 290 deletions(-) rename client/client/src/{address-create => address/create}/address-create.spec.js (96%) rename client/client/src/{address-create/address-create.html => address/create/index.html} (93%) rename client/client/src/{address-create/address-create.js => address/create/index.js} (66%) rename client/client/src/{address-create => address/create}/locale/es.yml (100%) rename client/client/src/{address-edit => address/edit}/address-edit.spec.js (98%) rename client/client/src/{address-edit/address-edit.html => address/edit/index.html} (100%) rename client/client/src/{address-edit/address-edit.js => address/edit/index.js} (92%) rename client/client/src/{address-edit => address/edit}/locale/es.yml (100%) rename client/client/src/{addresses/addresses.html => address/index/index.html} (94%) rename client/client/src/{addresses/addresses.js => address/index/index.js} (62%) rename client/client/src/{addresses => address/index}/locale/es.yml (100%) rename client/client/src/basic-data/{basic-data.html => index.html} (100%) rename client/client/src/basic-data/{basic-data.js => index.js} (73%) rename client/client/src/billing-data/{billing-data.html => index.html} (100%) rename client/client/src/billing-data/{billing-data.js => index.js} (97%) rename client/client/src/card/{card.html => index.html} (89%) rename client/client/src/card/{card.js => index.js} (89%) rename client/client/src/create/{create.html => index.html} (98%) rename client/client/src/create/{create.js => index.js} (77%) rename client/client/src/{credit-classification-create/credit-classification-create.html => credit-insurance/create/index.html} (100%) rename client/client/src/{credit-classification-create/credit-classification-create.js => credit-insurance/create/index.js} (80%) rename client/client/src/{credit-classification-list/credit-classification-list.spec.js => credit-insurance/index/credit-insurance-index.spec.js} (98%) rename client/client/src/{credit-classification-list/credit-classification-list.html => credit-insurance/index/index.html} (93%) rename client/client/src/{credit-classification-list/credit-classification-list.js => credit-insurance/index/index.js} (92%) rename client/client/src/{credit-classification-list => credit-insurance/index}/locale/es.yml (100%) rename client/client/src/{credit-insurance-create/credit-insurance-create.html => credit-insurance/insurance/create/index.html} (90%) rename client/client/src/{credit-insurance-create/credit-insurance-create.js => credit-insurance/insurance/create/index.js} (70%) rename client/client/src/{credit-insurance-create => credit-insurance/insurance/create}/locale/es.yml (100%) rename client/client/src/{credit-insurance-list => credit-insurance/insurance/index}/credit-insurance-list.spec.js (97%) rename client/client/src/{credit-insurance-list/credit-insurance-list.html => credit-insurance/insurance/index/index.html} (93%) rename client/client/src/{credit-insurance-list/credit-insurance-list.js => credit-insurance/insurance/index/index.js} (86%) rename client/client/src/{credit-insurance-list => credit-insurance/insurance/index}/locale/es.yml (100%) delete mode 100644 client/client/src/credit-list/credit-list.js rename client/client/src/{credit-create => credit/create}/credit-create.spec.js (98%) rename client/client/src/{credit-create/credit-create.html => credit/create/index.html} (100%) rename client/client/src/{credit-create/credit-create.js => credit/create/index.js} (86%) rename client/client/src/{credit-create => credit/create}/locale/es.yml (100%) rename client/client/src/{credit-list/credit-list.html => credit/index/index.html} (95%) create mode 100644 client/client/src/credit/index/index.js rename client/client/src/{credit-list => credit/index}/locale/es.yml (100%) rename client/client/src/descriptor/{descriptor.html => index.html} (95%) rename client/client/src/descriptor/{descriptor.js => index.js} (84%) rename client/client/src/fiscal-data/{fiscal-data.html => index.html} (100%) rename client/client/src/fiscal-data/{fiscal-data.js => index.js} (88%) delete mode 100644 client/client/src/greuge-list/greuge-list.js rename client/client/src/{greuge-create => greuge/create}/greuge-create.spec.js (95%) rename client/client/src/{greuge-create/greuge-create.html => greuge/create/index.html} (100%) rename client/client/src/{greuge-create/greuge-create.js => greuge/create/index.js} (61%) rename client/client/src/{greuge-list/greuge-list.html => greuge/index/index.html} (96%) create mode 100644 client/client/src/greuge/index/index.js rename client/client/src/{greuge-list => greuge/index}/locale/es.yml (100%) rename client/client/src/{invoices/invoices.html => invoice/index.html} (100%) rename client/client/src/{invoices/invoices.js => invoice/index.js} (82%) rename client/client/src/{invoices => invoice}/locale/es.yml (100%) rename client/client/src/mandate/{mandate.html => index.html} (100%) rename client/client/src/mandate/{mandate.js => index.js} (80%) rename client/client/src/{note-create/note-create.html => note/create/index.html} (87%) rename client/client/src/{note-create/note-create.js => note/create/index.js} (77%) rename client/client/src/{note-create => note/create}/locale/es.yml (100%) rename client/client/src/{note-create => note/create}/note-create.spec.js (96%) rename client/client/src/{notes/notes.html => note/index/index.html} (100%) rename client/client/src/{notes/notes.js => note/index/index.js} (79%) rename client/client/src/{notes => note/index}/notes.spec.js (96%) rename client/client/src/{recovery-create/recovery-create.html => recovery/create/index.html} (100%) rename client/client/src/{recovery-create/recovery-create.js => recovery/create/index.js} (61%) rename client/client/src/{recovery-create => recovery/create}/locale/es.yml (100%) rename client/client/src/{recovery-create => recovery/create}/recovery-create.spec.js (94%) rename client/client/src/{recovery-list/recovery-list.html => recovery/index/index.html} (96%) rename client/client/src/{recovery-list/recovery-list.js => recovery/index/index.js} (54%) rename client/client/src/{recovery-list => recovery/index}/locale/es.yml (100%) rename client/client/src/search-panel/{search-panel.html => index.html} (100%) rename client/client/src/search-panel/{search-panel.js => index.js} (88%) rename client/client/src/summary/{client-summary.html => index.html} (100%) rename client/client/src/summary/{client-summary.js => index.js} (91%) rename client/client/src/web-access/{web-access.html => index.html} (100%) rename client/client/src/web-access/{web-access.js => index.js} (97%) diff --git a/client/client/routes.json b/client/client/routes.json index b8f77b1cc..284718e9f 100644 --- a/client/client/routes.json +++ b/client/client/routes.json @@ -5,25 +5,39 @@ "validations" : true, "routes": [ { - "url": "/clients?q", - "state": "clients", - "component": "vn-client-index", + "url": "/client", + "state": "client", + "abstract": true, + "component": "ui-view", "acl": ["employee"] }, + { + "url": "/index?q", + "state": "client.index", + "component": "vn-client-index" + }, { "url": "/create", - "state": "create", + "state": "client.create", "component": "vn-client-create" }, { - "url": "/clients/:id", - "state": "clientCard", + "url": "/:id", + "state": "client.card", "abstract": true, "component": "vn-client-card" }, + { + "url": "/summary", + "state": "client.card.summary", + "component": "vn-client-summary", + "params": { + "client": "$ctrl.client" + } + }, { "url": "/basic-data", - "state": "clientCard.basicData", + "state": "client.card.basicData", "component": "vn-client-basic-data", "params": { "client": "$ctrl.client" @@ -35,7 +49,7 @@ }, { "url": "/fiscal-data", - "state": "clientCard.fiscalData", + "state": "client.card.fiscalData", "component": "vn-client-fiscal-data", "params": { "client": "$ctrl.client" @@ -47,7 +61,7 @@ }, { "url": "/billing-data", - "state": "clientCard.billingData", + "state": "client.card.billingData", "component": "vn-client-billing-data", "params": { "client": "$ctrl.client" @@ -58,15 +72,15 @@ } }, { - "url": "/addresses", - "state": "clientCard.addresses", + "url": "/address", + "state": "client.card.address", "component": "ui-view", "abstract": true }, { - "url": "/list", - "state": "clientCard.addresses.list", - "component": "vn-client-addresses", + "url": "/index", + "state": "client.card.address.index", + "component": "vn-client-address-index", "params": { "client": "$ctrl.client" }, @@ -77,17 +91,17 @@ }, { "url": "/create", - "state": "clientCard.addresses.create", - "component": "vn-address-create" + "state": "client.card.address.create", + "component": "vn-client-address-create" }, { "url": "/:addressId/edit", - "state": "clientCard.addresses.edit", - "component": "vn-address-edit" + "state": "client.card.address.edit", + "component": "vn-client-address-edit" }, { "url": "/web-access", - "state": "clientCard.webAccess", + "state": "client.card.webAccess", "component": "vn-client-web-access", "params": { "client": "$ctrl.client" @@ -98,15 +112,15 @@ } }, { - "url": "/notes", - "state": "clientCard.notes", + "url": "/note", + "state": "client.card.note", "component": "ui-view", "abstract": true }, { - "url": "/list", - "state": "clientCard.notes.list", - "component": "vn-client-notes", + "url": "/index", + "state": "client.card.note.index", + "component": "vn-client-note", "params": { "client": "$ctrl.client" }, @@ -117,19 +131,19 @@ }, { "url": "/create", - "state": "clientCard.notes.create", + "state": "client.card.note.create", "component": "vn-note-create" }, { "url": "/credit", "abstract": true, - "state": "clientCard.credit", + "state": "client.card.credit", "component": "ui-view" }, { - "url": "/list", - "state": "clientCard.credit.list", - "component": "vn-client-credit-list", + "url": "/index", + "state": "client.card.credit.index", + "component": "vn-client-credit-index", "params": { "client": "$ctrl.client" }, @@ -137,9 +151,10 @@ "description": "Credit", "icon": "credit_card" } - }, { + }, + { "url": "/create", - "state": "clientCard.credit.create", + "state": "client.card.credit.create", "component": "vn-client-credit-create", "params": { "client": "$ctrl.client" @@ -148,13 +163,13 @@ { "url": "/greuge", "abstract": true, - "state": "clientCard.greuge", + "state": "client.card.greuge", "component": "ui-view" }, { - "url": "/list", - "state": "clientCard.greuge.list", - "component": "vn-client-greuge-list", + "url": "/index", + "state": "client.card.greuge.index", + "component": "vn-client-greuge-index", "params": { "client": "$ctrl.client" }, @@ -165,7 +180,7 @@ }, { "url": "/create", - "state": "clientCard.greuge.create", + "state": "client.card.greuge.create", "component": "vn-client-greuge-create", "params": { "client": "$ctrl.client" @@ -173,7 +188,7 @@ }, { "url": "/mandate", - "state": "clientCard.mandate", + "state": "client.card.mandate", "component": "vn-client-mandate", "menu": { "description": "Mandate", @@ -181,9 +196,9 @@ } }, { - "url": "/invoices", - "state": "clientCard.invoices", - "component": "vn-client-invoices", + "url": "/invoice", + "state": "client.card.invoice", + "component": "vn-client-invoice", "menu": { "description": "Invoices", "icon": "icon-invoices" @@ -192,13 +207,13 @@ { "url": "/recovery", "abstract": true, - "state": "clientCard.recovery", + "state": "client.card.recovery", "component": "ui-view" }, { - "url": "/list", - "state": "clientCard.recovery.list", - "component": "vn-client-recovery-list", + "url": "/index", + "state": "client.card.recovery.index", + "component": "vn-client-recovery-index", "params": { "client": "$ctrl.client" }, @@ -206,32 +221,26 @@ "description": "Recovery", "icon": "icon-recovery" } - }, { + }, + { "url": "/create", - "state": "clientCard.recovery.create", + "state": "client.card.recovery.create", "component": "vn-client-recovery-create", "params": { "client": "$ctrl.client" } - }, { - "url": "/summary", - "state": "clientCard.summary", - "component": "vn-client-summary", - "params": { - "client": "$ctrl.client" - } - }, + }, { - "url": "/credit-classification", + "url": "/credit-insurance", "abstract": true, - "state": "clientCard.creditClassification", + "state": "client.card.creditInsurance", "component": "ui-view", "acl": ["creditInsurance"] }, { - "url": "/list", - "state": "clientCard.creditClassification.list", - "component": "vn-client-credit-classification-list", + "url": "/index", + "state": "client.card.creditInsurance.index", + "component": "vn-client-credit-insurance-index", "params": { "client": "$ctrl.client" }, @@ -243,31 +252,31 @@ }, { "url": "/create", - "state": "clientCard.creditClassification.create", - "component": "vn-client-credit-classification-create", + "state": "client.card.creditInsurance.create", + "component": "vn-client-credit-insurance-create", "params": { "client": "$ctrl.client" } }, { - "url": "/credit-insurance", + "url": "/insurance", "abstract": true, - "state": "clientCard.creditInsurance", + "state": "client.card.creditInsurance.insurance", "component": "ui-view", "acl": ["creditInsurance"] }, { - "url": "/:classificationId/list", - "state": "clientCard.creditInsurance.list", - "component": "vn-client-credit-insurance-list", + "url": "/:classificationId/index", + "state": "client.card.creditInsurance.insurance.index", + "component": "vn-client-credit-insurance-insurance-index", "params": { "client": "$ctrl.client" } }, { "url": "/:classificationId/create", - "state": "clientCard.creditInsurance.create", - "component": "vn-client-credit-insurance-create", + "state": "client.card.creditInsurance.insurance.create", + "component": "vn-client-credit-insurance-insurance-create", "params": { "client": "$ctrl.client" } diff --git a/client/client/src/address-create/address-create.spec.js b/client/client/src/address/create/address-create.spec.js similarity index 96% rename from client/client/src/address-create/address-create.spec.js rename to client/client/src/address/create/address-create.spec.js index 4d17111ef..da18ee783 100644 --- a/client/client/src/address-create/address-create.spec.js +++ b/client/client/src/address/create/address-create.spec.js @@ -1,4 +1,4 @@ -import './address-create.js'; +import './index'; describe('Client', () => { describe('Component vnAddressCreate', () => { diff --git a/client/client/src/address-create/address-create.html b/client/client/src/address/create/index.html similarity index 93% rename from client/client/src/address-create/address-create.html rename to client/client/src/address/create/index.html index 71196c0c4..ed81daf8d 100644 --- a/client/client/src/address-create/address-create.html +++ b/client/client/src/address/create/index.html @@ -6,7 +6,7 @@ save="post" form="form"> -
+ Address @@ -44,7 +44,7 @@ diff --git a/client/client/src/address-create/address-create.js b/client/client/src/address/create/index.js similarity index 66% rename from client/client/src/address-create/address-create.js rename to client/client/src/address/create/index.js index a8326b3c7..8b9448f3c 100644 --- a/client/client/src/address-create/address-create.js +++ b/client/client/src/address/create/index.js @@ -1,4 +1,4 @@ -import ngModule from '../module'; +import ngModule from '../../module'; export default class Controller { constructor($state) { @@ -10,7 +10,7 @@ export default class Controller { } Controller.$inject = ['$state']; -ngModule.component('vnAddressCreate', { - template: require('./address-create.html'), +ngModule.component('vnClientAddressCreate', { + template: require('./index.html'), controller: Controller }); diff --git a/client/client/src/address-create/locale/es.yml b/client/client/src/address/create/locale/es.yml similarity index 100% rename from client/client/src/address-create/locale/es.yml rename to client/client/src/address/create/locale/es.yml diff --git a/client/client/src/address-edit/address-edit.spec.js b/client/client/src/address/edit/address-edit.spec.js similarity index 98% rename from client/client/src/address-edit/address-edit.spec.js rename to client/client/src/address/edit/address-edit.spec.js index 0c9692004..16e981c6b 100644 --- a/client/client/src/address-edit/address-edit.spec.js +++ b/client/client/src/address/edit/address-edit.spec.js @@ -1,4 +1,4 @@ -import './address-edit.js'; +import './index'; describe('Client', () => { describe('Component vnAddressEdit', () => { diff --git a/client/client/src/address-edit/address-edit.html b/client/client/src/address/edit/index.html similarity index 100% rename from client/client/src/address-edit/address-edit.html rename to client/client/src/address/edit/index.html diff --git a/client/client/src/address-edit/address-edit.js b/client/client/src/address/edit/index.js similarity index 92% rename from client/client/src/address-edit/address-edit.js rename to client/client/src/address/edit/index.js index 2272457ce..6fa31a1c0 100644 --- a/client/client/src/address-edit/address-edit.js +++ b/client/client/src/address/edit/index.js @@ -1,4 +1,4 @@ -import ngModule from '../module'; +import ngModule from '../../module'; export default class Controller { constructor($state, $scope, $http, $q, $translate, vnApp) { @@ -109,16 +109,16 @@ export default class Controller { ); } else if (canSubmitWatcher && !canSubmitObservations) { this.$scope.watcher.submit().then(() => { - this.$state.go('clientCard.addresses.list', {id: this.$state.params.id}); + this.$state.go('client.card.addresses.list', {id: this.$state.params.id}); this.card.reload(); }); } else if (!canSubmitWatcher && canSubmitObservations) { this._submitObservations(observationsObj).then(() => { - this.$state.go('clientCard.addresses.list', {id: this.$state.params.id}); + this.$state.go('client.card.addresses.list', {id: this.$state.params.id}); }); } else if (canSubmitWatcher && canSubmitObservations) { this.$q.all([this.$scope.watcher.submit(), this._submitObservations(observationsObj)]).then(() => { - this.$state.go('clientCard.addresses.list', {id: this.$state.params.id}); + this.$state.go('client.card.addresses.list', {id: this.$state.params.id}); }); } else { this.vnApp.showMessage( @@ -147,8 +147,8 @@ export default class Controller { } Controller.$inject = ['$state', '$scope', '$http', '$q', '$translate', 'vnApp']; -ngModule.component('vnAddressEdit', { - template: require('./address-edit.html'), +ngModule.component('vnClientAddressEdit', { + template: require('./index.html'), controller: Controller, require: { card: '^vnClientCard' diff --git a/client/client/src/address-edit/locale/es.yml b/client/client/src/address/edit/locale/es.yml similarity index 100% rename from client/client/src/address-edit/locale/es.yml rename to client/client/src/address/edit/locale/es.yml diff --git a/client/client/src/addresses/addresses.html b/client/client/src/address/index/index.html similarity index 94% rename from client/client/src/addresses/addresses.html rename to client/client/src/address/index/index.html index e6a1d1b5b..5df34ac32 100644 --- a/client/client/src/addresses/addresses.html +++ b/client/client/src/address/index/index.html @@ -38,7 +38,7 @@ {{::observation.description}} - + @@ -49,7 +49,7 @@ diff --git a/client/client/src/addresses/addresses.js b/client/client/src/address/index/index.js similarity index 62% rename from client/client/src/addresses/addresses.js rename to client/client/src/address/index/index.js index e42bad3fd..6af203667 100644 --- a/client/client/src/addresses/addresses.js +++ b/client/client/src/address/index/index.js @@ -1,6 +1,6 @@ -import ngModule from '../module'; +import ngModule from '../../module'; -class ClientAddresses { +class Controller { constructor($http, $scope) { this.$http = $http; this.$scope = $scope; @@ -14,9 +14,9 @@ class ClientAddresses { } } } -ClientAddresses.$inject = ['$http', '$scope']; +Controller.$inject = ['$http', '$scope']; -ngModule.component('vnClientAddresses', { - template: require('./addresses.html'), - controller: ClientAddresses +ngModule.component('vnClientAddressIndex', { + template: require('./index.html'), + controller: Controller }); diff --git a/client/client/src/addresses/locale/es.yml b/client/client/src/address/index/locale/es.yml similarity index 100% rename from client/client/src/addresses/locale/es.yml rename to client/client/src/address/index/locale/es.yml diff --git a/client/client/src/basic-data/basic-data.html b/client/client/src/basic-data/index.html similarity index 100% rename from client/client/src/basic-data/basic-data.html rename to client/client/src/basic-data/index.html diff --git a/client/client/src/basic-data/basic-data.js b/client/client/src/basic-data/index.js similarity index 73% rename from client/client/src/basic-data/basic-data.js rename to client/client/src/basic-data/index.js index e7d877432..093ef4bec 100644 --- a/client/client/src/basic-data/basic-data.js +++ b/client/client/src/basic-data/index.js @@ -1,7 +1,7 @@ import ngModule from '../module'; ngModule.component('vnClientBasicData', { - template: require('./basic-data.html'), + template: require('./index.html'), bindings: { client: '<' } diff --git a/client/client/src/billing-data/billing-data.spec.js b/client/client/src/billing-data/billing-data.spec.js index 9cdf03cac..33635839d 100644 --- a/client/client/src/billing-data/billing-data.spec.js +++ b/client/client/src/billing-data/billing-data.spec.js @@ -1,4 +1,4 @@ -import './billing-data.js'; +import './index'; describe('Client', () => { describe('Component vnClientBillingData', () => { diff --git a/client/client/src/billing-data/billing-data.html b/client/client/src/billing-data/index.html similarity index 100% rename from client/client/src/billing-data/billing-data.html rename to client/client/src/billing-data/index.html diff --git a/client/client/src/billing-data/billing-data.js b/client/client/src/billing-data/index.js similarity index 97% rename from client/client/src/billing-data/billing-data.js rename to client/client/src/billing-data/index.js index 43595bc88..928913ec3 100644 --- a/client/client/src/billing-data/billing-data.js +++ b/client/client/src/billing-data/index.js @@ -49,7 +49,7 @@ export default class Controller { Controller.$inject = ['$scope', '$http', 'vnApp', '$translate']; ngModule.component('vnClientBillingData', { - template: require('./billing-data.html'), + template: require('./index.html'), controller: Controller, bindings: { client: '<' diff --git a/client/client/src/card/card.spec.js b/client/client/src/card/card.spec.js index f29d318b4..4d385b47b 100644 --- a/client/client/src/card/card.spec.js +++ b/client/client/src/card/card.spec.js @@ -1,4 +1,4 @@ -import './card.js'; +import './index'; describe('Client', () => { describe('Component vnClientCard', () => { diff --git a/client/client/src/card/card.html b/client/client/src/card/index.html similarity index 89% rename from client/client/src/card/card.html rename to client/client/src/card/index.html index 626a81d71..c40a20169 100644 --- a/client/client/src/card/card.html +++ b/client/client/src/card/index.html @@ -7,7 +7,7 @@ - + diff --git a/client/client/src/card/card.js b/client/client/src/card/index.js similarity index 89% rename from client/client/src/card/card.js rename to client/client/src/card/index.js index 2993c24f3..1e3e4a754 100644 --- a/client/client/src/card/card.js +++ b/client/client/src/card/index.js @@ -13,7 +13,7 @@ export default class Controller { Controller.$inject = ['$scope']; ngModule.component('vnClientCard', { - template: require('./card.html'), + template: require('./index.html'), controller: Controller }); diff --git a/client/client/src/client.js b/client/client/src/client.js index f583127a2..4102bdd5c 100644 --- a/client/client/src/client.js +++ b/client/client/src/client.js @@ -1,29 +1,29 @@ export * from './module'; -import './index/index'; -import './card/card'; -import './create/create'; -import './basic-data/basic-data'; -import './fiscal-data/fiscal-data'; -import './billing-data/billing-data'; -import './descriptor/descriptor'; -import './search-panel/search-panel'; -import './addresses/addresses'; -import './address-create/address-create'; -import './address-edit/address-edit'; -import './notes/notes'; -import './note-create/note-create'; -import './web-access/web-access'; -import './credit-list/credit-list'; -import './credit-create/credit-create'; -import './greuge-list/greuge-list'; -import './greuge-create/greuge-create'; -import './mandate/mandate'; -import './invoices/invoices'; -import './summary/client-summary'; -import './recovery-list/recovery-list'; -import './recovery-create/recovery-create'; -import './credit-classification-list/credit-classification-list'; -import './credit-classification-create/credit-classification-create'; -import './credit-insurance-list/credit-insurance-list'; -import './credit-insurance-create/credit-insurance-create'; +import './index'; +import './card'; +import './create'; +import './basic-data'; +import './fiscal-data'; +import './billing-data'; +import './descriptor'; +import './search-panel'; +import './address/index'; +import './address/create'; +import './address/edit'; +import './note/index'; +import './note/create'; +import './web-access'; +import './credit/index'; +import './credit/create'; +import './greuge/index'; +import './greuge/create'; +import './mandate'; +import './invoice'; +import './summary'; +import './recovery/index'; +import './recovery/create'; +import './credit-insurance/index'; +import './credit-insurance/create'; +import './credit-insurance/insurance/index'; +import './credit-insurance/insurance/create'; diff --git a/client/client/src/create/create.spec.js b/client/client/src/create/create.spec.js index 491f273bb..36bf25af1 100644 --- a/client/client/src/create/create.spec.js +++ b/client/client/src/create/create.spec.js @@ -1,4 +1,4 @@ -import './create.js'; +import './index'; describe('Client', () => { describe('Component vnClientCreate', () => { @@ -38,7 +38,7 @@ describe('Client', () => { spyOn($state, 'go'); controller.onSubmit(); - expect(controller.$state.go).toHaveBeenCalledWith('clientCard.basicData', {id: '1234'}); + expect(controller.$state.go).toHaveBeenCalledWith('client.card.basicData', {id: '1234'}); }); }); }); diff --git a/client/client/src/create/create.html b/client/client/src/create/index.html similarity index 98% rename from client/client/src/create/create.html rename to client/client/src/create/index.html index c29ceaab2..7834684c9 100644 --- a/client/client/src/create/create.html +++ b/client/client/src/create/index.html @@ -63,7 +63,7 @@ diff --git a/client/client/src/create/create.js b/client/client/src/create/index.js similarity index 77% rename from client/client/src/create/create.js rename to client/client/src/create/index.js index 601bab71b..d7b1032fb 100644 --- a/client/client/src/create/create.js +++ b/client/client/src/create/index.js @@ -10,13 +10,13 @@ export default class Controller { } onSubmit() { this.$.watcher.submit().then( - json => this.$state.go('clientCard.basicData', {id: json.data.id}) + json => this.$state.go('client.card.basicData', {id: json.data.id}) ); } } Controller.$inject = ['$scope', '$state']; ngModule.component('vnClientCreate', { - template: require('./create.html'), + template: require('./index.html'), controller: Controller }); diff --git a/client/client/src/credit-classification-create/credit-classification-create.html b/client/client/src/credit-insurance/create/index.html similarity index 100% rename from client/client/src/credit-classification-create/credit-classification-create.html rename to client/client/src/credit-insurance/create/index.html diff --git a/client/client/src/credit-classification-create/credit-classification-create.js b/client/client/src/credit-insurance/create/index.js similarity index 80% rename from client/client/src/credit-classification-create/credit-classification-create.js rename to client/client/src/credit-insurance/create/index.js index 11968797c..81ab7c67d 100644 --- a/client/client/src/credit-classification-create/credit-classification-create.js +++ b/client/client/src/credit-insurance/create/index.js @@ -1,4 +1,4 @@ -import ngModule from '../module'; +import ngModule from '../../module'; class Controller { constructor($http, $filter, $state, $scope, $translate, vnApp) { @@ -22,15 +22,15 @@ class Controller { this.$http.post(query, data).then((res, err) => { if (res.data) - this.$state.go('clientCard.creditClassification.list'); + this.$state.go('client.card.creditInsurance.index'); }); } } Controller.$inject = ['$http', '$filter', '$state', '$scope', '$translate', 'vnApp']; -ngModule.component('vnClientCreditClassificationCreate', { - template: require('./credit-classification-create.html'), +ngModule.component('vnClientCreditInsuranceCreate', { + template: require('./index.html'), controller: Controller, bindings: { client: '<' diff --git a/client/client/src/credit-classification-list/credit-classification-list.spec.js b/client/client/src/credit-insurance/index/credit-insurance-index.spec.js similarity index 98% rename from client/client/src/credit-classification-list/credit-classification-list.spec.js rename to client/client/src/credit-insurance/index/credit-insurance-index.spec.js index 812c420d0..9f9743318 100644 --- a/client/client/src/credit-classification-list/credit-classification-list.spec.js +++ b/client/client/src/credit-insurance/index/credit-insurance-index.spec.js @@ -1,4 +1,4 @@ -import './credit-classification-list.js'; +import './index'; describe('Client', () => { describe('Component vnClientCreditClassificationList', () => { diff --git a/client/client/src/credit-classification-list/credit-classification-list.html b/client/client/src/credit-insurance/index/index.html similarity index 93% rename from client/client/src/credit-classification-list/credit-classification-list.html rename to client/client/src/credit-insurance/index/index.html index 28fbe7634..b285d3629 100644 --- a/client/client/src/credit-classification-list/credit-classification-list.html +++ b/client/client/src/credit-insurance/index/index.html @@ -33,7 +33,7 @@ - + @@ -44,7 +44,7 @@ ng-if="$ctrl.canCreateNew()" vn-tooltip="New contract" fixed-bottom-right - ui-sref="clientCard.creditClassification.create" + ui-sref="client.card.creditInsurance.create" icon="add" vn-bind="+" label="Add"> diff --git a/client/client/src/credit-classification-list/credit-classification-list.js b/client/client/src/credit-insurance/index/index.js similarity index 92% rename from client/client/src/credit-classification-list/credit-classification-list.js rename to client/client/src/credit-insurance/index/index.js index 8da3ba00a..cee5a20b2 100644 --- a/client/client/src/credit-classification-list/credit-classification-list.js +++ b/client/client/src/credit-insurance/index/index.js @@ -1,4 +1,4 @@ -import ngModule from '../module'; +import ngModule from '../../module'; class Controller { @@ -67,8 +67,8 @@ class Controller { Controller.$inject = ['$http', '$scope']; -ngModule.component('vnClientCreditClassificationList', { - template: require('./credit-classification-list.html'), +ngModule.component('vnClientCreditInsuranceIndex', { + template: require('./index.html'), controller: Controller, bindings: { client: '<' diff --git a/client/client/src/credit-classification-list/locale/es.yml b/client/client/src/credit-insurance/index/locale/es.yml similarity index 100% rename from client/client/src/credit-classification-list/locale/es.yml rename to client/client/src/credit-insurance/index/locale/es.yml diff --git a/client/client/src/credit-insurance-create/credit-insurance-create.html b/client/client/src/credit-insurance/insurance/create/index.html similarity index 90% rename from client/client/src/credit-insurance-create/credit-insurance-create.html rename to client/client/src/credit-insurance/insurance/create/index.html index 48dedebbe..49aae53ae 100644 --- a/client/client/src/credit-insurance-create/credit-insurance-create.html +++ b/client/client/src/credit-insurance/insurance/create/index.html @@ -6,7 +6,7 @@ save="post"> + ng-submit="watcher.submitGo('client.card.creditInsurance.insurance.index', {classificationId: post.params.classificationId})"> New classification diff --git a/client/client/src/credit-insurance-create/credit-insurance-create.js b/client/client/src/credit-insurance/insurance/create/index.js similarity index 70% rename from client/client/src/credit-insurance-create/credit-insurance-create.js rename to client/client/src/credit-insurance/insurance/create/index.js index f9d22189f..43cb1ccce 100644 --- a/client/client/src/credit-insurance-create/credit-insurance-create.js +++ b/client/client/src/credit-insurance/insurance/create/index.js @@ -1,4 +1,4 @@ -import ngModule from '../module'; +import ngModule from '../../../module'; class Controller { constructor($state, $filter) { @@ -11,8 +11,8 @@ class Controller { Controller.$inject = ['$state', '$filter']; -ngModule.component('vnClientCreditInsuranceCreate', { - template: require('./credit-insurance-create.html'), +ngModule.component('vnClientCreditInsuranceInsuranceCreate', { + template: require('./index.html'), controller: Controller, bindings: { client: '<' diff --git a/client/client/src/credit-insurance-create/locale/es.yml b/client/client/src/credit-insurance/insurance/create/locale/es.yml similarity index 100% rename from client/client/src/credit-insurance-create/locale/es.yml rename to client/client/src/credit-insurance/insurance/create/locale/es.yml diff --git a/client/client/src/credit-insurance-list/credit-insurance-list.spec.js b/client/client/src/credit-insurance/insurance/index/credit-insurance-list.spec.js similarity index 97% rename from client/client/src/credit-insurance-list/credit-insurance-list.spec.js rename to client/client/src/credit-insurance/insurance/index/credit-insurance-list.spec.js index c98e157b7..a9b28d6ec 100644 --- a/client/client/src/credit-insurance-list/credit-insurance-list.spec.js +++ b/client/client/src/credit-insurance/insurance/index/credit-insurance-list.spec.js @@ -1,4 +1,4 @@ -import './credit-insurance-list'; +import './index'; describe('Client', () => { describe('Component vnClientCreditInsuranceList', () => { diff --git a/client/client/src/credit-insurance-list/credit-insurance-list.html b/client/client/src/credit-insurance/insurance/index/index.html similarity index 93% rename from client/client/src/credit-insurance-list/credit-insurance-list.html rename to client/client/src/credit-insurance/insurance/index/index.html index b771e79a3..9380b4303 100644 --- a/client/client/src/credit-insurance-list/credit-insurance-list.html +++ b/client/client/src/credit-insurance/insurance/index/index.html @@ -25,7 +25,7 @@ - \ No newline at end of file diff --git a/client/client/src/credit-insurance-list/credit-insurance-list.js b/client/client/src/credit-insurance/insurance/index/index.js similarity index 86% rename from client/client/src/credit-insurance-list/credit-insurance-list.js rename to client/client/src/credit-insurance/insurance/index/index.js index ac5c90d43..5f8c14afd 100644 --- a/client/client/src/credit-insurance-list/credit-insurance-list.js +++ b/client/client/src/credit-insurance/insurance/index/index.js @@ -1,4 +1,4 @@ -import ngModule from '../module'; +import ngModule from '../../../module'; import FilterList from 'core/src/lib/filter-list'; class Controller extends FilterList { @@ -27,8 +27,8 @@ class Controller extends FilterList { Controller.$inject = ['$scope', '$timeout', '$state', '$http']; -ngModule.component('vnClientCreditInsuranceList', { - template: require('./credit-insurance-list.html'), +ngModule.component('vnClientCreditInsuranceInsuranceIndex', { + template: require('./index.html'), controller: Controller, bindings: { client: '<' diff --git a/client/client/src/credit-insurance-list/locale/es.yml b/client/client/src/credit-insurance/insurance/index/locale/es.yml similarity index 100% rename from client/client/src/credit-insurance-list/locale/es.yml rename to client/client/src/credit-insurance/insurance/index/locale/es.yml diff --git a/client/client/src/credit-list/credit-list.js b/client/client/src/credit-list/credit-list.js deleted file mode 100644 index b545df2da..000000000 --- a/client/client/src/credit-list/credit-list.js +++ /dev/null @@ -1,7 +0,0 @@ -import ngModule from '../module'; -import FilterClientList from '../filter-client-list'; - -ngModule.component('vnClientCreditList', { - template: require('./credit-list.html'), - controller: FilterClientList -}); diff --git a/client/client/src/credit-create/credit-create.spec.js b/client/client/src/credit/create/credit-create.spec.js similarity index 98% rename from client/client/src/credit-create/credit-create.spec.js rename to client/client/src/credit/create/credit-create.spec.js index e8ada36c9..a22521426 100644 --- a/client/client/src/credit-create/credit-create.spec.js +++ b/client/client/src/credit/create/credit-create.spec.js @@ -1,4 +1,4 @@ -import './credit-create.js'; +import './index'; describe('Client', () => { describe('Component vnClientCreditCreate', () => { @@ -78,7 +78,7 @@ describe('Client', () => { client.credit = 1; controller.addCredit(); - expect(controller.$state.go).toHaveBeenCalledWith('clientCard.credit.list'); + expect(controller.$state.go).toHaveBeenCalledWith('client.card.credit.list'); }); }); }); diff --git a/client/client/src/credit-create/credit-create.html b/client/client/src/credit/create/index.html similarity index 100% rename from client/client/src/credit-create/credit-create.html rename to client/client/src/credit/create/index.html diff --git a/client/client/src/credit-create/credit-create.js b/client/client/src/credit/create/index.js similarity index 86% rename from client/client/src/credit-create/credit-create.js rename to client/client/src/credit/create/index.js index 10e7aa7c4..951ab3310 100644 --- a/client/client/src/credit-create/credit-create.js +++ b/client/client/src/credit/create/index.js @@ -1,4 +1,4 @@ -import ngModule from '../module'; +import ngModule from '../../module'; class Controller { constructor($http, $scope, $state) { @@ -25,7 +25,7 @@ class Controller { addCredit() { this.$scope.watcher.submit().then( () => { - this.$state.go('clientCard.credit.list'); + this.$state.go('client.card.credit.index'); } ); } @@ -35,7 +35,7 @@ class Controller { Controller.$inject = ['$http', '$scope', '$state']; ngModule.component('vnClientCreditCreate', { - template: require('./credit-create.html'), + template: require('./index.html'), controller: Controller, bindings: { client: '<' diff --git a/client/client/src/credit-create/locale/es.yml b/client/client/src/credit/create/locale/es.yml similarity index 100% rename from client/client/src/credit-create/locale/es.yml rename to client/client/src/credit/create/locale/es.yml diff --git a/client/client/src/credit-list/credit-list.html b/client/client/src/credit/index/index.html similarity index 95% rename from client/client/src/credit-list/credit-list.html rename to client/client/src/credit/index/index.html index e1fdcf2b4..4e1b0e03f 100644 --- a/client/client/src/credit-list/credit-list.html +++ b/client/client/src/credit/index/index.html @@ -25,6 +25,6 @@ - + \ No newline at end of file diff --git a/client/client/src/credit/index/index.js b/client/client/src/credit/index/index.js new file mode 100644 index 000000000..ee9fc3f3c --- /dev/null +++ b/client/client/src/credit/index/index.js @@ -0,0 +1,7 @@ +import ngModule from '../../module'; +import FilterClientList from '../../filter-client-list'; + +ngModule.component('vnClientCreditIndex', { + template: require('./index.html'), + controller: FilterClientList +}); diff --git a/client/client/src/credit-list/locale/es.yml b/client/client/src/credit/index/locale/es.yml similarity index 100% rename from client/client/src/credit-list/locale/es.yml rename to client/client/src/credit/index/locale/es.yml diff --git a/client/client/src/descriptor/descriptor.spec.js b/client/client/src/descriptor/descriptor.spec.js index 19e2d2c7c..f59ff9bb2 100644 --- a/client/client/src/descriptor/descriptor.spec.js +++ b/client/client/src/descriptor/descriptor.spec.js @@ -1,4 +1,4 @@ -import './descriptor.js'; +import './index'; describe('Descriptor', () => { describe('Component vnClientDescriptor', () => { diff --git a/client/client/src/descriptor/descriptor.html b/client/client/src/descriptor/index.html similarity index 95% rename from client/client/src/descriptor/descriptor.html rename to client/client/src/descriptor/index.html index d1449154e..eeff236a3 100644 --- a/client/client/src/descriptor/descriptor.html +++ b/client/client/src/descriptor/index.html @@ -4,7 +4,7 @@ - + diff --git a/client/client/src/descriptor/descriptor.js b/client/client/src/descriptor/index.js similarity index 84% rename from client/client/src/descriptor/descriptor.js rename to client/client/src/descriptor/index.js index b8d68c493..d71a336d6 100644 --- a/client/client/src/descriptor/descriptor.js +++ b/client/client/src/descriptor/index.js @@ -1,6 +1,6 @@ import ngModule from '../module'; -class ClientDescriptor { +class Controller { constructor($http) { this.$http = $http; } @@ -25,12 +25,12 @@ class ClientDescriptor { } } } -ClientDescriptor.$inject = ['$http']; +Controller.$inject = ['$http']; ngModule.component('vnClientDescriptor', { - template: require('./descriptor.html'), + template: require('./index.html'), bindings: { client: '<' }, - controller: ClientDescriptor + controller: Controller }); diff --git a/client/client/src/fiscal-data/fiscal-data.spec.js b/client/client/src/fiscal-data/fiscal-data.spec.js index 653029c6f..a16593ddb 100644 --- a/client/client/src/fiscal-data/fiscal-data.spec.js +++ b/client/client/src/fiscal-data/fiscal-data.spec.js @@ -1,4 +1,4 @@ -import './fiscal-data.js'; +import './index'; describe('Client', () => { describe('Component vnClientFiscalData', () => { diff --git a/client/client/src/fiscal-data/fiscal-data.html b/client/client/src/fiscal-data/index.html similarity index 100% rename from client/client/src/fiscal-data/fiscal-data.html rename to client/client/src/fiscal-data/index.html diff --git a/client/client/src/fiscal-data/fiscal-data.js b/client/client/src/fiscal-data/index.js similarity index 88% rename from client/client/src/fiscal-data/fiscal-data.js rename to client/client/src/fiscal-data/index.js index 27e314ca7..933227383 100644 --- a/client/client/src/fiscal-data/fiscal-data.js +++ b/client/client/src/fiscal-data/index.js @@ -1,6 +1,6 @@ import ngModule from '../module'; -export default class ClientFiscalData { +export default class Controller { constructor($scope, $http, vnApp, $translate) { this.$ = $scope; this.$http = $http; @@ -49,11 +49,11 @@ export default class ClientFiscalData { } } } -ClientFiscalData.$inject = ['$scope', '$http', 'vnApp', '$translate']; +Controller.$inject = ['$scope', '$http', 'vnApp', '$translate']; ngModule.component('vnClientFiscalData', { - template: require('./fiscal-data.html'), - controller: ClientFiscalData, + template: require('./index.html'), + controller: Controller, bindings: { client: '<' } diff --git a/client/client/src/greuge-list/greuge-list.js b/client/client/src/greuge-list/greuge-list.js deleted file mode 100644 index 9bb863721..000000000 --- a/client/client/src/greuge-list/greuge-list.js +++ /dev/null @@ -1,7 +0,0 @@ -import ngModule from '../module'; -import FilterClientList from '../filter-client-list'; - -ngModule.component('vnClientGreugeList', { - template: require('./greuge-list.html'), - controller: FilterClientList -}); diff --git a/client/client/src/greuge-create/greuge-create.spec.js b/client/client/src/greuge/create/greuge-create.spec.js similarity index 95% rename from client/client/src/greuge-create/greuge-create.spec.js rename to client/client/src/greuge/create/greuge-create.spec.js index 1cc408088..db2167742 100644 --- a/client/client/src/greuge-create/greuge-create.spec.js +++ b/client/client/src/greuge/create/greuge-create.spec.js @@ -1,4 +1,4 @@ -import './greuge-create.js'; +import './index'; describe('Client', () => { describe('Component vnClientGreugeCreate', () => { @@ -32,7 +32,7 @@ describe('Client', () => { spyOn($state, 'go'); controller.onSubmit(); - expect(controller.$state.go).toHaveBeenCalledWith('clientCard.greuge.list'); + expect(controller.$state.go).toHaveBeenCalledWith('client.card.greuge.list'); }); }); }); diff --git a/client/client/src/greuge-create/greuge-create.html b/client/client/src/greuge/create/index.html similarity index 100% rename from client/client/src/greuge-create/greuge-create.html rename to client/client/src/greuge/create/index.html diff --git a/client/client/src/greuge-create/greuge-create.js b/client/client/src/greuge/create/index.js similarity index 61% rename from client/client/src/greuge-create/greuge-create.js rename to client/client/src/greuge/create/index.js index 3e8aa96a8..9d14e259f 100644 --- a/client/client/src/greuge-create/greuge-create.js +++ b/client/client/src/greuge/create/index.js @@ -1,6 +1,6 @@ -import ngModule from '../module'; +import ngModule from '../../module'; -class ClientGreugeCreate { +class Controller { constructor($scope, $state, $filter) { this.$ = $scope; this.$state = $state; @@ -12,14 +12,14 @@ class ClientGreugeCreate { this.greuge.clientFk = this.$state.params.id; this.$.watcher.submit().then( () => { - this.$state.go('clientCard.greuge.list'); + this.$state.go('client.card.greuge.index'); } ); } } -ClientGreugeCreate.$inject = ['$scope', '$state', '$filter']; +Controller.$inject = ['$scope', '$state', '$filter']; ngModule.component('vnClientGreugeCreate', { - template: require('./greuge-create.html'), - controller: ClientGreugeCreate + template: require('./index.html'), + controller: Controller }); diff --git a/client/client/src/greuge-list/greuge-list.html b/client/client/src/greuge/index/index.html similarity index 96% rename from client/client/src/greuge-list/greuge-list.html rename to client/client/src/greuge/index/index.html index e9b776ba6..a5b18b693 100644 --- a/client/client/src/greuge-list/greuge-list.html +++ b/client/client/src/greuge/index/index.html @@ -33,7 +33,7 @@ - + \ No newline at end of file diff --git a/client/client/src/greuge/index/index.js b/client/client/src/greuge/index/index.js new file mode 100644 index 000000000..06ef11513 --- /dev/null +++ b/client/client/src/greuge/index/index.js @@ -0,0 +1,7 @@ +import ngModule from '../../module'; +import FilterClientList from '../../filter-client-list'; + +ngModule.component('vnClientGreugeIndex', { + template: require('./index.html'), + controller: FilterClientList +}); diff --git a/client/client/src/greuge-list/locale/es.yml b/client/client/src/greuge/index/locale/es.yml similarity index 100% rename from client/client/src/greuge-list/locale/es.yml rename to client/client/src/greuge/index/locale/es.yml diff --git a/client/client/src/index/index.html b/client/client/src/index/index.html index 1dea34205..7949fec8c 100644 --- a/client/client/src/index/index.html +++ b/client/client/src/index/index.html @@ -22,7 +22,7 @@ - + { describe('Component vnClientIndex', () => { diff --git a/client/client/src/index/item-client.html b/client/client/src/index/item-client.html index 2799dcb3a..4be3e42a4 100644 --- a/client/client/src/index/item-client.html +++ b/client/client/src/index/item-client.html @@ -1,5 +1,5 @@ diff --git a/client/client/src/invoices/invoices.html b/client/client/src/invoice/index.html similarity index 100% rename from client/client/src/invoices/invoices.html rename to client/client/src/invoice/index.html diff --git a/client/client/src/invoices/invoices.js b/client/client/src/invoice/index.js similarity index 82% rename from client/client/src/invoices/invoices.js rename to client/client/src/invoice/index.js index 6f1ea5df1..6dcfdb258 100644 --- a/client/client/src/invoices/invoices.js +++ b/client/client/src/invoice/index.js @@ -9,7 +9,7 @@ class Controller extends FilterClientList { } Controller.$inject = ['$scope', '$timeout', '$state', '$stateParams']; -ngModule.component('vnClientInvoices', { - template: require('./invoices.html'), +ngModule.component('vnClientInvoice', { + template: require('./index.html'), controller: Controller }); diff --git a/client/client/src/invoices/locale/es.yml b/client/client/src/invoice/locale/es.yml similarity index 100% rename from client/client/src/invoices/locale/es.yml rename to client/client/src/invoice/locale/es.yml diff --git a/client/client/src/mandate/mandate.html b/client/client/src/mandate/index.html similarity index 100% rename from client/client/src/mandate/mandate.html rename to client/client/src/mandate/index.html diff --git a/client/client/src/mandate/mandate.js b/client/client/src/mandate/index.js similarity index 80% rename from client/client/src/mandate/mandate.js rename to client/client/src/mandate/index.js index f21f83d28..d290db569 100644 --- a/client/client/src/mandate/mandate.js +++ b/client/client/src/mandate/index.js @@ -2,6 +2,6 @@ import ngModule from '../module'; import FilterClientList from '../filter-client-list'; ngModule.component('vnClientMandate', { - template: require('./mandate.html'), + template: require('./index.html'), controller: FilterClientList }); diff --git a/client/client/src/note-create/note-create.html b/client/client/src/note/create/index.html similarity index 87% rename from client/client/src/note-create/note-create.html rename to client/client/src/note/create/index.html index f55718eb9..1351de708 100644 --- a/client/client/src/note-create/note-create.html +++ b/client/client/src/note/create/index.html @@ -6,7 +6,7 @@ save="post" form="form"> - + New note diff --git a/client/client/src/note-create/note-create.js b/client/client/src/note/create/index.js similarity index 77% rename from client/client/src/note-create/note-create.js rename to client/client/src/note/create/index.js index 3f5c68ce2..d6c557eee 100644 --- a/client/client/src/note-create/note-create.js +++ b/client/client/src/note/create/index.js @@ -1,4 +1,4 @@ -import ngModule from '../module'; +import ngModule from '../../module'; export default class Controller { constructor($state) { @@ -11,6 +11,6 @@ export default class Controller { Controller.$inject = ['$state']; ngModule.component('vnNoteCreate', { - template: require('./note-create.html'), + template: require('./index.html'), controller: Controller }); diff --git a/client/client/src/note-create/locale/es.yml b/client/client/src/note/create/locale/es.yml similarity index 100% rename from client/client/src/note-create/locale/es.yml rename to client/client/src/note/create/locale/es.yml diff --git a/client/client/src/note-create/note-create.spec.js b/client/client/src/note/create/note-create.spec.js similarity index 96% rename from client/client/src/note-create/note-create.spec.js rename to client/client/src/note/create/note-create.spec.js index 1414835fd..bf5cc591b 100644 --- a/client/client/src/note-create/note-create.spec.js +++ b/client/client/src/note/create/note-create.spec.js @@ -1,4 +1,4 @@ -import './note-create.js'; +import './index'; describe('Client', () => { describe('Component vnNoteCreate', () => { diff --git a/client/client/src/notes/notes.html b/client/client/src/note/index/index.html similarity index 100% rename from client/client/src/notes/notes.html rename to client/client/src/note/index/index.html diff --git a/client/client/src/notes/notes.js b/client/client/src/note/index/index.js similarity index 79% rename from client/client/src/notes/notes.js rename to client/client/src/note/index/index.js index 119c983e2..12a5e3338 100644 --- a/client/client/src/notes/notes.js +++ b/client/client/src/note/index/index.js @@ -1,4 +1,4 @@ -import ngModule from '../module'; +import ngModule from '../../module'; export default class Controller { constructor($http, $state) { @@ -22,13 +22,13 @@ export default class Controller { } newObservation() { - this.$state.go("clientCard.notes.create", {id: this.client.id}); + this.$state.go("client.card.note.create", {id: this.client.id}); } } Controller.$inject = ['$http', '$state']; -ngModule.component('vnClientNotes', { - template: require('./notes.html'), +ngModule.component('vnClientNote', { + template: require('./index.html'), controller: Controller, bindings: { client: '<' diff --git a/client/client/src/notes/notes.spec.js b/client/client/src/note/index/notes.spec.js similarity index 96% rename from client/client/src/notes/notes.spec.js rename to client/client/src/note/index/notes.spec.js index 1ec7744de..ea8a1884e 100644 --- a/client/client/src/notes/notes.spec.js +++ b/client/client/src/note/index/notes.spec.js @@ -1,4 +1,4 @@ -import './notes.js'; +import './index'; describe('Client', () => { describe('Component vnClientNotes', () => { @@ -51,7 +51,7 @@ describe('Client', () => { spyOn(controller.$state, 'go'); controller.newObservation(); - expect(controller.$state.go).toHaveBeenCalledWith('clientCard.notes.create', Object({id: '1234'})); + expect(controller.$state.go).toHaveBeenCalledWith('client.card.notes.create', Object({id: '1234'})); }); }); }); diff --git a/client/client/src/recovery-create/recovery-create.html b/client/client/src/recovery/create/index.html similarity index 100% rename from client/client/src/recovery-create/recovery-create.html rename to client/client/src/recovery/create/index.html diff --git a/client/client/src/recovery-create/recovery-create.js b/client/client/src/recovery/create/index.js similarity index 61% rename from client/client/src/recovery-create/recovery-create.js rename to client/client/src/recovery/create/index.js index 67e4421a2..71ec7acc7 100644 --- a/client/client/src/recovery-create/recovery-create.js +++ b/client/client/src/recovery/create/index.js @@ -1,6 +1,6 @@ -import ngModule from '../module'; +import ngModule from '../../module'; -class ClientRecoveryCreate { +class Controller { constructor($scope, $state, $filter) { this.$ = $scope; this.$state = $state; @@ -12,14 +12,14 @@ class ClientRecoveryCreate { this.recovery.clientFk = this.$state.params.id; this.$.watcher.submit().then( () => { - this.$state.go('clientCard.recovery.list'); + this.$state.go('client.card.recovery.list'); } ); } } -ClientRecoveryCreate.$inject = ['$scope', '$state', '$filter']; +Controller.$inject = ['$scope', '$state', '$filter']; ngModule.component('vnClientRecoveryCreate', { - template: require('./recovery-create.html'), - controller: ClientRecoveryCreate + template: require('./index.html'), + controller: Controller }); diff --git a/client/client/src/recovery-create/locale/es.yml b/client/client/src/recovery/create/locale/es.yml similarity index 100% rename from client/client/src/recovery-create/locale/es.yml rename to client/client/src/recovery/create/locale/es.yml diff --git a/client/client/src/recovery-create/recovery-create.spec.js b/client/client/src/recovery/create/recovery-create.spec.js similarity index 94% rename from client/client/src/recovery-create/recovery-create.spec.js rename to client/client/src/recovery/create/recovery-create.spec.js index eede3a8f9..5561d6f7d 100644 --- a/client/client/src/recovery-create/recovery-create.spec.js +++ b/client/client/src/recovery/create/recovery-create.spec.js @@ -1,4 +1,4 @@ -import './recovery-create.js'; +import './index'; describe('Client', () => { describe('Component vnClientRecoveryCreate', () => { @@ -32,7 +32,7 @@ describe('Client', () => { spyOn($state, 'go'); controller.onSubmit(); - expect(controller.$state.go).toHaveBeenCalledWith('clientCard.recovery.list'); + expect(controller.$state.go).toHaveBeenCalledWith('client.card.recovery.list'); }); }); }); diff --git a/client/client/src/recovery-list/recovery-list.html b/client/client/src/recovery/index/index.html similarity index 96% rename from client/client/src/recovery-list/recovery-list.html rename to client/client/src/recovery/index/index.html index 31e6fc747..11e7ef896 100644 --- a/client/client/src/recovery-list/recovery-list.html +++ b/client/client/src/recovery/index/index.html @@ -33,6 +33,6 @@ - + \ No newline at end of file diff --git a/client/client/src/recovery-list/recovery-list.js b/client/client/src/recovery/index/index.js similarity index 54% rename from client/client/src/recovery-list/recovery-list.js rename to client/client/src/recovery/index/index.js index 5996f2d50..733d67abf 100644 --- a/client/client/src/recovery-list/recovery-list.js +++ b/client/client/src/recovery/index/index.js @@ -1,7 +1,7 @@ -import ngModule from '../module'; -import FilterClientList from '../filter-client-list'; +import ngModule from '../../module'; +import FilterClientList from '../../filter-client-list'; -class ClientRecoveryList extends FilterClientList { +class Controller extends FilterClientList { constructor($scope, $timeout, $state, $http) { super($scope, $timeout, $state); this.$http = $http; @@ -16,9 +16,9 @@ class ClientRecoveryList extends FilterClientList { } } -ClientRecoveryList.$inject = ['$scope', '$timeout', '$state', '$http']; +Controller.$inject = ['$scope', '$timeout', '$state', '$http']; -ngModule.component('vnClientRecoveryList', { - template: require('./recovery-list.html'), - controller: ClientRecoveryList +ngModule.component('vnClientRecoveryIndex', { + template: require('./index.html'), + controller: Controller }); diff --git a/client/client/src/recovery-list/locale/es.yml b/client/client/src/recovery/index/locale/es.yml similarity index 100% rename from client/client/src/recovery-list/locale/es.yml rename to client/client/src/recovery/index/locale/es.yml diff --git a/client/client/src/search-panel/search-panel.html b/client/client/src/search-panel/index.html similarity index 100% rename from client/client/src/search-panel/search-panel.html rename to client/client/src/search-panel/index.html diff --git a/client/client/src/search-panel/search-panel.js b/client/client/src/search-panel/index.js similarity index 88% rename from client/client/src/search-panel/search-panel.js rename to client/client/src/search-panel/index.js index 74c4647ba..5033dcb65 100644 --- a/client/client/src/search-panel/search-panel.js +++ b/client/client/src/search-panel/index.js @@ -13,6 +13,6 @@ export default class Controller { Controller.$inject = []; ngModule.component('vnClientSearchPanel', { - template: require('./search-panel.html'), + template: require('./index.html'), controller: Controller }); diff --git a/client/client/src/summary/client-summary.html b/client/client/src/summary/index.html similarity index 100% rename from client/client/src/summary/client-summary.html rename to client/client/src/summary/index.html diff --git a/client/client/src/summary/client-summary.js b/client/client/src/summary/index.js similarity index 91% rename from client/client/src/summary/client-summary.js rename to client/client/src/summary/index.js index 9a10cb7a1..a8a54b55a 100644 --- a/client/client/src/summary/client-summary.js +++ b/client/client/src/summary/index.js @@ -20,7 +20,7 @@ class Controller { Controller.$inject = ['$http']; ngModule.component('vnClientSummary', { - template: require('./client-summary.html'), + template: require('./index.html'), controller: Controller, bindings: { client: '<' diff --git a/client/client/src/web-access/web-access.html b/client/client/src/web-access/index.html similarity index 100% rename from client/client/src/web-access/web-access.html rename to client/client/src/web-access/index.html diff --git a/client/client/src/web-access/web-access.js b/client/client/src/web-access/index.js similarity index 97% rename from client/client/src/web-access/web-access.js rename to client/client/src/web-access/index.js index 5545b96f8..8116e6c33 100644 --- a/client/client/src/web-access/web-access.js +++ b/client/client/src/web-access/index.js @@ -62,7 +62,7 @@ export default class Controller { Controller.$inject = ['$scope', '$http', 'vnApp']; ngModule.component('vnClientWebAccess', { - template: require('./web-access.html'), + template: require('./index.html'), controller: Controller, bindings: { client: '<' diff --git a/client/client/src/web-access/web-access.spec.js b/client/client/src/web-access/web-access.spec.js index a700f4c8b..aec8ea72e 100644 --- a/client/client/src/web-access/web-access.spec.js +++ b/client/client/src/web-access/web-access.spec.js @@ -1,4 +1,4 @@ -import './web-access.js'; +import './index'; describe('Component VnClientWebAccess', () => { let $componentController; diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index e36069078..20fb52730 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -7,11 +7,11 @@ export default { logOutButton: `#logout`, applicationsMenuButton: `#apps`, applicationsMenuVisible: `vn-main-menu [vn-id="apps-menu"] ul`, - clientsButton: `vn-main-menu [vn-id="apps-menu"] ul > li[ui-sref="clients"]`, + clientsButton: `vn-main-menu [vn-id="apps-menu"] ul > li[ui-sref="client.index"]`, ticketsButton: `vn-main-menu [vn-id="apps-menu"] ul > li[ui-sref="ticket.list"]` }, moduleAccessView: { - clientsSectionButton: `vn-home a[ui-sref="clients"]`, + clientsSectionButton: `vn-home a[ui-sref="client.index"]`, itemsSectionButton: `vn-home a[ui-sref="item.index"]`, ticketsSectionButton: `vn-home a[ui-sref="ticket.list"]` }, @@ -30,10 +30,10 @@ export default { salesPersonInput: `vn-autocomplete[field="$ctrl.client.salesPersonFk"] input`, salesBruceBannerOption: `vn-autocomplete[field="$ctrl.client.salesPersonFk"] vn-drop-down ul > li:nth-child(1)`, createButton: `${components.vnSubmit}`, - cancelButton: `button[href="#!/clients"]` + cancelButton: `button[href="#!/client/index"]` }, clientBasicData: { - basicDataButton: `${components.vnMenuItem}[ui-sref="clientCard.basicData"]`, + basicDataButton: `${components.vnMenuItem}[ui-sref="client.card.basicData"]`, nameInput: `${components.vnTextfield}[name="name"]`, contactInput: `${components.vnTextfield}[name="contact"]`, phoneInput: `${components.vnTextfield}[name="phone"]`, @@ -47,7 +47,7 @@ export default { saveButton: `${components.vnSubmit}` }, clientFiscalData: { - fiscalDataButton: `${components.vnMenuItem}[ui-sref="clientCard.fiscalData"]`, + fiscalDataButton: `${components.vnMenuItem}[ui-sref="client.card.fiscalData"]`, socialNameInput: `${components.vnTextfield}[name="socialName"]`, fiscalIdInput: `${components.vnTextfield}[name="fi"]`, equalizationTaxCheckboxLabel: `${components.vnCheck}[label='Is equalizated'] > label > input`, @@ -69,7 +69,7 @@ export default { saveButton: `${components.vnSubmit}` }, clientPayMethod: { - payMethodButton: `${components.vnMenuItem}[ui-sref="clientCard.billingData"]`, + payMethodButton: `${components.vnMenuItem}[ui-sref="client.card.billingData"]`, payMethodInput: `${components.vnAutocomplete}[field="$ctrl.client.payMethodFk"] input`, payMethodIBANOption: `${components.vnAutocomplete}[field="$ctrl.client.payMethodFk"] vn-drop-down ul > li:nth-child(5)`, payMethodOptionOne: `${components.vnAutocomplete}[field="$ctrl.client.payMethodFk"] vn-drop-down ul > li:nth-child(2)`, @@ -82,7 +82,7 @@ export default { saveButton: `${components.vnSubmit}` }, clientAddresses: { - addressesButton: `${components.vnMenuItem}[ui-sref="clientCard.addresses.list"]`, + addressesButton: `${components.vnMenuItem}[ui-sref="client.card.address.index"]`, createAddress: `${components.vnFloatButton}`, defaultCheckboxInput: `${components.vnCheck}[label='Default'] > label > input`, consigneeInput: `${components.vnTextfield}[name="nickname"]`, @@ -95,8 +95,8 @@ export default { agenctySecondOption: `${components.vnAutocomplete}[field="$ctrl.address.agencyModeFk"] vn-drop-down ul > li:nth-child(2)`, phoneInput: `${components.vnTextfield}[name="phone"]`, mobileInput: `${components.vnTextfield}[name="mobile"]`, - defaultAddress: 'vn-client-addresses > vn-vertical > vn-card > div > vn-horizontal:nth-child(2) > vn-one > vn-horizontal > vn-one > div:nth-child(2)', - secondMakeDefaultStar: 'vn-client-addresses > vn-vertical > vn-card > div > vn-horizontal:nth-child(3) > vn-one > vn-horizontal > vn-none > i', + defaultAddress: 'vn-client-address-index > vn-vertical > vn-card > div > vn-horizontal:nth-child(2) > vn-one > vn-horizontal > vn-one > div:nth-child(2)', + secondMakeDefaultStar: 'vn-client-address-index > vn-vertical > vn-card > div > vn-horizontal:nth-child(3) > vn-one > vn-horizontal > vn-none > i', firstEditButton: `${components.vnIconButton}[icon='edit']`, secondEditButton: `vn-horizontal:nth-child(3) > vn-one > vn-horizontal > a > ${components.vnIconButton}[icon='edit']`, activeCheckbox: `${components.vnCheck}[label='Enabled'] > label > input`, @@ -112,45 +112,45 @@ export default { thirdObservationDescriptionInput: `vn-horizontal:nth-child(5) > vn-textfield[label="Description"] > div > input`, addObservationButton: `${components.vnIcon}[icon="add_circle"]`, saveButton: `${components.vnSubmit}`, - cancelButton: `button[ui-sref="clientCard.addresses.list"]` + cancelButton: `button[ui-sref="client.card.address.index"]` }, clientWebAccess: { - webAccessButton: `${components.vnMenuItem}[ui-sref="clientCard.webAccess"]`, + webAccessButton: `${components.vnMenuItem}[ui-sref="client.card.webAccess"]`, enableWebAccessCheckbox: `${components.vnCheck}[label='Enable web access'] > label > input`, userNameInput: `${components.vnTextfield}[name="name"]`, saveButton: `${components.vnSubmit}` }, clientNotes: { - notesButton: `${components.vnMenuItem}[ui-sref="clientCard.notes.list"]`, + notesButton: `${components.vnMenuItem}[ui-sref="client.card.note.index"]`, addNoteFloatButton: `${components.vnFloatButton}`, noteInput: `${components.vnTextarea}[label="Note"]`, saveButton: `${components.vnSubmit}`, - firstNoteText: 'vn-client-notes .text' + firstNoteText: 'vn-client-note .text' }, clientCredit: { - creditButton: `${components.vnMenuItem}[ui-sref="clientCard.credit.list"]`, + creditButton: `${components.vnMenuItem}[ui-sref="client.card.credit.index"]`, addCreditFloatButton: `${components.vnFloatButton}`, creditInput: `${components.vnTextfield}[name="credit"]`, saveButton: `${components.vnSubmit}`, - firstCreditText: 'vn-client-credit-list .list-element' + firstCreditText: 'vn-client-credit-index .list-element' }, clientGreuge: { - greugeButton: `${components.vnMenuItem}[ui-sref="clientCard.greuge.list"]`, + greugeButton: `${components.vnMenuItem}[ui-sref="client.card.greuge.index"]`, addGreugeFloatButton: `${components.vnFloatButton}`, amountInput: `${components.vnTextfield}[name="amount"]`, descriptionInput: `${components.vnTextfield}[name="description"]`, typeInput: `${components.vnAutocomplete}[field="$ctrl.greuge.greugeTypeFk"] input`, typeSecondOption: `${components.vnAutocomplete}[field="$ctrl.greuge.greugeTypeFk"] vn-drop-down ul > li`, saveButton: `${components.vnSubmit}`, - firstGreugeText: 'vn-client-greuge-list .list-element' + firstGreugeText: 'vn-client-greuge-index .list-element' }, clientMandate: { - mandateButton: `${components.vnMenuItem}[ui-sref="clientCard.mandate"]`, + mandateButton: `${components.vnMenuItem}[ui-sref="client.card.mandate"]`, firstMandateText: 'vn-client-mandate .list-element' }, clientInvoices: { - invoicesButton: `${components.vnMenuItem}[ui-sref="clientCard.invoices"]`, - firstInvoiceText: 'vn-client-invoices .list-element' + invoicesButton: `${components.vnMenuItem}[ui-sref="client.card.invoice"]`, + firstInvoiceText: 'vn-client-invoice .list-element' }, itemsIndex: { createItemButton: `${components.vnFloatButton}`, diff --git a/e2e/paths/client-module/01_create_client.spec.js b/e2e/paths/client-module/01_create_client.spec.js index d33183906..7b3497ee1 100644 --- a/e2e/paths/client-module/01_create_client.spec.js +++ b/e2e/paths/client-module/01_create_client.spec.js @@ -16,7 +16,7 @@ describe('Client', () => { .wait(selectors.clientsIndex.createClientButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/clients'); + expect(url.hash).toEqual('#!/client/index'); }); }); @@ -38,7 +38,7 @@ describe('Client', () => { .wait(selectors.createClientView.createButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/create'); + expect(url.hash).toEqual('#!/client/create'); }); }); @@ -48,7 +48,7 @@ describe('Client', () => { .wait(selectors.clientsIndex.createClientButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/clients'); + expect(url.hash).toEqual('#!/client/index'); }); }); @@ -58,7 +58,7 @@ describe('Client', () => { .wait(selectors.createClientView.createButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/create'); + expect(url.hash).toEqual('#!/client/create'); }); }); @@ -117,7 +117,7 @@ describe('Client', () => { .wait(selectors.clientsIndex.createClientButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/clients'); + expect(url.hash).toEqual('#!/client/index'); }); }); diff --git a/e2e/paths/client-module/02_edit_basic_data.spec.js b/e2e/paths/client-module/02_edit_basic_data.spec.js index 2f764b35b..e8724c84a 100644 --- a/e2e/paths/client-module/02_edit_basic_data.spec.js +++ b/e2e/paths/client-module/02_edit_basic_data.spec.js @@ -18,7 +18,7 @@ describe('Client', () => { .wait(selectors.clientsIndex.createClientButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/clients'); + expect(url.hash).toEqual('#!/client/index'); }); }); diff --git a/e2e/paths/client-module/03_edit_fiscal_data.spec.js b/e2e/paths/client-module/03_edit_fiscal_data.spec.js index 00ad34468..70a7efbab 100644 --- a/e2e/paths/client-module/03_edit_fiscal_data.spec.js +++ b/e2e/paths/client-module/03_edit_fiscal_data.spec.js @@ -18,7 +18,7 @@ describe('Client', () => { .wait(selectors.clientsIndex.createClientButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/clients'); + expect(url.hash).toEqual('#!/client/index'); }); }); @@ -40,10 +40,10 @@ describe('Client', () => { .waitForTextInElement(selectors.clientsIndex.searchResult, 'Bruce Banner') .waitToClick(selectors.clientsIndex.searchResult) .waitToClick(selectors.clientAddresses.addressesButton) - .waitForURL('/addresses/list') + .waitForURL('/address/index') .url() .then(url => { - expect(url).toContain('/addresses/list'); + expect(url).toContain('/address/index'); }); }); @@ -126,10 +126,10 @@ describe('Client', () => { it(`should click on the addresses button to access to the client's addresses`, () => { return nightmare .waitToClick(selectors.clientAddresses.addressesButton) - .waitForURL('/addresses/list') + .waitForURL('/address/index') .url() .then(url => { - expect(url).toContain('/addresses/list'); + expect(url).toContain('/address/index'); }); }); diff --git a/e2e/paths/client-module/04_edit_pay_method.spec.js b/e2e/paths/client-module/04_edit_pay_method.spec.js index 90e766b58..72dd068bd 100644 --- a/e2e/paths/client-module/04_edit_pay_method.spec.js +++ b/e2e/paths/client-module/04_edit_pay_method.spec.js @@ -18,7 +18,7 @@ describe('Client', () => { .wait(selectors.clientsIndex.createClientButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/clients'); + expect(url.hash).toEqual('#!/client/index'); }); }); diff --git a/e2e/paths/client-module/05_add_address.spec.js b/e2e/paths/client-module/05_add_address.spec.js index a5137fb5c..1855dba3b 100644 --- a/e2e/paths/client-module/05_add_address.spec.js +++ b/e2e/paths/client-module/05_add_address.spec.js @@ -18,7 +18,7 @@ describe('Client', () => { .wait(selectors.clientsIndex.createClientButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/clients'); + expect(url.hash).toEqual('#!/client/index'); }); }); @@ -39,40 +39,40 @@ describe('Client', () => { .waitForTextInElement(selectors.clientsIndex.searchResult, 'Bruce Banner') .waitToClick(selectors.clientsIndex.searchResult) .waitToClick(selectors.clientAddresses.addressesButton) - .waitForURL('addresses/list') + .waitForURL('address/index') .url() .then(url => { - expect(url).toContain('addresses/list'); + expect(url).toContain('address/index'); }); }); it(`should click on the add new address button to access to the new address form`, () => { return nightmare .waitToClick(selectors.clientAddresses.createAddress) - .waitForURL('addresses/create') + .waitForURL('address/create') .url() .then(url => { - expect(url).toContain('addresses/create'); + expect(url).toContain('address/create'); }); }); it(`should return to the addreses section by clicking the cancel button`, () => { return nightmare .waitToClick(selectors.clientAddresses.cancelButton) - .waitForURL('addresses/list') + .waitForURL('address/index') .url() .then(url => { - expect(url).toContain('addresses/list'); + expect(url).toContain('address/index'); }); }); it(`should now click on the add new address button to access to the new address form`, () => { return nightmare .waitToClick(selectors.clientAddresses.createAddress) - .waitForURL('addresses/create') + .waitForURL('address/create') .url() .then(url => { - expect(url).toContain('addresses/create'); + expect(url).toContain('address/create'); }); }); diff --git a/e2e/paths/client-module/06_add_address_notes.spec.js b/e2e/paths/client-module/06_add_address_notes.spec.js index fb08cbf10..4b243698d 100644 --- a/e2e/paths/client-module/06_add_address_notes.spec.js +++ b/e2e/paths/client-module/06_add_address_notes.spec.js @@ -18,7 +18,7 @@ describe('Client', () => { .wait(selectors.clientsIndex.createClientButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/clients'); + expect(url.hash).toEqual('#!/client/index'); }); }); @@ -39,10 +39,10 @@ describe('Client', () => { .waitForTextInElement(selectors.clientsIndex.searchResult, 'Petter Parker') .waitToClick(selectors.clientsIndex.searchResult) .waitToClick(selectors.clientAddresses.addressesButton) - .waitForURL('addresses/list') + .waitForURL('address/index') .url() .then(url => { - expect(url).toContain('addresses/list'); + expect(url).toContain('address/index'); }); }); diff --git a/e2e/paths/client-module/07_edit_web_access.spec.js b/e2e/paths/client-module/07_edit_web_access.spec.js index 18679e58b..3b20674bb 100644 --- a/e2e/paths/client-module/07_edit_web_access.spec.js +++ b/e2e/paths/client-module/07_edit_web_access.spec.js @@ -18,7 +18,7 @@ describe('Client', () => { .wait(selectors.clientsIndex.createClientButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/clients'); + expect(url.hash).toEqual('#!/client/index'); }); }); diff --git a/e2e/paths/client-module/08_add_notes.spec.js b/e2e/paths/client-module/08_add_notes.spec.js index 5265accf2..5b3852b1a 100644 --- a/e2e/paths/client-module/08_add_notes.spec.js +++ b/e2e/paths/client-module/08_add_notes.spec.js @@ -18,7 +18,7 @@ describe('Client', () => { .wait(selectors.clientsIndex.createClientButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/clients'); + expect(url.hash).toEqual('#!/client/index'); }); }); @@ -39,20 +39,20 @@ describe('Client', () => { .waitForTextInElement(selectors.clientsIndex.searchResult, 'Bruce Banner') .waitToClick(selectors.clientsIndex.searchResult) .waitToClick(selectors.clientNotes.notesButton) - .waitForURL('notes/list') + .waitForURL('note/index') .url() .then(url => { - expect(url).toContain('notes/list'); + expect(url).toContain('note/index'); }); }); it(`should click on the add note button`, () => { return nightmare .waitToClick(selectors.clientNotes.addNoteFloatButton) - .waitForURL('/notes/create') + .waitForURL('/note/create') .url() .then(url => { - expect(url).toContain('/notes/create'); + expect(url).toContain('/note/create'); }); }); diff --git a/e2e/paths/client-module/09_add_credit.spec.js b/e2e/paths/client-module/09_add_credit.spec.js index d066f7596..fc5fe9560 100644 --- a/e2e/paths/client-module/09_add_credit.spec.js +++ b/e2e/paths/client-module/09_add_credit.spec.js @@ -18,7 +18,7 @@ describe('Client', () => { .wait(selectors.clientsIndex.createClientButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/clients'); + expect(url.hash).toEqual('#!/client/index'); }); }); @@ -39,10 +39,10 @@ describe('Client', () => { .waitForTextInElement(selectors.clientsIndex.searchResult, 'Ororo Munroe') .waitToClick(selectors.clientsIndex.searchResult) .waitToClick(selectors.clientCredit.creditButton) - .waitForURL('credit/list') + .waitForURL('credit/index') .url() .then(url => { - expect(url).toContain('credit/list'); + expect(url).toContain('credit/index'); }); }); diff --git a/e2e/paths/client-module/10_add_greuge.spec.js b/e2e/paths/client-module/10_add_greuge.spec.js index a9cc6c94b..da6aea9e2 100644 --- a/e2e/paths/client-module/10_add_greuge.spec.js +++ b/e2e/paths/client-module/10_add_greuge.spec.js @@ -18,7 +18,7 @@ describe('Client', () => { .wait(selectors.clientsIndex.createClientButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/clients'); + expect(url.hash).toEqual('#!/client/index'); }); }); @@ -39,10 +39,10 @@ describe('Client', () => { .waitForTextInElement(selectors.clientsIndex.searchResult, 'Petter Parker') .waitToClick(selectors.clientsIndex.searchResult) .waitToClick(selectors.clientGreuge.greugeButton) - .waitForURL('greuge/list') + .waitForURL('greuge/index') .url() .then(url => { - expect(url).toContain('greuge/list'); + expect(url).toContain('greuge/index'); }); }); diff --git a/e2e/paths/client-module/11_mandate.spec.js b/e2e/paths/client-module/11_mandate.spec.js index ada1d0473..500aeb521 100644 --- a/e2e/paths/client-module/11_mandate.spec.js +++ b/e2e/paths/client-module/11_mandate.spec.js @@ -18,7 +18,7 @@ describe('Client', () => { .wait(selectors.clientsIndex.createClientButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/clients'); + expect(url.hash).toEqual('#!/client/index'); }); }); diff --git a/e2e/paths/client-module/12_lock_of_verified_data.spec.js b/e2e/paths/client-module/12_lock_of_verified_data.spec.js index 602cb492e..2d1226c56 100644 --- a/e2e/paths/client-module/12_lock_of_verified_data.spec.js +++ b/e2e/paths/client-module/12_lock_of_verified_data.spec.js @@ -19,7 +19,7 @@ describe('Client', () => { .wait(selectors.clientsIndex.createClientButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/clients'); + expect(url.hash).toEqual('#!/client/index'); }); }); @@ -61,6 +61,7 @@ describe('Client', () => { return nightmare .wait(selectors.clientFiscalData.verifiedDataCheckboxInput) .evaluate(selector => { + console.log(document.querySelector(selector)); return document.querySelector(selector).className; }, 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-main-block > vn-horizontal > vn-one > vn-vertical > vn-client-fiscal-data > form > vn-card > div > vn-horizontal:nth-child(5) > vn-check:nth-child(4) > label') .then(result => { @@ -108,7 +109,7 @@ describe('Client', () => { .wait(selectors.clientsIndex.createClientButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/clients'); + expect(url.hash).toEqual('#!/client/index'); }); }); @@ -221,7 +222,7 @@ describe('Client', () => { .wait(selectors.clientsIndex.createClientButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/clients'); + expect(url.hash).toEqual('#!/client/index'); }); }); @@ -297,7 +298,7 @@ describe('Client', () => { .wait(selectors.clientsIndex.createClientButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/clients'); + expect(url.hash).toEqual('#!/client/index'); }); }); @@ -410,7 +411,7 @@ describe('Client', () => { .wait(selectors.clientsIndex.createClientButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/clients'); + expect(url.hash).toEqual('#!/client/index'); }); }); diff --git a/e2e/paths/client-module/13_invoices.spec.js b/e2e/paths/client-module/13_invoices.spec.js index 9f65222a7..aabbd2973 100644 --- a/e2e/paths/client-module/13_invoices.spec.js +++ b/e2e/paths/client-module/13_invoices.spec.js @@ -18,7 +18,7 @@ describe('Client', () => { .wait(selectors.clientsIndex.createClientButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/clients'); + expect(url.hash).toEqual('#!/client/index'); }); }); @@ -39,10 +39,10 @@ describe('Client', () => { .waitForTextInElement(selectors.clientsIndex.searchResult, 'Petter') .waitToClick(selectors.clientsIndex.searchResult) .waitToClick(selectors.clientInvoices.invoicesButton) - .waitForURL('invoices') + .waitForURL('invoice') .parsedUrl() .then(url => { - expect(url.hash).toContain('invoices'); + expect(url.hash).toContain('invoice'); }); }); diff --git a/e2e/smokes/01_client_path.spec.js b/e2e/smokes/01_client_path.spec.js index f441d4f7b..4e00b0738 100644 --- a/e2e/smokes/01_client_path.spec.js +++ b/e2e/smokes/01_client_path.spec.js @@ -15,7 +15,7 @@ describe('create client path', () => { .wait(selectors.clientsIndex.createClientButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/clients'); + expect(url.hash).toEqual('#!/client/index'); }); }); @@ -25,7 +25,7 @@ describe('create client path', () => { .wait(selectors.createClientView.createButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/create'); + expect(url.hash).toEqual('#!/client/create'); }); }); @@ -36,7 +36,7 @@ describe('create client path', () => { .wait(selectors.clientsIndex.createClientButton) .parsedUrl() .then(url => { - expect(url.hash).toEqual('#!/clients'); + expect(url.hash).toEqual('#!/client/index'); }); }); });