Mostrar modelo ticketTracking
This commit is contained in:
parent
ff047559e3
commit
735544aed6
|
@ -14,9 +14,9 @@ Required applications.
|
|||
* Docker
|
||||
|
||||
In Visual Studio Code we use the ESLint extension. Open Visual Studio Code, press Ctrl+P and paste the following command
|
||||
´´´
|
||||
```
|
||||
ext install dbaeumer.vscode-eslint
|
||||
´´´
|
||||
```
|
||||
|
||||
You will need to install globally the following items.
|
||||
```
|
||||
|
|
|
@ -77,17 +77,25 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"url" : "/review",
|
||||
"state": "ticket.card.review",
|
||||
"component": "vn-ticket-review",
|
||||
"url" : "/tracking",
|
||||
"state": "ticket.card.tracking",
|
||||
"component": "vn-ticket-tracking",
|
||||
"params": {
|
||||
"ticket": "$ctrl.ticket"
|
||||
},
|
||||
"menu": {
|
||||
"description": "Review",
|
||||
"description": "Tracking",
|
||||
"icon": "remove_red_eye"
|
||||
}
|
||||
},
|
||||
{
|
||||
"url": "/create",
|
||||
"state": "ticket.card.tracking.create",
|
||||
"component": "vn-ticket-tracking-create",
|
||||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
},
|
||||
{
|
||||
"url" : "/sale",
|
||||
"state": "ticket.card.sale",
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
date : Fecha
|
||||
Employee : Empleado
|
||||
State: Estado
|
||||
Review: Revision
|
|
@ -1,23 +0,0 @@
|
|||
<mg-ajax path="" options="vnIndexNonAuto"></mg-ajax>
|
||||
<vn-vertical pad-medium>
|
||||
<vn-card pad-large>
|
||||
<vn-vertical>
|
||||
<vn-title>Review</vn-title>
|
||||
<vn-grid-header on-order="$ctrl.onOrder(field, order)">
|
||||
<vn-column-header vn-one pad-medium-h field="date" text="date"></vn-column-header>
|
||||
<vn-column-header vn-two pad-medium-h field="employee" text="Employee" default-order="ASC"></vn-column-header>
|
||||
<vn-column-header vn-two pad-medium-h field="state" text="State" order-locked></vn-column-header>
|
||||
</vn-grid-header>
|
||||
<vn-one class="list list-content">
|
||||
|
||||
</vn-horizontal>
|
||||
</vn-one>
|
||||
<vn-one class="text-center pad-small-v" ng-if="index.model.count === 0" translate>No results</vn-one>
|
||||
<vn-horizontal vn-one class="list list-footer"></vn-horizontal>
|
||||
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
|
||||
</vn-vertical>
|
||||
</vn-card>
|
||||
</vn-vertical>
|
||||
<a ui-sref="clientCard.ticket.create" fixed-bottom-right>
|
||||
<vn-float-button icon="add"></vn-float-button>
|
||||
</a>
|
|
@ -1,18 +0,0 @@
|
|||
import ngModule from '../module';
|
||||
|
||||
class ticketReview {
|
||||
construct($http, $scope) {
|
||||
this.$http = $http;
|
||||
this.$ = $scope;
|
||||
}
|
||||
}
|
||||
|
||||
ticketReview.$inject = ['$http', '$scope'];
|
||||
|
||||
ngModule.component('vnTicketReview', {
|
||||
template: require('./review.html'),
|
||||
controller: ticketReview,
|
||||
bindings: {
|
||||
ticket: '<'
|
||||
}
|
||||
});
|
|
@ -8,4 +8,4 @@ import './data/ticket-data';
|
|||
import './notes/ticket-observations';
|
||||
import './package/list/package-list';
|
||||
import './sale/sale';
|
||||
import './review/review';
|
||||
import './tracking/tracking';
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
Date : Fecha
|
||||
Employee : Empleado
|
||||
State: Estado
|
||||
Tracking: Revisión
|
||||
Created : Añadido
|
|
@ -0,0 +1,31 @@
|
|||
<mg-ajax path="/ticket/api/TicketTrackings/filter" options="vnIndexNonAuto"></mg-ajax>
|
||||
<vn-vertical pad-medium>
|
||||
<vn-card pad-large>
|
||||
<vn-vertical>
|
||||
<vn-title>Tracking</vn-title>
|
||||
<vn-grid-header on-order="$ctrl.onOrder(field, order)">
|
||||
<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
|
||||
vn-one class="list list-element text-center"
|
||||
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-horizontal>
|
||||
</vn-one>
|
||||
<vn-one class="text-center pad-small-v" ng-if="index.model.count === 0" translate>No results</vn-one>
|
||||
<vn-horizontal vn-one class="list list-footer"></vn-horizontal>
|
||||
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
|
||||
</vn-vertical>
|
||||
</vn-card>
|
||||
</vn-vertical>
|
||||
<a ui-sref="ticket.card.tracking.create" fixed-bottom-right>
|
||||
<vn-float-button icon="add"></vn-float-button>
|
||||
</a>
|
|
@ -0,0 +1,7 @@
|
|||
import ngModule from '../module';
|
||||
import FilterTicketList from '../filter-ticket-list';
|
||||
|
||||
ngModule.component('vnTicketTracking', {
|
||||
template: require('./tracking.html'),
|
||||
controller: FilterTicketList
|
||||
});
|
|
@ -0,0 +1,28 @@
|
|||
module.exports = Self => {
|
||||
Self.installMethod('filter', filterParams);
|
||||
|
||||
function filterParams(params) {
|
||||
return {
|
||||
where: {
|
||||
ticketFk: params.ticketFk
|
||||
},
|
||||
skip: (params.page - 1) * params.size,
|
||||
limit: params.size,
|
||||
order: params.order || 'created DESC',
|
||||
include: [
|
||||
{
|
||||
relation: "worker",
|
||||
scope: {
|
||||
fields: ["firstName", "name"]
|
||||
}
|
||||
},
|
||||
{
|
||||
relation: "state",
|
||||
scope: {
|
||||
fields: ["name"]
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
};
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = function(Self) {
|
||||
require('../methods/ticketTracking/filter')(Self);
|
||||
};
|
Loading…
Reference in New Issue