diff --git a/Dockerfile b/Dockerfile index 293b85ddcd004a17bc78e61712f0a01ad1259508..83be11124a5f29739d9eec1be917877e9bf2ee1f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,6 @@ FROM nginx RUN apt-get update COPY --from=build /app/dist/fr /usr/share/nginx/html -COPY --from=build /app/dist/fr /usr/share/nginx/html/fr RUN touch /var/run/nginx.pid RUN ls -l /usr/share/nginx/html diff --git a/categoriesformations.json b/categoriesformations.json new file mode 100644 index 0000000000000000000000000000000000000000..b920950cf910afabd9bc3cc85647583b07e0ab98 --- /dev/null +++ b/categoriesformations.json @@ -0,0 +1,472 @@ +[ + { + "_id": { "$oid": "5fbb933b80a5c257dc0161f5" }, + "modules": [ + { + "id": 260, + "display_id": "260", + "display_name": "Modules APTIC - n°260", + "digest": "Maitrise de l’environnement d’un ordinateur (clavier, souris)", + "text": "Maitrise de l’environnement d’un ordinateur (clavier, souris)", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/260/", + "receipt_time": "2020-09-01T15:16:53", + "last_update_time": "2020-09-28T11:34:49" + }, + { + "id": 259, + "display_id": "259", + "display_name": "Modules APTIC - n°259", + "digest": "Composantes et facettes de l’identité numérique", + "text": "Composantes et facettes de l’identité numérique", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/259/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T11:35:39" + }, + { + "id": 261, + "display_id": "261", + "display_name": "Modules APTIC - n°261", + "digest": "Internet : fonctionnement et outils de navigation web", + "text": "Internet : fonctionnement et outils de navigation web", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/261/", + "receipt_time": "2020-09-28T11:49:27", + "last_update_time": "2020-09-28T11:49:27" + }, + { + "id": 249, + "display_id": "249", + "display_name": "Modules APTIC - n°249", + "digest": "Internet : fonctionnement des emails", + "text": "Internet : fonctionnement des emails", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/249/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T11:34:34" + }, + { + "id": 222, + "display_id": "222", + "display_name": "Modules APTIC - n°222", + "digest": "Le smartphone : principes de fonctionnement", + "text": "Le smartphone : principes de fonctionnement", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/222/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T11:36:31" + }, + { + "id": 212, + "display_id": "212", + "display_name": "Modules APTIC - n°212", + "digest": "Internet : envoyer, recevoir, gérer ses emails", + "text": "Internet : envoyer, recevoir, gérer ses emails", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/212/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T11:37:10" + }, + { + "id": 186, + "display_id": "186", + "display_name": "Modules APTIC - n°186", + "digest": "Smartphones et Tablettes sous Androïd", + "text": "Smartphones et Tablettes sous Androïd", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/186/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T11:37:58" + }, + { + "id": 183, + "display_id": "183", + "display_name": "Modules APTIC - n°183", + "digest": "Smartphone : Les principaux gestes pour l'écran tactile", + "text": "Smartphone : Les principaux gestes pour l'écran tactile", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/183/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T11:38:33" + } + ], + "name": "Les compétences de base", + "id": "baseSkills", + "__v": 0 + }, + { + "_id": { "$oid": "5fbb934180a5c257dc0161f6" }, + "modules": [ + { + "id": 176, + "display_id": "176", + "display_name": "Modules APTIC - n°176", + "digest": "Pôle Emploi : faire ses déclarations en ligne", + "text": "Pôle Emploi : faire ses déclarations en ligne", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/176/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T11:40:18" + }, + { + "id": 175, + "display_id": "175", + "display_name": "Modules APTIC - n°175", + "digest": "Déclarer ses revenus en ligne et découvertes des services proposés", + "text": "Déclarer ses revenus en ligne et découvertes des services proposés", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/175/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T11:41:14" + }, + { + "id": 174, + "display_id": "174", + "display_name": "Modules APTIC - n°174", + "digest": "Accéder à ses droits sociaux et les gérer en ligne (RSA…)", + "text": "Accéder à ses droits sociaux et les gérer en ligne (RSA…)", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/174/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T11:41:49" + }, + { + "id": 173, + "display_id": "173", + "display_name": "Modules APTIC - n°173", + "digest": "Ouvrir et gérer son dossier de retraite (CNAF/CARSAT) en ligne", + "text": "Ouvrir et gérer son dossier de retraite (CNAF/CARSAT) en ligne", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/173/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T11:42:26" + }, + { + "id": 172, + "display_id": "172", + "display_name": "Modules APTIC - n°172", + "digest": "Gérer son abonnement et ses factures d'électricité/gaz en ligne", + "text": "Gérer son abonnement et ses factures d'électricité/gaz en ligne", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/172/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T11:43:02" + }, + { + "id": 171, + "display_id": "171", + "display_name": "Modules APTIC - n°171", + "digest": "Gérer ses droits d'assuré social en ligne/sur internet", + "text": "Gérer ses droits d'assuré social en ligne/sur internet", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/171/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T11:43:38" + }, + { + "id": 167, + "display_id": "167", + "display_name": "Modules APTIC - n°167", + "digest": "Plateforme Ameli.fr : la sécurité sociale en ligne", + "text": "Plateforme Ameli.fr : la sécurité sociale en ligne", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/167/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T11:46:37" + }, + { + "id": 165, + "display_id": "165", + "display_name": "Modules APTIC - n°165", + "digest": "Plateforme France Connect", + "text": "Plateforme France Connect", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/165/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T11:47:07" + } + ], + "name": "Accès aux droits", + "id": "accessRight", + "__v": 0 + }, + { + "_id": { "$oid": "5fbb934780a5c257dc0161f7" }, + "modules": [ + { + "id": 254, + "display_id": "254", + "display_name": "Modules APTIC - n°254", + "digest": "Utiliser les réseaux sociaux pour sa recherche d'emploi", + "text": "Utiliser les réseaux sociaux pour sa recherche d'emploi", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/254/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-10-08T17:00:45" + }, + { + "id": 240, + "display_id": "240", + "display_name": "Modules APTIC - n°240", + "digest": "Panorama des plateformes de recherche d’emploi", + "text": "Panorama des plateformes de recherche d’emploi", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/240/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-10-08T17:00:16" + }, + { + "id": 194, + "display_id": "194", + "display_name": "Modules APTIC - n°194", + "digest": "Traitement de texte : découverte", + "text": "Traitement de texte : découverte", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/194/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-10-08T17:01:59" + }, + { + "id": 193, + "display_id": "193", + "display_name": "Modules APTIC - n°193", + "digest": "Traitement de texte : utilisation de base", + "text": "Traitement de texte : utilisation de base", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/193/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-10-08T17:03:40" + }, + { + "id": 192, + "display_id": "192", + "display_name": "Modules APTIC - n°192", + "digest": "Traitement de texte : utilisation avancée", + "text": "Traitement de texte : utilisation avancée", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/192/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-10-08T17:01:15" + }, + { + "id": 191, + "display_id": "191", + "display_name": "Modules APTIC - n°191", + "digest": "Tableur : découverte", + "text": "Tableur : découverte", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/191/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-10-08T16:59:55" + }, + { + "id": 262, + "display_id": "262", + "display_name": "Modules APTIC - n°262", + "digest": "Réalisation CV", + "text": "Réalisation CV", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/262/", + "receipt_time": "2020-09-28T12:16:43", + "last_update_time": "2020-09-28T12:16:43" + }, + { + "id": 263, + "display_id": "263", + "display_name": "Modules APTIC - n°263", + "digest": "Diffuser son CV en ligne", + "text": "Diffuser son CV en ligne", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/263/", + "receipt_time": "2020-09-28T12:18:40", + "last_update_time": "2020-09-28T12:18:40" + }, + { + "id": 3, + "display_id": "3", + "display_name": "Modules APTIC - n°3", + "digest": "Organiser sa recherche d'emploi", + "text": "Organiser sa recherche d'emploi", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/3/", + "receipt_time": "2020-09-01T15:13:48", + "last_update_time": "2020-10-08T17:01:53" + } + ], + "name": "Insertion sociale et professionnelle", + "id": "socialAndProfessional", + "__v": 0 + }, + { + "_id": { "$oid": "5fbb934c80a5c257dc0161f8" }, + "modules": [ + { + "id": 257, + "display_id": "257", + "display_name": "Modules APTIC - n\u00b0257", + "digest": "\u00catre parent \u00e0 l'\u00e8re num\u00e9rique: conna\u00eetre les usages, jouer son r\u00f4le de parent - 03", + "text": "\u00catre parent \u00e0 l'\u00e8re num\u00e9rique: conna\u00eetre les usages, jouer son r\u00f4le de parent - 03", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/257/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-10-08T17:04:33" + }, + { + "id": 238, + "display_id": "238", + "display_name": "Modules APTIC - n\u00b0238", + "digest": "D\u00e9couvrir l\u2019univers des jeux vid\u00e9o - 22", + "text": "D\u00e9couvrir l\u2019univers des jeux vid\u00e9o - 22", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/238/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T12:27:06" + }, + { + "id": 178, + "display_id": "178", + "display_name": "Modules APTIC - n\u00b0178", + "digest": "Suivre la scolarit\u00e9 de son enfant - 82", + "text": "Suivre la scolarit\u00e9 de son enfant - 82", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/178/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T12:27:28" + }, + { + "id": 166, + "display_id": "166", + "display_name": "Modules APTIC - n\u00b0166", + "digest": "D\u00e9couvrir les services en ligne de l'enfance de votre commune - 94", + "text": "D\u00e9couvrir les services en ligne de l'enfance de votre commune - 94", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/166/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T12:27:49" + } + ], + "name": "Aide à la parentalité", + "id": "parentingHelp", + "__v": 0 + }, + { + "_id": { "$oid": "5fbb935080a5c257dc0161f9" }, + "modules": [ + { + "id": 264, + "display_id": "264", + "display_name": "Modules APTIC - n\u00b0264", + "digest": "Les conduites \u00e0 risques et les bons usages du num\u00e9rique - 02", + "text": "Les conduites \u00e0 risques et les bons usages du num\u00e9rique - 02", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/264/", + "receipt_time": "2020-09-28T12:20:29", + "last_update_time": "2020-10-08T17:07:13" + }, + { + "id": 255, + "display_id": "255", + "display_name": "Modules APTIC - n\u00b0255", + "digest": "D\u00e9couvrir les r\u00e9seaux sociaux : d\u00e9finition, fonctionnement - 05", + "text": "D\u00e9couvrir les r\u00e9seaux sociaux : d\u00e9finition, fonctionnement - 05", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/255/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-10-08T17:07:08" + }, + { + "id": 265, + "display_id": "265", + "display_name": "Modules APTIC - n\u00b0265", + "digest": "Fablab : charte, valeurs et panorama des outils num\u00e9riques - 09", + "text": "Fablab : charte, valeurs et panorama des outils num\u00e9riques - 09", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/265/", + "receipt_time": "2020-09-28T12:24:48", + "last_update_time": "2020-10-08T17:06:35" + }, + { + "id": 232, + "display_id": "232", + "display_name": "Modules APTIC - n\u00b0232", + "digest": "Les paiements en ligne - 28", + "text": "Les paiements en ligne - 28", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/232/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-10-08T17:15:56" + }, + { + "id": 225, + "display_id": "225", + "display_name": "Modules APTIC - n\u00b0225", + "digest": "Internet : comprendre les principes de fonctionnement - 35", + "text": "Internet : comprendre les principes de fonctionnement - 35", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/225/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T12:21:13" + }, + { + "id": 221, + "display_id": "221", + "display_name": "Modules APTIC - n\u00b0221", + "digest": "Techniques de v\u00e9rification de l\u2019information - 39", + "text": "Techniques de v\u00e9rification de l\u2019information - 39", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/221/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-10-08T17:12:07" + }, + { + "id": 218, + "display_id": "218", + "display_name": "Modules APTIC - n\u00b0218", + "digest": "Cr\u00e9er et param\u00e9trer un compte Google - 42", + "text": "Cr\u00e9er et param\u00e9trer un compte Google - 42", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/218/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T12:21:50" + }, + { + "id": 209, + "display_id": "209", + "display_name": "Modules APTIC - n\u00b0209", + "digest": "G\u00e9rer ses donn\u00e9es : sauvegarde en ligne (dans le cloud) - 51", + "text": "G\u00e9rer ses donn\u00e9es : sauvegarde en ligne (dans le cloud) - 51", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/209/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T12:22:21" + }, + { + "id": 208, + "display_id": "208", + "display_name": "Modules APTIC - n\u00b0208", + "digest": "G\u00e9rer ses donn\u00e9es : sauvegardes locales (disques durs externes, cl\u00e9 USB) - 52", + "text": "G\u00e9rer ses donn\u00e9es : sauvegardes locales (disques durs externes, cl\u00e9 USB) - 52", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/208/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T12:23:10" + }, + { + "id": 206, + "display_id": "206", + "display_name": "Modules APTIC - n\u00b0206", + "digest": "Classer, g\u00e9rer et partager ses photos - 54", + "text": "Classer, g\u00e9rer et partager ses photos - 54", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/206/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-10-08T17:12:28" + }, + { + "id": 195, + "display_id": "195", + "display_name": "Modules APTIC - n\u00b0195", + "digest": "Skype et autres outils de visioconf\u00e9rence - 65", + "text": "Skype et autres outils de visioconf\u00e9rence - 65", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/195/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-09-28T12:25:44" + }, + { + "id": 164, + "display_id": "164", + "display_name": "Modules APTIC - n\u00b0164", + "digest": "Connaitre et g\u00e9rer son identit\u00e9 num\u00e9rique - 96", + "text": "Connaitre et g\u00e9rer son identit\u00e9 num\u00e9rique - 96", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/164/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-10-08T17:13:35" + }, + { + "id": 163, + "display_id": "163", + "display_name": "Modules APTIC - n\u00b0163", + "digest": "Nettoyer son identit\u00e9 num\u00e9rique - 97", + "text": "Nettoyer son identit\u00e9 num\u00e9rique - 97", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/163/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-10-08T17:13:57" + }, + { + "id": 162, + "display_id": "162", + "display_name": "Modules APTIC - n\u00b0162", + "digest": "Effacer ses traces sur le web, prot\u00e9ger ses donn\u00e9es personnelles - 98", + "text": "Effacer ses traces sur le web, prot\u00e9ger ses donn\u00e9es personnelles - 98", + "url": "https://services.formulaireextranet.grandlyon.com/backoffice/data/modules-aptic/162/", + "receipt_time": "2020-09-01T15:16:52", + "last_update_time": "2020-10-08T17:13:04" + } + ], + "name": "Culture et sécurité numérique", + "id": "digitalCultureSecurity", + "__v": 0 + } +] diff --git a/nginx/dev.conf b/nginx/dev.conf index 5998c857466cf8d5284d3aceea9e96b15f7e689d..4265eb65e22870cbc8b3a4d515aca6b0a8572f41 100644 --- a/nginx/dev.conf +++ b/nginx/dev.conf @@ -1,25 +1,31 @@ +upstream api_node_js { + server service-ram:3000; +} server { listen 8080 default_server; root /usr/share/nginx/html; + index index.html; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. - try_files $uri $uri/ /index.html; + try_files $uri $uri/ $uri/index.html @backend; } - location /api { - rewrite ^/api/(.*) /$1 break; - proxy_pass http://json-server:3000/api; + location @backend { + rewrite /api/?(.*) /$1 break; + proxy_pass http://api_node_js; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Real-IP $remote_addr; } - # Public api redirect - location /base-adresse/base-adresse-nationale/streets { + location /base-adresse/base-adresse-nationale/streets { proxy_pass https://passerelle.formulaireextranet.grandlyon.com/base-adresse/base-adresse-nationale/streets; } + location /geocoding/photon/api { proxy_pass https://download.data.grandlyon.com/geocoding/photon/api; } @@ -38,3 +44,4 @@ server { } } + diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 6c0a142cb3cb69808dd8971faadbe2a252c057d9..b65276612431e4ad7f9611819a450f4fb8a6f71c 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -20,6 +20,7 @@ import { ModalFilterComponent } from './structure-list/components/modal-filter/m import { LegalNoticeComponent } from './legal-notice/legal-notice.component'; import { AboutComponent } from './about/about.component'; import { MenuPhoneComponent } from './menu-phone/menu-phone.component'; +import { FormComponent } from './form/form.component'; import { UserVerificationComponent } from './user-verification/user-verification.component'; import { AuthGuard } from './guards/auth.guard'; import { CustomHttpInterceptor } from './config/http-interceptor'; @@ -41,6 +42,7 @@ import { ResetPasswordComponent } from './reset-password/reset-password.componen LegalNoticeComponent, AboutComponent, MenuPhoneComponent, + FormComponent, UserVerificationComponent, ResetPasswordComponent, ], diff --git a/src/app/form/form.component.html b/src/app/form/form.component.html new file mode 100644 index 0000000000000000000000000000000000000000..0b116891dc2039f8d8c8df202fc43b2467648fdc --- /dev/null +++ b/src/app/form/form.component.html @@ -0,0 +1,247 @@ +<form [formGroup]="structureForm" *ngIf="structureForm" (ngSubmit)="onSubmit(structureForm)"> + <p>Votre structure est-elle ?*</p> + <input type="radio" formControlName="structureRepresentation" value="principal" /> Un établissement principal (siège + social)<br /> + <input type="radio" formControlName="structureRepresentation" value="antenne" /> Une permanence (antenne) + <app-validator-form [control]="getStructureControl('structureRepresentation')"></app-validator-form> + <p>Nom de votre structure*</p> + <input type="text" formControlName="structureName" /> + <app-validator-form [control]="getStructureControl('structureName')"></app-validator-form> + <p>Type de structure*</p> + <div *ngFor="let choice of typeStructure | keyvalue"> + <label> + <input + type="checkbox" + [value]="choice.key" + (change)="onCheckChange($event, 'structureType')" + [checked]="isInArray(choice.key, 'structureType')" + /> + {{ choice.value }} + </label> + </div> + <app-validator-form [control]="getStructureControl('structureType')"></app-validator-form> + <p>Démarche</p> + <div *ngIf="proceduresAccompaniment"> + <p>{{ proceduresAccompaniment.name }}</p> + <div *ngFor="let module of proceduresAccompaniment.modules"> + <label> + <input + type="checkbox" + [value]="module.id" + (change)="onCheckChange($event, proceduresAccompaniment.id)" + [checked]="isInArray(module.id, proceduresAccompaniment.id)" + /> + {{ module.text }} + </label> + </div> + </div> + <p>Description</p> + <textarea rows="4" style="width: 100%" maxlength="500" formControlName="description"></textarea> + <p> + Afin de rendre visible l'offre de formation numérique proposée lors de ce nouveau confinement, merci d'indiquer ici, + les activités que vous avez pu maintenir + </p> + <textarea rows="4" style="width: 100%" maxlength="1000" formControlName="lockdownActivity"></textarea> + <div formGroupName="address"> + <p>ADRESSE</p> + <p>Numéro</p> + <input type="text" autocomplete="street-address" formControlName="numero" /> + <p>Voie*</p> + <input type="text" formControlName="street" /> + <app-validator-form [control]="getAddressControl('street')"></app-validator-form> + <p>Commune*</p> + <input type="text" formControlName="commune" /> + <app-validator-form [control]="getAddressControl('commune')"></app-validator-form> + </div> + <p>VOUS JOINDRE</p> + <p>Téléphone*</p> + <input type="text" formControlName="contactPhone" /> + <app-validator-form [control]="getStructureControl('contactPhone')"></app-validator-form> + <p>Courriel*</p> + <input type="email" formControlName="contactMail" /> + <app-validator-form [control]="getStructureControl('contactMail')"></app-validator-form> + <p>Site web</p> + <input type="text" formControlName="website" /> + <p>Présence sur les réseaux sociaux</p> + <p>Facebook</p> + <input type="text" formControlName="facebook" /> + <p>Twitter</p> + <input type="text" formControlName="twitter" /> + <p>Instagram</p> + <input type="text" formControlName="instagram" /> + <p>Personne à contacter</p> + <p>Civilité</p> + <input type="radio" formControlName="gender" value="Madame" />Madame <br /> + <input type="radio" formControlName="gender" value="Monsieur" />Monsieur + <p>Nom</p> + <input type="text" formControlName="contactName" /> + <p>Prénom</p> + <input type="text" formControlName="contactSurname" /> + <p>Courriel*</p> + <input type="email" formControlName="contactMail" /> + <app-validator-form [control]="getStructureControl('contactMail')"></app-validator-form> + <p>Fonction</p> + <select formControlName="fonction"> + <option value="">---Sélectionner---</option> + <option *ngFor="let fonction of fonctions | keyvalue" [value]="fonction.key"> + {{ fonction.value }} + </option> + </select> + <p>Accessibilité</p> + <input type="checkbox" formControlName="pmrAccess" />Accessibilité personnes à mobilité réduite (PMR) <br /> + <div *ngIf="accessModality"> + <p>{{ accessModality.name }}*</p> + <div *ngFor="let module of accessModality.modules"> + <label> + <input + type="checkbox" + [value]="module.id" + (change)="onCheckChange($event, accessModality.id)" + [checked]="isInArray(module.id, accessModality.id)" + /> + {{ module.text }} + </label> + </div> + <app-validator-form [control]="getStructureControl('accessModality')"></app-validator-form> + </div> + <p>Pour les RDV, merci de préciser s'il est nécessaire d'apporter des pièces justificatives ou du matériel.</p> + <textarea rows="4" style="width: 100%" maxlength="500" formControlName="documentsMeeting"></textarea> + <div *ngIf="labelsQualifications"> + <p>{{ labelsQualifications.name }}</p> + <div *ngFor="let module of labelsQualifications.modules"> + <label> + <input + type="checkbox" + [value]="module.id" + (change)="onCheckChange($event, labelsQualifications.id)" + [checked]="isInArray(module.id, labelsQualifications.id)" + /> + {{ module.text }} + </label> + </div> + </div> + <div *ngIf="publics"> + <p>{{ publics.name }}*</p> + <div *ngFor="let module of publics.modules"> + <label> + <input + type="checkbox" + [value]="module.id" + (change)="onCheckChange($event, publics.id)" + [checked]="isInArray(module.id, publics.id)" + /> + {{ module.text }} + </label> + </div> + <app-validator-form [control]="getStructureControl('publics')"></app-validator-form> + </div> + <div formGroupName="hours"> + <p>Heures</p> + <div *ngFor="let day of weekDay | keyvalue"> + <div [formGroupName]="day.key"> + <p>Ouvert le {{ day.value }} ? :</p> + <input type="radio" formControlName="open" (click)="addTime(day.key)" [value]="true" />Oui <br /> + <input type="radio" formControlName="open" (click)="removeTime(day.key)" [value]="false" />Non + <div formArrayName="time" *ngIf="isOpen(day.key)"> + <div *ngFor="let time of getTime(day.key).controls; index as i"> + <div [formGroupName]="i"> + <input type="number" formControlName="openning" /> + <input type="number" formControlName="closing" /> + </div> + <div *ngIf="i < 1"> + <input + type="checkbox" + [value]="false" + (change)="onCheckPlageHoursChange($event, day.key, time)" + [checked]="getTime(day.key).controls.length == 2" + />Ajouter une plage + </div> + </div> + </div> + </div> + </div> + </div> + <p>Fermetures exceptionnelles</p> + <input type="text" formControlName="exceptionalClosures" /> + <div *ngIf="publicsAccompaniment"> + <p>{{ publicsAccompaniment.name }}</p> + <div *ngFor="let module of publicsAccompaniment.modules"> + <label> + <input + type="checkbox" + [value]="module.id" + (change)="onCheckChange($event, publicsAccompaniment.id)" + [checked]="isInArray(module.id, publicsAccompaniment.id)" + /> + {{ module.text }} + </label> + </div> + </div> + <p>Formations au numérique proposées</p> + <p> + Ces modules de compétences sont issus du référentiel national et identifiés dans le cadre du déploiement du Pass + numérique sur la Métropole (pour en savoir +) + </p> + <div *ngFor="let c of categoryTraining"> + <p>{{ c.name }}</p> + <div *ngFor="let module of c.modules"> + <label> + <input + type="checkbox" + [value]="module.id" + (change)="onCheckChange($event, c.id)" + [checked]="isInArray(module.id, c.id)" + /> + {{ module.text }} + </label> + </div> + </div> + <div *ngIf="equipmentsAndServices"> + <p>{{ equipmentsAndServices.name }}</p> + <div *ngFor="let module of equipmentsAndServices.modules"> + <label> + <input + type="checkbox" + [value]="module.id" + (change)="onCheckChange($event, equipmentsAndServices.id)" + [checked]="isInArray(module.id, equipmentsAndServices.id)" + /> + {{ module.text }} + </label> + <div *ngIf="isInArray(module.id, equipmentsAndServices.id)"> + <div *ngIf="module.id == 'ordinateurs'"> + <span>Nombre</span> + <input type="number" formControlName="nbComputers" /> + </div> + <div *ngIf="module.id == 'tablettes'"> + <span>Nombre</span> + <input type="number" formControlName="nbTablets" /> + </div> + <div *ngIf="module.id == 'bornesNumeriques'"> + <span>Nombre</span> + <input type="number" formControlName="nbNumericTerminal" /> + </div> + <div *ngIf="module.id == 'imprimantes'"> + <span>Nombre</span> + <input type="number" formControlName="nbPrinters" /> + </div> + </div> + </div> + </div> + <p>Précisions si nécessaire</p> + <textarea rows="4" style="width: 100%" maxlength="500" formControlName="equipmentsDetails"></textarea> + <p>L'accès à ce matériel est</p> + <div *ngFor="let equipment of equipmentAccess | keyvalue"> + <label> + <input + type="checkbox" + [value]="equipment.key" + (change)="onCheckChange($event, 'equipmentsAccessType')" + [checked]="isInArray(equipment.key, 'equipmentsAccessType')" + /> + {{ equipment.value }} + </label> + </div> + <br /> + <button type="submit" [disabled]="structureForm.invalid">OK</button> +</form> diff --git a/src/app/form/form.component.scss b/src/app/form/form.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..14dbd367db5fec418a7b3dd8ae56477b85c5108d --- /dev/null +++ b/src/app/form/form.component.scss @@ -0,0 +1,9 @@ +form { + position: fixed; + background: white; + width: 100vh; + height: 100vh; + top: 0; + z-index: 9999; + overflow: auto; +} diff --git a/src/app/form/form.component.spec.ts b/src/app/form/form.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..54eeeb118a7b21a4d86c990c93811398ef5cbf5c --- /dev/null +++ b/src/app/form/form.component.spec.ts @@ -0,0 +1,132 @@ +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { FormArray, FormControl, FormGroup, Validators } from '@angular/forms'; +import { Time } from '../models/time.model'; + +import { FormComponent } from './form.component'; + +fdescribe('FormComponent', () => { + let component: FormComponent; + let fixture: ComponentFixture<FormComponent>; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [FormComponent], + imports: [HttpClientTestingModule], + }).compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(FormComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + component.structureForm = new FormGroup({ + structureType: new FormArray([new FormControl('mediatheque'), new FormControl('cyber')]), + structureName: new FormControl('structure.structureName', Validators.required), + structureRepresentation: new FormControl('structure.structureRepresentation', Validators.required), + description: new FormControl('structure.description'), + lockdownActivity: new FormControl('structure.lockdownActivity'), + address: new FormGroup({ + numero: new FormControl('structure.address.numero'), + street: new FormControl('structure.address.street', Validators.required), + commune: new FormControl('structure.address.commune', Validators.required), + }), + contactPhone: new FormControl('structure.contactPhone', Validators.required), + contactMail: new FormControl('structure.contactMail', Validators.required), + website: new FormControl('structure.website'), + facebook: new FormControl('structure.facebook'), + twitter: new FormControl('structure.twitter'), + instagram: new FormControl('structure.instagram'), + gender: new FormControl('structure.gender'), + contactName: new FormControl('structure.contactName'), + contactSurname: new FormControl('structure.contactSurname'), + fonction: new FormControl('structure.fonction'), + pmrAccess: new FormControl('structure.pmrAccess'), + documentsMeeting: new FormControl('structure.documentsMeeting'), + hours: new FormGroup({ + monday: new FormGroup({ + open: new FormControl(true, Validators.required), + time: new FormArray([ + new FormGroup({ + openning: new FormControl(900, Validators.required), + closing: new FormControl(1200, Validators.required), + }), + ]), + }), + tuesday: new FormGroup({ + open: new FormControl(true, Validators.required), + time: new FormArray([]) as FormArray, + }), + wednesday: new FormGroup({ + open: new FormControl(true, Validators.required), + time: new FormArray([]) as FormArray, + }), + thursday: new FormGroup({ + open: new FormControl(true, Validators.required), + time: new FormArray([]) as FormArray, + }), + friday: new FormGroup({ + open: new FormControl(true, Validators.required), + time: new FormArray([]) as FormArray, + }), + saturday: new FormGroup({ + open: new FormControl(false, Validators.required), + time: new FormArray([]) as FormArray, + }), + sunday: new FormGroup({ + open: new FormControl(false, Validators.required), + time: new FormArray([]) as FormArray, + }), + }), + exceptionalClosures: new FormControl('structure.exceptionalClosures'), + labelsQualifications: new FormControl([]), + accessModality: new FormControl([]), + publicsAccompaniment: new FormControl([]), + equipmentsAndServices: new FormControl([]), + publics: new FormControl([]), + baseSkills: new FormControl([]), + accessRight: new FormControl([]), + parentingHelp: new FormControl([]), + socialAndProfessional: new FormControl([]), + digitalCultureSecurity: new FormControl([]), + nbComputers: new FormControl('structure.nbComputers'), + nbPrinters: new FormControl('structure.nbPrinters'), + nbTablets: new FormControl('structure.nbTablets'), + nbNumericTerminal: new FormControl('structure.nbNumericTerminal'), + equipmentsDetails: new FormControl('structure.equipmentsDetails'), + equipmentsAccessType: new FormControl([]), + }); + }); + + it('should return the correct Abstract Control', () => { + const nameControl = 'structureName'; + const control = component.getStructureControl(nameControl); + const expectControl = component.structureForm.get(nameControl); + expect(control).toEqual(expectControl); + }); + + it('should return the correct Abstract Control from address', () => { + const nameControl = 'street'; + const control = component.getAddressControl(nameControl); + const addressForm = component.structureForm.get('address').get(nameControl); + expect(control).toEqual(addressForm); + }); + it('should return the correct Time from a specific day', () => { + const day = 'monday'; + const control = component.getTime(day); + const TimeForm = component.structureForm.get('hours').get(day).get('time') as FormArray; + expect(control).toEqual(TimeForm); + }); + it('should return true', () => { + const day = 'monday'; + const control = component.isOpen(day); + expect(control).toEqual(true); + }); + it('should return check if value is in formArray', () => { + const nameControl = 'structureType'; + const isInArray = component.isInArray('cyber', nameControl); + const isntInArray = component.isInArray('unknowType', nameControl); + expect(isInArray).toEqual(true); + expect(isntInArray).toEqual(false); + }); +}); diff --git a/src/app/form/form.component.ts b/src/app/form/form.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..733bd94d243b09d390075fc63c4604dc67b40364 --- /dev/null +++ b/src/app/form/form.component.ts @@ -0,0 +1,221 @@ +import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; +import { AbstractControl, FormArray, FormControl, FormGroup, Validators } from '@angular/forms'; +import { Structure } from '../models/structure.model'; +import { Time } from '../models/time.model'; +import { Day } from '../models/day.model'; +import { StructureService } from '../services/structure.service'; +import { SearchService } from '../structure-list/services/search.service'; +import { Category } from '../structure-list/models/category.model'; +import { CategoryEnum } from '../shared/enum/category.enum'; +import { EquipmentAccess } from '../shared/enum/equipmentAccess.enum'; +import { WeekDayEnum } from '../shared/enum/weekDay.enum'; +import { typeStructureEnum } from '../shared/enum/typeStructure.enum'; +import { FonctionContactEnum } from '../shared/enum/fonctionContact.enum'; + +@Component({ + selector: 'app-structureForm', + templateUrl: './form.component.html', + styleUrls: ['./form.component.scss'], +}) +export class FormComponent implements OnInit { + @Input() public idStructure: number; + @Output() closeEvent = new EventEmitter<Structure>(); + public structureForm: FormGroup; + public equipmentAccess = EquipmentAccess; + public weekDay = WeekDayEnum; + public typeStructure = typeStructureEnum; + public fonctions = FonctionContactEnum; + public categoryTraining: Category[]; + public labelsQualifications: Category; + public publics: Category; + public accessModality: Category; + public publicsAccompaniment: Category; + public equipmentsAndServices: Category; + public proceduresAccompaniment: Category; + public structureId: number; + constructor(private structureService: StructureService, private searchService: SearchService) {} + + ngOnInit(): void { + this.structureService.getStructure(this.idStructure).subscribe((structure) => { + this.initForm(structure); + this.structureId = structure.id; + }); + this.searchService.getCategoriesAccompaniment().subscribe((categories: Category[]) => { + this.proceduresAccompaniment = categories[0]; + }); + this.searchService.getCategoriesMoreFilters().subscribe((categories: Category[]) => { + categories.forEach((categ) => { + switch (categ.id) { + case CategoryEnum.accessModality: { + this.accessModality = categ; + break; + } + case CategoryEnum.equipmentsAndServices: { + this.equipmentsAndServices = categ; + break; + } + case CategoryEnum.labelsQualifications: { + this.labelsQualifications = categ; + break; + } + case CategoryEnum.publics: { + this.publics = categ; + break; + } + case CategoryEnum.publicsAccompaniment: { + this.publicsAccompaniment = categ; + break; + } + } + }); + }); + this.searchService.getCategoriesTraining().subscribe((t) => { + this.categoryTraining = t; + }); + } + + private initForm(structure: Structure): void { + // Init form + this.structureForm = new FormGroup({ + structureType: this.loadArrayForCheckbox(structure.structureType, true), + structureName: new FormControl(structure.structureName, Validators.required), + structureRepresentation: new FormControl(structure.structureRepresentation, Validators.required), + description: new FormControl(structure.description), + lockdownActivity: new FormControl(structure.lockdownActivity), + address: new FormGroup({ + numero: new FormControl(structure.address.numero), + street: new FormControl(structure.address.street, Validators.required), + commune: new FormControl(structure.address.commune, Validators.required), + }), + contactPhone: new FormControl(structure.contactPhone, [Validators.required, Validators.pattern('[0-9]{10}')]), + contactMail: new FormControl(structure.contactMail, [ + Validators.required, + Validators.pattern('[a-z0-9._%+-]+@[a-z0-9.-]+.[a-z]{2,3}$'), + ]), + website: new FormControl(structure.website), + facebook: new FormControl(structure.facebook), + twitter: new FormControl(structure.twitter), + instagram: new FormControl(structure.instagram), + gender: new FormControl(structure.gender), + contactName: new FormControl(structure.contactName), + contactSurname: new FormControl(structure.contactSurname), + fonction: new FormControl(structure.fonction), + pmrAccess: new FormControl(structure.pmrAccess), + documentsMeeting: new FormControl(structure.documentsMeeting), + hours: new FormGroup({ + monday: this.createDay(structure.hours.monday), + tuesday: this.createDay(structure.hours.tuesday), + wednesday: this.createDay(structure.hours.wednesday), + thursday: this.createDay(structure.hours.thursday), + friday: this.createDay(structure.hours.friday), + saturday: this.createDay(structure.hours.saturday), + sunday: this.createDay(structure.hours.sunday), + }), + exceptionalClosures: new FormControl(structure.exceptionalClosures), + labelsQualifications: this.loadArrayForCheckbox(structure.labelsQualifications, false), + accessModality: this.loadArrayForCheckbox(structure.accessModality, true), + publicsAccompaniment: this.loadArrayForCheckbox(structure.publicsAccompaniment, false), + proceduresAccompaniment: this.loadArrayForCheckbox(structure.proceduresAccompaniment, false), + equipmentsAndServices: this.loadArrayForCheckbox(structure.equipmentsAndServices, false), + publics: this.loadArrayForCheckbox(structure.publics, true), + baseSkills: this.loadArrayForCheckbox(structure.baseSkills, false), + accessRight: this.loadArrayForCheckbox(structure.accessRight, false), + parentingHelp: this.loadArrayForCheckbox(structure.parentingHelp, false), + socialAndProfessional: this.loadArrayForCheckbox(structure.socialAndProfessional, false), + digitalCultureSecurity: this.loadArrayForCheckbox(structure.digitalCultureSecurity, false), + nbComputers: new FormControl(structure.equipmentsAndServices.includes('ordinateurs') ? structure.nbComputers : 0), + nbPrinters: new FormControl(structure.equipmentsAndServices.includes('imprimantes') ? structure.nbPrinters : 0), + nbTablets: new FormControl(structure.equipmentsAndServices.includes('tablettes') ? structure.nbTablets : 0), + nbNumericTerminal: new FormControl( + structure.equipmentsAndServices.includes('bornesNumeriques') ? structure.nbNumericTerminal : 0 + ), + equipmentsDetails: new FormControl(structure.equipmentsDetails), + equipmentsAccessType: this.loadArrayForCheckbox(structure.equipmentsAccessType, false), + }); + } + + private loadArrayForCheckbox(array: string[], isRequired: boolean): FormArray { + return new FormArray( + array.map((str) => new FormControl(str)), + isRequired ? Validators.required : Validators.nullValidator + ); + } + + public getStructureControl(nameControl: string): AbstractControl { + return this.structureForm.get(nameControl); + } + + public getAddressControl(nameControl: string): AbstractControl { + return this.structureForm.get('address').get(nameControl); + } + + public getTime(day: string): FormArray { + return this.structureForm.get('hours').get(day).get('time') as FormArray; + } + + public isOpen(day: string): boolean { + return this.structureForm.get('hours').get(day).get('open').value; + } + + private createDay(day: Day): FormGroup { + return new FormGroup({ + open: new FormControl(day.open, Validators.required), + time: new FormArray(day.time.map((oneTime) => this.createTime(oneTime))) as FormArray, + }); + } + private createTime(time: Time): FormGroup { + return new FormGroup({ + openning: new FormControl(time.openning, Validators.required), + closing: new FormControl(time.closing, Validators.required), + }); + } + + public addTime(day: string): void { + if (!this.structureForm.get('hours').get(day).value.open) { + this.getTime(day).push(this.createTime(new Time())); + } + } + + public removeTime(day: string, time: Time): void { + const index = this.getTime(day).controls.findIndex((element) => element.value == time); + this.getTime(day).removeAt(index); + } + + public onCheckPlageHoursChange(event, day, time: Time): void { + if (event.target.checked) { + this.getTime(day).push(this.createTime(new Time())); + } else { + this.removeTime(day, time); + } + } + + public onCheckChange(event, formControlName: string): void { + const formArray: FormArray = this.structureForm.get(formControlName) as FormArray; + if (event.target.checked) { + // Add a new control in the arrayForm + formArray.push(new FormControl(event.target.value)); + } else { + // Remove uncheck control in the arrayForm + const index = formArray.controls.findIndex((element) => element.value == event.target.value); + formArray.removeAt(index); + } + } + + public isInArray(term: string, formControlName): boolean { + if (this.structureForm.controls[formControlName].value) { + return this.structureForm.controls[formControlName].value.includes(term); + } + return false; + } + public onSubmit(structureForm: FormGroup): void { + if (structureForm.valid) { + this.structureService.postStructure(this.structureId, structureForm.value).subscribe( + (structure: Structure) => { + this.closeEvent.emit(structure); + }, + (err) => {} + ); + } else { + } + } +} diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html index 611ebe96b33b5a08c75c69f033b7aecc92e72540..11b58a67113b399fe6c7770ca5979be90371987e 100644 --- a/src/app/home/home.component.html +++ b/src/app/home/home.component.html @@ -6,6 +6,7 @@ (displayMapMarkerId)="setMapMarkerId($event)" (selectedMarkerId)="setSelectedMarkerId($event)" [selectedStructure]="currentStructure" + (updatedStructure)="updateStructures($event)" class="left-pane" [ngClass]="{ mapPhone: isMapPhone == true }" fxLayout="column" diff --git a/src/app/home/home.component.spec.ts b/src/app/home/home.component.spec.ts index 4bc5950f6a1619d1bed7a4eb96a87c539b75e5c2..55739b5a3dd742e1edc04e5404ee7dc54e56a611 100644 --- a/src/app/home/home.component.spec.ts +++ b/src/app/home/home.component.spec.ts @@ -31,7 +31,6 @@ describe('HomeComponent', () => { it('should create', () => { expect(component).toBeTruthy(); }); - }); it('getAddress(): should getAddress', () => { spyOn(navigator.geolocation, 'getCurrentPosition').and.callFake(() => { diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts index 34e9906b3b48219860203b553cf3f24060bfbd2c..8633018fcb07ad730973ed82b72aa72a90f6563a 100644 --- a/src/app/home/home.component.ts +++ b/src/app/home/home.component.ts @@ -3,7 +3,7 @@ const { DateTime } = require('luxon'); import * as _ from 'lodash'; import { Structure } from '../models/structure.model'; -import { StructureService } from '../services/structure-list.service'; +import { StructureService } from '../services/structure.service'; import { Filter } from '../structure-list/models/filter.model'; import { GeoJson } from '../map/models/geojson.model'; import { GeojsonService } from '../services/geojson.service'; @@ -65,6 +65,12 @@ export class HomeComponent implements OnInit { } } + public updateStructures(s: Structure): void { + this.structures = this.structures.map((structure) => { + return structure.id === s.id ? s : structure; + }); + } + private updateStructuresdistance(structures: Structure[], lon: number, lat: number): void { Promise.all( structures.map((structure) => { diff --git a/src/app/map/components/map.component.ts b/src/app/map/components/map.component.ts index 52e310348b69b4c92738ec5fa01a931fc8487675..e8b0b1cc58598276b72881e1b669507ff117c014 100644 --- a/src/app/map/components/map.component.ts +++ b/src/app/map/components/map.component.ts @@ -16,6 +16,7 @@ import { NgxLeafletLocateComponent } from '@runette/ngx-leaflet-locate'; import * as _ from 'lodash'; import { GeoJsonProperties } from '../models/geoJsonProperties.model'; import { MarkerType } from './markerType.enum'; +import { typeStructureEnum } from '../../shared/enum/typeStructure.enum'; @Component({ selector: 'app-map', @@ -135,10 +136,10 @@ export class MapComponent implements OnChanges { } return ( '<h1>' + - structure.nomDeVotreStructure + + structure.structureName + '</h1>' + '<p>' + - structure.typeDeStructure + + this.getLabelTypeStructure(structure.structureType) + '</p><div>' + '<span class="ico-dot-' + cssAvailabilityClass + @@ -148,6 +149,17 @@ export class MapComponent implements OnChanges { ); } + private getLabelTypeStructure(typeStructure: string[]): string { + let label = ''; + typeStructure.forEach((type) => { + if (label) { + label += ', '; + } + label += typeStructureEnum[type]; + }); + return label; + } + private buildMdmPopUp(mdmProperties: GeoJsonProperties): string { return `<h1>${mdmProperties.nom}</h1><p>${mdmProperties.adresse}</p>`; } diff --git a/src/app/models/address.model.ts b/src/app/models/address.model.ts index 312a24fbd28bec1a938da27efd007fc4946fbf56..185be31968d9f84d366f051d29ff35984313f08d 100644 --- a/src/app/models/address.model.ts +++ b/src/app/models/address.model.ts @@ -1,16 +1,5 @@ export class Address { - public id: number; - public text: string; - public type: string; - public city: string; - public citycode: string; - public zipcode: string; - - constructor(obj?: any) { - Object.assign(this, obj); - } - - public queryString(): string { - return this.text + ' ' + this.zipcode; - } + numero: string; + street: string; + commune: string; } diff --git a/src/app/models/geoAddress.model.ts b/src/app/models/geoAddress.model.ts new file mode 100644 index 0000000000000000000000000000000000000000..ebbd7a39756d41c545c7ca7e4f7ad2fd82ff00c0 --- /dev/null +++ b/src/app/models/geoAddress.model.ts @@ -0,0 +1,16 @@ +export class GeoAddress { + public id: number; + public text: string; + public type: string; + public city: string; + public citycode: string; + public zipcode: string; + + constructor(obj?: any) { + Object.assign(this, obj); + } + + public queryString(): string { + return this.text + ' ' + this.zipcode; + } +} diff --git a/src/app/models/structure.model.ts b/src/app/models/structure.model.ts index 7fbbbde2a56e35143c4a09fef2b561f7d3f6ef7c..7d2708fb0294682893f9b14b0d3bfb2afa9dc008 100644 --- a/src/app/models/structure.model.ts +++ b/src/app/models/structure.model.ts @@ -1,44 +1,55 @@ import { Weekday } from '../structure-list/enum/weekday.enum'; +import { Address } from './address.model'; import { Day } from './day.model'; import { OpeningDay } from './openingDay.model'; import { Week } from './week.model'; export class Structure { public id: number; public numero: string; - public dateDeCreation: string; - public derniereModification: string; - public nomDeLusager: string; - public votreStructureEstElle: string; - public nomDeVotreStructure: string; - public typeDeStructure: string; + public createdAt: string; + public updatedAt: string; + public structureRepresentation: string; + public structureName: string; + public structureType: string[]; public description: string; - public n: string; - public voie: string; - public commune: string; - public telephone: string; - public courriel: string; - public siteWeb: string; + public address: Address; + public contactPhone: string; + public contactMail: string; + public website: string; public facebook: string; public twitter: string; public instagram: string; - public civilite: string; - public nom: string; - public prenom: string; + public gender: string; + public contactName: string; + public contactSurname: string; public fonction: string; - public accessibilitePersonnesAMobiliteReduitePmr: boolean; - public jaccompagneLesUsagersDansLeursDemarchesEnLigne: boolean; - public accompagnementDesDemarches: string[]; - public modalitesDacces: string[]; - public labelsEtQualifications: string[]; + public lockdownActivity: string; + public pmrAccess: boolean; + public publicsAccompaniment: string[]; + public proceduresAccompaniment: string[]; + public accessModality: string[]; + public documentsMeeting: string; + public labelsQualifications: string[]; + public publics: string[]; public nbComputers: number; + public nbPrinters: number; + public nbTablets: number; + public nbNumericTerminal: number; + public exceptionalClosures: string; + public equipmentsAndServices: string[]; public hours: Week; + public equipmentsDetails: string; + public equipmentsAccessType: string[]; + public isOpen: boolean; public openedOn: OpeningDay; - public lesCompetencesDeBase: string[]; - public accesAuxDroits: string[]; - public equipementsEtServicesProposes: string[]; + public baseSkills: string[]; + public accessRight: string[]; + public parentingHelp: string[]; + public socialAndProfessional: string[]; + public digitalCultureSecurity: string[]; + public distance?: number; - public address?: string; public coord?: number[]; constructor(obj?: any) { @@ -82,7 +93,7 @@ export class Structure { * Check if a structure has equipments */ public hasEquipments(): boolean { - if (this.equipementsEtServicesProposes.length) { + if (this.equipmentsAndServices.length) { return true; } return false; diff --git a/src/app/services/structure-list.service.spec.ts b/src/app/services/structure.service.spec.ts similarity index 97% rename from src/app/services/structure-list.service.spec.ts rename to src/app/services/structure.service.spec.ts index fa4b0f4eb574066e2a7d22e038db56f7501bb35d..66488d0f224f627b172edc8596d7008cbca2c692 100644 --- a/src/app/services/structure-list.service.spec.ts +++ b/src/app/services/structure.service.spec.ts @@ -4,7 +4,7 @@ import { Day } from '../models/day.model'; import { Structure } from '../models/structure.model'; import { Time } from '../models/time.model'; import { Week } from '../models/week.model'; -import { StructureService } from './structure-list.service'; +import { StructureService } from './structure.service'; const { DateTime } = require('luxon'); describe('StructureService', () => { diff --git a/src/app/services/structure-list.service.ts b/src/app/services/structure.service.ts similarity index 92% rename from src/app/services/structure-list.service.ts rename to src/app/services/structure.service.ts index 3224f378ae072c1eabb1c65a71dacb6336229379..f881eb0a6875a6b3ebbff59e81880a2b39f15d9a 100644 --- a/src/app/services/structure-list.service.ts +++ b/src/app/services/structure.service.ts @@ -18,6 +18,14 @@ import { Filter } from '../structure-list/models/filter.model'; export class StructureService { constructor(private http: HttpClient) {} + public postStructure(id: number, structure: Structure): Observable<Structure> { + structure.updatedAt = new Date().toString(); + return this.http.post('/api/structures/' + id, structure).pipe(map((item: Structure) => new Structure(item))); + } + + public getStructure(id: number): Observable<Structure> { + return this.http.get('/api/structures/' + id).pipe(map((item: any) => new Structure(item))); + } public getStructures(filters: Filter[]): Observable<Structure[]> { if (filters && filters.length > 0) { let requestUrl = '/api/structures/search'; diff --git a/src/app/shared/components/index.ts b/src/app/shared/components/index.ts index 4c62240127832104c3ac9dee13a1364a9386f9f3..7eb5744bb6cefd8c4740e69c8534260bfb563ef5 100644 --- a/src/app/shared/components/index.ts +++ b/src/app/shared/components/index.ts @@ -4,6 +4,7 @@ import { ModalComponent } from './modal/modal.component'; import { SignUpModalComponent } from './signup-modal/signup-modal.component'; import { SignInModalComponent } from './signin-modal/signin-modal.component'; import { SvgIconComponent } from './svg-icon/svg-icon.component'; +import { ValidatorFormComponent } from './validator-form/validator-form.component'; // tslint:disable-next-line: max-line-length export { @@ -11,6 +12,7 @@ export { SvgIconComponent, ModalComponent, ButtonComponent, + ValidatorFormComponent, SignUpModalComponent, SignInModalComponent, }; @@ -20,7 +22,8 @@ export const SharedComponents = [ LogoCardComponent, SvgIconComponent, ModalComponent, + ButtonComponent, + ValidatorFormComponent, SignUpModalComponent, SignInModalComponent, - ButtonComponent, ]; diff --git a/src/app/shared/components/logo-card/logo-card.component.html b/src/app/shared/components/logo-card/logo-card.component.html index 1ca5994277262cbede562652752548b0646a1dcf..16f8be1cdd236bcce7f5f41b3ea5c96454b0abb2 100644 --- a/src/app/shared/components/logo-card/logo-card.component.html +++ b/src/app/shared/components/logo-card/logo-card.component.html @@ -1,4 +1,4 @@ <div fxLayout="column" fxLayoutAlign="center center" *ngIf="name"> - <img [src]="'assets/logos/' + getLogoKey(name) + '.svg'" [alt]="'logo ' + name" /> + <img [src]="'assets/logos/' + name + '.svg'" [alt]="'logo ' + name" /> <p>{{ getName(name) }}</p> </div> diff --git a/src/app/shared/components/logo-card/logo-card.component.ts b/src/app/shared/components/logo-card/logo-card.component.ts index 874d23679a152895a06448b72f3301cbe5a069ac..8428530d32d64b12a90f2f906a8ebddf9bb79129 100644 --- a/src/app/shared/components/logo-card/logo-card.component.ts +++ b/src/app/shared/components/logo-card/logo-card.component.ts @@ -10,58 +10,16 @@ import { Labels } from '../../enum/labels.emum'; export class LogoCardComponent implements OnInit { @Input() public logoPath: string; @Input() public name: string; - public demarches = Demarches; - public labels = Labels; constructor() {} ngOnInit(): void {} - // Get the custom or default name from a demarche. - public getName(demarche: string): string { - if (demarche === Demarches.caf) { - return 'Caf'; + public getName(key: string): string { + if (Labels[key]) { + return Labels[key]; } else { - return demarche; - } - } - public getLogoKey(demarche: string): string { - switch (demarche) { - case Demarches.caf: - return 'caf'; - case Demarches.carsat: - return 'carsat'; - case Demarches.cpam: - return 'cpam'; - case Demarches.epn: - return 'epn'; - case Demarches.impots: - return 'impots'; - case Demarches.logements: - return 'logement'; - case Demarches.gd_lyon: - return 'lyon'; - case Demarches.pole_emploi: - return 'pole'; - case Demarches.other: - return 'other'; - default: - return this.getLabelKey(demarche); - } - } - - private getLabelKey(demarche: string): string { - switch (demarche) { - case Labels.aidants_connect: - return 'aidants'; - case Labels.maison_france_service: - return 'franceservices'; - case Labels.pass_numerique: - return 'pass'; - case Labels.territoire: - return 'territoire'; - default: - throw new Error(`${demarche} is not handled by getLabelKey and getLogoKey`); + return Demarches[key]; } } } diff --git a/src/app/shared/components/validator-form/validator-form.component.html b/src/app/shared/components/validator-form/validator-form.component.html new file mode 100644 index 0000000000000000000000000000000000000000..a1494a2dfb91c000c20e94498600e958b07a8b9d --- /dev/null +++ b/src/app/shared/components/validator-form/validator-form.component.html @@ -0,0 +1,4 @@ +<div *ngIf="control.invalid" class="alert"> + <div *ngIf="control.errors.required">Champ obligatoire</div> + <div *ngIf="control.errors.pattern">Champ mal renseigné</div> +</div> diff --git a/src/app/shared/components/validator-form/validator-form.component.scss b/src/app/shared/components/validator-form/validator-form.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..425065fba366ed1753c84b0469bca4ed8a0f16ef --- /dev/null +++ b/src/app/shared/components/validator-form/validator-form.component.scss @@ -0,0 +1,5 @@ +@import '../../../../assets/scss/color'; + +.alert { + color: $red-metro; +} diff --git a/src/app/shared/components/validator-form/validator-form.component.spec.ts b/src/app/shared/components/validator-form/validator-form.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..7e5ecc4cb7aa019ebbac7e6de0a7281b09879651 --- /dev/null +++ b/src/app/shared/components/validator-form/validator-form.component.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ValidatorFormComponent } from './validator-form.component'; + +describe('button', () => { + let component: ValidatorFormComponent; + let fixture: ComponentFixture<ValidatorFormComponent>; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ValidatorFormComponent], + }).compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(ValidatorFormComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/shared/components/validator-form/validator-form.component.ts b/src/app/shared/components/validator-form/validator-form.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..f226ca915a93341d4a919bbba57013a73c2f491c --- /dev/null +++ b/src/app/shared/components/validator-form/validator-form.component.ts @@ -0,0 +1,12 @@ +import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; +import { FormControl, FormGroup } from '@angular/forms'; + +@Component({ + selector: 'app-validator-form', + templateUrl: './validator-form.component.html', + styleUrls: ['./validator-form.component.scss'], +}) +export class ValidatorFormComponent { + @Input() public control: FormControl; + constructor() {} +} diff --git a/src/app/shared/enum/category.enum.ts b/src/app/shared/enum/category.enum.ts new file mode 100644 index 0000000000000000000000000000000000000000..6c3c05dd1dc092c1d426692bf1e12e273fbd86d1 --- /dev/null +++ b/src/app/shared/enum/category.enum.ts @@ -0,0 +1,7 @@ +export enum CategoryEnum { + publics = 'publics', + labelsQualifications = 'labelsQualifications', + accessModality = 'accessModality', + publicsAccompaniment = 'publicsAccompaniment', + equipmentsAndServices = 'equipmentsAndServices', +} diff --git a/src/app/shared/enum/demarches.enum.ts b/src/app/shared/enum/demarches.enum.ts index 662046e3b37d4a25faae1821a980474a52628da1..cfd2558a92c7d838a82d200577b4575c43299774 100644 --- a/src/app/shared/enum/demarches.enum.ts +++ b/src/app/shared/enum/demarches.enum.ts @@ -1,11 +1,10 @@ export enum Demarches { - caf = 'accompagnantCaf', - carsat = 'carsat', - cpam = 'cpam', - epn = 'espacePublicNumeriqueepn', - impots = 'impots', - logements = 'logement', - gd_lyon = 'Grand lyon', - pole_emploi = 'poleEmploi', - other = 'autres', + accompagnantCaf = 'Caf', + carsat = 'Carsat', + cpam = 'Cpam', + espacePublicNumeriqueepn = 'Espace public Numérique (EPN)', + impots = 'Impôts', + logement = 'Logements', + poleEmploi = 'Pôle Emploi', + autres = 'Autres', } diff --git a/src/app/shared/enum/equipmentAccess.enum.ts b/src/app/shared/enum/equipmentAccess.enum.ts new file mode 100644 index 0000000000000000000000000000000000000000..f46bf39106272a6cd18c7121fb103d1c036c5dc1 --- /dev/null +++ b/src/app/shared/enum/equipmentAccess.enum.ts @@ -0,0 +1,4 @@ +export enum EquipmentAccess { + freeAccess = 'En accès libre', + supportAccess = 'En accès accompagné', +} diff --git a/src/app/shared/enum/fonctionContact.enum.ts b/src/app/shared/enum/fonctionContact.enum.ts new file mode 100644 index 0000000000000000000000000000000000000000..77aaf2abb39028a00b4cce8e96aa9f932a3a7fb6 --- /dev/null +++ b/src/app/shared/enum/fonctionContact.enum.ts @@ -0,0 +1,7 @@ +export enum FonctionContactEnum { + volunteer = 'Bénévole', + digitalMediator = 'Médiateur numérique', + president = "Président de l'association", + director = 'Directeur', + other = 'Autres', +} diff --git a/src/app/shared/enum/labels.emum.ts b/src/app/shared/enum/labels.emum.ts index 00a7661102e05272132a12c19a1f338725c5e5f2..c8a2030d5e221f737b19f1654c321596f92c2c60 100644 --- a/src/app/shared/enum/labels.emum.ts +++ b/src/app/shared/enum/labels.emum.ts @@ -1,6 +1,6 @@ export enum Labels { - pass_numerique = 'passNumerique', - maison_france_service = 'maisonFranceService', - aidants_connect = 'aidantsConnect', - territoire = 'fabriqueDeTerritoire', + passNumerique = 'Pass numérique', + maisonFranceService = 'Maison france service', + aidantsConnect = 'Aidants connect', + fabriqueDeTerritoire = 'Fabrique de territoire', } diff --git a/src/app/shared/enum/typeStructure.enum.ts b/src/app/shared/enum/typeStructure.enum.ts new file mode 100644 index 0000000000000000000000000000000000000000..e21c7cb40812286b8a490a5cad92bfbf74aad12c --- /dev/null +++ b/src/app/shared/enum/typeStructure.enum.ts @@ -0,0 +1,19 @@ +export enum typeStructureEnum { + associationCaritative = 'Association caritative', + centreSocio = 'Centre socio-culturel', + cyber = 'Cyberbase / Cybercentre', + coworking = 'Espace de coworking', + fablab = 'Fablab', + grandOrganismePublic = 'Grand organisme public (CAF, CARSAT, Pôle emploi...)', + mairie = 'Mairie', + mdm = 'Maison de la Métropole (MDM)', + mediatheque = 'Médiathèque / Bibliothèque', + missionsLocales = 'Missions locales', + mjc = 'MJC', + pimms = 'Pimms', + ressourcerie = 'Ressourcerie (matériel moindre coût / recyclé)', + associationQuartier = 'Structure associative de quartier', + formation = 'Structure de formation', + insertion = "Structure d'insertion", + sij = 'Structure information jeunesse (SIJ)', +} diff --git a/src/app/shared/enum/weekDay.enum.ts b/src/app/shared/enum/weekDay.enum.ts new file mode 100644 index 0000000000000000000000000000000000000000..6935e53dbeaf5ec32e04d463c00848107ffe6a34 --- /dev/null +++ b/src/app/shared/enum/weekDay.enum.ts @@ -0,0 +1,9 @@ +export enum WeekDayEnum { + monday = 'lundi', + tuesday = 'mardi', + wednesday = 'mercredi', + thursday = 'jeudi', + friday = 'vendredi', + saturday = 'samedi', + sunday = 'dimanche', +} diff --git a/src/app/structure-list/components/card/card.component.html b/src/app/structure-list/components/card/card.component.html index d3e08f7aae28886324dbc9c729ac5238c197efa5..8bdf90e4eb8bfa75f6fe5f981c940db8c55e56d1 100644 --- a/src/app/structure-list/components/card/card.component.html +++ b/src/app/structure-list/components/card/card.component.html @@ -1,6 +1,6 @@ <div class="structure" fxLayout="column" (click)="cardClicked()" (mouseover)="cardHover()"> <div class="headerStructure" fxLayout="row" fxLayoutAlign="space-between center" fxLayoutGap="16px"> - <span class="nomStructure">{{ structure.nomDeVotreStructure }}</span> + <span class="nomStructure">{{ structure.structureName }}</span> <div *ngIf="structure.distance" class="distanceStructure" @@ -16,7 +16,7 @@ </div> </div> </div> - <span class="typeStructure">{{ structure.typeDeStructure }}</span> + <span class="typeStructure">{{ getLabelTypeStructure(structure.structureType) }}</span> <br /> <app-structure-opening-status [structure]="structure"></app-structure-opening-status> </div> diff --git a/src/app/structure-list/components/card/card.component.scss b/src/app/structure-list/components/card/card.component.scss index c67da08bcb55bef292a9b4c3f4757cc02c2db4cf..4d3d5aa0448d62179a1804d3c6174e14136face8 100644 --- a/src/app/structure-list/components/card/card.component.scss +++ b/src/app/structure-list/components/card/card.component.scss @@ -24,7 +24,7 @@ border-bottom: 1px dashed $grey !important; cursor: pointer; .typeStructure { - color: $grey; + color: $grey-3; @include cn-regular-16; } .nomStructure { diff --git a/src/app/structure-list/components/card/card.component.spec.ts b/src/app/structure-list/components/card/card.component.spec.ts index afcb110c06f6a09854b375d276e040855e4a6630..37156feec2e79471944a97882e17adfbeceaec3f 100644 --- a/src/app/structure-list/components/card/card.component.spec.ts +++ b/src/app/structure-list/components/card/card.component.spec.ts @@ -22,36 +22,34 @@ describe('CardComponent', () => { structure = new Structure({ id: 1, numero: '26-63', - dateDeCreation: '2020-10-08T15:17:00.000Z', - derniereModification: '2020-10-08T15:17:00.000Z', + updatedAt: '2020-10-08T15:17:00.000Z', nomDeLusager: 'Erwan Le luron', - votreStructureEstElle: 'Un établissement principal (siège social)', - nomDeVotreStructure: 'Régie de Quartier Armstrong', - typeDeStructure: 'Tiers-lieu & coworking, FabLab', + structureRepresentation: 'Un établissement principal (siège social)', + structureName: 'Régie de Quartier Armstrong', + structureType: 'Tiers-lieu & coworking, FabLab', description: "Association loi 1901 dont l'objet est l'insertion par l'économie social et solidaire", n: 2, - voie: 21356, - telephone: '04 72 21 03 07', - courriel: 'sguillet@rqa.fr', - siteWeb: '', + adressWay: 21356, + contactPhone: '04 72 21 03 07', + contactMail: 'sguillet@rqa.fr', + website: '', facebook: '', twitter: '@rqainfo69', instagram: '', - civilite: 'Madame', - nom: 'GUILLET', - prenom: 'Séverine', + gender: 'Madame', + contactName: 'GUILLET', + contactSurname: 'Séverine', fonction: 'Autres', - accessibilitePersonnesAMobiliteReduitePmr: '', + pmrAccess: '', choixMultiples: 'Tout public', - fermeturesExceptionnelles: '', - jaccompagneLesUsagersDansLeursDemarchesEnLigne: 'True', - accompagnementDesDemarches: 'Accompagnant CAF', + exceptionalClosures: '', + proceduresAccompaniment: 'Accompagnant CAF', autresAccompagnements: '', - lesCompetencesDeBase: 260, - accesAuxDroits: 176, - insertionSocialeEtProfessionnelle: 254, - aideALaParentalite: '', - cultureEtSecuriteNumerique: 264, + baseSkills: 260, + accessRight: 176, + socialAndProfessional: 254, + parentingHelp: '', + digitalCultureSecurity: 264, wifiEnAccesLibre: 'True', nbComputers: '', nombre: '', diff --git a/src/app/structure-list/components/card/card.component.ts b/src/app/structure-list/components/card/card.component.ts index 6af5fbd47a47ef2b3fa39d769bdfb545e87e0eff..ade585e5d8d4753dfb28d46ac6c6b0e15bcddb59 100644 --- a/src/app/structure-list/components/card/card.component.ts +++ b/src/app/structure-list/components/card/card.component.ts @@ -1,6 +1,8 @@ import { Component, Input, Output, OnInit, EventEmitter } from '@angular/core'; import { Structure } from '../../../models/structure.model'; import { GeojsonService } from '../../../services/geojson.service'; +import { typeStructureEnum } from '../../../shared/enum/typeStructure.enum'; + @Component({ selector: 'app-card', templateUrl: './card.component.html', @@ -29,6 +31,16 @@ export class CardComponent implements OnInit { this.showDetails.emit(this.structure); } + public getLabelTypeStructure(typeStructure: string[]): string { + let label = ''; + typeStructure.forEach((type) => { + if (label) { + label += ', '; + } + label += typeStructureEnum[type]; + }); + return label; + } public cardHover(): void { this.hover.emit(this.structure); } diff --git a/src/app/structure-list/components/modal-filter/modal-filter.component.html b/src/app/structure-list/components/modal-filter/modal-filter.component.html index fe0b096e2c42f7e6d8b3f586362b23f1e861b748..fded0262501356c495114186e2b3c2f3b0a27018 100644 --- a/src/app/structure-list/components/modal-filter/modal-filter.component.html +++ b/src/app/structure-list/components/modal-filter/modal-filter.component.html @@ -15,9 +15,9 @@ <label> <input type="checkbox" - [checked]="searchService.getIndex(checkedModules, module.id, c.name) > -1" + [checked]="searchService.getIndex(checkedModules, module.id, c.id) > -1" [value]="module.id" - (change)="onCheckboxChange($event, c.name)" + (change)="onCheckboxChange($event, c.id)" /> <span class="customCheck"></span> <div class="label">{{ module.text }}</div> diff --git a/src/app/structure-list/components/modal-filter/modal-filter.component.ts b/src/app/structure-list/components/modal-filter/modal-filter.component.ts index 0cb812448388d84dd827703014b6b1f1625f77a9..a7df06d0544ba88a61c959686408beebab205075 100644 --- a/src/app/structure-list/components/modal-filter/modal-filter.component.ts +++ b/src/app/structure-list/components/modal-filter/modal-filter.component.ts @@ -1,5 +1,4 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { FormBuilder, FormGroup } from '@angular/forms'; import { TypeModal } from '../../enum/typeModal.enum'; import { Category } from '../../models/category.model'; import { Module } from '../../models/module.model'; @@ -11,11 +10,7 @@ import { SearchService } from '../../services/search.service'; styleUrls: ['./modal-filter.component.scss'], }) export class ModalFilterComponent implements OnInit { - constructor(private fb: FormBuilder, public searchService: SearchService) { - this.searchForm = this.fb.group({ - searchTerm: '', - }); - } + constructor(public searchService: SearchService) {} @Input() public modalType: TypeModal; @Input() public categories: Category[]; @Input() public modules: Module[] = []; @@ -23,8 +18,6 @@ export class ModalFilterComponent implements OnInit { @Output() closeEvent = new EventEmitter(); // Checkbox variable public checkedModules: Module[] = []; - // Form search input - private searchForm: FormGroup; ngOnInit(): void { // Manage checkbox this.checkedModules = this.modules.slice(); @@ -36,7 +29,7 @@ export class ModalFilterComponent implements OnInit { if (event.target.checked) { this.checkedModules.push(new Module(checkValue, categ)); } else { - // Check if the unchecked module is present in the list and remove it + // Check if the module is present in the list and remove it if (this.searchService.getIndex(this.checkedModules, checkValue, categ) > -1) { this.checkedModules.splice(this.searchService.getIndex(this.checkedModules, checkValue, categ), 1); } @@ -46,12 +39,9 @@ export class ModalFilterComponent implements OnInit { public clearFilters(): void { this.categories.forEach((categ: Category) => { categ.modules.forEach((module: Module) => { - const index = this.searchService.getIndex(this.checkedModules, module.id, categ.name); - const indexSpecial = this.searchService.getIndex(this.checkedModules, 'True', module.id); + const index = this.searchService.getIndex(this.checkedModules, module.id, categ.id); if (index > -1) { this.checkedModules.splice(index, 1); - } else if (indexSpecial > -1) { - this.checkedModules.splice(indexSpecial, 1); } }); }); diff --git a/src/app/structure-list/components/search/search.component.html b/src/app/structure-list/components/search/search.component.html index 8043a3348a14ee421d26bf029a9ec686b0dc32c6..53f03986dcb07cbeab37b58953e6ed84634a38bd 100644 --- a/src/app/structure-list/components/search/search.component.html +++ b/src/app/structure-list/components/search/search.component.html @@ -98,8 +98,8 @@ <input type="checkbox" value="passNumerique" - [checked]="searchService.getIndex(checkedModulesFilter, 'passNumerique', 'Labels et qualifications') > -1" - (change)="numericPassCheck($event, 'Labels et qualifications')" + [checked]="searchService.getIndex(checkedModulesFilter, 'passNumerique', 'labelsQualifications') > -1" + (change)="numericPassCheck($event, 'labelsQualifications')" /> <span class="customCheck"></span> <div class="label">Pass numérique</div> diff --git a/src/app/structure-list/components/search/search.component.ts b/src/app/structure-list/components/search/search.component.ts index 5d3aa934eea5271b3ef0d71fc8605214d30fb746..d54028a50845dbe74dc8431d7e48c2c49d023d7c 100644 --- a/src/app/structure-list/components/search/search.component.ts +++ b/src/app/structure-list/components/search/search.component.ts @@ -68,17 +68,12 @@ export class SearchComponent implements OnInit { } // Add checked box filter this.checkedModulesFilter.forEach((cm) => { - filters.push(new Filter(this.fromStringToId(cm.text), this.mockApiNumber(cm.id))); + filters.push(new Filter(cm.text, cm.id)); }); // Send filters this.searchEvent.emit(filters); } - // Delete when getting back-end - private mockApiNumber(nb: string): string { - return nb.length < 3 ? ('00' + nb).slice(-3) : nb; - } - public fetchResults(checkedModules: Module[]): void { const inputTerm = this.searchForm.get('searchTerm').value; // Check if some modules is checked in filters @@ -131,7 +126,7 @@ export class SearchComponent implements OnInit { this.closeModal(); } else if (this.modalTypeOpened !== modalType) { this.modalTypeOpened = modalType; - this.fakeData(modalType); + this.getData(modalType); } } @@ -139,18 +134,6 @@ export class SearchComponent implements OnInit { this.modalTypeOpened = undefined; } - private fromStringToId(categ: string): string { - const splitStr = categ.toLowerCase().split(' '); - for (let i = 1; i < splitStr.length; i++) { - splitStr[i] = splitStr[i].charAt(0).toUpperCase() + splitStr[i].substring(1); - } - return splitStr - .join('') - .normalize('NFD') - .replace(/[\u0300-\u036f'’°()]/g, '') - .replace(/[\s-]/g, ' ') - .replace('?', ''); - } // Get adress and put it in input public locateMe(): void { navigator.geolocation.getCurrentPosition((position) => { @@ -171,7 +154,7 @@ export class SearchComponent implements OnInit { this.checkedModulesFilter.push(new Module(checkValue, categ)); this.numberMoreFiltersChecked++; } else { - // Check if the unchecked module is present in the list and remove it + // Check if the module is present in the list and remove it const index = this.checkedModulesFilter.findIndex((m: Module) => m.id === checkValue && m.text === categ); if (index > -1) { this.checkedModulesFilter.splice(index, 1); @@ -185,7 +168,7 @@ export class SearchComponent implements OnInit { } // Get the correct list of checkbox/modules depending on the type of modal. - private fakeData(option: TypeModal): void { + private getData(option: TypeModal): void { if (option === TypeModal.accompaniment) { forkJoin([this.searchService.getCategoriesAccompaniment(), this.searchService.getFakeCounterModule()]).subscribe( (res) => { diff --git a/src/app/structure-list/components/structure-details/structure-details.component.html b/src/app/structure-list/components/structure-details/structure-details.component.html index b21461bce3911e459bc5f20c092de5df123c2b54..e188b4dc7946f92c58fe9e1346164aa24f59e839 100644 --- a/src/app/structure-list/components/structure-details/structure-details.component.html +++ b/src/app/structure-list/components/structure-details/structure-details.component.html @@ -1,3 +1,9 @@ +<app-structureForm + *ngIf="showForm" + [idStructure]="structure.id" + (closeEvent)="updateStructure($event)" + (clickOutside)="displayForm()" +></app-structureForm> <div class="structrue-details-container" *ngIf="structure"> <!-- Header info --> <div fxLayout="row" fxLayoutAlign="end center"> @@ -7,8 +13,8 @@ <div fxLayout="column" fxLayoutGap="10px" fxFlex="100%"> <div fxLayout="row" fxLayoutAlign="space-between start"> <div fxLayout="column"> - <h2 class="bold">{{ structure.nomDeVotreStructure }}</h2> - <h3>{{ structure.typeDeStructure }}</h3> + <h2 class="bold">{{ structure.structureName }}</h2> + <h3>{{ getLabelTypeStructure(structure.structureType) }}</h3> </div> <div class="printButton" fxLayout="column" fxLayoutAlign="end"> <app-button @@ -30,32 +36,32 @@ [isCalledByDetails]="true" ></app-structure-opening-status> </div> - <div *ngIf="structure.voie" fxLayout="row" fxLayoutAlign="none flex-end" fxLayoutGap="13px"> + <div *ngIf="structure.adressWay" fxLayout="row" fxLayoutAlign="none flex-end" fxLayoutGap="13px"> <app-svg-icon [type]="'ico'" [icon]="'adress'"></app-svg-icon> - <p>{{ structure.n }} {{ structure.address }}</p> + <p>{{ structure.adressNumero }} {{ structure.address }}</p> </div> - <div *ngIf="structure.siteWeb" fxLayout="row" fxLayoutAlign="none flex-end" fxLayoutGap="13px"> + <div *ngIf="structure.website" fxLayout="row" fxLayoutAlign="none flex-end" fxLayoutGap="13px"> <app-svg-icon [type]="'ico'" [icon]="'web'"></app-svg-icon> <a target="_blank" rel="noopener noreferrer" - [href]="structure.siteWeb.includes('http') ? structure.siteWeb : 'http://' + structure.siteWeb" - >{{ structure.siteWeb | url }}</a + [href]="structure.website.includes('http') ? structure.website : 'http://' + structure.website" + >{{ structure.website | url }}</a > </div> - <div *ngIf="structure.telephone" fxLayout="row" fxLayoutAlign="none flex-end" fxLayoutGap="13px"> + <div *ngIf="structure.contactPhone" fxLayout="row" fxLayoutAlign="none flex-end" fxLayoutGap="13px"> <app-svg-icon [type]="'ico'" [icon]="'tel'"></app-svg-icon> - <p>{{ structure.telephone | phone }}</p> + <p>{{ structure.contactPhone | phone }}</p> </div> </div> <div fxLayout="column" fxFlex="50%"> - <div *ngIf="structure.courriel" fxLayout="row" fxLayoutAlign="none flex-end" fxLayoutGap="13px"> + <div *ngIf="structure.contactMail" fxLayout="row" fxLayoutAlign="none flex-end" fxLayoutGap="13px"> <app-svg-icon [type]="'ico'" [icon]="'email'"></app-svg-icon> - <a [href]="'mailto:' + structure.courriel">{{ structure.courriel }}</a> + <a [href]="'mailto:' + structure.contactMail">{{ structure.contactMail }}</a> </div> <div fxLayout="row" fxLayoutAlign="none flex-end" fxLayoutGap="13px"> <app-svg-icon [type]="'ico'" [icon]="'calendar'"></app-svg-icon> - <p>Mise à jour le {{ structure.derniereModification | date: 'mediumDate' }}</p> + <p>Mise à jour le {{ structure.updatedAt | date: 'mediumDate' }}</p> </div> </div> </div> @@ -63,7 +69,7 @@ </div> <!-- Démarches --> <div - *ngIf="structure.accompagnementDesDemarches[0] !== ''" + *ngIf="structure.proceduresAccompaniment.length" fxLayout="column" class="structure-details-block" fxLayoutAlign="baseline baseline" @@ -75,8 +81,8 @@ </div> <div fxLayout="column"> <div fxLayout="row wrap" fxLayoutGap="24px"> - <div *ngFor="let accompagnement of structure.accompagnementDesDemarches"> - <app-logo-card [name]="accompagnement"></app-logo-card> + <div *ngFor="let accompagnement of structure.proceduresAccompaniment"> + <app-logo-card *ngIf="accompagnement != 'autres'" [name]="accompagnement"></app-logo-card> </div> </div> <p *ngIf="isOtherSection"> @@ -135,11 +141,11 @@ </div> </div> </div> - <!-- modalitesDacces --> + <!-- accessModality --> <div fxFlex="50%"> <h3 class="subtitle">Accès</h3> <div - *ngFor="let acces of structure.modalitesDacces" + *ngFor="let acces of structure.accessModality" fxLayout="row" fxLayoutAlign="none flex-end" fxLayoutGap="20px" @@ -165,18 +171,21 @@ fxLayout="row" fxLayoutAlign="none flex-end" fxLayoutGap="13px" - *ngFor="let equipement of structure.equipementsEtServicesProposes" + *ngFor="let equipement of structure.equipmentsAndServices" > <app-svg-icon [type]="'ico'" [icon]="getEquipmentsIcon(equipement)"></app-svg-icon> <p> {{ getEquipmentsLabel(equipement) }} - <span *ngIf="equipement == 'ordinateurs'; else otherEquipments"> : {{ structure.nbComputers }}</span> + <span *ngIf="equipement == 'ordinateurs'"> : {{ structure.nbComputers }}</span> + <span *ngIf="equipement == 'tablettes'"> : {{ structure.nbTablets }}</span> + <span *ngIf="equipement == 'bornesNumeriques'"> : {{ structure.nbNumericTerminal }}</span> + <span *ngIf="equipement == 'imprimantes'"> : {{ structure.nbPrinters }}</span> </p> </div> </div> <!-- Labels --> <div - *ngIf="structure.labelsEtQualifications[0] !== ''" + *ngIf="structure.labelsQualifications.length" fxLayout="column" class="structure-details-block" fxLayoutAlign="baseline baseline" @@ -187,7 +196,7 @@ <h2>Labelisation</h2> </div> <div fxLayout="row wrap" fxLayoutGap="24px"> - <div *ngFor="let labels of structure.labelsEtQualifications"> + <div *ngFor="let labels of structure.labelsQualifications"> <app-logo-card [name]="labels"></app-logo-card> </div> </div> diff --git a/src/app/structure-list/components/structure-details/structure-details.component.spec.ts b/src/app/structure-list/components/structure-details/structure-details.component.spec.ts index 0b7a461151dfc972c2245ea0dd5ee8f6a72c0fd8..6254b606ee48ec0d66260bf7ff820e3020cae453 100644 --- a/src/app/structure-list/components/structure-details/structure-details.component.spec.ts +++ b/src/app/structure-list/components/structure-details/structure-details.component.spec.ts @@ -22,7 +22,7 @@ describe('StructureDetailsComponent', () => { component = fixture.componentInstance; fixture.detectChanges(); let structure: Structure = new Structure(); - structure.lesCompetencesDeBase = ['123', '234', '817']; + structure.baseSkills = ['123', '234', '817']; component.structure = structure; }); @@ -65,8 +65,8 @@ describe('StructureDetailsComponent', () => { accessRightsReferentiel.name = 'categ1'; accessRightsReferentiel.modules = arrayModule; component.accessRightsReferentiel = accessRightsReferentiel; - component.structure.lesCompetencesDeBase = ['260', '261']; - component.structure.accesAuxDroits = ['145', '112']; + component.structure.baseSkills = ['260', '261']; + component.structure.accessRight = ['145', '112']; component.setServiceCategories(); expect(component.baseSkills).toEqual([m1, m3]); expect(component.accessRights).toEqual([mo2, mo3]); diff --git a/src/app/structure-list/components/structure-details/structure-details.component.ts b/src/app/structure-list/components/structure-details/structure-details.component.ts index cd0f92dc1654d77b7f10b61277d6883fce0b58d4..45a82e9562fbe192d0de5b31afb36931bdb0cbb1 100644 --- a/src/app/structure-list/components/structure-details/structure-details.component.ts +++ b/src/app/structure-list/components/structure-details/structure-details.component.ts @@ -8,6 +8,7 @@ import * as _ from 'lodash'; import { ActivatedRoute } from '@angular/router'; import { PrintService } from '../../../shared/service/print.service'; import { Equipment } from '../../enum/equipment.enum'; +import { typeStructureEnum } from '../../../shared/enum/typeStructure.enum'; @Component({ selector: 'app-structure-details', templateUrl: './structure-details.component.html', @@ -16,6 +17,7 @@ import { Equipment } from '../../enum/equipment.enum'; export class StructureDetailsComponent implements OnInit { @Input() public structure: Structure; @Output() public closeDetails: EventEmitter<boolean> = new EventEmitter<boolean>(); + @Output() public updatedStructure: EventEmitter<Structure> = new EventEmitter<Structure>(); public accessModality = AccessModality; public baseSkillssReferentiel: Category; @@ -24,6 +26,7 @@ export class StructureDetailsComponent implements OnInit { public accessRights: Module[]; public printMode = false; public isOtherSection = false; + public showForm = false; constructor(route: ActivatedRoute, private printService: PrintService, private searchService: SearchService) { route.url.subscribe((url) => { @@ -48,13 +51,24 @@ export class StructureDetailsComponent implements OnInit { this.printService.onDataReady(); } }); - const index = this.structure.accompagnementDesDemarches.indexOf('autres'); + const index = this.structure.proceduresAccompaniment.indexOf('autres'); if (index > -1) { - this.structure.accompagnementDesDemarches.splice(index, 1); + this.structure.proceduresAccompaniment.splice(index, 1); this.isOtherSection = true; } } + public getLabelTypeStructure(typeStructure: string[]): string { + let label = ''; + typeStructure.forEach((type) => { + if (label) { + label += ', '; + } + label += typeStructureEnum[type]; + }); + return label; + } + public getEquipmentsIcon(equipment: Equipment): string { switch (equipment) { case Equipment.wifi: @@ -97,6 +111,16 @@ export class StructureDetailsComponent implements OnInit { this.printService.printDocument('structure', this.structure); } + // Show/hide editForm structure + public displayForm(): void { + this.showForm = !this.showForm; + } + + public updateStructure(s: Structure): void { + this.structure = new Structure({ ...this.structure, ...s }); + this.displayForm(); + this.updatedStructure.emit(this.structure); + } public getAccessIcon(accessModality: AccessModality): string { switch (accessModality) { case AccessModality.free: @@ -128,10 +152,10 @@ export class StructureDetailsComponent implements OnInit { } public setServiceCategories(): void { - this.baseSkills = this.structure.lesCompetencesDeBase.map((skill) => + this.baseSkills = this.structure.baseSkills.map((skill) => _.find(this.baseSkillssReferentiel.modules, { id: skill }) ); - this.accessRights = this.structure.accesAuxDroits.map((rights) => + this.accessRights = this.structure.accessRight.map((rights) => _.find(this.accessRightsReferentiel.modules, { id: rights }) ); } diff --git a/src/app/structure-list/enum/access-modality.enum.ts b/src/app/structure-list/enum/access-modality.enum.ts index 41eacfdadfd824cbf8fde4297540d5cb019abc6b..81c7f7edd2811afdaa458731d89af3532bf1d7e2 100644 --- a/src/app/structure-list/enum/access-modality.enum.ts +++ b/src/app/structure-list/enum/access-modality.enum.ts @@ -2,5 +2,5 @@ export enum AccessModality { free = 'accesLibre', numeric = 'telephoneVisio', meetingOnly = 'uniquementSurRdv', - meeting = 'Sur RDV', + meeting = 'surRdv', } diff --git a/src/app/structure-list/models/category.model.ts b/src/app/structure-list/models/category.model.ts index 473e6e5d0ce523d25635a214749fd267e59c745d..e08e40a1507b5a5eda8de1b98503271759509df8 100644 --- a/src/app/structure-list/models/category.model.ts +++ b/src/app/structure-list/models/category.model.ts @@ -2,6 +2,7 @@ import { Module } from './module.model'; export class Category { name: string; + id: string; modules: Module[]; constructor(obj?: any) { diff --git a/src/app/structure-list/structure-list.component.html b/src/app/structure-list/structure-list.component.html index e70e20bda6e669bd60d07c2ea3034b627d8f2810..c865301ea7e2f5222b5ba7a431cc8f1b50ac7489 100644 --- a/src/app/structure-list/structure-list.component.html +++ b/src/app/structure-list/structure-list.component.html @@ -18,4 +18,5 @@ *ngIf="showStructureDetails" [structure]="structure" (closeDetails)="closeDetails()" + (updatedStructure)="emitUpdatedStructure($event)" ></app-structure-details> diff --git a/src/app/structure-list/structure-list.component.spec.ts b/src/app/structure-list/structure-list.component.spec.ts index 86f83cd7549aef89f9815a859567ed73a9dc7747..45ed7ac0e857548b415c9c2c16f90842b6ac47dc 100644 --- a/src/app/structure-list/structure-list.component.spec.ts +++ b/src/app/structure-list/structure-list.component.spec.ts @@ -21,36 +21,34 @@ describe('StructureListComponent', () => { structure = new Structure({ id: 1, numero: '26-63', - dateDeCreation: '2020-10-08T15:17:00.000Z', - derniereModification: '2020-10-08T15:17:00.000Z', + updatedAt: '2020-10-08T15:17:00.000Z', nomDeLusager: 'Erwan Le luron', - votreStructureEstElle: 'Un établissement principal (siège social)', - nomDeVotreStructure: 'Régie de Quartier Armstrong', - typeDeStructure: 'Tiers-lieu & coworking, FabLab', + structureRepresentation: 'Un établissement principal (siège social)', + structureName: 'Régie de Quartier Armstrong', + structureType: 'Tiers-lieu & coworking, FabLab', description: "Association loi 1901 dont l'objet est l'insertion par l'économie social et solidaire", n: 2, - voie: 21356, - telephone: '04 72 21 03 07', - courriel: 'sguillet@rqa.fr', - siteWeb: '', + adressWay: 21356, + contactPhone: '04 72 21 03 07', + contactMail: 'sguillet@rqa.fr', + website: '', facebook: '', twitter: '@rqainfo69', instagram: '', - civilite: 'Madame', - nom: 'GUILLET', - prenom: 'Séverine', + gender: 'Madame', + contactName: 'GUILLET', + contactSurname: 'Séverine', fonction: 'Autres', - accessibilitePersonnesAMobiliteReduitePmr: '', + pmrAccess: '', choixMultiples: 'Tout public', - fermeturesExceptionnelles: '', - jaccompagneLesUsagersDansLeursDemarchesEnLigne: 'True', - accompagnementDesDemarches: 'Accompagnant CAF', + exceptionalClosures: '', + proceduresAccompaniment: 'Accompagnant CAF', autresAccompagnements: '', - lesCompetencesDeBase: 260, - accesAuxDroits: 176, - insertionSocialeEtProfessionnelle: 254, - aideALaParentalite: '', - cultureEtSecuriteNumerique: 264, + baseSkills: 260, + accessRight: 176, + socialAndProfessional: 254, + parentingHelp: '', + digitalCultureSecurity: 264, wifiEnAccesLibre: 'True', nbComputers: '', nombre: '', diff --git a/src/app/structure-list/structure-list.component.ts b/src/app/structure-list/structure-list.component.ts index fedd27acfa4334b060e851cd845ac01683c21052..2eeaab116a0eff0ba035c18cee94c7efb5efcf3e 100644 --- a/src/app/structure-list/structure-list.component.ts +++ b/src/app/structure-list/structure-list.component.ts @@ -17,6 +17,8 @@ export class StructureListComponent implements OnChanges { @Output() public displayMapMarkerId: EventEmitter<Array<number>> = new EventEmitter<Array<number>>(); @Output() public hoverOut: EventEmitter<Array<number>> = new EventEmitter<Array<number>>(); @Output() public selectedMarkerId: EventEmitter<number> = new EventEmitter<number>(); + @Output() public updatedStructure: EventEmitter<Structure> = new EventEmitter<Structure>(); + public showStructureDetails = false; public structure: Structure; public structuresListChunked: Structure[]; @@ -31,14 +33,7 @@ export class StructureListComponent implements OnChanges { this.showDetails(this.selectedStructure); } if (changes.structureList) { - this.arrayChunked = []; - this.pageStructures = 0; - if (this.pageStructures == 0) { - for (let i = 0; i < this.structureList.length; i += this.chunck) { - this.arrayChunked.push(this.structureList.slice(i, i + this.chunck)); - } - } - this.structuresListChunked = this.arrayChunked[0]; + this.structuresListChunked = this.chunckAnArray(this.structureList); } } public fetchResults(filters: Filter[]): void { @@ -63,6 +58,19 @@ export class StructureListComponent implements OnChanges { this.displayMapMarkerId.emit([undefined]); } + public emitUpdatedStructure(s: Structure): void { + this.updatedStructure.emit(s); + } + + private chunckAnArray(structures: Structure[]): Structure[] { + this.arrayChunked = []; + this.pageStructures = 0; + for (let i = 0; i < structures.length; i += this.chunck) { + this.arrayChunked.push(structures.slice(i, i + this.chunck)); + } + return this.arrayChunked[0]; + } + public onScrollDown(event): void { if (event.target.offsetHeight + event.target.scrollTop >= event.target.scrollHeight - 50) { this.loadMoreStructures(); diff --git a/src/assets/logos/caf.svg b/src/assets/logos/accompagnantCaf.svg similarity index 100% rename from src/assets/logos/caf.svg rename to src/assets/logos/accompagnantCaf.svg diff --git a/src/assets/logos/aidants.svg b/src/assets/logos/aidantsConnect.svg similarity index 100% rename from src/assets/logos/aidants.svg rename to src/assets/logos/aidantsConnect.svg diff --git a/src/assets/logos/epn.svg b/src/assets/logos/espacePublicNumeriqueepn.svg similarity index 100% rename from src/assets/logos/epn.svg rename to src/assets/logos/espacePublicNumeriqueepn.svg diff --git a/src/assets/logos/territoire.svg b/src/assets/logos/fabriqueDeTerritoire.svg similarity index 100% rename from src/assets/logos/territoire.svg rename to src/assets/logos/fabriqueDeTerritoire.svg diff --git a/src/assets/logos/franceservices.svg b/src/assets/logos/maisonFranceService.svg similarity index 100% rename from src/assets/logos/franceservices.svg rename to src/assets/logos/maisonFranceService.svg diff --git a/src/assets/logos/pass.svg b/src/assets/logos/passNumerique.svg similarity index 100% rename from src/assets/logos/pass.svg rename to src/assets/logos/passNumerique.svg diff --git a/src/assets/logos/pole.svg b/src/assets/logos/poleEmploi.svg similarity index 100% rename from src/assets/logos/pole.svg rename to src/assets/logos/poleEmploi.svg