size to kitchen
printer logs removed
This commit is contained in:
@@ -112,7 +112,7 @@ public class DiscoveryService : IDiscoveryService
|
||||
{
|
||||
_logger?.LogDebug("Connecting to printer at {IP} to retrieve model", ipAddress);
|
||||
|
||||
await using var epsonPrinter = new EpsonPrinter(_logger);
|
||||
await using var epsonPrinter = new EpsonPrinter();
|
||||
await epsonPrinter.ConnectAsync(ipAddress, port, timeoutSeconds: 3);
|
||||
|
||||
var printerId = await epsonPrinter.GetPrinterIdAsync();
|
||||
|
||||
@@ -41,7 +41,7 @@ public class EpsonDiagnostics
|
||||
|
||||
_logger?.LogInformation("Starting diagnostics for printer at {Ip}:{Port}", ip, port);
|
||||
|
||||
await using var printer = new EpsonPrinter(_logger);
|
||||
await using var printer = new EpsonPrinter();
|
||||
|
||||
// Connect to printer
|
||||
report.AppendLine();
|
||||
|
||||
@@ -13,6 +13,6 @@ public class EpsonPrinterFactory:IPrinterFactory
|
||||
|
||||
public IEpsonPrinter CreatePrinter()
|
||||
{
|
||||
return new EpsonPrinter(_logger);
|
||||
return new EpsonPrinter();
|
||||
}
|
||||
}
|
||||
@@ -107,6 +107,11 @@ public class KitchenReceiptConverter
|
||||
string fullPrefix = guestInfo + quantityPrefix;
|
||||
string fullLine = fullPrefix + dish.Name;
|
||||
|
||||
if (!string.IsNullOrEmpty(dish.Size))
|
||||
{
|
||||
fullLine+= $" ({dish.Size})";
|
||||
}
|
||||
|
||||
if (fullLine.Length <= _lineWidth || string.IsNullOrEmpty(dish.Name))
|
||||
{
|
||||
commands.Add(new PrintCommand(fullLine) { IsTall = true });
|
||||
@@ -158,6 +163,7 @@ public class KitchenReceiptConverter
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Modifications
|
||||
if (dish.Modifications != null && (dish.Modifications.Removed.Any() || dish.Modifications.Added.Any()))
|
||||
{
|
||||
|
||||
@@ -68,20 +68,14 @@
|
||||
/// </summary>
|
||||
public class Dish
|
||||
{
|
||||
/// <summary>
|
||||
/// Number ordered
|
||||
/// </summary>
|
||||
public int Number { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Name of the dish
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
public Dish(){}
|
||||
|
||||
public int? GuestId { get; set; }
|
||||
|
||||
public string Size { get; set; }
|
||||
public Dish(int number, string name)
|
||||
{
|
||||
Number = number;
|
||||
|
||||
Reference in New Issue
Block a user