@unsource/ui 2.7.16 → 2.7.18
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/dist/module.json +1 -1
- package/dist/runtime/components/UnCheckboxItem.vue +1 -1
- package/dist/runtime/components/UnTab.d.vue.ts +1 -1
- package/dist/runtime/components/UnTab.vue +2 -3
- package/dist/runtime/components/UnTab.vue.d.ts +1 -1
- package/dist/runtime/composables/services.d.ts +2 -1
- package/dist/runtime/composables/services.js +23 -7
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="px-4 py-3 flex items-center gap-2 transition duration-300 hover:bg-primary-100"
|
|
3
|
+
class="select-none group px-4 py-3 flex items-center gap-2 transition duration-300 hover:bg-primary-100"
|
|
4
4
|
:class="{ 'opacity-50 grayscale': disabled, 'disable': disabled, 'selected': selected }"
|
|
5
5
|
@click="toggle"
|
|
6
6
|
>
|
|
@@ -10,7 +10,7 @@ type __VLS_Props = {
|
|
|
10
10
|
routable?: boolean;
|
|
11
11
|
routeTarget?: 'query' | 'hash' | 'name' | 'params';
|
|
12
12
|
label?: string;
|
|
13
|
-
customClass?: Partial<Record<'label' | '
|
|
13
|
+
customClass?: Partial<Record<'label' | 'title' | 'icon', string>>;
|
|
14
14
|
};
|
|
15
15
|
type __VLS_ModelProps = {
|
|
16
16
|
modelValue?: string | number;
|
|
@@ -5,11 +5,10 @@
|
|
|
5
5
|
:key="item.value"
|
|
6
6
|
:class="[
|
|
7
7
|
customClass.label,
|
|
8
|
-
item?.value === value ?
|
|
9
|
-
item?.value === value ? 'font-semibold bg-primary-500 cursor-default border-b-primary' : 'border-b-border',
|
|
8
|
+
item?.value === value ? 'selected font-semibold bg-primary-500 cursor-default border-b-primary' : 'border-b-border',
|
|
10
9
|
mini ? 'px-3' : ' px-4'
|
|
11
10
|
]"
|
|
12
|
-
class="flex gap-2 justify-center items-center flex-grow basis-1 border-b-(2 solid) cursor-pointer p-3 text-sm"
|
|
11
|
+
class="group flex gap-2 justify-center items-center flex-grow basis-1 border-b-(2 solid) cursor-pointer p-3 text-sm"
|
|
13
12
|
@click="addToQuery(item)"
|
|
14
13
|
>
|
|
15
14
|
<input
|
|
@@ -10,7 +10,7 @@ type __VLS_Props = {
|
|
|
10
10
|
routable?: boolean;
|
|
11
11
|
routeTarget?: 'query' | 'hash' | 'name' | 'params';
|
|
12
12
|
label?: string;
|
|
13
|
-
customClass?: Partial<Record<'label' | '
|
|
13
|
+
customClass?: Partial<Record<'label' | 'title' | 'icon', string>>;
|
|
14
14
|
};
|
|
15
15
|
type __VLS_ModelProps = {
|
|
16
16
|
modelValue?: string | number;
|
|
@@ -7,7 +7,8 @@ export declare const getSections: () => Promise<Section | never[]>;
|
|
|
7
7
|
export declare const getCategorySection: (data: Slider) => Promise<InputOption[]>;
|
|
8
8
|
export declare const getOption: (key: string, params?: {}) => Promise<InputOption | null>;
|
|
9
9
|
export declare const getOptions: (key: string) => Promise<InputOption[]>;
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const getMyTransactions: (q?: {}) => Promise<Transaction[] | undefined>;
|
|
11
|
+
export declare const getTransactions: (q?: {}) => Promise<Transaction[] | undefined>;
|
|
11
12
|
export declare const saveUser: (user: User) => Promise<Profile | undefined>;
|
|
12
13
|
export declare const saveProfile: (profile: Profile) => Promise<Profile | undefined>;
|
|
13
14
|
export declare const saveWithdraw: (withdraw: any) => Promise<unknown>;
|
|
@@ -90,15 +90,14 @@ export const getOptions = async (key) => {
|
|
|
90
90
|
});
|
|
91
91
|
return result || [];
|
|
92
92
|
};
|
|
93
|
-
export const
|
|
93
|
+
export const getMyTransactions = async (q = {}) => {
|
|
94
94
|
const userId = useUserId();
|
|
95
|
+
if (!userId.value) return [];
|
|
95
96
|
const { result } = await useGet("/transaction", {
|
|
96
97
|
params: {
|
|
97
|
-
"$w.OR.0.
|
|
98
|
-
"$w.OR.1.
|
|
99
|
-
"$w.OR.2.userId":
|
|
100
|
-
"$w.OR.0.walletId": justWallet ? walletIds : void 0,
|
|
101
|
-
"$w.OR.1.toWalletId": justWallet ? walletIds : void 0,
|
|
98
|
+
"$w.OR.0.wallet.userId": userId.value,
|
|
99
|
+
"$w.OR.1.toWallet.userId": userId.value,
|
|
100
|
+
"$w.OR.2.userId": userId.value,
|
|
102
101
|
"$w.status:not": "PENDING",
|
|
103
102
|
"$i.gateway.$i.gateway": true,
|
|
104
103
|
"$i.gateway.$i.coin": true,
|
|
@@ -106,7 +105,24 @@ export const getTransactions = async (walletIds, justWallet = false) => {
|
|
|
106
105
|
"$i.toWallet.$i.coin": true,
|
|
107
106
|
"$o.createdAt": "desc",
|
|
108
107
|
"$i.wallet.$i.user.$i.profile": true,
|
|
109
|
-
"$i.toWallet.$i.user.$i.profile": true
|
|
108
|
+
"$i.toWallet.$i.user.$i.profile": true,
|
|
109
|
+
...q
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
return result;
|
|
113
|
+
};
|
|
114
|
+
export const getTransactions = async (q = {}) => {
|
|
115
|
+
const { result } = await useGet("/transaction", {
|
|
116
|
+
params: {
|
|
117
|
+
"$w.status:not": "PENDING",
|
|
118
|
+
"$i.gateway.$i.gateway": true,
|
|
119
|
+
"$i.gateway.$i.coin": true,
|
|
120
|
+
"$i.wallet.$i.coin": true,
|
|
121
|
+
"$i.toWallet.$i.coin": true,
|
|
122
|
+
"$o.createdAt": "desc",
|
|
123
|
+
"$i.wallet.$i.user.$i.profile": true,
|
|
124
|
+
"$i.toWallet.$i.user.$i.profile": true,
|
|
125
|
+
...q
|
|
110
126
|
}
|
|
111
127
|
});
|
|
112
128
|
return result;
|