Merge pull request 'removed several columns from bulk edit and added packingOut' (#652) from 2929-entry_latestsbuys_refactor into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #652 Reviewed-by: Joan Sanchez <joan@verdnatura.es>
This commit is contained in:
commit
c3bebc9f7e
|
@ -48,21 +48,15 @@ module.exports = Self => {
|
|||
switch (field) {
|
||||
case 'size':
|
||||
case 'density':
|
||||
case 'minPrice':
|
||||
case 'description':
|
||||
case 'packingOut':
|
||||
modelName = 'Item';
|
||||
identifier = 'itemFk';
|
||||
break;
|
||||
case 'quantity':
|
||||
case 'buyingValue':
|
||||
case 'freightValue':
|
||||
case 'packing':
|
||||
case 'grouping':
|
||||
case 'groupingMode':
|
||||
case 'comissionValue':
|
||||
case 'packageValue':
|
||||
case 'price2':
|
||||
case 'price3':
|
||||
case 'weight':
|
||||
modelName = 'Buy';
|
||||
identifier = 'id';
|
||||
|
|
|
@ -10,54 +10,59 @@ module.exports = Self => {
|
|||
accepts: [
|
||||
{
|
||||
arg: 'filter',
|
||||
type: 'Object',
|
||||
type: 'object',
|
||||
description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string',
|
||||
},
|
||||
{
|
||||
arg: 'search',
|
||||
type: 'String',
|
||||
type: 'string',
|
||||
description: `If it's and integer searchs by id, otherwise it searchs by name`,
|
||||
},
|
||||
{
|
||||
arg: 'id',
|
||||
type: 'Integer',
|
||||
type: 'integer',
|
||||
description: 'Item id',
|
||||
},
|
||||
{
|
||||
arg: 'tags',
|
||||
type: ['Object'],
|
||||
type: ['object'],
|
||||
description: 'List of tags to filter with',
|
||||
http: {source: 'query'}
|
||||
},
|
||||
{
|
||||
arg: 'description',
|
||||
type: 'String',
|
||||
type: 'string',
|
||||
description: 'The item description',
|
||||
},
|
||||
{
|
||||
arg: 'salesPersonFk',
|
||||
type: 'Integer',
|
||||
type: 'integer',
|
||||
description: 'The buyer of the item',
|
||||
},
|
||||
{
|
||||
arg: 'active',
|
||||
type: 'Boolean',
|
||||
type: 'boolean',
|
||||
description: 'Whether the item is or not active',
|
||||
},
|
||||
{
|
||||
arg: 'visible',
|
||||
type: 'Boolean',
|
||||
type: 'boolean',
|
||||
description: 'Whether the item is or not visible',
|
||||
},
|
||||
{
|
||||
arg: 'typeFk',
|
||||
type: 'Integer',
|
||||
type: 'integer',
|
||||
description: 'Type id',
|
||||
},
|
||||
{
|
||||
arg: 'categoryFk',
|
||||
type: 'Integer',
|
||||
type: 'integer',
|
||||
description: 'Category id',
|
||||
},
|
||||
{
|
||||
arg: 'packingOut',
|
||||
type: 'integer',
|
||||
description: 'the packingOut',
|
||||
}
|
||||
],
|
||||
returns: {
|
||||
|
@ -84,7 +89,10 @@ module.exports = Self => {
|
|||
? {'i.id': value}
|
||||
: {'i.name': {like: `%${value}%`}};
|
||||
case 'id':
|
||||
return {'i.id': value};
|
||||
case 'packingOut':
|
||||
case 'typeFk':
|
||||
param = `i.${param}`;
|
||||
return {[param]: value};
|
||||
case 'description':
|
||||
return {'i.description': {like: `%${value}%`}};
|
||||
case 'categoryFk':
|
||||
|
@ -93,8 +101,6 @@ module.exports = Self => {
|
|||
return {'it.workerFk': value};
|
||||
case 'code':
|
||||
return {'it.code': value};
|
||||
case 'typeFk':
|
||||
return {'i.typeFk': value};
|
||||
case 'active':
|
||||
return {'i.isActive': value};
|
||||
case 'visible':
|
||||
|
@ -126,6 +132,7 @@ module.exports = Self => {
|
|||
i.description,
|
||||
i.name,
|
||||
i.subName,
|
||||
i.packingOut,
|
||||
i.tag5,
|
||||
i.value5,
|
||||
i.tag6,
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
<vn-th field="ektFk">Ekt</vn-th>
|
||||
<vn-th field="weight">Weight</vn-th>
|
||||
<vn-th field="packageFk" expand>PackageName</vn-th>
|
||||
<vn-th field="packingOut" expand>PackingOut</vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
<vn-tbody>
|
||||
|
@ -147,6 +148,7 @@
|
|||
<vn-td number>{{::buy.ektFk | dashIfEmpty}}</vn-td>
|
||||
<vn-td number>{{::buy.weight}}</vn-td>
|
||||
<vn-td number>{{::buy.packageFk}}</vn-td>
|
||||
<vn-td number>{{::buy.packingOut}}</vn-td>
|
||||
</a>
|
||||
</vn-tbody>
|
||||
</vn-table>
|
||||
|
|
|
@ -16,20 +16,14 @@ export default class Controller extends Section {
|
|||
if (this._columns) return this._columns;
|
||||
|
||||
this._columns = [
|
||||
{field: 'quantity', displayName: this.$t('Quantity')},
|
||||
{field: 'buyingValue', displayName: this.$t('Buying value')},
|
||||
{field: 'freightValue', displayName: this.$t('Freight value')},
|
||||
{field: 'packing', displayName: this.$t('Packing')},
|
||||
{field: 'grouping', displayName: this.$t('Grouping')},
|
||||
{field: 'comissionValue', displayName: this.$t('Commission value')},
|
||||
{field: 'packageValue', displayName: this.$t('Package value')},
|
||||
{field: 'price2', displayName: this.$t('Grouping price')},
|
||||
{field: 'price3', displayName: this.$t('Packing price')},
|
||||
{field: 'weight', displayName: this.$t('Weight')},
|
||||
{field: 'description', displayName: this.$t('Description')},
|
||||
{field: 'minPrice', displayName: this.$t('Min price')},
|
||||
{field: 'size', displayName: this.$t('Size')},
|
||||
{field: 'density', displayName: this.$t('Density')}
|
||||
{field: 'density', displayName: this.$t('Density')},
|
||||
{field: 'packingOut', displayName: this.$t('PackingOut')}
|
||||
];
|
||||
|
||||
return this._columns;
|
||||
|
|
|
@ -13,4 +13,5 @@ Minimun amount: Cantidad mínima de compra
|
|||
Field to edit: Campo a editar
|
||||
PackageName: Cubo
|
||||
Edit: Editar
|
||||
buy(s): compra(s)
|
||||
buy(s): compra(s)
|
||||
PackingOut: Packing envíos
|
|
@ -137,6 +137,9 @@
|
|||
"minPrice": {
|
||||
"type": "number"
|
||||
},
|
||||
"packingOut": {
|
||||
"type": "number"
|
||||
},
|
||||
"hasMinPrice": {
|
||||
"type": "boolean"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue