@goweekdays/layer-common 1.5.2 → 1.5.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @goweekdays/layer-common
2
2
 
3
+ ## 1.5.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 8a5737a: Remove seats property from orgSetupFee parameter
8
+
3
9
  ## 1.5.2
4
10
 
5
11
  ### Patch Changes
@@ -63,6 +63,18 @@ export default function useOrg() {
63
63
  promoCode: "",
64
64
  });
65
65
 
66
+ function getCompanies(search = "") {
67
+ return useNuxtApp().$api<Record<string, any>[]>(
68
+ "/api/organizations/company",
69
+ {
70
+ method: "GET",
71
+ query: {
72
+ search,
73
+ },
74
+ }
75
+ );
76
+ }
77
+
66
78
  return {
67
79
  org,
68
80
  add,
@@ -70,5 +82,6 @@ export default function useOrg() {
70
82
  getByUserId,
71
83
  getById,
72
84
  updateById,
85
+ getCompanies,
73
86
  };
74
87
  }
@@ -277,6 +277,16 @@ export default function useUtils() {
277
277
  return (v && v >= 1) || "Value must be greater or equal to 1";
278
278
  }
279
279
 
280
+ function getCurrencySymbol(currency: string): string {
281
+ if (!currency) return "";
282
+ return new Intl.NumberFormat(undefined, {
283
+ style: "currency",
284
+ currency,
285
+ })
286
+ .formatToParts(0)
287
+ .find((part) => part.type === "currency")!.value;
288
+ }
289
+
280
290
  return {
281
291
  requiredRule,
282
292
  emailRule,
@@ -304,5 +314,6 @@ export default function useUtils() {
304
314
  setRouteParams,
305
315
  positiveNumberRule,
306
316
  validateKey,
317
+ getCurrencySymbol,
307
318
  };
308
319
  }
@@ -46,9 +46,7 @@ export default function useUser() {
46
46
  }
47
47
 
48
48
  function orgSetupFee(
49
- value: Pick<TOrg, "name" | "email" | "contact" | "createdBy"> & {
50
- seats: number;
51
- }
49
+ value: Pick<TOrg, "name" | "email" | "contact" | "createdBy">
52
50
  ) {
53
51
  return useNuxtApp().$api<Record<string, any>>(
54
52
  "/api/verifications/org-setup-fee",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@goweekdays/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "1.5.2",
5
+ "version": "1.5.3",
6
6
  "main": "./nuxt.config.ts",
7
7
  "publishConfig": {
8
8
  "access": "public"