File size: 2,062 Bytes
619120c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | const firstNames = ['Maria', 'Juan', 'Jose', 'Ana', 'Luis', 'Sofia', 'Miguel', 'Isabella', 'Pedro', 'Carmen', 'Ramon', 'Elena'];
const lastNames = ['Santos', 'Reyes', 'Cruz', 'Bautista', 'Ocampo', 'Garcia', 'Mendoza', 'Torres', 'Aquino', 'Flores'];
const localLocations = [
{ city: 'Makati, Metro Manila', lat: 14.5547, lng: 121.0244, country: 'Philippines' },
{ city: 'BGC, Taguig', lat: 14.5454, lng: 121.0503, country: 'Philippines' },
{ city: 'Cebu City', lat: 10.3157, lng: 123.8854, country: 'Philippines' },
{ city: 'Davao City', lat: 7.1907, lng: 125.4553, country: 'Philippines' },
{ city: 'Quezon City', lat: 14.6760, lng: 121.0437, country: 'Philippines' },
];
const roamingLocations = [
{ city: 'Tokyo', lat: 35.6762, lng: 139.6503, country: 'Japan' },
{ city: 'Singapore', lat: 1.3521, lng: 103.8198, country: 'Singapore' },
{ city: 'Hong Kong', lat: 22.3193, lng: 114.1694, country: 'Hong Kong' },
{ city: 'Los Angeles', lat: 34.0522, lng: -118.2437, country: 'USA' },
];
const generateUser = (id) => {
const isRoaming = Math.random() > 0.8;
const location = isRoaming
? roamingLocations[Math.floor(Math.random() * roamingLocations.length)]
: localLocations[Math.floor(Math.random() * localLocations.length)];
const firstName = firstNames[Math.floor(Math.random() * firstNames.length)];
const lastName = lastNames[Math.floor(Math.random() * lastNames.length)];
return {
id: `GS-${1000 + id}`,
name: `${firstName} ${lastName}`,
phoneNumber: `09${Math.floor(Math.random() * 900 + 100)}-${Math.floor(Math.random() * 9000 + 1000)}`,
status: Math.random() > 0.2 ? 'Online' : 'Offline',
signalStrength: Math.floor(Math.random() * 5) + 1, // 1-5 bars
dataUsage: (Math.random() * 10).toFixed(2) + ' GB',
isRoaming,
location,
connectionType: Math.random() > 0.5 ? '5G' : '4G LTE'
};
};
export const mockUsers = Array.from({ length: 50 }, (_, i) => generateUser(i));
|