semantics, traductions and small aditions
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2020-08-28 10:40:47 +02:00
parent c70ad808a0
commit 0b4f65724e
6 changed files with 30 additions and 24 deletions

View File

@ -9,7 +9,7 @@ module.exports = Self => {
description: `the column to edit and it's new value` description: `the column to edit and it's new value`
}, },
{ {
arg: 'buys', arg: 'lines',
type: ['Object'], type: ['Object'],
required: true, required: true,
description: `the buys which will be modified` description: `the buys which will be modified`
@ -24,7 +24,7 @@ module.exports = Self => {
} }
}); });
Self.editLatestBuys = async(column, buys) => { Self.editLatestBuys = async(column, lines) => {
let modelName; let modelName;
let identifier; let identifier;
@ -32,6 +32,7 @@ module.exports = Self => {
case 'size': case 'size':
case 'density': case 'density':
case 'minPrice': case 'minPrice':
case 'description':
modelName = 'Item'; modelName = 'Item';
identifier = 'itemFk'; identifier = 'itemFk';
break; break;
@ -59,8 +60,8 @@ module.exports = Self => {
let promises = []; let promises = [];
let options = {transaction: tx}; let options = {transaction: tx};
let targets = buys.map(buy => { let targets = lines.map(line => {
return buy[identifier]; return line[identifier];
}); });
let value = {}; let value = {};

View File

@ -27,13 +27,13 @@ module.exports = Self => {
description: 'List of tags to filter with', description: 'List of tags to filter with',
http: {source: 'query'} http: {source: 'query'}
}, { }, {
arg: 'categoryFk', arg: 'description',
type: 'Integer', type: 'String',
description: 'Category id', description: 'The item description',
}, { }, {
arg: 'typeFk', arg: 'salesPersonFk',
type: 'Integer', type: 'Integer',
description: 'Type id', description: 'The buyer of the item',
}, { }, {
arg: 'active', arg: 'active',
type: 'Boolean', type: 'Boolean',
@ -43,13 +43,13 @@ module.exports = Self => {
type: 'Boolean', type: 'Boolean',
description: 'Whether the the item is or not visible', description: 'Whether the the item is or not visible',
}, { }, {
arg: 'salesPersonFk', arg: 'typeFk',
type: 'Integer', type: 'Integer',
description: 'The buyer of the item', description: 'Type id',
}, { }, {
arg: 'description', arg: 'categoryFk',
type: 'String', type: 'Integer',
description: 'The item description', description: 'Category id',
} }
], ],
returns: { returns: {
@ -107,6 +107,7 @@ module.exports = Self => {
i.family, i.family,
i.isActive, i.isActive,
i.minPrice, i.minPrice,
i.description,
t.name AS type, t.name AS type,
intr.description AS intrastat, intr.description AS intrastat,
ori.code AS origin, ori.code AS origin,

View File

@ -33,6 +33,7 @@
<vn-th field="id">Id</vn-th> <vn-th field="id">Id</vn-th>
<vn-th field="packing">Packing</vn-th> <vn-th field="packing">Packing</vn-th>
<vn-th field="grouping">Grouping</vn-th> <vn-th field="grouping">Grouping</vn-th>
<vn-th field="description" style="text-align: center">Description</vn-th>
<vn-th field="size">Size</vn-th> <vn-th field="size">Size</vn-th>
<vn-th field="type">Type</vn-th> <vn-th field="type">Type</vn-th>
<vn-th field="intrastat">Intrastat</vn-th> <vn-th field="intrastat">Intrastat</vn-th>
@ -47,8 +48,8 @@
<vn-th field="comissionValue" expand>Comission value</vn-th> <vn-th field="comissionValue" expand>Comission value</vn-th>
<vn-th field="packageValue" expand>Package value</vn-th> <vn-th field="packageValue" expand>Package value</vn-th>
<vn-th field="isIgnored">Is ignored</vn-th> <vn-th field="isIgnored">Is ignored</vn-th>
<vn-th field="price2">price2</vn-th> <vn-th expand field="price2">price2</vn-th>
<vn-th field="price3">price3</vn-th> <vn-th expand field="price3">price3</vn-th>
<vn-th field="minPrice">Min price</vn-th> <vn-th field="minPrice">Min price</vn-th>
<vn-th field="ektFk">Ekt</vn-th> <vn-th field="ektFk">Ekt</vn-th>
<vn-th field="weight">Weight</vn-th> <vn-th field="weight">Weight</vn-th>
@ -88,6 +89,9 @@
<span translate>{{::buy.grouping | dashIfEmpty}}</span> <span translate>{{::buy.grouping | dashIfEmpty}}</span>
</vn-chip> </vn-chip>
</vn-td> </vn-td>
<vn-td expand title="{{::buy.description}}">
{{::buy.description | dashIfEmpty}}
</vn-td>
<vn-td number>{{::buy.size}}</vn-td> <vn-td number>{{::buy.size}}</vn-td>
<vn-td shrink title="{{::buy.type}}"> <vn-td shrink title="{{::buy.type}}">
{{::buy.type}} {{::buy.type}}

View File

@ -24,11 +24,11 @@ export default class Controller extends Section {
{field: 'packageValue', displayName: 'packageValue'}, {field: 'packageValue', displayName: 'packageValue'},
{field: 'price2', displayName: 'price2'}, {field: 'price2', displayName: 'price2'},
{field: 'price3', displayName: 'price3'}, {field: 'price3', displayName: 'price3'},
{field: 'minPrice', displayName: 'minPrice'},
{field: 'weight', displayName: 'weight'}, {field: 'weight', displayName: 'weight'},
{field: 'description', displayName: 'description'},
{field: 'minPrice', displayName: 'minPrice'},
{field: 'size', displayName: 'size'}, {field: 'size', displayName: 'size'},
{field: 'density', displayName: 'density'}, {field: 'density', displayName: 'density'}
{field: 'description', displayName: 'description'}
]; ];
return this._columns; return this._columns;
@ -60,7 +60,7 @@ export default class Controller extends Section {
onEditAccept() { onEditAccept() {
let data = { let data = {
column: this.editedColumn, column: this.editedColumn,
buys: this.checked lines: this.checked
}; };
this.$http.post('Buys/editLatestBuys', data) this.$http.post('Buys/editLatestBuys', data)

View File

@ -1,3 +1,3 @@
Minimun amount: Minimun purchase quantity Minimun amount: Minimun purchase quantity
price2: Package price2: Grouping price
price3: Box price3: Packing price

View File

@ -4,8 +4,8 @@ Freight value: Porte
Commission value: Comisión Commission value: Comisión
Package value: Embalaje Package value: Embalaje
Is ignored: Ignorado Is ignored: Ignorado
price2: Paquete price2: Precio grouping
price3: Caja price3: Precio packing
Min price: Precio min Min price: Precio min
Ekt: Ekt Ekt: Ekt
Weight: Peso Weight: Peso