scalesite/lib/mock-data/invoices.ts
bast1qn 98552163a8 Initial ScaleSite Next.js implementation
Complete frontend implementation with:
- Next.js 16 with App Router and TypeScript
- Tailwind CSS v4 with custom violet theme
- shadcn/ui components with Lucide React icons
- Landing page with hero, services, pricing, testimonials, FAQ
- Service selection page with toggle
- Login/Register pages with social auth UI
- Multi-step checkout flow
- Client dashboard with stats, projects, support tickets
- Billing page with subscription, payment methods, invoices
- All mock data and TypeScript types

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-01 21:42:48 +01:00

103 lines
2.4 KiB
TypeScript

import { Invoice, PaymentMethod, Subscription } from '../types'
export const mockInvoices: Invoice[] = [
{
id: 'inv-1',
userId: 'user-1',
projectId: 'proj-1',
description: 'Landing Page Design - Growth Tier',
amount: 150,
currency: 'EUR',
vat: 30,
total: 180,
status: 'paid',
date: new Date('2024-10-01'),
dueDate: new Date('2024-10-15'),
downloadUrl: '/invoices/inv-1.pdf',
},
{
id: 'inv-2',
userId: 'user-1',
projectId: 'proj-2',
description: 'Monthly Automation - Growth Tier',
amount: 50,
currency: 'EUR',
vat: 10,
total: 60,
status: 'paid',
date: new Date('2024-09-01'),
dueDate: new Date('2024-09-15'),
downloadUrl: '/invoices/inv-2.pdf',
},
{
id: 'inv-3',
userId: 'user-1',
description: 'Consultation Hour',
amount: 75,
currency: 'EUR',
vat: 15,
total: 90,
status: 'refunded',
date: new Date('2024-07-15'),
dueDate: new Date('2024-07-15'),
downloadUrl: '/invoices/inv-3.pdf',
},
{
id: 'inv-4',
userId: 'user-1',
description: 'AI Chatbot - Starter Tier',
amount: 50,
currency: 'EUR',
vat: 10,
total: 60,
status: 'pending',
date: new Date('2024-10-16'),
dueDate: new Date('2024-10-30'),
downloadUrl: '/invoices/inv-4.pdf',
},
]
export const mockPaymentMethods: PaymentMethod[] = [
{
id: 'pm-1',
userId: 'user-1',
type: 'card',
isDefault: true,
last4: '4242',
brand: 'visa',
},
{
id: 'pm-2',
userId: 'user-1',
type: 'paypal',
isDefault: false,
email: 'alex@bakery.com',
},
]
export const mockSubscription: Subscription = {
id: 'sub-1',
userId: 'user-1',
planId: 'growth-ai',
status: 'active',
currentPeriodStart: new Date('2024-10-01'),
currentPeriodEnd: new Date('2024-11-01'),
cancelAtPeriodEnd: false,
}
export function getInvoicesByUserId(userId: string): Invoice[] {
return mockInvoices.filter(inv => inv.userId === userId)
}
export function getInvoiceById(id: string): Invoice | undefined {
return mockInvoices.find(inv => inv.id === id)
}
export function getPaymentMethodsByUserId(userId: string): PaymentMethod[] {
return mockPaymentMethods.filter(pm => pm.userId === userId)
}
export function getDefaultPaymentMethod(userId: string): PaymentMethod | undefined {
return mockPaymentMethods.find(pm => pm.userId === userId && pm.isDefault)
}