Now you can change the shipped hour of a ticket

This commit is contained in:
Gerard 2019-03-26 12:25:06 +01:00
parent f037fd8997
commit eaec968aa4
5 changed files with 24 additions and 6 deletions

View File

@ -40,7 +40,7 @@ Worker: Trabajador
Available: Disponible
Create: Crear
Client card: Ficha del cliente
Shipped: F. envio
Shipped: F. envío
stems: Tallos
Compression: Compresión
Density: Densidad

View File

@ -161,4 +161,20 @@
question="Pickup order"
message="Do you want to send it directly?">
<tpl-buttons>asd</tpl-buttons>
</vn-confirm>
</vn-confirm>
<vn-dialog
vn-id="changeShippedDialog"
on-response="$ctrl.changeShipped(response)">
<tpl-body>
<div>
<h5 style="text-align: center">
<span translate>Change shipped hour</span>
</h5>
<vn-input-time vn-one model="$ctrl.ticket.shipped" label="Shipped hour"></vn-input-time>
</div>
</tpl-body>
<tpl-buttons>
<input type="button" response="CANCEL" translate-attr="{value: 'Cancel'}"/>
<button response="ACCEPT" translate>Save</button>
</tpl-buttons>
</vn-dialog>

View File

@ -13,7 +13,7 @@ class Controller {
{callback: this.showRemoveStowaway, name: 'Remove stowaway', show: () => this.shouldShowRemoveStowaway()},
{callback: this.showDeliveryNote, name: 'Show Delivery Note', show: true},
{callback: this.showDeleteTicketDialog, name: 'Delete ticket', show: true},
/* callback: this.showChangeShipped, name: 'Change shipped hour', show: true} */
{callback: this.showChangeShipped, name: 'Change shipped hour', show: true}
];
}
@ -31,8 +31,8 @@ class Controller {
if (response === 'ACCEPT') {
let params = {shipped: this.newShipped};
this.$http.patch(`/ticket/api/Tickets/${this.ticket.id}/`, params).then(() => {
this.$state.go('ticket.index');
this.vnApp.showSuccess(this.$translate.instant('Shipped hour updated'));
this.cardReload();
});
}
}

View File

@ -7,4 +7,6 @@ Stowaways of the ticket: Polizones del ticket
Add stowaway: Añadir polizón
Remove stowaway: Borrar polizón
Are you sure you want to delete this stowaway?: ¿Estas seguro de que quieres borrar este polizón?
Show Delivery Note: Ver albarán
Show Delivery Note: Ver albarán
Change shipped hour: Cambiar hora de envío
Shipped hour: Hora de envío

View File

@ -41,7 +41,7 @@ Quantity: Cantidad
Remove lines: Borrar lineas
Route: Ruta
Shipment: Salida
Shipped: F. envio
Shipped: F. envío
Some fields are invalid: Algunos campos no son válidos
State: Estado
Tickets: Tickets