diff --git a/client/ticket/routes.json b/client/ticket/routes.json
index 22ffc2a945..8f88cea35f 100644
--- a/client/ticket/routes.json
+++ b/client/ticket/routes.json
@@ -47,7 +47,7 @@
}
},
{
- "url": "/observations",
+ "url": "/observation",
"state": "ticket.card.observations",
"component": "vn-ticket-observations",
"params": {
@@ -58,6 +58,30 @@
"icon": "insert_drive_file"
}
},
+ {
+ "url": "/volume",
+ "state": "ticket.card.volume",
+ "component": "vn-ticket-volume",
+ "params": {
+ "ticket": "$ctrl.ticket"
+ },
+ "menu": {
+ "description": "Volume",
+ "icon": "icon-volume"
+ }
+ },
+ {
+ "url": "/expedition",
+ "state": "ticket.card.expedition",
+ "component": "vn-ticket-expedition",
+ "params": {
+ "ticket": "$ctrl.ticket"
+ },
+ "menu": {
+ "description": "Expedition",
+ "icon": "icon-volum"
+ }
+ },
{
"url" : "/package",
"abstract": true,
diff --git a/client/ticket/src/expedition/ticket-expedition.html b/client/ticket/src/expedition/ticket-expedition.html
new file mode 100644
index 0000000000..c7be8da691
--- /dev/null
+++ b/client/ticket/src/expedition/ticket-expedition.html
@@ -0,0 +1,42 @@
+
+
+
+
+ Expedition
+
+
+
+
+
+
+
+
+
+
+
+
+
+ delete
+
+ {{expedition.itemFk}}
+ {{expedition.item.name}}
+ {{expedition.package.name}}
+ {{expedition.counter}}
+ {{expedition.checked}}
+ {{expedition.worker.firstName}} {{expedition.worker.name}}
+ {{expedition.created | date:'dd/MM/yyyy'}}
+
+
+ No results
+
+
+
+
+
diff --git a/client/ticket/src/expedition/ticket-expedition.js b/client/ticket/src/expedition/ticket-expedition.js
new file mode 100644
index 0000000000..244c3cb046
--- /dev/null
+++ b/client/ticket/src/expedition/ticket-expedition.js
@@ -0,0 +1,22 @@
+import ngModule from '../module';
+import FilterTicketList from '../filter-ticket-list';
+
+class Controller extends FilterTicketList {
+ constructor($scope, $timeout, $stateParams, $http) {
+ super($scope, $timeout, $stateParams);
+ this.params = $stateParams;
+ this.$http = $http;
+ }
+ deleteExpedition(expedition) {
+ this.$http.delete(`/ticket/api/Expeditions/${expedition.id}`, this.params).then(
+ () => this.$.index.accept()
+ );
+ }
+}
+
+Controller.$inject = ['$scope', '$timeout', '$state', '$http'];
+
+ngModule.component('vnTicketExpedition', {
+ template: require('./ticket-expedition.html'),
+ controller: Controller
+});
diff --git a/client/ticket/src/locale/es.yml b/client/ticket/src/locale/es.yml
index 0c3795dbd4..5f40255880 100644
--- a/client/ticket/src/locale/es.yml
+++ b/client/ticket/src/locale/es.yml
@@ -3,6 +3,14 @@ Basic data: Datos básicos
Description: Descripción
Discount: Descuento
Item: Articulo
+Delete: Borrar
+delete expedition: borrar expedición
+Expedition: Expedición
+Name: Nombre
+Package type: Tipo de porte
+Counter: Contador
+Checked: Comprobado
+Worker: Trabajador
Notes: Notas
Observation type: Tipo de observación
Price: Precio
diff --git a/client/ticket/src/ticket.js b/client/ticket/src/ticket.js
index a1c8fd9d2c..5b70eaa069 100644
--- a/client/ticket/src/ticket.js
+++ b/client/ticket/src/ticket.js
@@ -5,7 +5,9 @@ import './create/ticket-create';
import './card/ticket-card';
import './summary/ticket-summary';
import './data/ticket-data';
-import './notes/ticket-observations';
+import './note/ticket-observation';
+import './expedition/ticket-expedition';
+import './volume/ticket-volume';
import './package/list/package-list';
import './sale/sale';
import './tracking/tracking';
diff --git a/services/ticket/common/methods/expedition/filter.js b/services/ticket/common/methods/expedition/filter.js
new file mode 100644
index 0000000000..6d74c3dd85
--- /dev/null
+++ b/services/ticket/common/methods/expedition/filter.js
@@ -0,0 +1,26 @@
+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: 'item',
+ scope: {fields: ['name']}
+ },
+ {
+ relation: 'worker',
+ scope: {fields: ['firstName', 'name']}
+ },
+ {
+ relation: 'package',
+ scope: {fields: ['name']}
+ }]
+ };
+ }
+};
diff --git a/services/ticket/common/models/expedition.js b/services/ticket/common/models/expedition.js
new file mode 100644
index 0000000000..391359a3aa
--- /dev/null
+++ b/services/ticket/common/models/expedition.js
@@ -0,0 +1,3 @@
+module.exports = function(Self) {
+ require('../methods/expedition/filter.js')(Self);
+};