diff --git a/fiori/app/authors/fiori-service.cds b/fiori/app/authors/fiori-service.cds new file mode 100644 index 00000000..c3b0ec1a --- /dev/null +++ b/fiori/app/authors/fiori-service.cds @@ -0,0 +1,46 @@ +using CatalogService from '@capire/bookshop'; + +//////////////////////////////////////////////////////////////////////////// +// +// Authors Object Page +// +annotate CatalogService.Authors with @(UI : { + HeaderInfo : { + TypeName : 'Author', + TypeNamePlural : 'Authors', + Description : {Value : name} + }, + HeaderFacets : [{ + $Type : 'UI.ReferenceFacet', + Label : '{i18n>Description}', + Target : '@UI.FieldGroup#Descr' + }, ], + Facets : [{ + $Type : 'UI.ReferenceFacet', + Label : '{i18n>Details}', + Target : 'books/@UI.LineItem' + }, ], + FieldGroup #Descr : {Data : [ + {Value : name}, + {Value : dateOfBirth}, + {Value : dateOfDeath}, + {Value : placeOfBirth}, + {Value : placeOfDeath}, + ]}, +}); + + +//////////////////////////////////////////////////////////////////////////// +// +// Authors List Page +// +annotate CatalogService.Authors with @(UI : { + SelectionFields : [ + ID, + name, + ], + LineItem : [ + {Value : ID}, + {Value : name}, + ] +}, ); diff --git a/fiori/app/services.cds b/fiori/app/services.cds index e59f69f8..6f96e3b9 100644 --- a/fiori/app/services.cds +++ b/fiori/app/services.cds @@ -4,6 +4,6 @@ using from './admin/fiori-service'; using from './browse/fiori-service'; +using from './authors/fiori-service'; using from './common'; - using from '@capire/bookstore/srv/mashup';