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:
@@ -12,7 +12,11 @@ using { sap.capire.bookshop.Books } from '@capire/bookshop';
|
|||||||
using { ReviewsService.Reviews } from '@capire/reviews';
|
using { ReviewsService.Reviews } from '@capire/reviews';
|
||||||
extend Books with {
|
extend Books with {
|
||||||
reviews : Composition of many Reviews on reviews.subject = $self.ID;
|
reviews : Composition of many Reviews on reviews.subject = $self.ID;
|
||||||
|
|
||||||
|
@Common.Label : '{i18n>Rating}'
|
||||||
rating : Decimal;
|
rating : Decimal;
|
||||||
|
|
||||||
|
@Common.Label : '{i18n>NumberOfReviews}'
|
||||||
numberOfReviews : Integer;
|
numberOfReviews : Integer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ Author = Author
|
|||||||
AuthorID = Author ID
|
AuthorID = Author ID
|
||||||
Stock = Stock
|
Stock = Stock
|
||||||
Name = Name
|
Name = Name
|
||||||
|
Description = Description
|
||||||
|
Image = Image
|
||||||
AuthorName = Author's Name
|
AuthorName = Author's Name
|
||||||
DateOfBirth = Date of Birth
|
DateOfBirth = Date of Birth
|
||||||
DateOfDeath = Date of Death
|
DateOfDeath = Date of Death
|
||||||
@@ -17,6 +19,9 @@ Authors = Authors
|
|||||||
Order = Order
|
Order = Order
|
||||||
Orders = Orders
|
Orders = Orders
|
||||||
Price = Price
|
Price = Price
|
||||||
|
Currency = Currency
|
||||||
|
Rating = Rating
|
||||||
|
NumberOfReviews = Number of Reviews
|
||||||
|
|
||||||
Genre = Genre
|
Genre = Genre
|
||||||
Genres = Genres
|
Genres = Genres
|
||||||
|
|||||||
@@ -52,9 +52,6 @@ annotate CatalogService.Books with @(UI : {
|
|||||||
},
|
},
|
||||||
{Value : genre.name},
|
{Value : genre.name},
|
||||||
{Value : price},
|
{Value : price},
|
||||||
{
|
{Value : currency.symbol},
|
||||||
Value : currency.symbol,
|
|
||||||
Label : ' '
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
}, );
|
}, );
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
using { sap.capire.bookshop as my } from '@capire/bookstore';
|
using { sap.capire.bookshop as my } from '@capire/bookstore';
|
||||||
using { sap.common } from '@capire/common';
|
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: genre.name },
|
||||||
{ Value: stock },
|
{ Value: stock },
|
||||||
{ Value: price },
|
{ Value: price },
|
||||||
{ Value: currency.symbol, Label: ' ' },
|
{ Value: currency.symbol },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
@@ -37,6 +38,10 @@ annotate my.Books with @(
|
|||||||
author @ValueList.entity : 'Authors';
|
author @ValueList.entity : 'Authors';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
annotate Currencies with {
|
||||||
|
symbol @Common.Label : '{i18n>Currency}';
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Books Details
|
// Books Details
|
||||||
@@ -60,7 +65,8 @@ annotate my.Books with {
|
|||||||
author @title: '{i18n>Author}' @Common: { Text: author.name, TextArrangement: #TextOnly };
|
author @title: '{i18n>Author}' @Common: { Text: author.name, TextArrangement: #TextOnly };
|
||||||
price @title: '{i18n>Price}' @Measures.ISOCurrency : currency_code;
|
price @title: '{i18n>Price}' @Measures.ISOCurrency : currency_code;
|
||||||
stock @title: '{i18n>Stock}';
|
stock @title: '{i18n>Stock}';
|
||||||
descr @UI.MultiLineText;
|
descr @title: '{i18n>Description}' @UI.MultiLineText;
|
||||||
|
image @title: '{i18n>Image}';
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user