From ae8cabc297583ce470c55d43dd1ad004a1b6faaf Mon Sep 17 00:00:00 2001
From: lucile varloteaux <lucile.varloteaux@inrae.fr>
Date: Mon, 17 Jun 2024 12:42:08 +0200
Subject: [PATCH 01/10] =?UTF-8?q?acc=C3=A8s=20direct=20apr=C3=A8s=20connec?=
 =?UTF-8?q?tion=20avec=20un=20nom=20d'application=20vers=20la=20page=20apl?=
 =?UTF-8?q?lication=20dite?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

- attention pas de vérification que l'application existe !!!
---
 ui/src/components/login/Signin.vue             | 12 ++++++++++--
 ui/src/composable/applications/applications.js |  6 +++---
 ui/src/router/index.js                         | 16 ++++++++++++++++
 ui/src/services/rest/LoginService.js           |  9 ++++++---
 4 files changed, 35 insertions(+), 8 deletions(-)

diff --git a/ui/src/components/login/Signin.vue b/ui/src/components/login/Signin.vue
index 423000f3a..76805fbd7 100644
--- a/ui/src/components/login/Signin.vue
+++ b/ui/src/components/login/Signin.vue
@@ -80,7 +80,7 @@
 <script>
 import services from "@/composable/services";
 import { HttpStatusCodes } from "@/utils/HttpUtils";
-import { inject, provide } from "vue";
+import {inject, provide} from "vue";
 import useBoolean from "@/composable/components/boolean";
 import useText from "@/composable/components/text";
 import useArray from "@/composable/components/array";
