From be2a948391cb3f7b185e3b2fdfed364f52d1c078 Mon Sep 17 00:00:00 2001
From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com>
Date: Wed, 22 Dec 2021 11:57:52 +0100
Subject: [PATCH 1/2] fix: opengraph rendering

---
 src/index.html | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/index.html b/src/index.html
index 0e9dd0d97..c9703dd35 100644
--- a/src/index.html
+++ b/src/index.html
@@ -13,7 +13,7 @@
       name="description"
       content="Retrouver tous les lieux de la médiation numérique de la métropole mais aussi les actualités, projets, ressources, études et appels à projet liès à l'inclusion numérique..."
     />
-    <meta name="image" content="https://resin.grandlyon.com/assets/logos/logo_1200.jpg" />
+    <meta name="image" content="https://resin.grandlyon.com/assets/logos/resin-logo-1024x512.png" />
     <meta name="viewport" content="width=device-width, initial-scale=1" />
 
     <!-- Open Graph general -->
@@ -22,10 +22,11 @@
       property="og:description"
       content="Retrouver tous les lieux de la médiation numérique de la métropole mais aussi les actualités, projets, ressources, études et appels à projet liès à l'inclusion numérique..."
     />
+    <meta property="og:type" content="website" />
     <meta property="og:image" content="https://resin.grandlyon.com/assets/logos/resin-logo-1024x512.png" />
-    <meta property="og:image:type" content="image/jpeg" />
-    <meta property="og:image:width" content="1200" />
-    <meta property="og:image:height" content="627" />
+    <meta property="og:image:type" content="image/png" />
+    <meta property="og:image:width" content="1024" />
+    <meta property="og:image:height" content="512" />
     <meta property="og:url" content="https://resin.grandlyon.com" />
 
     <!-- Twitter -->
-- 
GitLab


From 31544025c66ff49527ee253c6162d7d25483e7d4 Mon Sep 17 00:00:00 2001
From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com>
Date: Wed, 22 Dec 2021 11:58:20 +0100
Subject: [PATCH 2/2] feat(admin): add loader on admin structure

---
 .../admin-structures-list.component.html        |  9 +++++++--
 .../admin-structures-list.component.ts          | 17 +++++++++++------
 .../post-list/post-list.component.scss          |  9 ---------
 src/styles.scss                                 |  9 +++++++++
 4 files changed, 27 insertions(+), 17 deletions(-)

diff --git a/src/app/admin/components/structures-list/admin-structures-list.component.html b/src/app/admin/components/structures-list/admin-structures-list.component.html
index 6032db48b..aef303893 100644
--- a/src/app/admin/components/structures-list/admin-structures-list.component.html
+++ b/src/app/admin/components/structures-list/admin-structures-list.component.html
@@ -1,7 +1,12 @@
-<div fxLayout="column" fxLayoutAlign="center center">
+<div *ngIf="isLoading" class="loader">
+  <img class="loader-gif" src="/assets/gif/loader_circle.gif" alt />
+</div>
+<div *ngIf="!isLoading" fxLayout="column" fxLayoutAlign="center center">
   <table aria-describedby="demands attachment results" class="results-tab results-column">
     <thead>
-      <th scope="col">Structures avec des données manquantes ({{ structuresIncomplete?.length }})</th>
+      <th scope="col">
+        Structures avec des données manquantes ({{ structuresIncomplete ? structuresIncomplete.length : 0 }})
+      </th>
     </thead>
     <tbody>
       <tr *ngFor="let structure of structuresIncomplete">
diff --git a/src/app/admin/components/structures-list/admin-structures-list.component.ts b/src/app/admin/components/structures-list/admin-structures-list.component.ts
index 5652fd5b5..fe80c1047 100644
--- a/src/app/admin/components/structures-list/admin-structures-list.component.ts
+++ b/src/app/admin/components/structures-list/admin-structures-list.component.ts
@@ -1,4 +1,5 @@
 import { Component, OnInit } from '@angular/core';
+import { finalize } from 'rxjs/operators';
 import { StructureAdminInfo } from '../../models/demandAttachment.model';
 import { AdminService } from '../../services/admin.service';
 
@@ -13,14 +14,18 @@ export class AdminStructuresListComponent implements OnInit {
   public structuresClaimed: StructureAdminInfo[];
   public structuresIncomplete: StructureAdminInfo[];
   public isAll: boolean = false;
+  public isLoading: boolean = true;
   constructor(private adminService: AdminService) {}
 
   ngOnInit(): void {
-    this.adminService.getAllStructureAdmin().subscribe((structures) => {
-      this.structuresClaimed = structures.claimed;
-      this.structuresInClaim = structures.inClaim;
-      this.structuresToClaim = structures.toClaim;
-      this.structuresIncomplete = structures.incomplete;
-    });
+    this.adminService
+      .getAllStructureAdmin()
+      .pipe(finalize(() => (this.isLoading = false)))
+      .subscribe((structures) => {
+        this.structuresClaimed = structures.claimed;
+        this.structuresInClaim = structures.inClaim;
+        this.structuresToClaim = structures.toClaim;
+        this.structuresIncomplete = structures.incomplete;
+      });
   }
 }
diff --git a/src/app/post/components/post-list/post-list.component.scss b/src/app/post/components/post-list/post-list.component.scss
index a4b612844..43d3381e4 100644
--- a/src/app/post/components/post-list/post-list.component.scss
+++ b/src/app/post/components/post-list/post-list.component.scss
@@ -3,15 +3,6 @@
 @import '../../../../assets/scss/shapes';
 @import '../../../../assets/scss/breakpoint';
 
-.loader {
-  width: 100%;
-  text-align: center;
-  .loader-gif {
-    min-width: 10%;
-    min-height: 10%;
-  }
-}
-
 .section-container {
   background: $grey-6;
   min-height: 68vh;
diff --git a/src/styles.scss b/src/styles.scss
index 9f5d91e58..1e80fc9f4 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -266,6 +266,15 @@ button {
   @include background-hash($grey-2);
 }
 
+.loader {
+  width: 100%;
+  text-align: center;
+  .loader-gif {
+    min-width: 10%;
+    min-height: 10%;
+  }
+}
+
 .no-margin {
   margin: 0 !important;
 }
-- 
GitLab