cosmetics

This commit is contained in:
Daniel
2022-10-04 11:48:01 +02:00
parent 92f7489def
commit ee2fdd0989
6 changed files with 173 additions and 187 deletions

View File

@@ -33,7 +33,7 @@ annotate CatalogService.Books with @(UI : {
////////////////////////////////////////////////////////////////////////////
//
// Books Object Page
// Books List Page
//
annotate CatalogService.Books with @(UI : {
SelectionFields : [

View File

@@ -12,7 +12,7 @@ using { sap.common } from '@capire/common';
annotate my.Books with @(
Common.SemanticKey : [ID],
UI : {
Identification : [{Value : title}],
Identification : [{ Value: title }],
SelectionFields : [
ID,
author_ID,
@@ -20,21 +20,12 @@ annotate my.Books with @(
currency_code
],
LineItem : [
{
Value : ID,
Label : '{i18n>Title}'
},
{
Value : author.ID,
Label : '{i18n>Author}'
},
{Value : genre.name},
{Value : stock},
{Value : price},
{
Value : currency.symbol,
Label : ' '
},
{ Value: ID, Label: '{i18n>Title}' },
{ Value: author.ID, Label: '{i18n>Author}' },
{ Value: genre.name },
{ Value: stock },
{ Value: price },
{ Value: currency.symbol, Label: ' ' },
]
}
) {
@@ -53,8 +44,8 @@ annotate my.Books with @(
annotate my.Books with @(UI : {HeaderInfo : {
TypeName : '{i18n>Book}',
TypeNamePlural : '{i18n>Books}',
Title : {Value : title},
Description : {Value : author.name}
Title : { Value: title },
Description : { Value: author.name }
}, });
@@ -63,18 +54,12 @@ annotate my.Books with @(UI : {HeaderInfo : {
// Books Elements
//
annotate my.Books with {
ID @title : '{i18n>ID}';
title @title : '{i18n>Title}';
genre @title : '{i18n>Genre}' @Common : {
Text : genre.name,
TextArrangement : #TextOnly
};
author @title : '{i18n>Author}' @Common : {
Text : author.name,
TextArrangement : #TextOnly
};
price @title : '{i18n>Price}' @Measures.ISOCurrency : currency_code;
stock @title : '{i18n>Stock}';
ID @title: '{i18n>ID}';
title @title: '{i18n>Title}';
genre @title: '{i18n>Genre}' @Common: { Text: genre.name, TextArrangement: #TextOnly };
author @title: '{i18n>Author}' @Common: { Text: author.name, TextArrangement: #TextOnly };
price @title: '{i18n>Price}' @Measures.ISOCurrency : currency_code;
stock @title: '{i18n>Stock}';
descr @UI.MultiLineText;
}
@@ -87,10 +72,10 @@ annotate my.Genres with @(
UI : {
SelectionFields : [name],
LineItem : [
{Value : name},
{ Value: name },
{
Value : parent.name,
Label : 'Main Genre'
Label: 'Main Genre'
},
],
}
@@ -101,12 +86,12 @@ annotate my.Genres with @(
// Genre Details
//
annotate my.Genres with @(UI : {
Identification : [{Value : name}],
Identification : [{ Value: name}],
HeaderInfo : {
TypeName : '{i18n>Genre}',
TypeNamePlural : '{i18n>Genres}',
Title : {Value : name},
Description : {Value : ID}
Title : { Value: name },
Description : { Value: ID }
},
Facets : [{
$Type : 'UI.ReferenceFacet',
@@ -120,8 +105,8 @@ annotate my.Genres with @(UI : {
// Genres Elements
//
annotate my.Genres with {
ID @title : '{i18n>ID}';
name @title : '{i18n>Genre}';
ID @title: '{i18n>ID}';
name @title: '{i18n>Genre}';
}
////////////////////////////////////////////////////////////////////////////
@@ -131,14 +116,14 @@ annotate my.Genres with {
annotate my.Authors with @(
Common.SemanticKey : [ID],
UI : {
Identification : [{Value : name}],
Identification : [{ Value: name}],
SelectionFields : [name],
LineItem : [
{Value : ID},
{Value : dateOfBirth},
{Value : dateOfDeath},
{Value : placeOfBirth},
{Value : placeOfDeath},
{ Value: ID },
{ Value: dateOfBirth },
{ Value: dateOfDeath },
{ Value: placeOfBirth },
{ Value: placeOfDeath },
],
}
) {
@@ -157,8 +142,8 @@ annotate my.Authors with @(UI : {
HeaderInfo : {
TypeName : '{i18n>Author}',
TypeNamePlural : '{i18n>Authors}',
Title : {Value : name},
Description : {Value : dateOfBirth}
Title : { Value: name },
Description : { Value: dateOfBirth }
},
Facets : [{
$Type : 'UI.ReferenceFacet',
@@ -172,12 +157,12 @@ annotate my.Authors with @(UI : {
// Authors Elements
//
annotate my.Authors with {
ID @title : '{i18n>ID}';
name @title : '{i18n>Name}';
dateOfBirth @title : '{i18n>DateOfBirth}';
dateOfDeath @title : '{i18n>DateOfDeath}';
placeOfBirth @title : '{i18n>PlaceOfBirth}';
placeOfDeath @title : '{i18n>PlaceOfDeath}';
ID @title: '{i18n>ID}';
name @title: '{i18n>Name}';
dateOfBirth @title: '{i18n>DateOfBirth}';
dateOfDeath @title: '{i18n>DateOfDeath}';
placeOfBirth @title: '{i18n>PlaceOfBirth}';
placeOfDeath @title: '{i18n>PlaceOfDeath}';
}
////////////////////////////////////////////////////////////////////////////
@@ -186,15 +171,15 @@ annotate my.Authors with {
//
annotate common.Languages with @(
Common.SemanticKey : [code],
Identification : [{Value : code}],
Identification : [{ Value: code}],
UI : {
SelectionFields : [
name,
descr
],
LineItem : [
{Value : code},
{Value : name},
{ Value: code },
{ Value: name },
],
}
);
@@ -207,8 +192,8 @@ annotate common.Languages with @(UI : {
HeaderInfo : {
TypeName : '{i18n>Language}',
TypeNamePlural : '{i18n>Languages}',
Title : {Value : name},
Description : {Value : descr}
Title : { Value: name },
Description : { Value: descr }
},
Facets : [{
$Type : 'UI.ReferenceFacet',
@@ -216,9 +201,9 @@ annotate common.Languages with @(UI : {
Target : '@UI.FieldGroup#Details'
}, ],
FieldGroup #Details : {Data : [
{Value : code},
{Value : name},
{Value : descr}
{ Value: code },
{ Value: name },
{ Value: descr }
]},
});
@@ -228,16 +213,16 @@ annotate common.Languages with @(UI : {
//
annotate common.Currencies with @(
Common.SemanticKey : [code],
Identification : [{Value : code}],
Identification : [{ Value: code}],
UI : {
SelectionFields : [
name,
descr
],
LineItem : [
{Value : descr},
{Value : symbol},
{Value : code},
{ Value: descr },
{ Value: symbol },
{ Value: code },
],
}
);
@@ -250,8 +235,8 @@ annotate common.Currencies with @(UI : {
HeaderInfo : {
TypeName : '{i18n>Currency}',
TypeNamePlural : '{i18n>Currencies}',
Title : {Value : descr},
Description : {Value : code}
Title : { Value: descr },
Description : { Value: code }
},
Facets : [
{
@@ -266,15 +251,15 @@ annotate common.Currencies with @(UI : {
},
],
FieldGroup #Details : {Data : [
{Value : name},
{Value : symbol},
{Value : code},
{Value : descr}
{ Value: name },
{ Value: symbol },
{ Value: code },
{ Value: descr }
]},
FieldGroup #Extended : {Data : [
{Value : numcode},
{Value : minor},
{Value : exponent}
{ Value: numcode },
{ Value: minor },
{ Value: exponent }
]},
});
@@ -283,7 +268,7 @@ annotate common.Currencies with @(UI : {
// Currencies Elements
//
annotate common.Currencies with {
numcode @title : '{i18n>NumCode}';
minor @title : '{i18n>MinorUnit}';
exponent @title : '{i18n>Exponent}';
numcode @title: '{i18n>NumCode}';
minor @title: '{i18n>MinorUnit}';
exponent @title: '{i18n>Exponent}';
}

View File

@@ -16,11 +16,12 @@ using { OrdersService } from '../srv/orders-service';
@odata.draft.enabled
annotate OrdersService.Orders with @(
UI: {
SelectionFields: [ createdAt, createdBy ],
SelectionFields: [ createdBy ],
LineItem: [
{Value: OrderNo, Label:'OrderNo'},
{Value: buyer, Label:'Customer'},
{Value: createdAt, Label:'Date'}
{Value: currency.symbol, Label:'Currency'},
{Value: createdAt, Label:'Date'},
],
HeaderInfo: {
TypeName: 'Order', TypeNamePlural: 'Orders',

View File

@@ -13,7 +13,7 @@
applications: {
"manage-orders": {
title: "Manage Orders",
description: "... testing FE v42",
description: "CAP Sample App",
additionalInformation: "SAPUI5.Component=orders",
applicationType : "URL",
url: "/orders/webapp",

View File

@@ -3,8 +3,8 @@
"sap.app": {
"id": "orders",
"type": "application",
"title": "Order Books",
"description": "Sample Application",
"title": "Order Management",
"description": "CAP Sample Application",
"i18n": "i18n/i18n.properties",
"dataSources": {
"OrdersService": {

View File

@@ -2,7 +2,7 @@ using { Currency, User, managed, cuid } from '@sap/cds/common';
namespace sap.capire.orders;
entity Orders : cuid, managed {
OrderNo : String @title:'Order Number'; //> readable key
OrderNo : String(22) @title:'Order Number'; //> readable key
Items : Composition of many {
key ID : UUID;
product : Association to Products;