1
0
Fork 0

feat: Zeitplanung in Auftrag-Query aufnehmen

This commit is contained in:
Jonny 2026-08-20 19:50:00 +02:00
parent a592054ef6
commit 343f7a3aac
1 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,6 @@
import { createClient } from "@/lib/supabase/server"; import { createClient } from "@/lib/supabase/server";
import type { Role } from "@/lib/auth/roles"; import type { Role } from "@/lib/auth/roles";
import type { ZeitplanungTyp } from "./zeitplanung";
export type Ort = { export type Ort = {
id: string; id: string;
@ -21,6 +22,8 @@ export type AuftragStatus = "offen" | "zugewiesen" | "unterwegs" | "abgeschlosse
export type Auftrag = { export type Auftrag = {
id: string; id: string;
auftragsnummer: string; auftragsnummer: string;
zeitplanung_typ: ZeitplanungTyp;
zeitplanung_zeitpunkt: string | null;
status: AuftragStatus; status: AuftragStatus;
abholort: Ort; abholort: Ort;
zielort: Ort; zielort: Ort;
@ -36,7 +39,7 @@ export type Auftrag = {
}; };
const AUFTRAG_SELECT = const AUFTRAG_SELECT =
"id, auftragsnummer, status, zugewiesen_an, start_zeit, start_km, end_km, uebergabe_bestaetigt_at, vorgaenger_auftrag_id, created_at, abholort:orte!auftraege_abholort_id_fkey(id, adresse, ansprechpartner, telefon, email), zielort:orte!auftraege_zielort_id_fkey(id, adresse, ansprechpartner, telefon, email), fahrzeug:fahrzeuge(id, kennzeichen, marke, modell), erstellt_von:profiles!auftraege_erstellt_von_fkey(id, name)"; "id, auftragsnummer, zeitplanung_typ, zeitplanung_zeitpunkt, status, zugewiesen_an, start_zeit, start_km, end_km, uebergabe_bestaetigt_at, vorgaenger_auftrag_id, created_at, abholort:orte!auftraege_abholort_id_fkey(id, adresse, ansprechpartner, telefon, email), zielort:orte!auftraege_zielort_id_fkey(id, adresse, ansprechpartner, telefon, email), fahrzeug:fahrzeuge(id, kennzeichen, marke, modell), erstellt_von:profiles!auftraege_erstellt_von_fkey(id, name)";
export async function listOrte(): Promise<Ort[]> { export async function listOrte(): Promise<Ort[]> {
const supabase = await createClient(); const supabase = await createClient();