react-native-timacare 0.0.9 → 0.0.11

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 (129) hide show
  1. package/lib/commonjs/assets/icons/call_black.svg +6 -0
  2. package/lib/commonjs/assets/icons/call_red.svg +4 -0
  3. package/lib/commonjs/assets/icons/index.js +1 -1
  4. package/lib/commonjs/assets/icons/index.js.flow +6 -0
  5. package/lib/commonjs/assets/icons/index.js.map +1 -1
  6. package/lib/commonjs/assets/icons/tick2.svg +6 -0
  7. package/lib/commonjs/assets/icons/tima3.svg +34 -6
  8. package/lib/commonjs/screens/camera/index.js +1 -1
  9. package/lib/commonjs/screens/camera/index.js.flow +6 -14
  10. package/lib/commonjs/screens/camera/index.js.map +1 -1
  11. package/lib/commonjs/screens/full-submit/accept_policy.js +1 -1
  12. package/lib/commonjs/screens/full-submit/accept_policy.js.flow +416 -174
  13. package/lib/commonjs/screens/full-submit/accept_policy.js.map +1 -1
  14. package/lib/commonjs/screens/full-submit/store.js +1 -1
  15. package/lib/commonjs/screens/full-submit/store.js.flow +2 -2
  16. package/lib/commonjs/screens/full-submit/store.js.map +1 -1
  17. package/lib/commonjs/screens/home/CIMBxTima.js +1 -1
  18. package/lib/commonjs/screens/home/CIMBxTima.js.flow +27 -11
  19. package/lib/commonjs/screens/home/CIMBxTima.js.map +1 -1
  20. package/lib/commonjs/screens/home/Store.js +1 -1
  21. package/lib/commonjs/screens/home/Store.js.flow +1 -1
  22. package/lib/commonjs/screens/home/Store.js.map +1 -1
  23. package/lib/commonjs/screens/home/accept.png +0 -0
  24. package/lib/commonjs/screens/home/index.js +1 -1
  25. package/lib/commonjs/screens/home/index.js.flow +1044 -581
  26. package/lib/commonjs/screens/home/index.js.map +1 -1
  27. package/lib/commonjs/screens/home/reject.png +0 -0
  28. package/lib/commonjs/screens/liveness/index.js +1 -1
  29. package/lib/commonjs/screens/liveness/index.js.flow +194 -176
  30. package/lib/commonjs/screens/liveness/index.js.map +1 -1
  31. package/lib/commonjs/screens/payment-evidence/Guideline.js +1 -1
  32. package/lib/commonjs/screens/payment-evidence/Guideline.js.flow +28 -3
  33. package/lib/commonjs/screens/payment-evidence/Guideline.js.map +1 -1
  34. package/lib/commonjs/screens/payment-evidence/ModalGuideline.js +1 -1
  35. package/lib/commonjs/screens/payment-evidence/ModalGuideline.js.flow +12 -3
  36. package/lib/commonjs/screens/payment-evidence/ModalGuideline.js.map +1 -1
  37. package/lib/commonjs/screens/payment-evidence/index.js +1 -1
  38. package/lib/commonjs/screens/payment-evidence/index.js.flow +20 -6
  39. package/lib/commonjs/screens/payment-evidence/index.js.map +1 -1
  40. package/lib/commonjs/screens/register/index.js +1 -1
  41. package/lib/commonjs/screens/register/index.js.flow +1 -1
  42. package/lib/commonjs/screens/selfie/index.js +1 -1
  43. package/lib/commonjs/screens/selfie/index.js.flow +1 -25
  44. package/lib/commonjs/screens/selfie/index.js.map +1 -1
  45. package/lib/commonjs/screens/terms/QuickTerm.js +1 -1
  46. package/lib/commonjs/screens/terms/QuickTerm.js.flow +4 -0
  47. package/lib/commonjs/screens/terms/QuickTerm.js.map +1 -1
  48. package/lib/commonjs/services/api/api-config.js +1 -1
  49. package/lib/commonjs/services/api/api-config.js.flow +1 -1
  50. package/lib/commonjs/services/api/api-config.js.map +1 -1
  51. package/lib/commonjs/services/api/api.js +1 -1
  52. package/lib/commonjs/services/api/api.js.flow +38 -2
  53. package/lib/commonjs/services/api/api.js.map +1 -1
  54. package/lib/module/assets/icons/call_black.svg +6 -0
  55. package/lib/module/assets/icons/call_red.svg +4 -0
  56. package/lib/module/assets/icons/index.js +1 -1
  57. package/lib/module/assets/icons/index.js.map +1 -1
  58. package/lib/module/assets/icons/tick2.svg +6 -0
  59. package/lib/module/assets/icons/tima3.svg +34 -6
  60. package/lib/module/screens/camera/index.js +1 -1
  61. package/lib/module/screens/camera/index.js.map +1 -1
  62. package/lib/module/screens/full-submit/accept_policy.js +1 -1
  63. package/lib/module/screens/full-submit/accept_policy.js.map +1 -1
  64. package/lib/module/screens/full-submit/store.js +1 -1
  65. package/lib/module/screens/full-submit/store.js.map +1 -1
  66. package/lib/module/screens/home/CIMBxTima.js +1 -1
  67. package/lib/module/screens/home/CIMBxTima.js.map +1 -1
  68. package/lib/module/screens/home/Store.js +1 -1
  69. package/lib/module/screens/home/Store.js.map +1 -1
  70. package/lib/module/screens/home/accept.png +0 -0
  71. package/lib/module/screens/home/index.js +1 -1
  72. package/lib/module/screens/home/index.js.map +1 -1
  73. package/lib/module/screens/home/reject.png +0 -0
  74. package/lib/module/screens/liveness/index.js +1 -1
  75. package/lib/module/screens/liveness/index.js.map +1 -1
  76. package/lib/module/screens/payment-evidence/Guideline.js +1 -1
  77. package/lib/module/screens/payment-evidence/Guideline.js.map +1 -1
  78. package/lib/module/screens/payment-evidence/ModalGuideline.js +1 -1
  79. package/lib/module/screens/payment-evidence/ModalGuideline.js.map +1 -1
  80. package/lib/module/screens/payment-evidence/index.js +1 -1
  81. package/lib/module/screens/payment-evidence/index.js.map +1 -1
  82. package/lib/module/screens/register/index.js +1 -1
  83. package/lib/module/screens/selfie/index.js +1 -1
  84. package/lib/module/screens/selfie/index.js.map +1 -1
  85. package/lib/module/screens/terms/QuickTerm.js +1 -1
  86. package/lib/module/screens/terms/QuickTerm.js.map +1 -1
  87. package/lib/module/services/api/api-config.js +1 -1
  88. package/lib/module/services/api/api-config.js.map +1 -1
  89. package/lib/module/services/api/api.js +1 -1
  90. package/lib/module/services/api/api.js.map +1 -1
  91. package/lib/typescript/assets/icons/index.d.ts +4 -1
  92. package/lib/typescript/assets/icons/index.d.ts.map +1 -1
  93. package/lib/typescript/screens/camera/index.d.ts.map +1 -1
  94. package/lib/typescript/screens/full-submit/accept_policy.d.ts.map +1 -1
  95. package/lib/typescript/screens/full-submit/store.d.ts +1 -1
  96. package/lib/typescript/screens/full-submit/store.d.ts.map +1 -1
  97. package/lib/typescript/screens/home/CIMBxTima.d.ts.map +1 -1
  98. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  99. package/lib/typescript/screens/liveness/index.d.ts.map +1 -1
  100. package/lib/typescript/screens/payment-evidence/Guideline.d.ts.map +1 -1
  101. package/lib/typescript/screens/payment-evidence/ModalGuideline.d.ts.map +1 -1
  102. package/lib/typescript/screens/payment-evidence/index.d.ts.map +1 -1
  103. package/lib/typescript/screens/selfie/index.d.ts.map +1 -1
  104. package/lib/typescript/screens/terms/QuickTerm.d.ts.map +1 -1
  105. package/lib/typescript/services/api/api.d.ts +33 -1
  106. package/lib/typescript/services/api/api.d.ts.map +1 -1
  107. package/package.json +2 -1
  108. package/src/assets/icons/call_black.svg +6 -0
  109. package/src/assets/icons/call_red.svg +4 -0
  110. package/src/assets/icons/index.tsx +6 -0
  111. package/src/assets/icons/tick2.svg +6 -0
  112. package/src/assets/icons/tima3.svg +34 -6
  113. package/src/screens/camera/index.tsx +6 -14
  114. package/src/screens/full-submit/accept_policy.tsx +416 -174
  115. package/src/screens/full-submit/store.tsx +2 -2
  116. package/src/screens/home/CIMBxTima.tsx +27 -11
  117. package/src/screens/home/Store.tsx +1 -1
  118. package/src/screens/home/accept.png +0 -0
  119. package/src/screens/home/index.tsx +1044 -581
  120. package/src/screens/home/reject.png +0 -0
  121. package/src/screens/liveness/index.tsx +194 -176
  122. package/src/screens/payment-evidence/Guideline.tsx +28 -3
  123. package/src/screens/payment-evidence/ModalGuideline.tsx +12 -3
  124. package/src/screens/payment-evidence/index.tsx +20 -6
  125. package/src/screens/register/index.tsx +1 -1
  126. package/src/screens/selfie/index.tsx +1 -25
  127. package/src/screens/terms/QuickTerm.tsx +4 -0
  128. package/src/services/api/api-config.ts +1 -1
  129. package/src/services/api/api.ts +38 -2
