UI Part 2
This commit is contained in:
@@ -10,3 +10,24 @@ Title=Title
|
|||||||
|
|
||||||
#XFLD,120: Label for a column title
|
#XFLD,120: Label for a column title
|
||||||
Customer=Customer
|
Customer=Customer
|
||||||
|
|
||||||
|
#XFLD,50: Label for a section
|
||||||
|
Overview=Overview
|
||||||
|
|
||||||
|
#XFLD,50: Label for a section
|
||||||
|
Details=Details
|
||||||
|
|
||||||
|
#XFLD,50: Label for a section
|
||||||
|
GeneralInformation=General Information
|
||||||
|
|
||||||
|
#XFLD,50: Section Label
|
||||||
|
Conversation=Conversation
|
||||||
|
|
||||||
|
#XFLD,120: Label for a column title
|
||||||
|
Author=Author
|
||||||
|
|
||||||
|
#XFLD,120: Label for a column title
|
||||||
|
Message=Message
|
||||||
|
|
||||||
|
#XFLD,120: Label for a column title
|
||||||
|
Date=Date
|
||||||
|
|||||||
@@ -5,33 +5,42 @@ annotate service.Incidents with @(
|
|||||||
UI.FieldGroup #GeneratedGroup : {
|
UI.FieldGroup #GeneratedGroup : {
|
||||||
$Type : 'UI.FieldGroupType',
|
$Type : 'UI.FieldGroupType',
|
||||||
Data : [
|
Data : [
|
||||||
{
|
|
||||||
$Type : 'UI.DataField',
|
|
||||||
Label : 'customer_ID',
|
|
||||||
Value : customer_ID,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
$Type : 'UI.DataField',
|
$Type : 'UI.DataField',
|
||||||
Value : title,
|
Value : title,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
$Type : 'UI.DataField',
|
$Type : 'UI.DataField',
|
||||||
Label : 'urgency_code',
|
Label : '{i18n>Customer}',
|
||||||
Value : urgency_code,
|
Value : customer_ID,
|
||||||
},
|
|
||||||
{
|
|
||||||
$Type : 'UI.DataField',
|
|
||||||
Label : 'status_code',
|
|
||||||
Value : status_code,
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
UI.Facets : [
|
UI.Facets : [
|
||||||
|
{
|
||||||
|
$Type : 'UI.CollectionFacet',
|
||||||
|
Label : '{i18n>Overview}',
|
||||||
|
ID : 'Overview',
|
||||||
|
Facets : [
|
||||||
|
{
|
||||||
|
$Type : 'UI.ReferenceFacet',
|
||||||
|
ID : 'GeneratedFacet1',
|
||||||
|
Label : '{i18n>GeneralInformation}',
|
||||||
|
Target : '@UI.FieldGroup#GeneratedGroup',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
$Type : 'UI.ReferenceFacet',
|
||||||
|
Label : '{i18n>Details}',
|
||||||
|
ID : 'Details',
|
||||||
|
Target : '@UI.FieldGroup#Details',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
$Type : 'UI.ReferenceFacet',
|
$Type : 'UI.ReferenceFacet',
|
||||||
ID : 'GeneratedFacet1',
|
Label : '{i18n>Conversation}',
|
||||||
Label : 'General Information',
|
ID : 'i18nConversation',
|
||||||
Target : '@UI.FieldGroup#GeneratedGroup',
|
Target : 'conversation/@UI.LineItem#i18nConversation',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
UI.LineItem : [
|
UI.LineItem : [
|
||||||
@@ -61,42 +70,66 @@ annotate service.Incidents with @(
|
|||||||
status_code,
|
status_code,
|
||||||
urgency_code,
|
urgency_code,
|
||||||
],
|
],
|
||||||
|
UI.HeaderInfo : {
|
||||||
|
Title : {
|
||||||
|
$Type : 'UI.DataField',
|
||||||
|
Value : title,
|
||||||
|
},
|
||||||
|
TypeName : '',
|
||||||
|
TypeNamePlural : '',
|
||||||
|
Description : {
|
||||||
|
$Type : 'UI.DataField',
|
||||||
|
Value : customer.name,
|
||||||
|
},
|
||||||
|
TypeImageUrl : 'sap-icon://alert',
|
||||||
|
},
|
||||||
|
UI.FieldGroup #Details : {
|
||||||
|
$Type : 'UI.FieldGroupType',
|
||||||
|
Data : [
|
||||||
|
{
|
||||||
|
$Type : 'UI.DataField',
|
||||||
|
Value : status_code,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
$Type : 'UI.DataField',
|
||||||
|
Value : urgency_code,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
annotate service.Incidents with {
|
annotate service.Incidents with {
|
||||||
customer @Common.ValueList : {
|
customer @(
|
||||||
$Type : 'Common.ValueListType',
|
Common.ValueList : {
|
||||||
CollectionPath : 'Customers',
|
$Type : 'Common.ValueListType',
|
||||||
Parameters : [
|
CollectionPath : 'Customers',
|
||||||
{
|
Parameters : [
|
||||||
$Type : 'Common.ValueListParameterInOut',
|
{
|
||||||
LocalDataProperty : customer_ID,
|
$Type : 'Common.ValueListParameterInOut',
|
||||||
ValueListProperty : 'ID',
|
LocalDataProperty : customer_ID,
|
||||||
},
|
ValueListProperty : 'ID',
|
||||||
{
|
},
|
||||||
$Type : 'Common.ValueListParameterDisplayOnly',
|
{
|
||||||
ValueListProperty : 'firstName',
|
$Type : 'Common.ValueListParameterDisplayOnly',
|
||||||
},
|
ValueListProperty : 'name',
|
||||||
{
|
},
|
||||||
$Type : 'Common.ValueListParameterDisplayOnly',
|
{
|
||||||
ValueListProperty : 'lastName',
|
$Type : 'Common.ValueListParameterDisplayOnly',
|
||||||
},
|
ValueListProperty : 'email',
|
||||||
{
|
},
|
||||||
$Type : 'Common.ValueListParameterDisplayOnly',
|
],
|
||||||
ValueListProperty : 'name',
|
},
|
||||||
},
|
Common.Text : customer.name,
|
||||||
{
|
Common.Text.@UI.TextArrangement : #TextOnly,
|
||||||
$Type : 'Common.ValueListParameterDisplayOnly',
|
Common.ValueListWithFixedValues : false,
|
||||||
ValueListProperty : 'email',
|
)
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
annotate service.Incidents with {
|
annotate service.Incidents with {
|
||||||
status @(
|
status @(
|
||||||
Common.Label : '{i18n>Status}',
|
Common.Label : '{i18n>Status}',
|
||||||
Common.ValueListWithFixedValues : true,
|
Common.ValueListWithFixedValues : true,
|
||||||
|
Common.Text : status.descr,
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -104,6 +137,7 @@ annotate service.Incidents with {
|
|||||||
urgency @(
|
urgency @(
|
||||||
Common.Label : '{i18n>Urgency}',
|
Common.Label : '{i18n>Urgency}',
|
||||||
Common.ValueListWithFixedValues : true,
|
Common.ValueListWithFixedValues : true,
|
||||||
|
Common.Text : urgency.descr,
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -115,3 +149,23 @@ annotate service.Status with {
|
|||||||
code @Common.Text : descr
|
code @Common.Text : descr
|
||||||
};
|
};
|
||||||
|
|
||||||
|
annotate service.Incidents.conversation with @(
|
||||||
|
UI.LineItem #i18nConversation : [
|
||||||
|
{
|
||||||
|
$Type : 'UI.DataField',
|
||||||
|
Value : author,
|
||||||
|
Label : '{i18n>Author}',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
$Type : 'UI.DataField',
|
||||||
|
Value : message,
|
||||||
|
Label : '{i18n>Message}',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
$Type : 'UI.DataField',
|
||||||
|
Value : timestamp,
|
||||||
|
Label : '{i18n>Date}',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -128,7 +128,17 @@
|
|||||||
"options": {
|
"options": {
|
||||||
"settings": {
|
"settings": {
|
||||||
"editableHeaderContent": false,
|
"editableHeaderContent": false,
|
||||||
"contextPath": "/Incidents"
|
"contextPath": "/Incidents",
|
||||||
|
"controlConfiguration": {
|
||||||
|
"conversation/@com.sap.vocabularies.UI.v1.LineItem#i18nConversation": {
|
||||||
|
"tableSettings": {
|
||||||
|
"type": "ResponsiveTable",
|
||||||
|
"creationMode": {
|
||||||
|
"name": "Inline"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ service ProcessorService {
|
|||||||
entity Customers as projection on my.Customers;
|
entity Customers as projection on my.Customers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
annotate ProcessorService.Incidents with @odata.draft.enabled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Service used by administrators to manage customers and incidents.
|
* Service used by administrators to manage customers and incidents.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user