feat: add label preview functionality to barcode templates with backend rendering and UI modal
Build and Push Multi-Platform Images / build-and-push (push) Successful in 33s

This commit is contained in:
2026-05-07 23:52:39 +02:00
parent 71502df7b4
commit 71b447154d
4 changed files with 107 additions and 4 deletions
@@ -5,4 +5,9 @@ export const labelPrintAgentApi = {
api
.post<{ jobId: string }>('/api/label-print-agent/jobs', { templateId, fieldValues })
.then((r) => r.data),
previewLabel: async (templateId: number, fieldValues: Record<string, string>): Promise<string> => {
const res = await api.post('/api/label-print-agent/preview', { templateId, fieldValues }, { responseType: 'blob' });
return URL.createObjectURL(res.data as Blob);
},
};