Skip to content

Commit

Permalink
hide starting and end dates for canceled travels
Browse files Browse the repository at this point in the history
  • Loading branch information
TanyaMedvedeva authored and hitesh-parmar committed Apr 9, 2024
1 parent 207c5e2 commit 798b3f0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
10 changes: 6 additions & 4 deletions app/travel_processor/layouts.cds
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,14 @@ annotate TravelService.Travel with @UI: {
{Value: to_Customer_CustomerID},
{Value: Description},
{
$Type: 'UI.DataField',
Value: BeginDate,
$Type : 'UI.DataField',
Value : BeginDate,
![@UI.Hidden]: TravelStatus.cancelRestrictions
},
{
$Type: 'UI.DataField',
Value: EndDate,
$Type : 'UI.DataField',
Value : EndDate,
![@UI.Hidden]: TravelStatus.cancelRestrictions
}
]},
FieldGroup #DateData : {Data: [
Expand Down
8 changes: 4 additions & 4 deletions db/data/sap.fe.cap.travel-TravelStatus.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
code;name;criticality;fieldControl;createDeleteHidden;insertDeleteRestriction
O;Open;2;7;0;1
A;Accepted;3;1;1;0
X;Canceled;0;7;1;0
code;name;criticality;fieldControl;createDeleteHidden;insertDeleteRestriction;cancelRestrictions
O;Open;2;7;0;1;0
A;Accepted;3;1;1;0;0
X;Canceled;0;7;1;0;1
1 change: 1 addition & 0 deletions db/schema.cds
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ entity TravelStatus : CodeList {
fieldControl: Integer @odata.Type:'Edm.Byte'; // 1: #ReadOnly, 7: #Mandatory
createDeleteHidden: Boolean;
insertDeleteRestriction: Boolean; // = NOT createDeleteHidden
cancelRestrictions: Boolean; // is true for cancelled travels
}

annotate Travel with @(
Expand Down

0 comments on commit 798b3f0

Please sign in to comment.