feat: Etiketten-Seitenlayout auf dem A4-Bogen frei waehlbar
- LabelTemplate bekommt columns/rows (optional, leer = automatisch passend), plus konfigurierbare Raender/Abstaende - damit ein Etikett exakt auf das vorgedruckte Raster eines physischen Etikettenbogens (z.B. Avery) gelegt werden kann statt nur automatisch berechnet - Startposition beim Drucken waehlbar, fuer bereits angebrochene Boegen (erste Seite startet ab der gewaehlten Position, Folgeseiten wieder von vorne)
This commit is contained in:
1 parent
9659b8d266
commit
c6941a797f
11 files changed
+357
-27
No files matched your search
@@ -27,9 +27,14 @@ export function deactivateLabelTemplate(id: string): Promise<LabelTemplate> {
|
||||
return apiFetch<LabelTemplate>(`/label-templates/${id}`, { method: "DELETE" });
|
||||
}
|
||||
|
||||
export async function printLabels(templateId: string, bottlingBatchId: string): Promise<void> {
|
||||
export async function printLabels(
|
||||
templateId: string,
|
||||
bottlingBatchId: string,
|
||||
startPosition?: number,
|
||||
): Promise<void> {
|
||||
const query = startPosition && startPosition > 1 ? `?startPosition=${startPosition}` : "";
|
||||
const { blob, filename } = await apiFetchBlob(
|
||||
`/label-templates/${templateId}/print/${bottlingBatchId}`,
|
||||
`/label-templates/${templateId}/print/${bottlingBatchId}${query}`,
|
||||
"etiketten.pdf",
|
||||
);
|
||||
downloadBlob(blob, filename);
|
||||
|
||||
Reference in new issue
Block a user