@goweekdays/layer-common 1.4.2 → 1.4.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.4.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 2baee76: Update role and permission components for dynamic app context
8
+
3
9
  ## 1.4.2
4
10
 
5
11
  ### Patch Changes
@@ -268,12 +268,15 @@ const {
268
268
  status: permissionsReqStatus,
269
269
  refresh: refreshPermissions,
270
270
  } = await useLazyAsyncData(
271
- `role-form-get-all-permission-${localProps.app}`,
271
+ `role-form-get-all-permission-${role.value.app}`,
272
272
  () =>
273
273
  getAllPerm({
274
- app: localProps.app,
274
+ app: role.value.app,
275
275
  limit: 200,
276
- })
276
+ }),
277
+ {
278
+ watch: [() => role.value.app],
279
+ }
277
280
  );
278
281
 
279
282
  const loadingPermissions = computed(
@@ -188,7 +188,7 @@ function setRole({
188
188
  JSON.parse(
189
189
  JSON.stringify({
190
190
  ...data,
191
- app: mode === "admin" ? props.app : data.app,
191
+ app: mode === "admin" || mode === "add" ? props.app : data.app,
192
192
  })
193
193
  )
194
194
  );
@@ -221,16 +221,15 @@ const {
221
221
  refresh: getRoles,
222
222
  status: getRoleReqStatus,
223
223
  } = useLazyAsyncData(
224
- "roles-permissions-get-all",
224
+ `roles-permissions-get-all-by-${props.app}-${props.org}-page-${page.value}`,
225
225
  () =>
226
226
  _getRoles({
227
227
  page: page.value,
228
- search: headerSearch.value,
229
228
  org: props.org,
230
229
  app: isOrg.value ? "" : props.app,
231
230
  }),
232
231
  {
233
- watch: [page, headerSearch],
232
+ watch: [page],
234
233
  }
235
234
  );
236
235
 
@@ -65,7 +65,6 @@
65
65
  const prop = defineProps({
66
66
  title: {
67
67
  type: String,
68
- required: true,
69
68
  default: "Switch Context",
70
69
  },
71
70
  items: {
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.4.2",
5
+ "version": "1.4.3",
6
6
  "main": "./nuxt.config.ts",
7
7
  "publishConfig": {
8
8
  "access": "public"
package/pages/index.vue CHANGED
@@ -64,7 +64,7 @@ const isPartnerApp = computed(() =>
64
64
  [
65
65
  "org",
66
66
  "marketplace",
67
- "services",
67
+ "service",
68
68
  "stay",
69
69
  "ride",
70
70
  "eat",