Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
InvestCustomer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Giang Tran
InvestCustomer
Commits
456d9095
Commit
456d9095
authored
Apr 26, 2021
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update code
parent
bf68a2f6
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
100 additions
and
68 deletions
+100
-68
ic_launcher.png
android/app/src/main/res/mipmap-hdpi/ic_launcher.png
+0
-0
ic_launcher.png
android/app/src/main/res/mipmap-mdpi/ic_launcher.png
+0
-0
ic_launcher.png
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
+0
-0
ic_launcher.png
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
+0
-0
ic_launcher.png
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
+0
-0
Functions.js
src/Config/Functions.js
+3
-2
PacketCQG.js
src/Screens/Account/PacrtCQG/PacketCQG.js
+3
-3
BankInfor.js
src/Screens/AccountVerification/Tab/BankInfor.js
+4
-3
GeneralInfor.js
src/Screens/AccountVerification/Tab/GeneralInfor.js
+2
-1
Profile.js
src/Screens/AccountVerification/Tab/Profile.js
+4
-3
History.js
src/Screens/Action/History/History.js
+2
-1
Success.js
src/Screens/Action/Wallet/Tab/Success.js
+2
-1
Watting.js
src/Screens/Action/Wallet/Tab/Watting.js
+4
-1
Wallet.js
src/Screens/Action/Wallet/Wallet.js
+2
-6
WalletDeposit.js
src/Screens/Action/Wallet/WalletDeposit.js
+5
-3
WalletWithdraw.js
src/Screens/Action/Wallet/WalletWithdraw.js
+8
-5
ConfirmEmail.js
src/Screens/Authen/ConfirmEmail.js
+3
-2
ConfirmOTP.js
src/Screens/Authen/ConfirmOTP.js
+4
-3
Login.js
src/Screens/Authen/Login.js
+3
-2
Registor.js
src/Screens/Authen/Registor.js
+4
-3
Home.js
src/Screens/Home/Home.js
+2
-1
Menu.js
src/Screens/Home/Menu.js
+2
-1
GeneralInfor.js
src/Screens/Menu/Profile/Tab/GeneralInfor.js
+3
-3
AddMethod.js
src/Screens/MethodPay/AddMethod.js
+8
-4
MethodPayDetail.js
src/Screens/MethodPay/MethodPayDetail.js
+8
-6
Calendar.js
src/Screens/NewFeed/Calendar/Calendar.js
+2
-1
Media.js
src/Screens/NewFeed/Media/Media.js
+2
-1
MediaDetail.js
src/Screens/NewFeed/Media/MediaDetail.js
+2
-1
Tab1.js
src/Screens/NewFeed/Tab1/Tab1.js
+3
-2
Notification.js
src/Screens/Notification/Notification.js
+2
-2
Aleart.js
src/components/Aleart.js
+5
-4
HeaderHome.js
src/components/Header/HeaderHome.js
+1
-1
en.js
src/helper/i18/locales/en.js
+2
-2
vn.js
src/helper/i18/locales/vn.js
+5
-0
No files found.
android/app/src/main/res/mipmap-hdpi/ic_launcher.png
View replaced file @
bf68a2f6
View file @
456d9095
194 KB
|
W:
|
H:
40.4 KB
|
W:
|
H:
2-up
Swipe
Onion skin
android/app/src/main/res/mipmap-mdpi/ic_launcher.png
View replaced file @
bf68a2f6
View file @
456d9095
194 KB
|
W:
|
H:
40.4 KB
|
W:
|
H:
2-up
Swipe
Onion skin
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
View replaced file @
bf68a2f6
View file @
456d9095
194 KB
|
W:
|
H:
40.4 KB
|
W:
|
H:
2-up
Swipe
Onion skin
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
View replaced file @
bf68a2f6
View file @
456d9095
194 KB
|
W:
|
H:
40.4 KB
|
W:
|
H:
2-up
Swipe
Onion skin
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
View replaced file @
bf68a2f6
View file @
456d9095
194 KB
|
W:
|
H:
40.4 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/Config/Functions.js
View file @
456d9095
...
@@ -8,6 +8,7 @@ import {
...
@@ -8,6 +8,7 @@ import {
}
from
'react-native'
;
}
from
'react-native'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
I18n
from
'../helper/i18/i18n'
;
import
{
DETAILNEW
,
NOTIFICATION
}
from
'../routers/ScreenNames'
;
import
{
DETAILNEW
,
NOTIFICATION
}
from
'../routers/ScreenNames'
;
import
R
from
'../assets/R'
;
import
R
from
'../assets/R'
;
...
@@ -106,12 +107,12 @@ export const renderStatus = (status) => {
...
@@ -106,12 +107,12 @@ export const renderStatus = (status) => {
};
};
export
const
NotificationAlert
=
(
string
)
=>
{
export
const
NotificationAlert
=
(
string
)
=>
{
Alert
.
alert
(
'Thông báo'
,
string
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
string
);
};
};
export
const
confirmAlert
=
(
title
,
callback
)
=>
{
export
const
confirmAlert
=
(
title
,
callback
)
=>
{
Alert
.
alert
(
Alert
.
alert
(
'Thông báo'
,
I18n
.
t
(
'Notification'
)
,
title
,
title
,
[
[
{
{
...
...
src/Screens/Account/PacrtCQG/PacketCQG.js
View file @
456d9095
...
@@ -61,12 +61,12 @@ const PacketCQG = (props) => {
...
@@ -61,12 +61,12 @@ const PacketCQG = (props) => {
console
.
log
(
res
);
console
.
log
(
res
);
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
navigate
.
goBack
();
navigate
.
goBack
();
},
500
);
},
500
);
}
else
{
}
else
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
},
500
);
},
500
);
}
}
};
};
...
@@ -130,7 +130,7 @@ const PacketCQG = (props) => {
...
@@ -130,7 +130,7 @@ const PacketCQG = (props) => {
setFeeNonPro
(
res
.
data
.
data
.
fee_pro
);
setFeeNonPro
(
res
.
data
.
data
.
fee_pro
);
setFeePro
(
res
.
data
.
data
.
fee_non_pro
);
setFeePro
(
res
.
data
.
data
.
fee_non_pro
);
}
else
{
}
else
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
}
}
};
};
...
...
src/Screens/AccountVerification/Tab/BankInfor.js
View file @
456d9095
...
@@ -24,6 +24,7 @@ import {verifyAccountApi} from '../../../apis/Functions/users';
...
@@ -24,6 +24,7 @@ import {verifyAccountApi} from '../../../apis/Functions/users';
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
showLoading
,
hideLoading
}
from
'../../../actions/loadingAction'
;
import
{
showLoading
,
hideLoading
}
from
'../../../actions/loadingAction'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
I18n
from
'../../../helper/i18/i18n'
;
const
{
width
}
=
Dimensions
.
get
(
'window'
);
const
{
width
}
=
Dimensions
.
get
(
'window'
);
const
dataType
=
[
const
dataType
=
[
...
@@ -102,18 +103,18 @@ const BankInfor = (props) => {
...
@@ -102,18 +103,18 @@ const BankInfor = (props) => {
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
},
500
);
},
500
);
setBackNo
(
''
);
setBackNo
(
''
);
setAccountNo
(
''
);
setAccountNo
(
''
);
setAccType
(
''
);
setAccType
(
''
);
}
else
{
}
else
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
},
500
);
},
500
);
}
}
}
else
{
}
else
{
Alert
.
alert
(
'Vui lòng điền '
+
titles
[
index
]);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Vui lòng điền '
+
titles
[
index
]);
}
}
};
};
...
...
src/Screens/AccountVerification/Tab/GeneralInfor.js
View file @
456d9095
...
@@ -19,6 +19,7 @@ import TextField from '../../../components/Input/TextField';
...
@@ -19,6 +19,7 @@ import TextField from '../../../components/Input/TextField';
import
TextMulti
from
'../../../components/Input/TextMulti'
;
import
TextMulti
from
'../../../components/Input/TextMulti'
;
import
PickerDate
from
'../../../components/Picker/PickerDate'
;
import
PickerDate
from
'../../../components/Picker/PickerDate'
;
import
PickerImg
from
'../../../components/Picker/PickerImg'
;
import
PickerImg
from
'../../../components/Picker/PickerImg'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
{
checkFormatArray
,
convertTime
}
from
'../../../Config/Functions'
;
import
{
checkFormatArray
,
convertTime
}
from
'../../../Config/Functions'
;
...
@@ -40,7 +41,7 @@ const GeneralInfor = (props) => {
...
@@ -40,7 +41,7 @@ const GeneralInfor = (props) => {
address
,
address
,
});
});
}
else
{
}
else
{
Alert
.
alert
(
'Vui lòng điền '
+
titles
[
index
]);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Vui lòng điền '
+
titles
[
index
]);
}
}
};
};
...
...
src/Screens/AccountVerification/Tab/Profile.js
View file @
456d9095
...
@@ -28,6 +28,7 @@ import {verifyAccountApi} from '../../../apis/Functions/users';
...
@@ -28,6 +28,7 @@ import {verifyAccountApi} from '../../../apis/Functions/users';
import
PickerDate
from
'../../../components/Picker/PickerDate'
;
import
PickerDate
from
'../../../components/Picker/PickerDate'
;
import
PickerItem
from
'../../../components/Picker/PickerItem'
;
import
PickerItem
from
'../../../components/Picker/PickerItem'
;
import
{
saveUserToRedux
}
from
'../../../actions/users'
;
import
{
saveUserToRedux
}
from
'../../../actions/users'
;
import
I18n
from
'../../../helper/i18/i18n'
;
const
{
width
}
=
Dimensions
.
get
(
'window'
);
const
{
width
}
=
Dimensions
.
get
(
'window'
);
...
@@ -109,16 +110,16 @@ const Profile = (props) => {
...
@@ -109,16 +110,16 @@ const Profile = (props) => {
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
props
.
saveUserToRedux
(
res
.
data
.
data
);
props
.
saveUserToRedux
(
res
.
data
.
data
);
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
props
.
navigation
.
popToTop
();
props
.
navigation
.
popToTop
();
},
500
);
},
500
);
}
else
{
}
else
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
},
500
);
},
500
);
}
}
}
else
{
}
else
{
Alert
.
alert
(
'Vui lòng điền '
+
titles
[
index
]);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Vui lòng điền '
+
titles
[
index
]);
}
}
};
};
...
...
src/Screens/Action/History/History.js
View file @
456d9095
...
@@ -2,6 +2,7 @@ import React, {useState, useEffect} from 'react';
...
@@ -2,6 +2,7 @@ import React, {useState, useEffect} from 'react';
import
{
Alert
}
from
'react-native'
;
import
{
Alert
}
from
'react-native'
;
import
HistoryView
from
'./HistoryView'
;
import
HistoryView
from
'./HistoryView'
;
import
{
getListTransaction
}
from
'../../../apis/Functions/Widthdraw'
;
import
{
getListTransaction
}
from
'../../../apis/Functions/Widthdraw'
;
import
I18n
from
'../../../helper/i18/i18n'
;
const
History
=
(
props
)
=>
{
const
History
=
(
props
)
=>
{
const
[
selected
,
setSelected
]
=
useState
(
'ALL'
);
const
[
selected
,
setSelected
]
=
useState
(
'ALL'
);
...
@@ -38,7 +39,7 @@ const History = (props) => {
...
@@ -38,7 +39,7 @@ const History = (props) => {
setTotalPage
(
res
.
data
.
meta
.
pages
);
setTotalPage
(
res
.
data
.
meta
.
pages
);
console
.
log
(
res
.
data
.
data
);
console
.
log
(
res
.
data
.
data
);
}
else
{
}
else
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
}
}
};
};
...
...
src/Screens/Action/Wallet/Tab/Success.js
View file @
456d9095
...
@@ -4,6 +4,7 @@ import HeaderBack from '../../../../components/Header/HeaderBack';
...
@@ -4,6 +4,7 @@ import HeaderBack from '../../../../components/Header/HeaderBack';
import
Item
from
'./Item'
;
import
Item
from
'./Item'
;
import
{
getListTransaction
}
from
'../../../../apis/Functions/Widthdraw'
;
import
{
getListTransaction
}
from
'../../../../apis/Functions/Widthdraw'
;
import
AppText
from
'../../../../components/AppText'
;
import
AppText
from
'../../../../components/AppText'
;
import
I18n
from
'../../../../helper/i18/i18n'
;
const
Success
=
(
props
)
=>
{
const
Success
=
(
props
)
=>
{
const
[
page
,
setPage
]
=
useState
(
1
);
const
[
page
,
setPage
]
=
useState
(
1
);
...
@@ -34,7 +35,7 @@ const Success = (props) => {
...
@@ -34,7 +35,7 @@ const Success = (props) => {
setData
(
res
.
data
.
data
);
setData
(
res
.
data
.
data
);
setTotalPage
(
res
.
data
.
meta
.
pages
);
setTotalPage
(
res
.
data
.
meta
.
pages
);
}
else
{
}
else
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
}
}
};
};
...
...
src/Screens/Action/Wallet/Tab/Watting.js
View file @
456d9095
...
@@ -5,6 +5,9 @@ import Item from './Item';
...
@@ -5,6 +5,9 @@ import Item from './Item';
import
{
getListTransaction
}
from
'../../../../apis/Functions/Widthdraw'
;
import
{
getListTransaction
}
from
'../../../../apis/Functions/Widthdraw'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
AppText
from
'../../../../components/AppText'
;
import
AppText
from
'../../../../components/AppText'
;
import
I18n
from
'../../../../helper/i18/i18n'
;
const
Watting
=
(
props
)
=>
{
const
Watting
=
(
props
)
=>
{
const
[
page
,
setPage
]
=
useState
(
1
);
const
[
page
,
setPage
]
=
useState
(
1
);
const
[
data
,
setData
]
=
useState
([]);
const
[
data
,
setData
]
=
useState
([]);
...
@@ -39,7 +42,7 @@ const Watting = (props) => {
...
@@ -39,7 +42,7 @@ const Watting = (props) => {
setData
(
res
.
data
.
data
);
setData
(
res
.
data
.
data
);
setTotalPage
(
res
.
data
.
meta
.
pages
);
setTotalPage
(
res
.
data
.
meta
.
pages
);
}
else
{
}
else
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
}
}
};
};
...
...
src/Screens/Action/Wallet/Wallet.js
View file @
456d9095
...
@@ -42,16 +42,12 @@ const Wallet = (props) => {
...
@@ -42,16 +42,12 @@ const Wallet = (props) => {
<
TouchableOpacity
<
TouchableOpacity
onPress
=
{()
=>
navigate
.
navigate
(
WALLETDEPOSIT
)}
onPress
=
{()
=>
navigate
.
navigate
(
WALLETDEPOSIT
)}
style
=
{
styles
.
btnLeft
}
>
style
=
{
styles
.
btnLeft
}
>
<
AppText
i18nKey
=
{
'Deposit'
}
style
=
{
styles
.
txtTitle
}
>
<
AppText
i18nKey
=
{
'Deposit'
}
style
=
{
styles
.
txtTitle
}
><
/AppText
>
N
ạ
p
ti
ề
n
<
/AppText
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
TouchableOpacity
<
TouchableOpacity
onPress
=
{()
=>
navigate
.
navigate
(
WALLETWITHDRAW
)}
onPress
=
{()
=>
navigate
.
navigate
(
WALLETWITHDRAW
)}
style
=
{
styles
.
btnRight
}
>
style
=
{
styles
.
btnRight
}
>
<
AppText
i18nKey
=
{
'Withdraw'
}
style
=
{
styles
.
txtTitle
}
>
<
AppText
i18nKey
=
{
'Withdraw'
}
style
=
{
styles
.
txtTitle
}
><
/AppText
>
R
ú
t
ti
ề
n
<
/AppText
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
);
);
...
...
src/Screens/Action/Wallet/WalletDeposit.js
View file @
456d9095
...
@@ -22,6 +22,8 @@ import {connect} from 'react-redux';
...
@@ -22,6 +22,8 @@ import {connect} from 'react-redux';
import
{
showLoading
,
hideLoading
}
from
'../../../actions/loadingAction'
;
import
{
showLoading
,
hideLoading
}
from
'../../../actions/loadingAction'
;
import
{
walletDeposit
}
from
'../../../apis/Functions/Deposit'
;
import
{
walletDeposit
}
from
'../../../apis/Functions/Deposit'
;
import
TextMoney
from
'../../../components/Input/InputMoney'
;
import
TextMoney
from
'../../../components/Input/InputMoney'
;
import
I18n
from
'../../../helper/i18/i18n'
;
const
{
width
}
=
Dimensions
.
get
(
'window'
);
const
{
width
}
=
Dimensions
.
get
(
'window'
);
const
WalletDeposit
=
(
props
)
=>
{
const
WalletDeposit
=
(
props
)
=>
{
...
@@ -45,16 +47,16 @@ const WalletDeposit = (props) => {
...
@@ -45,16 +47,16 @@ const WalletDeposit = (props) => {
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
navigate
.
goBack
();
navigate
.
goBack
();
},
500
);
},
500
);
}
else
{
}
else
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
},
500
);
},
500
);
}
}
}
else
{
}
else
{
Alert
.
alert
(
'Vui lòng điền '
+
titles
[
index
]);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Vui lòng điền '
+
titles
[
index
]);
}
}
};
};
return
(
return
(
...
...
src/Screens/Action/Wallet/WalletWithdraw.js
View file @
456d9095
...
@@ -31,7 +31,7 @@ import {showLoading, hideLoading} from '../../../actions/loadingAction';
...
@@ -31,7 +31,7 @@ import {showLoading, hideLoading} from '../../../actions/loadingAction';
import
{
confirmAlert
}
from
'../../../components/Aleart'
;
import
{
confirmAlert
}
from
'../../../components/Aleart'
;
import
{
ADDMETHODPAY
}
from
'../../../routers/ScreenNames'
;
import
{
ADDMETHODPAY
}
from
'../../../routers/ScreenNames'
;
import
TextMoney
from
'../../../components/Input/InputMoney'
;
import
TextMoney
from
'../../../components/Input/InputMoney'
;
import
I18n
from
'../../../helper/i18/i18n'
;
var
radio_props
=
[
var
radio_props
=
[
{
label
:
'Từ ví'
,
value
:
'WALLET'
},
{
label
:
'Từ ví'
,
value
:
'WALLET'
},
{
label
:
'Từ tài khoản CQG'
,
value
:
'INVESTMENT'
},
{
label
:
'Từ tài khoản CQG'
,
value
:
'INVESTMENT'
},
...
@@ -72,7 +72,10 @@ const WalletWithdraw = (props) => {
...
@@ -72,7 +72,10 @@ const WalletWithdraw = (props) => {
setData
(
newList
);
setData
(
newList
);
}
}
}
else
{
}
else
{
alert
(
'Không lấy được danh sách phương thức!'
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Không lấy được danh sách phương thức!'
,
);
}
}
};
};
...
@@ -96,16 +99,16 @@ const WalletWithdraw = (props) => {
...
@@ -96,16 +99,16 @@ const WalletWithdraw = (props) => {
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
navigate
.
goBack
();
navigate
.
goBack
();
},
500
);
},
500
);
}
else
{
}
else
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
},
500
);
},
500
);
}
}
}
else
{
}
else
{
Alert
.
alert
(
'Vui lòng điền '
+
titles
[
index
]);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Vui lòng điền '
+
titles
[
index
]);
}
}
};
};
...
...
src/Screens/Authen/ConfirmEmail.js
View file @
456d9095
...
@@ -16,6 +16,7 @@ import {useNavigation} from '@react-navigation/native';
...
@@ -16,6 +16,7 @@ import {useNavigation} from '@react-navigation/native';
import
{
CONFIRMOTP
}
from
'../../routers/ScreenNames'
;
import
{
CONFIRMOTP
}
from
'../../routers/ScreenNames'
;
import
{
getOTPApi
}
from
'../../apis/Functions/users'
;
import
{
getOTPApi
}
from
'../../apis/Functions/users'
;
import
{
showLoading
,
hideLoading
}
from
'../../actions/loadingAction'
;
import
{
showLoading
,
hideLoading
}
from
'../../actions/loadingAction'
;
import
I18n
from
'../../helper/i18/i18n'
;
const
ConfirmEmail
=
(
props
)
=>
{
const
ConfirmEmail
=
(
props
)
=>
{
const
[
value
,
setValue
]
=
useState
(
''
);
const
[
value
,
setValue
]
=
useState
(
''
);
...
@@ -35,11 +36,11 @@ const ConfirmEmail = (props) => {
...
@@ -35,11 +36,11 @@ const ConfirmEmail = (props) => {
navigate
.
navigate
(
CONFIRMOTP
,
{
email
:
value
});
navigate
.
navigate
(
CONFIRMOTP
,
{
email
:
value
});
}
else
{
}
else
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Alert
.
alert
(
'Thông báo'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
},
500
);
},
500
);
}
}
}
else
{
}
else
{
Alert
.
alert
(
'Thông báo'
,
'Vui lòng nhập email!'
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
'Vui lòng nhập email!'
);
}
}
};
};
...
...
src/Screens/Authen/ConfirmOTP.js
View file @
456d9095
...
@@ -21,6 +21,7 @@ import R from '../../assets/R';
...
@@ -21,6 +21,7 @@ import R from '../../assets/R';
import
{
NEWPASSWORD
}
from
'../../routers/ScreenNames'
;
import
{
NEWPASSWORD
}
from
'../../routers/ScreenNames'
;
import
{
verifyOTPApi
}
from
'../../apis/Functions/users'
;
import
{
verifyOTPApi
}
from
'../../apis/Functions/users'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
{
showLoading
,
hideLoading
}
from
'../../actions/loadingAction'
;
import
{
showLoading
,
hideLoading
}
from
'../../actions/loadingAction'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
...
@@ -40,9 +41,9 @@ const ConfirmOTP = (propsa) => {
...
@@ -40,9 +41,9 @@ const ConfirmOTP = (propsa) => {
const
confirm
=
async
()
=>
{
const
confirm
=
async
()
=>
{
if
(
!
value
)
{
if
(
!
value
)
{
Alert
.
alert
(
'Thông báo'
,
'Vui long nhập mã OTP'
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
'Vui long nhập mã OTP'
);
}
else
if
(
value
.
length
!=
4
)
{
}
else
if
(
value
.
length
!=
4
)
{
Alert
.
alert
(
'Thông báo'
,
'Mã OTP không đúng định dạng'
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
'Mã OTP không đúng định dạng'
);
}
else
{
}
else
{
propsa
.
showLoading
();
propsa
.
showLoading
();
const
res
=
await
verifyOTPApi
({
const
res
=
await
verifyOTPApi
({
...
@@ -59,7 +60,7 @@ const ConfirmOTP = (propsa) => {
...
@@ -59,7 +60,7 @@ const ConfirmOTP = (propsa) => {
email
:
propsa
.
route
.
params
.
email
,
email
:
propsa
.
route
.
params
.
email
,
});
});
}
else
{
}
else
{
Alert
.
alert
(
'Thông báo'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
}
}
}
}
};
};
...
...
src/Screens/Authen/Login.js
View file @
456d9095
...
@@ -26,6 +26,7 @@ import {showLoading, hideLoading} from '../../actions/loadingAction';
...
@@ -26,6 +26,7 @@ import {showLoading, hideLoading} from '../../actions/loadingAction';
import
{
saveUserToRedux
}
from
'../../actions/users'
;
import
{
saveUserToRedux
}
from
'../../actions/users'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
messaging
from
'@react-native-firebase/messaging'
;
import
messaging
from
'@react-native-firebase/messaging'
;
import
I18n
from
'../../helper/i18/i18n'
;
const
Login
=
(
props
)
=>
{
const
Login
=
(
props
)
=>
{
const
{
navigation
}
=
props
;
const
{
navigation
}
=
props
;
...
@@ -86,11 +87,11 @@ const Login = (props) => {
...
@@ -86,11 +87,11 @@ const Login = (props) => {
});
});
}
else
{
}
else
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Alert
.
alert
(
'Thông báo'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
},
500
);
},
500
);
}
}
}
else
{
}
else
{
Alert
.
alert
(
'Thông báo'
,
'Vui lòng điền '
+
titles
[
index
]);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
'Vui lòng điền '
+
titles
[
index
]);
}
}
};
};
...
...
src/Screens/Authen/Registor.js
View file @
456d9095
...
@@ -14,6 +14,7 @@ import {checkFormatArray} from '../../Config/Functions';
...
@@ -14,6 +14,7 @@ import {checkFormatArray} from '../../Config/Functions';
import
{
showLoading
,
hideLoading
}
from
'../../actions/loadingAction'
;
import
{
showLoading
,
hideLoading
}
from
'../../actions/loadingAction'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
registorApi
}
from
'../../apis/Functions/users'
;
import
{
registorApi
}
from
'../../apis/Functions/users'
;
import
I18n
from
'../../helper/i18/i18n'
;
const
Registor
=
(
props
)
=>
{
const
Registor
=
(
props
)
=>
{
const
{
navigation
}
=
props
;
const
{
navigation
}
=
props
;
...
@@ -51,16 +52,16 @@ const Registor = (props) => {
...
@@ -51,16 +52,16 @@ const Registor = (props) => {
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Alert
.
alert
(
'Thông báo'
,
'Đăng ký tài khoản thành công!'
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
'Đăng ký tài khoản thành công!'
);
navigation
.
navigate
(
'LOGIN'
);
navigation
.
navigate
(
'LOGIN'
);
},
500
);
},
500
);
}
else
{
}
else
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
},
500
);
},
500
);
}
}
}
else
{
}
else
{
Alert
.
alert
(
'Thông báo!'
,
'Vui lòng điền '
+
titles
[
index
]);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
'Vui lòng điền '
+
titles
[
index
]);
}
}
};
};
...
...
src/Screens/Home/Home.js
View file @
456d9095
...
@@ -2,6 +2,7 @@ import React, {useEffect, useState} from 'react';
...
@@ -2,6 +2,7 @@ import React, {useEffect, useState} from 'react';
import
{
View
,
Alert
}
from
'react-native'
;
import
{
View
,
Alert
}
from
'react-native'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
getTransaction
}
from
'../../apis/Functions/users'
;
import
{
getTransaction
}
from
'../../apis/Functions/users'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
HomeView
from
'./HomeView'
;
import
HomeView
from
'./HomeView'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
...
@@ -19,7 +20,7 @@ const Home = (props) => {
...
@@ -19,7 +20,7 @@ const Home = (props) => {
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
setData
(
res
.
data
.
data
);
setData
(
res
.
data
.
data
);
}
else
{
}
else
{
Alert
.
alert
(
'Thông báo!'
,
'Không lấy được thông tin!'
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
'Không lấy được thông tin!'
);
}
}
};
};
...
...
src/Screens/Home/Menu.js
View file @
456d9095
...
@@ -17,6 +17,7 @@ import LinearGradient from 'react-native-linear-gradient';
...
@@ -17,6 +17,7 @@ import LinearGradient from 'react-native-linear-gradient';
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
HEIGHTXD
,
toPriceVnd
}
from
'../../Config/Functions'
;
import
{
HEIGHTXD
,
toPriceVnd
}
from
'../../Config/Functions'
;
import
Clipboard
from
'@react-native-clipboard/clipboard'
;
import
Clipboard
from
'@react-native-clipboard/clipboard'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
import
{
...
@@ -33,7 +34,7 @@ const HeaderHome = (props) => {
...
@@ -33,7 +34,7 @@ const HeaderHome = (props) => {
const
[
sponsorID
,
setSponsorID
]
=
useState
(
'sponsorIDlink'
);
const
[
sponsorID
,
setSponsorID
]
=
useState
(
'sponsorIDlink'
);
const
copyToClipboard
=
()
=>
{
const
copyToClipboard
=
()
=>
{
Alert
.
alert
(
'Đã sao chép!'
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Đã sao chép!'
);
Clipboard
.
setString
(
sponsorID
);
Clipboard
.
setString
(
sponsorID
);
};
};
...
...
src/Screens/Menu/Profile/Tab/GeneralInfor.js
View file @
456d9095
...
@@ -48,16 +48,16 @@ const GeneralInfor = (props) => {
...
@@ -48,16 +48,16 @@ const GeneralInfor = (props) => {
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
props
.
saveUserToRedux
(
res
.
data
.
data
);
props
.
saveUserToRedux
(
res
.
data
.
data
);
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
props
.
navigation
.
popToTop
();
props
.
navigation
.
popToTop
();
},
500
);
},
500
);
}
else
{
}
else
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
},
500
);
},
500
);
}
}
}
else
{
}
else
{
Alert
.
alert
(
'Thông báo!'
,
'Vui lòng điền '
+
titles
[
index
]);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
'Vui lòng điền '
+
titles
[
index
]);
}
}
};
};
...
...
src/Screens/MethodPay/AddMethod.js
View file @
456d9095
...
@@ -24,6 +24,7 @@ import PickerItem from '../../components/Picker/PickerItem';
...
@@ -24,6 +24,7 @@ import PickerItem from '../../components/Picker/PickerItem';
import
{
getListBank
,
addMethodBank
}
from
'../../apis/Functions/Widthdraw'
;
import
{
getListBank
,
addMethodBank
}
from
'../../apis/Functions/Widthdraw'
;
import
{
showLoading
,
hideLoading
}
from
'../../actions/loadingAction'
;
import
{
showLoading
,
hideLoading
}
from
'../../actions/loadingAction'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
I18n
from
'../../helper/i18/i18n'
;
const
{
width
}
=
Dimensions
.
get
(
'window'
);
const
{
width
}
=
Dimensions
.
get
(
'window'
);
...
@@ -47,7 +48,10 @@ const AddMethodPay = (props) => {
...
@@ -47,7 +48,10 @@ const AddMethodPay = (props) => {
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
setData
(
res
.
data
.
data
);
setData
(
res
.
data
.
data
);
}
else
{
}
else
{
alert
(
'Không lấy được danh sách ngân hàng!'
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Không lấy được danh sách ngân hàng!'
,
);
}
}
};
};
...
@@ -76,16 +80,16 @@ const AddMethodPay = (props) => {
...
@@ -76,16 +80,16 @@ const AddMethodPay = (props) => {
props
.
hideLoading
();
props
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
navigate
.
goBack
();
navigate
.
goBack
();
},
500
);
},
500
);
}
else
{
}
else
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
},
500
);
},
500
);
}
}
}
else
{
}
else
{
Alert
.
alert
(
'Vui lòng điền '
+
titles
[
index
]);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Vui lòng điền '
+
titles
[
index
]);
}
}
};
};
...
...
src/Screens/MethodPay/MethodPayDetail.js
View file @
456d9095
...
@@ -15,6 +15,7 @@ import {
...
@@ -15,6 +15,7 @@ import {
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
R
from
'../../assets/R'
;
import
R
from
'../../assets/R'
;
import
HeaderBack
from
'../../components/Header/HeaderBack'
;
import
HeaderBack
from
'../../components/Header/HeaderBack'
;
import
I18n
from
'../../helper/i18/i18n'
;
import
Item
from
'./Item'
;
import
Item
from
'./Item'
;
import
{
getFontXD
,
WIDTHXD
,
checkFormatArray
}
from
'../../Config/Functions'
;
import
{
getFontXD
,
WIDTHXD
,
checkFormatArray
}
from
'../../Config/Functions'
;
...
@@ -60,18 +61,19 @@ const MethodPayDetail = (props) => {
...
@@ -60,18 +61,19 @@ const MethodPayDetail = (props) => {
props
.
hideLoading
();
props
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
navigate
.
goBack
();
navigate
.
goBack
();
},
500
);
},
500
);
}
else
{
}
else
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
},
500
);
},
500
);
}
}
}
else
{
}
else
{
Alert
.
alert
(
'Thông báo!'
,
'Không có gì thay đổi'
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
'Không có gì thay đổi'
);
}
}
}
else
Alert
.
alert
(
'Thông báo!'
,
'Vui lòng điền '
+
titles
[
index
]);
}
else
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Vui lòng điền '
+
titles
[
index
]);
};
};
const
onRemove
=
async
()
=>
{
const
onRemove
=
async
()
=>
{
...
@@ -83,12 +85,12 @@ const MethodPayDetail = (props) => {
...
@@ -83,12 +85,12 @@ const MethodPayDetail = (props) => {
props
.
hideLoading
();
props
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
navigate
.
goBack
();
navigate
.
goBack
();
},
500
);
},
500
);
}
else
{
}
else
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
},
500
);
},
500
);
}
}
};
};
...
...
src/Screens/NewFeed/Calendar/Calendar.js
View file @
456d9095
...
@@ -2,6 +2,7 @@ import React, {Component, useState, useEffect, useRef} from 'react';
...
@@ -2,6 +2,7 @@ import React, {Component, useState, useEffect, useRef} from 'react';
import
{
View
,
Text
,
Platform
,
FlatList
}
from
'react-native'
;
import
{
View
,
Text
,
Platform
,
FlatList
}
from
'react-native'
;
import
{
getListCalendar
}
from
'../../../apis/Functions/NewFeed'
;
import
{
getListCalendar
}
from
'../../../apis/Functions/NewFeed'
;
import
{
convertTimeApi
}
from
'../../../Config/Functions'
;
import
{
convertTimeApi
}
from
'../../../Config/Functions'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
Item
from
'./item'
;
import
Item
from
'./item'
;
const
NewFeed
=
(
props
)
=>
{
const
NewFeed
=
(
props
)
=>
{
...
@@ -30,7 +31,7 @@ const NewFeed = (props) => {
...
@@ -30,7 +31,7 @@ const NewFeed = (props) => {
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
setData
(
res
.
data
.
data
);
setData
(
res
.
data
.
data
);
}
else
{
}
else
{
Alert
.
alert
(
'Thông báo'
,
'Không lấy được dữ liệu!'
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Can_not_get_data'
)
);
}
}
};
};
...
...
src/Screens/NewFeed/Media/Media.js
View file @
456d9095
import
React
,
{
Component
,
useEffect
,
useState
}
from
'react'
;
import
React
,
{
Component
,
useEffect
,
useState
}
from
'react'
;
import
{
View
,
Text
,
Platform
,
Alert
}
from
'react-native'
;
import
{
View
,
Text
,
Platform
,
Alert
}
from
'react-native'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
MediaView
from
'./MediaView'
;
import
MediaView
from
'./MediaView'
;
import
{
getListMedia
}
from
'../../../apis/Functions/NewFeed'
;
import
{
getListMedia
}
from
'../../../apis/Functions/NewFeed'
;
...
@@ -23,7 +24,7 @@ const Media = (props) => {
...
@@ -23,7 +24,7 @@ const Media = (props) => {
setMediaHot
(
res
.
data
.
data
[
0
].
data
[
0
]);
setMediaHot
(
res
.
data
.
data
[
0
].
data
[
0
]);
setData
(
res
.
data
.
data
);
setData
(
res
.
data
.
data
);
}
else
{
}
else
{
Alert
.
alert
(
'Thông báo'
,
'Không lấy được dữ liệu!'
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Can_not_get_data'
)
);
}
}
};
};
...
...
src/Screens/NewFeed/Media/MediaDetail.js
View file @
456d9095
...
@@ -15,6 +15,7 @@ import Icon from 'react-native-vector-icons/AntDesign';
...
@@ -15,6 +15,7 @@ import Icon from 'react-native-vector-icons/AntDesign';
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
MEDIADETAIL
}
from
'../../../routers/ScreenNames'
;
import
{
MEDIADETAIL
}
from
'../../../routers/ScreenNames'
;
import
{
getDetailMedia
}
from
'../../../apis/Functions/NewFeed'
;
import
{
getDetailMedia
}
from
'../../../apis/Functions/NewFeed'
;
import
I18n
from
'../../../helper/i18/i18n'
;
const
Item
=
(
props
)
=>
{
const
Item
=
(
props
)
=>
{
const
navigate
=
useNavigation
();
const
navigate
=
useNavigation
();
...
@@ -62,7 +63,7 @@ const MediaDetail = (props) => {
...
@@ -62,7 +63,7 @@ const MediaDetail = (props) => {
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
setData
(
res
.
data
.
data
);
setData
(
res
.
data
.
data
);
}
else
{
}
else
{
Alert
.
alert
(
'Thông báo'
,
'Không lấy được dữ liệu!'
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'Can_not_get_data'
)
);
}
}
};
};
return
(
return
(
...
...
src/Screens/NewFeed/Tab1/Tab1.js
View file @
456d9095
...
@@ -13,6 +13,7 @@ import R from '../../../assets/R';
...
@@ -13,6 +13,7 @@ import R from '../../../assets/R';
import
{
getFontXD
}
from
'../../../Config/Functions'
;
import
{
getFontXD
}
from
'../../../Config/Functions'
;
import
Item
from
'./item'
;
import
Item
from
'./item'
;
import
{
getListNew
,
getListCategoryNew
}
from
'../../../apis/Functions/NewFeed'
;
import
{
getListNew
,
getListCategoryNew
}
from
'../../../apis/Functions/NewFeed'
;
import
I18n
from
'../../../helper/i18/i18n'
;
const
NewFeed
=
(
props
)
=>
{
const
NewFeed
=
(
props
)
=>
{
const
[
selected
,
setSelected
]
=
useState
(
''
);
const
[
selected
,
setSelected
]
=
useState
(
''
);
...
@@ -33,7 +34,7 @@ const NewFeed = (props) => {
...
@@ -33,7 +34,7 @@ const NewFeed = (props) => {
setFillters
(
res
.
data
.
data
);
setFillters
(
res
.
data
.
data
);
console
.
log
(
res
.
data
.
data
);
console
.
log
(
res
.
data
.
data
);
}
else
{
}
else
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
}
}
};
};
...
@@ -60,7 +61,7 @@ const NewFeed = (props) => {
...
@@ -60,7 +61,7 @@ const NewFeed = (props) => {
setData
(
res
.
data
.
data
);
setData
(
res
.
data
.
data
);
setTotalPage
(
res
.
data
.
meta
.
pages
);
setTotalPage
(
res
.
data
.
meta
.
pages
);
}
else
{
}
else
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
}
}
setisRefresh
(
false
);
setisRefresh
(
false
);
};
};
...
...
src/Screens/Notification/Notification.js
View file @
456d9095
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
getListNotification
}
from
'../../apis/Functions/users'
;
import
{
getListNotification
}
from
'../../apis/Functions/users'
;
import
NotificationView
from
'./NotificaitonView'
;
import
NotificationView
from
'./NotificaitonView'
;
import
I18n
from
'../../helper/i18/i18n'
;
const
Notifcation
=
(
props
)
=>
{
const
Notifcation
=
(
props
)
=>
{
const
[
selected
,
setSelected
]
=
useState
(
''
);
const
[
selected
,
setSelected
]
=
useState
(
''
);
const
[
page
,
setPage
]
=
useState
(
1
);
const
[
page
,
setPage
]
=
useState
(
1
);
...
@@ -29,7 +29,7 @@ const Notifcation = (props) => {
...
@@ -29,7 +29,7 @@ const Notifcation = (props) => {
setData
(
res
.
data
.
data
);
setData
(
res
.
data
.
data
);
setTotalPage
(
res
.
data
.
meta
.
pages
);
setTotalPage
(
res
.
data
.
meta
.
pages
);
}
else
{
}
else
{
Alert
.
alert
(
'Thông báo!'
,
res
.
data
.
message
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
res
.
data
.
message
);
}
}
};
};
...
...
src/components/Aleart.js
View file @
456d9095
import
{
Alert
}
from
'react-native'
;
import
{
Alert
}
from
'react-native'
;
import
I18n
from
'../helper/i18/i18n'
;
export
const
NotificationAlert
=
(
string
)
=>
{
export
const
NotificationAlert
=
(
string
)
=>
{
Alert
.
alert
(
'Thông báo'
,
string
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
)
,
string
);
};
};
export
const
confirmAlert
=
(
content
,
callback
)
=>
{
export
const
confirmAlert
=
(
content
,
callback
)
=>
{
Alert
.
alert
(
Alert
.
alert
(
'Thông báo'
,
I18n
.
t
(
'Notification'
)
,
content
,
content
,
[
[
{
{
text
:
'Hủy'
,
text
:
I18n
.
t
(
'Cancel'
)
,
style
:
'cancel'
,
style
:
'cancel'
,
},
},
{
{
text
:
'Đồng ý'
,
text
:
I18n
.
t
(
'Ok'
)
,
onPress
:
()
=>
{
onPress
:
()
=>
{
callback
();
callback
();
},
},
...
...
src/components/Header/HeaderHome.js
View file @
456d9095
...
@@ -158,7 +158,7 @@ const HeaderHome = (props) => {
...
@@ -158,7 +158,7 @@ const HeaderHome = (props) => {
const
navigate
=
useNavigation
();
const
navigate
=
useNavigation
();
const
copyToClipboard
=
()
=>
{
const
copyToClipboard
=
()
=>
{
Alert
.
alert
(
'Đã sao chép link giới thiệu!'
);
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
'Đã sao chép link giới thiệu!'
);
Clipboard
.
setString
(
props
.
user
.
sponsor_url
);
Clipboard
.
setString
(
props
.
user
.
sponsor_url
);
};
};
...
...
src/helper/i18/locales/en.js
View file @
456d9095
...
@@ -62,7 +62,6 @@ export default {
...
@@ -62,7 +62,6 @@ export default {
Phone
:
'Phone'
,
Phone
:
'Phone'
,
Address
:
'Address'
,
Address
:
'Address'
,
Update
:
'Update'
,
Update
:
'Update'
,
ContactCode
:
'Contact code'
,
ContactCode
:
'Contact code'
,
TraddingAccountName
:
'Tradding account name'
,
TraddingAccountName
:
'Tradding account name'
,
TraddingAccountNumber
:
'Tradding account number'
,
TraddingAccountNumber
:
'Tradding account number'
,
...
@@ -71,7 +70,8 @@ export default {
...
@@ -71,7 +70,8 @@ export default {
CustomerAgreement
:
'Customer agreement'
,
CustomerAgreement
:
'Customer agreement'
,
BusinessAgreement
:
'Business agreement'
,
BusinessAgreement
:
'Business agreement'
,
PartnershipAgreement
:
'Partnership agreement'
,
PartnershipAgreement
:
'Partnership agreement'
,
Waiting
:
'Waiting'
,
Waiting
:
'Waiting'
,
Success
:
'Success'
,
Success
:
'Success'
,
OK
:
'Ok'
,
Can_not_get_data
:
"Can't get data"
,
};
};
src/helper/i18/locales/vn.js
View file @
456d9095
...
@@ -70,4 +70,9 @@ export default {
...
@@ -70,4 +70,9 @@ export default {
CustomerAgreement
:
'Thoả thuận khách hàng'
,
CustomerAgreement
:
'Thoả thuận khách hàng'
,
BusinessAgreement
:
'Thoả thuận kinh doanh chung'
,
BusinessAgreement
:
'Thoả thuận kinh doanh chung'
,
PartnershipAgreement
:
'Thoả thuận quan hệ đối tác'
,
PartnershipAgreement
:
'Thoả thuận quan hệ đối tác'
,
Waiting
:
'Đang chờ'
,
Success
:
'Thành công'
,
Can_not_get_data
:
'Không lấy được dữ liệu!'
,
Cancel
:
'Huỷ'
,
};
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment