132 lines
4.5 KiB
HTML
132 lines
4.5 KiB
HTML
<!-- <vn-auto-search
|
|
model="model">
|
|
</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 -->
|
|
<smart-table model="model" auto-save="true">
|
|
<slot-actions>
|
|
<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>
|
|
</slot-actions>
|
|
<slot-table>
|
|
<table class="vn-table">
|
|
<thead>
|
|
<tr>
|
|
<th shrink>
|
|
<vn-multi-check
|
|
model="model"
|
|
check-field="$checked"> <!-- Change $checked as default prop -->
|
|
</vn-multi-check>
|
|
</th>
|
|
<th field="id">
|
|
<span translate>#ID</span>
|
|
</th>
|
|
<th field="nickname">
|
|
<span translate>Nickname</span>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr ng-repeat="ticket in model.data | orderBy:'!!id'"
|
|
ng-class="{'new-row': ticket.$isNew, 'changed-row': ticket.$oldData}"
|
|
vn-anchor="::{
|
|
state: 'ticket.card.summary',
|
|
params: {id: ticket.id}
|
|
}">
|
|
<td>
|
|
<vn-check
|
|
ng-model="ticket.$checked"
|
|
vn-click-stop>
|
|
</vn-check>
|
|
</td>
|
|
<td>{{::ticket.id}}</td>
|
|
<td>{{::ticket.nickname}}</td>
|
|
<td><vn-textfield ng-model="::ticket.nickname"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</slot-table>
|
|
</smart-table>
|
|
</vn-card>
|
|
<div fixed-bottom-right>
|
|
<vn-vertical style="align-items: center;">
|
|
<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)"
|
|
tooltip-position="left">
|
|
</vn-button>
|
|
<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>
|
|
<vn-button class="round sm vn-mb-sm"
|
|
icon="icon-invoices"
|
|
ng-click="makeInvoiceConfirmation.show()"
|
|
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>
|
|
<vn-popup vn-id="summary">
|
|
<vn-ticket-summary
|
|
ticket="$ctrl.selectedTicket"
|
|
model="model">
|
|
</vn-ticket-summary>
|
|
</vn-popup>
|
|
<vn-client-descriptor-popover
|
|
vn-id="clientDescriptor">
|
|
</vn-client-descriptor-popover>
|
|
<vn-worker-descriptor-popover
|
|
vn-id="workerDescriptor">
|
|
</vn-worker-descriptor-popover>
|
|
<vn-zone-descriptor-popover
|
|
vn-id="zoneDescriptor">
|
|
</vn-zone-descriptor-popover>
|
|
<vn-client-balance-create
|
|
vn-id="balanceCreateDialog">
|
|
</vn-client-balance-create>
|
|
<vn-invoice-out-descriptor-popover
|
|
vn-id="invoiceOutDescriptor">
|
|
</vn-invoice-out-descriptor-popover>
|
|
|
|
<!-- Make invoice confirmation dialog -->
|
|
<vn-confirm
|
|
vn-id="makeInvoiceConfirmation"
|
|
on-accept="$ctrl.makeInvoice()"
|
|
question="{{$ctrl.confirmationMessage}}"
|
|
message="Invoice selected tickets">
|
|
</vn-confirm> |