refactor(ticket.summary): change state button is now dropdown #834

Merged
joan merged 2 commits from 3432-ticket_summary_ok_button into dev 2021-12-30 10:23:35 +00:00
3 changed files with 15 additions and 13 deletions
Showing only changes of commit 48e4628c48 - Show all commits

View File

@ -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"

View File

@ -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(() => {

View File

@ -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