@iservice365/layer-common 1.0.6 → 1.0.7

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
  # @iservice365/layer-common
2
2
 
3
+ ## 1.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - 09115c2: Fixed user and member invite
8
+
3
9
  ## 1.0.6
4
10
 
5
11
  ### Patch Changes
@@ -156,13 +156,18 @@ const props = defineProps({
156
156
  const emit = defineEmits(["cancel", "success", "success:create-more"]);
157
157
 
158
158
  const validForm = ref(false);
159
+ const app = computed(() => useRuntimeConfig().public.APP ?? "");
159
160
 
160
161
  const invite = ref<Record<string, any>>({
161
162
  email: "",
162
163
  app: "organization",
163
164
  role: "",
165
+ org: "",
164
166
  });
165
167
 
168
+ invite.value.app = app.value ?? "organization";
169
+ invite.value.org = props.org ?? "";
170
+
166
171
  if (props.mode === "edit") {
167
172
  invite.value.email = props.invite.email;
168
173
  invite.value.app = props.invite.metadata?.app;
@@ -181,8 +186,6 @@ const roles = ref<Array<Record<string, any>>>([]);
181
186
 
182
187
  const { getRoles } = useRole();
183
188
 
184
- const app = computed(() => invite.value.metadata?.app ?? "");
185
-
186
189
  const { data: RolesData } = await useLazyAsyncData(
187
190
  "get-roles-by-type",
188
191
  () => getRoles({ org: props.org, type: app.value, limit: 50 }),
@@ -1,8 +1,14 @@
1
1
  export default function useUser() {
2
- function inviteUser({ email = "", app = "", role = "", name = "" } = {}) {
2
+ function inviteUser({
3
+ email = "",
4
+ app = "",
5
+ role = "",
6
+ name = "",
7
+ org = "",
8
+ } = {}) {
3
9
  return useNuxtApp().$api<Record<string, any>>("/api/auth/invite", {
4
10
  method: "POST",
5
- body: { email, app, role, name },
11
+ body: { email, app, role, name, org },
6
12
  });
7
13
  }
8
14
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@iservice365/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "1.0.6",
5
+ "version": "1.0.7",
6
6
  "main": "./nuxt.config.ts",
7
7
  "scripts": {
8
8
  "dev": "nuxi dev .playground",