From bfad7a9a83e6efe7ecb17f007dae1a0d6ec3cef5 Mon Sep 17 00:00:00 2001 From: Gerard Date: Mon, 16 Apr 2018 13:47:16 +0200 Subject: [PATCH] =?UTF-8?q?Tarea=20#240=20A=C3=B1adir=20comprador?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/item/src/card/card.js | 10 +++++++++- client/item/src/descriptor/descriptor.html | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/client/item/src/card/card.js b/client/item/src/card/card.js index 1c194acd3..7ffd581ac 100644 --- a/client/item/src/card/card.js +++ b/client/item/src/card/card.js @@ -32,7 +32,15 @@ class ItemCard { _getItem() { let filter = { include: [ - {relation: "itemType"}, + {relation: "itemType", + scope: { + fields: ['name', 'workerFk'], + include: { + relation: 'worker', + fields: ['firstName', 'name'] + } + } + }, {relation: "origin"}, {relation: "ink"}, {relation: "producer"}, diff --git a/client/item/src/descriptor/descriptor.html b/client/item/src/descriptor/descriptor.html index eacaafce5..be9c25415 100644 --- a/client/item/src/descriptor/descriptor.html +++ b/client/item/src/descriptor/descriptor.html @@ -25,7 +25,7 @@
{{$ctrl.item.name}}
Id {{$ctrl.item.id}}
-
Buyer {{$ctrl.item.itemType.worker.firstName}}
+
Buyer {{$ctrl.item.itemType.worker.firstName}} {{$ctrl.item.itemType.worker.name}}
{{$ctrl.tags[itemTag.tagFk].name}} {{itemTag.value}}