From 7824dbbb1276b12fac94332cb1eedbd890539bc6 Mon Sep 17 00:00:00 2001 From: Henry Jonas Date: Thu, 24 Oct 2024 10:54:02 -0400 Subject: [PATCH] FOUR-19753 : The task comments is not showing the buttons to register the comments --- .../cases/casesMain/utils/filters.js | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/resources/jscomposition/cases/casesMain/utils/filters.js b/resources/jscomposition/cases/casesMain/utils/filters.js index 593976e311..d005f61b59 100644 --- a/resources/jscomposition/cases/casesMain/utils/filters.js +++ b/resources/jscomposition/cases/casesMain/utils/filters.js @@ -1,28 +1,28 @@ import { formatDate } from "../../../utils"; export const formatFilters = (filters) => { - const response = filters.map((e) => { - let { value } = e; + const response = filters.map((element) => { + let { value } = element; - if (!e.operator) { + if (!element.operator) { return null; } - if (e.operator === "between" || e.operator === "in") { - value = e.value.map((o) => o.value); + if (element.operator === "between" || element.operator === "in") { + value = element.value.map((o) => o.value); } // Case status is a dropdown filter, using for the API - if (e.field === "case_status") { - value = e.value.value; + if (element.field === "case_status") { + value = element.value.value; } return { subject: { type: "Field", - value: e.field, + value: element.field, }, - operator: e.operator, + operator: element.operator, value, }; }); @@ -32,21 +32,21 @@ export const formatFilters = (filters) => { // Format filters to convert in badges data export const formatFilterBadges = (filters, columns) => { - const response = filters.map((e) => { - let { value } = e; - const col = columns.find((c) => c.field === e.field); + const response = filters.map((element) => { + let { value } = element; + const col = columns.find((c) => c.field === element.field); - if (!e.operator) { + if (!element.operator) { return null; } - if (e.operator === "between" || e.operator === "in") { - value = e.value.map((o) => o.value); + if (element.operator === "between" || element.operator === "in") { + value = element.value.map((o) => o.value); } // Case status is a dropdown filter, using with badges - if (e.field === "case_status") { - value = e.value.label; + if (element.field === "case_status") { + value = element.value.label; } // Format datetime value to badges @@ -56,8 +56,8 @@ export const formatFilterBadges = (filters, columns) => { return { fieldName: col.header, - field: e.field, - operator: e.operator, + field: element.field, + operator: element.operator, value, }; });