Refactor frontend build and chart initialization

Moves chart data to JSON file for better separation of concerns
Implements lazy chart initialization in reports module
Updates build script and npm dependencies
Removes hardcoded chart scripts from Razor page
This commit is contained in:
Janus C. H. Knudsen 2026-01-22 16:32:46 +01:00
parent 097fe7f912
commit b921e26e48
12 changed files with 249 additions and 258 deletions

View file

@ -12,46 +12,18 @@ PlanTempus is a .NET 9 web application built with ASP.NET Core Razor Pages. It u
## Build and Development Commands
### Prerequisites
- .NET 9.0 SDK or later
- PostgreSQL database
### Common Commands
```bash
# Build the solution
dotnet build
# Run the main application
dotnet run --project Application/PlanTempus.Application.csproj
# Run with specific launch profile
dotnet run --project Application/PlanTempus.Application.csproj --launch-profile https
# Run tests
dotnet test
# Run specific test project
dotnet test Tests/PlanTempus.X.TDD.csproj
dotnet test PlanTempus.X.BDD/PlanTempus.X.BDD.csproj
# Clean build artifacts
dotnet clean
# Restore dependencies
dotnet restore
```
### TypeScript/Frontend Development
The application uses esbuild for TypeScript compilation. From the Application directory:
**IMPORTANT:** All TypeScript/frontend commands must be run from `PlanTempus.Application/` folder, not from the solution root.
```bash
cd PlanTempus.Application
# Install npm dependencies
npm install
# Build TypeScript (requires custom build script setup)
# Note: No npm scripts are currently defined in package.json
# Build TypeScript
npm run build
```
## Architecture Overview