This repository was archived by the owner on Aug 29, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +18
-6
lines changed Expand file tree Collapse file tree 4 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,11 @@ using { sap.capire.bookshop.Books } from '@capire/bookshop';
1212using { ReviewsService .Reviews } from ' @capire/reviews' ;
1313extend Books with {
1414 reviews : Composition of many Reviews on reviews .subject = $self .ID ;
15+
16+ @ Common . Label : ' {i18n>Rating} '
1517 rating : Decimal ;
18+
19+ @ Common . Label : ' {i18n>NumberOfReviews} '
1620 numberOfReviews : Integer ;
1721}
1822
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ Author = Author
66AuthorID = Author ID
77Stock = Stock
88Name = Name
9+ Description = Description
10+ Image = Image
911AuthorName = Author' s Name
1012DateOfBirth = Date of Birth
1113DateOfDeath = Date of Death
@@ -17,6 +19,9 @@ Authors = Authors
1719Order = Order
1820Orders = Orders
1921Price = Price
22+ Currency = Currency
23+ Rating = Rating
24+ NumberOfReviews = Number of Reviews
2025
2126Genre = Genre
2227Genres = Genres
Original file line number Diff line number Diff line change @@ -52,9 +52,6 @@ annotate CatalogService.Books with @(UI : {
5252 },
5353 {Value : genre . name },
5454 {Value : price },
55- {
56- Value : currency . symbol ,
57- Label : ' '
58- },
55+ {Value : currency . symbol },
5956 ]
6057}, );
Original file line number Diff line number Diff line change 44
55using { sap .capire .bookshop as my } from ' @capire/bookstore' ;
66using { sap .common } from ' @capire/common' ;
7+ using { sap .common .Currencies } from ' @sap/cds/common' ;
78
89////////////////////////////////////////////////////////////////////////////
910//
@@ -25,7 +26,7 @@ annotate my.Books with @(
2526 { Value : genre . name },
2627 { Value : stock },
2728 { Value : price },
28- { Value : currency . symbol , Label : ' ' },
29+ { Value : currency . symbol },
2930 ]
3031 }
3132) {
@@ -37,6 +38,10 @@ annotate my.Books with @(
3738 author @ ValueList . entity : ' Authors ' ;
3839};
3940
41+ annotate Currencies with {
42+ symbol @ Common . Label : ' {i18n>Currency} ' ;
43+ }
44+
4045////////////////////////////////////////////////////////////////////////////
4146//
4247// Books Details
@@ -60,7 +65,8 @@ annotate my.Books with {
6065 author @ title : ' {i18n>Author} ' @ Common : { Text : author . name , TextArrangement : # TextOnly };
6166 price @ title : ' {i18n>Price} ' @ Measures . ISOCurrency : currency_code ;
6267 stock @ title : ' {i18n>Stock} ' ;
63- descr @ UI . MultiLineText ;
68+ descr @ title : ' {i18n>Description} ' @ UI . MultiLineText ;
69+ image @ title : ' {i18n>Image} ' ;
6470}
6571
6672////////////////////////////////////////////////////////////////////////////
You can’t perform that action at this time.
0 commit comments