mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 02:24:11 +00:00
Fixed date utils and added typeDoc/comments
This commit is contained in:
@@ -28,7 +28,7 @@ import {
|
||||
import { DynamicRowArrayModel } from './ds-dynamic-form-ui/models/ds-dynamic-row-array-model';
|
||||
import { DsDynamicInputModel } from './ds-dynamic-form-ui/models/ds-dynamic-input.model';
|
||||
import { FormFieldMetadataValueObject } from './models/form-field-metadata-value.model';
|
||||
import { isDateObject } from '../../date.util';
|
||||
import { isNgbDateStruct } from '../../date.util';
|
||||
|
||||
@Injectable()
|
||||
export class FormBuilderService extends DynamicFormService {
|
||||
@@ -109,7 +109,7 @@ export class FormBuilderService extends DynamicFormService {
|
||||
} else if (isObject(controlValue)) {
|
||||
const authority = controlValue.authority || controlValue.id || null;
|
||||
const place = controlModelIndex || controlValue.place;
|
||||
if (isDateObject(controlValue)) {
|
||||
if (isNgbDateStruct(controlValue)) {
|
||||
return new FormFieldMetadataValueObject(controlValue, controlLanguage, authority, controlValue, place);
|
||||
} else {
|
||||
return new FormFieldMetadataValueObject(controlValue.value, controlLanguage, authority, controlValue.display, place, controlValue.confidence);
|
||||
|
Reference in New Issue
Block a user