feat: Agente Ventas SIGMAC — app de rutas y pedidos de campo
App Flutter 2.11 para vendedores de ruta de Telcotronics. Incluye ruta del día con mapa custom, catálogo, pedidos CRUD, firma digital, scanner QR/barcode, selector de clientes escalable, notificaciones in-app y soporte multiplataforma (Android + Linux desktop). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
import 'cliente.dart';
|
||||
|
||||
enum EstadoParada { pendiente, visitado, saltado }
|
||||
|
||||
extension EstadoParadaExt on EstadoParada {
|
||||
String get value {
|
||||
switch (this) {
|
||||
case EstadoParada.visitado: return 'visitado';
|
||||
case EstadoParada.saltado: return 'saltado';
|
||||
default: return 'pendiente';
|
||||
}
|
||||
}
|
||||
|
||||
static EstadoParada fromString(String s) {
|
||||
switch (s) {
|
||||
case 'visitado': return EstadoParada.visitado;
|
||||
case 'saltado': return EstadoParada.saltado;
|
||||
default: return EstadoParada.pendiente;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ParadaRuta {
|
||||
final String id;
|
||||
final Cliente cliente;
|
||||
final int orden;
|
||||
EstadoParada estado;
|
||||
final String horaEstimada;
|
||||
String? horaVisita;
|
||||
String? notasVisita;
|
||||
|
||||
ParadaRuta({
|
||||
required this.id,
|
||||
required this.cliente,
|
||||
required this.orden,
|
||||
required this.estado,
|
||||
required this.horaEstimada,
|
||||
this.horaVisita,
|
||||
this.notasVisita,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toMap(String rutaId) => {
|
||||
'id': id,
|
||||
'ruta_id': rutaId,
|
||||
'cliente_id': cliente.id,
|
||||
'orden': orden,
|
||||
'estado': estado.value,
|
||||
'hora_estimada': horaEstimada,
|
||||
'hora_visita': horaVisita,
|
||||
'notas_visita': notasVisita,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user