Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exercise 4 - Page Map: Configuring the Object Page Layout #5

Draft
wants to merge 1 commit into
base: ex3
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions app/managetravels/annotations.cds
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,112 @@ annotate service.Travel with @(
},
}
);
annotate service.Travel with @(
UI.Identification : [
{
$Type : 'UI.DataFieldForAction',
Action : 'TravelService.rejectTravel',
Label : '{i18n>Rejecttravel}',
},
{
$Type : 'UI.DataFieldForAction',
Action : 'TravelService.acceptTravel',
Label : '{i18n>Accepttravel}',
},
]
);
annotate service.Travel with @(
UI.Facets : [
{
$Type : 'UI.CollectionFacet',
Label : '{i18n>Travel}',
ID : 'Travel',
Facets : [
{
$Type : 'UI.ReferenceFacet',
Label : '{i18n>Travel}',
ID : 'i18nTravel',
Target : '@UI.FieldGroup#i18nTravel',
},
{
$Type : 'UI.ReferenceFacet',
Label : '{i18n>Prices}',
ID : 'i18nPrices',
Target : '@UI.FieldGroup#i18nPrices',
},
{
$Type : 'UI.ReferenceFacet',
Label : '{i18n>Dates}',
ID : 'Dates',
Target : '@UI.FieldGroup#Dates',
},
{
$Type : 'UI.ReferenceFacet',
Label : '{i18n>Sustainability}',
ID : 'i18nSustainability',
Target : '@UI.FieldGroup#i18nSustainability',
},],
},
]
);
annotate service.Travel with @(
UI.FieldGroup #i18nTravel : {
$Type : 'UI.FieldGroupType',
Data : [
{
$Type : 'UI.DataField',
Value : TravelID,
},{
$Type : 'UI.DataField',
Value : to_Agency_AgencyID,
},{
$Type : 'UI.DataField',
Value : to_Customer_CustomerID,
},{
$Type : 'UI.DataField',
Value : TravelStatus_code,
},],
}
);
annotate service.Travel with @(
UI.FieldGroup #i18nPrices : {
$Type : 'UI.FieldGroupType',
Data : [
{
$Type : 'UI.DataField',
Value : BookingFee,
},{
$Type : 'UI.DataField',
Value : TotalPrice,
},],
}
);
annotate service.Travel with @(
UI.FieldGroup #Dates : {
$Type : 'UI.FieldGroupType',
Data : [
{
$Type : 'UI.DataField',
Value : BeginDate,
},{
$Type : 'UI.DataField',
Value : EndDate,
},],
}
);
annotate service.Travel with @(
UI.FieldGroup #i18nSustainability : {
$Type : 'UI.FieldGroupType',
Data : [
{
$Type : 'UI.DataField',
Value : GoGreen,
},{
$Type : 'UI.DataField',
Value : GreenFee,
},{
$Type : 'UI.DataField',
Value : TreesPlanted,
},],
}
);