Update
This commit is contained in:
1 parent
d33b2c487d
commit
c66b5a9aa9
1 file changed
+28
-26
@@ -1433,34 +1433,36 @@ export function TicketDetailPage({ periodType, period, ticketId, onNavigate, onO
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid gap-1.5 md:grid-cols-2">
|
{showBudgetedProjectEntries ? (
|
||||||
{budgetedProjectEntries.map((entry) => {
|
<div className="grid gap-1.5 md:grid-cols-2">
|
||||||
const consumption = Number(entry.consumption_minutes ?? 0);
|
{budgetedProjectEntries.map((entry) => {
|
||||||
const percent = projectConsumptionPercent(consumption, entry.hour_budget_minutes);
|
const consumption = Number(entry.consumption_minutes ?? 0);
|
||||||
const label = entry.teamspace_project || (entry.is_default ? "Standard" : "Ohne Teamspace-ID");
|
const percent = projectConsumptionPercent(consumption, entry.hour_budget_minutes);
|
||||||
|
const label = entry.teamspace_project || (entry.is_default ? "Standard" : "Ohne Teamspace-ID");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div key={entry.id} className="rounded-md border bg-background/50 px-2 py-1">
|
<div key={entry.id} className="rounded-md border bg-background/50 px-2 py-1">
|
||||||
<div className="mb-1 flex min-w-0 items-center justify-between gap-2 text-[11px]">
|
<div className="mb-1 flex min-w-0 items-center justify-between gap-2 text-[11px]">
|
||||||
<span className="truncate text-muted-foreground">
|
<span className="truncate text-muted-foreground">
|
||||||
{label}
|
{label}
|
||||||
{entry.is_default ? " · Standard" : ""}
|
{entry.is_default ? " · Standard" : ""}
|
||||||
{entry.budget_sync_disabled ? " · Budget geschützt" : ""}
|
{entry.budget_sync_disabled ? " · Budget geschützt" : ""}
|
||||||
</span>
|
</span>
|
||||||
<span className="shrink-0 font-medium">
|
<span className="shrink-0 font-medium">
|
||||||
{formatMinutes(consumption)} / {entry.hour_budget_minutes ? formatMinutes(entry.hour_budget_minutes) : "offen"}
|
{formatMinutes(consumption)} / {entry.hour_budget_minutes ? formatMinutes(entry.hour_budget_minutes) : "offen"}
|
||||||
</span>
|
</span>
|
||||||
|
</div>
|
||||||
|
<div className="h-1 overflow-hidden rounded-full bg-muted">
|
||||||
|
<div
|
||||||
|
className={cn("h-full rounded-full", percent === null ? "bg-muted-foreground/20" : projectConsumptionBarClass(percent))}
|
||||||
|
style={{ width: `${percent === null ? 0 : Math.min(100, percent)}%` }}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="h-1 overflow-hidden rounded-full bg-muted">
|
);
|
||||||
<div
|
})}
|
||||||
className={cn("h-full rounded-full", percent === null ? "bg-muted-foreground/20" : projectConsumptionBarClass(percent))}
|
</div>
|
||||||
style={{ width: `${percent === null ? 0 : Math.min(100, percent)}%` }}
|
) : null}
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="text-sm">
|
<div className="text-sm">
|
||||||
<div className="min-w-0">
|
<div className="min-w-0">
|
||||||
|
|||||||
Reference in new issue
Block a user