From 35a59ed968bd93c3870d14da5e1d850631111210 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Mon, 7 Oct 2024 12:09:37 +0200 Subject: [PATCH 01/53] Add dependency to cds-feature-attachments --- db/books.cds | 2 ++ db/pom.xml | 40 ++++++++++++++++++++++++++++++++++++++++ pom.xml | 21 +++++++++++++++++++++ srv/pom.xml | 1 + 4 files changed, 64 insertions(+) create mode 100644 db/pom.xml diff --git a/db/books.cds b/db/books.cds index fe2e5e0a..7973a1d3 100644 --- a/db/books.cds +++ b/db/books.cds @@ -8,6 +8,7 @@ using { } from '@sap/cds/common'; using my.bookshop.Reviews from './reviews'; using my.bookshop.TechnicalBooleanFlag from './common'; +using {sap.attachments.Attachments} from `com.sap.cds/cds-feature-attachments`; @fiori.draft.enabled entity Books : cuid, managed { @@ -22,6 +23,7 @@ entity Books : cuid, managed { reviews : Association to many Reviews on reviews.book = $self; isReviewable : TechnicalBooleanFlag not null default true; + covers : Composition of many Attachments; } entity Authors : cuid, managed { diff --git a/db/pom.xml b/db/pom.xml new file mode 100644 index 00000000..155d40fb --- /dev/null +++ b/db/pom.xml @@ -0,0 +1,40 @@ + + + 4.0.0 + + + bookshop-parent + my + ${revision} + + + bookshop-db + pom + + + + + com.sap.cds + cds-maven-plugin + + + cds.clean + + clean + + + + + cds.resolve + + resolve + + + + + + + + diff --git a/pom.xml b/pom.xml index 957cccc3..076dc5ed 100644 --- a/pom.xml +++ b/pom.xml @@ -28,9 +28,11 @@ 3.5.3 3.8.4 8.3.0 + 1.0.4-SNAPSHOT + db srv integration-tests @@ -74,6 +76,14 @@ + + + com.sap.cds + cds-feature-attachments + ${cds-feature-attachments.version} + + + @@ -167,4 +177,15 @@ + + + + Artifactory_DMZ-snapshots + SAP's Artifactory + https://common.repositories.cloud.sap/artifactory/cap-java/ + + true + + + diff --git a/srv/pom.xml b/srv/pom.xml index a8d9ae7b..2016fc48 100644 --- a/srv/pom.xml +++ b/srv/pom.xml @@ -236,4 +236,5 @@ + From 298d31be83ba064a70e680b3354fef79a7387d20 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Mon, 7 Oct 2024 12:46:45 +0200 Subject: [PATCH 02/53] Added UI facets with translations --- app/_i18n/i18n.properties | 2 ++ app/_i18n/i18n_de.properties | 2 ++ app/admin/fiori-service.cds | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/app/_i18n/i18n.properties b/app/_i18n/i18n.properties index d9718f5a..3aa2f556 100644 --- a/app/_i18n/i18n.properties +++ b/app/_i18n/i18n.properties @@ -68,3 +68,5 @@ AddReview = Add Review Notes = Notes Note = Note ISBN = ISBN + +attachmentsAndLinks = Attachments and Links \ No newline at end of file diff --git a/app/_i18n/i18n_de.properties b/app/_i18n/i18n_de.properties index afdd8243..b9e3c8e6 100644 --- a/app/_i18n/i18n_de.properties +++ b/app/_i18n/i18n_de.properties @@ -68,3 +68,5 @@ AddReview = Rezension hinzufügen Notes = Notizen Note = Notiz ISBN = ISBN + +attachmentsAndLinks = Anhänge und Links \ No newline at end of file diff --git a/app/admin/fiori-service.cds b/app/admin/fiori-service.cds index 2480f4cc..0726e285 100644 --- a/app/admin/fiori-service.cds +++ b/app/admin/fiori-service.cds @@ -31,6 +31,12 @@ annotate AdminService.Books with @(UI : { Label : '{i18n>Admin}', Target : '@UI.FieldGroup#Admin' }, + { + $Type : 'UI.ReferenceFacet', + ID : 'AttachmentsFacet', + Label : '{i18n>attachmentsAndLinks}', + Target : 'attachments/@UI.LineItem' + } ], FieldGroup #General : {Data : [ {Value : title}, From 2e85b8bddc05eefc260dda346837f831f3706e72 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Mon, 7 Oct 2024 12:49:15 +0200 Subject: [PATCH 03/53] fixed wrong target --- app/admin/fiori-service.cds | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/fiori-service.cds b/app/admin/fiori-service.cds index 0726e285..59cf774d 100644 --- a/app/admin/fiori-service.cds +++ b/app/admin/fiori-service.cds @@ -35,7 +35,7 @@ annotate AdminService.Books with @(UI : { $Type : 'UI.ReferenceFacet', ID : 'AttachmentsFacet', Label : '{i18n>attachmentsAndLinks}', - Target : 'attachments/@UI.LineItem' + Target : 'covers/@UI.LineItem' } ], FieldGroup #General : {Data : [ From 925bc98aa7bd991597ea0d0715a9a041f81f88b8 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Mon, 7 Oct 2024 13:44:40 +0200 Subject: [PATCH 04/53] added further texts --- app/_i18n/i18n.properties | 9 ++++++++- app/_i18n/i18n_de.properties | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/app/_i18n/i18n.properties b/app/_i18n/i18n.properties index 3aa2f556..d1226f53 100644 --- a/app/_i18n/i18n.properties +++ b/app/_i18n/i18n.properties @@ -69,4 +69,11 @@ Notes = Notes Note = Note ISBN = ISBN -attachmentsAndLinks = Attachments and Links \ No newline at end of file +attachmentsAndLinks = Attachments and Links +attachment_content = Content +attachment_mimeType = MIME Type +attachment_fileName = File Name +attachment_status = Status +attachment_note = Note +attachment = Attachment +attachments = Attachments \ No newline at end of file diff --git a/app/_i18n/i18n_de.properties b/app/_i18n/i18n_de.properties index b9e3c8e6..81ff4355 100644 --- a/app/_i18n/i18n_de.properties +++ b/app/_i18n/i18n_de.properties @@ -69,4 +69,11 @@ Notes = Notizen Note = Notiz ISBN = ISBN -attachmentsAndLinks = Anhänge und Links \ No newline at end of file +attachmentsAndLinks = Anhänge und Links +attachment_content = Inhalt +attachment_mimeType = MIME-Typ +attachment_fileName = Dateiname +attachment_status = Status +attachment_note = Notiz +attachment = Anhang +attachments = Anhänge \ No newline at end of file From 02fc3d1f49b5ed7d480449009c372f0c8715aef5 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Mon, 7 Oct 2024 14:53:12 +0200 Subject: [PATCH 05/53] use version 1.0.3 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 076dc5ed..a382c5da 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ 3.5.3 3.8.4 8.3.0 - 1.0.4-SNAPSHOT + 1.0.3 From 6dc93dc77fc261bd42475fd5e95aba57a6780941 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Mon, 7 Oct 2024 15:37:38 +0200 Subject: [PATCH 06/53] minor fixes --- db/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/db/pom.xml b/db/pom.xml index 155d40fb..fcaf34b2 100644 --- a/db/pom.xml +++ b/db/pom.xml @@ -18,6 +18,7 @@ com.sap.cds cds-maven-plugin + ${cds.services.version} cds.clean From 708dbfde5f50391860a7e89778404120a42bdf10 Mon Sep 17 00:00:00 2001 From: Markus Ofterdinger Date: Mon, 7 Oct 2024 17:15:46 +0200 Subject: [PATCH 07/53] Update UI5 to version 1.129.0 --- app/fiori.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/fiori.html b/app/fiori.html index 736a2458..4191d16c 100644 --- a/app/fiori.html +++ b/app/fiori.html @@ -14,8 +14,8 @@ }; - - + - - + - - + - - + - - + - - + - - +