From 7beda8e22d8571852e7c1c28e82cfd8366756a47 Mon Sep 17 00:00:00 2001
From: fahad-aot <99656326+fahad-aot@users.noreply.github.com>
Date: Fri, 24 Nov 2023 13:39:11 +0530
Subject: [PATCH] Final fixes (#1776)
* list-view fixes
* final fixes
---
.../components/Application/historyTable.js | 2 +-
.../ServiceFlow/list/ServiceTaskListView.js | 9 ++++++---
.../ServiceFlow/list/sort/CreateNewFilter.js | 6 +++---
.../list/sort/TaskAttributeComponent.js | 20 +++++++++----------
4 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/forms-flow-web/src/components/Application/historyTable.js b/forms-flow-web/src/components/Application/historyTable.js
index 10ae5ed0c8..eab97adb7e 100644
--- a/forms-flow-web/src/components/Application/historyTable.js
+++ b/forms-flow-web/src/components/Application/historyTable.js
@@ -17,7 +17,7 @@ const linkSubmision = (row, redirectUrl) => {
const { formId, submissionId } = row;
const url = getFormUrl(formId, submissionId, redirectUrl);
return (
-
window.open(url, "_blank")}>
+
window.open(url, "_blank")}>
diff --git a/forms-flow-web/src/components/ServiceFlow/list/ServiceTaskListView.js b/forms-flow-web/src/components/ServiceFlow/list/ServiceTaskListView.js
index a66b074845..bf79534d6e 100644
--- a/forms-flow-web/src/components/ServiceFlow/list/ServiceTaskListView.js
+++ b/forms-flow-web/src/components/ServiceFlow/list/ServiceTaskListView.js
@@ -11,7 +11,9 @@ import Loading from "../../../containers/Loading";
import { useTranslation } from "react-i18next";
import "./../ServiceFlow.scss";
import TaskSearchBarListView from "./search/TaskSearchBarListView";
-
+import {
+ getFormattedDateAndTime,
+} from "../../../apiManager/services/formatterService";
import Pagination from "react-js-pagination";
import { push } from "connected-react-router";
// import { MAX_RESULTS } from "../constants/taskConstants";
@@ -155,8 +157,9 @@ const ServiceTaskListView = React.memo(() => {
{vissibleAttributes?.taskVisibleAttributes?.createdDate &&
{t("Created Date")}
-
-
+
{moment(task.created).isSame(moment(), "day")
? moment(task.created).fromNow()
: task.created.split('T')[0]}
diff --git a/forms-flow-web/src/components/ServiceFlow/list/sort/CreateNewFilter.js b/forms-flow-web/src/components/ServiceFlow/list/sort/CreateNewFilter.js
index d430b679b7..b9a58e486b 100644
--- a/forms-flow-web/src/components/ServiceFlow/list/sort/CreateNewFilter.js
+++ b/forms-flow-web/src/components/ServiceFlow/list/sort/CreateNewFilter.js
@@ -819,8 +819,8 @@ export default function CreateNewFilterDrawer({
onClick={toggleModal}
placeholder={
taskAttributesCount === 0
- ? "Select Elements"
- : taskAttributesCount + " Task Attributes Selected"
+ ? t("Select Elements")
+ : taskAttributesCount + t(" Task Attributes Selected")
}
/>
@@ -858,7 +858,7 @@ export default function CreateNewFilterDrawer({
}}
>
- {(t) => t(`${selectedFilterData ? "Save" : "Create"} Filter`)}
+ {(t) => (`${selectedFilterData ? t("Save Filter") : t("Create Filter")} `)}
diff --git a/forms-flow-web/src/components/ServiceFlow/list/sort/TaskAttributeComponent.js b/forms-flow-web/src/components/ServiceFlow/list/sort/TaskAttributeComponent.js
index 44dea6069b..f64902a6a1 100644
--- a/forms-flow-web/src/components/ServiceFlow/list/sort/TaskAttributeComponent.js
+++ b/forms-flow-web/src/components/ServiceFlow/list/sort/TaskAttributeComponent.js
@@ -65,7 +65,7 @@ function TaskAttributeComponent({
{t("Name")}
handleVariableInputChange(index, "name", e.target.value)
@@ -173,7 +173,7 @@ function TaskAttributeComponent({
{t("Label")}
handleVariableInputChange(