@opexa/portal-components 0.0.677 → 0.0.679

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.
@@ -8,7 +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 { AiOPaymentMethods } from '../AiOPaymentMethods.js';
11
- import { useDepositWithdrawalPropsContext } from '../DepositWithdrawalContext.js';
12
11
  import { PaymentMethods } from '../PaymentMethods.js';
13
12
  import { AiOGCashDeposit } from './AiOGCashDeposit/AiOGCashDeposit.js';
14
13
  import { AiOGrabPayDeposit } from './AiOGrabPayDeposit/AiOGrabPayDeposit.js';
@@ -22,11 +21,19 @@ import { OnlineBankDeposit } from './OnlineBankDeposit/OnlineBankDeposit.js';
22
21
  import { PisoPayDeposit } from './PisoPayDeposit/PisoPayDeposit.js';
23
22
  import { QRPHDeposit } from './QRPHDeposit/QRPHDeposit.js';
24
23
  export function Deposit() {
25
- const depositWithdrawalProps = useDepositWithdrawalPropsContext();
26
24
  const { onMaya } = useMayaAuth();
27
25
  const paymentSettingsQuery = usePaymentSettingsQuery();
28
26
  const paymentSettings = paymentSettingsQuery.data;
29
27
  const featureFlag = useFeatureFlag();
28
+ const aioDepositMethodEnabled = (() => {
29
+ const isMobile = onMobileDevice();
30
+ const enabledKey = isMobile ? 'mobileWebEnabled' : 'webEnabled';
31
+ return (paymentSettings?.aioGCashDepositGatewaySettings?.[enabledKey] ||
32
+ paymentSettings?.aioPayMayaDepositGatewaySettings?.[enabledKey] ||
33
+ paymentSettings?.aioGrabPayDepositGatewaySettings?.[enabledKey] ||
34
+ paymentSettings?.aioPalawanPayDepositGatewaySettings?.[enabledKey] ||
35
+ false);
36
+ })();
30
37
  const enabledPaymentMethods = (() => {
31
38
  const l = [];
32
39
  if (onMaya) {
@@ -64,8 +71,7 @@ export function Deposit() {
64
71
  },
65
72
  {
66
73
  method: 'AIO_EWALLET',
67
- condition: () => (depositWithdrawalProps.depositAiOSupported ?? false) &&
68
- featureFlag.enabled,
74
+ condition: () => featureFlag.enabled && aioDepositMethodEnabled,
69
75
  },
70
76
  ];
71
77
  paymentMethods.forEach(({ method, condition }) => {
@@ -7,7 +7,6 @@ export interface DepositWithdrawalProps {
7
7
  accountSecurityUrl?: string;
8
8
  allowUnverifiedAccounts?: boolean;
9
9
  libanganRedirectionUrl?: string;
10
- depositAiOSupported?: boolean;
11
10
  hasPrivacyPolicyAndTermsOfUse?: boolean;
12
11
  }
13
12
  export declare function DepositWithdrawal(props: DepositWithdrawalProps): import("react/jsx-runtime").JSX.Element;
@@ -39,6 +39,7 @@ export function IdentityVerification() {
39
39
  toaster.success({
40
40
  title: 'ID Front Image & Selfie Image uploaded successfully',
41
41
  });
42
+ kyc.setStep(2);
42
43
  },
43
44
  onError: (error) => {
44
45
  toaster.error({
@@ -61,6 +62,7 @@ export function IdentityVerification() {
61
62
  status: 'CREATED',
62
63
  };
63
64
  });
65
+ kyc.setStep(2);
64
66
  },
65
67
  onError: (error) => {
66
68
  toaster.error({
@@ -94,7 +96,6 @@ export function IdentityVerification() {
94
96
  placeOfBirth: '',
95
97
  sourceOfIncome: '',
96
98
  });
97
- kyc.setStep(2);
98
99
  }
99
100
  else {
100
101
  updateMemberVerification({
@@ -104,7 +105,6 @@ export function IdentityVerification() {
104
105
  idFrontImage: values.idFrontImage,
105
106
  },
106
107
  });
107
- kyc.setStep(2);
108
108
  }
109
109
  }
110
110
  useEffect(() => {
@@ -125,7 +125,7 @@ export function IdentityVerification() {
125
125
  type: 'validate',
126
126
  message: error.message,
127
127
  });
128
- } }), _jsx(Field.ErrorText, { children: o.fieldState.error?.message })] })) }), _jsx(Button, { type: "submit", className: "mt-6", disabled: createPending || updatePending || form.formState.isValid, children: "Continue" }), kyc.isSkippable && (_jsx(Button, { variant: "outline", colorScheme: "gray", className: "mt-lg", onClick: () => {
128
+ } }), _jsx(Field.ErrorText, { children: o.fieldState.error?.message })] })) }), _jsx(Button, { type: "submit", className: "mt-6", disabled: createPending || updatePending, children: "Continue" }), kyc.isSkippable && (_jsx(Button, { variant: "outline", colorScheme: "gray", className: "mt-lg", onClick: () => {
129
129
  globalStore.kyc.setOpen(false);
130
130
  globalStore.kycReminder.setOpen(true);
131
131
  }, children: "Skip for now" })), _jsx(Button, { className: "bg-transparent text-text-brand-primary-600", onClick: () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.0.677",
3
+ "version": "0.0.679",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",