Compare commits

...

16 Commits

Author SHA1 Message Date
Dr. David A. Kunz
55c0190653 . 2025-07-10 12:04:45 +02:00
Dr. David A. Kunz
5716dece3f cosmetics 2025-07-10 12:04:07 +02:00
Olena
ef892b58e7 Merge branch 'main' into hierarch-draft-crud 2025-07-08 14:25:01 +02:00
D070615
c175575840 rm node 18.x from workflow 2025-07-07 17:13:12 +02:00
D070615
c6cc70a062 fix redirect 2025-07-07 15:37:02 +02:00
D070615
7c33813102 redirect to fix test 2025-07-04 13:40:25 +02:00
D070615
ef9a891445 fix tests 2025-07-04 13:37:49 +02:00
Dr. David A. Kunz
8230757540 . 2025-07-03 13:14:07 +02:00
Dr. David A. Kunz
fe53798330 package-lock 2025-07-03 13:12:25 +02:00
D070615
3ca79efcfb add object page and manage genres 2025-07-03 11:20:18 +02:00
Olena
9c1d5280af Merge branch 'main' into hierarch-draft-crud 2025-07-03 10:33:00 +02:00
Olena
9b80311472 Merge pull request #840 from SAP-samples/hierarch-object-page
Fiori: Tree View Object Page
2025-07-02 16:15:26 +02:00
Dr. David A. Kunz
34f75b52c8 add children as composition 2025-06-26 13:36:03 +02:00
D070615
aeb8bca9ac object page first version 2025-06-18 15:41:46 +02:00
Dr. David A. Kunz
044f513e16 . 2025-05-28 13:08:54 +02:00
Dr. David A. Kunz
6b15dbdd2e draft crud 2025-05-28 13:08:52 +02:00
14 changed files with 250 additions and 50 deletions

View File

