63 lines
2.3 KiB
HTML
63 lines
2.3 KiB
HTML
<vn-crud-model
|
|
vn-id="model"
|
|
url="greuges"
|
|
filter="::$ctrl.filter"
|
|
link="{clientFk: $ctrl.$params.id}"
|
|
limit="20"
|
|
data="greuges"
|
|
auto-load="true">
|
|
</vn-crud-model>
|
|
<mg-ajax
|
|
path="greuges/{{$ctrl.$params.id}}/sumAmount"
|
|
options="mgEdit">
|
|
</mg-ajax>
|
|
<vn-data-viewer
|
|
model="model"
|
|
class="vn-w-md">
|
|
<vn-card
|
|
ng-if="model.data.length > 0"
|
|
style="text-align: right;"
|
|
class="vn-mb-md vn-pa-lg">
|
|
<vn-label-value
|
|
label="Total"
|
|
value="{{edit.model.sumAmount | currency: 'EUR': 2}}">
|
|
</vn-label-value>
|
|
</vn-card>
|
|
<vn-card>
|
|
<vn-vertical>
|
|
<vn-table model="model" auto-load="false">
|
|
<vn-thead>
|
|
<vn-tr>
|
|
<vn-th field="shipped" default-order="DESC" expand>Date</vn-th>
|
|
<vn-th field="userFk">Created by</vn-thfield></vn-th>
|
|
<vn-th field="description">Comment</vn-th>
|
|
<vn-th field="greugeTypeFk">Type</vn-th>
|
|
<vn-th field="amount" number>Amount</vn-th>
|
|
</vn-tr>
|
|
</vn-thead>
|
|
<vn-tbody>
|
|
<vn-tr ng-repeat="greuge in greuges">
|
|
<vn-td shrink-datetime>{{::greuge.shipped | date:'dd/MM/yyyy HH:mm' }}</vn-td>
|
|
<vn-td ng-click="workerDescriptor.show($event, greuge.user.id)"
|
|
class="link">{{::greuge.user.name}}</vn-td>
|
|
<vn-td>
|
|
<span title="{{::greuge.description}}">{{::greuge.description}}</span>
|
|
</vn-td>
|
|
<vn-td>{{::greuge.greugeType.name}}</vn-td>
|
|
<vn-td number>{{::greuge.amount | currency: 'EUR': 2}}</vn-td>
|
|
</vn-tr>
|
|
</vn-tbody>
|
|
</vn-table>
|
|
</vn-vertical>
|
|
</vn-card>
|
|
</vn-data-viewer>
|
|
<vn-float-button
|
|
icon="add"
|
|
ui-sref="client.card.greuge.create"
|
|
vn-tooltip="New greuge"
|
|
vn-acl="salesAssistant,claimManager"
|
|
vn-acl-action="remove"
|
|
vn-bind="+"
|
|
fixed-bottom-right>
|
|
</vn-float-button>
|
|
<vn-worker-descriptor-popover vn-id="workerDescriptor"></vn-worker-descriptor-popover> |