2564-item_priceFixed + e2e #513

Merged
carlosjr merged 19 commits from 2564-item_priceFixed into dev 2021-01-20 14:34:07 +00:00
7 changed files with 42 additions and 42 deletions
Showing only changes of commit 8d6dd3e03a - Show all commits

View File

@ -5,7 +5,7 @@ module.exports = function(Self) {
description: 'Updates a client address updating default address',
accepts: [{
arg: 'ctx',
type: 'Object',
type: 'object',
http: {source: 'context'}
},
{
@ -70,7 +70,7 @@ module.exports = function(Self) {
}],
returns: {
root: true,
type: 'Object'
type: 'object'
},
http: {
verb: 'patch',

View File

@ -60,7 +60,6 @@ module.exports = Self => {
query = `SET @isTriggerDisabled = FALSE`;
await Self.rawSql(query, null, options);
query = `CALL vn.itemRefreshTags(?)`;
await Self.rawSql(query, [item.id], options);
await tx.commit();

View File

@ -12,116 +12,116 @@
},
"properties": {
"id": {
"type": "Number",
"type": "number",
"id": true,
"description": "Id"
},
"name": {
"type": "String",
"type": "string",
"description": "Name"
},
"size": {
"type": "Number",
"type": "number",
"description": "Size"
},
"category": {
"type": "String",
"type": "string",
"description": "Category"
},
"typeFk": {
"type": "Number",
"type": "number",
"description": "Type",
"required": true
},
"stems": {
"type": "Number",
"type": "number",
"description": "Stems"
},
"description": {
"type": "String",
"type": "string",
"description": "Description"
},
"isOnOffer": {
"type": "Boolean",
"type": "boolean",
"description": "Offer"
},
"isBargain": {
"type": "Boolean",
"type": "boolean",
"description": "Bargain"
},
"isActive": {
"type": "Boolean",
"type": "boolean",
"description": "Active"
},
"comment": {
"type": "String",
"type": "string",
"description": "Comment"
},
"relevancy": {
"type": "Number",
"type": "number",
"description": "Relevancy"
},
"density": {
"type": "Number",
"type": "number",
"description": "Density"
},
"image": {
"type": "String",
"type": "string",
"description": "Image"
},
"longName": {
"type": "String",
"type": "string",
"description": "Long name"
},
"subName": {
"type": "String",
"type": "string",
"description": "Subname"
},
"tag5": {
"type": "String"
"type": "string"
},
"value5": {
"type": "String"
"type": "string"
},
"tag6": {
"type": "String"
"type": "string"
},
"value6": {
"type": "String"
"type": "string"
},
"tag7": {
"type": "String"
"type": "string"
},
"value7": {
"type": "String"
"type": "string"
},
"tag8": {
"type": "String"
"type": "string"
},
"value8": {
"type": "String"
"type": "string"
},
"tag9": {
"type": "String"
"type": "string"
},
"value9": {
"type": "String"
"type": "string"
},
"tag10": {
"type": "String"
"type": "string"
},
"value10": {
"type": "String"
"type": "string"
},
"compression": {
"type": "Number"
"type": "number"
},
"hasKgPrice": {
"type": "Boolean",
"type": "boolean",
"description": "Price per Kg"
},
"expenseFk": {
"type": "Number",
"type": "number",
"mysql": {
"columnName": "expenceFk"
}
@ -129,8 +129,11 @@
"minPrice": {
"type": "number"
},
"hasMinPrice": {
"type": "boolean"
},
"isFragile": {
"type": "Boolean"
"type": "boolean"
}
},
"relations": {

View File

@ -27,8 +27,8 @@
initial-data="itemTag.tag"
ng-model="itemTag.tagFk"
data="tags"
on-change="$ctrl.getSourceTable(tag)"
show-field="name"
on-change="itemTag.value = null"
rule>
</vn-autocomplete>
<vn-textfield vn-three

View File

@ -30,11 +30,11 @@ module.exports = Self => {
}, {
arg: 'attenderFk',
type: 'Number',
description: `Search requests atended by the given worker`
description: `Search requests attended by a given worker id`
}, {
arg: 'mine',
type: 'Boolean',
description: `Search requests attended by the connected worker`
description: `Search requests attended by the current user`
}, {
arg: 'from',
type: 'Date',
@ -62,10 +62,9 @@ module.exports = Self => {
Self.filter = async(ctx, filter) => {
let conn = Self.dataSource.connector;
let userId = ctx.req.accessToken.userId;
let worker = await Self.app.models.Worker.findOne({where: {userFk: userId}});
if (ctx.args.mine)
ctx.args.attenderFk = worker.id;
ctx.args.attenderFk = userId;
let where = buildFilter(ctx.args, (param, value) => {
switch (param) {

View File

@ -21,7 +21,7 @@ Discount: Descuento
Employee : Empleado
Import: Importe
Is checked: Comprobado
Item: Articulo
Item: Artículo
Landing: Llegada
Landed: F. entrega
More: Más

View File

@ -1,4 +1,3 @@
const {KeyValueModel} = require('loopback');
const Vue = require('vue');
const zerofill = function(value, pad) {