react-native-timacare 3.1.13-beta → 3.1.15-beta

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 (139) hide show
  1. package/lib/commonjs/assets/svgs/edit_disable.svg +15 -0
  2. package/lib/commonjs/assets/svgs/ekyc_disable.svg +4 -0
  3. package/lib/commonjs/assets/svgs/expand.svg +8 -0
  4. package/lib/commonjs/assets/svgs/expand_up.svg +8 -0
  5. package/lib/commonjs/assets/svgs/index.js +1 -1
  6. package/lib/commonjs/assets/svgs/index.js.flow +16 -0
  7. package/lib/commonjs/assets/svgs/index.js.map +1 -1
  8. package/lib/commonjs/assets/svgs/money.svg +5 -0
  9. package/lib/commonjs/assets/svgs/sign_disable.svg +12 -0
  10. package/lib/commonjs/assets/svgs/sign_success.svg +12 -0
  11. package/lib/commonjs/assets/svgs/tima_16.svg +13 -0
  12. package/lib/commonjs/screens/home/index.js +1 -1
  13. package/lib/commonjs/screens/home/index.js.flow +2242 -1617
  14. package/lib/commonjs/screens/home/index.js.map +1 -1
  15. package/lib/commonjs/screens/liveness-v2/index.js +1 -1
  16. package/lib/commonjs/screens/liveness-v2/index.js.flow +10 -6
  17. package/lib/commonjs/screens/liveness-v2/index.js.map +1 -1
  18. package/lib/commonjs/screens/register/index.js +1 -1
  19. package/lib/commonjs/screens/register/index.js.flow +1 -1
  20. package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js +1 -1
  21. package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js.flow +123 -36
  22. package/lib/commonjs/screens/toan-trinh-so/LoanInterestRate.js.map +1 -1
  23. package/lib/commonjs/screens/toan-trinh-so/OCR.js +1 -1
  24. package/lib/commonjs/screens/toan-trinh-so/OCR.js.flow +3 -1
  25. package/lib/commonjs/screens/toan-trinh-so/OCR.js.map +1 -1
  26. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js +1 -1
  27. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.flow +3 -1
  28. package/lib/commonjs/screens/toan-trinh-so/RegisterCamera.js.map +1 -1
  29. package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js +1 -1
  30. package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.flow +538 -510
  31. package/lib/commonjs/screens/toan-trinh-so/ReviewInformation.js.map +1 -1
  32. package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js +1 -1
  33. package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js.flow +76 -57
  34. package/lib/commonjs/screens/toan-trinh-so/ReviewInformationOther.js.map +1 -1
  35. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js +1 -1
  36. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.flow +58 -12
  37. package/lib/commonjs/screens/toan-trinh-so/ReviewLoan.js.map +1 -1
  38. package/lib/commonjs/screens/toan-trinh-so/TTSOTP.js +1 -1
  39. package/lib/commonjs/screens/toan-trinh-so/TTSOTP.js.flow +6 -7
  40. package/lib/commonjs/screens/toan-trinh-so/TTSOTP.js.map +1 -1
  41. package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js +1 -1
  42. package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.flow +185 -50
  43. package/lib/commonjs/screens/toan-trinh-so/TTSSignLoan.js.map +1 -1
  44. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js +1 -1
  45. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.flow +3 -1
  46. package/lib/commonjs/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
  47. package/lib/commonjs/screens/toan-trinh-so/store.js +1 -1
  48. package/lib/commonjs/screens/toan-trinh-so/store.js.flow +23 -1
  49. package/lib/commonjs/screens/toan-trinh-so/store.js.map +1 -1
  50. package/lib/commonjs/services/api/api.js +1 -1
  51. package/lib/commonjs/services/api/api.js.flow +46 -0
  52. package/lib/commonjs/services/api/api.js.map +1 -1
  53. package/lib/commonjs/utils/index.js +1 -1
  54. package/lib/commonjs/utils/index.js.flow +51 -0
  55. package/lib/commonjs/utils/index.js.map +1 -1
  56. package/lib/module/assets/svgs/edit_disable.svg +15 -0
  57. package/lib/module/assets/svgs/ekyc_disable.svg +4 -0
  58. package/lib/module/assets/svgs/expand.svg +8 -0
  59. package/lib/module/assets/svgs/expand_up.svg +8 -0
  60. package/lib/module/assets/svgs/index.js +1 -1
  61. package/lib/module/assets/svgs/index.js.map +1 -1
  62. package/lib/module/assets/svgs/money.svg +5 -0
  63. package/lib/module/assets/svgs/sign_disable.svg +12 -0
  64. package/lib/module/assets/svgs/sign_success.svg +12 -0
  65. package/lib/module/assets/svgs/tima_16.svg +13 -0
  66. package/lib/module/screens/home/index.js +1 -1
  67. package/lib/module/screens/home/index.js.map +1 -1
  68. package/lib/module/screens/liveness-v2/index.js +1 -1
  69. package/lib/module/screens/liveness-v2/index.js.map +1 -1
  70. package/lib/module/screens/register/index.js +1 -1
  71. package/lib/module/screens/toan-trinh-so/LoanInterestRate.js +1 -1
  72. package/lib/module/screens/toan-trinh-so/LoanInterestRate.js.map +1 -1
  73. package/lib/module/screens/toan-trinh-so/OCR.js +1 -1
  74. package/lib/module/screens/toan-trinh-so/OCR.js.map +1 -1
  75. package/lib/module/screens/toan-trinh-so/RegisterCamera.js +1 -1
  76. package/lib/module/screens/toan-trinh-so/RegisterCamera.js.map +1 -1
  77. package/lib/module/screens/toan-trinh-so/ReviewInformation.js +1 -1
  78. package/lib/module/screens/toan-trinh-so/ReviewInformation.js.map +1 -1
  79. package/lib/module/screens/toan-trinh-so/ReviewInformationOther.js +1 -1
  80. package/lib/module/screens/toan-trinh-so/ReviewInformationOther.js.map +1 -1
  81. package/lib/module/screens/toan-trinh-so/ReviewLoan.js +1 -1
  82. package/lib/module/screens/toan-trinh-so/ReviewLoan.js.map +1 -1
  83. package/lib/module/screens/toan-trinh-so/TTSOTP.js +1 -1
  84. package/lib/module/screens/toan-trinh-so/TTSOTP.js.map +1 -1
  85. package/lib/module/screens/toan-trinh-so/TTSSignLoan.js +1 -1
  86. package/lib/module/screens/toan-trinh-so/TTSSignLoan.js.map +1 -1
  87. package/lib/module/screens/toan-trinh-so/VehicleCamera.js +1 -1
  88. package/lib/module/screens/toan-trinh-so/VehicleCamera.js.map +1 -1
  89. package/lib/module/screens/toan-trinh-so/store.js +1 -1
  90. package/lib/module/screens/toan-trinh-so/store.js.map +1 -1
  91. package/lib/module/services/api/api.js +1 -1
  92. package/lib/module/services/api/api.js.map +1 -1
  93. package/lib/module/utils/index.js +1 -1
  94. package/lib/module/utils/index.js.map +1 -1
  95. package/lib/typescript/assets/svgs/index.d.ts +9 -1
  96. package/lib/typescript/assets/svgs/index.d.ts.map +1 -1
  97. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  98. package/lib/typescript/screens/liveness-v2/index.d.ts.map +1 -1
  99. package/lib/typescript/screens/toan-trinh-so/LoanInterestRate.d.ts.map +1 -1
  100. package/lib/typescript/screens/toan-trinh-so/OCR.d.ts.map +1 -1
  101. package/lib/typescript/screens/toan-trinh-so/RegisterCamera.d.ts.map +1 -1
  102. package/lib/typescript/screens/toan-trinh-so/ReviewInformation.d.ts.map +1 -1
  103. package/lib/typescript/screens/toan-trinh-so/ReviewInformationOther.d.ts.map +1 -1
  104. package/lib/typescript/screens/toan-trinh-so/ReviewLoan.d.ts.map +1 -1
  105. package/lib/typescript/screens/toan-trinh-so/TTSOTP.d.ts +1 -1
  106. package/lib/typescript/screens/toan-trinh-so/TTSOTP.d.ts.map +1 -1
  107. package/lib/typescript/screens/toan-trinh-so/TTSSignLoan.d.ts.map +1 -1
  108. package/lib/typescript/screens/toan-trinh-so/VehicleCamera.d.ts.map +1 -1
  109. package/lib/typescript/screens/toan-trinh-so/store.d.ts +2 -0
  110. package/lib/typescript/screens/toan-trinh-so/store.d.ts.map +1 -1
  111. package/lib/typescript/services/api/api.d.ts +48 -0
  112. package/lib/typescript/services/api/api.d.ts.map +1 -1
  113. package/lib/typescript/utils/index.d.ts +8 -0
  114. package/lib/typescript/utils/index.d.ts.map +1 -1
  115. package/package.json +1 -1
  116. package/src/assets/svgs/edit_disable.svg +15 -0
  117. package/src/assets/svgs/ekyc_disable.svg +4 -0
  118. package/src/assets/svgs/expand.svg +8 -0
  119. package/src/assets/svgs/expand_up.svg +8 -0
  120. package/src/assets/svgs/index.tsx +16 -0
  121. package/src/assets/svgs/money.svg +5 -0
  122. package/src/assets/svgs/sign_disable.svg +12 -0
  123. package/src/assets/svgs/sign_success.svg +12 -0
  124. package/src/assets/svgs/tima_16.svg +13 -0
  125. package/src/screens/home/index.tsx +2242 -1617
  126. package/src/screens/liveness-v2/index.tsx +10 -6
  127. package/src/screens/register/index.tsx +1 -1
  128. package/src/screens/toan-trinh-so/LoanInterestRate.tsx +123 -36
  129. package/src/screens/toan-trinh-so/OCR.tsx +3 -1
  130. package/src/screens/toan-trinh-so/RegisterCamera.tsx +3 -1
  131. package/src/screens/toan-trinh-so/ReviewInformation.tsx +538 -510
  132. package/src/screens/toan-trinh-so/ReviewInformationOther.tsx +76 -57
  133. package/src/screens/toan-trinh-so/ReviewLoan.tsx +58 -12
  134. package/src/screens/toan-trinh-so/TTSOTP.tsx +6 -7
  135. package/src/screens/toan-trinh-so/TTSSignLoan.tsx +185 -50
  136. package/src/screens/toan-trinh-so/VehicleCamera.tsx +3 -1
  137. package/src/screens/toan-trinh-so/store.ts +23 -1
  138. package/src/services/api/api.ts +46 -0
  139. package/src/utils/index.tsx +51 -0
