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 {
|
annotate AdminService.Orders with {
|
||||||
shippingAddress @(
|
shippingAddress @(
|
||||||
ValueList.entity:'Addresses',
|
Common: {
|
||||||
);
|
FieldControl: #Mandatory,
|
||||||
shippingAddress @(
|
ValueList: {
|
||||||
Common.FieldControl: #Mandatory
|
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: [
|
HeaderFacets: [
|
||||||
{$Type: 'UI.ReferenceFacet', Label: '{i18n>Created}', Target: '@UI.FieldGroup#Created'},
|
{$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>Modified}', Target: '@UI.FieldGroup#Modified'},
|
||||||
{$Type: 'UI.ReferenceFacet', Label: '{i18n>ShippingAddress}', Target: '@UI.FieldGroup#ShippingAddress'},
|
|
||||||
],
|
],
|
||||||
Facets: [
|
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>Details}', Target: '@UI.FieldGroup#Details'},
|
||||||
{$Type: 'UI.ReferenceFacet', Label: '{i18n>OrderItems}', Target: 'Items/@UI.LineItem'},
|
{$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
|
// TODO: Trigger side effects when `shippingAddress_AddressID` is changed
|
||||||
FieldGroup#ShippingAddress: {
|
FieldGroup#ShippingAddress: {
|
||||||
|
Common.SideEffects : {
|
||||||
|
EffectTypes : #ValueChange,
|
||||||
|
SourceProperties : [shippingAddress_AddressID],
|
||||||
|
TargetProperties : [
|
||||||
|
shippingAddress.HouseNumber,
|
||||||
|
shippingAddress.StreetName,
|
||||||
|
shippingAddress.CityName
|
||||||
|
]
|
||||||
|
},
|
||||||
Data: [
|
Data: [
|
||||||
{Value: shippingAddress_AddressID, Label:'{i18n>ShippingAddress}'},
|
{Value: shippingAddress_AddressID, Label:'{i18n>ShippingAddress}'},
|
||||||
{Value: shippingAddress.HouseNumber, Label:'{i18n>HouseNumber}'},
|
{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',
|
AddressID: '11111',
|
||||||
CityName: 'Walldorf',
|
CityName: 'Walldorf',
|
||||||
StreetName: 'Dietmar-Hopp-Allee',
|
StreetName: 'Dietmar-Hopp-Allee',
|
||||||
HouseNumber: '111'
|
HouseNumber: '16'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
BusinessPartner: '1234567',
|
BusinessPartner: '1234567',
|
||||||
AddressID: '22222',
|
AddressID: '22222',
|
||||||
CityName: 'Walldorf',
|
CityName: 'St. Leon-Rot',
|
||||||
StreetName: 'Dietmar-Hopp-Allee',
|
StreetName: 'SAP-Allee',
|
||||||
HouseNumber: '222'
|
HouseNumber: '25'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
BusinessPartner: '1003765',
|
BusinessPartner: '1003765',
|
||||||
|
|||||||
Reference in New Issue
Block a user