Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 2165-travel_index_buttonClon

This commit is contained in:
Bernat Exposito Domenech 2020-03-11 08:45:11 +01:00
commit d35634551b
29 changed files with 186 additions and 66 deletions

View File

@ -366,7 +366,7 @@ export default {
ticketsIndex: { ticketsIndex: {
openAdvancedSearchButton: 'vn-searchbar .append vn-icon[icon="arrow_drop_down"]', openAdvancedSearchButton: 'vn-searchbar .append vn-icon[icon="arrow_drop_down"]',
advancedSearchInvoiceOut: 'vn-ticket-search-panel vn-textfield[ng-model="filter.refFk"]', advancedSearchInvoiceOut: 'vn-ticket-search-panel vn-textfield[ng-model="filter.refFk"]',
newTicketButton: 'vn-ticket-index > a', newTicketButton: 'vn-ticket-index a',
searchResult: 'vn-ticket-index vn-card > vn-table > div > vn-tbody > a.vn-tr', searchResult: 'vn-ticket-index vn-card > vn-table > div > vn-tbody > a.vn-tr',
searchWeeklyResult: 'vn-ticket-weekly-index vn-table vn-tbody > vn-tr', searchWeeklyResult: 'vn-ticket-weekly-index vn-table vn-tbody > vn-tr',
searchResultDate: 'vn-ticket-index vn-table vn-tbody > a:nth-child(1) > vn-td:nth-child(5)', searchResultDate: 'vn-ticket-index vn-table vn-tbody > a:nth-child(1) > vn-td:nth-child(5)',
@ -525,6 +525,7 @@ export default {
}, },
ticketLog: { ticketLog: {
firstTD: 'vn-ticket-log vn-table vn-td:nth-child(1)',
logButton: 'vn-left-menu a[ui-sref="ticket.card.log"]', logButton: 'vn-left-menu a[ui-sref="ticket.card.log"]',
changedBy: 'vn-ticket-log > vn-log vn-tr:nth-child(1) > vn-td:nth-child(2) > span', changedBy: 'vn-ticket-log > vn-log vn-tr:nth-child(1) > vn-td:nth-child(2) > span',
actionTaken: 'vn-ticket-log > vn-log vn-td:nth-child(1) > div > div:nth-child(3) > span.value', actionTaken: 'vn-ticket-log > vn-log vn-td:nth-child(1) > div > div:nth-child(3) > span.value',

View File

@ -35,7 +35,7 @@ describe('Client balance path', () => {
await page.clearInput(selectors.globalItems.userConfigThirdAutocomplete); await page.clearInput(selectors.globalItems.userConfigThirdAutocomplete);
let result = await page.waitForLastSnackbar(); let result = await page.waitForLastSnackbar();
expect(result).toEqual('Data saved!'); expect(result).toContain('Data saved!');
}); });
it('should click the new payment button', async() => { it('should click the new payment button', async() => {
@ -63,7 +63,6 @@ describe('Client balance path', () => {
let firstBalanceLine = await page let firstBalanceLine = await page
.waitToGetProperty(selectors.clientBalance.firstBalanceLine, 'innerText'); .waitToGetProperty(selectors.clientBalance.firstBalanceLine, 'innerText');
expect(company).toEqual('VNL'); expect(company).toEqual('VNL');
expect(firstBalanceLine).toContain('0.00'); expect(firstBalanceLine).toContain('0.00');
}); });

View File

@ -0,0 +1,65 @@
import selectors from '../../helpers/selectors.js';
import getBrowser from '../../helpers/puppeteer';
describe('Ticket log path', () => {
let browser;
let page;
const ticketId = '5';
beforeAll(async() => {
browser = await getBrowser();
page = browser.page;
});
afterAll(async() => {
await browser.close();
});
it('should navigate to the target ticket notes section', async() => {
await page.loginAndModule('employee', 'ticket');
await page.accessToSearchResult(ticketId);
await page.accessToSection('ticket.card.observation');
let url = await page.expectURL('/observation');
expect(url).toBe(true);
});
it('should create a new note for the test', async() => {
await page.waitToClick(selectors.ticketNotes.addNoteButton);
await page.autocompleteSearch(selectors.ticketNotes.firstNoteType, 'observation one');
await page.write(selectors.ticketNotes.firstDescription, 'description');
await page.waitToClick(selectors.ticketNotes.submitNotesButton);
const result = await page.waitForLastSnackbar();
expect(result).toEqual('Data saved!');
});
it('should navigate to the log section', async() => {
await page.accessToSection('ticket.card.log');
let url = await page.expectURL('/log');
expect(url).toBe(true);
});
it('should set the viewport width to 1920 to see the table full width', async() => {
await page.setViewport({
width: 1920,
height: 0,
});
const result = await page.waitToGetProperty(selectors.ticketLog.firstTD, 'innerText');
expect(result.length).not.toBeGreaterThan('20');
});
it('should set the viewport width to 800 to see the table shrink and move data to the 1st column', async() => {
await page.setViewport({
width: 800,
height: 0,
});
const result = await page.waitToGetProperty(selectors.ticketLog.firstTD, 'innerText');
expect(result.length).toBeGreaterThan('20');
});
});

View File

@ -3,7 +3,8 @@
ng-model="$ctrl.search" ng-model="$ctrl.search"
class="dense search" class="dense search"
ng-blur="$ctrl.onFocusOut()" ng-blur="$ctrl.onFocusOut()"
placeholder="{{::'Search' | translate}}"> placeholder="{{::'Search' | translate}}"
autocomplete="off">
</vn-textfield> </vn-textfield>
</div> </div>
<div class="list" tabindex="-1"> <div class="list" tabindex="-1">

View File

@ -132,6 +132,17 @@ export default class Field extends FormInput {
return this.error || this.inputError || null; return this.error || this.inputError || null;
} }
get autocomplete() {
return this._autocomplete;
}
set autocomplete(value) {
this._autocomplete = value;
if (value === 'off')
this.input.setAttribute('autocomplete', 'off');
}
refreshHint() { refreshHint() {
let error = this.shownError; let error = this.shownError;
let hint = error || this.hint; let hint = error || this.hint;
@ -206,6 +217,7 @@ ngModule.vnComponent('vnField', {
controller: Field, controller: Field,
bindings: { bindings: {
type: '@?', type: '@?',
autocomplete: '@?',
placeholder: '@?', placeholder: '@?',
value: '=?', value: '=?',
info: '@?', info: '@?',

View File

@ -30,7 +30,7 @@
ng-click="$ctrl.onClear($event)"> ng-click="$ctrl.onClear($event)">
</vn-icon> </vn-icon>
<vn-icon <vn-icon
icon="attach_file" icon="icon-attach"
vn-tooltip="Select a file" vn-tooltip="Select a file"
ng-click="$ctrl.openFileSelector()"> ng-click="$ctrl.openFileSelector()">
</vn-icon> </vn-icon>

View File

@ -23,6 +23,21 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-zone:before {
content: "\e95d";
}
.icon-inventory:before {
content: "\e95e";
}
.icon-wiki:before {
content: "\e968";
}
.icon-attach:before {
content: "\e96c";
}
.icon-zone2:before {
content: "\e96d";
}
.icon-net:before { .icon-net:before {
content: "\e95b"; content: "\e95b";
} }
@ -301,4 +316,4 @@
} }
.icon-worker:before { .icon-worker:before {
content: "\e943"; content: "\e943";
} }

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 108 KiB

View File

@ -10,24 +10,17 @@
</vn-textfield> </vn-textfield>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-textfield
vn-one
label="Client Id"]
ng-model="filter.clientFk">
</vn-textfield>
<vn-textfield <vn-textfield
vn-one vn-one
label="Client" label="Client"
ng-model="filter.client"> ng-model="filter.client">
</vn-textfield> </vn-textfield>
</vn-horizontal> </vn-horizontal>
<vn-horizontal>
<vn-textfield
vn-one
label="Claim Id"
ng-model="filter.id">
</vn-textfield>
<vn-textfield
vn-one
label="Client Id"
ng-model="filter.clientFk">
</vn-textfield>
</vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-autocomplete <vn-autocomplete
vn-one vn-one

View File

@ -9,18 +9,6 @@
vn-focus> vn-focus>
</vn-textfield> </vn-textfield>
</vn-horizontal> </vn-horizontal>
<vn-horizontal>
<vn-textfield
vn-one
label="Client id"
ng-model="filter.id">
</vn-textfield>
<vn-textfield
vn-one
label="Tax number"
ng-model="filter.fi">
</vn-textfield>
</vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-textfield <vn-textfield
vn-one label="Name" vn-one label="Name"
@ -39,6 +27,11 @@
</vn-autocomplete> </vn-autocomplete>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-textfield
vn-one
label="Tax number"
ng-model="filter.fi">
</vn-textfield>
<vn-textfield <vn-textfield
vn-one vn-one
label="Social name" label="Social name"

View File

@ -150,7 +150,6 @@ module.exports = Self => {
JOIN vn.currency cu ON cu.id = e.currencyFk` JOIN vn.currency cu ON cu.id = e.currencyFk`
); );
stmt.merge(conn.makeSuffix(filter)); stmt.merge(conn.makeSuffix(filter));
let itemsIndex = stmts.push(stmt) - 1; let itemsIndex = stmts.push(stmt) - 1;

View File

@ -11,7 +11,7 @@
}, },
"properties": { "properties": {
"id": { "id": {
"type": "Number", "type": "number",
"id": true, "id": true,
"description": "Identifier" "description": "Identifier"
}, },
@ -19,46 +19,49 @@
"type": "date" "type": "date"
}, },
"ref": { "ref": {
"type": "String" "type": "string"
}, },
"isBooked": { "isBooked": {
"type": "Boolean" "type": "boolean"
}, },
"isInventory": { "isInventory": {
"type": "Boolean" "type": "boolean"
}, },
"notes": { "notes": {
"type": "Number" "type": "number"
}, },
"isConfirmed": { "isConfirmed": {
"type": "Boolean" "type": "boolean"
}, },
"isVirtual": { "isVirtual": {
"type": "Boolean", "type": "boolean",
"mysql": { "mysql": {
"columnName": "isRaid" "columnName": "isRaid"
} }
}, },
"isRaid": {
"type": "boolean"
},
"commission": { "commission": {
"type": "Number" "type": "number"
}, },
"isOrdered": { "isOrdered": {
"type": "Boolean" "type": "boolean"
}, },
"created": { "created": {
"type": "date" "type": "date"
}, },
"observation": { "observation": {
"type": "String", "type": "string",
"mysql": { "mysql": {
"columnName": "evaNotes" "columnName": "evaNotes"
} }
}, },
"isBlocked": { "isBlocked": {
"type": "Boolean" "type": "boolean"
}, },
"loadPriority": { "loadPriority": {
"type": "Number" "type": "number"
} }
}, },
"relations": { "relations": {

View File

@ -0,0 +1 @@

View File

@ -0,0 +1,18 @@
import ngModule from '../module';
import Component from 'core/lib/component';
class Controller extends Component {
constructor($element, $) {
super($element, $);
}
}
Controller.$inject = ['$element', '$scope'];
ngModule.component('vnEntryBuy', {
template: require('./index.html'),
controller: Controller,
bindings: {
entry: '<'
}
});

View File

@ -0,0 +1 @@
Buy: Lineas de entrada

View File

@ -35,6 +35,18 @@
value="{{$ctrl.entry.travel.warehouseOut.name}}"> value="{{$ctrl.entry.travel.warehouseOut.name}}">
</vn-label-value> </vn-label-value>
</div> </div>
<div class="icons">
<vn-icon
vn-tooltip="Is inventory entry"
icon="icon-inventory"
ng-class="{bright: $ctrl.entry.isInventory}">
</vn-icon>
<vn-icon
vn-tooltip="Is virtual entry"
icon="icon-net"
ng-class="{bright: $ctrl.entry.isRaid}">
</vn-icon>
</div>
<vn-quick-links <vn-quick-links
links="$ctrl.quicklinks"> links="$ctrl.quicklinks">
</vn-quick-links> </vn-quick-links>

View File

@ -1,4 +1,6 @@
Reference: Referencia Reference: Referencia
All travels with current agency: Todos los envios con la agencia actual All travels with current agency: Todos los envios con la agencia actual
All entries with current supplier: Todas las entradas con el proveedor actual All entries with current supplier: Todas las entradas con el proveedor actual
Show entry report: Ver informe del pedido Show entry report: Ver informe del pedido
Is inventory entry: Es una entrada de inventario
Is virtual entry: Es una redada

View File

@ -7,3 +7,4 @@ import './descriptor';
import './card'; import './card';
import './summary'; import './summary';
import './log'; import './log';
import './buy';

View File

@ -38,7 +38,7 @@
ng-show="entry.isInventory" ng-show="entry.isInventory"
class="bright" class="bright"
vn-tooltip="Inventory entry" vn-tooltip="Inventory entry"
icon="icon-anonymous"> icon="icon-inventory">
</vn-icon> </vn-icon>
<vn-icon <vn-icon
ng-show="entry.isRaid" ng-show="entry.isRaid"

View File

@ -9,6 +9,7 @@
{"state": "entry.index", "icon": "icon-entry"} {"state": "entry.index", "icon": "icon-entry"}
], ],
"card": [ "card": [
{"state": "entry.card.buy", "icon": "icon-lines"},
{"state": "entry.card.log", "icon": "history"} {"state": "entry.card.log", "icon": "history"}
] ]
}, },
@ -42,6 +43,14 @@
"state": "entry.card.log", "state": "entry.card.log",
"component": "vn-entry-log", "component": "vn-entry-log",
"description": "Log" "description": "Log"
}, {
"url" : "/buy",
"state": "entry.card.buy",
"component": "vn-entry-buy",
"description": "Buy",
"params": {
"entry": "$ctrl.entry"
}
} }
] ]
} }