@@ -0,0 +1,64 @@
ID;parent_ID;name;page;book_ID
f846b0b9-01d4-4f6d-82a4-d79204f62514;;Foreword;3;207
f846b0b9-01d4-4f6d-82a4-d79204f62515;;Chapter 1;4;207
f846b0b9-01d4-4f6d-82a4-d79204f62516;f846b0b9-01d4-4f6d-82a4-d79204f62515;Section 1.1;5;207
f846b0b9-01d4-4f6d-82a4-d79204f62517;f846b0b9-01d4-4f6d-82a4-d79204f62515;Section 1.2;28;207
f846b0b9-01d4-4f6d-82a4-d79204f62518;f846b0b9-01d4-4f6d-82a4-d79204f62517;Subsection 1.2.1;30;207
f846b0b9-01d4-4f6d-82a4-d79204f62519;f846b0b9-01d4-4f6d-82a4-d79204f62517;Subsection 1.2.2;33;207
f846b0b9-01d4-4f6d-82a4-d79204f62520;f846b0b9-01d4-4f6d-82a4-d79204f62515;Section 1.3;36;207
f846b0b9-01d4-4f6d-82a4-d79204f62521;;Chapter 2;54;207
f846b0b9-01d4-4f6d-82a4-d79204f62522;f846b0b9-01d4-4f6d-82a4-d79204f62521;Section 2.1;56;207
f846b0b9-01d4-4f6d-82a4-d79204f62523;f846b0b9-01d4-4f6d-82a4-d79204f62521;Section 2.2;58;207
f846b0b9-01d4-4f6d-82a4-d79204f62524;;Conclusion;63;207
f846b0b9-01d4-4f6d-82a4-d79204f62525;;Endnotes;65;207
f846b0b9-01d4-4f6d-82a4-d79204f62526;;Copyright notice;2;251
f846b0b9-01d4-4f6d-82a4-d79204f62527;;Chapter 1;3;251
f846b0b9-01d4-4f6d-82a4-d79204f62528;f846b0b9-01d4-4f6d-82a4-d79204f62527;Section 1.1;5;251
f846b0b9-01d4-4f6d-82a4-d79204f62529;f846b0b9-01d4-4f6d-82a4-d79204f62527;Section 1.2;13;251
f846b0b9-01d4-4f6d-82a4-d79204f62530;;Chapter 2;20;251
f846b0b9-01d4-4f6d-82a4-d79204f62531;f846b0b9-01d4-4f6d-82a4-d79204f62530;Section 2.1;21;251
f846b0b9-01d4-4f6d-82a4-d79204f62532;f846b0b9-01d4-4f6d-82a4-d79204f62530;Section 2.2;25;251
f846b0b9-01d4-4f6d-82a4-d79204f62533;f846b0b9-01d4-4f6d-82a4-d79204f62530;Section 2.3;27;251
f846b0b9-01d4-4f6d-82a4-d79204f62534;;Chapter 3;30;251
f846b0b9-01d4-4f6d-82a4-d79204f62535;;Endnotes;41;251
f846b0b9-01d4-4f6d-82a4-d79204f62551;;Acknowledgements;1;271
f846b0b9-01d4-4f6d-82a4-d79204f62552;;The Flight;2;271
f846b0b9-01d4-4f6d-82a4-d79204f62553;;Hexwood Farm;8;271
f846b0b9-01d4-4f6d-82a4-d79204f62554;f846b0b9-01d4-4f6d-82a4-d79204f62553;Castle Saburac;13;271
f846b0b9-01d4-4f6d-82a4-d79204f62555;f846b0b9-01d4-4f6d-82a4-d79204f62553;The Curse of Rapkyn;27;271
f846b0b9-01d4-4f6d-82a4-d79204f62556;f846b0b9-01d4-4f6d-82a4-d79204f62553;The Mannikin;35;271
f846b0b9-01d4-4f6d-82a4-d79204f62557;;The Eye of Time;44;271
f846b0b9-01d4-4f6d-82a4-d79204f62558;;The Enchanting;59;271
f846b0b9-01d4-4f6d-82a4-d79204f62559;f846b0b9-01d4-4f6d-82a4-d79204f62558;The Telling Bone;73;271
f846b0b9-01d4-4f6d-82a4-d79204f62560;f846b0b9-01d4-4f6d-82a4-d79204f62558;The Power of Adamcos;86;271
f846b0b9-01d4-4f6d-82a4-d79204f62561;f846b0b9-01d4-4f6d-82a4-d79204f62558;The House of the Sorcerer;98;271
f846b0b9-01d4-4f6d-82a4-d79204f62562;;The Changeling;105;271
f846b0b9-01d4-4f6d-82a4-d79204f62563;f846b0b9-01d4-4f6d-82a4-d79204f62562;The Flying Broomsticks;118;271
f846b0b9-01d4-4f6d-82a4-d79204f62564;f846b0b9-01d4-4f6d-82a4-d79204f62563;The Fish Out of Water;126;271
f846b0b9-01d4-4f6d-82a4-d79204f62565;;The Final Magic;138;271
f846b0b9-01d4-4f6d-82a4-d79204f62566;;Copyright;159;271
f846b0b9-01d4-4f6d-82a4-d79204f62567;;Editor's Note;1;201
f846b0b9-01d4-4f6d-82a4-d79204f62568;;Chapter I;2;201
f846b0b9-01d4-4f6d-82a4-d79204f62569;;Chapter II;31;201
f846b0b9-01d4-4f6d-82a4-d79204f62570;f846b0b9-01d4-4f6d-82a4-d79204f62569;Section II.I;47;201
f846b0b9-01d4-4f6d-82a4-d79204f62571;f846b0b9-01d4-4f6d-82a4-d79204f62569;Section II.II;62;201
f846b0b9-01d4-4f6d-82a4-d79204f62572;f846b0b9-01d4-4f6d-82a4-d79204f62569;Section II.III;75;201
f846b0b9-01d4-4f6d-82a4-d79204f62573;f846b0b9-01d4-4f6d-82a4-d79204f62569;Section II.IV;87;201
f846b0b9-01d4-4f6d-82a4-d79204f62574;;Chapter III;105;201
f846b0b9-01d4-4f6d-82a4-d79204f62575;f846b0b9-01d4-4f6d-82a4-d79204f62574;Section III.I;128;201
f846b0b9-01d4-4f6d-82a4-d79204f62576;f846b0b9-01d4-4f6d-82a4-d79204f62575;Subsection III.I.I;156;201
f846b0b9-01d4-4f6d-82a4-d79204f62577;f846b0b9-01d4-4f6d-82a4-d79204f62575;Subsection III.I.II;173;201
f846b0b9-01d4-4f6d-82a4-d79204f62578;f846b0b9-01d4-4f6d-82a4-d79204f62574;Section III.II;185;201
f846b0b9-01d4-4f6d-82a4-d79204f62579;;Chapter IV;203;201
f846b0b9-01d4-4f6d-82a4-d79204f62580;;Acknowledgments;250;201
f846b0b9-01d4-4f6d-82a4-d79204f62582;;Foreword;1;252
f846b0b9-01d4-4f6d-82a4-d79204f62583;;Chapter 1;3;252
f846b0b9-01d4-4f6d-82a4-d79204f62584;f846b0b9-01d4-4f6d-82a4-d79204f62583;Section 1.1;5;252
f846b0b9-01d4-4f6d-82a4-d79204f62585;f846b0b9-01d4-4f6d-82a4-d79204f62583;Section 1.2;8;252
f846b0b9-01d4-4f6d-82a4-d79204f62586;;Chapter 2;10;252
f846b0b9-01d4-4f6d-82a4-d79204f62587;f846b0b9-01d4-4f6d-82a4-d79204f62586;Section 2.1;12;252
f846b0b9-01d4-4f6d-82a4-d79204f62588;f846b0b9-01d4-4f6d-82a4-d79204f62587;Subsection 2.1.1;14;252
f846b0b9-01d4-4f6d-82a4-d79204f62589;f846b0b9-01d4-4f6d-82a4-d79204f62587;Subsection 2.1.2;16;252
f846b0b9-01d4-4f6d-82a4-d79204f62590;f846b0b9-01d4-4f6d-82a4-d79204f62586;Section 2.2;18;252
f846b0b9-01d4-4f6d-82a4-d79204f62591;f846b0b9-01d4-4f6d-82a4-d79204f62590;Subsection 2.2.1;21;252
f846b0b9-01d4-4f6d-82a4-d79204f62592;;Endnotes;25;252
1 ID parent_ID name page book_ID
2 f846b0b9-01d4-4f6d-82a4-d79204f62514 Foreword 3 207
3 f846b0b9-01d4-4f6d-82a4-d79204f62515 Chapter 1 4 207
4 f846b0b9-01d4-4f6d-82a4-d79204f62516 f846b0b9-01d4-4f6d-82a4-d79204f62515 Section 1.1 5 207
5 f846b0b9-01d4-4f6d-82a4-d79204f62517 f846b0b9-01d4-4f6d-82a4-d79204f62515 Section 1.2 28 207
6 f846b0b9-01d4-4f6d-82a4-d79204f62518 f846b0b9-01d4-4f6d-82a4-d79204f62517 Subsection 1.2.1 30 207
7 f846b0b9-01d4-4f6d-82a4-d79204f62519 f846b0b9-01d4-4f6d-82a4-d79204f62517 Subsection 1.2.2 33 207
8 f846b0b9-01d4-4f6d-82a4-d79204f62520 f846b0b9-01d4-4f6d-82a4-d79204f62515 Section 1.3 36 207
9 f846b0b9-01d4-4f6d-82a4-d79204f62521 Chapter 2 54 207
10 f846b0b9-01d4-4f6d-82a4-d79204f62522 f846b0b9-01d4-4f6d-82a4-d79204f62521 Section 2.1 56 207
11 f846b0b9-01d4-4f6d-82a4-d79204f62523 f846b0b9-01d4-4f6d-82a4-d79204f62521 Section 2.2 58 207
12 f846b0b9-01d4-4f6d-82a4-d79204f62524 Conclusion 63 207
13 f846b0b9-01d4-4f6d-82a4-d79204f62525 Endnotes 65 207
14 f846b0b9-01d4-4f6d-82a4-d79204f62526 Copyright notice 2 251
15 f846b0b9-01d4-4f6d-82a4-d79204f62527 Chapter 1 3 251
16 f846b0b9-01d4-4f6d-82a4-d79204f62528 f846b0b9-01d4-4f6d-82a4-d79204f62527 Section 1.1 5 251
17 f846b0b9-01d4-4f6d-82a4-d79204f62529 f846b0b9-01d4-4f6d-82a4-d79204f62527 Section 1.2 13 251
18 f846b0b9-01d4-4f6d-82a4-d79204f62530 Chapter 2 20 251
19 f846b0b9-01d4-4f6d-82a4-d79204f62531 f846b0b9-01d4-4f6d-82a4-d79204f62530 Section 2.1 21 251
20 f846b0b9-01d4-4f6d-82a4-d79204f62532 f846b0b9-01d4-4f6d-82a4-d79204f62530 Section 2.2 25 251
21 f846b0b9-01d4-4f6d-82a4-d79204f62533 f846b0b9-01d4-4f6d-82a4-d79204f62530 Section 2.3 27 251
22 f846b0b9-01d4-4f6d-82a4-d79204f62534 Chapter 3 30 251
23 f846b0b9-01d4-4f6d-82a4-d79204f62535 Endnotes 41 251
24 f846b0b9-01d4-4f6d-82a4-d79204f62551 Acknowledgements 1 271
25 f846b0b9-01d4-4f6d-82a4-d79204f62552 The Flight 2 271
26 f846b0b9-01d4-4f6d-82a4-d79204f62553 Hexwood Farm 8 271
27 f846b0b9-01d4-4f6d-82a4-d79204f62554 f846b0b9-01d4-4f6d-82a4-d79204f62553 Castle Saburac 13 271
28 f846b0b9-01d4-4f6d-82a4-d79204f62555 f846b0b9-01d4-4f6d-82a4-d79204f62553 The Curse of Rapkyn 27 271
29 f846b0b9-01d4-4f6d-82a4-d79204f62556 f846b0b9-01d4-4f6d-82a4-d79204f62553 The Mannikin 35 271
30 f846b0b9-01d4-4f6d-82a4-d79204f62557 The Eye of Time 44 271
31 f846b0b9-01d4-4f6d-82a4-d79204f62558 The Enchanting 59 271
32 f846b0b9-01d4-4f6d-82a4-d79204f62559 f846b0b9-01d4-4f6d-82a4-d79204f62558 The Telling Bone 73 271
33 f846b0b9-01d4-4f6d-82a4-d79204f62560 f846b0b9-01d4-4f6d-82a4-d79204f62558 The Power of Adamcos 86 271
34 f846b0b9-01d4-4f6d-82a4-d79204f62561 f846b0b9-01d4-4f6d-82a4-d79204f62558 The House of the Sorcerer 98 271
35 f846b0b9-01d4-4f6d-82a4-d79204f62562 The Changeling 105 271
36 f846b0b9-01d4-4f6d-82a4-d79204f62563 f846b0b9-01d4-4f6d-82a4-d79204f62562 The Flying Broomsticks 118 271
37 f846b0b9-01d4-4f6d-82a4-d79204f62564 f846b0b9-01d4-4f6d-82a4-d79204f62563 The Fish Out of Water 126 271
38 f846b0b9-01d4-4f6d-82a4-d79204f62565 The Final Magic 138 271
39 f846b0b9-01d4-4f6d-82a4-d79204f62566 Copyright 159 271
40 f846b0b9-01d4-4f6d-82a4-d79204f62567 Editor's Note 1 201
41 f846b0b9-01d4-4f6d-82a4-d79204f62568 Chapter I 2 201
42 f846b0b9-01d4-4f6d-82a4-d79204f62569 Chapter II 31 201
43 f846b0b9-01d4-4f6d-82a4-d79204f62570 f846b0b9-01d4-4f6d-82a4-d79204f62569 Section II.I 47 201
44 f846b0b9-01d4-4f6d-82a4-d79204f62571 f846b0b9-01d4-4f6d-82a4-d79204f62569 Section II.II 62 201
45 f846b0b9-01d4-4f6d-82a4-d79204f62572 f846b0b9-01d4-4f6d-82a4-d79204f62569 Section II.III 75 201
46 f846b0b9-01d4-4f6d-82a4-d79204f62573 f846b0b9-01d4-4f6d-82a4-d79204f62569 Section II.IV 87 201
47 f846b0b9-01d4-4f6d-82a4-d79204f62574 Chapter III 105 201
48 f846b0b9-01d4-4f6d-82a4-d79204f62575 f846b0b9-01d4-4f6d-82a4-d79204f62574 Section III.I 128 201
49 f846b0b9-01d4-4f6d-82a4-d79204f62576 f846b0b9-01d4-4f6d-82a4-d79204f62575 Subsection III.I.I 156 201
50 f846b0b9-01d4-4f6d-82a4-d79204f62577 f846b0b9-01d4-4f6d-82a4-d79204f62575 Subsection III.I.II 173 201
51 f846b0b9-01d4-4f6d-82a4-d79204f62578 f846b0b9-01d4-4f6d-82a4-d79204f62574 Section III.II 185 201
52 f846b0b9-01d4-4f6d-82a4-d79204f62579 Chapter IV 203 201
53 f846b0b9-01d4-4f6d-82a4-d79204f62580 Acknowledgments 250 201
54 f846b0b9-01d4-4f6d-82a4-d79204f62582 Foreword 1 252
55 f846b0b9-01d4-4f6d-82a4-d79204f62583 Chapter 1 3 252
56 f846b0b9-01d4-4f6d-82a4-d79204f62584 f846b0b9-01d4-4f6d-82a4-d79204f62583 Section 1.1 5 252
57 f846b0b9-01d4-4f6d-82a4-d79204f62585 f846b0b9-01d4-4f6d-82a4-d79204f62583 Section 1.2 8 252
58 f846b0b9-01d4-4f6d-82a4-d79204f62586 Chapter 2 10 252
59 f846b0b9-01d4-4f6d-82a4-d79204f62587 f846b0b9-01d4-4f6d-82a4-d79204f62586 Section 2.1 12 252
60 f846b0b9-01d4-4f6d-82a4-d79204f62588 f846b0b9-01d4-4f6d-82a4-d79204f62587 Subsection 2.1.1 14 252
61 f846b0b9-01d4-4f6d-82a4-d79204f62589 f846b0b9-01d4-4f6d-82a4-d79204f62587 Subsection 2.1.2 16 252
62 f846b0b9-01d4-4f6d-82a4-d79204f62590 f846b0b9-01d4-4f6d-82a4-d79204f62586 Section 2.2 18 252
63 f846b0b9-01d4-4f6d-82a4-d79204f62591 f846b0b9-01d4-4f6d-82a4-d79204f62590 Subsection 2.2.1 21 252
64 f846b0b9-01d4-4f6d-82a4-d79204f62592 Endnotes 25 252

