|
@@ -1,5 +1,6 @@
|
|
|
import 'package:conalep_pos/models/models.dart';
|
|
|
import 'package:conalep_pos/themes/themes.dart';
|
|
|
+import 'package:conalep_pos/viewmodels/mesa_view_model.dart';
|
|
|
import 'package:conalep_pos/viewmodels/viewmodels.dart';
|
|
|
import 'package:conalep_pos/views/pedido_mesa/pedido_mesa_detalle.dart';
|
|
|
import 'package:conalep_pos/views/pedido_mesa/pedido_mesa_form.dart';
|
|
@@ -27,6 +28,7 @@ class _PedidoMesaScreenState extends State<PedidoMesaScreen> {
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
Provider.of<PedidoViewModel>(context, listen: false)
|
|
|
.fetchLocalMesaPedidosForScreen();
|
|
|
+ Provider.of<MesaViewModel>(context, listen: false).fetchLocalAll();
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -80,8 +82,7 @@ class _PedidoMesaScreenState extends State<PedidoMesaScreen> {
|
|
|
Navigator.push(
|
|
|
context,
|
|
|
MaterialPageRoute(
|
|
|
- builder: (context) =>
|
|
|
- PedidoMesaForm(pedido: pedidoCompleto),
|
|
|
+ builder: (context) => PedidoMesaForm(pedido: pedidoCompleto),
|
|
|
),
|
|
|
);
|
|
|
} else {
|
|
@@ -187,17 +188,25 @@ class _PedidoMesaScreenState extends State<PedidoMesaScreen> {
|
|
|
)
|
|
|
])),
|
|
|
DataCell(
|
|
|
- Text(item.id.toString()),
|
|
|
+ Text(item.peticion ?? "Sin fecha"),
|
|
|
onTap: () => go(item),
|
|
|
),
|
|
|
DataCell(
|
|
|
- Text(item.folio.toString()),
|
|
|
+ Text(Provider.of<MesaViewModel>(context, listen: false).fetchLocalById(idMesa: item.idMesa).nombre.toString()),
|
|
|
onTap: () => go(item),
|
|
|
),
|
|
|
+ /* DataCell(
|
|
|
+ Text(item.id.toString()),
|
|
|
+ onTap: () => go(item),
|
|
|
+ ), */
|
|
|
DataCell(
|
|
|
- Text(item.idLocal.toString()),
|
|
|
+ Text(item.folio.toString()),
|
|
|
onTap: () => go(item),
|
|
|
),
|
|
|
+ /* DataCell(
|
|
|
+ Text(item.idLocal.toString()),
|
|
|
+ onTap: () => go(item),
|
|
|
+ ), */
|
|
|
DataCell(
|
|
|
Text(item.nombreCliente ?? "Sin nombre"),
|
|
|
onTap: () => go(item),
|
|
@@ -210,10 +219,6 @@ class _PedidoMesaScreenState extends State<PedidoMesaScreen> {
|
|
|
Text(item.estatus ?? "Sin Estatus"),
|
|
|
onTap: () => go(item),
|
|
|
),
|
|
|
- DataCell(
|
|
|
- Text(item.peticion ?? "Sin fecha"),
|
|
|
- onTap: () => go(item),
|
|
|
- ),
|
|
|
]));
|
|
|
}
|
|
|
|
|
@@ -323,11 +328,15 @@ class _PedidoMesaScreenState extends State<PedidoMesaScreen> {
|
|
|
columns: [
|
|
|
DataColumn(label: Text(" ", style: estilo)),
|
|
|
DataColumn(
|
|
|
- label: Text("ID", style: estilo)),
|
|
|
+ label: Text("FECHA", style: estilo)),
|
|
|
DataColumn(
|
|
|
- label: Text("FOLIO", style: estilo)),
|
|
|
+ label: Text("MESA", style: estilo)),
|
|
|
+ /* DataColumn(
|
|
|
+ label: Text("ID", style: estilo)), */
|
|
|
DataColumn(
|
|
|
- label: Text("IDLOCAL", style: estilo)),
|
|
|
+ label: Text("FOLIO", style: estilo)),
|
|
|
+ /* DataColumn(
|
|
|
+ label: Text("IDLOCAL", style: estilo)), */
|
|
|
DataColumn(
|
|
|
label: Text("NOMBRE", style: estilo)),
|
|
|
DataColumn(
|
|
@@ -335,8 +344,6 @@ class _PedidoMesaScreenState extends State<PedidoMesaScreen> {
|
|
|
Text("COMENTARIOS", style: estilo)),
|
|
|
DataColumn(
|
|
|
label: Text("ESTATUS", style: estilo)),
|
|
|
- DataColumn(
|
|
|
- label: Text("FECHA", style: estilo)),
|
|
|
],
|
|
|
rows: registros,
|
|
|
),
|