Tarea #170 Mostrar modelo ticketTracking
This commit is contained in:
parent
56f774a07f
commit
4d1609c445
|
@ -107,8 +107,14 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"url" : "/tracking",
|
||||
"url": "/tracking",
|
||||
"state": "ticket.card.tracking",
|
||||
"abstract": true,
|
||||
"component": "ui-view"
|
||||
},
|
||||
{
|
||||
"url" : "/index",
|
||||
"state": "ticket.card.tracking.index",
|
||||
"component": "vn-ticket-tracking",
|
||||
"params": {
|
||||
"ticket": "$ctrl.ticket"
|
||||
|
@ -118,6 +124,14 @@
|
|||
"icon": "remove_red_eye"
|
||||
}
|
||||
},
|
||||
{
|
||||
"url": "/edit",
|
||||
"state": "ticket.card.tracking.edit",
|
||||
"component": "vn-ticket-tracking-edit",
|
||||
"params": {
|
||||
"ticket": "$ctrl.ticket"
|
||||
}
|
||||
},
|
||||
{
|
||||
"url": "/create",
|
||||
"state": "ticket.card.tracking.create",
|
||||
|
|
|
@ -10,6 +10,7 @@ import './expedition/ticket-expedition';
|
|||
import './volume/ticket-volume';
|
||||
import './package/package';
|
||||
import './sale/sale';
|
||||
import './tracking/tracking';
|
||||
import './tracking/index';
|
||||
import './tracking/edit/edit';
|
||||
import './fetched-tags/fetched-tags';
|
||||
import './sale-checked/sale-checked';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<mg-ajax path="/ticket/api/TicketTrackings/filter" options="vnIndexNonAuto"></mg-ajax>
|
||||
<vn-vertical pad-medium>
|
||||
<vn-vertical>
|
||||
<vn-card pad-large>
|
||||
<vn-vertical>
|
||||
<vn-title>Tracking</vn-title>
|
||||
|
@ -7,7 +7,6 @@
|
|||
<vn-column-header vn-one pad-medium-h field="state.name" text="State"></vn-column-header>
|
||||
<vn-column-header vn-two pad-medium-h field="employee" text="Employee"></vn-column-header>
|
||||
<vn-column-header vn-two pad-medium-h field="created" text="Created" default-order="ASC"></vn-column-header>
|
||||
|
||||
</vn-grid-header>
|
||||
<vn-one class="list list-content">
|
||||
<vn-horizontal
|
||||
|
@ -15,9 +14,8 @@
|
|||
pad-small-bottom
|
||||
ng-repeat="ticket in index.model.instances track by ticket.id">
|
||||
<vn-one pad-medium-h>{{::ticket.state.name}}</vn-one>
|
||||
<vn-two pad-medium-h>{{::ticket.worker.firstName}} {{::ticket.worker.name}}</vn-two>
|
||||
<vn-two pad-medium-h>{{::ticket.created | date:'dd/MM/yyyy HH:mm' }}</vn-two>
|
||||
|
||||
<vn-two pad-medium-h>{{::ticket.worker.firstName}} {{ticket.worker.name}}</vn-two>
|
||||
<vn-two pad-medium-h>{{::ticket.created | date:'dd/MM/yyyy HH:mm'}}</vn-two>
|
||||
</vn-horizontal>
|
||||
</vn-one>
|
||||
<vn-one class="text-center pad-small-v" ng-if="index.model.count === 0" translate>No results</vn-one>
|
||||
|
@ -26,6 +24,6 @@
|
|||
</vn-vertical>
|
||||
</vn-card>
|
||||
</vn-vertical>
|
||||
<a ui-sref="ticket.card.tracking.create" fixed-bottom-right>
|
||||
<a ui-sref="ticket.card.tracking.edit" fixed-bottom-right>
|
||||
<vn-float-button icon="add"></vn-float-button>
|
||||
</a>
|
|
@ -2,6 +2,6 @@ import ngModule from '../module';
|
|||
import FilterTicketList from '../filter-ticket-list';
|
||||
|
||||
ngModule.component('vnTicketTracking', {
|
||||
template: require('./tracking.html'),
|
||||
template: require('./index.html'),
|
||||
controller: FilterTicketList
|
||||
});
|
|
@ -1,5 +0,0 @@
|
|||
Date : Fecha
|
||||
Employee : Empleado
|
||||
State: Estado
|
||||
Tracking: Revisión
|
||||
Created : Añadido
|
|
@ -1,3 +1,14 @@
|
|||
module.exports = function(Self) {
|
||||
require('../methods/ticketTracking/filter')(Self);
|
||||
|
||||
Self.observe('before save', function(ctx, next) {
|
||||
let token = ctx.options.accessToken;
|
||||
let userId = token && token.userId;
|
||||
|
||||
Self.app.models.Worker.findOne({where: {userFk: userId}}, (err, user) => {
|
||||
if (err) return next(err);
|
||||
ctx.instance.workerFk = user.id;
|
||||
next();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "ticketTracking"
|
||||
"table": "ticketTracking",
|
||||
"database": "vn"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
|
|
Loading…
Reference in New Issue