mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[CST-9636] Format date to be sent to the process
This commit is contained in:
@@ -4,6 +4,7 @@ import { FormArray, FormBuilder, FormControl } from '@angular/forms';
|
||||
import { distinctUntilChanged, takeUntil } from 'rxjs/operators';
|
||||
import { Subject } from 'rxjs';
|
||||
import { AccessesConditionOption } from '../../../core/config/models/config-accesses-conditions-options.model';
|
||||
import { dateToISOFormat } from '../../date.util';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-access-control-array-form',
|
||||
@@ -70,7 +71,11 @@ export class AccessControlArrayFormComponent implements OnInit, OnDestroy {
|
||||
getValue() {
|
||||
return this.form.value.accessControl
|
||||
.filter(x => x.itemName !== null && x.itemName !== '')
|
||||
.map(x => ({ name: x.itemName, startDate: x.startDate || null, endDate: x.endDate || null }));
|
||||
.map(x => ({
|
||||
name: x.itemName,
|
||||
startDate: (x.startDate ? dateToISOFormat(x.startDate) : null),
|
||||
endDate: (x.endDate ? dateToISOFormat(x.endDate) : null)
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user