diff --git a/Dockerfile b/Dockerfile index 471dd914b..a89ae9307 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,16 @@ -FROM node:8-slim +FROM vn-node -COPY . /salix -COPY dist/webpack-assets.json /salix/client/ - -RUN npm -g install pm2 +RUN mkdir /salix WORKDIR /salix + +COPY dist . +COPY modules . +#COPY node_modules . +COPY loopback . +COPY dist/webpack-assets.json loopback/client + +RUN rm /etc/nginx/sites-enabled/default +COPY services/nginx/temp/nginx.conf /etc/nginx/sites-available/salix +RUN ln -s /etc/nginx/sites-available/salix /etc/nginx/sites-enabled/salix + CMD ["pm2-docker", "./server/server.js"] diff --git a/Jenkinsfile b/Jenkinsfile index 35cd17724..a52aab47e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,7 +33,7 @@ node { } stage ('Generating new dockers') { - sh "docker build -t vn-loopback:latest ./services/loopback/" + sh "docker build -t vn-loopback:latest ./loopback/" sh "docker-compose up -d --build" sh "docker image prune -f" } diff --git a/modules/salix/methods/message/send.js b/back/methods/message/send.js similarity index 100% rename from modules/salix/methods/message/send.js rename to back/methods/message/send.js diff --git a/modules/salix/methods/message/specs/send.spec.js b/back/methods/message/specs/send.spec.js similarity index 100% rename from modules/salix/methods/message/specs/send.spec.js rename to back/methods/message/specs/send.spec.js diff --git a/modules/salix/methods/user-config/getUserConfig.js b/back/methods/user-config/getUserConfig.js similarity index 100% rename from modules/salix/methods/user-config/getUserConfig.js rename to back/methods/user-config/getUserConfig.js diff --git a/modules/salix/methods/user-config/setUserConfig.js b/back/methods/user-config/setUserConfig.js similarity index 100% rename from modules/salix/methods/user-config/setUserConfig.js rename to back/methods/user-config/setUserConfig.js diff --git a/modules/salix/methods/user-config/specs/getUserConfig.spec.js b/back/methods/user-config/specs/getUserConfig.spec.js similarity index 100% rename from modules/salix/methods/user-config/specs/getUserConfig.spec.js rename to back/methods/user-config/specs/getUserConfig.spec.js diff --git a/modules/salix/methods/worker-mana/getCurrentWorkerMana.js b/back/methods/worker-mana/getCurrentWorkerMana.js similarity index 100% rename from modules/salix/methods/worker-mana/getCurrentWorkerMana.js rename to back/methods/worker-mana/getCurrentWorkerMana.js diff --git a/modules/salix/methods/worker-mana/specs/getCurrentWorkerMana.spec.js b/back/methods/worker-mana/specs/getCurrentWorkerMana.spec.js similarity index 100% rename from modules/salix/methods/worker-mana/specs/getCurrentWorkerMana.spec.js rename to back/methods/worker-mana/specs/getCurrentWorkerMana.spec.js diff --git a/modules/salix/model-config.json b/back/model-config.json similarity index 100% rename from modules/salix/model-config.json rename to back/model-config.json diff --git a/modules/salix/models/account.js b/back/models/account.js similarity index 100% rename from modules/salix/models/account.js rename to back/models/account.js diff --git a/modules/salix/models/account.json b/back/models/account.json similarity index 100% rename from modules/salix/models/account.json rename to back/models/account.json diff --git a/modules/salix/models/bank.json b/back/models/bank.json similarity index 100% rename from modules/salix/models/bank.json rename to back/models/bank.json diff --git a/modules/salix/models/company.json b/back/models/company.json similarity index 100% rename from modules/salix/models/company.json rename to back/models/company.json diff --git a/modules/salix/models/country.json b/back/models/country.json similarity index 100% rename from modules/salix/models/country.json rename to back/models/country.json diff --git a/modules/salix/models/message-inbox.json b/back/models/message-inbox.json similarity index 100% rename from modules/salix/models/message-inbox.json rename to back/models/message-inbox.json diff --git a/modules/salix/models/message.js b/back/models/message.js similarity index 100% rename from modules/salix/models/message.js rename to back/models/message.js diff --git a/modules/salix/models/message.json b/back/models/message.json similarity index 100% rename from modules/salix/models/message.json rename to back/models/message.json diff --git a/modules/salix/models/province.json b/back/models/province.json similarity index 100% rename from modules/salix/models/province.json rename to back/models/province.json diff --git a/modules/salix/models/specs/account.spec.js b/back/models/specs/account.spec.js similarity index 100% rename from modules/salix/models/specs/account.spec.js rename to back/models/specs/account.spec.js diff --git a/modules/salix/models/user-config.js b/back/models/user-config.js similarity index 100% rename from modules/salix/models/user-config.js rename to back/models/user-config.js diff --git a/modules/salix/models/user-config.json b/back/models/user-config.json similarity index 100% rename from modules/salix/models/user-config.json rename to back/models/user-config.json diff --git a/modules/salix/models/user.json b/back/models/user.json similarity index 100% rename from modules/salix/models/user.json rename to back/models/user.json diff --git a/modules/salix/models/warehouse.json b/back/models/warehouse.json similarity index 100% rename from modules/salix/models/warehouse.json rename to back/models/warehouse.json diff --git a/modules/salix/models/worker-mana.js b/back/models/worker-mana.js similarity index 100% rename from modules/salix/models/worker-mana.js rename to back/models/worker-mana.js diff --git a/modules/salix/models/worker-mana.json b/back/models/worker-mana.json similarity index 100% rename from modules/salix/models/worker-mana.json rename to back/models/worker-mana.json diff --git a/modules/salix/models/worker-team-collegues.json b/back/models/worker-team-collegues.json similarity index 100% rename from modules/salix/models/worker-team-collegues.json rename to back/models/worker-team-collegues.json diff --git a/modules/salix/models/worker-team.json b/back/models/worker-team.json similarity index 100% rename from modules/salix/models/worker-team.json rename to back/models/worker-team.json diff --git a/modules/salix/models/worker.json b/back/models/worker.json similarity index 100% rename from modules/salix/models/worker.json rename to back/models/worker.json diff --git a/front/auth/auth.ejs b/front/auth/auth.ejs new file mode 100644 index 000000000..2ed12bc08 --- /dev/null +++ b/front/auth/auth.ejs @@ -0,0 +1,11 @@ + + + + + Salix + + + + + + diff --git a/front/auth/index.js b/front/auth/index.js index 2bd8c57de..d15aa496a 100644 --- a/front/auth/index.js +++ b/front/auth/index.js @@ -1 +1,2 @@ -export * from './src/auth'; +import './module'; +import './login/login'; diff --git a/front/auth/src/login/locale/en.yml b/front/auth/login/locale/en.yml similarity index 100% rename from front/auth/src/login/locale/en.yml rename to front/auth/login/locale/en.yml diff --git a/front/auth/src/login/locale/es.yml b/front/auth/login/locale/es.yml similarity index 100% rename from front/auth/src/login/locale/es.yml rename to front/auth/login/locale/es.yml diff --git a/front/auth/src/login/login.html b/front/auth/login/login.html similarity index 100% rename from front/auth/src/login/login.html rename to front/auth/login/login.html diff --git a/front/auth/src/login/login.js b/front/auth/login/login.js similarity index 100% rename from front/auth/src/login/login.js rename to front/auth/login/login.js diff --git a/front/auth/src/login/logo.svg b/front/auth/login/logo.svg similarity index 100% rename from front/auth/src/login/logo.svg rename to front/auth/login/logo.svg diff --git a/front/auth/src/login/style.scss b/front/auth/login/style.scss similarity index 100% rename from front/auth/src/login/style.scss rename to front/auth/login/style.scss diff --git a/front/auth/src/module.js b/front/auth/module.js similarity index 93% rename from front/auth/src/module.js rename to front/auth/module.js index 8339bc998..ff38fa5f1 100644 --- a/front/auth/src/module.js +++ b/front/auth/module.js @@ -1,4 +1,4 @@ -import {ng} from 'vendor'; +import {ng} from 'core/vendor'; import 'core'; let ngModule = ng.module('vnAuth', ['vnCore']); diff --git a/front/auth/src/auth.js b/front/auth/src/auth.js deleted file mode 100644 index d15aa496a..000000000 --- a/front/auth/src/auth.js +++ /dev/null @@ -1,2 +0,0 @@ -import './module'; -import './login/login'; diff --git a/front/core/src/components/array-model/array-model.js b/front/core/components/array-model/array-model.js similarity index 100% rename from front/core/src/components/array-model/array-model.js rename to front/core/components/array-model/array-model.js diff --git a/front/core/src/components/autocomplete/autocomplete.html b/front/core/components/autocomplete/autocomplete.html similarity index 100% rename from front/core/src/components/autocomplete/autocomplete.html rename to front/core/components/autocomplete/autocomplete.html diff --git a/front/core/src/components/autocomplete/autocomplete.js b/front/core/components/autocomplete/autocomplete.js similarity index 100% rename from front/core/src/components/autocomplete/autocomplete.js rename to front/core/components/autocomplete/autocomplete.js diff --git a/front/core/src/components/autocomplete/autocomplete.spec.js b/front/core/components/autocomplete/autocomplete.spec.js similarity index 100% rename from front/core/src/components/autocomplete/autocomplete.spec.js rename to front/core/components/autocomplete/autocomplete.spec.js diff --git a/front/core/src/components/autocomplete/style.scss b/front/core/components/autocomplete/style.scss similarity index 100% rename from front/core/src/components/autocomplete/style.scss rename to front/core/components/autocomplete/style.scss diff --git a/front/core/src/components/button-menu/button-menu.html b/front/core/components/button-menu/button-menu.html similarity index 100% rename from front/core/src/components/button-menu/button-menu.html rename to front/core/components/button-menu/button-menu.html diff --git a/front/core/src/components/button-menu/button-menu.js b/front/core/components/button-menu/button-menu.js similarity index 100% rename from front/core/src/components/button-menu/button-menu.js rename to front/core/components/button-menu/button-menu.js diff --git a/front/core/src/components/button-menu/button-menu.spec.js b/front/core/components/button-menu/button-menu.spec.js similarity index 100% rename from front/core/src/components/button-menu/button-menu.spec.js rename to front/core/components/button-menu/button-menu.spec.js diff --git a/front/core/src/components/button-menu/style.scss b/front/core/components/button-menu/style.scss similarity index 100% rename from front/core/src/components/button-menu/style.scss rename to front/core/components/button-menu/style.scss diff --git a/front/core/src/components/button/button.html b/front/core/components/button/button.html similarity index 100% rename from front/core/src/components/button/button.html rename to front/core/components/button/button.html diff --git a/front/core/src/components/button/button.js b/front/core/components/button/button.js similarity index 100% rename from front/core/src/components/button/button.js rename to front/core/components/button/button.js diff --git a/front/core/src/components/button/style.scss b/front/core/components/button/style.scss similarity index 100% rename from front/core/src/components/button/style.scss rename to front/core/components/button/style.scss diff --git a/front/core/src/components/calendar/index.html b/front/core/components/calendar/index.html similarity index 100% rename from front/core/src/components/calendar/index.html rename to front/core/components/calendar/index.html diff --git a/front/core/src/components/calendar/index.js b/front/core/components/calendar/index.js similarity index 100% rename from front/core/src/components/calendar/index.js rename to front/core/components/calendar/index.js diff --git a/front/core/src/components/calendar/style.scss b/front/core/components/calendar/style.scss similarity index 100% rename from front/core/src/components/calendar/style.scss rename to front/core/components/calendar/style.scss diff --git a/front/core/src/components/card/card.html b/front/core/components/card/card.html similarity index 100% rename from front/core/src/components/card/card.html rename to front/core/components/card/card.html diff --git a/front/core/src/components/card/card.js b/front/core/components/card/card.js similarity index 100% rename from front/core/src/components/card/card.js rename to front/core/components/card/card.js diff --git a/front/core/src/components/card/style.scss b/front/core/components/card/style.scss similarity index 100% rename from front/core/src/components/card/style.scss rename to front/core/components/card/style.scss diff --git a/front/core/src/components/check/check.html b/front/core/components/check/check.html similarity index 100% rename from front/core/src/components/check/check.html rename to front/core/components/check/check.html diff --git a/front/core/src/components/check/check.js b/front/core/components/check/check.js similarity index 100% rename from front/core/src/components/check/check.js rename to front/core/components/check/check.js diff --git a/front/core/src/components/check/style.scss b/front/core/components/check/style.scss similarity index 100% rename from front/core/src/components/check/style.scss rename to front/core/components/check/style.scss diff --git a/front/core/src/components/chip/index.html b/front/core/components/chip/index.html similarity index 100% rename from front/core/src/components/chip/index.html rename to front/core/components/chip/index.html diff --git a/front/core/src/components/chip/index.js b/front/core/components/chip/index.js similarity index 100% rename from front/core/src/components/chip/index.js rename to front/core/components/chip/index.js diff --git a/front/core/src/components/chip/index.spec.js b/front/core/components/chip/index.spec.js similarity index 100% rename from front/core/src/components/chip/index.spec.js rename to front/core/components/chip/index.spec.js diff --git a/front/core/src/components/chip/style.scss b/front/core/components/chip/style.scss similarity index 100% rename from front/core/src/components/chip/style.scss rename to front/core/components/chip/style.scss diff --git a/front/core/src/components/combo/combo.html b/front/core/components/combo/combo.html similarity index 100% rename from front/core/src/components/combo/combo.html rename to front/core/components/combo/combo.html diff --git a/front/core/src/components/combo/combo.js b/front/core/components/combo/combo.js similarity index 100% rename from front/core/src/components/combo/combo.js rename to front/core/components/combo/combo.js diff --git a/front/core/src/components/confirm/confirm.html b/front/core/components/confirm/confirm.html similarity index 100% rename from front/core/src/components/confirm/confirm.html rename to front/core/components/confirm/confirm.html diff --git a/front/core/src/components/confirm/confirm.js b/front/core/components/confirm/confirm.js similarity index 100% rename from front/core/src/components/confirm/confirm.js rename to front/core/components/confirm/confirm.js diff --git a/front/core/src/components/crud-model/crud-model.js b/front/core/components/crud-model/crud-model.js similarity index 98% rename from front/core/src/components/crud-model/crud-model.js rename to front/core/components/crud-model/crud-model.js index 5a0f8d5d2..9d07e01ba 100644 --- a/front/core/src/components/crud-model/crud-model.js +++ b/front/core/components/crud-model/crud-model.js @@ -1,6 +1,6 @@ import ngModule from '../../module'; import ModelProxy from '../model-proxy/model-proxy'; -import {mergeWhere, mergeFilters} from 'vn-loopback/common/filter.js'; +import {mergeWhere, mergeFilters} from 'vn-loopback/util/filter'; /** * Model that uses remote loopback model as datasource. diff --git a/front/core/src/components/date-picker/date-picker.html b/front/core/components/date-picker/date-picker.html similarity index 100% rename from front/core/src/components/date-picker/date-picker.html rename to front/core/components/date-picker/date-picker.html diff --git a/front/core/src/components/date-picker/date-picker.js b/front/core/components/date-picker/date-picker.js similarity index 98% rename from front/core/src/components/date-picker/date-picker.js rename to front/core/components/date-picker/date-picker.js index d4b1bf25c..aa8c02886 100644 --- a/front/core/src/components/date-picker/date-picker.js +++ b/front/core/components/date-picker/date-picker.js @@ -1,6 +1,6 @@ import ngModule from '../../module'; import Component from '../../lib/component'; -import Flatpickr from 'vendor/src/flatpickr'; +import {Flatpickr} from '../../vendor'; import './style.scss'; class DatePicker extends Component { diff --git a/front/core/src/components/date-picker/style.scss b/front/core/components/date-picker/style.scss similarity index 100% rename from front/core/src/components/date-picker/style.scss rename to front/core/components/date-picker/style.scss diff --git a/front/core/src/components/dialog/dialog.html b/front/core/components/dialog/dialog.html similarity index 100% rename from front/core/src/components/dialog/dialog.html rename to front/core/components/dialog/dialog.html diff --git a/front/core/src/components/dialog/dialog.js b/front/core/components/dialog/dialog.js similarity index 100% rename from front/core/src/components/dialog/dialog.js rename to front/core/components/dialog/dialog.js diff --git a/front/core/src/components/dialog/dialog.spec.js b/front/core/components/dialog/dialog.spec.js similarity index 100% rename from front/core/src/components/dialog/dialog.spec.js rename to front/core/components/dialog/dialog.spec.js diff --git a/front/core/src/components/dialog/style.scss b/front/core/components/dialog/style.scss similarity index 100% rename from front/core/src/components/dialog/style.scss rename to front/core/components/dialog/style.scss diff --git a/front/core/src/components/drop-down/drop-down.html b/front/core/components/drop-down/drop-down.html similarity index 100% rename from front/core/src/components/drop-down/drop-down.html rename to front/core/components/drop-down/drop-down.html diff --git a/front/core/src/components/drop-down/drop-down.js b/front/core/components/drop-down/drop-down.js similarity index 99% rename from front/core/src/components/drop-down/drop-down.js rename to front/core/components/drop-down/drop-down.js index 5e797e560..c24f1c8c6 100755 --- a/front/core/src/components/drop-down/drop-down.js +++ b/front/core/components/drop-down/drop-down.js @@ -3,7 +3,7 @@ import ngModule from '../../module'; import Component from '../../lib/component'; import ArrayModel from '../array-model/array-model'; import CrudModel from '../crud-model/crud-model'; -import {mergeWhere} from 'vn-loopback/common/filter.js'; +import {mergeWhere} from 'vn-loopback/util/filter'; /** * @event select Thrown when model item is selected diff --git a/front/core/src/components/drop-down/drop-down.spec.js b/front/core/components/drop-down/drop-down.spec.js similarity index 100% rename from front/core/src/components/drop-down/drop-down.spec.js rename to front/core/components/drop-down/drop-down.spec.js diff --git a/front/core/src/components/drop-down/style.scss b/front/core/components/drop-down/style.scss similarity index 100% rename from front/core/src/components/drop-down/style.scss rename to front/core/components/drop-down/style.scss diff --git a/front/core/src/components/fetched-tags/index.html b/front/core/components/fetched-tags/index.html similarity index 100% rename from front/core/src/components/fetched-tags/index.html rename to front/core/components/fetched-tags/index.html diff --git a/front/core/src/components/fetched-tags/index.js b/front/core/components/fetched-tags/index.js similarity index 100% rename from front/core/src/components/fetched-tags/index.js rename to front/core/components/fetched-tags/index.js diff --git a/front/core/src/components/fetched-tags/style.scss b/front/core/components/fetched-tags/style.scss similarity index 100% rename from front/core/src/components/fetched-tags/style.scss rename to front/core/components/fetched-tags/style.scss diff --git a/front/core/src/components/float-button/float-button.html b/front/core/components/float-button/float-button.html similarity index 100% rename from front/core/src/components/float-button/float-button.html rename to front/core/components/float-button/float-button.html diff --git a/front/core/src/components/float-button/float-button.js b/front/core/components/float-button/float-button.js similarity index 100% rename from front/core/src/components/float-button/float-button.js rename to front/core/components/float-button/float-button.js diff --git a/front/core/src/components/icon-button/icon-button.html b/front/core/components/icon-button/icon-button.html similarity index 100% rename from front/core/src/components/icon-button/icon-button.html rename to front/core/components/icon-button/icon-button.html diff --git a/front/core/src/components/icon-button/icon-button.js b/front/core/components/icon-button/icon-button.js similarity index 100% rename from front/core/src/components/icon-button/icon-button.js rename to front/core/components/icon-button/icon-button.js diff --git a/front/core/src/components/icon-button/style.scss b/front/core/components/icon-button/style.scss similarity index 100% rename from front/core/src/components/icon-button/style.scss rename to front/core/components/icon-button/style.scss diff --git a/front/core/src/components/icon-focusable/icon-focusable.html b/front/core/components/icon-focusable/icon-focusable.html similarity index 100% rename from front/core/src/components/icon-focusable/icon-focusable.html rename to front/core/components/icon-focusable/icon-focusable.html diff --git a/front/core/src/components/icon-focusable/icon-focusable.js b/front/core/components/icon-focusable/icon-focusable.js similarity index 100% rename from front/core/src/components/icon-focusable/icon-focusable.js rename to front/core/components/icon-focusable/icon-focusable.js diff --git a/front/core/src/components/icon-focusable/style.scss b/front/core/components/icon-focusable/style.scss similarity index 100% rename from front/core/src/components/icon-focusable/style.scss rename to front/core/components/icon-focusable/style.scss diff --git a/front/core/src/components/icon-menu/icon-menu.html b/front/core/components/icon-menu/icon-menu.html similarity index 100% rename from front/core/src/components/icon-menu/icon-menu.html rename to front/core/components/icon-menu/icon-menu.html diff --git a/front/core/src/components/icon-menu/icon-menu.js b/front/core/components/icon-menu/icon-menu.js similarity index 100% rename from front/core/src/components/icon-menu/icon-menu.js rename to front/core/components/icon-menu/icon-menu.js diff --git a/front/core/src/components/icon-menu/style.scss b/front/core/components/icon-menu/style.scss similarity index 100% rename from front/core/src/components/icon-menu/style.scss rename to front/core/components/icon-menu/style.scss diff --git a/front/core/src/components/icon/icon.js b/front/core/components/icon/icon.js similarity index 100% rename from front/core/src/components/icon/icon.js rename to front/core/components/icon/icon.js diff --git a/front/core/src/components/icon/style.scss b/front/core/components/icon/style.scss similarity index 100% rename from front/core/src/components/icon/style.scss rename to front/core/components/icon/style.scss diff --git a/front/core/src/components/index.js b/front/core/components/index.js similarity index 100% rename from front/core/src/components/index.js rename to front/core/components/index.js diff --git a/front/core/src/components/input-number/index.html b/front/core/components/input-number/index.html similarity index 100% rename from front/core/src/components/input-number/index.html rename to front/core/components/input-number/index.html diff --git a/front/core/src/components/input-number/index.js b/front/core/components/input-number/index.js similarity index 100% rename from front/core/src/components/input-number/index.js rename to front/core/components/input-number/index.js diff --git a/front/core/src/components/input-number/index.spec.js b/front/core/components/input-number/index.spec.js similarity index 100% rename from front/core/src/components/input-number/index.spec.js rename to front/core/components/input-number/index.spec.js diff --git a/front/core/src/components/input-number/style.scss b/front/core/components/input-number/style.scss similarity index 100% rename from front/core/src/components/input-number/style.scss rename to front/core/components/input-number/style.scss diff --git a/front/core/src/components/input-range/index.html b/front/core/components/input-range/index.html similarity index 100% rename from front/core/src/components/input-range/index.html rename to front/core/components/input-range/index.html diff --git a/front/core/src/components/input-range/index.js b/front/core/components/input-range/index.js similarity index 100% rename from front/core/src/components/input-range/index.js rename to front/core/components/input-range/index.js diff --git a/front/core/src/components/input-range/style.scss b/front/core/components/input-range/style.scss similarity index 100% rename from front/core/src/components/input-range/style.scss rename to front/core/components/input-range/style.scss diff --git a/front/core/src/components/input-time/index.html b/front/core/components/input-time/index.html similarity index 100% rename from front/core/src/components/input-time/index.html rename to front/core/components/input-time/index.html diff --git a/front/core/src/components/input-time/index.js b/front/core/components/input-time/index.js similarity index 100% rename from front/core/src/components/input-time/index.js rename to front/core/components/input-time/index.js diff --git a/front/core/src/components/input-time/index.spec.js b/front/core/components/input-time/index.spec.js similarity index 100% rename from front/core/src/components/input-time/index.spec.js rename to front/core/components/input-time/index.spec.js diff --git a/front/core/src/components/input-time/style.scss b/front/core/components/input-time/style.scss similarity index 100% rename from front/core/src/components/input-time/style.scss rename to front/core/components/input-time/style.scss diff --git a/front/core/src/components/label-value/label-value.html b/front/core/components/label-value/label-value.html similarity index 100% rename from front/core/src/components/label-value/label-value.html rename to front/core/components/label-value/label-value.html diff --git a/front/core/src/components/label-value/label-value.js b/front/core/components/label-value/label-value.js similarity index 100% rename from front/core/src/components/label-value/label-value.js rename to front/core/components/label-value/label-value.js diff --git a/front/core/src/components/label-value/style.scss b/front/core/components/label-value/style.scss similarity index 100% rename from front/core/src/components/label-value/style.scss rename to front/core/components/label-value/style.scss diff --git a/front/core/src/components/log/index.html b/front/core/components/log/index.html similarity index 100% rename from front/core/src/components/log/index.html rename to front/core/components/log/index.html diff --git a/front/core/src/components/log/index.js b/front/core/components/log/index.js similarity index 100% rename from front/core/src/components/log/index.js rename to front/core/components/log/index.js diff --git a/front/core/src/components/log/locale/es.yml b/front/core/components/log/locale/es.yml similarity index 100% rename from front/core/src/components/log/locale/es.yml rename to front/core/components/log/locale/es.yml diff --git a/front/core/src/components/log/style.scss b/front/core/components/log/style.scss similarity index 100% rename from front/core/src/components/log/style.scss rename to front/core/components/log/style.scss diff --git a/front/core/src/components/menu/menu.js b/front/core/components/menu/menu.js similarity index 100% rename from front/core/src/components/menu/menu.js rename to front/core/components/menu/menu.js diff --git a/front/core/src/components/model-proxy/model-proxy.js b/front/core/components/model-proxy/model-proxy.js similarity index 100% rename from front/core/src/components/model-proxy/model-proxy.js rename to front/core/components/model-proxy/model-proxy.js diff --git a/front/core/src/components/multi-check/multi-check.html b/front/core/components/multi-check/multi-check.html similarity index 100% rename from front/core/src/components/multi-check/multi-check.html rename to front/core/components/multi-check/multi-check.html diff --git a/front/core/src/components/multi-check/multi-check.js b/front/core/components/multi-check/multi-check.js similarity index 100% rename from front/core/src/components/multi-check/multi-check.js rename to front/core/components/multi-check/multi-check.js diff --git a/front/core/src/components/multi-check/multi-check.spec.js b/front/core/components/multi-check/multi-check.spec.js similarity index 100% rename from front/core/src/components/multi-check/multi-check.spec.js rename to front/core/components/multi-check/multi-check.spec.js diff --git a/front/core/src/components/pagination/pagination.html b/front/core/components/pagination/pagination.html similarity index 100% rename from front/core/src/components/pagination/pagination.html rename to front/core/components/pagination/pagination.html diff --git a/front/core/src/components/pagination/pagination.js b/front/core/components/pagination/pagination.js similarity index 100% rename from front/core/src/components/pagination/pagination.js rename to front/core/components/pagination/pagination.js diff --git a/front/core/src/components/pagination/style.scss b/front/core/components/pagination/style.scss similarity index 100% rename from front/core/src/components/pagination/style.scss rename to front/core/components/pagination/style.scss diff --git a/front/core/src/components/paging/paging.html b/front/core/components/paging/paging.html similarity index 100% rename from front/core/src/components/paging/paging.html rename to front/core/components/paging/paging.html diff --git a/front/core/src/components/paging/paging.js b/front/core/components/paging/paging.js similarity index 100% rename from front/core/src/components/paging/paging.js rename to front/core/components/paging/paging.js diff --git a/front/core/src/components/paging/paging.spec.js b/front/core/components/paging/paging.spec.js similarity index 100% rename from front/core/src/components/paging/paging.spec.js rename to front/core/components/paging/paging.spec.js diff --git a/front/core/src/components/paging/style.scss b/front/core/components/paging/style.scss similarity index 100% rename from front/core/src/components/paging/style.scss rename to front/core/components/paging/style.scss diff --git a/front/core/src/components/popover/popover.html b/front/core/components/popover/popover.html similarity index 100% rename from front/core/src/components/popover/popover.html rename to front/core/components/popover/popover.html diff --git a/front/core/src/components/popover/popover.js b/front/core/components/popover/popover.js similarity index 100% rename from front/core/src/components/popover/popover.js rename to front/core/components/popover/popover.js diff --git a/front/core/src/components/popover/popover.spec.js b/front/core/components/popover/popover.spec.js similarity index 100% rename from front/core/src/components/popover/popover.spec.js rename to front/core/components/popover/popover.spec.js diff --git a/front/core/src/components/popover/style.scss b/front/core/components/popover/style.scss similarity index 100% rename from front/core/src/components/popover/style.scss rename to front/core/components/popover/style.scss diff --git a/front/core/src/components/radio/radio.html b/front/core/components/radio/radio.html similarity index 100% rename from front/core/src/components/radio/radio.html rename to front/core/components/radio/radio.html diff --git a/front/core/src/components/radio/radio.js b/front/core/components/radio/radio.js similarity index 100% rename from front/core/src/components/radio/radio.js rename to front/core/components/radio/radio.js diff --git a/front/core/src/components/searchbar/search-panel.js b/front/core/components/searchbar/search-panel.js similarity index 100% rename from front/core/src/components/searchbar/search-panel.js rename to front/core/components/searchbar/search-panel.js diff --git a/front/core/src/components/searchbar/searchbar.html b/front/core/components/searchbar/searchbar.html similarity index 100% rename from front/core/src/components/searchbar/searchbar.html rename to front/core/components/searchbar/searchbar.html diff --git a/front/core/src/components/searchbar/searchbar.js b/front/core/components/searchbar/searchbar.js similarity index 99% rename from front/core/src/components/searchbar/searchbar.js rename to front/core/components/searchbar/searchbar.js index 8dbdbb9a7..135d94b81 100644 --- a/front/core/src/components/searchbar/searchbar.js +++ b/front/core/components/searchbar/searchbar.js @@ -1,7 +1,7 @@ import ngModule from '../../module'; import Component from '../../lib/component'; import './style.scss'; -import {buildFilter} from 'vn-loopback/common/filter.js'; +import {buildFilter} from 'vn-loopback/util/filter'; /** * An input specialized to perform searches, it allows to use a panel diff --git a/front/core/src/components/searchbar/style.scss b/front/core/components/searchbar/style.scss similarity index 100% rename from front/core/src/components/searchbar/style.scss rename to front/core/components/searchbar/style.scss diff --git a/front/core/src/components/snackbar/snackbar.html b/front/core/components/snackbar/snackbar.html similarity index 100% rename from front/core/src/components/snackbar/snackbar.html rename to front/core/components/snackbar/snackbar.html diff --git a/front/core/src/components/snackbar/snackbar.js b/front/core/components/snackbar/snackbar.js similarity index 100% rename from front/core/src/components/snackbar/snackbar.js rename to front/core/components/snackbar/snackbar.js diff --git a/front/core/src/components/snackbar/style.scss b/front/core/components/snackbar/style.scss similarity index 100% rename from front/core/src/components/snackbar/style.scss rename to front/core/components/snackbar/style.scss diff --git a/front/core/src/components/spinner/spinner.html b/front/core/components/spinner/spinner.html similarity index 100% rename from front/core/src/components/spinner/spinner.html rename to front/core/components/spinner/spinner.html diff --git a/front/core/src/components/spinner/spinner.js b/front/core/components/spinner/spinner.js similarity index 100% rename from front/core/src/components/spinner/spinner.js rename to front/core/components/spinner/spinner.js diff --git a/front/core/src/components/spinner/spinner.spec.js b/front/core/components/spinner/spinner.spec.js similarity index 100% rename from front/core/src/components/spinner/spinner.spec.js rename to front/core/components/spinner/spinner.spec.js diff --git a/front/core/src/components/spinner/style.css b/front/core/components/spinner/style.css similarity index 100% rename from front/core/src/components/spinner/style.css rename to front/core/components/spinner/style.css diff --git a/front/core/src/components/step-control/step-control.html b/front/core/components/step-control/step-control.html similarity index 100% rename from front/core/src/components/step-control/step-control.html rename to front/core/components/step-control/step-control.html diff --git a/front/core/src/components/step-control/step-control.js b/front/core/components/step-control/step-control.js similarity index 100% rename from front/core/src/components/step-control/step-control.js rename to front/core/components/step-control/step-control.js diff --git a/front/core/src/components/step-control/step-control.spec.js b/front/core/components/step-control/step-control.spec.js similarity index 100% rename from front/core/src/components/step-control/step-control.spec.js rename to front/core/components/step-control/step-control.spec.js diff --git a/front/core/src/components/step-control/style.scss b/front/core/components/step-control/style.scss similarity index 100% rename from front/core/src/components/step-control/style.scss rename to front/core/components/step-control/style.scss diff --git a/front/core/src/components/submit/submit.html b/front/core/components/submit/submit.html similarity index 100% rename from front/core/src/components/submit/submit.html rename to front/core/components/submit/submit.html diff --git a/front/core/src/components/submit/submit.js b/front/core/components/submit/submit.js similarity index 100% rename from front/core/src/components/submit/submit.js rename to front/core/components/submit/submit.js diff --git a/front/core/src/components/subtitle/subtitle.html b/front/core/components/subtitle/subtitle.html similarity index 100% rename from front/core/src/components/subtitle/subtitle.html rename to front/core/components/subtitle/subtitle.html diff --git a/front/core/src/components/subtitle/subtitle.js b/front/core/components/subtitle/subtitle.js similarity index 100% rename from front/core/src/components/subtitle/subtitle.js rename to front/core/components/subtitle/subtitle.js diff --git a/front/core/src/components/switch/switch.html b/front/core/components/switch/switch.html similarity index 100% rename from front/core/src/components/switch/switch.html rename to front/core/components/switch/switch.html diff --git a/front/core/src/components/switch/switch.js b/front/core/components/switch/switch.js similarity index 100% rename from front/core/src/components/switch/switch.js rename to front/core/components/switch/switch.js diff --git a/front/core/src/components/table/index.html b/front/core/components/table/index.html similarity index 100% rename from front/core/src/components/table/index.html rename to front/core/components/table/index.html diff --git a/front/core/src/components/table/index.js b/front/core/components/table/index.js similarity index 100% rename from front/core/src/components/table/index.js rename to front/core/components/table/index.js diff --git a/front/core/src/components/table/style.scss b/front/core/components/table/style.scss similarity index 100% rename from front/core/src/components/table/style.scss rename to front/core/components/table/style.scss diff --git a/front/core/src/components/textarea/style.scss b/front/core/components/textarea/style.scss similarity index 100% rename from front/core/src/components/textarea/style.scss rename to front/core/components/textarea/style.scss diff --git a/front/core/src/components/textarea/textarea.html b/front/core/components/textarea/textarea.html similarity index 100% rename from front/core/src/components/textarea/textarea.html rename to front/core/components/textarea/textarea.html diff --git a/front/core/src/components/textarea/textarea.js b/front/core/components/textarea/textarea.js similarity index 100% rename from front/core/src/components/textarea/textarea.js rename to front/core/components/textarea/textarea.js diff --git a/front/core/src/components/textarea/textarea.spec.js b/front/core/components/textarea/textarea.spec.js similarity index 100% rename from front/core/src/components/textarea/textarea.spec.js rename to front/core/components/textarea/textarea.spec.js diff --git a/front/core/src/components/textfield/style.scss b/front/core/components/textfield/style.scss similarity index 100% rename from front/core/src/components/textfield/style.scss rename to front/core/components/textfield/style.scss diff --git a/front/core/src/components/textfield/textfield.html b/front/core/components/textfield/textfield.html similarity index 100% rename from front/core/src/components/textfield/textfield.html rename to front/core/components/textfield/textfield.html diff --git a/front/core/src/components/textfield/textfield.js b/front/core/components/textfield/textfield.js similarity index 100% rename from front/core/src/components/textfield/textfield.js rename to front/core/components/textfield/textfield.js diff --git a/front/core/src/components/textfield/textfield.spec.js b/front/core/components/textfield/textfield.spec.js similarity index 100% rename from front/core/src/components/textfield/textfield.spec.js rename to front/core/components/textfield/textfield.spec.js diff --git a/front/core/src/components/th/index.html b/front/core/components/th/index.html similarity index 100% rename from front/core/src/components/th/index.html rename to front/core/components/th/index.html diff --git a/front/core/src/components/th/index.js b/front/core/components/th/index.js similarity index 100% rename from front/core/src/components/th/index.js rename to front/core/components/th/index.js diff --git a/front/core/src/components/th/index.spec.js b/front/core/components/th/index.spec.js similarity index 100% rename from front/core/src/components/th/index.spec.js rename to front/core/components/th/index.spec.js diff --git a/front/core/src/components/title/title.html b/front/core/components/title/title.html similarity index 100% rename from front/core/src/components/title/title.html rename to front/core/components/title/title.html diff --git a/front/core/src/components/title/title.js b/front/core/components/title/title.js similarity index 100% rename from front/core/src/components/title/title.js rename to front/core/components/title/title.js diff --git a/front/core/src/components/tooltip/style.scss b/front/core/components/tooltip/style.scss similarity index 100% rename from front/core/src/components/tooltip/style.scss rename to front/core/components/tooltip/style.scss diff --git a/front/core/src/components/tooltip/tooltip.html b/front/core/components/tooltip/tooltip.html similarity index 100% rename from front/core/src/components/tooltip/tooltip.html rename to front/core/components/tooltip/tooltip.html diff --git a/front/core/src/components/tooltip/tooltip.js b/front/core/components/tooltip/tooltip.js similarity index 100% rename from front/core/src/components/tooltip/tooltip.js rename to front/core/components/tooltip/tooltip.js diff --git a/front/core/src/components/tooltip/tooltip.spec.js b/front/core/components/tooltip/tooltip.spec.js similarity index 100% rename from front/core/src/components/tooltip/tooltip.spec.js rename to front/core/components/tooltip/tooltip.spec.js diff --git a/front/core/src/components/treeview/index.html b/front/core/components/treeview/index.html similarity index 100% rename from front/core/src/components/treeview/index.html rename to front/core/components/treeview/index.html diff --git a/front/core/src/components/treeview/index.js b/front/core/components/treeview/index.js similarity index 100% rename from front/core/src/components/treeview/index.js rename to front/core/components/treeview/index.js diff --git a/front/core/src/components/treeview/style.scss b/front/core/components/treeview/style.scss similarity index 100% rename from front/core/src/components/treeview/style.scss rename to front/core/components/treeview/style.scss diff --git a/front/core/src/components/watcher/locale/es.yml b/front/core/components/watcher/locale/es.yml similarity index 100% rename from front/core/src/components/watcher/locale/es.yml rename to front/core/components/watcher/locale/es.yml diff --git a/front/core/src/components/watcher/watcher.html b/front/core/components/watcher/watcher.html similarity index 100% rename from front/core/src/components/watcher/watcher.html rename to front/core/components/watcher/watcher.html diff --git a/front/core/src/components/watcher/watcher.js b/front/core/components/watcher/watcher.js similarity index 100% rename from front/core/src/components/watcher/watcher.js rename to front/core/components/watcher/watcher.js diff --git a/front/core/src/components/watcher/watcher.spec.js b/front/core/components/watcher/watcher.spec.js similarity index 100% rename from front/core/src/components/watcher/watcher.spec.js rename to front/core/components/watcher/watcher.spec.js diff --git a/front/core/src/directives/acl.js b/front/core/directives/acl.js similarity index 100% rename from front/core/src/directives/acl.js rename to front/core/directives/acl.js diff --git a/front/core/src/directives/bind.js b/front/core/directives/bind.js similarity index 100% rename from front/core/src/directives/bind.js rename to front/core/directives/bind.js diff --git a/front/core/src/directives/dialog.js b/front/core/directives/dialog.js similarity index 100% rename from front/core/src/directives/dialog.js rename to front/core/directives/dialog.js diff --git a/front/core/src/directives/focus.js b/front/core/directives/focus.js similarity index 100% rename from front/core/src/directives/focus.js rename to front/core/directives/focus.js diff --git a/front/core/src/directives/id.js b/front/core/directives/id.js similarity index 100% rename from front/core/src/directives/id.js rename to front/core/directives/id.js diff --git a/front/core/src/directives/index.js b/front/core/directives/index.js similarity index 100% rename from front/core/src/directives/index.js rename to front/core/directives/index.js diff --git a/front/core/src/directives/no-image.png b/front/core/directives/no-image.png similarity index 100% rename from front/core/src/directives/no-image.png rename to front/core/directives/no-image.png diff --git a/front/core/src/directives/on-error-src.js b/front/core/directives/on-error-src.js similarity index 100% rename from front/core/src/directives/on-error-src.js rename to front/core/directives/on-error-src.js diff --git a/front/core/src/directives/popover.js b/front/core/directives/popover.js similarity index 100% rename from front/core/src/directives/popover.js rename to front/core/directives/popover.js diff --git a/front/core/src/directives/repeat-last.js b/front/core/directives/repeat-last.js similarity index 100% rename from front/core/src/directives/repeat-last.js rename to front/core/directives/repeat-last.js diff --git a/front/core/src/directives/specs/acl.spec.js b/front/core/directives/specs/acl.spec.js similarity index 100% rename from front/core/src/directives/specs/acl.spec.js rename to front/core/directives/specs/acl.spec.js diff --git a/front/core/src/directives/specs/bind.spec.js b/front/core/directives/specs/bind.spec.js similarity index 100% rename from front/core/src/directives/specs/bind.spec.js rename to front/core/directives/specs/bind.spec.js diff --git a/front/core/src/directives/specs/dialog.spec.js b/front/core/directives/specs/dialog.spec.js similarity index 100% rename from front/core/src/directives/specs/dialog.spec.js rename to front/core/directives/specs/dialog.spec.js diff --git a/front/core/src/directives/specs/focus.spec.js b/front/core/directives/specs/focus.spec.js similarity index 100% rename from front/core/src/directives/specs/focus.spec.js rename to front/core/directives/specs/focus.spec.js diff --git a/front/core/src/directives/specs/id.spec.js b/front/core/directives/specs/id.spec.js similarity index 100% rename from front/core/src/directives/specs/id.spec.js rename to front/core/directives/specs/id.spec.js diff --git a/front/core/src/directives/specs/validation.spec.js b/front/core/directives/specs/validation.spec.js similarity index 100% rename from front/core/src/directives/specs/validation.spec.js rename to front/core/directives/specs/validation.spec.js diff --git a/front/core/src/directives/specs/zoom-image.spec.js b/front/core/directives/specs/zoom-image.spec.js similarity index 100% rename from front/core/src/directives/specs/zoom-image.spec.js rename to front/core/directives/specs/zoom-image.spec.js diff --git a/front/core/src/directives/title.js b/front/core/directives/title.js similarity index 100% rename from front/core/src/directives/title.js rename to front/core/directives/title.js diff --git a/front/core/src/directives/validation.js b/front/core/directives/validation.js similarity index 100% rename from front/core/src/directives/validation.js rename to front/core/directives/validation.js diff --git a/front/core/src/directives/visible-by.js b/front/core/directives/visible-by.js similarity index 100% rename from front/core/src/directives/visible-by.js rename to front/core/directives/visible-by.js diff --git a/front/core/src/directives/zoom-image.js b/front/core/directives/zoom-image.js similarity index 100% rename from front/core/src/directives/zoom-image.js rename to front/core/directives/zoom-image.js diff --git a/front/core/src/filters/currency.js b/front/core/filters/currency.js similarity index 100% rename from front/core/src/filters/currency.js rename to front/core/filters/currency.js diff --git a/front/core/src/filters/dash-if-empty.js b/front/core/filters/dash-if-empty.js similarity index 100% rename from front/core/src/filters/dash-if-empty.js rename to front/core/filters/dash-if-empty.js diff --git a/front/core/src/filters/dateTime.js b/front/core/filters/dateTime.js similarity index 100% rename from front/core/src/filters/dateTime.js rename to front/core/filters/dateTime.js diff --git a/front/core/src/filters/index.js b/front/core/filters/index.js similarity index 100% rename from front/core/src/filters/index.js rename to front/core/filters/index.js diff --git a/front/core/src/filters/percentage.js b/front/core/filters/percentage.js similarity index 100% rename from front/core/src/filters/percentage.js rename to front/core/filters/percentage.js diff --git a/front/core/src/filters/phone.js b/front/core/filters/phone.js similarity index 100% rename from front/core/src/filters/phone.js rename to front/core/filters/phone.js diff --git a/front/core/src/filters/specs/currency.spec.js b/front/core/filters/specs/currency.spec.js similarity index 100% rename from front/core/src/filters/specs/currency.spec.js rename to front/core/filters/specs/currency.spec.js diff --git a/front/core/src/filters/ucwords.js b/front/core/filters/ucwords.js similarity index 100% rename from front/core/src/filters/ucwords.js rename to front/core/filters/ucwords.js diff --git a/front/core/src/filters/zero-fill.js b/front/core/filters/zero-fill.js similarity index 100% rename from front/core/src/filters/zero-fill.js rename to front/core/filters/zero-fill.js diff --git a/front/core/index.js b/front/core/index.js index 59d36b6af..d3601a8e1 100644 --- a/front/core/index.js +++ b/front/core/index.js @@ -1 +1,7 @@ -export * from './src/core'; +import './styles'; + +export * from './module'; +export * from './directives'; +export * from './filters'; +export * from './lib'; +export * from './components'; diff --git a/front/core/src/lib/acl-service.js b/front/core/lib/acl-service.js similarity index 100% rename from front/core/src/lib/acl-service.js rename to front/core/lib/acl-service.js diff --git a/front/core/src/lib/app.js b/front/core/lib/app.js similarity index 100% rename from front/core/src/lib/app.js rename to front/core/lib/app.js diff --git a/front/core/src/lib/assign-props.js b/front/core/lib/assign-props.js similarity index 100% rename from front/core/src/lib/assign-props.js rename to front/core/lib/assign-props.js diff --git a/front/core/src/lib/component.js b/front/core/lib/component.js similarity index 100% rename from front/core/src/lib/component.js rename to front/core/lib/component.js diff --git a/front/core/src/lib/copy.js b/front/core/lib/copy.js similarity index 100% rename from front/core/src/lib/copy.js rename to front/core/lib/copy.js diff --git a/front/core/src/lib/crud.js b/front/core/lib/crud.js similarity index 100% rename from front/core/src/lib/crud.js rename to front/core/lib/crud.js diff --git a/front/core/src/lib/date.js b/front/core/lib/date.js similarity index 100% rename from front/core/src/lib/date.js rename to front/core/lib/date.js diff --git a/front/core/src/lib/equals.js b/front/core/lib/equals.js similarity index 100% rename from front/core/src/lib/equals.js rename to front/core/lib/equals.js diff --git a/front/core/src/lib/event-emitter.js b/front/core/lib/event-emitter.js similarity index 100% rename from front/core/src/lib/event-emitter.js rename to front/core/lib/event-emitter.js diff --git a/front/core/src/lib/full-empty.js b/front/core/lib/full-empty.js similarity index 100% rename from front/core/src/lib/full-empty.js rename to front/core/lib/full-empty.js diff --git a/front/core/src/lib/http-error.js b/front/core/lib/http-error.js similarity index 100% rename from front/core/src/lib/http-error.js rename to front/core/lib/http-error.js diff --git a/front/core/src/lib/index.js b/front/core/lib/index.js similarity index 100% rename from front/core/src/lib/index.js rename to front/core/lib/index.js diff --git a/front/core/src/lib/input.js b/front/core/lib/input.js similarity index 100% rename from front/core/src/lib/input.js rename to front/core/lib/input.js diff --git a/front/core/src/lib/interceptor.js b/front/core/lib/interceptor.js similarity index 100% rename from front/core/src/lib/interceptor.js rename to front/core/lib/interceptor.js diff --git a/front/core/src/lib/interpolate.js b/front/core/lib/interpolate.js similarity index 98% rename from front/core/src/lib/interpolate.js rename to front/core/lib/interpolate.js index 6321ce813..0db22b312 100644 --- a/front/core/src/lib/interpolate.js +++ b/front/core/lib/interpolate.js @@ -1,5 +1,5 @@ import ngModule from '../module'; -import {ng} from 'vendor'; +import {ng} from '../vendor'; function stringify(value) { if (value === null) { // null || undefined @@ -18,7 +18,7 @@ function stringify(value) { return value; } -var $interpolateMinErr = ng.angular.$interpolateMinErr = ng.$$minErr('$interpolate'); +var $interpolateMinErr = ng.$interpolateMinErr = ng.$$minErr('$interpolate'); $interpolateMinErr.throwNoconcat = function(text) { throw $interpolateMinErr('noconcat', diff --git a/front/core/src/lib/key-codes.js b/front/core/lib/key-codes.js similarity index 100% rename from front/core/src/lib/key-codes.js rename to front/core/lib/key-codes.js diff --git a/front/core/src/lib/modified.js b/front/core/lib/modified.js similarity index 100% rename from front/core/src/lib/modified.js rename to front/core/lib/modified.js diff --git a/front/core/src/lib/module-loader.js b/front/core/lib/module-loader.js similarity index 100% rename from front/core/src/lib/module-loader.js rename to front/core/lib/module-loader.js diff --git a/front/core/src/lib/specs/acl-service.spec.js b/front/core/lib/specs/acl-service.spec.js similarity index 100% rename from front/core/src/lib/specs/acl-service.spec.js rename to front/core/lib/specs/acl-service.spec.js diff --git a/front/core/src/lib/specs/module-loader.spec.js b/front/core/lib/specs/module-loader.spec.js similarity index 100% rename from front/core/src/lib/specs/module-loader.spec.js rename to front/core/lib/specs/module-loader.spec.js diff --git a/front/core/src/lib/spliting-register.js b/front/core/lib/spliting-register.js similarity index 100% rename from front/core/src/lib/spliting-register.js rename to front/core/lib/spliting-register.js diff --git a/front/core/src/lib/storage-services.js b/front/core/lib/storage-services.js similarity index 100% rename from front/core/src/lib/storage-services.js rename to front/core/lib/storage-services.js diff --git a/front/core/src/lib/string.js b/front/core/lib/string.js similarity index 100% rename from front/core/src/lib/string.js rename to front/core/lib/string.js diff --git a/front/core/src/lib/template.js b/front/core/lib/template.js similarity index 100% rename from front/core/src/lib/template.js rename to front/core/lib/template.js diff --git a/front/core/src/lib/user-error.js b/front/core/lib/user-error.js similarity index 100% rename from front/core/src/lib/user-error.js rename to front/core/lib/user-error.js diff --git a/front/core/src/lib/validator.js b/front/core/lib/validator.js similarity index 99% rename from front/core/src/lib/validator.js rename to front/core/lib/validator.js index c7a3682fe..b0b8f7389 100644 --- a/front/core/src/lib/validator.js +++ b/front/core/lib/validator.js @@ -1,4 +1,4 @@ -import {validator} from 'vendor'; +import {validator} from '../vendor'; export const validators = { presence: ($translate, value) => { diff --git a/front/core/src/locale/en.yml b/front/core/locale/en.yml similarity index 100% rename from front/core/src/locale/en.yml rename to front/core/locale/en.yml diff --git a/front/core/src/locale/es.yml b/front/core/locale/es.yml similarity index 100% rename from front/core/src/locale/es.yml rename to front/core/locale/es.yml diff --git a/front/mocks/crud-model.js b/front/core/mocks/crud-model.js similarity index 100% rename from front/mocks/crud-model.js rename to front/core/mocks/crud-model.js diff --git a/front/mocks/watcher.js b/front/core/mocks/watcher.js similarity index 100% rename from front/mocks/watcher.js rename to front/core/mocks/watcher.js diff --git a/front/core/src/module.js b/front/core/module.js similarity index 83% rename from front/core/src/module.js rename to front/core/module.js index 81fb84f00..d1c347cf8 100644 --- a/front/core/src/module.js +++ b/front/core/module.js @@ -1,13 +1,6 @@ -import * as vendors from 'vendor'; +import {ng, ngDeps} from './vendor'; -let deps = []; -Object.keys(vendors).forEach(vendor => { - let name = vendors[vendor].name; - if (name) - deps.push(name); -}); - -const ngModule = vendors.ng.module('vnCore', deps); +const ngModule = ng.module('vnCore', ngDeps); export default ngModule; config.$inject = ['$translateProvider', '$translatePartialLoaderProvider']; diff --git a/front/core/src/core.js b/front/core/src/core.js deleted file mode 100644 index d3601a8e1..000000000 --- a/front/core/src/core.js +++ /dev/null @@ -1,7 +0,0 @@ -import './styles'; - -export * from './module'; -export * from './directives'; -export * from './filters'; -export * from './lib'; -export * from './components'; diff --git a/front/core/src/styles/Material-Design-Icons.woff2 b/front/core/styles/Material-Design-Icons.woff2 similarity index 100% rename from front/core/src/styles/Material-Design-Icons.woff2 rename to front/core/styles/Material-Design-Icons.woff2 diff --git a/front/core/src/styles/index.js b/front/core/styles/index.js similarity index 100% rename from front/core/src/styles/index.js rename to front/core/styles/index.js diff --git a/front/core/src/styles/mdi-override.css b/front/core/styles/mdi-override.css similarity index 100% rename from front/core/src/styles/mdi-override.css rename to front/core/styles/mdi-override.css diff --git a/front/core/src/styles/mdl-override.scss b/front/core/styles/mdl-override.scss similarity index 100% rename from front/core/src/styles/mdl-override.scss rename to front/core/styles/mdl-override.scss diff --git a/front/core/src/styles/salixfont.css b/front/core/styles/salixfont.css similarity index 100% rename from front/core/src/styles/salixfont.css rename to front/core/styles/salixfont.css diff --git a/front/core/src/styles/salixfont.eot b/front/core/styles/salixfont.eot similarity index 100% rename from front/core/src/styles/salixfont.eot rename to front/core/styles/salixfont.eot diff --git a/front/core/src/styles/salixfont.svg b/front/core/styles/salixfont.svg similarity index 100% rename from front/core/src/styles/salixfont.svg rename to front/core/styles/salixfont.svg diff --git a/front/core/src/styles/salixfont.ttf b/front/core/styles/salixfont.ttf similarity index 100% rename from front/core/src/styles/salixfont.ttf rename to front/core/styles/salixfont.ttf diff --git a/front/core/src/styles/salixfont.woff b/front/core/styles/salixfont.woff similarity index 100% rename from front/core/src/styles/salixfont.woff rename to front/core/styles/salixfont.woff diff --git a/front/core/src/styles/zoom-image.scss b/front/core/styles/zoom-image.scss similarity index 100% rename from front/core/src/styles/zoom-image.scss rename to front/core/styles/zoom-image.scss diff --git a/front/core/vendor.js b/front/core/vendor.js new file mode 100644 index 000000000..ccb3d2f49 --- /dev/null +++ b/front/core/vendor.js @@ -0,0 +1,32 @@ +import '@babel/polyfill'; + +import * as ng from 'angular'; +export {ng}; + +import 'angular-cookies'; +import 'angular-translate'; +import 'angular-translate-loader-partial'; +import '@uirouter/angularjs'; +import 'mg-crud'; +import 'oclazyload'; + +export const ngDeps = [ + 'ngCookies', + 'pascalprecht.translate', + 'ui.router', + 'mgCrud', + 'oc.lazyLoad' +]; + +import 'material-design-lite'; +import 'material-design-lite/dist/material.orange-deep_orange.min.css'; + +import * as validator from 'validator'; +export {validator}; + +import Flatpickr from 'flatpickr'; +import 'flatpickr/dist/flatpickr.css'; +import 'flatpickr/dist/themes/material_orange.css'; +import l10ns from 'flatpickr/dist/l10n'; +Flatpickr.l10ns = l10ns; +export {Flatpickr}; diff --git a/front/salix/src/bootstrap.js b/front/salix/bootstrap.js similarity index 89% rename from front/salix/src/bootstrap.js rename to front/salix/bootstrap.js index dd7a61388..4509463e7 100644 --- a/front/salix/src/bootstrap.js +++ b/front/salix/bootstrap.js @@ -1,4 +1,4 @@ -import {ng} from 'vendor'; +import {ng} from 'core/vendor'; import appName from './module'; export const bootstrap = () => { @@ -10,8 +10,8 @@ export const bootstrap = () => { })(); let _element = _script && document.querySelector(_script.getAttribute(selector)); - if (!_element) { + if (!_element) throw new Error('Element is not defined'); - } + ng.bootstrap(_element, [appName]); }; diff --git a/front/salix/src/components/app/app.html b/front/salix/components/app/app.html similarity index 100% rename from front/salix/src/components/app/app.html rename to front/salix/components/app/app.html diff --git a/front/salix/src/components/app/app.js b/front/salix/components/app/app.js similarity index 100% rename from front/salix/src/components/app/app.js rename to front/salix/components/app/app.js diff --git a/front/salix/src/components/app/logo.svg b/front/salix/components/app/logo.svg similarity index 100% rename from front/salix/src/components/app/logo.svg rename to front/salix/components/app/logo.svg diff --git a/front/salix/src/components/app/style.scss b/front/salix/components/app/style.scss similarity index 100% rename from front/salix/src/components/app/style.scss rename to front/salix/components/app/style.scss diff --git a/front/salix/src/components/home/home.html b/front/salix/components/home/home.html similarity index 100% rename from front/salix/src/components/home/home.html rename to front/salix/components/home/home.html diff --git a/front/salix/src/components/home/home.js b/front/salix/components/home/home.js similarity index 100% rename from front/salix/src/components/home/home.js rename to front/salix/components/home/home.js diff --git a/front/salix/src/components/home/style.scss b/front/salix/components/home/style.scss similarity index 100% rename from front/salix/src/components/home/style.scss rename to front/salix/components/home/style.scss diff --git a/front/salix/src/components/index.js b/front/salix/components/index.js similarity index 100% rename from front/salix/src/components/index.js rename to front/salix/components/index.js diff --git a/front/salix/src/components/left-menu/left-menu.html b/front/salix/components/left-menu/left-menu.html similarity index 100% rename from front/salix/src/components/left-menu/left-menu.html rename to front/salix/components/left-menu/left-menu.html diff --git a/front/salix/src/components/left-menu/left-menu.js b/front/salix/components/left-menu/left-menu.js similarity index 100% rename from front/salix/src/components/left-menu/left-menu.js rename to front/salix/components/left-menu/left-menu.js diff --git a/front/salix/src/components/left-menu/left-menu.spec.js b/front/salix/components/left-menu/left-menu.spec.js similarity index 100% rename from front/salix/src/components/left-menu/left-menu.spec.js rename to front/salix/components/left-menu/left-menu.spec.js diff --git a/front/salix/src/components/left-menu/style.scss b/front/salix/components/left-menu/style.scss similarity index 100% rename from front/salix/src/components/left-menu/style.scss rename to front/salix/components/left-menu/style.scss diff --git a/front/salix/src/components/main-menu/main-menu.html b/front/salix/components/main-menu/main-menu.html similarity index 100% rename from front/salix/src/components/main-menu/main-menu.html rename to front/salix/components/main-menu/main-menu.html diff --git a/front/salix/src/components/main-menu/main-menu.js b/front/salix/components/main-menu/main-menu.js similarity index 100% rename from front/salix/src/components/main-menu/main-menu.js rename to front/salix/components/main-menu/main-menu.js diff --git a/front/salix/src/components/main-menu/main-menu.spec.js b/front/salix/components/main-menu/main-menu.spec.js similarity index 100% rename from front/salix/src/components/main-menu/main-menu.spec.js rename to front/salix/components/main-menu/main-menu.spec.js diff --git a/front/salix/src/components/main-menu/style.scss b/front/salix/components/main-menu/style.scss similarity index 100% rename from front/salix/src/components/main-menu/style.scss rename to front/salix/components/main-menu/style.scss diff --git a/front/salix/src/components/topbar/style.scss b/front/salix/components/topbar/style.scss similarity index 100% rename from front/salix/src/components/topbar/style.scss rename to front/salix/components/topbar/style.scss diff --git a/front/salix/src/components/topbar/topbar.html b/front/salix/components/topbar/topbar.html similarity index 100% rename from front/salix/src/components/topbar/topbar.html rename to front/salix/components/topbar/topbar.html diff --git a/front/salix/src/components/topbar/topbar.js b/front/salix/components/topbar/topbar.js similarity index 100% rename from front/salix/src/components/topbar/topbar.js rename to front/salix/components/topbar/topbar.js diff --git a/front/salix/src/components/user-configuration-popover/index.html b/front/salix/components/user-configuration-popover/index.html similarity index 100% rename from front/salix/src/components/user-configuration-popover/index.html rename to front/salix/components/user-configuration-popover/index.html diff --git a/front/salix/src/components/user-configuration-popover/index.js b/front/salix/components/user-configuration-popover/index.js similarity index 100% rename from front/salix/src/components/user-configuration-popover/index.js rename to front/salix/components/user-configuration-popover/index.js diff --git a/front/salix/src/components/user-configuration-popover/index.spec.js b/front/salix/components/user-configuration-popover/index.spec.js similarity index 100% rename from front/salix/src/components/user-configuration-popover/index.spec.js rename to front/salix/components/user-configuration-popover/index.spec.js diff --git a/front/salix/src/components/user-configuration-popover/style.scss b/front/salix/components/user-configuration-popover/style.scss similarity index 100% rename from front/salix/src/components/user-configuration-popover/style.scss rename to front/salix/components/user-configuration-popover/style.scss diff --git a/front/salix/src/config-routes.js b/front/salix/config-routes.js similarity index 97% rename from front/salix/src/config-routes.js rename to front/salix/config-routes.js index f0d0b3faf..40f2cb58f 100644 --- a/front/salix/src/config-routes.js +++ b/front/salix/config-routes.js @@ -1,7 +1,7 @@ import ngModule from './module'; import deps from 'modules.yml'; import modules from 'spliting'; -import splitingRegister from 'core/src/lib/spliting-register'; +import splitingRegister from 'core/lib/spliting-register'; function loader(moduleName, validations) { load.$inject = ['vnModuleLoader']; diff --git a/front/salix/src/global-keybindings.yml b/front/salix/global-keybindings.yml similarity index 100% rename from front/salix/src/global-keybindings.yml rename to front/salix/global-keybindings.yml diff --git a/front/salix/index.ejs b/front/salix/index.ejs new file mode 100644 index 000000000..8eaafd041 --- /dev/null +++ b/front/salix/index.ejs @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/front/salix/index.js b/front/salix/index.js index 14e899cd0..88ff6e001 100644 --- a/front/salix/index.js +++ b/front/salix/index.js @@ -1 +1,5 @@ -export * from './src/salix'; +import './module'; +import './config-routes'; +import './components/index'; +import './styles/index'; +import './modules-factory'; diff --git a/front/salix/src/locale/en.yml b/front/salix/locale/en.yml similarity index 100% rename from front/salix/src/locale/en.yml rename to front/salix/locale/en.yml diff --git a/front/salix/src/locale/es.yml b/front/salix/locale/es.yml similarity index 100% rename from front/salix/src/locale/es.yml rename to front/salix/locale/es.yml diff --git a/front/salix/src/module.js b/front/salix/module.js similarity index 93% rename from front/salix/src/module.js rename to front/salix/module.js index 6fa100da8..1f153d2d0 100644 --- a/front/salix/src/module.js +++ b/front/salix/module.js @@ -1,4 +1,4 @@ -import {ng} from 'vendor'; +import {ng} from 'core/vendor'; import 'core'; import keybindings from './global-keybindings.yml'; @@ -23,7 +23,7 @@ export function run($window, $rootScope, vnApp, $state, $document) { if (!keybindings[binding].key || !keybindings[binding].sref) throw new Error('Binding not formed correctly'); - $document.on("keyup", function(e) { + $document.on('keyup', function(e) { if (e.defaultPrevented) return; let shortcut = { @@ -34,9 +34,8 @@ export function run($window, $rootScope, vnApp, $state, $document) { let correctShortcut = true; - for (const key in shortcut) { + for (const key in shortcut) correctShortcut = correctShortcut && shortcut[key] == e[key]; - } if (correctShortcut) { $state.go(keybindings[binding].sref); @@ -84,9 +83,9 @@ function $exceptionHandler(vnApp, $window) { continueUrl = encodeURIComponent(continueUrl); $window.location = `/auth/?apiKey=${vnApp.name}&continue=${continueUrl}`; } - } else if (exception.name == 'UserError') { + } else if (exception.name == 'UserError') message = exception.message; - } else { + else { vnApp.showError('Ups! Something went wrong'); console.error(exception); throw exception; diff --git a/front/salix/src/modules-factory.js b/front/salix/modules-factory.js similarity index 100% rename from front/salix/src/modules-factory.js rename to front/salix/modules-factory.js diff --git a/front/salix/src/package.json b/front/salix/src/package.json deleted file mode 100644 index 626726422..000000000 --- a/front/salix/src/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "@salix/core", - "version": "0.0.0", - "description": "", - "main": "index.js", - "repository": { - "type": "git", - "url": "http://git.verdnatura.es:/salix" - } -} diff --git a/front/salix/src/salix.js b/front/salix/src/salix.js deleted file mode 100644 index 88ff6e001..000000000 --- a/front/salix/src/salix.js +++ /dev/null @@ -1,5 +0,0 @@ -import './module'; -import './config-routes'; -import './components/index'; -import './styles/index'; -import './modules-factory'; diff --git a/front/salix/src/styles/background.scss b/front/salix/styles/background.scss similarity index 100% rename from front/salix/src/styles/background.scss rename to front/salix/styles/background.scss diff --git a/front/salix/src/styles/border.scss b/front/salix/styles/border.scss similarity index 100% rename from front/salix/src/styles/border.scss rename to front/salix/styles/border.scss diff --git a/front/salix/src/styles/colors.scss b/front/salix/styles/colors.scss similarity index 100% rename from front/salix/src/styles/colors.scss rename to front/salix/styles/colors.scss diff --git a/front/salix/src/styles/display.scss b/front/salix/styles/display.scss similarity index 100% rename from front/salix/src/styles/display.scss rename to front/salix/styles/display.scss diff --git a/front/salix/src/styles/effects.scss b/front/salix/styles/effects.scss similarity index 100% rename from front/salix/src/styles/effects.scss rename to front/salix/styles/effects.scss diff --git a/front/salix/src/styles/font-family.scss b/front/salix/styles/font-family.scss similarity index 100% rename from front/salix/src/styles/font-family.scss rename to front/salix/styles/font-family.scss diff --git a/front/salix/src/styles/font-style.scss b/front/salix/styles/font-style.scss similarity index 100% rename from front/salix/src/styles/font-style.scss rename to front/salix/styles/font-style.scss diff --git a/front/salix/src/styles/fonts/Roboto-Bold.ttf b/front/salix/styles/fonts/Roboto-Bold.ttf similarity index 100% rename from front/salix/src/styles/fonts/Roboto-Bold.ttf rename to front/salix/styles/fonts/Roboto-Bold.ttf diff --git a/front/salix/src/styles/fonts/Roboto-Medium.ttf b/front/salix/styles/fonts/Roboto-Medium.ttf similarity index 100% rename from front/salix/src/styles/fonts/Roboto-Medium.ttf rename to front/salix/styles/fonts/Roboto-Medium.ttf diff --git a/front/salix/src/styles/fonts/Roboto-Regular.ttf b/front/salix/styles/fonts/Roboto-Regular.ttf similarity index 100% rename from front/salix/src/styles/fonts/Roboto-Regular.ttf rename to front/salix/styles/fonts/Roboto-Regular.ttf diff --git a/front/salix/src/styles/index.js b/front/salix/styles/index.js similarity index 100% rename from front/salix/src/styles/index.js rename to front/salix/styles/index.js diff --git a/front/salix/src/styles/layout.scss b/front/salix/styles/layout.scss similarity index 100% rename from front/salix/src/styles/layout.scss rename to front/salix/styles/layout.scss diff --git a/front/salix/src/styles/margin.scss b/front/salix/styles/margin.scss similarity index 100% rename from front/salix/src/styles/margin.scss rename to front/salix/styles/margin.scss diff --git a/front/salix/src/styles/misc.scss b/front/salix/styles/misc.scss similarity index 100% rename from front/salix/src/styles/misc.scss rename to front/salix/styles/misc.scss diff --git a/front/salix/src/styles/order-product.scss b/front/salix/styles/order-product.scss similarity index 100% rename from front/salix/src/styles/order-product.scss rename to front/salix/styles/order-product.scss diff --git a/front/salix/src/styles/padding.scss b/front/salix/styles/padding.scss similarity index 100% rename from front/salix/src/styles/padding.scss rename to front/salix/styles/padding.scss diff --git a/front/salix/src/styles/summary.scss b/front/salix/styles/summary.scss similarity index 100% rename from front/salix/src/styles/summary.scss rename to front/salix/styles/summary.scss diff --git a/front/salix/src/styles/title.scss b/front/salix/styles/title.scss similarity index 100% rename from front/salix/src/styles/title.scss rename to front/salix/styles/title.scss diff --git a/front/vendor/index.js b/front/vendor/index.js deleted file mode 100644 index 4671f393a..000000000 --- a/front/vendor/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import '@babel/polyfill'; -export * from './src/vendor'; diff --git a/front/vendor/src/angular-cookies.js b/front/vendor/src/angular-cookies.js deleted file mode 100644 index 559ea067b..000000000 --- a/front/vendor/src/angular-cookies.js +++ /dev/null @@ -1,5 +0,0 @@ -import 'angular-cookies'; - -export const angularCookies = { - name: 'ngCookies' -}; diff --git a/front/vendor/src/angular-translate.js b/front/vendor/src/angular-translate.js deleted file mode 100644 index aedc10067..000000000 --- a/front/vendor/src/angular-translate.js +++ /dev/null @@ -1,6 +0,0 @@ -import 'angular-translate'; -import 'angular-translate-loader-partial'; - -export const angularTranslate = { - name: 'pascalprecht.translate' -}; diff --git a/front/vendor/src/angular-ui-router.js b/front/vendor/src/angular-ui-router.js deleted file mode 100644 index cb0d4a321..000000000 --- a/front/vendor/src/angular-ui-router.js +++ /dev/null @@ -1,5 +0,0 @@ -import '@uirouter/angularjs'; - -export const angularUiRouter = { - name: 'ui.router' -}; diff --git a/front/vendor/src/angular.js b/front/vendor/src/angular.js deleted file mode 100644 index 769e23ede..000000000 --- a/front/vendor/src/angular.js +++ /dev/null @@ -1,8 +0,0 @@ -import * as angular from 'angular'; - -export const ng = { - module: angular.module, - bootstrap: angular.bootstrap, - $$minErr: angular.$$minErr, - angular: angular -}; diff --git a/front/vendor/src/flatpickr.js b/front/vendor/src/flatpickr.js deleted file mode 100644 index 8637b3b6a..000000000 --- a/front/vendor/src/flatpickr.js +++ /dev/null @@ -1,6 +0,0 @@ -import Flatpickr from 'flatpickr'; -import 'flatpickr/dist/flatpickr.min.css'; -import 'flatpickr/dist/themes/material_orange.css'; -import localeEs from 'flatpickr/dist/l10n/es'; -Flatpickr.l10ns.es = localeEs.es; -export default Flatpickr; diff --git a/front/vendor/src/material-design-lite.js b/front/vendor/src/material-design-lite.js deleted file mode 100644 index 3f0d1a719..000000000 --- a/front/vendor/src/material-design-lite.js +++ /dev/null @@ -1,4 +0,0 @@ -import * as mdl from 'material-design-lite'; -import 'material-design-lite/dist/material.orange-deep_orange.min.css'; - -export const materialDesignLite = mdl; diff --git a/front/vendor/src/mg-crud.js b/front/vendor/src/mg-crud.js deleted file mode 100644 index 294751582..000000000 --- a/front/vendor/src/mg-crud.js +++ /dev/null @@ -1,5 +0,0 @@ -import 'mg-crud'; - -export const mgCrud = { - name: 'mgCrud' -}; diff --git a/front/vendor/src/oc-lazy-load.js b/front/vendor/src/oc-lazy-load.js deleted file mode 100644 index fbb7749a8..000000000 --- a/front/vendor/src/oc-lazy-load.js +++ /dev/null @@ -1,5 +0,0 @@ -import 'oclazyload'; - -export const ocLazyLoad = { - name: 'oc.lazyLoad' -}; diff --git a/front/vendor/src/validator.js b/front/vendor/src/validator.js deleted file mode 100644 index 1bed18e46..000000000 --- a/front/vendor/src/validator.js +++ /dev/null @@ -1,3 +0,0 @@ -import * as validatorJs from 'validator'; - -export const validator = validatorJs; diff --git a/front/vendor/src/vendor.js b/front/vendor/src/vendor.js deleted file mode 100644 index 02fbb7362..000000000 --- a/front/vendor/src/vendor.js +++ /dev/null @@ -1,8 +0,0 @@ -export * from './angular'; -export * from './angular-cookies'; -export * from './angular-translate'; -export * from './angular-ui-router'; -export * from './mg-crud'; -export * from './oc-lazy-load'; -export * from './material-design-lite'; -export * from './validator'; diff --git a/gulpfile.js b/gulpfile.js index 635141fdb..ce837dcb2 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -18,8 +18,9 @@ let env = process.env.NODE_ENV ? process.env.NODE_ENV : 'development'; let langs = ['es', 'en']; let srcDir = './front'; +let modulesDir = './modules'; let servicesDir = './services'; -let services = require('./services/services.yml'); +let services = require('./modules.yml'); let wpConfig = require('./webpack.config.yml'); let buildDir = wpConfig.buildDir; @@ -56,7 +57,7 @@ gulp.task('services', async() => { * Starts backend services. */ gulp.task('services-only', callback => { - let app = require(`./services/loopback/server/server`); + let app = require(`./loopback/server/server`); app.start(defaultPort); app.on('started', callback); }); @@ -101,7 +102,7 @@ gulp.task('smokes-only', () => { // gulp.task('test-only', () => { // const jasmine = require('gulp-jasmine'); -// gulp.src('./services/loopback/common/**/*[sS]pec.js') +// gulp.src('./loopback/common/**/*[sS]pec.js') // .pipe(jasmine( // require('./services-test.config') // )); @@ -343,7 +344,10 @@ gulp.task('webpack-dev-server', function(callback) { // Locale -let localeFiles = `${srcDir}/**/locale/*.yml`; +let localeFiles = [ + `${srcDir}/**/locale/*.yml`, + `${modulesDir}/*/front/**/locale/*.yml` +]; /** * Mixes all locale files into one JSON file per module and language. It looks @@ -354,13 +358,21 @@ gulp.task('locales', function() { const extend = require('gulp-extend'); const yaml = require('gulp-yaml'); const merge = require('merge-stream'); - const modules = require('./front/modules.yml'); let streams = []; + let localePaths = []; - for (let mod in modules) { + for (let mod of services) + localePaths[mod] = `${modulesDir}/${mod}`; + + let baseMods = ['core', 'auth', 'salix']; + for (let mod of baseMods) + localePaths[mod] = `${srcDir}/${mod}`; + + for (let mod in localePaths) { + let path = localePaths[mod]; for (let lang of langs) { - let localeFiles = `./front/${mod}/**/locale/${lang}.yml`; + let localeFiles = `${path}/**/locale/${lang}.yml`; streams.push(gulp.src(localeFiles) .pipe(yaml()) .pipe(extend(`${lang}.json`)) @@ -373,7 +385,7 @@ gulp.task('locales', function() { // Routes -let routeFiles = `./modules/*/front/routes.json`; +let routeFiles = `${modulesDir}/*/front/routes.json`; gulp.task('routes', function() { const concat = require('gulp-concat'); diff --git a/services/loopback/README.md b/loopback/README.md similarity index 100% rename from services/loopback/README.md rename to loopback/README.md diff --git a/services/loopback/client/auth.ejs b/loopback/client/auth.ejs similarity index 100% rename from services/loopback/client/auth.ejs rename to loopback/client/auth.ejs diff --git a/services/loopback/client/index.ejs b/loopback/client/index.ejs similarity index 100% rename from services/loopback/client/index.ejs rename to loopback/client/index.ejs diff --git a/services/loopback/client/version-notes.html b/loopback/client/version-notes.html similarity index 100% rename from services/loopback/client/version-notes.html rename to loopback/client/version-notes.html diff --git a/services/loopback/common/methods/vn-model/getSetValues.js b/loopback/common/methods/vn-model/getSetValues.js similarity index 100% rename from services/loopback/common/methods/vn-model/getSetValues.js rename to loopback/common/methods/vn-model/getSetValues.js diff --git a/services/loopback/common/methods/vn-model/specs/crud.spec.js b/loopback/common/methods/vn-model/specs/crud.spec.js similarity index 100% rename from services/loopback/common/methods/vn-model/specs/crud.spec.js rename to loopback/common/methods/vn-model/specs/crud.spec.js diff --git a/services/loopback/common/methods/vn-model/specs/getSetValues.spec.js b/loopback/common/methods/vn-model/specs/getSetValues.spec.js similarity index 100% rename from services/loopback/common/methods/vn-model/specs/getSetValues.spec.js rename to loopback/common/methods/vn-model/specs/getSetValues.spec.js diff --git a/services/loopback/common/methods/vn-model/specs/rewriteDbError.spec.js b/loopback/common/methods/vn-model/specs/rewriteDbError.spec.js similarity index 100% rename from services/loopback/common/methods/vn-model/specs/rewriteDbError.spec.js rename to loopback/common/methods/vn-model/specs/rewriteDbError.spec.js diff --git a/services/loopback/common/models/field-acl.json b/loopback/common/models/field-acl.json similarity index 100% rename from services/loopback/common/models/field-acl.json rename to loopback/common/models/field-acl.json diff --git a/services/loopback/common/models/loggable.js b/loopback/common/models/loggable.js similarity index 100% rename from services/loopback/common/models/loggable.js rename to loopback/common/models/loggable.js diff --git a/services/loopback/common/models/loggable.json b/loopback/common/models/loggable.json similarity index 100% rename from services/loopback/common/models/loggable.json rename to loopback/common/models/loggable.json diff --git a/services/loopback/common/models/vn-model.js b/loopback/common/models/vn-model.js similarity index 97% rename from services/loopback/common/models/vn-model.js rename to loopback/common/models/vn-model.js index 7763b9f66..656332692 100644 --- a/services/loopback/common/models/vn-model.js +++ b/loopback/common/models/vn-model.js @@ -1,6 +1,6 @@ const ParameterizedSQL = require('loopback-connector').ParameterizedSQL; -const UserError = require('vn-loopback/common/helpers').UserError; +const UserError = require('vn-loopback/util/user-error'); module.exports = function(Self) { Self.ParameterizedSQL = ParameterizedSQL; @@ -130,7 +130,7 @@ module.exports = function(Self) { this.once('attached', () => { let realUpsert = this.upsert; - this.upsert = async (data, options, cb) => { + this.upsert = async(data, options, cb) => { if (options instanceof Function) { cb = options; options = null; @@ -149,7 +149,7 @@ module.exports = function(Self) { }; let realCreate = this.create; - this.create = async (data, options, cb) => { + this.create = async(data, options, cb) => { if (options instanceof Function) { cb = options; options = null; diff --git a/services/loopback/common/models/vn-model.json b/loopback/common/models/vn-model.json similarity index 100% rename from services/loopback/common/models/vn-model.json rename to loopback/common/models/vn-model.json diff --git a/services/loopback/favicon.ico b/loopback/favicon.ico similarity index 100% rename from services/loopback/favicon.ico rename to loopback/favicon.ico diff --git a/services/loopback/common/locale/en.json b/loopback/locale/en.json similarity index 100% rename from services/loopback/common/locale/en.json rename to loopback/locale/en.json diff --git a/services/loopback/common/locale/es.json b/loopback/locale/es.json similarity index 100% rename from services/loopback/common/locale/es.json rename to loopback/locale/es.json diff --git a/services/loopback/package.json b/loopback/package.json similarity index 100% rename from services/loopback/package.json rename to loopback/package.json diff --git a/services/loopback/server/application.json b/loopback/server/application.json similarity index 100% rename from services/loopback/server/application.json rename to loopback/server/application.json diff --git a/services/loopback/server/boot/auth.js b/loopback/server/boot/auth.js similarity index 100% rename from services/loopback/server/boot/auth.js rename to loopback/server/boot/auth.js diff --git a/services/loopback/server/boot/root.js b/loopback/server/boot/root.js similarity index 95% rename from services/loopback/server/boot/root.js rename to loopback/server/boot/root.js index d71fe0387..7a4563f61 100644 --- a/services/loopback/server/boot/root.js +++ b/loopback/server/boot/root.js @@ -27,7 +27,7 @@ module.exports = function(app) { app.enableAuth(); - var router = app.loopback.Router(); + let router = app.loopback.Router(); router.get('/status', app.loopback.status()); app.use(router); /* diff --git a/services/loopback/server/boot/salix.js b/loopback/server/boot/salix.js similarity index 100% rename from services/loopback/server/boot/salix.js rename to loopback/server/boot/salix.js diff --git a/services/loopback/server/boot/specs/auth.spec.js b/loopback/server/boot/specs/auth.spec.js similarity index 100% rename from services/loopback/server/boot/specs/auth.spec.js rename to loopback/server/boot/specs/auth.spec.js diff --git a/services/loopback/server/boot/validations.js b/loopback/server/boot/validations.js similarity index 100% rename from services/loopback/server/boot/validations.js rename to loopback/server/boot/validations.js diff --git a/services/loopback/server/component-config.json b/loopback/server/component-config.json similarity index 100% rename from services/loopback/server/component-config.json rename to loopback/server/component-config.json diff --git a/services/loopback/server/config.json b/loopback/server/config.json similarity index 100% rename from services/loopback/server/config.json rename to loopback/server/config.json diff --git a/services/loopback/server/connectors/vn-mysql.js b/loopback/server/connectors/vn-mysql.js similarity index 100% rename from services/loopback/server/connectors/vn-mysql.js rename to loopback/server/connectors/vn-mysql.js diff --git a/services/loopback/server/datasources.json b/loopback/server/datasources.json similarity index 100% rename from services/loopback/server/datasources.json rename to loopback/server/datasources.json diff --git a/services/loopback/server/middleware.development.json b/loopback/server/middleware.development.json similarity index 100% rename from services/loopback/server/middleware.development.json rename to loopback/server/middleware.development.json diff --git a/services/loopback/server/middleware.json b/loopback/server/middleware.json similarity index 100% rename from services/loopback/server/middleware.json rename to loopback/server/middleware.json diff --git a/services/loopback/server/middleware/cors.js b/loopback/server/middleware/cors.js similarity index 100% rename from services/loopback/server/middleware/cors.js rename to loopback/server/middleware/cors.js diff --git a/services/loopback/server/middleware/current-user.js b/loopback/server/middleware/current-user.js similarity index 100% rename from services/loopback/server/middleware/current-user.js rename to loopback/server/middleware/current-user.js diff --git a/services/loopback/server/middleware/error-handler.js b/loopback/server/middleware/error-handler.js similarity index 92% rename from services/loopback/server/middleware/error-handler.js rename to loopback/server/middleware/error-handler.js index bf600ce53..2ac11f608 100644 --- a/services/loopback/server/middleware/error-handler.js +++ b/loopback/server/middleware/error-handler.js @@ -1,4 +1,4 @@ -const UserError = require('../../common/helpers').UserError; +const UserError = require('../../util/user-error'); module.exports = function() { return function(err, req, res, next) { diff --git a/services/loopback/server/model-config.json b/loopback/server/model-config.json similarity index 100% rename from services/loopback/server/model-config.json rename to loopback/server/model-config.json diff --git a/services/loopback/server/server.js b/loopback/server/server.js similarity index 82% rename from services/loopback/server/server.js rename to loopback/server/server.js index c97548a84..0fedab0bc 100644 --- a/services/loopback/server/server.js +++ b/loopback/server/server.js @@ -23,10 +23,19 @@ DataSource._resolveConnector = function(...args) { }; let app = loopback(); -let rootDir = __dirname; - module.exports = app; +// Configuration + +let rootDir = __dirname; +let lbDir = path.resolve(`${rootDir}/..`); +let appDir = path.resolve(`${__dirname}/../..`); +let localeDir = `${lbDir}/locale`; +let viewDir = `${lbDir}/client`; +let buildDir = `${appDir}/dist`; +let servicesDir = `${appDir}/modules`; +let modulesPath = `${appDir}/modules.yml`; + // TODO: It should be stored at some config file app.set('api key', 'salix'); app.set('url auth', '/auth'); @@ -36,8 +45,6 @@ app.use(cookieParser()); // Internationalization -let localeDir = `${__dirname}/../common/locale`; - if (fs.existsSync(localeDir)) { i18n.configure({ directory: localeDir, @@ -49,18 +56,13 @@ if (fs.existsSync(localeDir)) { // View -let viewDir = `${rootDir}/../client`; - if (fs.existsSync(viewDir)) { app.set('view engine', 'ejs'); app.set('views', viewDir); - app.use(loopback.static(path.resolve(rootDir, '../client'))); + app.use(loopback.static(viewDir)); } -let assetsPath = [ - viewDir, - `${__dirname}/../../../dist` -]; +let assetsPath = [buildDir]; let wpAssets; let wpAssetsFound = false; @@ -91,7 +93,7 @@ app.getWpAssets = function(entryPoint) { // Initialization -app.start = function(port, callback) { +app.start = function(port) { function onListen() { let baseUrl = app.get('url').replace(/\/$/, ''); let explorerPath = app.get('loopback-component-explorer').mountPath; @@ -108,8 +110,6 @@ let config = require('./config.json'); for (let key in config) app.set(key, config[key]); -let servicesDir = path.resolve(`${__dirname}/../../../modules`); - let modelConfigFiles = [ `${__dirname}/model-config.json` ]; @@ -127,13 +127,17 @@ let bootDirs = [ `${__dirname}/boot` ]; -let services = require(`../../services.yml`); -for (let service of services) { - let baseDir = `${servicesDir}/${service}`; - modelConfigFiles.push(`${baseDir}/model-config.json`); - modelSources.push(`${baseDir}/models`); - mixinDirs.push(`${baseDir}/mixins`); - bootDirs.push(`${baseDir}/boot`); +addPath(`${appDir}/back`); + +let services = require(modulesPath); +for (let service of services) + addPath(`${servicesDir}/${service}/back`); + +function addPath(path) { + modelConfigFiles.push(`${path}/model-config.json`); + modelSources.push(`${path}/models`); + mixinDirs.push(`${path}/mixins`); + bootDirs.push(`${path}/boot`); } let models = {}; diff --git a/services/loopback/common/filter.js b/loopback/util/filter.js similarity index 93% rename from services/loopback/common/filter.js rename to loopback/util/filter.js index 73833116f..0681c41c1 100644 --- a/services/loopback/common/filter.js +++ b/loopback/util/filter.js @@ -8,13 +8,15 @@ function fieldsToObject(fields) { let fieldsObj = {}; - if (Array.isArray(fields)) + if (Array.isArray(fields)) { for (let field of fields) fieldsObj[field] = true; - else if (typeof fields == 'object') - for (let field in fields) + } else if (typeof fields == 'object') { + for (let field in fields) { if (fields[field]) fieldsObj[field] = true; + } + } return fieldsObj; } @@ -81,7 +83,7 @@ function mergeFilters(src, dst) { } function simplifyOperation(operation, operator) { - switch(operation.length) { + switch (operation.length) { case 0: return undefined; case 1: diff --git a/services/loopback/common/helpers.js b/loopback/util/hook.js similarity index 77% rename from services/loopback/common/helpers.js rename to loopback/util/hook.js index d81d8c513..653681aea 100644 --- a/services/loopback/common/helpers.js +++ b/loopback/util/hook.js @@ -1,12 +1,10 @@ -exports.UserError = class UserError extends Error { - constructor(message, ...translateArgs) { - super(message); - this.name = 'UserError'; - this.statusCode = 400; - this.translateArgs = translateArgs; - } -}; +/** + * Computes the final instance state after hook is executed. + * + * @param {Object} ctx The hook context + * @return {Object} The final instance state + */ exports.getFinalState = function(ctx) { if (ctx.isNewInstance) return ctx.instance; @@ -20,6 +18,12 @@ exports.getFinalState = function(ctx) { return null; }; +/** + * Determines if hook is affecting multiple instances. + * + * @param {Object} ctx The hook context + * @return {Boolean} %true for multiple instances, %false otherwhise + */ exports.isMultiple = function(ctx) { return !ctx.isNewInstance && !ctx.currentInstance; }; diff --git a/loopback/util/user-error.js b/loopback/util/user-error.js new file mode 100644 index 000000000..7ba4f10f2 --- /dev/null +++ b/loopback/util/user-error.js @@ -0,0 +1,14 @@ +/** + * Class used for user-readable errors. All thrown errors of this + * class will be translated, propagated to the client and displayed to + * the final user, so they cannot contain sensitive data and must + * be understandable by people who do not have a technical profile. + */ +module.exports = class UserError extends Error { + constructor(message, ...translateArgs) { + super(message); + this.name = 'UserError'; + this.statusCode = 400; + this.translateArgs = translateArgs; + } +}; diff --git a/services/services.yml b/modules.yml similarity index 90% rename from services/services.yml rename to modules.yml index 64406cbfa..4ea8a6493 100644 --- a/services/services.yml +++ b/modules.yml @@ -1,5 +1,4 @@ [ - salix, client, item, ticket, diff --git a/modules/agency/methods/agency/getFirstShipped.js b/modules/agency/back/methods/agency/getFirstShipped.js similarity index 100% rename from modules/agency/methods/agency/getFirstShipped.js rename to modules/agency/back/methods/agency/getFirstShipped.js diff --git a/modules/agency/methods/agency/landsThatDay.js b/modules/agency/back/methods/agency/landsThatDay.js similarity index 100% rename from modules/agency/methods/agency/landsThatDay.js rename to modules/agency/back/methods/agency/landsThatDay.js diff --git a/modules/agency/model-config.json b/modules/agency/back/model-config.json similarity index 100% rename from modules/agency/model-config.json rename to modules/agency/back/model-config.json diff --git a/modules/agency/models/agency-mode.json b/modules/agency/back/models/agency-mode.json similarity index 100% rename from modules/agency/models/agency-mode.json rename to modules/agency/back/models/agency-mode.json diff --git a/modules/agency/models/agency.js b/modules/agency/back/models/agency.js similarity index 100% rename from modules/agency/models/agency.js rename to modules/agency/back/models/agency.js diff --git a/modules/agency/models/agency.json b/modules/agency/back/models/agency.json similarity index 100% rename from modules/agency/models/agency.json rename to modules/agency/back/models/agency.json diff --git a/modules/agency/models/delivery-method.json b/modules/agency/back/models/delivery-method.json similarity index 100% rename from modules/agency/models/delivery-method.json rename to modules/agency/back/models/delivery-method.json diff --git a/modules/agency/models/zone-calendar.json b/modules/agency/back/models/zone-calendar.json similarity index 100% rename from modules/agency/models/zone-calendar.json rename to modules/agency/back/models/zone-calendar.json diff --git a/modules/agency/models/zone-geo.json b/modules/agency/back/models/zone-geo.json similarity index 100% rename from modules/agency/models/zone-geo.json rename to modules/agency/back/models/zone-geo.json diff --git a/modules/agency/models/zone-included.json b/modules/agency/back/models/zone-included.json similarity index 100% rename from modules/agency/models/zone-included.json rename to modules/agency/back/models/zone-included.json diff --git a/modules/agency/models/zone.js b/modules/agency/back/models/zone.js similarity index 100% rename from modules/agency/models/zone.js rename to modules/agency/back/models/zone.js diff --git a/modules/agency/models/zone.json b/modules/agency/back/models/zone.json similarity index 100% rename from modules/agency/models/zone.json rename to modules/agency/back/models/zone.json diff --git a/modules/agency/front/src/calendar/index.html b/modules/agency/front/calendar/index.html similarity index 100% rename from modules/agency/front/src/calendar/index.html rename to modules/agency/front/calendar/index.html diff --git a/modules/agency/front/src/calendar/index.js b/modules/agency/front/calendar/index.js similarity index 100% rename from modules/agency/front/src/calendar/index.js rename to modules/agency/front/calendar/index.js diff --git a/modules/agency/front/src/card/index.html b/modules/agency/front/card/index.html similarity index 100% rename from modules/agency/front/src/card/index.html rename to modules/agency/front/card/index.html diff --git a/modules/agency/front/src/card/index.js b/modules/agency/front/card/index.js similarity index 100% rename from modules/agency/front/src/card/index.js rename to modules/agency/front/card/index.js diff --git a/modules/agency/front/src/card/index.spec.js b/modules/agency/front/card/index.spec.js similarity index 100% rename from modules/agency/front/src/card/index.spec.js rename to modules/agency/front/card/index.spec.js diff --git a/modules/agency/front/src/create/index.html b/modules/agency/front/create/index.html similarity index 100% rename from modules/agency/front/src/create/index.html rename to modules/agency/front/create/index.html diff --git a/modules/agency/front/src/create/index.js b/modules/agency/front/create/index.js similarity index 100% rename from modules/agency/front/src/create/index.js rename to modules/agency/front/create/index.js diff --git a/modules/agency/front/src/create/index.spec.js b/modules/agency/front/create/index.spec.js similarity index 96% rename from modules/agency/front/src/create/index.spec.js rename to modules/agency/front/create/index.spec.js index f7ee10e3a..257187e46 100644 --- a/modules/agency/front/src/create/index.spec.js +++ b/modules/agency/front/create/index.spec.js @@ -1,5 +1,5 @@ import './index'; -import watcher from 'mocks/watcher'; +import watcher from 'core/mocks/watcher'; describe('Agency', () => { describe('Component vnZoneCreate', () => { diff --git a/modules/agency/front/src/create/locale/es.yml b/modules/agency/front/create/locale/es.yml similarity index 100% rename from modules/agency/front/src/create/locale/es.yml rename to modules/agency/front/create/locale/es.yml diff --git a/modules/agency/front/src/descriptor/index.html b/modules/agency/front/descriptor/index.html similarity index 100% rename from modules/agency/front/src/descriptor/index.html rename to modules/agency/front/descriptor/index.html diff --git a/modules/agency/front/src/descriptor/index.js b/modules/agency/front/descriptor/index.js similarity index 100% rename from modules/agency/front/src/descriptor/index.js rename to modules/agency/front/descriptor/index.js diff --git a/modules/agency/front/src/edit/index.html b/modules/agency/front/edit/index.html similarity index 100% rename from modules/agency/front/src/edit/index.html rename to modules/agency/front/edit/index.html diff --git a/modules/agency/front/src/edit/index.js b/modules/agency/front/edit/index.js similarity index 100% rename from modules/agency/front/src/edit/index.js rename to modules/agency/front/edit/index.js diff --git a/modules/agency/front/index.js b/modules/agency/front/index.js index 8420b1093..199deb6a0 100644 --- a/modules/agency/front/index.js +++ b/modules/agency/front/index.js @@ -1 +1,11 @@ -export * from './src'; +export * from './module'; + +import './index/'; +import './summary'; +import './card'; +import './descriptor'; +import './search-panel'; +import './create'; +import './edit'; +import './location'; +import './calendar'; diff --git a/modules/agency/front/src/index/index.html b/modules/agency/front/index/index.html similarity index 100% rename from modules/agency/front/src/index/index.html rename to modules/agency/front/index/index.html diff --git a/modules/agency/front/src/index/index.js b/modules/agency/front/index/index.js similarity index 100% rename from modules/agency/front/src/index/index.js rename to modules/agency/front/index/index.js diff --git a/modules/agency/front/src/index/index.spec.js b/modules/agency/front/index/index.spec.js similarity index 100% rename from modules/agency/front/src/index/index.spec.js rename to modules/agency/front/index/index.spec.js diff --git a/modules/agency/front/src/locale/en.yml b/modules/agency/front/locale/en.yml similarity index 100% rename from modules/agency/front/src/locale/en.yml rename to modules/agency/front/locale/en.yml diff --git a/modules/agency/front/src/locale/es.yml b/modules/agency/front/locale/es.yml similarity index 100% rename from modules/agency/front/src/locale/es.yml rename to modules/agency/front/locale/es.yml diff --git a/modules/agency/front/src/location-search-panel/index.html b/modules/agency/front/location-search-panel/index.html similarity index 100% rename from modules/agency/front/src/location-search-panel/index.html rename to modules/agency/front/location-search-panel/index.html diff --git a/modules/agency/front/src/location-search-panel/index.js b/modules/agency/front/location-search-panel/index.js similarity index 68% rename from modules/agency/front/src/location-search-panel/index.js rename to modules/agency/front/location-search-panel/index.js index 4d362e638..c877bc83e 100644 --- a/modules/agency/front/src/location-search-panel/index.js +++ b/modules/agency/front/location-search-panel/index.js @@ -1,5 +1,5 @@ import ngModule from '../module'; -import SearchPanel from 'core/src/components/searchbar/search-panel'; +import SearchPanel from 'core/components/searchbar/search-panel'; ngModule.component('vnLocationSearchPanel', { template: require('./index.html'), diff --git a/modules/agency/front/src/location/index.html b/modules/agency/front/location/index.html similarity index 100% rename from modules/agency/front/src/location/index.html rename to modules/agency/front/location/index.html diff --git a/modules/agency/front/src/location/index.js b/modules/agency/front/location/index.js similarity index 100% rename from modules/agency/front/src/location/index.js rename to modules/agency/front/location/index.js diff --git a/modules/agency/front/module.js b/modules/agency/front/module.js new file mode 100644 index 000000000..cf38d7fe9 --- /dev/null +++ b/modules/agency/front/module.js @@ -0,0 +1,3 @@ +import {ng} from 'core/vendor'; + +export default ng.module('agency', ['vnCore']); diff --git a/modules/agency/front/src/search-panel/index.html b/modules/agency/front/search-panel/index.html similarity index 100% rename from modules/agency/front/src/search-panel/index.html rename to modules/agency/front/search-panel/index.html diff --git a/modules/agency/front/src/search-panel/index.js b/modules/agency/front/search-panel/index.js similarity index 67% rename from modules/agency/front/src/search-panel/index.js rename to modules/agency/front/search-panel/index.js index 3e00e284b..c01ac35e5 100644 --- a/modules/agency/front/src/search-panel/index.js +++ b/modules/agency/front/search-panel/index.js @@ -1,5 +1,5 @@ import ngModule from '../module'; -import SearchPanel from 'core/src/components/searchbar/search-panel'; +import SearchPanel from 'core/components/searchbar/search-panel'; ngModule.component('vnZoneSearchPanel', { template: require('./index.html'), diff --git a/modules/agency/front/src/index.js b/modules/agency/front/src/index.js deleted file mode 100644 index 78336e6ee..000000000 --- a/modules/agency/front/src/index.js +++ /dev/null @@ -1,12 +0,0 @@ -export * from './module'; - -// import components -import './index/index'; -import './summary'; -import './card'; -import './descriptor'; -import './search-panel'; -import './create'; -import './edit'; -import './location'; -import './calendar'; diff --git a/modules/agency/front/src/module.js b/modules/agency/front/src/module.js deleted file mode 100644 index c632f66e3..000000000 --- a/modules/agency/front/src/module.js +++ /dev/null @@ -1,5 +0,0 @@ -import {ng} from 'vendor'; -import 'core'; - -const ngModule = ng.module('agency', ['vnCore']); -export default ngModule; diff --git a/modules/agency/front/src/summary/index.html b/modules/agency/front/summary/index.html similarity index 100% rename from modules/agency/front/src/summary/index.html rename to modules/agency/front/summary/index.html diff --git a/modules/agency/front/src/summary/index.js b/modules/agency/front/summary/index.js similarity index 100% rename from modules/agency/front/src/summary/index.js rename to modules/agency/front/summary/index.js diff --git a/modules/claim/methods/claim-beginning/importToNewRefundTicket.js b/modules/claim/back/methods/claim-beginning/importToNewRefundTicket.js similarity index 100% rename from modules/claim/methods/claim-beginning/importToNewRefundTicket.js rename to modules/claim/back/methods/claim-beginning/importToNewRefundTicket.js diff --git a/modules/claim/methods/claim-beginning/importToNewRefundTicket.spec.js b/modules/claim/back/methods/claim-beginning/importToNewRefundTicket.spec.js similarity index 100% rename from modules/claim/methods/claim-beginning/importToNewRefundTicket.spec.js rename to modules/claim/back/methods/claim-beginning/importToNewRefundTicket.spec.js diff --git a/modules/claim/methods/claim-end/importTicketSales.js b/modules/claim/back/methods/claim-end/importTicketSales.js similarity index 100% rename from modules/claim/methods/claim-end/importTicketSales.js rename to modules/claim/back/methods/claim-end/importTicketSales.js diff --git a/modules/claim/methods/claim-end/specs/importTicketSales.spec.js b/modules/claim/back/methods/claim-end/specs/importTicketSales.spec.js similarity index 100% rename from modules/claim/methods/claim-end/specs/importTicketSales.spec.js rename to modules/claim/back/methods/claim-end/specs/importTicketSales.spec.js diff --git a/modules/claim/methods/claim/createFromSales.js b/modules/claim/back/methods/claim/createFromSales.js similarity index 100% rename from modules/claim/methods/claim/createFromSales.js rename to modules/claim/back/methods/claim/createFromSales.js diff --git a/modules/claim/methods/claim/getSummary.js b/modules/claim/back/methods/claim/getSummary.js similarity index 100% rename from modules/claim/methods/claim/getSummary.js rename to modules/claim/back/methods/claim/getSummary.js diff --git a/modules/claim/methods/claim/regularizeClaim.js b/modules/claim/back/methods/claim/regularizeClaim.js similarity index 100% rename from modules/claim/methods/claim/regularizeClaim.js rename to modules/claim/back/methods/claim/regularizeClaim.js diff --git a/modules/claim/methods/claim/specs/createFromSales.spec.js b/modules/claim/back/methods/claim/specs/createFromSales.spec.js similarity index 100% rename from modules/claim/methods/claim/specs/createFromSales.spec.js rename to modules/claim/back/methods/claim/specs/createFromSales.spec.js diff --git a/modules/claim/methods/claim/specs/getSummary.spec.js b/modules/claim/back/methods/claim/specs/getSummary.spec.js similarity index 100% rename from modules/claim/methods/claim/specs/getSummary.spec.js rename to modules/claim/back/methods/claim/specs/getSummary.spec.js diff --git a/modules/claim/methods/claim/specs/regularizeClaim.spec.js b/modules/claim/back/methods/claim/specs/regularizeClaim.spec.js similarity index 100% rename from modules/claim/methods/claim/specs/regularizeClaim.spec.js rename to modules/claim/back/methods/claim/specs/regularizeClaim.spec.js diff --git a/modules/claim/methods/claim/specs/updateClaim.spec.js b/modules/claim/back/methods/claim/specs/updateClaim.spec.js similarity index 100% rename from modules/claim/methods/claim/specs/updateClaim.spec.js rename to modules/claim/back/methods/claim/specs/updateClaim.spec.js diff --git a/modules/claim/methods/claim/updateClaim.js b/modules/claim/back/methods/claim/updateClaim.js similarity index 96% rename from modules/claim/methods/claim/updateClaim.js rename to modules/claim/back/methods/claim/updateClaim.js index 3cc84aa4c..21dc23abb 100644 --- a/modules/claim/methods/claim/updateClaim.js +++ b/modules/claim/back/methods/claim/updateClaim.js @@ -1,4 +1,4 @@ -const UserError = require('vn-loopback/common/helpers').UserError; +const UserError = require('vn-loopback/util/user-error'); let pick = require('object.pick'); let diff = require('object-diff'); diff --git a/modules/claim/model-config.json b/modules/claim/back/model-config.json similarity index 100% rename from modules/claim/model-config.json rename to modules/claim/back/model-config.json diff --git a/modules/claim/models/claim-beginning.js b/modules/claim/back/models/claim-beginning.js similarity index 100% rename from modules/claim/models/claim-beginning.js rename to modules/claim/back/models/claim-beginning.js diff --git a/modules/claim/models/claim-beginning.json b/modules/claim/back/models/claim-beginning.json similarity index 100% rename from modules/claim/models/claim-beginning.json rename to modules/claim/back/models/claim-beginning.json diff --git a/modules/claim/models/claim-destination.json b/modules/claim/back/models/claim-destination.json similarity index 100% rename from modules/claim/models/claim-destination.json rename to modules/claim/back/models/claim-destination.json diff --git a/modules/claim/models/claim-development.json b/modules/claim/back/models/claim-development.json similarity index 100% rename from modules/claim/models/claim-development.json rename to modules/claim/back/models/claim-development.json diff --git a/modules/claim/models/claim-end.js b/modules/claim/back/models/claim-end.js similarity index 100% rename from modules/claim/models/claim-end.js rename to modules/claim/back/models/claim-end.js diff --git a/modules/claim/models/claim-end.json b/modules/claim/back/models/claim-end.json similarity index 100% rename from modules/claim/models/claim-end.json rename to modules/claim/back/models/claim-end.json diff --git a/modules/claim/models/claim-ratio.json b/modules/claim/back/models/claim-ratio.json similarity index 100% rename from modules/claim/models/claim-ratio.json rename to modules/claim/back/models/claim-ratio.json diff --git a/modules/claim/models/claim-reason.json b/modules/claim/back/models/claim-reason.json similarity index 100% rename from modules/claim/models/claim-reason.json rename to modules/claim/back/models/claim-reason.json diff --git a/modules/claim/models/claim-redelivery.json b/modules/claim/back/models/claim-redelivery.json similarity index 100% rename from modules/claim/models/claim-redelivery.json rename to modules/claim/back/models/claim-redelivery.json diff --git a/modules/claim/models/claim-responsible.json b/modules/claim/back/models/claim-responsible.json similarity index 100% rename from modules/claim/models/claim-responsible.json rename to modules/claim/back/models/claim-responsible.json diff --git a/modules/claim/models/claim-result.json b/modules/claim/back/models/claim-result.json similarity index 100% rename from modules/claim/models/claim-result.json rename to modules/claim/back/models/claim-result.json diff --git a/modules/claim/models/claim-state.json b/modules/claim/back/models/claim-state.json similarity index 100% rename from modules/claim/models/claim-state.json rename to modules/claim/back/models/claim-state.json diff --git a/modules/claim/models/claim.js b/modules/claim/back/models/claim.js similarity index 100% rename from modules/claim/models/claim.js rename to modules/claim/back/models/claim.js diff --git a/modules/claim/models/claim.json b/modules/claim/back/models/claim.json similarity index 100% rename from modules/claim/models/claim.json rename to modules/claim/back/models/claim.json diff --git a/modules/claim/front/src/action/index.html b/modules/claim/front/action/index.html similarity index 100% rename from modules/claim/front/src/action/index.html rename to modules/claim/front/action/index.html diff --git a/modules/claim/front/src/action/index.js b/modules/claim/front/action/index.js similarity index 100% rename from modules/claim/front/src/action/index.js rename to modules/claim/front/action/index.js diff --git a/modules/claim/front/src/action/index.spec.js b/modules/claim/front/action/index.spec.js similarity index 99% rename from modules/claim/front/src/action/index.spec.js rename to modules/claim/front/action/index.spec.js index cd78c1f5e..22f3f321b 100644 --- a/modules/claim/front/src/action/index.spec.js +++ b/modules/claim/front/action/index.spec.js @@ -1,5 +1,5 @@ import './index.js'; -import crudModel from 'mocks/crud-model'; +import crudModel from 'core/mocks/crud-model'; describe('claim', () => { describe('Component vnClaimAction', () => { diff --git a/modules/claim/front/src/action/locale/es.yml b/modules/claim/front/action/locale/es.yml similarity index 100% rename from modules/claim/front/src/action/locale/es.yml rename to modules/claim/front/action/locale/es.yml diff --git a/modules/claim/front/src/action/style.scss b/modules/claim/front/action/style.scss similarity index 100% rename from modules/claim/front/src/action/style.scss rename to modules/claim/front/action/style.scss diff --git a/modules/claim/front/src/basic-data/index.html b/modules/claim/front/basic-data/index.html similarity index 100% rename from modules/claim/front/src/basic-data/index.html rename to modules/claim/front/basic-data/index.html diff --git a/modules/claim/front/src/basic-data/index.js b/modules/claim/front/basic-data/index.js similarity index 100% rename from modules/claim/front/src/basic-data/index.js rename to modules/claim/front/basic-data/index.js diff --git a/modules/claim/front/src/basic-data/locale/es.yml b/modules/claim/front/basic-data/locale/es.yml similarity index 100% rename from modules/claim/front/src/basic-data/locale/es.yml rename to modules/claim/front/basic-data/locale/es.yml diff --git a/modules/claim/front/src/basic-data/style.scss b/modules/claim/front/basic-data/style.scss similarity index 100% rename from modules/claim/front/src/basic-data/style.scss rename to modules/claim/front/basic-data/style.scss diff --git a/modules/claim/front/src/card/index.html b/modules/claim/front/card/index.html similarity index 100% rename from modules/claim/front/src/card/index.html rename to modules/claim/front/card/index.html diff --git a/modules/claim/front/src/card/index.js b/modules/claim/front/card/index.js similarity index 100% rename from modules/claim/front/src/card/index.js rename to modules/claim/front/card/index.js diff --git a/modules/claim/front/src/card/index.spec.js b/modules/claim/front/card/index.spec.js similarity index 100% rename from modules/claim/front/src/card/index.spec.js rename to modules/claim/front/card/index.spec.js diff --git a/modules/claim/front/src/descriptor/index.html b/modules/claim/front/descriptor/index.html similarity index 100% rename from modules/claim/front/src/descriptor/index.html rename to modules/claim/front/descriptor/index.html diff --git a/modules/claim/front/src/descriptor/index.js b/modules/claim/front/descriptor/index.js similarity index 100% rename from modules/claim/front/src/descriptor/index.js rename to modules/claim/front/descriptor/index.js diff --git a/modules/claim/front/src/detail/index.html b/modules/claim/front/detail/index.html similarity index 100% rename from modules/claim/front/src/detail/index.html rename to modules/claim/front/detail/index.html diff --git a/modules/claim/front/src/detail/index.js b/modules/claim/front/detail/index.js similarity index 100% rename from modules/claim/front/src/detail/index.js rename to modules/claim/front/detail/index.js diff --git a/modules/claim/front/src/detail/index.spec.js b/modules/claim/front/detail/index.spec.js similarity index 98% rename from modules/claim/front/src/detail/index.spec.js rename to modules/claim/front/detail/index.spec.js index 41c3677da..312050619 100644 --- a/modules/claim/front/src/detail/index.spec.js +++ b/modules/claim/front/detail/index.spec.js @@ -1,5 +1,5 @@ import './index.js'; -import crudModel from 'mocks/crud-model'; +import crudModel from 'core/mocks/crud-model'; describe('claim', () => { describe('Component vnClaimDetail', () => { diff --git a/modules/claim/front/src/detail/locale/es.yml b/modules/claim/front/detail/locale/es.yml similarity index 100% rename from modules/claim/front/src/detail/locale/es.yml rename to modules/claim/front/detail/locale/es.yml diff --git a/modules/claim/front/src/detail/style.scss b/modules/claim/front/detail/style.scss similarity index 100% rename from modules/claim/front/src/detail/style.scss rename to modules/claim/front/detail/style.scss diff --git a/modules/claim/front/src/development/index.html b/modules/claim/front/development/index.html similarity index 100% rename from modules/claim/front/src/development/index.html rename to modules/claim/front/development/index.html diff --git a/modules/claim/front/src/development/index.js b/modules/claim/front/development/index.js similarity index 100% rename from modules/claim/front/src/development/index.js rename to modules/claim/front/development/index.js diff --git a/modules/claim/front/src/development/locale/es.yml b/modules/claim/front/development/locale/es.yml similarity index 100% rename from modules/claim/front/src/development/locale/es.yml rename to modules/claim/front/development/locale/es.yml diff --git a/modules/claim/front/src/development/style.scss b/modules/claim/front/development/style.scss similarity index 100% rename from modules/claim/front/src/development/style.scss rename to modules/claim/front/development/style.scss diff --git a/modules/claim/front/index.js b/modules/claim/front/index.js index 8420b1093..7e3bd07d9 100644 --- a/modules/claim/front/index.js +++ b/modules/claim/front/index.js @@ -1 +1,11 @@ -export * from './src'; +export * from './module'; + +import './index/'; +import './action'; +import './basic-data'; +import './card'; +import './detail'; +import './descriptor'; +import './development'; +import './search-panel'; +import './summary'; diff --git a/modules/claim/front/src/index/index.html b/modules/claim/front/index/index.html similarity index 100% rename from modules/claim/front/src/index/index.html rename to modules/claim/front/index/index.html diff --git a/modules/claim/front/src/index/index.js b/modules/claim/front/index/index.js similarity index 100% rename from modules/claim/front/src/index/index.js rename to modules/claim/front/index/index.js diff --git a/modules/claim/front/src/locale/es.yml b/modules/claim/front/locale/es.yml similarity index 100% rename from modules/claim/front/src/locale/es.yml rename to modules/claim/front/locale/es.yml diff --git a/modules/claim/front/module.js b/modules/claim/front/module.js new file mode 100644 index 000000000..f26df297b --- /dev/null +++ b/modules/claim/front/module.js @@ -0,0 +1,3 @@ +import {ng} from 'core/vendor'; + +export default ng.module('claim', ['vnCore']); diff --git a/modules/claim/front/src/search-panel/index.html b/modules/claim/front/search-panel/index.html similarity index 100% rename from modules/claim/front/src/search-panel/index.html rename to modules/claim/front/search-panel/index.html diff --git a/modules/claim/front/src/search-panel/index.js b/modules/claim/front/search-panel/index.js similarity index 68% rename from modules/claim/front/src/search-panel/index.js rename to modules/claim/front/search-panel/index.js index c15bf4be9..b6bd2b974 100644 --- a/modules/claim/front/src/search-panel/index.js +++ b/modules/claim/front/search-panel/index.js @@ -1,5 +1,5 @@ import ngModule from '../module'; -import SearchPanel from 'core/src/components/searchbar/search-panel'; +import SearchPanel from 'core/components/searchbar/search-panel'; ngModule.component('vnClaimSearchPanel', { template: require('./index.html'), diff --git a/modules/claim/front/src/search-panel/locale/es.yml b/modules/claim/front/search-panel/locale/es.yml similarity index 100% rename from modules/claim/front/src/search-panel/locale/es.yml rename to modules/claim/front/search-panel/locale/es.yml diff --git a/modules/claim/front/src/index.js b/modules/claim/front/src/index.js deleted file mode 100644 index f3cb8d052..000000000 --- a/modules/claim/front/src/index.js +++ /dev/null @@ -1,11 +0,0 @@ -export * from './module'; - -import './action'; -import './basic-data'; -import './card'; -import './detail'; -import './descriptor'; -import './development'; -import './index/'; -import './search-panel'; -import './summary'; diff --git a/modules/claim/front/src/module.js b/modules/claim/front/src/module.js deleted file mode 100644 index 14e9efcad..000000000 --- a/modules/claim/front/src/module.js +++ /dev/null @@ -1,5 +0,0 @@ -import {ng} from 'vendor'; -import 'core'; - -const ngModule = ng.module('claim', ['vnCore']); -export default ngModule; diff --git a/modules/claim/front/src/summary/index.html b/modules/claim/front/summary/index.html similarity index 100% rename from modules/claim/front/src/summary/index.html rename to modules/claim/front/summary/index.html diff --git a/modules/claim/front/src/summary/index.js b/modules/claim/front/summary/index.js similarity index 100% rename from modules/claim/front/src/summary/index.js rename to modules/claim/front/summary/index.js diff --git a/modules/claim/front/src/summary/index.spec.js b/modules/claim/front/summary/index.spec.js similarity index 100% rename from modules/claim/front/src/summary/index.spec.js rename to modules/claim/front/summary/index.spec.js diff --git a/modules/client/methods/client/activeWorkersWithRole.js b/modules/client/back/methods/client/activeWorkersWithRole.js similarity index 93% rename from modules/client/methods/client/activeWorkersWithRole.js rename to modules/client/back/methods/client/activeWorkersWithRole.js index edbc83382..5e13e9bf6 100644 --- a/modules/client/methods/client/activeWorkersWithRole.js +++ b/modules/client/back/methods/client/activeWorkersWithRole.js @@ -1,6 +1,6 @@ const ParameterizedSQL = require('loopback-connector').ParameterizedSQL; -const buildFilter = require('vn-loopback/common/filter').buildFilter; -const mergeFilters = require('vn-loopback/common/filter').mergeFilters; +const buildFilter = require('vn-loopback/util/filter').buildFilter; +const mergeFilters = require('vn-loopback/util/filter').mergeFilters; module.exports = Self => { Self.remoteMethod('activeWorkersWithRole', { diff --git a/modules/client/methods/client/addressesPropagateRe.js b/modules/client/back/methods/client/addressesPropagateRe.js similarity index 100% rename from modules/client/methods/client/addressesPropagateRe.js rename to modules/client/back/methods/client/addressesPropagateRe.js diff --git a/modules/client/methods/client/confirmTransaction.js b/modules/client/back/methods/client/confirmTransaction.js similarity index 100% rename from modules/client/methods/client/confirmTransaction.js rename to modules/client/back/methods/client/confirmTransaction.js diff --git a/modules/client/methods/client/createWithUser.js b/modules/client/back/methods/client/createWithUser.js similarity index 100% rename from modules/client/methods/client/createWithUser.js rename to modules/client/back/methods/client/createWithUser.js diff --git a/modules/client/methods/client/getAverageInvoiced.js b/modules/client/back/methods/client/getAverageInvoiced.js similarity index 100% rename from modules/client/methods/client/getAverageInvoiced.js rename to modules/client/back/methods/client/getAverageInvoiced.js diff --git a/modules/client/methods/client/getCard.js b/modules/client/back/methods/client/getCard.js similarity index 100% rename from modules/client/methods/client/getCard.js rename to modules/client/back/methods/client/getCard.js diff --git a/modules/client/methods/client/getDebt.js b/modules/client/back/methods/client/getDebt.js similarity index 100% rename from modules/client/methods/client/getDebt.js rename to modules/client/back/methods/client/getDebt.js diff --git a/modules/client/methods/client/getMana.js b/modules/client/back/methods/client/getMana.js similarity index 100% rename from modules/client/methods/client/getMana.js rename to modules/client/back/methods/client/getMana.js diff --git a/modules/client/methods/client/getTransactions.js b/modules/client/back/methods/client/getTransactions.js similarity index 100% rename from modules/client/methods/client/getTransactions.js rename to modules/client/back/methods/client/getTransactions.js diff --git a/modules/client/methods/client/hasCustomerRole.js b/modules/client/back/methods/client/hasCustomerRole.js similarity index 100% rename from modules/client/methods/client/hasCustomerRole.js rename to modules/client/back/methods/client/hasCustomerRole.js diff --git a/modules/client/methods/client/isValidClient.js b/modules/client/back/methods/client/isValidClient.js similarity index 100% rename from modules/client/methods/client/isValidClient.js rename to modules/client/back/methods/client/isValidClient.js diff --git a/modules/client/methods/client/listWorkers.js b/modules/client/back/methods/client/listWorkers.js similarity index 100% rename from modules/client/methods/client/listWorkers.js rename to modules/client/back/methods/client/listWorkers.js diff --git a/modules/client/methods/client/specs/activeWorkersWithRole.spec.js b/modules/client/back/methods/client/specs/activeWorkersWithRole.spec.js similarity index 100% rename from modules/client/methods/client/specs/activeWorkersWithRole.spec.js rename to modules/client/back/methods/client/specs/activeWorkersWithRole.spec.js diff --git a/modules/client/methods/client/specs/addressesPropagateRe.spec.js b/modules/client/back/methods/client/specs/addressesPropagateRe.spec.js similarity index 100% rename from modules/client/methods/client/specs/addressesPropagateRe.spec.js rename to modules/client/back/methods/client/specs/addressesPropagateRe.spec.js diff --git a/modules/client/methods/client/specs/confirmTransaction.spec.js b/modules/client/back/methods/client/specs/confirmTransaction.spec.js similarity index 100% rename from modules/client/methods/client/specs/confirmTransaction.spec.js rename to modules/client/back/methods/client/specs/confirmTransaction.spec.js diff --git a/modules/client/methods/client/specs/createWithUser.spec.js b/modules/client/back/methods/client/specs/createWithUser.spec.js similarity index 100% rename from modules/client/methods/client/specs/createWithUser.spec.js rename to modules/client/back/methods/client/specs/createWithUser.spec.js diff --git a/modules/client/methods/client/specs/getAverageInvoiced.spec.js b/modules/client/back/methods/client/specs/getAverageInvoiced.spec.js similarity index 100% rename from modules/client/methods/client/specs/getAverageInvoiced.spec.js rename to modules/client/back/methods/client/specs/getAverageInvoiced.spec.js diff --git a/modules/client/methods/client/specs/getCard.spec.js b/modules/client/back/methods/client/specs/getCard.spec.js similarity index 100% rename from modules/client/methods/client/specs/getCard.spec.js rename to modules/client/back/methods/client/specs/getCard.spec.js diff --git a/modules/client/methods/client/specs/getDebt.spec.js b/modules/client/back/methods/client/specs/getDebt.spec.js similarity index 100% rename from modules/client/methods/client/specs/getDebt.spec.js rename to modules/client/back/methods/client/specs/getDebt.spec.js diff --git a/modules/client/methods/client/specs/getMana.spec.js b/modules/client/back/methods/client/specs/getMana.spec.js similarity index 100% rename from modules/client/methods/client/specs/getMana.spec.js rename to modules/client/back/methods/client/specs/getMana.spec.js diff --git a/modules/client/methods/client/specs/getTransactions.spec.js b/modules/client/back/methods/client/specs/getTransactions.spec.js similarity index 100% rename from modules/client/methods/client/specs/getTransactions.spec.js rename to modules/client/back/methods/client/specs/getTransactions.spec.js diff --git a/modules/client/methods/client/specs/hasCustomerRole.spec.js b/modules/client/back/methods/client/specs/hasCustomerRole.spec.js similarity index 100% rename from modules/client/methods/client/specs/hasCustomerRole.spec.js rename to modules/client/back/methods/client/specs/hasCustomerRole.spec.js diff --git a/modules/client/methods/client/specs/isValidClient.spec.js b/modules/client/back/methods/client/specs/isValidClient.spec.js similarity index 100% rename from modules/client/methods/client/specs/isValidClient.spec.js rename to modules/client/back/methods/client/specs/isValidClient.spec.js diff --git a/modules/client/methods/client/specs/listWorkers.spec.js b/modules/client/back/methods/client/specs/listWorkers.spec.js similarity index 100% rename from modules/client/methods/client/specs/listWorkers.spec.js rename to modules/client/back/methods/client/specs/listWorkers.spec.js diff --git a/modules/client/methods/client/specs/summary.spec.js b/modules/client/back/methods/client/specs/summary.spec.js similarity index 100% rename from modules/client/methods/client/specs/summary.spec.js rename to modules/client/back/methods/client/specs/summary.spec.js diff --git a/modules/client/methods/client/specs/updateFiscalData.spec.js b/modules/client/back/methods/client/specs/updateFiscalData.spec.js similarity index 100% rename from modules/client/methods/client/specs/updateFiscalData.spec.js rename to modules/client/back/methods/client/specs/updateFiscalData.spec.js diff --git a/modules/client/methods/client/summary.js b/modules/client/back/methods/client/summary.js similarity index 100% rename from modules/client/methods/client/summary.js rename to modules/client/back/methods/client/summary.js diff --git a/modules/client/methods/client/updateFiscalData.js b/modules/client/back/methods/client/updateFiscalData.js similarity index 96% rename from modules/client/methods/client/updateFiscalData.js rename to modules/client/back/methods/client/updateFiscalData.js index fd9491c67..0f7810ed2 100644 --- a/modules/client/methods/client/updateFiscalData.js +++ b/modules/client/back/methods/client/updateFiscalData.js @@ -1,4 +1,4 @@ -let UserError = require('vn-loopback/common/helpers').UserError; +let UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethodCtx('updateFiscalData', { diff --git a/modules/client/methods/credit-classification/createWithInsurance.js b/modules/client/back/methods/credit-classification/createWithInsurance.js similarity index 100% rename from modules/client/methods/credit-classification/createWithInsurance.js rename to modules/client/back/methods/credit-classification/createWithInsurance.js diff --git a/modules/client/methods/credit-classification/createWithInsurance.spec.js b/modules/client/back/methods/credit-classification/createWithInsurance.spec.js similarity index 100% rename from modules/client/methods/credit-classification/createWithInsurance.spec.js rename to modules/client/back/methods/credit-classification/createWithInsurance.spec.js diff --git a/modules/client/methods/greuge/specs/sumAmount.spec.js b/modules/client/back/methods/greuge/specs/sumAmount.spec.js similarity index 100% rename from modules/client/methods/greuge/specs/sumAmount.spec.js rename to modules/client/back/methods/greuge/specs/sumAmount.spec.js diff --git a/modules/client/methods/greuge/sumAmount.js b/modules/client/back/methods/greuge/sumAmount.js similarity index 100% rename from modules/client/methods/greuge/sumAmount.js rename to modules/client/back/methods/greuge/sumAmount.js diff --git a/modules/client/methods/receipt/filter.js b/modules/client/back/methods/receipt/filter.js similarity index 100% rename from modules/client/methods/receipt/filter.js rename to modules/client/back/methods/receipt/filter.js diff --git a/modules/client/methods/receipt/specs/filter.spec.js b/modules/client/back/methods/receipt/specs/filter.spec.js similarity index 100% rename from modules/client/methods/receipt/specs/filter.spec.js rename to modules/client/back/methods/receipt/specs/filter.spec.js diff --git a/modules/client/methods/recovery/hasActiveRecovery.js b/modules/client/back/methods/recovery/hasActiveRecovery.js similarity index 100% rename from modules/client/methods/recovery/hasActiveRecovery.js rename to modules/client/back/methods/recovery/hasActiveRecovery.js diff --git a/modules/client/model-config.json b/modules/client/back/model-config.json similarity index 100% rename from modules/client/model-config.json rename to modules/client/back/model-config.json diff --git a/modules/client/models/address-observation.js b/modules/client/back/models/address-observation.js similarity index 100% rename from modules/client/models/address-observation.js rename to modules/client/back/models/address-observation.js diff --git a/modules/client/models/address-observation.json b/modules/client/back/models/address-observation.json similarity index 100% rename from modules/client/models/address-observation.json rename to modules/client/back/models/address-observation.json diff --git a/modules/client/models/address.js b/modules/client/back/models/address.js similarity index 91% rename from modules/client/models/address.js rename to modules/client/back/models/address.js index 3fc3f2423..7dd84a556 100644 --- a/modules/client/models/address.js +++ b/modules/client/back/models/address.js @@ -1,6 +1,6 @@ -let UserError = require('vn-loopback/common/helpers').UserError; -let getFinalState = require('vn-loopback/common/helpers').getFinalState; -let isMultiple = require('vn-loopback/common/helpers').isMultiple; +let UserError = require('vn-loopback/util/user-error'); +let getFinalState = require('vn-loopback/util/hook').getFinalState; +let isMultiple = require('vn-loopback/util/hook').isMultiple; module.exports = Self => { Self.validate('isDefaultAddress', isActive, diff --git a/modules/client/models/address.json b/modules/client/back/models/address.json similarity index 100% rename from modules/client/models/address.json rename to modules/client/back/models/address.json diff --git a/modules/client/models/bank-entity.json b/modules/client/back/models/bank-entity.json similarity index 100% rename from modules/client/models/bank-entity.json rename to modules/client/back/models/bank-entity.json diff --git a/modules/client/models/client-contact.js b/modules/client/back/models/client-contact.js similarity index 100% rename from modules/client/models/client-contact.js rename to modules/client/back/models/client-contact.js diff --git a/modules/client/models/client-contact.json b/modules/client/back/models/client-contact.json similarity index 100% rename from modules/client/models/client-contact.json rename to modules/client/back/models/client-contact.json diff --git a/modules/client/models/client-credit-limit.json b/modules/client/back/models/client-credit-limit.json similarity index 100% rename from modules/client/models/client-credit-limit.json rename to modules/client/back/models/client-credit-limit.json diff --git a/modules/client/models/client-credit.json b/modules/client/back/models/client-credit.json similarity index 100% rename from modules/client/models/client-credit.json rename to modules/client/back/models/client-credit.json diff --git a/modules/client/models/client-log.json b/modules/client/back/models/client-log.json similarity index 100% rename from modules/client/models/client-log.json rename to modules/client/back/models/client-log.json diff --git a/modules/client/models/client-observation.js b/modules/client/back/models/client-observation.js similarity index 100% rename from modules/client/models/client-observation.js rename to modules/client/back/models/client-observation.js diff --git a/modules/client/models/client-observation.json b/modules/client/back/models/client-observation.json similarity index 100% rename from modules/client/models/client-observation.json rename to modules/client/back/models/client-observation.json diff --git a/modules/client/models/client-risk.json b/modules/client/back/models/client-risk.json similarity index 100% rename from modules/client/models/client-risk.json rename to modules/client/back/models/client-risk.json diff --git a/modules/client/models/client-sample.js b/modules/client/back/models/client-sample.js similarity index 90% rename from modules/client/models/client-sample.js rename to modules/client/back/models/client-sample.js index 7eb9952e7..a6509efb2 100644 --- a/modules/client/models/client-sample.js +++ b/modules/client/back/models/client-sample.js @@ -1,4 +1,4 @@ -const UserError = require('vn-loopback/common/helpers').UserError; +const UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.validatesPresenceOf('typeFk', { diff --git a/modules/client/models/client-sample.json b/modules/client/back/models/client-sample.json similarity index 100% rename from modules/client/models/client-sample.json rename to modules/client/back/models/client-sample.json diff --git a/modules/client/models/client.js b/modules/client/back/models/client.js similarity index 97% rename from modules/client/models/client.js rename to modules/client/back/models/client.js index ba85e8d64..3de4a4a66 100644 --- a/modules/client/models/client.js +++ b/modules/client/back/models/client.js @@ -1,6 +1,6 @@ -let UserError = require('vn-loopback/common/helpers').UserError; -let getFinalState = require('vn-loopback/common/helpers').getFinalState; -let isMultiple = require('vn-loopback/common/helpers').isMultiple; +let UserError = require('vn-loopback/util/user-error'); +let getFinalState = require('vn-loopback/util/hook').getFinalState; +let isMultiple = require('vn-loopback/util/hook').isMultiple; module.exports = Self => { // Methods diff --git a/modules/client/models/client.json b/modules/client/back/models/client.json similarity index 100% rename from modules/client/models/client.json rename to modules/client/back/models/client.json diff --git a/modules/client/models/contact-channel.json b/modules/client/back/models/contact-channel.json similarity index 100% rename from modules/client/models/contact-channel.json rename to modules/client/back/models/contact-channel.json diff --git a/modules/client/models/credit-classification.js b/modules/client/back/models/credit-classification.js similarity index 100% rename from modules/client/models/credit-classification.js rename to modules/client/back/models/credit-classification.js diff --git a/modules/client/models/credit-classification.json b/modules/client/back/models/credit-classification.json similarity index 100% rename from modules/client/models/credit-classification.json rename to modules/client/back/models/credit-classification.json diff --git a/modules/client/models/credit-insurance.js b/modules/client/back/models/credit-insurance.js similarity index 100% rename from modules/client/models/credit-insurance.js rename to modules/client/back/models/credit-insurance.js diff --git a/modules/client/models/credit-insurance.json b/modules/client/back/models/credit-insurance.json similarity index 100% rename from modules/client/models/credit-insurance.json rename to modules/client/back/models/credit-insurance.json diff --git a/modules/client/models/defaulter.json b/modules/client/back/models/defaulter.json similarity index 100% rename from modules/client/models/defaulter.json rename to modules/client/back/models/defaulter.json diff --git a/modules/client/models/greuge-type.json b/modules/client/back/models/greuge-type.json similarity index 100% rename from modules/client/models/greuge-type.json rename to modules/client/back/models/greuge-type.json diff --git a/modules/client/models/greuge.js b/modules/client/back/models/greuge.js similarity index 100% rename from modules/client/models/greuge.js rename to modules/client/back/models/greuge.js diff --git a/modules/client/models/greuge.json b/modules/client/back/models/greuge.json similarity index 100% rename from modules/client/models/greuge.json rename to modules/client/back/models/greuge.json diff --git a/modules/client/models/invoice-out.json b/modules/client/back/models/invoice-out.json similarity index 100% rename from modules/client/models/invoice-out.json rename to modules/client/back/models/invoice-out.json diff --git a/modules/client/models/mandate-type.json b/modules/client/back/models/mandate-type.json similarity index 100% rename from modules/client/models/mandate-type.json rename to modules/client/back/models/mandate-type.json diff --git a/modules/client/models/mandate.json b/modules/client/back/models/mandate.json similarity index 100% rename from modules/client/models/mandate.json rename to modules/client/back/models/mandate.json diff --git a/modules/client/models/observation-type.json b/modules/client/back/models/observation-type.json similarity index 100% rename from modules/client/models/observation-type.json rename to modules/client/back/models/observation-type.json diff --git a/modules/client/models/pay-method.json b/modules/client/back/models/pay-method.json similarity index 100% rename from modules/client/models/pay-method.json rename to modules/client/back/models/pay-method.json diff --git a/modules/client/models/receipt.js b/modules/client/back/models/receipt.js similarity index 100% rename from modules/client/models/receipt.js rename to modules/client/back/models/receipt.js diff --git a/modules/client/models/receipt.json b/modules/client/back/models/receipt.json similarity index 100% rename from modules/client/models/receipt.json rename to modules/client/back/models/receipt.json diff --git a/modules/client/models/recovery.js b/modules/client/back/models/recovery.js similarity index 100% rename from modules/client/models/recovery.js rename to modules/client/back/models/recovery.js diff --git a/modules/client/models/recovery.json b/modules/client/back/models/recovery.json similarity index 100% rename from modules/client/models/recovery.json rename to modules/client/back/models/recovery.json diff --git a/modules/client/models/sample.json b/modules/client/back/models/sample.json similarity index 100% rename from modules/client/models/sample.json rename to modules/client/back/models/sample.json diff --git a/modules/client/models/specs/address.spec.js b/modules/client/back/models/specs/address.spec.js similarity index 100% rename from modules/client/models/specs/address.spec.js rename to modules/client/back/models/specs/address.spec.js diff --git a/modules/client/models/tpv-error.json b/modules/client/back/models/tpv-error.json similarity index 100% rename from modules/client/models/tpv-error.json rename to modules/client/back/models/tpv-error.json diff --git a/modules/client/models/tpv-merchant.json b/modules/client/back/models/tpv-merchant.json similarity index 100% rename from modules/client/models/tpv-merchant.json rename to modules/client/back/models/tpv-merchant.json diff --git a/modules/client/models/tpv-response.json b/modules/client/back/models/tpv-response.json similarity index 100% rename from modules/client/models/tpv-response.json rename to modules/client/back/models/tpv-response.json diff --git a/modules/client/validations/specs/validateIban.spec.js b/modules/client/back/validations/specs/validateIban.spec.js similarity index 100% rename from modules/client/validations/specs/validateIban.spec.js rename to modules/client/back/validations/specs/validateIban.spec.js diff --git a/modules/client/validations/specs/validateTin.spec.js b/modules/client/back/validations/specs/validateTin.spec.js similarity index 100% rename from modules/client/validations/specs/validateTin.spec.js rename to modules/client/back/validations/specs/validateTin.spec.js diff --git a/modules/client/validations/validateIban.js b/modules/client/back/validations/validateIban.js similarity index 100% rename from modules/client/validations/validateIban.js rename to modules/client/back/validations/validateIban.js diff --git a/modules/client/validations/validateTin.js b/modules/client/back/validations/validateTin.js similarity index 100% rename from modules/client/validations/validateTin.js rename to modules/client/back/validations/validateTin.js diff --git a/modules/client/front/src/address/create/index.html b/modules/client/front/address/create/index.html similarity index 100% rename from modules/client/front/src/address/create/index.html rename to modules/client/front/address/create/index.html diff --git a/modules/client/front/src/address/create/index.js b/modules/client/front/address/create/index.js similarity index 100% rename from modules/client/front/src/address/create/index.js rename to modules/client/front/address/create/index.js diff --git a/modules/client/front/src/address/create/index.spec.js b/modules/client/front/address/create/index.spec.js similarity index 100% rename from modules/client/front/src/address/create/index.spec.js rename to modules/client/front/address/create/index.spec.js diff --git a/modules/client/front/src/address/create/locale/es.yml b/modules/client/front/address/create/locale/es.yml similarity index 100% rename from modules/client/front/src/address/create/locale/es.yml rename to modules/client/front/address/create/locale/es.yml diff --git a/modules/client/front/src/address/edit/index.html b/modules/client/front/address/edit/index.html similarity index 100% rename from modules/client/front/src/address/edit/index.html rename to modules/client/front/address/edit/index.html diff --git a/modules/client/front/src/address/edit/index.js b/modules/client/front/address/edit/index.js similarity index 100% rename from modules/client/front/src/address/edit/index.js rename to modules/client/front/address/edit/index.js diff --git a/modules/client/front/src/address/edit/index.spec.js b/modules/client/front/address/edit/index.spec.js similarity index 100% rename from modules/client/front/src/address/edit/index.spec.js rename to modules/client/front/address/edit/index.spec.js diff --git a/modules/client/front/src/address/edit/locale/es.yml b/modules/client/front/address/edit/locale/es.yml similarity index 100% rename from modules/client/front/src/address/edit/locale/es.yml rename to modules/client/front/address/edit/locale/es.yml diff --git a/modules/client/front/src/address/index/index.html b/modules/client/front/address/index/index.html similarity index 100% rename from modules/client/front/src/address/index/index.html rename to modules/client/front/address/index/index.html diff --git a/modules/client/front/src/address/index/index.js b/modules/client/front/address/index/index.js similarity index 100% rename from modules/client/front/src/address/index/index.js rename to modules/client/front/address/index/index.js diff --git a/modules/client/front/src/address/index/index.spec.js b/modules/client/front/address/index/index.spec.js similarity index 100% rename from modules/client/front/src/address/index/index.spec.js rename to modules/client/front/address/index/index.spec.js diff --git a/modules/client/front/src/address/index/locale/es.yml b/modules/client/front/address/index/locale/es.yml similarity index 100% rename from modules/client/front/src/address/index/locale/es.yml rename to modules/client/front/address/index/locale/es.yml diff --git a/modules/client/front/src/basic-data/index.html b/modules/client/front/basic-data/index.html similarity index 100% rename from modules/client/front/src/basic-data/index.html rename to modules/client/front/basic-data/index.html diff --git a/modules/client/front/src/basic-data/index.js b/modules/client/front/basic-data/index.js similarity index 100% rename from modules/client/front/src/basic-data/index.js rename to modules/client/front/basic-data/index.js diff --git a/modules/client/front/src/basic-data/locale/es.yml b/modules/client/front/basic-data/locale/es.yml similarity index 100% rename from modules/client/front/src/basic-data/locale/es.yml rename to modules/client/front/basic-data/locale/es.yml diff --git a/modules/client/front/src/billing-data/index.html b/modules/client/front/billing-data/index.html similarity index 100% rename from modules/client/front/src/billing-data/index.html rename to modules/client/front/billing-data/index.html diff --git a/modules/client/front/src/billing-data/index.js b/modules/client/front/billing-data/index.js similarity index 100% rename from modules/client/front/src/billing-data/index.js rename to modules/client/front/billing-data/index.js diff --git a/modules/client/front/src/billing-data/index.spec.js b/modules/client/front/billing-data/index.spec.js similarity index 99% rename from modules/client/front/src/billing-data/index.spec.js rename to modules/client/front/billing-data/index.spec.js index 4f1ecc346..52cfeacfa 100644 --- a/modules/client/front/src/billing-data/index.spec.js +++ b/modules/client/front/billing-data/index.spec.js @@ -1,5 +1,5 @@ import './index'; -import watcher from 'mocks/watcher'; +import watcher from 'core/mocks/watcher'; describe('Client', () => { describe('Component vnClientBillingData', () => { diff --git a/modules/client/front/src/billing-data/locale/en.yml b/modules/client/front/billing-data/locale/en.yml similarity index 100% rename from modules/client/front/src/billing-data/locale/en.yml rename to modules/client/front/billing-data/locale/en.yml diff --git a/modules/client/front/src/billing-data/locale/es.yml b/modules/client/front/billing-data/locale/es.yml similarity index 100% rename from modules/client/front/src/billing-data/locale/es.yml rename to modules/client/front/billing-data/locale/es.yml diff --git a/modules/client/front/src/card/index.html b/modules/client/front/card/index.html similarity index 100% rename from modules/client/front/src/card/index.html rename to modules/client/front/card/index.html diff --git a/modules/client/front/src/card/index.js b/modules/client/front/card/index.js similarity index 100% rename from modules/client/front/src/card/index.js rename to modules/client/front/card/index.js diff --git a/modules/client/front/src/card/index.spec.js b/modules/client/front/card/index.spec.js similarity index 100% rename from modules/client/front/src/card/index.spec.js rename to modules/client/front/card/index.spec.js diff --git a/modules/client/front/src/contact/index.html b/modules/client/front/contact/index.html similarity index 100% rename from modules/client/front/src/contact/index.html rename to modules/client/front/contact/index.html diff --git a/modules/client/front/src/contact/index.js b/modules/client/front/contact/index.js similarity index 100% rename from modules/client/front/src/contact/index.js rename to modules/client/front/contact/index.js diff --git a/modules/client/front/src/create/index.html b/modules/client/front/create/index.html similarity index 100% rename from modules/client/front/src/create/index.html rename to modules/client/front/create/index.html diff --git a/modules/client/front/src/create/index.js b/modules/client/front/create/index.js similarity index 100% rename from modules/client/front/src/create/index.js rename to modules/client/front/create/index.js diff --git a/modules/client/front/src/create/index.spec.js b/modules/client/front/create/index.spec.js similarity index 100% rename from modules/client/front/src/create/index.spec.js rename to modules/client/front/create/index.spec.js diff --git a/modules/client/front/src/create/locale/es.yml b/modules/client/front/create/locale/es.yml similarity index 100% rename from modules/client/front/src/create/locale/es.yml rename to modules/client/front/create/locale/es.yml diff --git a/modules/client/front/src/credit-insurance/create/index.html b/modules/client/front/credit-insurance/create/index.html similarity index 100% rename from modules/client/front/src/credit-insurance/create/index.html rename to modules/client/front/credit-insurance/create/index.html diff --git a/modules/client/front/src/credit-insurance/create/index.js b/modules/client/front/credit-insurance/create/index.js similarity index 100% rename from modules/client/front/src/credit-insurance/create/index.js rename to modules/client/front/credit-insurance/create/index.js diff --git a/modules/client/front/src/credit-insurance/create/index.spec.js b/modules/client/front/credit-insurance/create/index.spec.js similarity index 100% rename from modules/client/front/src/credit-insurance/create/index.spec.js rename to modules/client/front/credit-insurance/create/index.spec.js diff --git a/modules/client/front/src/credit-insurance/index/index.html b/modules/client/front/credit-insurance/index/index.html similarity index 100% rename from modules/client/front/src/credit-insurance/index/index.html rename to modules/client/front/credit-insurance/index/index.html diff --git a/modules/client/front/src/credit-insurance/index/index.js b/modules/client/front/credit-insurance/index/index.js similarity index 100% rename from modules/client/front/src/credit-insurance/index/index.js rename to modules/client/front/credit-insurance/index/index.js diff --git a/modules/client/front/src/credit-insurance/index/index.spec.js b/modules/client/front/credit-insurance/index/index.spec.js similarity index 100% rename from modules/client/front/src/credit-insurance/index/index.spec.js rename to modules/client/front/credit-insurance/index/index.spec.js diff --git a/modules/client/front/src/credit-insurance/index/locale/es.yml b/modules/client/front/credit-insurance/index/locale/es.yml similarity index 100% rename from modules/client/front/src/credit-insurance/index/locale/es.yml rename to modules/client/front/credit-insurance/index/locale/es.yml diff --git a/modules/client/front/src/credit-insurance/insurance/create/index.html b/modules/client/front/credit-insurance/insurance/create/index.html similarity index 100% rename from modules/client/front/src/credit-insurance/insurance/create/index.html rename to modules/client/front/credit-insurance/insurance/create/index.html diff --git a/modules/client/front/src/credit-insurance/insurance/create/index.js b/modules/client/front/credit-insurance/insurance/create/index.js similarity index 100% rename from modules/client/front/src/credit-insurance/insurance/create/index.js rename to modules/client/front/credit-insurance/insurance/create/index.js diff --git a/modules/client/front/src/credit-insurance/insurance/index/index.html b/modules/client/front/credit-insurance/insurance/index/index.html similarity index 100% rename from modules/client/front/src/credit-insurance/insurance/index/index.html rename to modules/client/front/credit-insurance/insurance/index/index.html diff --git a/modules/client/front/src/credit-insurance/insurance/index/index.js b/modules/client/front/credit-insurance/insurance/index/index.js similarity index 100% rename from modules/client/front/src/credit-insurance/insurance/index/index.js rename to modules/client/front/credit-insurance/insurance/index/index.js diff --git a/modules/client/front/src/credit-insurance/insurance/index/index.spec.js b/modules/client/front/credit-insurance/insurance/index/index.spec.js similarity index 100% rename from modules/client/front/src/credit-insurance/insurance/index/index.spec.js rename to modules/client/front/credit-insurance/insurance/index/index.spec.js diff --git a/modules/client/front/src/credit-insurance/insurance/index/locale/es.yml b/modules/client/front/credit-insurance/insurance/index/locale/es.yml similarity index 100% rename from modules/client/front/src/credit-insurance/insurance/index/locale/es.yml rename to modules/client/front/credit-insurance/insurance/index/locale/es.yml diff --git a/modules/client/front/src/credit/create/index.html b/modules/client/front/credit/create/index.html similarity index 100% rename from modules/client/front/src/credit/create/index.html rename to modules/client/front/credit/create/index.html diff --git a/modules/client/front/src/credit/create/index.js b/modules/client/front/credit/create/index.js similarity index 100% rename from modules/client/front/src/credit/create/index.js rename to modules/client/front/credit/create/index.js diff --git a/modules/client/front/src/credit/create/index.spec.js b/modules/client/front/credit/create/index.spec.js similarity index 100% rename from modules/client/front/src/credit/create/index.spec.js rename to modules/client/front/credit/create/index.spec.js diff --git a/modules/client/front/src/credit/index/index.html b/modules/client/front/credit/index/index.html similarity index 100% rename from modules/client/front/src/credit/index/index.html rename to modules/client/front/credit/index/index.html diff --git a/modules/client/front/src/credit/index/index.js b/modules/client/front/credit/index/index.js similarity index 100% rename from modules/client/front/src/credit/index/index.js rename to modules/client/front/credit/index/index.js diff --git a/modules/client/front/src/credit/index/locale/es.yml b/modules/client/front/credit/index/locale/es.yml similarity index 100% rename from modules/client/front/src/credit/index/locale/es.yml rename to modules/client/front/credit/index/locale/es.yml diff --git a/modules/client/front/src/descriptor-popover/index.html b/modules/client/front/descriptor-popover/index.html similarity index 100% rename from modules/client/front/src/descriptor-popover/index.html rename to modules/client/front/descriptor-popover/index.html diff --git a/modules/client/front/src/descriptor-popover/index.js b/modules/client/front/descriptor-popover/index.js similarity index 97% rename from modules/client/front/src/descriptor-popover/index.js rename to modules/client/front/descriptor-popover/index.js index ba851aca2..1bfa781c8 100644 --- a/modules/client/front/src/descriptor-popover/index.js +++ b/modules/client/front/descriptor-popover/index.js @@ -1,5 +1,5 @@ import ngModule from '../module'; -import Component from 'core/src/lib/component'; +import Component from 'core/lib/component'; import './style.scss'; class Controller extends Component { diff --git a/modules/client/front/src/descriptor-popover/index.spec.js b/modules/client/front/descriptor-popover/index.spec.js similarity index 100% rename from modules/client/front/src/descriptor-popover/index.spec.js rename to modules/client/front/descriptor-popover/index.spec.js diff --git a/modules/client/front/src/descriptor-popover/style.scss b/modules/client/front/descriptor-popover/style.scss similarity index 100% rename from modules/client/front/src/descriptor-popover/style.scss rename to modules/client/front/descriptor-popover/style.scss diff --git a/modules/client/front/src/descriptor/index.html b/modules/client/front/descriptor/index.html similarity index 100% rename from modules/client/front/src/descriptor/index.html rename to modules/client/front/descriptor/index.html diff --git a/modules/client/front/src/descriptor/index.js b/modules/client/front/descriptor/index.js similarity index 100% rename from modules/client/front/src/descriptor/index.js rename to modules/client/front/descriptor/index.js diff --git a/modules/client/front/src/fiscal-data/index.html b/modules/client/front/fiscal-data/index.html similarity index 100% rename from modules/client/front/src/fiscal-data/index.html rename to modules/client/front/fiscal-data/index.html diff --git a/modules/client/front/src/fiscal-data/index.js b/modules/client/front/fiscal-data/index.js similarity index 100% rename from modules/client/front/src/fiscal-data/index.js rename to modules/client/front/fiscal-data/index.js diff --git a/modules/client/front/src/fiscal-data/index.spec.js b/modules/client/front/fiscal-data/index.spec.js similarity index 100% rename from modules/client/front/src/fiscal-data/index.spec.js rename to modules/client/front/fiscal-data/index.spec.js diff --git a/modules/client/front/src/fiscal-data/locale/es.yml b/modules/client/front/fiscal-data/locale/es.yml similarity index 100% rename from modules/client/front/src/fiscal-data/locale/es.yml rename to modules/client/front/fiscal-data/locale/es.yml diff --git a/modules/client/front/src/greuge/create/index.html b/modules/client/front/greuge/create/index.html similarity index 100% rename from modules/client/front/src/greuge/create/index.html rename to modules/client/front/greuge/create/index.html diff --git a/modules/client/front/src/greuge/create/index.js b/modules/client/front/greuge/create/index.js similarity index 100% rename from modules/client/front/src/greuge/create/index.js rename to modules/client/front/greuge/create/index.js diff --git a/modules/client/front/src/greuge/create/index.spec.js b/modules/client/front/greuge/create/index.spec.js similarity index 100% rename from modules/client/front/src/greuge/create/index.spec.js rename to modules/client/front/greuge/create/index.spec.js diff --git a/modules/client/front/src/greuge/index/index.html b/modules/client/front/greuge/index/index.html similarity index 100% rename from modules/client/front/src/greuge/index/index.html rename to modules/client/front/greuge/index/index.html diff --git a/modules/client/front/src/greuge/index/index.js b/modules/client/front/greuge/index/index.js similarity index 100% rename from modules/client/front/src/greuge/index/index.js rename to modules/client/front/greuge/index/index.js diff --git a/modules/client/front/src/greuge/index/locale/es.yml b/modules/client/front/greuge/index/locale/es.yml similarity index 100% rename from modules/client/front/src/greuge/index/locale/es.yml rename to modules/client/front/greuge/index/locale/es.yml diff --git a/modules/client/front/index.js b/modules/client/front/index.js index cf9881312..cf72ee0b2 100644 --- a/modules/client/front/index.js +++ b/modules/client/front/index.js @@ -1 +1,36 @@ -export * from './src/client'; +export * from './module'; + +import './index/'; +import './card'; +import './create'; +import './basic-data'; +import './fiscal-data'; +import './billing-data'; +import './descriptor'; +import './descriptor-popover'; +import './search-panel'; +import './address/index'; +import './address/create'; +import './address/edit'; +import './note/index'; +import './note/create'; +import './web-access'; +import './credit/index'; +import './credit/create'; +import './greuge/index'; +import './greuge/create'; +import './risk/index'; +import './risk/create'; +import './mandate'; +import './summary'; +import './recovery/index'; +import './recovery/create'; +import './credit-insurance/index'; +import './credit-insurance/create'; +import './credit-insurance/insurance/index'; +import './credit-insurance/insurance/create'; +import './contact'; +import './sample/index'; +import './sample/create'; +import './web-payment'; +import './log'; diff --git a/modules/client/front/src/index/index.html b/modules/client/front/index/index.html similarity index 100% rename from modules/client/front/src/index/index.html rename to modules/client/front/index/index.html diff --git a/modules/client/front/src/index/index.js b/modules/client/front/index/index.js similarity index 100% rename from modules/client/front/src/index/index.js rename to modules/client/front/index/index.js diff --git a/modules/client/front/src/index/item-client.html b/modules/client/front/index/item-client.html similarity index 100% rename from modules/client/front/src/index/item-client.html rename to modules/client/front/index/item-client.html diff --git a/modules/client/front/src/index/item-client.js b/modules/client/front/index/item-client.js similarity index 100% rename from modules/client/front/src/index/item-client.js rename to modules/client/front/index/item-client.js diff --git a/modules/client/front/src/index/locale/es.yml b/modules/client/front/index/locale/es.yml similarity index 100% rename from modules/client/front/src/index/locale/es.yml rename to modules/client/front/index/locale/es.yml diff --git a/modules/client/front/src/index/style.scss b/modules/client/front/index/style.scss similarity index 100% rename from modules/client/front/src/index/style.scss rename to modules/client/front/index/style.scss diff --git a/modules/client/front/src/locale/en.yml b/modules/client/front/locale/en.yml similarity index 100% rename from modules/client/front/src/locale/en.yml rename to modules/client/front/locale/en.yml diff --git a/modules/client/front/src/locale/es.yml b/modules/client/front/locale/es.yml similarity index 100% rename from modules/client/front/src/locale/es.yml rename to modules/client/front/locale/es.yml diff --git a/modules/client/front/src/log/index.html b/modules/client/front/log/index.html similarity index 100% rename from modules/client/front/src/log/index.html rename to modules/client/front/log/index.html diff --git a/modules/client/front/src/log/index.js b/modules/client/front/log/index.js similarity index 100% rename from modules/client/front/src/log/index.js rename to modules/client/front/log/index.js diff --git a/modules/client/front/src/log/index.spec.js b/modules/client/front/log/index.spec.js similarity index 100% rename from modules/client/front/src/log/index.spec.js rename to modules/client/front/log/index.spec.js diff --git a/modules/client/front/src/mandate/index.html b/modules/client/front/mandate/index.html similarity index 100% rename from modules/client/front/src/mandate/index.html rename to modules/client/front/mandate/index.html diff --git a/modules/client/front/src/mandate/index.js b/modules/client/front/mandate/index.js similarity index 100% rename from modules/client/front/src/mandate/index.js rename to modules/client/front/mandate/index.js diff --git a/modules/client/front/src/mandate/locale/es.yml b/modules/client/front/mandate/locale/es.yml similarity index 100% rename from modules/client/front/src/mandate/locale/es.yml rename to modules/client/front/mandate/locale/es.yml diff --git a/modules/client/front/module.js b/modules/client/front/module.js new file mode 100644 index 000000000..7d14f4c41 --- /dev/null +++ b/modules/client/front/module.js @@ -0,0 +1,3 @@ +import {ng} from 'core/vendor'; + +export default ng.module('client', ['vnCore']); diff --git a/modules/client/front/src/note/create/index.html b/modules/client/front/note/create/index.html similarity index 100% rename from modules/client/front/src/note/create/index.html rename to modules/client/front/note/create/index.html diff --git a/modules/client/front/src/note/create/index.js b/modules/client/front/note/create/index.js similarity index 100% rename from modules/client/front/src/note/create/index.js rename to modules/client/front/note/create/index.js diff --git a/modules/client/front/src/note/create/index.spec.js b/modules/client/front/note/create/index.spec.js similarity index 100% rename from modules/client/front/src/note/create/index.spec.js rename to modules/client/front/note/create/index.spec.js diff --git a/modules/client/front/src/note/create/locale/es.yml b/modules/client/front/note/create/locale/es.yml similarity index 100% rename from modules/client/front/src/note/create/locale/es.yml rename to modules/client/front/note/create/locale/es.yml diff --git a/modules/client/front/src/note/index/index.html b/modules/client/front/note/index/index.html similarity index 100% rename from modules/client/front/src/note/index/index.html rename to modules/client/front/note/index/index.html diff --git a/modules/client/front/src/note/index/index.js b/modules/client/front/note/index/index.js similarity index 100% rename from modules/client/front/src/note/index/index.js rename to modules/client/front/note/index/index.js diff --git a/modules/client/front/src/recovery/create/index.html b/modules/client/front/recovery/create/index.html similarity index 100% rename from modules/client/front/src/recovery/create/index.html rename to modules/client/front/recovery/create/index.html diff --git a/modules/client/front/src/recovery/create/index.js b/modules/client/front/recovery/create/index.js similarity index 100% rename from modules/client/front/src/recovery/create/index.js rename to modules/client/front/recovery/create/index.js diff --git a/modules/client/front/src/recovery/create/index.spec.js b/modules/client/front/recovery/create/index.spec.js similarity index 100% rename from modules/client/front/src/recovery/create/index.spec.js rename to modules/client/front/recovery/create/index.spec.js diff --git a/modules/client/front/src/recovery/create/locale/es.yml b/modules/client/front/recovery/create/locale/es.yml similarity index 100% rename from modules/client/front/src/recovery/create/locale/es.yml rename to modules/client/front/recovery/create/locale/es.yml diff --git a/modules/client/front/src/recovery/index/index.html b/modules/client/front/recovery/index/index.html similarity index 100% rename from modules/client/front/src/recovery/index/index.html rename to modules/client/front/recovery/index/index.html diff --git a/modules/client/front/src/recovery/index/index.js b/modules/client/front/recovery/index/index.js similarity index 100% rename from modules/client/front/src/recovery/index/index.js rename to modules/client/front/recovery/index/index.js diff --git a/modules/client/front/src/recovery/index/locale/es.yml b/modules/client/front/recovery/index/locale/es.yml similarity index 100% rename from modules/client/front/src/recovery/index/locale/es.yml rename to modules/client/front/recovery/index/locale/es.yml diff --git a/modules/client/front/src/risk/create/index.html b/modules/client/front/risk/create/index.html similarity index 100% rename from modules/client/front/src/risk/create/index.html rename to modules/client/front/risk/create/index.html diff --git a/modules/client/front/src/risk/create/index.js b/modules/client/front/risk/create/index.js similarity index 100% rename from modules/client/front/src/risk/create/index.js rename to modules/client/front/risk/create/index.js diff --git a/modules/client/front/src/risk/index/index.html b/modules/client/front/risk/index/index.html similarity index 100% rename from modules/client/front/src/risk/index/index.html rename to modules/client/front/risk/index/index.html diff --git a/modules/client/front/src/risk/index/index.js b/modules/client/front/risk/index/index.js similarity index 100% rename from modules/client/front/src/risk/index/index.js rename to modules/client/front/risk/index/index.js diff --git a/modules/client/front/src/risk/index/index.spec.js b/modules/client/front/risk/index/index.spec.js similarity index 100% rename from modules/client/front/src/risk/index/index.spec.js rename to modules/client/front/risk/index/index.spec.js diff --git a/modules/client/front/src/risk/index/locale/es.yml b/modules/client/front/risk/index/locale/es.yml similarity index 100% rename from modules/client/front/src/risk/index/locale/es.yml rename to modules/client/front/risk/index/locale/es.yml diff --git a/modules/client/front/src/risk/index/style.scss b/modules/client/front/risk/index/style.scss similarity index 100% rename from modules/client/front/src/risk/index/style.scss rename to modules/client/front/risk/index/style.scss diff --git a/modules/client/front/src/sample/create/index.html b/modules/client/front/sample/create/index.html similarity index 100% rename from modules/client/front/src/sample/create/index.html rename to modules/client/front/sample/create/index.html diff --git a/modules/client/front/src/sample/create/index.js b/modules/client/front/sample/create/index.js similarity index 100% rename from modules/client/front/src/sample/create/index.js rename to modules/client/front/sample/create/index.js diff --git a/modules/client/front/src/sample/create/index.spec.js b/modules/client/front/sample/create/index.spec.js similarity index 100% rename from modules/client/front/src/sample/create/index.spec.js rename to modules/client/front/sample/create/index.spec.js diff --git a/modules/client/front/src/sample/create/locale/es.yml b/modules/client/front/sample/create/locale/es.yml similarity index 100% rename from modules/client/front/src/sample/create/locale/es.yml rename to modules/client/front/sample/create/locale/es.yml diff --git a/modules/client/front/src/sample/create/style.scss b/modules/client/front/sample/create/style.scss similarity index 100% rename from modules/client/front/src/sample/create/style.scss rename to modules/client/front/sample/create/style.scss diff --git a/modules/client/front/src/sample/index/index.html b/modules/client/front/sample/index/index.html similarity index 100% rename from modules/client/front/src/sample/index/index.html rename to modules/client/front/sample/index/index.html diff --git a/modules/client/front/src/sample/index/index.js b/modules/client/front/sample/index/index.js similarity index 100% rename from modules/client/front/src/sample/index/index.js rename to modules/client/front/sample/index/index.js diff --git a/modules/client/front/src/search-panel/index.html b/modules/client/front/search-panel/index.html similarity index 100% rename from modules/client/front/src/search-panel/index.html rename to modules/client/front/search-panel/index.html diff --git a/modules/client/front/src/search-panel/index.js b/modules/client/front/search-panel/index.js similarity index 68% rename from modules/client/front/src/search-panel/index.js rename to modules/client/front/search-panel/index.js index 2ed83601a..8c30982f5 100644 --- a/modules/client/front/src/search-panel/index.js +++ b/modules/client/front/search-panel/index.js @@ -1,5 +1,5 @@ import ngModule from '../module'; -import SearchPanel from 'core/src/components/searchbar/search-panel'; +import SearchPanel from 'core/components/searchbar/search-panel'; ngModule.component('vnClientSearchPanel', { template: require('./index.html'), diff --git a/modules/client/front/src/search-panel/locale/es.yml b/modules/client/front/search-panel/locale/es.yml similarity index 100% rename from modules/client/front/src/search-panel/locale/es.yml rename to modules/client/front/search-panel/locale/es.yml diff --git a/modules/client/front/src/client.js b/modules/client/front/src/client.js deleted file mode 100644 index f53865547..000000000 --- a/modules/client/front/src/client.js +++ /dev/null @@ -1,36 +0,0 @@ -export * from './module'; - -import './index'; -import './card'; -import './create'; -import './basic-data'; -import './fiscal-data'; -import './billing-data'; -import './descriptor'; -import './descriptor-popover'; -import './search-panel'; -import './address/index'; -import './address/create'; -import './address/edit'; -import './note/index'; -import './note/create'; -import './web-access'; -import './credit/index'; -import './credit/create'; -import './greuge/index'; -import './greuge/create'; -import './risk/index'; -import './risk/create'; -import './mandate'; -import './summary'; -import './recovery/index'; -import './recovery/create'; -import './credit-insurance/index'; -import './credit-insurance/create'; -import './credit-insurance/insurance/index'; -import './credit-insurance/insurance/create'; -import './contact'; -import './sample/index'; -import './sample/create'; -import './web-payment'; -import './log'; diff --git a/modules/client/front/src/module.js b/modules/client/front/src/module.js deleted file mode 100644 index aabcb4d82..000000000 --- a/modules/client/front/src/module.js +++ /dev/null @@ -1,5 +0,0 @@ -import {ng} from 'vendor'; -import 'core'; - -const ngModule = ng.module('client', ['vnCore']); -export default ngModule; diff --git a/modules/client/front/src/summary/index.html b/modules/client/front/summary/index.html similarity index 100% rename from modules/client/front/src/summary/index.html rename to modules/client/front/summary/index.html diff --git a/modules/client/front/src/summary/index.js b/modules/client/front/summary/index.js similarity index 100% rename from modules/client/front/src/summary/index.js rename to modules/client/front/summary/index.js diff --git a/modules/client/front/src/summary/index.spec.js b/modules/client/front/summary/index.spec.js similarity index 100% rename from modules/client/front/src/summary/index.spec.js rename to modules/client/front/summary/index.spec.js diff --git a/modules/client/front/src/summary/locale/es.yml b/modules/client/front/summary/locale/es.yml similarity index 100% rename from modules/client/front/src/summary/locale/es.yml rename to modules/client/front/summary/locale/es.yml diff --git a/modules/client/front/src/summary/style.scss b/modules/client/front/summary/style.scss similarity index 100% rename from modules/client/front/src/summary/style.scss rename to modules/client/front/summary/style.scss diff --git a/modules/client/front/src/web-access/index.html b/modules/client/front/web-access/index.html similarity index 100% rename from modules/client/front/src/web-access/index.html rename to modules/client/front/web-access/index.html diff --git a/modules/client/front/src/web-access/index.js b/modules/client/front/web-access/index.js similarity index 100% rename from modules/client/front/src/web-access/index.js rename to modules/client/front/web-access/index.js diff --git a/modules/client/front/src/web-access/index.spec.js b/modules/client/front/web-access/index.spec.js similarity index 100% rename from modules/client/front/src/web-access/index.spec.js rename to modules/client/front/web-access/index.spec.js diff --git a/modules/client/front/src/web-access/locale/es.yml b/modules/client/front/web-access/locale/es.yml similarity index 100% rename from modules/client/front/src/web-access/locale/es.yml rename to modules/client/front/web-access/locale/es.yml diff --git a/modules/client/front/src/web-payment/index.html b/modules/client/front/web-payment/index.html similarity index 100% rename from modules/client/front/src/web-payment/index.html rename to modules/client/front/web-payment/index.html diff --git a/modules/client/front/src/web-payment/index.js b/modules/client/front/web-payment/index.js similarity index 100% rename from modules/client/front/src/web-payment/index.js rename to modules/client/front/web-payment/index.js diff --git a/modules/client/front/src/web-payment/index.spec.js b/modules/client/front/web-payment/index.spec.js similarity index 96% rename from modules/client/front/src/web-payment/index.spec.js rename to modules/client/front/web-payment/index.spec.js index 832dcef9f..73060fea6 100644 --- a/modules/client/front/src/web-payment/index.spec.js +++ b/modules/client/front/web-payment/index.spec.js @@ -1,5 +1,5 @@ import './index'; -import crudModel from 'mocks/crud-model'; +import crudModel from 'core/mocks/crud-model'; describe('Component vnClientWebPayment', () => { let $httpBackend; diff --git a/modules/client/front/src/web-payment/locale/es.yml b/modules/client/front/web-payment/locale/es.yml similarity index 100% rename from modules/client/front/src/web-payment/locale/es.yml rename to modules/client/front/web-payment/locale/es.yml diff --git a/modules/client/front/src/web-payment/style.scss b/modules/client/front/web-payment/style.scss similarity index 100% rename from modules/client/front/src/web-payment/style.scss rename to modules/client/front/web-payment/style.scss diff --git a/modules/item/methods/item-tag/filterItemTags.js b/modules/item/back/methods/item-tag/filterItemTags.js similarity index 94% rename from modules/item/methods/item-tag/filterItemTags.js rename to modules/item/back/methods/item-tag/filterItemTags.js index bd6c3de89..ed5973c17 100644 --- a/modules/item/methods/item-tag/filterItemTags.js +++ b/modules/item/back/methods/item-tag/filterItemTags.js @@ -1,5 +1,5 @@ const ParameterizedSQL = require('loopback-connector').ParameterizedSQL; -const mergeFilters = require('vn-loopback/common/filter').mergeFilters; +const mergeFilters = require('vn-loopback/util/filter').mergeFilters; module.exports = Self => { Self.remoteMethod('filterItemTags', { diff --git a/modules/item/methods/item-tag/specs/filterItemTags.spec.js b/modules/item/back/methods/item-tag/specs/filterItemTags.spec.js similarity index 100% rename from modules/item/methods/item-tag/specs/filterItemTags.spec.js rename to modules/item/back/methods/item-tag/specs/filterItemTags.spec.js diff --git a/modules/item/methods/item/clone.js b/modules/item/back/methods/item/clone.js similarity index 97% rename from modules/item/methods/item/clone.js rename to modules/item/back/methods/item/clone.js index b63b7aa46..d40865870 100644 --- a/modules/item/methods/item/clone.js +++ b/modules/item/back/methods/item/clone.js @@ -1,4 +1,4 @@ -let UserError = require('vn-loopback/common/helpers').UserError; +let UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethod('clone', { diff --git a/modules/item/methods/item/filter.js b/modules/item/back/methods/item/filter.js similarity index 100% rename from modules/item/methods/item/filter.js rename to modules/item/back/methods/item/filter.js diff --git a/modules/item/methods/item/getCard.js b/modules/item/back/methods/item/getCard.js similarity index 100% rename from modules/item/methods/item/getCard.js rename to modules/item/back/methods/item/getCard.js diff --git a/modules/item/methods/item/getDiary.js b/modules/item/back/methods/item/getDiary.js similarity index 100% rename from modules/item/methods/item/getDiary.js rename to modules/item/back/methods/item/getDiary.js diff --git a/modules/item/methods/item/getLastEntries.js b/modules/item/back/methods/item/getLastEntries.js similarity index 100% rename from modules/item/methods/item/getLastEntries.js rename to modules/item/back/methods/item/getLastEntries.js diff --git a/modules/item/methods/item/getSummary.js b/modules/item/back/methods/item/getSummary.js similarity index 100% rename from modules/item/methods/item/getSummary.js rename to modules/item/back/methods/item/getSummary.js diff --git a/modules/item/methods/item/regularize.js b/modules/item/back/methods/item/regularize.js similarity index 100% rename from modules/item/methods/item/regularize.js rename to modules/item/back/methods/item/regularize.js diff --git a/modules/item/methods/item/specs/clone.spec.js b/modules/item/back/methods/item/specs/clone.spec.js similarity index 100% rename from modules/item/methods/item/specs/clone.spec.js rename to modules/item/back/methods/item/specs/clone.spec.js diff --git a/modules/item/methods/item/specs/filter.spec.js b/modules/item/back/methods/item/specs/filter.spec.js similarity index 100% rename from modules/item/methods/item/specs/filter.spec.js rename to modules/item/back/methods/item/specs/filter.spec.js diff --git a/modules/item/methods/item/specs/getDiary.spec.js b/modules/item/back/methods/item/specs/getDiary.spec.js similarity index 100% rename from modules/item/methods/item/specs/getDiary.spec.js rename to modules/item/back/methods/item/specs/getDiary.spec.js diff --git a/modules/item/methods/item/specs/getLastEntries.spec.js b/modules/item/back/methods/item/specs/getLastEntries.spec.js similarity index 100% rename from modules/item/methods/item/specs/getLastEntries.spec.js rename to modules/item/back/methods/item/specs/getLastEntries.spec.js diff --git a/modules/item/methods/item/specs/getSummary.spec.js b/modules/item/back/methods/item/specs/getSummary.spec.js similarity index 100% rename from modules/item/methods/item/specs/getSummary.spec.js rename to modules/item/back/methods/item/specs/getSummary.spec.js diff --git a/modules/item/methods/item/specs/regularize.spec.js b/modules/item/back/methods/item/specs/regularize.spec.js similarity index 100% rename from modules/item/methods/item/specs/regularize.spec.js rename to modules/item/back/methods/item/specs/regularize.spec.js diff --git a/modules/item/methods/item/specs/updateTaxes.spec.js b/modules/item/back/methods/item/specs/updateTaxes.spec.js similarity index 100% rename from modules/item/methods/item/specs/updateTaxes.spec.js rename to modules/item/back/methods/item/specs/updateTaxes.spec.js diff --git a/modules/item/methods/item/updateTaxes.js b/modules/item/back/methods/item/updateTaxes.js similarity index 93% rename from modules/item/methods/item/updateTaxes.js rename to modules/item/back/methods/item/updateTaxes.js index 0bccd33e9..bbf4dc0f1 100644 --- a/modules/item/methods/item/updateTaxes.js +++ b/modules/item/back/methods/item/updateTaxes.js @@ -1,4 +1,4 @@ -let UserError = require('vn-loopback/common/helpers').UserError; +let UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethod('updateTaxes', { diff --git a/modules/item/model-config.json b/modules/item/back/model-config.json similarity index 100% rename from modules/item/model-config.json rename to modules/item/back/model-config.json diff --git a/modules/item/models/expence.json b/modules/item/back/models/expence.json similarity index 100% rename from modules/item/models/expence.json rename to modules/item/back/models/expence.json diff --git a/modules/item/models/genus.json b/modules/item/back/models/genus.json similarity index 100% rename from modules/item/models/genus.json rename to modules/item/back/models/genus.json diff --git a/modules/item/models/ink.json b/modules/item/back/models/ink.json similarity index 100% rename from modules/item/models/ink.json rename to modules/item/back/models/ink.json diff --git a/modules/item/models/intrastat.json b/modules/item/back/models/intrastat.json similarity index 100% rename from modules/item/models/intrastat.json rename to modules/item/back/models/intrastat.json diff --git a/modules/item/models/item-barcode.js b/modules/item/back/models/item-barcode.js similarity index 100% rename from modules/item/models/item-barcode.js rename to modules/item/back/models/item-barcode.js diff --git a/modules/item/models/item-barcode.json b/modules/item/back/models/item-barcode.json similarity index 100% rename from modules/item/models/item-barcode.json rename to modules/item/back/models/item-barcode.json diff --git a/modules/item/models/item-botanical.json b/modules/item/back/models/item-botanical.json similarity index 100% rename from modules/item/models/item-botanical.json rename to modules/item/back/models/item-botanical.json diff --git a/modules/item/models/item-category.json b/modules/item/back/models/item-category.json similarity index 100% rename from modules/item/models/item-category.json rename to modules/item/back/models/item-category.json diff --git a/modules/item/models/item-log.json b/modules/item/back/models/item-log.json similarity index 100% rename from modules/item/models/item-log.json rename to modules/item/back/models/item-log.json diff --git a/modules/item/models/item-niche.js b/modules/item/back/models/item-niche.js similarity index 75% rename from modules/item/models/item-niche.js rename to modules/item/back/models/item-niche.js index 7cc683efb..b9e388881 100644 --- a/modules/item/models/item-niche.js +++ b/modules/item/back/models/item-niche.js @@ -1,4 +1,4 @@ -const UserError = require('vn-loopback/common/helpers').UserError; +const UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.rewriteDbError(function(err) { diff --git a/modules/item/models/item-niche.json b/modules/item/back/models/item-niche.json similarity index 100% rename from modules/item/models/item-niche.json rename to modules/item/back/models/item-niche.json diff --git a/modules/item/models/item-placement.json b/modules/item/back/models/item-placement.json similarity index 100% rename from modules/item/models/item-placement.json rename to modules/item/back/models/item-placement.json diff --git a/modules/item/models/item-tag.js b/modules/item/back/models/item-tag.js similarity index 80% rename from modules/item/models/item-tag.js rename to modules/item/back/models/item-tag.js index 2b44921bc..23a0748f7 100644 --- a/modules/item/models/item-tag.js +++ b/modules/item/back/models/item-tag.js @@ -1,4 +1,4 @@ -let UserError = require('vn-loopback/common/helpers').UserError; +let UserError = require('vn-loopback/util/user-error'); module.exports = Self => { require('../methods/item-tag/filterItemTags')(Self); diff --git a/modules/item/models/item-tag.json b/modules/item/back/models/item-tag.json similarity index 100% rename from modules/item/models/item-tag.json rename to modules/item/back/models/item-tag.json diff --git a/modules/item/models/item-tax-country.json b/modules/item/back/models/item-tax-country.json similarity index 100% rename from modules/item/models/item-tax-country.json rename to modules/item/back/models/item-tax-country.json diff --git a/modules/item/models/item-type-tag.json b/modules/item/back/models/item-type-tag.json similarity index 100% rename from modules/item/models/item-type-tag.json rename to modules/item/back/models/item-type-tag.json diff --git a/modules/item/models/item-type.json b/modules/item/back/models/item-type.json similarity index 100% rename from modules/item/models/item-type.json rename to modules/item/back/models/item-type.json diff --git a/modules/item/models/item.js b/modules/item/back/models/item.js similarity index 94% rename from modules/item/models/item.js rename to modules/item/back/models/item.js index 4f3ca2f8f..49bbc7ebc 100644 --- a/modules/item/models/item.js +++ b/modules/item/back/models/item.js @@ -1,4 +1,4 @@ -let UserError = require('vn-loopback/common/helpers').UserError; +let UserError = require('vn-loopback/util/user-error'); module.exports = Self => { require('../methods/item/filter')(Self); diff --git a/modules/item/models/item.json b/modules/item/back/models/item.json similarity index 100% rename from modules/item/models/item.json rename to modules/item/back/models/item.json diff --git a/modules/item/models/origin.json b/modules/item/back/models/origin.json similarity index 100% rename from modules/item/models/origin.json rename to modules/item/back/models/origin.json diff --git a/modules/item/models/producer.json b/modules/item/back/models/producer.json similarity index 100% rename from modules/item/models/producer.json rename to modules/item/back/models/producer.json diff --git a/modules/item/models/specie.json b/modules/item/back/models/specie.json similarity index 100% rename from modules/item/models/specie.json rename to modules/item/back/models/specie.json diff --git a/modules/item/models/specs/item.spec.js b/modules/item/back/models/specs/item.spec.js similarity index 100% rename from modules/item/models/specs/item.spec.js rename to modules/item/back/models/specs/item.spec.js diff --git a/modules/item/models/tag.json b/modules/item/back/models/tag.json similarity index 100% rename from modules/item/models/tag.json rename to modules/item/back/models/tag.json diff --git a/modules/item/models/tax-class.json b/modules/item/back/models/tax-class.json similarity index 100% rename from modules/item/models/tax-class.json rename to modules/item/back/models/tax-class.json diff --git a/modules/item/models/tax-code.json b/modules/item/back/models/tax-code.json similarity index 100% rename from modules/item/models/tax-code.json rename to modules/item/back/models/tax-code.json diff --git a/modules/item/models/tax-type.json b/modules/item/back/models/tax-type.json similarity index 100% rename from modules/item/models/tax-type.json rename to modules/item/back/models/tax-type.json diff --git a/modules/item/front/src/barcode/index.html b/modules/item/front/barcode/index.html similarity index 100% rename from modules/item/front/src/barcode/index.html rename to modules/item/front/barcode/index.html diff --git a/modules/item/front/src/barcode/index.js b/modules/item/front/barcode/index.js similarity index 100% rename from modules/item/front/src/barcode/index.js rename to modules/item/front/barcode/index.js diff --git a/modules/item/front/src/botanical/index.html b/modules/item/front/botanical/index.html similarity index 100% rename from modules/item/front/src/botanical/index.html rename to modules/item/front/botanical/index.html diff --git a/modules/item/front/src/botanical/index.js b/modules/item/front/botanical/index.js similarity index 100% rename from modules/item/front/src/botanical/index.js rename to modules/item/front/botanical/index.js diff --git a/modules/item/front/src/botanical/index.spec.js b/modules/item/front/botanical/index.spec.js similarity index 100% rename from modules/item/front/src/botanical/index.spec.js rename to modules/item/front/botanical/index.spec.js diff --git a/modules/item/front/src/card/index.html b/modules/item/front/card/index.html similarity index 100% rename from modules/item/front/src/card/index.html rename to modules/item/front/card/index.html diff --git a/modules/item/front/src/card/index.js b/modules/item/front/card/index.js similarity index 100% rename from modules/item/front/src/card/index.js rename to modules/item/front/card/index.js diff --git a/modules/item/front/src/card/index.spec.js b/modules/item/front/card/index.spec.js similarity index 100% rename from modules/item/front/src/card/index.spec.js rename to modules/item/front/card/index.spec.js diff --git a/modules/item/front/src/create/index.html b/modules/item/front/create/index.html similarity index 100% rename from modules/item/front/src/create/index.html rename to modules/item/front/create/index.html diff --git a/modules/item/front/src/create/index.js b/modules/item/front/create/index.js similarity index 100% rename from modules/item/front/src/create/index.js rename to modules/item/front/create/index.js diff --git a/modules/item/front/src/create/index.spec.js b/modules/item/front/create/index.spec.js similarity index 100% rename from modules/item/front/src/create/index.spec.js rename to modules/item/front/create/index.spec.js diff --git a/modules/item/front/src/data/index.html b/modules/item/front/data/index.html similarity index 100% rename from modules/item/front/src/data/index.html rename to modules/item/front/data/index.html diff --git a/modules/item/front/src/data/index.js b/modules/item/front/data/index.js similarity index 100% rename from modules/item/front/src/data/index.js rename to modules/item/front/data/index.js diff --git a/modules/item/front/src/data/locale/es.yml b/modules/item/front/data/locale/es.yml similarity index 100% rename from modules/item/front/src/data/locale/es.yml rename to modules/item/front/data/locale/es.yml diff --git a/modules/item/front/src/descriptor-popover/index.html b/modules/item/front/descriptor-popover/index.html similarity index 100% rename from modules/item/front/src/descriptor-popover/index.html rename to modules/item/front/descriptor-popover/index.html diff --git a/modules/item/front/src/descriptor-popover/index.js b/modules/item/front/descriptor-popover/index.js similarity index 96% rename from modules/item/front/src/descriptor-popover/index.js rename to modules/item/front/descriptor-popover/index.js index ebcd249a7..ed0cc01d0 100644 --- a/modules/item/front/src/descriptor-popover/index.js +++ b/modules/item/front/descriptor-popover/index.js @@ -1,5 +1,5 @@ import ngModule from '../module'; -import Component from 'core/src/lib/component'; +import Component from 'core/lib/component'; import './style.scss'; class Controller extends Component { diff --git a/modules/item/front/src/descriptor-popover/index.spec.js b/modules/item/front/descriptor-popover/index.spec.js similarity index 100% rename from modules/item/front/src/descriptor-popover/index.spec.js rename to modules/item/front/descriptor-popover/index.spec.js diff --git a/modules/item/front/src/descriptor-popover/style.scss b/modules/item/front/descriptor-popover/style.scss similarity index 100% rename from modules/item/front/src/descriptor-popover/style.scss rename to modules/item/front/descriptor-popover/style.scss diff --git a/modules/item/front/src/descriptor/index.html b/modules/item/front/descriptor/index.html similarity index 100% rename from modules/item/front/src/descriptor/index.html rename to modules/item/front/descriptor/index.html diff --git a/modules/item/front/src/descriptor/index.js b/modules/item/front/descriptor/index.js similarity index 100% rename from modules/item/front/src/descriptor/index.js rename to modules/item/front/descriptor/index.js diff --git a/modules/item/front/src/descriptor/locale/es.yml b/modules/item/front/descriptor/locale/es.yml similarity index 100% rename from modules/item/front/src/descriptor/locale/es.yml rename to modules/item/front/descriptor/locale/es.yml diff --git a/modules/item/front/src/descriptor/style.scss b/modules/item/front/descriptor/style.scss similarity index 100% rename from modules/item/front/src/descriptor/style.scss rename to modules/item/front/descriptor/style.scss diff --git a/modules/item/front/src/diary/index.html b/modules/item/front/diary/index.html similarity index 100% rename from modules/item/front/src/diary/index.html rename to modules/item/front/diary/index.html diff --git a/modules/item/front/src/diary/index.js b/modules/item/front/diary/index.js similarity index 100% rename from modules/item/front/src/diary/index.js rename to modules/item/front/diary/index.js diff --git a/modules/item/front/src/diary/index.spec.js b/modules/item/front/diary/index.spec.js similarity index 98% rename from modules/item/front/src/diary/index.spec.js rename to modules/item/front/diary/index.spec.js index 007e36af0..454a8b25f 100644 --- a/modules/item/front/src/diary/index.spec.js +++ b/modules/item/front/diary/index.spec.js @@ -1,5 +1,5 @@ import './index.js'; -import crudModel from 'mocks/crud-model'; +import crudModel from 'core/mocks/crud-model'; describe('Item', () => { describe('Component vnItemDiary', () => { diff --git a/modules/item/front/src/diary/locale/es.yml b/modules/item/front/diary/locale/es.yml similarity index 100% rename from modules/item/front/src/diary/locale/es.yml rename to modules/item/front/diary/locale/es.yml diff --git a/modules/item/front/src/diary/style.scss b/modules/item/front/diary/style.scss similarity index 100% rename from modules/item/front/src/diary/style.scss rename to modules/item/front/diary/style.scss diff --git a/modules/item/front/src/history/index.html b/modules/item/front/history/index.html similarity index 100% rename from modules/item/front/src/history/index.html rename to modules/item/front/history/index.html diff --git a/modules/item/front/src/history/index.js b/modules/item/front/history/index.js similarity index 100% rename from modules/item/front/src/history/index.js rename to modules/item/front/history/index.js diff --git a/modules/item/front/index.js b/modules/item/front/index.js index c94fde7de..f853efa7c 100644 --- a/modules/item/front/index.js +++ b/modules/item/front/index.js @@ -1 +1,21 @@ -export * from './src/item'; +export * from './module'; + +import './index/'; +import './search-panel'; +import './diary'; +import './create'; +import './card'; +import './descriptor'; +import './descriptor-popover'; +import './ticket-descriptor'; +import './ticket-descriptor-popover'; +import './data'; +import './tags'; +import './tax'; +// import './history'; +import './last-entries'; +import './niche'; +import './botanical'; +import './barcode'; +import './summary'; + diff --git a/modules/item/front/src/index/index.html b/modules/item/front/index/index.html similarity index 100% rename from modules/item/front/src/index/index.html rename to modules/item/front/index/index.html diff --git a/modules/item/front/src/index/index.js b/modules/item/front/index/index.js similarity index 100% rename from modules/item/front/src/index/index.js rename to modules/item/front/index/index.js diff --git a/modules/item/front/src/index/index.spec.js b/modules/item/front/index/index.spec.js similarity index 100% rename from modules/item/front/src/index/index.spec.js rename to modules/item/front/index/index.spec.js diff --git a/modules/item/front/src/index/preview.svg b/modules/item/front/index/preview.svg similarity index 100% rename from modules/item/front/src/index/preview.svg rename to modules/item/front/index/preview.svg diff --git a/modules/item/front/src/index/product.html b/modules/item/front/index/product.html similarity index 100% rename from modules/item/front/src/index/product.html rename to modules/item/front/index/product.html diff --git a/modules/item/front/src/index/product.js b/modules/item/front/index/product.js similarity index 100% rename from modules/item/front/src/index/product.js rename to modules/item/front/index/product.js diff --git a/modules/item/front/src/index/style.scss b/modules/item/front/index/style.scss similarity index 100% rename from modules/item/front/src/index/style.scss rename to modules/item/front/index/style.scss diff --git a/modules/item/front/src/last-entries/index.html b/modules/item/front/last-entries/index.html similarity index 100% rename from modules/item/front/src/last-entries/index.html rename to modules/item/front/last-entries/index.html diff --git a/modules/item/front/src/last-entries/index.js b/modules/item/front/last-entries/index.js similarity index 100% rename from modules/item/front/src/last-entries/index.js rename to modules/item/front/last-entries/index.js diff --git a/modules/item/front/src/last-entries/locale/es.yml b/modules/item/front/last-entries/locale/es.yml similarity index 100% rename from modules/item/front/src/last-entries/locale/es.yml rename to modules/item/front/last-entries/locale/es.yml diff --git a/modules/item/front/src/last-entries/style.scss b/modules/item/front/last-entries/style.scss similarity index 100% rename from modules/item/front/src/last-entries/style.scss rename to modules/item/front/last-entries/style.scss diff --git a/modules/item/front/src/locale/en.yml b/modules/item/front/locale/en.yml similarity index 100% rename from modules/item/front/src/locale/en.yml rename to modules/item/front/locale/en.yml diff --git a/modules/item/front/src/locale/es.yml b/modules/item/front/locale/es.yml similarity index 100% rename from modules/item/front/src/locale/es.yml rename to modules/item/front/locale/es.yml diff --git a/modules/item/front/module.js b/modules/item/front/module.js new file mode 100644 index 000000000..0265f92a2 --- /dev/null +++ b/modules/item/front/module.js @@ -0,0 +1,3 @@ +import {ng} from 'core/vendor'; + +export default ng.module('item', ['vnCore']); diff --git a/modules/item/front/src/niche/index.html b/modules/item/front/niche/index.html similarity index 100% rename from modules/item/front/src/niche/index.html rename to modules/item/front/niche/index.html diff --git a/modules/item/front/src/niche/index.js b/modules/item/front/niche/index.js similarity index 100% rename from modules/item/front/src/niche/index.js rename to modules/item/front/niche/index.js diff --git a/modules/item/front/src/search-panel/index.html b/modules/item/front/search-panel/index.html similarity index 100% rename from modules/item/front/src/search-panel/index.html rename to modules/item/front/search-panel/index.html diff --git a/modules/item/front/src/search-panel/index.js b/modules/item/front/search-panel/index.js similarity index 91% rename from modules/item/front/src/search-panel/index.js rename to modules/item/front/search-panel/index.js index b752e34e7..530172a71 100644 --- a/modules/item/front/src/search-panel/index.js +++ b/modules/item/front/search-panel/index.js @@ -1,5 +1,5 @@ import ngModule from '../module'; -import SearchPanel from 'core/src/components/searchbar/search-panel'; +import SearchPanel from 'core/components/searchbar/search-panel'; class Controller extends SearchPanel { set filter(value) { diff --git a/modules/item/front/src/search-panel/index.spec.js b/modules/item/front/search-panel/index.spec.js similarity index 100% rename from modules/item/front/src/search-panel/index.spec.js rename to modules/item/front/search-panel/index.spec.js diff --git a/modules/item/front/src/search-panel/locale/es.yml b/modules/item/front/search-panel/locale/es.yml similarity index 100% rename from modules/item/front/src/search-panel/locale/es.yml rename to modules/item/front/search-panel/locale/es.yml diff --git a/modules/item/front/src/item.js b/modules/item/front/src/item.js deleted file mode 100644 index 4a5db10bf..000000000 --- a/modules/item/front/src/item.js +++ /dev/null @@ -1,21 +0,0 @@ -export * from './module'; - -import './index'; -import './search-panel'; -import './diary'; -import './create'; -import './card'; -import './descriptor'; -import './descriptor-popover'; -import './ticket-descriptor'; -import './ticket-descriptor-popover'; -import './data'; -import './tags'; -import './tax'; -// import './history'; -import './last-entries'; -import './niche'; -import './botanical'; -import './barcode'; -import './summary'; - diff --git a/modules/item/front/src/module.js b/modules/item/front/src/module.js deleted file mode 100644 index b44509fb2..000000000 --- a/modules/item/front/src/module.js +++ /dev/null @@ -1,5 +0,0 @@ -import {ng} from 'vendor'; -import 'core'; - -const ngModule = ng.module('item', ['vnCore']); -export default ngModule; diff --git a/modules/item/front/src/summary/index.html b/modules/item/front/summary/index.html similarity index 100% rename from modules/item/front/src/summary/index.html rename to modules/item/front/summary/index.html diff --git a/modules/item/front/src/summary/index.js b/modules/item/front/summary/index.js similarity index 100% rename from modules/item/front/src/summary/index.js rename to modules/item/front/summary/index.js diff --git a/modules/item/front/src/summary/index.spec.js b/modules/item/front/summary/index.spec.js similarity index 100% rename from modules/item/front/src/summary/index.spec.js rename to modules/item/front/summary/index.spec.js diff --git a/modules/item/front/src/summary/locale/es.yml b/modules/item/front/summary/locale/es.yml similarity index 100% rename from modules/item/front/src/summary/locale/es.yml rename to modules/item/front/summary/locale/es.yml diff --git a/modules/item/front/src/summary/style.scss b/modules/item/front/summary/style.scss similarity index 100% rename from modules/item/front/src/summary/style.scss rename to modules/item/front/summary/style.scss diff --git a/modules/item/front/src/tags/index.html b/modules/item/front/tags/index.html similarity index 100% rename from modules/item/front/src/tags/index.html rename to modules/item/front/tags/index.html diff --git a/modules/item/front/src/tags/index.js b/modules/item/front/tags/index.js similarity index 100% rename from modules/item/front/src/tags/index.js rename to modules/item/front/tags/index.js diff --git a/modules/item/front/src/tags/index.spec.js b/modules/item/front/tags/index.spec.js similarity index 98% rename from modules/item/front/src/tags/index.spec.js rename to modules/item/front/tags/index.spec.js index a4593e2a8..56b3d9cad 100644 --- a/modules/item/front/src/tags/index.spec.js +++ b/modules/item/front/tags/index.spec.js @@ -1,5 +1,5 @@ import './index.js'; -import crudModel from 'mocks/crud-model'; +import crudModel from 'core/mocks/crud-model'; describe('Item', () => { describe('Component vnItemTags', () => { diff --git a/modules/item/front/src/tax/index.html b/modules/item/front/tax/index.html similarity index 100% rename from modules/item/front/src/tax/index.html rename to modules/item/front/tax/index.html diff --git a/modules/item/front/src/tax/index.js b/modules/item/front/tax/index.js similarity index 100% rename from modules/item/front/src/tax/index.js rename to modules/item/front/tax/index.js diff --git a/modules/item/front/src/tax/index.spec.js b/modules/item/front/tax/index.spec.js similarity index 100% rename from modules/item/front/src/tax/index.spec.js rename to modules/item/front/tax/index.spec.js diff --git a/modules/item/front/src/ticket-descriptor-popover/index.html b/modules/item/front/ticket-descriptor-popover/index.html similarity index 100% rename from modules/item/front/src/ticket-descriptor-popover/index.html rename to modules/item/front/ticket-descriptor-popover/index.html diff --git a/modules/item/front/src/ticket-descriptor-popover/index.js b/modules/item/front/ticket-descriptor-popover/index.js similarity index 98% rename from modules/item/front/src/ticket-descriptor-popover/index.js rename to modules/item/front/ticket-descriptor-popover/index.js index ddf7054dc..21b87a7ac 100644 --- a/modules/item/front/src/ticket-descriptor-popover/index.js +++ b/modules/item/front/ticket-descriptor-popover/index.js @@ -1,5 +1,5 @@ import ngModule from '../module'; -import Component from 'core/src/lib/component'; +import Component from 'core/lib/component'; import './style.scss'; class Controller extends Component { diff --git a/modules/item/front/src/ticket-descriptor-popover/index.spec.js b/modules/item/front/ticket-descriptor-popover/index.spec.js similarity index 100% rename from modules/item/front/src/ticket-descriptor-popover/index.spec.js rename to modules/item/front/ticket-descriptor-popover/index.spec.js diff --git a/modules/item/front/src/ticket-descriptor-popover/style.scss b/modules/item/front/ticket-descriptor-popover/style.scss similarity index 100% rename from modules/item/front/src/ticket-descriptor-popover/style.scss rename to modules/item/front/ticket-descriptor-popover/style.scss diff --git a/modules/item/front/src/ticket-descriptor/index.html b/modules/item/front/ticket-descriptor/index.html similarity index 100% rename from modules/item/front/src/ticket-descriptor/index.html rename to modules/item/front/ticket-descriptor/index.html diff --git a/modules/item/front/src/ticket-descriptor/index.js b/modules/item/front/ticket-descriptor/index.js similarity index 100% rename from modules/item/front/src/ticket-descriptor/index.js rename to modules/item/front/ticket-descriptor/index.js diff --git a/modules/item/front/src/ticket-descriptor/index.spec.js b/modules/item/front/ticket-descriptor/index.spec.js similarity index 100% rename from modules/item/front/src/ticket-descriptor/index.spec.js rename to modules/item/front/ticket-descriptor/index.spec.js diff --git a/modules/order/methods/order-row/addToOrder.js b/modules/order/back/methods/order-row/addToOrder.js similarity index 94% rename from modules/order/methods/order-row/addToOrder.js rename to modules/order/back/methods/order-row/addToOrder.js index 2d34fc524..6537d573b 100644 --- a/modules/order/methods/order-row/addToOrder.js +++ b/modules/order/back/methods/order-row/addToOrder.js @@ -1,4 +1,4 @@ -const UserError = require('vn-loopback/common/helpers').UserError; +const UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethod('addToOrder', { diff --git a/modules/order/methods/order-row/removes.js b/modules/order/back/methods/order-row/removes.js similarity index 88% rename from modules/order/methods/order-row/removes.js rename to modules/order/back/methods/order-row/removes.js index 0f8aaa86e..1b66a4c33 100644 --- a/modules/order/methods/order-row/removes.js +++ b/modules/order/back/methods/order-row/removes.js @@ -1,4 +1,4 @@ -const UserError = require('vn-loopback/common/helpers').UserError; +const UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethod('removes', { @@ -31,9 +31,9 @@ module.exports = Self => { throw new UserError('This order is not editable'); let promises = []; - for (let i = 0; i < params.rows.length; i++) { + for (let i = 0; i < params.rows.length; i++) promises.push(Self.app.models.OrderRow.destroyById(params.rows[i])); - } + return await Promise.all(promises); }; }; diff --git a/modules/order/methods/order-row/specs/addToOrder.spec.js b/modules/order/back/methods/order-row/specs/addToOrder.spec.js similarity index 100% rename from modules/order/methods/order-row/specs/addToOrder.spec.js rename to modules/order/back/methods/order-row/specs/addToOrder.spec.js diff --git a/modules/order/methods/order-row/specs/removes.spec.js b/modules/order/back/methods/order-row/specs/removes.spec.js similarity index 100% rename from modules/order/methods/order-row/specs/removes.spec.js rename to modules/order/back/methods/order-row/specs/removes.spec.js diff --git a/modules/order/methods/order/catalogFilter.js b/modules/order/back/methods/order/catalogFilter.js similarity index 100% rename from modules/order/methods/order/catalogFilter.js rename to modules/order/back/methods/order/catalogFilter.js diff --git a/modules/order/methods/order/getSourceValues.js b/modules/order/back/methods/order/getSourceValues.js similarity index 100% rename from modules/order/methods/order/getSourceValues.js rename to modules/order/back/methods/order/getSourceValues.js diff --git a/modules/order/methods/order/getTaxes.js b/modules/order/back/methods/order/getTaxes.js similarity index 100% rename from modules/order/methods/order/getTaxes.js rename to modules/order/back/methods/order/getTaxes.js diff --git a/modules/order/methods/order/getTotal.js b/modules/order/back/methods/order/getTotal.js similarity index 100% rename from modules/order/methods/order/getTotal.js rename to modules/order/back/methods/order/getTotal.js diff --git a/modules/order/methods/order/getTotalVolume.js b/modules/order/back/methods/order/getTotalVolume.js similarity index 100% rename from modules/order/methods/order/getTotalVolume.js rename to modules/order/back/methods/order/getTotalVolume.js diff --git a/modules/order/methods/order/getVAT.js b/modules/order/back/methods/order/getVAT.js similarity index 100% rename from modules/order/methods/order/getVAT.js rename to modules/order/back/methods/order/getVAT.js diff --git a/modules/order/methods/order/getVolumes.js b/modules/order/back/methods/order/getVolumes.js similarity index 100% rename from modules/order/methods/order/getVolumes.js rename to modules/order/back/methods/order/getVolumes.js diff --git a/modules/order/methods/order/isEditable.js b/modules/order/back/methods/order/isEditable.js similarity index 100% rename from modules/order/methods/order/isEditable.js rename to modules/order/back/methods/order/isEditable.js diff --git a/modules/order/methods/order/new.js b/modules/order/back/methods/order/new.js similarity index 96% rename from modules/order/methods/order/new.js rename to modules/order/back/methods/order/new.js index cdb5d7c38..dbbc51ad0 100644 --- a/modules/order/methods/order/new.js +++ b/modules/order/back/methods/order/new.js @@ -1,4 +1,4 @@ -let UserError = require('vn-loopback/common/helpers').UserError; +let UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethod('new', { diff --git a/modules/order/methods/order/newFromTicket.js b/modules/order/back/methods/order/newFromTicket.js similarity index 100% rename from modules/order/methods/order/newFromTicket.js rename to modules/order/back/methods/order/newFromTicket.js diff --git a/modules/order/methods/order/specs/catalogFilter.spec.js b/modules/order/back/methods/order/specs/catalogFilter.spec.js similarity index 100% rename from modules/order/methods/order/specs/catalogFilter.spec.js rename to modules/order/back/methods/order/specs/catalogFilter.spec.js diff --git a/modules/order/methods/order/specs/getTaxes.spec.js b/modules/order/back/methods/order/specs/getTaxes.spec.js similarity index 100% rename from modules/order/methods/order/specs/getTaxes.spec.js rename to modules/order/back/methods/order/specs/getTaxes.spec.js diff --git a/modules/order/methods/order/specs/getTotal.spec.js b/modules/order/back/methods/order/specs/getTotal.spec.js similarity index 100% rename from modules/order/methods/order/specs/getTotal.spec.js rename to modules/order/back/methods/order/specs/getTotal.spec.js diff --git a/modules/order/methods/order/specs/getTotalVolume.spec.js b/modules/order/back/methods/order/specs/getTotalVolume.spec.js similarity index 100% rename from modules/order/methods/order/specs/getTotalVolume.spec.js rename to modules/order/back/methods/order/specs/getTotalVolume.spec.js diff --git a/modules/order/methods/order/specs/getVAT.spec.js b/modules/order/back/methods/order/specs/getVAT.spec.js similarity index 100% rename from modules/order/methods/order/specs/getVAT.spec.js rename to modules/order/back/methods/order/specs/getVAT.spec.js diff --git a/modules/order/methods/order/specs/getVolumes.spec.js b/modules/order/back/methods/order/specs/getVolumes.spec.js similarity index 100% rename from modules/order/methods/order/specs/getVolumes.spec.js rename to modules/order/back/methods/order/specs/getVolumes.spec.js diff --git a/modules/order/methods/order/specs/isEditable.spec.js b/modules/order/back/methods/order/specs/isEditable.spec.js similarity index 100% rename from modules/order/methods/order/specs/isEditable.spec.js rename to modules/order/back/methods/order/specs/isEditable.spec.js diff --git a/modules/order/methods/order/specs/new.spec.js b/modules/order/back/methods/order/specs/new.spec.js similarity index 97% rename from modules/order/methods/order/specs/new.spec.js rename to modules/order/back/methods/order/specs/new.spec.js index 997f84073..1806ec24d 100644 --- a/modules/order/methods/order/specs/new.spec.js +++ b/modules/order/back/methods/order/specs/new.spec.js @@ -1,5 +1,5 @@ const app = require(`${serviceRoot}/server/server`); -let UserError = require('vn-loopback/common/helpers').UserError; +let UserError = require('vn-loopback/util/user-error'); describe('order new()', () => { let orderId; diff --git a/modules/order/methods/order/specs/summary.spec.js b/modules/order/back/methods/order/specs/summary.spec.js similarity index 100% rename from modules/order/methods/order/specs/summary.spec.js rename to modules/order/back/methods/order/specs/summary.spec.js diff --git a/modules/order/methods/order/specs/updateBasicData.spec.js b/modules/order/back/methods/order/specs/updateBasicData.spec.js similarity index 100% rename from modules/order/methods/order/specs/updateBasicData.spec.js rename to modules/order/back/methods/order/specs/updateBasicData.spec.js diff --git a/modules/order/methods/order/summary.js b/modules/order/back/methods/order/summary.js similarity index 100% rename from modules/order/methods/order/summary.js rename to modules/order/back/methods/order/summary.js diff --git a/modules/order/methods/order/updateBasicData.js b/modules/order/back/methods/order/updateBasicData.js similarity index 92% rename from modules/order/methods/order/updateBasicData.js rename to modules/order/back/methods/order/updateBasicData.js index 5ab8cddef..873bbc1f3 100644 --- a/modules/order/methods/order/updateBasicData.js +++ b/modules/order/back/methods/order/updateBasicData.js @@ -1,4 +1,4 @@ -let UserError = require('vn-loopback/common/helpers').UserError; +let UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethod('updateBasicData', { @@ -28,7 +28,7 @@ module.exports = Self => { } }); - Self.updateBasicData = async (params, id) => { + Self.updateBasicData = async(params, id) => { let order = await Self.app.models.Order.findById(id); let orderRows = await Self.app.models.OrderRow.find({where: {orderFk: id}}); diff --git a/modules/order/model-config.json b/modules/order/back/model-config.json similarity index 100% rename from modules/order/model-config.json rename to modules/order/back/model-config.json diff --git a/modules/order/models/order-row.js b/modules/order/back/models/order-row.js similarity index 100% rename from modules/order/models/order-row.js rename to modules/order/back/models/order-row.js diff --git a/modules/order/models/order-row.json b/modules/order/back/models/order-row.json similarity index 100% rename from modules/order/models/order-row.json rename to modules/order/back/models/order-row.json diff --git a/modules/order/models/order.js b/modules/order/back/models/order.js similarity index 100% rename from modules/order/models/order.js rename to modules/order/back/models/order.js diff --git a/modules/order/models/order.json b/modules/order/back/models/order.json similarity index 100% rename from modules/order/models/order.json rename to modules/order/back/models/order.json diff --git a/modules/order/front/src/basic-data/index.html b/modules/order/front/basic-data/index.html similarity index 100% rename from modules/order/front/src/basic-data/index.html rename to modules/order/front/basic-data/index.html diff --git a/modules/order/front/src/basic-data/index.js b/modules/order/front/basic-data/index.js similarity index 100% rename from modules/order/front/src/basic-data/index.js rename to modules/order/front/basic-data/index.js diff --git a/modules/order/front/src/basic-data/locale/es.yml b/modules/order/front/basic-data/locale/es.yml similarity index 100% rename from modules/order/front/src/basic-data/locale/es.yml rename to modules/order/front/basic-data/locale/es.yml diff --git a/modules/order/front/src/basic-data/style.scss b/modules/order/front/basic-data/style.scss similarity index 100% rename from modules/order/front/src/basic-data/style.scss rename to modules/order/front/basic-data/style.scss diff --git a/modules/order/front/src/card/index.html b/modules/order/front/card/index.html similarity index 100% rename from modules/order/front/src/card/index.html rename to modules/order/front/card/index.html diff --git a/modules/order/front/src/card/index.js b/modules/order/front/card/index.js similarity index 100% rename from modules/order/front/src/card/index.js rename to modules/order/front/card/index.js diff --git a/modules/order/front/src/card/index.spec.js b/modules/order/front/card/index.spec.js similarity index 100% rename from modules/order/front/src/card/index.spec.js rename to modules/order/front/card/index.spec.js diff --git a/modules/order/front/src/catalog-search-panel/index.html b/modules/order/front/catalog-search-panel/index.html similarity index 100% rename from modules/order/front/src/catalog-search-panel/index.html rename to modules/order/front/catalog-search-panel/index.html diff --git a/modules/order/front/src/catalog-search-panel/index.js b/modules/order/front/catalog-search-panel/index.js similarity index 69% rename from modules/order/front/src/catalog-search-panel/index.js rename to modules/order/front/catalog-search-panel/index.js index 0399d7aeb..6ad88c978 100644 --- a/modules/order/front/src/catalog-search-panel/index.js +++ b/modules/order/front/catalog-search-panel/index.js @@ -1,5 +1,5 @@ import ngModule from '../module'; -import SearchPanel from 'core/src/components/searchbar/search-panel'; +import SearchPanel from 'core/components/searchbar/search-panel'; ngModule.component('vnOrderCatalogSearchPanel', { template: require('./index.html'), diff --git a/modules/order/front/src/catalog/index.html b/modules/order/front/catalog/index.html similarity index 100% rename from modules/order/front/src/catalog/index.html rename to modules/order/front/catalog/index.html diff --git a/modules/order/front/src/catalog/index.js b/modules/order/front/catalog/index.js similarity index 100% rename from modules/order/front/src/catalog/index.js rename to modules/order/front/catalog/index.js diff --git a/modules/order/front/src/catalog/index.spec.js b/modules/order/front/catalog/index.spec.js similarity index 97% rename from modules/order/front/src/catalog/index.spec.js rename to modules/order/front/catalog/index.spec.js index 669ff8a46..3f3c49c64 100644 --- a/modules/order/front/src/catalog/index.spec.js +++ b/modules/order/front/catalog/index.spec.js @@ -1,5 +1,5 @@ import './index.js'; -import crudModel from 'mocks/crud-model'; +import crudModel from 'core/mocks/crud-model'; describe('Order', () => { describe('Component vnOrderCatalog', () => { diff --git a/modules/order/front/src/catalog/style.scss b/modules/order/front/catalog/style.scss similarity index 100% rename from modules/order/front/src/catalog/style.scss rename to modules/order/front/catalog/style.scss diff --git a/modules/order/front/src/create/card.html b/modules/order/front/create/card.html similarity index 100% rename from modules/order/front/src/create/card.html rename to modules/order/front/create/card.html diff --git a/modules/order/front/src/create/card.js b/modules/order/front/create/card.js similarity index 100% rename from modules/order/front/src/create/card.js rename to modules/order/front/create/card.js diff --git a/modules/order/front/src/create/card.spec.js b/modules/order/front/create/card.spec.js similarity index 100% rename from modules/order/front/src/create/card.spec.js rename to modules/order/front/create/card.spec.js diff --git a/modules/order/front/src/create/index.html b/modules/order/front/create/index.html similarity index 100% rename from modules/order/front/src/create/index.html rename to modules/order/front/create/index.html diff --git a/modules/order/front/src/create/index.js b/modules/order/front/create/index.js similarity index 100% rename from modules/order/front/src/create/index.js rename to modules/order/front/create/index.js diff --git a/modules/order/front/src/create/index.spec.js b/modules/order/front/create/index.spec.js similarity index 100% rename from modules/order/front/src/create/index.spec.js rename to modules/order/front/create/index.spec.js diff --git a/modules/order/front/src/create/locale/es.yml b/modules/order/front/create/locale/es.yml similarity index 100% rename from modules/order/front/src/create/locale/es.yml rename to modules/order/front/create/locale/es.yml diff --git a/modules/order/front/src/descriptor/index.html b/modules/order/front/descriptor/index.html similarity index 100% rename from modules/order/front/src/descriptor/index.html rename to modules/order/front/descriptor/index.html diff --git a/modules/order/front/src/descriptor/index.js b/modules/order/front/descriptor/index.js similarity index 100% rename from modules/order/front/src/descriptor/index.js rename to modules/order/front/descriptor/index.js diff --git a/modules/order/front/src/descriptor/locale/es.yml b/modules/order/front/descriptor/locale/es.yml similarity index 100% rename from modules/order/front/src/descriptor/locale/es.yml rename to modules/order/front/descriptor/locale/es.yml diff --git a/modules/order/front/src/descriptor/style.scss b/modules/order/front/descriptor/style.scss similarity index 100% rename from modules/order/front/src/descriptor/style.scss rename to modules/order/front/descriptor/style.scss diff --git a/modules/order/front/src/filter/index.html b/modules/order/front/filter/index.html similarity index 100% rename from modules/order/front/src/filter/index.html rename to modules/order/front/filter/index.html diff --git a/modules/order/front/src/filter/index.js b/modules/order/front/filter/index.js similarity index 100% rename from modules/order/front/src/filter/index.js rename to modules/order/front/filter/index.js diff --git a/modules/order/front/src/filter/index.spec.js b/modules/order/front/filter/index.spec.js similarity index 99% rename from modules/order/front/src/filter/index.spec.js rename to modules/order/front/filter/index.spec.js index 7fade3ee2..4be996ac8 100644 --- a/modules/order/front/src/filter/index.spec.js +++ b/modules/order/front/filter/index.spec.js @@ -1,5 +1,5 @@ import './index.js'; -import crudModel from 'mocks/crud-model'; +import crudModel from 'core/mocks/crud-model'; describe('Order', () => { describe('Component vnCatalogFilter', () => { diff --git a/modules/order/front/src/filter/style.scss b/modules/order/front/filter/style.scss similarity index 100% rename from modules/order/front/src/filter/style.scss rename to modules/order/front/filter/style.scss diff --git a/modules/order/front/index.js b/modules/order/front/index.js index 8420b1093..2232a7501 100644 --- a/modules/order/front/index.js +++ b/modules/order/front/index.js @@ -1 +1,16 @@ -export * from './src'; +export * from './module'; + +import './index/'; +import './card'; +import './descriptor'; +import './search-panel'; +import './catalog-search-panel'; +import './filter'; +import './summary'; +import './catalog'; +import './line'; +import './prices-popover'; +import './volume'; +import './create'; +import './create/card'; +import './basic-data'; diff --git a/modules/order/front/src/index/index.html b/modules/order/front/index/index.html similarity index 100% rename from modules/order/front/src/index/index.html rename to modules/order/front/index/index.html diff --git a/modules/order/front/src/index/index.js b/modules/order/front/index/index.js similarity index 100% rename from modules/order/front/src/index/index.js rename to modules/order/front/index/index.js diff --git a/modules/order/front/src/index/style.scss b/modules/order/front/index/style.scss similarity index 100% rename from modules/order/front/src/index/style.scss rename to modules/order/front/index/style.scss diff --git a/modules/order/front/src/line/index.html b/modules/order/front/line/index.html similarity index 100% rename from modules/order/front/src/line/index.html rename to modules/order/front/line/index.html diff --git a/modules/order/front/src/line/index.js b/modules/order/front/line/index.js similarity index 100% rename from modules/order/front/src/line/index.js rename to modules/order/front/line/index.js diff --git a/modules/order/front/src/line/index.spec.js b/modules/order/front/line/index.spec.js similarity index 100% rename from modules/order/front/src/line/index.spec.js rename to modules/order/front/line/index.spec.js diff --git a/modules/order/front/src/line/locale/es.yml b/modules/order/front/line/locale/es.yml similarity index 100% rename from modules/order/front/src/line/locale/es.yml rename to modules/order/front/line/locale/es.yml diff --git a/modules/order/front/src/line/style.scss b/modules/order/front/line/style.scss similarity index 100% rename from modules/order/front/src/line/style.scss rename to modules/order/front/line/style.scss diff --git a/modules/order/front/src/locale/en.yml b/modules/order/front/locale/en.yml similarity index 100% rename from modules/order/front/src/locale/en.yml rename to modules/order/front/locale/en.yml diff --git a/modules/order/front/src/locale/es.yml b/modules/order/front/locale/es.yml similarity index 100% rename from modules/order/front/src/locale/es.yml rename to modules/order/front/locale/es.yml diff --git a/modules/order/front/module.js b/modules/order/front/module.js new file mode 100644 index 000000000..9956e2703 --- /dev/null +++ b/modules/order/front/module.js @@ -0,0 +1,3 @@ +import {ng} from 'core/vendor'; + +export default ng.module('order', ['vnCore']); diff --git a/modules/order/front/src/prices-popover/index.html b/modules/order/front/prices-popover/index.html similarity index 100% rename from modules/order/front/src/prices-popover/index.html rename to modules/order/front/prices-popover/index.html diff --git a/modules/order/front/src/prices-popover/index.js b/modules/order/front/prices-popover/index.js similarity index 100% rename from modules/order/front/src/prices-popover/index.js rename to modules/order/front/prices-popover/index.js diff --git a/modules/order/front/src/prices-popover/locale/es.yml b/modules/order/front/prices-popover/locale/es.yml similarity index 100% rename from modules/order/front/src/prices-popover/locale/es.yml rename to modules/order/front/prices-popover/locale/es.yml diff --git a/modules/order/front/src/prices-popover/style.scss b/modules/order/front/prices-popover/style.scss similarity index 100% rename from modules/order/front/src/prices-popover/style.scss rename to modules/order/front/prices-popover/style.scss diff --git a/modules/order/front/src/search-panel/index.html b/modules/order/front/search-panel/index.html similarity index 100% rename from modules/order/front/src/search-panel/index.html rename to modules/order/front/search-panel/index.html diff --git a/modules/order/front/src/search-panel/index.js b/modules/order/front/search-panel/index.js similarity index 68% rename from modules/order/front/src/search-panel/index.js rename to modules/order/front/search-panel/index.js index 90c8fa77d..1ab4c15cf 100644 --- a/modules/order/front/src/search-panel/index.js +++ b/modules/order/front/search-panel/index.js @@ -1,5 +1,5 @@ import ngModule from '../module'; -import SearchPanel from 'core/src/components/searchbar/search-panel'; +import SearchPanel from 'core/components/searchbar/search-panel'; ngModule.component('vnOrderSearchPanel', { template: require('./index.html'), diff --git a/modules/order/front/src/search-panel/locale/es.yml b/modules/order/front/search-panel/locale/es.yml similarity index 100% rename from modules/order/front/src/search-panel/locale/es.yml rename to modules/order/front/search-panel/locale/es.yml diff --git a/modules/order/front/src/index.js b/modules/order/front/src/index.js deleted file mode 100644 index 27b5699a0..000000000 --- a/modules/order/front/src/index.js +++ /dev/null @@ -1,16 +0,0 @@ -export * from './module'; - -import './card'; -import './descriptor'; -import './search-panel'; -import './catalog-search-panel'; -import './filter'; -import './index/'; -import './summary'; -import './catalog'; -import './line'; -import './prices-popover'; -import './volume'; -import './create'; -import './create/card'; -import './basic-data'; diff --git a/modules/order/front/src/module.js b/modules/order/front/src/module.js deleted file mode 100644 index b00c4baf1..000000000 --- a/modules/order/front/src/module.js +++ /dev/null @@ -1,5 +0,0 @@ -import {ng} from 'vendor'; -import 'core'; - -const ngModule = ng.module('order', ['vnCore']); -export default ngModule; diff --git a/modules/order/front/src/summary/index.html b/modules/order/front/summary/index.html similarity index 100% rename from modules/order/front/src/summary/index.html rename to modules/order/front/summary/index.html diff --git a/modules/order/front/src/summary/index.js b/modules/order/front/summary/index.js similarity index 100% rename from modules/order/front/src/summary/index.js rename to modules/order/front/summary/index.js diff --git a/modules/order/front/src/summary/index.spec.js b/modules/order/front/summary/index.spec.js similarity index 100% rename from modules/order/front/src/summary/index.spec.js rename to modules/order/front/summary/index.spec.js diff --git a/modules/order/front/src/summary/style.scss b/modules/order/front/summary/style.scss similarity index 100% rename from modules/order/front/src/summary/style.scss rename to modules/order/front/summary/style.scss diff --git a/modules/order/front/src/volume/index.html b/modules/order/front/volume/index.html similarity index 100% rename from modules/order/front/src/volume/index.html rename to modules/order/front/volume/index.html diff --git a/modules/order/front/src/volume/index.js b/modules/order/front/volume/index.js similarity index 100% rename from modules/order/front/src/volume/index.js rename to modules/order/front/volume/index.js diff --git a/modules/order/front/src/volume/index.spec.js b/modules/order/front/volume/index.spec.js similarity index 100% rename from modules/order/front/src/volume/index.spec.js rename to modules/order/front/volume/index.spec.js diff --git a/modules/order/front/src/volume/style.scss b/modules/order/front/volume/style.scss similarity index 100% rename from modules/order/front/src/volume/style.scss rename to modules/order/front/volume/style.scss diff --git a/modules/route/model-config.json b/modules/route/back/model-config.json similarity index 100% rename from modules/route/model-config.json rename to modules/route/back/model-config.json diff --git a/modules/route/models/delivery.json b/modules/route/back/models/delivery.json similarity index 100% rename from modules/route/models/delivery.json rename to modules/route/back/models/delivery.json diff --git a/modules/route/models/route.json b/modules/route/back/models/route.json similarity index 100% rename from modules/route/models/route.json rename to modules/route/back/models/route.json diff --git a/modules/route/models/vehicle.json b/modules/route/back/models/vehicle.json similarity index 100% rename from modules/route/models/vehicle.json rename to modules/route/back/models/vehicle.json diff --git a/modules/route/front/index.js b/modules/route/front/index.js index a2dc014f1..20a96c9a5 100644 --- a/modules/route/front/index.js +++ b/modules/route/front/index.js @@ -1 +1 @@ -// export * from './src'; +export * from './module'; diff --git a/modules/route/front/src/locale/en.yml b/modules/route/front/locale/en.yml similarity index 100% rename from modules/route/front/src/locale/en.yml rename to modules/route/front/locale/en.yml diff --git a/modules/route/front/src/locale/es.yml b/modules/route/front/locale/es.yml similarity index 100% rename from modules/route/front/src/locale/es.yml rename to modules/route/front/locale/es.yml diff --git a/modules/route/front/module.js b/modules/route/front/module.js new file mode 100644 index 000000000..bd7b1516b --- /dev/null +++ b/modules/route/front/module.js @@ -0,0 +1,3 @@ +import {ng} from 'core/vendor'; + +export default ng.module('route', ['vnCore']); diff --git a/modules/route/front/src/index.js b/modules/route/front/src/index.js deleted file mode 100644 index cfb4664b4..000000000 --- a/modules/route/front/src/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from './module'; - -// import components diff --git a/modules/route/front/src/module.js b/modules/route/front/src/module.js deleted file mode 100644 index 2521d0a39..000000000 --- a/modules/route/front/src/module.js +++ /dev/null @@ -1,5 +0,0 @@ -import {ng} from 'vendor'; -import 'core'; - -const ngModule = ng.module('route', ['vnCore']); -export default ngModule; diff --git a/modules/ticket/methods/expedition/filter.js b/modules/ticket/back/methods/expedition/filter.js similarity index 100% rename from modules/ticket/methods/expedition/filter.js rename to modules/ticket/back/methods/expedition/filter.js diff --git a/modules/ticket/methods/packaging/listPackaging.js b/modules/ticket/back/methods/packaging/listPackaging.js similarity index 100% rename from modules/ticket/methods/packaging/listPackaging.js rename to modules/ticket/back/methods/packaging/listPackaging.js diff --git a/modules/ticket/methods/packaging/specs/listPackaging.spec.js b/modules/ticket/back/methods/packaging/specs/listPackaging.spec.js similarity index 100% rename from modules/ticket/methods/packaging/specs/listPackaging.spec.js rename to modules/ticket/back/methods/packaging/specs/listPackaging.spec.js diff --git a/modules/ticket/methods/sale-tracking/listSaleTracking.js b/modules/ticket/back/methods/sale-tracking/listSaleTracking.js similarity index 100% rename from modules/ticket/methods/sale-tracking/listSaleTracking.js rename to modules/ticket/back/methods/sale-tracking/listSaleTracking.js diff --git a/modules/ticket/methods/sale-tracking/specs/listSaleTracking.spec.js b/modules/ticket/back/methods/sale-tracking/specs/listSaleTracking.spec.js similarity index 100% rename from modules/ticket/methods/sale-tracking/specs/listSaleTracking.spec.js rename to modules/ticket/back/methods/sale-tracking/specs/listSaleTracking.spec.js diff --git a/modules/ticket/methods/sale/getClaimableFromTicket.js b/modules/ticket/back/methods/sale/getClaimableFromTicket.js similarity index 100% rename from modules/ticket/methods/sale/getClaimableFromTicket.js rename to modules/ticket/back/methods/sale/getClaimableFromTicket.js diff --git a/modules/ticket/methods/sale/moveToNewTicket.js b/modules/ticket/back/methods/sale/moveToNewTicket.js similarity index 95% rename from modules/ticket/methods/sale/moveToNewTicket.js rename to modules/ticket/back/methods/sale/moveToNewTicket.js index 9df4db063..d58ab08c7 100644 --- a/modules/ticket/methods/sale/moveToNewTicket.js +++ b/modules/ticket/back/methods/sale/moveToNewTicket.js @@ -1,4 +1,4 @@ -let UserError = require('vn-loopback/common/helpers').UserError; +let UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethodCtx('moveToNewTicket', { @@ -27,7 +27,7 @@ module.exports = Self => { } }); - Self.moveToNewTicket = async (ctx, params) => { + Self.moveToNewTicket = async(ctx, params) => { let userId = ctx.req.accessToken.userId; let model = Self.app.models; let thisTicketIsEditable = await model.Ticket.isEditable(params.ticket.oldTicketFk); diff --git a/modules/ticket/methods/sale/moveToTicket.js b/modules/ticket/back/methods/sale/moveToTicket.js similarity index 89% rename from modules/ticket/methods/sale/moveToTicket.js rename to modules/ticket/back/methods/sale/moveToTicket.js index d79895a67..5e3779551 100644 --- a/modules/ticket/methods/sale/moveToTicket.js +++ b/modules/ticket/back/methods/sale/moveToTicket.js @@ -1,4 +1,4 @@ -let UserError = require('vn-loopback/common/helpers').UserError; +let UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethod('moveToTicket', { @@ -30,8 +30,7 @@ module.exports = Self => { if (!newTicketIsEditable) throw new UserError(`The sales of this ticket can't be modified`); - for (let i = 0; i < params.sales.length; i++) { + for (let i = 0; i < params.sales.length; i++) await Self.app.models.Sale.update({id: params.sales[i].id}, {ticketFk: params.newTicketFk}); - } }; }; diff --git a/modules/ticket/methods/sale/priceDifference.js b/modules/ticket/back/methods/sale/priceDifference.js similarity index 100% rename from modules/ticket/methods/sale/priceDifference.js rename to modules/ticket/back/methods/sale/priceDifference.js diff --git a/modules/ticket/methods/sale/removes.js b/modules/ticket/back/methods/sale/removes.js similarity index 87% rename from modules/ticket/methods/sale/removes.js rename to modules/ticket/back/methods/sale/removes.js index f69759820..71768af4b 100644 --- a/modules/ticket/methods/sale/removes.js +++ b/modules/ticket/back/methods/sale/removes.js @@ -1,4 +1,4 @@ -let UserError = require('vn-loopback/common/helpers').UserError; +let UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethod('removes', { @@ -27,9 +27,9 @@ module.exports = Self => { throw new UserError(`The sales of this ticket can't be modified`); let promises = []; - for (let i = 0; i < params.sales.length; i++) { + for (let i = 0; i < params.sales.length; i++) promises.push(Self.app.models.Sale.destroyById(params.sales[i].id)); - } + return Promise.all(promises); }; }; diff --git a/modules/ticket/methods/sale/reserve.js b/modules/ticket/back/methods/sale/reserve.js similarity index 87% rename from modules/ticket/methods/sale/reserve.js rename to modules/ticket/back/methods/sale/reserve.js index 7160d899d..69cd54224 100644 --- a/modules/ticket/methods/sale/reserve.js +++ b/modules/ticket/back/methods/sale/reserve.js @@ -1,5 +1,5 @@ -let UserError = require('vn-loopback/common/helpers').UserError; +let UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethod('reserve', { @@ -27,8 +27,7 @@ module.exports = Self => { if (!thisTicketIsEditable) throw new UserError(`The sales of this ticket can't be modified`); - for (let i = 0; i < params.sales.length; i++) { + for (let i = 0; i < params.sales.length; i++) await Self.app.models.Sale.update({id: params.sales[i].id}, {reserved: params.reserved}); - } }; }; diff --git a/modules/ticket/methods/sale/specs/getClaimableFromTicket.spec.js b/modules/ticket/back/methods/sale/specs/getClaimableFromTicket.spec.js similarity index 100% rename from modules/ticket/methods/sale/specs/getClaimableFromTicket.spec.js rename to modules/ticket/back/methods/sale/specs/getClaimableFromTicket.spec.js diff --git a/modules/ticket/methods/sale/specs/moveToTicket.spec.js b/modules/ticket/back/methods/sale/specs/moveToTicket.spec.js similarity index 100% rename from modules/ticket/methods/sale/specs/moveToTicket.spec.js rename to modules/ticket/back/methods/sale/specs/moveToTicket.spec.js diff --git a/modules/ticket/methods/sale/specs/priceDifference.spec.js b/modules/ticket/back/methods/sale/specs/priceDifference.spec.js similarity index 100% rename from modules/ticket/methods/sale/specs/priceDifference.spec.js rename to modules/ticket/back/methods/sale/specs/priceDifference.spec.js diff --git a/modules/ticket/methods/sale/specs/removes.spec.js b/modules/ticket/back/methods/sale/specs/removes.spec.js similarity index 100% rename from modules/ticket/methods/sale/specs/removes.spec.js rename to modules/ticket/back/methods/sale/specs/removes.spec.js diff --git a/modules/ticket/methods/sale/specs/reserve.spec.js b/modules/ticket/back/methods/sale/specs/reserve.spec.js similarity index 100% rename from modules/ticket/methods/sale/specs/reserve.spec.js rename to modules/ticket/back/methods/sale/specs/reserve.spec.js diff --git a/modules/ticket/methods/sale/specs/updatePrice.spec.js b/modules/ticket/back/methods/sale/specs/updatePrice.spec.js similarity index 100% rename from modules/ticket/methods/sale/specs/updatePrice.spec.js rename to modules/ticket/back/methods/sale/specs/updatePrice.spec.js diff --git a/modules/ticket/methods/sale/specs/updateQuantity.spec.js b/modules/ticket/back/methods/sale/specs/updateQuantity.spec.js similarity index 100% rename from modules/ticket/methods/sale/specs/updateQuantity.spec.js rename to modules/ticket/back/methods/sale/specs/updateQuantity.spec.js diff --git a/modules/ticket/methods/sale/updateDiscount.js b/modules/ticket/back/methods/sale/updateDiscount.js similarity index 97% rename from modules/ticket/methods/sale/updateDiscount.js rename to modules/ticket/back/methods/sale/updateDiscount.js index 2cd9e0c91..a90597726 100644 --- a/modules/ticket/methods/sale/updateDiscount.js +++ b/modules/ticket/back/methods/sale/updateDiscount.js @@ -1,4 +1,4 @@ -let UserError = require('vn-loopback/common/helpers').UserError; +let UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethod('updateDiscount', { diff --git a/modules/ticket/methods/sale/updatePrice.js b/modules/ticket/back/methods/sale/updatePrice.js similarity index 97% rename from modules/ticket/methods/sale/updatePrice.js rename to modules/ticket/back/methods/sale/updatePrice.js index 28b513b54..0cb90041d 100644 --- a/modules/ticket/methods/sale/updatePrice.js +++ b/modules/ticket/back/methods/sale/updatePrice.js @@ -1,4 +1,4 @@ -let UserError = require('vn-loopback/common/helpers').UserError; +let UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethod('updatePrice', { diff --git a/modules/ticket/methods/sale/updateQuantity.js b/modules/ticket/back/methods/sale/updateQuantity.js similarity index 94% rename from modules/ticket/methods/sale/updateQuantity.js rename to modules/ticket/back/methods/sale/updateQuantity.js index 98fbb907a..8553c7ae7 100644 --- a/modules/ticket/methods/sale/updateQuantity.js +++ b/modules/ticket/back/methods/sale/updateQuantity.js @@ -1,4 +1,4 @@ -let UserError = require('vn-loopback/common/helpers').UserError; +let UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethod('updateQuantity', { diff --git a/modules/ticket/methods/ticket-tracking/changeState.js b/modules/ticket/back/methods/ticket-tracking/changeState.js similarity index 95% rename from modules/ticket/methods/ticket-tracking/changeState.js rename to modules/ticket/back/methods/ticket-tracking/changeState.js index 0f9e76a9b..3ec81f2ce 100644 --- a/modules/ticket/methods/ticket-tracking/changeState.js +++ b/modules/ticket/back/methods/ticket-tracking/changeState.js @@ -1,4 +1,4 @@ -const UserError = require('vn-loopback/common/helpers').UserError; +const UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethodCtx('changeState', { diff --git a/modules/ticket/methods/ticket-tracking/specs/changeState.spec.js b/modules/ticket/back/methods/ticket-tracking/specs/changeState.spec.js similarity index 100% rename from modules/ticket/methods/ticket-tracking/specs/changeState.spec.js rename to modules/ticket/back/methods/ticket-tracking/specs/changeState.spec.js diff --git a/modules/ticket/methods/ticket/changeWorker.js b/modules/ticket/back/methods/ticket/changeWorker.js similarity index 100% rename from modules/ticket/methods/ticket/changeWorker.js rename to modules/ticket/back/methods/ticket/changeWorker.js diff --git a/modules/ticket/methods/ticket/componentUpdate.js b/modules/ticket/back/methods/ticket/componentUpdate.js similarity index 100% rename from modules/ticket/methods/ticket/componentUpdate.js rename to modules/ticket/back/methods/ticket/componentUpdate.js diff --git a/modules/ticket/methods/ticket/deleted.js b/modules/ticket/back/methods/ticket/deleted.js similarity index 95% rename from modules/ticket/methods/ticket/deleted.js rename to modules/ticket/back/methods/ticket/deleted.js index ce5603f08..7ddb180f7 100644 --- a/modules/ticket/methods/ticket/deleted.js +++ b/modules/ticket/back/methods/ticket/deleted.js @@ -1,4 +1,4 @@ -const UserError = require('vn-loopback/common/helpers').UserError; +const UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethodCtx('deleted', { diff --git a/modules/ticket/methods/ticket/filter.js b/modules/ticket/back/methods/ticket/filter.js similarity index 98% rename from modules/ticket/methods/ticket/filter.js rename to modules/ticket/back/methods/ticket/filter.js index 0e6efd433..16255bf82 100644 --- a/modules/ticket/methods/ticket/filter.js +++ b/modules/ticket/back/methods/ticket/filter.js @@ -1,7 +1,7 @@ const ParameterizedSQL = require('loopback-connector').ParameterizedSQL; -const buildFilter = require('vn-loopback/common/filter').buildFilter; -const mergeFilters = require('vn-loopback/common/filter').mergeFilters; +const buildFilter = require('vn-loopback/util/filter').buildFilter; +const mergeFilters = require('vn-loopback/util/filter').mergeFilters; module.exports = Self => { Self.remoteMethod('filter', { diff --git a/modules/ticket/methods/ticket/getLanded.js b/modules/ticket/back/methods/ticket/getLanded.js similarity index 100% rename from modules/ticket/methods/ticket/getLanded.js rename to modules/ticket/back/methods/ticket/getLanded.js diff --git a/modules/ticket/methods/ticket/getSales.js b/modules/ticket/back/methods/ticket/getSales.js similarity index 100% rename from modules/ticket/methods/ticket/getSales.js rename to modules/ticket/back/methods/ticket/getSales.js diff --git a/modules/ticket/methods/ticket/getSalesPersonMana.js b/modules/ticket/back/methods/ticket/getSalesPersonMana.js similarity index 100% rename from modules/ticket/methods/ticket/getSalesPersonMana.js rename to modules/ticket/back/methods/ticket/getSalesPersonMana.js diff --git a/modules/ticket/methods/ticket/getShipped.js b/modules/ticket/back/methods/ticket/getShipped.js similarity index 100% rename from modules/ticket/methods/ticket/getShipped.js rename to modules/ticket/back/methods/ticket/getShipped.js diff --git a/modules/ticket/methods/ticket/getTaxes.js b/modules/ticket/back/methods/ticket/getTaxes.js similarity index 100% rename from modules/ticket/methods/ticket/getTaxes.js rename to modules/ticket/back/methods/ticket/getTaxes.js diff --git a/modules/ticket/methods/ticket/getTotal.js b/modules/ticket/back/methods/ticket/getTotal.js similarity index 100% rename from modules/ticket/methods/ticket/getTotal.js rename to modules/ticket/back/methods/ticket/getTotal.js diff --git a/modules/ticket/methods/ticket/getTotalVolume.js b/modules/ticket/back/methods/ticket/getTotalVolume.js similarity index 100% rename from modules/ticket/methods/ticket/getTotalVolume.js rename to modules/ticket/back/methods/ticket/getTotalVolume.js diff --git a/modules/ticket/methods/ticket/getVAT.js b/modules/ticket/back/methods/ticket/getVAT.js similarity index 100% rename from modules/ticket/methods/ticket/getVAT.js rename to modules/ticket/back/methods/ticket/getVAT.js diff --git a/modules/ticket/methods/ticket/getVolume.js b/modules/ticket/back/methods/ticket/getVolume.js similarity index 100% rename from modules/ticket/methods/ticket/getVolume.js rename to modules/ticket/back/methods/ticket/getVolume.js diff --git a/modules/ticket/methods/ticket/isEditable.js b/modules/ticket/back/methods/ticket/isEditable.js similarity index 100% rename from modules/ticket/methods/ticket/isEditable.js rename to modules/ticket/back/methods/ticket/isEditable.js diff --git a/modules/ticket/methods/ticket/new.js b/modules/ticket/back/methods/ticket/new.js similarity index 95% rename from modules/ticket/methods/ticket/new.js rename to modules/ticket/back/methods/ticket/new.js index 5b3e5071e..afb890415 100644 --- a/modules/ticket/methods/ticket/new.js +++ b/modules/ticket/back/methods/ticket/new.js @@ -1,4 +1,4 @@ -let UserError = require('vn-loopback/common/helpers').UserError; +let UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethodCtx('new', { @@ -21,7 +21,7 @@ module.exports = Self => { } }); - Self.new = async (ctx, params, transaction) => { + Self.new = async(ctx, params, transaction) => { let address = await Self.app.models.Address.findOne({ where: {id: params.addressFk}, fields: ['clientFk'], diff --git a/modules/ticket/methods/ticket/specs/componentUpdate.spec.js b/modules/ticket/back/methods/ticket/specs/componentUpdate.spec.js similarity index 100% rename from modules/ticket/methods/ticket/specs/componentUpdate.spec.js rename to modules/ticket/back/methods/ticket/specs/componentUpdate.spec.js diff --git a/modules/ticket/methods/ticket/specs/deleted.spec.js b/modules/ticket/back/methods/ticket/specs/deleted.spec.js similarity index 100% rename from modules/ticket/methods/ticket/specs/deleted.spec.js rename to modules/ticket/back/methods/ticket/specs/deleted.spec.js diff --git a/modules/ticket/methods/ticket/specs/filter.spec.js b/modules/ticket/back/methods/ticket/specs/filter.spec.js similarity index 100% rename from modules/ticket/methods/ticket/specs/filter.spec.js rename to modules/ticket/back/methods/ticket/specs/filter.spec.js diff --git a/modules/ticket/methods/ticket/specs/getLanded.spec.js b/modules/ticket/back/methods/ticket/specs/getLanded.spec.js similarity index 100% rename from modules/ticket/methods/ticket/specs/getLanded.spec.js rename to modules/ticket/back/methods/ticket/specs/getLanded.spec.js diff --git a/modules/ticket/methods/ticket/specs/getSales.spec.js b/modules/ticket/back/methods/ticket/specs/getSales.spec.js similarity index 100% rename from modules/ticket/methods/ticket/specs/getSales.spec.js rename to modules/ticket/back/methods/ticket/specs/getSales.spec.js diff --git a/modules/ticket/methods/ticket/specs/getSalespersonMana.spec.js b/modules/ticket/back/methods/ticket/specs/getSalespersonMana.spec.js similarity index 100% rename from modules/ticket/methods/ticket/specs/getSalespersonMana.spec.js rename to modules/ticket/back/methods/ticket/specs/getSalespersonMana.spec.js diff --git a/modules/ticket/methods/ticket/specs/getShipped.spec.js b/modules/ticket/back/methods/ticket/specs/getShipped.spec.js similarity index 100% rename from modules/ticket/methods/ticket/specs/getShipped.spec.js rename to modules/ticket/back/methods/ticket/specs/getShipped.spec.js diff --git a/modules/ticket/methods/ticket/specs/getTaxes.spec.js b/modules/ticket/back/methods/ticket/specs/getTaxes.spec.js similarity index 100% rename from modules/ticket/methods/ticket/specs/getTaxes.spec.js rename to modules/ticket/back/methods/ticket/specs/getTaxes.spec.js diff --git a/modules/ticket/methods/ticket/specs/getTotal.spec.js b/modules/ticket/back/methods/ticket/specs/getTotal.spec.js similarity index 100% rename from modules/ticket/methods/ticket/specs/getTotal.spec.js rename to modules/ticket/back/methods/ticket/specs/getTotal.spec.js diff --git a/modules/ticket/methods/ticket/specs/getTotalVolume.spec.js b/modules/ticket/back/methods/ticket/specs/getTotalVolume.spec.js similarity index 100% rename from modules/ticket/methods/ticket/specs/getTotalVolume.spec.js rename to modules/ticket/back/methods/ticket/specs/getTotalVolume.spec.js diff --git a/modules/ticket/methods/ticket/specs/getVAT.spec.js b/modules/ticket/back/methods/ticket/specs/getVAT.spec.js similarity index 100% rename from modules/ticket/methods/ticket/specs/getVAT.spec.js rename to modules/ticket/back/methods/ticket/specs/getVAT.spec.js diff --git a/modules/ticket/methods/ticket/specs/getVolume.spec.js b/modules/ticket/back/methods/ticket/specs/getVolume.spec.js similarity index 100% rename from modules/ticket/methods/ticket/specs/getVolume.spec.js rename to modules/ticket/back/methods/ticket/specs/getVolume.spec.js diff --git a/modules/ticket/methods/ticket/specs/isEditable.spec.js b/modules/ticket/back/methods/ticket/specs/isEditable.spec.js similarity index 100% rename from modules/ticket/methods/ticket/specs/isEditable.spec.js rename to modules/ticket/back/methods/ticket/specs/isEditable.spec.js diff --git a/modules/ticket/methods/ticket/specs/new.spec.js b/modules/ticket/back/methods/ticket/specs/new.spec.js similarity index 100% rename from modules/ticket/methods/ticket/specs/new.spec.js rename to modules/ticket/back/methods/ticket/specs/new.spec.js diff --git a/modules/ticket/methods/ticket/specs/summary.spec.js b/modules/ticket/back/methods/ticket/specs/summary.spec.js similarity index 100% rename from modules/ticket/methods/ticket/specs/summary.spec.js rename to modules/ticket/back/methods/ticket/specs/summary.spec.js diff --git a/modules/ticket/methods/ticket/specs/threeLastActive.spec.js b/modules/ticket/back/methods/ticket/specs/threeLastActive.spec.js similarity index 100% rename from modules/ticket/methods/ticket/specs/threeLastActive.spec.js rename to modules/ticket/back/methods/ticket/specs/threeLastActive.spec.js diff --git a/modules/ticket/methods/ticket/summary.js b/modules/ticket/back/methods/ticket/summary.js similarity index 100% rename from modules/ticket/methods/ticket/summary.js rename to modules/ticket/back/methods/ticket/summary.js diff --git a/modules/ticket/methods/ticket/threeLastActive.js b/modules/ticket/back/methods/ticket/threeLastActive.js similarity index 100% rename from modules/ticket/methods/ticket/threeLastActive.js rename to modules/ticket/back/methods/ticket/threeLastActive.js diff --git a/modules/ticket/model-config.json b/modules/ticket/back/model-config.json similarity index 100% rename from modules/ticket/model-config.json rename to modules/ticket/back/model-config.json diff --git a/modules/ticket/models/alert-level.json b/modules/ticket/back/models/alert-level.json similarity index 100% rename from modules/ticket/models/alert-level.json rename to modules/ticket/back/models/alert-level.json diff --git a/modules/ticket/models/annual-average-invoiced.json b/modules/ticket/back/models/annual-average-invoiced.json similarity index 100% rename from modules/ticket/models/annual-average-invoiced.json rename to modules/ticket/back/models/annual-average-invoiced.json diff --git a/modules/ticket/models/component-rate.json b/modules/ticket/back/models/component-rate.json similarity index 100% rename from modules/ticket/models/component-rate.json rename to modules/ticket/back/models/component-rate.json diff --git a/modules/ticket/models/component-type-rate.json b/modules/ticket/back/models/component-type-rate.json similarity index 100% rename from modules/ticket/models/component-type-rate.json rename to modules/ticket/back/models/component-type-rate.json diff --git a/modules/ticket/models/expedition.js b/modules/ticket/back/models/expedition.js similarity index 100% rename from modules/ticket/models/expedition.js rename to modules/ticket/back/models/expedition.js diff --git a/modules/ticket/models/expedition.json b/modules/ticket/back/models/expedition.json similarity index 100% rename from modules/ticket/models/expedition.json rename to modules/ticket/back/models/expedition.json diff --git a/modules/ticket/models/packaging.js b/modules/ticket/back/models/packaging.js similarity index 100% rename from modules/ticket/models/packaging.js rename to modules/ticket/back/models/packaging.js diff --git a/modules/ticket/models/packaging.json b/modules/ticket/back/models/packaging.json similarity index 100% rename from modules/ticket/models/packaging.json rename to modules/ticket/back/models/packaging.json diff --git a/modules/ticket/models/sale-checked.json b/modules/ticket/back/models/sale-checked.json similarity index 100% rename from modules/ticket/models/sale-checked.json rename to modules/ticket/back/models/sale-checked.json diff --git a/modules/ticket/models/sale-component.json b/modules/ticket/back/models/sale-component.json similarity index 100% rename from modules/ticket/models/sale-component.json rename to modules/ticket/back/models/sale-component.json diff --git a/modules/ticket/models/sale-tracking.js b/modules/ticket/back/models/sale-tracking.js similarity index 100% rename from modules/ticket/models/sale-tracking.js rename to modules/ticket/back/models/sale-tracking.js diff --git a/modules/ticket/models/sale-tracking.json b/modules/ticket/back/models/sale-tracking.json similarity index 100% rename from modules/ticket/models/sale-tracking.json rename to modules/ticket/back/models/sale-tracking.json diff --git a/modules/ticket/models/sale.js b/modules/ticket/back/models/sale.js similarity index 100% rename from modules/ticket/models/sale.js rename to modules/ticket/back/models/sale.js diff --git a/modules/ticket/models/sale.json b/modules/ticket/back/models/sale.json similarity index 100% rename from modules/ticket/models/sale.json rename to modules/ticket/back/models/sale.json diff --git a/modules/ticket/models/specs/state.spec.js b/modules/ticket/back/models/specs/state.spec.js similarity index 100% rename from modules/ticket/models/specs/state.spec.js rename to modules/ticket/back/models/specs/state.spec.js diff --git a/modules/ticket/models/specs/ticket-packaging.spec.js b/modules/ticket/back/models/specs/ticket-packaging.spec.js similarity index 100% rename from modules/ticket/models/specs/ticket-packaging.spec.js rename to modules/ticket/back/models/specs/ticket-packaging.spec.js diff --git a/modules/ticket/models/state.js b/modules/ticket/back/models/state.js similarity index 100% rename from modules/ticket/models/state.js rename to modules/ticket/back/models/state.js diff --git a/modules/ticket/models/state.json b/modules/ticket/back/models/state.json similarity index 100% rename from modules/ticket/models/state.json rename to modules/ticket/back/models/state.json diff --git a/modules/ticket/models/ticket-log.json b/modules/ticket/back/models/ticket-log.json similarity index 100% rename from modules/ticket/models/ticket-log.json rename to modules/ticket/back/models/ticket-log.json diff --git a/modules/ticket/models/ticket-observation.js b/modules/ticket/back/models/ticket-observation.js similarity index 76% rename from modules/ticket/models/ticket-observation.js rename to modules/ticket/back/models/ticket-observation.js index 3d15e9b0e..77d15d85c 100644 --- a/modules/ticket/models/ticket-observation.js +++ b/modules/ticket/back/models/ticket-observation.js @@ -1,4 +1,4 @@ -const UserError = require('vn-loopback/common/helpers').UserError; +const UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.rewriteDbError(function(err) { diff --git a/modules/ticket/models/ticket-observation.json b/modules/ticket/back/models/ticket-observation.json similarity index 100% rename from modules/ticket/models/ticket-observation.json rename to modules/ticket/back/models/ticket-observation.json diff --git a/modules/ticket/models/ticket-packaging.js b/modules/ticket/back/models/ticket-packaging.js similarity index 100% rename from modules/ticket/models/ticket-packaging.js rename to modules/ticket/back/models/ticket-packaging.js diff --git a/modules/ticket/models/ticket-packaging.json b/modules/ticket/back/models/ticket-packaging.json similarity index 100% rename from modules/ticket/models/ticket-packaging.json rename to modules/ticket/back/models/ticket-packaging.json diff --git a/modules/ticket/models/ticket-request.js b/modules/ticket/back/models/ticket-request.js similarity index 100% rename from modules/ticket/models/ticket-request.js rename to modules/ticket/back/models/ticket-request.js diff --git a/modules/ticket/models/ticket-request.json b/modules/ticket/back/models/ticket-request.json similarity index 100% rename from modules/ticket/models/ticket-request.json rename to modules/ticket/back/models/ticket-request.json diff --git a/modules/ticket/models/ticket-service.json b/modules/ticket/back/models/ticket-service.json similarity index 100% rename from modules/ticket/models/ticket-service.json rename to modules/ticket/back/models/ticket-service.json diff --git a/modules/ticket/models/ticket-state.json b/modules/ticket/back/models/ticket-state.json similarity index 100% rename from modules/ticket/models/ticket-state.json rename to modules/ticket/back/models/ticket-state.json diff --git a/modules/ticket/models/ticket-tracking.js b/modules/ticket/back/models/ticket-tracking.js similarity index 100% rename from modules/ticket/models/ticket-tracking.js rename to modules/ticket/back/models/ticket-tracking.js diff --git a/modules/ticket/models/ticket-tracking.json b/modules/ticket/back/models/ticket-tracking.json similarity index 100% rename from modules/ticket/models/ticket-tracking.json rename to modules/ticket/back/models/ticket-tracking.json diff --git a/modules/ticket/models/ticket-update-action.json b/modules/ticket/back/models/ticket-update-action.json similarity index 100% rename from modules/ticket/models/ticket-update-action.json rename to modules/ticket/back/models/ticket-update-action.json diff --git a/modules/ticket/models/ticket-weekly.json b/modules/ticket/back/models/ticket-weekly.json similarity index 100% rename from modules/ticket/models/ticket-weekly.json rename to modules/ticket/back/models/ticket-weekly.json diff --git a/modules/ticket/models/ticket.js b/modules/ticket/back/models/ticket.js similarity index 100% rename from modules/ticket/models/ticket.js rename to modules/ticket/back/models/ticket.js diff --git a/modules/ticket/models/ticket.json b/modules/ticket/back/models/ticket.json similarity index 100% rename from modules/ticket/models/ticket.json rename to modules/ticket/back/models/ticket.json diff --git a/modules/ticket/front/src/card/index.html b/modules/ticket/front/card/index.html similarity index 100% rename from modules/ticket/front/src/card/index.html rename to modules/ticket/front/card/index.html diff --git a/modules/ticket/front/src/card/index.js b/modules/ticket/front/card/index.js similarity index 100% rename from modules/ticket/front/src/card/index.js rename to modules/ticket/front/card/index.js diff --git a/modules/ticket/front/src/card/index.spec.js b/modules/ticket/front/card/index.spec.js similarity index 100% rename from modules/ticket/front/src/card/index.spec.js rename to modules/ticket/front/card/index.spec.js diff --git a/modules/ticket/front/src/component/index.html b/modules/ticket/front/component/index.html similarity index 100% rename from modules/ticket/front/src/component/index.html rename to modules/ticket/front/component/index.html diff --git a/modules/ticket/front/src/component/index.js b/modules/ticket/front/component/index.js similarity index 100% rename from modules/ticket/front/src/component/index.js rename to modules/ticket/front/component/index.js diff --git a/modules/ticket/front/src/component/index.spec.js b/modules/ticket/front/component/index.spec.js similarity index 98% rename from modules/ticket/front/src/component/index.spec.js rename to modules/ticket/front/component/index.spec.js index 6006fec55..63c78c805 100644 --- a/modules/ticket/front/src/component/index.spec.js +++ b/modules/ticket/front/component/index.spec.js @@ -1,5 +1,5 @@ import './index.js'; -import crudModel from 'mocks/crud-model'; +import crudModel from 'core/mocks/crud-model'; describe('ticket', () => { describe('Component vnTicketComponents', () => { diff --git a/modules/ticket/front/src/component/style.scss b/modules/ticket/front/component/style.scss similarity index 100% rename from modules/ticket/front/src/component/style.scss rename to modules/ticket/front/component/style.scss diff --git a/modules/ticket/front/src/create/card.html b/modules/ticket/front/create/card.html similarity index 100% rename from modules/ticket/front/src/create/card.html rename to modules/ticket/front/create/card.html diff --git a/modules/ticket/front/src/create/card.js b/modules/ticket/front/create/card.js similarity index 100% rename from modules/ticket/front/src/create/card.js rename to modules/ticket/front/create/card.js diff --git a/modules/ticket/front/src/create/index.html b/modules/ticket/front/create/index.html similarity index 100% rename from modules/ticket/front/src/create/index.html rename to modules/ticket/front/create/index.html diff --git a/modules/ticket/front/src/create/index.js b/modules/ticket/front/create/index.js similarity index 100% rename from modules/ticket/front/src/create/index.js rename to modules/ticket/front/create/index.js diff --git a/modules/ticket/front/src/create/locale/es.yml b/modules/ticket/front/create/locale/es.yml similarity index 100% rename from modules/ticket/front/src/create/locale/es.yml rename to modules/ticket/front/create/locale/es.yml diff --git a/modules/ticket/front/src/data/index.html b/modules/ticket/front/data/index.html similarity index 100% rename from modules/ticket/front/src/data/index.html rename to modules/ticket/front/data/index.html diff --git a/modules/ticket/front/src/data/index.js b/modules/ticket/front/data/index.js similarity index 100% rename from modules/ticket/front/src/data/index.js rename to modules/ticket/front/data/index.js diff --git a/modules/ticket/front/src/data/step-one/index.html b/modules/ticket/front/data/step-one/index.html similarity index 100% rename from modules/ticket/front/src/data/step-one/index.html rename to modules/ticket/front/data/step-one/index.html diff --git a/modules/ticket/front/src/data/step-one/index.js b/modules/ticket/front/data/step-one/index.js similarity index 98% rename from modules/ticket/front/src/data/step-one/index.js rename to modules/ticket/front/data/step-one/index.js index 00516b548..822505c95 100644 --- a/modules/ticket/front/src/data/step-one/index.js +++ b/modules/ticket/front/data/step-one/index.js @@ -1,5 +1,5 @@ import ngModule from '../../module'; -import {toJsonDate} from 'core/src/lib/date'; +import {toJsonDate} from 'core/lib/date'; class Controller { constructor($scope, $http, $translate, vnApp) { diff --git a/modules/ticket/front/src/data/step-one/index.spec.js b/modules/ticket/front/data/step-one/index.spec.js similarity index 99% rename from modules/ticket/front/src/data/step-one/index.spec.js rename to modules/ticket/front/data/step-one/index.spec.js index f866a9022..f72e2c43b 100644 --- a/modules/ticket/front/src/data/step-one/index.spec.js +++ b/modules/ticket/front/data/step-one/index.spec.js @@ -1,5 +1,5 @@ import './index.js'; -import {toJsonDate} from 'core/src/lib/date'; +import {toJsonDate} from 'core/lib/date'; describe('Ticket', () => { describe('Component vnTicketDataStepOne', () => { diff --git a/modules/ticket/front/src/data/step-one/locale/es.yml b/modules/ticket/front/data/step-one/locale/es.yml similarity index 100% rename from modules/ticket/front/src/data/step-one/locale/es.yml rename to modules/ticket/front/data/step-one/locale/es.yml diff --git a/modules/ticket/front/src/data/step-three/index.html b/modules/ticket/front/data/step-three/index.html similarity index 100% rename from modules/ticket/front/src/data/step-three/index.html rename to modules/ticket/front/data/step-three/index.html diff --git a/modules/ticket/front/src/data/step-three/index.js b/modules/ticket/front/data/step-three/index.js similarity index 100% rename from modules/ticket/front/src/data/step-three/index.js rename to modules/ticket/front/data/step-three/index.js diff --git a/modules/ticket/front/src/data/step-three/index.spec.js b/modules/ticket/front/data/step-three/index.spec.js similarity index 100% rename from modules/ticket/front/src/data/step-three/index.spec.js rename to modules/ticket/front/data/step-three/index.spec.js diff --git a/modules/ticket/front/src/data/step-three/locale/es.yml b/modules/ticket/front/data/step-three/locale/es.yml similarity index 100% rename from modules/ticket/front/src/data/step-three/locale/es.yml rename to modules/ticket/front/data/step-three/locale/es.yml diff --git a/modules/ticket/front/src/data/step-two/index.html b/modules/ticket/front/data/step-two/index.html similarity index 100% rename from modules/ticket/front/src/data/step-two/index.html rename to modules/ticket/front/data/step-two/index.html diff --git a/modules/ticket/front/src/data/step-two/index.js b/modules/ticket/front/data/step-two/index.js similarity index 100% rename from modules/ticket/front/src/data/step-two/index.js rename to modules/ticket/front/data/step-two/index.js diff --git a/modules/ticket/front/src/data/step-two/locale/es.yml b/modules/ticket/front/data/step-two/locale/es.yml similarity index 100% rename from modules/ticket/front/src/data/step-two/locale/es.yml rename to modules/ticket/front/data/step-two/locale/es.yml diff --git a/modules/ticket/front/src/expedition/index.html b/modules/ticket/front/expedition/index.html similarity index 100% rename from modules/ticket/front/src/expedition/index.html rename to modules/ticket/front/expedition/index.html diff --git a/modules/ticket/front/src/expedition/index.js b/modules/ticket/front/expedition/index.js similarity index 100% rename from modules/ticket/front/src/expedition/index.js rename to modules/ticket/front/expedition/index.js diff --git a/modules/ticket/front/src/expedition/index.spec.js b/modules/ticket/front/expedition/index.spec.js similarity index 100% rename from modules/ticket/front/src/expedition/index.spec.js rename to modules/ticket/front/expedition/index.spec.js diff --git a/modules/ticket/front/index.js b/modules/ticket/front/index.js index dc559e2d9..325dc11d8 100644 --- a/modules/ticket/front/index.js +++ b/modules/ticket/front/index.js @@ -1 +1,29 @@ -export * from './src/ticket'; +export * from './module'; + +import './index/'; +import './search-panel'; +import './card'; +import './create/card'; +import './create/index'; +import './summary'; +import './data'; +import './data/step-one'; +import './data/step-two'; +import './data/step-three'; +import './note'; +import './expedition'; +import './volume'; +import './package/index'; +import './sale'; +import './sale/editDiscount'; +import './tracking/index'; +import './tracking/edit'; +import './sale-checked'; +import './services'; +import './component'; +import './sale-tracking'; +import './picture'; +import './request/index'; +import './request/create'; +import './log'; +import './weekly'; diff --git a/modules/ticket/front/src/index/index.html b/modules/ticket/front/index/index.html similarity index 100% rename from modules/ticket/front/src/index/index.html rename to modules/ticket/front/index/index.html diff --git a/modules/ticket/front/src/index/index.js b/modules/ticket/front/index/index.js similarity index 100% rename from modules/ticket/front/src/index/index.js rename to modules/ticket/front/index/index.js diff --git a/modules/ticket/front/src/index/index.spec.js b/modules/ticket/front/index/index.spec.js similarity index 100% rename from modules/ticket/front/src/index/index.spec.js rename to modules/ticket/front/index/index.spec.js diff --git a/modules/ticket/front/src/index/locale/es.yml b/modules/ticket/front/index/locale/es.yml similarity index 100% rename from modules/ticket/front/src/index/locale/es.yml rename to modules/ticket/front/index/locale/es.yml diff --git a/modules/ticket/front/src/index/style.scss b/modules/ticket/front/index/style.scss similarity index 100% rename from modules/ticket/front/src/index/style.scss rename to modules/ticket/front/index/style.scss diff --git a/modules/ticket/front/src/locale/en.yml b/modules/ticket/front/locale/en.yml similarity index 100% rename from modules/ticket/front/src/locale/en.yml rename to modules/ticket/front/locale/en.yml diff --git a/modules/ticket/front/src/locale/es.yml b/modules/ticket/front/locale/es.yml similarity index 100% rename from modules/ticket/front/src/locale/es.yml rename to modules/ticket/front/locale/es.yml diff --git a/modules/ticket/front/src/log/index.html b/modules/ticket/front/log/index.html similarity index 100% rename from modules/ticket/front/src/log/index.html rename to modules/ticket/front/log/index.html diff --git a/modules/ticket/front/src/log/index.js b/modules/ticket/front/log/index.js similarity index 100% rename from modules/ticket/front/src/log/index.js rename to modules/ticket/front/log/index.js diff --git a/modules/ticket/front/src/log/index.spec.js b/modules/ticket/front/log/index.spec.js similarity index 100% rename from modules/ticket/front/src/log/index.spec.js rename to modules/ticket/front/log/index.spec.js diff --git a/modules/ticket/front/module.js b/modules/ticket/front/module.js new file mode 100644 index 000000000..34f7f953e --- /dev/null +++ b/modules/ticket/front/module.js @@ -0,0 +1,3 @@ +import {ng} from 'core/vendor'; + +export default ng.module('ticket', ['vnCore']); diff --git a/modules/ticket/front/src/note/index.html b/modules/ticket/front/note/index.html similarity index 100% rename from modules/ticket/front/src/note/index.html rename to modules/ticket/front/note/index.html diff --git a/modules/ticket/front/src/note/index.js b/modules/ticket/front/note/index.js similarity index 100% rename from modules/ticket/front/src/note/index.js rename to modules/ticket/front/note/index.js diff --git a/modules/ticket/front/src/package/index.html b/modules/ticket/front/package/index.html similarity index 100% rename from modules/ticket/front/src/package/index.html rename to modules/ticket/front/package/index.html diff --git a/modules/ticket/front/src/package/index.js b/modules/ticket/front/package/index.js similarity index 100% rename from modules/ticket/front/src/package/index.js rename to modules/ticket/front/package/index.js diff --git a/modules/ticket/front/src/package/locale/es.yml b/modules/ticket/front/package/locale/es.yml similarity index 100% rename from modules/ticket/front/src/package/locale/es.yml rename to modules/ticket/front/package/locale/es.yml diff --git a/modules/ticket/front/src/picture/index.html b/modules/ticket/front/picture/index.html similarity index 100% rename from modules/ticket/front/src/picture/index.html rename to modules/ticket/front/picture/index.html diff --git a/modules/ticket/front/src/picture/index.js b/modules/ticket/front/picture/index.js similarity index 100% rename from modules/ticket/front/src/picture/index.js rename to modules/ticket/front/picture/index.js diff --git a/modules/ticket/front/src/request/create/index.html b/modules/ticket/front/request/create/index.html similarity index 100% rename from modules/ticket/front/src/request/create/index.html rename to modules/ticket/front/request/create/index.html diff --git a/modules/ticket/front/src/request/create/index.js b/modules/ticket/front/request/create/index.js similarity index 100% rename from modules/ticket/front/src/request/create/index.js rename to modules/ticket/front/request/create/index.js diff --git a/modules/ticket/front/src/request/create/locale/es.yml b/modules/ticket/front/request/create/locale/es.yml similarity index 100% rename from modules/ticket/front/src/request/create/locale/es.yml rename to modules/ticket/front/request/create/locale/es.yml diff --git a/modules/ticket/front/src/request/create/style.scss b/modules/ticket/front/request/create/style.scss similarity index 100% rename from modules/ticket/front/src/request/create/style.scss rename to modules/ticket/front/request/create/style.scss diff --git a/modules/ticket/front/src/request/index/index.html b/modules/ticket/front/request/index/index.html similarity index 100% rename from modules/ticket/front/src/request/index/index.html rename to modules/ticket/front/request/index/index.html diff --git a/modules/ticket/front/src/request/index/index.js b/modules/ticket/front/request/index/index.js similarity index 100% rename from modules/ticket/front/src/request/index/index.js rename to modules/ticket/front/request/index/index.js diff --git a/modules/ticket/front/src/request/index/locale/es.yml b/modules/ticket/front/request/index/locale/es.yml similarity index 100% rename from modules/ticket/front/src/request/index/locale/es.yml rename to modules/ticket/front/request/index/locale/es.yml diff --git a/modules/ticket/front/src/sale-checked/index.html b/modules/ticket/front/sale-checked/index.html similarity index 100% rename from modules/ticket/front/src/sale-checked/index.html rename to modules/ticket/front/sale-checked/index.html diff --git a/modules/ticket/front/src/sale-checked/index.js b/modules/ticket/front/sale-checked/index.js similarity index 100% rename from modules/ticket/front/src/sale-checked/index.js rename to modules/ticket/front/sale-checked/index.js diff --git a/modules/ticket/front/src/sale-tracking/index.html b/modules/ticket/front/sale-tracking/index.html similarity index 100% rename from modules/ticket/front/src/sale-tracking/index.html rename to modules/ticket/front/sale-tracking/index.html diff --git a/modules/ticket/front/src/sale-tracking/index.js b/modules/ticket/front/sale-tracking/index.js similarity index 100% rename from modules/ticket/front/src/sale-tracking/index.js rename to modules/ticket/front/sale-tracking/index.js diff --git a/modules/ticket/front/src/sale-tracking/style.scss b/modules/ticket/front/sale-tracking/style.scss similarity index 100% rename from modules/ticket/front/src/sale-tracking/style.scss rename to modules/ticket/front/sale-tracking/style.scss diff --git a/modules/ticket/front/src/sale/editDiscount.html b/modules/ticket/front/sale/editDiscount.html similarity index 100% rename from modules/ticket/front/src/sale/editDiscount.html rename to modules/ticket/front/sale/editDiscount.html diff --git a/modules/ticket/front/src/sale/editDiscount.js b/modules/ticket/front/sale/editDiscount.js similarity index 100% rename from modules/ticket/front/src/sale/editDiscount.js rename to modules/ticket/front/sale/editDiscount.js diff --git a/modules/ticket/front/src/sale/editDiscount.spec.js b/modules/ticket/front/sale/editDiscount.spec.js similarity index 100% rename from modules/ticket/front/src/sale/editDiscount.spec.js rename to modules/ticket/front/sale/editDiscount.spec.js diff --git a/modules/ticket/front/src/sale/index.html b/modules/ticket/front/sale/index.html similarity index 100% rename from modules/ticket/front/src/sale/index.html rename to modules/ticket/front/sale/index.html diff --git a/modules/ticket/front/src/sale/index.js b/modules/ticket/front/sale/index.js similarity index 100% rename from modules/ticket/front/src/sale/index.js rename to modules/ticket/front/sale/index.js diff --git a/modules/ticket/front/src/sale/index.spec.js b/modules/ticket/front/sale/index.spec.js similarity index 100% rename from modules/ticket/front/src/sale/index.spec.js rename to modules/ticket/front/sale/index.spec.js diff --git a/modules/ticket/front/src/sale/locale/es.yml b/modules/ticket/front/sale/locale/es.yml similarity index 100% rename from modules/ticket/front/src/sale/locale/es.yml rename to modules/ticket/front/sale/locale/es.yml diff --git a/modules/ticket/front/src/sale/style.scss b/modules/ticket/front/sale/style.scss similarity index 100% rename from modules/ticket/front/src/sale/style.scss rename to modules/ticket/front/sale/style.scss diff --git a/modules/ticket/front/src/search-panel/index.html b/modules/ticket/front/search-panel/index.html similarity index 100% rename from modules/ticket/front/src/search-panel/index.html rename to modules/ticket/front/search-panel/index.html diff --git a/modules/ticket/front/src/search-panel/index.js b/modules/ticket/front/search-panel/index.js similarity index 68% rename from modules/ticket/front/src/search-panel/index.js rename to modules/ticket/front/search-panel/index.js index be63116ef..5c3c44107 100644 --- a/modules/ticket/front/src/search-panel/index.js +++ b/modules/ticket/front/search-panel/index.js @@ -1,5 +1,5 @@ import ngModule from '../module'; -import SearchPanel from 'core/src/components/searchbar/search-panel'; +import SearchPanel from 'core/components/searchbar/search-panel'; ngModule.component('vnTicketSearchPanel', { template: require('./index.html'), diff --git a/modules/ticket/front/src/search-panel/locale/es.yml b/modules/ticket/front/search-panel/locale/es.yml similarity index 100% rename from modules/ticket/front/src/search-panel/locale/es.yml rename to modules/ticket/front/search-panel/locale/es.yml diff --git a/modules/ticket/front/src/services/index.html b/modules/ticket/front/services/index.html similarity index 100% rename from modules/ticket/front/src/services/index.html rename to modules/ticket/front/services/index.html diff --git a/modules/ticket/front/src/services/index.js b/modules/ticket/front/services/index.js similarity index 100% rename from modules/ticket/front/src/services/index.js rename to modules/ticket/front/services/index.js diff --git a/modules/ticket/front/src/services/locale/es.yml b/modules/ticket/front/services/locale/es.yml similarity index 100% rename from modules/ticket/front/src/services/locale/es.yml rename to modules/ticket/front/services/locale/es.yml diff --git a/modules/ticket/front/src/module.js b/modules/ticket/front/src/module.js deleted file mode 100644 index 9a852e647..000000000 --- a/modules/ticket/front/src/module.js +++ /dev/null @@ -1,5 +0,0 @@ -import {ng} from 'vendor'; -import 'core'; - -const ngModule = ng.module('ticket', ['vnCore']); -export default ngModule; diff --git a/modules/ticket/front/src/ticket.js b/modules/ticket/front/src/ticket.js deleted file mode 100644 index d64f55524..000000000 --- a/modules/ticket/front/src/ticket.js +++ /dev/null @@ -1,29 +0,0 @@ -export * from './module'; - -import './search-panel'; -import './index'; -import './card'; -import './create/card'; -import './create/index'; -import './summary'; -import './data'; -import './data/step-one'; -import './data/step-two'; -import './data/step-three'; -import './note'; -import './expedition'; -import './volume'; -import './package/index'; -import './sale'; -import './sale/editDiscount'; -import './tracking/index'; -import './tracking/edit'; -import './sale-checked'; -import './services'; -import './component'; -import './sale-tracking'; -import './picture'; -import './request/index'; -import './request/create'; -import './log'; -import './weekly'; diff --git a/modules/ticket/front/src/summary/index.html b/modules/ticket/front/summary/index.html similarity index 100% rename from modules/ticket/front/src/summary/index.html rename to modules/ticket/front/summary/index.html diff --git a/modules/ticket/front/src/summary/index.js b/modules/ticket/front/summary/index.js similarity index 100% rename from modules/ticket/front/src/summary/index.js rename to modules/ticket/front/summary/index.js diff --git a/modules/ticket/front/src/summary/index.spec.js b/modules/ticket/front/summary/index.spec.js similarity index 100% rename from modules/ticket/front/src/summary/index.spec.js rename to modules/ticket/front/summary/index.spec.js diff --git a/modules/ticket/front/src/summary/style.scss b/modules/ticket/front/summary/style.scss similarity index 100% rename from modules/ticket/front/src/summary/style.scss rename to modules/ticket/front/summary/style.scss diff --git a/modules/ticket/front/src/tracking/edit/index.html b/modules/ticket/front/tracking/edit/index.html similarity index 100% rename from modules/ticket/front/src/tracking/edit/index.html rename to modules/ticket/front/tracking/edit/index.html diff --git a/modules/ticket/front/src/tracking/edit/index.js b/modules/ticket/front/tracking/edit/index.js similarity index 100% rename from modules/ticket/front/src/tracking/edit/index.js rename to modules/ticket/front/tracking/edit/index.js diff --git a/modules/ticket/front/src/tracking/index/index.html b/modules/ticket/front/tracking/index/index.html similarity index 100% rename from modules/ticket/front/src/tracking/index/index.html rename to modules/ticket/front/tracking/index/index.html diff --git a/modules/ticket/front/src/tracking/index/index.js b/modules/ticket/front/tracking/index/index.js similarity index 100% rename from modules/ticket/front/src/tracking/index/index.js rename to modules/ticket/front/tracking/index/index.js diff --git a/modules/ticket/front/src/volume/index.html b/modules/ticket/front/volume/index.html similarity index 100% rename from modules/ticket/front/src/volume/index.html rename to modules/ticket/front/volume/index.html diff --git a/modules/ticket/front/src/volume/index.js b/modules/ticket/front/volume/index.js similarity index 100% rename from modules/ticket/front/src/volume/index.js rename to modules/ticket/front/volume/index.js diff --git a/modules/ticket/front/src/volume/index.spec.js b/modules/ticket/front/volume/index.spec.js similarity index 100% rename from modules/ticket/front/src/volume/index.spec.js rename to modules/ticket/front/volume/index.spec.js diff --git a/modules/ticket/front/src/volume/style.scss b/modules/ticket/front/volume/style.scss similarity index 100% rename from modules/ticket/front/src/volume/style.scss rename to modules/ticket/front/volume/style.scss diff --git a/modules/ticket/front/src/weekly/index.html b/modules/ticket/front/weekly/index.html similarity index 100% rename from modules/ticket/front/src/weekly/index.html rename to modules/ticket/front/weekly/index.html diff --git a/modules/ticket/front/src/weekly/index.js b/modules/ticket/front/weekly/index.js similarity index 100% rename from modules/ticket/front/src/weekly/index.js rename to modules/ticket/front/weekly/index.js diff --git a/modules/ticket/front/src/weekly/locale/es.yml b/modules/ticket/front/weekly/locale/es.yml similarity index 100% rename from modules/ticket/front/src/weekly/locale/es.yml rename to modules/ticket/front/weekly/locale/es.yml diff --git a/modules/ticket/front/src/weekly/style.scss b/modules/ticket/front/weekly/style.scss similarity index 100% rename from modules/ticket/front/src/weekly/style.scss rename to modules/ticket/front/weekly/style.scss diff --git a/modules/travel/model-config.json b/modules/travel/back/model-config.json similarity index 100% rename from modules/travel/model-config.json rename to modules/travel/back/model-config.json diff --git a/modules/travel/models/travel.json b/modules/travel/back/models/travel.json similarity index 100% rename from modules/travel/models/travel.json rename to modules/travel/back/models/travel.json diff --git a/modules/travel/front/index.js b/modules/travel/front/index.js index 8420b1093..6849e9df3 100644 --- a/modules/travel/front/index.js +++ b/modules/travel/front/index.js @@ -1 +1,4 @@ -export * from './src'; +export * from './module'; + +import './index/'; +import './search-panel'; diff --git a/modules/travel/front/src/index/index.html b/modules/travel/front/index/index.html similarity index 100% rename from modules/travel/front/src/index/index.html rename to modules/travel/front/index/index.html diff --git a/modules/travel/front/src/index/index.js b/modules/travel/front/index/index.js similarity index 100% rename from modules/travel/front/src/index/index.js rename to modules/travel/front/index/index.js diff --git a/modules/travel/front/src/locale/es.yml b/modules/travel/front/locale/es.yml similarity index 100% rename from modules/travel/front/src/locale/es.yml rename to modules/travel/front/locale/es.yml diff --git a/modules/travel/front/module.js b/modules/travel/front/module.js new file mode 100644 index 000000000..f6c04ba29 --- /dev/null +++ b/modules/travel/front/module.js @@ -0,0 +1,3 @@ +import {ng} from 'core/vendor'; + +export default ng.module('travel', ['vnCore']); diff --git a/modules/travel/front/src/search-panel/index.html b/modules/travel/front/search-panel/index.html similarity index 100% rename from modules/travel/front/src/search-panel/index.html rename to modules/travel/front/search-panel/index.html diff --git a/modules/travel/front/src/search-panel/index.js b/modules/travel/front/search-panel/index.js similarity index 68% rename from modules/travel/front/src/search-panel/index.js rename to modules/travel/front/search-panel/index.js index 74e732534..d7b2a6eff 100644 --- a/modules/travel/front/src/search-panel/index.js +++ b/modules/travel/front/search-panel/index.js @@ -1,5 +1,5 @@ import ngModule from '../module'; -import SearchPanel from 'core/src/components/searchbar/search-panel'; +import SearchPanel from 'core/components/searchbar/search-panel'; ngModule.component('vnTravelSearchPanel', { template: require('./index.html'), diff --git a/modules/travel/front/src/search-panel/locale/es.yml b/modules/travel/front/search-panel/locale/es.yml similarity index 100% rename from modules/travel/front/src/search-panel/locale/es.yml rename to modules/travel/front/search-panel/locale/es.yml diff --git a/modules/travel/front/src/index.js b/modules/travel/front/src/index.js deleted file mode 100644 index 6849e9df3..000000000 --- a/modules/travel/front/src/index.js +++ /dev/null @@ -1,4 +0,0 @@ -export * from './module'; - -import './index/'; -import './search-panel'; diff --git a/modules/travel/front/src/module.js b/modules/travel/front/src/module.js deleted file mode 100644 index c232afcfa..000000000 --- a/modules/travel/front/src/module.js +++ /dev/null @@ -1,5 +0,0 @@ -import {ng} from 'vendor'; -import 'core'; - -const ngModule = ng.module('travel', ['vnCore']); -export default ngModule; diff --git a/package-lock.json b/package-lock.json index edc88bd00..5f0588185 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1929,6 +1929,12 @@ } } }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, "boom": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", @@ -3225,6 +3231,30 @@ } } }, + "css-select": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "dev": true, + "requires": { + "boolbase": "~1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "~1.0.1" + }, + "dependencies": { + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + } + } + }, "css-selector-tokenizer": { "version": "0.6.0", "resolved": "http://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.6.0.tgz", @@ -3270,6 +3300,12 @@ } } }, + "css-what": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.2.tgz", + "integrity": "sha512-wan8dMWQ0GUeF7DGEPVjhHemVW/vy6xUYmFzRY8RYqgA0JtXC9rJmbScBjqSu6dg9q0lwPQy6ZAmJVr3PPTvqQ==", + "dev": true + }, "cssesc": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz", @@ -3686,6 +3722,15 @@ "esutils": "^2.0.2" } }, + "dom-converter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", + "integrity": "sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==", + "dev": true, + "requires": { + "utila": "~0.4" + } + }, "dom-serialize": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", @@ -7081,6 +7126,28 @@ } } }, + "html-webpack-plugin": { + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-4.0.0-beta.5.tgz", + "integrity": "sha512-y5l4lGxOW3pz3xBTFdfB9rnnrWRPVxlAhX6nrBYIcW+2k2zC3mSp/3DxlWVCMBfnO6UAnoF8OcFn0IMy6kaKAQ==", + "dev": true, + "requires": { + "html-minifier": "^3.5.20", + "loader-utils": "^1.1.0", + "lodash": "^4.17.11", + "pretty-error": "^2.1.1", + "tapable": "^1.1.0", + "util.promisify": "1.0.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } + } + }, "htmlparser2": { "version": "3.9.2", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz", @@ -7129,15 +7196,15 @@ } }, "http-proxy-middleware": { - "version": "0.18.0", - "resolved": "http://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", - "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz", + "integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==", "dev": true, "requires": { - "http-proxy": "^1.16.2", + "http-proxy": "^1.17.0", "is-glob": "^4.0.0", - "lodash": "^4.17.5", - "micromatch": "^3.1.9" + "lodash": "^4.17.11", + "micromatch": "^3.1.10" }, "dependencies": { "is-glob": { @@ -11598,6 +11665,15 @@ } } }, + "nth-check": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", + "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "dev": true, + "requires": { + "boolbase": "~1.0.0" + } + }, "nugget": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/nugget/-/nugget-2.0.1.tgz", @@ -12840,6 +12916,16 @@ "meow": "^3.1.0" } }, + "pretty-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", + "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", + "dev": true, + "requires": { + "renderkid": "^2.0.1", + "utila": "~0.4" + } + }, "pretty-hrtime": { "version": "1.0.3", "resolved": "http://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", @@ -13459,6 +13545,75 @@ "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", "dev": true }, + "renderkid": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.2.tgz", + "integrity": "sha512-FsygIxevi1jSiPY9h7vZmBFUbAOcbYm9UwyiLNdVsLRs/5We9Ob5NMPbGYUTWiLq5L+ezlVdE0A8bbME5CWTpg==", + "dev": true, + "requires": { + "css-select": "^1.1.0", + "dom-converter": "~0.2", + "htmlparser2": "~3.3.0", + "strip-ansi": "^3.0.0", + "utila": "^0.4.0" + }, + "dependencies": { + "domhandler": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz", + "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz", + "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "htmlparser2": { + "version": "3.3.0", + "resolved": "http://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz", + "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=", + "dev": true, + "requires": { + "domelementtype": "1", + "domhandler": "2.1", + "domutils": "1.1", + "readable-stream": "1.0" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, "repeat-element": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", @@ -16171,6 +16326,12 @@ "object.getownpropertydescriptors": "^2.0.3" } }, + "utila": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", + "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", + "dev": true + }, "utils-merge": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", @@ -16334,7 +16495,7 @@ } }, "vn-loopback": { - "version": "file:services/loopback" + "version": "file:loopback" }, "void-elements": { "version": "2.0.1", @@ -16852,12 +17013,33 @@ } } }, + "http-proxy-middleware": { + "version": "0.18.0", + "resolved": "http://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", + "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", + "dev": true, + "requires": { + "http-proxy": "^1.16.2", + "is-glob": "^4.0.0", + "lodash": "^4.17.5", + "micromatch": "^3.1.9" + } + }, "invert-kv": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", "dev": true }, + "is-glob": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", + "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -16883,6 +17065,12 @@ "path-exists": "^3.0.0" } }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, "mem": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/mem/-/mem-4.0.0.tgz", diff --git a/package.json b/package.json index b0a8d1674..92aa2c14e 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "serve-favicon": "^2.0.1", "strong-error-handler": "^2.1.0", "uuid": "^3.1.0", - "vn-loopback": "file:./services/loopback" + "vn-loopback": "file:./loopback" }, "devDependencies": { "@babel/core": "^7.2.2", @@ -52,6 +52,8 @@ "gulp-wrap": "^0.13.0", "gulp-yaml": "^1.0.1", "html-loader": "^0.4.5", + "html-webpack-plugin": "^4.0.0-beta.5", + "http-proxy-middleware": "^0.19.1", "jasmine": "^2.99.0", "jasmine-spec-reporter": "^4.2.1", "json-loader": "^0.5.7", diff --git a/services/nginx/Dockerfile b/services/nginx/Dockerfile index 037dab441..5c588224a 100644 --- a/services/nginx/Dockerfile +++ b/services/nginx/Dockerfile @@ -1,13 +1,16 @@ -FROM nginx +FROM debian:stretch-slim +EXPOSE 80 -RUN rm -f /etc/nginx/nginx.conf -RUN rm -f /etc/nginx/conf.d/default.conf +ARG DEBIAN_FRONTEND=noninteractive +RUN apt-get update \ + && apt-get install -y apt-utils \ + && apt-get install -y \ + curl \ + gnupg2 \ + && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ + && apt-get install -y \ + nginx \ + nodejs \ + && npm -g install pm2 -COPY temp/nginx.conf /etc/nginx/nginx.conf -COPY static /usr/share/nginx/html - -RUN apt-get update && apt-get -y install dnsmasq -RUN rm -fr /usr/share/dns -RUN echo listen-address=127.0.0.1 > /etc/dnsmasq.d/dnsmasq.conf - -CMD service dnsmasq restart && nginx -g "daemon off;" +CMD ["bash"] diff --git a/services/nginx/nginx.development.mst b/services/nginx/nginx.development.mst index ca9366bda..0fc3dbd1c 100644 --- a/services/nginx/nginx.development.mst +++ b/services/nginx/nginx.development.mst @@ -31,7 +31,7 @@ http { } {{/services}} - location ~ ^/static(?:/(.*))?$ { + location ~ ^/static(?:/(.*)?)$ { proxy_pass http://127.0.0.1:{{devServerPort}}/$1$is_args$args; } location ~ ^(?:/(.*))?$ { diff --git a/services/nginx/nginx.mst b/services/nginx/nginx.mst index 8a6c95704..09c53e760 100644 --- a/services/nginx/nginx.mst +++ b/services/nginx/nginx.mst @@ -22,16 +22,16 @@ http { {{#services}} location ~ ^/{{name}}(?:/(.*))?$ { - proxy_pass http://{{name}}:{{defaultPort}}/$1$is_args$args; + proxy_pass http://localhost:{{defaultPort}}/$1$is_args$args; } {{/services}} location ~ ^/static(?:/(.*))?$ { - alias /usr/share/nginx/html/$1; + alias /salix/dist/$1; autoindex on; } location ~ ^(?:/(.*))?$ { - proxy_pass http://{{defaultService}}:{{defaultPort}}/$1$is_args$args; + proxy_pass http://localhost:{{defaultPort}}/$1$is_args$args; } } } diff --git a/services_tests.js b/services_tests.js index 9487197e3..d64b02447 100644 --- a/services_tests.js +++ b/services_tests.js @@ -11,22 +11,20 @@ let verbose = false; if (process.argv[2] === '--v') verbose = true; -serviceRoot = `${__dirname}/services/loopback`; +serviceRoot = `${__dirname}/loopback`; let Jasmine = require('jasmine'); let jasmine = new Jasmine(); let SpecReporter = require('jasmine-spec-reporter').SpecReporter; let serviceSpecs = [ - 'services/loopback/server/**/*[sS]pec.js', - 'services/loopback/common/**/*[sS]pec.js' + 'loopback/**/*[sS]pec.js', + 'back/**/*[sS]pec.js' ]; -let services = require(`./services/services.yml`); -for (let service of services) { - serviceSpecs.push(`modules/${service}/models/**/*[sS]pec.js`); - serviceSpecs.push(`modules/${service}/methods/**/*[sS]pec.js`); -} +let services = require(`./modules.yml`); +for (let service of services) + serviceSpecs.push(`modules/${service}/back/**/*[sS]pec.js`); jasmine.loadConfig({ spec_dir: '.', diff --git a/webpack.config.js b/webpack.config.js index f8084ef63..1155b14b1 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -2,6 +2,7 @@ require('require-yaml'); const webpack = require('webpack'); const path = require('path'); const merge = require('webpack-merge'); +const HtmlWebpackPlugin = require('html-webpack-plugin'); const AssetsWebpackPlugin = require('assets-webpack-plugin'); const wpConfig = require('./webpack.config.yml'); @@ -44,7 +45,7 @@ let baseConfig = { loader: 'sass-loader', options: { includePaths: [ - path.resolve(__dirname, 'front/salix/src/styles') + path.resolve(__dirname, 'front/salix/styles') ] } } @@ -63,24 +64,35 @@ let baseConfig = { }, resolve: { modules: [ - `${__dirname}/front`, - `${__dirname}/modules`, - 'front/node_modules', - 'node_modules' + `front`, + `modules`, + `front/node_modules`, + `node_modules` ], alias: { - 'vn-loopback': `${__dirname}/services/loopback` + 'vn-loopback': `${__dirname}/loopback` } }, plugins: [ new AssetsWebpackPlugin({ path: outputPath + }), + new HtmlWebpackPlugin({ + template: 'front/salix/index.ejs', + filename: 'index.html', + chunks: ['salix'] + }), + new HtmlWebpackPlugin({ + template: 'front/auth/auth.ejs', + filename: 'auth.html', + chunks: ['auth'] }) ], devtool: 'source-map', stats: { modules: false, assets: false, + children: false, colors: true } }; diff --git a/webpack.config.yml b/webpack.config.yml index f5494d18a..c2d98af0d 100644 --- a/webpack.config.yml +++ b/webpack.config.yml @@ -1,6 +1,6 @@ buildDir: dist devServerPort: 3500 -publicPath: /static +publicPath: '/static' entry: { salix: salix, auth: auth