Bug #376 dropdown "more" en ticket.sale no actualiza sus datos
This commit is contained in:
parent
cb34b11b99
commit
48e44bd610
|
@ -26,6 +26,7 @@ export default class IconMenu extends Input {
|
|||
|
||||
onClick(event) {
|
||||
event.preventDefault();
|
||||
if (this.onOpen) this.onOpen();
|
||||
this.showDropDown();
|
||||
}
|
||||
|
||||
|
@ -81,7 +82,8 @@ ngModule.component('vnIconMenu', {
|
|||
multiple: '<?',
|
||||
onChange: '&?',
|
||||
icon: '@?',
|
||||
translateFields: '<?'
|
||||
translateFields: '<?',
|
||||
onOpen: '&?'
|
||||
},
|
||||
transclude: {
|
||||
tplItem: '?tplItem'
|
||||
|
|
|
@ -9,6 +9,15 @@ export default class RestModel {
|
|||
this.clear();
|
||||
}
|
||||
|
||||
set staticData(value) {
|
||||
this._staticData = value;
|
||||
this.refresh();
|
||||
}
|
||||
|
||||
get staticData() {
|
||||
return this._staticData;
|
||||
}
|
||||
|
||||
get isLoading() {
|
||||
return this.canceler != null;
|
||||
}
|
||||
|
@ -48,11 +57,11 @@ export default class RestModel {
|
|||
|
||||
this.clear();
|
||||
this.sendRequest(filter);
|
||||
} else if (this.staticData) {
|
||||
} else if (this._staticData) {
|
||||
if (search)
|
||||
this.data = this.$filter('filter')(this.staticData, search);
|
||||
this.data = this.$filter('filter')(this._staticData, search);
|
||||
else
|
||||
this.data = this.staticData;
|
||||
this.data = this._staticData;
|
||||
this.dataChanged();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,13 +16,13 @@
|
|||
on-change="$ctrl.onStateChange(value)">
|
||||
</vn-icon-menu>
|
||||
<vn-icon-menu
|
||||
vn-id="more-button"
|
||||
label="More"
|
||||
show-filter="false"
|
||||
value-field="callback"
|
||||
data="$ctrl.moreOptions"
|
||||
translate-fields="['name']"
|
||||
on-change="$ctrl.onMoreChange(value)"
|
||||
ng-click="$ctrl.onMoreClick()">
|
||||
on-open="$ctrl.onMoreOpen()">
|
||||
</vn-icon-menu>
|
||||
<vn-button
|
||||
disabled="!$ctrl.isChecked || !$ctrl.isEditable"
|
||||
|
@ -59,6 +59,8 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="sale in index.model.instances track by sale.id">
|
||||
<td><vn-icon ng-show="sale.disponible" icon="icon-reserved"></vn-icon></td>
|
||||
<td><vn-icon ng-show="sale.visible" icon="icon-reserved"></vn-icon></td>
|
||||
<td><vn-icon ng-show="sale.reserved" icon="icon-reserved"></vn-icon></td>
|
||||
<td number>
|
||||
<vn-check
|
||||
|
@ -76,6 +78,7 @@
|
|||
<td ng-if="!$ctrl.isEditable" number>{{sale.quantity}}</td>
|
||||
<td ng-if="$ctrl.isEditable" number>
|
||||
<vn-textfield
|
||||
|
||||
model="sale.quantity"
|
||||
on-change="$ctrl.updateQuantity(sale.id,sale.quantity)"
|
||||
unclearable="true">
|
||||
|
@ -85,7 +88,7 @@
|
|||
ng-if="$ctrl.isEditable"
|
||||
ng-click="$ctrl.showEditPricePopover($event, sale)"
|
||||
pointer
|
||||
vn-tooltip="Edit Price">
|
||||
vn-tooltip="Edit price">
|
||||
{{sale.price | currency:'€':2}}
|
||||
</td>
|
||||
<td number ng-if="!$ctrl.isEditable">
|
||||
|
@ -185,7 +188,6 @@
|
|||
</vn-horizontal>
|
||||
<div pad-medium>
|
||||
<vn-textfield
|
||||
vn-focus
|
||||
label="Price"
|
||||
model="$ctrl.editedPrice"
|
||||
type="number"
|
||||
|
|
Loading…
Reference in New Issue