react-native-timacare 0.0.40 → 0.0.42

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.
Files changed (74) hide show
  1. package/lib/commonjs/screens/detail-loan/Info.js +1 -1
  2. package/lib/commonjs/screens/detail-loan/Info.js.flow +32 -35
  3. package/lib/commonjs/screens/detail-loan/Info.js.map +1 -1
  4. package/lib/commonjs/screens/detail-loan/Payment.js +1 -1
  5. package/lib/commonjs/screens/detail-loan/Payment.js.flow +25 -16
  6. package/lib/commonjs/screens/detail-loan/Payment.js.map +1 -1
  7. package/lib/commonjs/screens/detail-loan/PaymentAll.js +1 -1
  8. package/lib/commonjs/screens/detail-loan/PaymentAll.js.flow +28 -34
  9. package/lib/commonjs/screens/detail-loan/PaymentAll.js.map +1 -1
  10. package/lib/commonjs/screens/detail-loan/PaymentInfo.js +1 -1
  11. package/lib/commonjs/screens/detail-loan/PaymentInfo.js.flow +18 -15
  12. package/lib/commonjs/screens/detail-loan/PaymentInfo.js.map +1 -1
  13. package/lib/commonjs/screens/detail-loan/store.js +1 -1
  14. package/lib/commonjs/screens/detail-loan/store.js.flow +14 -3
  15. package/lib/commonjs/screens/detail-loan/store.js.map +1 -1
  16. package/lib/commonjs/screens/full-submit/store.js +1 -1
  17. package/lib/commonjs/screens/full-submit/store.js.flow +4 -1
  18. package/lib/commonjs/screens/full-submit/store.js.map +1 -1
  19. package/lib/commonjs/screens/full-submit/update-info.js +1 -1
  20. package/lib/commonjs/screens/full-submit/update-info.js.flow +752 -763
  21. package/lib/commonjs/screens/full-submit/update-info.js.map +1 -1
  22. package/lib/commonjs/screens/home/index.js +1 -1
  23. package/lib/commonjs/screens/home/index.js.flow +15 -15
  24. package/lib/commonjs/screens/home/index.js.map +1 -1
  25. package/lib/commonjs/screens/schedule-payment/index.js +1 -1
  26. package/lib/commonjs/screens/schedule-payment/index.js.flow +16 -4
  27. package/lib/commonjs/screens/schedule-payment/index.js.map +1 -1
  28. package/lib/commonjs/screens/schedule-payment/store.js +1 -1
  29. package/lib/commonjs/screens/schedule-payment/store.js.flow +4 -1
  30. package/lib/commonjs/screens/schedule-payment/store.js.map +1 -1
  31. package/lib/module/screens/detail-loan/Info.js +1 -1
  32. package/lib/module/screens/detail-loan/Info.js.map +1 -1
  33. package/lib/module/screens/detail-loan/Payment.js +1 -1
  34. package/lib/module/screens/detail-loan/Payment.js.map +1 -1
  35. package/lib/module/screens/detail-loan/PaymentAll.js +1 -1
  36. package/lib/module/screens/detail-loan/PaymentAll.js.map +1 -1
  37. package/lib/module/screens/detail-loan/PaymentInfo.js +1 -1
  38. package/lib/module/screens/detail-loan/PaymentInfo.js.map +1 -1
  39. package/lib/module/screens/detail-loan/store.js +1 -1
  40. package/lib/module/screens/detail-loan/store.js.map +1 -1
  41. package/lib/module/screens/full-submit/store.js +1 -1
  42. package/lib/module/screens/full-submit/store.js.map +1 -1
  43. package/lib/module/screens/full-submit/update-info.js +1 -1
  44. package/lib/module/screens/full-submit/update-info.js.map +1 -1
  45. package/lib/module/screens/home/index.js +1 -1
  46. package/lib/module/screens/home/index.js.map +1 -1
  47. package/lib/module/screens/schedule-payment/index.js +1 -1
  48. package/lib/module/screens/schedule-payment/index.js.map +1 -1
  49. package/lib/module/screens/schedule-payment/store.js +1 -1
  50. package/lib/module/screens/schedule-payment/store.js.map +1 -1
  51. package/lib/typescript/screens/detail-loan/Info.d.ts.map +1 -1
  52. package/lib/typescript/screens/detail-loan/Payment.d.ts.map +1 -1
  53. package/lib/typescript/screens/detail-loan/PaymentAll.d.ts.map +1 -1
  54. package/lib/typescript/screens/detail-loan/PaymentInfo.d.ts.map +1 -1
  55. package/lib/typescript/screens/detail-loan/store.d.ts +3 -3
  56. package/lib/typescript/screens/detail-loan/store.d.ts.map +1 -1
  57. package/lib/typescript/screens/full-submit/store.d.ts +1 -1
  58. package/lib/typescript/screens/full-submit/store.d.ts.map +1 -1
  59. package/lib/typescript/screens/full-submit/update-info.d.ts.map +1 -1
  60. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  61. package/lib/typescript/screens/schedule-payment/index.d.ts.map +1 -1
  62. package/lib/typescript/screens/schedule-payment/store.d.ts +1 -1
  63. package/lib/typescript/screens/schedule-payment/store.d.ts.map +1 -1
  64. package/package.json +1 -1
  65. package/src/screens/detail-loan/Info.tsx +32 -35
  66. package/src/screens/detail-loan/Payment.tsx +25 -16
  67. package/src/screens/detail-loan/PaymentAll.tsx +28 -34
  68. package/src/screens/detail-loan/PaymentInfo.tsx +18 -15
  69. package/src/screens/detail-loan/store.tsx +14 -3
  70. package/src/screens/full-submit/store.tsx +4 -1
  71. package/src/screens/full-submit/update-info.tsx +752 -763
  72. package/src/screens/home/index.tsx +15 -15
  73. package/src/screens/schedule-payment/index.tsx +16 -4
  74. package/src/screens/schedule-payment/store.tsx +4 -1
