mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
coar-notify-7 item submission coar section show label if no inbound pattern are configured on LDN Notify Services
This commit is contained in:
@@ -2,8 +2,7 @@
|
||||
<ng-container *ngIf="patterns?.length > 0 ">
|
||||
<div *ngFor="let ldnPattern of patterns; let i = index" class="col">
|
||||
<div *ngIf="(filterServices(ldnPattern.pattern ) | async)?.length > 0">
|
||||
<label class="row col-form-label"
|
||||
>
|
||||
<label class="row col-form-label">
|
||||
{{'submission.section.section-coar-notify.control.' + ldnPattern.pattern + '.label' | translate }}
|
||||
</label
|
||||
>
|
||||
@@ -16,13 +15,14 @@
|
||||
>
|
||||
<div class="row">
|
||||
<div ngbDropdown #myDropdown="ngbDropdown" [class.mt-2]="serviceIndex > 0" class="flex-grow-1">
|
||||
<div class="position-relative right-addon" role="combobox">
|
||||
<div class="position-relative right-addon"
|
||||
[attr.aria-label]="ldnPattern.pattern + '.dropdown'">
|
||||
<i ngbDropdownToggle class="position-absolute scrollable-dropdown-toggle"
|
||||
aria-hidden="true"></i>
|
||||
<input
|
||||
[attr.aria-label]="ldnPattern.pattern+'.dropdownanchor'"
|
||||
type="text"
|
||||
[readonly]="true"
|
||||
ngbDropdownAnchor
|
||||
[ngClass]="{'border-danger': (getShownSectionErrors$(ldnPattern.pattern, serviceIndex) | async)?.length > 0}"
|
||||
class="form-control w-100 scrollable-dropdown-input"
|
||||
[value]="ldnServiceByPattern[ldnPattern.pattern].services[serviceIndex]?.name"
|
||||
@@ -141,7 +141,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="patterns?.length === 0">
|
||||
<ng-container *ngIf="!hasSectionData">
|
||||
<p>
|
||||
{{ 'submission.section.section-coar-notify.info.no-pattern' | translate }}
|
||||
</p>
|
||||
|
@@ -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);
|
||||
}))
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -5972,7 +5972,7 @@
|
||||
|
||||
"submission.section.section-coar-notify.notification.error": "The selected service is not suitable for the current item. Please check the description for details about which record can be managed by this service.",
|
||||
|
||||
"submission.section.section-coar-notify.info.no-pattern": "No patterns found in the submission.",
|
||||
"submission.section.section-coar-notify.info.no-pattern": "No configurable patterns found.",
|
||||
|
||||
"error.validation.coarnotify.invalidfilter": "Invalid filter, try to select another service or none.",
|
||||
|
||||
|
Reference in New Issue
Block a user