- Add new HMRC Report tab to accounts reports
- Show total turnover (web + manual sales)
- Calculate cost of goods sold from purchases
- Display gross profit and profit margin
- Show operating expenses breakdown
- Calculate net profit before tax
- Estimate tax liability (19% corporation tax)
- Include HMRC checklist of what needs to be reported
- Help admin prepare for Self Assessment submission
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Install pdf-parse and tesseract.js for PDF/image processing
- Create /api/admin/parse-invoice endpoint to extract line items from invoices
- Parser extracts quantity and description from invoice text
- Attempts to match extracted items to products in database
- Update PurchaseForm with "Extract items" button
- Pre-fill purchase form with parsed items (user can edit/add more)
- Supports PDF files and image scans (JPG, PNG, etc)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Import and use existing AdminMenu component instead of simple link
- Displays dropdown menu with all admin section links when clicked
- Includes logout button in admin menu
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Check isAdminAuthenticated() in Header component
- Show 'Admin' link to /admin/orders when user is logged in as admin
- Allows quick navigation to admin section after login
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add guest checkout flow: customers can now complete orders without creating an account
- New /checkout page with login or guest options
- Guest form collects: full name, email, phone, address
- Orders track guest info via guestName and guestPhone fields
- Update cart message to reflect guest option
- Add "Admin login" link to customer login page for clear navigation
- Update checkout API to accept and store guest information
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Created getReportData server action to fetch Orders, ManualSales, and
Expenses from database. Split reports page into server component (fetches
data) and client component (renders charts). Reports now display actual
business data instead of mock data - monthly profit, expense breakdown,
and cash flow tables.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Hide admin interface completely from public site. Admins access /admin/login
directly. Cleaner separation between customer-facing UI and back office.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- ProductImage model links images to products with detected color
- Supports any product type (tees, hoodies, mugs, etc.)
- One image per color per product (unique constraint)
Bulk upload form + color detection coming next.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>