342 lines
25 KiB
TypeScript
342 lines
25 KiB
TypeScript
import type {
|
|
AttendanceCount,
|
|
AttendanceRecord,
|
|
TodayAttendance,
|
|
} from "@/lib/models/attendance"
|
|
import type { FollowedPlan, MedicalDetails, MemberProfile } from "@/lib/models/customer"
|
|
import type { GymPlan } from "@/lib/models/gym-plan"
|
|
import type { ProfitLoss } from "@/lib/models/ledger"
|
|
import type { PlanCategory, PlanItemView, TrainingPlan } from "@/lib/models/plan"
|
|
import type { ClientProfile } from "@/lib/models/profile"
|
|
import type { ClientStatSummary, MonthlyRevenueStat, RecentPayment } from "@/lib/models/stats"
|
|
import type { SubscriptionPayment, SubscriptionSummary } from "@/lib/models/subscription"
|
|
import type { Ticket, TicketCategory, TicketMessage } from "@/lib/models/ticket"
|
|
|
|
/** Shared mock datasets that back the sandbox/demo pages (no API calls). */
|
|
|
|
/** Membership plans behind the Members stage's Assign/Change/Onboarding dialogs. */
|
|
export const DEMO_GYM_PLANS: GymPlan[] = [
|
|
{ customerPlanId: "demo-plan-basic", fkClientId: "demo-gym-pulse-fitness", planName: "Basic Monthly", planDescription: "Gym floor access only", planPrice: 6000, hasOnboardingFee: false, onboardingFeeAmount: 0, durationInDays: 30, planScope: "Individual", memberLimit: 1, durationMode: "Rolling", allowSplitPayments: false, installmentCount: 1, isActive: true, createdAt: "2026-01-05T09:00:00+05:30", placeIds: [], placeNames: [] },
|
|
{ customerPlanId: "demo-plan-premium", fkClientId: "demo-gym-pulse-fitness", planName: "Premium Monthly", planDescription: "Gym floor + group classes", planPrice: 9500, hasOnboardingFee: true, onboardingFeeAmount: 1000, durationInDays: 30, planScope: "Individual", memberLimit: 1, durationMode: "Rolling", allowSplitPayments: false, installmentCount: 1, isActive: true, createdAt: "2026-01-10T09:00:00+05:30", placeIds: [], placeNames: [] },
|
|
{ customerPlanId: "demo-plan-couple", fkClientId: "demo-gym-pulse-fitness", planName: "Couple Quarterly", planDescription: "Gym + group classes for two", planPrice: 24000, hasOnboardingFee: false, onboardingFeeAmount: 0, durationInDays: 90, planScope: "Group", memberLimit: 2, durationMode: "Rolling", allowSplitPayments: true, installmentCount: 3, isActive: true, createdAt: "2026-01-15T09:00:00+05:30", placeIds: [], placeNames: [] },
|
|
{ customerPlanId: "demo-plan-family", fkClientId: "demo-gym-pulse-fitness", planName: "Family Season Pass", planDescription: "Whole-family access", planPrice: 40000, hasOnboardingFee: false, onboardingFeeAmount: 0, durationInDays: 0, planScope: "Group", memberLimit: 5, durationMode: "FixedRange", validFrom: "2026-08-01", validTo: "2026-12-31", allowSplitPayments: false, installmentCount: 1, isActive: true, createdAt: "2026-01-20T09:00:00+05:30", placeIds: [], placeNames: [] },
|
|
]
|
|
|
|
/** Every demo customer's profile — the source of truth the Members stage's rows are derived from. */
|
|
export const DEMO_MEMBER_PROFILES: MemberProfile[] = [
|
|
{ cusId: "d1", cusName: "Kasun Perera", gender: "Male", boD: "1995-03-12", primaryPH: "077 123 4567", email: "kasun@example.com", nic: "199512345678", isActive: true, createdAt: "2026-06-02T09:00:00+05:30", isLocked: false, user: { userId: "u-d1", userName: "kasun.perera", email: "kasun@example.com", phoneNumber: "077 123 4567" } },
|
|
{ cusId: "d2", cusName: "Nadeesha Silva", gender: "Female", boD: "1996-07-22", primaryPH: "071 987 6543", email: "nadeesha@example.com", nic: "966542310V", isActive: true, createdAt: "2026-05-18T09:00:00+05:30", isLocked: false, user: { userId: "u-d2", userName: "nadeesha.silva", email: "nadeesha@example.com", phoneNumber: "071 987 6543" } },
|
|
{ cusId: "d2b", cusName: "Chamara Silva", gender: "Male", boD: "1994-11-02", primaryPH: "071 555 2211", email: "chamara@example.com", nic: "942271234V", isActive: true, createdAt: "2026-05-18T09:00:00+05:30", isLocked: false, user: { userId: "u-d2b", userName: "chamara.silva", email: "chamara@example.com", phoneNumber: "071 555 2211" } },
|
|
{ cusId: "d3", cusName: "Ashan Fernando", gender: "Male", boD: "1988-01-30", primaryPH: "076 555 1212", email: "ashan@example.com", nic: "199801240036", isActive: true, createdAt: "2026-07-01T09:00:00+05:30", isLocked: false, user: { userId: "u-d3", userName: "ashan.fernando", email: "ashan@example.com", phoneNumber: "076 555 1212" } },
|
|
{ cusId: "d3b", cusName: "Sanduni Fernando", gender: "Female", boD: "1990-04-18", primaryPH: "076 555 1213", email: "sanduni@example.com", nic: "199032500012", isActive: true, createdAt: "2026-07-01T09:00:00+05:30", isLocked: false, user: { userId: "u-d3b", userName: "sanduni.fernando", email: "sanduni@example.com", phoneNumber: "076 555 1213" } },
|
|
{ cusId: "d3c", cusName: "Dilan Fernando", gender: "Male", boD: "2014-09-09", primaryPH: "076 555 1214", email: "dilan.fernando@example.com", nic: null, isActive: true, createdAt: "2026-07-01T09:00:00+05:30", isLocked: false, user: { userId: "u-d3c", userName: "dilan.fernando", email: "dilan.fernando@example.com", phoneNumber: "076 555 1214" } },
|
|
{ cusId: "d4", cusName: "Ishara Jayawardena", gender: "Female", boD: "1997-02-14", primaryPH: "070 444 8899", email: "ishara@example.com", nic: "925432112V", isActive: true, createdAt: "2026-06-25T09:00:00+05:30", isLocked: false, user: { userId: "u-d4", userName: "ishara.jaya", email: "ishara@example.com", phoneNumber: "070 444 8899" } },
|
|
{ cusId: "d5", cusName: "Dinusha Bandara", gender: "Male", boD: "1999-05-05", primaryPH: "072 333 7788", email: "dinusha@example.com", nic: "200012345671", isActive: true, createdAt: "2026-08-15T09:00:00+05:30", isLocked: false, user: { userId: "u-d5", userName: "dinusha.bandara", email: "dinusha@example.com", phoneNumber: "072 333 7788" } },
|
|
{ cusId: "d6", cusName: "Malith Fernando", gender: "Male", boD: "1992-10-19", primaryPH: "075 222 6633", email: "malith@example.com", nic: "926691234V", isActive: true, createdAt: "2026-04-05T09:00:00+05:30", isLocked: true, lockReason: "Overdue balance", user: { userId: "u-d6", userName: "malith.fernando", email: "malith@example.com", phoneNumber: "075 222 6633" } },
|
|
]
|
|
|
|
/** One `SubscriptionSummary` per active membership; `d5` is intentionally left without one (planScope "None"). */
|
|
export const DEMO_SUBSCRIPTIONS: SubscriptionSummary[] = [
|
|
{
|
|
subscriptionId: "sub-d1", customerPlanId: "demo-plan-basic", planName: "Basic Monthly", planScope: "Individual",
|
|
memberLimit: 1, durationMode: "Rolling", allowSplitPayments: false, planPrice: 6000,
|
|
onboardDate: "2026-06-02", expiryDate: "2026-08-19", isActive: true,
|
|
customerInvoiceId: "inv-d1", invoiceAmount: 6000, paidAmount: 6000, balance: 0, paymentStatus: "Paid",
|
|
members: [{ subscriptionMemberId: "sm-d1", customerId: "d1", cusName: "Kasun Perera", email: "kasun@example.com", primaryPH: "077 123 4567", isPrimary: true, joinedAt: "2026-06-02", isActive: true }],
|
|
installments: [{ subscriptionInstallmentId: "inst-d1-1", installmentNo: 1, dueDate: "2026-06-02", amount: 6000, paidAmount: 6000, status: "Paid" }],
|
|
autoChargeEnabled: false, autoChargeCard: null,
|
|
},
|
|
{
|
|
subscriptionId: "sub-d2", customerPlanId: "demo-plan-couple", planName: "Couple Quarterly", planScope: "Group",
|
|
memberLimit: 2, durationMode: "Rolling", allowSplitPayments: true, planPrice: 24000,
|
|
onboardDate: "2026-05-18", expiryDate: "2026-08-18", isActive: true,
|
|
customerInvoiceId: "inv-d2", invoiceAmount: 24000, paidAmount: 16000, balance: 8000, paymentStatus: "Partial",
|
|
members: [
|
|
{ subscriptionMemberId: "sm-d2", customerId: "d2", cusName: "Nadeesha Silva", email: "nadeesha@example.com", primaryPH: "071 987 6543", isPrimary: true, joinedAt: "2026-05-18", isActive: true },
|
|
{ subscriptionMemberId: "sm-d2b", customerId: "d2b", cusName: "Chamara Silva", email: "chamara@example.com", primaryPH: "071 555 2211", isPrimary: false, joinedAt: "2026-05-18", isActive: true },
|
|
],
|
|
installments: [
|
|
{ subscriptionInstallmentId: "inst-d2-1", installmentNo: 1, dueDate: "2026-05-18", amount: 8000, paidAmount: 8000, status: "Paid" },
|
|
{ subscriptionInstallmentId: "inst-d2-2", installmentNo: 2, dueDate: "2026-06-18", amount: 8000, paidAmount: 8000, status: "Paid" },
|
|
{ subscriptionInstallmentId: "inst-d2-3", installmentNo: 3, dueDate: "2026-07-18", amount: 8000, paidAmount: 0, status: "Pending" },
|
|
],
|
|
autoChargeEnabled: true, autoChargeCard: { cardId: "card-d2", cardLast4: "4242", cardType: "Visa" },
|
|
},
|
|
{
|
|
subscriptionId: "sub-d3", customerPlanId: "demo-plan-family", planName: "Family Season Pass", planScope: "Group",
|
|
memberLimit: 5, durationMode: "FixedRange", allowSplitPayments: false, planPrice: 40000,
|
|
onboardDate: "2026-07-01", expiryDate: "2026-12-31", isActive: true,
|
|
customerInvoiceId: "inv-d3", invoiceAmount: 40000, paidAmount: 0, balance: 40000, paymentStatus: "Pending",
|
|
members: [
|
|
{ subscriptionMemberId: "sm-d3", customerId: "d3", cusName: "Ashan Fernando", email: "ashan@example.com", primaryPH: "076 555 1212", isPrimary: true, joinedAt: "2026-07-01", isActive: true },
|
|
{ subscriptionMemberId: "sm-d3b", customerId: "d3b", cusName: "Sanduni Fernando", email: "sanduni@example.com", primaryPH: "076 555 1213", isPrimary: false, joinedAt: "2026-07-01", isActive: true },
|
|
{ subscriptionMemberId: "sm-d3c", customerId: "d3c", cusName: "Dilan Fernando", email: "dilan.fernando@example.com", primaryPH: "076 555 1214", isPrimary: false, joinedAt: "2026-07-01", isActive: true },
|
|
],
|
|
installments: [{ subscriptionInstallmentId: "inst-d3-1", installmentNo: 1, dueDate: "2026-07-01", amount: 40000, paidAmount: 0, status: "Pending" }],
|
|
autoChargeEnabled: false, autoChargeCard: null,
|
|
},
|
|
{
|
|
subscriptionId: "sub-d4", customerPlanId: "demo-plan-basic", planName: "Basic Monthly", planScope: "Individual",
|
|
memberLimit: 1, durationMode: "Rolling", allowSplitPayments: false, planPrice: 6000,
|
|
onboardDate: "2026-06-25", expiryDate: "2026-08-25", isActive: true,
|
|
customerInvoiceId: "inv-d4", invoiceAmount: 6000, paidAmount: 6000, balance: 0, paymentStatus: "Paid",
|
|
members: [{ subscriptionMemberId: "sm-d4", customerId: "d4", cusName: "Ishara Jayawardena", email: "ishara@example.com", primaryPH: "070 444 8899", isPrimary: true, joinedAt: "2026-06-25", isActive: true }],
|
|
installments: [{ subscriptionInstallmentId: "inst-d4-1", installmentNo: 1, dueDate: "2026-06-25", amount: 6000, paidAmount: 6000, status: "Paid" }],
|
|
autoChargeEnabled: false, autoChargeCard: null,
|
|
},
|
|
{
|
|
subscriptionId: "sub-d6", customerPlanId: "demo-plan-premium", planName: "Premium Monthly", planScope: "Individual",
|
|
memberLimit: 1, durationMode: "Rolling", allowSplitPayments: false, planPrice: 9500,
|
|
onboardDate: "2026-04-05", expiryDate: "2026-07-05", isActive: true,
|
|
customerInvoiceId: "inv-d6", invoiceAmount: 9500, paidAmount: 0, balance: 9500, paymentStatus: "Pending",
|
|
members: [{ subscriptionMemberId: "sm-d6", customerId: "d6", cusName: "Malith Fernando", email: "malith@example.com", primaryPH: "075 222 6633", isPrimary: true, joinedAt: "2026-04-05", isActive: true }],
|
|
installments: [{ subscriptionInstallmentId: "inst-d6-1", installmentNo: 1, dueDate: "2026-04-05", amount: 9500, paidAmount: 0, status: "Pending" }],
|
|
autoChargeEnabled: false, autoChargeCard: null,
|
|
},
|
|
]
|
|
|
|
/** Seeds "More info" (workout/meal plans + medical) per customer; missing ids fall back to empty. */
|
|
export const DEMO_MEMBER_EXTRAS: Record<string, { workoutPlans: FollowedPlan[]; mealPlans: FollowedPlan[]; medical: MedicalDetails | null }> = {
|
|
d1: {
|
|
workoutPlans: [{ planId: "w1", name: "Beginner Full Body", isFollowing: true, completedDate: null }],
|
|
mealPlans: [{ planId: "m2", name: "Cutting 1800kcal", isFollowing: true, completedDate: null }],
|
|
medical: { bloodGroup: "O+", disabilities: null },
|
|
},
|
|
d2: {
|
|
workoutPlans: [{ planId: "w2", name: "Fat Loss HIIT", isFollowing: true, completedDate: null }],
|
|
mealPlans: [],
|
|
medical: { bloodGroup: "A+", disabilities: null },
|
|
},
|
|
d3: {
|
|
workoutPlans: [],
|
|
mealPlans: [{ planId: "m1", name: "Lean Bulk 2500kcal", isFollowing: false, completedDate: null }],
|
|
medical: { bloodGroup: null, disabilities: "Mild knee injury — avoid heavy squats." },
|
|
},
|
|
}
|
|
|
|
/** Per-customer fingerprint/access panel fields (joined onto rows the same way the backend does). */
|
|
export const DEMO_MEMBER_ACCESS: Record<string, {
|
|
accessNumber: string
|
|
accessProvisionStatus: "NotConfigured" | "NoDevice" | "Pending" | "Synced" | "Failed"
|
|
fingerprintCount: number
|
|
actualAccessState: "Unknown" | "Enabled" | "Disabled" | "Mixed"
|
|
desiredAccessState: "Enabled" | "Disabled"
|
|
}> = {
|
|
d1: { accessNumber: "101", accessProvisionStatus: "Synced", fingerprintCount: 2, actualAccessState: "Enabled", desiredAccessState: "Enabled" },
|
|
d2: { accessNumber: "102", accessProvisionStatus: "Synced", fingerprintCount: 1, actualAccessState: "Enabled", desiredAccessState: "Enabled" },
|
|
d2b: { accessNumber: "102b", accessProvisionStatus: "Pending", fingerprintCount: 0, actualAccessState: "Unknown", desiredAccessState: "Enabled" },
|
|
d3: { accessNumber: "103", accessProvisionStatus: "Pending", fingerprintCount: 0, actualAccessState: "Unknown", desiredAccessState: "Enabled" },
|
|
d3b: { accessNumber: "103b", accessProvisionStatus: "Pending", fingerprintCount: 0, actualAccessState: "Unknown", desiredAccessState: "Enabled" },
|
|
d3c: { accessNumber: "103c", accessProvisionStatus: "Pending", fingerprintCount: 0, actualAccessState: "Unknown", desiredAccessState: "Enabled" },
|
|
d4: { accessNumber: "104", accessProvisionStatus: "Synced", fingerprintCount: 2, actualAccessState: "Enabled", desiredAccessState: "Enabled" },
|
|
d6: { accessNumber: "106", accessProvisionStatus: "Synced", fingerprintCount: 1, actualAccessState: "Disabled", desiredAccessState: "Disabled" },
|
|
}
|
|
|
|
/** Payment-history rows behind `MemberSubscriptionCard`'s "Payment history" accordion, keyed by subscriptionId. */
|
|
export const DEMO_SUBSCRIPTION_PAYMENTS: Record<string, SubscriptionPayment[]> = {
|
|
"sub-d1": [{ attemptId: "pay-d1-1", payDate: "2026-06-02T10:05:00+05:30", payStatus: "Success", payAmount: 6000, payNote: "Cash at counter" }],
|
|
"sub-d2": [
|
|
{ attemptId: "pay-d2-1", payDate: "2026-05-18T09:40:00+05:30", payStatus: "Success", payAmount: 8000, payNote: "Card" },
|
|
{ attemptId: "pay-d2-2", payDate: "2026-06-18T09:50:00+05:30", payStatus: "Success", payAmount: 8000, payNote: "Card" },
|
|
],
|
|
"sub-d4": [{ attemptId: "pay-d4-1", payDate: "2026-06-25T11:10:00+05:30", payStatus: "Success", payAmount: 6000, payNote: "Cash at counter" }],
|
|
}
|
|
|
|
export const DEMO_REVENUE: MonthlyRevenueStat[] = [
|
|
{ year: 2026, month: 2, monthLabel: "Feb", revenue: 118000, newMemberCount: 9 },
|
|
{ year: 2026, month: 3, monthLabel: "Mar", revenue: 134000, newMemberCount: 11 },
|
|
{ year: 2026, month: 4, monthLabel: "Apr", revenue: 129000, newMemberCount: 8 },
|
|
{ year: 2026, month: 5, monthLabel: "May", revenue: 152000, newMemberCount: 13 },
|
|
{ year: 2026, month: 6, monthLabel: "Jun", revenue: 168000, newMemberCount: 15 },
|
|
{ year: 2026, month: 7, monthLabel: "Jul", revenue: 96000, newMemberCount: 7 },
|
|
]
|
|
|
|
/** Matches the real `ClientStatSummary` shape (GET client/stats/summary) exactly. */
|
|
export const DEMO_STAT_SUMMARY: ClientStatSummary = {
|
|
totalCustomerCount: 128,
|
|
thisMonthCustomerCount: 14,
|
|
lastMonthCustomerCount: 12,
|
|
customerGrowthPercentage: 12.0,
|
|
thisMonthRevenue: 168000,
|
|
lastMonthRevenue: 153500,
|
|
revenueGrowthPercentage: 9.4,
|
|
totalRevenue: 1845000,
|
|
overdueCount: 6,
|
|
expiringWithin7DaysCount: 9,
|
|
todayPaymentsCount: 4,
|
|
todayPaymentsTotal: 22000,
|
|
showTodayPayments: false,
|
|
}
|
|
|
|
export const DEMO_TODAY_ATTENDANCE: TodayAttendance[] = [
|
|
{ customerName: "Dinusha Bandara", eventTime: "2026-07-28T18:42:00+05:30", eventType: "IN" },
|
|
{ customerName: "Ishara Jayawardena", eventTime: "2026-07-28T17:56:00+05:30", eventType: "OUT" },
|
|
{ customerName: "Ashan Fernando", eventTime: "2026-07-28T17:31:00+05:30", eventType: "IN" },
|
|
{ customerName: "Nadeesha Silva", eventTime: "2026-07-28T08:05:00+05:30", eventType: "IN" },
|
|
{ customerName: "Kasun Perera", eventTime: "2026-07-28T07:18:00+05:30", eventType: "IN" },
|
|
{ customerName: "Malith Fernando", eventTime: "2026-07-28T06:48:00+05:30", eventType: "OUT" },
|
|
]
|
|
|
|
export const DEMO_ATTENDANCE_HISTORY: AttendanceRecord[] = [
|
|
{ attendanceId: "a1", fkCustomerId: "d5", deviceUserId: 105, eventTime: "2026-07-28T18:42:00+05:30", eventType: "IN", customer: { cusId: "d5", cusName: "Dinusha Bandara" } },
|
|
{ attendanceId: "a2", fkCustomerId: "d4", deviceUserId: 104, eventTime: "2026-07-28T17:56:00+05:30", eventType: "OUT", customer: { cusId: "d4", cusName: "Ishara Jayawardena" } },
|
|
{ attendanceId: "a3", fkCustomerId: "d3", deviceUserId: 103, eventTime: "2026-07-28T17:31:00+05:30", eventType: "IN", customer: { cusId: "d3", cusName: "Ashan Fernando" } },
|
|
{ attendanceId: "a4", fkCustomerId: "d2", deviceUserId: 102, eventTime: "2026-07-28T08:05:00+05:30", eventType: "IN", customer: { cusId: "d2", cusName: "Nadeesha Silva" } },
|
|
{ attendanceId: "a5", fkCustomerId: "d1", deviceUserId: 101, eventTime: "2026-07-28T07:18:00+05:30", eventType: "IN", customer: { cusId: "d1", cusName: "Kasun Perera" } },
|
|
{ attendanceId: "a6", fkCustomerId: "d1", deviceUserId: 101, eventTime: "2026-07-27T19:46:00+05:30", eventType: "OUT", customer: { cusId: "d1", cusName: "Kasun Perera" } },
|
|
{ attendanceId: "a7", fkCustomerId: "d2", deviceUserId: 102, eventTime: "2026-07-27T18:34:00+05:30", eventType: "OUT", customer: { cusId: "d2", cusName: "Nadeesha Silva" } },
|
|
{ attendanceId: "a8", fkCustomerId: "d5", deviceUserId: 105, eventTime: "2026-07-27T06:22:00+05:30", eventType: "IN", customer: { cusId: "d5", cusName: "Dinusha Bandara" } },
|
|
]
|
|
|
|
export const DEMO_ATTENDANCE_COUNTS: AttendanceCount[] = [
|
|
{ customerId: "d1", customerName: "Kasun Perera", attendanceCount: 24 },
|
|
{ customerId: "d2", customerName: "Nadeesha Silva", attendanceCount: 22 },
|
|
{ customerId: "d5", customerName: "Dinusha Bandara", attendanceCount: 20 },
|
|
{ customerId: "d4", customerName: "Ishara Jayawardena", attendanceCount: 17 },
|
|
{ customerId: "d3", customerName: "Ashan Fernando", attendanceCount: 14 },
|
|
]
|
|
|
|
export const DEMO_RECENT_PAYMENTS: RecentPayment[] = [
|
|
{ attemptId: "p1", payDate: "2026-07-28T16:20:00+05:30", payStatus: "Success", payAmount: 6000, customer: { cusId: "d1", cusName: "Kasun Perera" } },
|
|
{ attemptId: "p2", payDate: "2026-07-28T12:15:00+05:30", payStatus: "Success", payAmount: 8000, customer: { cusId: "d2", cusName: "Nadeesha Silva" } },
|
|
{ attemptId: "p3", payDate: "2026-07-27T18:05:00+05:30", payStatus: "Pending", payAmount: 40000, customer: { cusId: "d3", cusName: "Ashan Fernando" } },
|
|
]
|
|
|
|
export const DEMO_PROFILE: ClientProfile = {
|
|
clientId: "demo-gym-pulse-fitness",
|
|
clientName: "Pulse Fitness Colombo",
|
|
clientPhone: "077 555 0198",
|
|
clientEmail: "hello@pulsefitness.lk",
|
|
clientBusinesses: [
|
|
{
|
|
bid: "demo-business",
|
|
businessName: "Pulse Fitness Colombo",
|
|
address: "42 Havelock Road",
|
|
city: "Colombo 05",
|
|
description: "A modern strength, cardio and group-training gym.",
|
|
facilities: JSON.stringify({
|
|
hasAc: true,
|
|
equipment: [
|
|
{ name: "Treadmill", count: 8 },
|
|
{ name: "Dumbbell set", count: 4 },
|
|
{ name: "Squat rack", count: 3 },
|
|
{ name: "Exercise bike", count: 6 },
|
|
],
|
|
}),
|
|
isActive: true,
|
|
},
|
|
],
|
|
}
|
|
|
|
export const DEMO_PROFIT_LOSS: ProfitLoss = {
|
|
from: "2026-07-01",
|
|
to: "2026-07-28",
|
|
totalIncome: 168000,
|
|
totalExpense: 89500,
|
|
netProfit: 78500,
|
|
incomeByCategory: [
|
|
{ category: "Membership payments", amount: 154000 },
|
|
{ category: "Personal training", amount: 14000 },
|
|
],
|
|
expenseByCategory: [
|
|
{ category: "Rent", amount: 50000 },
|
|
{ category: "Staff payroll", amount: 28000 },
|
|
{ category: "Utilities", amount: 7500 },
|
|
{ category: "Equipment maintenance", amount: 4000 },
|
|
],
|
|
entries: [
|
|
{ id: "l1", entryType: "Income", category: "Membership payments", description: "Member invoice collections", amount: 154000, entryDate: "2026-07-28", isManual: false },
|
|
{ id: "l2", entryType: "Income", category: "Personal training", description: "PT session income", amount: 14000, entryDate: "2026-07-26", isManual: true },
|
|
{ id: "l3", entryType: "Expense", category: "Rent", description: "July premises rent", amount: 50000, entryDate: "2026-07-05", isManual: true },
|
|
{ id: "l4", entryType: "Expense", category: "Staff payroll", description: "Monthly payroll", amount: 28000, entryDate: "2026-07-25", isManual: true },
|
|
{ id: "l5", entryType: "Expense", category: "Utilities", description: "Electricity and water", amount: 7500, entryDate: "2026-07-22", isManual: true },
|
|
{ id: "l6", entryType: "Expense", category: "Equipment maintenance", description: "Treadmill service", amount: 4000, entryDate: "2026-07-18", isManual: true },
|
|
],
|
|
}
|
|
|
|
export const DEMO_WORKOUT_CATEGORIES: PlanCategory[] = [
|
|
{ categoryId: "wc-1", categoryName: "Strength", description: null },
|
|
{ categoryId: "wc-2", categoryName: "Cardio", description: null },
|
|
]
|
|
|
|
export const DEMO_MEAL_CATEGORIES: PlanCategory[] = [
|
|
{ categoryId: "mc-1", categoryName: "Muscle gain", description: null },
|
|
{ categoryId: "mc-2", categoryName: "Weight loss", description: null },
|
|
]
|
|
|
|
export const DEMO_WORKOUT_TRAINING_PLANS: TrainingPlan[] = [
|
|
{
|
|
planId: "wp-1", name: "Beginner Full Body", description: "3-day full body routine for new members",
|
|
isTemplate: true, categoryId: "wc-1", categoryName: "Strength", isActive: true, createDate: "2026-06-01T09:00:00+05:30",
|
|
assignedCustomers: [{ assignmentId: "wa-1", customerId: "d1", customerName: "Kasun Perera", isActive: true, assignedDate: "2026-06-05" }],
|
|
},
|
|
{
|
|
planId: "wp-2", name: "Fat Loss HIIT", description: "High intensity interval training",
|
|
isTemplate: false, categoryId: "wc-2", categoryName: "Cardio", isActive: true, createDate: "2026-06-10T09:00:00+05:30",
|
|
assignedCustomers: [],
|
|
},
|
|
]
|
|
|
|
export const DEMO_MEAL_TRAINING_PLANS: TrainingPlan[] = [
|
|
{
|
|
planId: "mp-1", name: "Lean Bulk 2500kcal", description: "High protein muscle-gain plan",
|
|
isTemplate: true, categoryId: "mc-1", categoryName: "Muscle gain", isActive: true, createDate: "2026-06-02T09:00:00+05:30",
|
|
assignedCustomers: [],
|
|
},
|
|
{
|
|
planId: "mp-2", name: "Cutting 1800kcal", description: "Calorie deficit for fat loss",
|
|
isTemplate: false, categoryId: "mc-2", categoryName: "Weight loss", isActive: true, createDate: "2026-06-12T09:00:00+05:30",
|
|
assignedCustomers: [{ assignmentId: "ma-1", customerId: "d4", customerName: "Ishara Jayawardena", isActive: true, assignedDate: "2026-06-15" }],
|
|
},
|
|
]
|
|
|
|
/** Saved plan days/meals behind PlanDetailPanel and the plan editor's "edit" prefill, keyed by planId. */
|
|
export const DEMO_PLAN_ITEMS: Record<string, PlanItemView[]> = {
|
|
"wp-1": [
|
|
{ id: "wi-1", title: "Monday", detail: "Upper-body strength", exercises: [{ id: "ex-1", name: "Bench Press", muscleGroup: "Chest", sets: 4, reps: "8-10", description: null, breathIn: null, breathOut: null, videoUrl: null }] },
|
|
{ id: "wi-2", title: "Wednesday", detail: "Lower-body strength", exercises: [{ id: "ex-2", name: "Squat", muscleGroup: "Legs", sets: 4, reps: "8-10", description: null, breathIn: null, breathOut: null, videoUrl: null }] },
|
|
{ id: "wi-3", title: "Friday", detail: "Conditioning and core", exercises: [{ id: "ex-3", name: "Plank", muscleGroup: "Core", sets: 3, reps: "45s", description: null, breathIn: null, breathOut: null, videoUrl: null }] },
|
|
],
|
|
"mp-1": [
|
|
{ id: "mi-1", title: "Breakfast", detail: "Oats, eggs, banana", exercises: [] },
|
|
{ id: "mi-2", title: "Lunch", detail: "Rice, chicken breast, vegetables", exercises: [] },
|
|
{ id: "mi-3", title: "Dinner", detail: "Fish, sweet potato, salad", exercises: [] },
|
|
],
|
|
}
|
|
|
|
export const DEMO_TICKET_CATEGORIES: TicketCategory[] = [
|
|
{ ticketCategoryId: "tc-1", ticketCategoryName: "Billing" },
|
|
{ ticketCategoryId: "tc-2", ticketCategoryName: "Technical" },
|
|
{ ticketCategoryId: "tc-3", ticketCategoryName: "General" },
|
|
]
|
|
|
|
export const DEMO_TICKETS: Ticket[] = [
|
|
{
|
|
ticketId: "ticket-1", mainReason: "Need help setting up member plans", createDate: "2026-08-10T09:15:00+05:30",
|
|
userId: "demo-owner", ticketCategoryId: "tc-3", ticketCategoryName: "General", ticketStatus: 2,
|
|
},
|
|
{
|
|
ticketId: "ticket-2", mainReason: "Payment gateway not receiving webhooks", createDate: "2026-08-05T14:30:00+05:30",
|
|
userId: "demo-owner", ticketCategoryId: "tc-2", ticketCategoryName: "Technical", ticketStatus: 1,
|
|
},
|
|
{
|
|
ticketId: "ticket-3", mainReason: "Question about last month's platform invoice", createDate: "2026-07-20T11:00:00+05:30",
|
|
userId: "demo-owner", ticketCategoryId: "tc-1", ticketCategoryName: "Billing", ticketStatus: 3,
|
|
},
|
|
]
|
|
|
|
export const DEMO_TICKET_MESSAGES: Record<string, TicketMessage[]> = {
|
|
"ticket-1": [
|
|
{ messageId: "msg-1a", isSentByAdmin: false, message: "How do I add a couple/family plan?", createDate: "2026-08-10T09:15:00+05:30" },
|
|
{ messageId: "msg-1b", isSentByAdmin: true, message: "Head to Memberships → New Plan and set the scope to Group with a member limit.", createDate: "2026-08-10T10:02:00+05:30" },
|
|
],
|
|
"ticket-2": [
|
|
{ messageId: "msg-2a", isSentByAdmin: false, message: "PayHere payments aren't marking invoices as paid automatically.", createDate: "2026-08-05T14:30:00+05:30" },
|
|
],
|
|
"ticket-3": [
|
|
{ messageId: "msg-3a", isSentByAdmin: false, message: "Can you break down last month's usage fee?", createDate: "2026-07-20T11:00:00+05:30" },
|
|
{ messageId: "msg-3b", isSentByAdmin: true, message: "It's Rs. 50 per active member on top of the base platform fee — 90 members last month.", createDate: "2026-07-20T13:45:00+05:30" },
|
|
{ messageId: "msg-3c", isSentByAdmin: false, message: "Got it, thanks!", createDate: "2026-07-20T14:00:00+05:30" },
|
|
],
|
|
}
|