Browse Source

various fixes

Olivier Massot 2 năm trước cách đây
mục cha
commit
f4f2921e88
8 tập tin đã thay đổi với 221 bổ sung748 xóa
  1. 1 1
      .env.test
  2. 5 1
      README.md
  3. 4 3
      composables/layout/useExtensionPanel.ts
  4. 1 1
      nuxt.config.ts
  5. 5 3
      package.json
  6. 3 3
      stores/accessProfile.ts
  7. 2 2
      stores/organizationProfile.ts
  8. 200 734
      yarn.lock

+ 1 - 1
.env.test

@@ -2,7 +2,7 @@
 DEBUG=1
 
 HOST=0
-PORT=3000
+PORT=3002
 
 # Current env
 NUXT_ENV=test

+ 5 - 1
README.md

@@ -49,7 +49,6 @@ Lancer le serveur de développement :
     yarn dev -o
 
 
-
 ## Déploiement en prod
 
 ### Premier déploiement en tant que service
@@ -76,6 +75,11 @@ Se placer dans le répertoire de l'application, puis lancer :
 
     yarn deploy
 
+### Spécial : environnement de test
+
+Attention, sur les environnements de test, il faut utiliser nvm pour exécuter la bonne version de node, exemple :
+
+    nvm exec 18.10.0 yarn install
 
 
 ## Autres

+ 4 - 3
composables/layout/useExtensionPanel.ts

@@ -1,8 +1,9 @@
 import {Ref} from "@vue/reactivity";
-import {each} from "lodash";
+import * as _ from 'lodash-es'
+
 /**
  * @category composables/form
- * Composable pour gérer les expansions des accordions
+ * Composable pour gérer les expansions des accordéons
  */
 export function useExtensionPanel(route: Ref) {
   const panel: Ref<number> = ref(0)
@@ -10,7 +11,7 @@ export function useExtensionPanel(route: Ref) {
 
   onMounted(() => {
     setTimeout(function () {
-      each(document.getElementsByClassName('v-expansion-panel'), (element, index) => {
+      _.each(document.getElementsByClassName('v-expansion-panel'), (element, index) => {
         if (element.id == activeAccordionId) {
           panel.value = index
         }

+ 1 - 1
nuxt.config.ts

@@ -164,6 +164,6 @@ export default defineNuxtConfig({
         },
     } as NuxtI18nOptions,
     build: {
-        transpile: ['vuetify', '@vuepic/vue-datepicker'],
+        transpile: ['vuetify', '@vuepic/vue-datepicker', 'pinia', 'pinia-orm', 'date-fns'],
     },
 })

+ 5 - 3
package.json

@@ -6,11 +6,11 @@
     "dev": "rm -rf /tmp/nitro && nuxt dev",
     "dev:local": "yarn dev --dotenv .env.docker",
     "dev:prod": "yarn dev --dotenv .env.prod",
-    "build": "nuxt build",
+    "build": "nuxt build && cp -r config/ .output/config",
     "build:local": "yarn build --dotenv .env.docker",
     "build:prod": "yarn build --dotenv .env.prod",
     "prepare": "nuxt prepare",
-    "start": "nuxt start --hostname '127.0.0.1' --port 3003",
+    "start": "nuxt start",
     "deploy": "git pull && yarn install & yarn build",
     "lint": "eslint --ext \".ts,.js,.vue\" --ignore-path .gitignore .",
     "lint-fix": "eslint --fix --ext \".ts,.js,.vue\" --ignore-path .gitignore .",
@@ -38,7 +38,8 @@
     "js-yaml": "^4.1.0",
     "libphonenumber-js": "1.10.24",
     "lodash": "^4.17.21",
-    "nuxt": "^3.3.2",
+    "lodash-es": "^4.17.21",
+    "nuxt": "^3.3.3",
     "pinia": "^2.0.33",
     "pinia-orm": "^1.5.1",
     "sass": "^1.59.3",
@@ -60,6 +61,7 @@
     "@types/event-source-polyfill": "^1.0.1",
     "@types/jest": "^29.4.2",
     "@types/lodash": "^4.14.189",
+    "@types/lodash-es": "^4.17.7",
     "@types/uuid": "^9.0.0",
     "@typescript-eslint/eslint-plugin": "^5.55.0",
     "@typescript-eslint/parser": "^5.55.0",

+ 3 - 3
stores/accessProfile.ts

@@ -10,7 +10,7 @@ import {
 import {computed, ref, Ref} from "@vue/reactivity";
 import {useOrganizationProfileStore} from "~/stores/organizationProfile";
 import RoleUtils from "~/services/rights/roleUtils";
-import {each} from "lodash";
+import * as _ from 'lodash-es'
 
 export const useAccessProfileStore = defineStore('accessProfile', () => {
 
@@ -66,7 +66,7 @@ export const useAccessProfileStore = defineStore('accessProfile', () => {
 
   // Actions
   const setMultiAccesses = (organizations: any) => {
-    each(organizations, (organization: BaseOrganizationProfile) => {
+    _.each(organizations, (organization: BaseOrganizationProfile) => {
       multiAccesses.value.push({
         id: organization.id,
         name: organization.name
@@ -75,7 +75,7 @@ export const useAccessProfileStore = defineStore('accessProfile', () => {
   }
 
   const setFamilyAccesses = (accesses: any) => {
-    each(accesses, (access: BaseAccessProfile) => {
+    _.each(accesses, (access: BaseAccessProfile) => {
       const a: BaseAccessProfile = {
         id: access.id,
         name: access.name,

+ 2 - 2
stores/organizationProfile.ts

@@ -1,7 +1,7 @@
 import { BaseOrganizationProfile } from '~/types/interfaces'
 import { defineStore } from "pinia";
 import {computed, Ref} from "@vue/reactivity";
-import {each} from "lodash";
+import * as _ from 'lodash-es'
 
 export const useOrganizationProfileStore = defineStore('organizationProfile', () => {
 
@@ -160,7 +160,7 @@ export const useOrganizationProfileStore = defineStore('organizationProfile', ()
     showAdherentList.value = profile.showAdherentList
     networks.value = profile.networks
 
-    each(profile.parents, (parent) => {
+    _.each(profile.parents, (parent) => {
       parents.value.push({
         id: parent.id,
         name: parent.name,

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 200 - 734
yarn.lock


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác