From 0a3d4a3be0d81f5a64ea91de91040bd225524a20 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Agneray?= <francois.agneray@lam.fr>
Date: Wed, 3 Nov 2021 09:29:26 +0100
Subject: [PATCH] Fixed bug reload search_type svom_json_kw

---
 client/src/app/core/containers/app.component.html           | 2 +-
 .../src/app/instance/home/components/welcome.component.scss | 5 +++++
 .../components/datatable/datatable.component.html           | 6 +++---
 client/src/app/instance/store/models/criterion.model.ts     | 2 ++
 4 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/client/src/app/core/containers/app.component.html b/client/src/app/core/containers/app.component.html
index 50bf7c4d..f2a02fb4 100644
--- a/client/src/app/core/containers/app.component.html
+++ b/client/src/app/core/containers/app.component.html
@@ -12,7 +12,7 @@
             <small>Currently based on anis-client v{{ anisClientVersion }}. Code licensed CeCILL.</small>
         </div>
         <div class="row justify-content-around">
-            <div class="col text-center">
+            <div class="col mb-3 text-center">
                 <a href="http://cesam.lam.fr" title="Centre de données Astrophysique de Marseille">
                     <img class="img-fluid" src="assets/logo_cesam_s.png" alt="CeSAM" />
                 </a>
diff --git a/client/src/app/instance/home/components/welcome.component.scss b/client/src/app/instance/home/components/welcome.component.scss
index 0a76fe2e..0c0f1a89 100644
--- a/client/src/app/instance/home/components/welcome.component.scss
+++ b/client/src/app/instance/home/components/welcome.component.scss
@@ -10,3 +10,8 @@
 div.jumbotron p {
     line-height: 35px;
 }
+
+.img-fluid {
+    height: auto;
+    max-width: 100%;
+}
\ No newline at end of file
diff --git a/client/src/app/instance/shared-search/components/datatable/datatable.component.html b/client/src/app/instance/shared-search/components/datatable/datatable.component.html
index ecb7f572..00807214 100644
--- a/client/src/app/instance/shared-search/components/datatable/datatable.component.html
+++ b/client/src/app/instance/shared-search/components/datatable/datatable.component.html
@@ -90,14 +90,14 @@
 </div>
 <div class="row mt-3">
     <div class="col">
-        Showing
+        Show 
         <select class="custom-select" (change)="changeNbItems($event.target.value)">
             <option value="10" selected="true">10</option>
             <option value="20">20</option>
             <option value="50">50</option>
             <option value="100">100</option>
         </select>
-        of {{ dataLength }} items
+        entries
     </div>
     <div class="col-auto">
         <pagination
@@ -109,6 +109,6 @@
             [itemsPerPage]="nbItems"
             previousText="&lsaquo;" nextText="&rsaquo;" firstText="&laquo;" lastText="&raquo;"
             (pageChanged)="changePage($event.page)">
-    </pagination>
+        </pagination>
     </div>
 </div>
diff --git a/client/src/app/instance/store/models/criterion.model.ts b/client/src/app/instance/store/models/criterion.model.ts
index 95f9d974..f91cd67b 100644
--- a/client/src/app/instance/store/models/criterion.model.ts
+++ b/client/src/app/instance/store/models/criterion.model.ts
@@ -37,6 +37,7 @@ export interface Criterion {
  * criterionToString(criterion)
  */
 export const criterionToString = (criterion: Criterion): string => {
+    console.log(criterion);
     let str: string = criterion.id.toString();
     if (criterion.type === 'between') {
         const bw = criterion as BetweenCriterion;
@@ -124,6 +125,7 @@ export const stringToCriterion = (attribute: Attribute, params: string[] = null)
                 return { id: attribute.id, type: 'multiple', options } as SelectMultipleCriterion;
             }
         case 'json':
+        case 'svom_json_kw':
             if (params) {
                 const [path, operator, value] = params[2].split('|');
                 return { id: attribute.id, type: 'json', path, operator, value } as JsonCriterion;
-- 
GitLab