rm tree table in catalogservice
This commit is contained in:
@@ -1,6 +1,11 @@
|
|||||||
using { sap.capire.bookshop as my } from '../db/schema';
|
using { sap.capire.bookshop as my } from '../db/schema';
|
||||||
|
using { my.common.Hierarchy as Hierarchy } from './hierarchy';
|
||||||
|
|
||||||
|
extend my.Genres with Hierarchy;
|
||||||
|
|
||||||
service AdminService @(requires:'admin', path:'/admin') {
|
service AdminService @(requires:'admin', path:'/admin') {
|
||||||
entity Books as projection on my.Books;
|
entity Books as projection on my.Books;
|
||||||
entity Authors as projection on my.Authors;
|
entity Authors as projection on my.Authors;
|
||||||
|
@readonly
|
||||||
entity GenreHierarchy as projection on my.Genres
|
entity GenreHierarchy as projection on my.Genres
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
using { sap.capire.bookshop as my } from '../db/schema';
|
using { sap.capire.bookshop as my } from '../db/schema';
|
||||||
using {my.common.Hierarchy as Hierarchy} from './hierarchy';
|
|
||||||
|
|
||||||
extend my.Genres with Hierarchy;
|
|
||||||
service CatalogService @(path:'/browse') {
|
service CatalogService @(path:'/browse') {
|
||||||
|
|
||||||
/** For displaying lists of Books */
|
/** For displaying lists of Books */
|
||||||
@@ -13,9 +11,6 @@ service CatalogService @(path:'/browse') {
|
|||||||
author.name as author
|
author.name as author
|
||||||
} excluding { createdBy, modifiedBy };
|
} excluding { createdBy, modifiedBy };
|
||||||
|
|
||||||
@readonly
|
|
||||||
entity GenreHierarchy as projection on my.Genres;
|
|
||||||
|
|
||||||
@requires: 'authenticated-user'
|
@requires: 'authenticated-user'
|
||||||
action submitOrder ( book: Books:ID, quantity: Integer ) returns { stock: Integer };
|
action submitOrder ( book: Books:ID, quantity: Integer ) returns { stock: Integer };
|
||||||
event OrderedBook : { book: Books:ID; quantity: Integer; buyer: String };
|
event OrderedBook : { book: Books:ID; quantity: Integer; buyer: String };
|
||||||
|
|||||||
@@ -83,26 +83,6 @@ annotate AdminService.GenreHierarchy with {
|
|||||||
ID @UI.Hidden;
|
ID @UI.Hidden;
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Tree Table
|
|
||||||
//
|
|
||||||
annotate AdminService.GenreHierarchy with @Aggregation.RecursiveHierarchy#GenreHierarchy: {
|
|
||||||
$Type: 'Aggregation.RecursiveHierarchyType',
|
|
||||||
NodeProperty: ID, // identifies a node
|
|
||||||
ParentNavigationProperty: parent // navigates to a node's parent
|
|
||||||
};
|
|
||||||
|
|
||||||
annotate AdminService.GenreHierarchy with @Hierarchy.RecursiveHierarchy#GenreHierarchy: {
|
|
||||||
$Type: 'Hierarchy.RecursiveHierarchyType',
|
|
||||||
LimitedDescendantCount: LimitedDescendantCount,
|
|
||||||
DistanceFromRoot: DistanceFromRoot,
|
|
||||||
DrillState: DrillState,
|
|
||||||
Matched: Matched,
|
|
||||||
MatchedDescendantCount: MatchedDescendantCount,
|
|
||||||
LimitedRank: LimitedRank
|
|
||||||
};
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Draft for Localized Data
|
// Draft for Localized Data
|
||||||
|
|||||||
@@ -55,16 +55,3 @@ annotate CatalogService.Books with @(UI : {
|
|||||||
{Value : currency.symbol},
|
{Value : currency.symbol},
|
||||||
]
|
]
|
||||||
}, );
|
}, );
|
||||||
|
|
||||||
annotate CatalogService.GenreHierarchy with @UI: {
|
|
||||||
PresentationVariant : {
|
|
||||||
$Type : 'UI.PresentationVariantType',
|
|
||||||
RequestAtLeast: [name],
|
|
||||||
Visualizations: ['@UI.LineItem'],
|
|
||||||
},
|
|
||||||
LineItem : [{
|
|
||||||
$Type: 'UI.DataField',
|
|
||||||
Value: name,
|
|
||||||
Label : 'Genre'
|
|
||||||
}],
|
|
||||||
};
|
|
||||||
@@ -1,20 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
UI annotations for the Browse GenreHierarchy App
|
UI annotations for the Browse GenreHierarchy App
|
||||||
*/
|
*/
|
||||||
using CatalogService from '@capire/bookstore';
|
using AdminService from '@capire/bookshop';
|
||||||
|
|
||||||
annotate CatalogService.GenreHierarchy with @Aggregation.RecursiveHierarchy#GenreHierarchy: {
|
annotate AdminService.GenreHierarchy with @Aggregation.RecursiveHierarchy #GenreHierarchy: {
|
||||||
$Type: 'Aggregation.RecursiveHierarchyType',
|
$Type : 'Aggregation.RecursiveHierarchyType',
|
||||||
NodeProperty: ID, // identifies a node
|
NodeProperty : ID, // identifies a node
|
||||||
ParentNavigationProperty: parent // navigates to a node's parent
|
ParentNavigationProperty: parent // navigates to a node's parent
|
||||||
};
|
};
|
||||||
|
|
||||||
annotate CatalogService.GenreHierarchy with @Hierarchy.RecursiveHierarchy#GenreHierarchy: {
|
annotate AdminService.GenreHierarchy with @Hierarchy.RecursiveHierarchy #GenreHierarchy: {
|
||||||
$Type: 'Hierarchy.RecursiveHierarchyType',
|
$Type : 'Hierarchy.RecursiveHierarchyType',
|
||||||
LimitedDescendantCount: LimitedDescendantCount,
|
LimitedDescendantCount: LimitedDescendantCount,
|
||||||
DistanceFromRoot: DistanceFromRoot,
|
DistanceFromRoot : DistanceFromRoot,
|
||||||
DrillState: DrillState,
|
DrillState : DrillState,
|
||||||
Matched: Matched,
|
Matched : Matched,
|
||||||
MatchedDescendantCount: MatchedDescendantCount,
|
MatchedDescendantCount: MatchedDescendantCount,
|
||||||
LimitedRank: LimitedRank
|
LimitedRank : LimitedRank
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
"version": "1.0.0"
|
"version": "1.0.0"
|
||||||
},
|
},
|
||||||
"dataSources": {
|
"dataSources": {
|
||||||
"CatalogService": {
|
"AdminService": {
|
||||||
"uri": "browse/",
|
"uri": "admin/",
|
||||||
"type": "OData",
|
"type": "OData",
|
||||||
"settings": {
|
"settings": {
|
||||||
"odataVersion": "4.0"
|
"odataVersion": "4.0"
|
||||||
@@ -25,9 +25,9 @@
|
|||||||
"inbounds": {
|
"inbounds": {
|
||||||
"Genres-display": {
|
"Genres-display": {
|
||||||
"signature": {
|
"signature": {
|
||||||
"parameters": {},
|
"parameters": {},
|
||||||
"additionalParameters": "allowed"
|
"additionalParameters": "allowed"
|
||||||
},
|
},
|
||||||
"title": "{{appTitle}}",
|
"title": "{{appTitle}}",
|
||||||
"semanticObject": "GenreHierarchy",
|
"semanticObject": "GenreHierarchy",
|
||||||
"action": "display",
|
"action": "display",
|
||||||
@@ -63,7 +63,12 @@
|
|||||||
"tablet": true,
|
"tablet": true,
|
||||||
"phone": true
|
"phone": true
|
||||||
},
|
},
|
||||||
"supportedThemes": ["sap_hcb", "sap_belize", "sap_belize_deep", "sap_fiori_3"]
|
"supportedThemes": [
|
||||||
|
"sap_hcb",
|
||||||
|
"sap_belize",
|
||||||
|
"sap_belize_deep",
|
||||||
|
"sap_fiori_3"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"sap.ui5": {
|
"sap.ui5": {
|
||||||
"resources": {
|
"resources": {
|
||||||
@@ -81,7 +86,7 @@
|
|||||||
"uri": "i18n/i18n.properties"
|
"uri": "i18n/i18n.properties"
|
||||||
},
|
},
|
||||||
"": {
|
"": {
|
||||||
"dataSource": "CatalogService",
|
"dataSource": "AdminService",
|
||||||
"settings": {
|
"settings": {
|
||||||
"synchronizationMode": "None",
|
"synchronizationMode": "None",
|
||||||
"operationMode": "Server",
|
"operationMode": "Server",
|
||||||
@@ -96,56 +101,56 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"routing": {
|
"routing": {
|
||||||
"routes": [
|
"routes": [
|
||||||
{
|
{
|
||||||
"pattern": ":?query:",
|
"pattern": ":?query:",
|
||||||
"name": "GenreHierarchyList",
|
"name": "GenreHierarchyList",
|
||||||
"target": "GenreHierarchyList"
|
"target": "GenreHierarchyList"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pattern": "GenreHierarchy({key}):?query:",
|
"pattern": "GenreHierarchy({key}):?query:",
|
||||||
"name": "GenreHierarchyDetails",
|
"name": "GenreHierarchyDetails",
|
||||||
"target": "GenreHierarchyDetails"
|
"target": "GenreHierarchyDetails"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"targets": {
|
"targets": {
|
||||||
"GenreHierarchyList": {
|
"GenreHierarchyList": {
|
||||||
"type": "Component",
|
"type": "Component",
|
||||||
"id": "GenreHierarchyList",
|
"id": "GenreHierarchyList",
|
||||||
"name": "sap.fe.templates.ListReport",
|
"name": "sap.fe.templates.ListReport",
|
||||||
"options": {
|
"options": {
|
||||||
"settings" : {
|
"settings": {
|
||||||
"contextPath" : "/GenreHierarchy",
|
"contextPath": "/GenreHierarchy",
|
||||||
"navigation" : {
|
"navigation": {
|
||||||
"GenreHierarchy" : {
|
"GenreHierarchy": {
|
||||||
"detail" : {
|
"detail": {
|
||||||
"route" : "GenreHierarchyDetails"
|
"route": "GenreHierarchyDetails"
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"controlConfiguration": {
|
|
||||||
"@com.sap.vocabularies.UI.v1.LineItem": {
|
|
||||||
"tableSettings": {
|
|
||||||
"hierarchyQualifier": "GenreHierarchy",
|
|
||||||
"type": "TreeTable"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"controlConfiguration": {
|
||||||
|
"@com.sap.vocabularies.UI.v1.LineItem": {
|
||||||
|
"tableSettings": {
|
||||||
|
"hierarchyQualifier": "GenreHierarchy",
|
||||||
|
"type": "TreeTable"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"GenreHierarchyDetails": {
|
"GenreHierarchyDetails": {
|
||||||
"type": "Component",
|
"type": "Component",
|
||||||
"id": "GenreHierarchyDetails",
|
"id": "GenreHierarchyDetails",
|
||||||
"name": "sap.fe.templates.ObjectPage",
|
"name": "sap.fe.templates.ObjectPage",
|
||||||
"options": {
|
"options": {
|
||||||
"settings" : {
|
"settings": {
|
||||||
"contextPath" : "/GenreHierarchy"
|
"contextPath": "/GenreHierarchy"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contentDensities": {
|
"contentDensities": {
|
||||||
"compact": true,
|
"compact": true,
|
||||||
"cozy": true
|
"cozy": true
|
||||||
|
|||||||
Reference in New Issue
Block a user