mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 18:44:14 +00:00
fix rest, add initialization param
This commit is contained in:
@@ -80,7 +80,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- In the Inbound Patterns Labels section -->
|
<!-- In the Inbound Patterns Labels section -->
|
||||||
<div class="row mb-1 mt-5">
|
<div class="row mb-1 mt-5" *ngIf="areControlsInitialized">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<label class="font-weight-bold">{{ 'ldn-new-service.form.label.inboundPattern' | translate }} </label>
|
<label class="font-weight-bold">{{ 'ldn-new-service.form.label.inboundPattern' | translate }} </label>
|
||||||
</div>
|
</div>
|
||||||
@@ -97,6 +97,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- In the Inbound Patterns section -->
|
<!-- In the Inbound Patterns section -->
|
||||||
|
<div *ngIf="areControlsInitialized">
|
||||||
<div *ngFor="let patternGroup of formModel.get('notifyServiceInboundPatterns')['controls']; let i = index"
|
<div *ngFor="let patternGroup of formModel.get('notifyServiceInboundPatterns')['controls']; let i = index"
|
||||||
[class.marked-for-deletion]="markedForDeletionInboundPattern.includes(i)"
|
[class.marked-for-deletion]="markedForDeletionInboundPattern.includes(i)"
|
||||||
formGroupName="notifyServiceInboundPatterns">
|
formGroupName="notifyServiceInboundPatterns">
|
||||||
@@ -214,13 +215,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<span (click)="addInboundPattern()"
|
<span (click)="addInboundPattern()"
|
||||||
class="add-pattern-link mb-2">{{ 'ldn-new-service.form.label.addPattern' | translate }}</span>
|
class="add-pattern-link mb-2">{{ 'ldn-new-service.form.label.addPattern' | translate }}</span>
|
||||||
|
|
||||||
<!-- In the Outbound Patterns Labels section -->
|
<!-- In the Outbound Patterns Labels section -->
|
||||||
<div class="row mb-1 mt-5">
|
<div class="row mb-1 mt-5" *ngIf="areControlsInitialized">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<label class="font-weight-bold">{{ 'ldn-new-service.form.label.outboundPattern' | translate }} </label>
|
<label class="font-weight-bold">{{ 'ldn-new-service.form.label.outboundPattern' | translate }} </label>
|
||||||
</div>
|
</div>
|
||||||
@@ -239,6 +240,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- In the Outbound Patterns section -->
|
<!-- In the Outbound Patterns section -->
|
||||||
|
<div *ngIf="areControlsInitialized">
|
||||||
<div *ngFor="let patternGroup of formModel.get('notifyServiceOutboundPatterns')['controls']; let i = index"
|
<div *ngFor="let patternGroup of formModel.get('notifyServiceOutboundPatterns')['controls']; let i = index"
|
||||||
[class.marked-for-deletion]="markedForDeletionOutboundPattern.includes(i)"
|
[class.marked-for-deletion]="markedForDeletionOutboundPattern.includes(i)"
|
||||||
formGroupName="notifyServiceOutboundPatterns">
|
formGroupName="notifyServiceOutboundPatterns">
|
||||||
@@ -348,6 +350,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
(click)="addOutboundPattern()"
|
(click)="addOutboundPattern()"
|
||||||
|
@@ -54,6 +54,7 @@ export class LdnServiceFormComponent implements OnInit, OnDestroy {
|
|||||||
public inboundPatterns: string[] = notifyPatterns;
|
public inboundPatterns: string[] = notifyPatterns;
|
||||||
public outboundPatterns: string[] = notifyPatterns;
|
public outboundPatterns: string[] = notifyPatterns;
|
||||||
public isNewForm: boolean;
|
public isNewForm: boolean;
|
||||||
|
public areControlsInitialized: boolean;
|
||||||
itemfiltersRD$: Observable<RemoteData<PaginatedList<Itemfilter>>>;
|
itemfiltersRD$: Observable<RemoteData<PaginatedList<Itemfilter>>>;
|
||||||
config: FindListOptions = Object.assign(new FindListOptions(), {
|
config: FindListOptions = Object.assign(new FindListOptions(), {
|
||||||
elementsPerPage: 20
|
elementsPerPage: 20
|
||||||
@@ -120,7 +121,7 @@ export class LdnServiceFormComponent implements OnInit, OnDestroy {
|
|||||||
this.isNewForm = segment[0].path === 'new';
|
this.isNewForm = segment[0].path === 'new';
|
||||||
this.formModel.addControl('notifyServiceInboundPatterns', this.formBuilder.array([this.createInboundPatternFormGroup()]));
|
this.formModel.addControl('notifyServiceInboundPatterns', this.formBuilder.array([this.createInboundPatternFormGroup()]));
|
||||||
this.formModel.addControl('notifyServiceOutboundPatterns', this.formBuilder.array([this.createOutboundPatternFormGroup()]));
|
this.formModel.addControl('notifyServiceOutboundPatterns', this.formBuilder.array([this.createOutboundPatternFormGroup()]));
|
||||||
|
this.areControlsInitialized = true;
|
||||||
if (this.serviceId && !this.isNewForm) {
|
if (this.serviceId && !this.isNewForm) {
|
||||||
this.fetchServiceData(this.serviceId);
|
this.fetchServiceData(this.serviceId);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user