2021-10-23 12:26:42 +00:00
|
|
|
<!-- <vn-auto-search
|
2020-03-13 19:33:12 +00:00
|
|
|
model="model">
|
2021-10-23 12:26:42 +00:00
|
|
|
</vn-auto-search> -->
|
|
|
|
<vn-crud-model auto-load="true"
|
|
|
|
vn-id="model"
|
|
|
|
url="Tickets"
|
|
|
|
limit="20"
|
|
|
|
order="id DESC">
|
|
|
|
</vn-crud-model>
|
2021-10-22 13:01:54 +00:00
|
|
|
<vn-card>
|
|
|
|
<!-- To access table component should be a nested component -->
|
2021-10-26 15:16:01 +00:00
|
|
|
<smart-table
|
|
|
|
model="model"
|
2021-10-27 15:11:33 +00:00
|
|
|
view-config-id="ticketIndex"
|
2021-10-26 15:16:01 +00:00
|
|
|
auto-save="true"
|
|
|
|
expr-builder="$ctrl.exprBuilder(param, value)"
|
2021-10-27 15:11:33 +00:00
|
|
|
default-new-data="$ctrl.defaultNewData()">
|
2021-10-23 12:26:42 +00:00
|
|
|
<slot-actions>
|
2021-10-25 15:18:57 +00:00
|
|
|
<vn-button icon="info"
|
|
|
|
ng-click="$ctrl.test()"
|
|
|
|
vn-tooltip="Info">
|
|
|
|
</vn-button>
|
|
|
|
|
|
|
|
<div class="button-group">
|
|
|
|
<vn-button icon="info"
|
|
|
|
ng-click="$ctrl.test()"
|
|
|
|
vn-tooltip="Info">
|
|
|
|
</vn-button>
|
|
|
|
<vn-button icon="info"
|
|
|
|
ng-click="$ctrl.test()"
|
|
|
|
vn-tooltip="Info">
|
|
|
|
</vn-button>
|
|
|
|
</div>
|
2021-10-23 12:26:42 +00:00
|
|
|
</slot-actions>
|
|
|
|
<slot-table>
|
|
|
|
<table class="vn-table">
|
2021-10-22 13:01:54 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2021-10-23 12:26:42 +00:00
|
|
|
<th shrink>
|
|
|
|
<vn-multi-check
|
2021-10-25 15:18:57 +00:00
|
|
|
model="model"
|
|
|
|
check-field="$checked"> <!-- Change $checked as default prop -->
|
2021-10-23 12:26:42 +00:00
|
|
|
</vn-multi-check>
|
|
|
|
</th>
|
2021-10-25 12:20:17 +00:00
|
|
|
<th field="id">
|
|
|
|
<span translate>#ID</span>
|
|
|
|
</th>
|
|
|
|
<th field="nickname">
|
|
|
|
<span translate>Nickname</span>
|
|
|
|
</th>
|
2021-10-26 15:16:01 +00:00
|
|
|
<th>
|
|
|
|
<span translate>Pepinillos</span>
|
|
|
|
</th>
|
2021-10-22 13:01:54 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
2021-10-23 12:26:42 +00:00
|
|
|
<tbody>
|
|
|
|
<tr ng-repeat="ticket in model.data | orderBy:'!!id'"
|
2021-10-25 15:18:57 +00:00
|
|
|
ng-class="{'new-row': ticket.$isNew, 'changed-row': ticket.$oldData}"
|
|
|
|
vn-anchor="::{
|
|
|
|
state: 'ticket.card.summary',
|
|
|
|
params: {id: ticket.id}
|
|
|
|
}">
|
2021-10-23 12:26:42 +00:00
|
|
|
<td>
|
|
|
|
<vn-check
|
2021-10-25 15:18:57 +00:00
|
|
|
ng-model="ticket.$checked"
|
2021-10-23 12:26:42 +00:00
|
|
|
vn-click-stop>
|
|
|
|
</vn-check>
|
|
|
|
</td>
|
2021-10-22 13:01:54 +00:00
|
|
|
<td>{{::ticket.id}}</td>
|
2021-10-23 12:26:42 +00:00
|
|
|
<td>{{::ticket.nickname}}</td>
|
2021-10-26 15:16:01 +00:00
|
|
|
<td><vn-textfield ng-model="::ticket.nickname"/></td>
|
2021-10-22 13:01:54 +00:00
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2021-10-23 12:26:42 +00:00
|
|
|
</slot-table>
|
|
|
|
</smart-table>
|
2021-10-22 13:01:54 +00:00
|
|
|
</vn-card>
|
2020-03-09 10:50:23 +00:00
|
|
|
<div fixed-bottom-right>
|
|
|
|
<vn-vertical style="align-items: center;">
|
2020-06-16 10:36:34 +00:00
|
|
|
<vn-button class="round sm vn-mb-sm"
|
|
|
|
icon="print"
|
|
|
|
ng-show="$ctrl.totalChecked > 0"
|
2020-06-17 13:38:37 +00:00
|
|
|
ng-click="$ctrl.setDelivered()"
|
|
|
|
vn-tooltip="Set as delivered and open delivery note(s)"
|
2020-06-16 10:36:34 +00:00
|
|
|
tooltip-position="left">
|
|
|
|
</vn-button>
|
2020-03-10 13:28:50 +00:00
|
|
|
<vn-button class="round sm vn-mb-sm"
|
2020-03-09 10:50:23 +00:00
|
|
|
icon="icon-recovery"
|
|
|
|
ng-show="$ctrl.totalChecked > 0"
|
|
|
|
ng-click="$ctrl.openBalanceDialog()"
|
|
|
|
vn-tooltip="Payment on account..."
|
|
|
|
tooltip-position="left">
|
|
|
|
</vn-button>
|
2021-06-24 11:33:51 +00:00
|
|
|
<vn-button class="round sm vn-mb-sm"
|
|
|
|
icon="icon-invoices"
|
2021-07-01 11:31:04 +00:00
|
|
|
ng-click="makeInvoiceConfirmation.show()"
|
2021-06-24 11:33:51 +00:00
|
|
|
ng-show="$ctrl.totalChecked > 0"
|
|
|
|
vn-tooltip="Make invoice..."
|
|
|
|
tooltip-position="left"
|
|
|
|
vn-acl="invoicing"
|
|
|
|
vn-acl-action="remove">
|
|
|
|
</vn-button>
|
2021-06-08 15:30:00 +00:00
|
|
|
<a ui-sref="ticket.create($ctrl.clientParams())" vn-bind="+">
|
2020-03-09 10:50:23 +00:00
|
|
|
<vn-button class="round md vn-mb-sm"
|
|
|
|
icon="add"
|
|
|
|
vn-tooltip="New ticket"
|
|
|
|
tooltip-position="left">
|
|
|
|
</vn-button>
|
|
|
|
</a>
|
|
|
|
</vn-vertical>
|
|
|
|
</div>
|
2019-10-26 23:30:01 +00:00
|
|
|
<vn-popup vn-id="summary">
|
2020-04-25 09:50:04 +00:00
|
|
|
<vn-ticket-summary
|
2020-09-24 13:00:00 +00:00
|
|
|
ticket="$ctrl.selectedTicket"
|
|
|
|
model="model">
|
2020-04-25 09:50:04 +00:00
|
|
|
</vn-ticket-summary>
|
2019-10-26 23:30:01 +00:00
|
|
|
</vn-popup>
|
2019-04-25 05:57:26 +00:00
|
|
|
<vn-client-descriptor-popover
|
|
|
|
vn-id="clientDescriptor">
|
2019-02-15 11:39:21 +00:00
|
|
|
</vn-client-descriptor-popover>
|
|
|
|
<vn-worker-descriptor-popover
|
2020-04-25 09:50:04 +00:00
|
|
|
vn-id="workerDescriptor">
|
2019-04-25 05:57:26 +00:00
|
|
|
</vn-worker-descriptor-popover>
|
2020-07-30 10:51:19 +00:00
|
|
|
<vn-zone-descriptor-popover
|
|
|
|
vn-id="zoneDescriptor">
|
|
|
|
</vn-zone-descriptor-popover>
|
2019-04-25 05:57:26 +00:00
|
|
|
<vn-client-balance-create
|
|
|
|
vn-id="balanceCreateDialog">
|
2019-09-05 11:06:40 +00:00
|
|
|
</vn-client-balance-create>
|
2020-09-14 11:11:53 +00:00
|
|
|
<vn-invoice-out-descriptor-popover
|
|
|
|
vn-id="invoiceOutDescriptor">
|
|
|
|
</vn-invoice-out-descriptor-popover>
|
2021-06-24 11:33:51 +00:00
|
|
|
|
|
|
|
<!-- Make invoice confirmation dialog -->
|
|
|
|
<vn-confirm
|
|
|
|
vn-id="makeInvoiceConfirmation"
|
|
|
|
on-accept="$ctrl.makeInvoice()"
|
2021-06-30 14:10:26 +00:00
|
|
|
question="{{$ctrl.confirmationMessage}}"
|
|
|
|
message="Invoice selected tickets">
|
2021-06-24 11:33:51 +00:00
|
|
|
</vn-confirm>
|