Adds /pricelist under the Management section. Operators drag a supplier price-list file (PDF / CSV / text / image) into the upload zone — or use the explicit Choose file button — and it lands in PocketBase as an attachment on the raw_price_list collection. The table below shows the queue: file, supplier (relation to suppliers), status badge, log summary preview, upload date, and a delete action per row. Layout matches the rest of the app: Card for the upload zone, DataTable for the queue, DeleteDialog for the destructive action. Live updates via the PB subscribe channel so other tabs / the n8n ingest workflow show new rows without a manual refresh. PB schema is sourced from docs/pocketbase/raw_price_list.collection.json. The migration script is idempotent: it creates the collection from the schema file on a fresh deploy, and on a pre-existing one (the live PB already had it, with PB's default null/superuser-only rules) it relaxes the auth rules to @request.auth.id != '' so any logged-in user can CRUD — matching every other collection in the app. Field names match the live PB collection (discovered via admin API): - supplier_file (the file) - supplier_name (relation to suppliers) - status (select: Pending / Processing / Completed / Failed) - log_summary (free text)
76 lines
3.2 KiB
JSON
76 lines
3.2 KiB
JSON
{
|
|
"name": "wfdash",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"engines": {
|
|
"node": ">=20.9.0"
|
|
},
|
|
"scripts": {
|
|
"dev": "next dev --webpack",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "eslint",
|
|
"setup": "npx tsx scripts/setup-pocketbase.ts",
|
|
"pb:migrate:orders-v2": "npx tsx scripts/migrations/create-order-items-v2-and-collection-pool.ts",
|
|
"pb:migrate:quote-attachments": "npx tsx scripts/migrations/create-quote-attachments-and-replies.ts",
|
|
"pb:migrate:quote-items-user-edited": "npx tsx scripts/migrations/add-quote-items-user-edited.ts",
|
|
"pb:migrate:order-status-in-stock": "echo 'deprecated: orders.status was dropped 2026-06-27. No-op.' && exit 0",
|
|
"pb:migrate:orders-rep": "npx tsx scripts/migrations/2026-06-26-add-orders-rep.ts",
|
|
"pb:migrate:drop-orders-status": "npx tsx scripts/migrations/2026-06-27-drop-orders-status-and-wipe.ts",
|
|
"pb:migrate:add-order-quote-match": "npx tsx scripts/migrations/2026-06-27-add-order-quote-match-fields.ts",
|
|
"pb:migrate:add-purchase-order-pdfs": "npx tsx scripts/migrations/2026-06-28-add-purchase-order-pdfs.ts",
|
|
"pb:migrate:add-companies-coordinates": "npx tsx scripts/migrations/2026-06-28-add-companies-coordinates.ts",
|
|
"pb:migrate:convert-customer-fields": "npx tsx scripts/migrations/2026-06-28-convert-customer-fields.ts",
|
|
"pb:migrate:raw-price-list": "npx tsx scripts/migrations/2026-06-30-add-raw-price-list.ts",
|
|
"smoke:counter": "npx tsx scripts/smoke/counter.ts",
|
|
"smoke:counter-concurrent": "npx tsx scripts/smoke/counter-concurrent.ts",
|
|
"smoke:create-from-email": "npx tsx scripts/smoke/create-from-email.ts",
|
|
"smoke:management": "npx tsx scripts/smoke/management-flow.ts",
|
|
"smoke:mcp-management": "npx tsx scripts/smoke/mcp-management.ts",
|
|
"smoke:rest-management": "npx tsx scripts/smoke/rest-management.ts",
|
|
"test": "vitest",
|
|
"test:run": "vitest run",
|
|
"test:coverage": "vitest run --coverage",
|
|
"e2e": "playwright test",
|
|
"e2e:ui": "playwright test --ui",
|
|
"e2e:install": "playwright install --with-deps chromium"
|
|
},
|
|
"dependencies": {
|
|
"@base-ui/react": "^1.5.0",
|
|
"@radix-ui/react-slot": "^1.2.4",
|
|
"@react-pdf/renderer": "^4.5.1",
|
|
"@types/leaflet": "^1.9.21",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"cmdk": "^1.1.1",
|
|
"leaflet": "^1.9.4",
|
|
"lucide-react": "^1.16.0",
|
|
"next": "16.2.6",
|
|
"next-themes": "^0.4.6",
|
|
"pocketbase": "^0.26.9",
|
|
"react": "19.2.4",
|
|
"react-dom": "19.2.4",
|
|
"react-leaflet": "^5.0.0",
|
|
"shadcn": "^4.8.0",
|
|
"sonner": "^2.0.7",
|
|
"tailwind-merge": "^3.6.0",
|
|
"tw-animate-css": "^1.4.0"
|
|
},
|
|
"devDependencies": {
|
|
"@playwright/test": "^1.60.0",
|
|
"@tailwindcss/postcss": "^4",
|
|
"@testing-library/dom": "^10.4.1",
|
|
"@testing-library/react": "^16.3.2",
|
|
"@types/node": "^20",
|
|
"@types/react": "^19",
|
|
"@types/react-dom": "^19",
|
|
"@vitejs/plugin-react": "^6.0.2",
|
|
"eslint": "^9",
|
|
"eslint-config-next": "16.2.6",
|
|
"jsdom": "^29.1.1",
|
|
"tailwindcss": "^4",
|
|
"typescript": "^5",
|
|
"vite-tsconfig-paths": "^6.1.1",
|
|
"vitest": "^4.1.8"
|
|
}
|
|
}
|