format, rename author to authorName

This commit is contained in:
Gregor Wolf
2021-11-12 21:28:23 +01:00
parent d376e6e063
commit 597afeb3d8

View File

@@ -4,47 +4,54 @@ using CatalogService from '@capire/bookshop';
// //
// Books Object Page // Books Object Page
// //
annotate CatalogService.Books with @( annotate CatalogService.Books with @(UI : {
UI: {
HeaderInfo : { HeaderInfo : {
TypeName : 'Book', TypeName : 'Book',
TypeNamePlural : 'Books', TypeNamePlural : 'Books',
Description: {Value: author} Description : {Value : authorName}
}, },
HeaderFacets: [ HeaderFacets : [{
{$Type: 'UI.ReferenceFacet', Label: '{i18n>Description}', Target: '@UI.FieldGroup#Descr'}, $Type : 'UI.ReferenceFacet',
], Label : '{i18n>Description}',
Facets: [ Target : '@UI.FieldGroup#Descr'
{$Type: 'UI.ReferenceFacet', Label: '{i18n>Details}', Target: '@UI.FieldGroup#Price'}, }, ],
], Facets : [{
FieldGroup#Descr: { $Type : 'UI.ReferenceFacet',
Data: [ Label : '{i18n>Details}',
{Value: descr}, Target : '@UI.FieldGroup#Price'
] }, ],
}, FieldGroup #Descr : {Data : [{Value : descr}, ]},
FieldGroup#Price: { FieldGroup #Price : {Data : [
Data: [
{Value : price}, {Value : price},
{Value: currency.symbol, Label: '{i18n>Currency}'}, {
] Value : currency.symbol,
Label : '{i18n>Currency}'
}, },
} ]},
); });
//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////
// //
// Books Object Page // Books Object Page
// //
annotate CatalogService.Books with @( annotate CatalogService.Books with @(UI : {
UI: { SelectionFields : [
SelectionFields: [ ID, price, currency_code ], ID,
price,
currency_code
],
LineItem : [ LineItem : [
{Value : title}, {Value : title},
{Value: author, Label:'{i18n>Author}'}, {
Value : authorName,
Label : '{i18n>Author}'
},
{Value : genre.name}, {Value : genre.name},
{Value : price}, {Value : price},
{Value: currency.symbol, Label:' '}, {
] Value : currency.symbol,
Label : ' '
}, },
); ]
}, );