diff --git a/src/frontend/app/indexation/indexing-form/indexing-form.component.ts b/src/frontend/app/indexation/indexing-form/indexing-form.component.ts index d3d80fd176b2a166001fbd23f60bbe1be9431f10..fa9f248c599915c8843d5757d05408da94142828 100644 --- a/src/frontend/app/indexation/indexing-form/indexing-form.component.ts +++ b/src/frontend/app/indexation/indexing-form/indexing-form.component.ts @@ -435,7 +435,9 @@ export class IndexingFormComponent implements OnInit { elem.endDate = '_TODAY'; this.fieldCategories.forEach(element => { - if (this['indexingModels_' + element].filter((field: any) => field.identifier === 'departureDate').length > 0) { + if (this['indexingModels_' + element].filter((field: any) => field.identifier === 'arrivalDate').length > 0) { + elem.endDate = 'arrivalDate'; + } else if (this['indexingModels_' + element].filter((field: any) => field.identifier === 'departureDate').length > 0) { elem.endDate = 'departureDate'; } });