Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c49454f44 | ||
|
|
d570ad20b2 | ||
|
|
d891a1b905 | ||
|
|
9f604b9d13 |
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -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 @(
|
||||||
|
|||||||
|
500 Internal Server Error
Gitea Version: 1.24.4 |