update print all segment
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user