diff --git a/src/app/admin/admin-ldn-services/ldn-services-data/ldn-services-data.service.ts b/src/app/admin/admin-ldn-services/ldn-services-data/ldn-services-data.service.ts index cdd259447a..5ffab2000b 100644 --- a/src/app/admin/admin-ldn-services/ldn-services-data/ldn-services-data.service.ts +++ b/src/app/admin/admin-ldn-services/ldn-services-data/ldn-services-data.service.ts @@ -84,6 +84,10 @@ export class LdnServicesService extends IdentifiableDataService impl return this.findAllData.findAll(options, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow); } + /*findByPattern(options?: FindListOptions, useCachedVersionIfAvailable?: boolean, reRequestOnStale?: boolean, ...linksToFollow: FollowLinkConfig[]): Observable>> { + return this.findAllData.find + }*/ + public delete(objectId: string, copyVirtualMetadata?: string[]): Observable> { return this.deleteData.delete(objectId, copyVirtualMetadata); } diff --git a/src/app/submission/form/submission-form.component.html b/src/app/submission/form/submission-form.component.html index c79364e2af..8fa1760d8f 100644 --- a/src/app/submission/form/submission-form.component.html +++ b/src/app/submission/form/submission-form.component.html @@ -1,7 +1,6 @@
-

ds-submission-upload-files

@@ -10,7 +9,6 @@
-

ds-submission-form-collection

-

ds-submission-form-section-add

@@ -32,7 +29,6 @@
-

ds-submission-section-container

@@ -44,7 +40,6 @@
diff --git a/src/app/submission/sections/container/section-container.component.html b/src/app/submission/sections/container/section-container.component.html index f39ba72ffa..99bcec168f 100644 --- a/src/app/submission/sections/container/section-container.component.html +++ b/src/app/submission/sections/container/section-container.component.html @@ -42,7 +42,7 @@
-
aaaaaaaaa +
diff --git a/src/app/submission/sections/section-coar-notify/section-coar-notify.component.html b/src/app/submission/sections/section-coar-notify/section-coar-notify.component.html index c9d79293ac..75318b937f 100644 --- a/src/app/submission/sections/section-coar-notify/section-coar-notify.component.html +++ b/src/app/submission/sections/section-coar-notify/section-coar-notify.component.html @@ -1,15 +1,29 @@ -
- - +
+ +
+ +
+ + {{selectedServices[pattern]?.name}} +
+ +
+
+ Select a service for {{ pattern }} of this item + + Coar-Notify-Pattern + + The selected service is compatible with the item according to its current status. {{ selectedServices[pattern].name }}: {{ selectedServices[pattern].description }} + + + {{ 'ldn-new-service.form.label.addPattern' | translate }} +
+
diff --git a/src/app/submission/sections/section-coar-notify/section-coar-notify.component.scss b/src/app/submission/sections/section-coar-notify/section-coar-notify.component.scss index e69de29bb2..c06ef5951c 100644 --- a/src/app/submission/sections/section-coar-notify/section-coar-notify.component.scss +++ b/src/app/submission/sections/section-coar-notify/section-coar-notify.component.scss @@ -0,0 +1,15 @@ +.add-pattern-link { + color: #0048ff; + cursor: pointer; +} +.ds-alert-coar{ + position: relative +} + +.coar-img-submission{ + position: absolute; top: 0; left: 0; width: 50px; height: 50px; +} + +.ds-alert-box{ + +} diff --git a/src/app/submission/sections/section-coar-notify/section-coar-notify.component.ts b/src/app/submission/sections/section-coar-notify/section-coar-notify.component.ts index 726f5ec6c4..39c8c9753d 100644 --- a/src/app/submission/sections/section-coar-notify/section-coar-notify.component.ts +++ b/src/app/submission/sections/section-coar-notify/section-coar-notify.component.ts @@ -61,6 +61,8 @@ export class SubmissionSectionCoarNotifyComponent extends SectionModelComponent patterns: string[] = []; selectedServices: { [key: string]: LdnService } = {}; patternsLoaded = false; + selectedService: any; + public AlertTypeEnum = AlertType; /** @@ -181,6 +183,18 @@ export class SubmissionSectionCoarNotifyComponent extends SectionModelComponent }); } + + addService() { + this.patterns.push(''); + } + + + removeService(index: number) { + if (index >= 0 && index < this.patterns.length) { + this.patterns.splice(index, 1); + } + } + /** * Handle the customEvent (ex. drag-drop move event). * The customEvent is stored inside event.$event @@ -301,25 +315,43 @@ export class SubmissionSectionCoarNotifyComponent extends SectionModelComponent */ fetchLdnServices() { this.ldnServicesRD$ = this.ldnServicesService.findAll().pipe( - getFirstCompletedRemoteData() + getFirstCompletedRemoteData() ); this.ldnServicesRD$.subscribe((data) => { if (this.patternsLoaded) { this.patterns.forEach((pattern) => { this.selectedServices[pattern] = data.payload.page.find((service) => - this.hasInboundPattern(service, `Request ${pattern}`) + this.hasInboundPattern(service, pattern) ); + + //console.log('Pattern:', pattern); + //console.log('Service:', this.selectedServices[pattern]); + + if (this.selectedServices[pattern]) { + //console.log('Name:', this.selectedServices[pattern].name); + //console.log('Description:', this.selectedServices[pattern].description); + } }); } }); } + protected getSectionStatus(): Observable { return undefined; } hasInboundPattern(service: any, patternType: string): boolean { - return service.notifyServiceInboundPatterns.some(pattern => pattern.pattern === patternType); + //console.log('Pattern Type:', patternType); + //console.log('Inbound Patterns in Service:', service.notifyServiceInboundPatterns); + + const hasPattern = service.notifyServiceInboundPatterns.some((pattern: { pattern: string; }) => { + //console.log('Checking Pattern:', pattern.pattern); + return pattern.pattern === patternType; + }); + + //console.log('Has Inbound Pattern:', hasPattern); + return hasPattern; } } diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index 40f0150022..58453db518 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -1982,6 +1982,8 @@ "info.coar-notify.breadcrumbs": "Notify Support", + "submission.sections.notify.info": "The selected service is compatible with the item according to its current status. {{ service.name }}: {{ service.description }}", + "info.feedback.head": "Feedback", "info.feedback.title": "Feedback", diff --git a/src/assets/images/notify_logo.png b/src/assets/images/notify_logo.png new file mode 100644 index 0000000000..0350c641df Binary files /dev/null and b/src/assets/images/notify_logo.png differ