From f3a5b0190a3b0161b45c2ea46d8b5184f52642dc Mon Sep 17 00:00:00 2001 From: Alex ORLUC <alex.orluc@maarch.org> Date: Wed, 30 Oct 2019 11:50:54 +0100 Subject: [PATCH] FIX #12091 TIME 0:15 fix departureDate link to documentDate --- .../app/indexation/indexing-form/indexing-form.component.ts | 6 ++++++ 1 file changed, 6 insertions(+) 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 488235ef613..e69ef428c2c 100644 --- a/src/frontend/app/indexation/indexing-form/indexing-form.component.ts +++ b/src/frontend/app/indexation/indexing-form/indexing-form.component.ts @@ -344,6 +344,12 @@ export class IndexingFormComponent implements OnInit { elem.startDate = ''; elem.endDate = '_TODAY'; + this.fieldCategories.forEach(element => { + if (this['indexingModels_' + element].filter((field: any) => field.identifier === 'departureDate').length > 0) { + elem.endDate = 'departureDate'; + } + }); + } else if (elem.identifier === 'destination') { if (this.adminMode) { let title = ''; -- GitLab