View File

@@ -11,6 +11,7 @@ entity Books : managed {
price : Price;
currency : Currency;
image : LargeBinary @Core.MediaType: 'image/png';
contents : Composition of many Contents on contents.book = $self;
}
entity Authors : managed {
@@ -30,6 +31,16 @@ entity Genres : sap.common.CodeList {
children : Composition of many Genres on children.parent = $self;
}
/** Hierarchically organized entity for Contents */
entity Contents {
key ID : UUID;
name : String;
page : Integer;
parent : Association to Contents;
children : Composition of many Contents on children.parent = $self;
book : Association to Books;
}
type Price : Decimal(9,2);

View File

@@ -3,4 +3,5 @@ service AdminService @(path:'/admin') {
entity Authors as projection on my.Authors;
entity Books as projection on my.Books;
entity Genres as projection on my.Genres;
entity Contents as projection on my.Contents;
}

View File

@@ -3,14 +3,14 @@ service CatalogService @(path:'/browse') {
/** For displaying lists of Books */
@readonly entity ListOfBooks as projection on Books
excluding { descr };
excluding { descr, contents };
/** For display in details pages */
@readonly entity Books as projection on my.Books { *,
author.name as author
} excluding { createdBy, modifiedBy };
} excluding { createdBy, modifiedBy, contents };
@requires: 'authenticated-user'
action submitOrder ( book: Books:ID, quantity: Integer ) returns { stock: Integer };
event OrderedBook : { book: Books:ID; quantity: Integer; buyer: String };
}
}

