Browse Source

Merge branch 'develop' of gitlab.2iopenservice.com:opentalent/app_nuxt3 into develop

Olivier Massot 2 years ago
parent
commit
363d2c25a4

+ 5 - 0
assets/css/settings.scss

@@ -0,0 +1,5 @@
+// settings.scss
+@forward 'vuetify/settings' with (
+  $button-color: green,
+  $button-font-weight: 700
+);

+ 2 - 2
composables/layout/useExtensionPanel.ts

@@ -1,5 +1,5 @@
 import {Ref} from "@vue/reactivity";
-
+import {each} from "lodash";
 /**
  * @category composables/form
  * Composable pour gérer les expansions des accordions
@@ -10,7 +10,7 @@ export function useExtensionPanel(route: Ref) {
 
   onMounted(() => {
     setTimeout(function () {
-      useEach(document.getElementsByClassName('v-expansion-panel'), (element, index) => {
+      each(document.getElementsByClassName('v-expansion-panel'), (element, index) => {
         if (element.id == activeAccordionId) {
           panel.value = index
         }

+ 3 - 12
nuxt.config.ts

@@ -6,10 +6,9 @@ import {NuxtI18nOptions} from "@nuxtjs/i18n"
  * Nuxt configuration
  *
  * @see https://nuxt.com/docs/api/configuration/nuxt-config
-  */
+ */
 export default defineNuxtConfig({
     ssr: true,
-    title: 'Opentalent',
     runtimeConfig: {
         // Private config that is only available on the server
         env: '',
@@ -40,7 +39,7 @@ export default defineNuxtConfig({
         }
     },
     hooks: {
-      'builder:watch': console.log
+        'builder:watch': console.log
     },
     app: {
         head: {
@@ -96,21 +95,16 @@ export default defineNuxtConfig({
             }
         ],
         '@pinia-orm/nuxt',
-        'nuxt-lodash',
         '@nuxtjs/i18n',
         '@nuxt/image-edge',
         '@nuxt/devtools'
     ],
-    devtools: {
-        // @see https://github.com/nuxt/devtools
-        enabled: false
-    },
     vite: {
         esbuild: {
             drop: process.env.DEBUG ? [] : ['console', 'debugger'],
         },
         ssr: {
-            noExternal: ['vuetify', 'nuxt-lodash']
+            noExternal: ['vuetify']
         },
         server : {
             https: {
@@ -125,9 +119,6 @@ export default defineNuxtConfig({
             }
         },
     },
-    vuetify: {
-        styles: { configFile: 'src/vuetify.scss' }
-    },
     i18n: {
         langDir: 'lang',
         lazy: true,

+ 3 - 6
package.json

@@ -1,10 +1,7 @@
 {
+  "name": "app_v3",
   "private": true,
   "version": "2.3.0",
-  "type": "module",
-  "engines": {
-    "node": ">=18.0.0"
-  },
   "scripts": {
     "dev": "rm -rf /tmp/nitro && nuxt dev",
     "dev:local": "yarn dev --dotenv .env.docker",
@@ -40,8 +37,8 @@
     "file-saver": "^2.0.5",
     "js-yaml": "^4.1.0",
     "libphonenumber-js": "1.10.24",
-    "nuxt": "^3.3.1",
-    "nuxt-lodash": "^2.4.1",
+    "lodash": "^4.17.21",
+    "nuxt": "^3.3.2",
     "pinia": "^2.0.33",
     "pinia-orm": "^1.5.1",
     "sass": "^1.59.3",

BIN
public/favicon.ico


+ 3 - 2
stores/accessProfile.ts

@@ -10,6 +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";
 
 export const useAccessProfileStore = defineStore('accessProfile', () => {
 
@@ -65,7 +66,7 @@ export const useAccessProfileStore = defineStore('accessProfile', () => {
 
   // Actions
   const setMultiAccesses = (organizations: any) => {
-    useEach(organizations, (organization: BaseOrganizationProfile) => {
+    each(organizations, (organization: BaseOrganizationProfile) => {
       multiAccesses.value.push({
         id: organization.id,
         name: organization.name
@@ -74,7 +75,7 @@ export const useAccessProfileStore = defineStore('accessProfile', () => {
   }
 
   const setFamilyAccesses = (accesses: any) => {
-    useEach(accesses, (access: BaseAccessProfile) => {
+    each(accesses, (access: BaseAccessProfile) => {
       const a: BaseAccessProfile = {
         id: access.id,
         name: access.name,

+ 2 - 1
stores/organizationProfile.ts

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