From 9e5705f9d03ac541f71d32cd1e312a18f0dce4c3 Mon Sep 17 00:00:00 2001
From: Pierre-Jean CHANCELLIER <paidge_cs@hotmail.com>
Date: Thu, 20 Jan 2022 14:07:42 +0100
Subject: [PATCH] =?UTF-8?q?tri=20alphab=C3=A9tique=20des=20param=C3=A8tres?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 i18n/locales/fr.json | 2 +-
 pages/parametres.vue | 9 ++++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/i18n/locales/fr.json b/i18n/locales/fr.json
index 97e90a0..c0405a0 100644
--- a/i18n/locales/fr.json
+++ b/i18n/locales/fr.json
@@ -51,7 +51,7 @@
             "sigStock": "Nombre de certifications actives maximum envoyées par membre",
             "sigValidity": "Âge maximum d'une certification active",
             "sigWindow": "Délai maximal qu'une certification peut attendre avant d'être rejetée pour non-écriture",
-            "stepMax": "Distance maximale entre un membre de la Toile de Confiance et <code>xpercent</code>% des membres référents",
+            "stepMax": "Distance maximale entre un membre de la Toile de Confiance et <code>xpercent</code> des membres référents",
             "txWindow": "Délai maximum qu'une transaction peut attendre avant d'être rejetée pour non-écriture",
             "ud0": "DU(0), soit le montant du DU initial",
             "udReevalTime0": "Heure de la première réévaluation du DU",
diff --git a/pages/parametres.vue b/pages/parametres.vue
index a493929..444f71d 100644
--- a/pages/parametres.vue
+++ b/pages/parametres.vue
@@ -19,7 +19,7 @@
             <th scope="row">{{ param.name }}</th>
             <td scope="row" class="d-none d-sm-table-cell">{{ param.par_type }}</td>
             <td scope="row">{{ param.value }}</td>
-            <td scope="row" class="d-none d-md-table-cell">{{ $t('params.name.' + param.name) }}</td>
+            <td scope="row" class="d-none d-md-table-cell" v-html="$t('params.name.' + param.name)"></td>
           </tr>
         </tbody>
       </table>
@@ -50,6 +50,13 @@ export default {
   apollo: {
     allParameters : {
       query: PARAMS,
+      update (data) {
+        return data.allParameters.sort((a,b) => {
+          if (a.name < b.name) {return -1;}
+          if (a.name > b.name) {return 1;}
+          return 0;
+        })
+      },
       error (err) {this.error = err.message}
     }
   },
-- 
GitLab