@@ -46,11 +46,11 @@ annotate TravelService.Travel with @UI : {
4646 @ UI . Importance : # High
4747 },
4848 {
49- Value : to_Agency_AgencyID ,
49+ Value : ( to_Agency . AgencyID ) ,
5050 @ HTML5 . CssDefaults : {width : ' 16em ' }
5151 },
5252 {
53- Value : to_Customer_CustomerID ,
53+ Value : ( to_Customer . CustomerID ) ,
5454 @ UI . Importance : # High ,
5555 @ HTML5 . CssDefaults : {width : ' 14em ' }
5656 },
@@ -59,9 +59,8 @@ annotate TravelService.Travel with @UI : {
5959 { Value : BookingFee , @ HTML5 . CssDefaults : {width : ' 10em ' } },
6060 { Value : TotalPrice , @ HTML5 . CssDefaults : {width : ' 12em ' } },
6161 {
62- Value : TravelStatus_code ,
63- Criticality : { $edmJson : { $If : [{$Eq : [{ $Path : ' TravelStatus_code ' }, ' O' ]}, 2,
64- { $If : [{$Eq : [{ $Path : ' TravelStatus_code ' }, ' A' ]}, 3, 0] }] } },
62+ Value : (TravelStatus . code ),
63+ Criticality : (TravelStatus . code = #Open ? 2 : (TravelStatus . code = #Accepted ? 3 : 0 )),
6564 @UI.Importance : #High,
6665 @HTML5.CssDefaults: {width:'10em'}
6766 }
@@ -99,14 +98,13 @@ annotate TravelService.Travel with @UI : {
9998 }],
10099 FieldGroup#TravelData : { Data : [
101100 { Value : TravelID },
102- { Value : to_Agency_AgencyID },
103- { Value : to_Customer_CustomerID },
101+ { Value : (to_Agency.AgencyID) },
102+ { Value : (to_Customer.CustomerID) },
104103 { Value : Description },
105104 {
106105 $Type : 'UI.DataField',
107- Value : TravelStatus_code ,
108- Criticality : { $edmJson : { $If : [{$Eq : [{ $Path : ' TravelStatus_code ' }, ' O' ]}, 2,
109- { $If : [{$Eq : [{ $Path : ' TravelStatus_code ' }, ' A' ]}, 3, 0] }] } },
106+ Value : (TravelStatus.code),
107+ Criticality : (TravelStatus.code = #Open ? 2 : (TravelStatus.code = #Accepted ? 3 : 0 )),
110108 Label : '{i18n>Status}' // label only necessary if differs from title of element
111109 }
112110 ]},
@@ -117,7 +115,7 @@ annotate TravelService.Travel with @UI : {
117115 FieldGroup #PriceData : {Data : [
118116 { $Type : 'UI.DataField', Value : BookingFee },
119117 { $Type : 'UI.DataField', Value : TotalPrice },
120- { $Type : ' UI.DataField ' , Value : CurrencyCode_code }
118+ { $Type : 'UI.DataField', Value : (CurrencyCode.code) }
121119 ]},
122120 FieldGroup #i18nSustainability: {
123121 $Type: 'UI.FieldGroupType',
@@ -161,14 +159,13 @@ annotate TravelService.Booking with @UI : {
161159 { Value : to_Carrier.AirlinePicURL, Label : ' '},
162160 { Value : BookingID },
163161 { Value : BookingDate },
164- { Value : to_Customer_CustomerID },
165- { Value : to_Carrier_AirlineID },
162+ { Value : (to_Customer.CustomerID) },
163+ { Value : (to_Carrier.AirlineID ) },
166164 { Value : ConnectionID, Label : '{i18n>FlightNumber}' },
167165 { Value : FlightDate },
168166 { Value : FlightPrice },
169- { Value : BookingStatus_code ,
170- Criticality : { $edmJson : { $If : [{$Eq : [{ $Path : ' BookingStatus_code ' }, ' N' ]}, 2,
171- { $If : [{$Eq : [{ $Path : ' BookingStatus_code ' }, ' B' ]}, 3, 0] }] } }
167+ { Value : (BookingStatus.code),
168+ Criticality : (BookingStatus.code = #New ? 2 : (BookingStatus.code = #Booked ? 3 : 0 )),
172169 }
173170 ],
174171 Facets : [{
@@ -195,15 +192,14 @@ annotate TravelService.Booking with @UI : {
195192 FieldGroup #GeneralInformation : { Data : [
196193 { Value : BookingID },
197194 { Value : BookingDate, },
198- { Value : to_Customer_CustomerID },
195+ { Value : (to_Customer.CustomerID) },
199196 { Value : BookingDate, },
200- { Value : BookingStatus_code ,
201- Criticality : { $edmJson : { $If : [{$Eq : [{ $Path : ' BookingStatus_code ' }, ' N' ]}, 2,
202- { $If : [{$Eq : [{ $Path : ' BookingStatus_code ' }, ' B' ]}, 3, 0] }] } }
197+ { Value : (BookingStatus.code),
198+ Criticality : (BookingStatus.code = #New ? 2 : (BookingStatus.code = #Booked ? 3 : 0 )),
203199 }
204200 ]},
205201 FieldGroup #Flight : { Data : [
206- { Value : to_Carrier_AirlineID },
202+ { Value : (to_Carrier.AirlineID) },
207203 { Value : ConnectionID },
208204 { Value : FlightDate },
209205 { Value : FlightPrice }
@@ -231,7 +227,7 @@ annotate TravelService.BookingSupplement with @UI : {
231227 },
232228 LineItem : [
233229 { Value : BookingSupplementID },
234- { Value : to_Supplement_SupplementID , Label : ' {i18n>ProductID} ' },
235- { Value : Price , Label : ' {i18n>ProductPrice} ' }
230+ { Value : (to_Supplement.SupplementID) , Label : '{i18n>ProductID}' },
231+ { Value : Price, Label : '{i18n>ProductPrice}' }
236232 ],
237233};
0 commit comments