@airxpay/sdk-ui 1.0.3 → 1.0.6
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/README.md +186 -216
- package/dist/api/merchant.d.ts +11 -0
- package/dist/api/{seller.js → merchant.js} +12 -3
- package/dist/components/common/FileUploader.d.ts +1 -1
- package/dist/components/common/StepIndicator.d.ts +1 -1
- package/dist/components/steps/BankDetails.d.ts +3 -3
- package/dist/components/steps/BankDetails.js +223 -162
- package/dist/components/steps/BasicDetailsForm.d.ts +3 -3
- package/dist/components/steps/BasicDetailsForm.js +143 -144
- package/dist/components/steps/KYCVerification.d.ts +3 -3
- package/dist/components/steps/KYCVerification.js +290 -123
- package/dist/components/steps/OnboardingComplete.d.ts +3 -3
- package/dist/components/steps/OnboardingComplete.js +112 -36
- package/dist/components/ui/MerchantOnboard/MerchantOnboarding.d.ts +4 -0
- package/dist/components/ui/{SellerOnboard/SellerOnboarding.js → MerchantOnboard/MerchantOnboarding.js} +250 -79
- package/dist/contexts/AirXPayProvider.d.ts +14 -7
- package/dist/contexts/AirXPayProvider.js +40 -89
- package/dist/hooks/{SellerOnboarding.js → MerchantOnboarding.js} +2 -2
- package/dist/hooks/useAirXPayReady.d.ts +6 -0
- package/dist/hooks/useAirXPayReady.js +27 -0
- package/dist/index.d.ts +7 -4
- package/dist/index.js +10 -9
- package/dist/sdk/airxpay.d.ts +1 -2
- package/dist/sdk/airxpay.js +2 -5
- package/dist/types/dev.js +1 -2
- package/dist/types/dev.ts +2 -2
- package/dist/types/{sellertypes.d.ts → merchantTypes.d.ts} +29 -14
- package/dist/types/merchantTypes.js +3 -0
- package/dist/types/merchantTypes.ts +94 -0
- package/dist/types/type.d.ts +4 -5
- package/dist/types/type.js +1 -0
- package/dist/types/type.ts +7 -5
- package/package.json +1 -1
- package/dist/api/seller.d.ts +0 -9
- package/dist/components/ui/SellerOnboard/SellerOnboarding.d.ts +0 -4
- package/dist/types/sellertypes.js +0 -4
- package/dist/types/sellertypes.ts +0 -85
- /package/dist/components/ui/{SellerOnboard → MerchantOnboard}/CustomSegmentedButtons.d.ts +0 -0
- /package/dist/components/ui/{SellerOnboard → MerchantOnboard}/CustomSegmentedButtons.js +0 -0
- /package/dist/hooks/{SellerOnboarding.d.ts → MerchantOnboarding.d.ts} +0 -0
|
@@ -52,18 +52,84 @@ const react_native_paper_1 = require("react-native-paper");
|
|
|
52
52
|
const expo_linear_gradient_1 = require("expo-linear-gradient");
|
|
53
53
|
const FileUploader_1 = __importDefault(require("../common/FileUploader"));
|
|
54
54
|
const REQUIRED_DOCUMENTS = [
|
|
55
|
-
{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
{
|
|
56
|
+
key: 'panCardUrl',
|
|
57
|
+
label: 'PAN Card',
|
|
58
|
+
required: true,
|
|
59
|
+
icon: 'card-account-details',
|
|
60
|
+
description: 'Clear image of PAN card',
|
|
61
|
+
acceptedTypes: ['image/jpeg', 'image/jpg', 'image/png']
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
key: 'aadhaarUrl',
|
|
65
|
+
label: 'Aadhaar Card',
|
|
66
|
+
required: true,
|
|
67
|
+
icon: 'card-bulleted',
|
|
68
|
+
description: 'Both sides of Aadhaar',
|
|
69
|
+
acceptedTypes: ['image/jpeg', 'image/jpg', 'image/png']
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
key: 'selfieUrl',
|
|
73
|
+
label: 'Selfie',
|
|
74
|
+
required: true,
|
|
75
|
+
icon: 'face',
|
|
76
|
+
description: 'Clear front-facing photo',
|
|
77
|
+
acceptedTypes: ['image/jpeg', 'image/jpg', 'image/png']
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
key: 'addressProofUrl',
|
|
81
|
+
label: 'Address Proof',
|
|
82
|
+
required: false,
|
|
83
|
+
icon: 'home',
|
|
84
|
+
description: 'Utility bill or rent agreement',
|
|
85
|
+
acceptedTypes: ['image/jpeg', 'image/jpg', 'image/png', 'application/pdf']
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
key: 'businessRegistrationUrl',
|
|
89
|
+
label: 'Business Registration',
|
|
90
|
+
required: false,
|
|
91
|
+
icon: 'file-document',
|
|
92
|
+
description: 'GST, MSME, or company registration',
|
|
93
|
+
acceptedTypes: ['image/jpeg', 'image/jpg', 'image/png', 'application/pdf']
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
key: 'gstCertificateUrl',
|
|
97
|
+
label: 'GST Certificate',
|
|
98
|
+
required: false,
|
|
99
|
+
icon: 'file-certificate',
|
|
100
|
+
description: 'If applicable',
|
|
101
|
+
acceptedTypes: ['image/jpeg', 'image/jpg', 'image/png', 'application/pdf']
|
|
102
|
+
},
|
|
61
103
|
];
|
|
62
104
|
const KYCVerification = ({ initialData, mode, kycStatus, onNext, onBack, }) => {
|
|
63
105
|
const [documents, setDocuments] = (0, react_1.useState)(initialData.kycDocuments || {});
|
|
64
106
|
const [uploadingFor, setUploadingFor] = (0, react_1.useState)(null);
|
|
107
|
+
const [isVerifying, setIsVerifying] = (0, react_1.useState)(false);
|
|
108
|
+
const [verificationComplete, setVerificationComplete] = (0, react_1.useState)(false);
|
|
109
|
+
// Check if KYC is already verified
|
|
110
|
+
(0, react_1.useEffect)(() => {
|
|
111
|
+
if (kycStatus === 'verified') {
|
|
112
|
+
setVerificationComplete(true);
|
|
113
|
+
}
|
|
114
|
+
}, [kycStatus]);
|
|
115
|
+
const validateDocumentType = (file, documentKey) => {
|
|
116
|
+
const document = REQUIRED_DOCUMENTS.find(doc => doc.key === documentKey);
|
|
117
|
+
if (!document || !document.acceptedTypes)
|
|
118
|
+
return true;
|
|
119
|
+
const mimeType = file.mimeType || '';
|
|
120
|
+
if (!document.acceptedTypes.includes(mimeType)) {
|
|
121
|
+
react_native_1.Alert.alert('Invalid File Type', `Please upload a valid file type: ${document.acceptedTypes.map(t => t.split('/')[1]).join(', ')}`);
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
return true;
|
|
125
|
+
};
|
|
65
126
|
const handleDocumentUpload = (documentKey, file) => __awaiter(void 0, void 0, void 0, function* () {
|
|
127
|
+
// Validate file type
|
|
128
|
+
if (!validateDocumentType(file, documentKey)) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
66
131
|
setUploadingFor(documentKey);
|
|
132
|
+
// Simulate upload delay
|
|
67
133
|
setTimeout(() => {
|
|
68
134
|
setDocuments(prev => (Object.assign(Object.assign({}, prev), { [documentKey]: file.uri || 'uploaded_file.jpg' })));
|
|
69
135
|
setUploadingFor(null);
|
|
@@ -90,22 +156,22 @@ const KYCVerification = ({ initialData, mode, kycStatus, onNext, onBack, }) => {
|
|
|
90
156
|
switch (kycStatus) {
|
|
91
157
|
case 'verified':
|
|
92
158
|
return (<react_native_1.View style={[styles.statusBadge, styles.verified]}>
|
|
93
|
-
<react_native_paper_1.IconButton icon="check-circle" size={
|
|
159
|
+
<react_native_paper_1.IconButton icon="check-circle" size={16} iconColor="#10B981"/>
|
|
94
160
|
<react_native_1.Text style={styles.statusTextVerified}>Verified</react_native_1.Text>
|
|
95
161
|
</react_native_1.View>);
|
|
96
162
|
case 'pending':
|
|
97
163
|
return (<react_native_1.View style={[styles.statusBadge, styles.pending]}>
|
|
98
|
-
<react_native_paper_1.IconButton icon="clock-outline" size={
|
|
164
|
+
<react_native_paper_1.IconButton icon="clock-outline" size={16} iconColor="#D97706"/>
|
|
99
165
|
<react_native_1.Text style={styles.statusTextPending}>Pending</react_native_1.Text>
|
|
100
166
|
</react_native_1.View>);
|
|
101
167
|
case 'rejected':
|
|
102
168
|
return (<react_native_1.View style={[styles.statusBadge, styles.rejected]}>
|
|
103
|
-
<react_native_paper_1.IconButton icon="alert-circle" size={
|
|
169
|
+
<react_native_paper_1.IconButton icon="alert-circle" size={16} iconColor="#DC2626"/>
|
|
104
170
|
<react_native_1.Text style={styles.statusTextRejected}>Rejected</react_native_1.Text>
|
|
105
171
|
</react_native_1.View>);
|
|
106
172
|
default:
|
|
107
173
|
return (<react_native_1.View style={[styles.statusBadge, styles.notSubmitted]}>
|
|
108
|
-
<react_native_paper_1.IconButton icon="clock-outline" size={
|
|
174
|
+
<react_native_paper_1.IconButton icon="clock-outline" size={16} iconColor="#6B7280"/>
|
|
109
175
|
<react_native_1.Text style={styles.statusTextNotSubmitted}>Not Submitted</react_native_1.Text>
|
|
110
176
|
</react_native_1.View>);
|
|
111
177
|
}
|
|
@@ -116,133 +182,181 @@ const KYCVerification = ({ initialData, mode, kycStatus, onNext, onBack, }) => {
|
|
|
116
182
|
.every(doc => documents[doc.key]);
|
|
117
183
|
};
|
|
118
184
|
const handleSubmit = () => {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
kycStatus: 'verified',
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
onNext({
|
|
128
|
-
kycDocuments: documents,
|
|
129
|
-
isKycCompleted: false,
|
|
130
|
-
kycStatus: 'pending',
|
|
131
|
-
});
|
|
185
|
+
// Validate required documents
|
|
186
|
+
if (!isRequiredDocumentsUploaded()) {
|
|
187
|
+
react_native_1.Alert.alert('Error', 'Please upload all required documents');
|
|
188
|
+
return;
|
|
132
189
|
}
|
|
190
|
+
// Show verifying state
|
|
191
|
+
setIsVerifying(true);
|
|
192
|
+
// Simulate verification process
|
|
193
|
+
setTimeout(() => {
|
|
194
|
+
setIsVerifying(false);
|
|
195
|
+
if (mode === 'test') {
|
|
196
|
+
onNext({
|
|
197
|
+
kycDocuments: documents,
|
|
198
|
+
isKycCompleted: true,
|
|
199
|
+
kycStatus: 'verified',
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
onNext({
|
|
204
|
+
kycDocuments: documents,
|
|
205
|
+
isKycCompleted: false,
|
|
206
|
+
kycStatus: 'pending',
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
}, 1500);
|
|
210
|
+
};
|
|
211
|
+
const handleBack = () => {
|
|
212
|
+
onBack();
|
|
133
213
|
};
|
|
134
214
|
const requiredDocsCount = REQUIRED_DOCUMENTS.filter(doc => doc.required).length;
|
|
135
215
|
const uploadedRequiredCount = REQUIRED_DOCUMENTS.filter(doc => doc.required && documents[doc.key]).length;
|
|
136
216
|
const progress = (uploadedRequiredCount / requiredDocsCount) * 100;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
<react_native_1.
|
|
140
|
-
|
|
141
|
-
<
|
|
142
|
-
<react_native_1.View style={styles.
|
|
143
|
-
<
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
<react_native_1.Text style={styles.title}>KYC Verification</react_native_1.Text>
|
|
147
|
-
<react_native_1.Text style={styles.subtitle}>
|
|
148
|
-
Upload your documents for verification
|
|
149
|
-
</react_native_1.Text>
|
|
217
|
+
// If already verified, show success state
|
|
218
|
+
if (verificationComplete) {
|
|
219
|
+
return (<react_native_1.View style={styles.container}>
|
|
220
|
+
<expo_linear_gradient_1.LinearGradient colors={['#FFFFFF', '#F8F9FA']} style={styles.gradient}>
|
|
221
|
+
<react_native_1.View style={styles.verifiedContainer}>
|
|
222
|
+
<react_native_1.View style={styles.verifiedIcon}>
|
|
223
|
+
<expo_linear_gradient_1.LinearGradient colors={['#10B981', '#059669']} style={styles.verifiedCircle}>
|
|
224
|
+
<react_native_paper_1.IconButton icon="check" size={40} iconColor="#FFFFFF"/>
|
|
225
|
+
</expo_linear_gradient_1.LinearGradient>
|
|
150
226
|
</react_native_1.View>
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
<react_native_1.
|
|
157
|
-
<
|
|
158
|
-
<react_native_1.
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
227
|
+
<react_native_1.Text style={styles.verifiedTitle}>KYC Already Verified</react_native_1.Text>
|
|
228
|
+
<react_native_1.Text style={styles.verifiedSubtitle}>
|
|
229
|
+
Your identity has been verified successfully
|
|
230
|
+
</react_native_1.Text>
|
|
231
|
+
|
|
232
|
+
<react_native_1.TouchableOpacity style={styles.verifiedButton} onPress={() => onNext({ kycStatus: 'verified', isKycCompleted: true })}>
|
|
233
|
+
<expo_linear_gradient_1.LinearGradient colors={['#0066CC', '#0099FF']} style={styles.verifiedButtonGradient}>
|
|
234
|
+
<react_native_1.Text style={styles.verifiedButtonText}>Continue to Bank Details</react_native_1.Text>
|
|
235
|
+
</expo_linear_gradient_1.LinearGradient>
|
|
236
|
+
</react_native_1.TouchableOpacity>
|
|
237
|
+
</react_native_1.View>
|
|
238
|
+
</expo_linear_gradient_1.LinearGradient>
|
|
239
|
+
</react_native_1.View>);
|
|
240
|
+
}
|
|
241
|
+
return (<react_native_1.KeyboardAvoidingView style={{ flex: 1 }} behavior={react_native_1.Platform.OS === 'ios' ? 'padding' : undefined} keyboardVerticalOffset={react_native_1.Platform.OS === 'ios' ? 64 : 0}>
|
|
242
|
+
<react_native_1.View style={styles.container}>
|
|
243
|
+
<expo_linear_gradient_1.LinearGradient colors={['#FFFFFF', '#F8F9FA']} style={styles.gradient}>
|
|
244
|
+
<react_native_1.ScrollView showsVerticalScrollIndicator={false} contentContainerStyle={styles.scrollContent} keyboardShouldPersistTaps="handled">
|
|
245
|
+
{/* Header Card */}
|
|
246
|
+
<react_native_paper_1.Surface style={styles.headerCard}>
|
|
247
|
+
<react_native_1.View style={styles.headerIcon}>
|
|
248
|
+
<react_native_paper_1.IconButton icon="shield-account" size={24} iconColor="#0066CC"/>
|
|
162
249
|
</react_native_1.View>
|
|
163
|
-
<react_native_1.View style={styles.
|
|
164
|
-
|
|
165
|
-
<
|
|
166
|
-
|
|
250
|
+
<react_native_1.View style={styles.headerText}>
|
|
251
|
+
<react_native_1.Text style={styles.title}>KYC Verification</react_native_1.Text>
|
|
252
|
+
<react_native_1.Text style={styles.subtitle}>
|
|
253
|
+
Upload your documents for verification
|
|
254
|
+
</react_native_1.Text>
|
|
167
255
|
</react_native_1.View>
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
256
|
+
</react_native_paper_1.Surface>
|
|
257
|
+
|
|
258
|
+
{/* Form Card */}
|
|
259
|
+
<react_native_paper_1.Surface style={styles.formCard}>
|
|
260
|
+
{/* Progress Steps */}
|
|
261
|
+
<react_native_1.View style={styles.progressContainer}>
|
|
262
|
+
<react_native_1.View style={styles.progressStep}>
|
|
263
|
+
<react_native_1.View style={[styles.progressDot, styles.progressDotCompleted]}>
|
|
264
|
+
<react_native_paper_1.IconButton icon="check" size={12} iconColor="#FFFFFF"/>
|
|
265
|
+
</react_native_1.View>
|
|
266
|
+
<react_native_1.Text style={styles.progressTextCompleted}>Basic</react_native_1.Text>
|
|
267
|
+
</react_native_1.View>
|
|
268
|
+
<react_native_1.View style={styles.progressLine}/>
|
|
269
|
+
<react_native_1.View style={styles.progressStep}>
|
|
270
|
+
<expo_linear_gradient_1.LinearGradient colors={['#0066CC', '#0099FF']} style={styles.progressDotActive}/>
|
|
271
|
+
<react_native_1.Text style={styles.progressTextActive}>KYC</react_native_1.Text>
|
|
272
|
+
</react_native_1.View>
|
|
273
|
+
<react_native_1.View style={styles.progressLine}/>
|
|
274
|
+
<react_native_1.View style={styles.progressStep}>
|
|
275
|
+
<react_native_1.View style={[styles.progressDot, styles.progressDotInactive]}/>
|
|
276
|
+
<react_native_1.Text style={styles.progressText}>Bank</react_native_1.Text>
|
|
277
|
+
</react_native_1.View>
|
|
172
278
|
</react_native_1.View>
|
|
173
|
-
</react_native_1.View>
|
|
174
279
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
280
|
+
{/* KYC Status */}
|
|
281
|
+
<react_native_1.View style={styles.statusContainer}>
|
|
282
|
+
<react_native_1.Text style={styles.statusLabel}>Status:</react_native_1.Text>
|
|
283
|
+
{getKYCStatusBadge()}
|
|
284
|
+
</react_native_1.View>
|
|
180
285
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
286
|
+
{/* Upload Progress */}
|
|
287
|
+
<react_native_1.View style={styles.progressBarContainer}>
|
|
288
|
+
<react_native_1.View style={styles.progressBar}>
|
|
289
|
+
<expo_linear_gradient_1.LinearGradient colors={['#0066CC', '#0099FF']} style={[styles.progressFill, { width: `${progress}%` }]} start={{ x: 0, y: 0 }} end={{ x: 1, y: 0 }}/>
|
|
290
|
+
</react_native_1.View>
|
|
291
|
+
<react_native_1.Text style={styles.progressText}>
|
|
292
|
+
{uploadedRequiredCount}/{requiredDocsCount} Required
|
|
293
|
+
</react_native_1.Text>
|
|
185
294
|
</react_native_1.View>
|
|
186
|
-
<react_native_1.Text style={styles.progressText}>
|
|
187
|
-
{uploadedRequiredCount}/{requiredDocsCount} Required
|
|
188
|
-
</react_native_1.Text>
|
|
189
|
-
</react_native_1.View>
|
|
190
295
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
296
|
+
{/* Rejection Message */}
|
|
297
|
+
{kycStatus === 'rejected' && (<react_native_paper_1.Surface style={styles.rejectionCard}>
|
|
298
|
+
<react_native_1.View style={styles.rejectionContent}>
|
|
299
|
+
<react_native_paper_1.IconButton icon="alert-circle" size={16} iconColor="#DC2626"/>
|
|
300
|
+
<react_native_1.View style={styles.rejectionText}>
|
|
301
|
+
<react_native_1.Text style={styles.rejectionTitle}>KYC Rejected</react_native_1.Text>
|
|
302
|
+
<react_native_1.Text style={styles.rejectionMessage}>
|
|
303
|
+
Please upload clear, valid documents
|
|
304
|
+
</react_native_1.Text>
|
|
305
|
+
</react_native_1.View>
|
|
200
306
|
</react_native_1.View>
|
|
201
|
-
</
|
|
202
|
-
</react_native_paper_1.Surface>)}
|
|
307
|
+
</react_native_paper_1.Surface>)}
|
|
203
308
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
309
|
+
{/* Document Upload Sections */}
|
|
310
|
+
<react_native_1.View style={styles.documentsContainer}>
|
|
311
|
+
{REQUIRED_DOCUMENTS.map((doc, index) => {
|
|
312
|
+
var _a;
|
|
313
|
+
return (<react_native_1.View key={doc.key} style={styles.documentItem}>
|
|
314
|
+
{index > 0 && <react_native_1.View style={styles.documentDivider}/>}
|
|
315
|
+
<FileUploader_1.default label={doc.label} required={doc.required} description={doc.description} icon={doc.icon} value={documents[doc.key]} onUpload={(file) => handleDocumentUpload(doc.key, file)} onRemove={() => handleDocumentRemove(doc.key)} uploading={uploadingFor === doc.key} mode={mode} accept={((_a = doc.acceptedTypes) === null || _a === void 0 ? void 0 : _a.join(',')) || '*'}/>
|
|
316
|
+
</react_native_1.View>);
|
|
317
|
+
})}
|
|
318
|
+
</react_native_1.View>
|
|
211
319
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
320
|
+
{/* Test Mode Notice */}
|
|
321
|
+
{mode === 'test' && (<react_native_paper_1.Surface style={styles.testModeCard}>
|
|
322
|
+
<react_native_1.View style={styles.testModeContent}>
|
|
323
|
+
<react_native_paper_1.IconButton icon="flask" size={16} iconColor="#92400E"/>
|
|
324
|
+
<react_native_1.View style={styles.testModeText}>
|
|
325
|
+
<react_native_1.Text style={styles.testModeTitle}>Test Mode Active</react_native_1.Text>
|
|
326
|
+
<react_native_1.Text style={styles.testModeDescription}>
|
|
327
|
+
Auto-approved in test mode
|
|
328
|
+
</react_native_1.Text>
|
|
329
|
+
</react_native_1.View>
|
|
221
330
|
</react_native_1.View>
|
|
222
|
-
</
|
|
223
|
-
</react_native_paper_1.Surface>)}
|
|
331
|
+
</react_native_paper_1.Surface>)}
|
|
224
332
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
333
|
+
{/* Action Buttons */}
|
|
334
|
+
<react_native_1.View style={styles.buttonContainer}>
|
|
335
|
+
<react_native_1.TouchableOpacity style={styles.backButton} onPress={handleBack} disabled={isVerifying}>
|
|
336
|
+
<react_native_1.Text style={styles.backButtonText}>Back</react_native_1.Text>
|
|
337
|
+
</react_native_1.TouchableOpacity>
|
|
338
|
+
|
|
339
|
+
<react_native_1.TouchableOpacity style={[
|
|
232
340
|
styles.submitButton,
|
|
233
|
-
!isRequiredDocumentsUploaded() && styles.submitButtonDisabled
|
|
234
|
-
]} onPress={handleSubmit} disabled={!isRequiredDocumentsUploaded()}>
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
341
|
+
(!isRequiredDocumentsUploaded() || isVerifying) && styles.submitButtonDisabled
|
|
342
|
+
]} onPress={handleSubmit} disabled={!isRequiredDocumentsUploaded() || isVerifying}>
|
|
343
|
+
<expo_linear_gradient_1.LinearGradient colors={isRequiredDocumentsUploaded() && !isVerifying ? ['#0066CC', '#0099FF'] : ['#9CA3AF', '#9CA3AF']} style={styles.submitGradient} start={{ x: 0, y: 0 }} end={{ x: 1, y: 0 }}>
|
|
344
|
+
{isVerifying ? (<react_native_1.View style={styles.verifyingContent}>
|
|
345
|
+
<react_native_paper_1.ActivityIndicator size="small" color="#FFFFFF"/>
|
|
346
|
+
<react_native_1.Text style={[styles.submitButtonText, styles.verifyingText]}>
|
|
347
|
+
Verifying...
|
|
348
|
+
</react_native_1.Text>
|
|
349
|
+
</react_native_1.View>) : (<react_native_1.Text style={styles.submitButtonText}>
|
|
350
|
+
{mode === 'test' ? 'Continue' : 'Submit KYC'}
|
|
351
|
+
</react_native_1.Text>)}
|
|
352
|
+
</expo_linear_gradient_1.LinearGradient>
|
|
353
|
+
</react_native_1.TouchableOpacity>
|
|
354
|
+
</react_native_1.View>
|
|
355
|
+
</react_native_paper_1.Surface>
|
|
356
|
+
</react_native_1.ScrollView>
|
|
357
|
+
</expo_linear_gradient_1.LinearGradient>
|
|
358
|
+
</react_native_1.View>
|
|
359
|
+
</react_native_1.KeyboardAvoidingView>);
|
|
246
360
|
};
|
|
247
361
|
const styles = react_native_1.StyleSheet.create({
|
|
248
362
|
container: {
|
|
@@ -254,6 +368,7 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
254
368
|
},
|
|
255
369
|
scrollContent: {
|
|
256
370
|
padding: 12,
|
|
371
|
+
paddingBottom: 24,
|
|
257
372
|
},
|
|
258
373
|
headerCard: {
|
|
259
374
|
flexDirection: 'row',
|
|
@@ -368,7 +483,7 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
368
483
|
paddingHorizontal: 8,
|
|
369
484
|
paddingVertical: 2,
|
|
370
485
|
borderRadius: 12,
|
|
371
|
-
height:
|
|
486
|
+
height: 28,
|
|
372
487
|
},
|
|
373
488
|
verified: {
|
|
374
489
|
backgroundColor: '#D1FAE5',
|
|
@@ -486,7 +601,7 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
486
601
|
},
|
|
487
602
|
backButton: {
|
|
488
603
|
flex: 1,
|
|
489
|
-
paddingVertical:
|
|
604
|
+
paddingVertical: 10,
|
|
490
605
|
borderRadius: 10,
|
|
491
606
|
borderWidth: 1,
|
|
492
607
|
borderColor: '#E5E7EB',
|
|
@@ -494,7 +609,7 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
494
609
|
backgroundColor: '#FFFFFF',
|
|
495
610
|
},
|
|
496
611
|
backButtonText: {
|
|
497
|
-
fontSize:
|
|
612
|
+
fontSize: 13,
|
|
498
613
|
fontWeight: '500',
|
|
499
614
|
color: '#6B7280',
|
|
500
615
|
},
|
|
@@ -507,11 +622,63 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
507
622
|
opacity: 0.7,
|
|
508
623
|
},
|
|
509
624
|
submitGradient: {
|
|
510
|
-
paddingVertical:
|
|
625
|
+
paddingVertical: 10,
|
|
511
626
|
alignItems: 'center',
|
|
512
627
|
},
|
|
513
628
|
submitButtonText: {
|
|
514
|
-
fontSize:
|
|
629
|
+
fontSize: 13,
|
|
630
|
+
fontWeight: '600',
|
|
631
|
+
color: '#FFFFFF',
|
|
632
|
+
},
|
|
633
|
+
verifyingContent: {
|
|
634
|
+
flexDirection: 'row',
|
|
635
|
+
alignItems: 'center',
|
|
636
|
+
justifyContent: 'center',
|
|
637
|
+
},
|
|
638
|
+
verifyingText: {
|
|
639
|
+
marginLeft: 8,
|
|
640
|
+
},
|
|
641
|
+
verifiedContainer: {
|
|
642
|
+
flex: 1,
|
|
643
|
+
justifyContent: 'center',
|
|
644
|
+
alignItems: 'center',
|
|
645
|
+
padding: 24,
|
|
646
|
+
minHeight: 400,
|
|
647
|
+
},
|
|
648
|
+
verifiedIcon: {
|
|
649
|
+
marginBottom: 24,
|
|
650
|
+
},
|
|
651
|
+
verifiedCircle: {
|
|
652
|
+
width: 80,
|
|
653
|
+
height: 80,
|
|
654
|
+
borderRadius: 40,
|
|
655
|
+
justifyContent: 'center',
|
|
656
|
+
alignItems: 'center',
|
|
657
|
+
},
|
|
658
|
+
verifiedTitle: {
|
|
659
|
+
fontSize: 22,
|
|
660
|
+
fontWeight: '700',
|
|
661
|
+
color: '#111827',
|
|
662
|
+
marginBottom: 8,
|
|
663
|
+
textAlign: 'center',
|
|
664
|
+
},
|
|
665
|
+
verifiedSubtitle: {
|
|
666
|
+
fontSize: 14,
|
|
667
|
+
color: '#6B7280',
|
|
668
|
+
textAlign: 'center',
|
|
669
|
+
marginBottom: 32,
|
|
670
|
+
},
|
|
671
|
+
verifiedButton: {
|
|
672
|
+
width: '100%',
|
|
673
|
+
borderRadius: 12,
|
|
674
|
+
overflow: 'hidden',
|
|
675
|
+
},
|
|
676
|
+
verifiedButtonGradient: {
|
|
677
|
+
paddingVertical: 14,
|
|
678
|
+
alignItems: 'center',
|
|
679
|
+
},
|
|
680
|
+
verifiedButtonText: {
|
|
681
|
+
fontSize: 15,
|
|
515
682
|
fontWeight: '600',
|
|
516
683
|
color: '#FFFFFF',
|
|
517
684
|
},
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Merchant, Mode, KYCStatus, MerchantStatus } from '../../types/merchantTypes';
|
|
3
3
|
interface OnboardingCompleteProps {
|
|
4
|
-
|
|
4
|
+
merchantData: Merchant;
|
|
5
5
|
mode: Mode;
|
|
6
|
-
status:
|
|
6
|
+
status: MerchantStatus;
|
|
7
7
|
kycStatus: KYCStatus;
|
|
8
8
|
isBankDetailsCompleted: boolean;
|
|
9
9
|
isKycCompleted: boolean;
|