Plany: wizard 3-etapowy tworzenia/edycji, silownia i alias tygodnia (UX + API + migracja)
This commit is contained in:
@@ -31,10 +31,15 @@ export function PlanDayRow({
|
||||
actions?: ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<div className={`rounded-[10px] px-3 py-3 transition-colors hover:bg-line/20 ${DAY_TINT[day.status]}`.trim()}>
|
||||
<div
|
||||
className={`rounded-[10px] px-3 py-3 transition-colors hover:bg-line/20 ${DAY_TINT[day.status]}`.trim()}
|
||||
>
|
||||
<div className="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between">
|
||||
<div className="flex min-w-0 flex-wrap items-center gap-2">
|
||||
<span aria-hidden="true" className={`h-2 w-2 flex-none rounded-full ${DAY_DOT[day.status]}`} />
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className={`h-2 w-2 flex-none rounded-full ${DAY_DOT[day.status]}`}
|
||||
/>
|
||||
<strong className="text-[0.95rem]">{DAY_NAMES[day.dayOfWeek]}</strong>
|
||||
{showDate && day.date && (
|
||||
<span className="text-dim text-[0.8125rem] tabular-nums">{fmtDate(day.date)}</span>
|
||||
@@ -51,7 +56,9 @@ export function PlanDayRow({
|
||||
<span className="min-w-0 truncate text-[0.875rem]">{ex.exercise.name}</span>
|
||||
<span className="shrink-0 text-dim text-[0.8125rem] tabular-nums">
|
||||
{ex.sets.length}×{' '}
|
||||
{ex.sets.map((s) => `${s.reps ?? '?'} powt.${s.loadKg ? ` @ ${s.loadKg}kg` : ''}`).join(', ')}
|
||||
{ex.sets
|
||||
.map((s) => `${s.reps ?? '?'} powt.${s.loadKg ? ` @ ${s.loadKg}kg` : ''}`)
|
||||
.join(', ')}
|
||||
</span>
|
||||
</li>
|
||||
))}
|
||||
@@ -78,6 +85,7 @@ export function PlanWeekCard({
|
||||
<div className="mb-1 flex flex-wrap items-center justify-between gap-2">
|
||||
<div className="flex items-center gap-2.5">
|
||||
<H2 className="mb-0">Tydzień {week.index + 1}</H2>
|
||||
{week.customName && <Badge color="blue">{week.customName}</Badge>}
|
||||
{total > 0 && (
|
||||
<Badge color={completed === total ? 'green' : 'gray'}>
|
||||
{completed}/{total} dni
|
||||
@@ -92,7 +100,9 @@ export function PlanWeekCard({
|
||||
style={{ width: `${percent}%` }}
|
||||
/>
|
||||
</div>
|
||||
<span className="font-display text-[0.75rem] font-bold tabular-nums text-dim">{percent}%</span>
|
||||
<span className="font-display text-[0.75rem] font-bold tabular-nums text-dim">
|
||||
{percent}%
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user