Bugfix InventoryApp 32/116032/1
authorAijana Schumann <aijana.schumann@highstreet-technologies.com>
Wed, 2 Dec 2020 15:47:51 +0000 (16:47 +0100)
committerAijana Schumann <aijana.schumann@highstreet-technologies.com>
Wed, 2 Dec 2020 15:47:51 +0000 (16:47 +0100)
Fix treeview details not getting displayed

Issue-ID: CCSDK-2937
Signed-off-by: Aijana Schumann <aijana.schumann@highstreet-technologies.com>
Change-Id: Ic02e26144da0607126f034b25a0ccea22117266c

sdnr/wt/odlux/apps/inventoryApp/src/services/inventoryService.ts

index d43d298..cf25a40 100644 (file)
@@ -50,7 +50,7 @@ class InventoryService {
       }
     };
     const inventoryTreeElement = await requestRest<{
-      output: {
+      "data-provider:output": {
         "pagination": {
           "size": number,
           "page": number,
@@ -60,8 +60,8 @@ class InventoryService {
       }
     }>(path, { method: "POST", body: JSON.stringify(body) });
 
-    return inventoryTreeElement && inventoryTreeElement.output && inventoryTreeElement.output.pagination && inventoryTreeElement.output.pagination.total >= 1 &&
-      inventoryTreeElement.output.data && convertPropertyNames(inventoryTreeElement.output.data[0], replaceHyphen) || undefined;
+    return inventoryTreeElement && inventoryTreeElement["data-provider:output"] && inventoryTreeElement["data-provider:output"].pagination && inventoryTreeElement["data-provider:output"].pagination.total >= 1 &&
+      inventoryTreeElement["data-provider:output"].data && convertPropertyNames(inventoryTreeElement["data-provider:output"].data[0], replaceHyphen) || undefined;
    // return await getElement(id);
   }