p2p/vite.config.ts
Bhanu Prakash Sai Potteri f5bc1fa119 feat: rebuild the UI on Tailwind v4 + shadcn/ui
Migrates Tailwind v3 -> v4 (CSS-first, theme tokens for brand, workflow
states and charts) and adds 23 shadcn/ui components on Radix.

- lib/workflow.ts is now the single source of truth for state name, colour,
  icon and available actions; "Financial Review" is the canonical served
  name, with "Finance Review" kept as an alias so those rows stop falling
  through to the unstyled fallback and dropping out of every count
- record view: TanStack Table with server-side sort/paginate, company column
  with initials avatar, page totals, density and a URL-synced query state
- dashboard: one cached analytics fetch shared by tiles and charts, donut +
  aging + vendor spend, click-to-filter
- detail view: rebuilt against the live detailview payload — restores the PO
  number and payment terms that the old key heuristics silently dropped,
  parses match_summary into a 3-way-match checklist, and separates the
  department's and reviewer's own words from AI-generated content
- form modal on Radix Dialog (focus trap, scroll lock, escape handling)
2026-07-29 19:47:59 +05:30

39 lines
1.1 KiB
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
import { fileURLToPath, URL } from 'node:url'
const devTarget = 'https://studio.getzino.in'
const proxy = (target: string) => ({ target, changeOrigin: true, secure: false })
export default defineConfig({
plugins: [react(), tailwindcss()],
resolve: {
alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) },
},
base: process.env.VITE_BASE_URL ?? '/p2p/',
server: {
port: 3007,
proxy: {
// user-service
'/usr': proxy(devTarget),
'/login': proxy(devTarget),
'/apps': proxy(devTarget),
'/agents': proxy(devTarget),
// core-service
'/start': proxy(devTarget),
'/activity': proxy(devTarget),
'/instance': proxy(devTarget),
'/form': proxy(devTarget),
'/pa': proxy(devTarget),
// view-service (legacy)
'/recordview': proxy(devTarget),
'/detailview': proxy(devTarget),
'/audit': proxy(devTarget),
'/api-docs': proxy(devTarget),
// view-service (app-scoped)
'/app/': proxy(devTarget),
},
},
})