Move the Management planning snapshots into PocketBase collections (plans, projects, per-year project plans, retention, edit log), loaded with a bundled-JSON fallback. Admins can double-click an income cell to enter forecast and actual, edit awarded jobs' planned amounts, change status and costs, and add jobs, with revision checks and an audit trail. Income chart now shows forecast and invoiced bars with not-yet-started money stacked in red; Income is in the sidebar. Adds schema and import scripts, and jsdom/Testing Library dev dependencies for UI tests. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
20 lines
730 B
TypeScript
20 lines
730 B
TypeScript
import { defineConfig } from "vitest/config";
|
|
import path from "node:path";
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: [
|
|
{ find: "@", replacement: path.resolve(__dirname, "./src") },
|
|
// The `server-only` package ships inside Next.js' compiled dependencies
|
|
// and cannot be resolved by Vitest; point it at an empty stand-in.
|
|
{ find: /^server-only$/, replacement: path.resolve(__dirname, "./src/test-support/server-only.ts") },
|
|
],
|
|
},
|
|
test: {
|
|
environment: "node",
|
|
include: ["src/**/*.test.{ts,tsx}"],
|
|
// The PDF/PNG split test shells out to poppler; it takes a few seconds on
|
|
// its own and times out when the whole suite runs in parallel.
|
|
testTimeout: 15000,
|
|
},
|
|
});
|