S16 postgresql opslag added
All checks were successful
Build, test and publish / verify (push) Successful in 7m31s

This commit is contained in:
2026-11-04 17:10:25 +01:00
parent f59cad115a
commit 694bf3fa86
89 changed files with 3087 additions and 252 deletions

View File

@@ -113,6 +113,8 @@ import { DialogFrame } from './dialog-frame';
export class ScheduleEditor implements OnInit {
readonly show = input.required<Show>();
readonly groups = input.required<DanceGroup[]>();
readonly revision = input<number>();
private originalRevision?: number;
readonly schoolId = input.required<number>();
readonly closed = output<void>();
readonly saved = output<void>();
@@ -124,6 +126,7 @@ export class ScheduleEditor implements OnInit {
assignments: number[][] = [];
ngOnInit(): void {
this.originalRevision = this.revision();
this.current.set(this.show());
this.assignments = this.show().dayParts.map((p) => [...p.danceGroupIds]);
}
@@ -162,9 +165,15 @@ export class ScheduleEditor implements OnInit {
try {
const result = await firstValueFrom(
finalize
? this.api.finalize(this.schoolId(), this.show().id)
: this.api.saveAssignments(this.schoolId(), this.show().id, this.assignments),
? this.api.finalize(this.schoolId(), this.show().id, this.originalRevision)
: this.api.saveAssignments(
this.schoolId(),
this.show().id,
this.assignments,
this.originalRevision,
),
);
if (this.originalRevision !== undefined) this.originalRevision++;
this.current.set(result);
this.assignments = result.dayParts.map((p) => [...p.danceGroupIds]);
this.dirty.set(false);