salix/modules/ticket/front/index/index.html

132 lines
4.5 KiB
HTML
Raw Normal View History

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>
<vn-card>
<!-- To access table component should be a nested component -->
2021-10-23 12:26:42 +00:00
<smart-table model="model" auto-save="true">
<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">
<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>
</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>
<td>{{::ticket.id}}</td>
2021-10-23 12:26:42 +00:00
<td>{{::ticket.nickname}}</td>
<td><vn-textfield ng-model="::ticket.nickname"></td>
</tr>
</tbody>
</table>
2021-10-23 12:26:42 +00:00
</slot-table>
</smart-table>
</vn-card>
<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"
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"
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>
<a ui-sref="ticket.create($ctrl.clientParams())" vn-bind="+">
<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
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">
</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>
<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>