cleanup
and AI recommnedation fix
This commit is contained in:
1 parent
670e6675cc
commit
8353a24f6b
17 files changed
+134
-138
No files matched your search
@@ -3,7 +3,10 @@ export interface User {
|
||||
email: string
|
||||
firstName: string
|
||||
lastName: string
|
||||
role: 'admin' | 'trainer' | 'client'
|
||||
password?: string
|
||||
phone?: string
|
||||
role: 'superAdmin' | 'admin' | 'trainer' | 'client'
|
||||
imageUrl?: string
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
}
|
||||
@@ -11,18 +14,83 @@ export interface User {
|
||||
export interface Client {
|
||||
id: string
|
||||
userId: string
|
||||
user: User
|
||||
user?: User
|
||||
membershipType: 'basic' | 'premium' | 'vip'
|
||||
membershipStatus: 'active' | 'inactive' | 'suspended'
|
||||
membershipStatus: 'active' | 'inactive' | 'suspended' | 'expired'
|
||||
joinDate: Date
|
||||
lastVisit?: Date
|
||||
emergencyContact: {
|
||||
emergencyContact?: {
|
||||
name: string
|
||||
phone: string
|
||||
relationship: string
|
||||
}
|
||||
}
|
||||
|
||||
export interface FitnessProfile {
|
||||
id: string
|
||||
userId: string
|
||||
height: string
|
||||
weight: string
|
||||
age: string
|
||||
gender: "male" | "female" | "other"
|
||||
activityLevel: "sedentary" | "lightly_active" | "moderately_active" | "very_active" | "extremely_active"
|
||||
fitnessGoals: string[]
|
||||
exerciseHabits: string
|
||||
dietHabits: string
|
||||
medicalConditions: string
|
||||
allergies?: string
|
||||
injuries?: string
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
}
|
||||
|
||||
export interface Attendance {
|
||||
id: string
|
||||
userId: string
|
||||
clientId?: string
|
||||
client?: Client
|
||||
checkInTime: Date
|
||||
checkOutTime?: Date
|
||||
type: 'gym' | 'class' | 'personal_training'
|
||||
notes?: string
|
||||
createdAt?: Date
|
||||
}
|
||||
|
||||
export interface Recommendation {
|
||||
id: string
|
||||
userId: string
|
||||
fitnessProfileId?: string
|
||||
type: "short_term" | "medium_term" | "long_term" | "ai_plan"
|
||||
recommendationText: string
|
||||
activityPlan?: string
|
||||
dietPlan?: string
|
||||
status: "pending" | "approved" | "rejected" | "completed"
|
||||
createdAt: Date
|
||||
approvedAt?: Date
|
||||
approvedBy?: string
|
||||
}
|
||||
|
||||
export interface FitnessGoal {
|
||||
id: string
|
||||
userId: string
|
||||
fitnessProfileId?: string
|
||||
goalType: "weight_target" | "strength_milestone" | "endurance_target" | "flexibility_goal" | "habit_building" | "custom"
|
||||
title: string
|
||||
description?: string
|
||||
targetValue?: number
|
||||
currentValue?: number
|
||||
unit?: string
|
||||
startDate: Date
|
||||
targetDate?: Date
|
||||
completedDate?: Date
|
||||
status: "active" | "completed" | "abandoned" | "paused"
|
||||
progress: number
|
||||
priority: "low" | "medium" | "high"
|
||||
notes?: string
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
}
|
||||
|
||||
export interface Payment {
|
||||
id: string
|
||||
clientId: string
|
||||
@@ -36,16 +104,6 @@ export interface Payment {
|
||||
description: string
|
||||
}
|
||||
|
||||
export interface Attendance {
|
||||
id: string
|
||||
clientId: string
|
||||
client: Client
|
||||
checkInTime: Date
|
||||
checkOutTime?: Date
|
||||
type: 'gym' | 'class' | 'personal_training'
|
||||
notes?: string
|
||||
}
|
||||
|
||||
export interface Notification {
|
||||
id: string
|
||||
userId: string
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
export const formatDate = (date: Date): string => {
|
||||
import { type ClassValue, clsx } from "clsx"
|
||||
import { twMerge } from "tailwind-merge"
|
||||
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs))
|
||||
}
|
||||
|
||||
export const formatDate = (date: Date | string): string => {
|
||||
const d = new Date(date)
|
||||
return new Intl.DateTimeFormat('en-US', {
|
||||
year: 'numeric',
|
||||
month: 'short',
|
||||
month: 'long',
|
||||
day: 'numeric',
|
||||
}).format(date)
|
||||
}).format(d)
|
||||
}
|
||||
|
||||
export const formatCurrency = (
|
||||
|
||||
Reference in new issue
Block a user