Commit b82edb8d authored by Hamza HRAMCHI's avatar Hamza HRAMCHI
Browse files

FIX #18721 TIME 1:25 indexing model changed : set saved value when field value if empty

parent afd7679f
......@@ -814,15 +814,19 @@ export class IndexingFormComponent implements OnInit {
await this.getCurrentInitiator(elem, fieldValue);
}
if (elem.type === 'date' && !this.functions.empty(fieldValue)) {
fieldValue = new Date(fieldValue);
} else{
elem.default_value = null;
this.arrFormControl[elem.identifier].value = null;
if (elem.type === 'date') {
if (!this.functions.empty(fieldValue)) {
fieldValue = new Date(fieldValue);
} else {
elem.default_value = null;
this.arrFormControl[elem.identifier].value = null;
}
}
if (!this.functions.empty(fieldValue)) {
this.arrFormControl[elem.identifier].setValue(fieldValue);
}
} else if (!saveResourceState && elem.identifier === 'destination') {
this.arrFormControl[elem.identifier].disable();
this.arrFormControl[elem.identifier].setValidators([]);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment