Merge branch 'dev' into 2965-delete_travel_from_descriptor
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2021-06-16 08:19:01 +00:00
commit b9cdc5ed6a
9 changed files with 37 additions and 32 deletions

View File

@ -51,6 +51,8 @@
</vn-data-viewer>
<vn-float-button
ng-if="$ctrl.canCreateNew()"
vn-acl="insurance"
vn-acl-action="remove"
vn-tooltip="New contract"
fixed-bottom-right
ui-sref="client.card.creditInsurance.create"

View File

@ -30,6 +30,8 @@
</div>
<a
ng-if="!$ctrl.isClosed"
vn-acl="insurance"
vn-acl-action="remove"
ui-sref="client.card.creditInsurance.insurance.create({classificationId: {{$ctrl.$params.classificationId}}})"
fixed-bottom-right
vn-tooltip="New credit"

View File

@ -240,14 +240,12 @@
"url": "/credit-insurance",
"abstract": true,
"state": "client.card.creditInsurance",
"component": "ui-view",
"acl": ["insurance"]
"component": "ui-view"
}, {
"url": "/index",
"state": "client.card.creditInsurance.index",
"component": "vn-client-credit-insurance-index",
"description": "Credit contracts",
"acl": ["insurance"],
"params": {
"client": "$ctrl.client"
}
@ -256,6 +254,7 @@
"state": "client.card.creditInsurance.create",
"component": "vn-client-credit-insurance-create",
"description": "New insurance",
"acl": ["insurance"],
"params": {
"client": "$ctrl.client"
}
@ -279,6 +278,7 @@
"state": "client.card.creditInsurance.insurance.create",
"component": "vn-client-credit-insurance-insurance-create",
"description": "New credit",
"acl": ["insurance"],
"params": {
"client": "$ctrl.client"
}

View File

@ -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';

View File

@ -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,

View File

@ -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>

View File

@ -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;

View File

@ -14,3 +14,4 @@ Field to edit: Campo a editar
PackageName: Cubo
Edit: Editar
buy(s): compra(s)
PackingOut: Packing envíos

View File

@ -137,6 +137,9 @@
"minPrice": {
"type": "number"
},
"packingOut": {
"type": "number"
},
"hasMinPrice": {
"type": "boolean"
},