View File

@ -10,11 +10,6 @@
</vn-textfield> </vn-textfield>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-textfield
vn-one
label="Order id"
ng-model="filter.id">
</vn-textfield>
<vn-textfield <vn-textfield
vn-one vn-one
label="Client id" label="Client id"

View File

@ -1,4 +1,4 @@
Order id: Id pedido Order id: Id cesta
Client id: Id cliente Client id: Id cliente
From landed: Desde f. entrega From landed: Desde f. entrega
To landed: Hasta f. entrega To landed: Hasta f. entrega

View File

@ -6,7 +6,7 @@ module.exports = Self => {
accessType: 'WRITE', accessType: 'WRITE',
accepts: [{ accepts: [{
arg: 'clientId', arg: 'clientId',
type: 'Number', type: 'number',
description: `The client id filter`, description: `The client id filter`,
required: true required: true
}, },
@ -22,29 +22,29 @@ module.exports = Self => {
}, },
{ {
arg: 'warehouseId', arg: 'warehouseId',
type: 'Number', type: 'number',
description: `The warehouse id filter`, description: `The warehouse id filter`,
required: true required: true
}, },
{ {
arg: 'companyId', arg: 'companyId',
type: 'Number', type: 'number',
description: `The company id filter` description: `The company id filter`
}, },
{ {
arg: 'addressId', arg: 'addressId',
type: 'Number', type: 'number',
description: `The address id filter`, description: `The address id filter`,
required: true required: true
}, },
{ {
arg: 'agencyModeId', arg: 'agencyModeId',
type: 'Number', type: 'any',
description: `The agencyMode id filter` description: `The agencyMode id filter`
}, },
{ {
arg: 'routeId', arg: 'routeId',
type: 'Number', type: 'number',
description: `The route id filter` description: `The route id filter`
}], }],
returns: { returns: {

View File

@ -129,7 +129,7 @@
<div fixed-bottom-right> <div fixed-bottom-right>
<vn-vertical style="align-items: center;"> <vn-vertical style="align-items: center;">
<vn-button class="round message xs vn-mb-sm" <vn-button class="round sm vn-mb-sm"
icon="icon-recovery" icon="icon-recovery"
ng-show="$ctrl.totalChecked > 0" ng-show="$ctrl.totalChecked > 0"
ng-click="$ctrl.openBalanceDialog()" ng-click="$ctrl.openBalanceDialog()"

View File

@ -15,11 +15,6 @@
label="Client id" label="Client id"
ng-model="filter.clientFk"> ng-model="filter.clientFk">
</vn-textfield> </vn-textfield>
<vn-textfield
vn-one
label="Ticket id"
ng-model="filter.id">
</vn-textfield>
<vn-textfield <vn-textfield
vn-one vn-one
label="Order id" label="Order id"

View File

@ -8,7 +8,7 @@ Warehouse: Almacén
Sales person: Comercial Sales person: Comercial
Province: Provincia Province: Provincia
My team: Mi equipo My team: Mi equipo
Order id: Id pedido Order id: Id cesta
Grouped States: Estado agrupado Grouped States: Estado agrupado
Days onward: Días adelante Days onward: Días adelante
With problems: Con problemas With problems: Con problemas

View File

@ -1,12 +1,12 @@
{ {
"module": "zone", "module": "zone",
"name": "Zones", "name": "Zones",
"icon" : "location_on", "icon" : "icon-zone",
"validations" : true, "validations" : true,
"dependencies": ["worker"], "dependencies": ["worker"],
"menus": { "menus": {
"main": [ "main": [
{"state": "zone.index", "icon": "location_on"}, {"state": "zone.index", "icon": "icon-zone"},
{"state": "zone.deliveryDays", "icon": "today"} {"state": "zone.deliveryDays", "icon": "today"}
], ],
"card": [ "card": [