feat: Complete ATLAS system installation and API fixes
## Backend Changes - Add new API endpoints: combustible, pois, mantenimiento, video, configuracion - Fix vehiculos endpoint to return paginated response with items array - Add /vehiculos/all endpoint for non-paginated list - Add /geocercas/all endpoint - Add /alertas/configuracion GET/PUT endpoints - Add /viajes/activos and /viajes/iniciar endpoints - Add /reportes/stats, /reportes/templates, /reportes/preview endpoints - Add /conductores/all and /conductores/disponibles endpoints - Update router.py to include all new modules ## Frontend Changes - Fix authentication token handling (snake_case vs camelCase) - Update vehiculosApi.listAll to use /vehiculos/all - Fix FuelGauge component usage in Combustible page - Fix chart component exports (named + default exports) - Update API client for proper token refresh ## Infrastructure - Rename services from ADAN to ATLAS - Configure Cloudflare tunnel for atlas.consultoria-as.com - Update systemd service files - Configure PostgreSQL with TimescaleDB - Configure Redis, Mosquitto, Traccar, MediaMTX ## Documentation - Update installation guides - Update API reference - Rename all ADAN references to ATLAS Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,16 +7,16 @@ import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
|
||||
// Claves de almacenamiento
|
||||
export const STORAGE_KEYS = {
|
||||
AUTH_TOKEN: '@adan/auth_token',
|
||||
CONDUCTOR: '@adan/conductor',
|
||||
DISPOSITIVO: '@adan/dispositivo',
|
||||
UBICACIONES_OFFLINE: '@adan/ubicaciones_offline',
|
||||
VIAJE_ACTIVO: '@adan/viaje_activo',
|
||||
CONFIGURACION: '@adan/configuracion',
|
||||
ULTIMO_SYNC: '@adan/ultimo_sync',
|
||||
MENSAJES_PENDIENTES: '@adan/mensajes_pendientes',
|
||||
PARADAS_PENDIENTES: '@adan/paradas_pendientes',
|
||||
COMBUSTIBLE_PENDIENTE: '@adan/combustible_pendiente',
|
||||
AUTH_TOKEN: '@atlas/auth_token',
|
||||
CONDUCTOR: '@atlas/conductor',
|
||||
DISPOSITIVO: '@atlas/dispositivo',
|
||||
UBICACIONES_OFFLINE: '@atlas/ubicaciones_offline',
|
||||
VIAJE_ACTIVO: '@atlas/viaje_activo',
|
||||
CONFIGURACION: '@atlas/configuracion',
|
||||
ULTIMO_SYNC: '@atlas/ultimo_sync',
|
||||
MENSAJES_PENDIENTES: '@atlas/mensajes_pendientes',
|
||||
PARADAS_PENDIENTES: '@atlas/paradas_pendientes',
|
||||
COMBUSTIBLE_PENDIENTE: '@atlas/combustible_pendiente',
|
||||
} as const;
|
||||
|
||||
type StorageKey = typeof STORAGE_KEYS[keyof typeof STORAGE_KEYS];
|
||||
@@ -124,8 +124,8 @@ class StorageService {
|
||||
async clearAll(): Promise<void> {
|
||||
try {
|
||||
const keys = await AsyncStorage.getAllKeys();
|
||||
const adanKeys = keys.filter((key) => key.startsWith('@adan/'));
|
||||
await AsyncStorage.multiRemove(adanKeys);
|
||||
const atlasKeys = keys.filter((key) => key.startsWith('@atlas/'));
|
||||
await AsyncStorage.multiRemove(atlasKeys);
|
||||
} catch (error) {
|
||||
console.error('Error limpiando almacenamiento:', error);
|
||||
throw new Error('No se pudo limpiar el almacenamiento');
|
||||
@@ -187,8 +187,8 @@ class StorageService {
|
||||
async getStorageSize(): Promise<number> {
|
||||
try {
|
||||
const keys = await AsyncStorage.getAllKeys();
|
||||
const adanKeys = keys.filter((key) => key.startsWith('@adan/'));
|
||||
const pairs = await AsyncStorage.multiGet(adanKeys);
|
||||
const atlasKeys = keys.filter((key) => key.startsWith('@atlas/'));
|
||||
const pairs = await AsyncStorage.multiGet(atlasKeys);
|
||||
|
||||
let totalSize = 0;
|
||||
pairs.forEach(([key, value]) => {
|
||||
|
||||
Reference in New Issue
Block a user