mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 06:53:03 +00:00
Merge pull request #2204 from atmire/Angular-15-upgrade
Angular 15 upgrade
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { SectionAccessesService } from './section-accesses.service';
|
||||
import { Component, Inject, ViewChild } from '@angular/core';
|
||||
import { FormControl } from '@angular/forms';
|
||||
import { UntypedFormControl } from '@angular/forms';
|
||||
|
||||
import { filter, map, mergeMap, take } from 'rxjs/operators';
|
||||
import { combineLatest, Observable, of, Subscription } from 'rxjs';
|
||||
@@ -186,8 +186,8 @@ export class SubmissionSectionAccessesComponent extends SectionModelComponent {
|
||||
if (event.model.id === FORM_ACCESS_CONDITION_TYPE_CONFIG.id) {
|
||||
// Clear previous state when switching through different access conditions
|
||||
|
||||
const startDateControl: FormControl = event.control.parent.get('startDate') as FormControl;
|
||||
const endDateControl: FormControl = event.control.parent.get('endDate') as FormControl;
|
||||
const startDateControl: UntypedFormControl = event.control.parent.get('startDate') as UntypedFormControl;
|
||||
const endDateControl: UntypedFormControl = event.control.parent.get('endDate') as UntypedFormControl;
|
||||
|
||||
startDateControl?.markAsUntouched();
|
||||
endDateControl?.markAsUntouched();
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { FormControl } from '@angular/forms';
|
||||
import { UntypedFormControl } from '@angular/forms';
|
||||
|
||||
import {
|
||||
DYNAMIC_FORM_CONTROL_TYPE_DATEPICKER,
|
||||
@@ -240,13 +240,13 @@ export class SubmissionSectionUploadFileEditComponent implements OnInit {
|
||||
* @param control
|
||||
* The [[FormControl]] object
|
||||
*/
|
||||
public setOptions(model: DynamicFormControlModel, control: FormControl) {
|
||||
public setOptions(model: DynamicFormControlModel, control: UntypedFormControl) {
|
||||
let accessCondition: AccessConditionOption = null;
|
||||
this.availableAccessConditionOptions.filter((element) => element.name === control.value)
|
||||
.forEach((element) => accessCondition = element );
|
||||
if (isNotEmpty(accessCondition)) {
|
||||
const startDateControl: FormControl = control.parent.get('startDate') as FormControl;
|
||||
const endDateControl: FormControl = control.parent.get('endDate') as FormControl;
|
||||
const startDateControl: UntypedFormControl = control.parent.get('startDate') as UntypedFormControl;
|
||||
const endDateControl: UntypedFormControl = control.parent.get('endDate') as UntypedFormControl;
|
||||
|
||||
// Clear previous state
|
||||
startDateControl?.markAsUntouched();
|
||||
|
Reference in New Issue
Block a user