Просмотр исходного кода

modificaciones para recepcion de paquetes

angel-gajon 1 год назад
Родитель
Сommit
38f5bbfb99

+ 0 - 5
lib/viewmodels/package_view_model.dart

@@ -34,14 +34,9 @@ class PackageViewModel {
         return null;
       }
 
-      print('TOKENNNNN');
-      print(token);
-
       String url =
           "/v1/acta?&token=$token&escaneo=true&expand=casilla,tipoActa,ultimaBitacora,tipoEleccion&limite=1&idTipoEleccion=1,2,3";
       String? userToken = await SessionStorage().getToken();
-      print('USER  TOKENNNNN');
-      print(userToken);
       http.Response? jsonResponse = await _services.getHttp(url, userToken!);
 
       return json.decode(jsonResponse!.body);

+ 19 - 31
lib/views/package/package_page.dart

@@ -63,7 +63,7 @@ class _PackagePageState extends State<PackagePage> {
       if (!openStore) {
         HelpersViewModel.dialog(
             2,
-            Row(
+            const Row(
               children: [
                 Icon(Icons.error),
                 SizedBox(width: 5),
@@ -258,41 +258,29 @@ class _PackagePageState extends State<PackagePage> {
             const Divider(indent: 2, color: Colors.black),
             const SizedBox(height: 10),
             const Center(
-                child: Text("Bitácora",
+                child: Text("Recibo Capturado",
                     style:
                         TextStyle(fontSize: 18, fontWeight: FontWeight.bold))),
             const SizedBox(height: 20),
-            widget._binnacle != null && widget._binnacle.length > 0
-                ? SizedBox(
-                    child: DataTable(
-                        horizontalMargin: 0,
-                        columnSpacing: 10,
-                        columns: const <DataColumn>[
-                          DataColumn(label: Text("Entrada/Salida")),
-                          DataColumn(label: Text("Fecha")),
-                          DataColumn(label: Text("Motivo")),
-                        ],
-                        rows: List<DataRow>.generate(
-                          widget._binnacle.length,
-                          (int index) => DataRow(
-                            cells: <DataCell>[
-                              DataCell(Text(widget._binnacle[index]
-                                          ["entradaSalida"] ==
-                                      "E"
-                                  ? "Entrada"
-                                  : "Salida")),
-                              DataCell(Text(widget._binnacle[index]["fecha"]
-                                  .toString()
-                                  .substring(0, 16))),
-                              DataCell(Text(widget._binnacle[index]["motivo"])),
-                            ],
-                          ),
-                        )),
-                  )
+            widget._package["ultimaRecepcion"]["fecha"] != null
+                ? const Padding(
+                    padding: EdgeInsets.all(8.0),
+                    child: Center(
+                        child: Row(
+                      children: [
+                        Icon(Icons.description_outlined, size: 80),
+                        Text("Recibo de Captura")
+                      ],
+                    )))
                 : const Padding(
                     padding: EdgeInsets.all(8.0),
-                    child: Center(child: Text("Sin bitácora.")),
-                  )
+                    child: Center(
+                        child: Row(
+                      children: [
+                        Icon(Icons.watch_later_outlined, size: 80),
+                        Text("Sin Recibo")
+                      ],
+                    )))
           ],
         ),
       ),

+ 1 - 1
lib/views/paquetes/recepcion_screen.dart

@@ -30,7 +30,7 @@ class Formulario extends State<RecepcionScreen> {
 
       if (mounted) setState(() => _loading = true);
 
-      Widget header = Row(
+      Widget header = const Row(
         children: [
           Icon(Icons.error),
           SizedBox(width: 5),