@opexa/portal-components 0.0.895 → 0.0.897
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/components/DepositStatus/DepositStatus.client.d.ts +6 -0
- package/dist/components/DepositStatus/DepositStatus.client.js +38 -0
- package/dist/components/DepositStatus/DepositStatus.d.ts +3 -0
- package/dist/components/DepositStatus/DepositStatus.js +21 -0
- package/dist/components/DepositStatus/index.d.ts +1 -0
- package/dist/components/DepositStatus/index.js +1 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayGCashDeposit/AurixPayGCashDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/AurixPayGrabPayDeposit/AurixPayGrabPayDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/AurixPayQRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/useAurixPayQRPHDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/useAurixPayQRPHDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/Deposit.js +44 -10
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/VentajaWithdrawal/VentajaWithdrawal.js +76 -24
- package/dist/components/KYC/KYCNonPagCor/PersonalInformation.js +36 -19
- package/dist/services/queries.d.ts +1 -1
- package/dist/services/queries.js +33 -30
- package/dist/utils/sanitizeGamesSearch.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Image from 'next/image';
|
|
4
|
+
import { useRouter } from 'next/navigation';
|
|
5
|
+
import { useCooldown } from '../../client/hooks/useCooldown.js';
|
|
6
|
+
import { useDepositQuery } from '../../client/hooks/useDepositQuery.js';
|
|
7
|
+
import { CheckCircleIcon } from '../../icons/CheckCircleIcon.js';
|
|
8
|
+
import { XCircleIcon } from '../../icons/XCircleIcon.js';
|
|
9
|
+
import { Button } from '../../ui/Button/index.js';
|
|
10
|
+
export function DepositStatus__client(props) {
|
|
11
|
+
const query = useDepositQuery(props.id);
|
|
12
|
+
const router = useRouter();
|
|
13
|
+
const closeWindow = () => {
|
|
14
|
+
window.close();
|
|
15
|
+
/* fail safe */
|
|
16
|
+
setTimeout(() => {
|
|
17
|
+
router.push('/');
|
|
18
|
+
}, 2500);
|
|
19
|
+
};
|
|
20
|
+
const cooldown = useCooldown({
|
|
21
|
+
autoplay: true,
|
|
22
|
+
allowPause: false,
|
|
23
|
+
onCooldown: closeWindow,
|
|
24
|
+
});
|
|
25
|
+
if (query.data == null)
|
|
26
|
+
return null;
|
|
27
|
+
return (_jsx("div", { className: "flex min-h-dvh flex-col items-center justify-center p-4", children: _jsxs("main", { className: "mx-auto w-[26rem] max-w-full rounded-xl bg-bg-secondary p-10", children: [_jsx(Image, { src: props.logo, alt: "Logo", height: 52, width: 232, className: "mx-auto h-13 w-auto" }), _jsxs("div", { className: "mt-20", children: [(query.data.status === 'CONFIRMED' ||
|
|
28
|
+
query.data.status === 'APPROVED') && (_jsx(CheckCircleIcon, { className: "mx-auto size-12 text-text-success-primary" })), (query.data.status === 'REJECTED' ||
|
|
29
|
+
query.data.status === 'FAILED') && (_jsx(XCircleIcon, { className: "mx-auto size-12 text-text-error-primary" }))] }), _jsxs("h2", { className: "mt-6 text-center font-bold text-2xl", children: [(query.data.status === 'CONFIRMED' ||
|
|
30
|
+
query.data.status === 'APPROVED') &&
|
|
31
|
+
'Success', (query.data.status === 'REJECTED' ||
|
|
32
|
+
query.data.status === 'FAILED') &&
|
|
33
|
+
'Failed'] }), _jsxs("p", { className: "mt-1 text-center font-medium text-text-secondary-700", children: [(query.data.status === 'CONFIRMED' ||
|
|
34
|
+
query.data.status === 'APPROVED') &&
|
|
35
|
+
'Your deposit request has been credited', (query.data.status === 'REJECTED' ||
|
|
36
|
+
query.data.status === 'FAILED') &&
|
|
37
|
+
'Sorry, your deposit request didn’t go through. You can try to deposit again on the Deposit page.'] }), _jsxs("p", { className: "mt-18 px-4 text-center text-sm text-text-secondary-700", children: ["You will be auto-redirected to the deposit page shortly, in about", ' ', _jsx("span", { className: "font-bold text-base text-brand-500", children: cooldown.countdown }), ' ', "second/s."] }), _jsx(Button, { className: "mt-6", onClick: closeWindow, children: "Back to deposit page" })] }) }));
|
|
38
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { redirect } from 'next/navigation';
|
|
3
|
+
import { prefetchDepositQuery } from '../../server/utils/prefetchDepositQuery.js';
|
|
4
|
+
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
5
|
+
import { getDepositQueryKey } from '../../utils/queryKeys.js';
|
|
6
|
+
import { DepositStatus__client, } from './DepositStatus.client.js';
|
|
7
|
+
export async function DepositStatus(props) {
|
|
8
|
+
await prefetchDepositQuery(props.id);
|
|
9
|
+
const client = getQueryClient();
|
|
10
|
+
const deposit = client.getQueryData(getDepositQueryKey(props.id));
|
|
11
|
+
if (deposit == null) {
|
|
12
|
+
return redirect('/');
|
|
13
|
+
}
|
|
14
|
+
if (deposit.status !== 'CONFIRMED' &&
|
|
15
|
+
deposit.status !== 'APPROVED' &&
|
|
16
|
+
deposit.status !== 'REJECTED' &&
|
|
17
|
+
deposit.status !== 'FAILED') {
|
|
18
|
+
return redirect('/');
|
|
19
|
+
}
|
|
20
|
+
return _jsx(DepositStatus__client, { ...props });
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DepositStatus';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DepositStatus.js';
|
package/dist/components/DepositWithdrawal/Deposit/AurixPayGCashDeposit/AurixPayGCashDeposit.js
CHANGED
|
@@ -175,7 +175,7 @@ export function AurixPayGCashDeposit() {
|
|
|
175
175
|
const redirectUrl = (() => {
|
|
176
176
|
const path = depositWithdrawalProps.depositSuccessPageUrl ?? '/deposits/:id/status';
|
|
177
177
|
const origin = window.location.origin.includes('localhost')
|
|
178
|
-
? 'https://uat.powerplay.ph
|
|
178
|
+
? 'https://uat.powerplay.ph' +
|
|
179
179
|
depositWithdrawalProps.depositSuccessPageUrl
|
|
180
180
|
: window.location.origin;
|
|
181
181
|
return `${origin}${path}`;
|
package/dist/components/DepositWithdrawal/Deposit/AurixPayGrabPayDeposit/AurixPayGrabPayDeposit.js
CHANGED
|
@@ -175,7 +175,7 @@ export function AurixPayPayMayaDeposit() {
|
|
|
175
175
|
const redirectUrl = (() => {
|
|
176
176
|
const path = depositWithdrawalProps.depositSuccessPageUrl ?? '/deposits/:id/status';
|
|
177
177
|
const origin = window.location.origin.includes('localhost')
|
|
178
|
-
? 'https://uat.powerplay.ph
|
|
178
|
+
? 'https://uat.powerplay.ph' +
|
|
179
179
|
depositWithdrawalProps.depositSuccessPageUrl
|
|
180
180
|
: window.location.origin;
|
|
181
181
|
return `${origin}${path}`;
|
package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.js
CHANGED
|
@@ -175,7 +175,7 @@ export function AurixPayGrabPayDeposit() {
|
|
|
175
175
|
const redirectUrl = (() => {
|
|
176
176
|
const path = depositWithdrawalProps.depositSuccessPageUrl ?? '/deposits/:id/status';
|
|
177
177
|
const origin = window.location.origin.includes('localhost')
|
|
178
|
-
? 'https://uat.powerplay.ph
|
|
178
|
+
? 'https://uat.powerplay.ph' +
|
|
179
179
|
depositWithdrawalProps.depositSuccessPageUrl
|
|
180
180
|
: window.location.origin;
|
|
181
181
|
return `${origin}${path}`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const AurixPayQRPHDepositContext: (props: {
|
|
2
2
|
value: {
|
|
3
|
-
status: "
|
|
3
|
+
status: "confirmed" | "failed" | "idle" | "generating-qr-code" | "qr-code-generated";
|
|
4
4
|
deposit: import("../../../../types").Deposit | null;
|
|
5
5
|
errorMessage: {
|
|
6
6
|
name: string;
|
|
@@ -13,7 +13,7 @@ export declare const AurixPayQRPHDepositContext: (props: {
|
|
|
13
13
|
} & {
|
|
14
14
|
children?: import("react").ReactNode | undefined;
|
|
15
15
|
}) => React.ReactNode, useAurixPayQRPHDepositContext: () => {
|
|
16
|
-
status: "
|
|
16
|
+
status: "confirmed" | "failed" | "idle" | "generating-qr-code" | "qr-code-generated";
|
|
17
17
|
deposit: import("../../../../types").Deposit | null;
|
|
18
18
|
errorMessage: {
|
|
19
19
|
name: string;
|
package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/useAurixPayQRPHDeposit.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export interface GenerateQRCodeInput {
|
|
|
5
5
|
promo?: string | null;
|
|
6
6
|
}
|
|
7
7
|
export declare function useAurixPayQRPHDeposit(): {
|
|
8
|
-
status: "
|
|
8
|
+
status: "confirmed" | "failed" | "idle" | "generating-qr-code" | "qr-code-generated";
|
|
9
9
|
deposit: Deposit | null;
|
|
10
10
|
errorMessage: {
|
|
11
11
|
name: string;
|
package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/useAurixPayQRPHDeposit.js
CHANGED
|
@@ -65,7 +65,7 @@ export function useAurixPayQRPHDeposit() {
|
|
|
65
65
|
const redirectUrl = (() => {
|
|
66
66
|
const path = depositWithdrawalProps.depositSuccessPageUrl ?? '/deposits/:id/status';
|
|
67
67
|
const origin = window.location.origin.includes('localhost')
|
|
68
|
-
? 'https://uat.powerplay.ph
|
|
68
|
+
? 'https://uat.powerplay.ph' +
|
|
69
69
|
depositWithdrawalProps.depositSuccessPageUrl
|
|
70
70
|
: window.location.origin;
|
|
71
71
|
return `${origin}${path}`;
|
|
@@ -8,10 +8,6 @@ import { AlertCircleIcon } from '../../../icons/AlertCircleIcon.js';
|
|
|
8
8
|
import { SpinnerIcon } from '../../../icons/SpinnerIcon.js';
|
|
9
9
|
import { onMobileDevice } from '../../../utils/onMobileDevice.js';
|
|
10
10
|
import { PaymentMethods } from '../PaymentMethods.js';
|
|
11
|
-
import { AurixPayGCashDeposit } from './AurixPayGCashDeposit/AurixPayGCashDeposit.js';
|
|
12
|
-
import { AurixPayPayMayaDeposit } from './AurixPayGrabPayDeposit/AurixPayGrabPayDeposit.js';
|
|
13
|
-
import { AurixPayGrabPayDeposit } from './AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.js';
|
|
14
|
-
import { AurixPayQRPHDeposit } from './AurixPayQRPHDeposit/AurixPayQRPHDeposit.js';
|
|
15
11
|
const QRPHDeposit = lazy(() => import('./QRPHDeposit/QRPHDeposit.js').then((m) => ({ default: m.QRPHDeposit })));
|
|
16
12
|
const GCashDeposit = lazy(() => import('./GCashDeposit/GCashDeposit.js').then((m) => ({
|
|
17
13
|
default: m.GCashDeposit,
|
|
@@ -52,6 +48,26 @@ export function Deposit() {
|
|
|
52
48
|
const paymentSettingsQuery = usePaymentSettingsQuery();
|
|
53
49
|
const paymentSettings = paymentSettingsQuery.data;
|
|
54
50
|
const featureFlag = useFeatureFlag();
|
|
51
|
+
const nodeEnv = (process.env.NEXT_PUBLIC_ENVIRONMENT ?? '');
|
|
52
|
+
const enableAurix = nodeEnv === 'development' || nodeEnv === 'staging';
|
|
53
|
+
const aurixComponents = useMemo(() => {
|
|
54
|
+
if (!enableAurix)
|
|
55
|
+
return null;
|
|
56
|
+
return {
|
|
57
|
+
gcash: lazy(() => import('./AurixPayGCashDeposit/AurixPayGCashDeposit.js').then((m) => ({
|
|
58
|
+
default: m.AurixPayGCashDeposit,
|
|
59
|
+
}))),
|
|
60
|
+
payMaya: lazy(() => import('./AurixPayGrabPayDeposit/AurixPayGrabPayDeposit.js').then((m) => ({
|
|
61
|
+
default: m.AurixPayPayMayaDeposit,
|
|
62
|
+
}))),
|
|
63
|
+
grabPay: lazy(() => import('./AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.js').then((m) => ({
|
|
64
|
+
default: m.AurixPayGrabPayDeposit,
|
|
65
|
+
}))),
|
|
66
|
+
qrph: lazy(() => import('./AurixPayQRPHDeposit/AurixPayQRPHDeposit.js').then((m) => ({
|
|
67
|
+
default: m.AurixPayQRPHDeposit,
|
|
68
|
+
}))),
|
|
69
|
+
};
|
|
70
|
+
}, [enableAurix]);
|
|
55
71
|
const enabledPaymentMethods = useMemo(() => {
|
|
56
72
|
const l = [];
|
|
57
73
|
if (onMaya) {
|
|
@@ -113,20 +129,26 @@ export function Deposit() {
|
|
|
113
129
|
},
|
|
114
130
|
{
|
|
115
131
|
method: 'AURIX_PAY_GCASH',
|
|
116
|
-
enabled:
|
|
132
|
+
enabled: enableAurix &&
|
|
133
|
+
paymentSettings?.aurixPayGCashDepositGatewaySettings?.[enabledKey] &&
|
|
117
134
|
featureFlag.enabled,
|
|
118
135
|
},
|
|
119
136
|
{
|
|
120
137
|
method: 'AURIX_PAY_GRAB_PAY',
|
|
121
|
-
enabled:
|
|
138
|
+
enabled: enableAurix &&
|
|
139
|
+
paymentSettings?.aurixPayGrabPayDepositGatewaySettings?.[enabledKey] &&
|
|
140
|
+
featureFlag.enabled,
|
|
122
141
|
},
|
|
123
142
|
{
|
|
124
143
|
method: 'AURIX_PAY_PAYMAYA',
|
|
125
|
-
enabled:
|
|
144
|
+
enabled: enableAurix &&
|
|
145
|
+
paymentSettings?.aurixPayPayMayaDepositGatewaySettings?.[enabledKey] &&
|
|
146
|
+
featureFlag.enabled,
|
|
126
147
|
},
|
|
127
148
|
{
|
|
128
149
|
method: 'AURIX_PAY_QRPH',
|
|
129
|
-
enabled:
|
|
150
|
+
enabled: enableAurix &&
|
|
151
|
+
paymentSettings?.aurixPayQrphDepositGatewaySettings?.[enabledKey] &&
|
|
130
152
|
featureFlag.enabled,
|
|
131
153
|
},
|
|
132
154
|
];
|
|
@@ -136,7 +158,7 @@ export function Deposit() {
|
|
|
136
158
|
}
|
|
137
159
|
});
|
|
138
160
|
return l;
|
|
139
|
-
}, [
|
|
161
|
+
}, [enableAurix, featureFlag.enabled, onMaya, paymentSettings]);
|
|
140
162
|
const [paymentMethod, setPaymentMethod] = useState();
|
|
141
163
|
useEffect(() => {
|
|
142
164
|
if (enabledPaymentMethods.length > 0 && !paymentMethod) {
|
|
@@ -157,7 +179,19 @@ export function Deposit() {
|
|
|
157
179
|
if (enabledPaymentMethods.length <= 0) {
|
|
158
180
|
return _jsx(NoAvailablePaymentMethods, {});
|
|
159
181
|
}
|
|
160
|
-
|
|
182
|
+
const AurixPayGCashDeposit = aurixComponents?.gcash;
|
|
183
|
+
const AurixPayPayMayaDeposit = aurixComponents?.payMaya;
|
|
184
|
+
const AurixPayGrabPayDeposit = aurixComponents?.grabPay;
|
|
185
|
+
const AurixPayQRPHDeposit = aurixComponents?.qrph;
|
|
186
|
+
return (_jsxs(_Fragment, { children: [_jsx(PaymentMethods, { value: paymentMethod, onChange: handlePaymentMethodChange, options: enabledPaymentMethods }), _jsxs(Suspense, { fallback: _jsx(SpinnerIcon, { className: "mx-auto size-6" }), children: [paymentMethod === 'QRPH' && _jsx(QRPHDeposit, {}), paymentMethod === 'GCASH' && _jsx(GCashDeposit, {}), paymentMethod === 'MAYA' && _jsx(MayaDeposit, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppDeposit, {}), paymentMethod === 'ONLINE_BANK' && _jsx(OnlineBankDeposit, {}), paymentMethod === 'LIBANGAN_PAY_IN' && _jsx(LibanganDeposit, {}), paymentMethod === 'PISO_PAY' && _jsx(PisoPayDeposit, {}), paymentMethod === 'AIO_GCASH' && _jsx(AiOGCashDeposit, {}), paymentMethod === 'AIO_PAY_MAYA' && _jsx(AiOPayMayaDeposit, {}), paymentMethod === 'AIO_GRAB_PAY' && _jsx(AiOGrabPayDeposit, {}), paymentMethod === 'AIO_PALAWAN_PAY' && _jsx(AiOPalawanPayDeposit, {}), paymentMethod === 'GCASH_WEBPAY' && _jsx(GCashWebpayDeposit, {}), paymentMethod === 'MAYA_WEBPAY' && _jsx(MayaWebpayDeposit, {}), enableAurix &&
|
|
187
|
+
paymentMethod === 'AURIX_PAY_GCASH' &&
|
|
188
|
+
AurixPayGCashDeposit && _jsx(AurixPayGCashDeposit, {}), enableAurix &&
|
|
189
|
+
paymentMethod === 'AURIX_PAY_PAYMAYA' &&
|
|
190
|
+
AurixPayPayMayaDeposit && _jsx(AurixPayPayMayaDeposit, {}), enableAurix &&
|
|
191
|
+
paymentMethod === 'AURIX_PAY_GRAB_PAY' &&
|
|
192
|
+
AurixPayGrabPayDeposit && _jsx(AurixPayGrabPayDeposit, {}), enableAurix &&
|
|
193
|
+
paymentMethod === 'AURIX_PAY_QRPH' &&
|
|
194
|
+
AurixPayQRPHDeposit && _jsx(AurixPayQRPHDeposit, {})] })] }));
|
|
161
195
|
}
|
|
162
196
|
function MayaSessionSessionExpired() {
|
|
163
197
|
return (_jsxs("div", { className: "py-xl", children: [_jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-warning-secondary", children: _jsx(AlertCircleIcon, { className: "size-6 text-text-featured-icon-light-warning" }) }), _jsx("h2", { className: "mt-lg text-center font-semibold text-lg", children: "Session Expired" }), _jsx("p", { className: "mx-auto mt-xs max-w-[25rem] text-center text-sm text-text-tertiary-600", children: "Your session has timed out. To continue with deposits or withdrawals, Please try reloading the app." })] }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const QRPHDepositContext: (props: {
|
|
2
2
|
value: {
|
|
3
|
-
status: "
|
|
3
|
+
status: "confirmed" | "failed" | "idle" | "generating-qr-code" | "qr-code-generated";
|
|
4
4
|
deposit: import("../../../../types").Deposit | null;
|
|
5
5
|
errorMessage: {
|
|
6
6
|
name: string;
|
|
@@ -13,7 +13,7 @@ export declare const QRPHDepositContext: (props: {
|
|
|
13
13
|
} & {
|
|
14
14
|
children?: import("react").ReactNode | undefined;
|
|
15
15
|
}) => React.ReactNode, useQRPHDepositContext: () => {
|
|
16
|
-
status: "
|
|
16
|
+
status: "confirmed" | "failed" | "idle" | "generating-qr-code" | "qr-code-generated";
|
|
17
17
|
deposit: import("../../../../types").Deposit | null;
|
|
18
18
|
errorMessage: {
|
|
19
19
|
name: string;
|
|
@@ -5,7 +5,7 @@ export interface GenerateQRCodeInput {
|
|
|
5
5
|
promo?: string | null;
|
|
6
6
|
}
|
|
7
7
|
export declare function useQRPHDeposit(): {
|
|
8
|
-
status: "
|
|
8
|
+
status: "confirmed" | "failed" | "idle" | "generating-qr-code" | "qr-code-generated";
|
|
9
9
|
deposit: Deposit | null;
|
|
10
10
|
errorMessage: {
|
|
11
11
|
name: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { createListCollection } from '@ark-ui/react/collection';
|
|
3
3
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
4
4
|
import Link from 'next/link';
|
|
@@ -6,11 +6,11 @@ import { useEffect, useMemo, useState } from 'react';
|
|
|
6
6
|
import { Controller, useForm } from 'react-hook-form';
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
import { useShallow } from 'zustand/shallow';
|
|
9
|
+
import { useAccountQuery } from '../../../../client/hooks/useAccountQuery.js';
|
|
9
10
|
import { useCreateVentajaDisbursementWithdrawalMutation } from '../../../../client/hooks/useCreateVentajaWithdrawalMutation.js';
|
|
10
11
|
import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
|
|
11
12
|
import { useInstapayBankListQuery } from '../../../../client/hooks/useInstapayBankListQuery.js';
|
|
12
13
|
import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
|
|
13
|
-
import { useWalletQuery } from '../../../../client/hooks/useWalletQuery.js';
|
|
14
14
|
import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
|
|
15
15
|
import { CheckIcon } from '../../../../icons/CheckIcon.js';
|
|
16
16
|
import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
|
|
@@ -29,15 +29,16 @@ import { Select } from '../../../../ui/Select/index.js';
|
|
|
29
29
|
import { parseDecimal } from '../../../../utils/parseDecimal.js';
|
|
30
30
|
import { AmountChoices } from '../../AmountChoices.js';
|
|
31
31
|
import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
|
|
32
|
-
import {
|
|
32
|
+
import { PaymentMethods } from '../../PaymentMethods.js';
|
|
33
33
|
import { ActiveTurnoverRequirement } from '../ActiveTurnoverRequirement.js';
|
|
34
34
|
import { RequireFirstDeposit } from '../RequireFirstDeposit.js';
|
|
35
35
|
import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
|
|
36
36
|
export function VentajaWithdrawal() {
|
|
37
37
|
const depositWithdrawalProps = useDepositWithdrawalPropsContext();
|
|
38
|
+
const [paymentMethod, setPaymentMethod] = useState('INSTAPAY');
|
|
38
39
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
39
40
|
depositWithdrawal: ctx.depositWithdrawal,
|
|
40
|
-
|
|
41
|
+
hasPendingBonus: ctx.pendingBonus,
|
|
41
42
|
})));
|
|
42
43
|
const [status, setStatus] = useState('waiting');
|
|
43
44
|
const createWithdrawalMutation = useCreateVentajaDisbursementWithdrawalMutation({
|
|
@@ -53,14 +54,20 @@ export function VentajaWithdrawal() {
|
|
|
53
54
|
},
|
|
54
55
|
});
|
|
55
56
|
const instapayBankListQuery = useInstapayBankListQuery();
|
|
56
|
-
const instapayBankList =
|
|
57
|
+
const instapayBankList = useMemo(() => [
|
|
58
|
+
{
|
|
59
|
+
code: 'LBNGAN',
|
|
60
|
+
name: 'Libangan',
|
|
61
|
+
},
|
|
62
|
+
...(instapayBankListQuery.data ?? []),
|
|
63
|
+
], [instapayBankListQuery.data]);
|
|
57
64
|
const paymentSettingsQuery = usePaymentSettingsQuery();
|
|
58
65
|
const paymentSettings = paymentSettingsQuery.data;
|
|
59
|
-
const gatewaySettings = paymentSettings?.
|
|
66
|
+
const gatewaySettings = paymentSettings?.ventajaWithdrawalGatewaySettings;
|
|
60
67
|
const minimumAmount = parseDecimal(gatewaySettings?.minimumAmount, 0);
|
|
61
68
|
const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
|
|
62
|
-
const
|
|
63
|
-
const
|
|
69
|
+
const accountQuery = useAccountQuery();
|
|
70
|
+
const account = accountQuery.data;
|
|
64
71
|
const definition = z.object({
|
|
65
72
|
amount: z.string().superRefine((val, ctx) => {
|
|
66
73
|
const n = parseDecimal(val, 0);
|
|
@@ -70,7 +77,7 @@ export function VentajaWithdrawal() {
|
|
|
70
77
|
code: z.ZodIssueCode.too_small,
|
|
71
78
|
inclusive: true,
|
|
72
79
|
minimum: minimumAmount,
|
|
73
|
-
message: `
|
|
80
|
+
message: `Minimum amount is ${minimumAmount.toLocaleString()}`,
|
|
74
81
|
});
|
|
75
82
|
}
|
|
76
83
|
if (n > maximumAmount) {
|
|
@@ -85,9 +92,16 @@ export function VentajaWithdrawal() {
|
|
|
85
92
|
}),
|
|
86
93
|
password: z
|
|
87
94
|
.string()
|
|
88
|
-
.min(
|
|
89
|
-
.
|
|
90
|
-
|
|
95
|
+
.min(1, 'Transaction Password is required')
|
|
96
|
+
.min(8, 'Transaction Password must be 8 or more characters')
|
|
97
|
+
.max(64, 'Transaction Password must be not be more than 64 characters'),
|
|
98
|
+
accountNumber: z
|
|
99
|
+
.string()
|
|
100
|
+
.min(1, paymentMethod === 'INSTAPAY'
|
|
101
|
+
? 'Bank Account Number is required'
|
|
102
|
+
: 'Phone Number is required')
|
|
103
|
+
.trim(),
|
|
104
|
+
accountName: z.string().min(1, 'Account Name is required').trim(),
|
|
91
105
|
bankCode: z.string().min(1, 'Bank is required').trim(),
|
|
92
106
|
});
|
|
93
107
|
const form = useForm({
|
|
@@ -97,6 +111,7 @@ export function VentajaWithdrawal() {
|
|
|
97
111
|
amount: '0',
|
|
98
112
|
password: '',
|
|
99
113
|
accountNumber: '',
|
|
114
|
+
accountName: '',
|
|
100
115
|
bankCode: '',
|
|
101
116
|
},
|
|
102
117
|
});
|
|
@@ -107,6 +122,7 @@ export function VentajaWithdrawal() {
|
|
|
107
122
|
bankCode: form.getValues('bankCode'),
|
|
108
123
|
password: '',
|
|
109
124
|
accountNumber: '',
|
|
125
|
+
accountName: '',
|
|
110
126
|
});
|
|
111
127
|
}
|
|
112
128
|
}, [form, minimumAmount]);
|
|
@@ -117,20 +133,21 @@ export function VentajaWithdrawal() {
|
|
|
117
133
|
bankCode: instapayBankList[0].code,
|
|
118
134
|
password: '',
|
|
119
135
|
accountNumber: '',
|
|
136
|
+
accountName: '',
|
|
120
137
|
});
|
|
121
138
|
}
|
|
122
139
|
}, [form, instapayBankList]);
|
|
123
140
|
const handleSubmit = form.handleSubmit(async (data) => {
|
|
124
|
-
if (globalStore.
|
|
125
|
-
globalStore.
|
|
141
|
+
if (globalStore.hasPendingBonus.shouldShowWarning) {
|
|
142
|
+
globalStore.hasPendingBonus.setOpen(true);
|
|
126
143
|
return;
|
|
127
144
|
}
|
|
128
145
|
createWithdrawalMutation.mutate({
|
|
129
146
|
input: {
|
|
130
|
-
amount: data.amount,
|
|
147
|
+
amount: data.amount.replaceAll(',', '').toString(),
|
|
131
148
|
accountNumber: data.accountNumber,
|
|
132
149
|
bankCode: data.bankCode,
|
|
133
|
-
accountName:
|
|
150
|
+
accountName: data.accountName,
|
|
134
151
|
},
|
|
135
152
|
transactionPassword: data.password,
|
|
136
153
|
});
|
|
@@ -140,11 +157,46 @@ export function VentajaWithdrawal() {
|
|
|
140
157
|
itemToValue: (item) => item.code,
|
|
141
158
|
itemToString: (item) => item.name,
|
|
142
159
|
}), [instapayBankList]);
|
|
143
|
-
return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, autoComplete: "off", children: [_jsx(
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
160
|
+
return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, autoComplete: "off", children: [_jsx(PaymentMethods, { value: paymentMethod, onChange: (props) => {
|
|
161
|
+
setPaymentMethod(props);
|
|
162
|
+
let bankCode = '';
|
|
163
|
+
if (props !== 'INSTAPAY') {
|
|
164
|
+
const accountName = account?.realName ?? account?.name ?? '';
|
|
165
|
+
form.setValue('accountName', accountName, {
|
|
166
|
+
shouldTouch: false,
|
|
167
|
+
shouldDirty: false,
|
|
168
|
+
shouldValidate: false,
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
switch (props) {
|
|
172
|
+
case 'MAYA':
|
|
173
|
+
bankCode = 'BNKMYA';
|
|
174
|
+
break;
|
|
175
|
+
case 'GCASH':
|
|
176
|
+
bankCode = 'BNKGCH';
|
|
177
|
+
break;
|
|
178
|
+
default:
|
|
179
|
+
bankCode = '';
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
form.setValue('bankCode', bankCode, {
|
|
183
|
+
shouldTouch: false,
|
|
184
|
+
shouldDirty: false,
|
|
185
|
+
shouldValidate: false,
|
|
186
|
+
});
|
|
187
|
+
form.setValue('accountNumber', '', {
|
|
188
|
+
shouldTouch: false,
|
|
189
|
+
shouldDirty: false,
|
|
190
|
+
shouldValidate: false,
|
|
191
|
+
});
|
|
192
|
+
form.clearErrors(['bankCode', 'accountNumber', 'password']);
|
|
193
|
+
} }), paymentMethod === 'INSTAPAY' && (_jsxs(_Fragment, { children: [_jsx(Controller, { control: form.control, name: "bankCode", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.bankCode, children: [_jsxs(Select.Root, { collection: bankCollection, positioning: {
|
|
194
|
+
sameWidth: true,
|
|
195
|
+
}, value: o.field.value ? [o.field.value] : [], onValueChange: (details) => {
|
|
196
|
+
o.field.onChange(details.value.at(0) ?? '');
|
|
197
|
+
}, children: [_jsx(Select.Label, { children: "Bank" }), _jsx(Select.Control, { children: _jsxs(Select.Trigger, { children: [_jsx(Select.ValueText, {}), _jsx(Select.Indicator, { asChild: true, children: _jsx(ChevronDownIcon, {}) })] }) }), _jsx(Select.Positioner, { children: _jsx(Select.Content, { children: _jsx(Select.ItemGroup, { children: bankCollection.items.map((item) => (_jsxs(Select.Item, { item: item, children: [_jsx(Select.ItemText, { children: item.name }), _jsx(Select.ItemIndicator, { asChild: true, children: _jsx(CheckIcon, {}) })] }, item.code))) }) }) })] }), _jsx(Field.ErrorText, { children: form.formState.errors.bankCode?.message })] })) }), _jsxs(Field.Root, { invalid: !!form.formState.errors.accountName, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Account Name" }), _jsx(Field.Input, { ...form.register('accountName') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountName?.message })] })] })), _jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, className: "mt-3xl", children: [_jsx(Field.Label, { children: paymentMethod === 'INSTAPAY'
|
|
198
|
+
? 'Bank account number'
|
|
199
|
+
: 'Phone Number' }), _jsx(Field.Input, { ...form.register('accountNumber') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountNumber?.message })] }), _jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-3xl", children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
|
|
148
200
|
o.field.onChange(details.value);
|
|
149
201
|
}, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to withdraw" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
|
|
150
202
|
form.setValue('amount', value.toString(), {
|
|
@@ -152,14 +204,14 @@ export function VentajaWithdrawal() {
|
|
|
152
204
|
shouldDirty: true,
|
|
153
205
|
shouldValidate: true,
|
|
154
206
|
});
|
|
155
|
-
}, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(RequireFirstDeposit, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending ||
|
|
207
|
+
}, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), account?.transactionPassword && (_jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter Transaction password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] })), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(RequireFirstDeposit, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending || !account?.transactionPassword, children: "Withdraw" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
|
|
156
208
|
if (!details.open) {
|
|
157
209
|
setStatus('waiting');
|
|
158
210
|
}
|
|
159
|
-
}, lazyMount: true, unmountOnExit: true,
|
|
211
|
+
}, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { disabled: status === 'processing', children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Withdraw', status === 'success' && 'Withdrawal Submitted', status === 'failed' && 'Withdraw Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
|
|
160
212
|
"We're verifying your account and amount. Please hold a moment.", status === 'success' &&
|
|
161
213
|
'Your withdrawal request has been submitted successfully and is awaiting confirmation. You won’t have to wait long — once approved, the funds will be credited to your account.', status === 'failed' &&
|
|
162
|
-
|
|
214
|
+
'First deposit is required before making a withdrawal.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
|
|
163
215
|
api.setOpen(false);
|
|
164
216
|
}, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
|
|
165
217
|
}
|
|
@@ -7,6 +7,7 @@ import { useForm } from 'react-hook-form';
|
|
|
7
7
|
import invariant from 'tiny-invariant';
|
|
8
8
|
import { z } from 'zod';
|
|
9
9
|
import { useShallow } from 'zustand/shallow';
|
|
10
|
+
import { useCreateMemberVerificationMutation } from '../../../client/hooks/useCreateMemberVerificationMutation.js';
|
|
10
11
|
import { useGlobalStore } from '../../../client/hooks/useGlobalStore.js';
|
|
11
12
|
import { useSignOutMutation } from '../../../client/hooks/useSignOutMutation.js';
|
|
12
13
|
import { useUpdateAccountMutation } from '../../../client/hooks/useUpdateAccountMutation.js';
|
|
@@ -21,25 +22,15 @@ import { getQueryClient } from '../../../utils/getQueryClient.js';
|
|
|
21
22
|
import { getSessionQueryKey } from '../../../utils/queryKeys.js';
|
|
22
23
|
import DateOfBirthField from '../../DateOfBirthField.js';
|
|
23
24
|
import { useKYCNonPagcorContext } from './KYCNonPagcorContext.js';
|
|
24
|
-
const
|
|
25
|
+
const fullNameSchema = z
|
|
25
26
|
.string()
|
|
26
|
-
.regex(/^[a-z ]+$/gi, '
|
|
27
|
+
.regex(/^[a-z ]+$/gi, 'Full name must contain only letters')
|
|
27
28
|
.transform((val) => val.trim())
|
|
28
29
|
.refine((val) => val.length >= 2, {
|
|
29
30
|
message: 'First name must be 2 or more characters',
|
|
30
31
|
})
|
|
31
32
|
.refine((val) => val.length <= 50, {
|
|
32
|
-
message: '
|
|
33
|
-
});
|
|
34
|
-
const lastNameBaseSchema = z
|
|
35
|
-
.string()
|
|
36
|
-
.regex(/^[a-z ]+$/gi, 'Last name must contain only letters')
|
|
37
|
-
.transform((val) => val.trim())
|
|
38
|
-
.refine((val) => val.length >= 2, {
|
|
39
|
-
message: 'Last name must be 2 or more characters',
|
|
40
|
-
})
|
|
41
|
-
.refine((val) => val.length <= 50, {
|
|
42
|
-
message: 'Last name must not be more than 50 characters',
|
|
33
|
+
message: 'Full name must not be more than 50 characters',
|
|
43
34
|
});
|
|
44
35
|
const birthdateBaseSchema = z
|
|
45
36
|
.date({
|
|
@@ -56,9 +47,13 @@ const birthdateBaseSchema = z
|
|
|
56
47
|
});
|
|
57
48
|
}
|
|
58
49
|
});
|
|
50
|
+
const emailAddressSchema = z.string().email('Invalid email address');
|
|
59
51
|
const definition = z.object({
|
|
60
|
-
|
|
61
|
-
|
|
52
|
+
fullName: fullNameSchema,
|
|
53
|
+
emailAddress: emailAddressSchema,
|
|
54
|
+
nationality: z
|
|
55
|
+
.string()
|
|
56
|
+
.min(2, 'Nationality must be at least 2 characters long'),
|
|
62
57
|
birthday: birthdateBaseSchema,
|
|
63
58
|
});
|
|
64
59
|
export function PersonalInformation() {
|
|
@@ -75,6 +70,18 @@ export function PersonalInformation() {
|
|
|
75
70
|
});
|
|
76
71
|
},
|
|
77
72
|
});
|
|
73
|
+
const createMemberVerificationMutation = useCreateMemberVerificationMutation({
|
|
74
|
+
onError(error) {
|
|
75
|
+
toaster.error({
|
|
76
|
+
description: error.message,
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
onSuccess() {
|
|
80
|
+
toaster.success({
|
|
81
|
+
description: 'Member verification created successfully',
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
});
|
|
78
85
|
const signOutMutation = useSignOutMutation({
|
|
79
86
|
async onSuccess() {
|
|
80
87
|
const keep = new Set([BIOMETRIC_STORAGE_KEY]);
|
|
@@ -94,20 +101,30 @@ export function PersonalInformation() {
|
|
|
94
101
|
const form = useForm({
|
|
95
102
|
resolver: zodResolver(definition),
|
|
96
103
|
defaultValues: {
|
|
97
|
-
|
|
98
|
-
|
|
104
|
+
fullName: '',
|
|
105
|
+
nationality: '',
|
|
106
|
+
emailAddress: '',
|
|
99
107
|
birthday: undefined,
|
|
100
108
|
},
|
|
101
109
|
mode: 'all',
|
|
102
110
|
});
|
|
103
111
|
async function onSubmit(values) {
|
|
104
112
|
await updateAccountMutation.mutateAsync({
|
|
105
|
-
realName:
|
|
113
|
+
realName: values.fullName,
|
|
114
|
+
emailAddress: values.emailAddress,
|
|
106
115
|
birthDay: format(values.birthday, 'yyyy-MM-dd'),
|
|
107
116
|
});
|
|
117
|
+
await createMemberVerificationMutation.mutateAsync({
|
|
118
|
+
nationality: values.nationality,
|
|
119
|
+
address: '',
|
|
120
|
+
natureOfWork: '',
|
|
121
|
+
permanentAddress: '',
|
|
122
|
+
placeOfBirth: '',
|
|
123
|
+
sourceOfIncome: '',
|
|
124
|
+
});
|
|
108
125
|
}
|
|
109
126
|
const birthDay = form.watch('birthday');
|
|
110
|
-
return (_jsxs("div", { children: [_jsx(Dialog.Title, { className: "text-center font-semibold text-lg", children: "Personal Information" }), _jsx(Dialog.Description, { className: "mt-xs text-center text-sm text-text-secondary-700", children: "Provide your basic details and work info." }), _jsxs("form", { className: "mt-7", onSubmit: form.handleSubmit(onSubmit), children: [_jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.
|
|
127
|
+
return (_jsxs("div", { children: [_jsx(Dialog.Title, { className: "text-center font-semibold text-lg", children: "Personal Information" }), _jsx(Dialog.Description, { className: "mt-xs text-center text-sm text-text-secondary-700", children: "Provide your basic details and work info." }), _jsxs("form", { className: "mt-7", onSubmit: form.handleSubmit(onSubmit), children: [_jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.fullName, children: [_jsx(Field.Label, { children: "Full Name" }), _jsx(Field.Input, { placeholder: "Enter your full name", ...form.register('fullName') }), _jsx(Field.ErrorText, { children: form.formState.errors.fullName?.message })] }), _jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.emailAddress, children: [_jsx(Field.Label, { children: "Email Address" }), _jsx(Field.Input, { placeholder: "Enter your email address", ...form.register('emailAddress') }), _jsx(Field.ErrorText, { children: form.formState.errors.emailAddress?.message })] }), _jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.nationality, children: [_jsx(Field.Label, { children: "Nationality" }), _jsx(Field.Input, { placeholder: "Enter your nationality", ...form.register('nationality') }), _jsx(Field.ErrorText, { children: form.formState.errors.nationality?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.birthday, className: "mt-xl", children: [_jsx(DateOfBirthField, { value: birthDay, onChange: (value) => {
|
|
111
128
|
if (!value)
|
|
112
129
|
return;
|
|
113
130
|
form.setValue('birthday', value, {
|
|
@@ -48,7 +48,7 @@ export declare const CREATE_AIO_QRPH_DEPOSIT = "\n mutation CreateAIOQRPHDeposi
|
|
|
48
48
|
export declare const CREATE_AIO_ONLINE_BANK_DEPOSIT = "\n mutation CreateAIOOnlineBankDeposit(\n $input: CreateAIOOnlineBankDepositInput!\n ) {\n createAIOOnlineBankDeposit(input: $input) {\n ... on DepositPromoMaximumAmountExceededError {\n name: __typename\n message\n }\n ... on DepositPromoMinimumAmountNotMetError {\n name: __typename\n message\n }\n ... on MaximumDepositAmountExceededError {\n name: __typename\n message\n }\n ... on MinimumDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on MinimumFirstDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on PromoNotEnabledError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n }\n }\n";
|
|
49
49
|
export declare const CREATE_MANUAL_BANK_DEPOSIT = "\n mutation CreateManualBankDeposit($input: CreateManualBankDepositInput!) {\n createManualBankDeposit(input: $input) {\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on MinimumFirstDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on MinimumDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on PromoNotEnabledError {\n name: __typename\n message\n }\n ... on DepositPromoMinimumAmountNotMetError {\n name: __typename\n message\n }\n ... on DepositPromoMaximumAmountExceededError {\n name: __typename\n message\n }\n ... on MaximumDepositAmountExceededError {\n name: __typename\n message\n }\n ... on FileDoesNotExistError {\n name: __typename\n message\n }\n ... on FileNotReadyError {\n name: __typename\n message\n }\n }\n }\n";
|
|
50
50
|
export declare const CREATE_MANUAL_UPI_DEPOSIT = "\n mutation CreateManualUPIDeposit($input: CreateManualUPIDepositInput!) {\n createManualUPIDeposit(input: $input) {\n ... on DepositPromoMaximumAmountExceededError {\n name: __typename\n message\n }\n ... on DepositPromoMinimumAmountNotMetError {\n name: __typename\n message\n }\n ... on MaximumDepositAmountExceededError {\n name: __typename\n message\n }\n ... on MinimumDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on MinimumFirstDepositAmountNotMetError {\n name: __typename\n message\n }\n ... on PromoNotEnabledError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on UPIReferenceNotAvailableError {\n name: __typename\n message\n }\n }\n }\n";
|
|
51
|
-
export declare const DEPOSIT
|
|
51
|
+
export declare const DEPOSIT: string;
|
|
52
52
|
export declare const DEPOSITS_COUNT = "\n query DepositsCount {\n member {\n depositsCount\n }\n }\n";
|
|
53
53
|
export declare const TOUCH_GCASH_DEPOSIT = "\n mutation TouchGCashDeposit($input: TouchGCashDepositInput!) {\n touchGCashDeposit(input: $input)\n }\n";
|
|
54
54
|
export declare const TOUCH_QRPH_DEPOSIT = "\n mutation TouchQRPHDeposit($input: TouchQRPHDepositInput!) {\n touchQRPHDeposit(input: $input)\n }\n";
|
package/dist/services/queries.js
CHANGED
|
@@ -1698,36 +1698,39 @@ export const DEPOSIT = /* GraphQL */ `
|
|
|
1698
1698
|
checkoutUrl
|
|
1699
1699
|
error
|
|
1700
1700
|
}
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1701
|
+
${process.env.NEXT_PUBLIC_ENVIRONMENT === 'development' ||
|
|
1702
|
+
process.env.NEXT_PUBLIC_ENVIRONMENT === 'staging'
|
|
1703
|
+
? `
|
|
1704
|
+
... on AurixPayQRPHDeposit {
|
|
1705
|
+
id
|
|
1706
|
+
type
|
|
1707
|
+
status
|
|
1708
|
+
qrCode
|
|
1709
|
+
error
|
|
1710
|
+
}
|
|
1711
|
+
... on AurixPayGCashDeposit {
|
|
1712
|
+
id
|
|
1713
|
+
type
|
|
1714
|
+
status
|
|
1715
|
+
checkoutUrl
|
|
1716
|
+
error
|
|
1717
|
+
}
|
|
1718
|
+
... on AurixPayPayMayaDeposit {
|
|
1719
|
+
id
|
|
1720
|
+
type
|
|
1721
|
+
status
|
|
1722
|
+
checkoutUrl
|
|
1723
|
+
error
|
|
1724
|
+
}
|
|
1725
|
+
... on AurixPayGrabPayDeposit {
|
|
1726
|
+
id
|
|
1727
|
+
type
|
|
1728
|
+
status
|
|
1729
|
+
checkoutUrl
|
|
1730
|
+
error
|
|
1731
|
+
}
|
|
1732
|
+
`
|
|
1733
|
+
: ''}
|
|
1731
1734
|
}
|
|
1732
1735
|
}
|
|
1733
1736
|
`;
|
|
@@ -3,7 +3,7 @@ export function sanitizeGamesSearch(search) {
|
|
|
3
3
|
return search || '';
|
|
4
4
|
}
|
|
5
5
|
// Strip disallowed punctuation before sending to backend search
|
|
6
|
-
const cleaned = search.replace(/[!@#$%^&*()?><}{\][|\\/`:;"
|
|
6
|
+
const cleaned = search.replace(/[!@#$%^&*()?><}{\][|\\/`:;",=+\-_]/g, '');
|
|
7
7
|
const normalized = cleaned.trim().replace(/\s+/g, ' ');
|
|
8
8
|
return normalized.length > 0 ? normalized : '';
|
|
9
9
|
}
|