react-native-timacare 1.0.0 → 1.0.2

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 (165) hide show
  1. package/lib/commonjs/assets/icons/back2.svg +13 -0
  2. package/lib/commonjs/assets/icons/check1.svg +4 -0
  3. package/lib/commonjs/assets/icons/check2.svg +9 -0
  4. package/lib/commonjs/assets/icons/error.svg +6 -0
  5. package/lib/commonjs/assets/icons/index.js +1 -1
  6. package/lib/commonjs/assets/icons/index.js.flow +14 -0
  7. package/lib/commonjs/assets/icons/index.js.map +1 -1
  8. package/lib/commonjs/assets/icons/line2.svg +12 -0
  9. package/lib/commonjs/assets/icons/next.svg +6 -0
  10. package/lib/commonjs/assets/icons/step.svg +9 -0
  11. package/lib/commonjs/components/CommonSelect.js +2 -0
  12. package/lib/commonjs/components/CommonSelect.js.flow +12 -0
  13. package/lib/commonjs/components/CommonSelect.js.map +1 -0
  14. package/lib/commonjs/components/MText.js +1 -1
  15. package/lib/commonjs/components/MText.js.flow +2 -2
  16. package/lib/commonjs/components/MText.js.map +1 -1
  17. package/lib/commonjs/navigation/primary-navigator.js +1 -1
  18. package/lib/commonjs/navigation/primary-navigator.js.flow +6 -0
  19. package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
  20. package/lib/commonjs/screens/detail-loan/store.js +1 -1
  21. package/lib/commonjs/screens/detail-loan/store.js.flow +1 -1
  22. package/lib/commonjs/screens/detail-loan/store.js.map +1 -1
  23. package/lib/commonjs/screens/digital-lending/Step1.js +2 -0
  24. package/lib/commonjs/screens/digital-lending/Step1.js.flow +661 -0
  25. package/lib/commonjs/screens/digital-lending/Step1.js.map +1 -0
  26. package/lib/commonjs/screens/digital-lending/Step2.js +2 -0
  27. package/lib/commonjs/screens/digital-lending/Step2.js.flow +610 -0
  28. package/lib/commonjs/screens/digital-lending/Step2.js.map +1 -0
  29. package/lib/commonjs/screens/digital-lending/Step3.js +2 -0
  30. package/lib/commonjs/screens/digital-lending/Step3.js.flow +602 -0
  31. package/lib/commonjs/screens/digital-lending/Step3.js.map +1 -0
  32. package/lib/commonjs/screens/digital-lending/Step4.js +2 -0
  33. package/lib/commonjs/screens/digital-lending/Step4.js.flow +495 -0
  34. package/lib/commonjs/screens/digital-lending/Step4.js.map +1 -0
  35. package/lib/commonjs/screens/digital-lending/Step5.js +2 -0
  36. package/lib/commonjs/screens/digital-lending/Step5.js.flow +350 -0
  37. package/lib/commonjs/screens/digital-lending/Step5.js.map +1 -0
  38. package/lib/commonjs/screens/digital-lending/Step6.js +2 -0
  39. package/lib/commonjs/screens/digital-lending/Step6.js.flow +366 -0
  40. package/lib/commonjs/screens/digital-lending/Step6.js.map +1 -0
  41. package/lib/commonjs/screens/digital-lending/index.js +2 -0
  42. package/lib/commonjs/screens/digital-lending/index.js.flow +110 -0
  43. package/lib/commonjs/screens/digital-lending/index.js.map +1 -0
  44. package/lib/commonjs/screens/digital-lending/store.js +2 -0
  45. package/lib/commonjs/screens/digital-lending/store.js.flow +294 -0
  46. package/lib/commonjs/screens/digital-lending/store.js.map +1 -0
  47. package/lib/commonjs/screens/full-submit/accept_policy.js +1 -1
  48. package/lib/commonjs/screens/full-submit/accept_policy.js.flow +1 -1
  49. package/lib/commonjs/screens/full-submit/accept_policy.js.map +1 -1
  50. package/lib/commonjs/screens/home/index.js +1 -1
  51. package/lib/commonjs/screens/home/index.js.flow +467 -0
  52. package/lib/commonjs/screens/home/index.js.map +1 -1
  53. package/lib/commonjs/screens/notification/index.js +1 -1
  54. package/lib/commonjs/screens/notification/index.js.flow +1 -1
  55. package/lib/commonjs/screens/notification/index.js.map +1 -1
  56. package/lib/commonjs/screens/register/index.js +1 -1
  57. package/lib/commonjs/screens/register/index.js.flow +1 -1
  58. package/lib/commonjs/screens/schedule-payment/index.js +1 -1
  59. package/lib/commonjs/screens/schedule-payment/index.js.flow +1 -1
  60. package/lib/commonjs/screens/schedule-payment/index.js.map +1 -1
  61. package/lib/commonjs/services/api/api-config.js +1 -1
  62. package/lib/commonjs/services/api/api-config.js.flow +2 -2
  63. package/lib/commonjs/services/api/api-config.js.map +1 -1
  64. package/lib/commonjs/services/api/api.js +1 -1
  65. package/lib/commonjs/services/api/api.js.flow +95 -0
  66. package/lib/commonjs/services/api/api.js.map +1 -1
  67. package/lib/module/assets/icons/back2.svg +13 -0
  68. package/lib/module/assets/icons/check1.svg +4 -0
  69. package/lib/module/assets/icons/check2.svg +9 -0
  70. package/lib/module/assets/icons/error.svg +6 -0
  71. package/lib/module/assets/icons/index.js +1 -1
  72. package/lib/module/assets/icons/index.js.map +1 -1
  73. package/lib/module/assets/icons/line2.svg +12 -0
  74. package/lib/module/assets/icons/next.svg +6 -0
  75. package/lib/module/assets/icons/step.svg +9 -0
  76. package/lib/module/components/CommonSelect.js +2 -0
  77. package/lib/module/components/CommonSelect.js.map +1 -0
  78. package/lib/module/components/MText.js +1 -1
  79. package/lib/module/components/MText.js.map +1 -1
  80. package/lib/module/navigation/primary-navigator.js +1 -1
  81. package/lib/module/navigation/primary-navigator.js.map +1 -1
  82. package/lib/module/screens/detail-loan/store.js +1 -1
  83. package/lib/module/screens/detail-loan/store.js.map +1 -1
  84. package/lib/module/screens/digital-lending/Step1.js +2 -0
  85. package/lib/module/screens/digital-lending/Step1.js.map +1 -0
  86. package/lib/module/screens/digital-lending/Step2.js +2 -0
  87. package/lib/module/screens/digital-lending/Step2.js.map +1 -0
  88. package/lib/module/screens/digital-lending/Step3.js +2 -0
  89. package/lib/module/screens/digital-lending/Step3.js.map +1 -0
  90. package/lib/module/screens/digital-lending/Step4.js +2 -0
  91. package/lib/module/screens/digital-lending/Step4.js.map +1 -0
  92. package/lib/module/screens/digital-lending/Step5.js +2 -0
  93. package/lib/module/screens/digital-lending/Step5.js.map +1 -0
  94. package/lib/module/screens/digital-lending/Step6.js +2 -0
  95. package/lib/module/screens/digital-lending/Step6.js.map +1 -0
  96. package/lib/module/screens/digital-lending/index.js +2 -0
  97. package/lib/module/screens/digital-lending/index.js.map +1 -0
  98. package/lib/module/screens/digital-lending/store.js +2 -0
  99. package/lib/module/screens/digital-lending/store.js.map +1 -0
  100. package/lib/module/screens/full-submit/accept_policy.js +1 -1
  101. package/lib/module/screens/full-submit/accept_policy.js.map +1 -1
  102. package/lib/module/screens/home/index.js +1 -1
  103. package/lib/module/screens/home/index.js.map +1 -1
  104. package/lib/module/screens/notification/index.js +1 -1
  105. package/lib/module/screens/notification/index.js.map +1 -1
  106. package/lib/module/screens/register/index.js +1 -1
  107. package/lib/module/screens/schedule-payment/index.js +1 -1
  108. package/lib/module/screens/schedule-payment/index.js.map +1 -1
  109. package/lib/module/services/api/api-config.js +1 -1
  110. package/lib/module/services/api/api-config.js.map +1 -1
  111. package/lib/module/services/api/api.js +1 -1
  112. package/lib/module/services/api/api.js.map +1 -1
  113. package/lib/typescript/assets/icons/index.d.ts +8 -1
  114. package/lib/typescript/assets/icons/index.d.ts.map +1 -1
  115. package/lib/typescript/components/CommonSelect.d.ts +8 -0
  116. package/lib/typescript/components/CommonSelect.d.ts.map +1 -0
  117. package/lib/typescript/navigation/primary-navigator.d.ts +1 -0
  118. package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
  119. package/lib/typescript/screens/digital-lending/Step1.d.ts +2 -0
  120. package/lib/typescript/screens/digital-lending/Step1.d.ts.map +1 -0
  121. package/lib/typescript/screens/digital-lending/Step2.d.ts +2 -0
  122. package/lib/typescript/screens/digital-lending/Step2.d.ts.map +1 -0
  123. package/lib/typescript/screens/digital-lending/Step3.d.ts +2 -0
  124. package/lib/typescript/screens/digital-lending/Step3.d.ts.map +1 -0
  125. package/lib/typescript/screens/digital-lending/Step4.d.ts +2 -0
  126. package/lib/typescript/screens/digital-lending/Step4.d.ts.map +1 -0
  127. package/lib/typescript/screens/digital-lending/Step5.d.ts +2 -0
  128. package/lib/typescript/screens/digital-lending/Step5.d.ts.map +1 -0
  129. package/lib/typescript/screens/digital-lending/Step6.d.ts +2 -0
  130. package/lib/typescript/screens/digital-lending/Step6.d.ts.map +1 -0
  131. package/lib/typescript/screens/digital-lending/index.d.ts +2 -0
  132. package/lib/typescript/screens/digital-lending/index.d.ts.map +1 -0
  133. package/lib/typescript/screens/digital-lending/store.d.ts +35 -0
  134. package/lib/typescript/screens/digital-lending/store.d.ts.map +1 -0
  135. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  136. package/lib/typescript/services/api/api.d.ts +80 -19
  137. package/lib/typescript/services/api/api.d.ts.map +1 -1
  138. package/package.json +1 -1
  139. package/src/assets/icons/back2.svg +13 -0
  140. package/src/assets/icons/check1.svg +4 -0
  141. package/src/assets/icons/check2.svg +9 -0
  142. package/src/assets/icons/error.svg +6 -0
  143. package/src/assets/icons/index.tsx +14 -0
  144. package/src/assets/icons/line2.svg +12 -0
  145. package/src/assets/icons/next.svg +6 -0
  146. package/src/assets/icons/step.svg +9 -0
  147. package/src/components/CommonSelect.tsx +12 -0
  148. package/src/components/MText.tsx +2 -2
  149. package/src/navigation/primary-navigator.tsx +6 -0
  150. package/src/screens/detail-loan/store.tsx +1 -1
  151. package/src/screens/digital-lending/Step1.tsx +661 -0
  152. package/src/screens/digital-lending/Step2.tsx +610 -0
  153. package/src/screens/digital-lending/Step3.tsx +602 -0
  154. package/src/screens/digital-lending/Step4.tsx +495 -0
  155. package/src/screens/digital-lending/Step5.tsx +350 -0
  156. package/src/screens/digital-lending/Step6.tsx +366 -0
  157. package/src/screens/digital-lending/index.tsx +110 -0
  158. package/src/screens/digital-lending/store.tsx +294 -0
  159. package/src/screens/full-submit/accept_policy.tsx +1 -1
  160. package/src/screens/home/index.tsx +467 -0
  161. package/src/screens/notification/index.tsx +1 -1
  162. package/src/screens/register/index.tsx +1 -1
  163. package/src/screens/schedule-payment/index.tsx +1 -1
  164. package/src/services/api/api-config.ts +2 -2
  165. package/src/services/api/api.ts +95 -0
