Skip to content
Snippets Groups Projects
Commit 9986fcfa authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #12331 TIME 0:10 fix set default_value empty => null

parent 47f67435
No related branches found
No related tags found
No related merge requests found
...@@ -77,70 +77,70 @@ export class IndexingFormComponent implements OnInit { ...@@ -77,70 +77,70 @@ export class IndexingFormComponent implements OnInit {
identifier: 'getRecipients', identifier: 'getRecipients',
label: this.lang.getRecipients, label: this.lang.getRecipients,
type: 'autocomplete', type: 'autocomplete',
default_value: '', default_value: null,
values: [] values: []
}, },
{ {
identifier: 'priority', identifier: 'priority',
label: this.lang.priority, label: this.lang.priority,
type: 'select', type: 'select',
default_value: '', default_value: null,
values: [] values: []
}, },
{ {
identifier: 'confidentiality', identifier: 'confidentiality',
label: this.lang.confidential, label: this.lang.confidential,
type: 'radio', type: 'radio',
default_value: '', default_value: null,
values: [{ 'id': true, 'label': this.lang.yes }, { 'id': false, 'label': this.lang.no }] values: [{ 'id': true, 'label': this.lang.yes }, { 'id': false, 'label': this.lang.no }]
}, },
{ {
identifier: 'initiator', identifier: 'initiator',
label: this.lang.initiatorEntityAlt, label: this.lang.initiatorEntityAlt,
type: 'select', type: 'select',
default_value: '', default_value: null,
values: [] values: []
}, },
{ {
identifier: 'departureDate', identifier: 'departureDate',
label: this.lang.departureDate, label: this.lang.departureDate,
type: 'date', type: 'date',
default_value: '', default_value: null,
values: [] values: []
}, },
{ {
identifier: 'processLimitDate', identifier: 'processLimitDate',
label: this.lang.processLimitDate, label: this.lang.processLimitDate,
type: 'date', type: 'date',
default_value: '', default_value: null,
values: [] values: []
}, },
{ {
identifier: 'tags', identifier: 'tags',
label: this.lang.tags, label: this.lang.tags,
type: 'autocomplete', type: 'autocomplete',
default_value: '', default_value: null,
values: ['/rest/autocomplete/tags', '/rest/tags'] values: ['/rest/autocomplete/tags', '/rest/tags']
}, },
{ {
identifier: 'senders', identifier: 'senders',
label: this.lang.getSenders, label: this.lang.getSenders,
type: 'autocomplete', type: 'autocomplete',
default_value: '', default_value: null,
values: ['/rest/autocomplete/contacts'] values: ['/rest/autocomplete/contacts']
}, },
{ {
identifier: 'destination', identifier: 'destination',
label: this.lang.destination, label: this.lang.destination,
type: 'select', type: 'select',
default_value: '', default_value: null,
values: [] values: []
}, },
{ {
identifier: 'folders', identifier: 'folders',
label: this.lang.folders, label: this.lang.folders,
type: 'autocomplete', type: 'autocomplete',
default_value: '', default_value: null,
values: ['/rest/autocomplete/folders', '/rest/folders'] values: ['/rest/autocomplete/folders', '/rest/folders']
}, },
{ {
...@@ -148,7 +148,7 @@ export class IndexingFormComponent implements OnInit { ...@@ -148,7 +148,7 @@ export class IndexingFormComponent implements OnInit {
label: this.lang.docDate, label: this.lang.docDate,
unit: 'mail', unit: 'mail',
type: 'date', type: 'date',
default_value: '', default_value: null,
values: [] values: []
}, },
{ {
...@@ -156,7 +156,7 @@ export class IndexingFormComponent implements OnInit { ...@@ -156,7 +156,7 @@ export class IndexingFormComponent implements OnInit {
label: this.lang.arrivalDate, label: this.lang.arrivalDate,
unit: 'mail', unit: 'mail',
type: 'date', type: 'date',
default_value: '', default_value: null,
values: [] values: []
}, },
]; ];
...@@ -288,7 +288,7 @@ export class IndexingFormComponent implements OnInit { ...@@ -288,7 +288,7 @@ export class IndexingFormComponent implements OnInit {
} }
} }
} else { } else {
element.default_value = this.arrFormControl[element.identifier].value; element.default_value = this.arrFormControl[element.identifier].value === '' ? null : this.arrFormControl[element.identifier].value;
} }
if (element.identifier === "destination" && !this.adminMode && withDiffusionList) { if (element.identifier === "destination" && !this.adminMode && withDiffusionList) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment