187 lines
6.6 KiB
HTML
187 lines
6.6 KiB
HTML
<vn-crud-model
|
|
vn-id="model"
|
|
url="Defaulters/filter"
|
|
filter="::$ctrl.filter"
|
|
limit="20"
|
|
data="defaulters"
|
|
auto-load="true">
|
|
</vn-crud-model>
|
|
<vn-portal slot="topbar">
|
|
<vn-searchbar
|
|
vn-focus
|
|
placeholder="Search client"
|
|
info="Search client by id or name"
|
|
auto-state="false"
|
|
model="model">
|
|
</vn-searchbar>
|
|
</vn-portal>
|
|
<vn-data-viewer
|
|
model="model"
|
|
class="vn-w-xl">
|
|
<vn-card>
|
|
<vn-tool-bar>
|
|
<div class="vn-pa-md">
|
|
<div class="totalBox" style="text-align: center;">
|
|
<h6 translate>Total</h6>
|
|
<vn-label-value
|
|
label="Balance due"
|
|
value="{{$ctrl.balanceDueTotal}} €">
|
|
</vn-label-value>
|
|
</div>
|
|
</div>
|
|
<div class="vn-pa-md">
|
|
<vn-button
|
|
ng-show="$ctrl.checked.length > 0"
|
|
ng-click="notesDialog.show()"
|
|
name="notesDialog"
|
|
vn-tooltip="Add observation"
|
|
icon="icon-notes">
|
|
</vn-button>
|
|
</div>
|
|
</vn-tool-bar>
|
|
<vn-table model="model">
|
|
<vn-thead>
|
|
<vn-tr>
|
|
<vn-th shrink>
|
|
<vn-multi-check
|
|
model="model">
|
|
</vn-multi-check>
|
|
</vn-th>
|
|
<vn-th field="clientName">Client</vn-th>
|
|
<vn-th field="salesPersonFk">Comercial</vn-th>
|
|
<vn-th
|
|
field="amount"
|
|
vn-tooltip="Balance due"
|
|
number>
|
|
Balance D.
|
|
</vn-th>
|
|
<vn-th
|
|
vn-tooltip="Worker who made the last observation"
|
|
shrink>
|
|
Author
|
|
</vn-th>
|
|
<vn-th expand>Last observation</vn-th>
|
|
<vn-th
|
|
vn-tooltip="Credit insurance"
|
|
number>
|
|
Credit I.
|
|
</vn-th>
|
|
<vn-th shrink-datetime>From</vn-th>
|
|
</vn-tr>
|
|
</vn-thead>
|
|
<vn-tbody>
|
|
<vn-tr ng-repeat="defaulter in defaulters">
|
|
<vn-td shrink>
|
|
<vn-check
|
|
ng-model="defaulter.checked"
|
|
vn-click-stop>
|
|
</vn-check>
|
|
</vn-td>
|
|
<vn-td>
|
|
<span
|
|
vn-click-stop="clientDescriptor.show($event, defaulter.clientFk)"
|
|
title ="{{::defaulter.clientName}}"
|
|
class="link">
|
|
{{::defaulter.clientName}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td>
|
|
<span
|
|
title="{{::defaulter.salesPersonName}}"
|
|
vn-click-stop="workerDescriptor.show($event, defaulter.salesPersonFk)"
|
|
class="link" >
|
|
{{::defaulter.salesPersonName | dashIfEmpty}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td number>{{::defaulter.amount}}</vn-td>
|
|
<vn-td shrink>
|
|
<span
|
|
title="{{::defaulter.workerName}}"
|
|
vn-click-stop="workerDescriptor.show($event, defaulter.workerFk)"
|
|
class="link" >
|
|
{{::defaulter.workerName | dashIfEmpty}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td expand>
|
|
<vn-textarea
|
|
vn-three
|
|
disabled="true"
|
|
label="Observation"
|
|
ng-model="defaulter.observation">
|
|
</vn-textarea>
|
|
</vn-td>
|
|
<vn-td number>{{::defaulter.creditInsurance}}</vn-td>
|
|
<vn-td shrink-datetime>{{::defaulter.defaulterSinced | date: 'dd/MM/yyyy'}}</vn-td>
|
|
</vn-tr>
|
|
</vn-tbody>
|
|
</vn-table>
|
|
</vn-card>
|
|
</vn-data-viewer>
|
|
<vn-client-descriptor-popover
|
|
vn-id="clientDescriptor">
|
|
</vn-client-descriptor-popover>
|
|
<vn-worker-descriptor-popover
|
|
vn-id="workerDescriptor">
|
|
</vn-worker-descriptor-popover>
|
|
<vn-popup vn-id="dialog-summary-client">
|
|
<vn-client-summary
|
|
client="$ctrl.clientSelected">
|
|
</vn-client-summary>
|
|
</vn-popup>
|
|
|
|
<!--Context menu-->
|
|
<vn-contextmenu vn-id="contextmenu" targets="['vn-data-viewer']" model="model"
|
|
expr-builder="$ctrl.exprBuilder(param, value)">
|
|
<slot-menu>
|
|
<vn-item translate
|
|
ng-if="contextmenu.isFilterAllowed()"
|
|
ng-click="contextmenu.filterBySelection()">
|
|
Filter by selection
|
|
</vn-item>
|
|
<vn-item translate
|
|
ng-if="contextmenu.isFilterAllowed()"
|
|
ng-click="contextmenu.excludeSelection()">
|
|
Exclude selection
|
|
</vn-item>
|
|
<vn-item translate
|
|
ng-if="contextmenu.isFilterAllowed()"
|
|
ng-click="contextmenu.removeFilter()">
|
|
Remove filter
|
|
</vn-item>
|
|
<vn-item translate
|
|
ng-click="contextmenu.removeAllFilters()">
|
|
Remove all filters
|
|
</vn-item>
|
|
<vn-item translate
|
|
ng-if="contextmenu.isActionAllowed()"
|
|
ng-click="contextmenu.copyValue()">
|
|
Copy value
|
|
</vn-item>
|
|
</slot-menu>
|
|
</vn-contextmenu>
|
|
|
|
<!-- Dialog of add notes button -->
|
|
<vn-dialog
|
|
vn-id="notesDialog"
|
|
on-accept="$ctrl.onResponse()">
|
|
<tpl-body>
|
|
<section class="SMSDialog">
|
|
<h5 class="vn-py-sm">{{$ctrl.$t('Add observation to all selected clients', {total: $ctrl.checked.length})}}</h5>
|
|
<vn-horizontal>
|
|
<vn-textarea vn-one
|
|
vn-id="message"
|
|
label="Message"
|
|
ng-model="$ctrl.defaulter.observation"
|
|
rows="3"
|
|
required="true"
|
|
rule>
|
|
</vn-textarea>
|
|
</vn-horizontal>
|
|
</section>
|
|
</tpl-body>
|
|
<tpl-buttons>
|
|
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
|
<button response="accept" translate>Save</button>
|
|
</tpl-buttons>
|
|
</vn-dialog>
|