This commit is contained in:
Carlos Jimenez 2019-01-15 12:39:07 +01:00
commit 2ec9a57663
11 changed files with 25 additions and 20 deletions

View File

@ -1,7 +1,7 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/nightmare'; import createNightmare from '../../helpers/nightmare';
describe('Ticket services path', () => { xdescribe('Ticket services path', () => {
const nightmare = createNightmare(); const nightmare = createNightmare();
beforeAll(() => { beforeAll(() => {

View File

@ -11,7 +11,7 @@ export default class inputRange extends Input {
this._value = this.input.value; this._value = this.input.value;
this.$.$applyAsync(); this.$.$applyAsync();
if (this._value && this.onChange) if (this._value && this.onChange)
this.onChange(); this.emit('change', {value: this._value});
}); });
} }

View File

@ -25,5 +25,6 @@
"NO_AGENCY_AVAILABLE": "NO_AGENCY_AVAILABLE", "NO_AGENCY_AVAILABLE": "NO_AGENCY_AVAILABLE",
"Warehouse cannot be blank": "Warehouse cannot be blank", "Warehouse cannot be blank": "Warehouse cannot be blank",
"Agency cannot be blank": "Agency cannot be blank", "Agency cannot be blank": "Agency cannot be blank",
"The IBAN does not have the correct format": "The IBAN does not have the correct format" "The IBAN does not have the correct format": "The IBAN does not have the correct format",
"You can't make changes on the basic data of an confirmed order or with rows": "You can't make changes on the basic data of an confirmed order or with rows"
} }

View File

@ -35,7 +35,7 @@
min="1" min="1"
step="1" step="1"
vn-acl="salesAssistant" vn-acl="salesAssistant"
on-change="$ctrl.saveResponsibility()"> on-change="$ctrl.saveResponsibility(value)">
</vn-input-range> </vn-input-range>
</vn-tool-bar> </vn-tool-bar>
</vn-horizontal> </vn-horizontal>

View File

@ -146,10 +146,10 @@ class Controller {
this.$.descriptor.show(); this.$.descriptor.show();
} }
saveResponsibility() { saveResponsibility(value) {
let query = `/claim/api/Claims/updateClaim`; let query = `/claim/api/Claims/updateClaim`;
this.$http.post(query, {responsibility: this.claim.responsibility}).then(res => { this.$http.post(query, {responsibility: value}).then(() => {
this.vnApp.showSuccess(this.$translate.instant('Data saved!')); this.vnApp.showSuccess(this.$translate.instant('Data saved!'));
}); });
} }

View File

@ -30,6 +30,7 @@
<vn-one> <vn-one>
<vn-input-range <vn-input-range
vn-one vn-one
disabled="true"
label="Responsability" label="Responsability"
value="$ctrl.summary.claim.responsibility" value="$ctrl.summary.claim.responsibility"
max="5" max="5"

View File

@ -54,6 +54,6 @@ module.exports = Self => {
await fs.access(file.path); await fs.access(file.path);
let stream = fs.createReadStream(file.path); let stream = fs.createReadStream(file.path);
return [stream, file.contentType, `attachment; filename="${file.name}"`]; return [stream, file.contentType, `filename="${file.name}"`];
}; };
}; };

View File

@ -2,15 +2,15 @@
"name": "Receipt", "name": "Receipt",
"base": "VnModel", "base": "VnModel",
"options": { "options": {
"mysql": { "mysql": {
"table": "receipt" "table": "receipt"
} }
}, },
"properties": { "properties": {
"id": { "id": {
"id": true, "id": true,
"type": "Number", "type": "Number",
"description": "Identifier" "description": "Identifier"
}, },
"amountPaid": { "amountPaid": {
"type": "Number" "type": "Number"
@ -48,11 +48,11 @@
"type": "belongsTo", "type": "belongsTo",
"model": "Bank", "model": "Bank",
"foreignKey": "bankFk" "foreignKey": "bankFk"
}, },
"invoice": { "invoice": {
"type": "belongsTo", "type": "belongsTo",
"model": "InvoiceOut", "model": "InvoiceOut",
"foreignKey": "invoiceFk" "foreignKey": "invoiceFk"
} }
} }
} }

View File

@ -61,7 +61,9 @@
<vn-td>{{::risk.payed | dateTime:'dd/MM/yyyy'}}</vn-td> <vn-td>{{::risk.payed | dateTime:'dd/MM/yyyy'}}</vn-td>
<vn-td>{{::risk.created | dateTime:'dd/MM/yyyy HH:mm'}}</vn-td> <vn-td>{{::risk.created | dateTime:'dd/MM/yyyy HH:mm'}}</vn-td>
<vn-td>{{::risk.firstName}} {{::risk.name}}</vn-td> <vn-td>{{::risk.firstName}} {{::risk.name}}</vn-td>
<vn-td>{{::risk.ref ? 'N/FRA ' + risk.ref : ''}}</vn-td> <vn-td>
<span ng-show="risk.ref" translate>BILL</span> {{::risk.ref}}
</vn-td>
<vn-td number>{{::risk.bankFk}}</vn-td> <vn-td number>{{::risk.bankFk}}</vn-td>
<vn-td number>{{::risk.debit | currency:'€':2}}</vn-td> <vn-td number>{{::risk.debit | currency:'€':2}}</vn-td>
<vn-td number>{{::risk.credit | currency:'€':2}}</vn-td> <vn-td number>{{::risk.credit | currency:'€':2}}</vn-td>
@ -74,7 +76,8 @@
</vn-td> </vn-td>
<vn-td center> <vn-td center>
<a ng-show="risk.pdf" <a ng-show="risk.pdf"
href="api/InvoiceOuts/{{::risk.ref}}/download?access_token={{::$ctrl.accessToken}}"> target="_blank"
href="api/InvoiceOuts/{{::risk.id}}/download?access_token={{::$ctrl.accessToken}}">
<vn-icon-button <vn-icon-button
icon="cloud_download" icon="cloud_download"
title="Download PDF"> title="Download PDF">

View File

@ -7,4 +7,5 @@ New payment: Añadir pago
Havings: Haber Havings: Haber
Balance: Balance Balance: Balance
Total by company: Total por empresa Total by company: Total por empresa
Download PDF: Descargar PDF Download PDF: Descargar PDF
BILL: N/FRA

View File

@ -232,7 +232,6 @@
{"state": "ticket.card.volume", "icon": "icon-volume"}, {"state": "ticket.card.volume", "icon": "icon-volume"},
{"state": "ticket.card.expedition", "icon": "icon-package"}, {"state": "ticket.card.expedition", "icon": "icon-package"},
{"state": "ticket.card.package.index", "icon": "icon-bucket"}, {"state": "ticket.card.package.index", "icon": "icon-bucket"},
{"state": "ticket.card.service", "icon": "icon-services"},
{"state": "ticket.card.tracking.index", "icon": "remove_red_eye"}, {"state": "ticket.card.tracking.index", "icon": "remove_red_eye"},
{"state": "ticket.card.saleChecked", "icon": "assignment"}, {"state": "ticket.card.saleChecked", "icon": "assignment"},
{"state": "ticket.card.components", "icon": "icon-components"}, {"state": "ticket.card.components", "icon": "icon-components"},