feat(frontend): QR-Code-Dialog auf Objekt-Detailseiten (Modul 22)
Wiederverwendbarer QrCodeDialog (authentifizierter Blob-Fetch) auf Volk-, Bienenstand-, Koenigin-, Honigcharge-Detailseiten und je Lagerbehaelter-Zeile eingebunden.
This commit is contained in:
1 parent
dd88b6a92c
commit
8b7fd61c1c
8 files changed
+102
-3
No files matched your search
@@ -0,0 +1,13 @@
|
||||
import { apiFetchBlob } from "@/lib/auth/api-client";
|
||||
|
||||
export type QrEntityType =
|
||||
| "colonies"
|
||||
| "apiaries"
|
||||
| "queens"
|
||||
| "honey-batches"
|
||||
| "storage-containers";
|
||||
|
||||
export async function fetchQrCodeSvg(entityType: QrEntityType, id: string): Promise<Blob> {
|
||||
const { blob } = await apiFetchBlob(`/qr/${entityType}/${id}.svg`, `${entityType}.svg`);
|
||||
return blob;
|
||||
}
|
||||
Reference in new issue
Block a user