@@ -42,6 +42,7 @@ import {
42
42
  IconNavClose,
43
43
  IconNotify,
44
44
  IconSchedule,
45
+ IconSign,
45
46
  IconSign2,
46
47
  IconVideo,
47
48
  Info,
@@ -84,7 +85,16 @@ import {
84
85
  IconEditSuccess,
85
86
  IconEkyc,
86
87
  IconEkycSuccess,
88
+ IconEkycDisable,
89
+ IconSignDisable,
90
+ IconTima16,
91
+ IconExpand,
92
+ IconExpandUp,
93
+ IconSignSuccess,
94
+ IconMoney2,
95
+ IconEditDisable,
87
96
  } from '../../assets/svgs';
97
+ import { o } from 'ramda';
88
98
 
89
99
  const listBanners = [
90
100
  require('../../assets/img/banner1.png'),
@@ -96,6 +106,8 @@ const $action: ViewStyle = {
96
106
  alignItems: 'center',
97
107
  };
98
108
 
109
+ let _unsubscribe;
110
+
99
111
  export const Home = observer(function Home() {
100
112
  const navigation = useNavigation();
101
113
  const [showModal, setShowModal] = useState(false);
@@ -107,16 +119,22 @@ export const Home = observer(function Home() {
107
119
  const [isLoading, setIsLoading] = useState(false);
108
120
  const [loanCimb, setLoanCimb] = useState(null);
109
121
  const [loan, setLoan] = useState(null);
122
+ const [expandedId, setExpandedId] = useState(null); // ID item đang mở
123
+
124
+ const toggleExpand = (id) => {
125
+ setExpandedId((prev) => (prev === id ? null : id));
126
+ };
110
127
 
111
- const onRefresh = () => {
128
+ const onRefresh = async () => {
112
129
  setIsLoading(true);
113
- homeStore.getListLoan();
114
- homeStore.getListLoanPending(
115
- async (res) => {
116
- setListLoan(res);
117
- if (res) {
130
+ try {
131
+ const response = await Api.getInstance().listLoanPending();
132
+ setIsLoading(false);
133
+ if (response.kind === 'ok') {
134
+ if (response.data?.meta?.errorCode === 200) {
135
+ setListLoan(response.data?.data);
118
136
  Promise.all(
119
- res?.map(async (item) => {
137
+ response.data?.data?.map(async (item) => {
120
138
  homeStore.getCheckEKYC(
121
139
  { loanBriefId: item.id },
122
140
  (response) => {}
@@ -149,13 +167,62 @@ export const Home = observer(function Home() {
149
167
  }
150
168
  })
151
169
  );
170
+ } else {
171
+ Alert.alert('Thông báo', response?.data?.meta?.errorMessage);
152
172
  }
153
- setIsLoading(false);
154
- },
155
- () => {
156
- setIsLoading(false);
173
+ } else {
174
+ Alert.alert('Thông báo', 'Có lỗi xảy ra. Vui lòng thử lại sau');
157
175
  }
158
- );
176
+ } catch (error) {
177
+ console.log(error);
178
+ setIsLoading(false);
179
+ }
180
+
181
+ // homeStore.getListLoanPending(
182
+ // async (res) => {
183
+ // setListLoan(res);
184
+ // if (res) {
185
+ // Promise.all(
186
+ // res?.map(async (item) => {
187
+ // homeStore.getCheckEKYC(
188
+ // { loanBriefId: item.id },
189
+ // (response) => {}
190
+ // );
191
+ // if (item?.productId !== 8) {
192
+ // if (item?.messageErrorCIMB && item.messageErrorCIMB !== '') {
193
+ // setLoanCimb(item);
194
+ // setTimeout(() => {
195
+ // setShowModal(true);
196
+ // }, 200);
197
+ // }
198
+ // if (
199
+ // (item?.typeLoan === 4 || item?.typeLoan === 2) &&
200
+ // item?.isCimbApproveFull !== null
201
+ // ) {
202
+ // const checkShow = await load(`SHOW_${item?.id}`);
203
+ // if (!checkShow || checkShow !== true) {
204
+ // setLoanCimb(item);
205
+ // setTimeout(() => {
206
+ // setShowModal2(true);
207
+ // }, 200);
208
+ // }
209
+ // }
210
+ // }
211
+ // if (item?.typeLoan === 5 && item.step === 5) {
212
+ // setLoan(item);
213
+ // setTimeout(() => {
214
+ // setShowModal3(true);
215
+ // }, 300);
216
+ // }
217
+ // })
218
+ // );
219
+ // }
220
+ // setIsLoading(false);
221
+ // },
222
+ // () => {
223
+ // setIsLoading(false);
224
+ // }
225
+ // );
159
226
  };
160
227
 
161
228
  useEffect(() => {
@@ -165,10 +232,12 @@ export const Home = observer(function Home() {
165
232
  useEffect(() => {
166
233
  navigation.addListener('focus', () => {
167
234
  onRefresh();
235
+ homeStore.getListLoan();
236
+ getLocation();
168
237
  });
169
238
  }, [navigation]);
170
239
 
171
- useEffect(async () => {
240
+ useEffect(() => {
172
241
  setTimeout(() => {
173
242
  FullSubmitStore.getTypeMerried();
174
243
  FullSubmitStore.getListBank();
@@ -286,12 +355,6 @@ export const Home = observer(function Home() {
286
355
  );
287
356
  };
288
357
 
289
- useEffect(() => {
290
- return navigation.addListener('focus', () => {
291
- getLocation();
292
- });
293
- }, [navigation]);
294
-
295
358
  const checkTerm = (loan, action) => {
296
359
  if (loan?.isConfirmTimaRule && loan?.isConfirmTimaRule === true) {
297
360
  navigation.dispatch(StackActions.push(ScreenNames.Terms, loan));
@@ -300,6 +363,56 @@ export const Home = observer(function Home() {
300
363
  if (action) action();
301
364
  };
302
365
 
366
+ const acceptLoan = async () => {
367
+ setIsLoading(true);
368
+ try {
369
+ const response = await Api.getInstance().changePipeline({
370
+ LoanBriefId: loan?.id,
371
+ TypeId: 1,
372
+ });
373
+ setIsLoading(false);
374
+ if (response.kind === 'ok') {
375
+ if (response.data?.meta?.errorCode === 200) {
376
+ setShowModal3(false);
377
+ setTimeout(() => {
378
+ onRefresh();
379
+ }, 300);
380
+ } else {
381
+ Alert.alert('Thông báo', response.data?.meta?.errorMessage);
382
+ }
383
+ } else {
384
+ Alert.alert('Thông báo', 'Có lỗi xảy ra. Vui lòng thử lại sau');
385
+ }
386
+ } catch (error) {
387
+ setIsLoading(false);
388
+ }
389
+ };
390
+
391
+ const rejectLoan = async () => {
392
+ setIsLoading(true);
393
+ try {
394
+ const response = await Api.getInstance().changePipeline({
395
+ LoanBriefId: loan?.id,
396
+ TypeId: 2,
397
+ });
398
+ setIsLoading(false);
399
+ if (response.kind === 'ok') {
400
+ if (response.data?.meta?.errorCode === 200) {
401
+ setShowModal3(false);
402
+ setTimeout(() => {
403
+ onRefresh();
404
+ }, 300);
405
+ } else {
406
+ Alert.alert('Thông báo', response.data?.meta?.errorMessage);
407
+ }
408
+ } else {
409
+ Alert.alert('Thông báo', 'Có lỗi xảy ra. Vui lòng thử lại sau');
410
+ }
411
+ } catch (error) {
412
+ setIsLoading(false);
413
+ }
414
+ };
415
+
303
416
  return (
304
417
  <View
305
418
  style={[commonStyles.fill, { zIndex: 1, backgroundColor: '#FFFFFF' }]}
@@ -378,196 +491,323 @@ export const Home = observer(function Home() {
378
491
  </View>
379
492
  ) : (
380
493
  <View>
381
- {listLoan?.map((item, index) => (
382
- <View style={{ marginBottom: 14 }} key={index}>
383
- {/* TOÀN TRÌNH SỐ */}
384
- {item?.typeLoan === 5 ? (
385
- <View>
386
- <View
387
- style={{
388
- backgroundColor: '#FFFFFF',
389
- paddingHorizontal: 16,
390
- paddingTop: 16,
391
- borderRadius: 8,
392
- borderWidth: 0.5,
393
- borderColor: '#E0E0E0',
394
- }}
395
- >
396
- <View
397
- style={{
398
- flexDirection: 'row',
399
- alignItems: 'center',
400
- }}
401
- >
402
- <Contract />
403
- <View style={{ flex: 1, paddingLeft: 8 }}>
404
- <MText style={commonStyles.textNormalBold}>
405
- Mã Đơn vay-{item?.id}
406
- </MText>
407
- <MText style={commonStyles.textNormal}>
408
- Số tiền vay (VND):{' '}
409
- {item?.loanAmount
410
- ? formatMoney(item?.loanAmount)
411
- : 'Chưa xác định'}
412
- </MText>
413
- </View>
414
- </View>
415
- <View
416
- style={{
417
- height: 1,
418
- backgroundColor: '#E0E0E0',
419
- marginVertical: 16,
420
- }}
421
- />
422
- <View
423
- style={{
424
- flexDirection: 'row',
425
- justifyContent: 'space-between',
426
- }}
427
- >
428
- <MText style={commonStyles.textNormal}>
429
- Trạng thái
430
- </MText>
431
- <MText
432
- style={[
433
- commonStyles.textNormalBold,
434
- { color: '#F05123' },
435
- ]}
436
- >
437
- {item?.loanStatus}
438
- </MText>
439
- </View>
440
- <View
441
- style={{
442
- height: 1,
443
- backgroundColor: '#E0E0E0',
444
- marginVertical: 16,
445
- }}
446
- />
447
-
494
+ {listLoan?.map((item, index) => {
495
+ const isExpanded = expandedId === item.id;
496
+ return (
497
+ <View style={{ marginBottom: 14 }} key={index}>
498
+ {/* TOÀN TRÌNH SỐ */}
499
+ {item?.typeLoan === 5 ? (
500
+ <View>
448
501
  <View
449
502
  style={{
450
- flexDirection: 'row',
451
- justifyContent: 'space-between',
503
+ backgroundColor: '#FFFFFF',
504
+ paddingHorizontal: 16,
505
+ paddingTop: 16,
506
+ borderRadius: 8,
507
+ borderWidth: 0.5,
508
+ borderColor: '#E0E0E0',
452
509
  }}
453
510
  >
454
- <TouchableOpacity
455
- disabled={item?.step >= 3 ? true : false}
456
- style={$action}
457
- onPress={() => {
458
- if (item?.step === 0) {
459
- navigation.push(ScreenNames.OCR, {
460
- loan: item,
461
- front: true,
462
- });
463
- } else if (item?.step === 1) {
464
- navigation.push(ScreenNames.VehicleCamera, {
465
- loan: item,
466
- front: true,
467
- });
468
- } else if (item?.step === 2) {
469
- navigation.push(ScreenNames.RegisterCamera, {
470
- loan: item,
471
- });
472
- }
511
+ <LinearGradient
512
+ colors={['#FF8E4F', '#EF592E']}
513
+ style={{
514
+ borderTopLeftRadius: 8,
515
+ borderTopRightRadius: 8,
516
+ marginVertical: -16,
517
+ marginHorizontal: -16,
473
518
  }}
474
519
  >
475
- {item?.step >= 3 ? (
476
- <IconOCRSuccess />
477
- ) : (
478
- <OcrSvg />
479
- )}
480
- <MText
520
+ <View
481
521
  style={{
482
- textAlign: 'center',
483
- fontSize: 10,
484
- marginTop: 5,
485
- color: '#333333',
522
+ flexDirection: 'row',
523
+ justifyContent: 'space-between',
524
+ alignItems: 'center',
525
+ paddingHorizontal: 16,
526
+ paddingVertical: 8,
486
527
  }}
487
528
  >
488
- OCR{'\n'}chứng từ
489
- </MText>
490
- </TouchableOpacity>
491
- <TouchableOpacity
492
- disabled={item?.step !== 3 ? true : false}
493
- style={$action}
494
- onPress={() => {
495
- if (item?.step === 3) {
496
- navigation.push(
497
- ScreenNames.ReviewInformation,
498
- {
499
- loan: item,
500
- }
501
- );
502
- }
503
- }}
504
- >
505
- {item.step > 3 ? (
506
- <IconEditSuccess />
507
- ) : (
508
- <IconEdit />
529
+ <View
530
+ style={{
531
+ flexDirection: 'row',
532
+ alignItems: 'center',
533
+ gap: 8,
534
+ }}
535
+ >
536
+ <IconMoney2 />
537
+ <MText
538
+ style={{
539
+ fontSize: 12,
540
+ color: 'white',
541
+ }}
542
+ >
543
+ Số tiền đăng ký vay
544
+ </MText>
545
+ </View>
546
+ <MText
547
+ style={{
548
+ fontSize: 12,
549
+ color: 'white',
550
+ fontWeight: 'bold',
551
+ }}
552
+ >
553
+ {item?.listLoanAllAutoDE &&
554
+ item?.listLoanAllAutoDE.length > 0
555
+ ? formatMoney(
556
+ item?.listLoanAllAutoDE.reduce(
557
+ (sum, item) => sum + item.totalMoney,
558
+ 0
559
+ )
560
+ )
561
+ : formatMoney(item?.loanAmount)}
562
+ đ
563
+ </MText>
564
+ </View>
565
+ </LinearGradient>
566
+ {item?.listLoanAllAutoDE &&
567
+ item?.listLoanAllAutoDE.length > 0 && (
568
+ <View
569
+ style={{
570
+ marginHorizontal: -16,
571
+ backgroundColor: '#FFF3E9',
572
+ paddingHorizontal: 16,
573
+ paddingVertical: 8,
574
+ marginTop: 16,
575
+ }}
576
+ >
577
+ <View
578
+ style={{
579
+ flexDirection: 'row',
580
+ justifyContent: 'space-between',
581
+ }}
582
+ >
583
+ <MText
584
+ style={{
585
+ fontSize: 10,
586
+ color: '#878787',
587
+ marginLeft: 24,
588
+ }}
589
+ >
590
+ Số tiền giải ngân
591
+ </MText>
592
+ <MText
593
+ style={{
594
+ fontSize: 10,
595
+ color: '#333333',
596
+ }}
597
+ >
598
+ {formatMoney(
599
+ item?.listLoanAllAutoDE.reduce(
600
+ (sum, item) => sum + item.loanAmount,
601
+ 0
602
+ )
603
+ )}{' '}
604
+ đ
605
+ </MText>
606
+ </View>
607
+ <View
608
+ style={{
609
+ flexDirection: 'row',
610
+ justifyContent: 'space-between',
611
+ marginTop: 6,
612
+ }}
613
+ >
614
+ <MText
615
+ style={{
616
+ fontSize: 10,
617
+ color: '#878787',
618
+ marginLeft: 24,
619
+ }}
620
+ >
621
+ Số tiền bảo hiểm
622
+ </MText>
623
+ <MText
624
+ style={{
625
+ fontSize: 10,
626
+ color: '#333333',
627
+ }}
628
+ >
629
+ {formatMoney(
630
+ item?.listLoanAllAutoDE.reduce(
631
+ (sum, item) =>
632
+ sum + item.insurenceMoney,
633
+ 0
634
+ )
635
+ )}{' '}
636
+ đ
637
+ </MText>
638
+ </View>
639
+ </View>
509
640
  )}
510
- <MText
511
- style={{
512
- textAlign: 'center',
513
- fontSize: 10,
514
- marginTop: 5,
515
- color: '#333333',
516
- }}
517
- >
518
- Cập nhật{'\n'}thông tin
519
- </MText>
520
- </TouchableOpacity>
521
- <TouchableOpacity
522
- onPress={() => {
523
- navigation.push(ScreenNames.LivenessV2, {
524
- loan: item,
525
- });
641
+ {/* <View
642
+ style={{
643
+ flexDirection: 'row',
644
+ alignItems: 'center',
526
645
  }}
527
- style={$action}
528
- disabled={item?.step === 5 ? false : true}
529
646
  >
530
- {checkEKYC[item.id] ? (
531
- <IconEkycSuccess />
532
- ) : (
533
- <IconEkyc />
534
- )}
647
+ <Contract />
648
+ <View style={{ flex: 1, paddingLeft: 8 }}>
649
+ <MText style={commonStyles.textNormalBold}>
650
+ Đơn vay-{item?.id}
651
+ </MText>
652
+ <MText style={commonStyles.textNormal}>
653
+ Số tiền vay (VND):{' '}
654
+ {item?.loanAmount
655
+ ? formatMoney(item?.loanAmount)
656
+ : 'Chưa xác định'}
657
+ </MText>
658
+ </View>
659
+ </View>
660
+ <View
661
+ style={{
662
+ height: 1,
663
+ backgroundColor: '#E0E0E0',
664
+ marginVertical: 16,
665
+ }}
666
+ /> */}
535
667
 
536
- <MText
537
- style={{
538
- textAlign: 'center',
539
- fontSize: 10,
540
- marginTop: 5,
541
- color: '#333333',
542
- }}
543
- >
544
- EKYC
545
- </MText>
546
- </TouchableOpacity>
547
- <TouchableOpacity
548
- style={$action}
549
- onPress={() => {
550
- // checkTerm(item, () => {
551
- // signLoan(item);
552
- // });
553
- navigation.push(ScreenNames.TTSSignLoan, {
554
- loan: item,
555
- });
668
+ <View
669
+ style={{
670
+ flexDirection: 'row',
671
+ justifyContent: 'space-between',
672
+ marginTop:
673
+ item?.listLoanAllAutoDE &&
674
+ item?.listLoanAllAutoDE.length > 0
675
+ ? 16
676
+ : 32,
677
+ paddingHorizontal: 24,
556
678
  }}
557
679
  >
558
- <IconSign2 />
559
- <MText
560
- style={{
561
- textAlign: 'center',
562
- fontSize: 10,
563
- marginTop: 5,
564
- color: '#333333',
680
+ <TouchableOpacity
681
+ disabled={item?.step >= 3 ? true : false}
682
+ style={$action}
683
+ onPress={() => {
684
+ if (item?.step === 0) {
685
+ navigation.push(ScreenNames.OCR, {
686
+ loan: item,
687
+ front: true,
688
+ });
689
+ } else if (item?.step === 1) {
690
+ navigation.push(ScreenNames.VehicleCamera, {
691
+ loan: item,
692
+ front: true,
693
+ });
694
+ } else if (item?.step === 2) {
695
+ navigation.push(
696
+ ScreenNames.RegisterCamera,
697
+ {
698
+ loan: item,
699
+ }
700
+ );
701
+ }
565
702
  }}
566
703
  >
567
-
568
- </MText>
569
- </TouchableOpacity>
570
- {/* <TouchableOpacity style={$action}>
704
+ {item?.step >= 3 ? (
705
+ <IconOCRSuccess />
706
+ ) : (
707
+ <OcrSvg />
708
+ )}
709
+ <MText
710
+ style={{
711
+ textAlign: 'center',
712
+ fontSize: 10,
713
+ marginTop: 5,
714
+ color: '#333333',
715
+ }}
716
+ >
717
+ OCR{'\n'}chứng từ
718
+ </MText>
719
+ </TouchableOpacity>
720
+ <TouchableOpacity
721
+ disabled={item?.step !== 3 ? true : false}
722
+ style={$action}
723
+ onPress={() => {
724
+ if (item?.step === 3) {
725
+ navigation.push(
726
+ ScreenNames.ReviewInformation,
727
+ {
728
+ loan: item,
729
+ }
730
+ );
731
+ }
732
+ }}
733
+ >
734
+ {item.step > 3 ? (
735
+ <IconEditSuccess />
736
+ ) : item.step === 3 ? (
737
+ <IconEdit />
738
+ ) : (
739
+ <IconEditDisable />
740
+ )}
741
+ <MText
742
+ style={{
743
+ textAlign: 'center',
744
+ fontSize: 10,
745
+ marginTop: 5,
746
+ color: '#333333',
747
+ }}
748
+ >
749
+ Cập nhật{'\n'}thông tin
750
+ </MText>
751
+ </TouchableOpacity>
752
+ <TouchableOpacity
753
+ onPress={() => {
754
+ navigation.push(ScreenNames.LivenessV2, {
755
+ loan: item,
756
+ });
757
+ }}
758
+ style={$action}
759
+ disabled={item?.step === 6 ? false : true}
760
+ >
761
+ {item?.step === 7 ? (
762
+ <IconEkycSuccess />
763
+ ) : item?.step <= 5 ? (
764
+ <IconEkycDisable />
765
+ ) : (
766
+ <IconEkyc />
767
+ )}
768
+
769
+ <MText
770
+ style={{
771
+ textAlign: 'center',
772
+ fontSize: 10,
773
+ marginTop: 5,
774
+ color: '#333333',
775
+ }}
776
+ >
777
+ EKYC
778
+ </MText>
779
+ </TouchableOpacity>
780
+ <TouchableOpacity
781
+ disabled={item?.step === 7 ? false : true}
782
+ style={$action}
783
+ onPress={() => {
784
+ // checkTerm(item, () => {
785
+ // signLoan(item);
786
+ // });
787
+ navigation.push(ScreenNames.TTSSignLoan, {
788
+ loan: item,
789
+ });
790
+ }}
791
+ >
792
+ {item?.step <= 6 ? (
793
+ <IconSignDisable />
794
+ ) : item?.step === 8 ? (
795
+ <IconSignSuccess />
796
+ ) : (
797
+ <IconSign2 />
798
+ )}
799
+ <MText
800
+ style={{
801
+ textAlign: 'center',
802
+ fontSize: 10,
803
+ marginTop: 5,
804
+ color: '#333333',
805
+ }}
806
+ >
807
+ Ký HĐ
808
+ </MText>
809
+ </TouchableOpacity>
810
+ {/* <TouchableOpacity style={$action}>
571
811
  <IconVideo />
572
812
  <MText
573
813
  style={{
@@ -580,1543 +820,1961 @@ export const Home = observer(function Home() {
580
820
  Quay video
581
821
  </MText>
582
822
  </TouchableOpacity> */}
583
- </View>
584
- <View
585
- style={{
586
- flexDirection: 'row',
587
- alignItems: 'center',
588
- backgroundColor: '#FBEFE7',
589
- marginHorizontal: -16,
590
- paddingVertical: 8,
591
- marginTop: 16,
592
- borderBottomRightRadius: 8,
593
- borderBottomLeftRadius: 8,
594
- paddingHorizontal: 16,
595
- }}
596
- >
597
- <Info />
598
- <MText
599
- style={[
600
- {
601
- fontWeight: '300',
602
- fontSize: 10,
603
- fontStyle: 'italic',
604
- color: '#333333',
605
- marginLeft: 8,
606
- },
607
- ]}
608
- >
609
- Thực hiện đầy đủ các bước để giải ngân nhanh nhất
610
- </MText>
611
- </View>
612
- </View>
613
- </View>
614
- ) : (
615
- <View>
616
- {/* // luồng CIMB */}
617
- {item?.isPipelineCIMB ? (
618
- <View>
619
- {/* // type 4 digital topup */}
620
- {item?.typeLoan === 4 ? (
621
- <View>
823
+ </View>
824
+ {item?.step !== 8 && (
825
+ <View
826
+ style={{
827
+ flexDirection: 'row',
828
+ alignItems: 'center',
829
+ gap: 8,
830
+ marginTop: 16,
831
+ backgroundColor: '#FFF2F2',
832
+ paddingHorizontal: 10,
833
+ paddingVertical: 10,
834
+ borderRadius: 4,
835
+ justifyContent: 'space-between',
836
+ }}
837
+ >
622
838
  <View
623
839
  style={{
624
- backgroundColor: '#FFFFFF',
625
- paddingHorizontal: 16,
626
- paddingTop: 16,
627
- borderRadius: 8,
628
- borderWidth: 0.5,
629
- borderColor: '#E0E0E0',
840
+ flexDirection: 'row',
841
+ alignItems: 'center',
842
+ gap: 8,
630
843
  }}
631
844
  >
632
- <View
845
+ <Info />
846
+ <MText
633
847
  style={{
634
- flexDirection: 'row',
635
- alignItems: 'center',
848
+ color: '#E40010',
849
+ fontSize: 10,
850
+ }}
851
+ >
852
+ {item?.step < 3
853
+ ? 'OCR chứng từ để được giải ngân'
854
+ : item?.step === 3
855
+ ? `Tiếp tục Cập nhật thông tin để${'\n'}giải ngân nhanh nhất`
856
+ : item?.step === 6 || item?.step === 7
857
+ ? `Tiếp tục eKYC và Ký hợp đồng để${'\n'}giải ngân nhanh nhất`
858
+ : 'Đơn vay đang trong quá trình xử lý'}
859
+ </MText>
860
+ </View>
861
+ {item?.step < 3 ? (
862
+ <TouchableOpacity
863
+ onPress={() => {
864
+ if (item?.step === 0) {
865
+ navigation.push(ScreenNames.OCR, {
866
+ loan: item,
867
+ front: true,
868
+ });
869
+ } else if (item?.step === 1) {
870
+ navigation.push(
871
+ ScreenNames.VehicleCamera,
872
+ {
873
+ loan: item,
874
+ front: true,
875
+ }
876
+ );
877
+ } else if (item?.step === 2) {
878
+ navigation.push(
879
+ ScreenNames.RegisterCamera,
880
+ {
881
+ loan: item,
882
+ }
883
+ );
884
+ }
636
885
  }}
637
886
  >
638
- <Contract />
639
- <View style={{ flex: 1, paddingLeft: 8 }}>
887
+ <LinearGradient
888
+ colors={['#FF8E4F', '#EF592E']}
889
+ style={{
890
+ height: 24,
891
+ alignItems: 'center',
892
+ justifyContent: 'center',
893
+ borderRadius: 24,
894
+ paddingHorizontal: 10,
895
+ }}
896
+ >
640
897
  <MText
641
- style={commonStyles.textNormalBold}
898
+ style={{
899
+ color: 'white',
900
+ fontSize: 10,
901
+ }}
642
902
  >
643
- Đơn vay-{item?.id}
644
- </MText>
645
- <MText style={commonStyles.textNormal}>
646
- Số tiền vay (VND):{' '}
647
- {item?.loanAmountOffer
648
- ? formatMoney(item?.loanAmountOffer)
649
- : 'Chưa xác định'}
903
+ Đi tới OCR
650
904
  </MText>
651
- </View>
652
- </View>
653
- <View
654
- style={{
655
- height: 1,
656
- backgroundColor: '#E0E0E0',
657
- marginVertical: 16,
658
- }}
659
- />
660
- <View
661
- style={{
662
- flexDirection: 'row',
663
- justifyContent: 'space-between',
905
+ </LinearGradient>
906
+ </TouchableOpacity>
907
+ ) : item?.step === 3 ? (
908
+ <TouchableOpacity
909
+ onPress={() => {
910
+ if (item?.step === 3) {
911
+ navigation.push(
912
+ ScreenNames.ReviewInformation,
913
+ {
914
+ loan: item,
915
+ }
916
+ );
917
+ }
664
918
  }}
665
919
  >
666
- <MText style={commonStyles.textNormal}>
667
- Trạng thái
668
- </MText>
669
- <MText
670
- style={[
671
- commonStyles.textNormalBold,
672
- { color: '#F05123' },
673
- ]}
920
+ <LinearGradient
921
+ colors={['#FF8E4F', '#EF592E']}
922
+ style={{
923
+ height: 24,
924
+ alignItems: 'center',
925
+ justifyContent: 'center',
926
+ borderRadius: 24,
927
+ paddingHorizontal: 10,
928
+ }}
674
929
  >
675
- {item?.loanStatus}
676
- </MText>
677
- </View>
678
- <View
679
- style={{
680
- height: 0.5,
681
- backgroundColor: '#E0E0E0',
682
- marginVertical: 16,
683
- }}
684
- />
685
- <View style={{ flexDirection: 'row' }}>
686
- {item?.loanStatus === null ||
687
- item?.loanStatus === '' ? (
688
- <MButton
689
- style={{ alignItems: 'center' }}
690
- onPress={() => {
691
- checkTerm(item, () => {
692
- navigation.dispatch(
693
- StackActions.push(
694
- ScreenNames.CIMBxTima,
695
- {
696
- loan: item,
697
- }
698
- )
699
- );
700
- });
930
+ <MText
931
+ style={{
932
+ color: 'white',
933
+ fontSize: 10,
701
934
  }}
702
935
  >
703
- <AddInfo />
704
- <MText
705
- style={[
706
- commonStyles.textNormal,
707
- {
708
- fontSize: 12,
709
- fontWeight: '300',
710
- marginTop: 8,
711
- textAlign: 'center',
712
- },
936
+ Cập nhật thông tin
937
+ </MText>
938
+ </LinearGradient>
939
+ </TouchableOpacity>
940
+ ) : item?.step === 6 ? (
941
+ <TouchableOpacity
942
+ onPress={() => {
943
+ navigation.push(ScreenNames.LivenessV2, {
944
+ loan: item,
945
+ });
946
+ }}
947
+ >
948
+ <LinearGradient
949
+ colors={['#FF8E4F', '#EF592E']}
950
+ style={{
951
+ height: 24,
952
+ alignItems: 'center',
953
+ justifyContent: 'center',
954
+ borderRadius: 24,
955
+ paddingHorizontal: 10,
956
+ }}
957
+ >
958
+ <MText
959
+ style={{
960
+ color: 'white',
961
+ fontSize: 10,
962
+ }}
963
+ >
964
+ Đi tới EKYC
965
+ </MText>
966
+ </LinearGradient>
967
+ </TouchableOpacity>
968
+ ) : item?.step === 7 ? (
969
+ <TouchableOpacity
970
+ onPress={() => {
971
+ navigation.push(ScreenNames.TTSSignLoan, {
972
+ loan: item,
973
+ });
974
+ }}
975
+ >
976
+ <LinearGradient
977
+ colors={['#FF8E4F', '#EF592E']}
978
+ style={{
979
+ height: 24,
980
+ alignItems: 'center',
981
+ justifyContent: 'center',
982
+ borderRadius: 24,
983
+ paddingHorizontal: 10,
984
+ }}
985
+ >
986
+ <MText
987
+ style={{
988
+ color: 'white',
989
+ fontSize: 10,
990
+ }}
991
+ >
992
+ Ký hợp đồng
993
+ </MText>
994
+ </LinearGradient>
995
+ </TouchableOpacity>
996
+ ) : (
997
+ <></>
998
+ )}
999
+ </View>
1000
+ )}
1001
+ <View
1002
+ style={{
1003
+ flexDirection: 'row',
1004
+ justifyContent: 'space-between',
1005
+ marginTop: 16,
1006
+ }}
1007
+ >
1008
+ <MText
1009
+ style={{
1010
+ color: '#878787',
1011
+ fontSize: 12,
1012
+ }}
1013
+ >
1014
+ Trạng thái
1015
+ </MText>
1016
+ <MText
1017
+ style={[
1018
+ commonStyles.textNormalBold,
1019
+ { color: '#333333', fontSize: 12 },
1020
+ ]}
1021
+ >
1022
+ {item?.loanStatus}
1023
+ </MText>
1024
+ </View>
1025
+ <View
1026
+ style={{
1027
+ height: 1,
1028
+ backgroundColor: '#E0E0E0',
1029
+ marginTop: 16,
1030
+ }}
1031
+ />
1032
+ {item?.listLoanAllAutoDE &&
1033
+ item?.listLoanAllAutoDE.length > 0 && (
1034
+ <View>
1035
+ <MText
1036
+ style={{
1037
+ fontSize: 12,
1038
+ fontWeight: 'bold',
1039
+ marginTop: 16,
1040
+ color: '#333333',
1041
+ }}
1042
+ >
1043
+ Danh sách đơn đồng ký
1044
+ </MText>
1045
+ {item?.listLoanAllAutoDE.map((x, index) => (
1046
+ <View
1047
+ key={index}
1048
+ style={{
1049
+ marginTop: 8,
1050
+ borderBottomWidth: 1,
1051
+ borderColor: '#E0E0E0',
1052
+ paddingBottom: 8,
1053
+ }}
1054
+ >
1055
+ <View
1056
+ style={{
1057
+ flexDirection: 'row',
1058
+ justifyContent: 'space-between',
1059
+ }}
1060
+ >
1061
+ <View
1062
+ style={{
1063
+ flexDirection: 'row',
1064
+ alignItems: 'center',
1065
+ gap: 10,
1066
+ }}
1067
+ >
1068
+ <IconTima16 />
1069
+ <MText
1070
+ style={[
1071
+ commonStyles.textNormal,
1072
+ {
1073
+ color: '#333333',
1074
+ fontSize: 12,
1075
+ },
1076
+ ]}
1077
+ >
1078
+ HD-{x?.loanBriefId} ({index + 1})
1079
+ </MText>
1080
+ </View>
1081
+ <MText
1082
+ style={[
1083
+ commonStyles.textNormalBold,
1084
+ {
1085
+ color: '#333333',
1086
+ fontSize: 12,
1087
+ },
713
1088
  ]}
714
1089
  >
715
- Hoàn thiện{'\n'}cung cấp thông tin
1090
+ {formatMoney(x?.totalMoney)} đ
716
1091
  </MText>
717
- </MButton>
718
- ) : (
719
- <View>
720
- {item?.isUpdateLoan ||
721
- item?.isUpdateInformation ? (
722
- <TouchableOpacity
723
- style={{ alignItems: 'center' }}
724
- onPress={() => {
725
- checkTerm(item, () => {
726
- if (item?.isUpdateLoan) {
727
- navigation.dispatch(
728
- StackActions.push(
729
- ScreenNames.CimbSelfie,
730
- {
731
- loan: item,
732
- }
733
- )
734
- );
735
- } else {
736
- navigation.dispatch(
737
- StackActions.push(
738
- ScreenNames.QuickSubmit,
739
- {
740
- loan: item,
741
- }
742
- )
743
- );
744
- }
745
- });
1092
+ </View>
1093
+ {isExpanded && (
1094
+ <>
1095
+ <View
1096
+ style={{
1097
+ flexDirection: 'row',
1098
+ justifyContent: 'space-between',
1099
+ marginTop: 8,
746
1100
  }}
747
1101
  >
748
- <AddInfo />
1102
+ <View
1103
+ style={{
1104
+ flexDirection: 'row',
1105
+ alignItems: 'center',
1106
+ marginLeft: 24,
1107
+ }}
1108
+ >
1109
+ <MText
1110
+ style={[
1111
+ commonStyles.textNormal,
1112
+ {
1113
+ color: '#999999',
1114
+ fontSize: 12,
1115
+ },
1116
+ ]}
1117
+ >
1118
+ Số tiền giải ngân (1)
1119
+ </MText>
1120
+ </View>
749
1121
  <MText
750
1122
  style={[
751
1123
  commonStyles.textNormal,
752
1124
  {
1125
+ color: '#999999',
753
1126
  fontSize: 12,
754
- fontWeight: '300',
755
- marginTop: 8,
756
- textAlign: 'center',
757
1127
  },
758
1128
  ]}
759
1129
  >
760
- Hoàn thiện{'\n'}cung cấp thông tin
1130
+ {formatMoney(x?.loanAmount)} đ
761
1131
  </MText>
762
- </TouchableOpacity>
763
- ) : (
1132
+ </View>
764
1133
  <View
765
- style={{ alignItems: 'center' }}
1134
+ style={{
1135
+ flexDirection: 'row',
1136
+ justifyContent: 'space-between',
1137
+ marginTop: 8,
1138
+ }}
766
1139
  >
767
- <AddInfoDisable />
1140
+ <View
1141
+ style={{
1142
+ flexDirection: 'row',
1143
+ alignItems: 'center',
1144
+ marginLeft: 24,
1145
+ }}
1146
+ >
1147
+ <MText
1148
+ style={[
1149
+ commonStyles.textNormal,
1150
+ {
1151
+ color: '#999999',
1152
+ fontSize: 12,
1153
+ },
1154
+ ]}
1155
+ >
1156
+ Số tiền bảo hiểm (2)
1157
+ </MText>
1158
+ </View>
768
1159
  <MText
769
1160
  style={[
770
1161
  commonStyles.textNormal,
771
1162
  {
1163
+ color: '#999999',
772
1164
  fontSize: 12,
773
- fontWeight: '300',
774
- marginTop: 8,
775
- textAlign: 'center',
776
1165
  },
777
1166
  ]}
778
1167
  >
779
- Hoàn thiện{'\n'}cung cấp thông tin
1168
+ {formatMoney(x?.insurenceMoney)} đ
780
1169
  </MText>
781
1170
  </View>
782
- )}
783
- </View>
1171
+ </>
1172
+ )}
1173
+ </View>
1174
+ ))}
1175
+ {/* <TouchableOpacity
1176
+ onPress={() => toggleExpand(item.id)}
1177
+ style={{
1178
+ flex: 1,
1179
+ alignItems: 'center',
1180
+ paddingTop: 8,
1181
+ }}
1182
+ >
1183
+ {isExpanded ? (
1184
+ <IconExpandUp />
1185
+ ) : (
1186
+ <IconExpand />
784
1187
  )}
1188
+ </TouchableOpacity> */}
1189
+ </View>
1190
+ )}
785
1191
 
786
- {item?.isSignContract && (
787
- <MButton
788
- style={{
789
- alignItems: 'center',
790
- marginLeft: 20,
791
- }}
792
- onPress={() => {
793
- checkTerm(item, () => {
794
- if (item?.urlSignContract) {
1192
+ {item?.listLoanAllAutoDE &&
1193
+ item?.listLoanAllAutoDE.length > 0 && (
1194
+ <TouchableOpacity
1195
+ onPress={() => {
1196
+ navigation.push(
1197
+ ScreenNames.LoanInterestRate,
1198
+ {
1199
+ loan: item,
1200
+ }
1201
+ );
1202
+ }}
1203
+ style={{
1204
+ flex: 1,
1205
+ alignItems: 'center',
1206
+ backgroundColor: '#EDF6FF',
1207
+ marginHorizontal: -16,
1208
+ paddingVertical: 10,
1209
+ borderBottomRightRadius: 8,
1210
+ borderBottomLeftRadius: 8,
1211
+ marginTop: 10,
1212
+ }}
1213
+ >
1214
+ <MText
1215
+ style={[
1216
+ {
1217
+ fontSize: 12,
1218
+ color: '#2F80ED',
1219
+ },
1220
+ ]}
1221
+ >
1222
+ Bảng biểu lãi phí đơn vay {`->`}
1223
+ </MText>
1224
+ </TouchableOpacity>
1225
+ )}
1226
+ </View>
1227
+ </View>
1228
+ ) : (
1229
+ <View>
1230
+ {/* // luồng CIMB */}
1231
+ {item?.isPipelineCIMB ? (
1232
+ <View>
1233
+ {/* // type 4 digital topup */}
1234
+ {item?.typeLoan === 4 ? (
1235
+ <View>
1236
+ <View
1237
+ style={{
1238
+ backgroundColor: '#FFFFFF',
1239
+ paddingHorizontal: 16,
1240
+ paddingTop: 16,
1241
+ borderRadius: 8,
1242
+ borderWidth: 0.5,
1243
+ borderColor: '#E0E0E0',
1244
+ }}
1245
+ >
1246
+ <View
1247
+ style={{
1248
+ flexDirection: 'row',
1249
+ alignItems: 'center',
1250
+ }}
1251
+ >
1252
+ <Contract />
1253
+ <View style={{ flex: 1, paddingLeft: 8 }}>
1254
+ <MText
1255
+ style={commonStyles.textNormalBold}
1256
+ >
1257
+ Mã Đơn vay-{item?.id}
1258
+ </MText>
1259
+ <MText style={commonStyles.textNormal}>
1260
+ Số tiền vay (VND):{' '}
1261
+ {item?.loanAmountOffer
1262
+ ? formatMoney(item?.loanAmountOffer)
1263
+ : 'Chưa xác định'}
1264
+ </MText>
1265
+ </View>
1266
+ </View>
1267
+ <View
1268
+ style={{
1269
+ height: 1,
1270
+ backgroundColor: '#E0E0E0',
1271
+ marginVertical: 16,
1272
+ }}
1273
+ />
1274
+ <View
1275
+ style={{
1276
+ flexDirection: 'row',
1277
+ justifyContent: 'space-between',
1278
+ }}
1279
+ >
1280
+ <MText style={commonStyles.textNormal}>
1281
+ Trạng thái
1282
+ </MText>
1283
+ <MText
1284
+ style={[
1285
+ commonStyles.textNormalBold,
1286
+ { color: '#F05123' },
1287
+ ]}
1288
+ >
1289
+ {item?.loanStatus}
1290
+ </MText>
1291
+ </View>
1292
+ <View
1293
+ style={{
1294
+ height: 0.5,
1295
+ backgroundColor: '#E0E0E0',
1296
+ marginVertical: 16,
1297
+ }}
1298
+ />
1299
+ <View style={{ flexDirection: 'row' }}>
1300
+ {item?.loanStatus === null ||
1301
+ item?.loanStatus === '' ? (
1302
+ <MButton
1303
+ style={{ alignItems: 'center' }}
1304
+ onPress={() => {
1305
+ checkTerm(item, () => {
795
1306
  navigation.dispatch(
796
1307
  StackActions.push(
797
- ScreenNames.CIMBSign,
1308
+ ScreenNames.CIMBxTima,
798
1309
  {
799
- url: item?.urlSignContract,
1310
+ loan: item,
800
1311
  }
801
1312
  )
802
1313
  );
803
- } else {
804
- Alert.alert(
805
- 'Thông báo',
806
- 'Bạn chưa thể ký hợp đồng bây giờ?'
807
- );
808
- }
809
- });
810
- }}
811
- >
812
- <IconSign2 />
813
- <MText
814
- style={[
815
- commonStyles.textNormal,
816
- {
817
- fontSize: 12,
818
- fontWeight: '300',
819
- marginTop: 8,
820
- },
821
- ]}
822
- >
823
- Ký hợp đồng
824
- </MText>
825
- </MButton>
826
- )}
827
- {item?.isSignContractTima && (
828
- <MButton
829
- style={{
830
- alignItems: 'center',
831
- marginLeft: 20,
832
- }}
833
- onPress={() => {
834
- checkTerm(item, () => {
835
- navigation.dispatch(
836
- StackActions.push(
837
- ScreenNames.ViewContract,
838
- {
839
- loan: item,
840
- }
841
- )
842
- );
843
- });
844
- }}
845
- >
846
- <ContractTimeIcon />
847
- <MText
848
- style={[
849
- commonStyles.textNormal,
850
- {
851
- fontSize: 12,
852
- fontWeight: '300',
853
- marginTop: 8,
854
- textAlign: 'center',
855
- },
856
- ]}
1314
+ });
1315
+ }}
857
1316
  >
858
- Hợp đồng{'\n'}dịch vụ
859
- </MText>
860
- </MButton>
861
- )}
862
- {item?.paymentEvidenceUrl && (
863
- <MButton
864
- style={{
865
- alignItems: 'center',
866
- marginLeft: 20,
867
- }}
868
- onPress={() => {
869
- checkTerm(item, () => {
870
- navigation.dispatch(
871
- StackActions.push(
872
- ScreenNames.PaymentEvidence,
873
- {
874
- url: item?.paymentEvidenceUrl,
875
- }
876
- )
877
- );
878
- });
879
- }}
880
- >
881
- <IconEviden />
882
- <MText
883
- style={[
884
- commonStyles.textNormal,
885
- {
886
- fontSize: 12,
887
- fontWeight: '300',
888
- marginTop: 8,
889
- textAlign: 'center',
890
- },
891
- ]}
1317
+ <AddInfo />
1318
+ <MText
1319
+ style={[
1320
+ commonStyles.textNormal,
1321
+ {
1322
+ fontSize: 12,
1323
+ fontWeight: '300',
1324
+ marginTop: 8,
1325
+ textAlign: 'center',
1326
+ },
1327
+ ]}
1328
+ >
1329
+ Hoàn thiện{'\n'}cung cấp thông tin
1330
+ </MText>
1331
+ </MButton>
1332
+ ) : (
1333
+ <View>
1334
+ {item?.isUpdateLoan ||
1335
+ item?.isUpdateInformation ? (
1336
+ <TouchableOpacity
1337
+ style={{ alignItems: 'center' }}
1338
+ onPress={() => {
1339
+ checkTerm(item, () => {
1340
+ if (item?.isUpdateLoan) {
1341
+ navigation.dispatch(
1342
+ StackActions.push(
1343
+ ScreenNames.CimbSelfie,
1344
+ {
1345
+ loan: item,
1346
+ }
1347
+ )
1348
+ );
1349
+ } else {
1350
+ navigation.dispatch(
1351
+ StackActions.push(
1352
+ ScreenNames.QuickSubmit,
1353
+ {
1354
+ loan: item,
1355
+ }
1356
+ )
1357
+ );
1358
+ }
1359
+ });
1360
+ }}
1361
+ >
1362
+ <AddInfo />
1363
+ <MText
1364
+ style={[
1365
+ commonStyles.textNormal,
1366
+ {
1367
+ fontSize: 12,
1368
+ fontWeight: '300',
1369
+ marginTop: 8,
1370
+ textAlign: 'center',
1371
+ },
1372
+ ]}
1373
+ >
1374
+ Hoàn thiện{'\n'}cung cấp thông
1375
+ tin
1376
+ </MText>
1377
+ </TouchableOpacity>
1378
+ ) : (
1379
+ <View
1380
+ style={{ alignItems: 'center' }}
1381
+ >
1382
+ <AddInfoDisable />
1383
+ <MText
1384
+ style={[
1385
+ commonStyles.textNormal,
1386
+ {
1387
+ fontSize: 12,
1388
+ fontWeight: '300',
1389
+ marginTop: 8,
1390
+ textAlign: 'center',
1391
+ },
1392
+ ]}
1393
+ >
1394
+ Hoàn thiện{'\n'}cung cấp thông
1395
+ tin
1396
+ </MText>
1397
+ </View>
1398
+ )}
1399
+ </View>
1400
+ )}
1401
+
1402
+ {item?.isSignContract && (
1403
+ <MButton
1404
+ style={{
1405
+ alignItems: 'center',
1406
+ marginLeft: 20,
1407
+ }}
1408
+ onPress={() => {
1409
+ checkTerm(item, () => {
1410
+ if (item?.urlSignContract) {
1411
+ navigation.dispatch(
1412
+ StackActions.push(
1413
+ ScreenNames.CIMBSign,
1414
+ {
1415
+ url: item?.urlSignContract,
1416
+ }
1417
+ )
1418
+ );
1419
+ } else {
1420
+ Alert.alert(
1421
+ 'Thông báo',
1422
+ 'Bạn chưa thể ký hợp đồng bây giờ?'
1423
+ );
1424
+ }
1425
+ });
1426
+ }}
892
1427
  >
893
- Mục đích {'\n'}sử dụng
894
- </MText>
895
- </MButton>
896
- )}
897
- {item?.showPaymentPlan && (
898
- <MButton
899
- style={{
900
- alignItems: 'center',
901
- marginLeft: 20,
902
- }}
903
- onPress={() => {
904
- checkTerm(item, () => {
905
- navigation.dispatch(
906
- StackActions.push(
907
- ScreenNames.SchedulePayment,
908
- {
909
- loan: item,
910
- }
911
- )
912
- );
913
- });
914
- }}
915
- >
916
- <IconSchedule />
917
- <MText
918
- style={[
919
- commonStyles.textNormal,
920
- {
921
- fontSize: 12,
922
- fontWeight: '300',
923
- marginTop: 8,
924
- },
925
- ]}
1428
+ <IconSign2 />
1429
+ <MText
1430
+ style={[
1431
+ commonStyles.textNormal,
1432
+ {
1433
+ fontSize: 12,
1434
+ fontWeight: '300',
1435
+ marginTop: 8,
1436
+ },
1437
+ ]}
1438
+ >
1439
+ hợp đồng
1440
+ </MText>
1441
+ </MButton>
1442
+ )}
1443
+ {item?.isSignContractTima && (
1444
+ <MButton
1445
+ style={{
1446
+ alignItems: 'center',
1447
+ marginLeft: 20,
1448
+ }}
1449
+ onPress={() => {
1450
+ checkTerm(item, () => {
1451
+ navigation.dispatch(
1452
+ StackActions.push(
1453
+ ScreenNames.ViewContract,
1454
+ {
1455
+ loan: item,
1456
+ }
1457
+ )
1458
+ );
1459
+ });
1460
+ }}
926
1461
  >
927
- Lịch dự kiến
928
- </MText>
929
- </MButton>
930
- )}
931
- </View>
1462
+ <ContractTimeIcon />
1463
+ <MText
1464
+ style={[
1465
+ commonStyles.textNormal,
1466
+ {
1467
+ fontSize: 12,
1468
+ fontWeight: '300',
1469
+ marginTop: 8,
1470
+ textAlign: 'center',
1471
+ },
1472
+ ]}
1473
+ >
1474
+ Hợp đồng{'\n'}dịch vụ
1475
+ </MText>
1476
+ </MButton>
1477
+ )}
1478
+ {item?.paymentEvidenceUrl && (
1479
+ <MButton
1480
+ style={{
1481
+ alignItems: 'center',
1482
+ marginLeft: 20,
1483
+ }}
1484
+ onPress={() => {
1485
+ checkTerm(item, () => {
1486
+ navigation.dispatch(
1487
+ StackActions.push(
1488
+ ScreenNames.PaymentEvidence,
1489
+ {
1490
+ url: item?.paymentEvidenceUrl,
1491
+ }
1492
+ )
1493
+ );
1494
+ });
1495
+ }}
1496
+ >
1497
+ <IconEviden />
1498
+ <MText
1499
+ style={[
1500
+ commonStyles.textNormal,
1501
+ {
1502
+ fontSize: 12,
1503
+ fontWeight: '300',
1504
+ marginTop: 8,
1505
+ textAlign: 'center',
1506
+ },
1507
+ ]}
1508
+ >
1509
+ Mục đích {'\n'}sử dụng
1510
+ </MText>
1511
+ </MButton>
1512
+ )}
1513
+ {item?.showPaymentPlan && (
1514
+ <MButton
1515
+ style={{
1516
+ alignItems: 'center',
1517
+ marginLeft: 20,
1518
+ }}
1519
+ onPress={() => {
1520
+ checkTerm(item, () => {
1521
+ navigation.dispatch(
1522
+ StackActions.push(
1523
+ ScreenNames.SchedulePayment,
1524
+ {
1525
+ loan: item,
1526
+ }
1527
+ )
1528
+ );
1529
+ });
1530
+ }}
1531
+ >
1532
+ <IconSchedule />
1533
+ <MText
1534
+ style={[
1535
+ commonStyles.textNormal,
1536
+ {
1537
+ fontSize: 12,
1538
+ fontWeight: '300',
1539
+ marginTop: 8,
1540
+ },
1541
+ ]}
1542
+ >
1543
+ Lịch dự kiến
1544
+ </MText>
1545
+ </MButton>
1546
+ )}
1547
+ </View>
932
1548
 
933
- {item.messageErrorCIMB !== '' &&
934
- item?.messageErrorCIMB &&
935
- item?.isCimbApproveFull === null ? (
936
- <View
937
- style={{
938
- backgroundColor: '#FBEFE7',
939
- marginHorizontal: -16,
940
- paddingVertical: 8,
941
- marginTop: 16,
942
- borderBottomRightRadius: 8,
943
- borderBottomLeftRadius: 8,
944
- paddingHorizontal: 16,
945
- }}
946
- >
1549
+ {item.messageErrorCIMB !== '' &&
1550
+ item?.messageErrorCIMB &&
1551
+ item?.isCimbApproveFull === null ? (
947
1552
  <View
948
1553
  style={{
949
- flexDirection: 'row',
950
- justifyContent: 'space-between',
951
- alignItems: 'center',
1554
+ backgroundColor: '#FBEFE7',
1555
+ marginHorizontal: -16,
1556
+ paddingVertical: 8,
1557
+ marginTop: 16,
1558
+ borderBottomRightRadius: 8,
1559
+ borderBottomLeftRadius: 8,
1560
+ paddingHorizontal: 16,
952
1561
  }}
953
1562
  >
954
1563
  <View
955
1564
  style={{
956
- flex: 1,
957
1565
  flexDirection: 'row',
958
- paddingRight: 20,
959
- }}
960
- >
961
- <Image
962
- source={require('./error.png')}
963
- style={{ width: 16, height: 16 }}
964
- />
965
- <MText style={{ marginLeft: 5 }}>
966
- Đơn vay của bạn gặp gián đoạn, vui
967
- lòng liên hệ tổng đài 1900633688
968
- </MText>
969
- </View>
970
-
971
- <TouchableOpacity
972
- onPress={() => {
973
- Linking.openURL(`tel:1900633688`);
1566
+ justifyContent: 'space-between',
1567
+ alignItems: 'center',
974
1568
  }}
975
1569
  >
976
- <LinearGradient
977
- colors={['#FF8E4F', '#EF592E']}
1570
+ <View
978
1571
  style={{
979
- paddingHorizontal: 10,
980
- height: 30,
981
- borderRadius: 30,
982
- justifyContent: 'center',
983
- alignItems: 'center',
1572
+ flex: 1,
984
1573
  flexDirection: 'row',
1574
+ paddingRight: 20,
985
1575
  }}
986
1576
  >
987
- <Call />
988
- <MText
1577
+ <Image
1578
+ source={require('./error.png')}
1579
+ style={{ width: 16, height: 16 }}
1580
+ />
1581
+ <MText style={{ marginLeft: 5 }}>
1582
+ Đơn vay của bạn gặp gián đoạn, vui
1583
+ lòng liên hệ tổng đài 1900633688
1584
+ </MText>
1585
+ </View>
1586
+
1587
+ <TouchableOpacity
1588
+ onPress={() => {
1589
+ Linking.openURL(`tel:1900633688`);
1590
+ }}
1591
+ >
1592
+ <LinearGradient
1593
+ colors={['#FF8E4F', '#EF592E']}
989
1594
  style={{
990
- color: 'white',
991
- fontSize: 12,
992
- marginLeft: 5,
1595
+ paddingHorizontal: 10,
1596
+ height: 30,
1597
+ borderRadius: 30,
1598
+ justifyContent: 'center',
1599
+ alignItems: 'center',
1600
+ flexDirection: 'row',
993
1601
  }}
994
1602
  >
995
- Liên hệ
996
- </MText>
997
- </LinearGradient>
998
- </TouchableOpacity>
1603
+ <Call />
1604
+ <MText
1605
+ style={{
1606
+ color: 'white',
1607
+ fontSize: 12,
1608
+ marginLeft: 5,
1609
+ }}
1610
+ >
1611
+ Liên hệ
1612
+ </MText>
1613
+ </LinearGradient>
1614
+ </TouchableOpacity>
1615
+ </View>
999
1616
  </View>
1000
- </View>
1001
- ) : (
1002
- <View
1003
- style={{
1004
- flexDirection: 'row',
1005
- alignItems: 'center',
1006
- backgroundColor: '#FBEFE7',
1007
- marginHorizontal: -16,
1008
- paddingVertical: 8,
1009
- marginTop: 16,
1010
- borderBottomRightRadius: 8,
1011
- borderBottomLeftRadius: 8,
1012
- paddingHorizontal: 16,
1013
- }}
1014
- >
1015
- <Info />
1016
- <MText
1017
- style={[
1018
- {
1019
- fontWeight: '300',
1020
- fontSize: 10,
1021
- fontStyle: 'italic',
1022
- color: '#333333',
1023
- marginLeft: 8,
1024
- },
1025
- ]}
1026
- >
1027
- {item?.suggestion
1028
- ? item?.suggestion
1029
- : 'Thực hiện đầy đủ các bước để giải ngân nhanh nhất'}
1030
- </MText>
1031
- </View>
1032
- )}
1033
- </View>
1034
- </View>
1035
- ) : // type 2 tái vay
1036
- item?.typeLoan === 2 ? (
1037
- <Observer>
1038
- {() => (
1039
- <View>
1040
- <View
1041
- style={{
1042
- backgroundColor: '#FFFFFF',
1043
- paddingHorizontal: 16,
1044
- paddingTop: 16,
1045
- borderRadius: 8,
1046
- borderWidth: 0.5,
1047
- borderColor: '#E0E0E0',
1048
- }}
1049
- >
1617
+ ) : (
1050
1618
  <View
1051
1619
  style={{
1052
1620
  flexDirection: 'row',
1053
1621
  alignItems: 'center',
1622
+ backgroundColor: '#FBEFE7',
1623
+ marginHorizontal: -16,
1624
+ paddingVertical: 8,
1625
+ marginTop: 16,
1626
+ borderBottomRightRadius: 8,
1627
+ borderBottomLeftRadius: 8,
1628
+ paddingHorizontal: 16,
1054
1629
  }}
1055
1630
  >
1056
- <Contract />
1057
- <View
1058
- style={{ flex: 1, paddingLeft: 8 }}
1631
+ <Info />
1632
+ <MText
1633
+ style={[
1634
+ {
1635
+ fontWeight: '300',
1636
+ fontSize: 10,
1637
+ fontStyle: 'italic',
1638
+ color: '#333333',
1639
+ marginLeft: 8,
1640
+ },
1641
+ ]}
1059
1642
  >
1060
- <MText
1061
- style={commonStyles.textNormalBold}
1062
- >
1063
- Đơn vay {item?.id}
1064
- </MText>
1065
- <MText
1066
- style={commonStyles.textNormal}
1067
- >
1068
- Số tiền vay (VND):{' '}
1069
- {item?.loanAmount
1070
- ? formatMoney(item?.loanAmount)
1071
- : 'Chưa xác định'}
1072
- </MText>
1073
- </View>
1643
+ {item?.suggestion
1644
+ ? item?.suggestion
1645
+ : 'Thực hiện đầy đủ các bước để giải ngân nhanh nhất'}
1646
+ </MText>
1074
1647
  </View>
1648
+ )}
1649
+ </View>
1650
+ </View>
1651
+ ) : // type 2 tái vay
1652
+ item?.typeLoan === 2 ? (
1653
+ <Observer>
1654
+ {() => (
1655
+ <View>
1075
1656
  <View
1076
1657
  style={{
1077
- height: 1,
1078
- backgroundColor: '#E0E0E0',
1079
- marginVertical: 16,
1080
- }}
1081
- />
1082
- <View
1083
- style={{
1084
- flexDirection: 'row',
1085
- justifyContent: 'space-between',
1658
+ backgroundColor: '#FFFFFF',
1659
+ paddingHorizontal: 16,
1660
+ paddingTop: 16,
1661
+ borderRadius: 8,
1662
+ borderWidth: 0.5,
1663
+ borderColor: '#E0E0E0',
1086
1664
  }}
1087
1665
  >
1088
- <MText style={commonStyles.textNormal}>
1089
- Trạng thái
1090
- </MText>
1091
- <MText
1092
- style={[
1093
- commonStyles.textNormalBold,
1094
- { color: '#F05123' },
1095
- ]}
1666
+ <View
1667
+ style={{
1668
+ flexDirection: 'row',
1669
+ alignItems: 'center',
1670
+ }}
1096
1671
  >
1097
- {item?.loanStatus}
1098
- </MText>
1099
- </View>
1100
- {/* // cho phép update thông tin */}
1101
- {item?.isUpdateLoanReBorrow ? (
1102
- <TouchableOpacity
1672
+ <Contract />
1673
+ <View
1674
+ style={{ flex: 1, paddingLeft: 8 }}
1675
+ >
1676
+ <MText
1677
+ style={
1678
+ commonStyles.textNormalBold
1679
+ }
1680
+ >
1681
+ Đơn vay {item?.id}
1682
+ </MText>
1683
+ <MText
1684
+ style={commonStyles.textNormal}
1685
+ >
1686
+ Số tiền vay (VND):{' '}
1687
+ {item?.loanAmount
1688
+ ? formatMoney(item?.loanAmount)
1689
+ : 'Chưa xác định'}
1690
+ </MText>
1691
+ </View>
1692
+ </View>
1693
+ <View
1103
1694
  style={{
1104
- marginTop: 14,
1105
- marginBottom: 16,
1695
+ height: 1,
1696
+ backgroundColor: '#E0E0E0',
1697
+ marginVertical: 16,
1106
1698
  }}
1107
- onPress={() => {
1108
- checkTerm(item, () => {
1109
- navigation.push(
1110
- 'DigitalLending',
1111
- item
1112
- );
1113
- });
1699
+ />
1700
+ <View
1701
+ style={{
1702
+ flexDirection: 'row',
1703
+ justifyContent: 'space-between',
1114
1704
  }}
1115
1705
  >
1116
- <LinearGradient
1706
+ <MText
1707
+ style={commonStyles.textNormal}
1708
+ >
1709
+ Trạng thái
1710
+ </MText>
1711
+ <MText
1712
+ style={[
1713
+ commonStyles.textNormalBold,
1714
+ { color: '#F05123' },
1715
+ ]}
1716
+ >
1717
+ {item?.loanStatus}
1718
+ </MText>
1719
+ </View>
1720
+ {/* // cho phép update thông tin */}
1721
+ {item?.isUpdateLoanReBorrow ? (
1722
+ <TouchableOpacity
1117
1723
  style={{
1118
- height: 36,
1119
- borderRadius: 30,
1120
- paddingHorizontal: 20,
1121
- flexDirection: 'row',
1122
- alignItems: 'center',
1724
+ marginTop: 14,
1725
+ marginBottom: 16,
1726
+ }}
1727
+ onPress={() => {
1728
+ checkTerm(item, () => {
1729
+ navigation.push(
1730
+ 'DigitalLending',
1731
+ item
1732
+ );
1733
+ });
1123
1734
  }}
1124
- colors={['#FF8E4F', '#EF592E']}
1125
1735
  >
1126
- <UpdateIcon />
1127
- <MText
1736
+ <LinearGradient
1128
1737
  style={{
1129
- color: 'white',
1130
- marginLeft: 10,
1738
+ height: 36,
1739
+ borderRadius: 30,
1740
+ paddingHorizontal: 20,
1741
+ flexDirection: 'row',
1742
+ alignItems: 'center',
1131
1743
  }}
1744
+ colors={['#FF8E4F', '#EF592E']}
1132
1745
  >
1133
- Hoàn thiện hồ sơ
1134
- </MText>
1135
- </LinearGradient>
1136
- </TouchableOpacity>
1137
- ) : (
1138
- <View>
1139
- <View
1140
- style={{
1141
- height: 0.5,
1142
- backgroundColor: '#E0E0E0',
1143
- marginVertical: 16,
1144
- }}
1145
- />
1146
- <View
1147
- style={{ flexDirection: 'row' }}
1148
- >
1149
- {item?.loanStatus === null ||
1150
- item?.loanStatus === '' ? (
1151
- <MButton
1746
+ <UpdateIcon />
1747
+ <MText
1152
1748
  style={{
1153
- alignItems: 'center',
1749
+ color: 'white',
1750
+ marginLeft: 10,
1154
1751
  }}
1155
- onPress={() => {
1156
- checkTerm(item, () => {
1752
+ >
1753
+ Hoàn thiện hồ
1754
+ </MText>
1755
+ </LinearGradient>
1756
+ </TouchableOpacity>
1757
+ ) : (
1758
+ <View>
1759
+ <View
1760
+ style={{
1761
+ height: 0.5,
1762
+ backgroundColor: '#E0E0E0',
1763
+ marginVertical: 16,
1764
+ }}
1765
+ />
1766
+ <View
1767
+ style={{ flexDirection: 'row' }}
1768
+ >
1769
+ {item?.loanStatus === null ||
1770
+ item?.loanStatus === '' ? (
1771
+ <MButton
1772
+ style={{
1773
+ alignItems: 'center',
1774
+ }}
1775
+ onPress={() => {
1776
+ checkTerm(item, () => {
1777
+ navigation.dispatch(
1778
+ StackActions.push(
1779
+ ScreenNames.CIMBxTima,
1780
+ {
1781
+ loan: item,
1782
+ }
1783
+ )
1784
+ );
1785
+ });
1786
+ }}
1787
+ >
1788
+ <AddInfo />
1789
+ <MText
1790
+ style={[
1791
+ commonStyles.textNormal,
1792
+ {
1793
+ fontSize: 12,
1794
+ fontWeight: '300',
1795
+ marginTop: 8,
1796
+ textAlign: 'center',
1797
+ },
1798
+ ]}
1799
+ >
1800
+ Hoàn thiện{'\n'}cung cấp
1801
+ thông tin
1802
+ </MText>
1803
+ </MButton>
1804
+ ) : (
1805
+ <View>
1806
+ {item?.isUpdateLoan ||
1807
+ item?.isUpdateInformation ? (
1808
+ <TouchableOpacity
1809
+ style={{
1810
+ alignItems: 'center',
1811
+ }}
1812
+ onPress={() => {
1813
+ checkTerm(item, () => {
1814
+ if (
1815
+ item?.isUpdateLoan
1816
+ ) {
1817
+ navigation.dispatch(
1818
+ StackActions.push(
1819
+ ScreenNames.CimbSelfie,
1820
+ {
1821
+ loan: item,
1822
+ }
1823
+ )
1824
+ );
1825
+ } else {
1826
+ navigation.dispatch(
1827
+ StackActions.push(
1828
+ ScreenNames.QuickSubmit,
1829
+ {
1830
+ loan: item,
1831
+ }
1832
+ )
1833
+ );
1834
+ }
1835
+ });
1836
+ }}
1837
+ >
1838
+ <AddInfo />
1839
+ <MText
1840
+ style={[
1841
+ commonStyles.textNormal,
1842
+ {
1843
+ fontSize: 12,
1844
+ fontWeight: '300',
1845
+ marginTop: 8,
1846
+ textAlign: 'center',
1847
+ },
1848
+ ]}
1849
+ >
1850
+ Hoàn thiện{'\n'}cung cấp
1851
+ thông tin
1852
+ </MText>
1853
+ </TouchableOpacity>
1854
+ ) : (
1855
+ <View
1856
+ style={{
1857
+ alignItems: 'center',
1858
+ }}
1859
+ >
1860
+ <AddInfoDisable />
1861
+ <MText
1862
+ style={[
1863
+ commonStyles.textNormal,
1864
+ {
1865
+ fontSize: 12,
1866
+ fontWeight: '300',
1867
+ marginTop: 8,
1868
+ textAlign: 'center',
1869
+ },
1870
+ ]}
1871
+ >
1872
+ Hoàn thiện{'\n'}cung cấp
1873
+ thông tin
1874
+ </MText>
1875
+ </View>
1876
+ )}
1877
+ </View>
1878
+ )}
1879
+
1880
+ {item?.isSignContract && (
1881
+ <MButton
1882
+ style={{
1883
+ alignItems: 'center',
1884
+ marginLeft: 20,
1885
+ }}
1886
+ onPress={() => {
1887
+ checkTerm(item, () => {
1888
+ if (
1889
+ item?.urlSignContract
1890
+ ) {
1891
+ navigation.dispatch(
1892
+ StackActions.push(
1893
+ ScreenNames.CIMBSign,
1894
+ {
1895
+ url: item?.urlSignContract,
1896
+ }
1897
+ )
1898
+ );
1899
+ } else {
1900
+ Alert.alert(
1901
+ 'Thông báo',
1902
+ 'Bạn chưa thể ký hợp đồng bây giờ?'
1903
+ );
1904
+ }
1905
+ });
1906
+ }}
1907
+ >
1908
+ <IconSign2 />
1909
+ <MText
1910
+ style={[
1911
+ commonStyles.textNormal,
1912
+ {
1913
+ fontSize: 12,
1914
+ fontWeight: '300',
1915
+ marginTop: 8,
1916
+ },
1917
+ ]}
1918
+ >
1919
+ Ký hợp đồng
1920
+ </MText>
1921
+ </MButton>
1922
+ )}
1923
+ {item?.isSignContractTima && (
1924
+ <MButton
1925
+ style={{
1926
+ alignItems: 'center',
1927
+ marginLeft: 20,
1928
+ }}
1929
+ onPress={() => {
1930
+ checkTerm(item, () => {
1931
+ navigation.dispatch(
1932
+ StackActions.push(
1933
+ ScreenNames.ViewContract,
1934
+ {
1935
+ loan: item,
1936
+ }
1937
+ )
1938
+ );
1939
+ });
1940
+ }}
1941
+ >
1942
+ <ContractTimeIcon />
1943
+ <MText
1944
+ style={[
1945
+ commonStyles.textNormal,
1946
+ {
1947
+ fontSize: 12,
1948
+ fontWeight: '300',
1949
+ marginTop: 8,
1950
+ textAlign: 'center',
1951
+ },
1952
+ ]}
1953
+ >
1954
+ Hợp đồng{'\n'}dịch vụ
1955
+ </MText>
1956
+ </MButton>
1957
+ )}
1958
+ {item?.paymentEvidenceUrl && (
1959
+ <MButton
1960
+ style={{
1961
+ alignItems: 'center',
1962
+ marginLeft: 20,
1963
+ }}
1964
+ onPress={() => {
1965
+ checkTerm(item, () => {
1966
+ navigation.dispatch(
1967
+ StackActions.push(
1968
+ ScreenNames.PaymentEvidence,
1969
+ {
1970
+ url: item?.paymentEvidenceUrl,
1971
+ }
1972
+ )
1973
+ );
1974
+ });
1975
+ }}
1976
+ >
1977
+ <IconEviden />
1978
+ <MText
1979
+ style={[
1980
+ commonStyles.textNormal,
1981
+ {
1982
+ fontSize: 12,
1983
+ fontWeight: '300',
1984
+ marginTop: 8,
1985
+ textAlign: 'center',
1986
+ },
1987
+ ]}
1988
+ >
1989
+ Mục đích {'\n'}sử dụng
1990
+ </MText>
1991
+ </MButton>
1992
+ )}
1993
+ {item?.showPaymentPlan && (
1994
+ <MButton
1995
+ style={{
1996
+ alignItems: 'center',
1997
+ marginLeft: 20,
1998
+ }}
1999
+ onPress={() => {
1157
2000
  navigation.dispatch(
1158
2001
  StackActions.push(
1159
- ScreenNames.CIMBxTima,
2002
+ ScreenNames.SchedulePayment,
1160
2003
  {
1161
2004
  loan: item,
1162
2005
  }
1163
2006
  )
1164
2007
  );
1165
- });
2008
+ }}
2009
+ >
2010
+ <IconSchedule />
2011
+ <MText
2012
+ style={[
2013
+ commonStyles.textNormal,
2014
+ {
2015
+ fontSize: 12,
2016
+ fontWeight: '300',
2017
+ marginTop: 8,
2018
+ },
2019
+ ]}
2020
+ >
2021
+ Lịch dự kiến
2022
+ </MText>
2023
+ </MButton>
2024
+ )}
2025
+ </View>
2026
+
2027
+ {item.messageErrorCIMB !== '' &&
2028
+ item?.messageErrorCIMB &&
2029
+ item?.isCimbApproveFull === null ? (
2030
+ <View
2031
+ style={{
2032
+ backgroundColor: '#FBEFE7',
2033
+ marginHorizontal: -16,
2034
+ paddingVertical: 8,
2035
+ marginTop: 16,
2036
+ borderBottomRightRadius: 8,
2037
+ borderBottomLeftRadius: 8,
2038
+ paddingHorizontal: 16,
1166
2039
  }}
1167
2040
  >
1168
- <AddInfo />
1169
- <MText
1170
- style={[
1171
- commonStyles.textNormal,
1172
- {
1173
- fontSize: 12,
1174
- fontWeight: '300',
1175
- marginTop: 8,
1176
- textAlign: 'center',
1177
- },
1178
- ]}
2041
+ <View
2042
+ style={{
2043
+ flexDirection: 'row',
2044
+ justifyContent:
2045
+ 'space-between',
2046
+ alignItems: 'center',
2047
+ }}
1179
2048
  >
1180
- Hoàn thiện{'\n'}cung cấp thông
1181
- tin
1182
- </MText>
1183
- </MButton>
1184
- ) : (
1185
- <View>
1186
- {item?.isUpdateLoan ||
1187
- item?.isUpdateInformation ? (
1188
- <TouchableOpacity
2049
+ <View
1189
2050
  style={{
1190
- alignItems: 'center',
1191
- }}
1192
- onPress={() => {
1193
- checkTerm(item, () => {
1194
- if (
1195
- item?.isUpdateLoan
1196
- ) {
1197
- navigation.dispatch(
1198
- StackActions.push(
1199
- ScreenNames.CimbSelfie,
1200
- {
1201
- loan: item,
1202
- }
1203
- )
1204
- );
1205
- } else {
1206
- navigation.dispatch(
1207
- StackActions.push(
1208
- ScreenNames.QuickSubmit,
1209
- {
1210
- loan: item,
1211
- }
1212
- )
1213
- );
1214
- }
1215
- });
2051
+ flex: 1,
2052
+ flexDirection: 'row',
2053
+ paddingRight: 20,
1216
2054
  }}
1217
2055
  >
1218
- <AddInfo />
2056
+ <Image
2057
+ source={require('./error.png')}
2058
+ style={{
2059
+ width: 16,
2060
+ height: 16,
2061
+ }}
2062
+ />
1219
2063
  <MText
1220
- style={[
1221
- commonStyles.textNormal,
1222
- {
1223
- fontSize: 12,
1224
- fontWeight: '300',
1225
- marginTop: 8,
1226
- textAlign: 'center',
1227
- },
1228
- ]}
2064
+ style={{ marginLeft: 5 }}
1229
2065
  >
1230
- Hoàn thiện{'\n'}cung cấp
1231
- thông tin
2066
+ Đơn vay của bạn gặp gián
2067
+ đoạn, vui lòng liên hệ
2068
+ tổng đài 1900633688
1232
2069
  </MText>
1233
- </TouchableOpacity>
1234
- ) : (
1235
- <View
1236
- style={{
1237
- alignItems: 'center',
2070
+ </View>
2071
+
2072
+ <TouchableOpacity
2073
+ onPress={() => {
2074
+ Linking.openURL(
2075
+ `tel:1900633688`
2076
+ );
1238
2077
  }}
1239
2078
  >
1240
- <AddInfoDisable />
1241
- <MText
1242
- style={[
1243
- commonStyles.textNormal,
1244
- {
1245
- fontSize: 12,
1246
- fontWeight: '300',
1247
- marginTop: 8,
1248
- textAlign: 'center',
1249
- },
2079
+ <LinearGradient
2080
+ colors={[
2081
+ '#FF8E4F',
2082
+ '#EF592E',
1250
2083
  ]}
2084
+ style={{
2085
+ paddingHorizontal: 10,
2086
+ height: 30,
2087
+ borderRadius: 30,
2088
+ justifyContent:
2089
+ 'center',
2090
+ alignItems: 'center',
2091
+ flexDirection: 'row',
2092
+ }}
1251
2093
  >
1252
- Hoàn thiện{'\n'}cung cấp
1253
- thông tin
1254
- </MText>
1255
- </View>
1256
- )}
2094
+ <Call />
2095
+ <MText
2096
+ style={{
2097
+ color: 'white',
2098
+ fontSize: 12,
2099
+ marginLeft: 5,
2100
+ }}
2101
+ >
2102
+ Liên hệ
2103
+ </MText>
2104
+ </LinearGradient>
2105
+ </TouchableOpacity>
2106
+ </View>
1257
2107
  </View>
1258
- )}
1259
-
1260
- {item?.isSignContract && (
1261
- <MButton
2108
+ ) : (
2109
+ <View
1262
2110
  style={{
2111
+ flexDirection: 'row',
1263
2112
  alignItems: 'center',
1264
- marginLeft: 20,
1265
- }}
1266
- onPress={() => {
1267
- checkTerm(item, () => {
1268
- if (item?.urlSignContract) {
1269
- navigation.dispatch(
1270
- StackActions.push(
1271
- ScreenNames.CIMBSign,
1272
- {
1273
- url: item?.urlSignContract,
1274
- }
1275
- )
1276
- );
1277
- } else {
1278
- Alert.alert(
1279
- 'Thông báo',
1280
- 'Bạn chưa thể ký hợp đồng bây giờ?'
1281
- );
1282
- }
1283
- });
2113
+ backgroundColor: '#FBEFE7',
2114
+ marginHorizontal: -16,
2115
+ paddingVertical: 8,
2116
+ marginTop: 16,
2117
+ borderBottomRightRadius: 8,
2118
+ borderBottomLeftRadius: 8,
2119
+ paddingHorizontal: 16,
1284
2120
  }}
1285
2121
  >
1286
- <IconSign2 />
2122
+ <Info />
1287
2123
  <MText
1288
2124
  style={[
1289
- commonStyles.textNormal,
1290
2125
  {
1291
- fontSize: 12,
1292
2126
  fontWeight: '300',
1293
- marginTop: 8,
2127
+ fontSize: 10,
2128
+ fontStyle: 'italic',
2129
+ color: '#333333',
2130
+ marginLeft: 8,
1294
2131
  },
1295
2132
  ]}
1296
2133
  >
1297
- Ký hợp đồng
2134
+ {item?.suggestion
2135
+ ? item?.suggestion
2136
+ : 'Thực hiện đầy đủ các bước để giải ngân nhanh nhất'}
1298
2137
  </MText>
1299
- </MButton>
2138
+ </View>
1300
2139
  )}
1301
- {item?.isSignContractTima && (
1302
- <MButton
1303
- style={{
1304
- alignItems: 'center',
1305
- marginLeft: 20,
1306
- }}
1307
- onPress={() => {
1308
- checkTerm(item, () => {
2140
+ </View>
2141
+ )}
2142
+ </View>
2143
+ </View>
2144
+ )}
2145
+ </Observer>
2146
+ ) : (
2147
+ // cimb thường
2148
+ <View>
2149
+ <View>
2150
+ {item?.loanStatus !== null &&
2151
+ item?.loanStatus !== '' ? (
2152
+ <View
2153
+ style={{
2154
+ backgroundColor: '#FFFFFF',
2155
+ paddingHorizontal: 16,
2156
+ paddingTop: 16,
2157
+ borderRadius: 8,
2158
+ borderWidth: 0.5,
2159
+ borderColor: '#E0E0E0',
2160
+ }}
2161
+ >
2162
+ <View
2163
+ style={{
2164
+ flexDirection: 'row',
2165
+ alignItems: 'center',
2166
+ }}
2167
+ >
2168
+ <Contract />
2169
+ <View
2170
+ style={{ flex: 1, paddingLeft: 8 }}
2171
+ >
2172
+ <MText
2173
+ style={
2174
+ commonStyles.textNormalBold
2175
+ }
2176
+ >
2177
+ Mã Đơn vay-{item?.id}
2178
+ </MText>
2179
+ <MText
2180
+ style={commonStyles.textNormal}
2181
+ >
2182
+ Số tiền vay (VND):{' '}
2183
+ {item?.loanAmountOffer
2184
+ ? formatMoney(
2185
+ item?.loanAmountOffer
2186
+ )
2187
+ : 'Chưa xác định'}
2188
+ </MText>
2189
+ </View>
2190
+ </View>
2191
+ <View
2192
+ style={{
2193
+ height: 1,
2194
+ backgroundColor: '#E0E0E0',
2195
+ marginVertical: 16,
2196
+ }}
2197
+ />
2198
+ <View
2199
+ style={{
2200
+ flexDirection: 'row',
2201
+ justifyContent: 'space-between',
2202
+ }}
2203
+ >
2204
+ <MText
2205
+ style={commonStyles.textNormal}
2206
+ >
2207
+ Trạng thái
2208
+ </MText>
2209
+ <MText
2210
+ style={[
2211
+ commonStyles.textNormalBold,
2212
+ { color: '#F05123' },
2213
+ ]}
2214
+ >
2215
+ {item?.loanStatus}
2216
+ </MText>
2217
+ </View>
2218
+ <View
2219
+ style={{
2220
+ height: 0.5,
2221
+ backgroundColor: '#E0E0E0',
2222
+ marginVertical: 16,
2223
+ }}
2224
+ />
2225
+ <View style={{ flexDirection: 'row' }}>
2226
+ {item?.isUpdateLoan ||
2227
+ item?.isUpdateInformation ? (
2228
+ <TouchableOpacity
2229
+ style={{ alignItems: 'center' }}
2230
+ onPress={() => {
2231
+ checkTerm(item, () => {
2232
+ if (item?.isUpdateLoan) {
1309
2233
  navigation.dispatch(
1310
2234
  StackActions.push(
1311
- ScreenNames.ViewContract,
2235
+ ScreenNames.CimbSelfie,
1312
2236
  {
1313
2237
  loan: item,
1314
2238
  }
1315
2239
  )
1316
2240
  );
1317
- });
1318
- }}
1319
- >
1320
- <ContractTimeIcon />
1321
- <MText
1322
- style={[
1323
- commonStyles.textNormal,
1324
- {
1325
- fontSize: 12,
1326
- fontWeight: '300',
1327
- marginTop: 8,
1328
- textAlign: 'center',
1329
- },
1330
- ]}
1331
- >
1332
- Hợp đồng{'\n'}dịch vụ
1333
- </MText>
1334
- </MButton>
1335
- )}
1336
- {item?.paymentEvidenceUrl && (
1337
- <MButton
1338
- style={{
1339
- alignItems: 'center',
1340
- marginLeft: 20,
1341
- }}
1342
- onPress={() => {
1343
- checkTerm(item, () => {
2241
+ } else {
1344
2242
  navigation.dispatch(
1345
2243
  StackActions.push(
1346
- ScreenNames.PaymentEvidence,
2244
+ ScreenNames.QuickSubmit,
1347
2245
  {
1348
- url: item?.paymentEvidenceUrl,
2246
+ loan: item,
1349
2247
  }
1350
2248
  )
1351
2249
  );
1352
- });
1353
- }}
1354
- >
1355
- <IconEviden />
1356
- <MText
1357
- style={[
1358
- commonStyles.textNormal,
1359
- {
1360
- fontSize: 12,
1361
- fontWeight: '300',
1362
- marginTop: 8,
1363
- textAlign: 'center',
1364
- },
1365
- ]}
1366
- >
1367
- Mục đích {'\n'}sử dụng
1368
- </MText>
1369
- </MButton>
1370
- )}
1371
- {item?.showPaymentPlan && (
1372
- <MButton
1373
- style={{
1374
- alignItems: 'center',
1375
- marginLeft: 20,
1376
- }}
1377
- onPress={() => {
1378
- navigation.dispatch(
1379
- StackActions.push(
1380
- ScreenNames.SchedulePayment,
1381
- {
1382
- loan: item,
1383
- }
1384
- )
1385
- );
1386
- }}
1387
- >
1388
- <IconSchedule />
1389
- <MText
1390
- style={[
1391
- commonStyles.textNormal,
1392
- {
1393
- fontSize: 12,
1394
- fontWeight: '300',
1395
- marginTop: 8,
1396
- },
1397
- ]}
1398
- >
1399
- Lịch dự kiến
1400
- </MText>
1401
- </MButton>
1402
- )}
1403
- </View>
1404
-
1405
- {item.messageErrorCIMB !== '' &&
1406
- item?.messageErrorCIMB &&
1407
- item?.isCimbApproveFull === null ? (
1408
- <View
1409
- style={{
1410
- backgroundColor: '#FBEFE7',
1411
- marginHorizontal: -16,
1412
- paddingVertical: 8,
1413
- marginTop: 16,
1414
- borderBottomRightRadius: 8,
1415
- borderBottomLeftRadius: 8,
1416
- paddingHorizontal: 16,
2250
+ }
2251
+ });
1417
2252
  }}
1418
- >
1419
- <View
1420
- style={{
1421
- flexDirection: 'row',
1422
- justifyContent:
1423
- 'space-between',
1424
- alignItems: 'center',
1425
- }}
1426
- >
1427
- <View
1428
- style={{
1429
- flex: 1,
1430
- flexDirection: 'row',
1431
- paddingRight: 20,
1432
- }}
1433
- >
1434
- <Image
1435
- source={require('./error.png')}
1436
- style={{
1437
- width: 16,
1438
- height: 16,
1439
- }}
1440
- />
1441
- <MText
1442
- style={{ marginLeft: 5 }}
1443
- >
1444
- Đơn vay của bạn gặp gián
1445
- đoạn, vui lòng liên hệ tổng
1446
- đài 1900633688
1447
- </MText>
1448
- </View>
1449
-
1450
- <TouchableOpacity
1451
- onPress={() => {
1452
- Linking.openURL(
1453
- `tel:1900633688`
1454
- );
1455
- }}
1456
- >
1457
- <LinearGradient
1458
- colors={[
1459
- '#FF8E4F',
1460
- '#EF592E',
1461
- ]}
1462
- style={{
1463
- paddingHorizontal: 10,
1464
- height: 30,
1465
- borderRadius: 30,
1466
- justifyContent: 'center',
1467
- alignItems: 'center',
1468
- flexDirection: 'row',
1469
- }}
1470
- >
1471
- <Call />
1472
- <MText
1473
- style={{
1474
- color: 'white',
1475
- fontSize: 12,
1476
- marginLeft: 5,
1477
- }}
1478
- >
1479
- Liên hệ
1480
- </MText>
1481
- </LinearGradient>
1482
- </TouchableOpacity>
1483
- </View>
1484
- </View>
2253
+ >
2254
+ <AddInfo />
2255
+ <MText
2256
+ style={[
2257
+ commonStyles.textNormal,
2258
+ {
2259
+ fontSize: 12,
2260
+ fontWeight: '300',
2261
+ marginTop: 8,
2262
+ textAlign: 'center',
2263
+ },
2264
+ ]}
2265
+ >
2266
+ Hoàn thiện{'\n'}cung cấp thông
2267
+ tin
2268
+ </MText>
2269
+ </TouchableOpacity>
1485
2270
  ) : (
1486
2271
  <View
2272
+ style={{ alignItems: 'center' }}
2273
+ >
2274
+ <AddInfoDisable />
2275
+ <MText
2276
+ style={[
2277
+ commonStyles.textNormal,
2278
+ {
2279
+ fontSize: 12,
2280
+ fontWeight: '300',
2281
+ marginTop: 8,
2282
+ textAlign: 'center',
2283
+ },
2284
+ ]}
2285
+ >
2286
+ Hoàn thiện{'\n'}cung cấp thông
2287
+ tin
2288
+ </MText>
2289
+ </View>
2290
+ )}
2291
+ {item?.isSignContract && (
2292
+ <TouchableOpacity
1487
2293
  style={{
1488
- flexDirection: 'row',
1489
2294
  alignItems: 'center',
1490
- backgroundColor: '#FBEFE7',
1491
- marginHorizontal: -16,
1492
- paddingVertical: 8,
1493
- marginTop: 16,
1494
- borderBottomRightRadius: 8,
1495
- borderBottomLeftRadius: 8,
1496
- paddingHorizontal: 16,
2295
+ marginLeft: 20,
2296
+ }}
2297
+ onPress={() => {
2298
+ checkTerm(item, () => {
2299
+ if (item?.urlSignContract) {
2300
+ navigation.dispatch(
2301
+ StackActions.push(
2302
+ ScreenNames.CIMBSign,
2303
+ {
2304
+ url: item?.urlSignContract,
2305
+ }
2306
+ )
2307
+ );
2308
+ } else {
2309
+ Alert.alert(
2310
+ 'Thông báo',
2311
+ 'Bạn chưa thể ký hợp đồng bây giờ?'
2312
+ );
2313
+ }
2314
+ });
1497
2315
  }}
1498
2316
  >
1499
- <Info />
2317
+ <IconSign2 />
1500
2318
  <MText
1501
2319
  style={[
2320
+ commonStyles.textNormal,
1502
2321
  {
2322
+ fontSize: 12,
1503
2323
  fontWeight: '300',
1504
- fontSize: 10,
1505
- fontStyle: 'italic',
1506
- color: '#333333',
1507
- marginLeft: 8,
2324
+ marginTop: 8,
1508
2325
  },
1509
2326
  ]}
1510
2327
  >
1511
- {item?.suggestion
1512
- ? item?.suggestion
1513
- : 'Thực hiện đầy đủ các bước để giải ngân nhanh nhất'}
2328
+ Ký hợp đồng
1514
2329
  </MText>
1515
- </View>
2330
+ </TouchableOpacity>
1516
2331
  )}
1517
- </View>
1518
- )}
1519
- </View>
1520
- </View>
1521
- )}
1522
- </Observer>
1523
- ) : (
1524
- // cimb thường
1525
- <View>
1526
- <View>
1527
- {item?.loanStatus !== null &&
1528
- item?.loanStatus !== '' ? (
1529
- <View
1530
- style={{
1531
- backgroundColor: '#FFFFFF',
1532
- paddingHorizontal: 16,
1533
- paddingTop: 16,
1534
- borderRadius: 8,
1535
- borderWidth: 0.5,
1536
- borderColor: '#E0E0E0',
1537
- }}
1538
- >
1539
- <View
1540
- style={{
1541
- flexDirection: 'row',
1542
- alignItems: 'center',
1543
- }}
1544
- >
1545
- <Contract />
1546
- <View
1547
- style={{ flex: 1, paddingLeft: 8 }}
1548
- >
1549
- <MText
1550
- style={commonStyles.textNormalBold}
1551
- >
1552
- Mã Đơn vay-{item?.id}
1553
- </MText>
1554
- <MText
1555
- style={commonStyles.textNormal}
1556
- >
1557
- Số tiền vay (VND):{' '}
1558
- {item?.loanAmountOffer
1559
- ? formatMoney(
1560
- item?.loanAmountOffer
1561
- )
1562
- : 'Chưa xác định'}
1563
- </MText>
1564
- </View>
1565
- </View>
1566
- <View
1567
- style={{
1568
- height: 1,
1569
- backgroundColor: '#E0E0E0',
1570
- marginVertical: 16,
1571
- }}
1572
- />
1573
- <View
1574
- style={{
1575
- flexDirection: 'row',
1576
- justifyContent: 'space-between',
1577
- }}
1578
- >
1579
- <MText style={commonStyles.textNormal}>
1580
- Trạng thái
1581
- </MText>
1582
- <MText
1583
- style={[
1584
- commonStyles.textNormalBold,
1585
- { color: '#F05123' },
1586
- ]}
1587
- >
1588
- {item?.loanStatus}
1589
- </MText>
1590
- </View>
1591
- <View
1592
- style={{
1593
- height: 0.5,
1594
- backgroundColor: '#E0E0E0',
1595
- marginVertical: 16,
1596
- }}
1597
- />
1598
- <View style={{ flexDirection: 'row' }}>
1599
- {item?.isUpdateLoan ||
1600
- item?.isUpdateInformation ? (
1601
- <TouchableOpacity
1602
- style={{ alignItems: 'center' }}
1603
- onPress={() => {
1604
- checkTerm(item, () => {
1605
- if (item?.isUpdateLoan) {
1606
- navigation.dispatch(
1607
- StackActions.push(
1608
- ScreenNames.CimbSelfie,
1609
- {
1610
- loan: item,
1611
- }
1612
- )
1613
- );
1614
- } else {
2332
+ {item?.isSignContractTima && (
2333
+ <TouchableOpacity
2334
+ style={{
2335
+ alignItems: 'center',
2336
+ marginLeft: 20,
2337
+ }}
2338
+ onPress={() => {
2339
+ checkTerm(item, () => {
1615
2340
  navigation.dispatch(
1616
2341
  StackActions.push(
1617
- ScreenNames.QuickSubmit,
2342
+ ScreenNames.ViewContract,
1618
2343
  {
1619
2344
  loan: item,
1620
2345
  }
1621
2346
  )
1622
2347
  );
1623
- }
1624
- });
1625
- }}
1626
- >
1627
- <AddInfo />
1628
- <MText
1629
- style={[
1630
- commonStyles.textNormal,
1631
- {
1632
- fontSize: 12,
1633
- fontWeight: '300',
1634
- marginTop: 8,
1635
- textAlign: 'center',
1636
- },
1637
- ]}
1638
- >
1639
- Hoàn thiện{'\n'}cung cấp thông tin
1640
- </MText>
1641
- </TouchableOpacity>
1642
- ) : (
1643
- <View
1644
- style={{ alignItems: 'center' }}
1645
- >
1646
- <AddInfoDisable />
1647
- <MText
1648
- style={[
1649
- commonStyles.textNormal,
1650
- {
1651
- fontSize: 12,
1652
- fontWeight: '300',
1653
- marginTop: 8,
1654
- textAlign: 'center',
1655
- },
1656
- ]}
2348
+ });
2349
+ }}
1657
2350
  >
1658
- Hoàn thiện{'\n'}cung cấp thông tin
1659
- </MText>
1660
- </View>
1661
- )}
1662
- {item?.isSignContract && (
1663
- <TouchableOpacity
1664
- style={{
1665
- alignItems: 'center',
1666
- marginLeft: 20,
1667
- }}
1668
- onPress={() => {
1669
- checkTerm(item, () => {
1670
- if (item?.urlSignContract) {
2351
+ <ContractTimeIcon />
2352
+ <MText
2353
+ style={[
2354
+ commonStyles.textNormal,
2355
+ {
2356
+ fontSize: 12,
2357
+ fontWeight: '300',
2358
+ marginTop: 8,
2359
+ textAlign: 'center',
2360
+ },
2361
+ ]}
2362
+ >
2363
+ Hợp đồng{'\n'}dịch vụ
2364
+ </MText>
2365
+ </TouchableOpacity>
2366
+ )}
2367
+ {item?.paymentEvidenceUrl && (
2368
+ <TouchableOpacity
2369
+ style={{
2370
+ alignItems: 'center',
2371
+ marginLeft: 20,
2372
+ }}
2373
+ onPress={() => {
2374
+ checkTerm(item, () => {
1671
2375
  navigation.dispatch(
1672
2376
  StackActions.push(
1673
- ScreenNames.CIMBSign,
2377
+ ScreenNames.PaymentEvidence,
1674
2378
  {
1675
- url: item?.urlSignContract,
2379
+ url: item?.paymentEvidenceUrl,
1676
2380
  }
1677
2381
  )
1678
2382
  );
1679
- } else {
1680
- Alert.alert(
1681
- 'Thông báo',
1682
- 'Bạn chưa thể ký hợp đồng bây giờ?'
1683
- );
1684
- }
1685
- });
1686
- }}
1687
- >
1688
- <IconSign2 />
1689
- <MText
1690
- style={[
1691
- commonStyles.textNormal,
1692
- {
1693
- fontSize: 12,
1694
- fontWeight: '300',
1695
- marginTop: 8,
1696
- },
1697
- ]}
2383
+ });
2384
+ }}
1698
2385
  >
1699
- hợp đồng
1700
- </MText>
1701
- </TouchableOpacity>
1702
- )}
1703
- {item?.isSignContractTima && (
1704
- <TouchableOpacity
1705
- style={{
1706
- alignItems: 'center',
1707
- marginLeft: 20,
1708
- }}
1709
- onPress={() => {
1710
- checkTerm(item, () => {
2386
+ <IconEviden />
2387
+ <MText
2388
+ style={[
2389
+ commonStyles.textNormal,
2390
+ {
2391
+ fontSize: 12,
2392
+ fontWeight: '300',
2393
+ marginTop: 8,
2394
+ textAlign: 'center',
2395
+ },
2396
+ ]}
2397
+ >
2398
+ Mục đích {'\n'}sử dụng
2399
+ </MText>
2400
+ </TouchableOpacity>
2401
+ )}
2402
+ {item?.showPaymentPlan && (
2403
+ <TouchableOpacity
2404
+ style={{
2405
+ alignItems: 'center',
2406
+ marginLeft: 20,
2407
+ }}
2408
+ onPress={() => {
1711
2409
  navigation.dispatch(
1712
2410
  StackActions.push(
1713
- ScreenNames.ViewContract,
2411
+ ScreenNames.SchedulePayment,
1714
2412
  {
1715
2413
  loan: item,
1716
- }
1717
- )
1718
- );
1719
- });
1720
- }}
1721
- >
1722
- <ContractTimeIcon />
1723
- <MText
1724
- style={[
1725
- commonStyles.textNormal,
1726
- {
1727
- fontSize: 12,
1728
- fontWeight: '300',
1729
- marginTop: 8,
1730
- textAlign: 'center',
1731
- },
1732
- ]}
1733
- >
1734
- Hợp đồng{'\n'}dịch vụ
1735
- </MText>
1736
- </TouchableOpacity>
1737
- )}
1738
- {item?.paymentEvidenceUrl && (
1739
- <TouchableOpacity
1740
- style={{
1741
- alignItems: 'center',
1742
- marginLeft: 20,
1743
- }}
1744
- onPress={() => {
1745
- checkTerm(item, () => {
1746
- navigation.dispatch(
1747
- StackActions.push(
1748
- ScreenNames.PaymentEvidence,
1749
- {
1750
- url: item?.paymentEvidenceUrl,
1751
- }
1752
- )
1753
- );
1754
- });
1755
- }}
1756
- >
1757
- <IconEviden />
1758
- <MText
1759
- style={[
1760
- commonStyles.textNormal,
1761
- {
1762
- fontSize: 12,
1763
- fontWeight: '300',
1764
- marginTop: 8,
1765
- textAlign: 'center',
1766
- },
1767
- ]}
2414
+ }
2415
+ )
2416
+ );
2417
+ }}
1768
2418
  >
1769
- Mục đích {'\n'}sử dụng
1770
- </MText>
1771
- </TouchableOpacity>
1772
- )}
1773
- {item?.showPaymentPlan && (
1774
- <TouchableOpacity
1775
- style={{
1776
- alignItems: 'center',
1777
- marginLeft: 20,
1778
- }}
1779
- onPress={() => {
1780
- navigation.dispatch(
1781
- StackActions.push(
1782
- ScreenNames.SchedulePayment,
2419
+ <IconSchedule />
2420
+ <MText
2421
+ style={[
2422
+ commonStyles.textNormal,
1783
2423
  {
1784
- loan: item,
1785
- }
1786
- )
1787
- );
1788
- }}
1789
- >
1790
- <IconSchedule />
1791
- <MText
1792
- style={[
1793
- commonStyles.textNormal,
1794
- {
1795
- fontSize: 12,
1796
- fontWeight: '300',
1797
- marginTop: 8,
1798
- },
1799
- ]}
1800
- >
1801
- Lịch dự kiến
1802
- </MText>
1803
- </TouchableOpacity>
1804
- )}
1805
- </View>
2424
+ fontSize: 12,
2425
+ fontWeight: '300',
2426
+ marginTop: 8,
2427
+ },
2428
+ ]}
2429
+ >
2430
+ Lịch dự kiến
2431
+ </MText>
2432
+ </TouchableOpacity>
2433
+ )}
2434
+ </View>
1806
2435
 
1807
- <View
1808
- style={{
1809
- flexDirection: 'row',
1810
- alignItems: 'center',
1811
- backgroundColor: '#FBEFE7',
1812
- marginHorizontal: -16,
1813
- paddingVertical: 8,
1814
- marginTop: 16,
1815
- borderBottomRightRadius: 8,
1816
- borderBottomLeftRadius: 8,
1817
- paddingHorizontal: 16,
1818
- }}
1819
- >
1820
- <Info />
1821
- <MText
1822
- style={[
1823
- {
1824
- fontWeight: '300',
1825
- fontSize: 10,
1826
- fontStyle: 'italic',
1827
- color: '#333333',
1828
- marginLeft: 8,
1829
- },
1830
- ]}
1831
- >
1832
- {item?.suggestion
1833
- ? item?.suggestion
1834
- : 'Thực hiện đầy đủ các bước để giải ngân nhanh nhất'}
1835
- </MText>
1836
- </View>
1837
- </View>
1838
- ) : (
1839
- <ImageBackground
1840
- source={require('../../assets/img/bann.png')}
1841
- style={{ flex: 1, padding: 16 }}
1842
- resizeMode="cover"
1843
- height={220}
1844
- borderRadius={8}
1845
- >
1846
- <MText
1847
- style={{
1848
- color: '#333333',
1849
- fontWeight: 'bold',
1850
- fontSize: 12,
1851
- }}
1852
- >
1853
- BẠN ĐỦ ĐIỀU KIỆN VAY TIÊU DÙNG{'\n'}THEO
1854
- THÔNG TIN TÀI SẢN SỞ HỮU
1855
- {'\n'}
1856
- (XE MÁY/ Ô TÔ)
1857
- </MText>
1858
- <MText
1859
- style={{
1860
- marginTop: 12,
1861
- fontSize: 24,
1862
- fontWeight: 'bold',
1863
- color: '#EF4123',
1864
- }}
1865
- >
1866
- {formatMoney(item?.loanAmount)} VND
1867
- </MText>
1868
- <TouchableOpacity
1869
- onPress={() => {
1870
- checkTerm(item, () => {
1871
- navigation.dispatch(
1872
- StackActions.push(
1873
- ScreenNames.CIMBxTima,
1874
- {
1875
- loan: item,
1876
- }
1877
- )
1878
- );
1879
- });
1880
- }}
1881
- >
1882
- <LinearGradient
1883
- colors={['#FF7A00', '#EF4123']}
2436
+ <View
1884
2437
  style={{
1885
- backgroundColor: '#F36D21cd ',
1886
- marginTop: 12,
2438
+ flexDirection: 'row',
1887
2439
  alignItems: 'center',
1888
- borderRadius: 30,
1889
- paddingVertical: 10,
1890
- width: '50%',
2440
+ backgroundColor: '#FBEFE7',
2441
+ marginHorizontal: -16,
2442
+ paddingVertical: 8,
2443
+ marginTop: 16,
2444
+ borderBottomRightRadius: 8,
2445
+ borderBottomLeftRadius: 8,
2446
+ paddingHorizontal: 16,
1891
2447
  }}
1892
2448
  >
2449
+ <Info />
1893
2450
  <MText
1894
- style={{
1895
- color: '#FFFFFF',
1896
- fontWeight: 'bold',
1897
- }}
2451
+ style={[
2452
+ {
2453
+ fontWeight: '300',
2454
+ fontSize: 10,
2455
+ fontStyle: 'italic',
2456
+ color: '#333333',
2457
+ marginLeft: 8,
2458
+ },
2459
+ ]}
1898
2460
  >
1899
- Hoàn thiện hồ sơ
2461
+ {item?.suggestion
2462
+ ? item?.suggestion
2463
+ : 'Thực hiện đầy đủ các bước để giải ngân nhanh nhất'}
1900
2464
  </MText>
1901
- </LinearGradient>
1902
- </TouchableOpacity>
1903
- <View
1904
- style={{
1905
- flexDirection: 'row',
1906
- alignItems: 'center',
1907
- alignContent: 'center',
1908
- marginTop: 16,
1909
- }}
2465
+ </View>
2466
+ </View>
2467
+ ) : (
2468
+ <ImageBackground
2469
+ source={require('../../assets/img/bann.png')}
2470
+ style={{ flex: 1, padding: 16 }}
2471
+ resizeMode="cover"
2472
+ height={220}
2473
+ borderRadius={8}
1910
2474
  >
1911
2475
  <MText
1912
2476
  style={{
1913
- fontSize: 10,
1914
2477
  color: '#333333',
2478
+ fontWeight: 'bold',
2479
+ fontSize: 12,
1915
2480
  }}
1916
2481
  >
1917
- SẢN PHẨM VAY TIÊU DÙNG HỢP TÁC GIỮA{' '}
2482
+ BẠN ĐỦ ĐIỀU KIỆN VAY TIÊU DÙNG{'\n'}
2483
+ THEO THÔNG TIN TÀI SẢN SỞ HỮU
2484
+ {'\n'}
2485
+ (XE MÁY/ Ô TÔ)
1918
2486
  </MText>
1919
- <LogoSmall />
1920
2487
  <MText
1921
2488
  style={{
1922
- fontSize: 12,
1923
- color: '#333333',
2489
+ marginTop: 12,
2490
+ fontSize: 24,
2491
+ fontWeight: 'bold',
2492
+ color: '#EF4123',
1924
2493
  }}
1925
2494
  >
1926
- {' '}
1927
- VÀ{' '}
2495
+ {formatMoney(item?.loanAmount)} VND
1928
2496
  </MText>
1929
- <CIMBSmall />
1930
- </View>
1931
- </ImageBackground>
1932
- )}
1933
- </View>
1934
- </View>
1935
- )}
1936
- </View>
1937
- ) : (
1938
- <Observer>
1939
- {() => (
1940
- <View>
1941
- <View
1942
- style={{
1943
- backgroundColor: '#FFFFFF',
1944
- paddingHorizontal: 16,
1945
- paddingTop: 16,
1946
- borderRadius: 8,
1947
- borderWidth: 0.5,
1948
- borderColor: '#E0E0E0',
1949
- }}
1950
- >
1951
- <View
1952
- style={{
1953
- flexDirection: 'row',
1954
- alignItems: 'center',
1955
- }}
1956
- >
1957
- <Contract />
1958
- <View style={{ flex: 1, paddingLeft: 8 }}>
1959
- <MText
1960
- style={commonStyles.textNormalBold}
1961
- >
1962
- Đơn vay {item?.id}
1963
- </MText>
1964
- <MText style={commonStyles.textNormal}>
1965
- Số tiền vay (VND):{' '}
1966
- {item?.loanAmount
1967
- ? formatMoney(item?.loanAmount)
1968
- : 'Chưa xác định'}
1969
- </MText>
1970
- </View>
2497
+ <TouchableOpacity
2498
+ onPress={() => {
2499
+ checkTerm(item, () => {
2500
+ navigation.dispatch(
2501
+ StackActions.push(
2502
+ ScreenNames.CIMBxTima,
2503
+ {
2504
+ loan: item,
2505
+ }
2506
+ )
2507
+ );
2508
+ });
2509
+ }}
2510
+ >
2511
+ <LinearGradient
2512
+ colors={['#FF7A00', '#EF4123']}
2513
+ style={{
2514
+ backgroundColor: '#F36D21cd ',
2515
+ marginTop: 12,
2516
+ alignItems: 'center',
2517
+ borderRadius: 30,
2518
+ paddingVertical: 10,
2519
+ width: '50%',
2520
+ }}
2521
+ >
2522
+ <MText
2523
+ style={{
2524
+ color: '#FFFFFF',
2525
+ fontWeight: 'bold',
2526
+ }}
2527
+ >
2528
+ Hoàn thiện hồ sơ
2529
+ </MText>
2530
+ </LinearGradient>
2531
+ </TouchableOpacity>
2532
+ <View
2533
+ style={{
2534
+ flexDirection: 'row',
2535
+ alignItems: 'center',
2536
+ alignContent: 'center',
2537
+ marginTop: 16,
2538
+ }}
2539
+ >
2540
+ <MText
2541
+ style={{
2542
+ fontSize: 10,
2543
+ color: '#333333',
2544
+ }}
2545
+ >
2546
+ SẢN PHẨM VAY TIÊU DÙNG HỢP TÁC GIỮA{' '}
2547
+ </MText>
2548
+ <LogoSmall />
2549
+ <MText
2550
+ style={{
2551
+ fontSize: 12,
2552
+ color: '#333333',
2553
+ }}
2554
+ >
2555
+ {' '}
2556
+ VÀ{' '}
2557
+ </MText>
2558
+ <CIMBSmall />
2559
+ </View>
2560
+ </ImageBackground>
2561
+ )}
1971
2562
  </View>
2563
+ </View>
2564
+ )}
2565
+ </View>
2566
+ ) : (
2567
+ <Observer>
2568
+ {() => (
2569
+ <View>
1972
2570
  <View
1973
2571
  style={{
1974
- height: 1,
1975
- backgroundColor: '#E0E0E0',
1976
- marginVertical: 16,
1977
- }}
1978
- />
1979
- <View
1980
- style={{
1981
- flexDirection: 'row',
1982
- justifyContent: 'space-between',
1983
- alignItems: 'center',
2572
+ backgroundColor: '#FFFFFF',
2573
+ paddingHorizontal: 16,
2574
+ paddingTop: 16,
2575
+ borderRadius: 8,
2576
+ borderWidth: 0.5,
2577
+ borderColor: '#E0E0E0',
1984
2578
  }}
1985
2579
  >
1986
- <MText style={commonStyles.textNormal}>
1987
- Trạng thái
1988
- </MText>
1989
- <MText
1990
- style={[
1991
- commonStyles.textNormalBold,
1992
- { color: '#F05123' },
1993
- ]}
2580
+ <View
2581
+ style={{
2582
+ flexDirection: 'row',
2583
+ alignItems: 'center',
2584
+ }}
1994
2585
  >
1995
- {item?.loanStatus}
1996
- </MText>
1997
- </View>
1998
- <View
1999
- style={{
2000
- height: 0.5,
2001
- backgroundColor: '#E0E0E0',
2002
- marginVertical: 16,
2003
- }}
2004
- />
2005
- <View
2006
- style={{
2007
- flexDirection: 'row',
2008
- gap: 24,
2009
- }}
2010
- >
2011
- {!homeStore.checkEKYC[item?.id] && (
2012
- <TouchableOpacity
2013
- style={{ alignItems: 'center' }}
2014
- onPress={() => {
2015
- checkTerm(item, () => {
2016
- navigation.dispatch(
2017
- StackActions.push(
2018
- ScreenNames.NationalID,
2019
- {
2020
- loan: item,
2021
- reLoan: true,
2022
- }
2023
- )
2024
- );
2025
- });
2026
- }}
2027
- >
2028
- <AddInfo />
2586
+ <Contract />
2587
+ <View style={{ flex: 1, paddingLeft: 8 }}>
2029
2588
  <MText
2030
- style={[
2031
- commonStyles.textNormal,
2032
- {
2033
- fontSize: 12,
2034
- fontWeight: '300',
2035
- marginTop: 8,
2036
- },
2037
- ]}
2589
+ style={commonStyles.textNormalBold}
2038
2590
  >
2039
- EKYC
2591
+ Đơn vay {item?.id}
2040
2592
  </MText>
2041
- </TouchableOpacity>
2042
- )}
2043
- {/* Cập nhật thông tin với đơn ô tô digital topup */}
2044
- {item?.typeLoan === 4 &&
2045
- item?.productId === 8 ? (
2046
- <>
2047
- {item?.isUpdateInfoTopup && (
2048
- <TouchableOpacity
2049
- onPress={() => {
2593
+ <MText style={commonStyles.textNormal}>
2594
+ Số tiền vay (VND):{' '}
2595
+ {item?.loanAmount
2596
+ ? formatMoney(item?.loanAmount)
2597
+ : 'Chưa xác định'}
2598
+ </MText>
2599
+ </View>
2600
+ </View>
2601
+ <View
2602
+ style={{
2603
+ height: 1,
2604
+ backgroundColor: '#E0E0E0',
2605
+ marginVertical: 16,
2606
+ }}
2607
+ />
2608
+ <View
2609
+ style={{
2610
+ flexDirection: 'row',
2611
+ justifyContent: 'space-between',
2612
+ alignItems: 'center',
2613
+ }}
2614
+ >
2615
+ <MText style={commonStyles.textNormal}>
2616
+ Trạng thái
2617
+ </MText>
2618
+ <MText
2619
+ style={[
2620
+ commonStyles.textNormalBold,
2621
+ { color: '#F05123' },
2622
+ ]}
2623
+ >
2624
+ {item?.loanStatus}
2625
+ </MText>
2626
+ </View>
2627
+ <View
2628
+ style={{
2629
+ height: 0.5,
2630
+ backgroundColor: '#E0E0E0',
2631
+ marginVertical: 16,
2632
+ }}
2633
+ />
2634
+ <View
2635
+ style={{
2636
+ flexDirection: 'row',
2637
+ gap: 24,
2638
+ }}
2639
+ >
2640
+ {!homeStore.checkEKYC[item?.id] && (
2641
+ <TouchableOpacity
2642
+ style={{ alignItems: 'center' }}
2643
+ onPress={() => {
2644
+ checkTerm(item, () => {
2050
2645
  navigation.dispatch(
2051
2646
  StackActions.push(
2052
- ScreenNames.UpdateLoan,
2053
- item
2647
+ ScreenNames.NationalID,
2648
+ {
2649
+ loan: item,
2650
+ reLoan: true,
2651
+ }
2054
2652
  )
2055
2653
  );
2056
- }}
2057
- style={{
2058
- alignItems: 'center',
2059
- }}
2654
+ });
2655
+ }}
2656
+ >
2657
+ <AddInfo />
2658
+ <MText
2659
+ style={[
2660
+ commonStyles.textNormal,
2661
+ {
2662
+ fontSize: 12,
2663
+ fontWeight: '300',
2664
+ marginTop: 8,
2665
+ },
2666
+ ]}
2060
2667
  >
2061
- <TopupSvg />
2062
- <MText
2063
- style={[
2064
- commonStyles.textNormal,
2065
- {
2066
- fontSize: 12,
2067
- fontWeight: '300',
2068
- marginTop: 8,
2069
- },
2070
- ]}
2668
+ EKYC
2669
+ </MText>
2670
+ </TouchableOpacity>
2671
+ )}
2672
+ {/* Cập nhật thông tin với đơn ô tô digital topup */}
2673
+ {item?.typeLoan === 4 &&
2674
+ item?.productId === 8 ? (
2675
+ <>
2676
+ {item?.isUpdateInfoTopup && (
2677
+ <TouchableOpacity
2678
+ onPress={() => {
2679
+ navigation.dispatch(
2680
+ StackActions.push(
2681
+ ScreenNames.UpdateLoan,
2682
+ item
2683
+ )
2684
+ );
2685
+ }}
2686
+ style={{
2687
+ alignItems: 'center',
2688
+ }}
2071
2689
  >
2072
- Cập nhật{'\n'}thông tin
2073
- </MText>
2074
- </TouchableOpacity>
2075
- )}
2076
- </>
2077
- ) : (
2078
- <></>
2079
- )}
2690
+ <TopupSvg />
2691
+ <MText
2692
+ style={[
2693
+ commonStyles.textNormal,
2694
+ {
2695
+ fontSize: 12,
2696
+ fontWeight: '300',
2697
+ marginTop: 8,
2698
+ },
2699
+ ]}
2700
+ >
2701
+ Cập nhật{'\n'}thông tin
2702
+ </MText>
2703
+ </TouchableOpacity>
2704
+ )}
2705
+ </>
2706
+ ) : (
2707
+ <></>
2708
+ )}
2080
2709
 
2081
- {/* -------------------------------------------------- */}
2082
- {item?.isVideoDebt && (
2083
- <TouchableOpacity
2084
- style={{
2085
- alignItems: 'center',
2086
- }}
2087
- onPress={() => {
2088
- checkTerm(item, () => {
2089
- navigation.dispatch(
2090
- StackActions.push(
2091
- ScreenNames.Video,
2092
- {
2093
- loan: item,
2094
- }
2095
- )
2096
- );
2097
- });
2098
- }}
2099
- >
2100
- <IconVideo />
2101
- <MText
2102
- style={[
2103
- commonStyles.textNormal,
2104
- {
2105
- fontSize: 12,
2106
- fontWeight: '300',
2107
- marginTop: 8,
2108
- },
2109
- ]}
2710
+ {/* -------------------------------------------------- */}
2711
+ {item?.isVideoDebt && (
2712
+ <TouchableOpacity
2713
+ style={{
2714
+ alignItems: 'center',
2715
+ }}
2716
+ onPress={() => {
2717
+ checkTerm(item, () => {
2718
+ navigation.dispatch(
2719
+ StackActions.push(
2720
+ ScreenNames.Video,
2721
+ {
2722
+ loan: item,
2723
+ }
2724
+ )
2725
+ );
2726
+ });
2727
+ }}
2110
2728
  >
2111
- Quay video
2112
- </MText>
2113
- </TouchableOpacity>
2114
- )}
2115
- {item?.typeLoan === 4 &&
2116
- item?.productId === 8 ? (
2117
- <>
2118
- {!item?.isUpdateInfoTopup &&
2119
- homeStore.checkEKYC[item?.id] && (
2729
+ <IconVideo />
2730
+ <MText
2731
+ style={[
2732
+ commonStyles.textNormal,
2733
+ {
2734
+ fontSize: 12,
2735
+ fontWeight: '300',
2736
+ marginTop: 8,
2737
+ },
2738
+ ]}
2739
+ >
2740
+ Quay video
2741
+ </MText>
2742
+ </TouchableOpacity>
2743
+ )}
2744
+ {item?.typeLoan === 4 &&
2745
+ item?.productId === 8 ? (
2746
+ <>
2747
+ {!item?.isUpdateInfoTopup &&
2748
+ homeStore.checkEKYC[item?.id] && (
2749
+ <TouchableOpacity
2750
+ style={{
2751
+ alignItems: 'center',
2752
+ }}
2753
+ onPress={() => {
2754
+ checkTerm(item, () => {
2755
+ signLoan(item);
2756
+ });
2757
+ }}
2758
+ >
2759
+ <IconSign2 />
2760
+ <MText
2761
+ style={[
2762
+ commonStyles.textNormal,
2763
+ {
2764
+ fontSize: 12,
2765
+ fontWeight: '300',
2766
+ marginTop: 8,
2767
+ },
2768
+ ]}
2769
+ >
2770
+ Ký HĐ
2771
+ </MText>
2772
+ </TouchableOpacity>
2773
+ )}
2774
+ </>
2775
+ ) : (
2776
+ <>
2777
+ {homeStore.checkEKYC[item?.id] ? (
2120
2778
  <TouchableOpacity
2121
2779
  style={{
2122
2780
  alignItems: 'center',
@@ -2141,22 +2799,43 @@ export const Home = observer(function Home() {
2141
2799
  Ký HĐ
2142
2800
  </MText>
2143
2801
  </TouchableOpacity>
2802
+ ) : (
2803
+ <View
2804
+ style={{
2805
+ alignItems: 'center',
2806
+ }}
2807
+ >
2808
+ {/* <SignDisable />
2809
+ <MText
2810
+ style={[
2811
+ commonStyles.textNormal,
2812
+ {
2813
+ fontSize: 12,
2814
+ fontWeight: '300',
2815
+ marginTop: 8,
2816
+ },
2817
+ ]}
2818
+ >
2819
+ Ký HĐ
2820
+ </MText> */}
2821
+ </View>
2144
2822
  )}
2145
- </>
2146
- ) : (
2147
- <>
2148
- {homeStore.checkEKYC[item?.id] ? (
2823
+ </>
2824
+ )}
2825
+ {item?.typeLoan &&
2826
+ item?.productId === 8 && (
2149
2827
  <TouchableOpacity
2828
+ onPress={() => {
2829
+ navigation.push(
2830
+ 'DigitalSchedulePayment',
2831
+ item
2832
+ );
2833
+ }}
2150
2834
  style={{
2151
2835
  alignItems: 'center',
2152
2836
  }}
2153
- onPress={() => {
2154
- checkTerm(item, () => {
2155
- signLoan(item);
2156
- });
2157
- }}
2158
2837
  >
2159
- <IconSign2 />
2838
+ <IconSchedule />
2160
2839
  <MText
2161
2840
  style={[
2162
2841
  commonStyles.textNormal,
@@ -2167,99 +2846,50 @@ export const Home = observer(function Home() {
2167
2846
  },
2168
2847
  ]}
2169
2848
  >
2170
-
2849
+ Lịch TT dự kiến
2171
2850
  </MText>
2172
2851
  </TouchableOpacity>
2173
- ) : (
2174
- <View
2175
- style={{
2176
- alignItems: 'center',
2177
- }}
2178
- >
2179
- {/* <SignDisable />
2180
- <MText
2181
- style={[
2182
- commonStyles.textNormal,
2183
- {
2184
- fontSize: 12,
2185
- fontWeight: '300',
2186
- marginTop: 8,
2187
- },
2188
- ]}
2189
- >
2190
- Ký HĐ
2191
- </MText> */}
2192
- </View>
2193
2852
  )}
2194
- </>
2195
- )}
2196
- {item?.typeLoan &&
2197
- item?.productId === 8 && (
2198
- <TouchableOpacity
2199
- onPress={() => {
2200
- navigation.push(
2201
- 'DigitalSchedulePayment',
2202
- item
2203
- );
2204
- }}
2205
- style={{
2206
- alignItems: 'center',
2207
- }}
2208
- >
2209
- <IconSchedule />
2210
- <MText
2211
- style={[
2212
- commonStyles.textNormal,
2213
- {
2214
- fontSize: 12,
2215
- fontWeight: '300',
2216
- marginTop: 8,
2217
- },
2218
- ]}
2219
- >
2220
- Lịch TT dự kiến
2221
- </MText>
2222
- </TouchableOpacity>
2223
- )}
2224
- </View>
2225
- <View
2226
- style={{
2227
- flexDirection: 'row',
2228
- alignItems: 'center',
2229
- backgroundColor: '#FBEFE7',
2230
- marginHorizontal: -16,
2231
- paddingVertical: 8,
2232
- marginTop: 16,
2233
- borderBottomRightRadius: 8,
2234
- borderBottomLeftRadius: 8,
2235
- paddingHorizontal: 16,
2236
- }}
2237
- >
2238
- <Info />
2239
- <MText
2240
- style={[
2241
- {
2242
- fontWeight: '300',
2243
- fontSize: 12,
2244
- fontStyle: 'italic',
2245
- color: '#333333',
2246
- marginLeft: 8,
2247
- },
2248
- ]}
2853
+ </View>
2854
+ <View
2855
+ style={{
2856
+ flexDirection: 'row',
2857
+ alignItems: 'center',
2858
+ backgroundColor: '#FBEFE7',
2859
+ marginHorizontal: -16,
2860
+ paddingVertical: 8,
2861
+ marginTop: 16,
2862
+ borderBottomRightRadius: 8,
2863
+ borderBottomLeftRadius: 8,
2864
+ paddingHorizontal: 16,
2865
+ }}
2249
2866
  >
2250
- Thực hiện đầy đủ các bước để giải ngân
2251
- nhanh nhất
2252
- </MText>
2867
+ <Info />
2868
+ <MText
2869
+ style={[
2870
+ {
2871
+ fontWeight: '300',
2872
+ fontSize: 12,
2873
+ fontStyle: 'italic',
2874
+ color: '#333333',
2875
+ marginLeft: 8,
2876
+ },
2877
+ ]}
2878
+ >
2879
+ Thực hiện đầy đủ các bước để giải ngân
2880
+ nhanh nhất
2881
+ </MText>
2882
+ </View>
2253
2883
  </View>
2254
2884
  </View>
2255
- </View>
2256
- )}
2257
- </Observer>
2258
- )}
2259
- </View>
2260
- )}
2261
- </View>
2262
- ))}
2885
+ )}
2886
+ </Observer>
2887
+ )}
2888
+ </View>
2889
+ )}
2890
+ </View>
2891
+ );
2892
+ })}
2263
2893
  </View>
2264
2894
  )}
2265
2895
  </View>
@@ -2724,12 +3354,7 @@ export const Home = observer(function Home() {
2724
3354
  >
2725
3355
  <TouchableOpacity
2726
3356
  onPress={() => {
2727
- setShowModal3(false);
2728
- setTimeout(() => {
2729
- navigation.push(ScreenNames.LivenessV2, {
2730
- loan,
2731
- });
2732
- }, 300);
3357
+ acceptLoan();
2733
3358
  }}
2734
3359
  style={{
2735
3360
  borderWidth: 1,
@@ -2753,7 +3378,7 @@ export const Home = observer(function Home() {
2753
3378
 
2754
3379
  <TouchableOpacity
2755
3380
  onPress={() => {
2756
- setShowModal3(false);
3381
+ rejectLoan();
2757
3382
  }}
2758
3383
  >
2759
3384
  <MText