forked from fahrPool/fahrPool
feat: Zeitplanung in Auftrag-Query aufnehmen
This commit is contained in:
parent
a592054ef6
commit
343f7a3aac
|
|
@ -1,5 +1,6 @@
|
|||
import { createClient } from "@/lib/supabase/server";
|
||||
import type { Role } from "@/lib/auth/roles";
|
||||
import type { ZeitplanungTyp } from "./zeitplanung";
|
||||
|
||||
export type Ort = {
|
||||
id: string;
|
||||
|
|
@ -21,6 +22,8 @@ export type AuftragStatus = "offen" | "zugewiesen" | "unterwegs" | "abgeschlosse
|
|||
export type Auftrag = {
|
||||
id: string;
|
||||
auftragsnummer: string;
|
||||
zeitplanung_typ: ZeitplanungTyp;
|
||||
zeitplanung_zeitpunkt: string | null;
|
||||
status: AuftragStatus;
|
||||
abholort: Ort;
|
||||
zielort: Ort;
|
||||
|
|
@ -36,7 +39,7 @@ export type Auftrag = {
|
|||
};
|
||||
|
||||
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[]> {
|
||||
const supabase = await createClient();
|
||||
|
|
|
|||
Loading…
Reference in New Issue