...
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
using AdminService from '@sap/capire-bookshop/srv/admin-service';
|
||||
using AdminService from '@capire/bookshop/srv/admin-service';
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Books Object Page
|
||||
//
|
||||
|
||||
annotate AdminService.Books with @(
|
||||
UI: {
|
||||
Facets: [
|
||||
{$Type: 'UI.ReferenceFacet', Label: '{i18n>General}', Target: '@UI.FieldGroup#General'},
|
||||
{$Type: 'UI.ReferenceFacet', Label: '{i18n>Translations}', Target: 'texts/@UI.LineItem'},
|
||||
{$Type: 'UI.ReferenceFacet', Label: '{i18n>Details}', Target: '@UI.FieldGroup#Details'},
|
||||
{$Type: 'UI.ReferenceFacet', Label: '{i18n>Admin}', Target: '@UI.FieldGroup#Admin'},
|
||||
],
|
||||
@@ -15,6 +17,7 @@ annotate AdminService.Books with @(
|
||||
Data: [
|
||||
{Value: title},
|
||||
{Value: author_ID},
|
||||
{Value: genre_ID},
|
||||
{Value: descr},
|
||||
]
|
||||
},
|
||||
@@ -35,3 +38,35 @@ annotate AdminService.Books with @(
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Draft for Localized Data
|
||||
//
|
||||
|
||||
annotate sap.capire.bookshop.Books with @fiori.draft.enabled;
|
||||
annotate AdminService.Books with @odata.draft.enabled;
|
||||
|
||||
annotate AdminService.Books_texts with @(
|
||||
UI: {
|
||||
Identification: [{Value:title}],
|
||||
SelectionFields: [ locale, title ],
|
||||
LineItem: [
|
||||
{Value: locale, Label: 'Locale'},
|
||||
{Value: title, Label: 'Title'},
|
||||
{Value: descr, Label: 'Description'},
|
||||
]
|
||||
}
|
||||
);
|
||||
|
||||
// Add Value Help for Locales
|
||||
annotate AdminService.Books_texts {
|
||||
locale @ValueList:{entity:'Languages',type:#fixed}
|
||||
}
|
||||
// In addition we need to expose Languages through AdminService
|
||||
using { sap } from '@sap/cds/common';
|
||||
extend service AdminService {
|
||||
entity Languages as projection on sap.common.Languages;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CatalogService from '@sap/capire-bookshop/srv/cat-service';
|
||||
using CatalogService from '@capire/bookshop/srv/cat-service';
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -40,6 +40,7 @@ annotate CatalogService.Books with @(
|
||||
LineItem: [
|
||||
{Value: title},
|
||||
{Value: author, Label:'{i18n>Author}'},
|
||||
{Value: genre.name},
|
||||
{Value: price},
|
||||
{Value: currency.symbol, Label:' '},
|
||||
]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Common Annotations shared by all apps
|
||||
*/
|
||||
|
||||
using { sap.capire.bookshop as my } from '@sap/capire-bookshop/db/schema';
|
||||
using { sap.capire.bookshop as my } from '@capire/bookshop/db/schema';
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
@@ -17,6 +17,7 @@ annotate my.Books with @(
|
||||
{Value: ID},
|
||||
{Value: title},
|
||||
{Value: author.name, Label:'{i18n>Author}'},
|
||||
{Value: genre.name},
|
||||
{Value: stock},
|
||||
{Value: price},
|
||||
{Value: currency.symbol, Label:' '},
|
||||
@@ -57,12 +58,16 @@ annotate my.Books with @(
|
||||
annotate my.Books with {
|
||||
ID @title:'{i18n>ID}' @UI.HiddenFilter;
|
||||
title @title:'{i18n>Title}';
|
||||
genre @title:'{i18n>Genre}';
|
||||
author @title:'{i18n>AuthorID}';
|
||||
price @title:'{i18n>Price}';
|
||||
stock @title:'{i18n>Stock}';
|
||||
descr @UI.MultiLineText;
|
||||
}
|
||||
|
||||
annotate my.Genres with {
|
||||
name @title: '{i18n>Genre}';
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
@@ -7,4 +7,4 @@ using from './browse/fiori-service';
|
||||
using from './orders/fiori-service';
|
||||
using from './common';
|
||||
|
||||
using from '@sap/capire-common';
|
||||
using from '@capire/common';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using AdminService from '@sap/capire-bookshop/srv/admin-service';
|
||||
using AdminService from '@capire/bookshop/srv/admin-service';
|
||||
|
||||
annotate AdminService.Books with {
|
||||
price @Common.FieldControl: #ReadOnly;
|
||||
|
||||
Reference in New Issue
Block a user