2564-item_priceFixed + e2e #513
|
@ -5,7 +5,7 @@ module.exports = function(Self) {
|
||||||
description: 'Updates a client address updating default address',
|
description: 'Updates a client address updating default address',
|
||||||
accepts: [{
|
accepts: [{
|
||||||
arg: 'ctx',
|
arg: 'ctx',
|
||||||
type: 'Object',
|
type: 'object',
|
||||||
http: {source: 'context'}
|
http: {source: 'context'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -70,7 +70,7 @@ module.exports = function(Self) {
|
||||||
}],
|
}],
|
||||||
returns: {
|
returns: {
|
||||||
root: true,
|
root: true,
|
||||||
type: 'Object'
|
type: 'object'
|
||||||
},
|
},
|
||||||
http: {
|
http: {
|
||||||
verb: 'patch',
|
verb: 'patch',
|
||||||
|
|
|
@ -60,7 +60,6 @@ module.exports = Self => {
|
||||||
query = `SET @isTriggerDisabled = FALSE`;
|
query = `SET @isTriggerDisabled = FALSE`;
|
||||||
await Self.rawSql(query, null, options);
|
await Self.rawSql(query, null, options);
|
||||||
|
|
||||||
|
|
||||||
query = `CALL vn.itemRefreshTags(?)`;
|
query = `CALL vn.itemRefreshTags(?)`;
|
||||||
await Self.rawSql(query, [item.id], options);
|
await Self.rawSql(query, [item.id], options);
|
||||||
await tx.commit();
|
await tx.commit();
|
||||||
|
|
|
@ -12,116 +12,116 @@
|
||||||
},
|
},
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"type": "Number",
|
"type": "number",
|
||||||
"id": true,
|
"id": true,
|
||||||
"description": "Id"
|
"description": "Id"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "String",
|
"type": "string",
|
||||||
"description": "Name"
|
"description": "Name"
|
||||||
},
|
},
|
||||||
"size": {
|
"size": {
|
||||||
"type": "Number",
|
"type": "number",
|
||||||
"description": "Size"
|
"description": "Size"
|
||||||
},
|
},
|
||||||
"category": {
|
"category": {
|
||||||
"type": "String",
|
"type": "string",
|
||||||
"description": "Category"
|
"description": "Category"
|
||||||
},
|
},
|
||||||
"typeFk": {
|
"typeFk": {
|
||||||
"type": "Number",
|
"type": "number",
|
||||||
"description": "Type",
|
"description": "Type",
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
"stems": {
|
"stems": {
|
||||||
"type": "Number",
|
"type": "number",
|
||||||
"description": "Stems"
|
"description": "Stems"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "String",
|
"type": "string",
|
||||||
"description": "Description"
|
"description": "Description"
|
||||||
},
|
},
|
||||||
"isOnOffer": {
|
"isOnOffer": {
|
||||||
"type": "Boolean",
|
"type": "boolean",
|
||||||
"description": "Offer"
|
"description": "Offer"
|
||||||
},
|
},
|
||||||
"isBargain": {
|
"isBargain": {
|
||||||
"type": "Boolean",
|
"type": "boolean",
|
||||||
"description": "Bargain"
|
"description": "Bargain"
|
||||||
},
|
},
|
||||||
"isActive": {
|
"isActive": {
|
||||||
"type": "Boolean",
|
"type": "boolean",
|
||||||
"description": "Active"
|
"description": "Active"
|
||||||
},
|
},
|
||||||
"comment": {
|
"comment": {
|
||||||
"type": "String",
|
"type": "string",
|
||||||
"description": "Comment"
|
"description": "Comment"
|
||||||
},
|
},
|
||||||
"relevancy": {
|
"relevancy": {
|
||||||
"type": "Number",
|
"type": "number",
|
||||||
"description": "Relevancy"
|
"description": "Relevancy"
|
||||||
},
|
},
|
||||||
"density": {
|
"density": {
|
||||||
"type": "Number",
|
"type": "number",
|
||||||
"description": "Density"
|
"description": "Density"
|
||||||
},
|
},
|
||||||
"image": {
|
"image": {
|
||||||
"type": "String",
|
"type": "string",
|
||||||
"description": "Image"
|
"description": "Image"
|
||||||
},
|
},
|
||||||
"longName": {
|
"longName": {
|
||||||
"type": "String",
|
"type": "string",
|
||||||
"description": "Long name"
|
"description": "Long name"
|
||||||
},
|
},
|
||||||
"subName": {
|
"subName": {
|
||||||
"type": "String",
|
"type": "string",
|
||||||
"description": "Subname"
|
"description": "Subname"
|
||||||
},
|
},
|
||||||
"tag5": {
|
"tag5": {
|
||||||
"type": "String"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"value5": {
|
"value5": {
|
||||||
"type": "String"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"tag6": {
|
"tag6": {
|
||||||
"type": "String"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"value6": {
|
"value6": {
|
||||||
"type": "String"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"tag7": {
|
"tag7": {
|
||||||
"type": "String"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"value7": {
|
"value7": {
|
||||||
"type": "String"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"tag8": {
|
"tag8": {
|
||||||
"type": "String"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"value8": {
|
"value8": {
|
||||||
"type": "String"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"tag9": {
|
"tag9": {
|
||||||
"type": "String"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"value9": {
|
"value9": {
|
||||||
"type": "String"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"tag10": {
|
"tag10": {
|
||||||
"type": "String"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"value10": {
|
"value10": {
|
||||||
"type": "String"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"compression": {
|
"compression": {
|
||||||
"type": "Number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"hasKgPrice": {
|
"hasKgPrice": {
|
||||||
"type": "Boolean",
|
"type": "boolean",
|
||||||
"description": "Price per Kg"
|
"description": "Price per Kg"
|
||||||
},
|
},
|
||||||
"expenseFk": {
|
"expenseFk": {
|
||||||
"type": "Number",
|
"type": "number",
|
||||||
"mysql": {
|
"mysql": {
|
||||||
"columnName": "expenceFk"
|
"columnName": "expenceFk"
|
||||||
}
|
}
|
||||||
|
@ -129,8 +129,11 @@
|
||||||
"minPrice": {
|
"minPrice": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
|
"hasMinPrice": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
"isFragile": {
|
"isFragile": {
|
||||||
"type": "Boolean"
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"relations": {
|
"relations": {
|
||||||
|
|
|
@ -27,8 +27,8 @@
|
||||||
initial-data="itemTag.tag"
|
initial-data="itemTag.tag"
|
||||||
ng-model="itemTag.tagFk"
|
ng-model="itemTag.tagFk"
|
||||||
data="tags"
|
data="tags"
|
||||||
on-change="$ctrl.getSourceTable(tag)"
|
|
||||||
show-field="name"
|
show-field="name"
|
||||||
|
on-change="itemTag.value = null"
|
||||||
rule>
|
rule>
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
<vn-textfield vn-three
|
<vn-textfield vn-three
|
||||||
|
|
|
@ -30,11 +30,11 @@ module.exports = Self => {
|
||||||
}, {
|
}, {
|
||||||
arg: 'attenderFk',
|
arg: 'attenderFk',
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: `Search requests atended by the given worker`
|
description: `Search requests attended by a given worker id`
|
||||||
}, {
|
}, {
|
||||||
arg: 'mine',
|
arg: 'mine',
|
||||||
type: 'Boolean',
|
type: 'Boolean',
|
||||||
description: `Search requests attended by the connected worker`
|
description: `Search requests attended by the current user`
|
||||||
}, {
|
}, {
|
||||||
arg: 'from',
|
arg: 'from',
|
||||||
type: 'Date',
|
type: 'Date',
|
||||||
|
@ -62,10 +62,9 @@ module.exports = Self => {
|
||||||
Self.filter = async(ctx, filter) => {
|
Self.filter = async(ctx, filter) => {
|
||||||
let conn = Self.dataSource.connector;
|
let conn = Self.dataSource.connector;
|
||||||
let userId = ctx.req.accessToken.userId;
|
let userId = ctx.req.accessToken.userId;
|
||||||
let worker = await Self.app.models.Worker.findOne({where: {userFk: userId}});
|
|
||||||
|
|
||||||
if (ctx.args.mine)
|
if (ctx.args.mine)
|
||||||
ctx.args.attenderFk = worker.id;
|
ctx.args.attenderFk = userId;
|
||||||
|
|
||||||
let where = buildFilter(ctx.args, (param, value) => {
|
let where = buildFilter(ctx.args, (param, value) => {
|
||||||
switch (param) {
|
switch (param) {
|
||||||
|
|
|
@ -21,7 +21,7 @@ Discount: Descuento
|
||||||
Employee : Empleado
|
Employee : Empleado
|
||||||
Import: Importe
|
Import: Importe
|
||||||
Is checked: Comprobado
|
Is checked: Comprobado
|
||||||
Item: Articulo
|
Item: Artículo
|
||||||
Landing: Llegada
|
Landing: Llegada
|
||||||
Landed: F. entrega
|
Landed: F. entrega
|
||||||
More: Más
|
More: Más
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
const {KeyValueModel} = require('loopback');
|
|
||||||
const Vue = require('vue');
|
const Vue = require('vue');
|
||||||
|
|
||||||
const zerofill = function(value, pad) {
|
const zerofill = function(value, pad) {
|
||||||
|
|
Loading…
Reference in New Issue