added claim list #443
This commit is contained in:
parent
72766d0759
commit
a06f7fb01f
|
@ -1,9 +1,9 @@
|
|||
<vn-crud-model
|
||||
vn-id="model"
|
||||
url="/ticket/api/Tickets"
|
||||
url="/claim/api/Claims"
|
||||
filter="::$ctrl.filter"
|
||||
limit="20"
|
||||
data="tickets"
|
||||
data="claims"
|
||||
auto-load="false">
|
||||
</vn-crud-model>
|
||||
<div margin-medium>
|
||||
|
@ -17,64 +17,43 @@
|
|||
</vn-card>
|
||||
</div>
|
||||
<vn-card margin-medium-v pad-medium>
|
||||
<table class="vn-grid">
|
||||
<thead>
|
||||
<tr>
|
||||
<th translate number>Id</th>
|
||||
<th translate>Salesperson</th>
|
||||
<th translate>Date</th>
|
||||
<th translate>Hour</th>
|
||||
<th translate>Alias</th>
|
||||
<th translate>Province</th>
|
||||
<th translate>State</th>
|
||||
<th translate>Agency</th>
|
||||
<th translate>Warehouse</th>
|
||||
<th translate number>Invoice</th>
|
||||
<th translate number>Route</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="ticket in tickets"
|
||||
class="{{::$ctrl.compareDate(ticket.shipped)}} clickable"
|
||||
ui-sref="ticket.card.summary({id: {{::ticket.id}}})">
|
||||
<th number>{{::ticket.id}}</th>
|
||||
<td>{{::ticket.client.salesPerson.name | dashIfEmpty}}</td>
|
||||
<td>{{::ticket.shipped | date:'dd/MM/yyyy'}}</td>
|
||||
<td>{{::ticket.shipped | date:'HH:mm'}}</td>
|
||||
<td>
|
||||
<span
|
||||
class="link"
|
||||
ng-click="$ctrl.showDescriptor($event, ticket.clientFk)">
|
||||
{{::ticket.nickname}}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{::ticket.address.province.name}}</td>
|
||||
<td>{{::ticket.tracking.state.name}}</td>
|
||||
<td>{{::ticket.agencyMode.name}}</td>
|
||||
<td>{{::ticket.warehouse.name}}</td>
|
||||
<td number>{{::ticket.refFk | dashIfEmpty}}</td>
|
||||
<td number>{{::ticket.routeFk | dashIfEmpty}}</td>
|
||||
<td>
|
||||
<vn-table model="model">
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th field="id" number>Id</vn-th>
|
||||
<vn-th field="clientFk" number>Client Id</vn-th>
|
||||
<vn-th field="clientFk">Client</vn-th>
|
||||
<vn-th field="created">Created</vn-th>
|
||||
<vn-th field="workerFk">Worker</vn-th>
|
||||
<vn-th field="observation">Observation</vn-th>
|
||||
<vn-th field="claimResponsibleFk">Responsible</vn-th>
|
||||
<vn-th field="claimStateFk">State</vn-th>
|
||||
<vn-th></vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
<vn-tbody>
|
||||
<vn-tr ng-repeat="claim in claims">
|
||||
<vn-td number>{{::claim.id}}</vn-td>
|
||||
<vn-td number>{{::claim.client.id}}</vn-td>
|
||||
<vn-td>{{::claim.client.name}}</vn-td>
|
||||
<vn-td>{{::claim.created | date:'dd/MM/yyyy'}}</vn-td>
|
||||
<vn-td>{{::claim.worker.firstName}} {{::claim.worker.name}}</vn-td>
|
||||
<vn-td>{{::claim.observation}}</vn-td>
|
||||
<vn-td>{{::claim.claimResponsible.description}}</vn-td>
|
||||
<vn-td>{{::claim.claimState.description}}</vn-td>
|
||||
<vn-td>
|
||||
<vn-icon-button
|
||||
ng-click="$ctrl.preview($event, ticket)"
|
||||
vn-tooltip="Preview"
|
||||
icon="desktop_windows">
|
||||
</vn-icon-button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<vn-client-descriptor-popover vn-id="descriptor"></vn-client-descriptor-popover>
|
||||
</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
</vn-table>
|
||||
</vn-card>
|
||||
<vn-pagination
|
||||
model="model"
|
||||
scroll-selector="ui-view">
|
||||
</vn-pagination>
|
||||
</div>
|
||||
<vn-dialog class="dialog-summary"
|
||||
vn-id="dialog-summary-ticket">
|
||||
<tpl-body>
|
||||
<vn-ticket-summary ticket="$ctrl.ticketSelected"></vn-ticket-summary>
|
||||
</tpl-body>
|
||||
</vn-dialog>
|
||||
</div>
|
|
@ -8,51 +8,31 @@ export default class Controller {
|
|||
this.filter = {
|
||||
include: [
|
||||
{
|
||||
relation: 'address',
|
||||
scope: {
|
||||
fields: ['provinceFk'],
|
||||
include: {
|
||||
relation: 'province',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
relation: 'warehouse',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
}, {
|
||||
relation: 'agencyMode',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
}, {
|
||||
relation: 'tracking',
|
||||
scope: {
|
||||
fields: ['stateFk'],
|
||||
include: {
|
||||
relation: 'state',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
relation: 'client',
|
||||
scope: {
|
||||
fields: ['salesPersonFk'],
|
||||
include: {
|
||||
relation: 'salesPerson',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
}
|
||||
fields: ['name']
|
||||
}
|
||||
},
|
||||
{
|
||||
relation: 'worker',
|
||||
scope: {
|
||||
fields: ['firstName', 'name']
|
||||
}
|
||||
},
|
||||
{
|
||||
relation: 'claimResponsible',
|
||||
scope: {
|
||||
fields: ['description']
|
||||
}
|
||||
},
|
||||
{
|
||||
relation: 'claimState',
|
||||
scope: {
|
||||
fields: ['description']
|
||||
}
|
||||
}
|
||||
],
|
||||
order: 'shipped DESC'
|
||||
order: 'claimStateFk ASC, created DESC'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#Ordenar alfabeticamente
|
||||
|
||||
Client Id: Id cliente
|
||||
Observation: Observación
|
||||
Responsible: Responsable
|
||||
|
||||
#sections
|
||||
Claims: Reclamaciones
|
||||
|
|
|
@ -8,4 +8,4 @@ salix: []
|
|||
#route: []
|
||||
ticket: [item, client]
|
||||
order: [item, ticket]
|
||||
claim: []
|
||||
claim: [item, client]
|
||||
|
|
Loading…
Reference in New Issue