From 2b11763da17f34f5c9f60441fbe21a3fbfd9a84e Mon Sep 17 00:00:00 2001
From: Andre-Diamond <32074058+Andre-Diamond@users.noreply.github.com>
Date: Thu, 15 Feb 2024 14:57:07 +0200
Subject: [PATCH] Fixed clear button issue on some templates
---
components/SummaryAgendaItems.tsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/components/SummaryAgendaItems.tsx b/components/SummaryAgendaItems.tsx
index 4d33de5..b03aa75 100644
--- a/components/SummaryAgendaItems.tsx
+++ b/components/SummaryAgendaItems.tsx
@@ -432,7 +432,9 @@ const SummaryAgendaItems = ({ onUpdate }: any) => {
{myVariable.workgroup?.preferred_template?.agendaItems[0]?.agenda == 1 && item.agenda == '' && ()}
))}
- {myVariable.workgroup?.preferred_template?.agendaItems[0]?.agenda == 1 && ()}
+ {((myVariable.workgroup?.preferred_template?.agendaItems[0]?.agenda == 0 && agendaItems.length == 0) ||
+ (myVariable.workgroup?.preferred_template?.agendaItems[0]?.agenda == 1))
+ && ()}
);
};