@@ -1,11 +1,13 @@
1
1
  //@ts-nocheck
2
- import React, { useEffect } from 'react';
2
+ import React, { useEffect, useState } from 'react';
3
3
  import { observer } from 'mobx-react-lite';
4
- import { useNavigation, StackActions } from '@react-navigation/native';
4
+ import { CommonActions, useNavigation } from '@react-navigation/native';
5
5
  import {
6
+ Alert,
6
7
  Linking,
7
8
  SafeAreaView,
8
9
  ScrollView,
10
+ StyleSheet,
9
11
  TouchableOpacity,
10
12
  View,
11
13
  } from 'react-native';
@@ -15,7 +17,9 @@ import {
15
17
  Call,
16
18
  CheckBox,
17
19
  CheckBoxActive,
20
+ CIMBBank,
18
21
  CloseIcon,
22
+ Tick2,
19
23
  Tima3,
20
24
  } from '../../assets/icons';
21
25
  import { color } from '../../theme';
@@ -25,228 +29,466 @@ import { commonStyles } from '../CommonStyles';
25
29
  import * as yup from 'yup';
26
30
  import FullSubmitStore from './store';
27
31
  import Loading from '../../components/Loading';
32
+ import { ScreenNames } from '../../navigation';
33
+ import { formatDDMMYYY, formatMoney } from '../../utils';
34
+ import { save } from '../../utils/storage';
28
35
 