@@ -1168,6 +1168,473 @@ export const Home = observer(function Home() {
1168
1168
  </View>
1169
1169
  )}
1170
1170
  </View>
1171
+ ) : item?.typeLoan === 2 ? (
1172
+ <Observer>
1173
+ {() => (
1174
+ <View>
1175
+ <View
1176
+ style={{
1177
+ backgroundColor: '#FFFFFF',
1178
+ paddingHorizontal: 16,
1179
+ paddingTop: 16,
1180
+ borderRadius: 8,
1181
+ borderWidth: 0.5,
1182
+ borderColor: '#E0E0E0',
1183
+ }}
1184
+ >
1185
+ <View
1186
+ style={{
1187
+ flexDirection: 'row',
1188
+ alignItems: 'center',
1189
+ }}
1190
+ >
1191
+ <Contract />
1192
+ <View style={{ flex: 1, paddingLeft: 8 }}>
1193
+ <MText style={commonStyles.textNormalBold}>
1194
+ Đơn vay {item?.id}
1195
+ </MText>
1196
+ <MText style={commonStyles.textNormal}>
1197
+ Số tiền vay (VND):{' '}
1198
+ {item?.loanAmount
1199
+ ? formatMoney(item?.loanAmount)
1200
+ : 'Chưa xác định'}
1201
+ </MText>
1202
+ </View>
1203
+ </View>
1204
+ <View
1205
+ style={{
1206
+ height: 1,
1207
+ backgroundColor: '#E0E0E0',
1208
+ marginVertical: 16,
1209
+ }}
1210
+ />
1211
+ <View
1212
+ style={{
1213
+ flexDirection: 'row',
1214
+ justifyContent: 'space-between',
1215
+ }}
1216
+ >
1217
+ <MText style={commonStyles.textNormal}>
1218
+ Trạng thái
1219
+ </MText>
1220
+ <MText
1221
+ style={[
1222
+ commonStyles.textNormalBold,
1223
+ { color: '#F05123' },
1224
+ ]}
1225
+ >
1226
+ {item?.loanStatus}
1227
+ </MText>
1228
+ </View>
1229
+ {item?.isUpdateLoanReBorrow ? (
1230
+ <TouchableOpacity
1231
+ style={{ marginTop: 14 }}
1232
+ onPress={() => {
1233
+ navigation.push('DigitalLending', item);
1234
+ }}
1235
+ >
1236
+ <LinearGradient
1237
+ style={{
1238
+ height: 36,
1239
+ justifyContent: 'center',
1240
+ borderRadius: 30,
1241
+ paddingHorizontal: 20,
1242
+ }}
1243
+ colors={['#FF8E4F', '#EF592E']}
1244
+ >
1245
+ <MText style={{ color: 'white' }}>
1246
+ Hoàn thiện hồ sơ
1247
+ </MText>
1248
+ </LinearGradient>
1249
+ </TouchableOpacity>
1250
+ ) : (
1251
+ <View>
1252
+ {item?.isPipelineCIMB ? (
1253
+ <View>
1254
+ <View
1255
+ style={{
1256
+ height: 0.5,
1257
+ backgroundColor: '#E0E0E0',
1258
+ marginVertical: 16,
1259
+ }}
1260
+ />
1261
+ <View style={{ flexDirection: 'row' }}>
1262
+ {item?.isUpdateLoan ||
1263
+ item?.isUpdateInformation ? (
1264
+ <TouchableOpacity
1265
+ style={{ alignItems: 'center' }}
1266
+ onPress={() => {
1267
+ if (item?.isUpdateLoan) {
1268
+ navigation.dispatch(
1269
+ StackActions.push(
1270
+ ScreenNames.CimbSelfie,
1271
+ {
1272
+ loan: item,
1273
+ }
1274
+ )
1275
+ );
1276
+ } else {
1277
+ navigation.dispatch(
1278
+ StackActions.push(
1279
+ ScreenNames.QuickSubmit,
1280
+ {
1281
+ loan: item,
1282
+ }
1283
+ )
1284
+ );
1285
+ }
1286
+ }}
1287
+ >
1288
+ <AddInfo />
1289
+ <MText
1290
+ style={[
1291
+ commonStyles.textNormal,
1292
+ {
1293
+ fontSize: 12,
1294
+ fontWeight: '300',
1295
+ marginTop: 8,
1296
+ textAlign: 'center',
1297
+ },
1298
+ ]}
1299
+ >
1300
+ Hoàn thiện{'\n'}cung cấp thông
1301
+ tin
1302
+ </MText>
1303
+ </TouchableOpacity>
1304
+ ) : (
1305
+ <View
1306
+ style={{ alignItems: 'center' }}
1307
+ >
1308
+ <AddInfoDisable />
1309
+ <MText
1310
+ style={[
1311
+ commonStyles.textNormal,
1312
+ {
1313
+ fontSize: 12,
1314
+ fontWeight: '300',
1315
+ marginTop: 8,
1316
+ textAlign: 'center',
1317
+ },
1318
+ ]}
1319
+ >
1320
+ Hoàn thiện{'\n'}cung cấp thông
1321
+ tin
1322
+ </MText>
1323
+ </View>
1324
+ )}
1325
+ {item?.isSignContract && (
1326
+ <TouchableOpacity
1327
+ style={{
1328
+ alignItems: 'center',
1329
+ marginLeft: 20,
1330
+ }}
1331
+ onPress={() => {
1332
+ if (item?.urlSignContract) {
1333
+ navigation.dispatch(
1334
+ StackActions.push(
1335
+ ScreenNames.CIMBSign,
1336
+ {
1337
+ url: item?.urlSignContract,
1338
+ }
1339
+ )
1340
+ );
1341
+ } else {
1342
+ Alert.alert(
1343
+ 'Thông báo',
1344
+ 'Bạn chưa thể ký hợp đồng bây giờ?'
1345
+ );
1346
+ }
1347
+ }}
1348
+ >
1349
+ <IconSign2 />
1350
+ <MText
1351
+ style={[
1352
+ commonStyles.textNormal,
1353
+ {
1354
+ fontSize: 12,
1355
+ fontWeight: '300',
1356
+ marginTop: 8,
1357
+ },
1358
+ ]}
1359
+ >
1360
+ Ký hợp đồng
1361
+ </MText>
1362
+ </TouchableOpacity>
1363
+ )}
1364
+ {item?.isSignContractTima && (
1365
+ <TouchableOpacity
1366
+ style={{
1367
+ alignItems: 'center',
1368
+ marginLeft: 20,
1369
+ }}
1370
+ onPress={() => {
1371
+ navigation.dispatch(
1372
+ StackActions.push(
1373
+ ScreenNames.ViewContract,
1374
+ {
1375
+ loan: item,
1376
+ }
1377
+ )
1378
+ );
1379
+ }}
1380
+ >
1381
+ <ContractTimeIcon />
1382
+ <MText
1383
+ style={[
1384
+ commonStyles.textNormal,
1385
+ {
1386
+ fontSize: 12,
1387
+ fontWeight: '300',
1388
+ marginTop: 8,
1389
+ textAlign: 'center',
1390
+ },
1391
+ ]}
1392
+ >
1393
+ Hợp đồng{'\n'}dịch vụ
1394
+ </MText>
1395
+ </TouchableOpacity>
1396
+ )}
1397
+ {item?.paymentEvidenceUrl && (
1398
+ <TouchableOpacity
1399
+ style={{
1400
+ alignItems: 'center',
1401
+ marginLeft: 20,
1402
+ }}
1403
+ onPress={() => {
1404
+ navigation.dispatch(
1405
+ StackActions.push(
1406
+ ScreenNames.PaymentEvidence,
1407
+ {
1408
+ url: item?.paymentEvidenceUrl,
1409
+ }
1410
+ )
1411
+ );
1412
+ }}
1413
+ >
1414
+ <IconEviden />
1415
+ <MText
1416
+ style={[
1417
+ commonStyles.textNormal,
1418
+ {
1419
+ fontSize: 12,
1420
+ fontWeight: '300',
1421
+ marginTop: 8,
1422
+ textAlign: 'center',
1423
+ },
1424
+ ]}
1425
+ >
1426
+ Mục đích {'\n'}sử dụng
1427
+ </MText>
1428
+ </TouchableOpacity>
1429
+ )}
1430
+ {item?.showPaymentPlan && (
1431
+ <TouchableOpacity
1432
+ style={{
1433
+ alignItems: 'center',
1434
+ marginLeft: 20,
1435
+ }}
1436
+ onPress={() => {
1437
+ navigation.dispatch(
1438
+ StackActions.push(
1439
+ ScreenNames.SchedulePayment,
1440
+ {
1441
+ loan: item,
1442
+ }
1443
+ )
1444
+ );
1445
+ }}
1446
+ >
1447
+ <IconSchedule />
1448
+ <MText
1449
+ style={[
1450
+ commonStyles.textNormal,
1451
+ {
1452
+ fontSize: 12,
1453
+ fontWeight: '300',
1454
+ marginTop: 8,
1455
+ },
1456
+ ]}
1457
+ >
1458
+ Lịch dự kiến
1459
+ </MText>
1460
+ </TouchableOpacity>
1461
+ )}
1462
+ </View>
1463
+ </View>
1464
+ ) : (
1465
+ <View>
1466
+ <View
1467
+ style={{
1468
+ height: 0.5,
1469
+ backgroundColor: '#E0E0E0',
1470
+ marginVertical: 16,
1471
+ }}
1472
+ />
1473
+ <View style={{ flexDirection: 'row' }}>
1474
+ {!homeStore.checkEKYC[item?.id] ? (
1475
+ <TouchableOpacity
1476
+ style={{ alignItems: 'center' }}
1477
+ onPress={() => {
1478
+ navigation.dispatch(
1479
+ StackActions.push(
1480
+ ScreenNames.NationalID,
1481
+ {
1482
+ loan: item,
1483
+ reLoan: true,
1484
+ }
1485
+ )
1486
+ );
1487
+ }}
1488
+ >
1489
+ <AddInfo />
1490
+ <MText
1491
+ style={[
1492
+ commonStyles.textNormal,
1493
+ {
1494
+ fontSize: 12,
1495
+ fontWeight: '300',
1496
+ marginTop: 8,
1497
+ },
1498
+ ]}
1499
+ >
1500
+ EKYC
1501
+ </MText>
1502
+ </TouchableOpacity>
1503
+ ) : (
1504
+ <View
1505
+ style={{ alignItems: 'center' }}
1506
+ >
1507
+ <AddInfoDisable />
1508
+ <MText
1509
+ style={[
1510
+ commonStyles.textNormal,
1511
+ {
1512
+ fontSize: 12,
1513
+ fontWeight: '300',
1514
+ marginTop: 8,
1515
+ },
1516
+ ]}
1517
+ >
1518
+ EKYC
1519
+ </MText>
1520
+ </View>
1521
+ )}
1522
+
1523
+ <TouchableOpacity
1524
+ style={{
1525
+ alignItems: 'center',
1526
+ marginLeft: 20,
1527
+ }}
1528
+ onPress={() => {
1529
+ navigation.dispatch(
1530
+ StackActions.push(
1531
+ ScreenNames.Video,
1532
+ {
1533
+ loan: item,
1534
+ }
1535
+ )
1536
+ );
1537
+ }}
1538
+ >
1539
+ <IconVideo />
1540
+ <MText
1541
+ style={[
1542
+ commonStyles.textNormal,
1543
+ {
1544
+ fontSize: 12,
1545
+ fontWeight: '300',
1546
+ marginTop: 8,
1547
+ },
1548
+ ]}
1549
+ >
1550
+ Quay video
1551
+ </MText>
1552
+ </TouchableOpacity>
1553
+
1554
+ {homeStore.checkEKYC[item?.id] ? (
1555
+ <TouchableOpacity
1556
+ style={{
1557
+ alignItems: 'center',
1558
+ marginLeft: 20,
1559
+ }}
1560
+ onPress={() => {
1561
+ signLoan(item);
1562
+ }}
1563
+ >
1564
+ <IconSign2 />
1565
+ <MText
1566
+ style={[
1567
+ commonStyles.textNormal,
1568
+ {
1569
+ fontSize: 12,
1570
+ fontWeight: '300',
1571
+ marginTop: 8,
1572
+ },
1573
+ ]}
1574
+ >
1575
+ Ký HĐ
1576
+ </MText>
1577
+ </TouchableOpacity>
1578
+ ) : (
1579
+ <View
1580
+ style={{
1581
+ alignItems: 'center',
1582
+ marginLeft: 20,
1583
+ }}
1584
+ >
1585
+ <SignDisable />
1586
+ <MText
1587
+ style={[
1588
+ commonStyles.textNormal,
1589
+ {
1590
+ fontSize: 12,
1591
+ fontWeight: '300',
1592
+ marginTop: 8,
1593
+ },
1594
+ ]}
1595
+ >
1596
+ Ký HĐ
1597
+ </MText>
1598
+ </View>
1599
+ )}
1600
+ </View>
1601
+ </View>
1602
+ )}
1603
+ </View>
1604
+ )}
1605
+ <View
1606
+ style={{
1607
+ flexDirection: 'row',
1608
+ alignItems: 'center',
1609
+ backgroundColor: '#FBEFE7',
1610
+ marginHorizontal: -16,
1611
+ paddingVertical: 8,
1612
+ marginTop: 16,
1613
+ borderBottomRightRadius: 8,
1614
+ borderBottomLeftRadius: 8,
1615
+ paddingHorizontal: 16,
1616
+ }}
1617
+ >
1618
+ <Info />
1619
+ <MText
1620
+ style={[
1621
+ {
1622
+ fontWeight: '300',
1623
+ fontSize: 12,
1624
+ fontStyle: 'italic',
1625
+ color: '#333333',
1626
+ marginLeft: 8,
1627
+ },
1628
+ ]}
1629
+ >
1630
+ Thực hiện đầy đủ các bước để giải ngân nhanh
1631
+ nhất
1632
+ </MText>
1633
+ </View>
1634
+ </View>
1635
+ </View>
1636
+ )}
1637
+ </Observer>
1171
1638
  ) : (
1172
1639
  <Observer>
1173
1640
  {() => (
@@ -70,7 +70,7 @@ export const Notification = observer(function Notification() {
70
70
  />
71
71
 
72
72
  <ScrollView style={{ flex: 1, marginTop: 8 }}>
73
- {notificationStore.data.map((item, index) => (
73
+ {notificationStore.data?.map((item, index) => (
74
74
  <View
75
75
  key={index}
76
76
  style={{ marginBottom: 8, paddingHorizontal: 16 }}
@@ -182,7 +182,7 @@ export const Register = observer(function Register() {
182
182
  <View style={{ marginTop: 50 }}>
183
183
  <Formik
184
184
  initialValues={{
185
- phone: __DEV__ ? '0369865214' : '',
185
+ phone: __DEV__ ? '0982515705' : '',
186
186
  terms: true,
187
187
  }}
188
188
  onSubmit={(values) => {
@@ -91,7 +91,7 @@ export const SchedulePayment = observer(function SchedulePayment(props: any) {
91
91
  <RefreshControl refreshing={false} onRefresh={getData} />
92
92
  }
93
93
  >
94
- {data.map((item, index) => (
94
+ {data?.map((item, index) => (
95
95
  <View
96
96
  key={index}
97
97
  style={{
@@ -1,5 +1,5 @@
1
- const API_URL = 'https://apiapplos.tima.vn/'
2
- // const API_URL = 'https://apidevlos.tima.vn/'
1
+ // const API_URL = 'https://apiapplos.tima.vn/'
2
+ const API_URL = 'https://apidevlos.tima.vn/'
3
3
  export interface ApiConfig {
4
4
  url: string
5
5
  timeout: number
@@ -1650,6 +1650,24 @@ export class Api {
1650
1650
  }
1651
1651
  }
1652
1652
 
1653
+ async getNameBrand(id) {
1654
+ // make the api call
1655
+ const response: ApiResponse<any> = await this.apisauce.get(`api/v1.0/landingpage/get_name_motobike?brandId=${id}`)
1656
+ myLog(response)
1657
+ // the typical ways to die when calling an api
1658
+ if (!response.ok) {
1659
+ const problem = getGeneralApiProblem(response)
1660
+ if (problem) return problem
1661
+ }
1662
+
1663
+ // transform the data into the format we are expecting
1664
+ try {
1665
+ return { kind: "ok", data: response.data }
1666
+ } catch {
1667
+ return { kind: "bad-data" }
1668
+ }
1669
+ }
1670
+
1653
1671
  async getYearProduct(id) {
1654
1672
  // make the api call
1655
1673
  const response: ApiResponse<any> = await this.apisauce.get(`api/v1.0/landingpage/get_year_product?brandId=${id}`)
@@ -2222,4 +2240,81 @@ export class Api {
2222
2240
  return { kind: "bad-data" }
2223
2241
  }
2224
2242
  }
2243
+
2244
+ // Luồng tái vay
2245
+ async detailLoanReborrow(id) {
2246
+ // make the api call
2247
+ const response: ApiResponse<any> = await this.apisauce.get(`api/v2.0/loanbrief/detail_reborrow?loanBriefId=${id}`)
2248
+ if (!response.ok) {
2249
+ const problem = getGeneralApiProblem(response)
2250
+ if (problem) return problem
2251
+ }
2252
+
2253
+ // transform the data into the format we are expecting
2254
+ try {
2255
+ return { kind: "ok", data: response.data }
2256
+ } catch {
2257
+ return { kind: "bad-data" }
2258
+ }
2259
+ }
2260
+
2261
+ async getJobTima() {
2262
+ // make the api call
2263
+ const response: ApiResponse<any> = await this.apisauce.get(`api/v1.0/landingpage/get_job`)
2264
+ if (!response.ok) {
2265
+ const problem = getGeneralApiProblem(response)
2266
+ if (problem) return problem
2267
+ }
2268
+ // transform the data into the format we are expecting
2269
+ try {
2270
+ return { kind: "ok", data: response.data }
2271
+ } catch {
2272
+ return { kind: "bad-data" }
2273
+ }
2274
+ }
2275
+
2276
+ async getJobDescriptionTima(id) {
2277
+ // make the api call
2278
+ const response: ApiResponse<any> = await this.apisauce.get(`api/v1.0/landingpage/get_job_description?jobId=${id}`)
2279
+ if (!response.ok) {
2280
+ const problem = getGeneralApiProblem(response)
2281
+ if (problem) return problem
2282
+ }
2283
+ // transform the data into the format we are expecting
2284
+ try {
2285
+ return { kind: "ok", data: response.data }
2286
+ } catch {
2287
+ return { kind: "bad-data" }
2288
+ }
2289
+ }
2290
+
2291
+ async getBanks() {
2292
+ // make the api call
2293
+ const response: ApiResponse<any> = await this.apisauce.get(`api/v1.0/landingpage/get_bank`)
2294
+ if (!response.ok) {
2295
+ const problem = getGeneralApiProblem(response)
2296
+ if (problem) return problem
2297
+ }
2298
+ // transform the data into the format we are expecting
2299
+ try {
2300
+ return { kind: "ok", data: response.data }
2301
+ } catch {
2302
+ return { kind: "bad-data" }
2303
+ }
2304
+ }
2305
+
2306
+ async updateLoanReborrow(body) {
2307
+ // make the api call
2308
+ const response: ApiResponse<any> = await this.apisauce.post(`api/v2.0/loanbrief/init_reborrow`, body)
2309
+ if (!response.ok) {
2310
+ const problem = getGeneralApiProblem(response)
2311
+ if (problem) return problem
2312
+ }
2313
+ // transform the data into the format we are expecting
2314
+ try {
2315
+ return { kind: "ok", data: response.data }
2316
+ } catch {
2317
+ return { kind: "bad-data" }
2318
+ }
2319
+ }
2225
2320
  }