Skip to content

Commit f09b211

Browse files
committed
Migrated form incident-app to bookshop
1 parent 42bbe81 commit f09b211

73 files changed

Lines changed: 3360 additions & 5479 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.DS_Store

8 KB
Binary file not shown.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<version>${revision}</version>
1010
<packaging>pom</packaging>
1111

12-
<name>emoji-template parent</name>
12+
<name>plugin-template-emoji parent</name>
1313

1414
<properties>
1515
<!-- OUR VERSION -->

samples/.DS_Store

6 KB
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Books = Books
2+
Book = Book
3+
ID = ID
4+
Title = Title
5+
Author = Author
6+
Authors = Authors
7+
AuthorID = Author ID
8+
AuthorName = Author Name
9+
Name = Name
10+
Age = Age
11+
Stock = Stock
12+
Order = Order
13+
Orders = Orders
14+
Price = Price
15+
Genre = Genre
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Books = Bücher
2+
Book = Buch
3+
ID = ID
4+
Title = Titel
5+
Author = Autor
6+
Authors = Autoren
7+
AuthorID = ID des Autors
8+
AuthorName = Name des Autors
9+
Name = Name
10+
Age = Alter
11+
Stock = Bestand
12+
Order = Bestellung
13+
Orders = Bestellungen
14+
Price = Preis
15+
Genre = Genre
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
using {AdminService} from '../../srv/admin-service.cds';
2+
3+
////////////////////////////////////////////////////////////////////////////
4+
//
5+
// Books Object Page
6+
//
7+
annotate AdminService.Books with @(UI: {
8+
HeaderInfo : {
9+
TypeName : '{i18n>Book}',
10+
TypeNamePlural: '{i18n>Books}',
11+
Title : {Value: title},
12+
Description : {Value: author.name}
13+
},
14+
Facets : [
15+
{
16+
$Type : 'UI.ReferenceFacet',
17+
Label : '{i18n>General}',
18+
Target: '@UI.FieldGroup#General'
19+
},
20+
{
21+
$Type : 'UI.ReferenceFacet',
22+
Label : '{i18n>Translations}',
23+
Target: 'texts/@UI.LineItem'
24+
},
25+
{
26+
$Type : 'UI.ReferenceFacet',
27+
Label : '{i18n>Details}',
28+
Target: '@UI.FieldGroup#Details'
29+
},
30+
{
31+
$Type : 'UI.ReferenceFacet',
32+
Label : '{i18n>Admin}',
33+
Target: '@UI.FieldGroup#Admin'
34+
}
35+
],
36+
FieldGroup #General: {Data: [
37+
{Value: title},
38+
{Value: author_ID},
39+
{Value: genre_ID},
40+
{Value: descr}
41+
]},
42+
FieldGroup #Details: {Data: [
43+
{Value: stock},
44+
{Value: price}
45+
]},
46+
FieldGroup #Admin : {Data: [
47+
{Value: createdBy},
48+
{Value: createdAt},
49+
{Value: modifiedBy},
50+
{Value: modifiedAt}
51+
]}
52+
});
53+
54+
55+
////////////////////////////////////////////////////////////
56+
//
57+
// Draft for Localized Data
58+
//
59+
annotate sap.capire.bookshop.Books with @fiori.draft.enabled;
60+
annotate AdminService.Books with @odata.draft.enabled;
61+
62+
annotate AdminService.Books.texts with @(UI: {
63+
Identification : [{Value: title}],
64+
SelectionFields: [
65+
locale,
66+
title
67+
],
68+
LineItem : [
69+
{
70+
Value: locale,
71+
Label: 'Locale'
72+
},
73+
{
74+
Value: title,
75+
Label: 'Title'
76+
},
77+
{
78+
Value: descr,
79+
Label: 'Description'
80+
}
81+
]
82+
});
83+
84+
annotate AdminService.Books.texts with {
85+
ID @UI.Hidden;
86+
ID_texts @UI.Hidden;
87+
};
88+
89+
// Add Value Help for Locales
90+
annotate AdminService.Books.texts {
91+
locale @(
92+
ValueList.entity: 'Languages',
93+
Common.ValueListWithFixedValues //show as drop down, not a dialog
94+
)
95+
};
96+
97+
// In addition we need to expose Languages through AdminService as a target for ValueList
98+
using {sap} from '@sap/cds/common';
99+
100+
extend service AdminService {
101+
@readonly
102+
entity Languages as projection on sap.common.Languages;
103+
}
104+
105+
// Workaround for Fiori popup for asking user to enter a new UUID on Create
106+
annotate AdminService.Books with {
107+
ID @Core.Computed;
108+
}
109+
110+
// Show Genre as drop down, not a dialog
111+
annotate AdminService.Books with {
112+
genre @Common.ValueListWithFixedValues;
113+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
sap.ui.define(["sap/fe/core/AppComponent"], function (AppComponent) {
2+
"use strict";
3+
return AppComponent.extend("books.Component", {
4+
metadata: { manifest: "json" }
5+
});
6+
});
7+
8+
/* eslint no-undef:0 */
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
appTitle=Manage Books
2+
appSubTitle=Manage bookshop inventory
3+
appDescription=Manage your bookshop inventory with ease.

0 commit comments

Comments
 (0)