@viridial/shared 1.0.70 → 1.0.71

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.
@@ -1 +1 @@
1
- {"version":3,"file":"plan.service.d.ts","sourceRoot":"","sources":["../../api/plan.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAE1E;;GAEG;AACH,eAAO,MAAM,WAAW;IACtB;;OAEG;wBACuB,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAYnD;;OAEG;gBACe,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxC;;OAEG;oBACmB,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK5C;;OAEG;kBACiB,OAAO,CAAC,IAAI,CAAC;IAKjC;;OAEG;iBACgB,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAW7C;;OAEG;eACc,MAAM,QAAQ,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAWzD;;OAEG;eACc,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGxC,CAAA"}
1
+ {"version":3,"file":"plan.service.d.ts","sourceRoot":"","sources":["../../api/plan.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAE1E;;GAEG;AACH,eAAO,MAAM,WAAW;IACtB;;OAEG;wBACuB,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAkBnD;;OAEG;gBACe,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxC;;OAEG;oBACmB,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK5C;;OAEG;kBACiB,OAAO,CAAC,IAAI,CAAC;IAKjC;;OAEG;iBACgB,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAW7C;;OAEG;eACc,MAAM,QAAQ,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAWzD;;OAEG;eACc,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGxC,CAAA"}
@@ -8,13 +8,20 @@ export const planService = {
8
8
  * Récupérer tous les plans
9
9
  */
10
10
  async getAll(activeOnly) {
11
- const response = await httpClient.get(API_ENDPOINTS.BILLING.PLANS.BASE);
12
- let plans = response.data || [];
13
- // Filtrer par actif si demandé
14
- if (activeOnly) {
15
- plans = plans.filter(plan => plan.active);
11
+ try {
12
+ const response = await httpClient.get(API_ENDPOINTS.BILLING.PLANS.BASE);
13
+ let plans = response.data || [];
14
+ // Filtrer par actif si demandé
15
+ if (activeOnly) {
16
+ plans = plans.filter(plan => plan.active);
17
+ }
18
+ return plans;
19
+ }
20
+ catch (error) {
21
+ console.error('Error fetching plans:', error);
22
+ // Retourner une liste vide plutôt que de throw pour permettre au composant de gérer l'erreur
23
+ return [];
16
24
  }
17
- return plans;
18
25
  },
19
26
  /**
20
27
  * Récupérer un plan par ID
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viridial/shared",
3
- "version": "1.0.70",
3
+ "version": "1.0.71",
4
4
  "type": "module",
5
5
  "description": "Shared modules for Real Estate frontend applications - Vue 3, TypeScript, Pinia, Axios",
6
6
  "main": "./dist/index.js",