react-native-timacare 3.3.19 → 3.3.20

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 (99) hide show
  1. package/lib/commonjs/components/keyboardspace/index.js +1 -1
  2. package/lib/commonjs/components/keyboardspace/index.js.flow +0 -2
  3. package/lib/commonjs/components/keyboardspace/index.js.map +1 -1
  4. package/lib/commonjs/screens/detail-loan/DetailLoanTima.js +1 -1
  5. package/lib/commonjs/screens/detail-loan/DetailLoanTima.js.flow +29 -4
  6. package/lib/commonjs/screens/detail-loan/DetailLoanTima.js.map +1 -1
  7. package/lib/commonjs/screens/detail-loan/Info.js +1 -1
  8. package/lib/commonjs/screens/detail-loan/Info.js.flow +16 -8
  9. package/lib/commonjs/screens/detail-loan/Info.js.map +1 -1
  10. package/lib/commonjs/screens/detail-loan/Payment.js +1 -1
  11. package/lib/commonjs/screens/detail-loan/Payment.js.flow +19 -7
  12. package/lib/commonjs/screens/detail-loan/Payment.js.map +1 -1
  13. package/lib/commonjs/screens/detail-loan/PaymentAll.js +1 -1
  14. package/lib/commonjs/screens/detail-loan/PaymentAll.js.flow +49 -9
  15. package/lib/commonjs/screens/detail-loan/PaymentAll.js.map +1 -1
  16. package/lib/commonjs/screens/detail-loan/PaymentInfo.js +1 -1
  17. package/lib/commonjs/screens/detail-loan/PaymentInfo.js.flow +735 -85
  18. package/lib/commonjs/screens/detail-loan/PaymentInfo.js.map +1 -1
  19. package/lib/commonjs/screens/detail-loan/ShowQrCode.js +1 -1
  20. package/lib/commonjs/screens/detail-loan/ShowQrCode.js.flow +372 -68
  21. package/lib/commonjs/screens/detail-loan/ShowQrCode.js.map +1 -1
  22. package/lib/commonjs/screens/detail-loan/index.js +1 -1
  23. package/lib/commonjs/screens/detail-loan/index.js.flow +37 -33
  24. package/lib/commonjs/screens/detail-loan/index.js.map +1 -1
  25. package/lib/commonjs/screens/guide-transfer-bank/TransferDetail.js +1 -1
  26. package/lib/commonjs/screens/guide-transfer-bank/TransferDetail.js.flow +41 -12
  27. package/lib/commonjs/screens/guide-transfer-bank/TransferDetail.js.map +1 -1
  28. package/lib/commonjs/screens/guide-transfer-bank/index.js +1 -1
  29. package/lib/commonjs/screens/guide-transfer-bank/index.js.flow +228 -237
  30. package/lib/commonjs/screens/guide-transfer-bank/index.js.map +1 -1
  31. package/lib/commonjs/screens/home/Store.js +1 -1
  32. package/lib/commonjs/screens/home/Store.js.flow +4 -1
  33. package/lib/commonjs/screens/home/Store.js.map +1 -1
  34. package/lib/commonjs/screens/home/index.js +1 -1
  35. package/lib/commonjs/screens/home/index.js.flow +15 -30
  36. package/lib/commonjs/screens/home/index.js.map +1 -1
  37. package/lib/commonjs/screens/liveness-v2/index.js +1 -1
  38. package/lib/commonjs/screens/liveness-v2/index.js.flow +4 -4
  39. package/lib/commonjs/screens/liveness-v2/index.js.map +1 -1
  40. package/lib/commonjs/services/api/api.js +1 -1
  41. package/lib/commonjs/services/api/api.js.flow +16 -0
  42. package/lib/commonjs/services/api/api.js.map +1 -1
  43. package/lib/module/components/keyboardspace/index.js +1 -1
  44. package/lib/module/components/keyboardspace/index.js.map +1 -1
  45. package/lib/module/screens/detail-loan/DetailLoanTima.js +1 -1
  46. package/lib/module/screens/detail-loan/DetailLoanTima.js.map +1 -1
  47. package/lib/module/screens/detail-loan/Info.js +1 -1
  48. package/lib/module/screens/detail-loan/Info.js.map +1 -1
  49. package/lib/module/screens/detail-loan/Payment.js +1 -1
  50. package/lib/module/screens/detail-loan/Payment.js.map +1 -1
  51. package/lib/module/screens/detail-loan/PaymentAll.js +1 -1
  52. package/lib/module/screens/detail-loan/PaymentAll.js.map +1 -1
  53. package/lib/module/screens/detail-loan/PaymentInfo.js +1 -1
  54. package/lib/module/screens/detail-loan/PaymentInfo.js.map +1 -1
  55. package/lib/module/screens/detail-loan/ShowQrCode.js +1 -1
  56. package/lib/module/screens/detail-loan/ShowQrCode.js.map +1 -1
  57. package/lib/module/screens/detail-loan/index.js +1 -1
  58. package/lib/module/screens/detail-loan/index.js.map +1 -1
  59. package/lib/module/screens/guide-transfer-bank/TransferDetail.js +1 -1
  60. package/lib/module/screens/guide-transfer-bank/TransferDetail.js.map +1 -1
  61. package/lib/module/screens/guide-transfer-bank/index.js +1 -1
  62. package/lib/module/screens/guide-transfer-bank/index.js.map +1 -1
  63. package/lib/module/screens/home/Store.js +1 -1
  64. package/lib/module/screens/home/Store.js.map +1 -1
  65. package/lib/module/screens/home/index.js +1 -1
  66. package/lib/module/screens/home/index.js.map +1 -1
  67. package/lib/module/screens/liveness-v2/index.js +1 -1
  68. package/lib/module/screens/liveness-v2/index.js.map +1 -1
  69. package/lib/module/services/api/api.js +1 -1
  70. package/lib/module/services/api/api.js.map +1 -1
  71. package/lib/typescript/components/keyboardspace/index.d.ts.map +1 -1
  72. package/lib/typescript/screens/detail-loan/DetailLoanTima.d.ts.map +1 -1
  73. package/lib/typescript/screens/detail-loan/Info.d.ts.map +1 -1
  74. package/lib/typescript/screens/detail-loan/Payment.d.ts.map +1 -1
  75. package/lib/typescript/screens/detail-loan/PaymentAll.d.ts.map +1 -1
  76. package/lib/typescript/screens/detail-loan/PaymentInfo.d.ts.map +1 -1
  77. package/lib/typescript/screens/detail-loan/ShowQrCode.d.ts.map +1 -1
  78. package/lib/typescript/screens/detail-loan/index.d.ts.map +1 -1
  79. package/lib/typescript/screens/guide-transfer-bank/TransferDetail.d.ts.map +1 -1
  80. package/lib/typescript/screens/guide-transfer-bank/index.d.ts.map +1 -1
  81. package/lib/typescript/screens/home/Store.d.ts.map +1 -1
  82. package/lib/typescript/screens/home/index.d.ts.map +1 -1
  83. package/lib/typescript/services/api/api.d.ts +16 -0
  84. package/lib/typescript/services/api/api.d.ts.map +1 -1
  85. package/package.json +2 -1
  86. package/src/components/keyboardspace/index.tsx +0 -2
  87. package/src/screens/detail-loan/DetailLoanTima.tsx +29 -4
  88. package/src/screens/detail-loan/Info.tsx +16 -8
  89. package/src/screens/detail-loan/Payment.tsx +19 -7
  90. package/src/screens/detail-loan/PaymentAll.tsx +49 -9
  91. package/src/screens/detail-loan/PaymentInfo.tsx +735 -85
  92. package/src/screens/detail-loan/ShowQrCode.tsx +372 -68
  93. package/src/screens/detail-loan/index.tsx +37 -33
  94. package/src/screens/guide-transfer-bank/TransferDetail.tsx +41 -12
  95. package/src/screens/guide-transfer-bank/index.tsx +228 -237
  96. package/src/screens/home/Store.tsx +4 -1
  97. package/src/screens/home/index.tsx +15 -30
  98. package/src/screens/liveness-v2/index.tsx +4 -4
  99. package/src/services/api/api.ts +16 -0
