This commit is contained in:
Juan Ferrer 2019-01-15 12:17:47 +01:00
commit f402bb5afb
4 changed files with 5 additions and 4 deletions

View File

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

View File

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

View File

@ -146,10 +146,10 @@ class Controller {
this.$.descriptor.show();
}
saveResponsibility() {
saveResponsibility(value) {
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!'));
});
}

View File

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