update print all segment

This commit is contained in:
Efril
2026-04-03 17:44:04 +07:00
parent a0db13feb4
commit 46dfb7e44e
10 changed files with 840 additions and 11 deletions
@@ -58,6 +58,66 @@ class OrderRightPanel extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
PopupMenuButton<String>(
color: AppColor.white,
onSelected: (value) {
switch (value) {
case 'checker':
context.read<PrintStruckBloc>().add(
PrintStruckEvent.checker(state.selectedOrder!),
);
break;
case 'kitchen':
context.read<PrintStruckBloc>().add(
PrintStruckEvent.kitchen(state.selectedOrder!),
);
break;
case 'bar':
context.read<PrintStruckBloc>().add(
PrintStruckEvent.bar(state.selectedOrder!),
);
break;
}
},
itemBuilder: (context) => [
const PopupMenuItem(
value: 'checker',
child: Row(
children: [
Icon(Icons.receipt_outlined),
SizedBox(width: 8),
Text('Print Checker'),
],
),
),
const PopupMenuItem(
value: 'kitchen',
child: Row(
children: [
Icon(Icons.kitchen_outlined),
SizedBox(width: 8),
Text('Print Kitchen'),
],
),
),
const PopupMenuItem(
value: 'bar',
child: Row(
children: [
Icon(Icons.local_bar_outlined),
SizedBox(width: 8),
Text('Print Bar'),
],
),
),
],
child: const AppElevatedButton.outlined(
onPressed: null, // handled by PopupMenuButton
label: 'Print',
icon: Icon(Icons.print),
),
),
const SpaceWidth(8),
AppElevatedButton.outlined(
onPressed: () {
if (state.selectedOrder?.status == 'completed') {