From 10c11745cef3451f38abdda8e0d149542996f84f Mon Sep 17 00:00:00 2001 From: boulch Date: Fri, 4 Jul 2025 15:00:56 +0200 Subject: [PATCH] SUP-45754 : Agenda view : Display hour and minute when it's necessary --- CHANGES.rst | 3 +++ .../src/components/Events/EventCard/EventCard.jsx | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 4f4020e2..2d40b35d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,9 @@ Changelog 1.4.7 (unreleased) ------------------ +- SUP-45754 : Agenda view : Display hour and minute when it's necessary + [boulch] + - Fix effective news date [thomlamb] diff --git a/src/imio/smartweb/core/webcomponents/src/components/Events/EventCard/EventCard.jsx b/src/imio/smartweb/core/webcomponents/src/components/Events/EventCard/EventCard.jsx index 5c9d453e..bf97042e 100644 --- a/src/imio/smartweb/core/webcomponents/src/components/Events/EventCard/EventCard.jsx +++ b/src/imio/smartweb/core/webcomponents/src/components/Events/EventCard/EventCard.jsx @@ -5,8 +5,12 @@ import { Translate } from "react-translated"; const ContactCard = ({ item, showCategoriesOrTopics, contextAuthenticatedUser }) => { moment.locale("be"); const title = item.title && item.title; - const start = moment.utc(item.start).format("DD-MM-YYYY"); - const end = moment.utc(item.end).format("DD-MM-YYYY"); +const start = moment.utc(item.start).format( + moment.utc(item.start).format("HH:mm") === "00:00" ? "DD-MM-YYYY" : "DD-MM-YYYY HH:mm" +); +const end = moment.utc(item.end).format( + moment.utc(item.end).format("HH:mm") === "00:00" ? "DD-MM-YYYY" : "DD-MM-YYYY HH:mm" +); return ( <> {contextAuthenticatedUser === "False" ? (