From 39b797c31aa8d0076e6c5e011652737bb5f91156 Mon Sep 17 00:00:00 2001 From: Marc Becker Date: Wed, 16 Apr 2025 14:23:12 +0200 Subject: [PATCH] Fix Manage Books UI Use author_ID, as this brings proper text representation and also holds Value Helps. Fixes https://github.com/SAP-samples/cloud-cap-samples-java/issues/474 --- app/admin/fiori-service.cds | 2 -- app/browse/fiori-service.cds | 2 +- app/common.cds | 7 ++----- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/admin/fiori-service.cds b/app/admin/fiori-service.cds index 75ed712e..2c9758c3 100644 --- a/app/admin/fiori-service.cds +++ b/app/admin/fiori-service.cds @@ -45,8 +45,6 @@ annotate AdminService.Books with @(UI : { } ], FieldGroup #General : {Data : [ - {Value : title}, - {Value : author_ID}, {Value : genre_ID}, {Value : descr}, ]}, diff --git a/app/browse/fiori-service.cds b/app/browse/fiori-service.cds index 07ecb564..fc6e1e59 100644 --- a/app/browse/fiori-service.cds +++ b/app/browse/fiori-service.cds @@ -13,7 +13,7 @@ annotate CatalogService.Books with @(UI : { TypeName : '{i18n>Book}', TypeNamePlural : '{i18n>Books}', Title : {Value : title}, - Description : {Value : author.name} + Description : {Value : author_ID} }, Identification : [ {Value : title}, diff --git a/app/common.cds b/app/common.cds index f9df40b2..3f0e2d9c 100644 --- a/app/common.cds +++ b/app/common.cds @@ -23,10 +23,7 @@ annotate my.Books with LineItem : [ {Value : ID}, {Value : title}, - { - Value : author.name, - Label : '{i18n>Author}' - }, + {Value : author_ID}, {Value : genre.name}, {Value : stock}, {Value : price}, @@ -57,7 +54,7 @@ annotate my.Books with TypeNamePlural : '{i18n>Books}', TypeImageUrl : 'sap-icon://course-book', Title : {Value : title}, - Description : {Value : author.name} + Description : {Value : author_ID} }, });