From fc1a02bc12ef11703eb90576d52398665bebf42b Mon Sep 17 00:00:00 2001 From: rkfg Date: Thu, 18 Jul 2024 12:53:08 +0300 Subject: [PATCH] Hide zero last retry timestamps in federation list --- src/resources/destinations.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/resources/destinations.tsx b/src/resources/destinations.tsx index 8a249a1b..89c7a9c8 100644 --- a/src/resources/destinations.tsx +++ b/src/resources/destinations.tsx @@ -27,6 +27,7 @@ import { useNotify, useRefresh, useTranslate, + DateFieldProps, } from "react-admin"; import { DATE_FORMAT } from "../components/date"; @@ -92,6 +93,14 @@ const DestinationTitle = () => { ); }; +const RetryDateField = (props: DateFieldProps) => { + const record = useRecordContext(props); + if (props.source && get(record, props.source) === 0) { + return + } + return +} + export const DestinationList = (props: ListProps) => { return ( { `${id}/show/rooms`} bulkActionButtons={false}> - +