@@ -133,6 +133,7 @@ export const Home = observer(function Home() {
133
133
  const insets = useSafeAreaInsets();
134
134
 
135
135
  const onRefresh = async () => {
136
+ homeStore.getListLoan();
136
137
  setIsLoading(true);
137
138
  try {
138
139
  const response = await Api.getInstance().listLoanPending();
@@ -184,6 +185,7 @@ export const Home = observer(function Home() {
184
185
  const res = await Api.getInstance().getSuggestProduct(
185
186
  item?.id
186
187
  );
188
+ console.log(res);
187
189
 
188
190
  if (res.kind === 'ok' && res.data?.meta?.errorCode === 200) {
189
191
  setDataSuggest({
@@ -496,25 +498,16 @@ export const Home = observer(function Home() {
496
498
  style={{ flex: 1, marginBottom: 16 }}
497
499
  >
498
500
  <View style={[commonStyles.fill, { paddingHorizontal: 16 }]}>
499
- <MText
500
- style={{
501
- fontSize: 16,
502
- fontWeight: 'bold',
503
- marginTop: 10,
504
- marginBottom: 8,
505
- }}
506
- >
507
- Đơn chờ hoàn thiện
508
- </MText>
509
- {listLoan?.length === 0 && (
501
+ {listLoan?.length > 0 && (
510
502
  <MText
511
503
  style={{
512
- marginTop: 50,
513
- marginBottom: 16,
514
- textAlign: 'center',
504
+ fontSize: 16,
505
+ fontWeight: 'bold',
506
+ marginTop: 10,
507
+ marginBottom: 8,
515
508
  }}
516
509
  >
517
- Danh sách đơn mới trống
510
+ Danh sách đơn mới
518
511
  </MText>
519
512
  )}
520
513
 
@@ -2153,24 +2146,16 @@ export const Home = observer(function Home() {
2153
2146
  <Observer>
2154
2147
  {() => (
2155
2148
  <View>
2156
- <MText
2157
- style={{
2158
- fontSize: 16,
2159
- fontWeight: 'bold',
2160
- marginBottom: 8,
2161
- }}
2162
- >
2163
- Danh sách đơn đang vay
2164
- </MText>
2165
- {homeStore?.listLoan?.length === 0 && (
2149
+ {homeStore?.listLoan?.length > 0 && (
2166
2150
  <MText
2167
2151
  style={{
2168
- marginTop: 50,
2169
- marginBottom: 16,
2170
- textAlign: 'center',
2152
+ fontSize: 16,
2153
+ fontWeight: 'bold',
2154
+ marginBottom: 8,
2155
+ marginTop: 10,
2171
2156
  }}
2172
2157
  >
2173
- Danh sách đơn trống
2158
+ Danh sách đơn đang vay
2174
2159
  </MText>
2175
2160
  )}
2176
2161
  {homeStore?.listLoan &&
@@ -2731,7 +2716,7 @@ export const Home = observer(function Home() {
2731
2716
  }}
2732
2717
  />
2733
2718
  </ScrollView>
2734
- <Loading isLoading={isLoading} />
2719
+ <Loading isLoading={isLoading || homeStore.isLoading} />
2735
2720
  </View>
2736
2721
  );
2737
2722
  });
@@ -505,10 +505,10 @@ export const LivenessV2 = observer(function LivenessV2(props: any) {
505
505
 
506
506
  <View style={styles.circularProgress}>
507
507
  <CircularProgress
508
- dashedStrokeConfig={{
509
- count: 100,
510
- width: 7,
511
- }}
508
+ // dashedStrokeConfig={{
509
+ // count: 100,
510
+ // width: 7,
511
+ // }}
512
512
  value={
513
513
  livenessStore.listAction.length === 3
514
514
  ? 0
@@ -3327,4 +3327,20 @@ export class Api {
3327
3327
  return { kind: "bad-data" }
3328
3328
  }
3329
3329
  }
3330
+
3331
+ async getMoneyCloseLoan(id) {
3332
+ // make the api call
3333
+ const response: ApiResponse<any> = await this.apisauce.get(`api/v2.0/loanbrief/get_money_close_loan?loanBriefId=${id}`)
3334
+ // the typical ways to die when calling an api
3335
+ if (!response.ok) {
3336
+ const problem = getGeneralApiProblem(response)
3337
+ if (problem) return problem
3338
+ }
3339
+ // transform the data into the format we are expecting
3340
+ try {
3341
+ return { kind: "ok", data: response.data }
3342
+ } catch {
3343
+ return { kind: "bad-data" }
3344
+ }
3345
+ }
3330
3346
  }