From acaeae8d7bb2b4040113fb9f9a11bdad12c19c72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Dere=C5=BEi=C4=87?= Date: Thu, 1 Feb 2024 15:31:33 +0100 Subject: [PATCH 1/3] enabled accordion to be collapsed --- app/ui/MonthCard.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/ui/MonthCard.tsx b/app/ui/MonthCard.tsx index b66db90..e3ed838 100644 --- a/app/ui/MonthCard.tsx +++ b/app/ui/MonthCard.tsx @@ -18,8 +18,9 @@ export const MonthCard:FC = ({ yearMonth, children, monthlyExpen const router = useRouter(); const elRef = useRef(null); - // setting the `month` will activate the accordion belonging to that month - const handleChange = (event:any) => router.push(`/?year=${yearMonth.year}&month=${yearMonth.month}`); + // Setting the `month` will activate the accordion belonging to that month + // If the accordion is already active, it will collapse it + const handleChange = (event:any) => router.push(expanded ? `/?year=${yearMonth.year}` : `/?year=${yearMonth.year}&month=${yearMonth.month}`); useEffect(() => { if(expanded && elRef.current) { From 85aea1fa6d41e48a9ad09198859731fd578650f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Dere=C5=BEi=C4=87?= Date: Thu, 1 Feb 2024 15:35:44 +0100 Subject: [PATCH 2/3] changed control from radio to checkbox --- app/ui/MonthCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/ui/MonthCard.tsx b/app/ui/MonthCard.tsx index e3ed838..706444f 100644 --- a/app/ui/MonthCard.tsx +++ b/app/ui/MonthCard.tsx @@ -31,7 +31,7 @@ export const MonthCard:FC = ({ yearMonth, children, monthlyExpen return(
- +
{`${formatYearMonth(yearMonth)}`} { From e65ca41284338a128d5bff86a36cfdb431057a0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Dere=C5=BEi=C4=87?= Date: Thu, 1 Feb 2024 15:36:34 +0100 Subject: [PATCH 3/3] updated image version --- docker-compose-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose-deploy.yml b/docker-compose-deploy.yml index ced4f42..3629f44 100644 --- a/docker-compose-deploy.yml +++ b/docker-compose-deploy.yml @@ -9,7 +9,7 @@ networks: services: web-app: - image: utility-bills-tracker:1.4.0 + image: utility-bills-tracker:1.5.0 networks: - traefik-network - mongo-network