Listar modelo saleChecked

This commit is contained in:
Gerard 2018-03-26 15:10:51 +02:00
parent d773082f82
commit a746d2d58f
7 changed files with 85 additions and 0 deletions

View File

@ -137,6 +137,18 @@
"description": "Sale",
"icon": "icon-lines"
}
},
{
"url" : "/sale-checked",
"state": "ticket.card.saleChecked",
"component": "vn-ticket-sale-checked",
"params": {
"ticket": "$ctrl.ticket"
},
"menu": {
"description": "Sale Checked",
"icon": "assignment"
}
}
]
}

View File

@ -19,3 +19,11 @@ Sale: Lineas del pedido
Some fields are invalid: Algunos campos no son válidos
The observation type must be unique: El tipo de observación debe ser único
Tickets: Tickets
Date : Fecha
Employee : Empleado
State: Estado
Tracking: Revisión
Created : Añadido
New : Nuevo
New state: Nuevo estado
Sale Checked: Control clientes

View File

@ -0,0 +1,36 @@
<mg-ajax path="/ticket/api/sales/filter" options="vnIndexNonAuto"></mg-ajax>
<vn-vertical>
<vn-card pad-large>
<vn-vertical>
<vn-title>Sale checked</vn-title>
<table class="vn-grid">
<thead>
<tr>
<th style="text-align:center" translate>Is checked</th>
<th number translate>Item</th>
<th translate style="text-align:center">Description</th>
<th number translate>Quantity</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="sale in index.model.instances track by sale.id">
<td style="text-align:center!important"><vn-check style="text-align:center!important" vn-one field="sale.isChecked.isChecked" disabled="true"></vn-check></td>
<td number>{{::sale.itemFk}}</td>
<td>
<vn-vertical style="text-align:center">
<vn-one>{{::sale.concept}}</vn-one>
<vn-one>
<vn-one ng-repeat="fetchedTag in sale.itemTag track by $index">
<vn-label>{{::fetchedTag.tag.name}} </vn-label>{{::fetchedTag.value}}
</vn-one>
</vn-one>
</vn-vertical>
</td>
<td number>{{::sale.quantity}}</td>
</tr>
</tbody>
</table>
</vn-vertical>
</vn-card>
</vn-vertical>

View File

@ -0,0 +1,17 @@
import ngModule from '../module';
import FilterTicketList from '../filter-ticket-list';
class Controller extends FilterTicketList {
constructor($scope, $timeout, $state) {
super($scope, $timeout, $state);
this.onOrder('quantity', 'ASC');
}
}
Controller.$inject = ['$scope', '$timeout', '$state'];
ngModule.component('vnTicketSaleChecked', {
template: require('./sale-checked.html'),
controller: Controller
});

View File

@ -12,3 +12,4 @@ import './package/package';
import './sale/sale';
import './tracking/tracking';
import './fetched-tags/fetched-tags';
import './sale-checked/sale-checked';

View File

@ -20,6 +20,12 @@ module.exports = Self => {
}
}
}
},
{
relation: "isChecked",
scope: {
fields: ["isChecked"]
}
}]
};
}

View File

@ -51,6 +51,11 @@
"model": "Ticket",
"foreignKey": "ticketFk",
"required": true
},
"isChecked": {
"type": "hasOne",
"model": "SaleChecked",
"foreignKey": "saleFk"
}
}
}