29
36
  export const AcceptPolicy = observer(function AcceptPolicy(props: any) {
30
37
  const navigation = useNavigation();
38
+ const [BuyInsuranceOfCustomer, setBuyInsuranceOfCustomer] = useState(true);
39
+ const [BuyInsuranceOfProperty, setBuyInsuranceOfProperty] = useState(true);
40
+ const [ruleCIMB, setRuleCIMB] = useState(true);
41
+ const [ruleTima, setRuleTima] = useState(true);
42
+
31
43
  const loan = props?.route?.params?.loan;
32
44
 
33
45
  useEffect(() => {
34
- FullSubmitStore.getInsurance();
46
+ FullSubmitStore.getInsurance(
47
+ props?.route?.params?.isCimb ? { isCimb: true } : { isCimb: false }
48
+ );
35
49
  }, []);
36
50
 
37
- const onSubmit = (values: any) => {
38
- const body = {
39
- FeeInsuranceOfCustomer:
40
- FullSubmitStore.dataInsurance?.feeInsuranceOfCustomer,
41
- BuyInsuranceOfCustomer: values.BuyInsuranceOfCustomer,
42
- BuyInsuranceOfProperty: values.BuyInsuranceOfProperty,
43
- FeeInsuranceOfProperty:
44
- FullSubmitStore.dataInsurance?.feeInsuranceOfProperty,
45
- };
46
- FullSubmitStore.confirmInsurance(body, () => {
47
- navigation.dispatch(
48
- StackActions.push(ScreenNames.FullSubmit, {
49
- loan: loan,
50
- })
51
- );
52
- });
51
+ const onSubmit = () => {
52
+ if (BuyInsuranceOfCustomer === false) {
53
+ Alert.alert('Thông báo', 'Bảo hiểm sức khoẻ là bắt buộc', [
54
+ {
55
+ text: 'Đồng ý',
56
+ onPress: () => {
57
+ setBuyInsuranceOfCustomer(true);
58
+ },
59
+ },
60
+ ]);
61
+ return;
62
+ }
63
+ if (props?.route?.params?.isCimb) {
64
+ if (!ruleCIMB || !ruleTima) {
65
+ Alert.alert('Thông báo', 'Vui lòng đọc và tích chọn điều khoản');
66
+ return;
67
+ }
68
+ const body = {
69
+ FeeInsuranceOfCustomer:
70
+ FullSubmitStore.dataInsurance?.feeInsuranceOfCustomer,
71
+ BuyInsuranceOfCustomer: BuyInsuranceOfCustomer,
72
+ BuyInsuranceOfProperty: BuyInsuranceOfProperty,
73
+ FeeInsuranceOfProperty:
74
+ FullSubmitStore.dataInsurance?.feeInsuranceOfProperty,
75
+ };
76
+ FullSubmitStore.confirmInsurance(body, () => {
77
+ const key = `SHOW_${loan?.id}`;
78
+ save(key, true);
79
+ navigation.dispatch(
80
+ CommonActions.reset({
81
+ index: 1,
82
+ routes: [{ name: ScreenNames.Main }],
83
+ })
84
+ );
85
+ });
86
+ } else {
87
+ if (!ruleTima) {
88
+ Alert.alert('Thông báo', 'Vui lòng đọc và tích chọn điều khoản');
89
+ return;
90
+ }
91
+ const body = {
92
+ FeeInsuranceOfCustomer:
93
+ FullSubmitStore.dataInsurance?.feeInsuranceOfCustomer,
94
+ BuyInsuranceOfCustomer: BuyInsuranceOfCustomer,
95
+ BuyInsuranceOfProperty: BuyInsuranceOfProperty,
96
+ FeeInsuranceOfProperty:
97
+ FullSubmitStore.dataInsurance?.feeInsuranceOfProperty,
98
+ };
99
+ FullSubmitStore.confirmInsurance(body, () => {
100
+ const key = `SHOW_${loan?.id}`;
101
+ save(key, true);
102
+ navigation.dispatch(
103
+ CommonActions.reset({
104
+ index: 1,
105
+ routes: [{ name: ScreenNames.Main }],
106
+ })
107
+ );
108
+ });
109
+ }
53
110
  };
111
+
54
112
  return (
55
113
  <View style={{ flex: 1 }}>
56
114
  <LinearGradient colors={['#FF8E4F', '#EF592E']}>
57
115
  <SafeAreaView
58
116
  style={{
59
117
  flexDirection: 'row',
60
- justifyContent: 'space-between',
61
- paddingHorizontal: 16,
62
- paddingVertical: 16,
118
+ paddingVertical: 10,
63
119
  alignItems: 'center',
64
120
  }}
65
121
  >
66
- <MText
67
- style={{
68
- fontWeight: 'bold',
69
- color: 'white',
70
- fontSize: 16,
71
- }}
72
- >
73
- Vay nhanh 24/7
122
+ <Tima3 />
123
+ <View>
124
+ <MText
125
+ style={[
126
+ commonStyles.textNormalBold,
127
+ {
128
+ fontSize: 16,
129
+ color: 'white',
130
+ },
131
+ ]}
132
+ >
133
+ Kết quả đăng ký
134
+ </MText>
135
+ <MText style={{ fontSize: 12, color: 'white' }}>
136
+ Bạn vui lòng đọc kỹ và xác nhận các mục dưới đây!
137
+ </MText>
138
+ </View>
139
+ </SafeAreaView>
140
+ </LinearGradient>
141
+ <ScrollView style={{ padding: 16, flex: 1 }}>
142
+ <View style={styles.box}>
143
+ <View style={styles.row}>
144
+ <MText style={{ color: '#828282', fontSize: 12 }}>Họ và tên</MText>
145
+ <MText style={{ fontWeight: 'bold', fontSize: 12 }}>
146
+ {FullSubmitStore.dataInsurance?.fullName}
147
+ </MText>
148
+ </View>
149
+ <View style={[styles.row, { marginTop: 8 }]}>
150
+ <MText style={{ color: '#828282', fontSize: 12 }}>Ngày sinh</MText>
151
+ <MText style={{ fontWeight: 'bold', fontSize: 12 }}>
152
+ {formatDDMMYYY(FullSubmitStore.dataInsurance?.dob)}
153
+ </MText>
154
+ </View>
155
+ <View style={[styles.row, { marginTop: 8 }]}>
156
+ <MText style={{ color: '#828282', fontSize: 12 }}>
157
+ Số CMND/ CCCD
158
+ </MText>
159
+ <MText style={{ fontWeight: 'bold', fontSize: 12 }}>
160
+ {FullSubmitStore.dataInsurance?.nationalId}
161
+ </MText>
162
+ </View>
163
+ <View style={[styles.row, { marginTop: 8 }]}>
164
+ <MText style={{ color: '#828282', fontSize: 12 }}>
165
+ Ngày cấp CMND/ CCCD
166
+ </MText>
167
+ <MText style={{ fontWeight: 'bold', fontSize: 12 }}>
168
+ {formatDDMMYYY(FullSubmitStore.dataInsurance?.dateNational)}
169
+ </MText>
170
+ </View>
171
+ </View>
172
+ <View style={[styles.box, { marginTop: 8 }]}>
173
+ <View style={styles.row}>
174
+ <MText style={{ color: '#828282', fontSize: 12 }}>
175
+ Tổng khoản vay
176
+ </MText>
177
+ <MText
178
+ style={{ fontWeight: 'bold', fontSize: 12, color: color.primary }}
179
+ >
180
+ {formatMoney(FullSubmitStore.dataInsurance?.loanAmount)}đ
181
+ </MText>
182
+ </View>
183
+ <View style={[styles.row, { marginTop: 8 }]}>
184
+ <MText style={{ color: '#828282', fontSize: 12 }}>
185
+ Thời hạn vay
186
+ </MText>
187
+ <MText style={{ fontWeight: 'bold', fontSize: 12 }}>
188
+ {FullSubmitStore.dataInsurance?.loanTime} tháng
189
+ </MText>
190
+ </View>
191
+ <View style={[styles.row, { marginTop: 8 }]}>
192
+ <MText style={{ color: '#828282', fontSize: 12 }}>Lãi suất</MText>
193
+ <MText style={{ fontWeight: 'bold', fontSize: 12 }}>
194
+ {FullSubmitStore.dataInsurance?.rate}%/ năm
195
+ </MText>
196
+ </View>
197
+ <View style={[styles.row, { marginTop: 8 }]}>
198
+ <MText style={{ color: '#828282', fontSize: 12 }}>
199
+ Thanh toán hàng tháng (dự kiến)
200
+ </MText>
201
+ <MText style={{ fontWeight: 'bold', fontSize: 12 }}></MText>
202
+ </View>
203
+ </View>
204
+ <View style={[styles.box, { marginTop: 8 }]}>
205
+ <MText style={{ color: color.primary, fontWeight: 'bold' }}>
206
+ Tài khoản người nhận
207
+ </MText>
208
+ <View style={[styles.row, { marginTop: 8 }]}>
209
+ <MText style={{ color: '#828282', fontSize: 12 }}>Ngân hàng</MText>
210
+ <MText style={{ fontWeight: 'bold', fontSize: 12 }}>
211
+ {FullSubmitStore.dataInsurance?.bankName}
212
+ </MText>
213
+ </View>
214
+ <View style={[styles.row, { marginTop: 8 }]}>
215
+ <MText style={{ color: '#828282', fontSize: 12 }}>
216
+ Tên tài khoản
217
+ </MText>
218
+ <MText style={{ fontWeight: 'bold', fontSize: 12 }}>
219
+ {FullSubmitStore.dataInsurance?.bankAccountName}
220
+ </MText>
221
+ </View>
222
+ <View style={[styles.row, { marginTop: 8 }]}>
223
+ <MText style={{ color: '#828282', fontSize: 12 }}>
224
+ Số tài khoản
225
+ </MText>
226
+ <MText style={{ fontWeight: 'bold', fontSize: 12 }}>
227
+ {FullSubmitStore.dataInsurance?.bankAccountNumber}
228
+ </MText>
229
+ </View>
230
+ <View style={[styles.row, { marginTop: 8 }]}>
231
+ <MText style={{ color: '#828282', fontSize: 12 }}>
232
+ Số tiền thực nhận (Trừ phí)
233
+ </MText>
234
+ <MText
235
+ style={{ fontWeight: 'bold', fontSize: 12, color: color.primary }}
236
+ >
237
+ {!BuyInsuranceOfCustomer && !BuyInsuranceOfProperty
238
+ ? formatMoney(FullSubmitStore.dataInsurance?.loanAmount)
239
+ : !BuyInsuranceOfCustomer && BuyInsuranceOfProperty
240
+ ? formatMoney(
241
+ FullSubmitStore.dataInsurance?.loanAmount -
242
+ FullSubmitStore.dataInsurance?.feeInsuranceOfProperty
243
+ )
244
+ : BuyInsuranceOfCustomer && !BuyInsuranceOfProperty
245
+ ? formatMoney(
246
+ FullSubmitStore.dataInsurance?.loanAmount -
247
+ FullSubmitStore.dataInsurance?.feeInsuranceOfCustomer
248
+ )
249
+ : BuyInsuranceOfCustomer && BuyInsuranceOfProperty
250
+ ? formatMoney(
251
+ FullSubmitStore.dataInsurance?.loanAmount -
252
+ FullSubmitStore.dataInsurance?.feeInsuranceOfCustomer -
253
+ FullSubmitStore.dataInsurance?.feeInsuranceOfProperty
254
+ )
255
+ : ''}
256
+ đ
257
+ </MText>
258
+ </View>
259
+ </View>
260
+ <View style={[styles.box, { marginTop: 8 }]}>
261
+ <MText style={{ color: color.primary, fontWeight: 'bold' }}>
262
+ Phí khác
74
263
  </MText>
75
264
  <View
76
265
  style={{
266
+ marginTop: 8,
77
267
  flexDirection: 'row',
78
- borderWidth: 1,
79
- borderColor: 'white',
80
- borderRadius: 30,
81
- paddingVertical: 8,
268
+ justifyContent: 'space-between',
82
269
  }}
83
270
  >
84
271
  <TouchableOpacity
85
- style={{ paddingHorizontal: 10 }}
86
- // onPress={() => {
87
- // Linking.openURL()
88
- // }}
89
- >
90
- <Call />
91
- </TouchableOpacity>
92
- <View style={{ width: 1, backgroundColor: 'white' }} />
93
- <TouchableOpacity
94
- style={{ paddingHorizontal: 10 }}
272
+ style={{
273
+ flexDirection: 'row',
274
+ alignItems: 'center',
275
+ }}
95
276
  onPress={() => {
96
- navigation.pop();
277
+ setBuyInsuranceOfCustomer(!BuyInsuranceOfCustomer);
97
278
  }}
98
279
  >
99
- <CloseIcon />
280
+ {BuyInsuranceOfCustomer ? <CheckBoxActive /> : <CheckBox />}
281
+
282
+ <MText style={{ color: '#828282', marginLeft: 5, fontSize: 12 }}>
283
+ Phí BH Sức khoẻ
284
+ </MText>
100
285
  </TouchableOpacity>
286
+ <MText style={{ fontSize: 12, fontWeight: 'bold' }}>
287
+ {formatMoney(
288
+ FullSubmitStore.dataInsurance?.feeInsuranceOfCustomer
289
+ )}
290
+ đ
291
+ </MText>
101
292
  </View>
102
- </SafeAreaView>
103
- </LinearGradient>
104
- <View
105
- style={{
106
- backgroundColor: 'white',
107
- paddingHorizontal: 16,
108
- paddingVertical: 16,
109
- flexDirection: 'row',
110
- alignItems: 'center',
111
- }}
112
- >
113
- <View>
114
- <Tima3 />
115
- </View>
116
- <View style={{ paddingLeft: 16 }}>
117
- <MText
293
+ <View
118
294
  style={{
119
- fontSize: 16,
120
- fontWeight: 'bold',
121
- color: color.primary,
295
+ marginTop: 8,
296
+ flexDirection: 'row',
297
+ justifyContent: 'space-between',
122
298
  }}
123
299
  >
124
- Đồng ý với...
125
- </MText>
126
- <MText
300
+ <TouchableOpacity
301
+ style={{
302
+ flexDirection: 'row',
303
+ alignItems: 'center',
304
+ }}
305
+ onPress={() => {
306
+ setBuyInsuranceOfProperty(!BuyInsuranceOfProperty);
307
+ }}
308
+ >
309
+ {BuyInsuranceOfProperty ? <CheckBoxActive /> : <CheckBox />}
310
+ <MText style={{ color: '#828282', marginLeft: 5, fontSize: 12 }}>
311
+ Phí BH vật chất
312
+ </MText>
313
+ </TouchableOpacity>
314
+ <MText style={{ fontSize: 12, fontWeight: 'bold' }}>
315
+ {formatMoney(
316
+ FullSubmitStore.dataInsurance?.feeInsuranceOfProperty
317
+ )}
318
+ đ
319
+ </MText>
320
+ </View>
321
+ <View
127
322
  style={{
128
- fontSize: 12,
129
- color: '#4F4F4F',
323
+ height: 2,
324
+ backgroundColor: '#BDBDBD',
325
+ marginVertical: 8,
130
326
  }}
131
- >
132
- Bạn vui lòng đọc kỹ và xác nhận các mục dưới đây!
133
- </MText>
134
- </View>
135
- </View>
136
- <Formik
137
- onSubmit={onSubmit}
138
- initialValues={{
139
- check: false,
140
- BuyInsuranceOfCustomer: false,
141
- BuyInsuranceOfProperty: false,
142
- }}
143
- validationSchema={yup.object().shape({
144
- check: yup.bool().oneOf([true], ''),
145
- BuyInsuranceOfCustomer: yup.bool().oneOf([true], ''),
146
- })}
147
- >
148
- {({ values, isValid, setFieldValue, errors, handleSubmit }) => (
149
- <View style={{ flex: 1, paddingHorizontal: 16 }}>
150
- <ScrollView style={{ flex: 1 }}>
151
- <View
152
- style={{
153
- flexDirection: 'row',
154
- marginTop: 8,
155
- alignItems: 'center',
156
- }}
157
- >
158
- <TouchableOpacity
159
- onPress={() => {
160
- setFieldValue('check', !values.check);
327
+ />
328
+ <View>
329
+ <View style={{ flexDirection: 'row', alignItems: 'center' }}>
330
+ <Tick2 />
331
+ <MText style={{ color: '#828282', fontSize: 10 }}>
332
+ Quyền lợi
333
+ </MText>
334
+ <View>
335
+ <MText
336
+ style={{
337
+ color: '#828282',
338
+ // color: '#2F80ED',
339
+ fontSize: 10,
340
+ // textDecorationLine: 'underline',
161
341
  }}
162
342
  >
163
- {!values.check ? <CheckBox /> : <CheckBoxActive />}
164
- </TouchableOpacity>
165
-
166
- <MText style={{ marginLeft: 8 }}>
167
- Thực hiện vay qua ngân hàng CIMB
343
+ {' '}
344
+ bảo hiểm sức khoẻ{' '}
168
345
  </MText>
169
346
  </View>
170
- <View
171
- style={{
172
- flexDirection: 'row',
173
- marginTop: 8,
174
- }}
175
- >
176
- <TouchableOpacity
177
- onPress={() => {
178
- setFieldValue(
179
- 'BuyInsuranceOfCustomer',
180
- !values.BuyInsuranceOfCustomer
181
- );
347
+ <MText style={{ color: '#828282', fontSize: 10 }}>
348
+ lên tới 100% từ Bảo Minh
349
+ </MText>
350
+ </View>
351
+ <MText style={{ color: '#828282', fontSize: 10 }}>
352
+ (Tai nạn, thương tật,...)
353
+ </MText>
354
+ <View
355
+ style={{
356
+ flexDirection: 'row',
357
+ alignItems: 'center',
358
+ marginTop: 5,
359
+ }}
360
+ >
361
+ <Tick2 />
362
+ <MText style={{ color: '#828282', fontSize: 10 }}>
363
+ Quyền lợi
364
+ </MText>
365
+ <View>
366
+ <MText
367
+ style={{
368
+ color: '#828282',
369
+ // color: '#2F80ED',
370
+ fontSize: 10,
371
+ // textDecorationLine: 'underline',
182
372
  }}
183
373
  >
184
- {!values.BuyInsuranceOfCustomer ? (
185
- <CheckBox />
186
- ) : (
187
- <CheckBoxActive />
188
- )}
189
- </TouchableOpacity>
190
-
191
- <MText style={{ marginLeft: 8 }}>
192
- Tham gia bảo hiểm sức khỏe với mức phí tạm{'\n'} tính là{' '}
193
- {FullSubmitStore.dataInsurance?.feeInsuranceOfCustomer} VNĐ
374
+ {' '}
375
+ bảo hiểm vật chất{' '}
194
376
  </MText>
195
377
  </View>
196
- <View
197
- style={{
198
- flexDirection: 'row',
199
- marginTop: 8,
200
- }}
201
- >
378
+ <MText style={{ color: '#828282', fontSize: 10 }}>
379
+ 100% từ Bảo Minh
380
+ </MText>
381
+ </View>
382
+ </View>
383
+ </View>
384
+ <View style={{ marginTop: 16 }}>
385
+ <MText style={{ fontWeight: 'bold' }}>Điều kiện và điều khoản:</MText>
386
+ {props?.route?.params?.isCimb ? (
387
+ <View style={{ flexDirection: 'row', marginTop: 8 }}>
388
+ <TouchableOpacity onPress={() => setRuleCIMB(!ruleCIMB)}>
389
+ {ruleCIMB ? <CheckBoxActive /> : <CheckBox />}
390
+ </TouchableOpacity>
391
+ <View style={{ marginLeft: 5 }}>
392
+ <View style={{ flexDirection: 'row' }}>
393
+ <MText style={{ fontSize: 12 }}>Tôi chấp nhận </MText>
394
+ <TouchableOpacity
395
+ onPress={() => {
396
+ navigation.push(ScreenNames.QuickTerm, {
397
+ fullSubmit: true,
398
+ });
399
+ }}
400
+ >
401
+ <MText
402
+ style={{
403
+ color: '#2F80ED',
404
+ fontSize: 12,
405
+ textDecorationLine: 'underline',
406
+ }}
407
+ >
408
+ điều kiện và điều khoản của hợp đồng với CIMB
409
+ </MText>
410
+ </TouchableOpacity>
411
+ </View>
412
+ </View>
413
+ </View>
414
+ ) : (
415
+ <View />
416
+ )}
417
+ <View style={{ flexDirection: 'row', marginTop: 8 }}>
418
+ <TouchableOpacity onPress={() => setRuleTima(!ruleTima)}>
419
+ {ruleTima ? <CheckBoxActive /> : <CheckBox />}
420
+ </TouchableOpacity>
421
+ <View style={{ marginLeft: 5 }}>
422
+ <View style={{ flexDirection: 'row' }}>
423
+ <MText style={{ fontSize: 12 }}>Tôi đã hiểu và xác nhận </MText>
202
424
  <TouchableOpacity
203
425
  onPress={() => {
204
- setFieldValue(
205
- 'BuyInsuranceOfProperty',
206
- !values.BuyInsuranceOfProperty
207
- );
426
+ Linking.openURL('https://tima.vn/tracuu');
208
427
  }}
209
428
  >
210
- {!values.BuyInsuranceOfProperty ? (
211
- <CheckBox />
212
- ) : (
213
- <CheckBoxActive />
214
- )}
429
+ <MText
430
+ style={{
431
+ color: '#2F80ED',
432
+ fontSize: 12,
433
+ textDecorationLine: 'underline',
434
+ }}
435
+ >
436
+ bảng tính lãi phí
437
+ </MText>
215
438
  </TouchableOpacity>
216
- <MText style={{ marginLeft: 8 }}>
217
- Tham gia bảo hiểm vật chất với mức phí tạm{'\n'} tính là{' '}
218
- {FullSubmitStore.dataInsurance?.feeInsuranceOfProperty} VNĐ
219
- </MText>
439
+ <MText style={{ fontSize: 12 }}> đúng với sản</MText>
220
440
  </View>
221
- </ScrollView>
222
- <MButton
223
- disabled={!isValid}
224
- style={{ marginBottom: 20 }}
225
- onPress={handleSubmit}
226
- >
227
- <LinearGradient
228
- colors={
229
- isValid ? ['#FF7A00', '#EF4123'] : ['#BDBDBD', '#BDBDBD']
230
- }
231
- style={[
232
- commonStyles.alignCenter,
233
- commonStyles.justifyCenter,
234
- {
235
- height: 40,
236
- borderRadius: 30,
237
- marginLeft: 8,
238
- },
239
- ]}
240
- >
241
- <MText style={[commonStyles.textNormal, { color: 'white' }]}>
242
- Tiếp tục
243
- </MText>
244
- </LinearGradient>
245
- </MButton>
441
+ <MText style={{ fontSize: 12 }}>phẩm do Tima cung cấp</MText>
442
+ </View>
246
443
  </View>
247
- )}
248
- </Formik>
249
- <Loading isLoading={FullSubmitStore.loadingInsurance} />
444
+ </View>
445
+ <MButton onPress={() => onSubmit()}>
446
+ <LinearGradient
447
+ colors={['#FF7A00', '#EF4123']}
448
+ style={[
449
+ commonStyles.alignCenter,
450
+ commonStyles.justifyCenter,
451
+ {
452
+ height: 40,
453
+ borderRadius: 30,
454
+ marginTop: 20,
455
+ },
456
+ ]}
457
+ >
458
+ <MText style={[commonStyles.textNormalBold, { color: 'white' }]}>
459
+ Hoàn thành
460
+ </MText>
461
+ </LinearGradient>
462
+ </MButton>
463
+ <View
464
+ style={{
465
+ marginBottom: 50,
466
+ marginTop: 8,
467
+ flexDirection: 'row',
468
+ justifyContent: 'center',
469
+ }}
470
+ >
471
+ <MText style={{ fontSize: 12, color: '#333333' }}>
472
+ Cung cấp bởi{' '}
473
+ </MText>
474
+ <CIMBBank />
475
+ </View>
476
+ </ScrollView>
477
+ {/* <Loading isLoading={FullSubmitStore.loadingInsurance} /> */}
250
478
  </View>
251
479
  );
252
480
  });
481
+ const styles = StyleSheet.create({
482
+ row: {
483
+ flexDirection: 'row',
484
+ justifyContent: 'space-between',
485
+ alignItems: 'center',
486
+ },
487
+ box: {
488
+ backgroundColor: 'white',
489
+ borderRadius: 8,
490
+ padding: 16,
491
+ borderLeftWidth: 2,
492
+ borderLeftColor: color.primary,
493
+ },
494
+ });