coar-notify-7 item submission coar section show label if no inbound pattern are configured on LDN Notify Services

This commit is contained in:
frabacche
2024-02-27 20:59:56 +01:00
parent 6be10a81f4
commit aaf0ce24e0
3 changed files with 13 additions and 8 deletions

View File

@@ -34,6 +34,7 @@ import { LdnPattern } from './submission-coar-notify.config';
@renderSectionFor(SectionsType.CoarNotify)
export class SubmissionSectionCoarNotifyComponent extends SectionModelComponent {
hasSectionData = false;
/**
* Contains an array of string patterns.
*/
@@ -238,8 +239,12 @@ export class SubmissionSectionCoarNotifyComponent extends SectionModelComponent
filter((rd) => rd.hasSucceeded),
getRemoteDataPayload(),
getPaginatedListPayload(),
map((res: LdnService[]) => res.filter((service) =>
this.hasInboundPattern(service, pattern)))
map((res: LdnService[]) => res.filter((service) => {
if (!this.hasSectionData){
this.hasSectionData = this.hasInboundPattern(service, pattern);
}
return this.hasInboundPattern(service, pattern);
}))
);
}