a7e16e7bf6
Brings in the full frontend CRM stack: admin authoring pages,
customer-portal surfaces, public response flows, typed services,
and the supporting component library. i18n locale JSON is the next
commit (kept separate so reviewers can read it as data).
Pages
- Quotes: list / editor / detail / public accept-decline
- Invoices: list / editor / detail / public payment-check
- Contracts: list / editor / detail / block library / public sign
- Calendar (FullCalendar — admin-only v1)
- Tax report (period picker + CSV/PDF export)
- Hours (logged time entries, per-customer)
- Deals lineage (DocumentLineageCard surfaces)
- CRM Development (admin dev tools, gated by crmDevelopment flag)
- Customer-portal pages for quotes / invoices / contracts
- Settings reorg: CRM-Settings group + dedicated tabs for Business
Profile, CRM behaviour, Contracts block library, Reminder emails
- BrandingPage typography (PDF font picker)
- EventDetailsPage / CustomerDetailPage / CreateEventPage extensions
(event-time fields, hours toggle, per-event reminder override)
Services (typed)
- quotes.service, bills.service, contracts.service
- customerAdmin.service, deals.service, calendar.service,
taxReport.service, contracts-blocks.service
- businessProfile.service (timezone, font picker, bank accounts)
- useInstallmentDefaults hook, useLocalizedDate dateInputLang extension
Components (admin)
- CustomerPicker (shared across quote/invoice/contract editors)
- LineItemsTable (hierarchy + details_text, memoised pricing)
- InstallmentsPanel (simple + advanced toggle, fixed-date vs trigger)
- DocumentLineageCard (deal_uuid grouped view)
- EditInstallmentPlanModal (atomic post-spawn plan reshape)
- EventReminderOverrideCard, EmailTemplateEditor (tiptap),
PdfFontPicker, IntegrityCheckCard
- Feature-flag context + RequireFeature wrapper + AdminSidebar
featureFlagsAny derivation + UI-hiding sweep
Build infra
- vite.config: fullcalendar chunk carved off (~200 KB lazy-loaded)
- frontend/package.json: tiptap, fullcalendar, signature_pad,
react-international-phone, et al.
- tailwind + prose styles updated for editor surfaces
3-way merge note: 1 conflict (CustomerDetailPage.tsx) hand-resolved
to keep upstream's SUPPORTED_LANGUAGES.map() data-driven pattern
over feat/crm's hardcoded option list; feat/crm's DecimalInput
import preserved alongside.
59 lines
1.5 KiB
TypeScript
59 lines
1.5 KiB
TypeScript
/// <reference types="vitest" />
|
|
// @ts-nocheck
|
|
|
|
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import type { UserConfig as VitestUserConfig } from 'vitest/config'
|
|
|
|
// https://vite.dev/config/
|
|
const config: VitestUserConfig = {
|
|
plugins: [react()],
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
'react-vendor': ['react', 'react-dom', 'react-router-dom'],
|
|
'ui-vendor': ['lucide-react', 'react-toastify'],
|
|
// Migration 137 — admin calendar deps (~200 KB). Carved into
|
|
// their own chunk so the main bundle isn't penalised on
|
|
// every page load; the calendar route lazy-loads this chunk
|
|
// on demand via React.lazy.
|
|
'fullcalendar': [
|
|
'@fullcalendar/react',
|
|
'@fullcalendar/core',
|
|
'@fullcalendar/daygrid',
|
|
'@fullcalendar/timegrid',
|
|
'@fullcalendar/interaction',
|
|
],
|
|
},
|
|
},
|
|
},
|
|
sourcemap: false,
|
|
},
|
|
test: {
|
|
environment: 'jsdom',
|
|
setupFiles: './vitest.setup.ts',
|
|
globals: true
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
host: true,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:7101',
|
|
changeOrigin: true,
|
|
},
|
|
'/photos': {
|
|
target: 'http://localhost:7101',
|
|
changeOrigin: true,
|
|
},
|
|
'/uploads': {
|
|
target: 'http://localhost:7101',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
}
|
|
}
|
|
|
|
export default defineConfig(config as any)
|