Remove Programs tab and all supporting code

The Programs feature is superseded by Shows, which provides a more
flexible model with schedule slots. This commit removes all Programs
code across frontend and backend:

Frontend:
- Delete admin-program-form component (ts/html/scss)
- Delete program.service.ts and program.ts interface
- Remove Programs tab, form modal, and all CRUD logic from admin
  component (ts + html)

Backend:
- Delete programs API router
- Remove Program ORM model and ProgramCreate/Update/Response schemas
- Remove programs router registration from main.py
- Remove Program from seed data, seed helpers, and truncate/reset
This commit is contained in:
2026-06-22 05:42:43 +00:00
parent eb9a00f21a
commit 9049b066ba
13 changed files with 7 additions and 622 deletions
-37
View File
@@ -1,37 +0,0 @@
import { Injectable, inject } from '@angular/core';
import { HttpClient, HttpParams } from '@angular/common/http';
import { Observable } from 'rxjs';
import { Program } from '../interfaces/program';
import { getAppConfig } from './app-config.service';
@Injectable({
providedIn: 'root',
})
export class ProgramService {
private http = inject(HttpClient);
private baseUrl = `${getAppConfig().apiBaseUrl}/api/programs`;
/** Fetch all programs, optionally filtered by day_of_week (1=Mon … 7=Sun). */
getPrograms(day?: number): Observable<Program[]> {
let params = new HttpParams();
if (day !== undefined) params = params.set('day', String(day));
return this.http.get<Program[]>(this.baseUrl, { params });
}
getProgram(id: number): Observable<Program> {
return this.http.get<Program>(`${this.baseUrl}/${id}`);
}
createProgram(payload: Omit<Program, 'id'>): Observable<Program> {
return this.http.post<Program>(this.baseUrl, payload);
}
updateProgram(id: number, payload: Partial<Program>): Observable<Program> {
return this.http.put<Program>(`${this.baseUrl}/${id}`, payload);
}
deleteProgram(id: number): Observable<void> {
return this.http.delete<void>(`${this.baseUrl}/${id}`);
}
}