salix/modules/client/front/consumption/index.html

98 lines
3.7 KiB
HTML
Raw Permalink Normal View History

2020-06-12 07:18:19 +00:00
<vn-crud-model vn-id="model"
url="Clients/consumption"
link="{clientFk: $ctrl.$params.id}"
filter="::$ctrl.filter"
2020-07-09 10:49:07 +00:00
limit="20"
2020-06-12 07:18:19 +00:00
user-params="::$ctrl.filterParams"
2020-06-10 11:35:41 +00:00
data="sales"
order="itemTypeFk, itemName, itemSize, description">
2020-06-10 11:35:41 +00:00
</vn-crud-model>
2020-06-12 07:18:19 +00:00
<vn-portal slot="topbar">
<vn-searchbar
panel="vn-consumption-search-panel"
suggested-filter="$ctrl.filterParams"
info="Search by item id or name"
model="model"
auto-state="false">
</vn-searchbar>
</vn-portal>
<vn-data-viewer model="model">
2020-06-10 11:35:41 +00:00
<vn-card class="vn-pa-lg vn-w-lg">
2020-06-12 07:18:19 +00:00
<section class="header">
<vn-tool-bar class="vn-mb-md">
<vn-button disabled="!model.userParams.from || !model.userParams.to"
icon="picture_as_pdf"
ng-click="$ctrl.showReport()"
vn-tooltip="Open as PDF">
</vn-button>
<vn-button disabled="!model.userParams.from || !model.userParams.to"
icon="email"
ng-click="confirm.show()"
vn-tooltip="Send to email">
</vn-button>
<vn-check
label="Group by item"
on-change="$ctrl.changeGrouped(value)">
</vn-check>
</vn-tool-bar>
</section>
2020-06-10 11:35:41 +00:00
<vn-table model="model">
<vn-thead>
<vn-tr>
2020-06-12 07:18:19 +00:00
<vn-th field="itemFk" number>Item</vn-th>
<vn-th field="ticketFk" number>Ticket</vn-th>
<vn-th field="shipped" expand>Fecha</vn-th>
<vn-th field="description" expand>Description</vn-th>
2020-06-12 07:18:19 +00:00
<vn-th field="quantity" number>Quantity</vn-th>
2020-06-10 11:35:41 +00:00
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr
2020-06-12 07:18:19 +00:00
ng-repeat="sale in sales">
2020-06-10 11:35:41 +00:00
<vn-td number>
2020-06-12 07:18:19 +00:00
<span
ng-click="itemDescriptor.show($event, sale.itemFk)"
class="link">
{{::sale.itemFk}}
2020-06-10 11:35:41 +00:00
</span>
</vn-td>
2020-06-12 07:18:19 +00:00
<vn-td number>
<span
ng-click="ticketDescriptor.show($event, sale.ticketFk)"
2020-06-10 11:35:41 +00:00
class="link">
2020-06-12 07:18:19 +00:00
{{::sale.ticketFk}}
2020-06-10 11:35:41 +00:00
</span>
</vn-td>
<vn-td expand>{{::sale.shipped | date: 'dd/MM/yyyy'}}</vn-td>
2021-01-28 14:10:47 +00:00
<vn-td vn-fetched-tags wide>
<div>
<vn-one title="{{::sale.concept}}">{{::sale.concept}}</vn-one>
<vn-one ng-if="::sale.subName">
<h3 title="{{::sale.subName}}">{{::sale.subName}}</h3>
</vn-one>
</div>
2020-06-12 07:18:19 +00:00
<vn-fetched-tags
max-length="6"
item="::sale"
2021-01-28 14:10:47 +00:00
tabindex="-1">
2020-06-12 07:18:19 +00:00
</vn-fetched-tags>
2020-06-10 11:35:41 +00:00
</vn-td>
<vn-td number>{{::sale.quantity | dashIfEmpty}}</vn-td>
2020-06-10 11:35:41 +00:00
</vn-tbody>
</vn-table>
</vn-card>
2020-06-12 07:18:19 +00:00
</vn-data-viewer>
<vn-item-descriptor-popover
vn-id="item-descriptor"
warehouse-fk="$ctrl.vnConfig.warehouseFk">
2020-06-12 07:18:19 +00:00
</vn-item-descriptor-popover>
2020-06-10 11:35:41 +00:00
<vn-ticket-descriptor-popover
vn-id="ticket-descriptor">
</vn-ticket-descriptor-popover>
2020-06-12 07:18:19 +00:00
<vn-confirm
vn-id="confirm"
question="Please, confirm"
message="The consumption report will be sent"
on-accept="$ctrl.sendEmail()">
</vn-confirm>