Add additional columns to the value list for Addresses
This commit is contained in:
@@ -22,10 +22,20 @@ annotate AdminService.OrderItems with {
|
||||
|
||||
annotate AdminService.Orders with {
|
||||
shippingAddress @(
|
||||
ValueList.entity:'Addresses',
|
||||
);
|
||||
shippingAddress @(
|
||||
Common.FieldControl: #Mandatory
|
||||
Common: {
|
||||
FieldControl: #Mandatory,
|
||||
ValueList: {
|
||||
CollectionPath: 'Addresses',
|
||||
Label: 'Addresses',
|
||||
SearchSupported: 'true',
|
||||
Parameters: [
|
||||
{ $Type: 'Common.ValueListParameterOut', LocalDataProperty: 'shippingAddress_AddressID', ValueListProperty: 'AddressID'},
|
||||
{ $Type: 'Common.ValueListParameterDisplayOnly', ValueListProperty: 'CityName'},
|
||||
{ $Type: 'Common.ValueListParameterDisplayOnly', ValueListProperty: 'StreetName'},
|
||||
{ $Type: 'Common.ValueListParameterDisplayOnly', ValueListProperty: 'HouseNumber'},
|
||||
]
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -61,9 +71,9 @@ annotate AdminService.Orders with @(
|
||||
HeaderFacets: [
|
||||
{$Type: 'UI.ReferenceFacet', Label: '{i18n>Created}', Target: '@UI.FieldGroup#Created'},
|
||||
{$Type: 'UI.ReferenceFacet', Label: '{i18n>Modified}', Target: '@UI.FieldGroup#Modified'},
|
||||
{$Type: 'UI.ReferenceFacet', Label: '{i18n>ShippingAddress}', Target: '@UI.FieldGroup#ShippingAddress'},
|
||||
],
|
||||
Facets: [
|
||||
{$Type: 'UI.ReferenceFacet', Label: '{i18n>ShippingAddress}', Target: '@UI.FieldGroup#ShippingAddress'},
|
||||
{$Type: 'UI.ReferenceFacet', Label: '{i18n>Details}', Target: '@UI.FieldGroup#Details'},
|
||||
{$Type: 'UI.ReferenceFacet', Label: '{i18n>OrderItems}', Target: 'Items/@UI.LineItem'},
|
||||
],
|
||||
@@ -86,10 +96,20 @@ annotate AdminService.Orders with @(
|
||||
},
|
||||
// TODO: Trigger side effects when `shippingAddress_AddressID` is changed
|
||||
FieldGroup#ShippingAddress: {
|
||||
Common.SideEffects : {
|
||||
EffectTypes : #ValueChange,
|
||||
SourceProperties : [shippingAddress_AddressID],
|
||||
TargetProperties : [
|
||||
shippingAddress.HouseNumber,
|
||||
shippingAddress.StreetName,
|
||||
shippingAddress.CityName
|
||||
]
|
||||
},
|
||||
Data: [
|
||||
{Value: shippingAddress_AddressID, Label:'{i18n>ShippingAddress}'},
|
||||
{Value: shippingAddress.HouseNumber, Label:'{i18n>HouseNumber}'},
|
||||
{Value: shippingAddress.StreetName, Label:'{i18n>StreetName}'}
|
||||
{Value: shippingAddress.StreetName, Label:'{i18n>StreetName}'},
|
||||
{Value: shippingAddress.CityName, Labe:'{i18n>CityName}'}
|
||||
]
|
||||
},
|
||||
},
|
||||
|
||||
@@ -10,14 +10,14 @@ module.exports = db => {
|
||||
AddressID: '11111',
|
||||
CityName: 'Walldorf',
|
||||
StreetName: 'Dietmar-Hopp-Allee',
|
||||
HouseNumber: '111'
|
||||
HouseNumber: '16'
|
||||
},
|
||||
{
|
||||
BusinessPartner: '1234567',
|
||||
AddressID: '22222',
|
||||
CityName: 'Walldorf',
|
||||
StreetName: 'Dietmar-Hopp-Allee',
|
||||
HouseNumber: '222'
|
||||
CityName: 'St. Leon-Rot',
|
||||
StreetName: 'SAP-Allee',
|
||||
HouseNumber: '25'
|
||||
},
|
||||
{
|
||||
BusinessPartner: '1003765',
|
||||
|
||||
Reference in New Issue
Block a user