Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
This commit is contained in:
commit
0b173befe0
|
@ -1,2 +1 @@
|
||||||
node_modules
|
node_modules
|
||||||
services/nginx/*
|
|
|
@ -10,7 +10,6 @@ Required applications.
|
||||||
|
|
||||||
* Visual Studio Code
|
* Visual Studio Code
|
||||||
* Node.js = 8.15.0
|
* Node.js = 8.15.0
|
||||||
* NGINX
|
|
||||||
* Docker
|
* Docker
|
||||||
|
|
||||||
In Visual Studio Code we use the ESLint extension. Open Visual Studio Code, press Ctrl+P and paste the following command.
|
In Visual Studio Code we use the ESLint extension. Open Visual Studio Code, press Ctrl+P and paste the following command.
|
||||||
|
@ -44,12 +43,6 @@ Launch application in developer environment.
|
||||||
$ gulp
|
$ gulp
|
||||||
```
|
```
|
||||||
|
|
||||||
Also you can run backend and frontend as separately gulp tasks (including NGINX).
|
|
||||||
```
|
|
||||||
$ gulp front
|
|
||||||
$ gulp back
|
|
||||||
```
|
|
||||||
|
|
||||||
Manually reset fixtures.
|
Manually reset fixtures.
|
||||||
```
|
```
|
||||||
$ gulp docker
|
$ gulp docker
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
"Company": {
|
"Company": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
},
|
||||||
|
"Delivery": {
|
||||||
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
"Message": {
|
"Message": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
},
|
||||||
|
@ -46,6 +49,12 @@
|
||||||
},
|
},
|
||||||
"PersonDepartment": {
|
"PersonDepartment": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
|
"Route": {
|
||||||
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
|
"Vehicle": {
|
||||||
|
"dataSource": "vn"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<ul ng-if="$ctrl.items">
|
<ul ng-if="$ctrl.items">
|
||||||
<li ng-repeat="item in $ctrl.items" ng-class="{'selected' : item.selected, 'included': item.included}">
|
<li ng-repeat="item in $ctrl.items" ng-class="{'selected' : item.selected && !item.excluded, 'included': item.included}">
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-auto class="actions">
|
<vn-auto class="actions">
|
||||||
<vn-icon icon="keyboard_arrow_up" ng-if="item.childs.length"
|
<vn-icon icon="keyboard_arrow_up" ng-if="item.childs.length"
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
</vn-auto>
|
</vn-auto>
|
||||||
<vn-one class="description">
|
<vn-one class="description">
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-check vn-auto field="item.selected"
|
<vn-check vn-auto field="item.selected && !item.excluded"
|
||||||
on-change="$ctrl.select(item)">
|
on-change="$ctrl.select(item)">
|
||||||
</vn-check>
|
</vn-check>
|
||||||
<vn-one ng-dblclick="$ctrl.toggle(item)" class="text unselectable">
|
<vn-one ng-dblclick="$ctrl.toggle(item)" class="text unselectable">
|
||||||
|
|
|
@ -74,7 +74,7 @@ export default class Treeview extends Component {
|
||||||
for (let i = 0; i < childs.length; i++) {
|
for (let i = 0; i < childs.length; i++) {
|
||||||
childs[i].included = false;
|
childs[i].included = false;
|
||||||
|
|
||||||
if ((node.selected || node.included && this.hasCheckedParents(childs[i])) && !childs[i].selected)
|
if (((node.selected || node.included && this.hasCheckedParents(childs[i])) && !childs[i].selected) && !node.excluded)
|
||||||
childs[i].included = true;
|
childs[i].included = true;
|
||||||
|
|
||||||
this.repaintDesc(childs[i]);
|
this.repaintDesc(childs[i]);
|
||||||
|
@ -107,6 +107,13 @@ export default class Treeview extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
onSelection(item) {
|
onSelection(item) {
|
||||||
|
let canBeExcluded = this.hasCheckedChilds(item) || this.hasCheckedParents(item);
|
||||||
|
|
||||||
|
if (!item.selected && item.included && canBeExcluded)
|
||||||
|
item.excluded = true;
|
||||||
|
else
|
||||||
|
item.excluded = false;
|
||||||
|
|
||||||
item.selected = !item.selected;
|
item.selected = !item.selected;
|
||||||
|
|
||||||
if (item.selected && item.included)
|
if (item.selected && item.included)
|
||||||
|
|
|
@ -1,7 +1,18 @@
|
||||||
|
|
||||||
export default function moduleImport(moduleName) {
|
export default function moduleImport(moduleName) {
|
||||||
return import(
|
// FIXME: Webpack watches module backend files when using dynamic import
|
||||||
/* webpackInclude: /modules\/[a-z0-9-]+\/front\/index.js$/ */
|
//return import(
|
||||||
`../modules/${moduleName}/front/index.js`
|
// /* webpackInclude: /modules\/[a-z0-9-]+\/front\/index.js$/ */
|
||||||
);
|
// '../modules/'+ moduleName +'/front/index.js'
|
||||||
}
|
//);
|
||||||
|
|
||||||
|
switch(moduleName) {
|
||||||
|
case 'client' : return import('client/front');
|
||||||
|
case 'item' : return import('item/front');
|
||||||
|
case 'ticket' : return import('ticket/front');
|
||||||
|
case 'order' : return import('order/front');
|
||||||
|
case 'claim' : return import('claim/front');
|
||||||
|
case 'agency' : return import('agency/front');
|
||||||
|
case 'travel' : return import('travel/front');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -42,10 +42,13 @@ backOnly.description = `Starts backend service`;
|
||||||
|
|
||||||
function backWatch(done) {
|
function backWatch(done) {
|
||||||
const nodemon = require('gulp-nodemon');
|
const nodemon = require('gulp-nodemon');
|
||||||
let sleepBin = isWindows ? 'timeout' : 'sleep';
|
|
||||||
|
// XXX: Workaround to avoid nodemon bug
|
||||||
|
// https://github.com/remy/nodemon/issues/1346
|
||||||
|
let sleepBin = isWindows ? '' : 'sleep 1 &&';
|
||||||
|
|
||||||
nodemon({
|
nodemon({
|
||||||
exec: `${sleepBin} 1 && node --inspect ./node_modules/gulp/bin/gulp.js`,
|
exec: `${sleepBin} node --inspect ./node_modules/gulp/bin/gulp.js`,
|
||||||
args: ['backOnly'],
|
args: ['backOnly'],
|
||||||
watch: backSources,
|
watch: backSources,
|
||||||
done: done
|
done: done
|
||||||
|
|
|
@ -23,13 +23,30 @@ module.exports = Self => {
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.toggleIsIncluded = async(zoneFk, geoFk) => {
|
Self.toggleIsIncluded = async(zoneFk, geoFk) => {
|
||||||
|
const models = Self.app.models;
|
||||||
|
const geo = await models.ZoneTreeview.findById(geoFk);
|
||||||
const isIncluded = await Self.findOne({
|
const isIncluded = await Self.findOne({
|
||||||
where: {zoneFk, geoFk}
|
where: {zoneFk, geoFk}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const hasCheckedParents = await Self.rawSql(
|
||||||
|
`SELECT id
|
||||||
|
FROM vn.zoneTreeview zt
|
||||||
|
JOIN vn.zoneIncluded zi ON zi.geoFk = zt.id
|
||||||
|
WHERE zt.lft < ? AND zt.rgt > ?`, [geo.lft, geo.rgt]
|
||||||
|
);
|
||||||
|
const hasCheckedChilds = await Self.rawSql(
|
||||||
|
`SELECT id
|
||||||
|
FROM vn.zoneTreeview zt
|
||||||
|
JOIN vn.zoneIncluded zi ON zi.geoFk = zt.id
|
||||||
|
WHERE zt.lft > ? AND zt.rgt < ?`, [geo.lft, geo.rgt]
|
||||||
|
);
|
||||||
|
|
||||||
|
const isExcluded = hasCheckedParents.length || hasCheckedChilds.length;
|
||||||
|
|
||||||
if (isIncluded)
|
if (isIncluded)
|
||||||
return Self.destroyAll({zoneFk, geoFk});
|
return Self.destroyAll({zoneFk, geoFk});
|
||||||
else
|
else
|
||||||
return Self.upsert({zoneFk, geoFk});
|
return Self.upsert({zoneFk, geoFk, isIncluded: isExcluded});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -78,7 +78,8 @@ module.exports = Self => {
|
||||||
pt.depth,
|
pt.depth,
|
||||||
pt.sons,
|
pt.sons,
|
||||||
ti.id IS NOT NULL hasCheckedChilds,
|
ti.id IS NOT NULL hasCheckedChilds,
|
||||||
zi.geoFk IS NOT NULL AS selected
|
zi.geoFk IS NOT NULL AS selected,
|
||||||
|
zi.isIncluded AS excluded
|
||||||
FROM zoneTreeview pt
|
FROM zoneTreeview pt
|
||||||
LEFT JOIN vn.zoneIncluded zi
|
LEFT JOIN vn.zoneIncluded zi
|
||||||
ON zi.geoFk = pt.id AND zi.zoneFk = ?
|
ON zi.geoFk = pt.id AND zi.zoneFk = ?
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
<vn-card class="summary">
|
<vn-card class="summary">
|
||||||
|
<h5>{{$ctrl.summary.name}}</h5>
|
||||||
<vn-vertical pad-medium>
|
<vn-vertical pad-medium>
|
||||||
<vn-auto>
|
|
||||||
<h5 text-center pad-small-v class="title">{{$ctrl.summary.name}}</h5>
|
|
||||||
</vn-auto>
|
|
||||||
<vn-horizontal pad-medium>
|
<vn-horizontal pad-medium>
|
||||||
<vn-one>
|
<vn-one>
|
||||||
<vn-label-value label="Id"
|
<vn-label-value label="Id"
|
||||||
|
|
|
@ -48,10 +48,10 @@ class Controller {
|
||||||
|
|
||||||
returnDialog(response) {
|
returnDialog(response) {
|
||||||
if (response === 'CANCEL') {
|
if (response === 'CANCEL') {
|
||||||
let url = `/report/rpt-claim-pickup-order?claimFk=${this.claim.id}`;
|
let url = `/api/report/rpt-claim-pickup-order?claimFk=${this.claim.id}`;
|
||||||
window.open(url);
|
window.open(url);
|
||||||
} else if (response === 'ACCEPT') {
|
} else if (response === 'ACCEPT') {
|
||||||
this.$http.post(`/email/claim-pickup-order`, {claimFk: this.claim.id}).then(
|
this.$http.post(`/api/email/claim-pickup-order`, {claimFk: this.claim.id}).then(
|
||||||
() => this.vnApp.showMessage(this.$translate.instant('Notification sent!'))
|
() => this.vnApp.showMessage(this.$translate.instant('Notification sent!'))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
fields="['name']"
|
fields="['name']"
|
||||||
initial-data="$ctrl.client.bankEntityFk"
|
initial-data="$ctrl.client.bankEntityFk"
|
||||||
on-change="$ctrl.autofillBic()"
|
on-change="$ctrl.autofillBic()"
|
||||||
search-function="{or: [{bic: {regexp: $search}}, {name: {regexp: $search}}]}"
|
search-function="{or: [{bic: {like: $search +'%'}}, {name: {like: '%'+ $search +'%'}}]}"
|
||||||
value-field="id"
|
value-field="id"
|
||||||
show-field="bic"
|
show-field="bic"
|
||||||
vn-acl="salesAssistant"
|
vn-acl="salesAssistant"
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
fields="['code', 'name']"
|
fields="['code', 'name']"
|
||||||
value-field="id"
|
value-field="id"
|
||||||
field="$ctrl.item.typeFk"
|
field="$ctrl.item.typeFk"
|
||||||
search-function="{or: [{code: {like: '%'+ $search +'%'}}, {name: {like: '%'+ $search +'%'}}]}">
|
search-function="{or: [{code: {like: $search +'%'}}, {name: {like: '%'+ $search +'%'}}]}">
|
||||||
<tpl-item style="display: flex;">
|
<tpl-item style="display: flex;">
|
||||||
<div style="width: 3em; padding-right: 1em;">{{::code}}</div>
|
<div style="width: 3em; padding-right: 1em;">{{::code}}</div>
|
||||||
<div>{{::name}}</div>
|
<div>{{::name}}</div>
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
show-field="description"
|
show-field="description"
|
||||||
value-field="id"
|
value-field="id"
|
||||||
field="$ctrl.item.intrastatFk"
|
field="$ctrl.item.intrastatFk"
|
||||||
search-function="{or: [{id: {like: '%'+ $search +'%'}}, {description: {like: '%'+ $search +'%'}}]}">
|
search-function="{or: [{id: {like: $search +'%'}}, {description: {like: '%'+ $search +'%'}}]}">
|
||||||
<tpl-item style="display: flex;">
|
<tpl-item style="display: flex;">
|
||||||
<div style="width: 6em; text-align: right; padding-right: 1em;">{{::id}}</div>
|
<div style="width: 6em; text-align: right; padding-right: 1em;">{{::id}}</div>
|
||||||
<div>{{::description}}</div>
|
<div>{{::description}}</div>
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
show-field="description"
|
show-field="description"
|
||||||
value-field="id"
|
value-field="id"
|
||||||
field="$ctrl.item.intrastatFk"
|
field="$ctrl.item.intrastatFk"
|
||||||
search-function="{or: [{id: {regexp: $search}}, {description: {regexp: $search}}]}"
|
search-function="{or: [{id: {like: $search +'%'}}, {description: {like: '%'+ $search +'%'}}]}"
|
||||||
initial-data="$ctrl.item.intrastat">
|
initial-data="$ctrl.item.intrastat">
|
||||||
<tpl-item style="display: flex;">
|
<tpl-item style="display: flex;">
|
||||||
<div style="width: 6em; text-align: right; padding-right: 1em;">{{::id}}</div>
|
<div style="width: 6em; text-align: right; padding-right: 1em;">{{::id}}</div>
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
ng-show="tag.selection.isFree === false"
|
ng-show="tag.selection.isFree === false"
|
||||||
vn-three
|
vn-three
|
||||||
url="{{$ctrl.sourceTables[itemTag.id].url}}"
|
url="{{$ctrl.sourceTables[itemTag.id].url}}"
|
||||||
search-function="{name: {regexp: $search}}"
|
search-function="{name: {like: '%'+ $search +'%'}}"
|
||||||
label="Value"
|
label="Value"
|
||||||
field="itemTag.value"
|
field="itemTag.value"
|
||||||
show-field="{{$ctrl.sourceTables[itemTag.id].field}}"
|
show-field="{{$ctrl.sourceTables[itemTag.id].field}}"
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
vn-one
|
vn-one
|
||||||
url="/api/Clients"
|
url="/api/Clients"
|
||||||
label="Client"
|
label="Client"
|
||||||
search-function="{or: [{id: {regexp: $search}}, {name: {regexp: $search}}]}"
|
search-function="{or: [{id: $search}, {name: {regexp: $search}}]}"
|
||||||
show-field="name"
|
show-field="name"
|
||||||
value-field="id"
|
value-field="id"
|
||||||
field="$ctrl.order.clientFk"
|
field="$ctrl.order.clientFk"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
vn-id="client"
|
vn-id="client"
|
||||||
url="/api/Clients"
|
url="/api/Clients"
|
||||||
label="Client"
|
label="Client"
|
||||||
search-function="{or: [{id: {regexp: $search}}, {name: {regexp: $search}}]}"
|
search-function="{or: [{id: $search}, {name: {like: '%'+ $search +'%'}}]}"
|
||||||
show-field="name"
|
show-field="name"
|
||||||
value-field="id"
|
value-field="id"
|
||||||
field="$ctrl.clientFk"
|
field="$ctrl.clientFk"
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"Delivery": {
|
|
||||||
"dataSource": "vn"
|
|
||||||
},
|
|
||||||
"Route": {
|
|
||||||
"dataSource": "vn"
|
|
||||||
},
|
|
||||||
"Vehicle": {
|
|
||||||
"dataSource": "vn"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
export * from './module';
|
|
|
@ -1 +0,0 @@
|
||||||
Routes: Routes
|
|
|
@ -1,3 +0,0 @@
|
||||||
Routes: Rutas
|
|
||||||
List: Listado
|
|
||||||
Enter a new search: Introduce una nueva búsqueda
|
|
|
@ -1,3 +0,0 @@
|
||||||
import {ng} from 'core/vendor';
|
|
||||||
|
|
||||||
export default ng.module('route', ['vnCore']);
|
|
|
@ -1,22 +0,0 @@
|
||||||
/* {
|
|
||||||
"module": "route",
|
|
||||||
"name": "Routes",
|
|
||||||
"icon" : "local_shipping",
|
|
||||||
"validations" : true,
|
|
||||||
"routes": [
|
|
||||||
{
|
|
||||||
"url": "/route",
|
|
||||||
"state": "route",
|
|
||||||
"abstract": true,
|
|
||||||
"component": "ui-view",
|
|
||||||
"description": "Routes"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"url": "/index?q",
|
|
||||||
"state": "route.index",
|
|
||||||
"component": "vn-route-index",
|
|
||||||
"description": "Routes",
|
|
||||||
"acl": ["developer"]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
} */
|
|
|
@ -3,7 +3,7 @@
|
||||||
vn-id="client"
|
vn-id="client"
|
||||||
url="/api/Clients"
|
url="/api/Clients"
|
||||||
label="Client"
|
label="Client"
|
||||||
search-function="{or: [{id: {regexp: $search}}, {name: {regexp: $search}}]}"
|
search-function="{or: [{id: $search}, {name: {like: '%'+ $search +'%'}}]}"
|
||||||
show-field="name"
|
show-field="name"
|
||||||
value-field="id"
|
value-field="id"
|
||||||
field="$ctrl.clientFk"
|
field="$ctrl.clientFk"
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
label="Package"
|
label="Package"
|
||||||
show-field="name"
|
show-field="name"
|
||||||
value-field="packagingFk"
|
value-field="packagingFk"
|
||||||
search-function="{or: [{itemFk: {like: '%'+ $search +'%'}}, {'name': {like: '%'+ $search +'%'}}]}"
|
search-function="{or: [{itemFk: $search}, {'name': {like: '%'+ $search +'%'}}]}"
|
||||||
field="package.packagingFk">
|
field="package.packagingFk">
|
||||||
<tpl-item>{{itemFk}} : {{name}}</tpl-item>
|
<tpl-item>{{itemFk}} : {{name}}</tpl-item>
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
|
|
|
@ -120,8 +120,7 @@
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.grid .row.inline > section {
|
||||||
.grid .row.inline > div {
|
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,11 +128,13 @@
|
||||||
border: 1px solid #DDD;
|
border: 1px solid #DDD;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding:10px
|
padding:20px
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel .header {
|
.panel .header {
|
||||||
font-weight: bold
|
background-color: #FFF;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-top: -20px
|
||||||
}
|
}
|
||||||
|
|
||||||
.box {
|
.box {
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
.uppercase {
|
||||||
|
text-transform: uppercase
|
||||||
|
}
|
||||||
|
|
||||||
|
.centered {
|
||||||
|
text-align: center
|
||||||
|
}
|
||||||
|
|
||||||
|
.number {
|
||||||
|
text-align: right
|
||||||
|
}
|
||||||
|
|
||||||
|
.gray {
|
||||||
|
color: #555
|
||||||
|
}
|
|
@ -88,7 +88,7 @@ module.exports = {
|
||||||
const componentPath = `${this.path}/${orgComponent.name}`;
|
const componentPath = `${this.path}/${orgComponent.name}`;
|
||||||
let fileSrc = componentPath + file;
|
let fileSrc = componentPath + file;
|
||||||
|
|
||||||
if (file.slice(0, 4) === 'http' || file.slice(0, 4) === 'https')
|
if (file.slice(0, 4) === 'http' || file.slice(0, 5) === 'https')
|
||||||
fileSrc = file;
|
fileSrc = file;
|
||||||
|
|
||||||
const fileName = file.split('/').pop();
|
const fileName = file.split('/').pop();
|
||||||
|
|
|
@ -14,7 +14,7 @@ module.exports = app => {
|
||||||
function registerReport(name) {
|
function registerReport(name) {
|
||||||
if (!name) throw new Error('Report name required');
|
if (!name) throw new Error('Report name required');
|
||||||
|
|
||||||
app.get(`/report/${name}`, (request, response, next) => {
|
app.get(`/api/report/${name}`, (request, response, next) => {
|
||||||
reportEngine.toPdf(name, request).then(stream => {
|
reportEngine.toPdf(name, request).then(stream => {
|
||||||
response.setHeader('Content-Disposition', `attachment; filename="${name}.pdf"`);
|
response.setHeader('Content-Disposition', `attachment; filename="${name}.pdf"`);
|
||||||
response.setHeader('Content-type', 'application/pdf');
|
response.setHeader('Content-type', 'application/pdf');
|
||||||
|
@ -33,7 +33,7 @@ module.exports = app => {
|
||||||
function registerEmail(name) {
|
function registerEmail(name) {
|
||||||
if (!name) throw new Error('Email name required');
|
if (!name) throw new Error('Email name required');
|
||||||
|
|
||||||
app.get(`/email/${name}`, (request, response, next) => {
|
app.get(`/api/email/${name}`, (request, response, next) => {
|
||||||
emailEngine.render(name, request).then(rendered => {
|
emailEngine.render(name, request).then(rendered => {
|
||||||
response.send(rendered.html);
|
response.send(rendered.html);
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
|
@ -41,7 +41,7 @@ module.exports = app => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
app.post(`/email/${name}`, (request, response, next) => {
|
app.post(`/api/email/${name}`, (request, response, next) => {
|
||||||
emailEngine.toEmail(name, request).then(() => {
|
emailEngine.toEmail(name, request).then(() => {
|
||||||
response.status(200).json({status: 200});
|
response.status(200).json({status: 200});
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
|
@ -60,6 +60,6 @@ module.exports = app => {
|
||||||
registerReport(route.name);
|
registerReport(route.name);
|
||||||
|
|
||||||
const staticPath = this.path + `/${route.name}/assets`;
|
const staticPath = this.path + `/${route.name}/assets`;
|
||||||
app.use(`/assets`, express.static(staticPath));
|
app.use(`/api/assets`, express.static(staticPath));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,34 +1,39 @@
|
||||||
|
@media (max-width: 400px) {
|
||||||
|
.buttons a {
|
||||||
|
display: block;
|
||||||
|
width: 100%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.buttons {
|
.buttons {
|
||||||
background-color: #FFF;
|
|
||||||
text-align: center;
|
|
||||||
width: 100%
|
width: 100%
|
||||||
}
|
}
|
||||||
|
|
||||||
.buttons a {
|
.buttons a {
|
||||||
|
display: inline-block;
|
||||||
|
box-sizing: border-box;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-size: 18px;
|
font-size: 16px;
|
||||||
color: #fff
|
color: #fff;
|
||||||
|
width: 50%
|
||||||
}
|
}
|
||||||
|
|
||||||
.buttons .btn {
|
.buttons .btn {
|
||||||
background-color: #333;
|
background-color: #333;
|
||||||
min-width: 300px;
|
|
||||||
height: 72px;
|
|
||||||
display: inline-block;
|
|
||||||
text-align: center
|
text-align: center
|
||||||
}
|
}
|
||||||
|
|
||||||
.buttons .btn .text {
|
.buttons .btn .text {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding-top: 22px
|
padding: 22px 0
|
||||||
}
|
}
|
||||||
|
|
||||||
.buttons .btn .icon {
|
.buttons .btn .icon {
|
||||||
background-color: #95d831;
|
background-color: #95d831;
|
||||||
|
box-sizing: border-box;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding-top: 22px;
|
padding: 16.5px 0;
|
||||||
float: right;
|
float: right;
|
||||||
height: 50px;
|
|
||||||
width: 70px
|
width: 70px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
<footer>
|
<footer>
|
||||||
<!-- Action button block -->
|
<!-- Action button block -->
|
||||||
<!-- <section class="buttons">
|
<!-- <section class="buttons">
|
||||||
<a href="https://www.verdnatura.es" target="_blank">
|
<a href="https://www.verdnatura.es" target="_blank">
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<span class="text">{{ $t('buttons.webAcccess')}}</span>
|
<span class="text">{{ $t('buttons.webAcccess')}}</span>
|
||||||
<span class="icon"><img src="/assets/images/action.png"/></span>
|
<span class="icon"><img :src="embeded['/assets/images/action.png']"/></span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a href="https://goo.gl/forms/j8WSL151ZW6QtlT72" target="_blank">
|
<a href="https://goo.gl/forms/j8WSL151ZW6QtlT72" target="_blank">
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<span class="text">{{ $t('buttons.info')}}</span>
|
<span class="text">{{ $t('buttons.info')}}</span>
|
||||||
<span class="icon"><img src="/assets/images/info.png"/></span>
|
<span class="icon"><img :src="embeded['/assets/images/info.png']"/></span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</section> -->
|
</section> -->
|
||||||
|
|
|
@ -8,7 +8,7 @@ module.exports = {
|
||||||
created() {
|
created() {
|
||||||
const embeded = [];
|
const embeded = [];
|
||||||
this.files.map(file => {
|
this.files.map(file => {
|
||||||
const src = this.isPreview ? file : `cid:${file}`;
|
const src = this.isPreview ? `/api/${file}` : `cid:${file}`;
|
||||||
embeded[file] = src;
|
embeded[file] = src;
|
||||||
});
|
});
|
||||||
this.embeded = embeded;
|
this.embeded = embeded;
|
||||||
|
@ -16,6 +16,8 @@ module.exports = {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
files: [
|
files: [
|
||||||
|
'/assets/images/action.png',
|
||||||
|
'/assets/images/info.png',
|
||||||
'/assets/images/facebook.png',
|
'/assets/images/facebook.png',
|
||||||
'/assets/images/twitter.png',
|
'/assets/images/twitter.png',
|
||||||
'/assets/images/youtube.png',
|
'/assets/images/youtube.png',
|
||||||
|
|
|
@ -8,12 +8,15 @@ module.exports = {
|
||||||
privacy: {
|
privacy: {
|
||||||
fiscalAddress: 'VERDNATURA LEVANTE SL, B97367486 Avda. Espioca, 100, 46460 Silla · www.verdnatura.es · clientes@verdnatura.es',
|
fiscalAddress: 'VERDNATURA LEVANTE SL, B97367486 Avda. Espioca, 100, 46460 Silla · www.verdnatura.es · clientes@verdnatura.es',
|
||||||
disclaimer: `- AVISO - Este mensaje es privado y confidencial, y debe ser utilizado
|
disclaimer: `- AVISO - Este mensaje es privado y confidencial, y debe ser utilizado
|
||||||
exclusivamente por la persona destinataria del mismo. Si usted ha recibido este mensaje
|
exclusivamente por la persona destinataria del mismo. Si has recibido este mensaje
|
||||||
por error, le rogamos lo comunique al remitente y borre dicho mensaje y cualquier documento
|
por error, te rogamos lo comuniques al remitente y borres dicho mensaje y cualquier documento
|
||||||
adjunto que pudiera contener. Verdnatura Levante SL no renuncia a la confidencialidad ni a
|
adjunto que pudiera contener. Verdnatura Levante SL no renuncia a la confidencialidad ni a
|
||||||
ningún privilegio por causa de transmisión errónea o mal funcionamiento. Igualmente no se hace
|
ningún privilegio por causa de transmisión errónea o mal funcionamiento. Igualmente no se hace
|
||||||
responsable de los cambios, alteraciones, errores u omisiones que pudieran hacerse al mensaje una vez enviado.`,
|
responsable de los cambios, alteraciones, errores u omisiones que pudieran hacerse al mensaje una vez enviado.`,
|
||||||
law: 'En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal, le comunicamos que los datos personales que facilite se incluirán en ficheros automatizados de VERDNATURA LEVANTE S.L., pudiendo en todo momento ejercitar los derechos de acceso, rectificación, cancelación y oposición, comunicándolo por escrito al domicilio social de la entidad. La finalidad del fichero es la gestión administrativa, contabilidad, y facturación.',
|
law: `En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal,
|
||||||
|
te comunicamos que los datos personales que facilites se incluirán en ficheros automatizados de VERDNATURA LEVANTE S.L.,
|
||||||
|
pudiendo en todo momento ejercitar los derechos de acceso, rectificación, cancelación y oposición, comunicándolo por
|
||||||
|
escrito al domicilio social de la entidad. La finalidad del fichero es la gestión administrativa, contabilidad, y facturación.`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,7 +8,7 @@ module.exports = {
|
||||||
created() {
|
created() {
|
||||||
const embeded = [];
|
const embeded = [];
|
||||||
this.files.map(file => {
|
this.files.map(file => {
|
||||||
const src = this.isPreview ? file : `cid:${file}`;
|
const src = this.isPreview ? `/api/${file}` : `cid:${file}`;
|
||||||
embeded[file] = src;
|
embeded[file] = src;
|
||||||
});
|
});
|
||||||
this.embeded = embeded;
|
this.embeded = embeded;
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
const CssReader = require(`${appPath}/lib/cssReader`);
|
const CssReader = require(`${appPath}/lib/cssReader`);
|
||||||
|
|
||||||
module.exports = new CssReader([`${__dirname}/style.css`])
|
module.exports = new CssReader([
|
||||||
|
`${__dirname}/style.css`,
|
||||||
|
`${appPath}/common/css/misc.css`])
|
||||||
.mergeStyles();
|
.mergeStyles();
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
footer {
|
footer {
|
||||||
|
font-family: verdana, sans-serif;
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
color: #555
|
font-size: 12px;
|
||||||
|
color: #555;
|
||||||
|
zoom: 0.55
|
||||||
}
|
}
|
||||||
|
|
||||||
footer, footer p {
|
footer, footer p {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<footer>
|
<footer>
|
||||||
<section class="page">
|
<section class="page">
|
||||||
<section :if="leftText">{{leftText}}</section>
|
<section :if="leftText">{{leftText}}</section>
|
||||||
<section :if="centerText">{{centerText}}</section>
|
<section :if="centerText" class="uppercase">{{centerText}}</section>
|
||||||
<section class="number">{{$t('numPages')}}</section>
|
<section class="number">{{$t('numPages')}}</section>
|
||||||
</section>
|
</section>
|
||||||
<p>{{$t('law.phytosanitary')}}</p>
|
<p class="phytosanitary">{{$t('law.phytosanitary')}}</p>
|
||||||
<p>{{$t('law.privacy')}}</p>
|
<p v-html="$t('law.privacy')"></p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -7,8 +7,8 @@ module.exports = {
|
||||||
privacy: `En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal,
|
privacy: `En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal,
|
||||||
le comunicamos que los datos personales que facilite se incluirán en ficheros automatizados de VERDNATURA LEVANTE S.L.,
|
le comunicamos que los datos personales que facilite se incluirán en ficheros automatizados de VERDNATURA LEVANTE S.L.,
|
||||||
pudiendo en todo momento ejercitar los derechos de acceso, rectificación, cancelación y oposición, comunicándolo
|
pudiendo en todo momento ejercitar los derechos de acceso, rectificación, cancelación y oposición, comunicándolo
|
||||||
por escrito al domicilio social de la entidad. La finalidad del fichero
|
por escrito al domicilio social de la entidad. <br/>
|
||||||
es la gestión administrativa, contabilidad, y facturación.`,
|
La finalidad del fichero es la gestión administrativa, contabilidad, y facturación.`,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,5 +2,6 @@ const CssReader = require(`${appPath}/lib/cssReader`);
|
||||||
|
|
||||||
module.exports = new CssReader([
|
module.exports = new CssReader([
|
||||||
`${appPath}/common/css/layout.css`,
|
`${appPath}/common/css/layout.css`,
|
||||||
|
`${appPath}/common/css/misc.css`,
|
||||||
`${__dirname}/style.css`])
|
`${__dirname}/style.css`])
|
||||||
.mergeStyles();
|
.mergeStyles();
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
.container {
|
.container {
|
||||||
color: #000
|
color: #000
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-weight: 100;
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
font-size: 2em
|
||||||
}
|
}
|
|
@ -4,69 +4,69 @@
|
||||||
<section class="container">
|
<section class="container">
|
||||||
<report-header></report-header>
|
<report-header></report-header>
|
||||||
<section class="main">
|
<section class="main">
|
||||||
<div class="columns">
|
<section class="columns">
|
||||||
<div class="size50">
|
<section class="size50">
|
||||||
<div class="size75">
|
<section class="size75">
|
||||||
<h1 style="margin-top:0" class="font extraLarge" style="font-weight: 100">{{$t('title')}}</h1>
|
<h1 style="margin-top:0" class="title">{{$t('title')}}</h1>
|
||||||
<div class="row inline font normal">
|
<section class="row inline small">
|
||||||
<div class="text font gray">{{$t('claimId')}}:</div>
|
<section class="text uppercase gray">{{$t('claimId')}}:</section>
|
||||||
<div class="control">{{claimId}}</div>
|
<section class="control">{{claimId}}</section>
|
||||||
</div>
|
</section>
|
||||||
<div class="row inline font normal">
|
<section class="row inline small">
|
||||||
<div class="text font gray">{{$t('clientId')}}:</div>
|
<section class="text uppercase gray">{{$t('clientId')}}:</section>
|
||||||
<div class="control">{{clientId}}</div>
|
<section class="control">{{clientId}}</section>
|
||||||
</div>
|
</section>
|
||||||
<div class="row inline font normal">
|
<section class="row inline small">
|
||||||
<div class="text font gray">{{$t('date')}}:</div>
|
<section class="text uppercase gray">{{$t('date')}}:</section>
|
||||||
<div class="control">{{dated()}}</div>
|
<section class="control">{{dated()}}</section>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
<div class="size50">
|
<section class="size50">
|
||||||
<div class="panel">
|
<section class="panel">
|
||||||
<div class="header">{{$t('clientData')}}</div>
|
<section class="header">{{$t('clientData')}}</section>
|
||||||
<p>
|
<p>
|
||||||
<strong>{{clientName}}</strong>
|
<strong class="uppercase">{{clientName}}</strong>
|
||||||
</p>
|
</p>
|
||||||
<div>
|
<section>
|
||||||
{{street}}
|
{{street}}
|
||||||
</div>
|
</section>
|
||||||
<div>
|
<section>
|
||||||
{{postcode}}, {{city}} ({{province}})
|
{{postcode}}, {{city}} ({{province}})
|
||||||
</div>
|
</section>
|
||||||
<div>
|
<section>
|
||||||
{{country}}
|
{{country}}
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
<div class="grid" style="margin-top:20px">
|
<section class="grid" style="margin-top:20px">
|
||||||
<div class="row header inline">
|
<section class="row header inline">
|
||||||
<div style="width: 15%">{{$t('quantity')}}</div>
|
<section style="width: 15%">{{$t('quantity')}}</section>
|
||||||
<div style="width: 15%">{{$t('claims')}}</div>
|
<section style="width: 15%">{{$t('claims')}}</section>
|
||||||
<div style="width: 20%">{{$t('reference')}}</div>
|
<section style="width: 20%">{{$t('reference')}}</section>
|
||||||
<div style="width: 50%">{{$t('concept')}}</div>
|
<section style="width: 50%">{{$t('concept')}}</section>
|
||||||
</div>
|
</section>
|
||||||
<div class="row inline" v-for="sale in sales">
|
<section class="row inline" v-for="sale in sales">
|
||||||
<div class="font bold" style="width: 15%">{{sale.quantity}} </div>
|
<section class="number" style="width: 15%">{{sale.quantity}} </section>
|
||||||
<div class="font bold" style="width: 15%">{{sale.claimQuantity}} </div>
|
<section class="number" style="width: 15%">{{sale.claimQuantity}} </section>
|
||||||
<div class="font bold" style="width: 20%">{{sale.id}} </div>
|
<section style="width: 20%">{{sale.id}} </section>
|
||||||
<div class="font bold" style="width: 50%">{{sale.concept}} </div>
|
<section style="width: 50%">{{sale.concept}} </section>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
<div class="columns" style="margin-top: 50px">
|
<section class="columns" style="margin-top: 50px">
|
||||||
<div class="size25"> </div>
|
<section class="size25"> </section>
|
||||||
<div class="size50">
|
<section class="size50">
|
||||||
<div class="panel" style="height: 150px">
|
<section class="panel" style="height: 150px">
|
||||||
<div style="text-align: center">
|
<section class="centered">
|
||||||
<h3>{{clientName}}</h3>
|
<h3>{{clientName}}</h3>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
<div class="size25"> </div>
|
<section class="size25"> </section>
|
||||||
</div>
|
</section>
|
||||||
<p v-html="$t('sections.agency.description')"></p>
|
<p v-html="$t('sections.agency.description')"></p>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ module.exports = {
|
||||||
claim: 'Reclamación {0}',
|
claim: 'Reclamación {0}',
|
||||||
sections: {
|
sections: {
|
||||||
agency: {
|
agency: {
|
||||||
description: `Para agilizar su recogida, por favor, póngase en contacto con la oficina de integrados. <br/>
|
description: `Para agilizar tu recogida, por favor, pónte en contacto con la oficina de integrados. <br/>
|
||||||
Tlf: 96 166 77 88 - Ana Gómez <em>(agomezf@integra2.es)</em>`
|
Tlf: 96 166 77 88 - Ana Gómez <em>(agomezf@integra2.es)</em>`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,6 +70,12 @@ let baseConfig = {
|
||||||
'vn-loopback': `${__dirname}/loopback`
|
'vn-loopback': `${__dirname}/loopback`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watchOptions: {
|
||||||
|
ignored: [
|
||||||
|
'node_modules',
|
||||||
|
'./modules/*/back/**'
|
||||||
|
]
|
||||||
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: 'front/salix/index.ejs',
|
template: 'front/salix/index.ejs',
|
||||||
|
|
Loading…
Reference in New Issue