');
controller = $componentController('vnInputNumber', {$element, $scope, $attrs, $timeout, $transclude: () => {}});
}));
diff --git a/client/core/src/components/input-time/style.scss b/front/core/src/components/input-time/style.scss
similarity index 100%
rename from client/core/src/components/input-time/style.scss
rename to front/core/src/components/input-time/style.scss
diff --git a/client/core/src/components/label-value/label-value.html b/front/core/src/components/label-value/label-value.html
similarity index 100%
rename from client/core/src/components/label-value/label-value.html
rename to front/core/src/components/label-value/label-value.html
diff --git a/client/core/src/components/label-value/label-value.js b/front/core/src/components/label-value/label-value.js
similarity index 100%
rename from client/core/src/components/label-value/label-value.js
rename to front/core/src/components/label-value/label-value.js
diff --git a/client/core/src/components/label-value/style.scss b/front/core/src/components/label-value/style.scss
similarity index 100%
rename from client/core/src/components/label-value/style.scss
rename to front/core/src/components/label-value/style.scss
diff --git a/client/core/src/components/log/index.html b/front/core/src/components/log/index.html
similarity index 100%
rename from client/core/src/components/log/index.html
rename to front/core/src/components/log/index.html
diff --git a/client/core/src/components/log/index.js b/front/core/src/components/log/index.js
similarity index 100%
rename from client/core/src/components/log/index.js
rename to front/core/src/components/log/index.js
diff --git a/client/core/src/components/log/locale/es.yml b/front/core/src/components/log/locale/es.yml
similarity index 100%
rename from client/core/src/components/log/locale/es.yml
rename to front/core/src/components/log/locale/es.yml
diff --git a/client/core/src/components/log/style.scss b/front/core/src/components/log/style.scss
similarity index 100%
rename from client/core/src/components/log/style.scss
rename to front/core/src/components/log/style.scss
diff --git a/client/core/src/components/menu/menu.js b/front/core/src/components/menu/menu.js
similarity index 100%
rename from client/core/src/components/menu/menu.js
rename to front/core/src/components/menu/menu.js
diff --git a/client/core/src/components/model-proxy/model-proxy.js b/front/core/src/components/model-proxy/model-proxy.js
similarity index 100%
rename from client/core/src/components/model-proxy/model-proxy.js
rename to front/core/src/components/model-proxy/model-proxy.js
diff --git a/client/core/src/components/multi-check/multi-check.html b/front/core/src/components/multi-check/multi-check.html
similarity index 100%
rename from client/core/src/components/multi-check/multi-check.html
rename to front/core/src/components/multi-check/multi-check.html
diff --git a/client/core/src/components/multi-check/multi-check.js b/front/core/src/components/multi-check/multi-check.js
similarity index 100%
rename from client/core/src/components/multi-check/multi-check.js
rename to front/core/src/components/multi-check/multi-check.js
diff --git a/client/core/src/components/multi-check/multi-check.spec.js b/front/core/src/components/multi-check/multi-check.spec.js
similarity index 85%
rename from client/core/src/components/multi-check/multi-check.spec.js
rename to front/core/src/components/multi-check/multi-check.spec.js
index 86bc7e72f..748fa5871 100644
--- a/client/core/src/components/multi-check/multi-check.spec.js
+++ b/front/core/src/components/multi-check/multi-check.spec.js
@@ -1,16 +1,12 @@
import './multi-check.js';
describe('Component vnMultiCheck', () => {
- let $componentController;
let controller;
let $element;
- beforeEach(() => {
- angular.mock.module('ticket');
- });
+ beforeEach(ngModule('vnCore'));
- beforeEach(angular.mock.inject(_$componentController_ => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject($componentController => {
$element = angular.element(`
`);
controller = $componentController('vnMultiCheck', {$element: $element});
}));
diff --git a/client/core/src/components/pagination/pagination.html b/front/core/src/components/pagination/pagination.html
similarity index 100%
rename from client/core/src/components/pagination/pagination.html
rename to front/core/src/components/pagination/pagination.html
diff --git a/client/core/src/components/pagination/pagination.js b/front/core/src/components/pagination/pagination.js
similarity index 100%
rename from client/core/src/components/pagination/pagination.js
rename to front/core/src/components/pagination/pagination.js
diff --git a/client/core/src/components/pagination/style.scss b/front/core/src/components/pagination/style.scss
similarity index 100%
rename from client/core/src/components/pagination/style.scss
rename to front/core/src/components/pagination/style.scss
diff --git a/client/core/src/components/paging/paging.html b/front/core/src/components/paging/paging.html
similarity index 100%
rename from client/core/src/components/paging/paging.html
rename to front/core/src/components/paging/paging.html
diff --git a/client/core/src/components/paging/paging.js b/front/core/src/components/paging/paging.js
similarity index 100%
rename from client/core/src/components/paging/paging.js
rename to front/core/src/components/paging/paging.js
diff --git a/client/core/src/components/paging/paging.spec.js b/front/core/src/components/paging/paging.spec.js
similarity index 85%
rename from client/core/src/components/paging/paging.spec.js
rename to front/core/src/components/paging/paging.spec.js
index ab36635d5..06fec2658 100644
--- a/client/core/src/components/paging/paging.spec.js
+++ b/front/core/src/components/paging/paging.spec.js
@@ -1,20 +1,14 @@
import './paging.js';
describe('Component vnPaging', () => {
- let $componentController;
let $scope;
- let $httpBackend;
let controller;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('vnCore'));
- beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope) => {
$scope = $rootScope.$new();
- $httpBackend = _$httpBackend_;
- controller = $componentController('vnPaging', {$scope, $httpBackend});
+ controller = $componentController('vnPaging', {$scope});
}));
describe('$onChanges()', () => {
diff --git a/client/core/src/components/paging/style.scss b/front/core/src/components/paging/style.scss
similarity index 100%
rename from client/core/src/components/paging/style.scss
rename to front/core/src/components/paging/style.scss
diff --git a/client/core/src/components/popover/popover.html b/front/core/src/components/popover/popover.html
similarity index 100%
rename from client/core/src/components/popover/popover.html
rename to front/core/src/components/popover/popover.html
diff --git a/client/core/src/components/popover/popover.js b/front/core/src/components/popover/popover.js
similarity index 100%
rename from client/core/src/components/popover/popover.js
rename to front/core/src/components/popover/popover.js
diff --git a/client/core/src/components/popover/popover.spec.js b/front/core/src/components/popover/popover.spec.js
similarity index 100%
rename from client/core/src/components/popover/popover.spec.js
rename to front/core/src/components/popover/popover.spec.js
diff --git a/client/core/src/components/popover/style.scss b/front/core/src/components/popover/style.scss
similarity index 100%
rename from client/core/src/components/popover/style.scss
rename to front/core/src/components/popover/style.scss
diff --git a/client/core/src/components/radio/radio.html b/front/core/src/components/radio/radio.html
similarity index 100%
rename from client/core/src/components/radio/radio.html
rename to front/core/src/components/radio/radio.html
diff --git a/client/core/src/components/radio/radio.js b/front/core/src/components/radio/radio.js
similarity index 100%
rename from client/core/src/components/radio/radio.js
rename to front/core/src/components/radio/radio.js
diff --git a/client/core/src/components/searchbar/search-panel.js b/front/core/src/components/searchbar/search-panel.js
similarity index 100%
rename from client/core/src/components/searchbar/search-panel.js
rename to front/core/src/components/searchbar/search-panel.js
diff --git a/client/core/src/components/searchbar/searchbar.html b/front/core/src/components/searchbar/searchbar.html
similarity index 100%
rename from client/core/src/components/searchbar/searchbar.html
rename to front/core/src/components/searchbar/searchbar.html
diff --git a/client/core/src/components/searchbar/searchbar.js b/front/core/src/components/searchbar/searchbar.js
similarity index 100%
rename from client/core/src/components/searchbar/searchbar.js
rename to front/core/src/components/searchbar/searchbar.js
diff --git a/client/core/src/components/searchbar/style.scss b/front/core/src/components/searchbar/style.scss
similarity index 100%
rename from client/core/src/components/searchbar/style.scss
rename to front/core/src/components/searchbar/style.scss
diff --git a/client/core/src/components/snackbar/snackbar.html b/front/core/src/components/snackbar/snackbar.html
similarity index 100%
rename from client/core/src/components/snackbar/snackbar.html
rename to front/core/src/components/snackbar/snackbar.html
diff --git a/client/core/src/components/snackbar/snackbar.js b/front/core/src/components/snackbar/snackbar.js
similarity index 100%
rename from client/core/src/components/snackbar/snackbar.js
rename to front/core/src/components/snackbar/snackbar.js
diff --git a/client/core/src/components/snackbar/style.scss b/front/core/src/components/snackbar/style.scss
similarity index 100%
rename from client/core/src/components/snackbar/style.scss
rename to front/core/src/components/snackbar/style.scss
diff --git a/client/core/src/components/spinner/spinner.html b/front/core/src/components/spinner/spinner.html
similarity index 100%
rename from client/core/src/components/spinner/spinner.html
rename to front/core/src/components/spinner/spinner.html
diff --git a/client/core/src/components/spinner/spinner.js b/front/core/src/components/spinner/spinner.js
similarity index 100%
rename from client/core/src/components/spinner/spinner.js
rename to front/core/src/components/spinner/spinner.js
diff --git a/client/core/src/components/spinner/spinner.spec.js b/front/core/src/components/spinner/spinner.spec.js
similarity index 89%
rename from client/core/src/components/spinner/spinner.spec.js
rename to front/core/src/components/spinner/spinner.spec.js
index d5bad0746..09090ef8c 100644
--- a/client/core/src/components/spinner/spinner.spec.js
+++ b/front/core/src/components/spinner/spinner.spec.js
@@ -1,17 +1,13 @@
import './spinner.js';
describe('Component vnSpinner', () => {
- let $componentController;
let $scope;
let $element;
let controller;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('vnCore'));
- beforeEach(angular.mock.inject((_$componentController_, $rootScope) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope) => {
$scope = $rootScope.$new();
$element = angular.element('
');
controller = $componentController('vnSpinner', {$scope, $element});
diff --git a/client/core/src/components/spinner/style.css b/front/core/src/components/spinner/style.css
similarity index 100%
rename from client/core/src/components/spinner/style.css
rename to front/core/src/components/spinner/style.css
diff --git a/client/core/src/components/step-control/step-control.html b/front/core/src/components/step-control/step-control.html
similarity index 100%
rename from client/core/src/components/step-control/step-control.html
rename to front/core/src/components/step-control/step-control.html
diff --git a/client/core/src/components/step-control/step-control.js b/front/core/src/components/step-control/step-control.js
similarity index 100%
rename from client/core/src/components/step-control/step-control.js
rename to front/core/src/components/step-control/step-control.js
diff --git a/client/core/src/components/step-control/step-control.spec.js b/front/core/src/components/step-control/step-control.spec.js
similarity index 84%
rename from client/core/src/components/step-control/step-control.spec.js
rename to front/core/src/components/step-control/step-control.spec.js
index 51360e7ee..944457cfe 100644
--- a/client/core/src/components/step-control/step-control.spec.js
+++ b/front/core/src/components/step-control/step-control.spec.js
@@ -1,16 +1,12 @@
import './step-control.js';
describe('Component vnStepControl', () => {
- let $componentController;
let controller;
let $state;
- beforeEach(() => {
- angular.mock.module('ticket');
- });
+ beforeEach(ngModule('vnCore'));
- beforeEach(angular.mock.inject((_$componentController_, _$state_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$state_) => {
$state = _$state_;
spyOn($state, 'go');
controller = $componentController('vnStepControl', {$state: $state});
@@ -43,19 +39,19 @@ describe('Component vnStepControl', () => {
it(`should call the onStepChange method then return false and never call the go method`, () => {
controller.onStepChange = jasmine.createSpy(controller, 'onStepChange').and.returnValue(false);
- controller.currentState = "something";
+ controller.currentState = 'something';
expect(controller.onStepChange).toHaveBeenCalledWith({state: 'something'});
- expect(controller.$state.go).not.toHaveBeenCalledWith("something");
+ expect(controller.$state.go).not.toHaveBeenCalledWith('something');
});
it(`should call the onStepChange method then return true and finally call the go method`, () => {
controller.onStepChange = jasmine.createSpy(controller, 'onStepChange').and.returnValue(true);
- controller.currentState = "something";
+ controller.currentState = 'something';
expect(controller.onStepChange).toHaveBeenCalledWith({state: 'something'});
- expect(controller.$state.go).toHaveBeenCalledWith("something");
+ expect(controller.$state.go).toHaveBeenCalledWith('something');
});
});
diff --git a/client/core/src/components/step-control/style.scss b/front/core/src/components/step-control/style.scss
similarity index 100%
rename from client/core/src/components/step-control/style.scss
rename to front/core/src/components/step-control/style.scss
diff --git a/client/core/src/components/submit/submit.html b/front/core/src/components/submit/submit.html
similarity index 100%
rename from client/core/src/components/submit/submit.html
rename to front/core/src/components/submit/submit.html
diff --git a/client/core/src/components/submit/submit.js b/front/core/src/components/submit/submit.js
similarity index 100%
rename from client/core/src/components/submit/submit.js
rename to front/core/src/components/submit/submit.js
diff --git a/client/core/src/components/subtitle/subtitle.html b/front/core/src/components/subtitle/subtitle.html
similarity index 100%
rename from client/core/src/components/subtitle/subtitle.html
rename to front/core/src/components/subtitle/subtitle.html
diff --git a/client/core/src/components/subtitle/subtitle.js b/front/core/src/components/subtitle/subtitle.js
similarity index 100%
rename from client/core/src/components/subtitle/subtitle.js
rename to front/core/src/components/subtitle/subtitle.js
diff --git a/client/core/src/components/switch/switch.html b/front/core/src/components/switch/switch.html
similarity index 100%
rename from client/core/src/components/switch/switch.html
rename to front/core/src/components/switch/switch.html
diff --git a/client/core/src/components/switch/switch.js b/front/core/src/components/switch/switch.js
similarity index 100%
rename from client/core/src/components/switch/switch.js
rename to front/core/src/components/switch/switch.js
diff --git a/client/core/src/components/table/index.html b/front/core/src/components/table/index.html
similarity index 100%
rename from client/core/src/components/table/index.html
rename to front/core/src/components/table/index.html
diff --git a/client/core/src/components/table/index.js b/front/core/src/components/table/index.js
similarity index 100%
rename from client/core/src/components/table/index.js
rename to front/core/src/components/table/index.js
diff --git a/client/core/src/components/table/style.scss b/front/core/src/components/table/style.scss
similarity index 100%
rename from client/core/src/components/table/style.scss
rename to front/core/src/components/table/style.scss
diff --git a/client/core/src/components/textarea/style.scss b/front/core/src/components/textarea/style.scss
similarity index 100%
rename from client/core/src/components/textarea/style.scss
rename to front/core/src/components/textarea/style.scss
diff --git a/client/core/src/components/textarea/textarea.html b/front/core/src/components/textarea/textarea.html
similarity index 100%
rename from client/core/src/components/textarea/textarea.html
rename to front/core/src/components/textarea/textarea.html
diff --git a/client/core/src/components/textarea/textarea.js b/front/core/src/components/textarea/textarea.js
similarity index 100%
rename from client/core/src/components/textarea/textarea.js
rename to front/core/src/components/textarea/textarea.js
diff --git a/client/core/src/components/textarea/textarea.spec.js b/front/core/src/components/textarea/textarea.spec.js
similarity index 85%
rename from client/core/src/components/textarea/textarea.spec.js
rename to front/core/src/components/textarea/textarea.spec.js
index d70484c30..0f0bb5770 100644
--- a/client/core/src/components/textarea/textarea.spec.js
+++ b/front/core/src/components/textarea/textarea.spec.js
@@ -1,25 +1,19 @@
import './textarea.js';
describe('Component vnTextarea', () => {
- let $componentController;
let $scope;
let $attrs;
- let $timeout;
let $element;
let controller;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('vnCore'));
- beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$timeout_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope) => {
$scope = $rootScope.$new();
$attrs = {};
- $timeout = _$timeout_;
$element = angular.element('
');
$element[0].firstChild.MaterialTextfield = {updateClasses_: () => {}};
- controller = $componentController('vnTextarea', {$scope, $element, $attrs, $timeout});
+ controller = $componentController('vnTextarea', {$scope, $element, $attrs});
}));
describe('model() setter', () => {
diff --git a/client/core/src/components/textfield/style.scss b/front/core/src/components/textfield/style.scss
similarity index 100%
rename from client/core/src/components/textfield/style.scss
rename to front/core/src/components/textfield/style.scss
diff --git a/client/core/src/components/textfield/textfield.html b/front/core/src/components/textfield/textfield.html
similarity index 100%
rename from client/core/src/components/textfield/textfield.html
rename to front/core/src/components/textfield/textfield.html
diff --git a/client/core/src/components/textfield/textfield.js b/front/core/src/components/textfield/textfield.js
similarity index 100%
rename from client/core/src/components/textfield/textfield.js
rename to front/core/src/components/textfield/textfield.js
diff --git a/client/core/src/components/textfield/textfield.spec.js b/front/core/src/components/textfield/textfield.spec.js
similarity index 90%
rename from client/core/src/components/textfield/textfield.spec.js
rename to front/core/src/components/textfield/textfield.spec.js
index ffce1072d..b0c6315e5 100644
--- a/client/core/src/components/textfield/textfield.spec.js
+++ b/front/core/src/components/textfield/textfield.spec.js
@@ -1,22 +1,17 @@
import './textfield.js';
describe('Component vnTextfield', () => {
- let $componentController;
let $scope;
let $attrs;
let $timeout;
let $element;
let controller;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('vnCore'));
- beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_, _$timeout_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope) => {
$scope = $rootScope.$new();
$attrs = {};
- $timeout = _$timeout_;
$element = angular.element('
');
controller = $componentController('vnTextfield', {$scope, $element, $attrs, $timeout, $transclude: () => {}});
}));
diff --git a/client/core/src/components/th/index.html b/front/core/src/components/th/index.html
similarity index 100%
rename from client/core/src/components/th/index.html
rename to front/core/src/components/th/index.html
diff --git a/client/core/src/components/th/index.js b/front/core/src/components/th/index.js
similarity index 100%
rename from client/core/src/components/th/index.js
rename to front/core/src/components/th/index.js
diff --git a/client/core/src/components/th/index.spec.js b/front/core/src/components/th/index.spec.js
similarity index 94%
rename from client/core/src/components/th/index.spec.js
rename to front/core/src/components/th/index.spec.js
index 780ffe8d7..dc9e43672 100644
--- a/client/core/src/components/th/index.spec.js
+++ b/front/core/src/components/th/index.spec.js
@@ -2,16 +2,12 @@ import './index.js';
import template from './index.html';
describe('Component vnTh', () => {
- let $componentController;
let controller;
let $element;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('vnCore'));
- beforeEach(angular.mock.inject(_$componentController_ => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject($componentController => {
$element = angular.element(`
${template}
`);
controller = $componentController('vnTh', {$element: $element});
controller.table = {
diff --git a/client/core/src/components/title/title.html b/front/core/src/components/title/title.html
similarity index 100%
rename from client/core/src/components/title/title.html
rename to front/core/src/components/title/title.html
diff --git a/client/core/src/components/title/title.js b/front/core/src/components/title/title.js
similarity index 100%
rename from client/core/src/components/title/title.js
rename to front/core/src/components/title/title.js
diff --git a/client/core/src/components/tooltip/style.scss b/front/core/src/components/tooltip/style.scss
similarity index 100%
rename from client/core/src/components/tooltip/style.scss
rename to front/core/src/components/tooltip/style.scss
diff --git a/client/core/src/components/tooltip/tooltip.html b/front/core/src/components/tooltip/tooltip.html
similarity index 100%
rename from client/core/src/components/tooltip/tooltip.html
rename to front/core/src/components/tooltip/tooltip.html
diff --git a/client/core/src/components/tooltip/tooltip.js b/front/core/src/components/tooltip/tooltip.js
similarity index 100%
rename from client/core/src/components/tooltip/tooltip.js
rename to front/core/src/components/tooltip/tooltip.js
diff --git a/client/core/src/components/tooltip/tooltip.spec.js b/front/core/src/components/tooltip/tooltip.spec.js
similarity index 100%
rename from client/core/src/components/tooltip/tooltip.spec.js
rename to front/core/src/components/tooltip/tooltip.spec.js
diff --git a/client/core/src/components/treeview/index.html b/front/core/src/components/treeview/index.html
similarity index 100%
rename from client/core/src/components/treeview/index.html
rename to front/core/src/components/treeview/index.html
diff --git a/client/core/src/components/treeview/index.js b/front/core/src/components/treeview/index.js
similarity index 100%
rename from client/core/src/components/treeview/index.js
rename to front/core/src/components/treeview/index.js
diff --git a/client/core/src/components/treeview/style.scss b/front/core/src/components/treeview/style.scss
similarity index 100%
rename from client/core/src/components/treeview/style.scss
rename to front/core/src/components/treeview/style.scss
diff --git a/client/core/src/components/watcher/locale/es.yml b/front/core/src/components/watcher/locale/es.yml
similarity index 100%
rename from client/core/src/components/watcher/locale/es.yml
rename to front/core/src/components/watcher/locale/es.yml
diff --git a/client/core/src/components/watcher/watcher.html b/front/core/src/components/watcher/watcher.html
similarity index 100%
rename from client/core/src/components/watcher/watcher.html
rename to front/core/src/components/watcher/watcher.html
diff --git a/client/core/src/components/watcher/watcher.js b/front/core/src/components/watcher/watcher.js
similarity index 100%
rename from client/core/src/components/watcher/watcher.js
rename to front/core/src/components/watcher/watcher.js
diff --git a/client/core/src/components/watcher/watcher.spec.js b/front/core/src/components/watcher/watcher.spec.js
similarity index 87%
rename from client/core/src/components/watcher/watcher.spec.js
rename to front/core/src/components/watcher/watcher.spec.js
index 6e94f1126..e7ab7ea2c 100644
--- a/client/core/src/components/watcher/watcher.spec.js
+++ b/front/core/src/components/watcher/watcher.spec.js
@@ -2,39 +2,26 @@ import './watcher.js';
import getModifiedData from '../../lib/modified';
describe('Component vnWatcher', () => {
- let $componentController;
- let $rootScope;
let $scope;
let $element;
let $state;
- let $transitions;
let $httpBackend;
- let vnApp;
- let $translate;
let controller;
let $attrs;
let $q;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('vnCore'));
- beforeEach(angular.mock.inject((_$componentController_, _$rootScope_, _$state_, _$transitions_, _$httpBackend_, _vnApp_, _$translate_, _$q_) => {
- $componentController = _$componentController_;
- $rootScope = _$rootScope_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_, _$state_, _$q_) => {
$scope = $rootScope.$new();
$element = angular.element('
');
$state = _$state_;
- vnApp = _vnApp_;
- $transitions = _$transitions_;
- $httpBackend = _$httpBackend_;
- $translate = _$translate_;
$q = _$q_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
+ $httpBackend = _$httpBackend_;
$attrs = {
- save: "patch"
+ save: 'patch'
};
- controller = $componentController('vnWatcher', {$scope, $element, $state, vnApp, $transitions, $httpBackend, $translate, $attrs, $q});
+ controller = $componentController('vnWatcher', {$scope, $element, $state, $httpBackend, $attrs, $q});
}));
describe('$onInit()', () => {
@@ -78,11 +65,11 @@ describe('Component vnWatcher', () => {
spyOn(controller, 'submit').and.returnValue(Promise.resolve());
spyOn(controller.window.history, 'back');
controller.submitBack()
- .then(() => {
- expect(controller.submit).toHaveBeenCalledWith();
- expect(controller.window.history.back).toHaveBeenCalledWith();
- done();
- });
+ .then(() => {
+ expect(controller.submit).toHaveBeenCalledWith();
+ expect(controller.window.history.back).toHaveBeenCalledWith();
+ done();
+ }).catch(done.fail);
});
});
@@ -92,11 +79,11 @@ describe('Component vnWatcher', () => {
spyOn(controller.$state, 'go');
let state = 'the.State';
controller.submitGo(state)
- .then(() => {
- expect(controller.submit).toHaveBeenCalledWith();
- expect(controller.$state.go).toHaveBeenCalledWith(state, {});
- done();
- });
+ .then(() => {
+ expect(controller.submit).toHaveBeenCalledWith();
+ expect(controller.$state.go).toHaveBeenCalledWith(state, {});
+ done();
+ }).catch(done.fail);
});
});
@@ -158,10 +145,10 @@ describe('Component vnWatcher', () => {
$httpBackend.whenPATCH(`${controller.url}/1`, changedData).respond(json);
$httpBackend.expectPATCH(`${controller.url}/1`);
controller.realSubmit()
- .then(() => {
- expect(controller.writeData).toHaveBeenCalledWith(jasmine.any(Object), jasmine.any(Function));
- done();
- });
+ .then(() => {
+ expect(controller.writeData).toHaveBeenCalledWith(jasmine.any(Object), jasmine.any(Function));
+ done();
+ }).catch(done.fail);
$httpBackend.flush();
});
});
@@ -178,10 +165,10 @@ describe('Component vnWatcher', () => {
$httpBackend.whenPOST(`${controller.url}`, controller.data).respond(json);
$httpBackend.expectPOST(`${controller.url}`, controller.data);
controller.realSubmit()
- .then(() => {
- expect(controller.writeData).toHaveBeenCalledWith(jasmine.any(Object), jasmine.any(Function));
- done();
- });
+ .then(() => {
+ expect(controller.writeData).toHaveBeenCalledWith(jasmine.any(Object), jasmine.any(Function));
+ done();
+ }).catch(done.fail);
$httpBackend.flush();
});
});
diff --git a/client/core/src/core.js b/front/core/src/core.js
similarity index 100%
rename from client/core/src/core.js
rename to front/core/src/core.js
diff --git a/client/core/src/directives/acl.js b/front/core/src/directives/acl.js
similarity index 100%
rename from client/core/src/directives/acl.js
rename to front/core/src/directives/acl.js
diff --git a/client/core/src/directives/bind.js b/front/core/src/directives/bind.js
similarity index 100%
rename from client/core/src/directives/bind.js
rename to front/core/src/directives/bind.js
diff --git a/client/core/src/directives/dialog.js b/front/core/src/directives/dialog.js
similarity index 100%
rename from client/core/src/directives/dialog.js
rename to front/core/src/directives/dialog.js
diff --git a/client/core/src/directives/focus.js b/front/core/src/directives/focus.js
similarity index 100%
rename from client/core/src/directives/focus.js
rename to front/core/src/directives/focus.js
diff --git a/client/core/src/directives/id.js b/front/core/src/directives/id.js
similarity index 100%
rename from client/core/src/directives/id.js
rename to front/core/src/directives/id.js
diff --git a/client/core/src/directives/index.js b/front/core/src/directives/index.js
similarity index 100%
rename from client/core/src/directives/index.js
rename to front/core/src/directives/index.js
diff --git a/client/core/src/directives/no-image.png b/front/core/src/directives/no-image.png
similarity index 100%
rename from client/core/src/directives/no-image.png
rename to front/core/src/directives/no-image.png
diff --git a/client/core/src/directives/on-error-src.js b/front/core/src/directives/on-error-src.js
similarity index 100%
rename from client/core/src/directives/on-error-src.js
rename to front/core/src/directives/on-error-src.js
diff --git a/client/core/src/directives/popover.js b/front/core/src/directives/popover.js
similarity index 100%
rename from client/core/src/directives/popover.js
rename to front/core/src/directives/popover.js
diff --git a/client/core/src/directives/repeat-last.js b/front/core/src/directives/repeat-last.js
similarity index 100%
rename from client/core/src/directives/repeat-last.js
rename to front/core/src/directives/repeat-last.js
diff --git a/client/core/src/directives/specs/acl.spec.js b/front/core/src/directives/specs/acl.spec.js
similarity index 88%
rename from client/core/src/directives/specs/acl.spec.js
rename to front/core/src/directives/specs/acl.spec.js
index a556e686f..2ceb56568 100644
--- a/client/core/src/directives/specs/acl.spec.js
+++ b/front/core/src/directives/specs/acl.spec.js
@@ -4,13 +4,10 @@ describe('Directive acl', () => {
let compile;
let $timeout;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('vnCore'));
compile = (hasPermissions, _element) => {
- inject(($compile, $rootScope, aclService, _$timeout_, _$httpBackend_) => {
- _$httpBackend_.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
+ inject(($compile, $rootScope, aclService, _$timeout_) => {
spyOn(aclService, 'aclPermission').and.returnValue(hasPermissions);
scope = $rootScope.$new();
$timeout = _$timeout_;
diff --git a/client/core/src/directives/specs/bind.spec.js b/front/core/src/directives/specs/bind.spec.js
similarity index 95%
rename from client/core/src/directives/specs/bind.spec.js
rename to front/core/src/directives/specs/bind.spec.js
index 8a3551feb..d8d2cb359 100644
--- a/client/core/src/directives/specs/bind.spec.js
+++ b/front/core/src/directives/specs/bind.spec.js
@@ -1,7 +1,7 @@
describe('Directive bind', () => {
let compile;
- beforeEach(ngModule('client'));
+ beforeEach(ngModule('vnCore'));
compile = html => {
inject(($compile, $rootScope) => {
diff --git a/client/core/src/directives/specs/dialog.spec.js b/front/core/src/directives/specs/dialog.spec.js
similarity index 73%
rename from client/core/src/directives/specs/dialog.spec.js
rename to front/core/src/directives/specs/dialog.spec.js
index 12616fc19..670b28128 100644
--- a/client/core/src/directives/specs/dialog.spec.js
+++ b/front/core/src/directives/specs/dialog.spec.js
@@ -3,12 +3,9 @@ describe('Directive dialog', () => {
let $element;
let element;
let compile;
- let $componentController;
let controller;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('vnCore'));
compile = _element => {
inject(($compile, $rootScope) => {
@@ -20,9 +17,7 @@ describe('Directive dialog', () => {
});
};
- beforeEach(angular.mock.inject((_$componentController_, _$httpBackend_) => {
- $componentController = _$componentController_;
- _$httpBackend_.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
+ beforeEach(angular.mock.inject($componentController => {
$element = angular.element('
');
controller = $componentController('vnDialog', {$element: $element, $transclude: null});
}));
diff --git a/client/core/src/directives/specs/focus.spec.js b/front/core/src/directives/specs/focus.spec.js
similarity index 85%
rename from client/core/src/directives/specs/focus.spec.js
rename to front/core/src/directives/specs/focus.spec.js
index 6b13c98a3..541a0b640 100644
--- a/client/core/src/directives/specs/focus.spec.js
+++ b/front/core/src/directives/specs/focus.spec.js
@@ -3,18 +3,15 @@ describe('Directive focus', () => {
let $element;
let compile;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('vnCore'));
compile = (_element, _childElement) => {
- inject(($compile, $rootScope, _$httpBackend_) => {
+ inject(($compile, $rootScope) => {
$scope = $rootScope.$new();
- _$httpBackend_.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
$element = angular.element(_element);
- if (_childElement) {
+ if (_childElement)
$element[0].firstChild.focus = jasmine.createSpy(focus);
- }
+
$element[0].focus = jasmine.createSpy('focus');
$element[0].select = jasmine.createSpy('select');
$compile($element)($scope);
diff --git a/client/core/src/directives/specs/id.spec.js b/front/core/src/directives/specs/id.spec.js
similarity index 100%
rename from client/core/src/directives/specs/id.spec.js
rename to front/core/src/directives/specs/id.spec.js
diff --git a/client/core/src/directives/specs/validation.spec.js b/front/core/src/directives/specs/validation.spec.js
similarity index 97%
rename from client/core/src/directives/specs/validation.spec.js
rename to front/core/src/directives/specs/validation.spec.js
index 26208e34b..bcf931a99 100644
--- a/client/core/src/directives/specs/validation.spec.js
+++ b/front/core/src/directives/specs/validation.spec.js
@@ -3,14 +3,11 @@ describe('Directive validation', () => {
let element;
let compile;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('vnCore'));
compile = (_element, validations, value) => {
- inject(($compile, $rootScope, aclService, _$timeout_, $window, _$httpBackend_) => {
+ inject(($compile, $rootScope, $window) => {
$window.validations = validations;
- _$httpBackend_.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
scope = $rootScope.$new();
scope.user = {name: value};
element = angular.element(_element);
diff --git a/client/core/src/directives/specs/zoom-image.spec.js b/front/core/src/directives/specs/zoom-image.spec.js
similarity index 88%
rename from client/core/src/directives/specs/zoom-image.spec.js
rename to front/core/src/directives/specs/zoom-image.spec.js
index bf1bc252e..f9d9c1801 100644
--- a/client/core/src/directives/specs/zoom-image.spec.js
+++ b/front/core/src/directives/specs/zoom-image.spec.js
@@ -5,14 +5,11 @@ describe('Directive zoomImage', () => {
let srcZoom = 'http://zoom.img.jpg/';
let findContainer;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('vnCore'));
- beforeEach(angular.mock.inject(($compile, $rootScope, $httpBackend) => {
+ beforeEach(angular.mock.inject(($compile, $rootScope) => {
compile = $compile;
scope = $rootScope.$new();
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
}));
afterEach(() => {
@@ -24,7 +21,7 @@ describe('Directive zoomImage', () => {
function getCompiledImage(imgHtml) {
let element = angular.element(imgHtml);
- var compiledElement = compile(element)(scope);
+ let compiledElement = compile(element)(scope);
scope.$digest();
return compiledElement;
}
diff --git a/client/core/src/directives/title.js b/front/core/src/directives/title.js
similarity index 100%
rename from client/core/src/directives/title.js
rename to front/core/src/directives/title.js
diff --git a/client/core/src/directives/validation.js b/front/core/src/directives/validation.js
similarity index 100%
rename from client/core/src/directives/validation.js
rename to front/core/src/directives/validation.js
diff --git a/client/core/src/directives/visible-by.js b/front/core/src/directives/visible-by.js
similarity index 100%
rename from client/core/src/directives/visible-by.js
rename to front/core/src/directives/visible-by.js
diff --git a/client/core/src/directives/zoom-image.js b/front/core/src/directives/zoom-image.js
similarity index 100%
rename from client/core/src/directives/zoom-image.js
rename to front/core/src/directives/zoom-image.js
diff --git a/client/core/src/filters/currency.js b/front/core/src/filters/currency.js
similarity index 100%
rename from client/core/src/filters/currency.js
rename to front/core/src/filters/currency.js
diff --git a/client/core/src/filters/dash-if-empty.js b/front/core/src/filters/dash-if-empty.js
similarity index 100%
rename from client/core/src/filters/dash-if-empty.js
rename to front/core/src/filters/dash-if-empty.js
diff --git a/client/core/src/filters/dateTime.js b/front/core/src/filters/dateTime.js
similarity index 100%
rename from client/core/src/filters/dateTime.js
rename to front/core/src/filters/dateTime.js
diff --git a/client/core/src/filters/index.js b/front/core/src/filters/index.js
similarity index 100%
rename from client/core/src/filters/index.js
rename to front/core/src/filters/index.js
diff --git a/client/core/src/filters/percentage.js b/front/core/src/filters/percentage.js
similarity index 100%
rename from client/core/src/filters/percentage.js
rename to front/core/src/filters/percentage.js
diff --git a/client/core/src/filters/phone.js b/front/core/src/filters/phone.js
similarity index 100%
rename from client/core/src/filters/phone.js
rename to front/core/src/filters/phone.js
diff --git a/client/core/src/filters/specs/currency.spec.js b/front/core/src/filters/specs/currency.spec.js
similarity index 97%
rename from client/core/src/filters/specs/currency.spec.js
rename to front/core/src/filters/specs/currency.spec.js
index fa6ba24f2..db5a0c163 100644
--- a/client/core/src/filters/specs/currency.spec.js
+++ b/front/core/src/filters/specs/currency.spec.js
@@ -2,7 +2,7 @@ describe('Currency filter', () => {
let compile;
let $element;
- beforeEach(ngModule('client'));
+ beforeEach(ngModule('vnCore'));
compile = html => {
inject(($compile, $rootScope) => {
diff --git a/client/core/src/filters/ucwords.js b/front/core/src/filters/ucwords.js
similarity index 100%
rename from client/core/src/filters/ucwords.js
rename to front/core/src/filters/ucwords.js
diff --git a/client/core/src/filters/zero-fill.js b/front/core/src/filters/zero-fill.js
similarity index 100%
rename from client/core/src/filters/zero-fill.js
rename to front/core/src/filters/zero-fill.js
diff --git a/client/core/src/lib/acl-service.js b/front/core/src/lib/acl-service.js
similarity index 100%
rename from client/core/src/lib/acl-service.js
rename to front/core/src/lib/acl-service.js
diff --git a/client/core/src/lib/app.js b/front/core/src/lib/app.js
similarity index 100%
rename from client/core/src/lib/app.js
rename to front/core/src/lib/app.js
diff --git a/client/core/src/lib/assign-props.js b/front/core/src/lib/assign-props.js
similarity index 100%
rename from client/core/src/lib/assign-props.js
rename to front/core/src/lib/assign-props.js
diff --git a/client/core/src/lib/component.js b/front/core/src/lib/component.js
similarity index 100%
rename from client/core/src/lib/component.js
rename to front/core/src/lib/component.js
diff --git a/client/core/src/lib/copy.js b/front/core/src/lib/copy.js
similarity index 100%
rename from client/core/src/lib/copy.js
rename to front/core/src/lib/copy.js
diff --git a/client/core/src/lib/crud.js b/front/core/src/lib/crud.js
similarity index 100%
rename from client/core/src/lib/crud.js
rename to front/core/src/lib/crud.js
diff --git a/client/core/src/lib/date.js b/front/core/src/lib/date.js
similarity index 100%
rename from client/core/src/lib/date.js
rename to front/core/src/lib/date.js
diff --git a/client/core/src/lib/equals.js b/front/core/src/lib/equals.js
similarity index 100%
rename from client/core/src/lib/equals.js
rename to front/core/src/lib/equals.js
diff --git a/client/core/src/lib/event-emitter.js b/front/core/src/lib/event-emitter.js
similarity index 100%
rename from client/core/src/lib/event-emitter.js
rename to front/core/src/lib/event-emitter.js
diff --git a/client/core/src/lib/full-empty.js b/front/core/src/lib/full-empty.js
similarity index 100%
rename from client/core/src/lib/full-empty.js
rename to front/core/src/lib/full-empty.js
diff --git a/client/core/src/lib/http-error.js b/front/core/src/lib/http-error.js
similarity index 100%
rename from client/core/src/lib/http-error.js
rename to front/core/src/lib/http-error.js
diff --git a/client/core/src/lib/index.js b/front/core/src/lib/index.js
similarity index 100%
rename from client/core/src/lib/index.js
rename to front/core/src/lib/index.js
diff --git a/client/core/src/lib/input.js b/front/core/src/lib/input.js
similarity index 100%
rename from client/core/src/lib/input.js
rename to front/core/src/lib/input.js
diff --git a/client/core/src/lib/interceptor.js b/front/core/src/lib/interceptor.js
similarity index 100%
rename from client/core/src/lib/interceptor.js
rename to front/core/src/lib/interceptor.js
diff --git a/client/core/src/lib/interpolate.js b/front/core/src/lib/interpolate.js
similarity index 100%
rename from client/core/src/lib/interpolate.js
rename to front/core/src/lib/interpolate.js
diff --git a/client/core/src/lib/key-codes.js b/front/core/src/lib/key-codes.js
similarity index 100%
rename from client/core/src/lib/key-codes.js
rename to front/core/src/lib/key-codes.js
diff --git a/client/core/src/lib/modified.js b/front/core/src/lib/modified.js
similarity index 100%
rename from client/core/src/lib/modified.js
rename to front/core/src/lib/modified.js
diff --git a/client/core/src/lib/module-loader.js b/front/core/src/lib/module-loader.js
similarity index 100%
rename from client/core/src/lib/module-loader.js
rename to front/core/src/lib/module-loader.js
diff --git a/client/core/src/lib/specs/acl-service.spec.js b/front/core/src/lib/specs/acl-service.spec.js
similarity index 71%
rename from client/core/src/lib/specs/acl-service.spec.js
rename to front/core/src/lib/specs/acl-service.spec.js
index d95347bef..fb9c4a40e 100644
--- a/client/core/src/lib/specs/acl-service.spec.js
+++ b/front/core/src/lib/specs/acl-service.spec.js
@@ -1,11 +1,9 @@
describe('Service acl', () => {
let aclService;
- beforeEach(() => {
- angular.mock.module('vnCore');
- });
+ beforeEach(ngModule('vnCore'));
- beforeEach(angular.mock.module($provide => {
+ beforeEach(ngModule($provide => {
$provide.value('aclConstant', {});
}));
@@ -13,24 +11,24 @@ describe('Service acl', () => {
aclService = _aclService_;
}));
- it("should return false as the service doesn't have roles", () => {
+ it('should return false as the service doesn\'t have roles', () => {
expect(aclService.routeHasPermission('http://www.verdnatura.es')).toBeFalsy();
});
- it("should return true as the service has roles but the route has no acl", () => {
+ it('should return true as the service has roles but the route has no acl', () => {
aclService.roles = {customer: true};
expect(aclService.routeHasPermission('http://www.verdnatura.es')).toBeTruthy();
});
- it("should return false as the service roles have no length", () => {
+ it('should return false as the service roles have no length', () => {
aclService.roles = {};
let route = {url: 'http://www.verdnatura.es', acl: []};
expect(aclService.routeHasPermission(route)).toBeFalsy();
});
- it("should call the service aclPermission() function and return false as the service has roles and the rote has acl without length", () => {
+ it('should call the service aclPermission() function and return false as the service has roles and the rote has acl without length', () => {
aclService.roles = {customer: true, employee: true};
let route = {url: 'http://www.verdnatura.es', acl: []};
spyOn(aclService, 'aclPermission').and.callThrough();
@@ -39,7 +37,7 @@ describe('Service acl', () => {
expect(aclService.aclPermission).toHaveBeenCalledWith(route.acl);
});
- it("should call the service aclPermission() function to return true as the service has roles matching with the ones in acl", () => {
+ it('should call the service aclPermission() function to return true as the service has roles matching with the ones in acl', () => {
aclService.roles = {customer: true, employee: true};
let route = {url: 'http://www.verdnatura.es', acl: ['customer']};
spyOn(aclService, 'aclPermission').and.callThrough();
diff --git a/client/core/src/lib/specs/module-loader.spec.js b/front/core/src/lib/specs/module-loader.spec.js
similarity index 73%
rename from client/core/src/lib/specs/module-loader.spec.js
rename to front/core/src/lib/specs/module-loader.spec.js
index f46850b98..d63148d34 100644
--- a/client/core/src/lib/specs/module-loader.spec.js
+++ b/front/core/src/lib/specs/module-loader.spec.js
@@ -2,14 +2,11 @@ describe('factory vnModuleLoader', () => {
let vnModuleLoader;
let $scope;
- beforeEach(() => {
- angular.mock.module('vnCore');
- });
+ beforeEach(ngModule('vnCore'));
- beforeEach(angular.mock.inject((_vnModuleLoader_, $rootScope, $httpBackend) => {
+ beforeEach(angular.mock.inject((_vnModuleLoader_, $rootScope) => {
vnModuleLoader = _vnModuleLoader_;
$scope = $rootScope;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
}));
describe('load()', () => {
@@ -35,13 +32,13 @@ describe('factory vnModuleLoader', () => {
vnModuleLoader._loaded.myModule = false;
vnModuleLoader.load('myModule', {myValidations: () => {}})
- .then(() => {
- done.fail('this must fail');
- })
- .catch(error => {
- expect(error.toString()).toEqual(`Error: Module dependency loop detected: myModule`);
- done();
- });
+ .then(() => {
+ done.fail('this must fail');
+ })
+ .catch(error => {
+ expect(error.toString()).toEqual(`Error: Module dependency loop detected: myModule`);
+ done();
+ });
$scope.$apply();
});
});
diff --git a/client/core/src/lib/spliting-register.js b/front/core/src/lib/spliting-register.js
similarity index 100%
rename from client/core/src/lib/spliting-register.js
rename to front/core/src/lib/spliting-register.js
diff --git a/client/core/src/lib/storage-services.js b/front/core/src/lib/storage-services.js
similarity index 100%
rename from client/core/src/lib/storage-services.js
rename to front/core/src/lib/storage-services.js
diff --git a/client/core/src/lib/string.js b/front/core/src/lib/string.js
similarity index 100%
rename from client/core/src/lib/string.js
rename to front/core/src/lib/string.js
diff --git a/client/core/src/lib/template.js b/front/core/src/lib/template.js
similarity index 100%
rename from client/core/src/lib/template.js
rename to front/core/src/lib/template.js
diff --git a/client/core/src/lib/user-error.js b/front/core/src/lib/user-error.js
similarity index 100%
rename from client/core/src/lib/user-error.js
rename to front/core/src/lib/user-error.js
diff --git a/client/core/src/lib/validator.js b/front/core/src/lib/validator.js
similarity index 100%
rename from client/core/src/lib/validator.js
rename to front/core/src/lib/validator.js
diff --git a/client/core/src/locale/en.yml b/front/core/src/locale/en.yml
similarity index 100%
rename from client/core/src/locale/en.yml
rename to front/core/src/locale/en.yml
diff --git a/client/core/src/locale/es.yml b/front/core/src/locale/es.yml
similarity index 100%
rename from client/core/src/locale/es.yml
rename to front/core/src/locale/es.yml
diff --git a/client/core/src/module.js b/front/core/src/module.js
similarity index 100%
rename from client/core/src/module.js
rename to front/core/src/module.js
diff --git a/client/core/src/styles/Material-Design-Icons.woff2 b/front/core/src/styles/Material-Design-Icons.woff2
similarity index 100%
rename from client/core/src/styles/Material-Design-Icons.woff2
rename to front/core/src/styles/Material-Design-Icons.woff2
diff --git a/client/core/src/styles/index.js b/front/core/src/styles/index.js
similarity index 100%
rename from client/core/src/styles/index.js
rename to front/core/src/styles/index.js
diff --git a/client/core/src/styles/mdi-override.css b/front/core/src/styles/mdi-override.css
similarity index 100%
rename from client/core/src/styles/mdi-override.css
rename to front/core/src/styles/mdi-override.css
diff --git a/client/core/src/styles/mdl-override.scss b/front/core/src/styles/mdl-override.scss
similarity index 100%
rename from client/core/src/styles/mdl-override.scss
rename to front/core/src/styles/mdl-override.scss
diff --git a/client/core/src/styles/salixfont.css b/front/core/src/styles/salixfont.css
similarity index 100%
rename from client/core/src/styles/salixfont.css
rename to front/core/src/styles/salixfont.css
diff --git a/client/core/src/styles/salixfont.eot b/front/core/src/styles/salixfont.eot
similarity index 100%
rename from client/core/src/styles/salixfont.eot
rename to front/core/src/styles/salixfont.eot
diff --git a/client/core/src/styles/salixfont.svg b/front/core/src/styles/salixfont.svg
similarity index 100%
rename from client/core/src/styles/salixfont.svg
rename to front/core/src/styles/salixfont.svg
diff --git a/client/core/src/styles/salixfont.ttf b/front/core/src/styles/salixfont.ttf
similarity index 100%
rename from client/core/src/styles/salixfont.ttf
rename to front/core/src/styles/salixfont.ttf
diff --git a/client/core/src/styles/salixfont.woff b/front/core/src/styles/salixfont.woff
similarity index 100%
rename from client/core/src/styles/salixfont.woff
rename to front/core/src/styles/salixfont.woff
diff --git a/client/core/src/styles/zoom-image.scss b/front/core/src/styles/zoom-image.scss
similarity index 100%
rename from client/core/src/styles/zoom-image.scss
rename to front/core/src/styles/zoom-image.scss
diff --git a/client/helpers/crudModelHelper.js b/front/mocks/crud-model.js
similarity index 93%
rename from client/helpers/crudModelHelper.js
rename to front/mocks/crud-model.js
index 8bd33a955..d2e4c74ce 100644
--- a/client/helpers/crudModelHelper.js
+++ b/front/mocks/crud-model.js
@@ -1,4 +1,4 @@
-module.exports.crudModel = {
+module.exports = {
data: [],
filter: {},
order: {},
diff --git a/client/helpers/watcherHelper.js b/front/mocks/watcher.js
similarity index 94%
rename from client/helpers/watcherHelper.js
rename to front/mocks/watcher.js
index b6494b942..05022bf88 100644
--- a/client/helpers/watcherHelper.js
+++ b/front/mocks/watcher.js
@@ -1,4 +1,4 @@
-module.exports.watcher = {
+module.exports = {
submit: () => {
return {
then: callback => {
diff --git a/client/modules.yml b/front/modules.yml
similarity index 100%
rename from client/modules.yml
rename to front/modules.yml
diff --git a/client/package-lock.json b/front/package-lock.json
similarity index 100%
rename from client/package-lock.json
rename to front/package-lock.json
diff --git a/client/package.json b/front/package.json
similarity index 100%
rename from client/package.json
rename to front/package.json
diff --git a/client/salix/index.js b/front/salix/index.js
similarity index 100%
rename from client/salix/index.js
rename to front/salix/index.js
diff --git a/client/salix/src/bootstrap.js b/front/salix/src/bootstrap.js
similarity index 100%
rename from client/salix/src/bootstrap.js
rename to front/salix/src/bootstrap.js
diff --git a/client/salix/src/components/app/app.html b/front/salix/src/components/app/app.html
similarity index 100%
rename from client/salix/src/components/app/app.html
rename to front/salix/src/components/app/app.html
diff --git a/client/salix/src/components/app/app.js b/front/salix/src/components/app/app.js
similarity index 100%
rename from client/salix/src/components/app/app.js
rename to front/salix/src/components/app/app.js
diff --git a/client/salix/src/components/app/logo.svg b/front/salix/src/components/app/logo.svg
similarity index 100%
rename from client/salix/src/components/app/logo.svg
rename to front/salix/src/components/app/logo.svg
diff --git a/client/salix/src/components/app/style.scss b/front/salix/src/components/app/style.scss
similarity index 100%
rename from client/salix/src/components/app/style.scss
rename to front/salix/src/components/app/style.scss
diff --git a/client/salix/src/components/home/home.html b/front/salix/src/components/home/home.html
similarity index 100%
rename from client/salix/src/components/home/home.html
rename to front/salix/src/components/home/home.html
diff --git a/client/salix/src/components/home/home.js b/front/salix/src/components/home/home.js
similarity index 100%
rename from client/salix/src/components/home/home.js
rename to front/salix/src/components/home/home.js
diff --git a/client/salix/src/components/home/style.scss b/front/salix/src/components/home/style.scss
similarity index 100%
rename from client/salix/src/components/home/style.scss
rename to front/salix/src/components/home/style.scss
diff --git a/client/salix/src/components/index.js b/front/salix/src/components/index.js
similarity index 100%
rename from client/salix/src/components/index.js
rename to front/salix/src/components/index.js
diff --git a/client/salix/src/components/left-menu/left-menu.html b/front/salix/src/components/left-menu/left-menu.html
similarity index 100%
rename from client/salix/src/components/left-menu/left-menu.html
rename to front/salix/src/components/left-menu/left-menu.html
diff --git a/client/salix/src/components/left-menu/left-menu.js b/front/salix/src/components/left-menu/left-menu.js
similarity index 100%
rename from client/salix/src/components/left-menu/left-menu.js
rename to front/salix/src/components/left-menu/left-menu.js
diff --git a/client/salix/src/components/left-menu/left-menu.spec.js b/front/salix/src/components/left-menu/left-menu.spec.js
similarity index 78%
rename from client/salix/src/components/left-menu/left-menu.spec.js
rename to front/salix/src/components/left-menu/left-menu.spec.js
index 6f3fc5796..5eb5c8126 100644
--- a/client/salix/src/components/left-menu/left-menu.spec.js
+++ b/front/salix/src/components/left-menu/left-menu.spec.js
@@ -1,21 +1,15 @@
import './left-menu.js';
describe('Component vnLeftMenu', () => {
- let $state;
let controller;
- let $window;
- beforeEach(() => {
- angular.mock.module('salix');
- });
+ beforeEach(ngModule('salix'));
- beforeEach(angular.mock.inject((_$componentController_, _$state_, _$window_) => {
- $state = _$state_;
+ beforeEach(angular.mock.inject(($componentController, $state, $window) => {
$state.current.name = 'client.card.summary';
$state.current.data = {moduleIndex: 0};
- $window = _$window_;
$window.routes = [{menu: []}];
- controller = _$componentController_('vnLeftMenu', {$state, $window});
+ controller = $componentController('vnLeftMenu', {$state, $window});
controller.items = [
{description: 'Client', state: 'client', icon: null, childs: []},
{description: 'Client', state: 'client.card', icon: null, childs: []},
diff --git a/client/salix/src/components/left-menu/style.scss b/front/salix/src/components/left-menu/style.scss
similarity index 100%
rename from client/salix/src/components/left-menu/style.scss
rename to front/salix/src/components/left-menu/style.scss
diff --git a/client/salix/src/components/main-menu/main-menu.html b/front/salix/src/components/main-menu/main-menu.html
similarity index 100%
rename from client/salix/src/components/main-menu/main-menu.html
rename to front/salix/src/components/main-menu/main-menu.html
diff --git a/client/salix/src/components/main-menu/main-menu.js b/front/salix/src/components/main-menu/main-menu.js
similarity index 100%
rename from client/salix/src/components/main-menu/main-menu.js
rename to front/salix/src/components/main-menu/main-menu.js
diff --git a/client/salix/src/components/main-menu/main-menu.spec.js b/front/salix/src/components/main-menu/main-menu.spec.js
similarity index 80%
rename from client/salix/src/components/main-menu/main-menu.spec.js
rename to front/salix/src/components/main-menu/main-menu.spec.js
index 475495b2a..51817106c 100644
--- a/client/salix/src/components/main-menu/main-menu.spec.js
+++ b/front/salix/src/components/main-menu/main-menu.spec.js
@@ -6,10 +6,10 @@ describe('Component vnMainMenu', () => {
beforeEach(ngModule('salix'));
- beforeEach(angular.mock.inject((_$componentController_, _$httpBackend_) => {
+ beforeEach(angular.mock.inject(($componentController, _$httpBackend_) => {
let modulesFactory = {getModules: () => {}};
$httpBackend = _$httpBackend_;
- controller = _$componentController_('vnMainMenu', {modulesFactory: modulesFactory});
+ controller = $componentController('vnMainMenu', {modulesFactory});
}));
describe('getCurrentUserName()', () => {
diff --git a/client/salix/src/components/main-menu/style.scss b/front/salix/src/components/main-menu/style.scss
similarity index 100%
rename from client/salix/src/components/main-menu/style.scss
rename to front/salix/src/components/main-menu/style.scss
diff --git a/client/salix/src/components/topbar/style.scss b/front/salix/src/components/topbar/style.scss
similarity index 100%
rename from client/salix/src/components/topbar/style.scss
rename to front/salix/src/components/topbar/style.scss
diff --git a/client/salix/src/components/topbar/topbar.html b/front/salix/src/components/topbar/topbar.html
similarity index 100%
rename from client/salix/src/components/topbar/topbar.html
rename to front/salix/src/components/topbar/topbar.html
diff --git a/client/salix/src/components/topbar/topbar.js b/front/salix/src/components/topbar/topbar.js
similarity index 100%
rename from client/salix/src/components/topbar/topbar.js
rename to front/salix/src/components/topbar/topbar.js
diff --git a/client/salix/src/components/user-configuration-popover/index.html b/front/salix/src/components/user-configuration-popover/index.html
similarity index 100%
rename from client/salix/src/components/user-configuration-popover/index.html
rename to front/salix/src/components/user-configuration-popover/index.html
diff --git a/client/salix/src/components/user-configuration-popover/index.js b/front/salix/src/components/user-configuration-popover/index.js
similarity index 100%
rename from client/salix/src/components/user-configuration-popover/index.js
rename to front/salix/src/components/user-configuration-popover/index.js
diff --git a/client/salix/src/components/user-configuration-popover/index.spec.js b/front/salix/src/components/user-configuration-popover/index.spec.js
similarity index 91%
rename from client/salix/src/components/user-configuration-popover/index.spec.js
rename to front/salix/src/components/user-configuration-popover/index.spec.js
index 87739e20e..d6c61de29 100644
--- a/client/salix/src/components/user-configuration-popover/index.spec.js
+++ b/front/salix/src/components/user-configuration-popover/index.spec.js
@@ -2,19 +2,14 @@ import './index.js';
describe('Salix', () => {
describe('Component vnUserConfigurationPopover', () => {
- let $componentController;
let controller;
let $httpBackend;
let $scope;
- beforeEach(() => {
- angular.mock.module('salix');
- });
+ beforeEach(ngModule('salix'));
- beforeEach(angular.mock.inject((_$componentController_, _$httpBackend_, $rootScope) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $rootScope) => {
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
$scope = $rootScope.$new();
controller = $componentController('vnUserConfigurationPopover', {$scope: $scope, $translate: null});
}));
diff --git a/client/salix/src/components/user-configuration-popover/style.scss b/front/salix/src/components/user-configuration-popover/style.scss
similarity index 100%
rename from client/salix/src/components/user-configuration-popover/style.scss
rename to front/salix/src/components/user-configuration-popover/style.scss
diff --git a/client/salix/src/config-routes.js b/front/salix/src/config-routes.js
similarity index 100%
rename from client/salix/src/config-routes.js
rename to front/salix/src/config-routes.js
diff --git a/client/salix/src/global-keybindings.yml b/front/salix/src/global-keybindings.yml
similarity index 100%
rename from client/salix/src/global-keybindings.yml
rename to front/salix/src/global-keybindings.yml
diff --git a/client/salix/src/locale/en.yml b/front/salix/src/locale/en.yml
similarity index 100%
rename from client/salix/src/locale/en.yml
rename to front/salix/src/locale/en.yml
diff --git a/client/salix/src/locale/es.yml b/front/salix/src/locale/es.yml
similarity index 100%
rename from client/salix/src/locale/es.yml
rename to front/salix/src/locale/es.yml
diff --git a/client/salix/src/module.js b/front/salix/src/module.js
similarity index 100%
rename from client/salix/src/module.js
rename to front/salix/src/module.js
diff --git a/client/salix/src/modules-factory.js b/front/salix/src/modules-factory.js
similarity index 100%
rename from client/salix/src/modules-factory.js
rename to front/salix/src/modules-factory.js
diff --git a/client/salix/src/package.json b/front/salix/src/package.json
similarity index 100%
rename from client/salix/src/package.json
rename to front/salix/src/package.json
diff --git a/client/salix/src/salix.js b/front/salix/src/salix.js
similarity index 100%
rename from client/salix/src/salix.js
rename to front/salix/src/salix.js
diff --git a/client/salix/src/styles/background.scss b/front/salix/src/styles/background.scss
similarity index 100%
rename from client/salix/src/styles/background.scss
rename to front/salix/src/styles/background.scss
diff --git a/client/salix/src/styles/border.scss b/front/salix/src/styles/border.scss
similarity index 100%
rename from client/salix/src/styles/border.scss
rename to front/salix/src/styles/border.scss
diff --git a/client/salix/src/styles/colors.scss b/front/salix/src/styles/colors.scss
similarity index 100%
rename from client/salix/src/styles/colors.scss
rename to front/salix/src/styles/colors.scss
diff --git a/client/salix/src/styles/display.scss b/front/salix/src/styles/display.scss
similarity index 100%
rename from client/salix/src/styles/display.scss
rename to front/salix/src/styles/display.scss
diff --git a/client/salix/src/styles/effects.scss b/front/salix/src/styles/effects.scss
similarity index 100%
rename from client/salix/src/styles/effects.scss
rename to front/salix/src/styles/effects.scss
diff --git a/client/salix/src/styles/font-family.scss b/front/salix/src/styles/font-family.scss
similarity index 100%
rename from client/salix/src/styles/font-family.scss
rename to front/salix/src/styles/font-family.scss
diff --git a/client/salix/src/styles/font-style.scss b/front/salix/src/styles/font-style.scss
similarity index 100%
rename from client/salix/src/styles/font-style.scss
rename to front/salix/src/styles/font-style.scss
diff --git a/client/salix/src/styles/fonts/Roboto-Bold.ttf b/front/salix/src/styles/fonts/Roboto-Bold.ttf
similarity index 100%
rename from client/salix/src/styles/fonts/Roboto-Bold.ttf
rename to front/salix/src/styles/fonts/Roboto-Bold.ttf
diff --git a/client/salix/src/styles/fonts/Roboto-Medium.ttf b/front/salix/src/styles/fonts/Roboto-Medium.ttf
similarity index 100%
rename from client/salix/src/styles/fonts/Roboto-Medium.ttf
rename to front/salix/src/styles/fonts/Roboto-Medium.ttf
diff --git a/client/salix/src/styles/fonts/Roboto-Regular.ttf b/front/salix/src/styles/fonts/Roboto-Regular.ttf
similarity index 100%
rename from client/salix/src/styles/fonts/Roboto-Regular.ttf
rename to front/salix/src/styles/fonts/Roboto-Regular.ttf
diff --git a/client/salix/src/styles/index.js b/front/salix/src/styles/index.js
similarity index 100%
rename from client/salix/src/styles/index.js
rename to front/salix/src/styles/index.js
diff --git a/client/salix/src/styles/layout.scss b/front/salix/src/styles/layout.scss
similarity index 100%
rename from client/salix/src/styles/layout.scss
rename to front/salix/src/styles/layout.scss
diff --git a/client/salix/src/styles/margin.scss b/front/salix/src/styles/margin.scss
similarity index 100%
rename from client/salix/src/styles/margin.scss
rename to front/salix/src/styles/margin.scss
diff --git a/client/salix/src/styles/misc.scss b/front/salix/src/styles/misc.scss
similarity index 100%
rename from client/salix/src/styles/misc.scss
rename to front/salix/src/styles/misc.scss
diff --git a/client/salix/src/styles/order-product.scss b/front/salix/src/styles/order-product.scss
similarity index 100%
rename from client/salix/src/styles/order-product.scss
rename to front/salix/src/styles/order-product.scss
diff --git a/client/salix/src/styles/padding.scss b/front/salix/src/styles/padding.scss
similarity index 100%
rename from client/salix/src/styles/padding.scss
rename to front/salix/src/styles/padding.scss
diff --git a/client/salix/src/styles/summary.scss b/front/salix/src/styles/summary.scss
similarity index 100%
rename from client/salix/src/styles/summary.scss
rename to front/salix/src/styles/summary.scss
diff --git a/client/salix/src/styles/title.scss b/front/salix/src/styles/title.scss
similarity index 100%
rename from client/salix/src/styles/title.scss
rename to front/salix/src/styles/title.scss
diff --git a/front/spliting.js b/front/spliting.js
new file mode 100644
index 000000000..7242f97c0
--- /dev/null
+++ b/front/spliting.js
@@ -0,0 +1,18 @@
+export default {
+ client:
+ cb => require.ensure([], () => cb(require('client/front'))),
+ route:
+ cb => require.ensure([], () => cb(require('route/front'))),
+ item:
+ cb => require.ensure([], () => cb(require('item/front'))),
+ ticket:
+ cb => require.ensure([], () => cb(require('ticket/front'))),
+ order:
+ cb => require.ensure([], () => cb(require('order/front'))),
+ claim:
+ cb => require.ensure([], () => cb(require('claim/front'))),
+ agency:
+ cb => require.ensure([], () => cb(require('agency/front'))),
+ travel:
+ cb => require.ensure([], () => cb(require('travel/front')))
+};
diff --git a/client/test_index.js b/front/test_index.js
similarity index 85%
rename from client/test_index.js
rename to front/test_index.js
index 626d0b2cb..5a7c5c713 100644
--- a/client/test_index.js
+++ b/front/test_index.js
@@ -23,3 +23,6 @@ window.ngModule = function(moduleName) {
let testsContext = require.context('./', true, /\.spec\.js$/);
testsContext.keys().forEach(testsContext);
+
+let modulesContext = require.context('../modules/', true, /^\.\/[a-z0-9]+\/front\/.+\.spec\.js$/);
+modulesContext.keys().forEach(modulesContext);
diff --git a/client/vendor/index.js b/front/vendor/index.js
similarity index 100%
rename from client/vendor/index.js
rename to front/vendor/index.js
diff --git a/client/vendor/src/angular-cookies.js b/front/vendor/src/angular-cookies.js
similarity index 100%
rename from client/vendor/src/angular-cookies.js
rename to front/vendor/src/angular-cookies.js
diff --git a/client/vendor/src/angular-translate.js b/front/vendor/src/angular-translate.js
similarity index 100%
rename from client/vendor/src/angular-translate.js
rename to front/vendor/src/angular-translate.js
diff --git a/client/vendor/src/angular-ui-router.js b/front/vendor/src/angular-ui-router.js
similarity index 100%
rename from client/vendor/src/angular-ui-router.js
rename to front/vendor/src/angular-ui-router.js
diff --git a/client/vendor/src/angular.js b/front/vendor/src/angular.js
similarity index 100%
rename from client/vendor/src/angular.js
rename to front/vendor/src/angular.js
diff --git a/client/vendor/src/flatpickr.js b/front/vendor/src/flatpickr.js
similarity index 100%
rename from client/vendor/src/flatpickr.js
rename to front/vendor/src/flatpickr.js
diff --git a/client/vendor/src/material-design-lite.js b/front/vendor/src/material-design-lite.js
similarity index 100%
rename from client/vendor/src/material-design-lite.js
rename to front/vendor/src/material-design-lite.js
diff --git a/client/vendor/src/mg-crud.js b/front/vendor/src/mg-crud.js
similarity index 100%
rename from client/vendor/src/mg-crud.js
rename to front/vendor/src/mg-crud.js
diff --git a/client/vendor/src/oc-lazy-load.js b/front/vendor/src/oc-lazy-load.js
similarity index 100%
rename from client/vendor/src/oc-lazy-load.js
rename to front/vendor/src/oc-lazy-load.js
diff --git a/client/vendor/src/validator.js b/front/vendor/src/validator.js
similarity index 100%
rename from client/vendor/src/validator.js
rename to front/vendor/src/validator.js
diff --git a/client/vendor/src/vendor.js b/front/vendor/src/vendor.js
similarity index 100%
rename from client/vendor/src/vendor.js
rename to front/vendor/src/vendor.js
diff --git a/gulpfile.js b/gulpfile.js
index 0d8473ae7..635141fdb 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -17,7 +17,7 @@ if (argv.NODE_ENV)
let env = process.env.NODE_ENV ? process.env.NODE_ENV : 'development';
let langs = ['es', 'en'];
-let srcDir = './client';
+let srcDir = './front';
let servicesDir = './services';
let services = require('./services/services.yml');
@@ -41,14 +41,14 @@ gulp.task('default', () => {
return gulp.start('client', 'services');
});
-gulp.task('client', ['build-clean'], async () => {
+gulp.task('client', ['build-clean'], async() => {
await runSequenceP(['routes', 'locales'], 'watch', 'webpack-dev-server');
});
/**
* Starts all backend services, including the nginx proxy and the database.
*/
-gulp.task('services', async () => {
+gulp.task('services', async() => {
await runSequenceP('docker-start', 'services-only', 'nginx');
});
@@ -64,7 +64,7 @@ gulp.task('services-only', callback => {
/**
* Runs the e2e tests, restoring the fixtures first.
*/
-gulp.task('e2e', ['docker'], async () => {
+gulp.task('e2e', ['docker'], async() => {
await runSequenceP('e2e-only');
});
@@ -81,7 +81,7 @@ gulp.task('e2e-only', () => {
.pipe(jasmine({reporter: 'none'}));
});
-gulp.task('smokes', ['docker'], async () => {
+gulp.task('smokes', ['docker'], async() => {
await runSequenceP('smokes-only');
});
@@ -140,11 +140,11 @@ gulp.task('install', () => {
// Deployment
-gulp.task('build', ['clean'], async () => {
+gulp.task('build', ['clean'], async() => {
await runSequenceP(['routes', 'locales', 'webpack', 'docker-compose', 'nginx-conf']);
});
-gulp.task('docker-compose', async () => {
+gulp.task('docker-compose', async() => {
const yaml = require('js-yaml');
let compose = await fs.readFile('./docker-compose.tpl.yml', 'utf8');
@@ -215,14 +215,14 @@ let nginxTemp = `${nginxDir}/temp`;
/**
* Starts the nginx process, if it is started, restarts it.
*/
-gulp.task('nginx', async () => {
+gulp.task('nginx', async() => {
await runSequenceP('nginx-start');
});
/**
* Starts the nginx process, generating it's configuration file first.
*/
-gulp.task('nginx-start', ['nginx-conf'], async () => {
+gulp.task('nginx-start', ['nginx-conf'], async() => {
let nginxBin = await nginxGetBin();
if (isWindows)
@@ -235,7 +235,7 @@ gulp.task('nginx-start', ['nginx-conf'], async () => {
/**
* Stops the nginx process.
*/
-gulp.task('nginx-stop', async () => {
+gulp.task('nginx-stop', async() => {
try {
let nginxBin = await nginxGetBin();
await fs.stat(`${nginxTemp}/nginx.pid`);
@@ -248,7 +248,7 @@ gulp.task('nginx-stop', async () => {
* 'nginx.[environment].mst' file exists, it is used as a template, otherwise,
* the 'nginx.mst' template file is used.
*/
-gulp.task('nginx-conf', ['nginx-stop'], async () => {
+gulp.task('nginx-conf', ['nginx-stop'], async() => {
const mustache = require('mustache');
if (!await fs.exists(nginxTemp))
@@ -354,13 +354,13 @@ gulp.task('locales', function() {
const extend = require('gulp-extend');
const yaml = require('gulp-yaml');
const merge = require('merge-stream');
- const modules = require('./client/modules.yml');
+ const modules = require('./front/modules.yml');
let streams = [];
for (let mod in modules) {
for (let lang of langs) {
- let localeFiles = `./client/${mod}/**/locale/${lang}.yml`;
+ let localeFiles = `./front/${mod}/**/locale/${lang}.yml`;
streams.push(gulp.src(localeFiles)
.pipe(yaml())
.pipe(extend(`${lang}.json`))
@@ -373,7 +373,7 @@ gulp.task('locales', function() {
// Routes
-let routeFiles = `${srcDir}/**/routes.json`;
+let routeFiles = `./modules/*/front/routes.json`;
gulp.task('routes', function() {
const concat = require('gulp-concat');
@@ -398,7 +398,7 @@ gulp.task('watch', function() {
* Rebuilds the docker, if already exists, destroys and
* rebuild it.
*/
-gulp.task('docker', async () => {
+gulp.task('docker', async() => {
try {
await execP('docker rm -fv dblocal');
} catch (e) {}
@@ -410,7 +410,7 @@ gulp.task('docker', async () => {
* Rebuilds the docker image, if already exists, destroys and
* rebuild it. calls upon docker task afterwards.
*/
-gulp.task('docker-build', async () => {
+gulp.task('docker-build', async() => {
try {
await execP('docker rm -fv dblocal');
} catch (e) {}
@@ -433,7 +433,7 @@ gulp.task('docker-build', async () => {
* you do not rebuild the docker you may be using an outdated version of it.
* See the 'docker' task for more info.
*/
-gulp.task('docker-start', async () => {
+gulp.task('docker-start', async() => {
let state;
try {
let result = await execP('docker container inspect -f "{{json .State}}" dblocal');
@@ -455,7 +455,7 @@ gulp.task('docker-start', async () => {
/**
* Runs the docker, if the container or it's image doesn't exists builds them.
*/
-gulp.task('docker-run', async () => {
+gulp.task('docker-run', async() => {
try {
await execP('docker image inspect -f "{{json .Id}}" dblocal');
await execP('docker run -d --name dblocal --volume data:/data -p 3306:3306 dblocal');
diff --git a/karma.conf.js b/karma.conf.js
index 35b337e86..948e5a7c1 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -22,7 +22,7 @@ module.exports = function(config) {
// list of files / patterns to load in the browser
files: [
- {pattern: 'client/test_index.js', watched: false}
+ {pattern: 'front/test_index.js', watched: false}
],
// list of files to exclude
@@ -41,7 +41,7 @@ module.exports = function(config) {
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
- './client/test_index.js': ['webpack', 'sourcemap']
+ './front/test_index.js': ['webpack', 'sourcemap']
},
// test results reporter to use
diff --git a/client/agency/index.js b/modules/agency/front/index.js
similarity index 100%
rename from client/agency/index.js
rename to modules/agency/front/index.js
diff --git a/client/agency/routes.json b/modules/agency/front/routes.json
similarity index 100%
rename from client/agency/routes.json
rename to modules/agency/front/routes.json
diff --git a/client/agency/src/calendar/index.html b/modules/agency/front/src/calendar/index.html
similarity index 100%
rename from client/agency/src/calendar/index.html
rename to modules/agency/front/src/calendar/index.html
diff --git a/client/agency/src/calendar/index.js b/modules/agency/front/src/calendar/index.js
similarity index 100%
rename from client/agency/src/calendar/index.js
rename to modules/agency/front/src/calendar/index.js
diff --git a/client/agency/src/card/index.html b/modules/agency/front/src/card/index.html
similarity index 100%
rename from client/agency/src/card/index.html
rename to modules/agency/front/src/card/index.html
diff --git a/client/agency/src/card/index.js b/modules/agency/front/src/card/index.js
similarity index 100%
rename from client/agency/src/card/index.js
rename to modules/agency/front/src/card/index.js
diff --git a/client/agency/src/card/index.spec.js b/modules/agency/front/src/card/index.spec.js
similarity index 73%
rename from client/agency/src/card/index.spec.js
rename to modules/agency/front/src/card/index.spec.js
index ddbb5e730..8b1d2490f 100644
--- a/client/agency/src/card/index.spec.js
+++ b/modules/agency/front/src/card/index.spec.js
@@ -2,23 +2,18 @@ import './index.js';
describe('Agency', () => {
describe('Component vnZoneCard', () => {
- let $componentController;
let $scope;
let controller;
let $httpBackend;
let $stateParams;
- beforeEach(() => {
- angular.mock.module('agency');
- });
+ beforeEach(ngModule('agency'));
- beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_) => {
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
$scope = $rootScope.$new();
$stateParams = {id: 1};
- controller = $componentController('vnZoneCard', {$scope: $scope, $stateParams});
+ controller = $componentController('vnZoneCard', {$scope, $stateParams});
}));
describe('getCard()', () => {
diff --git a/client/agency/src/create/index.html b/modules/agency/front/src/create/index.html
similarity index 100%
rename from client/agency/src/create/index.html
rename to modules/agency/front/src/create/index.html
diff --git a/client/agency/src/create/index.js b/modules/agency/front/src/create/index.js
similarity index 100%
rename from client/agency/src/create/index.js
rename to modules/agency/front/src/create/index.js
diff --git a/client/agency/src/create/index.spec.js b/modules/agency/front/src/create/index.spec.js
similarity index 66%
rename from client/agency/src/create/index.spec.js
rename to modules/agency/front/src/create/index.spec.js
index d380cfa47..f7ee10e3a 100644
--- a/client/agency/src/create/index.spec.js
+++ b/modules/agency/front/src/create/index.spec.js
@@ -1,22 +1,15 @@
import './index';
-import {watcher} from '../../../helpers/watcherHelper';
+import watcher from 'mocks/watcher';
describe('Agency', () => {
describe('Component vnZoneCreate', () => {
- let $componentController;
- let $httpBackend;
let $scope;
let $state;
let controller;
- beforeEach(() => {
- angular.mock.module('agency');
- });
+ beforeEach(ngModule('agency'));
- beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_, _$state_) => {
- $componentController = _$componentController_;
- $httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
+ beforeEach(angular.mock.inject(($componentController, $rootScope, _$state_) => {
$scope = $rootScope.$new();
$state = _$state_;
$scope.watcher = watcher;
@@ -27,7 +20,7 @@ describe('Agency', () => {
}
};
};
- controller = $componentController('vnZoneCreate', {$scope: $scope});
+ controller = $componentController('vnZoneCreate', {$scope});
}));
describe('onSubmit()', () => {
diff --git a/client/agency/src/create/locale/es.yml b/modules/agency/front/src/create/locale/es.yml
similarity index 100%
rename from client/agency/src/create/locale/es.yml
rename to modules/agency/front/src/create/locale/es.yml
diff --git a/client/agency/src/descriptor/index.html b/modules/agency/front/src/descriptor/index.html
similarity index 100%
rename from client/agency/src/descriptor/index.html
rename to modules/agency/front/src/descriptor/index.html
diff --git a/client/agency/src/descriptor/index.js b/modules/agency/front/src/descriptor/index.js
similarity index 100%
rename from client/agency/src/descriptor/index.js
rename to modules/agency/front/src/descriptor/index.js
diff --git a/client/agency/src/edit/index.html b/modules/agency/front/src/edit/index.html
similarity index 100%
rename from client/agency/src/edit/index.html
rename to modules/agency/front/src/edit/index.html
diff --git a/client/agency/src/edit/index.js b/modules/agency/front/src/edit/index.js
similarity index 100%
rename from client/agency/src/edit/index.js
rename to modules/agency/front/src/edit/index.js
diff --git a/client/agency/src/index.js b/modules/agency/front/src/index.js
similarity index 100%
rename from client/agency/src/index.js
rename to modules/agency/front/src/index.js
diff --git a/client/agency/src/index/index.html b/modules/agency/front/src/index/index.html
similarity index 100%
rename from client/agency/src/index/index.html
rename to modules/agency/front/src/index/index.html
diff --git a/client/agency/src/index/index.js b/modules/agency/front/src/index/index.js
similarity index 100%
rename from client/agency/src/index/index.js
rename to modules/agency/front/src/index/index.js
diff --git a/client/agency/src/index/index.spec.js b/modules/agency/front/src/index/index.spec.js
similarity index 94%
rename from client/agency/src/index/index.spec.js
rename to modules/agency/front/src/index/index.spec.js
index 1eaa1be0c..1f6c18c4d 100644
--- a/client/agency/src/index/index.spec.js
+++ b/modules/agency/front/src/index/index.spec.js
@@ -5,9 +5,7 @@ describe('Agency', () => {
let $componentController;
let controller;
- beforeEach(() => {
- angular.mock.module('agency');
- });
+ beforeEach(ngModule('agency'));
beforeEach(angular.mock.inject(_$componentController_ => {
$componentController = _$componentController_;
diff --git a/client/agency/src/locale/en.yml b/modules/agency/front/src/locale/en.yml
similarity index 100%
rename from client/agency/src/locale/en.yml
rename to modules/agency/front/src/locale/en.yml
diff --git a/client/agency/src/locale/es.yml b/modules/agency/front/src/locale/es.yml
similarity index 100%
rename from client/agency/src/locale/es.yml
rename to modules/agency/front/src/locale/es.yml
diff --git a/client/agency/src/location-search-panel/index.html b/modules/agency/front/src/location-search-panel/index.html
similarity index 100%
rename from client/agency/src/location-search-panel/index.html
rename to modules/agency/front/src/location-search-panel/index.html
diff --git a/client/agency/src/location-search-panel/index.js b/modules/agency/front/src/location-search-panel/index.js
similarity index 100%
rename from client/agency/src/location-search-panel/index.js
rename to modules/agency/front/src/location-search-panel/index.js
diff --git a/client/agency/src/location/index.html b/modules/agency/front/src/location/index.html
similarity index 100%
rename from client/agency/src/location/index.html
rename to modules/agency/front/src/location/index.html
diff --git a/client/agency/src/location/index.js b/modules/agency/front/src/location/index.js
similarity index 100%
rename from client/agency/src/location/index.js
rename to modules/agency/front/src/location/index.js
diff --git a/client/agency/src/module.js b/modules/agency/front/src/module.js
similarity index 100%
rename from client/agency/src/module.js
rename to modules/agency/front/src/module.js
diff --git a/client/agency/src/search-panel/index.html b/modules/agency/front/src/search-panel/index.html
similarity index 100%
rename from client/agency/src/search-panel/index.html
rename to modules/agency/front/src/search-panel/index.html
diff --git a/client/agency/src/search-panel/index.js b/modules/agency/front/src/search-panel/index.js
similarity index 100%
rename from client/agency/src/search-panel/index.js
rename to modules/agency/front/src/search-panel/index.js
diff --git a/client/agency/src/summary/index.html b/modules/agency/front/src/summary/index.html
similarity index 100%
rename from client/agency/src/summary/index.html
rename to modules/agency/front/src/summary/index.html
diff --git a/client/agency/src/summary/index.js b/modules/agency/front/src/summary/index.js
similarity index 100%
rename from client/agency/src/summary/index.js
rename to modules/agency/front/src/summary/index.js
diff --git a/client/claim/index.js b/modules/claim/front/index.js
similarity index 100%
rename from client/claim/index.js
rename to modules/claim/front/index.js
diff --git a/client/claim/routes.json b/modules/claim/front/routes.json
similarity index 100%
rename from client/claim/routes.json
rename to modules/claim/front/routes.json
diff --git a/client/claim/src/action/index.html b/modules/claim/front/src/action/index.html
similarity index 100%
rename from client/claim/src/action/index.html
rename to modules/claim/front/src/action/index.html
diff --git a/client/claim/src/action/index.js b/modules/claim/front/src/action/index.js
similarity index 100%
rename from client/claim/src/action/index.js
rename to modules/claim/front/src/action/index.js
diff --git a/client/claim/src/action/index.spec.js b/modules/claim/front/src/action/index.spec.js
similarity index 94%
rename from client/claim/src/action/index.spec.js
rename to modules/claim/front/src/action/index.spec.js
index 70684ac49..cd78c1f5e 100644
--- a/client/claim/src/action/index.spec.js
+++ b/modules/claim/front/src/action/index.spec.js
@@ -1,25 +1,20 @@
import './index.js';
-import {crudModel} from '../../../helpers/crudModelHelper';
+import crudModel from 'mocks/crud-model';
describe('claim', () => {
describe('Component vnClaimAction', () => {
- let $componentController;
let controller;
let $httpBackend;
let $state;
- beforeEach(() => {
- angular.mock.module('claim');
- });
+ beforeEach(ngModule('claim'));
- beforeEach(angular.mock.inject((_$componentController_, _$state_, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$state_, _$httpBackend_) => {
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
$state = _$state_;
$state.params.id = 1;
- controller = $componentController('vnClaimAction', {$state: $state});
+ controller = $componentController('vnClaimAction', {$state});
controller.claim = {ticketFk: 1};
controller.$.model = {refresh: () => {}};
controller.$.addSales = {
diff --git a/client/claim/src/action/locale/es.yml b/modules/claim/front/src/action/locale/es.yml
similarity index 100%
rename from client/claim/src/action/locale/es.yml
rename to modules/claim/front/src/action/locale/es.yml
diff --git a/client/claim/src/action/style.scss b/modules/claim/front/src/action/style.scss
similarity index 100%
rename from client/claim/src/action/style.scss
rename to modules/claim/front/src/action/style.scss
diff --git a/client/claim/src/basic-data/index.html b/modules/claim/front/src/basic-data/index.html
similarity index 100%
rename from client/claim/src/basic-data/index.html
rename to modules/claim/front/src/basic-data/index.html
diff --git a/client/claim/src/basic-data/index.js b/modules/claim/front/src/basic-data/index.js
similarity index 100%
rename from client/claim/src/basic-data/index.js
rename to modules/claim/front/src/basic-data/index.js
diff --git a/client/claim/src/basic-data/locale/es.yml b/modules/claim/front/src/basic-data/locale/es.yml
similarity index 100%
rename from client/claim/src/basic-data/locale/es.yml
rename to modules/claim/front/src/basic-data/locale/es.yml
diff --git a/client/claim/src/basic-data/style.scss b/modules/claim/front/src/basic-data/style.scss
similarity index 100%
rename from client/claim/src/basic-data/style.scss
rename to modules/claim/front/src/basic-data/style.scss
diff --git a/client/claim/src/card/index.html b/modules/claim/front/src/card/index.html
similarity index 100%
rename from client/claim/src/card/index.html
rename to modules/claim/front/src/card/index.html
diff --git a/client/claim/src/card/index.js b/modules/claim/front/src/card/index.js
similarity index 100%
rename from client/claim/src/card/index.js
rename to modules/claim/front/src/card/index.js
diff --git a/client/claim/src/card/index.spec.js b/modules/claim/front/src/card/index.spec.js
similarity index 69%
rename from client/claim/src/card/index.spec.js
rename to modules/claim/front/src/card/index.spec.js
index 4278999a9..914e9a63d 100644
--- a/client/claim/src/card/index.spec.js
+++ b/modules/claim/front/src/card/index.spec.js
@@ -2,23 +2,18 @@ import './index.js';
describe('Claim', () => {
describe('Component vnClaimCard', () => {
- let $componentController;
let $scope;
let controller;
let $httpBackend;
let $state;
- beforeEach(() => {
- angular.mock.module('claim');
- });
+ beforeEach(ngModule('claim'));
- beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_) => {
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
$scope = $rootScope.$new();
$state = {params: {id: 1}};
- controller = $componentController('vnClaimCard', {$scope: $scope, $state: $state});
+ controller = $componentController('vnClaimCard', {$scope, $state});
}));
describe('getCard()', () => {
diff --git a/client/claim/src/descriptor/index.html b/modules/claim/front/src/descriptor/index.html
similarity index 100%
rename from client/claim/src/descriptor/index.html
rename to modules/claim/front/src/descriptor/index.html
diff --git a/client/claim/src/descriptor/index.js b/modules/claim/front/src/descriptor/index.js
similarity index 100%
rename from client/claim/src/descriptor/index.js
rename to modules/claim/front/src/descriptor/index.js
diff --git a/client/claim/src/detail/index.html b/modules/claim/front/src/detail/index.html
similarity index 100%
rename from client/claim/src/detail/index.html
rename to modules/claim/front/src/detail/index.html
diff --git a/client/claim/src/detail/index.js b/modules/claim/front/src/detail/index.js
similarity index 100%
rename from client/claim/src/detail/index.js
rename to modules/claim/front/src/detail/index.js
diff --git a/client/claim/src/detail/index.spec.js b/modules/claim/front/src/detail/index.spec.js
similarity index 97%
rename from client/claim/src/detail/index.spec.js
rename to modules/claim/front/src/detail/index.spec.js
index 7106f9481..41c3677da 100644
--- a/client/claim/src/detail/index.spec.js
+++ b/modules/claim/front/src/detail/index.spec.js
@@ -1,5 +1,5 @@
import './index.js';
-import {crudModel} from '../../../helpers/crudModelHelper';
+import crudModel from 'mocks/crud-model';
describe('claim', () => {
describe('Component vnClaimDetail', () => {
@@ -8,7 +8,7 @@ describe('claim', () => {
beforeEach(ngModule('claim'));
- beforeEach(angular.mock.inject(($componentController, $state, _$httpBackend_, $rootScope) => {
+ beforeEach(angular.mock.inject(($componentController, $state, _$httpBackend_) => {
$httpBackend = _$httpBackend_;
$httpBackend.when('GET', 'claim/api/Claims/ClaimBeginnings').respond({});
$state.params.id = 1;
diff --git a/client/claim/src/detail/locale/es.yml b/modules/claim/front/src/detail/locale/es.yml
similarity index 100%
rename from client/claim/src/detail/locale/es.yml
rename to modules/claim/front/src/detail/locale/es.yml
diff --git a/client/claim/src/detail/style.scss b/modules/claim/front/src/detail/style.scss
similarity index 100%
rename from client/claim/src/detail/style.scss
rename to modules/claim/front/src/detail/style.scss
diff --git a/client/claim/src/development/index.html b/modules/claim/front/src/development/index.html
similarity index 100%
rename from client/claim/src/development/index.html
rename to modules/claim/front/src/development/index.html
diff --git a/client/claim/src/development/index.js b/modules/claim/front/src/development/index.js
similarity index 100%
rename from client/claim/src/development/index.js
rename to modules/claim/front/src/development/index.js
diff --git a/client/claim/src/development/locale/es.yml b/modules/claim/front/src/development/locale/es.yml
similarity index 100%
rename from client/claim/src/development/locale/es.yml
rename to modules/claim/front/src/development/locale/es.yml
diff --git a/client/claim/src/development/style.scss b/modules/claim/front/src/development/style.scss
similarity index 100%
rename from client/claim/src/development/style.scss
rename to modules/claim/front/src/development/style.scss
diff --git a/client/claim/src/index.js b/modules/claim/front/src/index.js
similarity index 100%
rename from client/claim/src/index.js
rename to modules/claim/front/src/index.js
diff --git a/client/claim/src/index/index.html b/modules/claim/front/src/index/index.html
similarity index 100%
rename from client/claim/src/index/index.html
rename to modules/claim/front/src/index/index.html
diff --git a/client/claim/src/index/index.js b/modules/claim/front/src/index/index.js
similarity index 100%
rename from client/claim/src/index/index.js
rename to modules/claim/front/src/index/index.js
diff --git a/client/claim/src/locale/es.yml b/modules/claim/front/src/locale/es.yml
similarity index 100%
rename from client/claim/src/locale/es.yml
rename to modules/claim/front/src/locale/es.yml
diff --git a/client/claim/src/module.js b/modules/claim/front/src/module.js
similarity index 100%
rename from client/claim/src/module.js
rename to modules/claim/front/src/module.js
diff --git a/client/claim/src/search-panel/index.html b/modules/claim/front/src/search-panel/index.html
similarity index 100%
rename from client/claim/src/search-panel/index.html
rename to modules/claim/front/src/search-panel/index.html
diff --git a/client/claim/src/search-panel/index.js b/modules/claim/front/src/search-panel/index.js
similarity index 100%
rename from client/claim/src/search-panel/index.js
rename to modules/claim/front/src/search-panel/index.js
diff --git a/client/claim/src/search-panel/locale/es.yml b/modules/claim/front/src/search-panel/locale/es.yml
similarity index 100%
rename from client/claim/src/search-panel/locale/es.yml
rename to modules/claim/front/src/search-panel/locale/es.yml
diff --git a/client/claim/src/summary/index.html b/modules/claim/front/src/summary/index.html
similarity index 100%
rename from client/claim/src/summary/index.html
rename to modules/claim/front/src/summary/index.html
diff --git a/client/claim/src/summary/index.js b/modules/claim/front/src/summary/index.js
similarity index 100%
rename from client/claim/src/summary/index.js
rename to modules/claim/front/src/summary/index.js
diff --git a/client/claim/src/summary/index.spec.js b/modules/claim/front/src/summary/index.spec.js
similarity index 66%
rename from client/claim/src/summary/index.spec.js
rename to modules/claim/front/src/summary/index.spec.js
index 89ee4e930..91f25091c 100644
--- a/client/claim/src/summary/index.spec.js
+++ b/modules/claim/front/src/summary/index.spec.js
@@ -2,24 +2,19 @@ import './index.js';
describe('Claim', () => {
describe('Component summary', () => {
- let $componentController;
let controller;
let $httpBackend;
- beforeEach(() => {
- angular.mock.module('claim');
- });
+ beforeEach(ngModule('claim'));
- beforeEach(angular.mock.inject((_$componentController_, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$httpBackend_) => {
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
controller = $componentController('vnClaimSummary');
controller.claim = {id: 1};
}));
describe('getSummary()', () => {
- it("should perform a query to set summary", () => {
+ it('should perform a query to set summary', () => {
$httpBackend.when('GET', `/claim/api/Claims/1/getSummary`).respond(200, 24);
$httpBackend.expect('GET', `/claim/api/Claims/1/getSummary`);
controller.getSummary();
@@ -30,7 +25,7 @@ describe('Claim', () => {
});
describe('$onChanges()', () => {
- it("should call getSummary when item.id is defined", () => {
+ it('should call getSummary when item.id is defined', () => {
spyOn(controller, 'getSummary');
controller.$onChanges();
diff --git a/client/client/index.js b/modules/client/front/index.js
similarity index 100%
rename from client/client/index.js
rename to modules/client/front/index.js
diff --git a/client/client/routes.json b/modules/client/front/routes.json
similarity index 100%
rename from client/client/routes.json
rename to modules/client/front/routes.json
diff --git a/client/client/src/address/create/index.html b/modules/client/front/src/address/create/index.html
similarity index 100%
rename from client/client/src/address/create/index.html
rename to modules/client/front/src/address/create/index.html
diff --git a/client/client/src/address/create/index.js b/modules/client/front/src/address/create/index.js
similarity index 100%
rename from client/client/src/address/create/index.js
rename to modules/client/front/src/address/create/index.js
diff --git a/client/client/src/address/create/index.spec.js b/modules/client/front/src/address/create/index.spec.js
similarity index 89%
rename from client/client/src/address/create/index.spec.js
rename to modules/client/front/src/address/create/index.spec.js
index cbd0ebabe..77e361389 100644
--- a/client/client/src/address/create/index.spec.js
+++ b/modules/client/front/src/address/create/index.spec.js
@@ -6,9 +6,7 @@ describe('Client', () => {
let $componentController;
let $state;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('client'));
beforeEach(angular.mock.inject((_$componentController_, _$state_) => {
$componentController = _$componentController_;
diff --git a/client/client/src/address/create/locale/es.yml b/modules/client/front/src/address/create/locale/es.yml
similarity index 100%
rename from client/client/src/address/create/locale/es.yml
rename to modules/client/front/src/address/create/locale/es.yml
diff --git a/client/client/src/address/edit/index.html b/modules/client/front/src/address/edit/index.html
similarity index 100%
rename from client/client/src/address/edit/index.html
rename to modules/client/front/src/address/edit/index.html
diff --git a/client/client/src/address/edit/index.js b/modules/client/front/src/address/edit/index.js
similarity index 100%
rename from client/client/src/address/edit/index.js
rename to modules/client/front/src/address/edit/index.js
diff --git a/client/client/src/address/edit/index.spec.js b/modules/client/front/src/address/edit/index.spec.js
similarity index 78%
rename from client/client/src/address/edit/index.spec.js
rename to modules/client/front/src/address/edit/index.spec.js
index 5c631894e..aa1f59669 100644
--- a/client/client/src/address/edit/index.spec.js
+++ b/modules/client/front/src/address/edit/index.spec.js
@@ -2,22 +2,15 @@ import './index';
describe('Client', () => {
describe('Component vnClientAddressEdit', () => {
- let $componentController;
let $state;
- let $httpBackend;
let controller;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('client'));
- beforeEach(angular.mock.inject((_$componentController_, _$state_, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$state_) => {
$state = _$state_;
- $httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
$state.params.addressId = '1';
- controller = $componentController('vnClientAddressEdit', {$state: $state});
+ controller = $componentController('vnClientAddressEdit', {$state});
controller.$.watcher = {
setDirty: () => {},
setPristine: () => {},
@@ -59,7 +52,7 @@ describe('Client', () => {
spyOn(controller.$state, 'go');
controller.goToIndex();
- expect(controller.$state.go).toHaveBeenCalledWith("client.card.address.index");
+ expect(controller.$state.go).toHaveBeenCalledWith('client.card.address.index');
});
});
});
diff --git a/client/client/src/address/edit/locale/es.yml b/modules/client/front/src/address/edit/locale/es.yml
similarity index 100%
rename from client/client/src/address/edit/locale/es.yml
rename to modules/client/front/src/address/edit/locale/es.yml
diff --git a/client/client/src/address/index/index.html b/modules/client/front/src/address/index/index.html
similarity index 100%
rename from client/client/src/address/index/index.html
rename to modules/client/front/src/address/index/index.html
diff --git a/client/client/src/address/index/index.js b/modules/client/front/src/address/index/index.js
similarity index 100%
rename from client/client/src/address/index/index.js
rename to modules/client/front/src/address/index/index.js
diff --git a/client/client/src/address/index/index.spec.js b/modules/client/front/src/address/index/index.spec.js
similarity index 72%
rename from client/client/src/address/index/index.spec.js
rename to modules/client/front/src/address/index/index.spec.js
index 02ad270ab..26f71084b 100644
--- a/client/client/src/address/index/index.spec.js
+++ b/modules/client/front/src/address/index/index.spec.js
@@ -2,26 +2,21 @@ import './index';
describe('Client', () => {
describe('Component vnClientAddressIndex', () => {
- let $componentController;
let controller;
let $scope;
let $state;
let $httpBackend;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('client'));
- beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$state_, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope, _$state_, _$httpBackend_) => {
$state = _$state_;
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
$scope = $rootScope.$new();
$scope.model = {
refresh: () => {}
};
- controller = $componentController('vnClientAddressIndex', {$state: $state}, {$scope: $scope});
+ controller = $componentController('vnClientAddressIndex', {$state, $scope});
}));
describe('setDefault()', () => {
diff --git a/client/client/src/address/index/locale/es.yml b/modules/client/front/src/address/index/locale/es.yml
similarity index 100%
rename from client/client/src/address/index/locale/es.yml
rename to modules/client/front/src/address/index/locale/es.yml
diff --git a/client/client/src/basic-data/index.html b/modules/client/front/src/basic-data/index.html
similarity index 100%
rename from client/client/src/basic-data/index.html
rename to modules/client/front/src/basic-data/index.html
diff --git a/client/client/src/basic-data/index.js b/modules/client/front/src/basic-data/index.js
similarity index 100%
rename from client/client/src/basic-data/index.js
rename to modules/client/front/src/basic-data/index.js
diff --git a/client/client/src/basic-data/locale/es.yml b/modules/client/front/src/basic-data/locale/es.yml
similarity index 100%
rename from client/client/src/basic-data/locale/es.yml
rename to modules/client/front/src/basic-data/locale/es.yml
diff --git a/client/client/src/billing-data/index.html b/modules/client/front/src/billing-data/index.html
similarity index 100%
rename from client/client/src/billing-data/index.html
rename to modules/client/front/src/billing-data/index.html
diff --git a/client/client/src/billing-data/index.js b/modules/client/front/src/billing-data/index.js
similarity index 100%
rename from client/client/src/billing-data/index.js
rename to modules/client/front/src/billing-data/index.js
diff --git a/client/client/src/billing-data/index.spec.js b/modules/client/front/src/billing-data/index.spec.js
similarity index 93%
rename from client/client/src/billing-data/index.spec.js
rename to modules/client/front/src/billing-data/index.spec.js
index 3fa509e01..4f1ecc346 100644
--- a/client/client/src/billing-data/index.spec.js
+++ b/modules/client/front/src/billing-data/index.spec.js
@@ -1,22 +1,17 @@
import './index';
-import {watcher} from '../../../helpers/watcherHelper';
+import watcher from 'mocks/watcher';
describe('Client', () => {
describe('Component vnClientBillingData', () => {
- let $componentController;
let $httpBackend;
let $scope;
let controller;
let vnApp;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('client'));
- beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_, _vnApp_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_, _vnApp_) => {
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
$scope = $rootScope.$new();
$scope.watcher = watcher;
vnApp = _vnApp_;
diff --git a/client/client/src/billing-data/locale/en.yml b/modules/client/front/src/billing-data/locale/en.yml
similarity index 100%
rename from client/client/src/billing-data/locale/en.yml
rename to modules/client/front/src/billing-data/locale/en.yml
diff --git a/client/client/src/billing-data/locale/es.yml b/modules/client/front/src/billing-data/locale/es.yml
similarity index 100%
rename from client/client/src/billing-data/locale/es.yml
rename to modules/client/front/src/billing-data/locale/es.yml
diff --git a/client/client/src/card/index.html b/modules/client/front/src/card/index.html
similarity index 100%
rename from client/client/src/card/index.html
rename to modules/client/front/src/card/index.html
diff --git a/client/client/src/card/index.js b/modules/client/front/src/card/index.js
similarity index 100%
rename from client/client/src/card/index.js
rename to modules/client/front/src/card/index.js
diff --git a/client/client/src/card/index.spec.js b/modules/client/front/src/card/index.spec.js
similarity index 88%
rename from client/client/src/card/index.spec.js
rename to modules/client/front/src/card/index.spec.js
index 4d385b47b..502e04677 100644
--- a/client/client/src/card/index.spec.js
+++ b/modules/client/front/src/card/index.spec.js
@@ -6,9 +6,7 @@ describe('Client', () => {
let $scope;
let controller;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('client'));
beforeEach(angular.mock.inject((_$componentController_, $rootScope) => {
$componentController = _$componentController_;
diff --git a/client/client/src/client.js b/modules/client/front/src/client.js
similarity index 100%
rename from client/client/src/client.js
rename to modules/client/front/src/client.js
diff --git a/client/client/src/contact/index.html b/modules/client/front/src/contact/index.html
similarity index 100%
rename from client/client/src/contact/index.html
rename to modules/client/front/src/contact/index.html
diff --git a/client/client/src/contact/index.js b/modules/client/front/src/contact/index.js
similarity index 100%
rename from client/client/src/contact/index.js
rename to modules/client/front/src/contact/index.js
diff --git a/client/client/src/create/index.html b/modules/client/front/src/create/index.html
similarity index 100%
rename from client/client/src/create/index.html
rename to modules/client/front/src/create/index.html
diff --git a/client/client/src/create/index.js b/modules/client/front/src/create/index.js
similarity index 100%
rename from client/client/src/create/index.js
rename to modules/client/front/src/create/index.js
diff --git a/client/client/src/create/index.spec.js b/modules/client/front/src/create/index.spec.js
similarity index 94%
rename from client/client/src/create/index.spec.js
rename to modules/client/front/src/create/index.spec.js
index 36bf25af1..fb8aa227e 100644
--- a/client/client/src/create/index.spec.js
+++ b/modules/client/front/src/create/index.spec.js
@@ -7,9 +7,7 @@ describe('Client', () => {
let $state;
let controller;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('client'));
beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$state_) => {
$componentController = _$componentController_;
diff --git a/client/client/src/create/locale/es.yml b/modules/client/front/src/create/locale/es.yml
similarity index 100%
rename from client/client/src/create/locale/es.yml
rename to modules/client/front/src/create/locale/es.yml
diff --git a/client/client/src/credit-insurance/create/index.html b/modules/client/front/src/credit-insurance/create/index.html
similarity index 100%
rename from client/client/src/credit-insurance/create/index.html
rename to modules/client/front/src/credit-insurance/create/index.html
diff --git a/client/client/src/credit-insurance/create/index.js b/modules/client/front/src/credit-insurance/create/index.js
similarity index 100%
rename from client/client/src/credit-insurance/create/index.js
rename to modules/client/front/src/credit-insurance/create/index.js
diff --git a/client/client/src/credit-insurance/create/index.spec.js b/modules/client/front/src/credit-insurance/create/index.spec.js
similarity index 78%
rename from client/client/src/credit-insurance/create/index.spec.js
rename to modules/client/front/src/credit-insurance/create/index.spec.js
index 82f4c9122..ebf540af6 100644
--- a/client/client/src/credit-insurance/create/index.spec.js
+++ b/modules/client/front/src/credit-insurance/create/index.spec.js
@@ -2,24 +2,19 @@ import './index';
describe('Client', () => {
describe('Component vnClientCreditInsuranceCreate', () => {
- let $componentController;
let controller;
let $scope;
let $httpBackend;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('client'));
- beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_) => {
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
$scope = $rootScope.$new();
$scope.form = {
$invalid: false
};
- controller = $componentController('vnClientCreditInsuranceCreate', {$scope: $scope});
+ controller = $componentController('vnClientCreditInsuranceCreate', {$scope});
controller.client = {id: 101};
controller.card = {
reload: () => {}
diff --git a/client/client/src/credit-insurance/index/index.html b/modules/client/front/src/credit-insurance/index/index.html
similarity index 100%
rename from client/client/src/credit-insurance/index/index.html
rename to modules/client/front/src/credit-insurance/index/index.html
diff --git a/client/client/src/credit-insurance/index/index.js b/modules/client/front/src/credit-insurance/index/index.js
similarity index 100%
rename from client/client/src/credit-insurance/index/index.js
rename to modules/client/front/src/credit-insurance/index/index.js
diff --git a/client/client/src/credit-insurance/index/index.spec.js b/modules/client/front/src/credit-insurance/index/index.spec.js
similarity index 90%
rename from client/client/src/credit-insurance/index/index.spec.js
rename to modules/client/front/src/credit-insurance/index/index.spec.js
index bc3747d10..127abec28 100644
--- a/client/client/src/credit-insurance/index/index.spec.js
+++ b/modules/client/front/src/credit-insurance/index/index.spec.js
@@ -2,18 +2,13 @@ import './index';
describe('Client', () => {
describe('Component vnClientCreditInsuranceIndex', () => {
- let $componentController;
let controller;
let $httpBackend;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('client'));
- beforeEach(angular.mock.inject((_$componentController_, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$httpBackend_) => {
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
controller = $componentController('vnClientCreditInsuranceIndex');
controller.client = {id: 101};
}));
diff --git a/client/client/src/credit-insurance/index/locale/es.yml b/modules/client/front/src/credit-insurance/index/locale/es.yml
similarity index 100%
rename from client/client/src/credit-insurance/index/locale/es.yml
rename to modules/client/front/src/credit-insurance/index/locale/es.yml
diff --git a/client/client/src/credit-insurance/insurance/create/index.html b/modules/client/front/src/credit-insurance/insurance/create/index.html
similarity index 100%
rename from client/client/src/credit-insurance/insurance/create/index.html
rename to modules/client/front/src/credit-insurance/insurance/create/index.html
diff --git a/client/client/src/credit-insurance/insurance/create/index.js b/modules/client/front/src/credit-insurance/insurance/create/index.js
similarity index 100%
rename from client/client/src/credit-insurance/insurance/create/index.js
rename to modules/client/front/src/credit-insurance/insurance/create/index.js
diff --git a/client/client/src/credit-insurance/insurance/index/index.html b/modules/client/front/src/credit-insurance/insurance/index/index.html
similarity index 100%
rename from client/client/src/credit-insurance/insurance/index/index.html
rename to modules/client/front/src/credit-insurance/insurance/index/index.html
diff --git a/client/client/src/credit-insurance/insurance/index/index.js b/modules/client/front/src/credit-insurance/insurance/index/index.js
similarity index 100%
rename from client/client/src/credit-insurance/insurance/index/index.js
rename to modules/client/front/src/credit-insurance/insurance/index/index.js
diff --git a/client/client/src/credit-insurance/insurance/index/index.spec.js b/modules/client/front/src/credit-insurance/insurance/index/index.spec.js
similarity index 70%
rename from client/client/src/credit-insurance/insurance/index/index.spec.js
rename to modules/client/front/src/credit-insurance/insurance/index/index.spec.js
index 58237757b..158efad36 100644
--- a/client/client/src/credit-insurance/insurance/index/index.spec.js
+++ b/modules/client/front/src/credit-insurance/insurance/index/index.spec.js
@@ -2,20 +2,15 @@ import './index';
describe('Client', () => {
describe('Component vnClientCreditInsuranceInsuranceIndex', () => {
- let $componentController;
let controller;
let $httpBackend;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('client'));
- beforeEach(angular.mock.inject((_$componentController_, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$httpBackend_) => {
let $stateParams = {classificationId: 1};
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
- controller = $componentController('vnClientCreditInsuranceInsuranceIndex', {$stateParams: $stateParams});
+ controller = $componentController('vnClientCreditInsuranceInsuranceIndex', {$stateParams});
}));
describe('$onInit()', () => {
diff --git a/client/client/src/credit-insurance/insurance/index/locale/es.yml b/modules/client/front/src/credit-insurance/insurance/index/locale/es.yml
similarity index 100%
rename from client/client/src/credit-insurance/insurance/index/locale/es.yml
rename to modules/client/front/src/credit-insurance/insurance/index/locale/es.yml
diff --git a/client/client/src/credit/create/index.html b/modules/client/front/src/credit/create/index.html
similarity index 100%
rename from client/client/src/credit/create/index.html
rename to modules/client/front/src/credit/create/index.html
diff --git a/client/client/src/credit/create/index.js b/modules/client/front/src/credit/create/index.js
similarity index 100%
rename from client/client/src/credit/create/index.js
rename to modules/client/front/src/credit/create/index.js
diff --git a/client/client/src/credit/create/index.spec.js b/modules/client/front/src/credit/create/index.spec.js
similarity index 88%
rename from client/client/src/credit/create/index.spec.js
rename to modules/client/front/src/credit/create/index.spec.js
index 706ea9ffb..2f1925186 100644
--- a/client/client/src/credit/create/index.spec.js
+++ b/modules/client/front/src/credit/create/index.spec.js
@@ -2,19 +2,15 @@ import './index';
describe('Client', () => {
describe('Component vnClientCreditCreate', () => {
- let $componentController;
let controller;
let $httpBackend;
let $state;
let $scope;
let client;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('client'));
- beforeEach(angular.mock.inject((_$componentController_, _$httpBackend_, $rootScope, _$state_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $rootScope, _$state_) => {
$scope = $rootScope.$new();
$scope.confirmation = {show: () => {
return {
@@ -34,8 +30,7 @@ describe('Client', () => {
$state = _$state_;
$state.params.id = 101;
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
- controller = $componentController('vnClientCreditCreate', {$scope: $scope}, {$state: $state});
+ controller = $componentController('vnClientCreditCreate', {$scope, $state});
}));
describe('onSubmit()', () => {
diff --git a/client/client/src/credit/index/index.html b/modules/client/front/src/credit/index/index.html
similarity index 100%
rename from client/client/src/credit/index/index.html
rename to modules/client/front/src/credit/index/index.html
diff --git a/client/client/src/credit/index/index.js b/modules/client/front/src/credit/index/index.js
similarity index 100%
rename from client/client/src/credit/index/index.js
rename to modules/client/front/src/credit/index/index.js
diff --git a/client/client/src/credit/index/locale/es.yml b/modules/client/front/src/credit/index/locale/es.yml
similarity index 100%
rename from client/client/src/credit/index/locale/es.yml
rename to modules/client/front/src/credit/index/locale/es.yml
diff --git a/client/client/src/descriptor-popover/index.html b/modules/client/front/src/descriptor-popover/index.html
similarity index 100%
rename from client/client/src/descriptor-popover/index.html
rename to modules/client/front/src/descriptor-popover/index.html
diff --git a/client/client/src/descriptor-popover/index.js b/modules/client/front/src/descriptor-popover/index.js
similarity index 100%
rename from client/client/src/descriptor-popover/index.js
rename to modules/client/front/src/descriptor-popover/index.js
diff --git a/client/client/src/descriptor-popover/index.spec.js b/modules/client/front/src/descriptor-popover/index.spec.js
similarity index 87%
rename from client/client/src/descriptor-popover/index.spec.js
rename to modules/client/front/src/descriptor-popover/index.spec.js
index 4944ba270..f575b4980 100644
--- a/client/client/src/descriptor-popover/index.spec.js
+++ b/modules/client/front/src/descriptor-popover/index.spec.js
@@ -2,26 +2,21 @@ import './index';
describe('Client', () => {
describe('Component vnClientDescriptorPopover', () => {
- let $componentController;
let $httpBackend;
let $scope;
let controller;
let $element;
let $timeout;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('client'));
- beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_, _$timeout_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_, _$timeout_) => {
$httpBackend = _$httpBackend_;
$timeout = _$timeout_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
$element = angular.element(`
`);
$scope = $rootScope.$new();
$scope.popover = {relocate: () => {}, show: () => {}};
- controller = $componentController('vnClientDescriptorPopover', {$scope: $scope, $element: $element});
+ controller = $componentController('vnClientDescriptorPopover', {$scope, $element});
}));
describe('clientFk()', () => {
diff --git a/client/client/src/descriptor-popover/style.scss b/modules/client/front/src/descriptor-popover/style.scss
similarity index 100%
rename from client/client/src/descriptor-popover/style.scss
rename to modules/client/front/src/descriptor-popover/style.scss
diff --git a/client/client/src/descriptor/index.html b/modules/client/front/src/descriptor/index.html
similarity index 100%
rename from client/client/src/descriptor/index.html
rename to modules/client/front/src/descriptor/index.html
diff --git a/client/client/src/descriptor/index.js b/modules/client/front/src/descriptor/index.js
similarity index 100%
rename from client/client/src/descriptor/index.js
rename to modules/client/front/src/descriptor/index.js
diff --git a/client/client/src/fiscal-data/index.html b/modules/client/front/src/fiscal-data/index.html
similarity index 100%
rename from client/client/src/fiscal-data/index.html
rename to modules/client/front/src/fiscal-data/index.html
diff --git a/client/client/src/fiscal-data/index.js b/modules/client/front/src/fiscal-data/index.js
similarity index 100%
rename from client/client/src/fiscal-data/index.js
rename to modules/client/front/src/fiscal-data/index.js
diff --git a/client/client/src/fiscal-data/index.spec.js b/modules/client/front/src/fiscal-data/index.spec.js
similarity index 73%
rename from client/client/src/fiscal-data/index.spec.js
rename to modules/client/front/src/fiscal-data/index.spec.js
index 663bbdcbd..3281fe879 100644
--- a/client/client/src/fiscal-data/index.spec.js
+++ b/modules/client/front/src/fiscal-data/index.spec.js
@@ -2,21 +2,16 @@ import './index';
describe('Client', () => {
describe('Component vnClientFiscalData', () => {
- let $componentController;
let $httpBackend;
let $scope;
let controller;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('client'));
- beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_) => {
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
$scope = $rootScope.$new();
- controller = $componentController('vnClientFiscalData', {$scope: $scope});
+ controller = $componentController('vnClientFiscalData', {$scope});
controller.card = {reload: () => {}};
}));
diff --git a/client/client/src/fiscal-data/locale/es.yml b/modules/client/front/src/fiscal-data/locale/es.yml
similarity index 100%
rename from client/client/src/fiscal-data/locale/es.yml
rename to modules/client/front/src/fiscal-data/locale/es.yml
diff --git a/client/client/src/greuge/create/index.html b/modules/client/front/src/greuge/create/index.html
similarity index 100%
rename from client/client/src/greuge/create/index.html
rename to modules/client/front/src/greuge/create/index.html
diff --git a/client/client/src/greuge/create/index.js b/modules/client/front/src/greuge/create/index.js
similarity index 100%
rename from client/client/src/greuge/create/index.js
rename to modules/client/front/src/greuge/create/index.js
diff --git a/client/client/src/greuge/create/index.spec.js b/modules/client/front/src/greuge/create/index.spec.js
similarity index 93%
rename from client/client/src/greuge/create/index.spec.js
rename to modules/client/front/src/greuge/create/index.spec.js
index cd7bc8e0a..76b361cc5 100644
--- a/client/client/src/greuge/create/index.spec.js
+++ b/modules/client/front/src/greuge/create/index.spec.js
@@ -7,9 +7,7 @@ describe('Client', () => {
let $state;
let controller;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('client'));
beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$state_) => {
$componentController = _$componentController_;
diff --git a/client/client/src/greuge/index/index.html b/modules/client/front/src/greuge/index/index.html
similarity index 100%
rename from client/client/src/greuge/index/index.html
rename to modules/client/front/src/greuge/index/index.html
diff --git a/client/client/src/greuge/index/index.js b/modules/client/front/src/greuge/index/index.js
similarity index 100%
rename from client/client/src/greuge/index/index.js
rename to modules/client/front/src/greuge/index/index.js
diff --git a/client/client/src/greuge/index/locale/es.yml b/modules/client/front/src/greuge/index/locale/es.yml
similarity index 100%
rename from client/client/src/greuge/index/locale/es.yml
rename to modules/client/front/src/greuge/index/locale/es.yml
diff --git a/client/client/src/index/index.html b/modules/client/front/src/index/index.html
similarity index 100%
rename from client/client/src/index/index.html
rename to modules/client/front/src/index/index.html
diff --git a/client/client/src/index/index.js b/modules/client/front/src/index/index.js
similarity index 100%
rename from client/client/src/index/index.js
rename to modules/client/front/src/index/index.js
diff --git a/client/client/src/index/item-client.html b/modules/client/front/src/index/item-client.html
similarity index 100%
rename from client/client/src/index/item-client.html
rename to modules/client/front/src/index/item-client.html
diff --git a/client/client/src/index/item-client.js b/modules/client/front/src/index/item-client.js
similarity index 100%
rename from client/client/src/index/item-client.js
rename to modules/client/front/src/index/item-client.js
diff --git a/client/client/src/index/locale/es.yml b/modules/client/front/src/index/locale/es.yml
similarity index 100%
rename from client/client/src/index/locale/es.yml
rename to modules/client/front/src/index/locale/es.yml
diff --git a/client/client/src/index/style.scss b/modules/client/front/src/index/style.scss
similarity index 100%
rename from client/client/src/index/style.scss
rename to modules/client/front/src/index/style.scss
diff --git a/client/client/src/locale/en.yml b/modules/client/front/src/locale/en.yml
similarity index 100%
rename from client/client/src/locale/en.yml
rename to modules/client/front/src/locale/en.yml
diff --git a/client/client/src/locale/es.yml b/modules/client/front/src/locale/es.yml
similarity index 100%
rename from client/client/src/locale/es.yml
rename to modules/client/front/src/locale/es.yml
diff --git a/client/client/src/log/index.html b/modules/client/front/src/log/index.html
similarity index 100%
rename from client/client/src/log/index.html
rename to modules/client/front/src/log/index.html
diff --git a/client/client/src/log/index.js b/modules/client/front/src/log/index.js
similarity index 100%
rename from client/client/src/log/index.js
rename to modules/client/front/src/log/index.js
diff --git a/client/client/src/log/index.spec.js b/modules/client/front/src/log/index.spec.js
similarity index 95%
rename from client/client/src/log/index.spec.js
rename to modules/client/front/src/log/index.spec.js
index 35dcb7954..6071f2510 100644
--- a/client/client/src/log/index.spec.js
+++ b/modules/client/front/src/log/index.spec.js
@@ -6,9 +6,7 @@ describe('Client', () => {
let $scope;
let controller;
- beforeEach(() => {
- ngModule('client');
- });
+ beforeEach(ngModule('client'));
beforeEach(angular.mock.inject((_$componentController_, $rootScope) => {
$componentController = _$componentController_;
diff --git a/client/client/src/mandate/index.html b/modules/client/front/src/mandate/index.html
similarity index 100%
rename from client/client/src/mandate/index.html
rename to modules/client/front/src/mandate/index.html
diff --git a/client/client/src/mandate/index.js b/modules/client/front/src/mandate/index.js
similarity index 100%
rename from client/client/src/mandate/index.js
rename to modules/client/front/src/mandate/index.js
diff --git a/client/client/src/mandate/locale/es.yml b/modules/client/front/src/mandate/locale/es.yml
similarity index 100%
rename from client/client/src/mandate/locale/es.yml
rename to modules/client/front/src/mandate/locale/es.yml
diff --git a/client/client/src/module.js b/modules/client/front/src/module.js
similarity index 100%
rename from client/client/src/module.js
rename to modules/client/front/src/module.js
diff --git a/client/client/src/note/create/index.html b/modules/client/front/src/note/create/index.html
similarity index 100%
rename from client/client/src/note/create/index.html
rename to modules/client/front/src/note/create/index.html
diff --git a/client/client/src/note/create/index.js b/modules/client/front/src/note/create/index.js
similarity index 100%
rename from client/client/src/note/create/index.js
rename to modules/client/front/src/note/create/index.js
diff --git a/client/client/src/note/create/index.spec.js b/modules/client/front/src/note/create/index.spec.js
similarity index 89%
rename from client/client/src/note/create/index.spec.js
rename to modules/client/front/src/note/create/index.spec.js
index bf5cc591b..5ac62efa3 100644
--- a/client/client/src/note/create/index.spec.js
+++ b/modules/client/front/src/note/create/index.spec.js
@@ -6,9 +6,7 @@ describe('Client', () => {
let $state;
let controller;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('client'));
beforeEach(angular.mock.inject((_$componentController_, _$state_) => {
$componentController = _$componentController_;
diff --git a/client/client/src/note/create/locale/es.yml b/modules/client/front/src/note/create/locale/es.yml
similarity index 100%
rename from client/client/src/note/create/locale/es.yml
rename to modules/client/front/src/note/create/locale/es.yml
diff --git a/client/client/src/note/index/index.html b/modules/client/front/src/note/index/index.html
similarity index 100%
rename from client/client/src/note/index/index.html
rename to modules/client/front/src/note/index/index.html
diff --git a/client/client/src/note/index/index.js b/modules/client/front/src/note/index/index.js
similarity index 100%
rename from client/client/src/note/index/index.js
rename to modules/client/front/src/note/index/index.js
diff --git a/client/client/src/recovery/create/index.html b/modules/client/front/src/recovery/create/index.html
similarity index 100%
rename from client/client/src/recovery/create/index.html
rename to modules/client/front/src/recovery/create/index.html
diff --git a/client/client/src/recovery/create/index.js b/modules/client/front/src/recovery/create/index.js
similarity index 100%
rename from client/client/src/recovery/create/index.js
rename to modules/client/front/src/recovery/create/index.js
diff --git a/client/client/src/recovery/create/index.spec.js b/modules/client/front/src/recovery/create/index.spec.js
similarity index 93%
rename from client/client/src/recovery/create/index.spec.js
rename to modules/client/front/src/recovery/create/index.spec.js
index 5ff1582d8..d1d3f39f2 100644
--- a/client/client/src/recovery/create/index.spec.js
+++ b/modules/client/front/src/recovery/create/index.spec.js
@@ -7,9 +7,7 @@ describe('Client', () => {
let $state;
let controller;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('client'));
beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$state_) => {
$componentController = _$componentController_;
diff --git a/client/client/src/recovery/create/locale/es.yml b/modules/client/front/src/recovery/create/locale/es.yml
similarity index 100%
rename from client/client/src/recovery/create/locale/es.yml
rename to modules/client/front/src/recovery/create/locale/es.yml
diff --git a/client/client/src/recovery/index/index.html b/modules/client/front/src/recovery/index/index.html
similarity index 100%
rename from client/client/src/recovery/index/index.html
rename to modules/client/front/src/recovery/index/index.html
diff --git a/client/client/src/recovery/index/index.js b/modules/client/front/src/recovery/index/index.js
similarity index 100%
rename from client/client/src/recovery/index/index.js
rename to modules/client/front/src/recovery/index/index.js
diff --git a/client/client/src/recovery/index/locale/es.yml b/modules/client/front/src/recovery/index/locale/es.yml
similarity index 100%
rename from client/client/src/recovery/index/locale/es.yml
rename to modules/client/front/src/recovery/index/locale/es.yml
diff --git a/client/client/src/risk/create/index.html b/modules/client/front/src/risk/create/index.html
similarity index 100%
rename from client/client/src/risk/create/index.html
rename to modules/client/front/src/risk/create/index.html
diff --git a/client/client/src/risk/create/index.js b/modules/client/front/src/risk/create/index.js
similarity index 100%
rename from client/client/src/risk/create/index.js
rename to modules/client/front/src/risk/create/index.js
diff --git a/client/client/src/risk/index/index.html b/modules/client/front/src/risk/index/index.html
similarity index 100%
rename from client/client/src/risk/index/index.html
rename to modules/client/front/src/risk/index/index.html
diff --git a/client/client/src/risk/index/index.js b/modules/client/front/src/risk/index/index.js
similarity index 100%
rename from client/client/src/risk/index/index.js
rename to modules/client/front/src/risk/index/index.js
diff --git a/client/client/src/risk/index/index.spec.js b/modules/client/front/src/risk/index/index.spec.js
similarity index 93%
rename from client/client/src/risk/index/index.spec.js
rename to modules/client/front/src/risk/index/index.spec.js
index 86e3ab1d2..925bcafe4 100644
--- a/client/client/src/risk/index/index.spec.js
+++ b/modules/client/front/src/risk/index/index.spec.js
@@ -6,9 +6,7 @@ describe('Client', () => {
let $scope;
let controller;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('client'));
beforeEach(angular.mock.inject((_$componentController_, $rootScope) => {
$componentController = _$componentController_;
diff --git a/client/client/src/risk/index/locale/es.yml b/modules/client/front/src/risk/index/locale/es.yml
similarity index 100%
rename from client/client/src/risk/index/locale/es.yml
rename to modules/client/front/src/risk/index/locale/es.yml
diff --git a/client/client/src/risk/index/style.scss b/modules/client/front/src/risk/index/style.scss
similarity index 100%
rename from client/client/src/risk/index/style.scss
rename to modules/client/front/src/risk/index/style.scss
diff --git a/client/client/src/sample/create/index.html b/modules/client/front/src/sample/create/index.html
similarity index 100%
rename from client/client/src/sample/create/index.html
rename to modules/client/front/src/sample/create/index.html
diff --git a/client/client/src/sample/create/index.js b/modules/client/front/src/sample/create/index.js
similarity index 100%
rename from client/client/src/sample/create/index.js
rename to modules/client/front/src/sample/create/index.js
diff --git a/client/client/src/sample/create/index.spec.js b/modules/client/front/src/sample/create/index.spec.js
similarity index 92%
rename from client/client/src/sample/create/index.spec.js
rename to modules/client/front/src/sample/create/index.spec.js
index 47ea171e7..dfc660f35 100644
--- a/client/client/src/sample/create/index.spec.js
+++ b/modules/client/front/src/sample/create/index.spec.js
@@ -2,18 +2,14 @@ import './index';
describe('Client', () => {
describe('Component vnClientSampleCreate', () => {
- let $componentController;
let $scope;
let $httpBackend;
let $state;
let controller;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('client'));
- beforeEach(angular.mock.inject((_$componentController_, _$httpBackend_, $rootScope, _$state_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $rootScope, _$state_) => {
$scope = $rootScope.$new();
$scope.sampleType = {};
$scope.watcher = {
@@ -39,8 +35,7 @@ describe('Client', () => {
$state = _$state_;
$state.params.id = 101;
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
- controller = $componentController('vnClientSampleCreate', {$scope: $scope}, {$state: $state});
+ controller = $componentController('vnClientSampleCreate', {$scope, $state});
}));
describe('showPreview()', () => {
diff --git a/client/client/src/sample/create/locale/es.yml b/modules/client/front/src/sample/create/locale/es.yml
similarity index 100%
rename from client/client/src/sample/create/locale/es.yml
rename to modules/client/front/src/sample/create/locale/es.yml
diff --git a/client/client/src/sample/create/style.scss b/modules/client/front/src/sample/create/style.scss
similarity index 100%
rename from client/client/src/sample/create/style.scss
rename to modules/client/front/src/sample/create/style.scss
diff --git a/client/client/src/sample/index/index.html b/modules/client/front/src/sample/index/index.html
similarity index 100%
rename from client/client/src/sample/index/index.html
rename to modules/client/front/src/sample/index/index.html
diff --git a/client/client/src/sample/index/index.js b/modules/client/front/src/sample/index/index.js
similarity index 100%
rename from client/client/src/sample/index/index.js
rename to modules/client/front/src/sample/index/index.js
diff --git a/client/client/src/search-panel/index.html b/modules/client/front/src/search-panel/index.html
similarity index 100%
rename from client/client/src/search-panel/index.html
rename to modules/client/front/src/search-panel/index.html
diff --git a/client/client/src/search-panel/index.js b/modules/client/front/src/search-panel/index.js
similarity index 100%
rename from client/client/src/search-panel/index.js
rename to modules/client/front/src/search-panel/index.js
diff --git a/client/client/src/search-panel/locale/es.yml b/modules/client/front/src/search-panel/locale/es.yml
similarity index 100%
rename from client/client/src/search-panel/locale/es.yml
rename to modules/client/front/src/search-panel/locale/es.yml
diff --git a/client/client/src/summary/index.html b/modules/client/front/src/summary/index.html
similarity index 100%
rename from client/client/src/summary/index.html
rename to modules/client/front/src/summary/index.html
diff --git a/client/client/src/summary/index.js b/modules/client/front/src/summary/index.js
similarity index 100%
rename from client/client/src/summary/index.js
rename to modules/client/front/src/summary/index.js
diff --git a/client/client/src/summary/index.spec.js b/modules/client/front/src/summary/index.spec.js
similarity index 78%
rename from client/client/src/summary/index.spec.js
rename to modules/client/front/src/summary/index.spec.js
index 33f0b579b..bb3c28130 100644
--- a/client/client/src/summary/index.spec.js
+++ b/modules/client/front/src/summary/index.spec.js
@@ -2,18 +2,13 @@ import './index';
describe('Client', () => {
describe('Component vnClientSummary', () => {
- let $componentController;
let controller;
let $httpBackend;
- beforeEach(() => {
- angular.mock.module('client');
- });
+ beforeEach(ngModule('client'));
- beforeEach(angular.mock.inject((_$componentController_, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$httpBackend_) => {
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
controller = $componentController('vnClientSummary');
controller.client = {id: 101};
}));
@@ -22,7 +17,7 @@ describe('Client', () => {
it('should perform a GET query and define summary property', () => {
let res = {name: 'Superman', classifications: []};
- spyOn(controller, "sumRisk");
+ spyOn(controller, 'sumRisk');
$httpBackend.when('GET', `/client/api/Clients/101/summary`).respond(200, res);
$httpBackend.expect('GET', `/client/api/Clients/101/summary`);
diff --git a/client/client/src/summary/locale/es.yml b/modules/client/front/src/summary/locale/es.yml
similarity index 100%
rename from client/client/src/summary/locale/es.yml
rename to modules/client/front/src/summary/locale/es.yml
diff --git a/client/client/src/summary/style.scss b/modules/client/front/src/summary/style.scss
similarity index 100%
rename from client/client/src/summary/style.scss
rename to modules/client/front/src/summary/style.scss
diff --git a/client/client/src/web-access/index.html b/modules/client/front/src/web-access/index.html
similarity index 100%
rename from client/client/src/web-access/index.html
rename to modules/client/front/src/web-access/index.html
diff --git a/client/client/src/web-access/index.js b/modules/client/front/src/web-access/index.js
similarity index 100%
rename from client/client/src/web-access/index.js
rename to modules/client/front/src/web-access/index.js
diff --git a/client/client/src/web-access/index.spec.js b/modules/client/front/src/web-access/index.spec.js
similarity index 92%
rename from client/client/src/web-access/index.spec.js
rename to modules/client/front/src/web-access/index.spec.js
index b0fda550f..c9e33e51e 100644
--- a/client/client/src/web-access/index.spec.js
+++ b/modules/client/front/src/web-access/index.spec.js
@@ -1,24 +1,21 @@
import './index';
describe('Component VnClientWebAccess', () => {
- let $componentController;
let $httpBackend;
let $scope;
let vnApp;
let controller;
beforeEach(() => {
- angular.mock.module('client');
+ ngModule('client');
});
- beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_, _vnApp_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_, _vnApp_) => {
$scope = $rootScope.$new();
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
vnApp = _vnApp_;
spyOn(vnApp, 'showError');
- controller = $componentController('vnClientWebAccess', {$scope: $scope});
+ controller = $componentController('vnClientWebAccess', {$scope});
}));
describe('$onChanges()', () => {
diff --git a/client/client/src/web-access/locale/es.yml b/modules/client/front/src/web-access/locale/es.yml
similarity index 100%
rename from client/client/src/web-access/locale/es.yml
rename to modules/client/front/src/web-access/locale/es.yml
diff --git a/client/client/src/web-payment/index.html b/modules/client/front/src/web-payment/index.html
similarity index 100%
rename from client/client/src/web-payment/index.html
rename to modules/client/front/src/web-payment/index.html
diff --git a/client/client/src/web-payment/index.js b/modules/client/front/src/web-payment/index.js
similarity index 100%
rename from client/client/src/web-payment/index.js
rename to modules/client/front/src/web-payment/index.js
diff --git a/client/client/src/web-payment/index.spec.js b/modules/client/front/src/web-payment/index.spec.js
similarity index 78%
rename from client/client/src/web-payment/index.spec.js
rename to modules/client/front/src/web-payment/index.spec.js
index 452dd4963..832dcef9f 100644
--- a/client/client/src/web-payment/index.spec.js
+++ b/modules/client/front/src/web-payment/index.spec.js
@@ -1,23 +1,20 @@
import './index';
-import {crudModel} from '../../../helpers/crudModelHelper';
+import crudModel from 'mocks/crud-model';
describe('Component vnClientWebPayment', () => {
- let $componentController;
let $httpBackend;
let $scope;
let vnApp;
let controller;
beforeEach(() => {
- angular.mock.module('client');
+ ngModule('client');
});
- beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_, _vnApp_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_, _vnApp_) => {
$scope = $rootScope.$new();
$scope.model = crudModel;
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
vnApp = _vnApp_;
spyOn(vnApp, 'showError');
controller = $componentController('vnClientWebPayment', {$scope: $scope});
diff --git a/client/client/src/web-payment/locale/es.yml b/modules/client/front/src/web-payment/locale/es.yml
similarity index 100%
rename from client/client/src/web-payment/locale/es.yml
rename to modules/client/front/src/web-payment/locale/es.yml
diff --git a/client/client/src/web-payment/style.scss b/modules/client/front/src/web-payment/style.scss
similarity index 100%
rename from client/client/src/web-payment/style.scss
rename to modules/client/front/src/web-payment/style.scss
diff --git a/client/item/index.js b/modules/item/front/index.js
similarity index 100%
rename from client/item/index.js
rename to modules/item/front/index.js
diff --git a/client/item/routes.json b/modules/item/front/routes.json
similarity index 100%
rename from client/item/routes.json
rename to modules/item/front/routes.json
diff --git a/client/item/src/barcode/index.html b/modules/item/front/src/barcode/index.html
similarity index 100%
rename from client/item/src/barcode/index.html
rename to modules/item/front/src/barcode/index.html
diff --git a/client/item/src/barcode/index.js b/modules/item/front/src/barcode/index.js
similarity index 100%
rename from client/item/src/barcode/index.js
rename to modules/item/front/src/barcode/index.js
diff --git a/client/item/src/botanical/index.html b/modules/item/front/src/botanical/index.html
similarity index 100%
rename from client/item/src/botanical/index.html
rename to modules/item/front/src/botanical/index.html
diff --git a/client/item/src/botanical/index.js b/modules/item/front/src/botanical/index.js
similarity index 100%
rename from client/item/src/botanical/index.js
rename to modules/item/front/src/botanical/index.js
diff --git a/client/item/src/botanical/index.spec.js b/modules/item/front/src/botanical/index.spec.js
similarity index 72%
rename from client/item/src/botanical/index.spec.js
rename to modules/item/front/src/botanical/index.spec.js
index ae111f52a..2ba5a8dcd 100644
--- a/client/item/src/botanical/index.spec.js
+++ b/modules/item/front/src/botanical/index.spec.js
@@ -2,25 +2,20 @@ import './index.js';
describe('ItemBotanical', () => {
describe('Component vnItemBotanical', () => {
- let $componentController;
let $httpBackend;
let $state;
let controller;
- beforeEach(() => {
- angular.mock.module('item');
- });
+ beforeEach(ngModule('item'));
- beforeEach(angular.mock.inject((_$componentController_, _$state_, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$state_, _$httpBackend_) => {
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
$state = {
params: {
id: 123
}
};
- controller = $componentController('vnItemBotanical', {$state: $state});
+ controller = $componentController('vnItemBotanical', {$state});
}));
describe('_getBotanical()', () => {
diff --git a/client/item/src/card/index.html b/modules/item/front/src/card/index.html
similarity index 100%
rename from client/item/src/card/index.html
rename to modules/item/front/src/card/index.html
diff --git a/client/item/src/card/index.js b/modules/item/front/src/card/index.js
similarity index 100%
rename from client/item/src/card/index.js
rename to modules/item/front/src/card/index.js
diff --git a/client/item/src/card/index.spec.js b/modules/item/front/src/card/index.spec.js
similarity index 70%
rename from client/item/src/card/index.spec.js
rename to modules/item/front/src/card/index.spec.js
index fc20736b1..be74d5e7e 100644
--- a/client/item/src/card/index.spec.js
+++ b/modules/item/front/src/card/index.spec.js
@@ -2,19 +2,14 @@ import './index.js';
describe('Item', () => {
describe('Component vnItemCard', () => {
- let $componentController;
let $httpBackend;
let $stateParams;
let controller;
- beforeEach(() => {
- angular.mock.module('item');
- });
+ beforeEach(ngModule('item'));
- beforeEach(angular.mock.inject((_$componentController_, _$stateParams_, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$stateParams_, _$httpBackend_) => {
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
$stateParams = {
id: 123
};
diff --git a/client/item/src/create/index.html b/modules/item/front/src/create/index.html
similarity index 100%
rename from client/item/src/create/index.html
rename to modules/item/front/src/create/index.html
diff --git a/client/item/src/create/index.js b/modules/item/front/src/create/index.js
similarity index 100%
rename from client/item/src/create/index.js
rename to modules/item/front/src/create/index.js
diff --git a/client/item/src/create/index.spec.js b/modules/item/front/src/create/index.spec.js
similarity index 93%
rename from client/item/src/create/index.spec.js
rename to modules/item/front/src/create/index.spec.js
index 80bdd68ad..14d7bf513 100644
--- a/client/item/src/create/index.spec.js
+++ b/modules/item/front/src/create/index.spec.js
@@ -7,9 +7,7 @@ describe('Item', () => {
let $state;
let controller;
- beforeEach(() => {
- angular.mock.module('item');
- });
+ beforeEach(ngModule('item'));
beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$state_) => {
$componentController = _$componentController_;
diff --git a/client/item/src/data/index.html b/modules/item/front/src/data/index.html
similarity index 100%
rename from client/item/src/data/index.html
rename to modules/item/front/src/data/index.html
diff --git a/client/item/src/data/index.js b/modules/item/front/src/data/index.js
similarity index 100%
rename from client/item/src/data/index.js
rename to modules/item/front/src/data/index.js
diff --git a/client/item/src/data/locale/es.yml b/modules/item/front/src/data/locale/es.yml
similarity index 100%
rename from client/item/src/data/locale/es.yml
rename to modules/item/front/src/data/locale/es.yml
diff --git a/client/item/src/descriptor-popover/index.html b/modules/item/front/src/descriptor-popover/index.html
similarity index 100%
rename from client/item/src/descriptor-popover/index.html
rename to modules/item/front/src/descriptor-popover/index.html
diff --git a/client/item/src/descriptor-popover/index.js b/modules/item/front/src/descriptor-popover/index.js
similarity index 100%
rename from client/item/src/descriptor-popover/index.js
rename to modules/item/front/src/descriptor-popover/index.js
diff --git a/client/item/src/descriptor-popover/index.spec.js b/modules/item/front/src/descriptor-popover/index.spec.js
similarity index 87%
rename from client/item/src/descriptor-popover/index.spec.js
rename to modules/item/front/src/descriptor-popover/index.spec.js
index 7b6274a92..fdd75afe1 100644
--- a/client/item/src/descriptor-popover/index.spec.js
+++ b/modules/item/front/src/descriptor-popover/index.spec.js
@@ -2,26 +2,21 @@ import './index.js';
describe('Item', () => {
describe('Component vnItemDescriptorPopover', () => {
- let $componentController;
let $httpBackend;
let $scope;
let controller;
let $element;
let $timeout;
- beforeEach(() => {
- angular.mock.module('item');
- });
+ beforeEach(ngModule('item'));
- beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_, _$timeout_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_, _$timeout_) => {
$httpBackend = _$httpBackend_;
$timeout = _$timeout_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
$element = angular.element(`
`);
$scope = $rootScope.$new();
$scope.popover = {relocate: () => {}, show: () => {}};
- controller = $componentController('vnItemDescriptorPopover', {$scope: $scope, $element: $element});
+ controller = $componentController('vnItemDescriptorPopover', {$scope, $element});
}));
describe('itemFk()', () => {
diff --git a/client/item/src/descriptor-popover/style.scss b/modules/item/front/src/descriptor-popover/style.scss
similarity index 100%
rename from client/item/src/descriptor-popover/style.scss
rename to modules/item/front/src/descriptor-popover/style.scss
diff --git a/client/item/src/descriptor/index.html b/modules/item/front/src/descriptor/index.html
similarity index 100%
rename from client/item/src/descriptor/index.html
rename to modules/item/front/src/descriptor/index.html
diff --git a/client/item/src/descriptor/index.js b/modules/item/front/src/descriptor/index.js
similarity index 100%
rename from client/item/src/descriptor/index.js
rename to modules/item/front/src/descriptor/index.js
diff --git a/client/item/src/descriptor/locale/es.yml b/modules/item/front/src/descriptor/locale/es.yml
similarity index 100%
rename from client/item/src/descriptor/locale/es.yml
rename to modules/item/front/src/descriptor/locale/es.yml
diff --git a/client/item/src/descriptor/style.scss b/modules/item/front/src/descriptor/style.scss
similarity index 100%
rename from client/item/src/descriptor/style.scss
rename to modules/item/front/src/descriptor/style.scss
diff --git a/client/item/src/diary/index.html b/modules/item/front/src/diary/index.html
similarity index 100%
rename from client/item/src/diary/index.html
rename to modules/item/front/src/diary/index.html
diff --git a/client/item/src/diary/index.js b/modules/item/front/src/diary/index.js
similarity index 100%
rename from client/item/src/diary/index.js
rename to modules/item/front/src/diary/index.js
diff --git a/client/item/src/diary/index.spec.js b/modules/item/front/src/diary/index.spec.js
similarity index 94%
rename from client/item/src/diary/index.spec.js
rename to modules/item/front/src/diary/index.spec.js
index ba4d6b566..007e36af0 100644
--- a/client/item/src/diary/index.spec.js
+++ b/modules/item/front/src/diary/index.spec.js
@@ -1,21 +1,19 @@
import './index.js';
-import {crudModel} from '../../../helpers/crudModelHelper';
+import crudModel from 'mocks/crud-model';
describe('Item', () => {
describe('Component vnItemDiary', () => {
- let $componentController;
let $stateParams;
let $scope;
let controller;
beforeEach(ngModule('item'));
- beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$stateParams_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope, _$stateParams_) => {
$stateParams = _$stateParams_;
$stateParams.id = 1;
$scope = $rootScope.$new();
- controller = $componentController('vnItemDiary', {$scope: $scope, $stateParams});
+ controller = $componentController('vnItemDiary', {$scope, $stateParams});
controller.$scope.model = crudModel;
}));
diff --git a/client/item/src/diary/locale/es.yml b/modules/item/front/src/diary/locale/es.yml
similarity index 100%
rename from client/item/src/diary/locale/es.yml
rename to modules/item/front/src/diary/locale/es.yml
diff --git a/client/item/src/diary/style.scss b/modules/item/front/src/diary/style.scss
similarity index 100%
rename from client/item/src/diary/style.scss
rename to modules/item/front/src/diary/style.scss
diff --git a/client/item/src/history/index.html b/modules/item/front/src/history/index.html
similarity index 100%
rename from client/item/src/history/index.html
rename to modules/item/front/src/history/index.html
diff --git a/client/item/src/history/index.js b/modules/item/front/src/history/index.js
similarity index 100%
rename from client/item/src/history/index.js
rename to modules/item/front/src/history/index.js
diff --git a/client/item/src/index/index.html b/modules/item/front/src/index/index.html
similarity index 100%
rename from client/item/src/index/index.html
rename to modules/item/front/src/index/index.html
diff --git a/client/item/src/index/index.js b/modules/item/front/src/index/index.js
similarity index 100%
rename from client/item/src/index/index.js
rename to modules/item/front/src/index/index.js
diff --git a/client/item/src/index/index.spec.js b/modules/item/front/src/index/index.spec.js
similarity index 84%
rename from client/item/src/index/index.spec.js
rename to modules/item/front/src/index/index.spec.js
index 5da3ee154..fb934a6fa 100644
--- a/client/item/src/index/index.spec.js
+++ b/modules/item/front/src/index/index.spec.js
@@ -2,21 +2,16 @@ import './index.js';
describe('Item', () => {
describe('Component vnItemIndex', () => {
- let $componentController;
let $state;
let controller;
let $httpBackend;
- beforeEach(() => {
- angular.mock.module('item');
- });
+ beforeEach(ngModule('item'));
- beforeEach(angular.mock.inject((_$componentController_, _$state_, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$state_, _$httpBackend_) => {
$state = _$state_;
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
- controller = $componentController('vnItemIndex', {$state: $state});
+ controller = $componentController('vnItemIndex', {$state});
}));
describe('onCloneAccept()', () => {
diff --git a/client/item/src/index/preview.svg b/modules/item/front/src/index/preview.svg
similarity index 100%
rename from client/item/src/index/preview.svg
rename to modules/item/front/src/index/preview.svg
diff --git a/client/item/src/index/product.html b/modules/item/front/src/index/product.html
similarity index 100%
rename from client/item/src/index/product.html
rename to modules/item/front/src/index/product.html
diff --git a/client/item/src/index/product.js b/modules/item/front/src/index/product.js
similarity index 100%
rename from client/item/src/index/product.js
rename to modules/item/front/src/index/product.js
diff --git a/client/item/src/index/style.scss b/modules/item/front/src/index/style.scss
similarity index 100%
rename from client/item/src/index/style.scss
rename to modules/item/front/src/index/style.scss
diff --git a/client/item/src/item.js b/modules/item/front/src/item.js
similarity index 100%
rename from client/item/src/item.js
rename to modules/item/front/src/item.js
diff --git a/client/item/src/last-entries/index.html b/modules/item/front/src/last-entries/index.html
similarity index 100%
rename from client/item/src/last-entries/index.html
rename to modules/item/front/src/last-entries/index.html
diff --git a/client/item/src/last-entries/index.js b/modules/item/front/src/last-entries/index.js
similarity index 100%
rename from client/item/src/last-entries/index.js
rename to modules/item/front/src/last-entries/index.js
diff --git a/client/item/src/last-entries/locale/es.yml b/modules/item/front/src/last-entries/locale/es.yml
similarity index 100%
rename from client/item/src/last-entries/locale/es.yml
rename to modules/item/front/src/last-entries/locale/es.yml
diff --git a/client/item/src/last-entries/style.scss b/modules/item/front/src/last-entries/style.scss
similarity index 100%
rename from client/item/src/last-entries/style.scss
rename to modules/item/front/src/last-entries/style.scss
diff --git a/client/item/src/locale/en.yml b/modules/item/front/src/locale/en.yml
similarity index 100%
rename from client/item/src/locale/en.yml
rename to modules/item/front/src/locale/en.yml
diff --git a/client/item/src/locale/es.yml b/modules/item/front/src/locale/es.yml
similarity index 100%
rename from client/item/src/locale/es.yml
rename to modules/item/front/src/locale/es.yml
diff --git a/client/item/src/module.js b/modules/item/front/src/module.js
similarity index 100%
rename from client/item/src/module.js
rename to modules/item/front/src/module.js
diff --git a/client/item/src/niche/index.html b/modules/item/front/src/niche/index.html
similarity index 100%
rename from client/item/src/niche/index.html
rename to modules/item/front/src/niche/index.html
diff --git a/client/item/src/niche/index.js b/modules/item/front/src/niche/index.js
similarity index 100%
rename from client/item/src/niche/index.js
rename to modules/item/front/src/niche/index.js
diff --git a/client/item/src/search-panel/index.html b/modules/item/front/src/search-panel/index.html
similarity index 100%
rename from client/item/src/search-panel/index.html
rename to modules/item/front/src/search-panel/index.html
diff --git a/client/item/src/search-panel/index.js b/modules/item/front/src/search-panel/index.js
similarity index 100%
rename from client/item/src/search-panel/index.js
rename to modules/item/front/src/search-panel/index.js
diff --git a/client/item/src/search-panel/index.spec.js b/modules/item/front/src/search-panel/index.spec.js
similarity index 77%
rename from client/item/src/search-panel/index.spec.js
rename to modules/item/front/src/search-panel/index.spec.js
index 0309e1824..a5290a141 100644
--- a/client/item/src/search-panel/index.spec.js
+++ b/modules/item/front/src/search-panel/index.spec.js
@@ -2,21 +2,14 @@ import './index.js';
describe('Item', () => {
describe('Component vnItemSearchPanel', () => {
- let $componentController;
let $element;
let controller;
- let $httpBackend;
- beforeEach(() => {
- angular.mock.module('item');
- });
+ beforeEach(ngModule('item'));
- beforeEach(angular.mock.inject((_$componentController_, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject($componentController => {
$element = angular.element(`
`);
- $httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
- controller = $componentController('vnItemSearchPanel', {$element: $element});
+ controller = $componentController('vnItemSearchPanel', {$element});
}));
describe('getSourceTable()', () => {
diff --git a/client/item/src/search-panel/locale/es.yml b/modules/item/front/src/search-panel/locale/es.yml
similarity index 100%
rename from client/item/src/search-panel/locale/es.yml
rename to modules/item/front/src/search-panel/locale/es.yml
diff --git a/client/item/src/summary/index.html b/modules/item/front/src/summary/index.html
similarity index 100%
rename from client/item/src/summary/index.html
rename to modules/item/front/src/summary/index.html
diff --git a/client/item/src/summary/index.js b/modules/item/front/src/summary/index.js
similarity index 100%
rename from client/item/src/summary/index.js
rename to modules/item/front/src/summary/index.js
diff --git a/client/item/src/summary/index.spec.js b/modules/item/front/src/summary/index.spec.js
similarity index 67%
rename from client/item/src/summary/index.spec.js
rename to modules/item/front/src/summary/index.spec.js
index 47a7ec51a..5afe041ee 100644
--- a/client/item/src/summary/index.spec.js
+++ b/modules/item/front/src/summary/index.spec.js
@@ -2,24 +2,19 @@ import './index.js';
describe('Item', () => {
describe('Component summary', () => {
- let $componentController;
let controller;
let $httpBackend;
- beforeEach(() => {
- angular.mock.module('item');
- });
+ beforeEach(ngModule('item'));
- beforeEach(angular.mock.inject((_$componentController_, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$httpBackend_) => {
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
controller = $componentController('vnItemSummary');
controller.item = {id: 1};
}));
describe('getSummary()', () => {
- it("should perform a query to set summary", () => {
+ it('should perform a query to set summary', () => {
let data = {id: 1, name: 'Gem of mind'};
$httpBackend.when('GET', `/item/api/Items/1/getSummary`).respond(200, data);
$httpBackend.expect('GET', `/item/api/Items/1/getSummary`);
@@ -31,7 +26,7 @@ describe('Item', () => {
});
describe('$onChanges()', () => {
- it("should call getSummary when item.id is defined", () => {
+ it('should call getSummary when item.id is defined', () => {
spyOn(controller, 'getSummary');
controller.$onChanges();
diff --git a/client/item/src/summary/locale/es.yml b/modules/item/front/src/summary/locale/es.yml
similarity index 100%
rename from client/item/src/summary/locale/es.yml
rename to modules/item/front/src/summary/locale/es.yml
diff --git a/client/item/src/summary/style.scss b/modules/item/front/src/summary/style.scss
similarity index 100%
rename from client/item/src/summary/style.scss
rename to modules/item/front/src/summary/style.scss
diff --git a/client/item/src/tags/index.html b/modules/item/front/src/tags/index.html
similarity index 100%
rename from client/item/src/tags/index.html
rename to modules/item/front/src/tags/index.html
diff --git a/client/item/src/tags/index.js b/modules/item/front/src/tags/index.js
similarity index 100%
rename from client/item/src/tags/index.js
rename to modules/item/front/src/tags/index.js
diff --git a/client/item/src/tags/index.spec.js b/modules/item/front/src/tags/index.spec.js
similarity index 88%
rename from client/item/src/tags/index.spec.js
rename to modules/item/front/src/tags/index.spec.js
index 87dd05172..a4593e2a8 100644
--- a/client/item/src/tags/index.spec.js
+++ b/modules/item/front/src/tags/index.spec.js
@@ -1,18 +1,14 @@
import './index.js';
-import {crudModel} from '../../../helpers/crudModelHelper';
+import crudModel from 'mocks/crud-model';
describe('Item', () => {
describe('Component vnItemTags', () => {
- let $componentController;
let $scope;
let controller;
- beforeEach(() => {
- angular.mock.module('item');
- });
+ beforeEach(ngModule('item'));
- beforeEach(angular.mock.inject((_$componentController_, $rootScope) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope) => {
$scope = $rootScope.$new();
$scope.model = crudModel;
$scope.model.data = [{priority: 1}, {priority: 2}, {priority: 1}];
diff --git a/client/item/src/tax/index.html b/modules/item/front/src/tax/index.html
similarity index 100%
rename from client/item/src/tax/index.html
rename to modules/item/front/src/tax/index.html
diff --git a/client/item/src/tax/index.js b/modules/item/front/src/tax/index.js
similarity index 100%
rename from client/item/src/tax/index.js
rename to modules/item/front/src/tax/index.js
diff --git a/client/item/src/tax/index.spec.js b/modules/item/front/src/tax/index.spec.js
similarity index 80%
rename from client/item/src/tax/index.spec.js
rename to modules/item/front/src/tax/index.spec.js
index 30579a2a8..8f84e8b0e 100644
--- a/client/item/src/tax/index.spec.js
+++ b/modules/item/front/src/tax/index.spec.js
@@ -2,29 +2,24 @@ import './index.js';
describe('Item', () => {
describe('Component vnItemTax', () => {
- let $componentController;
let $stateParams;
let controller;
let $httpBackend;
let vnApp;
- beforeEach(() => {
- angular.mock.module('item');
- });
+ beforeEach(ngModule('item'));
- beforeEach(angular.mock.inject((_$componentController_, _$httpBackend_, _$stateParams_, _vnApp_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$httpBackend_, _$stateParams_, _vnApp_) => {
$stateParams = _$stateParams_;
$stateParams.id = 1;
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
vnApp = _vnApp_;
spyOn(vnApp, 'showSuccess');
controller = $componentController('vnItemTax', {$state: $stateParams});
}));
describe('getTaxes()', () => {
- it("should perform a query to set the array of taxes into the controller", () => {
+ it('should perform a query to set the array of taxes into the controller', () => {
let filter = {
fields: ['id', 'countryFk', 'taxClassFk'],
include: [{
@@ -44,7 +39,7 @@ describe('Item', () => {
});
describe('submit()', () => {
- it("should perform a post to update taxes", () => {
+ it('should perform a post to update taxes', () => {
let filter = {
fields: ['id', 'countryFk', 'taxClassFk'],
include: [{
diff --git a/client/item/src/ticket-descriptor-popover/index.html b/modules/item/front/src/ticket-descriptor-popover/index.html
similarity index 100%
rename from client/item/src/ticket-descriptor-popover/index.html
rename to modules/item/front/src/ticket-descriptor-popover/index.html
diff --git a/client/item/src/ticket-descriptor-popover/index.js b/modules/item/front/src/ticket-descriptor-popover/index.js
similarity index 100%
rename from client/item/src/ticket-descriptor-popover/index.js
rename to modules/item/front/src/ticket-descriptor-popover/index.js
diff --git a/client/item/src/ticket-descriptor-popover/index.spec.js b/modules/item/front/src/ticket-descriptor-popover/index.spec.js
similarity index 90%
rename from client/item/src/ticket-descriptor-popover/index.spec.js
rename to modules/item/front/src/ticket-descriptor-popover/index.spec.js
index 87fa2225f..2059b9fdb 100644
--- a/client/item/src/ticket-descriptor-popover/index.spec.js
+++ b/modules/item/front/src/ticket-descriptor-popover/index.spec.js
@@ -2,26 +2,21 @@ import './index.js';
describe('Item', () => {
describe('Component vnTicketDescriptorPopover', () => {
- let $componentController;
let $httpBackend;
let $scope;
let controller;
let $element;
let $timeout;
- beforeEach(() => {
- angular.mock.module('item');
- });
+ beforeEach(ngModule('item'));
- beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_, _$timeout_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_, _$timeout_) => {
$httpBackend = _$httpBackend_;
$timeout = _$timeout_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
$element = angular.element(`
`);
$scope = $rootScope.$new();
$scope.popover = {relocate: () => {}, show: () => {}};
- controller = $componentController('vnTicketDescriptorPopover', {$scope: $scope, $element: $element});
+ controller = $componentController('vnTicketDescriptorPopover', {$scope, $element});
}));
describe('ticketFk()', () => {
diff --git a/client/item/src/ticket-descriptor-popover/style.scss b/modules/item/front/src/ticket-descriptor-popover/style.scss
similarity index 100%
rename from client/item/src/ticket-descriptor-popover/style.scss
rename to modules/item/front/src/ticket-descriptor-popover/style.scss
diff --git a/client/item/src/ticket-descriptor/index.html b/modules/item/front/src/ticket-descriptor/index.html
similarity index 100%
rename from client/item/src/ticket-descriptor/index.html
rename to modules/item/front/src/ticket-descriptor/index.html
diff --git a/client/item/src/ticket-descriptor/index.js b/modules/item/front/src/ticket-descriptor/index.js
similarity index 100%
rename from client/item/src/ticket-descriptor/index.js
rename to modules/item/front/src/ticket-descriptor/index.js
diff --git a/client/item/src/ticket-descriptor/index.spec.js b/modules/item/front/src/ticket-descriptor/index.spec.js
similarity index 90%
rename from client/item/src/ticket-descriptor/index.spec.js
rename to modules/item/front/src/ticket-descriptor/index.spec.js
index 3a5e74d93..1445af6c5 100644
--- a/client/item/src/ticket-descriptor/index.spec.js
+++ b/modules/item/front/src/ticket-descriptor/index.spec.js
@@ -1,18 +1,15 @@
import './index.js';
describe('Item Component vnTicketDescriptor', () => {
- let $componentController;
let $httpBackend;
let controller;
beforeEach(() => {
- angular.mock.module('item');
+ ngModule('item');
});
- beforeEach(angular.mock.inject((_$componentController_, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$httpBackend_) => {
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
controller = $componentController('vnTicketDescriptor');
controller.ticket = {id: 2};
}));
diff --git a/client/order/index.js b/modules/order/front/index.js
similarity index 100%
rename from client/order/index.js
rename to modules/order/front/index.js
diff --git a/client/order/routes.json b/modules/order/front/routes.json
similarity index 100%
rename from client/order/routes.json
rename to modules/order/front/routes.json
diff --git a/client/order/src/basic-data/index.html b/modules/order/front/src/basic-data/index.html
similarity index 100%
rename from client/order/src/basic-data/index.html
rename to modules/order/front/src/basic-data/index.html
diff --git a/client/order/src/basic-data/index.js b/modules/order/front/src/basic-data/index.js
similarity index 100%
rename from client/order/src/basic-data/index.js
rename to modules/order/front/src/basic-data/index.js
diff --git a/client/order/src/basic-data/locale/es.yml b/modules/order/front/src/basic-data/locale/es.yml
similarity index 100%
rename from client/order/src/basic-data/locale/es.yml
rename to modules/order/front/src/basic-data/locale/es.yml
diff --git a/client/order/src/basic-data/style.scss b/modules/order/front/src/basic-data/style.scss
similarity index 100%
rename from client/order/src/basic-data/style.scss
rename to modules/order/front/src/basic-data/style.scss
diff --git a/client/order/src/card/index.html b/modules/order/front/src/card/index.html
similarity index 100%
rename from client/order/src/card/index.html
rename to modules/order/front/src/card/index.html
diff --git a/client/order/src/card/index.js b/modules/order/front/src/card/index.js
similarity index 100%
rename from client/order/src/card/index.js
rename to modules/order/front/src/card/index.js
diff --git a/client/order/src/card/index.spec.js b/modules/order/front/src/card/index.spec.js
similarity index 86%
rename from client/order/src/card/index.spec.js
rename to modules/order/front/src/card/index.spec.js
index 0b9f791b2..35f3ca654 100644
--- a/client/order/src/card/index.spec.js
+++ b/modules/order/front/src/card/index.spec.js
@@ -2,24 +2,19 @@ import './index.js';
describe('Order', () => {
describe('Component vnOrderCard', () => {
- let $componentController;
let $scope;
let controller;
let $httpBackend;
let $state;
- beforeEach(() => {
- angular.mock.module('order');
- });
+ beforeEach(ngModule('order'));
- beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_) => {
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
$scope = $rootScope.$new();
$scope.card = {createOrder: () => {}};
$state = {params: {id: 1}};
- controller = $componentController('vnOrderCard', {$scope: $scope, $state: $state});
+ controller = $componentController('vnOrderCard', {$scope, $state});
}));
describe('getCard()', () => {
diff --git a/client/order/src/catalog-search-panel/index.html b/modules/order/front/src/catalog-search-panel/index.html
similarity index 100%
rename from client/order/src/catalog-search-panel/index.html
rename to modules/order/front/src/catalog-search-panel/index.html
diff --git a/client/order/src/catalog-search-panel/index.js b/modules/order/front/src/catalog-search-panel/index.js
similarity index 100%
rename from client/order/src/catalog-search-panel/index.js
rename to modules/order/front/src/catalog-search-panel/index.js
diff --git a/client/order/src/catalog/index.html b/modules/order/front/src/catalog/index.html
similarity index 100%
rename from client/order/src/catalog/index.html
rename to modules/order/front/src/catalog/index.html
diff --git a/client/order/src/catalog/index.js b/modules/order/front/src/catalog/index.js
similarity index 100%
rename from client/order/src/catalog/index.js
rename to modules/order/front/src/catalog/index.js
diff --git a/client/order/src/catalog/index.spec.js b/modules/order/front/src/catalog/index.spec.js
similarity index 86%
rename from client/order/src/catalog/index.spec.js
rename to modules/order/front/src/catalog/index.spec.js
index 13f3e041b..669ff8a46 100644
--- a/client/order/src/catalog/index.spec.js
+++ b/modules/order/front/src/catalog/index.spec.js
@@ -1,18 +1,14 @@
import './index.js';
-import {crudModel} from '../../../helpers/crudModelHelper';
+import crudModel from 'mocks/crud-model';
describe('Order', () => {
describe('Component vnOrderCatalog', () => {
- let $componentController;
let $scope;
let controller;
- beforeEach(() => {
- angular.mock.module('order');
- });
+ beforeEach(ngModule('order'));
- beforeEach(angular.mock.inject((_$componentController_, $rootScope) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope) => {
$scope = $rootScope.$new();
$scope.model = crudModel;
$scope.field = {};
diff --git a/client/order/src/catalog/style.scss b/modules/order/front/src/catalog/style.scss
similarity index 100%
rename from client/order/src/catalog/style.scss
rename to modules/order/front/src/catalog/style.scss
diff --git a/client/order/src/create/card.html b/modules/order/front/src/create/card.html
similarity index 100%
rename from client/order/src/create/card.html
rename to modules/order/front/src/create/card.html
diff --git a/client/order/src/create/card.js b/modules/order/front/src/create/card.js
similarity index 100%
rename from client/order/src/create/card.js
rename to modules/order/front/src/create/card.js
diff --git a/client/order/src/create/card.spec.js b/modules/order/front/src/create/card.spec.js
similarity index 89%
rename from client/order/src/create/card.spec.js
rename to modules/order/front/src/create/card.spec.js
index 3699f43a3..2f832b0ec 100644
--- a/client/order/src/create/card.spec.js
+++ b/modules/order/front/src/create/card.spec.js
@@ -2,18 +2,13 @@ import './card.js';
describe('Order', () => {
describe('Component vnOrderCreateCard', () => {
- let $componentController;
let controller;
let $httpBackend;
- beforeEach(() => {
- angular.mock.module('order');
- });
+ beforeEach(ngModule('order'));
- beforeEach(angular.mock.inject((_$componentController_, _$httpBackend_, _vnApp_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$httpBackend_, _vnApp_) => {
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
controller = $componentController('vnOrderCreateCard');
controller.item = {id: 3};
}));
diff --git a/client/order/src/create/index.html b/modules/order/front/src/create/index.html
similarity index 100%
rename from client/order/src/create/index.html
rename to modules/order/front/src/create/index.html
diff --git a/client/order/src/create/index.js b/modules/order/front/src/create/index.js
similarity index 100%
rename from client/order/src/create/index.js
rename to modules/order/front/src/create/index.js
diff --git a/client/order/src/create/index.spec.js b/modules/order/front/src/create/index.spec.js
similarity index 72%
rename from client/order/src/create/index.spec.js
rename to modules/order/front/src/create/index.spec.js
index 5054158a4..6c1714004 100644
--- a/client/order/src/create/index.spec.js
+++ b/modules/order/front/src/create/index.spec.js
@@ -2,20 +2,15 @@ import './index.js';
describe('Order', () => {
describe('Component vnOrderCreate', () => {
- let $componentController;
let $scope;
let controller;
- beforeEach(() => {
- angular.mock.module('order');
- });
-
- beforeEach(angular.mock.inject((_$componentController_, $rootScope) => {
- $componentController = _$componentController_;
+ beforeEach(ngModule('order'));
+ beforeEach(angular.mock.inject(($componentController, $rootScope) => {
$scope = $rootScope.$new();
$scope.card = {createOrder: () => {}};
- controller = $componentController('vnOrderCreate', {$scope: $scope});
+ controller = $componentController('vnOrderCreate', {$scope});
}));
describe('onSubmit()', () => {
@@ -30,7 +25,7 @@ describe('Order', () => {
spyOn(controller.$state, 'go');
await controller.onSubmit();
- expect(controller.$state.go).toHaveBeenCalledWith("order.card.summary", {id: undefined});
+ expect(controller.$state.go).toHaveBeenCalledWith('order.card.summary', {id: undefined});
});
});
});
diff --git a/client/order/src/create/locale/es.yml b/modules/order/front/src/create/locale/es.yml
similarity index 100%
rename from client/order/src/create/locale/es.yml
rename to modules/order/front/src/create/locale/es.yml
diff --git a/client/order/src/descriptor/index.html b/modules/order/front/src/descriptor/index.html
similarity index 100%
rename from client/order/src/descriptor/index.html
rename to modules/order/front/src/descriptor/index.html
diff --git a/client/order/src/descriptor/index.js b/modules/order/front/src/descriptor/index.js
similarity index 100%
rename from client/order/src/descriptor/index.js
rename to modules/order/front/src/descriptor/index.js
diff --git a/client/order/src/descriptor/locale/es.yml b/modules/order/front/src/descriptor/locale/es.yml
similarity index 100%
rename from client/order/src/descriptor/locale/es.yml
rename to modules/order/front/src/descriptor/locale/es.yml
diff --git a/client/order/src/descriptor/style.scss b/modules/order/front/src/descriptor/style.scss
similarity index 100%
rename from client/order/src/descriptor/style.scss
rename to modules/order/front/src/descriptor/style.scss
diff --git a/client/order/src/filter/index.html b/modules/order/front/src/filter/index.html
similarity index 100%
rename from client/order/src/filter/index.html
rename to modules/order/front/src/filter/index.html
diff --git a/client/order/src/filter/index.js b/modules/order/front/src/filter/index.js
similarity index 100%
rename from client/order/src/filter/index.js
rename to modules/order/front/src/filter/index.js
diff --git a/client/order/src/filter/index.spec.js b/modules/order/front/src/filter/index.spec.js
similarity index 91%
rename from client/order/src/filter/index.spec.js
rename to modules/order/front/src/filter/index.spec.js
index bca41d962..7fade3ee2 100644
--- a/client/order/src/filter/index.spec.js
+++ b/modules/order/front/src/filter/index.spec.js
@@ -1,22 +1,15 @@
import './index.js';
-import {crudModel} from '../../../helpers/crudModelHelper';
+import crudModel from 'mocks/crud-model';
describe('Order', () => {
describe('Component vnCatalogFilter', () => {
- let $componentController;
- let $httpBackend;
let $scope;
let $state;
let controller;
- beforeEach(() => {
- angular.mock.module('order');
- });
+ beforeEach(ngModule('order'));
- beforeEach(angular.mock.inject((_$httpBackend_, _$componentController_, _$state_, $rootScope) => {
- $componentController = _$componentController_;
- $httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
+ beforeEach(angular.mock.inject(($componentController, _$state_, $rootScope) => {
$scope = $rootScope.$new();
$scope.model = crudModel;
$scope.search = {};
@@ -24,7 +17,7 @@ describe('Order', () => {
$state.params.category = '{"id": 1, "value": "My Category"}';
$state.params.type = '{"id": 1, "value": "My type"}';
$state.current.name = 'my.current.state';
- controller = $componentController('vnCatalogFilter', {$scope: $scope, $state});
+ controller = $componentController('vnCatalogFilter', {$scope, $state});
controller.catalog = {
$scope: $scope,
getOrderBy: () => {
diff --git a/client/order/src/filter/style.scss b/modules/order/front/src/filter/style.scss
similarity index 100%
rename from client/order/src/filter/style.scss
rename to modules/order/front/src/filter/style.scss
diff --git a/client/order/src/index.js b/modules/order/front/src/index.js
similarity index 100%
rename from client/order/src/index.js
rename to modules/order/front/src/index.js
diff --git a/client/order/src/index/index.html b/modules/order/front/src/index/index.html
similarity index 100%
rename from client/order/src/index/index.html
rename to modules/order/front/src/index/index.html
diff --git a/client/order/src/index/index.js b/modules/order/front/src/index/index.js
similarity index 100%
rename from client/order/src/index/index.js
rename to modules/order/front/src/index/index.js
diff --git a/client/order/src/index/style.scss b/modules/order/front/src/index/style.scss
similarity index 100%
rename from client/order/src/index/style.scss
rename to modules/order/front/src/index/style.scss
diff --git a/client/order/src/line/index.html b/modules/order/front/src/line/index.html
similarity index 100%
rename from client/order/src/line/index.html
rename to modules/order/front/src/line/index.html
diff --git a/client/order/src/line/index.js b/modules/order/front/src/line/index.js
similarity index 100%
rename from client/order/src/line/index.js
rename to modules/order/front/src/line/index.js
diff --git a/client/order/src/line/index.spec.js b/modules/order/front/src/line/index.spec.js
similarity index 89%
rename from client/order/src/line/index.spec.js
rename to modules/order/front/src/line/index.spec.js
index 279d10d40..f0c353c77 100644
--- a/client/order/src/line/index.spec.js
+++ b/modules/order/front/src/line/index.spec.js
@@ -2,22 +2,17 @@ import './index.js';
describe('Order', () => {
describe('Component vnOrderLine', () => {
- let $componentController;
let $state;
let controller;
let $httpBackend;
- beforeEach(() => {
- angular.mock.module('order');
- });
+ beforeEach(ngModule('order'));
- beforeEach(angular.mock.inject((_$componentController_, _$state_, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$state_, _$httpBackend_) => {
$state = _$state_;
$state = {params: {id: 1}};
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
- controller = $componentController('vnOrderLine', {$state: $state});
+ controller = $componentController('vnOrderLine', {$state});
controller.rows = [{id: 1}];
controller.$scope.popover = {relocate: () => {}};
controller.$scope.descriptor = {show: () => {}};
diff --git a/client/order/src/line/locale/es.yml b/modules/order/front/src/line/locale/es.yml
similarity index 100%
rename from client/order/src/line/locale/es.yml
rename to modules/order/front/src/line/locale/es.yml
diff --git a/client/order/src/line/style.scss b/modules/order/front/src/line/style.scss
similarity index 100%
rename from client/order/src/line/style.scss
rename to modules/order/front/src/line/style.scss
diff --git a/client/order/src/locale/en.yml b/modules/order/front/src/locale/en.yml
similarity index 100%
rename from client/order/src/locale/en.yml
rename to modules/order/front/src/locale/en.yml
diff --git a/client/order/src/locale/es.yml b/modules/order/front/src/locale/es.yml
similarity index 100%
rename from client/order/src/locale/es.yml
rename to modules/order/front/src/locale/es.yml
diff --git a/client/order/src/module.js b/modules/order/front/src/module.js
similarity index 100%
rename from client/order/src/module.js
rename to modules/order/front/src/module.js
diff --git a/client/order/src/prices-popover/index.html b/modules/order/front/src/prices-popover/index.html
similarity index 100%
rename from client/order/src/prices-popover/index.html
rename to modules/order/front/src/prices-popover/index.html
diff --git a/client/order/src/prices-popover/index.js b/modules/order/front/src/prices-popover/index.js
similarity index 100%
rename from client/order/src/prices-popover/index.js
rename to modules/order/front/src/prices-popover/index.js
diff --git a/client/order/src/prices-popover/locale/es.yml b/modules/order/front/src/prices-popover/locale/es.yml
similarity index 100%
rename from client/order/src/prices-popover/locale/es.yml
rename to modules/order/front/src/prices-popover/locale/es.yml
diff --git a/client/order/src/prices-popover/style.scss b/modules/order/front/src/prices-popover/style.scss
similarity index 100%
rename from client/order/src/prices-popover/style.scss
rename to modules/order/front/src/prices-popover/style.scss
diff --git a/client/order/src/search-panel/index.html b/modules/order/front/src/search-panel/index.html
similarity index 100%
rename from client/order/src/search-panel/index.html
rename to modules/order/front/src/search-panel/index.html
diff --git a/client/order/src/search-panel/index.js b/modules/order/front/src/search-panel/index.js
similarity index 100%
rename from client/order/src/search-panel/index.js
rename to modules/order/front/src/search-panel/index.js
diff --git a/client/order/src/search-panel/locale/es.yml b/modules/order/front/src/search-panel/locale/es.yml
similarity index 100%
rename from client/order/src/search-panel/locale/es.yml
rename to modules/order/front/src/search-panel/locale/es.yml
diff --git a/client/order/src/summary/index.html b/modules/order/front/src/summary/index.html
similarity index 100%
rename from client/order/src/summary/index.html
rename to modules/order/front/src/summary/index.html
diff --git a/client/order/src/summary/index.js b/modules/order/front/src/summary/index.js
similarity index 100%
rename from client/order/src/summary/index.js
rename to modules/order/front/src/summary/index.js
diff --git a/client/order/src/summary/index.spec.js b/modules/order/front/src/summary/index.spec.js
similarity index 81%
rename from client/order/src/summary/index.spec.js
rename to modules/order/front/src/summary/index.spec.js
index 17f3ebbbe..8d6ec4ba7 100644
--- a/client/order/src/summary/index.spec.js
+++ b/modules/order/front/src/summary/index.spec.js
@@ -2,18 +2,13 @@ import './index';
describe('Order', () => {
describe('Component vnOrderSummary', () => {
- let $componentController;
let controller;
let $httpBackend;
- beforeEach(() => {
- angular.mock.module('order');
- });
+ beforeEach(ngModule('order'));
- beforeEach(angular.mock.inject((_$componentController_, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$httpBackend_) => {
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
controller = $componentController('vnOrderSummary');
controller.order = {id: 1};
}));
diff --git a/client/order/src/summary/style.scss b/modules/order/front/src/summary/style.scss
similarity index 100%
rename from client/order/src/summary/style.scss
rename to modules/order/front/src/summary/style.scss
diff --git a/client/order/src/volume/index.html b/modules/order/front/src/volume/index.html
similarity index 100%
rename from client/order/src/volume/index.html
rename to modules/order/front/src/volume/index.html
diff --git a/client/order/src/volume/index.js b/modules/order/front/src/volume/index.js
similarity index 100%
rename from client/order/src/volume/index.js
rename to modules/order/front/src/volume/index.js
diff --git a/client/order/src/volume/index.spec.js b/modules/order/front/src/volume/index.spec.js
similarity index 83%
rename from client/order/src/volume/index.spec.js
rename to modules/order/front/src/volume/index.spec.js
index e80e9b4c6..77ee16b04 100644
--- a/client/order/src/volume/index.spec.js
+++ b/modules/order/front/src/volume/index.spec.js
@@ -2,20 +2,15 @@ import './index';
describe('Order', () => {
describe('Component vnOrderVolume', () => {
- let $componentController;
let controller;
let $httpBackend;
let $state;
let $scope;
- beforeEach(() => {
- angular.mock.module('order');
- });
+ beforeEach(ngModule('order'));
- beforeEach(angular.mock.inject((_$componentController_, _$state_, _$httpBackend_, $rootScope) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$state_, _$httpBackend_, $rootScope) => {
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
$scope = $rootScope.$new();
$scope.model = {data: [{itemFk: 1}, {itemFk: 2}], accept: () => {
return {
@@ -26,7 +21,7 @@ describe('Order', () => {
$scope.popover = {relocate: () => {}};
$state = _$state_;
$state.params.id = 1;
- controller = $componentController('vnOrderVolume', {$scope: $scope}, {$httpBackend: $httpBackend}, {$state: $state});
+ controller = $componentController('vnOrderVolume', {$scope}, {$httpBackend}, {$state});
}));
it('should join the sale volumes to its respective sale', () => {
diff --git a/client/order/src/volume/style.scss b/modules/order/front/src/volume/style.scss
similarity index 100%
rename from client/order/src/volume/style.scss
rename to modules/order/front/src/volume/style.scss
diff --git a/modules/order/methods/order/specs/catalogFilter.spec.js b/modules/order/methods/order/specs/catalogFilter.spec.js
index a0dcc641f..01e27c089 100644
--- a/modules/order/methods/order/specs/catalogFilter.spec.js
+++ b/modules/order/methods/order/specs/catalogFilter.spec.js
@@ -1,6 +1,6 @@
const app = require(`${serviceRoot}/server/server`);
describe('order catalogFilter()', () => {
- it('should return an array of items', async () => {
+ it('should return an array of items', async() => {
let filter = {
where: {
categoryFk: 1,
@@ -17,7 +17,7 @@ describe('order catalogFilter()', () => {
expect(firstItemId).toEqual(1);
});
- it('should return an array of items based on tag filter', async () => {
+ it('should return an array of items based on tag filter', async() => {
let filter = {
where: {
categoryFk: 1,
diff --git a/client/route/index.js b/modules/route/front/index.js
similarity index 100%
rename from client/route/index.js
rename to modules/route/front/index.js
diff --git a/client/route/routes.json b/modules/route/front/routes.json
similarity index 100%
rename from client/route/routes.json
rename to modules/route/front/routes.json
diff --git a/client/route/src/index.js b/modules/route/front/src/index.js
similarity index 100%
rename from client/route/src/index.js
rename to modules/route/front/src/index.js
diff --git a/client/route/src/locale/en.yml b/modules/route/front/src/locale/en.yml
similarity index 100%
rename from client/route/src/locale/en.yml
rename to modules/route/front/src/locale/en.yml
diff --git a/client/route/src/locale/es.yml b/modules/route/front/src/locale/es.yml
similarity index 100%
rename from client/route/src/locale/es.yml
rename to modules/route/front/src/locale/es.yml
diff --git a/client/route/src/module.js b/modules/route/front/src/module.js
similarity index 100%
rename from client/route/src/module.js
rename to modules/route/front/src/module.js
diff --git a/client/ticket/index.js b/modules/ticket/front/index.js
similarity index 100%
rename from client/ticket/index.js
rename to modules/ticket/front/index.js
diff --git a/client/ticket/routes.json b/modules/ticket/front/routes.json
similarity index 100%
rename from client/ticket/routes.json
rename to modules/ticket/front/routes.json
diff --git a/client/ticket/src/card/index.html b/modules/ticket/front/src/card/index.html
similarity index 100%
rename from client/ticket/src/card/index.html
rename to modules/ticket/front/src/card/index.html
diff --git a/client/ticket/src/card/index.js b/modules/ticket/front/src/card/index.js
similarity index 100%
rename from client/ticket/src/card/index.js
rename to modules/ticket/front/src/card/index.js
diff --git a/client/ticket/src/card/index.spec.js b/modules/ticket/front/src/card/index.spec.js
similarity index 73%
rename from client/ticket/src/card/index.spec.js
rename to modules/ticket/front/src/card/index.spec.js
index 799c4c16c..912815e5d 100644
--- a/client/ticket/src/card/index.spec.js
+++ b/modules/ticket/front/src/card/index.spec.js
@@ -2,22 +2,17 @@ import './index';
describe('Ticket', () => {
describe('Component vnTicketCard', () => {
- let $componentController;
let controller;
let $state;
let $httpBackend;
- beforeEach(() => {
- angular.mock.module('ticket');
- });
+ beforeEach(ngModule('ticket'));
- beforeEach(angular.mock.inject((_$componentController_, _$state_, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$state_, _$httpBackend_) => {
$state = _$state_;
$state.params.id = 1;
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
- controller = $componentController('vnTicketCard', {$state: $state});
+ controller = $componentController('vnTicketCard', {$state});
}));
describe('getCard()', () => {
diff --git a/client/ticket/src/component/index.html b/modules/ticket/front/src/component/index.html
similarity index 100%
rename from client/ticket/src/component/index.html
rename to modules/ticket/front/src/component/index.html
diff --git a/client/ticket/src/component/index.js b/modules/ticket/front/src/component/index.js
similarity index 100%
rename from client/ticket/src/component/index.js
rename to modules/ticket/front/src/component/index.js
diff --git a/client/ticket/src/component/index.spec.js b/modules/ticket/front/src/component/index.spec.js
similarity index 87%
rename from client/ticket/src/component/index.spec.js
rename to modules/ticket/front/src/component/index.spec.js
index 94f89d36d..6006fec55 100644
--- a/client/ticket/src/component/index.spec.js
+++ b/modules/ticket/front/src/component/index.spec.js
@@ -1,22 +1,15 @@
import './index.js';
-import {crudModel} from '../../../helpers/crudModelHelper';
+import crudModel from 'mocks/crud-model';
describe('ticket', () => {
describe('Component vnTicketComponents', () => {
- let $componentController;
- let $state;
- let $scope;
let controller;
- beforeEach(() => {
- angular.mock.module('ticket');
- });
+ beforeEach(ngModule('ticket'));
- beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$state_) => {
- $componentController = _$componentController_;
- $state = _$state_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope, $state) => {
$state.params.id = '1';
- $scope = $rootScope.$new();
+ let $scope = $rootScope.$new();
$scope.model = crudModel;
$scope.model.data = [{
components: [
diff --git a/client/ticket/src/component/style.scss b/modules/ticket/front/src/component/style.scss
similarity index 100%
rename from client/ticket/src/component/style.scss
rename to modules/ticket/front/src/component/style.scss
diff --git a/client/ticket/src/create/card.html b/modules/ticket/front/src/create/card.html
similarity index 100%
rename from client/ticket/src/create/card.html
rename to modules/ticket/front/src/create/card.html
diff --git a/client/ticket/src/create/card.js b/modules/ticket/front/src/create/card.js
similarity index 100%
rename from client/ticket/src/create/card.js
rename to modules/ticket/front/src/create/card.js
diff --git a/client/ticket/src/create/index.html b/modules/ticket/front/src/create/index.html
similarity index 100%
rename from client/ticket/src/create/index.html
rename to modules/ticket/front/src/create/index.html
diff --git a/client/ticket/src/create/index.js b/modules/ticket/front/src/create/index.js
similarity index 100%
rename from client/ticket/src/create/index.js
rename to modules/ticket/front/src/create/index.js
diff --git a/client/ticket/src/create/locale/es.yml b/modules/ticket/front/src/create/locale/es.yml
similarity index 100%
rename from client/ticket/src/create/locale/es.yml
rename to modules/ticket/front/src/create/locale/es.yml
diff --git a/client/ticket/src/data/index.html b/modules/ticket/front/src/data/index.html
similarity index 100%
rename from client/ticket/src/data/index.html
rename to modules/ticket/front/src/data/index.html
diff --git a/client/ticket/src/data/index.js b/modules/ticket/front/src/data/index.js
similarity index 100%
rename from client/ticket/src/data/index.js
rename to modules/ticket/front/src/data/index.js
diff --git a/client/ticket/src/data/step-one/index.html b/modules/ticket/front/src/data/step-one/index.html
similarity index 100%
rename from client/ticket/src/data/step-one/index.html
rename to modules/ticket/front/src/data/step-one/index.html
diff --git a/client/ticket/src/data/step-one/index.js b/modules/ticket/front/src/data/step-one/index.js
similarity index 100%
rename from client/ticket/src/data/step-one/index.js
rename to modules/ticket/front/src/data/step-one/index.js
diff --git a/client/ticket/src/data/step-one/index.spec.js b/modules/ticket/front/src/data/step-one/index.spec.js
similarity index 90%
rename from client/ticket/src/data/step-one/index.spec.js
rename to modules/ticket/front/src/data/step-one/index.spec.js
index 41c407625..f866a9022 100644
--- a/client/ticket/src/data/step-one/index.spec.js
+++ b/modules/ticket/front/src/data/step-one/index.spec.js
@@ -3,21 +3,16 @@ import {toJsonDate} from 'core/src/lib/date';
describe('Ticket', () => {
describe('Component vnTicketDataStepOne', () => {
- let $componentController;
let $state;
let controller;
let $httpBackend;
- beforeEach(() => {
- angular.mock.module('ticket');
- });
+ beforeEach(ngModule('ticket'));
- beforeEach(angular.mock.inject((_$componentController_, _$state_, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$state_, _$httpBackend_) => {
$state = _$state_;
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
- controller = $componentController('vnTicketDataStepOne', {$state: $state});
+ controller = $componentController('vnTicketDataStepOne', {$state});
}));
describe('ticket() setter', () => {
@@ -62,7 +57,7 @@ describe('Ticket', () => {
});
describe('onChangeShipped()', () => {
- it('should return an available landing date', async () => {
+ it('should return an available landing date', async() => {
let shipped = new Date();
controller._ticket = {
@@ -87,7 +82,7 @@ describe('Ticket', () => {
});
describe('onChangeLanded()', () => {
- it('should return an available shipment date', async () => {
+ it('should return an available shipment date', async() => {
let landed = new Date();
controller._ticket = {id: 1, landed: landed, addressFk: 121, agencyModeFk: 2};
let data = {landed: landed, addressFk: 121, agencyModeFk: 2};
@@ -116,7 +111,7 @@ describe('Ticket', () => {
});
describe('onStepChange()', () => {
- it('should call onStepChange method and return a NO_AGENCY_AVAILABLE signal error', async () => {
+ it('should call onStepChange method and return a NO_AGENCY_AVAILABLE signal error', async() => {
let landed = new Date();
landed.setHours(0, 0, 0, 0);
diff --git a/client/ticket/src/data/step-one/locale/es.yml b/modules/ticket/front/src/data/step-one/locale/es.yml
similarity index 100%
rename from client/ticket/src/data/step-one/locale/es.yml
rename to modules/ticket/front/src/data/step-one/locale/es.yml
diff --git a/client/ticket/src/data/step-three/index.html b/modules/ticket/front/src/data/step-three/index.html
similarity index 100%
rename from client/ticket/src/data/step-three/index.html
rename to modules/ticket/front/src/data/step-three/index.html
diff --git a/client/ticket/src/data/step-three/index.js b/modules/ticket/front/src/data/step-three/index.js
similarity index 100%
rename from client/ticket/src/data/step-three/index.js
rename to modules/ticket/front/src/data/step-three/index.js
diff --git a/client/ticket/src/data/step-three/index.spec.js b/modules/ticket/front/src/data/step-three/index.spec.js
similarity index 83%
rename from client/ticket/src/data/step-three/index.spec.js
rename to modules/ticket/front/src/data/step-three/index.spec.js
index 5b6628146..bb7f3430e 100644
--- a/client/ticket/src/data/step-three/index.spec.js
+++ b/modules/ticket/front/src/data/step-three/index.spec.js
@@ -3,25 +3,20 @@ import './index.js';
describe('ticket', () => {
describe('Component vnTicketDataStepThree', () => {
let now = Date.now();
- let $componentController;
let $state;
let controller;
let $httpBackend;
let vnApp;
- beforeEach(() => {
- angular.mock.module('ticket');
- });
+ beforeEach(ngModule('ticket'));
- beforeEach(angular.mock.inject((_$componentController_, _$state_, _$httpBackend_, _vnApp_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$state_, _$httpBackend_, _vnApp_) => {
$state = _$state_;
spyOn($state, 'go');
vnApp = _vnApp_;
spyOn(vnApp, 'showError');
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
- controller = $componentController('vnTicketDataStepThree', {$state: $state});
+ controller = $componentController('vnTicketDataStepThree', {$state});
}));
describe('onSubmit()', () => {
diff --git a/client/ticket/src/data/step-three/locale/es.yml b/modules/ticket/front/src/data/step-three/locale/es.yml
similarity index 100%
rename from client/ticket/src/data/step-three/locale/es.yml
rename to modules/ticket/front/src/data/step-three/locale/es.yml
diff --git a/client/ticket/src/data/step-two/index.html b/modules/ticket/front/src/data/step-two/index.html
similarity index 100%
rename from client/ticket/src/data/step-two/index.html
rename to modules/ticket/front/src/data/step-two/index.html
diff --git a/client/ticket/src/data/step-two/index.js b/modules/ticket/front/src/data/step-two/index.js
similarity index 100%
rename from client/ticket/src/data/step-two/index.js
rename to modules/ticket/front/src/data/step-two/index.js
diff --git a/client/ticket/src/data/step-two/locale/es.yml b/modules/ticket/front/src/data/step-two/locale/es.yml
similarity index 100%
rename from client/ticket/src/data/step-two/locale/es.yml
rename to modules/ticket/front/src/data/step-two/locale/es.yml
diff --git a/client/ticket/src/expedition/index.html b/modules/ticket/front/src/expedition/index.html
similarity index 100%
rename from client/ticket/src/expedition/index.html
rename to modules/ticket/front/src/expedition/index.html
diff --git a/client/ticket/src/expedition/index.js b/modules/ticket/front/src/expedition/index.js
similarity index 100%
rename from client/ticket/src/expedition/index.js
rename to modules/ticket/front/src/expedition/index.js
diff --git a/client/ticket/src/expedition/index.spec.js b/modules/ticket/front/src/expedition/index.spec.js
similarity index 72%
rename from client/ticket/src/expedition/index.spec.js
rename to modules/ticket/front/src/expedition/index.spec.js
index 6f1622852..c0e2db315 100644
--- a/client/ticket/src/expedition/index.spec.js
+++ b/modules/ticket/front/src/expedition/index.spec.js
@@ -2,26 +2,21 @@ import './index';
describe('Ticket', () => {
describe('Component vnTicketExpedition', () => {
- let $componentController;
let controller;
let $scope;
let $state;
let $httpBackend;
- beforeEach(() => {
- angular.mock.module('ticket');
- });
+ beforeEach(ngModule('ticket'));
- beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$state_, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, $rootScope, _$state_, _$httpBackend_) => {
$state = _$state_;
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
$scope = $rootScope.$new();
$scope.model = {
refresh: () => {}
};
- controller = $componentController('vnTicketExpedition', {$state: $state}, {$scope: $scope});
+ controller = $componentController('vnTicketExpedition', {$state, $scope});
}));
describe('returnDialog()', () => {
diff --git a/client/ticket/src/index/index.html b/modules/ticket/front/src/index/index.html
similarity index 100%
rename from client/ticket/src/index/index.html
rename to modules/ticket/front/src/index/index.html
diff --git a/client/ticket/src/index/index.js b/modules/ticket/front/src/index/index.js
similarity index 100%
rename from client/ticket/src/index/index.js
rename to modules/ticket/front/src/index/index.js
diff --git a/client/ticket/src/index/index.spec.js b/modules/ticket/front/src/index/index.spec.js
similarity index 100%
rename from client/ticket/src/index/index.spec.js
rename to modules/ticket/front/src/index/index.spec.js
diff --git a/client/ticket/src/index/locale/es.yml b/modules/ticket/front/src/index/locale/es.yml
similarity index 100%
rename from client/ticket/src/index/locale/es.yml
rename to modules/ticket/front/src/index/locale/es.yml
diff --git a/client/ticket/src/index/style.scss b/modules/ticket/front/src/index/style.scss
similarity index 100%
rename from client/ticket/src/index/style.scss
rename to modules/ticket/front/src/index/style.scss
diff --git a/client/ticket/src/locale/en.yml b/modules/ticket/front/src/locale/en.yml
similarity index 100%
rename from client/ticket/src/locale/en.yml
rename to modules/ticket/front/src/locale/en.yml
diff --git a/client/ticket/src/locale/es.yml b/modules/ticket/front/src/locale/es.yml
similarity index 100%
rename from client/ticket/src/locale/es.yml
rename to modules/ticket/front/src/locale/es.yml
diff --git a/client/ticket/src/log/index.html b/modules/ticket/front/src/log/index.html
similarity index 100%
rename from client/ticket/src/log/index.html
rename to modules/ticket/front/src/log/index.html
diff --git a/client/ticket/src/log/index.js b/modules/ticket/front/src/log/index.js
similarity index 100%
rename from client/ticket/src/log/index.js
rename to modules/ticket/front/src/log/index.js
diff --git a/client/ticket/src/log/index.spec.js b/modules/ticket/front/src/log/index.spec.js
similarity index 95%
rename from client/ticket/src/log/index.spec.js
rename to modules/ticket/front/src/log/index.spec.js
index 33e1381dc..ef4c72ef6 100644
--- a/client/ticket/src/log/index.spec.js
+++ b/modules/ticket/front/src/log/index.spec.js
@@ -6,9 +6,7 @@ describe('Ticket', () => {
let $scope;
let controller;
- beforeEach(() => {
- ngModule('ticket');
- });
+ beforeEach(ngModule('ticket'));
beforeEach(angular.mock.inject((_$componentController_, $rootScope) => {
$componentController = _$componentController_;
diff --git a/client/ticket/src/module.js b/modules/ticket/front/src/module.js
similarity index 100%
rename from client/ticket/src/module.js
rename to modules/ticket/front/src/module.js
diff --git a/client/ticket/src/note/index.html b/modules/ticket/front/src/note/index.html
similarity index 100%
rename from client/ticket/src/note/index.html
rename to modules/ticket/front/src/note/index.html
diff --git a/client/ticket/src/note/index.js b/modules/ticket/front/src/note/index.js
similarity index 100%
rename from client/ticket/src/note/index.js
rename to modules/ticket/front/src/note/index.js
diff --git a/client/ticket/src/package/index.html b/modules/ticket/front/src/package/index.html
similarity index 100%
rename from client/ticket/src/package/index.html
rename to modules/ticket/front/src/package/index.html
diff --git a/client/ticket/src/package/index.js b/modules/ticket/front/src/package/index.js
similarity index 100%
rename from client/ticket/src/package/index.js
rename to modules/ticket/front/src/package/index.js
diff --git a/client/ticket/src/package/locale/es.yml b/modules/ticket/front/src/package/locale/es.yml
similarity index 100%
rename from client/ticket/src/package/locale/es.yml
rename to modules/ticket/front/src/package/locale/es.yml
diff --git a/client/ticket/src/picture/index.html b/modules/ticket/front/src/picture/index.html
similarity index 100%
rename from client/ticket/src/picture/index.html
rename to modules/ticket/front/src/picture/index.html
diff --git a/client/ticket/src/picture/index.js b/modules/ticket/front/src/picture/index.js
similarity index 100%
rename from client/ticket/src/picture/index.js
rename to modules/ticket/front/src/picture/index.js
diff --git a/client/ticket/src/request/create/index.html b/modules/ticket/front/src/request/create/index.html
similarity index 100%
rename from client/ticket/src/request/create/index.html
rename to modules/ticket/front/src/request/create/index.html
diff --git a/client/ticket/src/request/create/index.js b/modules/ticket/front/src/request/create/index.js
similarity index 100%
rename from client/ticket/src/request/create/index.js
rename to modules/ticket/front/src/request/create/index.js
diff --git a/client/ticket/src/request/create/locale/es.yml b/modules/ticket/front/src/request/create/locale/es.yml
similarity index 100%
rename from client/ticket/src/request/create/locale/es.yml
rename to modules/ticket/front/src/request/create/locale/es.yml
diff --git a/client/ticket/src/request/create/style.scss b/modules/ticket/front/src/request/create/style.scss
similarity index 100%
rename from client/ticket/src/request/create/style.scss
rename to modules/ticket/front/src/request/create/style.scss
diff --git a/client/ticket/src/request/index/index.html b/modules/ticket/front/src/request/index/index.html
similarity index 100%
rename from client/ticket/src/request/index/index.html
rename to modules/ticket/front/src/request/index/index.html
diff --git a/client/ticket/src/request/index/index.js b/modules/ticket/front/src/request/index/index.js
similarity index 100%
rename from client/ticket/src/request/index/index.js
rename to modules/ticket/front/src/request/index/index.js
diff --git a/client/ticket/src/request/index/locale/es.yml b/modules/ticket/front/src/request/index/locale/es.yml
similarity index 100%
rename from client/ticket/src/request/index/locale/es.yml
rename to modules/ticket/front/src/request/index/locale/es.yml
diff --git a/client/ticket/src/sale-checked/index.html b/modules/ticket/front/src/sale-checked/index.html
similarity index 100%
rename from client/ticket/src/sale-checked/index.html
rename to modules/ticket/front/src/sale-checked/index.html
diff --git a/client/ticket/src/sale-checked/index.js b/modules/ticket/front/src/sale-checked/index.js
similarity index 100%
rename from client/ticket/src/sale-checked/index.js
rename to modules/ticket/front/src/sale-checked/index.js
diff --git a/client/ticket/src/sale-tracking/index.html b/modules/ticket/front/src/sale-tracking/index.html
similarity index 100%
rename from client/ticket/src/sale-tracking/index.html
rename to modules/ticket/front/src/sale-tracking/index.html
diff --git a/client/ticket/src/sale-tracking/index.js b/modules/ticket/front/src/sale-tracking/index.js
similarity index 100%
rename from client/ticket/src/sale-tracking/index.js
rename to modules/ticket/front/src/sale-tracking/index.js
diff --git a/client/ticket/src/sale-tracking/style.scss b/modules/ticket/front/src/sale-tracking/style.scss
similarity index 100%
rename from client/ticket/src/sale-tracking/style.scss
rename to modules/ticket/front/src/sale-tracking/style.scss
diff --git a/client/ticket/src/sale/editDiscount.html b/modules/ticket/front/src/sale/editDiscount.html
similarity index 100%
rename from client/ticket/src/sale/editDiscount.html
rename to modules/ticket/front/src/sale/editDiscount.html
diff --git a/client/ticket/src/sale/editDiscount.js b/modules/ticket/front/src/sale/editDiscount.js
similarity index 100%
rename from client/ticket/src/sale/editDiscount.js
rename to modules/ticket/front/src/sale/editDiscount.js
diff --git a/client/ticket/src/sale/editDiscount.spec.js b/modules/ticket/front/src/sale/editDiscount.spec.js
similarity index 85%
rename from client/ticket/src/sale/editDiscount.spec.js
rename to modules/ticket/front/src/sale/editDiscount.spec.js
index b904c78d4..70ca327f8 100644
--- a/client/ticket/src/sale/editDiscount.spec.js
+++ b/modules/ticket/front/src/sale/editDiscount.spec.js
@@ -2,20 +2,15 @@ import './editDiscount.js';
describe('Ticket', () => {
describe('Component vnTicketSaleEditDiscount', () => {
- let $componentController;
let controller;
let $httpBackend;
let $state;
let $scope;
- beforeEach(() => {
- angular.mock.module('ticket');
- });
+ beforeEach(ngModule('ticket'));
- beforeEach(angular.mock.inject((_$componentController_, _$state_, _$httpBackend_, $rootScope) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$state_, _$httpBackend_, $rootScope) => {
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
$scope = $rootScope.$new();
$scope.index = {model: {instances: [{id: 1}, {id: 2}]}, accept: () => {
return {
@@ -24,7 +19,7 @@ describe('Ticket', () => {
}};
$state = _$state_;
$state.params.id = 1;
- controller = $componentController('vnTicketSaleEditDiscount', {$scope: $scope, $state: $state});
+ controller = $componentController('vnTicketSaleEditDiscount', {$scope, $state});
controller._edit = [{id: 3, discount: 15}];
controller.hide = () => {};
}));
@@ -71,7 +66,7 @@ describe('Ticket', () => {
it('should call vnApp.showError if the discount value hasnt has been modified and the bulk value is false', () => {
controller.bulk = false;
- spyOn(controller.vnApp, "showError");
+ spyOn(controller.vnApp, 'showError');
controller.updateDiscount();
expect(controller.vnApp.showError).toHaveBeenCalledWith('There is no changes to save');
diff --git a/client/ticket/src/sale/index.html b/modules/ticket/front/src/sale/index.html
similarity index 100%
rename from client/ticket/src/sale/index.html
rename to modules/ticket/front/src/sale/index.html
diff --git a/client/ticket/src/sale/index.js b/modules/ticket/front/src/sale/index.js
similarity index 100%
rename from client/ticket/src/sale/index.js
rename to modules/ticket/front/src/sale/index.js
diff --git a/client/ticket/src/sale/index.spec.js b/modules/ticket/front/src/sale/index.spec.js
similarity index 100%
rename from client/ticket/src/sale/index.spec.js
rename to modules/ticket/front/src/sale/index.spec.js
diff --git a/client/ticket/src/sale/locale/es.yml b/modules/ticket/front/src/sale/locale/es.yml
similarity index 100%
rename from client/ticket/src/sale/locale/es.yml
rename to modules/ticket/front/src/sale/locale/es.yml
diff --git a/client/ticket/src/sale/style.scss b/modules/ticket/front/src/sale/style.scss
similarity index 100%
rename from client/ticket/src/sale/style.scss
rename to modules/ticket/front/src/sale/style.scss
diff --git a/client/ticket/src/search-panel/index.html b/modules/ticket/front/src/search-panel/index.html
similarity index 100%
rename from client/ticket/src/search-panel/index.html
rename to modules/ticket/front/src/search-panel/index.html
diff --git a/client/ticket/src/search-panel/index.js b/modules/ticket/front/src/search-panel/index.js
similarity index 100%
rename from client/ticket/src/search-panel/index.js
rename to modules/ticket/front/src/search-panel/index.js
diff --git a/client/ticket/src/search-panel/locale/es.yml b/modules/ticket/front/src/search-panel/locale/es.yml
similarity index 100%
rename from client/ticket/src/search-panel/locale/es.yml
rename to modules/ticket/front/src/search-panel/locale/es.yml
diff --git a/client/ticket/src/services/index.html b/modules/ticket/front/src/services/index.html
similarity index 100%
rename from client/ticket/src/services/index.html
rename to modules/ticket/front/src/services/index.html
diff --git a/client/ticket/src/services/index.js b/modules/ticket/front/src/services/index.js
similarity index 100%
rename from client/ticket/src/services/index.js
rename to modules/ticket/front/src/services/index.js
diff --git a/client/ticket/src/services/locale/es.yml b/modules/ticket/front/src/services/locale/es.yml
similarity index 100%
rename from client/ticket/src/services/locale/es.yml
rename to modules/ticket/front/src/services/locale/es.yml
diff --git a/client/ticket/src/summary/index.html b/modules/ticket/front/src/summary/index.html
similarity index 100%
rename from client/ticket/src/summary/index.html
rename to modules/ticket/front/src/summary/index.html
diff --git a/client/ticket/src/summary/index.js b/modules/ticket/front/src/summary/index.js
similarity index 100%
rename from client/ticket/src/summary/index.js
rename to modules/ticket/front/src/summary/index.js
diff --git a/client/ticket/src/summary/index.spec.js b/modules/ticket/front/src/summary/index.spec.js
similarity index 81%
rename from client/ticket/src/summary/index.spec.js
rename to modules/ticket/front/src/summary/index.spec.js
index 74a351927..d11413252 100644
--- a/client/ticket/src/summary/index.spec.js
+++ b/modules/ticket/front/src/summary/index.spec.js
@@ -2,18 +2,13 @@ import './index';
describe('Ticket', () => {
describe('Component vnTicketSummary', () => {
- let $componentController;
let controller;
let $httpBackend;
- beforeEach(() => {
- angular.mock.module('ticket');
- });
+ beforeEach(ngModule('ticket'));
- beforeEach(angular.mock.inject((_$componentController_, _$httpBackend_) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$httpBackend_) => {
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
controller = $componentController('vnTicketSummary');
controller.ticket = {id: 1};
}));
diff --git a/client/ticket/src/summary/style.scss b/modules/ticket/front/src/summary/style.scss
similarity index 100%
rename from client/ticket/src/summary/style.scss
rename to modules/ticket/front/src/summary/style.scss
diff --git a/client/ticket/src/ticket.js b/modules/ticket/front/src/ticket.js
similarity index 100%
rename from client/ticket/src/ticket.js
rename to modules/ticket/front/src/ticket.js
diff --git a/client/ticket/src/tracking/edit/index.html b/modules/ticket/front/src/tracking/edit/index.html
similarity index 100%
rename from client/ticket/src/tracking/edit/index.html
rename to modules/ticket/front/src/tracking/edit/index.html
diff --git a/client/ticket/src/tracking/edit/index.js b/modules/ticket/front/src/tracking/edit/index.js
similarity index 100%
rename from client/ticket/src/tracking/edit/index.js
rename to modules/ticket/front/src/tracking/edit/index.js
diff --git a/client/ticket/src/tracking/index/index.html b/modules/ticket/front/src/tracking/index/index.html
similarity index 100%
rename from client/ticket/src/tracking/index/index.html
rename to modules/ticket/front/src/tracking/index/index.html
diff --git a/client/ticket/src/tracking/index/index.js b/modules/ticket/front/src/tracking/index/index.js
similarity index 100%
rename from client/ticket/src/tracking/index/index.js
rename to modules/ticket/front/src/tracking/index/index.js
diff --git a/client/ticket/src/volume/index.html b/modules/ticket/front/src/volume/index.html
similarity index 100%
rename from client/ticket/src/volume/index.html
rename to modules/ticket/front/src/volume/index.html
diff --git a/client/ticket/src/volume/index.js b/modules/ticket/front/src/volume/index.js
similarity index 100%
rename from client/ticket/src/volume/index.js
rename to modules/ticket/front/src/volume/index.js
diff --git a/client/ticket/src/volume/index.spec.js b/modules/ticket/front/src/volume/index.spec.js
similarity index 72%
rename from client/ticket/src/volume/index.spec.js
rename to modules/ticket/front/src/volume/index.spec.js
index 2addf77d7..66206895f 100644
--- a/client/ticket/src/volume/index.spec.js
+++ b/modules/ticket/front/src/volume/index.spec.js
@@ -2,20 +2,15 @@ import './index';
describe('ticket', () => {
describe('Component vnTicketVolume', () => {
- let $componentController;
let controller;
let $httpBackend;
let $state;
let $scope;
- beforeEach(() => {
- angular.mock.module('ticket');
- });
+ beforeEach(ngModule('ticket'));
- beforeEach(angular.mock.inject((_$componentController_, _$state_, _$httpBackend_, $rootScope) => {
- $componentController = _$componentController_;
+ beforeEach(angular.mock.inject(($componentController, _$state_, _$httpBackend_, $rootScope) => {
$httpBackend = _$httpBackend_;
- $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
$scope = $rootScope.$new();
$scope.model = {data: [{id: 1}, {id: 2}], accept: () => {
return {
@@ -24,7 +19,7 @@ describe('ticket', () => {
}};
$state = _$state_;
$state.params.id = 101;
- controller = $componentController('vnTicketVolume', {$scope: $scope}, {$httpBackend: $httpBackend}, {$state: $state});
+ controller = $componentController('vnTicketVolume', {$scope, $httpBackend, $state});
}));
it('should join the sale volumes to its respective sale', () => {
diff --git a/client/ticket/src/volume/style.scss b/modules/ticket/front/src/volume/style.scss
similarity index 100%
rename from client/ticket/src/volume/style.scss
rename to modules/ticket/front/src/volume/style.scss
diff --git a/client/ticket/src/weekly/index.html b/modules/ticket/front/src/weekly/index.html
similarity index 100%
rename from client/ticket/src/weekly/index.html
rename to modules/ticket/front/src/weekly/index.html
diff --git a/client/ticket/src/weekly/index.js b/modules/ticket/front/src/weekly/index.js
similarity index 100%
rename from client/ticket/src/weekly/index.js
rename to modules/ticket/front/src/weekly/index.js
diff --git a/client/ticket/src/weekly/locale/es.yml b/modules/ticket/front/src/weekly/locale/es.yml
similarity index 100%
rename from client/ticket/src/weekly/locale/es.yml
rename to modules/ticket/front/src/weekly/locale/es.yml
diff --git a/client/ticket/src/weekly/style.scss b/modules/ticket/front/src/weekly/style.scss
similarity index 100%
rename from client/ticket/src/weekly/style.scss
rename to modules/ticket/front/src/weekly/style.scss
diff --git a/client/travel/index.js b/modules/travel/front/index.js
similarity index 100%
rename from client/travel/index.js
rename to modules/travel/front/index.js
diff --git a/client/travel/routes.json b/modules/travel/front/routes.json
similarity index 100%
rename from client/travel/routes.json
rename to modules/travel/front/routes.json
diff --git a/client/travel/src/index.js b/modules/travel/front/src/index.js
similarity index 100%
rename from client/travel/src/index.js
rename to modules/travel/front/src/index.js
diff --git a/client/travel/src/index/index.html b/modules/travel/front/src/index/index.html
similarity index 100%
rename from client/travel/src/index/index.html
rename to modules/travel/front/src/index/index.html
diff --git a/client/travel/src/index/index.js b/modules/travel/front/src/index/index.js
similarity index 100%
rename from client/travel/src/index/index.js
rename to modules/travel/front/src/index/index.js
diff --git a/client/travel/src/locale/es.yml b/modules/travel/front/src/locale/es.yml
similarity index 100%
rename from client/travel/src/locale/es.yml
rename to modules/travel/front/src/locale/es.yml
diff --git a/client/travel/src/module.js b/modules/travel/front/src/module.js
similarity index 100%
rename from client/travel/src/module.js
rename to modules/travel/front/src/module.js
diff --git a/client/travel/src/search-panel/index.html b/modules/travel/front/src/search-panel/index.html
similarity index 100%
rename from client/travel/src/search-panel/index.html
rename to modules/travel/front/src/search-panel/index.html
diff --git a/client/travel/src/search-panel/index.js b/modules/travel/front/src/search-panel/index.js
similarity index 100%
rename from client/travel/src/search-panel/index.js
rename to modules/travel/front/src/search-panel/index.js
diff --git a/client/travel/src/search-panel/locale/es.yml b/modules/travel/front/src/search-panel/locale/es.yml
similarity index 100%
rename from client/travel/src/search-panel/locale/es.yml
rename to modules/travel/front/src/search-panel/locale/es.yml
diff --git a/services_tests.js b/services_tests.js
index bf06df426..9487197e3 100644
--- a/services_tests.js
+++ b/services_tests.js
@@ -23,8 +23,10 @@ let serviceSpecs = [
];
let services = require(`./services/services.yml`);
-for (let service of services)
- serviceSpecs.push(`modules/${service}/**/*[sS]pec.js`);
+for (let service of services) {
+ serviceSpecs.push(`modules/${service}/models/**/*[sS]pec.js`);
+ serviceSpecs.push(`modules/${service}/methods/**/*[sS]pec.js`);
+}
jasmine.loadConfig({
spec_dir: '.',
diff --git a/webpack.config.js b/webpack.config.js
index 90278126d..f8084ef63 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -44,7 +44,7 @@ let baseConfig = {
loader: 'sass-loader',
options: {
includePaths: [
- path.resolve(__dirname, 'client/salix/src/styles')
+ path.resolve(__dirname, 'front/salix/src/styles')
]
}
}
@@ -63,8 +63,9 @@ let baseConfig = {
},
resolve: {
modules: [
- `${__dirname}/client`,
- 'client/node_modules',
+ `${__dirname}/front`,
+ `${__dirname}/modules`,
+ 'front/node_modules',
'node_modules'
],
alias: {