react-native-timacare 1.0.1 → 1.0.3

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 (144) 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 +16 -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/assets/icons/update.svg +5 -0
  12. package/lib/commonjs/components/CommonSelect.js +2 -0
  13. package/lib/commonjs/components/CommonSelect.js.flow +12 -0
  14. package/lib/commonjs/components/CommonSelect.js.map +1 -0
  15. package/lib/commonjs/components/MText.js +1 -1
  16. package/lib/commonjs/components/MText.js.flow +2 -2
  17. package/lib/commonjs/components/MText.js.map +1 -1
  18. package/lib/commonjs/navigation/primary-navigator.js +1 -1
  19. package/lib/commonjs/navigation/primary-navigator.js.flow +6 -0
  20. package/lib/commonjs/navigation/primary-navigator.js.map +1 -1
  21. package/lib/commonjs/screens/digital-lending/Step1.js +2 -0
  22. package/lib/commonjs/screens/digital-lending/Step1.js.flow +670 -0
  23. package/lib/commonjs/screens/digital-lending/Step1.js.map +1 -0
  24. package/lib/commonjs/screens/digital-lending/Step2.js +2 -0
  25. package/lib/commonjs/screens/digital-lending/Step2.js.flow +613 -0
  26. package/lib/commonjs/screens/digital-lending/Step2.js.map +1 -0
  27. package/lib/commonjs/screens/digital-lending/Step3.js +2 -0
  28. package/lib/commonjs/screens/digital-lending/Step3.js.flow +606 -0
  29. package/lib/commonjs/screens/digital-lending/Step3.js.map +1 -0
  30. package/lib/commonjs/screens/digital-lending/Step4.js +2 -0
  31. package/lib/commonjs/screens/digital-lending/Step4.js.flow +496 -0
  32. package/lib/commonjs/screens/digital-lending/Step4.js.map +1 -0
  33. package/lib/commonjs/screens/digital-lending/Step5.js +2 -0
  34. package/lib/commonjs/screens/digital-lending/Step5.js.flow +350 -0
  35. package/lib/commonjs/screens/digital-lending/Step5.js.map +1 -0
  36. package/lib/commonjs/screens/digital-lending/Step6.js +2 -0
  37. package/lib/commonjs/screens/digital-lending/Step6.js.flow +369 -0
  38. package/lib/commonjs/screens/digital-lending/Step6.js.map +1 -0
  39. package/lib/commonjs/screens/digital-lending/index.js +2 -0
  40. package/lib/commonjs/screens/digital-lending/index.js.flow +110 -0
  41. package/lib/commonjs/screens/digital-lending/index.js.map +1 -0
  42. package/lib/commonjs/screens/digital-lending/store.js +2 -0
  43. package/lib/commonjs/screens/digital-lending/store.js.flow +294 -0
  44. package/lib/commonjs/screens/digital-lending/store.js.map +1 -0
  45. package/lib/commonjs/screens/home/index.js +1 -1
  46. package/lib/commonjs/screens/home/index.js.flow +475 -0
  47. package/lib/commonjs/screens/home/index.js.map +1 -1
  48. package/lib/commonjs/screens/register/index.js +1 -1
  49. package/lib/commonjs/screens/register/index.js.flow +1 -1
  50. package/lib/commonjs/services/api/api-config.js +1 -1
  51. package/lib/commonjs/services/api/api-config.js.flow +2 -2
  52. package/lib/commonjs/services/api/api-config.js.map +1 -1
  53. package/lib/commonjs/services/api/api.js +1 -1
  54. package/lib/commonjs/services/api/api.js.flow +95 -0
  55. package/lib/commonjs/services/api/api.js.map +1 -1
  56. package/lib/module/assets/icons/back2.svg +13 -0
  57. package/lib/module/assets/icons/check1.svg +4 -0
  58. package/lib/module/assets/icons/check2.svg +9 -0
  59. package/lib/module/assets/icons/error.svg +6 -0
  60. package/lib/module/assets/icons/index.js +1 -1
  61. package/lib/module/assets/icons/index.js.map +1 -1
  62. package/lib/module/assets/icons/line2.svg +12 -0
  63. package/lib/module/assets/icons/next.svg +6 -0
  64. package/lib/module/assets/icons/step.svg +9 -0
  65. package/lib/module/assets/icons/update.svg +5 -0
  66. package/lib/module/components/CommonSelect.js +2 -0
  67. package/lib/module/components/CommonSelect.js.map +1 -0
  68. package/lib/module/components/MText.js +1 -1
  69. package/lib/module/components/MText.js.map +1 -1
  70. package/lib/module/navigation/primary-navigator.js +1 -1
  71. package/lib/module/navigation/primary-navigator.js.map +1 -1
  72. package/lib/module/screens/digital-lending/Step1.js +2 -0
  73. package/lib/module/screens/digital-lending/Step1.js.map +1 -0
  74. package/lib/module/screens/digital-lending/Step2.js +2 -0
  75. package/lib/module/screens/digital-lending/Step2.js.map +1 -0
  76. package/lib/module/screens/digital-lending/Step3.js +2 -0
  77. package/lib/module/screens/digital-lending/Step3.js.map +1 -0
  78. package/lib/module/screens/digital-lending/Step4.js +2 -0
  79. package/lib/module/screens/digital-lending/Step4.js.map +1 -0
  80. package/lib/module/screens/digital-lending/Step5.js +2 -0
  81. package/lib/module/screens/digital-lending/Step5.js.map +1 -0
  82. package/lib/module/screens/digital-lending/Step6.js +2 -0
  83. package/lib/module/screens/digital-lending/Step6.js.map +1 -0
  84. package/lib/module/screens/digital-lending/index.js +2 -0
  85. package/lib/module/screens/digital-lending/index.js.map +1 -0
  86. package/lib/module/screens/digital-lending/store.js +2 -0
  87. package/lib/module/screens/digital-lending/store.js.map +1 -0
  88. package/lib/module/screens/home/index.js +1 -1
  89. package/lib/module/screens/home/index.js.map +1 -1
  90. package/lib/module/screens/register/index.js +1 -1
  91. package/lib/module/services/api/api-config.js +1 -1
  92. package/lib/module/services/api/api-config.js.map +1 -1
  93. package/lib/module/services/api/api.js +1 -1
  94. package/lib/module/services/api/api.js.map +1 -1
  95. package/lib/typescript/assets/icons/index.d.ts +9 -1
  96. package/lib/typescript/assets/icons/index.d.ts.map +1 -1
  97. package/lib/typescript/components/CommonSelect.d.ts +8 -0
  98. package/lib/typescript/components/CommonSelect.d.ts.map +1 -0
  99. package/lib/typescript/navigation/primary-navigator.d.ts +1 -0
  100. package/lib/typescript/navigation/primary-navigator.d.ts.map +1 -1
  101. package/lib/typescript/screens/digital-lending/Step1.d.ts +2 -0
  102. package/lib/typescript/screens/digital-lending/Step1.d.ts.map +1 -0
  103. package/lib/typescript/screens/digital-lending/Step2.d.ts +2 -0
  104. package/lib/typescript/screens/digital-lending/Step2.d.ts.map +1 -0
  105. package/lib/typescript/screens/digital-lending/Step3.d.ts +2 -0
  106. package/lib/typescript/screens/digital-lending/Step3.d.ts.map +1 -0
  107. package/lib/typescript/screens/digital-lending/Step4.d.ts +2 -0
  108. package/lib/typescript/screens/digital-lending/Step4.d.ts.map +1 -0
  109. package/lib/typescript/screens/digital-lending/Step5.d.ts +2 -0
  110. package/lib/typescript/screens/digital-lending/Step5.d.ts.map +1 -0
  111. package/lib/typescript/screens/digital-lending/Step6.d.ts +2 -0
  112. package/lib/typescript/screens/digital-lending/Step6.d.ts.map +1 -0
  113. package/lib/typescript/screens/digital-lending/index.d.ts +2 -0
  114. package/lib/typescript/screens/digital-lending/index.d.ts.map +1 -0
  115. package/lib/typescript/screens/digital-lending/store.d.ts +35 -0
  116. package/lib/typescript/screens/digital-lending/store.d.ts.map +1 -0
  117. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  118. package/lib/typescript/services/api/api.d.ts +80 -19
  119. package/lib/typescript/services/api/api.d.ts.map +1 -1
  120. package/package.json +1 -1
  121. package/src/assets/icons/back2.svg +13 -0
  122. package/src/assets/icons/check1.svg +4 -0
  123. package/src/assets/icons/check2.svg +9 -0
  124. package/src/assets/icons/error.svg +6 -0
  125. package/src/assets/icons/index.tsx +16 -0
  126. package/src/assets/icons/line2.svg +12 -0
  127. package/src/assets/icons/next.svg +6 -0
  128. package/src/assets/icons/step.svg +9 -0
  129. package/src/assets/icons/update.svg +5 -0
  130. package/src/components/CommonSelect.tsx +12 -0
  131. package/src/components/MText.tsx +2 -2
  132. package/src/navigation/primary-navigator.tsx +6 -0
  133. package/src/screens/digital-lending/Step1.tsx +670 -0
  134. package/src/screens/digital-lending/Step2.tsx +613 -0
  135. package/src/screens/digital-lending/Step3.tsx +606 -0
  136. package/src/screens/digital-lending/Step4.tsx +496 -0
  137. package/src/screens/digital-lending/Step5.tsx +350 -0
  138. package/src/screens/digital-lending/Step6.tsx +369 -0
  139. package/src/screens/digital-lending/index.tsx +110 -0
  140. package/src/screens/digital-lending/store.tsx +294 -0
  141. package/src/screens/home/index.tsx +475 -0
  142. package/src/screens/register/index.tsx +1 -1
  143. package/src/services/api/api-config.ts +2 -2
  144. package/src/services/api/api.ts +95 -0
