This commit is contained in:
Tomas Dvorak
2025-11-03 19:54:39 +01:00
parent 087f30e82c
commit d5b4faea61
141 changed files with 78770 additions and 966 deletions
+15 -1
View File
@@ -88,7 +88,7 @@ export async function adminListTransactions(params?: { user_id?: number|string;
return (res.data?.items || []) as AdminPointsTx[];
}
export async function adminAdjustPoints(body: { user_id: number; delta: number; reason?: string; meta?: Record<string, any> }): Promise<{ ok: boolean }>{
export async function adminAdjustPoints(body: { user_id: number; delta: number; reason?: string; meta?: Record<string, any>; current_password?: string }): Promise<{ ok: boolean }>{
const res = await api.post('/admin/engagement/adjust', body);
return res.data as { ok: boolean };
}
@@ -112,3 +112,17 @@ export async function adminGetUserProfile(user_id: number | string): Promise<Adm
const res = await api.get(`/admin/engagement/profile/${user_id}`);
return res.data as AdminUserProfile;
}
export type AdminUserListItem = {
id: number;
email: string;
name: string;
role: string;
isActive: boolean;
createdAt: string;
};
export async function adminListUsers(): Promise<AdminUserListItem[]> {
const res = await api.get('/admin/users');
return (res.data || []) as AdminUserListItem[];
}
+2
View File
@@ -12,6 +12,7 @@ export interface Player {
height?: number;
weight?: number;
image_url?: string;
gender?: string;
is_active: boolean;
created_at?: string;
email?: string;
@@ -35,6 +36,7 @@ function normalize(p: any): Player {
height: p.height ?? p.Height ?? undefined,
weight: p.weight ?? p.Weight ?? undefined,
image_url: p.image_url ?? p.ImageURL ?? undefined,
gender: p.gender ?? p.Gender ?? undefined,
is_active: Boolean(p.is_active ?? p.IsActive ?? true),
created_at: p.created_at ?? p.CreatedAt ?? undefined,
email: p.email ?? p.Email ?? undefined,
+1
View File
@@ -17,6 +17,7 @@ export type PublicSettings = {
frontpage_layout?: string;
frontpage_style?: string;
hero_style?: 'grid' | 'scroller' | 'swiper' | 'swiper_full';
premium?: boolean;
club_id?: string;
club_type?: 'football' | 'futsal';
club_name?: string; // preferred display name