View File

@@ -1,6 +1,9 @@
using { AdminService } from '@capire/bookstore';
using from '../common'; // to help UI linter get the complete annotations
annotate sap.capire.bookshop.Genres with @fiori.draft.enabled;
annotate AdminService.Genres with @odata.draft.enabled;
annotate AdminService.Genres with @odata.draft.bypass;
////////////////////////////////////////////////////////////////////////////
@@ -11,10 +14,11 @@ using from '../common'; // to help UI linter get the complete annotations
annotate AdminService.Books with @(
UI: {
Facets: [
{$Type: 'UI.ReferenceFacet', Label: '{i18n>General}', Target: '@UI.FieldGroup#General'},
{$Type: 'UI.ReferenceFacet', Label: '{i18n>Translations}', Target: 'texts/@UI.LineItem'},
{$Type: 'UI.ReferenceFacet', Label: '{i18n>Details}', Target: '@UI.FieldGroup#Details'},
{$Type: 'UI.ReferenceFacet', Label: '{i18n>Admin}', Target: '@UI.FieldGroup#Admin'},
{$Type: 'UI.ReferenceFacet', Label: '{i18n>General}', Target: '@UI.FieldGroup#General'},
{$Type: 'UI.ReferenceFacet', Label: '{i18n>Translations}', Target: 'texts/@UI.LineItem'},
{$Type: 'UI.ReferenceFacet', Label: '{i18n>Details}', Target: '@UI.FieldGroup#Details'},
{$Type: 'UI.ReferenceFacet', Label: '{i18n>Admin}', Target: '@UI.FieldGroup#Admin'},
{$Type: 'UI.ReferenceFacet', Label: '{i18n>Contents}', Target: 'contents/@UI.PresentationVariant'}
],
FieldGroup#General: {
Data: [
@@ -71,6 +75,7 @@ annotate AdminService.Genres with {
ID @UI.Hidden;
};
////////////////////////////////////////////////////////////
//
// Draft for Localized Data
@@ -110,3 +115,5 @@ extend service AdminService {
// Workaround for Fiori popup for asking user to enter a new UUID on Create
annotate AdminService.Books with { ID @Core.Computed; }
using from './tree-view';

View File

@@ -0,0 +1,42 @@
using { AdminService } from '@capire/bookstore';
////////////////////////////////////////////////////////////////////////////
//
// Contents Tree Table Annotations
//
// Tell Fiori about the structure of the hierarchy
annotate AdminService.Contents with @Aggregation.RecursiveHierarchy #ContentsHierarchy : {
ParentNavigationProperty : parent, // navigates to a node's parent
NodeProperty : ID, // identifies a node, usually the key
};
// Fiori expects the following to be defined explicitly, even though they're always the same
extend AdminService.Contents with @(
// The columns expected by Fiori to be present in hierarchy entities
Hierarchy.RecursiveHierarchy #ContentsHierarchy : {
LimitedDescendantCount : LimitedDescendantCount,
DistanceFromRoot : DistanceFromRoot,
DrillState : DrillState,
LimitedRank : LimitedRank
},
// Disallow filtering on these properties from Fiori UIs
Capabilities.FilterRestrictions.NonFilterableProperties: [
'LimitedDescendantCount',
'DistanceFromRoot',
'DrillState',
'LimitedRank'
],
// Disallow sorting on these properties from Fiori UIs
Capabilities.SortRestrictions.NonSortableProperties : [
'LimitedDescendantCount',
'DistanceFromRoot',
'DrillState',
'LimitedRank'
],
) columns { // Ensure we can query these fields from database
null as LimitedDescendantCount : Int16,
null as DistanceFromRoot : Int16,
null as DrillState : String,
null as LimitedRank : Int16,
};

View File

@@ -79,6 +79,11 @@
"pattern": "Books({key}/author({key2}):?query:",
"name": "AuthorsDetails",
"target": "AuthorsDetails"
},
{
"pattern": "Books({key})/contents({key2}):?query:",
"name": "ContentsDetails",
"target": "ContentsDetails"
}
],
"targets": {
@@ -112,11 +117,34 @@
"detail" : {
"route" : "AuthorsDetails"
}
},
"contents": {
"detail": {
"route": "ContentsDetails"
}
}
},
"controlConfiguration": {
"contents/@com.sap.vocabularies.UI.v1.LineItem": {
"tableSettings": {
"hierarchyQualifier": "ContentsHierarchy",
"type": "TreeTable"
}
}
}
}
}
},
"ContentsDetails": {
"type": "Component",
"id": "ContentsDetails",
"name": "sap.fe.templates.ObjectPage",
"options": {
"settings": {
"contextPath": "/Books/contents"
}
}
},
"AuthorsDetails": {
"type": "Component",
"id": "AuthorsDetailsList",

View File

@@ -18,14 +18,6 @@
"title": "Browse Books",
"targetURL": "#Books-display"
}
},
{
"id": "BrowseGenres",
"tileType": "sap.ushell.ui.tile.StaticTile",
"properties": {
"title": "Browse Genres",
"targetURL": "#Genres-display"
}
}
]
},
@@ -43,6 +35,14 @@
"title": "Manage Books",
"targetURL": "#Books-manage"
}
},
{
"id": "ManageGenres",
"tileType": "sap.ushell.ui.tile.StaticTile",
"properties": {
"title": "Manage Genres",
"targetURL": "#Genres-manage"
}
},
{
"id": "ManageAuthors",
@@ -114,10 +114,10 @@
"url": "/admin-authors/webapp"
}
},
"BrowseGenres": {
"ManageGenres": {
"semanticObject": "Genres",
"action": "display",
"title": "Browse Genres",
"action": "manage",
"title": "Manage Genres",
"signature": {
"parameters": {
"Genre.ID": {

View File

@@ -68,6 +68,54 @@ annotate my.Books with {
image @title: '{i18n>Image}';
}
annotate my.Contents with @(
cds.search: {name}
);
////////////////////////////////////////////////////////////////////////////
//
// Contents List
//
annotate my.Contents with @UI: {
PresentationVariant : {
$Type : 'UI.PresentationVariantType',
RequestAtLeast: [name],
Visualizations: ['@UI.LineItem'],
},
LineItem : [{
$Type: 'UI.DataField',
Value: name,
Label : '{i18n>Name}'
},
{
$Type: 'UI.DataField',
Value: page,
Label : '{i18n>Page}'
}],
HeaderInfo : {
$Type : 'UI.HeaderInfoType',
TypeName : '{i18n>ContentsLevel}',
TypeNamePlural: '{i18n>ContentsLevels}',
Title : {
$Type: 'UI.DataField',
Value: name,
}
},
FieldGroup : {
$Type: 'UI.FieldGroupType',
Data : [{
$Type: 'UI.DataField',
Value: page,
Label : '{i18n>PageNumber}'
}],
},
Facets : [{
$Type : 'UI.ReferenceFacet',
Target: '@UI.FieldGroup',
Label : '{i18n>Informations}',
}],
};
////////////////////////////////////////////////////////////////////////////
//
// Authors List

View File

@@ -1,7 +1,6 @@
using { sap.capire.bookshop.Genres } from '@capire/bookstore';
annotate Genres with @cds.search: {name};
annotate Genres with @readonly;
annotate Genres with {
name @title: '{i18n>Genre}';
}

View File

@@ -1,4 +1,4 @@
#XTIT
appTitle=Browse Genres
appTitle=Manage Genres
#XTXT
appDescription=Genres as Tree View

View File

@@ -19,13 +19,13 @@
},
"crossNavigation": {
"inbounds": {
"Genres-display": {
"Genres-manage": {
"signature": {
"parameters": {},
"additionalParameters": "allowed"
},
"semanticObject": "Genres",
"action": "display"
"action": "manage"
}
}
}

52
package-lock.json generated
View File

@@ -205,9 +205,9 @@
}
},
"node_modules/@eslint/js": {
"version": "9.24.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.24.0.tgz",
"integrity": "sha512-uIY/y3z0uvOGX8cp1C2fiC4+ZmBhp6yZWkojtHL1YEMnRt1Y63HB9TM17proGEmeG7HeUY+UP36F0aknKYTpYA==",
"version": "9.30.1",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.30.1.tgz",
"integrity": "sha512-zXhuECFlyep42KZUhWjfvsmXGX39W8K8LFb8AWXM9gSV9dQB+MrJGLKvW6Zw0Ggnbpw0VHTtrhFXYe3Gym18jg==",
"license": "MIT",
"peer": true,
"engines": {
@@ -320,9 +320,9 @@
}
},
"node_modules/@sap/xsenv": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/@sap/xsenv/-/xsenv-5.5.0.tgz",
"integrity": "sha512-+FIpnXjDrgtJaN6AxjDRIc5ONd4Yt5UarCqqzRiZjvJaknnkT+b6/ho/va/rg8UdiCAVxn8c4vMVhgjXGc/gmQ==",
"version": "5.6.1",
"resolved": "https://registry.npmjs.org/@sap/xsenv/-/xsenv-5.6.1.tgz",
"integrity": "sha512-4pDpsYLNJsLUBWtTSG+TJ8ul5iY0dWDyJgTy2H/WZGZww9CSPLP/39x+syDDTjkggsmZAlo9t7y9TiXMmtAunw==",
"license": "SEE LICENSE IN LICENSE file",
"dependencies": {
"debug": "4.4.0",
@@ -369,9 +369,9 @@
}
},
"node_modules/@sap/xssec/node_modules/debug": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
"integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",
"license": "MIT",
"dependencies": {
"ms": "^2.1.3"
@@ -477,9 +477,9 @@
"license": "MIT"
},
"node_modules/axios": {
"version": "1.8.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz",
"integrity": "sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==",
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.10.0.tgz",
"integrity": "sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw==",
"license": "MIT",
"dependencies": {
"follow-redirects": "^1.15.6",
@@ -1153,9 +1153,9 @@
}
},
"node_modules/form-data": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz",
"integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==",
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.3.tgz",
"integrity": "sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA==",
"license": "MIT",
"dependencies": {
"asynckit": "^0.4.0",
@@ -1461,12 +1461,12 @@
"license": "MIT"
},
"node_modules/jwa": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
"integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.2.tgz",
"integrity": "sha512-eeH5JO+21J78qMvTIDdBXidBd6nG2kZjg5Ohz/1fpa28Z4CcsWUzJ1ZZyFq/3z3N17aZy+ZuBoHljASbL1WfOw==",
"license": "MIT",
"dependencies": {
"buffer-equal-constant-time": "1.0.1",
"buffer-equal-constant-time": "^1.0.1",
"ecdsa-sig-formatter": "1.0.11",
"safe-buffer": "^5.0.1"
}
@@ -1755,12 +1755,12 @@
}
},
"node_modules/opossum": {
"version": "8.4.0",
"resolved": "https://registry.npmjs.org/opossum/-/opossum-8.4.0.tgz",
"integrity": "sha512-YYamqKu48bZCSTJKSWLLO4SSk8tKN2Gg2z1sJZVzHJYVObMO/xQpIzAh6re9HCMHRdB1dJvBjJH18DW7xYOicg==",
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/opossum/-/opossum-8.5.0.tgz",
"integrity": "sha512-LZNvs+p9/ZbG4oN6unnjh4hTxkB0dyHKI2p7azVt8w+//GKDpfHss6WR7KebbpzGEssYwtSd8Mvwxqcmxg10NA==",
"license": "Apache-2.0",
"engines": {
"node": "^22 || ^21 || ^20 || ^18 || ^16"
"node": "^24 || ^22 || ^21 || ^20 || ^18 || ^16"
}
},
"node_modules/parseurl": {
@@ -1956,9 +1956,9 @@
"license": "MIT"
},
"node_modules/semver": {
"version": "7.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
"integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
"version": "7.7.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
"integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
"license": "ISC",
"bin": {
"semver": "bin/semver.js"

View File

@@ -7,6 +7,6 @@ extend service CatalogService with {
*, //> non-localized defaults, e.g. title
key ID,
texts.title as localized_title,
texts.locale
};
texts.locale,
} excluding { contents };
}