From 2cea03a09d3a0574e0cc77cac00877a4c6e3264e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl=20=C3=96nnheim?= Date: Tue, 7 Mar 2023 00:01:58 +0100 Subject: [PATCH 1/3] Default Filters --- app/featureShowcase/layouts_RootEntities.cds | 27 ++++++++++++++++++++ app/featureShowcase/webapp/manifest.json | 3 ++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/app/featureShowcase/layouts_RootEntities.cds b/app/featureShowcase/layouts_RootEntities.cds index a06314c..4e63424 100644 --- a/app/featureShowcase/layouts_RootEntities.cds +++ b/app/featureShowcase/layouts_RootEntities.cds @@ -622,6 +622,7 @@ annotate service.RootEntities with @( annotate service.RootEntities with @( //Shown filters for the given fields after opening the application UI.SelectionFields : [ + country_code, stringProperty, fieldWithPrice, criticality_code, @@ -698,6 +699,32 @@ annotate service.RootEntities with @( Visualizations : ['@UI.LineItem#simplified'], }, }, + UI.SelectionPresentationVariant #DefaultFilter : { + SelectionVariant : { + SelectOptions : [ + { + PropertyName : country_code, + Ranges : [ + { + Sign : #I, + Option : #EQ, + Low : 'DE', + }, + { + Sign : #I, + Option : #EQ, + Low : 'FR', + }, + ], + }, + ], + }, + PresentationVariant : { + SortOrder : [ + ], + Visualizations : ['@UI.LineItem'], + }, + }, ); /** diff --git a/app/featureShowcase/webapp/manifest.json b/app/featureShowcase/webapp/manifest.json index 0a4672a..0a3b62b 100644 --- a/app/featureShowcase/webapp/manifest.json +++ b/app/featureShowcase/webapp/manifest.json @@ -111,6 +111,7 @@ "entitySet": "RootEntities", "variantManagement": "Page", "enhanceI18n": "i18n/customI18N.properties", + "defaultTemplateAnnotationPath": "com.sap.vocabularies.UI.v1.SelectionPresentationVariant#DefaultFilter", "navigation": { "RootEntities": { "detail": { @@ -119,7 +120,7 @@ } }, "initialLoad": true, - "views": { + "XviewsX": { "paths": [ { "key": "tab1", From add7347b67c717daa631ecabc8ad569fe8b518b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl=20=C3=96nnheim?= Date: Fri, 10 Nov 2023 21:59:34 +0100 Subject: [PATCH 2/3] ui5 overlay for testing --- app/index.html | 4 ++-- package-lock.json | 45 ++++++++++++++++++++++++++++++++++++++++++++- package.json | 7 ++++--- server.js | 24 ++++++++++++++++++++++++ 4 files changed, 74 insertions(+), 6 deletions(-) create mode 100644 server.js diff --git a/app/index.html b/app/index.html index 09e2703..5e05a39 100644 --- a/app/index.html +++ b/app/index.html @@ -56,9 +56,9 @@ }; - +