feat(client_defaulter): move tool-bar up , add column author
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2022-01-31 08:17:15 +01:00
parent 8936e02cd4
commit 746cbede4b
5 changed files with 45 additions and 30 deletions

View File

@ -308,7 +308,7 @@ export default {
anyClient: 'vn-client-defaulter-index vn-tbody > vn-tr',
firstClientName: 'vn-client-defaulter-index vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(2) > span',
firstSalesPersonName: 'vn-client-defaulter-index vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(3) > span',
firstObservation: 'vn-client-defaulter-index vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(5) > vn-textarea[ng-model="defaulter.observation"]',
firstObservation: 'vn-client-defaulter-index vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(6) > vn-textarea[ng-model="defaulter.observation"]',
allDefaulterCheckbox: 'vn-client-defaulter-index vn-thead vn-multi-check',
addObservationButton: 'vn-client-defaulter-index vn-button[icon="icon-notes"]',
observation: '.vn-dialog.shown vn-textarea[ng-model="$ctrl.defaulter.observation"]',

View File

@ -36,7 +36,7 @@ describe('Client defaulter path', () => {
const expectedObservation = 'Madness, as you know, is like gravity, all it takes is a little push';
const result = await page.waitToGetProperty(selectors.clientDefaulter.firstObservation, 'value');
expect(result).toEqual(expectedObservation);
expect(result).toContain(expectedObservation);
});
it('should not add empty observation', async() => {
@ -68,6 +68,6 @@ describe('Client defaulter path', () => {
const message = await page.waitForSnackbar();
expect(message.text).toContain('Observation saved!');
expect(result).toEqual('My new observation');
expect(result).toContain('My new observation');
});
});

View File

@ -61,7 +61,8 @@ module.exports = Self => {
u.name salesPersonName,
d.amount,
co.created,
co.text observation,
CONCAT(DATE(co.created), ' ', co.text) observation,
uw.id workerFk,
uw.name workerName,
c.creditInsurance,
d.defaulterSinced

View File

@ -15,23 +15,21 @@
model="model">
</vn-searchbar>
</vn-portal>
<vn-side-menu side="right">
<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>
</vn-side-menu>
<vn-data-viewer
model="model"
class="vn-w-lg">
class="vn-w-xl">
<vn-card>
<vn-horizontal class="header">
<vn-tool-bar class="vn-ma-md">
<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()"
@ -39,8 +37,8 @@
vn-tooltip="Add observation"
icon="icon-notes">
</vn-button>
</vn-tool-bar>
</vn-horizontal>
</div>
</vn-tool-bar>
<vn-table model="model">
<vn-thead>
<vn-tr>
@ -53,20 +51,27 @@
<vn-th field="salesPersonFk">Comercial</vn-th>
<vn-th
field="amount"
vn-tooltip="Balance due">
Balance D
vn-tooltip="Balance due"
number>
Balance D.
</vn-th>
<vn-th>Last observation</vn-th>
<vn-th
vn-tooltip="Credit insurance">
Credit I
vn-tooltip="Worker who made the last observation"
shrink>
Author
</vn-th>
<vn-th>From</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>
<vn-td shrink>
<vn-check
ng-model="defaulter.checked"
vn-click-stop>
@ -89,11 +94,19 @@
</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="{{::defaulter.workerName}} {{::defaulter.created | date: 'dd/MM/yyyy'}}"
label="Observation"
ng-model="defaulter.observation">
</vn-textarea>
</vn-td>

View File

@ -2,5 +2,6 @@ Last observation: Última observación
Add observation: Añadir observación
Search client: Buscar clientes
Add observation to all selected clients: Añadir observación a {{total}} cliente(s) seleccionado(s)
Credit I: Crédito A
Balance D: Saldo V
Credit I.: Crédito A.
Balance D.: Saldo V.
Worker who made the last observation: Trabajador que ha realizado la última observación