@unsource/ui 2.9.31 → 2.9.33
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
CHANGED
|
@@ -27,6 +27,7 @@ export declare const useUserId: () => import("#app").CookieRef<string | null | u
|
|
|
27
27
|
export declare const useToken: () => import("#app").CookieRef<string | null | undefined>;
|
|
28
28
|
export declare const useProviderId: () => import("#app").CookieRef<string | null | undefined>;
|
|
29
29
|
export declare const useUserType: () => import("#app").CookieRef<string | null | undefined>;
|
|
30
|
+
export declare const useClient: () => import("#app").CookieRef<string | null | undefined>;
|
|
30
31
|
export declare const SettingToType: (setting: ServiceSetting) => ServiceSettingType;
|
|
31
32
|
export declare const NotInProcessBooking: (e: Booking["status"]) => boolean;
|
|
32
33
|
export declare const MinPrice: (bookingSetting: BookingSetting) => number | object | null | undefined;
|
|
@@ -27,6 +27,9 @@ export const useProviderId = () => useCookie("providerId", {
|
|
|
27
27
|
export const useUserType = () => useCookie("userType", {
|
|
28
28
|
maxAge: 365 * 24 * 60 * 60 * 1e3
|
|
29
29
|
});
|
|
30
|
+
export const useClient = () => useCookie("client", {
|
|
31
|
+
maxAge: 365 * 24 * 60 * 60 * 1e3
|
|
32
|
+
});
|
|
30
33
|
export const SettingToType = (setting) => ({
|
|
31
34
|
..._pick(setting, ["id", "price", "discount", "duration", "subCategoryKey", "description"]),
|
|
32
35
|
title: setting.subCategory?.title || "",
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
useUserId
|
|
5
5
|
} from "./reuseable.js";
|
|
6
6
|
import { _set, useNuxtApp, useRoute } from "#imports";
|
|
7
|
+
import { useState } from "#build/imports";
|
|
7
8
|
export const getForms = async (name) => {
|
|
8
9
|
const { result } = await useGet("/Form", {
|
|
9
10
|
params: {
|
|
@@ -96,10 +97,12 @@ export const getOptions = async (key) => {
|
|
|
96
97
|
export const getMyTransactions = async (q = {}) => {
|
|
97
98
|
const userId = useUserId();
|
|
98
99
|
if (!userId.value) return [];
|
|
100
|
+
const wallets = useState("wallet", () => []);
|
|
101
|
+
const walletsId = wallets.value.map((e) => e.id);
|
|
99
102
|
const { result } = await useGet("/transaction", {
|
|
100
103
|
params: {
|
|
101
|
-
"$w.OR.0.
|
|
102
|
-
"$w.OR.1.toWallet
|
|
104
|
+
"$w.OR.0.walletId.$in": walletsId,
|
|
105
|
+
"$w.OR.1.toWallet.$in": walletsId,
|
|
103
106
|
"$w.OR.2.userId": userId.value,
|
|
104
107
|
"$w.status:not": "PENDING",
|
|
105
108
|
"$i.gateway.$i.gateway": true,
|