Tarea #240 Añadir comprador

This commit is contained in:
Gerard 2018-04-13 08:59:23 +02:00
parent e377562d99
commit 4c6213cd01
6 changed files with 24 additions and 3 deletions

View File

@ -25,6 +25,7 @@
<vn-auto pad-medium> <vn-auto pad-medium>
<h6>{{$ctrl.item.name}}</h6> <h6>{{$ctrl.item.name}}</h6>
<div><vn-label translate>Id</vn-label> {{$ctrl.item.id}}</div> <div><vn-label translate>Id</vn-label> {{$ctrl.item.id}}</div>
<div><vn-label translate>Buyer</vn-label> {{$ctrl.item.itemType.worker.firstName}}</div>
<div ng-repeat="itemTag in $ctrl.itemTags | limitTo:4"> <div ng-repeat="itemTag in $ctrl.itemTags | limitTo:4">
<div><vn-label translate>{{$ctrl.tags[itemTag.tagFk].name}}</vn-label> {{itemTag.value}}</div> <div><vn-label translate>{{$ctrl.tags[itemTag.tagFk].name}}</vn-label> {{itemTag.value}}</div>
</div> </div>

View File

@ -15,8 +15,9 @@
<div><vn-label translate>Description</vn-label> {{::$ctrl.item.description}}</div> <div><vn-label translate>Description</vn-label> {{::$ctrl.item.description}}</div>
<div><vn-label translate>Size</vn-label> {{::$ctrl.item.size}}</div> <div><vn-label translate>Size</vn-label> {{::$ctrl.item.size}}</div>
<div><vn-label translate>Type</vn-label> {{::$ctrl.item.itemType.name}}</div> <div><vn-label translate>Type</vn-label> {{::$ctrl.item.itemType.name}}</div>
<div><vn-label translate>Buyer</vn-label> {{::$ctrl.item.itemType.worker.firstName}} {{::$ctrl.item.itemType.worker.name}}</div>
</vn-one> </vn-one>
<vn-horizontal class="buttons"s> <vn-horizontal class="buttons">
<vn-icon <vn-icon
ng-click="$ctrl.clone($event)" ng-click="$ctrl.clone($event)"
vn-tooltip="Clone" vn-tooltip="Clone"

View File

@ -35,3 +35,10 @@ Warehouse: Almacén
Code: Código Code: Código
Botanical: Botánico Botanical: Botánico
Species: Especie Species: Especie
Add tag: Añadir etiqueta
Remove tag: Quitar etiqueta
Add niche: Añadir nicho
Remove niche: Quitar nicho
Add barcode: Añadir código de barras
Remove barcode: Quitar código de barras
Buyer: Comprador

View File

@ -28,6 +28,7 @@
<p><span translate>Relevancy</span>: <b>{{$ctrl.item.relevancy}}</b></p> <p><span translate>Relevancy</span>: <b>{{$ctrl.item.relevancy}}</b></p>
<p><span translate>Origin</span>: <b>{{$ctrl.item.origin.name}}</b></p> <p><span translate>Origin</span>: <b>{{$ctrl.item.origin.name}}</b></p>
<p><span translate>Expence</span>: <b>{{$ctrl.item.expence.name}}</b></p> <p><span translate>Expence</span>: <b>{{$ctrl.item.expence.name}}</b></p>
<p><span translate>Buyer</span>: <b>{{$ctrl.item.itemType.worker.firstName}} {{$ctrl.item.itemType.worker.name}}</b></p>
</vn-vertical> </vn-vertical>
</vn-one> </vn-one>
<vn-one margin-medium> <vn-one margin-medium>

View File

@ -10,7 +10,11 @@ module.exports = Self => {
include: { include: {
relation: 'itemType', relation: 'itemType',
scope: { scope: {
fields: ['id', 'name'] fields: ['id', 'name', 'workerFk'],
include: {
relation: 'worker',
fields: ['firstName', 'name']
}
} }
} }
}; };

View File

@ -22,6 +22,13 @@
"type": "Number" "type": "Number"
} }
}, },
"relations": {
"worker": {
"type": "belongsTo",
"model": "Worker",
"foreignKey": "workerFk"
}
},
"acls": [ "acls": [
{ {
"accessType": "READ", "accessType": "READ",