From d52f5077b010d743ec439b465a7993613f115a92 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Tue, 16 Apr 2019 15:00:21 +0200 Subject: [PATCH] #1306 Renombrar controladores, rutas y carpeta --- .../06_edit_basic_data_steps.spec.js | 2 +- .../front/{data => basic-data}/index.html | 6 +++--- .../front/{data => basic-data}/index.js | 2 +- .../{data => basic-data}/step-one/index.html | 0 .../{data => basic-data}/step-one/index.js | 4 ++-- .../step-one/index.spec.js | 4 ++-- .../step-one/locale/es.yml | 0 .../{data => basic-data}/step-one/style.scss | 0 .../step-three/index.html | 0 .../{data => basic-data}/step-three/index.js | 4 ++-- .../step-three/index.spec.js | 4 ++-- .../step-three/locale/es.yml | 0 .../{data => basic-data}/step-two/index.html | 0 .../{data => basic-data}/step-two/index.js | 4 ++-- .../step-two/index.spec.js | 4 ++-- .../step-two/locale/es.yml | 0 modules/ticket/front/index.js | 8 ++++---- modules/ticket/front/routes.json | 20 +++++++++---------- 18 files changed, 31 insertions(+), 31 deletions(-) rename modules/ticket/front/{data => basic-data}/index.html (51%) rename modules/ticket/front/{data => basic-data}/index.js (93%) rename modules/ticket/front/{data => basic-data}/step-one/index.html (100%) rename modules/ticket/front/{data => basic-data}/step-one/index.js (98%) rename modules/ticket/front/{data => basic-data}/step-one/index.spec.js (97%) rename modules/ticket/front/{data => basic-data}/step-one/locale/es.yml (100%) rename modules/ticket/front/{data => basic-data}/step-one/style.scss (100%) rename modules/ticket/front/{data => basic-data}/step-three/index.html (100%) rename modules/ticket/front/{data => basic-data}/step-three/index.js (95%) rename modules/ticket/front/{data => basic-data}/step-three/index.spec.js (93%) rename modules/ticket/front/{data => basic-data}/step-three/locale/es.yml (100%) rename modules/ticket/front/{data => basic-data}/step-two/index.html (100%) rename modules/ticket/front/{data => basic-data}/step-two/index.js (94%) rename modules/ticket/front/{data => basic-data}/step-two/index.spec.js (93%) rename modules/ticket/front/{data => basic-data}/step-two/locale/es.yml (100%) diff --git a/e2e/paths/05-ticket-module/06_edit_basic_data_steps.spec.js b/e2e/paths/05-ticket-module/06_edit_basic_data_steps.spec.js index ebdace2a7..7e44c473b 100644 --- a/e2e/paths/05-ticket-module/06_edit_basic_data_steps.spec.js +++ b/e2e/paths/05-ticket-module/06_edit_basic_data_steps.spec.js @@ -8,7 +8,7 @@ describe('Ticket Edit basic data path', () => { return nightmare .loginAndModule('employee', 'ticket') .accessToSearchResult('id:11') - .accessToSection('ticket.card.data.stepOne'); + .accessToSection('ticket.card.basicData.stepOne'); }); it(`should edit the client and address of the ticket then click next`, async() => { diff --git a/modules/ticket/front/data/index.html b/modules/ticket/front/basic-data/index.html similarity index 51% rename from modules/ticket/front/data/index.html rename to modules/ticket/front/basic-data/index.html index 4864c774f..4439069e8 100644 --- a/modules/ticket/front/data/index.html +++ b/modules/ticket/front/basic-data/index.html @@ -2,9 +2,9 @@ diff --git a/modules/ticket/front/data/index.js b/modules/ticket/front/basic-data/index.js similarity index 93% rename from modules/ticket/front/data/index.js rename to modules/ticket/front/basic-data/index.js index df04b75ea..1afe6f9aa 100644 --- a/modules/ticket/front/data/index.js +++ b/modules/ticket/front/basic-data/index.js @@ -27,7 +27,7 @@ class Controller { Controller.$inject = ['$scope', '$state']; -ngModule.component('vnTicketData', { +ngModule.component('vnTicketBasicData', { template: require('./index.html'), bindings: { ticket: '<' diff --git a/modules/ticket/front/data/step-one/index.html b/modules/ticket/front/basic-data/step-one/index.html similarity index 100% rename from modules/ticket/front/data/step-one/index.html rename to modules/ticket/front/basic-data/step-one/index.html diff --git a/modules/ticket/front/data/step-one/index.js b/modules/ticket/front/basic-data/step-one/index.js similarity index 98% rename from modules/ticket/front/data/step-one/index.js rename to modules/ticket/front/basic-data/step-one/index.js index 125c10a75..0a4708dfe 100644 --- a/modules/ticket/front/data/step-one/index.js +++ b/modules/ticket/front/basic-data/step-one/index.js @@ -159,13 +159,13 @@ class Controller { Controller.$inject = ['$scope', '$http', '$translate', 'vnApp']; -ngModule.component('vnTicketDataStepOne', { +ngModule.component('vnTicketBasicDataStepOne', { template: require('./index.html'), controller: Controller, bindings: { ticket: '<' }, require: { - data: '^vnTicketData' + data: '^vnTicketBasicData' } }); diff --git a/modules/ticket/front/data/step-one/index.spec.js b/modules/ticket/front/basic-data/step-one/index.spec.js similarity index 97% rename from modules/ticket/front/data/step-one/index.spec.js rename to modules/ticket/front/basic-data/step-one/index.spec.js index e7049394b..c3bac09d6 100644 --- a/modules/ticket/front/data/step-one/index.spec.js +++ b/modules/ticket/front/basic-data/step-one/index.spec.js @@ -1,7 +1,7 @@ import './index.js'; describe('Ticket', () => { - describe('Component vnTicketDataStepOne', () => { + describe('Component vnTicketBasicDataStepOne', () => { let $state; let controller; let $httpBackend; @@ -11,7 +11,7 @@ describe('Ticket', () => { beforeEach(angular.mock.inject(($componentController, _$state_, _$httpBackend_) => { $state = _$state_; $httpBackend = _$httpBackend_; - controller = $componentController('vnTicketDataStepOne', {$state}); + controller = $componentController('vnTicketBasicDataStepOne', {$state}); })); describe('ticket() setter', () => { diff --git a/modules/ticket/front/data/step-one/locale/es.yml b/modules/ticket/front/basic-data/step-one/locale/es.yml similarity index 100% rename from modules/ticket/front/data/step-one/locale/es.yml rename to modules/ticket/front/basic-data/step-one/locale/es.yml diff --git a/modules/ticket/front/data/step-one/style.scss b/modules/ticket/front/basic-data/step-one/style.scss similarity index 100% rename from modules/ticket/front/data/step-one/style.scss rename to modules/ticket/front/basic-data/step-one/style.scss diff --git a/modules/ticket/front/data/step-three/index.html b/modules/ticket/front/basic-data/step-three/index.html similarity index 100% rename from modules/ticket/front/data/step-three/index.html rename to modules/ticket/front/basic-data/step-three/index.html diff --git a/modules/ticket/front/data/step-three/index.js b/modules/ticket/front/basic-data/step-three/index.js similarity index 95% rename from modules/ticket/front/data/step-three/index.js rename to modules/ticket/front/basic-data/step-three/index.js index 67df50c97..f6ab66a37 100644 --- a/modules/ticket/front/data/step-three/index.js +++ b/modules/ticket/front/basic-data/step-three/index.js @@ -54,7 +54,7 @@ class Controller { Controller.$inject = ['$http', '$scope', '$state', '$translate', 'vnApp']; -ngModule.component('vnTicketDataStepThree', { +ngModule.component('vnTicketBasicDataStepThree', { template: require('./index.html'), controller: Controller, bindings: { @@ -62,6 +62,6 @@ ngModule.component('vnTicketDataStepThree', { }, require: { card: '^vnTicketCard', - data: '^vnTicketData' + data: '^vnTicketBasicData' } }); diff --git a/modules/ticket/front/data/step-three/index.spec.js b/modules/ticket/front/basic-data/step-three/index.spec.js similarity index 93% rename from modules/ticket/front/data/step-three/index.spec.js rename to modules/ticket/front/basic-data/step-three/index.spec.js index bb7f3430e..190a51f75 100644 --- a/modules/ticket/front/data/step-three/index.spec.js +++ b/modules/ticket/front/basic-data/step-three/index.spec.js @@ -1,7 +1,7 @@ import './index.js'; describe('ticket', () => { - describe('Component vnTicketDataStepThree', () => { + describe('Component vnTicketBasicDataStepThree', () => { let now = Date.now(); let $state; let controller; @@ -16,7 +16,7 @@ describe('ticket', () => { vnApp = _vnApp_; spyOn(vnApp, 'showError'); $httpBackend = _$httpBackend_; - controller = $componentController('vnTicketDataStepThree', {$state}); + controller = $componentController('vnTicketBasicDataStepThree', {$state}); })); describe('onSubmit()', () => { diff --git a/modules/ticket/front/data/step-three/locale/es.yml b/modules/ticket/front/basic-data/step-three/locale/es.yml similarity index 100% rename from modules/ticket/front/data/step-three/locale/es.yml rename to modules/ticket/front/basic-data/step-three/locale/es.yml diff --git a/modules/ticket/front/data/step-two/index.html b/modules/ticket/front/basic-data/step-two/index.html similarity index 100% rename from modules/ticket/front/data/step-two/index.html rename to modules/ticket/front/basic-data/step-two/index.html diff --git a/modules/ticket/front/data/step-two/index.js b/modules/ticket/front/basic-data/step-two/index.js similarity index 94% rename from modules/ticket/front/data/step-two/index.js rename to modules/ticket/front/basic-data/step-two/index.js index 02f44b8cb..739f08a87 100644 --- a/modules/ticket/front/data/step-two/index.js +++ b/modules/ticket/front/basic-data/step-two/index.js @@ -46,13 +46,13 @@ class Controller { Controller.$inject = ['$http']; -ngModule.component('vnTicketDataStepTwo', { +ngModule.component('vnTicketBasicDataStepTwo', { template: require('./index.html'), controller: Controller, bindings: { ticket: '<' }, require: { - data: '^vnTicketData' + data: '^vnTicketBasicData' } }); diff --git a/modules/ticket/front/data/step-two/index.spec.js b/modules/ticket/front/basic-data/step-two/index.spec.js similarity index 93% rename from modules/ticket/front/data/step-two/index.spec.js rename to modules/ticket/front/basic-data/step-two/index.spec.js index 8ee21da39..8fe400584 100644 --- a/modules/ticket/front/data/step-two/index.spec.js +++ b/modules/ticket/front/basic-data/step-two/index.spec.js @@ -1,13 +1,13 @@ import './index.js'; describe('Ticket', () => { - describe('Component vnTicketDataStepTwo', () => { + describe('Component vnTicketBasicDataStepTwo', () => { let controller; beforeEach(ngModule('ticket')); beforeEach(angular.mock.inject($componentController => { - controller = $componentController('vnTicketDataStepTwo'); + controller = $componentController('vnTicketBasicDataStepTwo'); })); describe('getTotalPrice()', () => { diff --git a/modules/ticket/front/data/step-two/locale/es.yml b/modules/ticket/front/basic-data/step-two/locale/es.yml similarity index 100% rename from modules/ticket/front/data/step-two/locale/es.yml rename to modules/ticket/front/basic-data/step-two/locale/es.yml diff --git a/modules/ticket/front/index.js b/modules/ticket/front/index.js index 1269a60db..b089734e9 100644 --- a/modules/ticket/front/index.js +++ b/modules/ticket/front/index.js @@ -10,10 +10,10 @@ import './descriptor-popover'; import './create/card'; import './create/index'; import './summary'; -import './data'; -import './data/step-one'; -import './data/step-two'; -import './data/step-three'; +import './basic-data'; +import './basic-data/step-one'; +import './basic-data/step-two'; +import './basic-data/step-three'; import './note'; import './expedition'; import './volume'; diff --git a/modules/ticket/front/routes.json b/modules/ticket/front/routes.json index de8b916d3..7ae2f4224 100644 --- a/modules/ticket/front/routes.json +++ b/modules/ticket/front/routes.json @@ -5,7 +5,7 @@ "validations": true, "dependencies": ["worker", "item", "client"], "menu": [ - {"state": "ticket.card.data.stepOne", "icon": "settings"}, + {"state": "ticket.card.basicData.stepOne", "icon": "settings"}, {"state": "ticket.card.sale", "icon": "icon-lines"}, {"state": "ticket.card.observation", "icon": "insert_drive_file"}, {"state": "ticket.card.volume", "icon": "icon-volume"}, @@ -49,33 +49,33 @@ "ticket": "$ctrl.ticket" } }, { - "url" : "/data", - "state": "ticket.card.data", - "component": "vn-ticket-data", + "url" : "/basic-data", + "state": "ticket.card.basicData", + "component": "vn-ticket-basic-data", "abstract": true, "params": { "ticket": "$ctrl.ticket" } }, { "url" : "/step-one", - "state": "ticket.card.data.stepOne", - "component": "vn-ticket-data-step-one", + "state": "ticket.card.basicData.stepOne", + "component": "vn-ticket-basic-data-step-one", "description": "Basic data", "params": { "ticket": "$ctrl.data" } }, { "url" : "/step-two", - "state": "ticket.card.data.stepTwo", - "component": "vn-ticket-data-step-two", + "state": "ticket.card.basicData.stepTwo", + "component": "vn-ticket-basic-data-step-two", "description": "Price difference", "params": { "ticket": "$ctrl.data" } }, { "url" : "/step-three", - "state": "ticket.card.data.stepThree", - "component": "vn-ticket-data-step-three", + "state": "ticket.card.basicData.stepThree", + "component": "vn-ticket-basic-data-step-three", "description": "Charge", "params": { "ticket": "$ctrl.data"