@opexa/portal-components 0.0.1093 → 0.0.1094
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.
|
@@ -55,9 +55,11 @@ export function KYCReminder(props) {
|
|
|
55
55
|
const { data: account, isLoading: accountLoading } = useAccountQuery();
|
|
56
56
|
const isPending = account?.verification?.status === 'PENDING';
|
|
57
57
|
const isRejected = account?.verification?.status === 'REJECTED';
|
|
58
|
-
const isNotVerified =
|
|
59
|
-
account
|
|
60
|
-
|
|
58
|
+
const isNotVerified = !!account &&
|
|
59
|
+
(!account.verification ||
|
|
60
|
+
account.verification === null ||
|
|
61
|
+
account.verification.status === 'UNVERIFIED' ||
|
|
62
|
+
account.verification.status === 'CREATED');
|
|
61
63
|
const isVerificationLocked = account?.status === 'VERIFICATION_LOCKED';
|
|
62
64
|
const daysFromCreationToNow = useMemo(() => {
|
|
63
65
|
if (!account?.dateTimeCreated)
|
|
@@ -134,17 +136,16 @@ export function KYCReminder(props) {
|
|
|
134
136
|
globalStore.account.setOpen(false);
|
|
135
137
|
globalStore.account__mobile.setOpen(false);
|
|
136
138
|
router.push('/');
|
|
137
|
-
}, children: "Log Out" })] })) })] })] })), isNotVerified ||
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}, children: "Do it later" })] })) })] })] }))), isPending && isVerificationLocked && (_jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto mb-4 w-fit rounded-full bg-bg-primary p-2", children: _jsx(Image, { src: props.logo, alt: `${props.siteName} logo`, width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }) }), _jsx("h2", { className: `mt-4 font-semibold text-lg ${props.titleBgColor}`, children: "VERIFICATION IN PROGRESS" }), _jsx("p", { className: `mt-xs text-sm text-text-tertiary-600 ${props.descriptionBgColor}`, children: "Your account is verification-locked. Please wait for approval to regain full access to this platform." }), _jsxs("div", { className: "mt-6 flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: props.pagcorLogo?.logo ?? pagcorLogo, alt: "PAGCOR logo", height: 88, width: 88, className: `h-[88px] w-auto shrink-0 ${props.pagcorLogo?.styles ?? ''}`, draggable: false, unoptimized: true }), _jsx(Image, { src: props.responsibleGamingLogo?.logo ?? responsibleGamingLogo, alt: "Responsible Gaming logo", height: 50, width: 186, className: `h-[50px] w-auto shrink-0 ${props.responsibleGamingLogo?.styles ?? ''}`, draggable: false, unoptimized: true })] }), _jsx("div", { className: "mt-6 space-y-lg", children: _jsx(Button, { className: "bg-transparent text-text-brand-primary-600", onClick: async () => {
|
|
139
|
+
}, children: "Log Out" })] })) })] })] })), (isNotVerified || isRejected) &&
|
|
140
|
+
!isVerificationLocked &&
|
|
141
|
+
!(daysFromCreationToNow <= 3 && daysFromCreationToNow > 1) && (_jsxs(_Fragment, { children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto w-fit rounded-full bg-bg-primary p-2", children: _jsx(FileCheck02Icon, { className: "text-[#FEDF89]" }) }), _jsx("h2", { className: `mt-4 font-semibold text-lg ${props.titleBgColor}`, children: "Personal Verification" }), _jsxs("p", { className: `mt-xs text-sm text-text-tertiary-600 ${props.descriptionBgColor}`, children: ["All new users are required to complete identity verification to access the full range of ", props.siteName, ' ', "services, including withdrawals."] }), _jsx(Dialog.Context, { children: (api) => (_jsxs("div", { className: "mt-3xl space-y-lg", children: [_jsx(Button, { onClick: () => {
|
|
142
|
+
api.setOpen(false);
|
|
143
|
+
globalStore.kyc.setOpen(true);
|
|
144
|
+
globalStore.kycReminder.setOpen(false);
|
|
145
|
+
}, children: "Verify Now" }), _jsx(Button, { type: "button", variant: "outline", fullWidth: true, onClick: () => {
|
|
146
|
+
api.setOpen(false);
|
|
147
|
+
globalStore.responsibleGamingReminder.setOpen(true);
|
|
148
|
+
}, children: "Do it later" })] })) })] })] })), isPending && isVerificationLocked && (_jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto mb-4 w-fit rounded-full bg-bg-primary p-2", children: _jsx(Image, { src: props.logo, alt: `${props.siteName} logo`, width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }) }), _jsx("h2", { className: `mt-4 font-semibold text-lg ${props.titleBgColor}`, children: "VERIFICATION IN PROGRESS" }), _jsx("p", { className: `mt-xs text-sm text-text-tertiary-600 ${props.descriptionBgColor}`, children: "Your account is verification-locked. Please wait for approval to regain full access to this platform." }), _jsxs("div", { className: "mt-6 flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: props.pagcorLogo?.logo ?? pagcorLogo, alt: "PAGCOR logo", height: 88, width: 88, className: `h-[88px] w-auto shrink-0 ${props.pagcorLogo?.styles ?? ''}`, draggable: false, unoptimized: true }), _jsx(Image, { src: props.responsibleGamingLogo?.logo ?? responsibleGamingLogo, alt: "Responsible Gaming logo", height: 50, width: 186, className: `h-[50px] w-auto shrink-0 ${props.responsibleGamingLogo?.styles ?? ''}`, draggable: false, unoptimized: true })] }), _jsx("div", { className: "mt-6 space-y-lg", children: _jsx(Button, { className: "bg-transparent text-text-brand-primary-600", onClick: async () => {
|
|
148
149
|
if (Capacitor.isNativePlatform()) {
|
|
149
150
|
const session = await getQueryClient().fetchQuery({
|
|
150
151
|
queryKey: getSessionQueryKey(),
|