Plany: PATCH z startDate (aktywacja przy zapisie) i udostepnianie planow trener-podopieczny (PlanShare, sekcja Udostepnione mi, widok read-only)
This commit is contained in:
@@ -274,6 +274,8 @@ export interface PlanWeek {
|
||||
|
||||
export interface Plan {
|
||||
id: string;
|
||||
/** Właściciel planu (podopieczny, gdy plan utworzył trener). */
|
||||
userId: string;
|
||||
title: string;
|
||||
status: 'DRAFT' | 'ACTIVE' | 'COMPLETED' | 'ABANDONED';
|
||||
weeksCount: number;
|
||||
@@ -282,6 +284,15 @@ export interface Plan {
|
||||
gym: { id: string; name: string } | null;
|
||||
/** Kto utworzył plan (trener, gdy plan należy do podopiecznego); null = podopieczny sam. */
|
||||
creator: { id: string; firstName: string | null; lastName: string | null } | null;
|
||||
/** Kto udostępnił plan (sekcja „Udostępnione mi”); brak = plan własny. */
|
||||
sharedBy?: { id: string; firstName: string | null; lastName: string | null };
|
||||
/** Odbiorcy share'u (tylko detal, dla właściciela); brak = nieudostępniony lub nie-właściciel. */
|
||||
shares?: {
|
||||
userId: string;
|
||||
user: { id: string; firstName: string | null; lastName: string | null };
|
||||
}[];
|
||||
/** Detal: czy zalogowany może zarządzać planem (właściciel lub trener z ACTIVE coachingiem). */
|
||||
canManage?: boolean;
|
||||
/** Podsumowanie postępu (lista planów); brak = dane niedostępne. */
|
||||
progress?: { completed: number; total: number; percent: number };
|
||||
weeks: PlanWeek[];
|
||||
|
||||
Reference in New Issue
Block a user