@opexa/portal-components 0.0.916 → 0.0.917
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.
|
@@ -48,11 +48,7 @@ export function Deposit() {
|
|
|
48
48
|
const paymentSettingsQuery = usePaymentSettingsQuery();
|
|
49
49
|
const paymentSettings = paymentSettingsQuery.data;
|
|
50
50
|
const featureFlag = useFeatureFlag();
|
|
51
|
-
const nodeEnv = (process.env.NEXT_PUBLIC_ENVIRONMENT ?? '');
|
|
52
|
-
const enableAurix = nodeEnv === 'development' || nodeEnv === 'staging';
|
|
53
51
|
const aurixComponents = useMemo(() => {
|
|
54
|
-
if (!enableAurix)
|
|
55
|
-
return null;
|
|
56
52
|
return {
|
|
57
53
|
gcash: lazy(() => import('./AurixPayGCashDeposit/AurixPayGCashDeposit.js').then((m) => ({
|
|
58
54
|
default: m.AurixPayGCashDeposit,
|
|
@@ -67,7 +63,7 @@ export function Deposit() {
|
|
|
67
63
|
default: m.AurixPayQRPHDeposit,
|
|
68
64
|
}))),
|
|
69
65
|
};
|
|
70
|
-
}, [
|
|
66
|
+
}, []);
|
|
71
67
|
const enabledPaymentMethods = useMemo(() => {
|
|
72
68
|
const l = [];
|
|
73
69
|
if (onMaya) {
|
|
@@ -129,27 +125,19 @@ export function Deposit() {
|
|
|
129
125
|
},
|
|
130
126
|
{
|
|
131
127
|
method: 'AURIX_PAY_GCASH',
|
|
132
|
-
enabled:
|
|
133
|
-
paymentSettings?.aurixPayGCashDepositGatewaySettings?.[enabledKey] &&
|
|
134
|
-
featureFlag.enabled,
|
|
128
|
+
enabled: paymentSettings?.aurixPayGCashDepositGatewaySettings?.[enabledKey],
|
|
135
129
|
},
|
|
136
130
|
{
|
|
137
131
|
method: 'AURIX_PAY_GRAB_PAY',
|
|
138
|
-
enabled:
|
|
139
|
-
paymentSettings?.aurixPayGrabPayDepositGatewaySettings?.[enabledKey] &&
|
|
140
|
-
featureFlag.enabled,
|
|
132
|
+
enabled: paymentSettings?.aurixPayGrabPayDepositGatewaySettings?.[enabledKey],
|
|
141
133
|
},
|
|
142
134
|
{
|
|
143
135
|
method: 'AURIX_PAY_PAYMAYA',
|
|
144
|
-
enabled:
|
|
145
|
-
paymentSettings?.aurixPayPayMayaDepositGatewaySettings?.[enabledKey] &&
|
|
146
|
-
featureFlag.enabled,
|
|
136
|
+
enabled: paymentSettings?.aurixPayPayMayaDepositGatewaySettings?.[enabledKey],
|
|
147
137
|
},
|
|
148
138
|
{
|
|
149
139
|
method: 'AURIX_PAY_QRPH',
|
|
150
|
-
enabled:
|
|
151
|
-
paymentSettings?.aurixPayQrphDepositGatewaySettings?.[enabledKey] &&
|
|
152
|
-
featureFlag.enabled,
|
|
140
|
+
enabled: paymentSettings?.aurixPayQrphDepositGatewaySettings?.[enabledKey],
|
|
153
141
|
},
|
|
154
142
|
];
|
|
155
143
|
paymentMethods.forEach((o) => {
|
|
@@ -158,7 +146,7 @@ export function Deposit() {
|
|
|
158
146
|
}
|
|
159
147
|
});
|
|
160
148
|
return l;
|
|
161
|
-
}, [
|
|
149
|
+
}, [featureFlag.enabled, onMaya, paymentSettings]);
|
|
162
150
|
const [paymentMethod, setPaymentMethod] = useState();
|
|
163
151
|
useEffect(() => {
|
|
164
152
|
if (enabledPaymentMethods.length > 0 && !paymentMethod) {
|
|
@@ -183,15 +171,7 @@ export function Deposit() {
|
|
|
183
171
|
const AurixPayPayMayaDeposit = aurixComponents?.payMaya;
|
|
184
172
|
const AurixPayGrabPayDeposit = aurixComponents?.grabPay;
|
|
185
173
|
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, {}),
|
|
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, {})] })] }));
|
|
174
|
+
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, {}), paymentMethod === 'AURIX_PAY_GCASH' && AurixPayGCashDeposit && (_jsx(AurixPayGCashDeposit, {})), paymentMethod === 'AURIX_PAY_PAYMAYA' && AurixPayPayMayaDeposit && (_jsx(AurixPayPayMayaDeposit, {})), paymentMethod === 'AURIX_PAY_GRAB_PAY' && AurixPayGrabPayDeposit && (_jsx(AurixPayGrabPayDeposit, {})), paymentMethod === 'AURIX_PAY_QRPH' && AurixPayQRPHDeposit && (_jsx(AurixPayQRPHDeposit, {}))] })] }));
|
|
195
175
|
}
|
|
196
176
|
function MayaSessionSessionExpired() {
|
|
197
177
|
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." })] }));
|
|
@@ -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 = "\n query Deposit($id: ObjectId!) {\n node(id: $id) {\n ... on GCashDeposit {\n id\n type\n status\n checkoutUrl\n error\n }\n ... on MayaDeposit {\n id\n type\n status\n checkoutUrl\n }\n ... on MayaAppDeposit {\n id\n type\n status\n error\n }\n ... on BankDeposit {\n id\n type\n status\n error\n }\n ... on ManualDeposit {\n id\n type\n status\n error\n }\n ... on QRPHDeposit {\n id\n type\n status\n qrCode\n error\n }\n ... on OnlineBankDeposit {\n id\n type\n status\n vca\n error\n }\n ... on GCashWebpayDeposit {\n id\n type\n status\n checkoutUrl\n error\n }\n ... on LibanganPayInDeposit {\n id\n type\n status\n checkoutUrl\n error\n }\n ... on PisoPayCheckoutDeposit {\n id\n type\n status\n checkoutUrl\n error\n }\n ... on AiOGCashDeposit {\n id\n type\n status\n checkoutUrl\n error\n } \n ... on AiOGrabPayDeposit {\n id\n type\n status\n checkoutUrl\n error\n } \n ... on AiOPalawanPayDeposit {\n id\n type\n status\n checkoutUrl\n error\n } \n ... on AiOPayMayaDeposit {\n id\n type\n status\n checkoutUrl\n error\n }\n ... on MayaWebpayDeposit {\n id\n type\n status\n checkoutUrl\n error\n }\n ... on AurixPayQRPHDeposit {\n id\n type\n status\n qrCode\n error\n }\n ... on AurixPayGCashDeposit {\n id\n type\n status\n checkoutUrl\n error\n }\n ... on AurixPayPayMayaDeposit {\n id\n type\n status\n checkoutUrl\n error\n }\n ... on AurixPayGrabPayDeposit {\n id\n type\n status\n checkoutUrl\n error\n }\n }\n }\n";
|
|
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,9 +1698,6 @@ export const DEPOSIT = /* GraphQL */ `
|
|
|
1698
1698
|
checkoutUrl
|
|
1699
1699
|
error
|
|
1700
1700
|
}
|
|
1701
|
-
${process.env.NEXT_PUBLIC_ENVIRONMENT === 'development' ||
|
|
1702
|
-
process.env.NEXT_PUBLIC_ENVIRONMENT === 'staging'
|
|
1703
|
-
? `
|
|
1704
1701
|
... on AurixPayQRPHDeposit {
|
|
1705
1702
|
id
|
|
1706
1703
|
type
|
|
@@ -1729,8 +1726,6 @@ export const DEPOSIT = /* GraphQL */ `
|
|
|
1729
1726
|
checkoutUrl
|
|
1730
1727
|
error
|
|
1731
1728
|
}
|
|
1732
|
-
`
|
|
1733
|
-
: ''}
|
|
1734
1729
|
}
|
|
1735
1730
|
}
|
|
1736
1731
|
`;
|