Selaa lähdekoodia

fix post upgrade bugs

new i18n dirs structure, rollback pinia/nuxt until the resolution of https://github.com/vuejs/pinia/issues/2904
Olivier Massot 10 kuukautta sitten
vanhempi
commit
e1623cbe46
9 muutettua tiedostoa jossa 126 lisäystä ja 589 poistoa
  1. 0 0
      i18n/i18n.config.ts
  2. 0 0
      i18n/lang/en.json
  3. 0 0
      i18n/lang/fr.json
  4. 0 0
      i18n/lang/fr.json.removed
  5. 1 1
      package.json
  6. 18 18
      plugins/ability.ts
  7. 0 0
      plugins/error.ts.off
  8. 2 2
      services/rights/abilityBuilder.ts
  9. 105 568
      yarn.lock

+ 0 - 0
i18n.config.ts → i18n/i18n.config.ts


+ 0 - 0
lang/en.json → i18n/lang/en.json


+ 0 - 0
lang/fr.json → i18n/lang/fr.json


+ 0 - 0
lang/fr.json.removed → i18n/lang/fr.json.removed


+ 1 - 1
package.json

@@ -31,7 +31,7 @@
     "@nuxt/image": "1.9.0",
     "@nuxtjs/i18n": "^9.1.3",
     "@pinia-orm/nuxt": "^1.10.1",
-    "@pinia/nuxt": "0.9.0",
+    "@pinia/nuxt": "^0.5.1",
     "@vuepic/vue-datepicker": "^7.4.0",
     "cleave.js": "^1.6.0",
     "date-fns": "^4.1.0",

+ 18 - 18
plugins/ability.ts

@@ -26,22 +26,22 @@ export default defineNuxtPlugin(() => {
    *
    * @see https://pinia.vuejs.org/core-concepts/actions.html#Subscribing-to-actions
    */
-  const unsubscribe = organizationProfile.$onAction(
-    ({
-      name, // name of the action
-      after, // hook after the action returns or resolves
-    }) => {
-      after((_) => {
-        if (name === 'initiateProfile') {
-          // On construit les habilités et on les enregistre dans le store
-          // noinspection UnnecessaryLocalVariableJS
-          const abilities = abilityUtils.buildAbilities()
-          accessProfile.abilities = abilities
-
-          // Unsubscribe pour éviter les memory leaks
-          unsubscribe()
-        }
-      })
-    },
-  )
+  // const unsubscribe = organizationProfile.$onAction(
+  //   ({
+  //     name, // name of the action
+  //     after, // hook after the action returns or resolves
+  //   }) => {
+  //     after((_) => {
+  //       if (name === 'initiateProfile') {
+  //         // On construit les habilités et on les enregistre dans le store
+  //         // noinspection UnnecessaryLocalVariableJS
+  //         const abilities = abilityUtils.buildAbilities()
+  //         accessProfile.abilities = abilities
+  //
+  //         // Unsubscribe pour éviter les memory leaks
+  //         unsubscribe()
+  //       }
+  //     })
+  //   },
+  // )
 })

+ 0 - 0
plugins/error.ts → plugins/error.ts.off


+ 2 - 2
services/rights/abilityBuilder.ts

@@ -1,11 +1,11 @@
-import type { MongoAbility } from '@casl/ability/dist/types/Ability'
 // eslint-disable-next-line import/default
-import yaml from 'yaml-import'
+import * as yaml from 'yaml-import'
 import * as _ from 'lodash-es'
 import RoleUtils from '~/services/rights/roleUtils'
 import type { AbilitiesType, AccessProfile } from '~/types/interfaces'
 import { ABILITIES } from '~/types/enum/enums'
 import type OrganizationProfile from '~/models/Organization/OrganizationProfile'
+import type { MongoAbility } from '@casl/ability/dist/types/Ability';
 
 interface ConditionParameters {
   action: string

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 105 - 568
yarn.lock


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä