From 9253c6932592be5f607bbc4d210ce482e55511b6 Mon Sep 17 00:00:00 2001 From: Sheen Capadngan Date: Tue, 21 May 2024 02:35:23 +0800 Subject: [PATCH] misc: finalized ui design of integration sync status --- .../IntegrationsSection.tsx | 54 ++++++++++++------- 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/frontend/src/views/IntegrationsPage/components/IntegrationsSection/IntegrationsSection.tsx b/frontend/src/views/IntegrationsPage/components/IntegrationsSection/IntegrationsSection.tsx index 46ef496ea..05968e086 100644 --- a/frontend/src/views/IntegrationsPage/components/IntegrationsSection/IntegrationsSection.tsx +++ b/frontend/src/views/IntegrationsPage/components/IntegrationsSection/IntegrationsSection.tsx @@ -1,5 +1,6 @@ import Link from "next/link"; -import { faArrowRight, faCheck, faXmark } from "@fortawesome/free-solid-svg-icons"; +import { faCalendarCheck } from "@fortawesome/free-regular-svg-icons"; +import { faArrowRight, faXmark } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { format } from "date-fns"; import { integrationSlugNameMapping } from "public/data/frequentConstants"; @@ -13,6 +14,7 @@ import { FormLabel, IconButton, Skeleton, + Tag, Tooltip } from "@app/components/v2"; import { ProjectPermissionActions, ProjectPermissionSub } from "@app/context"; @@ -189,35 +191,51 @@ export const IntegrationsSection = ({ )} -
- {!!integration.isSynced && !!integration.lastUsed && ( -
-
- Last sync: {format(new Date(integration.lastUsed), "yyyy-MM-dd, hh:mm aaa")} -
+
+ {integration.isSynced != null && integration.lastUsed != null && ( + +
+ +
Last sync
+
+
+ {format(new Date(integration.lastUsed), "yyyy-MM-dd, hh:mm aaa")} +
+ {!integration.isSynced && ( + <> +
+ +
Fail reason
+
+
+ {integration.syncMessage} +
+ + )} +
} > - +
Sync Status
-
+ )} {(isAllowed: boolean) => ( -
+
handlePopUpOpen("deleteConfirmation", integration)}