creado el modelo Chanel.
Se puede seleccionar en el cliente.
This commit is contained in:
parent
85184d71eb
commit
495e3b7c5e
|
@ -28,7 +28,13 @@
|
|||
value-field="id"
|
||||
label="Comercial">
|
||||
</vn-autocomplete>
|
||||
<vn-one></vn-one>
|
||||
<vn-autocomplete vn-one
|
||||
field="$ctrl.client.chanelFK"
|
||||
url="/client/api/Chanels"
|
||||
show-field="name"
|
||||
value-field="id"
|
||||
label="Canal">
|
||||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
</vn-vertical>
|
||||
</vn-card>
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"name": "Chanel",
|
||||
"base": "PersistedModel",
|
||||
"validateUpsert": true,
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "Number",
|
||||
"id": true,
|
||||
"description": "Identifier"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
{
|
||||
"accessType": "*",
|
||||
"principalType": "ROLE",
|
||||
"principalId": "$everyone",
|
||||
"permission": "ALLOW"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -70,7 +70,7 @@ module.exports = function(Client) {
|
|||
Client.update({id: client.id}, {active: !client.active});
|
||||
cb(null, !client.active);
|
||||
}
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
// Basic filter
|
||||
|
|
|
@ -144,6 +144,11 @@
|
|||
"type": "hasMany",
|
||||
"model": "Address",
|
||||
"foreignKey": "clientFk"
|
||||
},
|
||||
"chanelFK":{
|
||||
"type": "hasOne",
|
||||
"model": "Chanel",
|
||||
"foreignKey": "chanelFK"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
|
|
|
@ -69,5 +69,9 @@
|
|||
"Account": {
|
||||
"dataSource": "vn",
|
||||
"public": true
|
||||
},
|
||||
"Chanel": {
|
||||
"dataSource": "vn",
|
||||
"public": true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue