Compare commits

...

4 Commits

Author SHA1 Message Date
Daniel
9c49454f44 . 2021-06-18 17:59:54 +02:00
Daniel
d570ad20b2 ... 2021-06-18 17:59:27 +02:00
Daniel
d891a1b905 .. 2021-06-18 17:15:59 +02:00
Daniel
9f604b9d13 . 2021-06-18 16:57:15 +02:00
8 changed files with 54 additions and 11 deletions

View File

@@ -19,7 +19,7 @@ extend Books with {
// Extend Orders with Books as Products // Extend Orders with Books as Products
// //
using { sap.capire.orders.Orders_Items } from '@capire/orders'; using { sap.capire.orders.Orders } from '@capire/orders';
extend Orders_Items with { extend Orders.Items with {
book : Association to Books on product.ID = book.ID book : Association to Books on product.ID = book.ID
} }

View File

@@ -1,2 +1,3 @@
cds.requires.messaging.kind = file-based-messaging cds.requires.messaging.kind = file-based-messaging
PORT = 4006 PORT = 4006
# cds.odata.flavor = x4

View File

@@ -11,6 +11,7 @@
using { OrdersService } from '../../srv/orders-service'; using { OrdersService } from '../../srv/orders-service';
using { sap.common } from '@capire/common';
@odata.draft.enabled @odata.draft.enabled
@@ -68,7 +69,7 @@ annotate OrdersService.Orders with @(
annotate OrdersService.Orders_Items with @( annotate OrdersService.Orders.Items with @(
UI: { UI: {
LineItem: [ LineItem: [
{Value: product_ID, Label:'Product ID'}, {Value: product_ID, Label:'Product ID'},
@@ -77,13 +78,22 @@ annotate OrdersService.Orders_Items with @(
{Value: amount, Label:'Quantity'}, {Value: amount, Label:'Quantity'},
], ],
Identification: [ //Is the main field group Identification: [ //Is the main field group
{Value: product_ID, Label:'Product ID'},
{Value: title, Label:'Product Title'},
{Value: amount, Label:'Amount'}, {Value: amount, Label:'Amount'},
{Value: title, Label:'Product'},
{Value: price, Label:'Unit Price'}, {Value: price, Label:'Unit Price'},
], ],
Facets: [ Facets: [
{$Type: 'UI.ReferenceFacet', Label: '{i18n>OrderItems}', Target: '@UI.Identification'}, {$Type: 'UI.ReferenceFacet', Label: '{i18n>OrderItems}', Target: '@UI.Identification'},
], ],
HeaderInfo: {
TypeName: 'Order Item', TypeNamePlural: 'Order Items',
Title: {
Label: 'Product ID ', //A label is possible but it is not considered on the ObjectPage yet
Value: product_ID
},
Description: {Value: createdBy}
},
}, },
) { ) {
amount @( amount @(

View File

Internal Server Error - Bruno's Gitea
500 Internal Server Error

Gitea Version: 1.24.4