@@ -47,6 +47,7 @@ import {
47
47
  LogoSmall,
48
48
  SignDisable,
49
49
  TimaNormal,
50
+ UpdateIcon,
50
51
  } from '../../assets/icons';
51
52
  import Geolocation from 'react-native-geolocation-service';
52
53
  import axios from 'axios';
@@ -1168,6 +1169,480 @@ export const Home = observer(function Home() {
1168
1169
  </View>
1169
1170
  )}
1170
1171
  </View>
1172
+ ) : item?.typeLoan === 2 ? (
1173
+ <Observer>
1174
+ {() => (
1175
+ <View>
1176
+ <View
1177
+ style={{
1178
+ backgroundColor: '#FFFFFF',
1179
+ paddingHorizontal: 16,
1180
+ paddingTop: 16,
1181
+ borderRadius: 8,
1182
+ borderWidth: 0.5,
1183
+ borderColor: '#E0E0E0',
1184
+ }}
1185
+ >
1186
+ <View
1187
+ style={{
1188
+ flexDirection: 'row',
1189
+ alignItems: 'center',
1190
+ }}
1191
+ >
1192
+ <Contract />
1193
+ <View style={{ flex: 1, paddingLeft: 8 }}>
1194
+ <MText style={commonStyles.textNormalBold}>
1195
+ Đơn vay {item?.id}
1196
+ </MText>
1197
+ <MText style={commonStyles.textNormal}>
1198
+ Số tiền vay (VND):{' '}
1199
+ {item?.loanAmount
1200
+ ? formatMoney(item?.loanAmount)
1201
+ : 'Chưa xác định'}
1202
+ </MText>
1203
+ </View>
1204
+ </View>
1205
+ <View
1206
+ style={{
1207
+ height: 1,
1208
+ backgroundColor: '#E0E0E0',
1209
+ marginVertical: 16,
1210
+ }}
1211
+ />
1212
+ <View
1213
+ style={{
1214
+ flexDirection: 'row',
1215
+ justifyContent: 'space-between',
1216
+ }}
1217
+ >
1218
+ <MText style={commonStyles.textNormal}>
1219
+ Trạng thái
1220
+ </MText>
1221
+ <MText
1222
+ style={[
1223
+ commonStyles.textNormalBold,
1224
+ { color: '#F05123' },
1225
+ ]}
1226
+ >
1227
+ {item?.loanStatus}
1228
+ </MText>
1229
+ </View>
1230
+ {item?.isUpdateLoanReBorrow ? (
1231
+ <TouchableOpacity
1232
+ style={{ marginTop: 14 }}
1233
+ onPress={() => {
1234
+ navigation.push('DigitalLending', item);
1235
+ }}
1236
+ >
1237
+ <LinearGradient
1238
+ style={{
1239
+ height: 36,
1240
+ borderRadius: 30,
1241
+ paddingHorizontal: 20,
1242
+ flexDirection: 'row',
1243
+ alignItems: 'center',
1244
+ }}
1245
+ colors={['#FF8E4F', '#EF592E']}
1246
+ >
1247
+ <UpdateIcon />
1248
+ <MText
1249
+ style={{
1250
+ color: 'white',
1251
+ marginLeft: 10,
1252
+ }}
1253
+ >
1254
+ Hoàn thiện hồ sơ
1255
+ </MText>
1256
+ </LinearGradient>
1257
+ </TouchableOpacity>
1258
+ ) : (
1259
+ <View>
1260
+ {item?.isPipelineCIMB ? (
1261
+ <View>
1262
+ <View
1263
+ style={{
1264
+ height: 0.5,
1265
+ backgroundColor: '#E0E0E0',
1266
+ marginVertical: 16,
1267
+ }}
1268
+ />
1269
+ <View style={{ flexDirection: 'row' }}>
1270
+ {item?.isUpdateLoan ||
1271
+ item?.isUpdateInformation ? (
1272
+ <TouchableOpacity
1273
+ style={{ alignItems: 'center' }}
1274
+ onPress={() => {
1275
+ if (item?.isUpdateLoan) {
1276
+ navigation.dispatch(
1277
+ StackActions.push(
1278
+ ScreenNames.CimbSelfie,
1279
+ {
1280
+ loan: item,
1281
+ }
1282
+ )
1283
+ );
1284
+ } else {
1285
+ navigation.dispatch(
1286
+ StackActions.push(
1287
+ ScreenNames.QuickSubmit,
1288
+ {
1289
+ loan: item,
1290
+ }
1291
+ )
1292
+ );
1293
+ }
1294
+ }}
1295
+ >
1296
+ <AddInfo />
1297
+ <MText
1298
+ style={[
1299
+ commonStyles.textNormal,
1300
+ {
1301
+ fontSize: 12,
1302
+ fontWeight: '300',
1303
+ marginTop: 8,
1304
+ textAlign: 'center',
1305
+ },
1306
+ ]}
1307
+ >
1308
+ Hoàn thiện{'\n'}cung cấp thông
1309
+ tin
1310
+ </MText>
1311
+ </TouchableOpacity>
1312
+ ) : (
1313
+ <View
1314
+ style={{ alignItems: 'center' }}
1315
+ >
1316
+ <AddInfoDisable />
1317
+ <MText
1318
+ style={[
1319
+ commonStyles.textNormal,
1320
+ {
1321
+ fontSize: 12,
1322
+ fontWeight: '300',
1323
+ marginTop: 8,
1324
+ textAlign: 'center',
1325
+ },
1326
+ ]}
1327
+ >
1328
+ Hoàn thiện{'\n'}cung cấp thông
1329
+ tin
1330
+ </MText>
1331
+ </View>
1332
+ )}
1333
+ {item?.isSignContract && (
1334
+ <TouchableOpacity
1335
+ style={{
1336
+ alignItems: 'center',
1337
+ marginLeft: 20,
1338
+ }}
1339
+ onPress={() => {
1340
+ if (item?.urlSignContract) {
1341
+ navigation.dispatch(
1342
+ StackActions.push(
1343
+ ScreenNames.CIMBSign,
1344
+ {
1345
+ url: item?.urlSignContract,
1346
+ }
1347
+ )
1348
+ );
1349
+ } else {
1350
+ Alert.alert(
1351
+ 'Thông báo',
1352
+ 'Bạn chưa thể ký hợp đồng bây giờ?'
1353
+ );
1354
+ }
1355
+ }}
1356
+ >
1357
+ <IconSign2 />
1358
+ <MText
1359
+ style={[
1360
+ commonStyles.textNormal,
1361
+ {
1362
+ fontSize: 12,
1363
+ fontWeight: '300',
1364
+ marginTop: 8,
1365
+ },
1366
+ ]}
1367
+ >
1368
+ Ký hợp đồng
1369
+ </MText>
1370
+ </TouchableOpacity>
1371
+ )}
1372
+ {item?.isSignContractTima && (
1373
+ <TouchableOpacity
1374
+ style={{
1375
+ alignItems: 'center',
1376
+ marginLeft: 20,
1377
+ }}
1378
+ onPress={() => {
1379
+ navigation.dispatch(
1380
+ StackActions.push(
1381
+ ScreenNames.ViewContract,
1382
+ {
1383
+ loan: item,
1384
+ }
1385
+ )
1386
+ );
1387
+ }}
1388
+ >
1389
+ <ContractTimeIcon />
1390
+ <MText
1391
+ style={[
1392
+ commonStyles.textNormal,
1393
+ {
1394
+ fontSize: 12,
1395
+ fontWeight: '300',
1396
+ marginTop: 8,
1397
+ textAlign: 'center',
1398
+ },
1399
+ ]}
1400
+ >
1401
+ Hợp đồng{'\n'}dịch vụ
1402
+ </MText>
1403
+ </TouchableOpacity>
1404
+ )}
1405
+ {item?.paymentEvidenceUrl && (
1406
+ <TouchableOpacity
1407
+ style={{
1408
+ alignItems: 'center',
1409
+ marginLeft: 20,
1410
+ }}
1411
+ onPress={() => {
1412
+ navigation.dispatch(
1413
+ StackActions.push(
1414
+ ScreenNames.PaymentEvidence,
1415
+ {
1416
+ url: item?.paymentEvidenceUrl,
1417
+ }
1418
+ )
1419
+ );
1420
+ }}
1421
+ >
1422
+ <IconEviden />
1423
+ <MText
1424
+ style={[
1425
+ commonStyles.textNormal,
1426
+ {
1427
+ fontSize: 12,
1428
+ fontWeight: '300',
1429
+ marginTop: 8,
1430
+ textAlign: 'center',
1431
+ },
1432
+ ]}
1433
+ >
1434
+ Mục đích {'\n'}sử dụng
1435
+ </MText>
1436
+ </TouchableOpacity>
1437
+ )}
1438
+ {item?.showPaymentPlan && (
1439
+ <TouchableOpacity
1440
+ style={{
1441
+ alignItems: 'center',
1442
+ marginLeft: 20,
1443
+ }}
1444
+ onPress={() => {
1445
+ navigation.dispatch(
1446
+ StackActions.push(
1447
+ ScreenNames.SchedulePayment,
1448
+ {
1449
+ loan: item,
1450
+ }
1451
+ )
1452
+ );
1453
+ }}
1454
+ >
1455
+ <IconSchedule />
1456
+ <MText
1457
+ style={[
1458
+ commonStyles.textNormal,
1459
+ {
1460
+ fontSize: 12,
1461
+ fontWeight: '300',
1462
+ marginTop: 8,
1463
+ },
1464
+ ]}
1465
+ >
1466
+ Lịch dự kiến
1467
+ </MText>
1468
+ </TouchableOpacity>
1469
+ )}
1470
+ </View>
1471
+ </View>
1472
+ ) : (
1473
+ <View>
1474
+ <View
1475
+ style={{
1476
+ height: 0.5,
1477
+ backgroundColor: '#E0E0E0',
1478
+ marginVertical: 16,
1479
+ }}
1480
+ />
1481
+ <View style={{ flexDirection: 'row' }}>
1482
+ {!homeStore.checkEKYC[item?.id] ? (
1483
+ <TouchableOpacity
1484
+ style={{ alignItems: 'center' }}
1485
+ onPress={() => {
1486
+ navigation.dispatch(
1487
+ StackActions.push(
1488
+ ScreenNames.NationalID,
1489
+ {
1490
+ loan: item,
1491
+ reLoan: true,
1492
+ }
1493
+ )
1494
+ );
1495
+ }}
1496
+ >
1497
+ <AddInfo />
1498
+ <MText
1499
+ style={[
1500
+ commonStyles.textNormal,
1501
+ {
1502
+ fontSize: 12,
1503
+ fontWeight: '300',
1504
+ marginTop: 8,
1505
+ },
1506
+ ]}
1507
+ >
1508
+ EKYC
1509
+ </MText>
1510
+ </TouchableOpacity>
1511
+ ) : (
1512
+ <View
1513
+ style={{ alignItems: 'center' }}
1514
+ >
1515
+ <AddInfoDisable />
1516
+ <MText
1517
+ style={[
1518
+ commonStyles.textNormal,
1519
+ {
1520
+ fontSize: 12,
1521
+ fontWeight: '300',
1522
+ marginTop: 8,
1523
+ },
1524
+ ]}
1525
+ >
1526
+ EKYC
1527
+ </MText>
1528
+ </View>
1529
+ )}
1530
+
1531
+ <TouchableOpacity
1532
+ style={{
1533
+ alignItems: 'center',
1534
+ marginLeft: 20,
1535
+ }}
1536
+ onPress={() => {
1537
+ navigation.dispatch(
1538
+ StackActions.push(
1539
+ ScreenNames.Video,
1540
+ {
1541
+ loan: item,
1542
+ }
1543
+ )
1544
+ );
1545
+ }}
1546
+ >
1547
+ <IconVideo />
1548
+ <MText
1549
+ style={[
1550
+ commonStyles.textNormal,
1551
+ {
1552
+ fontSize: 12,
1553
+ fontWeight: '300',
1554
+ marginTop: 8,
1555
+ },
1556
+ ]}
1557
+ >
1558
+ Quay video
1559
+ </MText>
1560
+ </TouchableOpacity>
1561
+
1562
+ {homeStore.checkEKYC[item?.id] ? (
1563
+ <TouchableOpacity
1564
+ style={{
1565
+ alignItems: 'center',
1566
+ marginLeft: 20,
1567
+ }}
1568
+ onPress={() => {
1569
+ signLoan(item);
1570
+ }}
1571
+ >
1572
+ <IconSign2 />
1573
+ <MText
1574
+ style={[
1575
+ commonStyles.textNormal,
1576
+ {
1577
+ fontSize: 12,
1578
+ fontWeight: '300',
1579
+ marginTop: 8,
1580
+ },
1581
+ ]}
1582
+ >
1583
+ Ký HĐ
1584
+ </MText>
1585
+ </TouchableOpacity>
1586
+ ) : (
1587
+ <View
1588
+ style={{
1589
+ alignItems: 'center',
1590
+ marginLeft: 20,
1591
+ }}
1592
+ >
1593
+ <SignDisable />
1594
+ <MText
1595
+ style={[
1596
+ commonStyles.textNormal,
1597
+ {
1598
+ fontSize: 12,
1599
+ fontWeight: '300',
1600
+ marginTop: 8,
1601
+ },
1602
+ ]}
1603
+ >
1604
+ Ký HĐ
1605
+ </MText>
1606
+ </View>
1607
+ )}
1608
+ </View>
1609
+ </View>
1610
+ )}
1611
+ </View>
1612
+ )}
1613
+ <View
1614
+ style={{
1615
+ flexDirection: 'row',
1616
+ alignItems: 'center',
1617
+ backgroundColor: '#FBEFE7',
1618
+ marginHorizontal: -16,
1619
+ paddingVertical: 8,
1620
+ marginTop: 16,
1621
+ borderBottomRightRadius: 8,
1622
+ borderBottomLeftRadius: 8,
1623
+ paddingHorizontal: 16,
1624
+ }}
1625
+ >
1626
+ <Info />
1627
+ <MText
1628
+ style={[
1629
+ {
1630
+ fontWeight: '300',
1631
+ fontSize: 12,
1632
+ fontStyle: 'italic',
1633
+ color: '#333333',
1634
+ marginLeft: 8,
1635
+ },
1636
+ ]}
1637
+ >
1638
+ Thực hiện đầy đủ các bước để giải ngân nhanh
1639
+ nhất
1640
+ </MText>
1641
+ </View>
1642
+ </View>
1643
+ </View>
1644
+ )}
1645
+ </Observer>
1171
1646
  ) : (
1172
1647
  <Observer>
1173
1648
  {() => (
@@ -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) => {
@@ -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
  }