cosmetics
This commit is contained in:
@@ -33,7 +33,7 @@ annotate CatalogService.Books with @(UI : {
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Books Object Page
|
// Books List Page
|
||||||
//
|
//
|
||||||
annotate CatalogService.Books with @(UI : {
|
annotate CatalogService.Books with @(UI : {
|
||||||
SelectionFields : [
|
SelectionFields : [
|
||||||
|
|||||||
@@ -20,21 +20,12 @@ annotate my.Books with @(
|
|||||||
currency_code
|
currency_code
|
||||||
],
|
],
|
||||||
LineItem : [
|
LineItem : [
|
||||||
{
|
{ Value: ID, Label: '{i18n>Title}' },
|
||||||
Value : ID,
|
{ Value: author.ID, Label: '{i18n>Author}' },
|
||||||
Label : '{i18n>Title}'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
Value : author.ID,
|
|
||||||
Label : '{i18n>Author}'
|
|
||||||
},
|
|
||||||
{ Value: genre.name },
|
{ Value: genre.name },
|
||||||
{ Value: stock },
|
{ Value: stock },
|
||||||
{ Value: price },
|
{ Value: price },
|
||||||
{
|
{ Value: currency.symbol, Label: ' ' },
|
||||||
Value : currency.symbol,
|
|
||||||
Label : ' '
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
@@ -65,14 +56,8 @@ annotate my.Books with @(UI : {HeaderInfo : {
|
|||||||
annotate my.Books with {
|
annotate my.Books with {
|
||||||
ID @title: '{i18n>ID}';
|
ID @title: '{i18n>ID}';
|
||||||
title @title: '{i18n>Title}';
|
title @title: '{i18n>Title}';
|
||||||
genre @title : '{i18n>Genre}' @Common : {
|
genre @title: '{i18n>Genre}' @Common: { Text: genre.name, TextArrangement: #TextOnly };
|
||||||
Text : genre.name,
|
author @title: '{i18n>Author}' @Common: { Text: author.name, TextArrangement: #TextOnly };
|
||||||
TextArrangement : #TextOnly
|
|
||||||
};
|
|
||||||
author @title : '{i18n>Author}' @Common : {
|
|
||||||
Text : author.name,
|
|
||||||
TextArrangement : #TextOnly
|
|
||||||
};
|
|
||||||
price @title: '{i18n>Price}' @Measures.ISOCurrency : currency_code;
|
price @title: '{i18n>Price}' @Measures.ISOCurrency : currency_code;
|
||||||
stock @title: '{i18n>Stock}';
|
stock @title: '{i18n>Stock}';
|
||||||
descr @UI.MultiLineText;
|
descr @UI.MultiLineText;
|
||||||
|
|||||||
@@ -16,11 +16,12 @@ using { OrdersService } from '../srv/orders-service';
|
|||||||
@odata.draft.enabled
|
@odata.draft.enabled
|
||||||
annotate OrdersService.Orders with @(
|
annotate OrdersService.Orders with @(
|
||||||
UI: {
|
UI: {
|
||||||
SelectionFields: [ createdAt, createdBy ],
|
SelectionFields: [ createdBy ],
|
||||||
LineItem: [
|
LineItem: [
|
||||||
{Value: OrderNo, Label:'OrderNo'},
|
{Value: OrderNo, Label:'OrderNo'},
|
||||||
{Value: buyer, Label:'Customer'},
|
{Value: buyer, Label:'Customer'},
|
||||||
{Value: createdAt, Label:'Date'}
|
{Value: currency.symbol, Label:'Currency'},
|
||||||
|
{Value: createdAt, Label:'Date'},
|
||||||
],
|
],
|
||||||
HeaderInfo: {
|
HeaderInfo: {
|
||||||
TypeName: 'Order', TypeNamePlural: 'Orders',
|
TypeName: 'Order', TypeNamePlural: 'Orders',
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
applications: {
|
applications: {
|
||||||
"manage-orders": {
|
"manage-orders": {
|
||||||
title: "Manage Orders",
|
title: "Manage Orders",
|
||||||
description: "... testing FE v42",
|
description: "CAP Sample App",
|
||||||
additionalInformation: "SAPUI5.Component=orders",
|
additionalInformation: "SAPUI5.Component=orders",
|
||||||
applicationType : "URL",
|
applicationType : "URL",
|
||||||
url: "/orders/webapp",
|
url: "/orders/webapp",
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
"sap.app": {
|
"sap.app": {
|
||||||
"id": "orders",
|
"id": "orders",
|
||||||
"type": "application",
|
"type": "application",
|
||||||
"title": "Order Books",
|
"title": "Order Management",
|
||||||
"description": "Sample Application",
|
"description": "CAP Sample Application",
|
||||||
"i18n": "i18n/i18n.properties",
|
"i18n": "i18n/i18n.properties",
|
||||||
"dataSources": {
|
"dataSources": {
|
||||||
"OrdersService": {
|
"OrdersService": {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ using { Currency, User, managed, cuid } from '@sap/cds/common';
|
|||||||
namespace sap.capire.orders;
|
namespace sap.capire.orders;
|
||||||
|
|
||||||
entity Orders : cuid, managed {
|
entity Orders : cuid, managed {
|
||||||
OrderNo : String @title:'Order Number'; //> readable key
|
OrderNo : String(22) @title:'Order Number'; //> readable key
|
||||||
Items : Composition of many {
|
Items : Composition of many {
|
||||||
key ID : UUID;
|
key ID : UUID;
|
||||||
product : Association to Products;
|
product : Association to Products;
|
||||||
|
|||||||
Reference in New Issue
Block a user