refactor(ticket.summary): change state button is now dropdown #834
|
@ -11,14 +11,14 @@
|
||||||
Ticket #{{$ctrl.summary.id}} - {{$ctrl.summary.client.name}}
|
Ticket #{{$ctrl.summary.id}} - {{$ctrl.summary.client.name}}
|
||||||
({{$ctrl.summary.client.id}}) - {{$ctrl.summary.nickname}}
|
({{$ctrl.summary.client.id}}) - {{$ctrl.summary.nickname}}
|
||||||
</span>
|
</span>
|
||||||
<vn-button
|
<vn-button-menu
|
||||||
disabled="!$ctrl.isEditable"
|
disabled="!$ctrl.isEditable"
|
||||||
class="flat"
|
class="message"
|
||||||
style="color: inherit;"
|
label="Change state"
|
||||||
label="SET OK"
|
value-field="code"
|
||||||
ng-click="$ctrl.setOkState()"
|
url="States/editableStates"
|
||||||
vn-tooltip="Change ticket state to 'Ok'">
|
on-change="$ctrl.changeState(value)">
|
||||||
</vn-button>
|
</vn-button-menu>
|
||||||
<vn-ticket-descriptor-menu
|
<vn-ticket-descriptor-menu
|
||||||
ng-if="!$ctrl.isTicketModule"
|
ng-if="!$ctrl.isTicketModule"
|
||||||
ticket-id="$ctrl.summary.id"
|
ticket-id="$ctrl.summary.id"
|
||||||
|
|
|
@ -59,10 +59,11 @@ class Controller extends Summary {
|
||||||
this.$.invoiceOutDescriptor.show(event.target, this.summary.invoiceOut.id);
|
this.$.invoiceOutDescriptor.show(event.target, this.summary.invoiceOut.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
setOkState() {
|
changeState(value) {
|
||||||
const params = {ticketFk: 'id' in this.ticket ? this.ticket.id : this.$params.id};
|
const params = {
|
||||||
|
ticketFk: 'id' in this.ticket ? this.ticket.id : this.$params.id,
|
||||||
params.code = 'OK';
|
code: value
|
||||||
|
};
|
||||||
|
|
||||||
this.$http.post(`TicketTrackings/changeState`, params)
|
this.$http.post(`TicketTrackings/changeState`, params)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
|
@ -2,4 +2,5 @@ Address phone: Tel. consignatario
|
||||||
Address mobile: Móv. consignatario
|
Address mobile: Móv. consignatario
|
||||||
Client phone: Tel. cliente
|
Client phone: Tel. cliente
|
||||||
Client mobile: Móv. cliente
|
Client mobile: Móv. cliente
|
||||||
Go to the ticket: Ir al ticket
|
Go to the ticket: Ir al ticket
|
||||||
|
Change state: Cambiar estado
|
Loading…
Reference in New Issue