job status reporter

This commit is contained in:
EugeneTes
2026-02-05 08:42:34 +01:00
parent 1c0c95842a
commit 08da2c1e3e
3 changed files with 33 additions and 25 deletions

View File

@@ -7,17 +7,17 @@ var templatesDir = Path.Combine(AppContext.BaseDirectory, "Templates");
// ============================================================================
// FINAL RECEIPT - HTML PRINTER
// ============================================================================
var json = TestHelpers.BuildFinalReceiptJson(includeTax: true);
var template = File.ReadAllText(Path.Combine(templatesDir, "FinalReceipt.xml"));
var printCommands = engine.Render(template, json, lineWidth: 48, bigFontLineWidth: 24);
//var json = TestHelpers.BuildFinalReceiptJson(includeTax: true);
//var template = File.ReadAllText(Path.Combine(templatesDir, "FinalReceipt.xml"));
//var printCommands = engine.Render(template, json, lineWidth: 48, bigFontLineWidth: 24);
TestHelpers.PrintCommandsToConsole(printCommands);
//TestHelpers.PrintCommandsToConsole(printCommands);
var printer = await TestHelpers.CreateHtmlPrinterAsync();
await TestHelpers.PrintCommandsToHtmlPrinterAsync(
printer,
printCommands,
logoPath: "ristorante-klinglers.ch-logo_white_bg.png");
//var printer = await TestHelpers.CreateHtmlPrinterAsync();
//await TestHelpers.PrintCommandsToHtmlPrinterAsync(
// printer,
// printCommands,
// logoPath: "ristorante-klinglers.ch-logo_white_bg.png");
// ============================================================================
@@ -65,16 +65,16 @@ await TestHelpers.PrintCommandsToHtmlPrinterAsync(
// ============================================================================
// KITCHEN RECEIPT - HTML PRINTER
// ============================================================================
//var json = TestHelpers.BuildKitchenReceiptJson();
//var template = File.ReadAllText(Path.Combine(templatesDir, "KitchenReceipt.xml"));
//var printCommands = engine.Render(template, json, lineWidth: 33, bigFontLineWidth: 20);
var json = TestHelpers.BuildKitchenReceiptJson();
var template = File.ReadAllText(Path.Combine(templatesDir, "KitchenReceipt.xml"));
var printCommands = engine.Render(template, json, lineWidth: 33, bigFontLineWidth: 20);
//TestHelpers.PrintCommandsToConsole(printCommands);
TestHelpers.PrintCommandsToConsole(printCommands);
//var printer = await TestHelpers.CreateHtmlPrinterAsync(
// path: @".\kitchen_test.html",
// paperWidth: TestHelpers.KitchenPaperWidth);
//await TestHelpers.PrintKitchenCommandsToHtmlPrinterAsync(printer, printCommands);
var printer = await TestHelpers.CreateHtmlPrinterAsync(
path: @".\kitchen_test.html",
paperWidth: TestHelpers.KitchenPaperWidth);
await TestHelpers.PrintKitchenCommandsToHtmlPrinterAsync(printer, printCommands);
// ============================================================================