@innertia-solutions/innertia-nuxt 0.1.76 → 0.1.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innertia-solutions/innertia-nuxt",
3
- "version": "0.1.76",
3
+ "version": "0.1.77",
4
4
  "description": "Innertia Solutions — Nuxt layer unificada: core, auth, multitenancy, theme y app contexts",
5
5
  "keywords": [
6
6
  "nuxt",
@@ -12,7 +12,7 @@ import { defineStore } from 'pinia'
12
12
  * Org shape: { id, key (slug), name }
13
13
  *
14
14
  * Persistencia:
15
- * - `currentByContext` en cookie 'innertia_org_by_ctx' (30d, SSR-leíble)
15
+ * - `currentByContext` + `consolidated` en cookie 'innertia_org_by_ctx' (30d, SSR-leíble)
16
16
  * - `available` NO se persiste — viene fresco de auth/me en cada boot
17
17
  */
18
18
  export const useOrganizationStore = defineStore('organization', {
@@ -28,7 +28,9 @@ export const useOrganizationStore = defineStore('organization', {
28
28
  persist: [
29
29
  {
30
30
  key: 'innertia_org_by_ctx',
31
- pick: ['currentByContext'],
31
+ // `consolidated` también: la vista comunal/consolidada elegida debe sobrevivir a la recarga
32
+ // (el backend igual valida X-Consolidated con los permisos del usuario).
33
+ pick: ['currentByContext', 'consolidated'],
32
34
  // pinia-plugin-persistedstate v4: `cookies(...)` es una fábrica que recibe las
33
35
  // opciones. Pasarla sin llamar (API v3 + `cookieOptions`) deja un storage inválido
34
36
  // y la sede elegida nunca se guarda: cada recarga vuelve al selector de sede.