@opexa/portal-components 0.0.503 → 0.0.505

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.
@@ -11,13 +11,17 @@ export function KycOpenOnHomeMount() {
11
11
  const { data: verification, isLoading: verificationLoading } = useMemberVerificationQuery();
12
12
  const { data: account, isLoading: accountLoading } = useAccountQuery();
13
13
  const isVerificationLocked = account?.status === 'VERIFICATION_LOCKED';
14
- const hasntSubmittedCompliantDocs = account?.verified || verification?.sumsubVerified
14
+ const hasntSubmittedCompliantDocs = account?.verified ||
15
+ verification?.sumsubVerified ||
16
+ verification?.status === 'PENDING'
15
17
  ? false
16
18
  : !account?.realName ||
17
19
  !account?.birthDay ||
18
20
  !verification?.selfieImage ||
19
21
  !verification?.idFrontImage;
20
- const hasntCompletedKYC = account?.verified || verification?.sumsubVerified
22
+ const hasntCompletedKYC = account?.verified ||
23
+ verification?.sumsubVerified ||
24
+ verification?.status === 'PENDING'
21
25
  ? false
22
26
  : !!verification?.nationality ||
23
27
  !!verification?.natureOfWork ||
@@ -30,7 +34,7 @@ export function KycOpenOnHomeMount() {
30
34
  if (hasntSubmittedCompliantDocs) {
31
35
  setkycOpen(true);
32
36
  }
33
- if ((!hasntSubmittedCompliantDocs && !hasntCompletedKYC) ||
37
+ else if ((!hasntSubmittedCompliantDocs && hasntCompletedKYC) ||
34
38
  isVerificationLocked) {
35
39
  setkycReminderOpen(true);
36
40
  }
@@ -124,8 +124,8 @@ function Rules(props) {
124
124
  }, "aria-label": `Complete ${milestone.label}`, children: [milestone.key === 'ACCOUNT_VERIFICATION' ? (_jsx(FileCheck02Icon, { className: "size-5" })) : (_jsx(CoinsHandIcon, { className: "size-5" })), milestone.key === 'FIRST_DEPOSIT'
125
125
  ? 'Deposit'
126
126
  : 'Verify Account'] })), !milestone.isCompleted &&
127
- milestone.key === 'LINK_FACEBOOK_ACCOUNT' && (_jsx(FacebookSignInTrigger, { text: "Link Facebook Account", className: "flex h-10 w-full items-center justify-center gap-md rounded-md bg-button-primary-bg px-3 font-semibold text-button-primary-fg text-sm shadow-xs disabled:opacity-60 disabled:shadow-none aria-disabled:cursor-not-allowed aria-disabled:opacity-60 aria-disabled:shadow-none" })), !milestone.isCompleted &&
128
- milestone.key === 'LINK_GOOGLE_ACCOUNT' && (_jsx(GoogleSignInButton, { text: "Link Google Account", className: "flex h-10 w-full items-center justify-center gap-md rounded-md bg-button-primary-bg px-3 font-semibold text-button-primary-fg text-sm shadow-xs disabled:opacity-60 disabled:shadow-none aria-disabled:cursor-not-allowed aria-disabled:opacity-60 aria-disabled:shadow-none" }))] }, milestone.key))), quest?.bonus && (_jsx("div", { className: "flex h-full items-end", children: allMilestonesCompleted ? (_jsx(Button, { size: "sm", onClick: () => setOpen(false), "aria-label": "Close", className: "w-full", children: "Close" })) : (_jsx("div", { className: "w-full rounded-md border border-bg-primary-hover bg-button-secondary-bg px-3.5 py-2.5 text-center text-white", children: _jsxs("p", { children: ["Complete target to", ' ', _jsxs("span", { className: "text-brand-400", children: ["\u20B1", quest?.bonus] }), ' ', "bonus!"] }) })) }))] })] }) })] }) }));
127
+ milestone.key === 'LINK_FACEBOOK_ACCOUNT' && (_jsxs(_Fragment, { children: [milestone.bonus && (_jsxs("p", { className: 'text-sm text-[#94969C]', children: ["Link your Facebook Account and get Php ", milestone.bonus, " Bonus"] })), _jsx(FacebookSignInTrigger, { text: "Link Facebook Account", className: "!mt-0 flex h-10 w-full items-center justify-center gap-md rounded-md bg-button-primary-bg px-3 font-semibold text-button-primary-fg text-sm shadow-xs disabled:opacity-60 disabled:shadow-none aria-disabled:cursor-not-allowed aria-disabled:opacity-60 aria-disabled:shadow-none" })] })), !milestone.isCompleted &&
128
+ milestone.key === 'LINK_GOOGLE_ACCOUNT' && (_jsxs(_Fragment, { children: [milestone.bonus && (_jsxs("p", { className: 'text-sm text-[#94969C]', children: ["Link your Google Account and get Php ", milestone.bonus, " Bonus"] })), _jsx(GoogleSignInButton, { text: "Link Google Account", className: "flex h-10 w-full items-center justify-center gap-md rounded-md bg-button-primary-bg px-3 font-semibold text-button-primary-fg text-sm shadow-xs disabled:opacity-60 disabled:shadow-none aria-disabled:cursor-not-allowed aria-disabled:opacity-60 aria-disabled:shadow-none" })] }))] }, milestone.key))), quest?.bonus && (_jsx("div", { className: "flex h-full items-end", children: allMilestonesCompleted ? (_jsx(Button, { size: "sm", onClick: () => setOpen(false), "aria-label": "Close", className: "w-full", children: "Close" })) : (_jsx("div", { className: "w-full rounded-md border border-bg-primary-hover bg-button-secondary-bg px-3.5 py-2.5 text-center text-white", children: _jsxs("p", { children: ["Complete target to", ' ', _jsxs("span", { className: "text-brand-400", children: ["\u20B1", quest?.bonus] }), ' ', "bonus!"] }) })) }))] })] }) })] }) }));
129
129
  }
130
130
  function QuestMilestone({ label, bonus, isCompleted = false, checkboxControlStyle, }) {
131
131
  const localeInfo = useLocaleInfo();
@@ -47,7 +47,6 @@ export function MobileNumberSignIn() {
47
47
  step2Form.reset();
48
48
  context.setStep(1);
49
49
  globalStore.signIn.setOpen(false);
50
- globalStore.kyc.setOpen(true);
51
50
  },
52
51
  onError: (err) => {
53
52
  toaster.error({
@@ -47,7 +47,6 @@ export function NameAndPasswordSignIn() {
47
47
  context.setStep(2);
48
48
  }
49
49
  else {
50
- globalStore.kycReminder.setOpen(!signInProps.shouldHideKYCReminder);
51
50
  globalStore.signIn.setOpen(false);
52
51
  authenticateMutation.reset();
53
52
  signInMutation.reset();
@@ -64,7 +63,6 @@ export function NameAndPasswordSignIn() {
64
63
  });
65
64
  const authenticateMutation = useAuthenticateMutation({
66
65
  onSuccess() {
67
- globalStore.kycReminder.setOpen(!signInProps.shouldHideKYCReminder);
68
66
  globalStore.signIn.setOpen(false);
69
67
  authenticateMutation.reset();
70
68
  signInMutation.reset();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.0.503",
3
+ "version": "0.0.505",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",