feat: Intégration du frontend Flutter depuis YNOV
- Framework: Flutter web - Pages: Login, inscription, dashboards - Services: API client, authentification, gestion d'état - Intégration avec backend NestJS - Dockerfile pour déploiement web
This commit is contained in:
@@ -26,6 +26,25 @@ class DataGenerator {
|
||||
'Nous avons hâte de vous rencontrer.',
|
||||
'La pédagogie Montessori nous intéresse.'
|
||||
];
|
||||
static final List<String> _frenchCities = [
|
||||
'Paris', 'Lyon', 'Marseille', 'Toulouse', 'Nice', 'Nantes', 'Montpellier', 'Strasbourg',
|
||||
'Bordeaux', 'Lille', 'Rennes', 'Reims', 'Saint-Étienne', 'Toulon', 'Le Havre', 'Grenoble',
|
||||
'Dijon', 'Angers', 'Nîmes', 'Villeurbanne', 'Clermont-Ferrand', 'Le Mans', 'Aix-en-Provence',
|
||||
'Brest', 'Tours', 'Amiens', 'Limoges', 'Annecy', 'Boulogne-Billancourt', 'Perpignan'
|
||||
];
|
||||
|
||||
static final List<String> _countries = [
|
||||
'France', 'Belgique', 'Suisse', 'Canada', 'Maroc', 'Algérie', 'Tunisie', 'Sénégal',
|
||||
'Côte d\'Ivoire', 'Madagascar', 'Espagne', 'Italie', 'Portugal', 'Allemagne', 'Royaume-Uni'
|
||||
];
|
||||
|
||||
static final List<String> _childminderPresentations = [
|
||||
'Bonjour,\n\nJe suis assistante maternelle agréée depuis plusieurs années et je souhaite rejoindre votre plateforme. J\'ai de l\'expérience avec les enfants de tous âges et je privilégie un accompagnement bienveillant.\n\nCordialement',
|
||||
'Madame, Monsieur,\n\nTitulaire d\'un agrément d\'assistante maternelle, je propose un accueil personnalisé dans un environnement sécurisé et stimulant. Je suis disponible pour discuter de vos besoins.\n\nBien à vous',
|
||||
'Bonjour,\n\nAssistante maternelle passionnée, je propose un accueil de qualité dans ma maison adaptée aux enfants. J\'ai suivi plusieurs formations et je suis disponible à temps plein.\n\nÀ bientôt',
|
||||
'Cher gestionnaire,\n\nJe suis une professionnelle expérimentée dans la garde d\'enfants. Mon domicile est aménagé pour accueillir les petits dans les meilleures conditions. Je serais ravie de faire partie de votre réseau.\n\nCordialement',
|
||||
'Bonjour,\n\nDepuis 5 ans, j\'exerce comme assistante maternelle avec passion. Je propose des activités d\'éveil adaptées et un suivi personnalisé de chaque enfant. Mon agrément me permet d\'accueillir jusqu\'à 4 enfants.\n\nBien cordialement'
|
||||
];
|
||||
|
||||
static String firstName() => _firstNames[_random.nextInt(_firstNames.length)];
|
||||
static String lastName() => _lastNames[_random.nextInt(_lastNames.length)];
|
||||
@@ -62,4 +81,107 @@ class DataGenerator {
|
||||
}
|
||||
return chosenSnippets.join(' ');
|
||||
}
|
||||
}
|
||||
static String birthDate() {
|
||||
final now = DateTime.now();
|
||||
final age = _random.nextInt(31) + 25; // Entre 25 et 55 ans
|
||||
final birthYear = now.year - age;
|
||||
final birthMonth = _random.nextInt(12) + 1;
|
||||
final birthDay = _random.nextInt(28) + 1;
|
||||
return "${birthDay.toString().padLeft(2, '0')}/${birthMonth.toString().padLeft(2, '0')}/${birthYear}";
|
||||
}
|
||||
|
||||
/// Génère une ville de naissance française
|
||||
static String birthCity() => _frenchCities[_random.nextInt(_frenchCities.length)];
|
||||
|
||||
/// Génère un pays de naissance
|
||||
static String birthCountry() => _countries[_random.nextInt(_countries.length)];
|
||||
|
||||
/// Génère un numéro de sécurité sociale français (NIR)
|
||||
static String socialSecurityNumber() {
|
||||
// Format NIR français : 1 YYMM DD CCC KK
|
||||
// 1 = sexe (1 homme, 2 femme)
|
||||
final sex = _random.nextBool() ? '1' : '2';
|
||||
|
||||
// YY = année de naissance (2 derniers chiffres)
|
||||
final currentYear = DateTime.now().year;
|
||||
final birthYear = currentYear - (_random.nextInt(31) + 25); // 25-55 ans
|
||||
final yy = (birthYear % 100).toString().padLeft(2, '0');
|
||||
|
||||
// MM = mois de naissance
|
||||
final mm = (_random.nextInt(12) + 1).toString().padLeft(2, '0');
|
||||
|
||||
// DD = département de naissance (01-95)
|
||||
final dd = (_random.nextInt(95) + 1).toString().padLeft(2, '0');
|
||||
|
||||
// CCC = numéro d'ordre (001-999)
|
||||
final ccc = (_random.nextInt(999) + 1).toString().padLeft(3, '0');
|
||||
|
||||
// KK = clé de contrôle (simulation)
|
||||
final kk = _random.nextInt(100).toString().padLeft(2, '0');
|
||||
|
||||
return '$sex$yy$mm$dd$ccc$kk';
|
||||
}
|
||||
|
||||
/// Génère un numéro d'agrément pour assistante maternelle
|
||||
static String agreementNumber() {
|
||||
final year = DateTime.now().year;
|
||||
final dept = _random.nextInt(95) + 1; // Département 01-95
|
||||
final sequence = _random.nextInt(9999) + 1; // Numéro de séquence
|
||||
return 'AM${dept.toString().padLeft(2, '0')}$year${sequence.toString().padLeft(4, '0')}';
|
||||
}
|
||||
|
||||
/// Génère un nombre d'enfants maximum pour l'agrément (1-4)
|
||||
static int maxChildren() => _random.nextInt(4) + 1;
|
||||
|
||||
/// Génère un message de présentation pour assistante maternelle
|
||||
static String childminderPresentation() =>
|
||||
_childminderPresentations[_random.nextInt(_childminderPresentations.length)];
|
||||
|
||||
/// Génère un âge d'enfant en mois (0-36 mois)
|
||||
static int childAgeInMonths() => _random.nextInt(37);
|
||||
|
||||
/// Génère une durée d'expérience en années (1-15 ans)
|
||||
static int experienceYears() => _random.nextInt(15) + 1;
|
||||
|
||||
/// Génère un tarif horaire (entre 3.50€ et 6.00€)
|
||||
static double hourlyRate() {
|
||||
final rate = 3.50 + (_random.nextDouble() * 2.50);
|
||||
return double.parse(rate.toStringAsFixed(2));
|
||||
}
|
||||
|
||||
/// Génère des disponibilités (jours de la semaine)
|
||||
static List<String> availability() {
|
||||
final days = ['Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi', 'Dimanche'];
|
||||
final availableDays = <String>[];
|
||||
|
||||
// Au moins 3 jours de disponibilité
|
||||
final minDays = 3;
|
||||
final maxDays = days.length;
|
||||
final numDays = _random.nextInt(maxDays - minDays + 1) + minDays;
|
||||
|
||||
final selectedIndices = <int>[];
|
||||
while (selectedIndices.length < numDays) {
|
||||
final index = _random.nextInt(days.length);
|
||||
if (!selectedIndices.contains(index)) {
|
||||
selectedIndices.add(index);
|
||||
availableDays.add(days[index]);
|
||||
}
|
||||
}
|
||||
|
||||
return availableDays;
|
||||
}
|
||||
|
||||
/// Génère des horaires (format "08h30-17h30")
|
||||
static String workingHours() {
|
||||
final startHours = [7, 8, 9];
|
||||
final endHours = [16, 17, 18, 19];
|
||||
|
||||
final startHour = startHours[_random.nextInt(startHours.length)];
|
||||
final endHour = endHours[_random.nextInt(endHours.length)];
|
||||
|
||||
final startMinutes = _random.nextBool() ? '00' : '30';
|
||||
final endMinutes = _random.nextBool() ? '00' : '30';
|
||||
|
||||
return '${startHour}h$startMinutes-${endHour}h$endMinutes';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user