@viridial/shared 1.0.10 → 1.0.12
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/dist/api/organization.service.d.ts +18 -38
- package/dist/api/organization.service.d.ts.map +1 -1
- package/dist/api/organization.service.js +15 -21
- package/dist/api/user.service.d.ts +4 -0
- package/dist/api/user.service.d.ts.map +1 -1
- package/dist/api/user.service.js +10 -41
- package/dist/composables/useAuth.d.ts +1 -0
- package/dist/composables/useAuth.d.ts.map +1 -1
- package/dist/constants/api.constants.d.ts +6 -1
- package/dist/constants/api.constants.d.ts.map +1 -1
- package/dist/constants/api.constants.js +7 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/stores/auth.store.d.ts +6 -0
- package/dist/stores/auth.store.d.ts.map +1 -1
- package/dist/stores/auth.store.js +2 -1
- package/dist/stores/user.store.d.ts +1 -1
- package/dist/types/auth.types.d.ts +1 -0
- package/dist/types/auth.types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,47 +1,31 @@
|
|
|
1
1
|
export interface Organization {
|
|
2
2
|
id: number;
|
|
3
3
|
name: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
siret?: string;
|
|
9
|
-
status: 'ACTIVE' | 'INACTIVE' | 'SUSPENDED' | 'PENDING';
|
|
10
|
-
userCount?: number;
|
|
4
|
+
description?: string;
|
|
5
|
+
domain?: string;
|
|
6
|
+
active: boolean;
|
|
7
|
+
parentId?: number;
|
|
11
8
|
createdAt: string;
|
|
12
9
|
updatedAt?: string;
|
|
13
10
|
}
|
|
14
11
|
export interface OrganizationCreate {
|
|
15
12
|
name: string;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
siret?: string;
|
|
21
|
-
status?: 'ACTIVE' | 'INACTIVE' | 'SUSPENDED' | 'PENDING';
|
|
13
|
+
description?: string;
|
|
14
|
+
domain?: string;
|
|
15
|
+
active?: boolean;
|
|
16
|
+
parentId?: number;
|
|
22
17
|
}
|
|
23
18
|
export interface OrganizationUpdate {
|
|
24
19
|
name?: string;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
siret?: string;
|
|
30
|
-
status?: 'ACTIVE' | 'INACTIVE' | 'SUSPENDED' | 'PENDING';
|
|
20
|
+
description?: string;
|
|
21
|
+
domain?: string;
|
|
22
|
+
active?: boolean;
|
|
23
|
+
parentId?: number;
|
|
31
24
|
}
|
|
32
25
|
export interface OrganizationSearchParams {
|
|
33
|
-
status?: string;
|
|
34
|
-
type?: string;
|
|
35
|
-
search?: string;
|
|
36
26
|
page?: number;
|
|
37
27
|
size?: number;
|
|
38
28
|
}
|
|
39
|
-
export interface OrganizationStats {
|
|
40
|
-
total: number;
|
|
41
|
-
active: number;
|
|
42
|
-
inactive: number;
|
|
43
|
-
suspended: number;
|
|
44
|
-
}
|
|
45
29
|
/**
|
|
46
30
|
* Service de gestion des organisations
|
|
47
31
|
*/
|
|
@@ -70,20 +54,16 @@ export declare const organizationService: {
|
|
|
70
54
|
*/
|
|
71
55
|
delete(id: number): Promise<void>;
|
|
72
56
|
/**
|
|
73
|
-
*
|
|
74
|
-
*/
|
|
75
|
-
activate(id: number): Promise<Organization>;
|
|
76
|
-
/**
|
|
77
|
-
* Suspendre une organisation
|
|
57
|
+
* Récupérer les organisations d'un utilisateur
|
|
78
58
|
*/
|
|
79
|
-
|
|
59
|
+
getByUserId(userId: number): Promise<Organization[]>;
|
|
80
60
|
/**
|
|
81
|
-
* Récupérer les
|
|
61
|
+
* Récupérer les organisations racines (sans parent)
|
|
82
62
|
*/
|
|
83
|
-
|
|
63
|
+
getRoot(): Promise<Organization[]>;
|
|
84
64
|
/**
|
|
85
|
-
*
|
|
65
|
+
* Récupérer les organisations enfants d'un parent
|
|
86
66
|
*/
|
|
87
|
-
|
|
67
|
+
getChildren(parentId: number): Promise<Organization[]>;
|
|
88
68
|
};
|
|
89
69
|
//# sourceMappingURL=organization.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.service.d.ts","sourceRoot":"","sources":["../../api/organization.service.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,
|
|
1
|
+
{"version":3,"file":"organization.service.d.ts","sourceRoot":"","sources":["../../api/organization.service.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB;IAC9B;;OAEG;oBACmB,wBAAwB,GAAG,OAAO,CAAC;QAAE,aAAa,EAAE,YAAY,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAY1G;;OAEG;gBACe,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAKhD;;OAEG;iBACgB,kBAAkB,GAAG,OAAO,CAAC,YAAY,CAAC;IAK7D;;OAEG;eACc,MAAM,QAAQ,kBAAkB,GAAG,OAAO,CAAC,YAAY,CAAC;IAKzE;;OAEG;eACc,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvC;;OAEG;wBACuB,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAO1D;;OAEG;eACc,OAAO,CAAC,YAAY,EAAE,CAAC;IAOxC;;OAEG;0BACyB,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;CAM7D,CAAA"}
|
|
@@ -9,9 +9,10 @@ export const organizationService = {
|
|
|
9
9
|
*/
|
|
10
10
|
async getAll(params) {
|
|
11
11
|
const response = await httpClient.get(API_ENDPOINTS.ORGANIZATIONS.BASE, { params });
|
|
12
|
+
const organizations = Array.isArray(response.data) ? response.data : [];
|
|
12
13
|
return {
|
|
13
|
-
organizations
|
|
14
|
-
total:
|
|
14
|
+
organizations,
|
|
15
|
+
total: organizations.length
|
|
15
16
|
};
|
|
16
17
|
},
|
|
17
18
|
/**
|
|
@@ -42,31 +43,24 @@ export const organizationService = {
|
|
|
42
43
|
await httpClient.delete(API_ENDPOINTS.ORGANIZATIONS.BY_ID(id));
|
|
43
44
|
},
|
|
44
45
|
/**
|
|
45
|
-
*
|
|
46
|
+
* Récupérer les organisations d'un utilisateur
|
|
46
47
|
*/
|
|
47
|
-
async
|
|
48
|
-
const response = await httpClient.
|
|
49
|
-
return response.data;
|
|
50
|
-
},
|
|
51
|
-
/**
|
|
52
|
-
* Suspendre une organisation
|
|
53
|
-
*/
|
|
54
|
-
async suspend(id, reason) {
|
|
55
|
-
const response = await httpClient.patch(`${API_ENDPOINTS.ORGANIZATIONS.BY_ID(id)}/suspend`, { reason });
|
|
56
|
-
return response.data;
|
|
48
|
+
async getByUserId(userId) {
|
|
49
|
+
const response = await httpClient.get(API_ENDPOINTS.ORGANIZATIONS.BY_USER_ID(userId));
|
|
50
|
+
return Array.isArray(response.data) ? response.data : [];
|
|
57
51
|
},
|
|
58
52
|
/**
|
|
59
|
-
* Récupérer les
|
|
53
|
+
* Récupérer les organisations racines (sans parent)
|
|
60
54
|
*/
|
|
61
|
-
async
|
|
62
|
-
const response = await httpClient.get(
|
|
63
|
-
return response.data;
|
|
55
|
+
async getRoot() {
|
|
56
|
+
const response = await httpClient.get(API_ENDPOINTS.ORGANIZATIONS.ROOT);
|
|
57
|
+
return Array.isArray(response.data) ? response.data : [];
|
|
64
58
|
},
|
|
65
59
|
/**
|
|
66
|
-
*
|
|
60
|
+
* Récupérer les organisations enfants d'un parent
|
|
67
61
|
*/
|
|
68
|
-
async
|
|
69
|
-
const response = await httpClient.get(
|
|
70
|
-
return response.data
|
|
62
|
+
async getChildren(parentId) {
|
|
63
|
+
const response = await httpClient.get(API_ENDPOINTS.ORGANIZATIONS.CHILDREN(parentId));
|
|
64
|
+
return Array.isArray(response.data) ? response.data : [];
|
|
71
65
|
}
|
|
72
66
|
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { User, UserCreate, UserUpdate, UserSearchParams, UserProfile, UserStats, UserActivity } from '../types/user.types';
|
|
2
|
+
/**
|
|
3
|
+
* Note: L'enrichissement avec organizationName n'est plus nécessaire
|
|
4
|
+
* car le backend retourne maintenant organizationName directement dans UserDTO
|
|
5
|
+
*/
|
|
2
6
|
/**
|
|
3
7
|
* Service de gestion des utilisateurs SaaS
|
|
4
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.service.d.ts","sourceRoot":"","sources":["../../api/user.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,SAA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AAS,CAAC;IAKpC;;OAEG;wBACuB,MAAM,UAAU,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAQ1E;;OAEG;kBACiB,MAAM,WAAW,gBAAgB,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAOvE;;OAEG;wBACuB,MAAM,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAKjE;;OAEG;wBACuB,MAAM,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAMlE,CAAA"}
|
package/dist/api/user.service.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { httpClient } from './http.client';
|
|
2
2
|
import { API_ENDPOINTS } from '../constants/api.constants';
|
|
3
3
|
import { UserStatus } from '../types/user.types';
|
|
4
|
-
import { organizationService } from './organization.service';
|
|
5
4
|
/**
|
|
6
5
|
* Mapper les données du backend vers le format User du frontend
|
|
7
6
|
*/
|
|
@@ -40,37 +39,9 @@ function mapBackendUserToUser(backendUser) {
|
|
|
40
39
|
};
|
|
41
40
|
}
|
|
42
41
|
/**
|
|
43
|
-
*
|
|
42
|
+
* Note: L'enrichissement avec organizationName n'est plus nécessaire
|
|
43
|
+
* car le backend retourne maintenant organizationName directement dans UserDTO
|
|
44
44
|
*/
|
|
45
|
-
async function enrichUsersWithOrganizationNames(users) {
|
|
46
|
-
// Récupérer tous les organizationIds uniques
|
|
47
|
-
const organizationIds = [...new Set(users.map(u => u.organizationId).filter(Boolean))];
|
|
48
|
-
if (organizationIds.length === 0) {
|
|
49
|
-
return users;
|
|
50
|
-
}
|
|
51
|
-
// Créer un cache des organisations
|
|
52
|
-
const organizationCache = new Map();
|
|
53
|
-
try {
|
|
54
|
-
// Récupérer toutes les organisations en une seule requête
|
|
55
|
-
const orgsResult = await organizationService.getAll({ size: 1000 });
|
|
56
|
-
orgsResult.organizations.forEach(org => {
|
|
57
|
-
organizationCache.set(org.id, org.name);
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
catch (error) {
|
|
61
|
-
console.warn('Failed to load organizations for user enrichment:', error);
|
|
62
|
-
}
|
|
63
|
-
// Enrichir les utilisateurs avec les noms d'organisation
|
|
64
|
-
return users.map(user => {
|
|
65
|
-
if (user.organizationId && organizationCache.has(user.organizationId)) {
|
|
66
|
-
return {
|
|
67
|
-
...user,
|
|
68
|
-
organizationName: organizationCache.get(user.organizationId)
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
return user;
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
45
|
/**
|
|
75
46
|
* Service de gestion des utilisateurs SaaS
|
|
76
47
|
*/
|
|
@@ -80,13 +51,14 @@ export const userService = {
|
|
|
80
51
|
*/
|
|
81
52
|
async getAll(params) {
|
|
82
53
|
const response = await httpClient.get(API_ENDPOINTS.USERS.BASE, { params });
|
|
54
|
+
// Handle both paginated response (content) and simple list response
|
|
83
55
|
const backendUsers = response.data?.content || response.data || [];
|
|
84
|
-
const users =
|
|
85
|
-
|
|
86
|
-
|
|
56
|
+
const users = Array.isArray(backendUsers)
|
|
57
|
+
? backendUsers.map(mapBackendUserToUser)
|
|
58
|
+
: [];
|
|
87
59
|
return {
|
|
88
|
-
users
|
|
89
|
-
total: response.data?.totalElements ||
|
|
60
|
+
users,
|
|
61
|
+
total: response.data?.totalElements || users.length
|
|
90
62
|
};
|
|
91
63
|
},
|
|
92
64
|
/**
|
|
@@ -94,9 +66,7 @@ export const userService = {
|
|
|
94
66
|
*/
|
|
95
67
|
async getById(id) {
|
|
96
68
|
const response = await httpClient.get(API_ENDPOINTS.USERS.BY_ID(id));
|
|
97
|
-
|
|
98
|
-
const enrichedUsers = await enrichUsersWithOrganizationNames([user]);
|
|
99
|
-
return enrichedUsers[0];
|
|
69
|
+
return mapBackendUserToUser(response.data);
|
|
100
70
|
},
|
|
101
71
|
/**
|
|
102
72
|
* Récupérer le profil de l'utilisateur connecté
|
|
@@ -201,8 +171,7 @@ export const userService = {
|
|
|
201
171
|
const response = await httpClient.get(`${API_ENDPOINTS.USERS.BASE}/search`, {
|
|
202
172
|
params: { q: query, ...params }
|
|
203
173
|
});
|
|
204
|
-
|
|
205
|
-
return await enrichUsersWithOrganizationNames(users);
|
|
174
|
+
return (response.data || []).map(mapBackendUserToUser);
|
|
206
175
|
},
|
|
207
176
|
/**
|
|
208
177
|
* Assigner des rôles à un utilisateur
|
|
@@ -9,6 +9,7 @@ export declare function useAuth(): {
|
|
|
9
9
|
name: string;
|
|
10
10
|
roles?: string[] | undefined;
|
|
11
11
|
organizationId?: number | undefined;
|
|
12
|
+
organizationName?: string | undefined;
|
|
12
13
|
} | null>;
|
|
13
14
|
isAuthenticated: import("vue").ComputedRef<boolean>;
|
|
14
15
|
isLoading: import("vue").ComputedRef<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../composables/useAuth.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAEvD;;GAEG;AACH,wBAAgB,OAAO
|
|
1
|
+
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../composables/useAuth.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAEvD;;GAEG;AACH,wBAAgB,OAAO;;;;;;;;;;;;;yBAUa,YAAY;;;EA8B/C"}
|
|
@@ -24,8 +24,13 @@ export declare const API_ENDPOINTS: {
|
|
|
24
24
|
readonly ACTIVITY: (id: number) => string;
|
|
25
25
|
};
|
|
26
26
|
readonly ORGANIZATIONS: {
|
|
27
|
-
readonly BASE: "/api/organizations";
|
|
27
|
+
readonly BASE: "/api/identity/organizations";
|
|
28
28
|
readonly BY_ID: (id: number) => string;
|
|
29
|
+
readonly BY_USER_ID: (userId: number) => string;
|
|
30
|
+
readonly ROOT: "/api/identity/organizations/root";
|
|
31
|
+
readonly CHILDREN: (parentId: number) => string;
|
|
32
|
+
readonly STATS: "/api/identity/organizations/stats";
|
|
33
|
+
readonly SEARCH: "/api/identity/organizations/search";
|
|
29
34
|
};
|
|
30
35
|
};
|
|
31
36
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.constants.d.ts","sourceRoot":"","sources":["../../constants/api.constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;6BAcV,MAAM;;;;6BAKN,MAAM;;;;gCAIH,MAAM;;;;6BAKT,MAAM;;
|
|
1
|
+
{"version":3,"file":"api.constants.d.ts","sourceRoot":"","sources":["../../constants/api.constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;6BAcV,MAAM;;;;6BAKN,MAAM;;;;gCAIH,MAAM;;;;6BAKT,MAAM;sCACG,MAAM;;sCAEN,MAAM;;;;CAIrB,CAAA;AAEV;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,SAAS,CAAA"}
|
|
@@ -28,8 +28,13 @@ export const API_ENDPOINTS = {
|
|
|
28
28
|
},
|
|
29
29
|
// Organizations
|
|
30
30
|
ORGANIZATIONS: {
|
|
31
|
-
BASE: '/api/organizations',
|
|
32
|
-
BY_ID: (id) => `/api/organizations/${id}
|
|
31
|
+
BASE: '/api/identity/organizations',
|
|
32
|
+
BY_ID: (id) => `/api/identity/organizations/${id}`,
|
|
33
|
+
BY_USER_ID: (userId) => `/api/identity/organizations/user/${userId}`,
|
|
34
|
+
ROOT: '/api/identity/organizations/root',
|
|
35
|
+
CHILDREN: (parentId) => `/api/identity/organizations/${parentId}/children`,
|
|
36
|
+
STATS: '/api/identity/organizations/stats',
|
|
37
|
+
SEARCH: '/api/identity/organizations/search'
|
|
33
38
|
}
|
|
34
39
|
};
|
|
35
40
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { authService } from './api/auth.service';
|
|
|
6
6
|
export { propertyService } from './api/property.service';
|
|
7
7
|
export { userService } from './api/user.service';
|
|
8
8
|
export { organizationService } from './api/organization.service';
|
|
9
|
-
export type { Organization, OrganizationCreate, OrganizationUpdate, OrganizationSearchParams
|
|
9
|
+
export type { Organization, OrganizationCreate, OrganizationUpdate, OrganizationSearchParams } from './api/organization.service';
|
|
10
10
|
export { useAuthStore } from './stores/auth.store';
|
|
11
11
|
export { useUserStore } from './stores/user.store';
|
|
12
12
|
export { useAuth } from './composables/useAuth';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAChE,YAAY,EACV,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAChE,YAAY,EACV,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,4BAA4B,CAAA;AAGnC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAG/C,mBAAmB,mBAAmB,CAAA;AACtC,mBAAmB,oBAAoB,CAAA;AACvC,mBAAmB,wBAAwB,CAAA;AAC3C,mBAAmB,oBAAoB,CAAA;AAGvC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAGhD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAGvE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA"}
|
|
@@ -9,12 +9,14 @@ export declare const useAuthStore: import("pinia").StoreDefinition<"auth", Pick<
|
|
|
9
9
|
name: string;
|
|
10
10
|
roles?: string[] | undefined;
|
|
11
11
|
organizationId?: number | undefined;
|
|
12
|
+
organizationName?: string | undefined;
|
|
12
13
|
} | null, UserInfo | {
|
|
13
14
|
id: number;
|
|
14
15
|
email: string;
|
|
15
16
|
name: string;
|
|
16
17
|
roles?: string[] | undefined;
|
|
17
18
|
organizationId?: number | undefined;
|
|
19
|
+
organizationName?: string | undefined;
|
|
18
20
|
} | null>;
|
|
19
21
|
isAuthenticated: import("vue").Ref<boolean, boolean>;
|
|
20
22
|
loading: import("vue").Ref<boolean, boolean>;
|
|
@@ -32,12 +34,14 @@ export declare const useAuthStore: import("pinia").StoreDefinition<"auth", Pick<
|
|
|
32
34
|
name: string;
|
|
33
35
|
roles?: string[] | undefined;
|
|
34
36
|
organizationId?: number | undefined;
|
|
37
|
+
organizationName?: string | undefined;
|
|
35
38
|
} | null, UserInfo | {
|
|
36
39
|
id: number;
|
|
37
40
|
email: string;
|
|
38
41
|
name: string;
|
|
39
42
|
roles?: string[] | undefined;
|
|
40
43
|
organizationId?: number | undefined;
|
|
44
|
+
organizationName?: string | undefined;
|
|
41
45
|
} | null>;
|
|
42
46
|
isAuthenticated: import("vue").Ref<boolean, boolean>;
|
|
43
47
|
loading: import("vue").Ref<boolean, boolean>;
|
|
@@ -55,12 +59,14 @@ export declare const useAuthStore: import("pinia").StoreDefinition<"auth", Pick<
|
|
|
55
59
|
name: string;
|
|
56
60
|
roles?: string[] | undefined;
|
|
57
61
|
organizationId?: number | undefined;
|
|
62
|
+
organizationName?: string | undefined;
|
|
58
63
|
} | null, UserInfo | {
|
|
59
64
|
id: number;
|
|
60
65
|
email: string;
|
|
61
66
|
name: string;
|
|
62
67
|
roles?: string[] | undefined;
|
|
63
68
|
organizationId?: number | undefined;
|
|
69
|
+
organizationName?: string | undefined;
|
|
64
70
|
} | null>;
|
|
65
71
|
isAuthenticated: import("vue").Ref<boolean, boolean>;
|
|
66
72
|
loading: import("vue").Ref<boolean, boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.store.d.ts","sourceRoot":"","sources":["../../stores/auth.store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAKjE;;GAEG;AACH,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"auth.store.d.ts","sourceRoot":"","sources":["../../stores/auth.store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAKjE;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;yBAmBW,YAAY,KAAG,OAAO,CAAC,IAAI,CAAC;kBAsDrC,OAAO,CAAC,IAAI,CAAC;qBASV,OAAO,CAAC,IAAI,CAAC;wBA4Cd,QAAQ,KAAG,IAAI;;;;;;;;;;;;;;;;;;;;;;yBA3GR,YAAY,KAAG,OAAO,CAAC,IAAI,CAAC;kBAsDrC,OAAO,CAAC,IAAI,CAAC;qBASV,OAAO,CAAC,IAAI,CAAC;wBA4Cd,QAAQ,KAAG,IAAI;;;;;;;;;;;;;;;;;;;;;;yBA3GR,YAAY,KAAG,OAAO,CAAC,IAAI,CAAC;kBAsDrC,OAAO,CAAC,IAAI,CAAC;qBASV,OAAO,CAAC,IAAI,CAAC;wBA4Cd,QAAQ,KAAG,IAAI;iDAoB1C,CAAA"}
|
|
@@ -47,7 +47,8 @@ export const useAuthStore = defineStore('auth', () => {
|
|
|
47
47
|
? `${profile.firstName} ${profile.lastName}`
|
|
48
48
|
: profile.name || profile.email,
|
|
49
49
|
roles: rolesArray,
|
|
50
|
-
organizationId: profile.organizationId
|
|
50
|
+
organizationId: profile.organizationId,
|
|
51
|
+
organizationName: profile.organizationName
|
|
51
52
|
};
|
|
52
53
|
}
|
|
53
54
|
catch (profileError) {
|
|
@@ -250,7 +250,7 @@ export declare const useUserStore: import("pinia").StoreDefinition<"user", Pick<
|
|
|
250
250
|
setPageSize: (size: number) => void;
|
|
251
251
|
clearUsers: () => void;
|
|
252
252
|
setSelectedUser: (user: User | null) => void;
|
|
253
|
-
}, "
|
|
253
|
+
}, "users" | "total" | "loading" | "currentUser" | "selectedUser" | "stats" | "currentPage" | "pageSize">, Pick<{
|
|
254
254
|
users: import("vue").Ref<{
|
|
255
255
|
id: number;
|
|
256
256
|
email: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.types.d.ts","sourceRoot":"","sources":["../../types/auth.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,QAAQ,CAAA;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