From 73c4e310f0063e081afeda3324f42ce407d6974a Mon Sep 17 00:00:00 2001 From: Bernat Exposito Domenech Date: Thu, 6 Feb 2020 13:07:01 +0100 Subject: [PATCH] 2059 zone.index buscador avanzado --- modules/agency/back/models/agency-mode.json | 144 ++++++++++--------- modules/agency/front/search-panel/index.html | 1 + 2 files changed, 75 insertions(+), 70 deletions(-) diff --git a/modules/agency/back/models/agency-mode.json b/modules/agency/back/models/agency-mode.json index 5d6814dc8..ded58e819 100644 --- a/modules/agency/back/models/agency-mode.json +++ b/modules/agency/back/models/agency-mode.json @@ -1,73 +1,77 @@ { - "name": "AgencyMode", - "description": "Agency modes", - "base": "VnModel", - "options": { - "mysql": { - "table": "agencyMode" + "name": "AgencyMode", + "description": "Agency modes", + "base": "VnModel", + "options": { + "mysql": { + "table": "agencyMode" + } + }, + "properties": { + "id": { + "type": "Number", + "id": true, + "description": "Identifier" + }, + "name": { + "type": "string", + "required": true + }, + "description": { + "type": "string" + }, + "deliveryMethodFk": { + "type": "number" + }, + "m3": { + "type": "Number" + }, + "inflation": { + "type": "Number" + }, + "reportMail": { + "type": "string" + }, + "isActive": { + "type": "boolean" + }, + "code": { + "type": "String", + "required": false + } + }, + "relations": { + "agency": { + "type": "belongsTo", + "model": "Agency", + "foreignKey": "agencyFk" + }, + "agencyType": { + "type": "belongsTo", + "model": "AgencyType", + "foreignKey": "agencyTypeFk" + }, + "deliveryMethod": { + "type": "belongsTo", + "model": "DeliveryMethod", + "foreignKey": "deliveryMethodFk" + } + }, + "acls": [ + { + "accessType": "READ", + "principalType": "ROLE", + "principalId": "$everyone", + "permission": "ALLOW" + } + ], + "scopes": { + "isActive": { + "where": { + "isActive": { + "neq": false + } + } + } } - }, - "properties": { - "id": { - "type": "Number", - "id": true, - "description": "Identifier" - }, - "name": { - "type": "string", - "required": true - }, - "description": { - "type": "string" - }, - "deliveryMethodFk":{ - "type": "number" - }, - "m3": { - "type": "Number" - }, - "inflation": { - "type": "Number" - }, - "reportMail": { - "type": "string" - }, - "isActive":{ - "type": "boolean" - }, - "code": { - "type": "String", - "required": false - } - }, - "relations": { - "agency": { - "type": "belongsTo", - "model": "Agency", - "foreignKey": "agencyFk" - }, - "agencyType": { - "type": "belongsTo", - "model": "AgencyType", - "foreignKey": "agencyTypeFk" - }, - "deliveryMethod": { - "type": "belongsTo", - "model": "DeliveryMethod", - "foreignKey": "deliveryMethodFk" - } - }, - "acls": [ - { - "accessType": "READ", - "principalType": "ROLE", - "principalId": "$everyone", - "permission": "ALLOW" - } - ], - "scopes" : { - "isActive" : { - "where": {"isActive": {"neq": false}} - } - } } \ No newline at end of file diff --git a/modules/agency/front/search-panel/index.html b/modules/agency/front/search-panel/index.html index a97428192..bda8a946e 100644 --- a/modules/agency/front/search-panel/index.html +++ b/modules/agency/front/search-panel/index.html @@ -22,6 +22,7 @@ label="Agency" ng-model="filter.agencyModeFk" url="AgencyModes/isActive" + where="{deliveryMethodFk: {neq: null}}" value-field="id" show-field="name">