print payment

This commit is contained in:
efrilm
2025-11-07 17:08:57 +07:00
parent d78b6165c2
commit af182b6f5a
8 changed files with 314 additions and 105 deletions
@@ -39,12 +39,28 @@ class PrintStruckBloc extends Bloc<PrintStruckEvent, PrintStruckState> {
),
);
},
receipt: (e) async {
cashier: (e) async {
Either<PrinterFailure, Unit> failureOrSuccess;
emit(state.copyWith(isPrinting: true, failureOrPrintStruck: none()));
failureOrSuccess = await _printerRepository.printStruckReceipt(
failureOrSuccess = await _printerRepository.printStruckCashier(
order: e.order,
);
emit(
state.copyWith(
isPrinting: false,
failureOrPrintStruck: optionOf(failureOrSuccess),
),
);
},
payment: (e) async {
Either<PrinterFailure, Unit> failureOrSuccess;
emit(state.copyWith(isPrinting: true, failureOrPrintStruck: none()));
failureOrSuccess = await _printerRepository.printStruckPayment(
order: e.order,
);