fix(years): format academic years as 2016/17 across all views, remove legacy frontend and data
Some checks failed
Build and Push Docker Images / Build Backend (FastAPI) (push) Failing after 12s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 53s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 12s
Build and Push Docker Images / Trigger Portainer Update (push) Has been skipped
Some checks failed
Build and Push Docker Images / Build Backend (FastAPI) (push) Failing after 12s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 53s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 12s
Build and Push Docker Images / Trigger Portainer Update (push) Has been skipped
Apply formatAcademicYear to all year displays in ComparisonChart, ComparisonView, PerformanceChart, and RankingsView. Remove old vanilla JS frontend and CSV data directory — both superseded by the Next.js app and Meltano pipeline. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
ChartOptions,
|
||||
} from 'chart.js';
|
||||
import type { SchoolResult } from '@/lib/types';
|
||||
import { formatAcademicYear } from '@/lib/utils';
|
||||
import styles from './PerformanceChart.module.css';
|
||||
|
||||
// Register Chart.js components
|
||||
@@ -40,11 +41,7 @@ interface PerformanceChartProps {
|
||||
export function PerformanceChart({ data, schoolName, isSecondary = false }: PerformanceChartProps) {
|
||||
// Sort data by year
|
||||
const sortedData = [...data].sort((a, b) => a.year - b.year);
|
||||
const formatYear = (y: number) => {
|
||||
const s = y.toString();
|
||||
return s.length === 6 ? `${s.slice(0, 4)}/${s.slice(4)}` : s;
|
||||
};
|
||||
const years = sortedData.map(d => formatYear(d.year));
|
||||
const years = sortedData.map(d => formatAcademicYear(d.year));
|
||||
|
||||
// Prepare datasets — phase-aware
|
||||
const datasets = isSecondary ? [
|
||||
|
||||
Reference in New Issue
Block a user