Fiori app *Browse Books*: Add missing column labels (#420)

* Add labels for `rating` and `numberOfReviews`
* Add label for `currency.symbol`
* Add label for `descr`
* Add label for `image`

Co-authored-by: Christian Georgi <chgeo@users.noreply.github.com>
This commit is contained in:
Pierre Fritsch
2022-11-08 14:26:48 +01:00
committed by GitHub
parent ad76c699c9
commit e4214b0e40
4 changed files with 18 additions and 6 deletions

View File

@@ -6,6 +6,8 @@ Author = Author
AuthorID = Author ID
Stock = Stock
Name = Name
Description = Description
Image = Image
AuthorName = Author's Name
DateOfBirth = Date of Birth
DateOfDeath = Date of Death
@@ -17,6 +19,9 @@ Authors = Authors
Order = Order
Orders = Orders
Price = Price
Currency = Currency
Rating = Rating
NumberOfReviews = Number of Reviews
Genre = Genre
Genres = Genres

View File

@@ -52,9 +52,6 @@ annotate CatalogService.Books with @(UI : {
},
{Value : genre.name},
{Value : price},
{
Value : currency.symbol,
Label : ' '
},
{Value : currency.symbol},
]
}, );

View File

@@ -4,6 +4,7 @@
using { sap.capire.bookshop as my } from '@capire/bookstore';
using { sap.common } from '@capire/common';
using { sap.common.Currencies } from '@sap/cds/common';
////////////////////////////////////////////////////////////////////////////
//
@@ -25,7 +26,7 @@ annotate my.Books with @(
{ Value: genre.name },
{ Value: stock },
{ Value: price },
{ Value: currency.symbol, Label: ' ' },
{ Value: currency.symbol },
]
}
) {
@@ -37,6 +38,10 @@ annotate my.Books with @(
author @ValueList.entity : 'Authors';
};
annotate Currencies with {
symbol @Common.Label : '{i18n>Currency}';
}
////////////////////////////////////////////////////////////////////////////
//
// Books Details
@@ -60,7 +65,8 @@ annotate my.Books with {
author @title: '{i18n>Author}' @Common: { Text: author.name, TextArrangement: #TextOnly };
price @title: '{i18n>Price}' @Measures.ISOCurrency : currency_code;
stock @title: '{i18n>Stock}';
descr @UI.MultiLineText;
descr @title: '{i18n>Description}' @UI.MultiLineText;
image @title: '{i18n>Image}';
}
////////////////////////////////////////////////////////////////////////////