This commit is contained in:
2024-07-30 12:01:07 +02:00
parent c776100ed0
commit baa06b60fb
6 changed files with 282 additions and 13 deletions

View File

@@ -0,0 +1,26 @@
import Handlebars from "handlebars";
export const usePrintLabel = async (printServerId,printerName , rawZPL ) => {
const supabase = useSupabaseClient()
const dataStore = useDataStore()
await supabase.from("printJobs").insert({
tenant: dataStore.currentTenant,
rawContent: rawZPL,
printerName: printerName,
printServer: printServerId
})
}
export const useGenerateZPL = (rawZPL,data) => {
let template = Handlebars.compile(rawZPL)
return template(data)
}