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
Build and Push Multi-Platform Images / build-and-push (push) Successful in 33s
This commit is contained in:
@@ -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);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user