@goweekdays/layer-common 1.4.2 → 1.4.4
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 +12 -0
- package/components/MemberMain.vue +7 -2
- package/components/RoleForm.vue +6 -3
- package/components/RolePermissionMain.vue +3 -4
- package/components/SwitchContext.vue +0 -1
- package/composables/useLedgerBilling.ts +24 -0
- package/composables/useVerification.ts +12 -0
- package/nuxt.config.ts +3 -0
- package/package.json +1 -1
- package/pages/index.vue +35 -14
- package/composables/usePayment.ts +0 -22
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @goweekdays/layer-common
|
|
2
2
|
|
|
3
|
+
## 1.4.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7488c0b: Add useLedgerBill
|
|
8
|
+
|
|
9
|
+
## 1.4.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 2baee76: Update role and permission components for dynamic app context
|
|
14
|
+
|
|
3
15
|
## 1.4.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -15,7 +15,13 @@
|
|
|
15
15
|
</v-col>
|
|
16
16
|
|
|
17
17
|
<v-col cols="12">
|
|
18
|
-
<v-card
|
|
18
|
+
<v-card
|
|
19
|
+
width="100%"
|
|
20
|
+
variant="outlined"
|
|
21
|
+
border="thin"
|
|
22
|
+
rounded="lg"
|
|
23
|
+
:loading="loading"
|
|
24
|
+
>
|
|
19
25
|
<v-toolbar density="compact" color="grey-lighten-4">
|
|
20
26
|
<template #prepend>
|
|
21
27
|
<v-btn fab icon density="comfortable" @click="getAll()">
|
|
@@ -62,7 +68,6 @@
|
|
|
62
68
|
hide-default-header
|
|
63
69
|
hide-default-footer
|
|
64
70
|
style="max-height: calc(100vh - (126px))"
|
|
65
|
-
:loading="loading"
|
|
66
71
|
@click:row="handleRowClick"
|
|
67
72
|
>
|
|
68
73
|
</v-data-table>
|
package/components/RoleForm.vue
CHANGED
|
@@ -268,12 +268,15 @@ const {
|
|
|
268
268
|
status: permissionsReqStatus,
|
|
269
269
|
refresh: refreshPermissions,
|
|
270
270
|
} = await useLazyAsyncData(
|
|
271
|
-
`role-form-get-all-permission-${
|
|
271
|
+
`role-form-get-all-permission-${role.value.app}`,
|
|
272
272
|
() =>
|
|
273
273
|
getAllPerm({
|
|
274
|
-
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
|
-
|
|
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
|
|
232
|
+
watch: [page],
|
|
234
233
|
}
|
|
235
234
|
);
|
|
236
235
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export default function useLedgerBilling() {
|
|
2
|
+
function getAll({ org = "", search = "", page = 1, status = "" } = {}) {
|
|
3
|
+
return $fetch<Record<string, any>>("/api/ledger/billings", {
|
|
4
|
+
method: "GET",
|
|
5
|
+
query: {
|
|
6
|
+
org,
|
|
7
|
+
search,
|
|
8
|
+
page,
|
|
9
|
+
status,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function getById(id = "") {
|
|
15
|
+
return $fetch<Record<string, any>>(`/api/ledger/billings/id/${id}`, {
|
|
16
|
+
method: "GET",
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
getAll,
|
|
22
|
+
getById,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
@@ -39,10 +39,22 @@ export default function useUser() {
|
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
function orgSetupFee(
|
|
43
|
+
value: Pick<TOrg, "name" | "email" | "contact" | "createdBy"> & {
|
|
44
|
+
seats: number;
|
|
45
|
+
}
|
|
46
|
+
) {
|
|
47
|
+
return $fetch<Record<string, any>>("/api/verifications/org-setup-fee", {
|
|
48
|
+
method: "POST",
|
|
49
|
+
body: value,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
42
53
|
return {
|
|
43
54
|
getVerifications,
|
|
44
55
|
inviteMember,
|
|
45
56
|
signUp,
|
|
46
57
|
cancelInvite,
|
|
58
|
+
orgSetupFee,
|
|
47
59
|
};
|
|
48
60
|
}
|
package/nuxt.config.ts
CHANGED
|
@@ -61,6 +61,9 @@ export default defineNuxtConfig({
|
|
|
61
61
|
"/api/plans/**": {
|
|
62
62
|
proxy: `${process.env.API_CORE}/api/plans/**`,
|
|
63
63
|
},
|
|
64
|
+
"/api/payments/**": {
|
|
65
|
+
proxy: `${process.env.API_CORE}/api/payments/**`,
|
|
66
|
+
},
|
|
64
67
|
"/api/members/**": { proxy: `${process.env.API_CORE}/api/members/**` },
|
|
65
68
|
"/api/teams/**": { proxy: `${process.env.API_CORE}/api/teams/**` },
|
|
66
69
|
"/api/entities/**": { proxy: `${process.env.API_CORE}/api/entities/**` },
|
package/package.json
CHANGED
package/pages/index.vue
CHANGED
|
@@ -5,18 +5,39 @@
|
|
|
5
5
|
</v-col>
|
|
6
6
|
|
|
7
7
|
<v-col cols="12" class="text-center mt-6" v-if="currentUser">
|
|
8
|
-
<v-row no-gutters
|
|
9
|
-
<v-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
<v-row no-gutters>
|
|
9
|
+
<v-col cols="12" class="mb-2">
|
|
10
|
+
<v-row no-gutters justify="center">
|
|
11
|
+
<v-btn
|
|
12
|
+
class="text-none"
|
|
13
|
+
rounded="xl"
|
|
14
|
+
variant="tonal"
|
|
15
|
+
size="large"
|
|
16
|
+
@click="handleSignin()"
|
|
17
|
+
>
|
|
18
|
+
<span class="d-inline-block text-truncate" style="width: 250px">
|
|
19
|
+
login as {{ currentUser?.email }}
|
|
20
|
+
</span>
|
|
21
|
+
</v-btn>
|
|
22
|
+
</v-row>
|
|
23
|
+
</v-col>
|
|
24
|
+
|
|
25
|
+
<v-col cols="12">
|
|
26
|
+
<v-row no-gutters justify="center">
|
|
27
|
+
<v-btn
|
|
28
|
+
class="text-none"
|
|
29
|
+
rounded="xl"
|
|
30
|
+
variant="flat"
|
|
31
|
+
color="black"
|
|
32
|
+
size="large"
|
|
33
|
+
:to="{ name: 'login' }"
|
|
34
|
+
>
|
|
35
|
+
<span class="d-inline-block text-truncate" style="width: 250px">
|
|
36
|
+
login with another account
|
|
37
|
+
</span>
|
|
38
|
+
</v-btn>
|
|
39
|
+
</v-row>
|
|
40
|
+
</v-col>
|
|
20
41
|
</v-row>
|
|
21
42
|
</v-col>
|
|
22
43
|
|
|
@@ -31,7 +52,7 @@
|
|
|
31
52
|
size="large"
|
|
32
53
|
:to="{ name: 'login' }"
|
|
33
54
|
>
|
|
34
|
-
|
|
55
|
+
Login
|
|
35
56
|
</v-btn>
|
|
36
57
|
</v-col>
|
|
37
58
|
|
|
@@ -64,7 +85,7 @@ const isPartnerApp = computed(() =>
|
|
|
64
85
|
[
|
|
65
86
|
"org",
|
|
66
87
|
"marketplace",
|
|
67
|
-
"
|
|
88
|
+
"service",
|
|
68
89
|
"stay",
|
|
69
90
|
"ride",
|
|
70
91
|
"eat",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export default function usePayment() {
|
|
2
|
-
function getPayments({
|
|
3
|
-
search = "",
|
|
4
|
-
id = "",
|
|
5
|
-
page = 1,
|
|
6
|
-
status = "completed",
|
|
7
|
-
} = {}) {
|
|
8
|
-
return $fetch<Record<string, any>>("/api/payments", {
|
|
9
|
-
method: "GET",
|
|
10
|
-
query: {
|
|
11
|
-
search,
|
|
12
|
-
id,
|
|
13
|
-
page,
|
|
14
|
-
status,
|
|
15
|
-
},
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return {
|
|
20
|
-
getPayments,
|
|
21
|
-
};
|
|
22
|
-
}
|