working leantime widget 131

This commit is contained in:
Alma 2025-04-12 23:21:36 +02:00
parent b9a6ce3748
commit 99408bfc73

View File

@ -117,7 +117,7 @@ export function Flow() {
return a.status === 4 ? -1 : 1;
}
// Then sort by dateToFinish
// Then sort by dateToFinish (oldest first)
const dateA = getValidDate(a);
const dateB = getValidDate(b);
@ -166,16 +166,22 @@ export function Flow() {
const month = date.toLocaleString('fr-FR', { month: 'short' }).toUpperCase();
const day = date.getDate();
const year = date.getFullYear();
return (
<>
<span className={`text-xs font-medium uppercase ${isPastDue ? 'text-red-600' : 'text-blue-600'}`}>
{month}
<div className="flex flex-col items-center">
<div className="flex flex-col items-center">
<span className={`text-xs font-medium uppercase ${isPastDue ? 'text-red-600' : 'text-blue-600'}`}>
{month}
</span>
<span className={`text-lg font-bold ${isPastDue ? 'text-red-700' : 'text-blue-700'}`}>
{day}
</span>
</div>
<span className={`text-[10px] font-medium ${isPastDue ? 'text-red-500' : 'text-blue-500'}`}>
{year}
</span>
<span className={`text-lg font-bold ${isPastDue ? 'text-red-700' : 'text-blue-700'}`}>
{day}
</span>
</>
</div>
);
} catch (error) {
console.error('Error formatting date for task', task.id, error);