Erweitere VoTiAn NG um Auftrags-, Stamm- und Verwaltungsfunktionen

Ergänzt Auftragserfassung und -bearbeitung, Unternehmerbelege, Stornos, Lagerkorrekturen, Stammdaten, Abrechnung, CRM, Formulare, Berichte und Preisverwaltung auf Basis der aktuellen PHP-Anwendung.

Enthält Integrations- und Oberflächentests sowie dokumentierte Abgleiche und Prüfstände.
This commit is contained in:
Sven committed 2026-10-13 20:31:31 +02:00
1 parent 42c87282ee
commit 363bc27c26
190 files changed
+14815 -1857

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
export type PhotoWorkflow = {number:number;name:string;defaultWorkflow:boolean;min:number;max:number;stationScope:string;positions:string[]};
export type PhotoSet = {number:number;name:string;defaultSet:boolean;workflows:PhotoWorkflow[]};
export type PhotoOptions = {configured:boolean;sets:PhotoSet[]};
export function photoFlows(set:PhotoSet|null,type:"PICKUP"|"DELIVERY"|"BOTH") {
// Match PHP photoScopeMatches on stored tr_ware_from_to (PICKUP=2, DELIVERY=1).
return (set?.workflows??[]).filter(f=>type==="BOTH" || f.stationScope==="ALL" || (["PICKUP_ONLY","EXCEPT_DELIVERY"].includes(f.stationScope)?type==="DELIVERY":type==="PICKUP"));
}
export function defaultPhoto(flows:PhotoWorkflow[],index:number,count:number) {
const position=index===count-1?"LAST":index===0?"FIRST":"MIDDLE";
return flows.find(f=>f.positions.includes(position))??flows.find(f=>f.defaultWorkflow);
}
export const photoLabel=(f:PhotoWorkflow)=>`${f.name} · ${f.min===f.max?f.min:`${f.min}–${f.max}`} Fotos`;