@@ -50,79 +50,90 @@ export const UpdateInfo = observer(function UpdateInfo({
50
50
 
51
51
  useEffect(() => {
52
52
  if (loan) {
53
- FullSubmitStore.getDetailLoan(loan?.id, (res) => {
54
- setData(res);
55
- ref.current.setFieldValue('rate', res?.rate ? `${res?.rate}` : '');
56
- ref.current.setFieldValue(
57
- 'loanAmount',
58
- res?.loanAmount ? res?.loanAmount : ''
59
- );
60
- ref.current.setFieldValue(
61
- 'loanTime',
62
- res?.loanTime ? res?.loanTime : ''
63
- );
64
- ref.current.setFieldValue(
65
- 'gender',
66
- res?.gender === 0 ? { id: 0, name: 'Nam' } : { id: 1, name: 'Nữ' }
67
- );
68
- ref.current.setFieldValue(
69
- 'married',
70
- res?.merried
71
- ? FullSubmitStore.listTypeMerried.filter(
72
- (item) => item.id === res?.merried
73
- )[0]
74
- : null
75
- );
76
- ref.current.setFieldValue(
77
- 'statusWorking',
78
- res?.jobStatusNameCIMB
79
- ? {
80
- id: res?.jobStatusCIMBId,
81
- name: res?.jobStatusNameCIMB,
82
- }
83
- : null
84
- );
85
- ref.current.setFieldValue(
86
- 'jobTitle',
87
- res?.positionNameCIMB
88
- ? {
89
- id: res?.positionCIMBId,
90
- name: res?.positionNameCIMB,
91
- }
92
- : null
93
- );
94
- ref.current.setFieldValue(
95
- 'sourceFund',
96
- res?.incomeNameCIMB
97
- ? {
98
- id: res?.incomeCIMBId,
99
- name: res?.incomeNameCIMB,
100
- }
101
- : null
102
- );
103
- ref.current.setFieldValue('taxCode', res?.taxCode ? res?.taxCode : '');
53
+ setIsLoading(true);
54
+ FullSubmitStore.getDetailLoan(
55
+ loan?.id,
56
+ (res) => {
57
+ setData(res);
58
+ ref.current.setFieldValue('rate', res?.rate ? `${res?.rate}` : '');
59
+ ref.current.setFieldValue(
60
+ 'loanAmount',
61
+ res?.loanAmount ? res?.loanAmount : ''
62
+ );
63
+ ref.current.setFieldValue(
64
+ 'loanTime',
65
+ res?.loanTime ? res?.loanTime : ''
66
+ );
67
+ ref.current.setFieldValue(
68
+ 'gender',
69
+ res?.gender === 0 ? { id: 0, name: 'Nam' } : { id: 1, name: 'Nữ' }
70
+ );
71
+ ref.current.setFieldValue(
72
+ 'married',
73
+ res?.merried
74
+ ? FullSubmitStore.listTypeMerried.filter(
75
+ (item) => item.id === res?.merried
76
+ )[0]
77
+ : null
78
+ );
79
+ ref.current.setFieldValue(
80
+ 'statusWorking',
81
+ res?.jobStatusNameCIMB
82
+ ? {
83
+ id: res?.jobStatusCIMBId,
84
+ name: res?.jobStatusNameCIMB,
85
+ }
86
+ : null
87
+ );
88
+ ref.current.setFieldValue(
89
+ 'jobTitle',
90
+ res?.positionNameCIMB
91
+ ? {
92
+ id: res?.positionCIMBId,
93
+ name: res?.positionNameCIMB,
94
+ }
95
+ : null
96
+ );
97
+ ref.current.setFieldValue(
98
+ 'sourceFund',
99
+ res?.incomeNameCIMB
100
+ ? {
101
+ id: res?.incomeCIMBId,
102
+ name: res?.incomeNameCIMB,
103
+ }
104
+ : null
105
+ );
106
+ ref.current.setFieldValue(
107
+ 'taxCode',
108
+ res?.taxCode ? res?.taxCode : ''
109
+ );
104
110
 
105
- ref.current.setFieldValue(
106
- 'address',
107
- res?.addressResident ? res?.addressResident : ''
108
- );
109
- ref.current.setFieldValue(
110
- 'addressHouseHold',
111
- res?.addressHouseHold ? res?.addressHouseHold : ''
112
- );
113
- ref.current.setFieldValue(
114
- 'bank',
115
- res?.bankId ? { id: res?.bankId, name: res?.bankName } : null
116
- );
117
- ref.current.setFieldValue(
118
- 'bank_account',
119
- res?.bankAccountNumber ? res?.bankAccountNumber : ''
120
- );
121
- ref.current.setFieldValue(
122
- 'account_holder',
123
- res?.bankAccountName ? res?.bankAccountName : ''
124
- );
125
- });
111
+ ref.current.setFieldValue(
112
+ 'address',
113
+ res?.addressResident ? res?.addressResident : ''
114
+ );
115
+ ref.current.setFieldValue(
116
+ 'addressHouseHold',
117
+ res?.addressHouseHold ? res?.addressHouseHold : ''
118
+ );
119
+ ref.current.setFieldValue(
120
+ 'bank',
121
+ res?.bankId ? { id: res?.bankId, name: res?.bankName } : null
122
+ );
123
+ ref.current.setFieldValue(
124
+ 'bank_account',
125
+ res?.bankAccountNumber ? res?.bankAccountNumber : ''
126
+ );
127
+ ref.current.setFieldValue(
128
+ 'account_holder',
129
+ res?.bankAccountName ? res?.bankAccountName : ''
130
+ );
131
+ setIsLoading(false);
132
+ },
133
+ () => {
134
+ setIsLoading(false);
135
+ }
136
+ );
126
137
  }
127
138
  }, [loan]);
128
139
 
@@ -170,251 +181,164 @@ export const UpdateInfo = observer(function UpdateInfo({
170
181
 
171
182
  return (
172
183
  <View style={{ flex: 1, backgroundColor: '#FFFFFF' }}>
173
- {FullSubmitStore.isLoading ? (
174
- <View
175
- style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}
184
+ <ScrollView style={{ flex: 1 }}>
185
+ <Formik
186
+ innerRef={ref}
187
+ initialValues={{
188
+ loanAmount: '',
189
+ terms: true,
190
+ rate: '',
191
+ gender: null,
192
+ married: null,
193
+ purpose: {
194
+ id: 3008,
195
+ name: 'Mua sắm trang thiết bị, vật dụng gia đình',
196
+ },
197
+ loanTime: '',
198
+ statusWorking: null,
199
+ jobTitle: null,
200
+ sourceFund: null,
201
+ taxCode: '',
202
+ address: '',
203
+ addressHouseHold: '',
204
+ check: true,
205
+ bank: null,
206
+ bank_account: '',
207
+ account_holder: '',
208
+ }}
209
+ onSubmit={onSubmit}
210
+ validationSchema={yup.object().shape({
211
+ terms: yup.bool().oneOf([true], ''),
212
+ statusWorking: yup
213
+ .object()
214
+ .required('Vui lòng chọn tình trạng làm việc')
215
+ .nullable(),
216
+ married: yup
217
+ .object()
218
+ .required('Vui lòng chọn tình trạng hôn nhân')
219
+ .nullable(),
220
+ gender: yup.object().required('Vui lòng chọn giới tính').nullable(),
221
+ bank: yup.object().required('Vui lòng chọn ngân hàng').nullable(),
222
+ jobTitle: yup.object().required('Vui lòng chọn chức vụ').nullable(),
223
+ sourceFund: yup
224
+ .object()
225
+ .required('Vui lòng chọn nguồn thu nhập')
226
+ .nullable(),
227
+ address: yup.string().required('Vui lòng nhập địa chỉ nơi ở'),
228
+ addressHouseHold: yup
229
+ .string()
230
+ .required('Vui lòng nhập địa chỉ thường trú'),
231
+ check: yup.bool().oneOf([true], ''),
232
+ bank_account: yup
233
+ .string()
234
+ .required('Vui lòng nhập số tài khoản')
235
+ .matches(/^[0-9]*$/, 'Định dạng không đúng'),
236
+ account_holder: yup
237
+ .string()
238
+ .required('Vui lòng nhập chủ tài khoản'),
239
+ })}
176
240
  >
177
- <ActivityIndicator size={'small'} color={color.primary} />
178
- </View>
179
- ) : (
180
- <ScrollView style={{ flex: 1 }}>
181
- <Formik
182
- innerRef={ref}
183
- initialValues={{
184
- loanAmount: '',
185
- terms: true,
186
- rate: '',
187
- gender: null,
188
- married: null,
189
- purpose: {
190
- id: 3008,
191
- name: 'Mua sắm trang thiết bị, vật dụng gia đình',
192
- },
193
- loanTime: '',
194
- statusWorking: null,
195
- jobTitle: null,
196
- sourceFund: null,
197
- taxCode: '',
198
- address: '',
199
- addressHouseHold: '',
200
- check: true,
201
- bank: null,
202
- bank_account: '',
203
- account_holder: '',
204
- }}
205
- onSubmit={onSubmit}
206
- validationSchema={yup.object().shape({
207
- terms: yup.bool().oneOf([true], ''),
208
- statusWorking: yup
209
- .object()
210
- .required('Vui lòng chọn tình trạng làm việc')
211
- .nullable(),
212
- married: yup
213
- .object()
214
- .required('Vui lòng chọn tình trạng hôn nhân')
215
- .nullable(),
216
- gender: yup
217
- .object()
218
- .required('Vui lòng chọn giới tính')
219
- .nullable(),
220
- bank: yup.object().required('Vui lòng chọn ngân hàng').nullable(),
221
- jobTitle: yup
222
- .object()
223
- .required('Vui lòng chọn chức vụ')
224
- .nullable(),
225
- sourceFund: yup
226
- .object()
227
- .required('Vui lòng chọn nguồn thu nhập')
228
- .nullable(),
229
- address: yup.string().required('Vui lòng nhập địa chỉ nơi ở'),
230
- addressHouseHold: yup
231
- .string()
232
- .required('Vui lòng nhập địa chỉ thường trú'),
233
- check: yup.bool().oneOf([true], ''),
234
- bank_account: yup
235
- .string()
236
- .required('Vui lòng nhập số tài khoản')
237
- .matches(/^[0-9]*$/, 'Định dạng không đúng'),
238
- account_holder: yup
239
- .string()
240
- .required('Vui lòng nhập chủ tài khoản'),
241
- })}
242
- >
243
- {({
244
- values,
245
- handleSubmit,
246
- setFieldValue,
247
- errors,
248
- handleChange,
249
- isValid,
250
- }) => (
251
- <View style={{ margin: 16 }}>
252
- <MText style={[commonStyles.textNormalBold, { fontSize: 16 }]}>
253
- THÔNG TIN ĐƠN
254
- </MText>
255
- <View
256
- style={{
257
- marginTop: 16,
258
- flexDirection: 'row',
259
- justifyContent: 'space-between',
260
- }}
261
- >
262
- <View style={{ flex: 1, marginRight: 8 }}>
263
- <MText style={[commonStyles.textNormal]}>
264
- Số tiền vay (VND)
265
- </MText>
266
- <TextInput
267
- style={[styles.input, { backgroundColor: '#F2F3F5' }]}
268
- value={formatMoney(values.loanAmount)}
269
- onChangeText={handleChange('loanAmount')}
270
- keyboardType="numeric"
271
- editable={false}
272
- />
273
- </View>
274
- <View style={{ flex: 1, marginLeft: 8 }}>
275
- <MText style={[commonStyles.textNormal]}>Kỳ hạn</MText>
276
- <TextInput
277
- style={[styles.input, { backgroundColor: '#F2F3F5' }]}
278
- value={`${values.loanTime} tháng`}
279
- onChangeText={handleChange('loanAmount')}
280
- keyboardType="numeric"
281
- editable={false}
282
- />
283
- </View>
284
- </View>
285
- <View
286
- style={{
287
- marginTop: 16,
288
- flexDirection: 'row',
289
- justifyContent: 'space-between',
290
- }}
291
- >
292
- <View style={{ flex: 1, marginRight: 8 }}>
293
- <MText style={[commonStyles.textNormal]}>
294
- Lãi suất (%)
295
- </MText>
296
- <TextInput
297
- editable={false}
298
- style={[styles.input, { backgroundColor: '#F2F3F5' }]}
299
- keyboardType="numeric"
300
- value={values.rate}
301
- onChangeText={handleChange('rate')}
302
- />
303
- </View>
304
- <View style={{ flex: 1, marginLeft: 8 }}></View>
305
- </View>
306
- <View
307
- style={{
308
- marginTop: 16,
309
- flexDirection: 'row',
310
- justifyContent: 'space-between',
311
- }}
312
- >
313
- <View style={{ flex: 1, marginRight: 8 }}>
314
- <MText style={[commonStyles.textNormal]}>
315
- Giới tính <MText style={{ color: 'red' }}>*</MText>
316
- </MText>
317
- <TouchableOpacity
318
- disabled
319
- style={[
320
- styles.input,
321
- {
322
- justifyContent: 'space-between',
323
- flexDirection: 'row',
324
- alignItems: 'center',
325
- backgroundColor: '#F2F3F5',
326
- },
327
- ]}
328
- onPress={() =>
329
- navigation.dispatch(
330
- StackActions.push(ScreenNames.CommonSelect, {
331
- title: 'Chọn giới tính',
332
- data: EnumGender,
333
- callback: (value) => {
334
- setFieldValue('gender', value);
335
- },
336
- })
337
- )
338
- }
339
- >
340
- <MText style={[commonStyles.textNormalBold]}>
341
- {values.gender ? values.gender?.name : ''}
342
- </MText>
343
- <DropDown2 />
344
- </TouchableOpacity>
345
- {errors && errors.gender && (
346
- <MText
347
- style={{
348
- fontSize: 12,
349
- color: 'red',
350
- fontStyle: 'italic',
351
- marginTop: 5,
352
- }}
353
- >
354
- {errors.gender}
355
- </MText>
356
- )}
357
- </View>
358
- <View style={{ flex: 1, marginLeft: 8 }}>
359
- <MText style={[commonStyles.textNormal]}>
360
- Tình trạng hôn nhân{' '}
361
- <MText style={{ color: 'red' }}>*</MText>
362
- </MText>
363
- <TouchableOpacity
364
- disabled={loan?.typeLoan === 4 ? false : true}
365
- style={[
366
- styles.input,
367
- {
368
- justifyContent: 'space-between',
369
- flexDirection: 'row',
370
- alignItems: 'center',
371
- backgroundColor:
372
- loan?.typeLoan === 4 ? 'white' : '#F2F3F5',
373
- },
374
- ]}
375
- onPress={() =>
376
- navigation.dispatch(
377
- StackActions.push(ScreenNames.CommonSelect, {
378
- title: 'Chọn tình trạng hôn nhân',
379
- data: FullSubmitStore.listTypeMerried,
380
- callback: (value) => {
381
- setFieldValue('married', value);
382
- },
383
- })
384
- )
385
- }
386
- >
387
- <MText style={[commonStyles.textNormalBold]}>
388
- {values.married ? values.married?.name : ''}
389
- </MText>
390
- <DropDown2 />
391
- </TouchableOpacity>
392
- {errors && errors.merried && (
393
- <MText
394
- style={{
395
- fontSize: 12,
396
- color: 'red',
397
- fontStyle: 'italic',
398
- marginTop: 5,
399
- }}
400
- >
401
- {errors.merried}
402
- </MText>
403
- )}
404
- </View>
405
- </View>
406
-
407
- <View style={{ marginTop: 16 }}>
241
+ {({
242
+ values,
243
+ handleSubmit,
244
+ setFieldValue,
245
+ errors,
246
+ handleChange,
247
+ isValid,
248
+ }) => (
249
+ <View style={{ margin: 16 }}>
250
+ <MText style={[commonStyles.textNormalBold, { fontSize: 16 }]}>
251
+ THÔNG TIN ĐƠN
252
+ </MText>
253
+ <View
254
+ style={{
255
+ marginTop: 16,
256
+ flexDirection: 'row',
257
+ justifyContent: 'space-between',
258
+ }}
259
+ >
260
+ <View style={{ flex: 1, marginRight: 8 }}>
408
261
  <MText style={[commonStyles.textNormal]}>
409
- Địa chỉ nơi ở <MText style={{ color: 'red' }}>*</MText>
262
+ Số tiền vay (VND)
410
263
  </MText>
264
+ <TextInput
265
+ style={[styles.input, { backgroundColor: '#F2F3F5' }]}
266
+ value={formatMoney(values.loanAmount)}
267
+ onChangeText={handleChange('loanAmount')}
268
+ keyboardType="numeric"
269
+ editable={false}
270
+ />
271
+ </View>
272
+ <View style={{ flex: 1, marginLeft: 8 }}>
273
+ <MText style={[commonStyles.textNormal]}>Kỳ hạn</MText>
274
+ <TextInput
275
+ style={[styles.input, { backgroundColor: '#F2F3F5' }]}
276
+ value={`${values.loanTime} tháng`}
277
+ onChangeText={handleChange('loanAmount')}
278
+ keyboardType="numeric"
279
+ editable={false}
280
+ />
281
+ </View>
282
+ </View>
283
+ <View
284
+ style={{
285
+ marginTop: 16,
286
+ flexDirection: 'row',
287
+ justifyContent: 'space-between',
288
+ }}
289
+ >
290
+ <View style={{ flex: 1, marginRight: 8 }}>
291
+ <MText style={[commonStyles.textNormal]}>Lãi suất (%)</MText>
411
292
  <TextInput
412
293
  editable={false}
413
294
  style={[styles.input, { backgroundColor: '#F2F3F5' }]}
414
- value={values.address}
415
- onChangeText={handleChange('address')}
295
+ keyboardType="numeric"
296
+ value={values.rate}
297
+ onChangeText={handleChange('rate')}
416
298
  />
417
- {errors && errors.address && (
299
+ </View>
300
+ <View style={{ flex: 1, marginLeft: 8 }}></View>
301
+ </View>
302
+ <View
303
+ style={{
304
+ marginTop: 16,
305
+ flexDirection: 'row',
306
+ justifyContent: 'space-between',
307
+ }}
308
+ >
309
+ <View style={{ flex: 1, marginRight: 8 }}>
310
+ <MText style={[commonStyles.textNormal]}>
311
+ Giới tính <MText style={{ color: 'red' }}>*</MText>
312
+ </MText>
313
+ <TouchableOpacity
314
+ disabled
315
+ style={[
316
+ styles.input,
317
+ {
318
+ justifyContent: 'space-between',
319
+ flexDirection: 'row',
320
+ alignItems: 'center',
321
+ backgroundColor: '#F2F3F5',
322
+ },
323
+ ]}
324
+ onPress={() =>
325
+ navigation.dispatch(
326
+ StackActions.push(ScreenNames.CommonSelect, {
327
+ title: 'Chọn giới tính',
328
+ data: EnumGender,
329
+ callback: (value) => {
330
+ setFieldValue('gender', value);
331
+ },
332
+ })
333
+ )
334
+ }
335
+ >
336
+ <MText style={[commonStyles.textNormalBold]}>
337
+ {values.gender ? values.gender?.name : ''}
338
+ </MText>
339
+ <DropDown2 />
340
+ </TouchableOpacity>
341
+ {errors && errors.gender && (
418
342
  <MText
419
343
  style={{
420
344
  fontSize: 12,
@@ -423,22 +347,45 @@ export const UpdateInfo = observer(function UpdateInfo({
423
347
  marginTop: 5,
424
348
  }}
425
349
  >
426
- {errors.address}
350
+ {errors.gender}
427
351
  </MText>
428
352
  )}
429
353
  </View>
430
- <View style={{ marginTop: 16 }}>
354
+ <View style={{ flex: 1, marginLeft: 8 }}>
431
355
  <MText style={[commonStyles.textNormal]}>
432
- Địa chỉ thường trú <MText style={{ color: 'red' }}>*</MText>
356
+ Tình trạng hôn nhân{' '}
357
+ <MText style={{ color: 'red' }}>*</MText>
433
358
  </MText>
434
- <TextInput
435
- editable={false}
436
- style={[styles.input, { backgroundColor: '#F2F3F5' }]}
437
- // style={styles.input}
438
- value={values.addressHouseHold}
439
- onChangeText={handleChange('addressHouseHold')}
440
- />
441
- {errors && errors.addressHouseHold && (
359
+ <TouchableOpacity
360
+ disabled={loan?.typeLoan === 4 ? false : true}
361
+ style={[
362
+ styles.input,
363
+ {
364
+ justifyContent: 'space-between',
365
+ flexDirection: 'row',
366
+ alignItems: 'center',
367
+ backgroundColor:
368
+ loan?.typeLoan === 4 ? 'white' : '#F2F3F5',
369
+ },
370
+ ]}
371
+ onPress={() =>
372
+ navigation.dispatch(
373
+ StackActions.push(ScreenNames.CommonSelect, {
374
+ title: 'Chọn tình trạng hôn nhân',
375
+ data: FullSubmitStore.listTypeMerried,
376
+ callback: (value) => {
377
+ setFieldValue('married', value);
378
+ },
379
+ })
380
+ )
381
+ }
382
+ >
383
+ <MText style={[commonStyles.textNormalBold]}>
384
+ {values.married ? values.married?.name : ''}
385
+ </MText>
386
+ <DropDown2 />
387
+ </TouchableOpacity>
388
+ {errors && errors.merried && (
442
389
  <MText
443
390
  style={{
444
391
  fontSize: 12,
@@ -447,491 +394,533 @@ export const UpdateInfo = observer(function UpdateInfo({
447
394
  marginTop: 5,
448
395
  }}
449
396
  >
450
- {errors.addressHouseHold}
397
+ {errors.merried}
451
398
  </MText>
452
399
  )}
453
400
  </View>
401
+ </View>
454
402
 
455
- <View
456
- style={{
457
- marginTop: 16,
458
- flexDirection: 'row',
459
- justifyContent: 'space-between',
460
- }}
461
- >
462
- <View style={{ flex: 1, marginRight: 8 }}>
463
- <MText style={[commonStyles.textNormal]}>
464
- Tình trạng việc làm{' '}
465
- <MText style={{ color: 'red' }}>*</MText>
466
- </MText>
467
- <TouchableOpacity
468
- style={[
469
- styles.input,
470
- {
471
- justifyContent: 'space-between',
472
- flexDirection: 'row',
473
- alignItems: 'center',
474
- backgroundColor:
475
- loan?.typeLoan === 4 ? 'white' : '#F2F3F5',
476
- },
477
- ]}
478
- disabled={loan?.typeLoan === 4 ? false : true}
479
- onPress={() =>
480
- navigation.dispatch(
481
- StackActions.push(ScreenNames.CommonSelect, {
482
- title: 'Tình trạng làm việc',
483
- data: FullSubmitStore.lstStatusJobCIMB,
484
- callback: (value) => {
485
- setFieldValue('statusWorking', value);
486
- },
487
- })
488
- )
489
- }
403
+ <View style={{ marginTop: 16 }}>
404
+ <MText style={[commonStyles.textNormal]}>
405
+ Địa chỉ nơi ở <MText style={{ color: 'red' }}>*</MText>
406
+ </MText>
407
+ <TextInput
408
+ editable={false}
409
+ style={[styles.input, { backgroundColor: '#F2F3F5' }]}
410
+ value={values.address}
411
+ onChangeText={handleChange('address')}
412
+ />
413
+ {errors && errors.address && (
414
+ <MText
415
+ style={{
416
+ fontSize: 12,
417
+ color: 'red',
418
+ fontStyle: 'italic',
419
+ marginTop: 5,
420
+ }}
421
+ >
422
+ {errors.address}
423
+ </MText>
424
+ )}
425
+ </View>
426
+ <View style={{ marginTop: 16 }}>
427
+ <MText style={[commonStyles.textNormal]}>
428
+ Địa chỉ thường trú <MText style={{ color: 'red' }}>*</MText>
429
+ </MText>
430
+ <TextInput
431
+ editable={false}
432
+ style={[styles.input, { backgroundColor: '#F2F3F5' }]}
433
+ // style={styles.input}
434
+ value={values.addressHouseHold}
435
+ onChangeText={handleChange('addressHouseHold')}
436
+ />
437
+ {errors && errors.addressHouseHold && (
438
+ <MText
439
+ style={{
440
+ fontSize: 12,
441
+ color: 'red',
442
+ fontStyle: 'italic',
443
+ marginTop: 5,
444
+ }}
445
+ >
446
+ {errors.addressHouseHold}
447
+ </MText>
448
+ )}
449
+ </View>
450
+
451
+ <View
452
+ style={{
453
+ marginTop: 16,
454
+ flexDirection: 'row',
455
+ justifyContent: 'space-between',
456
+ }}
457
+ >
458
+ <View style={{ flex: 1, marginRight: 8 }}>
459
+ <MText style={[commonStyles.textNormal]}>
460
+ Tình trạng việc làm{' '}
461
+ <MText style={{ color: 'red' }}>*</MText>
462
+ </MText>
463
+ <TouchableOpacity
464
+ style={[
465
+ styles.input,
466
+ {
467
+ justifyContent: 'space-between',
468
+ flexDirection: 'row',
469
+ alignItems: 'center',
470
+ backgroundColor:
471
+ loan?.typeLoan === 4 ? 'white' : '#F2F3F5',
472
+ },
473
+ ]}
474
+ disabled={loan?.typeLoan === 4 ? false : true}
475
+ onPress={() =>
476
+ navigation.dispatch(
477
+ StackActions.push(ScreenNames.CommonSelect, {
478
+ title: 'Tình trạng làm việc',
479
+ data: FullSubmitStore.lstStatusJobCIMB,
480
+ callback: (value) => {
481
+ setFieldValue('statusWorking', value);
482
+ },
483
+ })
484
+ )
485
+ }
486
+ >
487
+ <MText
488
+ style={[commonStyles.textNormalBold]}
489
+ numberOfLines={1}
490
490
  >
491
- <MText
492
- style={[commonStyles.textNormalBold]}
493
- numberOfLines={1}
494
- >
495
- {values.statusWorking?.name}
496
- </MText>
497
- <DropDown2 />
498
- </TouchableOpacity>
499
- {errors && errors.statusWorking && (
500
- <MText
501
- style={{
502
- fontSize: 12,
503
- color: 'red',
504
- fontStyle: 'italic',
505
- marginTop: 5,
506
- }}
507
- >
508
- {errors.statusWorking}
509
- </MText>
510
- )}
511
- </View>
512
- <View style={{ flex: 1, marginLeft: 8 }}>
513
- <MText style={[commonStyles.textNormal]}>
514
- Chức vụ <MText style={{ color: 'red' }}>*</MText>
491
+ {values.statusWorking?.name}
515
492
  </MText>
516
- <TouchableOpacity
517
- style={[
518
- styles.input,
519
- {
520
- justifyContent: 'space-between',
521
- flexDirection: 'row',
522
- alignItems: 'center',
523
- backgroundColor:
524
- loan?.typeLoan === 4 ? 'white' : '#F2F3F5',
525
- },
526
- ]}
527
- disabled={loan?.typeLoan === 4 ? false : true}
528
- onPress={() =>
529
- navigation.dispatch(
530
- StackActions.push(ScreenNames.CommonSelect, {
531
- title: 'Chọn chức vụ',
532
- data: FullSubmitStore.lstPositionCIMB,
533
- callback: (value) => {
534
- setFieldValue('jobTitle', value);
535
- },
536
- })
537
- )
538
- }
493
+ <DropDown2 />
494
+ </TouchableOpacity>
495
+ {errors && errors.statusWorking && (
496
+ <MText
497
+ style={{
498
+ fontSize: 12,
499
+ color: 'red',
500
+ fontStyle: 'italic',
501
+ marginTop: 5,
502
+ }}
539
503
  >
540
- <MText
541
- style={[commonStyles.textNormalBold]}
542
- numberOfLines={1}
543
- >
544
- {values.jobTitle?.name}
545
- </MText>
546
- <DropDown2 />
547
- </TouchableOpacity>
548
- {errors && errors.jobTitle && (
549
- <MText
550
- style={{
551
- fontSize: 12,
552
- color: 'red',
553
- fontStyle: 'italic',
554
- marginTop: 5,
555
- }}
556
- >
557
- {errors.jobTitle}
558
- </MText>
559
- )}
560
- </View>
561
- </View>
562
- <View
563
- style={{
564
- marginTop: 16,
565
- flexDirection: 'row',
566
- justifyContent: 'space-between',
567
- }}
568
- >
569
- <View style={{ flex: 1, marginRight: 8 }}>
570
- <MText style={[commonStyles.textNormal]}>
571
- Nguồn thu nhập <MText style={{ color: 'red' }}>*</MText>
504
+ {errors.statusWorking}
572
505
  </MText>
573
- <TouchableOpacity
574
- style={[
575
- styles.input,
576
- {
577
- justifyContent: 'space-between',
578
- flexDirection: 'row',
579
- alignItems: 'center',
580
- // backgroundColor: '#F2F3F5',
581
- },
582
- ]}
583
- // disabled
584
- onPress={() =>
585
- navigation.dispatch(
586
- StackActions.push(ScreenNames.CommonSelect, {
587
- title: 'Nguồn thu nhập',
588
- data: FullSubmitStore.lstIncomeCIMB,
589
- callback: (value) => {
590
- setFieldValue('sourceFund', value);
591
- },
592
- })
593
- )
594
- }
595
- >
596
- <MText
597
- style={[commonStyles.textNormalBold]}
598
- numberOfLines={1}
599
- >
600
- {values.sourceFund?.name}
601
- </MText>
602
- <DropDown2 />
603
- </TouchableOpacity>
604
- {errors && errors.sourceFund && (
605
- <MText
606
- style={{
607
- fontSize: 12,
608
- color: 'red',
609
- fontStyle: 'italic',
610
- marginTop: 5,
611
- }}
612
- >
613
- {errors.sourceFund}
614
- </MText>
615
- )}
616
- </View>
617
- <View style={{ flex: 1, marginLeft: 8 }}>
618
- <MText style={[commonStyles.textNormal]}>Mã số thuế</MText>
619
- <TextInput
620
- style={styles.input}
621
- keyboardType="number-pad"
622
- value={values.taxCode}
623
- onChangeText={handleChange('taxCode')}
624
- />
625
- </View>
506
+ )}
626
507
  </View>
627
- <View
628
- style={{
629
- marginTop: 16,
630
- flexDirection: 'row',
631
- justifyContent: 'space-between',
632
- }}
633
- >
634
- <View style={{ flex: 1, marginRight: 8 }}>
635
- <MText style={[commonStyles.textNormal]}>
636
- Mục đích sử dụng vốn
637
- </MText>
638
- <TouchableOpacity
639
- disabled
640
- style={[
641
- styles.input,
642
- {
643
- justifyContent: 'space-between',
644
- flexDirection: 'row',
645
- alignItems: 'center',
646
- backgroundColor: '#F2F3F5',
647
- },
648
- ]}
649
- >
650
- <MText
651
- style={[commonStyles.textNormalBold]}
652
- numberOfLines={1}
653
- >
654
- {values.purpose ? values.purpose?.name : ''}
655
- </MText>
656
- <DropDown2 />
657
- </TouchableOpacity>
658
- </View>
659
- <View style={{ flex: 1, marginLeft: 8 }}>
660
- <MText style={[commonStyles.textNormal]}>Ngân hàng</MText>
661
- <TouchableOpacity
662
- disabled
663
- style={[
664
- styles.input,
665
- {
666
- justifyContent: 'space-between',
667
- flexDirection: 'row',
668
- alignItems: 'center',
669
- backgroundColor: '#F2F3F5',
670
- },
671
- ]}
672
- onPress={() =>
673
- navigation.dispatch(
674
- StackActions.push(ScreenNames.CommonSelect, {
675
- title: 'Chọn ngân hàng',
676
- data: FullSubmitStore.listBanks,
677
- callback: (value) => {
678
- setFieldValue('bank', value);
679
- },
680
- })
681
- )
682
- }
508
+ <View style={{ flex: 1, marginLeft: 8 }}>
509
+ <MText style={[commonStyles.textNormal]}>
510
+ Chức vụ <MText style={{ color: 'red' }}>*</MText>
511
+ </MText>
512
+ <TouchableOpacity
513
+ style={[
514
+ styles.input,
515
+ {
516
+ justifyContent: 'space-between',
517
+ flexDirection: 'row',
518
+ alignItems: 'center',
519
+ backgroundColor:
520
+ loan?.typeLoan === 4 ? 'white' : '#F2F3F5',
521
+ },
522
+ ]}
523
+ disabled={loan?.typeLoan === 4 ? false : true}
524
+ onPress={() =>
525
+ navigation.dispatch(
526
+ StackActions.push(ScreenNames.CommonSelect, {
527
+ title: 'Chọn chức vụ',
528
+ data: FullSubmitStore.lstPositionCIMB,
529
+ callback: (value) => {
530
+ setFieldValue('jobTitle', value);
531
+ },
532
+ })
533
+ )
534
+ }
535
+ >
536
+ <MText
537
+ style={[commonStyles.textNormalBold]}
538
+ numberOfLines={1}
683
539
  >
684
- <MText
685
- style={[commonStyles.textNormalBold]}
686
- numberOfLines={1}
687
- >
688
- {values.bank ? values.bank?.name : ''}
689
- </MText>
690
- <DropDown2 />
691
- </TouchableOpacity>
692
- {errors && errors.bank && (
693
- <MText
694
- style={{
695
- fontSize: 12,
696
- color: 'red',
697
- fontStyle: 'italic',
698
- marginTop: 5,
699
- }}
700
- >
701
- {errors.bank}
702
- </MText>
703
- )}
704
- </View>
705
- </View>
706
- <View
707
- style={{
708
- marginTop: 16,
709
- flexDirection: 'row',
710
- justifyContent: 'space-between',
711
- }}
712
- >
713
- <View style={{ flex: 1, marginRight: 8 }}>
714
- <MText style={[commonStyles.textNormal]}>
715
- Số tài khoản
540
+ {values.jobTitle?.name}
716
541
  </MText>
717
- <TextInput
718
- numberOfLines={1}
719
- editable={false}
720
- style={[styles.input, { backgroundColor: '#F2F3F5' }]}
721
- // style={styles.input}
722
- value={values.bank_account}
723
- onChangeText={handleChange('bank_account')}
724
- keyboardType="numeric"
725
- />
726
- {errors && errors.bank_account && (
727
- <MText
728
- style={{
729
- fontSize: 12,
730
- color: 'red',
731
- fontStyle: 'italic',
732
- marginTop: 5,
733
- }}
734
- >
735
- {errors.bank_account}
736
- </MText>
737
- )}
738
- </View>
739
- <View style={{ flex: 1, marginLeft: 8 }}>
740
- <MText style={[commonStyles.textNormal]}>
741
- Chủ tài khoản
542
+ <DropDown2 />
543
+ </TouchableOpacity>
544
+ {errors && errors.jobTitle && (
545
+ <MText
546
+ style={{
547
+ fontSize: 12,
548
+ color: 'red',
549
+ fontStyle: 'italic',
550
+ marginTop: 5,
551
+ }}
552
+ >
553
+ {errors.jobTitle}
742
554
  </MText>
743
- <TextInput
744
- numberOfLines={1}
745
- editable={false}
746
- style={[styles.input, { backgroundColor: '#F2F3F5' }]}
747
- // style={styles.input}
748
- value={values.account_holder.toUpperCase()}
749
- onChangeText={handleChange('account_holder')}
750
- autoCapitalize="characters"
751
- />
752
- {errors && errors.account_holder && (
753
- <MText
754
- style={{
755
- fontSize: 12,
756
- color: 'red',
757
- fontStyle: 'italic',
758
- marginTop: 5,
759
- }}
760
- >
761
- {errors.account_holder}
762
- </MText>
763
- )}
764
- </View>
555
+ )}
765
556
  </View>
766
- <View
767
- style={{
768
- height: 1,
769
- backgroundColor: '#BDBDBD',
770
- marginVertical: 16,
771
- }}
772
- />
773
- <MText style={[commonStyles.textNormalBold]}>
774
- Điều kiện điều khoản:
775
- </MText>
776
- <View style={{ flexDirection: 'row', marginTop: 8 }}>
557
+ </View>
558
+ <View
559
+ style={{
560
+ marginTop: 16,
561
+ flexDirection: 'row',
562
+ justifyContent: 'space-between',
563
+ }}
564
+ >
565
+ <View style={{ flex: 1, marginRight: 8 }}>
566
+ <MText style={[commonStyles.textNormal]}>
567
+ Nguồn thu nhập <MText style={{ color: 'red' }}>*</MText>
568
+ </MText>
777
569
  <TouchableOpacity
778
- onPress={() => {
779
- setFieldValue('terms', !values.terms);
780
- }}
570
+ style={[
571
+ styles.input,
572
+ {
573
+ justifyContent: 'space-between',
574
+ flexDirection: 'row',
575
+ alignItems: 'center',
576
+ // backgroundColor: '#F2F3F5',
577
+ },
578
+ ]}
579
+ // disabled
580
+ onPress={() =>
581
+ navigation.dispatch(
582
+ StackActions.push(ScreenNames.CommonSelect, {
583
+ title: 'Nguồn thu nhập',
584
+ data: FullSubmitStore.lstIncomeCIMB,
585
+ callback: (value) => {
586
+ setFieldValue('sourceFund', value);
587
+ },
588
+ })
589
+ )
590
+ }
781
591
  >
782
- {!values.terms ? <CheckBox /> : <CheckBoxActive />}
592
+ <MText
593
+ style={[commonStyles.textNormalBold]}
594
+ numberOfLines={1}
595
+ >
596
+ {values.sourceFund?.name}
597
+ </MText>
598
+ <DropDown2 />
783
599
  </TouchableOpacity>
600
+ {errors && errors.sourceFund && (
601
+ <MText
602
+ style={{
603
+ fontSize: 12,
604
+ color: 'red',
605
+ fontStyle: 'italic',
606
+ marginTop: 5,
607
+ }}
608
+ >
609
+ {errors.sourceFund}
610
+ </MText>
611
+ )}
612
+ </View>
613
+ <View style={{ flex: 1, marginLeft: 8 }}>
614
+ <MText style={[commonStyles.textNormal]}>Mã số thuế</MText>
615
+ <TextInput
616
+ style={styles.input}
617
+ keyboardType="number-pad"
618
+ value={values.taxCode}
619
+ onChangeText={handleChange('taxCode')}
620
+ />
621
+ </View>
622
+ </View>
623
+ <View
624
+ style={{
625
+ marginTop: 16,
626
+ flexDirection: 'row',
627
+ justifyContent: 'space-between',
628
+ }}
629
+ >
630
+ <View style={{ flex: 1, marginRight: 8 }}>
631
+ <MText style={[commonStyles.textNormal]}>
632
+ Mục đích sử dụng vốn
633
+ </MText>
784
634
  <TouchableOpacity
785
- onPress={() => {
786
- setFieldValue('terms', !values.terms);
787
- }}
635
+ disabled
636
+ style={[
637
+ styles.input,
638
+ {
639
+ justifyContent: 'space-between',
640
+ flexDirection: 'row',
641
+ alignItems: 'center',
642
+ backgroundColor: '#F2F3F5',
643
+ },
644
+ ]}
788
645
  >
789
- <MText style={[commonStyles.textNormal, { marginLeft: 8 }]}>
790
- Tôi đồng ý với{' '}
646
+ <MText
647
+ style={[commonStyles.textNormalBold]}
648
+ numberOfLines={1}
649
+ >
650
+ {values.purpose ? values.purpose?.name : ''}
791
651
  </MText>
652
+ <DropDown2 />
792
653
  </TouchableOpacity>
654
+ </View>
655
+ <View style={{ flex: 1, marginLeft: 8 }}>
656
+ <MText style={[commonStyles.textNormal]}>Ngân hàng</MText>
793
657
  <TouchableOpacity
658
+ disabled
659
+ style={[
660
+ styles.input,
661
+ {
662
+ justifyContent: 'space-between',
663
+ flexDirection: 'row',
664
+ alignItems: 'center',
665
+ backgroundColor: '#F2F3F5',
666
+ },
667
+ ]}
794
668
  onPress={() =>
795
669
  navigation.dispatch(
796
- StackActions.push(ScreenNames.QuickTerm, {
797
- fullSubmit: true,
670
+ StackActions.push(ScreenNames.CommonSelect, {
671
+ title: 'Chọn ngân hàng',
672
+ data: FullSubmitStore.listBanks,
673
+ callback: (value) => {
674
+ setFieldValue('bank', value);
675
+ },
798
676
  })
799
677
  )
800
678
  }
801
679
  >
802
680
  <MText
803
- style={[
804
- commonStyles.textNormalBold,
805
- { color: '#EF4123' },
806
- ]}
681
+ style={[commonStyles.textNormalBold]}
682
+ numberOfLines={1}
807
683
  >
808
- điều kiện điều khoản
684
+ {values.bank ? values.bank?.name : ''}
809
685
  </MText>
686
+ <DropDown2 />
810
687
  </TouchableOpacity>
811
- </View>
812
-
813
- <TouchableOpacity
814
- style={{ flexDirection: 'row', marginTop: 16 }}
815
- onPress={() => {
816
- setFieldValue('check', !values.check);
817
- }}
818
- >
819
- {values.check ? <CheckBoxActive /> : <CheckBox />}
820
- <MText style={[commonStyles.textNormal, { marginLeft: 8 }]}>
821
- Tôi xác nhận những thông tin sau:
822
- </MText>
823
- </TouchableOpacity>
824
- <View style={{ paddingHorizontal: 30, marginTop: 8 }}>
825
- <View style={{ flexDirection: 'row', alignItems: 'center' }}>
826
- <View
827
- style={{
828
- height: 5,
829
- width: 5,
830
- backgroundColor: 'black',
831
- borderRadius: 30,
832
- }}
833
- />
834
- <MText style={[commonStyles.textNormal, { marginLeft: 5 }]}>
835
- Tôi đang sống tại Việt Nam
836
- </MText>
837
- </View>
838
- <View style={{ flexDirection: 'row', alignItems: 'center' }}>
839
- <View
840
- style={{
841
- height: 5,
842
- width: 5,
843
- backgroundColor: 'black',
844
- borderRadius: 30,
845
- }}
846
- />
847
- <MText style={[commonStyles.textNormal, { marginLeft: 5 }]}>
848
- Đồng ý cung cấp thông tin cho bên thứ ba
849
- </MText>
850
- </View>
851
- <View style={{ flexDirection: 'row' }}>
852
- <View
688
+ {errors && errors.bank && (
689
+ <MText
853
690
  style={{
854
- height: 5,
855
- width: 5,
856
- backgroundColor: 'black',
857
- borderRadius: 30,
691
+ fontSize: 12,
692
+ color: 'red',
693
+ fontStyle: 'italic',
694
+ marginTop: 5,
858
695
  }}
859
- />
860
- <MText style={[commonStyles.textNormal, { marginLeft: 5 }]}>
861
- Không là người nhận ủy thác của tổ{'\n'}chức uỷ thác nước
862
- ngoài
696
+ >
697
+ {errors.bank}
863
698
  </MText>
864
- </View>
865
- <View style={{ flexDirection: 'row', alignItems: 'center' }}>
866
- <View
699
+ )}
700
+ </View>
701
+ </View>
702
+ <View
703
+ style={{
704
+ marginTop: 16,
705
+ flexDirection: 'row',
706
+ justifyContent: 'space-between',
707
+ }}
708
+ >
709
+ <View style={{ flex: 1, marginRight: 8 }}>
710
+ <MText style={[commonStyles.textNormal]}>Số tài khoản</MText>
711
+ <TextInput
712
+ numberOfLines={1}
713
+ editable={false}
714
+ style={[styles.input, { backgroundColor: '#F2F3F5' }]}
715
+ // style={styles.input}
716
+ value={values.bank_account}
717
+ onChangeText={handleChange('bank_account')}
718
+ keyboardType="numeric"
719
+ />
720
+ {errors && errors.bank_account && (
721
+ <MText
867
722
  style={{
868
- height: 5,
869
- width: 5,
870
- backgroundColor: 'black',
871
- borderRadius: 30,
723
+ fontSize: 12,
724
+ color: 'red',
725
+ fontStyle: 'italic',
726
+ marginTop: 5,
872
727
  }}
873
- />
874
- <MText style={[commonStyles.textNormal, { marginLeft: 5 }]}>
875
- Không là thường trú nhân/công dân tại Mỹ
728
+ >
729
+ {errors.bank_account}
876
730
  </MText>
877
- </View>
878
- <View style={{ flexDirection: 'row', alignItems: 'center' }}>
879
- <View
731
+ )}
732
+ </View>
733
+ <View style={{ flex: 1, marginLeft: 8 }}>
734
+ <MText style={[commonStyles.textNormal]}>Chủ tài khoản</MText>
735
+ <TextInput
736
+ numberOfLines={1}
737
+ editable={false}
738
+ style={[styles.input, { backgroundColor: '#F2F3F5' }]}
739
+ // style={styles.input}
740
+ value={values.account_holder.toUpperCase()}
741
+ onChangeText={handleChange('account_holder')}
742
+ autoCapitalize="characters"
743
+ />
744
+ {errors && errors.account_holder && (
745
+ <MText
880
746
  style={{
881
- height: 5,
882
- width: 5,
883
- backgroundColor: 'black',
884
- borderRadius: 30,
747
+ fontSize: 12,
748
+ color: 'red',
749
+ fontStyle: 'italic',
750
+ marginTop: 5,
885
751
  }}
886
- />
887
- <MText style={[commonStyles.textNormal, { marginLeft: 5 }]}>
888
- Không có người quen làm tại CIMB
752
+ >
753
+ {errors.account_holder}
889
754
  </MText>
890
- </View>
755
+ )}
891
756
  </View>
892
- <View style={{ marginTop: 40 }}>
893
- <Observer>
894
- {() => (
895
- <TouchableOpacity
896
- disabled={!isValid || FullSubmitStore.loadingButton}
897
- onPress={() => handleSubmit()}
898
- >
899
- <LinearGradient
900
- colors={
901
- isValid
902
- ? ['#FF7A00', '#EF4123']
903
- : ['#BDBDBD', '#BDBDBD']
904
- }
905
- style={{
906
- alignItems: 'center',
907
- borderRadius: 30,
908
- height: 40,
909
- justifyContent: 'center',
910
- }}
911
- >
912
- {FullSubmitStore.loadingButton ? (
913
- <ActivityIndicator color={'white'} size="small" />
914
- ) : (
915
- <MText
916
- style={[
917
- commonStyles.textNormalBold,
918
- { color: '#FFFFFF' },
919
- ]}
920
- >
921
- Tiếp tục
922
- </MText>
923
- )}
924
- </LinearGradient>
925
- </TouchableOpacity>
926
- )}
927
- </Observer>
757
+ </View>
758
+ <View
759
+ style={{
760
+ height: 1,
761
+ backgroundColor: '#BDBDBD',
762
+ marginVertical: 16,
763
+ }}
764
+ />
765
+ <MText style={[commonStyles.textNormalBold]}>
766
+ Điều kiện và điều khoản:
767
+ </MText>
768
+ <View style={{ flexDirection: 'row', marginTop: 8 }}>
769
+ <TouchableOpacity
770
+ onPress={() => {
771
+ setFieldValue('terms', !values.terms);
772
+ }}
773
+ >
774
+ {!values.terms ? <CheckBox /> : <CheckBoxActive />}
775
+ </TouchableOpacity>
776
+ <TouchableOpacity
777
+ onPress={() => {
778
+ setFieldValue('terms', !values.terms);
779
+ }}
780
+ >
781
+ <MText style={[commonStyles.textNormal, { marginLeft: 8 }]}>
782
+ Tôi đồng ý với{' '}
783
+ </MText>
784
+ </TouchableOpacity>
785
+ <TouchableOpacity
786
+ onPress={() =>
787
+ navigation.dispatch(
788
+ StackActions.push(ScreenNames.QuickTerm, {
789
+ fullSubmit: true,
790
+ })
791
+ )
792
+ }
793
+ >
794
+ <MText
795
+ style={[commonStyles.textNormalBold, { color: '#EF4123' }]}
796
+ >
797
+ điều kiện và điều khoản
798
+ </MText>
799
+ </TouchableOpacity>
800
+ </View>
801
+
802
+ <TouchableOpacity
803
+ style={{ flexDirection: 'row', marginTop: 16 }}
804
+ onPress={() => {
805
+ setFieldValue('check', !values.check);
806
+ }}
807
+ >
808
+ {values.check ? <CheckBoxActive /> : <CheckBox />}
809
+ <MText style={[commonStyles.textNormal, { marginLeft: 8 }]}>
810
+ Tôi xác nhận những thông tin sau:
811
+ </MText>
812
+ </TouchableOpacity>
813
+ <View style={{ paddingHorizontal: 30, marginTop: 8 }}>
814
+ <View style={{ flexDirection: 'row', alignItems: 'center' }}>
815
+ <View
816
+ style={{
817
+ height: 5,
818
+ width: 5,
819
+ backgroundColor: 'black',
820
+ borderRadius: 30,
821
+ }}
822
+ />
823
+ <MText style={[commonStyles.textNormal, { marginLeft: 5 }]}>
824
+ Tôi đang sống tại Việt Nam
825
+ </MText>
826
+ </View>
827
+ <View style={{ flexDirection: 'row', alignItems: 'center' }}>
828
+ <View
829
+ style={{
830
+ height: 5,
831
+ width: 5,
832
+ backgroundColor: 'black',
833
+ borderRadius: 30,
834
+ }}
835
+ />
836
+ <MText style={[commonStyles.textNormal, { marginLeft: 5 }]}>
837
+ Đồng ý cung cấp thông tin cho bên thứ ba
838
+ </MText>
839
+ </View>
840
+ <View style={{ flexDirection: 'row' }}>
841
+ <View
842
+ style={{
843
+ height: 5,
844
+ width: 5,
845
+ backgroundColor: 'black',
846
+ borderRadius: 30,
847
+ }}
848
+ />
849
+ <MText style={[commonStyles.textNormal, { marginLeft: 5 }]}>
850
+ Không là người nhận ủy thác của tổ{'\n'}chức uỷ thác nước
851
+ ngoài
852
+ </MText>
853
+ </View>
854
+ <View style={{ flexDirection: 'row', alignItems: 'center' }}>
855
+ <View
856
+ style={{
857
+ height: 5,
858
+ width: 5,
859
+ backgroundColor: 'black',
860
+ borderRadius: 30,
861
+ }}
862
+ />
863
+ <MText style={[commonStyles.textNormal, { marginLeft: 5 }]}>
864
+ Không là thường trú nhân/công dân tại Mỹ
865
+ </MText>
866
+ </View>
867
+ <View style={{ flexDirection: 'row', alignItems: 'center' }}>
868
+ <View
869
+ style={{
870
+ height: 5,
871
+ width: 5,
872
+ backgroundColor: 'black',
873
+ borderRadius: 30,
874
+ }}
875
+ />
876
+ <MText style={[commonStyles.textNormal, { marginLeft: 5 }]}>
877
+ Không có người quen làm tại CIMB
878
+ </MText>
928
879
  </View>
929
- <KeyboardSpacer />
930
880
  </View>
931
- )}
932
- </Formik>
933
- </ScrollView>
934
- )}
881
+ <View style={{ marginTop: 40 }}>
882
+ <Observer>
883
+ {() => (
884
+ <TouchableOpacity
885
+ disabled={!isValid || FullSubmitStore.loadingButton}
886
+ onPress={() => handleSubmit()}
887
+ >
888
+ <LinearGradient
889
+ colors={
890
+ isValid
891
+ ? ['#FF7A00', '#EF4123']
892
+ : ['#BDBDBD', '#BDBDBD']
893
+ }
894
+ style={{
895
+ alignItems: 'center',
896
+ borderRadius: 30,
897
+ height: 40,
898
+ justifyContent: 'center',
899
+ }}
900
+ >
901
+ {FullSubmitStore.loadingButton ? (
902
+ <ActivityIndicator color={'white'} size="small" />
903
+ ) : (
904
+ <MText
905
+ style={[
906
+ commonStyles.textNormalBold,
907
+ { color: '#FFFFFF' },
908
+ ]}
909
+ >
910
+ Tiếp tục
911
+ </MText>
912
+ )}
913
+ </LinearGradient>
914
+ </TouchableOpacity>
915
+ )}
916
+ </Observer>
917
+ </View>
918
+ <KeyboardSpacer />
919
+ </View>
920
+ )}
921
+ </Formik>
922
+ </ScrollView>
923
+
935
924
  <Loading isLoading={isLoading} />
936
925
  </View>
937
926
  );