Motiv-Freigabe: öffentliche Seite /freigabe/:token (A6-Entwurf ansehen + freigeben)
All checks were successful
Build & Deploy / deploy (push) Successful in 23s
All checks were successful
Build & Deploy / deploy (push) Successful in 23s
Kunde öffnet den Einmal-Link (kein Login), sieht den A6-Drucklayout-Entwurf und gibt frei oder hinterlegt einen Änderungswunsch. API: fetchFreigabe/sendFreigabe/ freigabeLayoutUrl (öffentlich, token-gated). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -560,6 +560,29 @@ export async function sendSampleRequest(input: SampleRequest) {
|
||||
return request('/skrift-orders/sample-request', { method: 'POST', body: input, auth: false });
|
||||
}
|
||||
|
||||
/* ── Motiv-Freigabe (öffentlich, per Einmal-Token) ─────────────────────────── */
|
||||
|
||||
export type Freigabe = {
|
||||
order_number: string;
|
||||
product: string;
|
||||
status: 'pending' | 'approved' | 'changes' | string;
|
||||
note: string;
|
||||
has_layout: boolean;
|
||||
};
|
||||
|
||||
export async function fetchFreigabe(token: string): Promise<Freigabe> {
|
||||
return request(`/skrift-orders/freigabe/${encodeURIComponent(token)}`, { auth: false });
|
||||
}
|
||||
|
||||
export async function sendFreigabe(token: string, action: 'approve' | 'changes', note?: string) {
|
||||
return request(`/skrift-orders/freigabe/${encodeURIComponent(token)}`, { method: 'POST', body: { action, note }, auth: false });
|
||||
}
|
||||
|
||||
/** Direkte URL zum A6-Entwurfs-SVG (Token-gated, kein Login nötig). */
|
||||
export function freigabeLayoutUrl(token: string) {
|
||||
return `${BASE}/skrift-orders/freigabe/${encodeURIComponent(token)}/layout`;
|
||||
}
|
||||
|
||||
/* ── Statusverlauf & Benachrichtigungen ───────────────────────────────────── */
|
||||
|
||||
export type StatusEvent = {
|
||||
|
||||
Reference in New Issue
Block a user