feat(pos): add real thermal ticket printing via ESC/POS (#21)
- Add thermal_printer.py service generating raw ESC/POS bytes for 58mm/80mm printers - Add /pos/api/sales/<id>/print endpoint (escpos_raw or browser mode) - Add printer.js with WebUSB and Web Serial support for direct browser-to-printer - Add thermal print button in ticket modal with connect/print workflow Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1380,6 +1380,8 @@
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-ghost" onclick="POS.closeTicketModal()">Cerrar</button>
|
||||
<button class="btn btn-ghost" id="btnConnectPrinter" onclick="POS.connectThermal()" title="Conectar impresora termica USB/Serial">🖨 Conectar</button>
|
||||
<button class="btn btn-secondary" id="btnThermalPrint" onclick="POS.thermalPrint()" style="display:none;" title="Imprimir en impresora termica">🖨 Termica</button>
|
||||
<button class="btn btn-primary" onclick="POS.printTicket()">Imprimir</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1477,8 +1479,10 @@
|
||||
<!-- ================================================================
|
||||
JAVASCRIPT
|
||||
================================================================ -->
|
||||
<script src="/pos/static/js/i18n.js"></script>
|
||||
<script src="/pos/static/js/app-init.js"></script>
|
||||
<script src="/pos/static/js/push.js"></script>
|
||||
<script src="/pos/static/js/printer.js"></script>
|
||||
<script src="/pos/static/js/pos.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user