Fiori extension project
This commit is contained in:
31
fiori-ext/app/extension.cds
Normal file
31
fiori-ext/app/extension.cds
Normal file
@@ -0,0 +1,31 @@
|
||||
using { sap.capire.orders, OrdersService, sap.common } from '@capire/fiori';
|
||||
// using { sap.common } from '@sap/cds/common'; //> TODO this creates duplicated definitions
|
||||
|
||||
namespace Z_bookshop.extension;
|
||||
|
||||
extend orders.Orders with {
|
||||
Z_priority : String @assert.range enum {high; medium; low} default 'medium' ;
|
||||
Z_SalesRegion : Association to Z_SalesRegion;
|
||||
}
|
||||
|
||||
entity Z_SalesRegion: common.CodeList {
|
||||
key regionCode : String(11);
|
||||
}
|
||||
|
||||
|
||||
// --- UI ---
|
||||
|
||||
annotate orders.Orders with {
|
||||
Z_priority @title : '{i18n>Orders_priority_col}'
|
||||
};
|
||||
|
||||
annotate Z_SalesRegion with {
|
||||
name @title : '{i18n>SalesRegion_name_col}'
|
||||
};
|
||||
|
||||
annotate OrdersService.Orders with @UI.LineItem : [
|
||||
... up to { Value: OrderNo },
|
||||
{ Value : Z_priority },
|
||||
{ Value : Z_SalesRegion.name },
|
||||
...
|
||||
];
|
||||
2
fiori-ext/app/i18n/i18n.properties
Normal file
2
fiori-ext/app/i18n/i18n.properties
Normal file
@@ -0,0 +1,2 @@
|
||||
SalesRegion_name_col = Sales Region
|
||||
Orders_priority_col = Priority
|
||||
Reference in New Issue
Block a user