172 lines
4.4 KiB
Plaintext
172 lines
4.4 KiB
Plaintext
using ProcessorService as service from '../../srv/services';
|
|
using from '../../db/schema';
|
|
|
|
annotate service.Incidents with @(
|
|
UI.FieldGroup #GeneratedGroup : {
|
|
$Type : 'UI.FieldGroupType',
|
|
Data : [
|
|
{
|
|
$Type : 'UI.DataField',
|
|
Value : title,
|
|
},
|
|
{
|
|
$Type : 'UI.DataField',
|
|
Label : '{i18n>Customer}',
|
|
Value : customer_ID,
|
|
},
|
|
],
|
|
},
|
|
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',
|
|
Label : '{i18n>Conversation}',
|
|
ID : 'i18nConversation',
|
|
Target : 'conversation/@UI.LineItem#i18nConversation',
|
|
},
|
|
],
|
|
UI.LineItem : [
|
|
{
|
|
$Type : 'UI.DataField',
|
|
Value : title,
|
|
Label : '{i18n>Title}',
|
|
},
|
|
{
|
|
$Type : 'UI.DataField',
|
|
Value : customer.name,
|
|
Label : '{i18n>Customer}',
|
|
},
|
|
{
|
|
$Type : 'UI.DataField',
|
|
Value : status.descr,
|
|
Label : '{i18n>Status}',
|
|
Criticality : status.criticality,
|
|
},
|
|
{
|
|
$Type : 'UI.DataField',
|
|
Value : urgency.descr,
|
|
Label : '{i18n>Urgency}',
|
|
},
|
|
],
|
|
UI.SelectionFields : [
|
|
status_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 {
|
|
customer @(
|
|
Common.ValueList : {
|
|
$Type : 'Common.ValueListType',
|
|
CollectionPath : 'Customers',
|
|
Parameters : [
|
|
{
|
|
$Type : 'Common.ValueListParameterInOut',
|
|
LocalDataProperty : customer_ID,
|
|
ValueListProperty : 'ID',
|
|
},
|
|
{
|
|
$Type : 'Common.ValueListParameterDisplayOnly',
|
|
ValueListProperty : 'name',
|
|
},
|
|
{
|
|
$Type : 'Common.ValueListParameterDisplayOnly',
|
|
ValueListProperty : 'email',
|
|
},
|
|
],
|
|
},
|
|
Common.Text : customer.name,
|
|
Common.Text.@UI.TextArrangement : #TextOnly,
|
|
Common.ValueListWithFixedValues : false,
|
|
)
|
|
};
|
|
|
|
annotate service.Incidents with {
|
|
status @(
|
|
Common.Label : '{i18n>Status}',
|
|
Common.ValueListWithFixedValues : true,
|
|
Common.Text : status.descr,
|
|
)
|
|
};
|
|
|
|
annotate service.Incidents with {
|
|
urgency @(
|
|
Common.Label : '{i18n>Urgency}',
|
|
Common.ValueListWithFixedValues : true,
|
|
Common.Text : urgency.descr,
|
|
)
|
|
};
|
|
|
|
annotate service.Urgency with {
|
|
code @Common.Text : descr
|
|
};
|
|
|
|
annotate service.Status with {
|
|
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}',
|
|
},
|
|
]
|
|
);
|
|
|