working leantime widget 131
This commit is contained in:
parent
b9a6ce3748
commit
99408bfc73
@ -117,7 +117,7 @@ export function Flow() {
|
|||||||
return a.status === 4 ? -1 : 1;
|
return a.status === 4 ? -1 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Then sort by dateToFinish
|
// Then sort by dateToFinish (oldest first)
|
||||||
const dateA = getValidDate(a);
|
const dateA = getValidDate(a);
|
||||||
const dateB = getValidDate(b);
|
const dateB = getValidDate(b);
|
||||||
|
|
||||||
@ -166,16 +166,22 @@ export function Flow() {
|
|||||||
|
|
||||||
const month = date.toLocaleString('fr-FR', { month: 'short' }).toUpperCase();
|
const month = date.toLocaleString('fr-FR', { month: 'short' }).toUpperCase();
|
||||||
const day = date.getDate();
|
const day = date.getDate();
|
||||||
|
const year = date.getFullYear();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<div className="flex flex-col items-center">
|
||||||
<span className={`text-xs font-medium uppercase ${isPastDue ? 'text-red-600' : 'text-blue-600'}`}>
|
<div className="flex flex-col items-center">
|
||||||
{month}
|
<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>
|
||||||
<span className={`text-lg font-bold ${isPastDue ? 'text-red-700' : 'text-blue-700'}`}>
|
</div>
|
||||||
{day}
|
|
||||||
</span>
|
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error formatting date for task', task.id, error);
|
console.error('Error formatting date for task', task.id, error);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user