@@ -96,6 +96,8 @@ export default {
   setup() {
     const { refBoolean: verificationKeyVisible } = useBoolean();
     const { refBoolean: isComponentModalActive } = useBoolean();
+    const applications = inject("application:applications");
+    const applicationName = window.location.href.split("/")[window.location.href.split("/").length -1]
 
     const login = inject("login");
     const verificationKey = useText().refText;
@@ -114,7 +116,11 @@ export default {
 
     const signIn = async function () {
       try {
-        await services.loginService.signIn(login.value, password.value);
+        if (applicationName !== "login"){
+          await services.loginService.signIn(login.value, password.value, applicationName);
+        } else {
+          await services.loginService.signIn(login.value, password.value);
+        }
       } catch (errors) {
         if (errors.httpResponseCode === HttpStatusCodes.PAYMENT_REQUIRED) {
           errors.content.then(paymentRequired);
@@ -181,6 +187,8 @@ export default {
       signIn,
       paymentRequired,
       updateForm,
+      applications,
+      applicationName
     };
   },
 };
diff --git a/ui/src/composable/applications/applications.js b/ui/src/composable/applications/applications.js
index 904e0c478..17711a3bc 100644
--- a/ui/src/composable/applications/applications.js
+++ b/ui/src/composable/applications/applications.js
@@ -7,9 +7,9 @@ const { shallowRefArray: applications } = useArray();
 const { refNumber: progress } = useNumber(0);
 
 function addApplication(result) {
-  if (result.type == "REACTIVE_PROGRESS") {
+  if (result.type === "REACTIVE_PROGRESS") {
     progress.value = result.result;
-  } else if (result.type == "REACTIVE_RESULT") {
+  } else if (result.type === "REACTIVE_RESULT") {
     let application = new Application(result.result);
     const authenticatedUser = services.loginService.getAuthenticatedUser();
     if (!authenticatedUser.chartes[application.id]) {
@@ -17,7 +17,7 @@ function addApplication(result) {
     }
     application = services.internationalisationService.mergeInternationalization(application);
     let id = applications.value
-      .map((a, i) => (a.name == application.name ? i : -1))
+      .map((a, i) => (a.name === application.name ? i : -1))
       .find((i) => i >= 0);
     if (id >= 0) {
       applications.value[id] = application;
diff --git a/ui/src/router/index.js b/ui/src/router/index.js
index f7363099d..514e31267 100644
--- a/ui/src/router/index.js
+++ b/ui/src/router/index.js
@@ -52,6 +52,22 @@ const routes = [
       next();
     },
   },
+  {
+    path: "/login/:applicationName",
+    name: "Login",
+    props: true,
+    component: LoginView,
+    beforeEnter: (to, from, next) => {
+      if (from.path !== "/") {
+        // C'est probablement une déconnexion, afficher le toast
+        Toast.open({
+          message: i18n.t("login.deconnected"),
+          type: "is-success",
+        });
+      }
+      next();
+    },
+  },
   {
     path: "/users/:userIdOrLogin",
     name: "User edit",
diff --git a/ui/src/services/rest/LoginService.js b/ui/src/services/rest/LoginService.js
index 4315b49d7..57055d92a 100644
--- a/ui/src/services/rest/LoginService.js
+++ b/ui/src/services/rest/LoginService.js
@@ -45,14 +45,17 @@ export class LoginService extends Fetcher {
     this.#useUser.doChangeObject(user);
   }
 
-  async signIn(login, pwd) {
+  async signIn(login, pwd, applicationName) {
     let response = await this.post("login", {
       login: login,
       password: pwd,
     });
     this.setAuthenticateduser(response);
-
-    app.$router.push("/applications");
+    if (applicationName) {
+      app.$router.push("/applications/" + applicationName);
+    } else {
+      app.$router.push("/applications");
+    }
     return Promise.resolve(response);
   }
 
-- 
GitLab


From 348ac847650c85b556c08b9a69461af4ab847a90 Mon Sep 17 00:00:00 2001
From: lucile varloteaux <lucile.varloteaux@inrae.fr>
Date: Mon, 17 Jun 2024 12:52:44 +0200
Subject: [PATCH 02/10] route pour authorisation

---
 ui/src/locales/en.json                                      | 1 +
 ui/src/locales/fr.json                                      | 1 +
 .../views/authorizations/DataTypeAuthorizationInfoView.vue  | 6 +++---
 .../DataTypeAuthorizationsRightsRequestView.vue             | 6 +++---
 ui/src/views/authorizations/DataTypeAuthorizationsView.vue  | 6 +++---
 .../authorizations/ReferencesAuthorizationInfoView.vue      | 2 +-
 6 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/ui/src/locales/en.json b/ui/src/locales/en.json
index ec8ebb6e3..dd0266611 100644
--- a/ui/src/locales/en.json
+++ b/ui/src/locales/en.json
@@ -790,6 +790,7 @@
   },
   "menu": {
     "applications": "Applications",
+    "accueil": "Accueil",
     "aria-curent-page": "Curent page",
     "aria-nav-bar": "Main menu",
     "aria-next-page": "Next page",
diff --git a/ui/src/locales/fr.json b/ui/src/locales/fr.json
index 829d3c1d1..eb34ce97b 100644
--- a/ui/src/locales/fr.json
+++ b/ui/src/locales/fr.json
@@ -797,6 +797,7 @@
   },
   "menu": {
     "applications": "Applications",
+    "accueil": "Accueil",
     "aria-curent-page": "Page actuelle",
     "aria-nav-bar": "Menu principal",
     "aria-next-page": "Page suivante",
diff --git a/ui/src/views/authorizations/DataTypeAuthorizationInfoView.vue b/ui/src/views/authorizations/DataTypeAuthorizationInfoView.vue
index 4626ec82a..63fd0c441 100644
--- a/ui/src/views/authorizations/DataTypeAuthorizationInfoView.vue
+++ b/ui/src/views/authorizations/DataTypeAuthorizationInfoView.vue
@@ -162,8 +162,8 @@ export default {
       await init();
       changeSubMenuPaths([
         new SubMenuPath(
-          i18n.t("dataTypesManagement.data-types").toLowerCase(),
-          () => app.$router.push(`/applications/${props.applicationName}/dataTypes`),
+          i18n.t("menu.accueil").toLowerCase(),
+          () => app.$router.push(`/applications/${props.applicationName}`),
           () => app.$router.push("/applications")
         ),
         new SubMenuPath(
@@ -171,7 +171,7 @@ export default {
           () => {
             app.$router.push(`/applications/${props.applicationName}/authorizations`);
           },
-          () => app.$router.push(`/applications/${props.applicationName}/dataTypes`)
+          () => app.$router.push(`/applications/${props.applicationName}`)
         ),
         new SubMenuPath(
           i18n.t(`dataTypeAuthorizations.sub-menu-new-authorization`),
diff --git a/ui/src/views/authorizations/DataTypeAuthorizationsRightsRequestView.vue b/ui/src/views/authorizations/DataTypeAuthorizationsRightsRequestView.vue
index 7526ab4f4..b4088da66 100644
--- a/ui/src/views/authorizations/DataTypeAuthorizationsRightsRequestView.vue
+++ b/ui/src/views/authorizations/DataTypeAuthorizationsRightsRequestView.vue
@@ -263,8 +263,8 @@ export default class DataTypeAuthorizationsRightsRequestView extends Vue {
     this.chosenLocale = this.userPreferencesService.getUserPrefLocale();
     this.subMenuPaths = [
       new SubMenuPath(
-        this.$t("dataTypesManagement.data-types").toLowerCase(),
-        () => this.$router.push(`/applications/${this.applicationName}/dataTypes`),
+        this.$t("menu.accueil").toLowerCase(),
+        () => this.$router.push(`/applications/${this.applicationName}`),
         () => this.$router.push("/applications")
       ),
       new SubMenuPath(
@@ -272,7 +272,7 @@ export default class DataTypeAuthorizationsRightsRequestView extends Vue {
         () => {
           this.$router.push(`/applications/${this.applicationName}/authorizationsRequest`);
         },
-        () => this.$router.push(`/applications/${this.applicationName}/dataTypes`)
+        () => this.$router.push(`/applications/${this.applicationName}`)
       ),
       new SubMenuPath(
         this.$t(`dataTypeAuthorizations.sub-menu-new-authorization`),
diff --git a/ui/src/views/authorizations/DataTypeAuthorizationsView.vue b/ui/src/views/authorizations/DataTypeAuthorizationsView.vue
index 0ca1e0ca1..15b72b880 100644
--- a/ui/src/views/authorizations/DataTypeAuthorizationsView.vue
+++ b/ui/src/views/authorizations/DataTypeAuthorizationsView.vue
@@ -271,8 +271,8 @@ export default class DataTypeAuthorizationsView extends Vue {
     this.init();
     this.subMenuPaths = [
       new SubMenuPath(
-        this.$t("dataTypesManagement.data-types").toLowerCase(),
-        () => this.$router.push(`/applications/${this.applicationName}/dataTypes`),
+        this.$t("menu.accueil").toLowerCase(),
+        () => this.$router.push(`/applications/${this.applicationName}`),
         () => this.$router.push("/applications")
       ),
       new SubMenuPath(
@@ -282,7 +282,7 @@ export default class DataTypeAuthorizationsView extends Vue {
         () => {
           this.$router.push(`/applications/${this.applicationName}/authorizations`);
         },
-        () => this.$router.push(`/applications/${this.applicationName}/dataTypes`)
+        () => this.$router.push(`/applications/${this.applicationName}`)
       ),
     ];
   }
diff --git a/ui/src/views/authorizations/ReferencesAuthorizationInfoView.vue b/ui/src/views/authorizations/ReferencesAuthorizationInfoView.vue
index 05c69c67e..bf25e193a 100644
--- a/ui/src/views/authorizations/ReferencesAuthorizationInfoView.vue
+++ b/ui/src/views/authorizations/ReferencesAuthorizationInfoView.vue
@@ -186,7 +186,7 @@ export default class ReferencesAuthorizationInfoView extends Vue {
     this.subMenuPaths = [
       new SubMenuPath(
         this.$t("referencesManagement.references").toLowerCase(),
-        () => this.$router.push(`/applications/${this.applicationName}/dataTypes`),
+        () => this.$router.push(`/applications/${this.applicationName}`),
         () => this.$router.push("/applications")
       ),
       new SubMenuPath(
-- 
GitLab


From 7e1954bd284be0980513d90601431f95e1bf15f2 Mon Sep 17 00:00:00 2001
From: lucile varloteaux <lucile.varloteaux@inrae.fr>
Date: Mon, 17 Jun 2024 20:08:27 +0200
Subject: [PATCH 03/10] suivi application logout

---
 ui/src/services/Fetcher.js           | 8 ++++++--
 ui/src/services/rest/LoginService.js | 4 ++--
 ui/src/views/common/MenuView.vue     | 4 ++--
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/ui/src/services/Fetcher.js b/ui/src/services/Fetcher.js
index 49ce8ff39..cd67613cb 100644
--- a/ui/src/services/Fetcher.js
+++ b/ui/src/services/Fetcher.js
@@ -216,10 +216,14 @@ export class Fetcher {
     link.click();
   }
 
-  notifyCrendentialsLost() {
+  notifyCrendentialsLost(applicationName) {
     this.setAuthenticateduser(new User());
     localStorage.removeItem(LOCAL_STORAGE_AUTHENTICATED_USER);
-    app.$router.push("/login").catch(() => {});
+    if (applicationName){
+      app.$router.push("/login/"+applicationName).catch(() => {});
+    } else {
+      app.$router.push("/login").catch(() => {});
+    }
   }
 
   convertToFormData(body) {
diff --git a/ui/src/services/rest/LoginService.js b/ui/src/services/rest/LoginService.js
index 57055d92a..447bbf5d3 100644
--- a/ui/src/services/rest/LoginService.js
+++ b/ui/src/services/rest/LoginService.js
@@ -93,9 +93,9 @@ export class LoginService extends Fetcher {
     return response;
   }
 
-  async logout() {
+  async logout(applicationName) {
     await this.delete("logout");
-    this.notifyCrendentialsLost();
+    this.notifyCrendentialsLost(applicationName);
   }
 
   async getByIdOrLogin(userLoginOrId) {
diff --git a/ui/src/views/common/MenuView.vue b/ui/src/views/common/MenuView.vue
index df220b786..7b908fe8f 100644
--- a/ui/src/views/common/MenuView.vue
+++ b/ui/src/views/common/MenuView.vue
@@ -135,7 +135,7 @@ export default {
       type: Object
     },
   },
-  setup() {
+  setup(props) {
     const { reactiveObject: currentUser, doChangeObject: changeCurrentUser } = useObject({});
 
     const open = useBoolean().refBoolean;
@@ -145,7 +145,7 @@ export default {
     });
 
     function logout() {
-      services.loginService.logout();
+      services.loginService.logout(props.application.name);
     }
     function editUser() {
       let userLoginOrId = currentUser.login;
-- 
GitLab


From 2f0480aeef908a9520f5e1f0118a59a3f00a0aa4 Mon Sep 17 00:00:00 2001
From: lucile varloteaux <lucile.varloteaux@inrae.fr>
Date: Mon, 17 Jun 2024 20:21:38 +0200
Subject: [PATCH 04/10] goBack sur la landing page non actif

---
 ui/src/views/application/ApplicationInfoView.vue | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/ui/src/views/application/ApplicationInfoView.vue b/ui/src/views/application/ApplicationInfoView.vue
index bdb805438..f0a175d47 100644
--- a/ui/src/views/application/ApplicationInfoView.vue
+++ b/ui/src/views/application/ApplicationInfoView.vue
@@ -92,8 +92,7 @@ export default {
       changeSubMenuPaths([
         new SubMenuPath(
           "Accueil",
-          () => app.$router.push(`/applications/${props.applicationName}`),
-          () => app.$router.push(`/applications`)
+          () => app.$router.push(`/applications/${props.applicationName}`)
         ),
       ]);
     });
-- 
GitLab


From d9cef34bea6133a8594348456b923d3d1bdacea3 Mon Sep 17 00:00:00 2001
From: lucile varloteaux <lucile.varloteaux@inrae.fr>
Date: Tue, 18 Jun 2024 10:16:51 +0200
Subject: [PATCH 05/10] solution date format #213

---
 ui/src/composable/application/DatePattern.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ui/src/composable/application/DatePattern.js b/ui/src/composable/application/DatePattern.js
index 16b2401d9..bfc7bcc05 100644
--- a/ui/src/composable/application/DatePattern.js
+++ b/ui/src/composable/application/DatePattern.js
@@ -69,9 +69,11 @@ export function formatedDateArray(arrayDate) {
     let hour = arrayDate[3];
     let minute = arrayDate[4];
     let second = arrayDate[5];
-    return new Date(year, month, day, hour, minute, second).toLocaleString(
-      localStorage.getItem("lang")
-    );
+    let localDate = new Date(Date(year, month, day, hour, minute, second));
+    return new Intl.DateTimeFormat(localStorage.getItem("lang"), {
+      dateStyle: 'medium',
+      timeStyle: 'short',
+    }).format(localDate);
   }
 }
 
-- 
GitLab


From 88ab0e7025954839ef3821aa5fe7524d643fe84d Mon Sep 17 00:00:00 2001
From: lucile varloteaux <lucile.varloteaux@inrae.fr>
Date: Tue, 18 Jun 2024 11:20:50 +0200
Subject: [PATCH 06/10] redirection vers la liste des applications lors d'une
 tentative de connection sur une application qui n'existe pas
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

reste à gérer l'erreur produite
---
 ui/src/services/rest/ApplicationService.js    | 10 +++-
 .../views/application/ApplicationInfoView.vue | 49 ++++++++++---------
 ui/src/views/common/MenuView.vue              |  6 ++-
 3 files changed, 40 insertions(+), 25 deletions(-)

diff --git a/ui/src/services/rest/ApplicationService.js b/ui/src/services/rest/ApplicationService.js
index 052703ed0..3143e9e4f 100644
--- a/ui/src/services/rest/ApplicationService.js
+++ b/ui/src/services/rest/ApplicationService.js
@@ -1,5 +1,6 @@
 import { Fetcher } from "../Fetcher";
 import { InternationalisationService } from "@/services/InternationalisationService";
+import app from "@/main";
 
 export class ApplicationService extends Fetcher {
   static INSTANCE = new ApplicationService();
@@ -30,8 +31,13 @@ export class ApplicationService extends Fetcher {
   }
 
   async getApplication(name, filter) {
-    const application = await this.get("applications/" + name, { filter });
-    return InternationalisationService.INSTANCE.mergeInternationalization(application);
+    try {
+      const application = await this.get("applications/" + name, { filter });
+      return InternationalisationService.INSTANCE.mergeInternationalization(application);
+    } catch (e) {
+      console.log("getApplication", e)
+      app.$router.push("/applications");
+    }
   }
   async changeConfiguration(method, applicationConfig, comment) {
     return this.postChunck(method, "applications/" + applicationConfig.name + "/configuration", {
diff --git a/ui/src/views/application/ApplicationInfoView.vue b/ui/src/views/application/ApplicationInfoView.vue
index f0a175d47..d78a86143 100644
--- a/ui/src/views/application/ApplicationInfoView.vue
+++ b/ui/src/views/application/ApplicationInfoView.vue
@@ -92,34 +92,39 @@ export default {
       changeSubMenuPaths([
         new SubMenuPath(
           "Accueil",
-          () => app.$router.push(`/applications/${props.applicationName}`)
+          () => app.$router.push(`/applications/${props.applicationName}`),
+          () => app.$router.push(`/applications`)
         ),
       ]);
     });
 
     async function init() {
-      changeApplication(
-        await services.applicationService.getApplication(props.applicationName, [
-          "DATATYPE",
-          "CONFIGURATION",
-          "REFERENCETYPE",
-          "ADDITIONALFILE",
-        ])
-      );
-      changeApplication({
-        ...services.internationalisationService.mergeInternationalization(application),
-        localRefName: services.internationalisationService.localeReferenceNames(
-          props.applicationName,
-          application
-        ),
-      });
-      loadApplications(["DATATYPE", "REFERENCETYPE", "CONFIGURATION", "ADDITIONALFILE"]);
-      for (let i = 0; i < applications.value.length; i++) {
-        if (applications.value[i].name === application.name) {
-          application.configFile = applications.value[i].configFile;
-          application.creationDate = applications.value[i].creationDate;
-          application.updateDate = applications.value[i].updateDate;
+      try {
+        changeApplication(
+            await services.applicationService.getApplication(props.applicationName, [
+              "DATATYPE",
+              "CONFIGURATION",
+              "REFERENCETYPE",
+              "ADDITIONALFILE",
+            ])
+        );
+        changeApplication({
+          ...services.internationalisationService.mergeInternationalization(application),
+          localRefName: services.internationalisationService.localeReferenceNames(
+              props.applicationName,
+              application
+          ),
+        });
+        loadApplications(["DATATYPE", "REFERENCETYPE", "CONFIGURATION", "ADDITIONALFILE"]);
+        for (let i = 0; i < applications.value.length; i++) {
+          if (applications.value[i].name === application.name) {
+            application.configFile = applications.value[i].configFile;
+            application.creationDate = applications.value[i].creationDate;
+            application.updateDate = applications.value[i].updateDate;
+          }
         }
+      } catch (e) {
+        console.log(e)
       }
     }
 
diff --git a/ui/src/views/common/MenuView.vue b/ui/src/views/common/MenuView.vue
index 7b908fe8f..efc83e2b0 100644
--- a/ui/src/views/common/MenuView.vue
+++ b/ui/src/views/common/MenuView.vue
@@ -145,7 +145,11 @@ export default {
     });
 
     function logout() {
-      services.loginService.logout(props.application.name);
+      if (props.application && props.application.name) {
+        services.loginService.logout(props.application.name);
+      }else {
+        services.loginService.logout();
+      }
     }
     function editUser() {
       let userLoginOrId = currentUser.login;
-- 
GitLab


From 56b155384cbee7c9ccbd1ba6284995fb8f2f29d3 Mon Sep 17 00:00:00 2001
From: lucile varloteaux <lucile.varloteaux@inrae.fr>
Date: Tue, 18 Jun 2024 13:53:16 +0200
Subject: [PATCH 07/10] gestion du cas ou l'application demander n'existe pas
 ou pas accessible par l'utilisateur par manque de droit

---
 ui/src/locales/en.json                           | 3 ++-
 ui/src/locales/fr.json                           | 1 +
 ui/src/services/Fetcher.js                       | 4 ++++
 ui/src/views/application/ApplicationInfoView.vue | 9 +++++++--
 4 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/ui/src/locales/en.json b/ui/src/locales/en.json
index dd0266611..5b74e793f 100644
--- a/ui/src/locales/en.json
+++ b/ui/src/locales/en.json
@@ -103,7 +103,8 @@
     "registered-user": "User registered",
     "revoke-authorization": "Authorization revoked",
     "server-error": "A server error occured",
-    "server-error-appli-exist": "This application's name exist",
+    "server-error-appli-exist": "This application's {name} exist for the version : {version}",
+    "server-error-appli-no-exist": "You do not have rights for this application's {name} or does not exist.",
     "user-email-updated": "Your email has been updated successfully. ",
     "user-pwd-updated": "Your password has been updated successfully. ",
     "user-unknown": "Unknown user",
diff --git a/ui/src/locales/fr.json b/ui/src/locales/fr.json
index eb34ce97b..6591467fc 100644
--- a/ui/src/locales/fr.json
+++ b/ui/src/locales/fr.json
@@ -104,6 +104,7 @@
     "revoke-authorization": "Autorisation révoquée",
     "server-error": "Une erreur serveur est survenue",
     "server-error-appli-exist": "L'application {name} existe déjà en version : {version}",
+    "server-error-appli-no-exist": "Vous n'avez pas les droits pour l'application {name} ou n'existe pas.",
     "user-email-updated": "Votre email vient d'être mis à jour avec succès. ",
     "user-pwd-updated": "Votre mot de passe vient d'être mis à jour avec succès. ",
     "user-unknown": "message : {message} ",
diff --git a/ui/src/services/Fetcher.js b/ui/src/services/Fetcher.js
index cd67613cb..4985ade26 100644
--- a/ui/src/services/Fetcher.js
+++ b/ui/src/services/Fetcher.js
@@ -188,6 +188,10 @@ export class Fetcher {
 
   async _handleResponse(response, isText) {
     try {
+      const contentType = response.headers.get("content-type")
+      if(contentType && contentType.startsWith('text/')){
+        isText = true
+      }
       const text = isText ? response.text() : response.json();
       if (response.ok && response.status !== HttpStatusCodes.NO_CONTENT) {
         return Promise.resolve(text);
diff --git a/ui/src/views/application/ApplicationInfoView.vue b/ui/src/views/application/ApplicationInfoView.vue
index d78a86143..3ff518402 100644
--- a/ui/src/views/application/ApplicationInfoView.vue
+++ b/ui/src/views/application/ApplicationInfoView.vue
@@ -6,7 +6,7 @@ import services from "@/composable/services";
 import PageView from "@/views/common/PageView.vue";
 import SubMenu, { SubMenuPath } from "@/components/common/SubMenu.vue";
 import useArray from "@/composable/components/array";
-import app from "@/main";
+import app, {i18n} from "@/main";
 import useObject from "@/composable/components/object";
 import { ApplicationResult } from "@/model/ApplicationResult";
 import useBoolean from "@/composable/components/boolean";
@@ -124,7 +124,12 @@ export default {
           }
         }
       } catch (e) {
-        console.log(e)
+        services.alertService.toastError(
+            i18n.t("alert.server-error-appli-no-exist", {
+              name: props.applicationName,
+            })
+        );
+        console.log("init", e)
       }
     }
 
-- 
GitLab


From 94261994cd4319f6575a753776a512f71d891056 Mon Sep 17 00:00:00 2001
From: lucile varloteaux <lucile.varloteaux@inrae.fr>
Date: Tue, 18 Jun 2024 13:55:00 +0200
Subject: [PATCH 08/10] message plus claire

---
 ui/src/locales/en.json | 2 +-
 ui/src/locales/fr.json | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ui/src/locales/en.json b/ui/src/locales/en.json
index 5b74e793f..9442c9d9a 100644
--- a/ui/src/locales/en.json
+++ b/ui/src/locales/en.json
@@ -104,7 +104,7 @@
     "revoke-authorization": "Authorization revoked",
     "server-error": "A server error occured",
     "server-error-appli-exist": "This application's {name} exist for the version : {version}",
-    "server-error-appli-no-exist": "You do not have rights for this application's {name} or does not exist.",
+    "server-error-appli-no-exist": "You do not have rights for this application's <code>{name}</code> or does not exist.",
     "user-email-updated": "Your email has been updated successfully. ",
     "user-pwd-updated": "Your password has been updated successfully. ",
     "user-unknown": "Unknown user",
diff --git a/ui/src/locales/fr.json b/ui/src/locales/fr.json
index 6591467fc..561a8fc30 100644
--- a/ui/src/locales/fr.json
+++ b/ui/src/locales/fr.json
@@ -104,7 +104,7 @@
     "revoke-authorization": "Autorisation révoquée",
     "server-error": "Une erreur serveur est survenue",
     "server-error-appli-exist": "L'application {name} existe déjà en version : {version}",
-    "server-error-appli-no-exist": "Vous n'avez pas les droits pour l'application {name} ou n'existe pas.",
+    "server-error-appli-no-exist": "Vous n'avez pas les droits pour l'application <code>{name}</code> ou n'existe pas.",
     "user-email-updated": "Votre email vient d'être mis à jour avec succès. ",
     "user-pwd-updated": "Votre mot de passe vient d'être mis à jour avec succès. ",
     "user-unknown": "message : {message} ",
-- 
GitLab


From ae6d79b80333b45a31e365af2e7eaa1a1ce6c39a Mon Sep 17 00:00:00 2001
From: lucile varloteaux <lucile.varloteaux@inrae.fr>
Date: Tue, 18 Jun 2024 14:19:32 +0200
Subject: [PATCH 09/10] =?UTF-8?q?r=C3=A9solution=20#213?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ui/src/composable/application/DatePattern.js | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/ui/src/composable/application/DatePattern.js b/ui/src/composable/application/DatePattern.js
index bfc7bcc05..dbff6b9bf 100644
--- a/ui/src/composable/application/DatePattern.js
+++ b/ui/src/composable/application/DatePattern.js
@@ -63,13 +63,12 @@ export function datePatternFormated(date, pattern) {
 
 export function formatedDateArray(arrayDate) {
   if (arrayDate && arrayDate.length !== 0) {
-    let year = arrayDate[0];
-    let month = arrayDate[1];
-    let day = arrayDate[2];
-    let hour = arrayDate[3];
-    let minute = arrayDate[4];
-    let second = arrayDate[5];
-    let localDate = new Date(Date(year, month, day, hour, minute, second));
+    let localDate = new Date(arrayDate[0],
+        (arrayDate[1]-1),
+        arrayDate[2],
+        arrayDate[3],
+        arrayDate[4],
+        arrayDate[5]);
     return new Intl.DateTimeFormat(localStorage.getItem("lang"), {
       dateStyle: 'medium',
       timeStyle: 'short',
-- 
GitLab


From e82424333e646e22ba3e7789f7cf8dd0c97b7aa1 Mon Sep 17 00:00:00 2001
From: lucile varloteaux <lucile.varloteaux@inrae.fr>
Date: Tue, 18 Jun 2024 14:39:10 +0200
Subject: [PATCH 10/10] =?UTF-8?q?affichage=20info=20compl=C3=A9t=C3=A9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ui/src/views/application/ApplicationInfoView.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/src/views/application/ApplicationInfoView.vue b/ui/src/views/application/ApplicationInfoView.vue
index 3ff518402..21525ff9e 100644
--- a/ui/src/views/application/ApplicationInfoView.vue
+++ b/ui/src/views/application/ApplicationInfoView.vue
@@ -197,7 +197,7 @@ export default {
           "
         />
       </div>
-      <div class="infos">
+      <div class="infos" v-if="application.creationDate">
         <p field="creationDate">
           {{ $t("applications.creation-date") }} : {{ formatedDateArray(application.creationDate) }}
         </p>
-- 
GitLab