From bf068a5e573ad59ee3d92d197fb896cfb425fdd2 Mon Sep 17 00:00:00 2001 From: "hamza.hramchi" <hamza.hramchi@xelians.fr> Date: Fri, 16 Oct 2020 17:05:05 +0200 Subject: [PATCH] FEAT #14383 TIME 0:10 filter the list of custom available with display mode in the form --- .../app/indexation/indexing-form/indexing-form.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 47629e181f2..586c10e9ff0 100755 --- a/src/frontend/app/indexation/indexing-form/indexing-form.component.ts +++ b/src/frontend/app/indexation/indexing-form/indexing-form.component.ts @@ -306,7 +306,9 @@ export class IndexingFormComponent implements OnInit { this.http.get('../rest/customFields').pipe( tap((data: any) => { - this.availableCustomFields = data.customFields.map((info: any) => { + const withFormMode = data.customFields.filter((item: { mode: any; }) => item.mode === 'form'); + console.log(withFormMode); + this.availableCustomFields = withFormMode.map((info: any) => { info.identifier = 'indexingCustomField_' + info.id; info.system = false; info.enabled = true; -- GitLab