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
10902d82
Commit
10902d82
authored
May 06, 2021
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit cqg screen
parent
c88e19fa
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
170 additions
and
11 deletions
+170
-11
PacketCQG.js
src/Screens/Account/PacrtCQG/PacketCQG.js
+6
-0
SwiperComponent.js
src/Screens/Home/SwiperComponent.js
+4
-4
CQG.js
src/Screens/Menu/Profile/Tab/CQG.js
+48
-7
FixBug.json
src/helper/FixBug.json
+112
-0
No files found.
src/Screens/Account/PacrtCQG/PacketCQG.js
View file @
10902d82
...
@@ -54,9 +54,15 @@ const PacketCQG = (props) => {
...
@@ -54,9 +54,15 @@ const PacketCQG = (props) => {
const
onChangeMoney
=
()
=>
{
const
onChangeMoney
=
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
let
totalMoney
=
0
;
let
totalMoney
=
0
;
console
.
log
(
listData
);
listData
.
map
((
e
)
=>
{
listData
.
map
((
e
)
=>
{
if
(
e
.
id
==
10
)
totalMoney
-=
960000
;
if
(
e
.
id
==
11
)
totalMoney
-=
90000
;
totalMoney
+=
e
.
price_package
.
price
;
totalMoney
+=
e
.
price_package
.
price
;
});
});
const
result
=
listData
.
find
((
e
)
=>
e
.
id
==
10
);
console
.
log
(
result
);
setPrice
(
totalMoney
);
setPrice
(
totalMoney
);
},
1000
);
},
1000
);
};
};
...
...
src/Screens/Home/SwiperComponent.js
View file @
10902d82
...
@@ -8,7 +8,7 @@ import {HEIGHTXD} from '../../Config/Functions';
...
@@ -8,7 +8,7 @@ import {HEIGHTXD} from '../../Config/Functions';
const
styles
=
StyleSheet
.
create
({
const
styles
=
StyleSheet
.
create
({
container
:
{
container
:
{
width
:
'100%'
,
width
:
'100%'
,
height
:
HEIGHTXD
(
44
0
),
height
:
HEIGHTXD
(
50
0
),
marginTop
:
25
,
marginTop
:
25
,
marginBottom
:
10
,
marginBottom
:
10
,
borderTopWidth
:
0.5
,
borderTopWidth
:
0.5
,
...
@@ -38,21 +38,21 @@ const SwiperComponent = (props) => {
...
@@ -38,21 +38,21 @@ const SwiperComponent = (props) => {
<
Swiper
style
=
{
styles
.
wrapper
}
loop
=
{
true
}
autoplay
=
{
true
}
>
<
Swiper
style
=
{
styles
.
wrapper
}
loop
=
{
true
}
autoplay
=
{
true
}
>
<
View
>
<
View
>
<
Image
<
Image
style
=
{{
height
:
HEIGHTXD
(
44
0
),
width
:
'100%'
}}
style
=
{{
height
:
HEIGHTXD
(
50
0
),
width
:
'100%'
}}
source
=
{{
uri
:
props
.
listImage
[
0
].
url
}}
source
=
{{
uri
:
props
.
listImage
[
0
].
url
}}
resizeMode
=
{
'cover'
}
resizeMode
=
{
'cover'
}
/
>
/
>
<
/View
>
<
/View
>
<
View
>
<
View
>
<
Image
<
Image
style
=
{{
height
:
HEIGHTXD
(
44
0
),
width
:
'100%'
}}
style
=
{{
height
:
HEIGHTXD
(
50
0
),
width
:
'100%'
}}
source
=
{{
uri
:
props
.
listImage
[
1
].
url
}}
source
=
{{
uri
:
props
.
listImage
[
1
].
url
}}
resizeMode
=
{
'cover'
}
resizeMode
=
{
'cover'
}
/
>
/
>
<
/View
>
<
/View
>
<
View
>
<
View
>
<
Image
<
Image
style
=
{{
height
:
HEIGHTXD
(
44
0
),
width
:
'100%'
}}
style
=
{{
height
:
HEIGHTXD
(
50
0
),
width
:
'100%'
}}
source
=
{{
uri
:
props
.
listImage
[
2
].
url
}}
source
=
{{
uri
:
props
.
listImage
[
2
].
url
}}
resizeMode
=
{
'cover'
}
resizeMode
=
{
'cover'
}
/
>
/
>
...
...
src/Screens/Menu/Profile/Tab/CQG.js
View file @
10902d82
...
@@ -5,16 +5,18 @@ import {getFontXD} from '../../../../Config/Functions';
...
@@ -5,16 +5,18 @@ import {getFontXD} from '../../../../Config/Functions';
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
AppText
from
'../../../../components/AppText'
;
import
AppText
from
'../../../../components/AppText'
;
import
I18n
from
'../../../../helper/i18/i18n'
;
import
I18n
from
'../../../../helper/i18/i18n'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
{
PACKETCQG
}
from
'../../../../routers/ScreenNames'
;
const
Profile
=
(
props
)
=>
{
const
Profile
=
(
props
)
=>
{
const
navigation
=
useNavigation
();
return
(
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
{
props
.
user
.
status
==
3
?
(
{
props
.
user
.
status
==
6
?
(
<
View
>
<
View
>
{
' '
}
<
View
style
=
{
styles
.
item
}
>
<
View
style
=
{
styles
.
item
}
>
<
AppText
i18nKey
=
{
'ContactCode'
}
style
=
{
styles
.
txtTitle
}
><
/AppText
>
<
AppText
i18nKey
=
{
'ContactCode'
}
style
=
{
styles
.
txtTitle
}
><
/AppText
>
<
Text
style
=
{
styles
.
txtBig
}
>
{
props
.
user
.
c
qg_id
}
<
/Text
>
<
Text
style
=
{
styles
.
txtBig
}
>
{
props
.
user
.
c
ontract_code
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
item
}
>
<
View
style
=
{
styles
.
item
}
>
<
AppText
<
AppText
...
@@ -26,12 +28,29 @@ const Profile = (props) => {
...
@@ -26,12 +28,29 @@ const Profile = (props) => {
<
AppText
<
AppText
i18nKey
=
{
'TraddingAccountNumber'
}
i18nKey
=
{
'TraddingAccountNumber'
}
style
=
{
styles
.
txtTitle
}
><
/AppText
>
style
=
{
styles
.
txtTitle
}
><
/AppText
>
<
Text
style
=
{
styles
.
txtBig
}
>
{
props
.
user
.
account
}
<
/Text
>
<
Text
style
=
{
styles
.
txtBig
}
>
{
props
.
user
.
cqg_
account
}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
)
:
(
)
:
(
<
View
>
<
View
style
=
{{
justifyContent
:
'center'
,
alignItems
:
'center'
,
flex
:
1
}}
>
<
Text
>
Hello
<
/Text
>
{
props
.
user
.
status
==
5
?
(
<
AppText
i18nKey
=
{
'WaitVerification'
}
style
=
{
styles
.
txtNoti1
}
><
/AppText
>
)
:
(
<
View
style
=
{{
justifyContent
:
'center'
,
alignItems
:
'center'
}}
>
<
AppText
i18nKey
=
{
'PopupOpenCQG'
}
style
=
{
styles
.
txtNoti
}
><
/AppText
>
<
TouchableOpacity
onPress
=
{()
=>
navigation
.
navigate
(
PACKETCQG
)}
style
=
{
styles
.
containerBtn
}
>
<
AppText
i18nKey
=
{
'OpenAccountCQG'
}
style
=
{
styles
.
txtBtn
}
><
/AppText
>
<
/TouchableOpacity
>
<
/View
>
)}
<
/View
>
<
/View
>
)}
)}
<
/View
>
<
/View
>
...
@@ -54,12 +73,34 @@ const styles = StyleSheet.create({
...
@@ -54,12 +73,34 @@ const styles = StyleSheet.create({
fontSize
:
getFontXD
(
42
),
fontSize
:
getFontXD
(
42
),
color
:
R
.
colors
.
color777
,
color
:
R
.
colors
.
color777
,
marginBottom
:
5
,
marginBottom
:
5
,
paddingTop
:
5
,
paddingTop
:
5
,
},
},
txtNoti
:
{
fontSize
:
getFontXD
(
42
),
color
:
R
.
colors
.
black
,
marginBottom
:
5
,
textAlign
:
'center'
,
},
txtNoti1
:
{
fontSize
:
getFontXD
(
52
),
color
:
R
.
colors
.
orange
,
marginBottom
:
5
,
textAlign
:
'center'
,
},
txtBig
:
{
txtBig
:
{
fontSize
:
getFontXD
(
46
),
fontSize
:
getFontXD
(
46
),
},
},
txtBtn
:
{
fontSize
:
getFontXD
(
52
),
color
:
R
.
colors
.
white
,
},
containerBtn
:
{
paddingVertical
:
10
,
paddingHorizontal
:
20
,
backgroundColor
:
R
.
colors
.
main
,
borderRadius
:
5
,
marginTop
:
30
,
},
});
});
const
mapStateToProps
=
(
state
)
=>
{
const
mapStateToProps
=
(
state
)
=>
{
...
...
src/helper/FixBug.json
0 → 100644
View file @
10902d82
import
io.invertase.gradle.common.PackageJson
buildscript
{
//
The
Android
Gradle
plugin
is
only
required
when
opening
the
android
folder
stand-alone.
//
This
avoids
unnecessary
downloads
and
potential
conflicts
when
the
library
is
included
as
a
//
module
dependency
in
an
application
project.
if
(project
==
rootProject)
{
repositories
{
google()
jcenter()
}
dependencies
{
classpath(
"com.android.tools.build:gradle:3.5.2"
)
}
}
}
plugins
{
id
"io.invertase.gradle.build"
version
"1.4"
}
def
appProject
if
(findProject('
:
@react-native-firebase_app'))
{
appProject
=
project('
:
@react-native-firebase_app')
}
else
if
(findProject('
:
react-native-firebase_app'))
{
appProject
=
project('
:
react-native-firebase_app')
}
else
{
throw
new
GradleException('Could
not
find
the
react-native-firebase/app
package
,
have
you
installed
it?')
}
def
packageJson
=
PackageJson.getForProject(project)
def
appPackageJson
=
PackageJson.getForProject(appProject)
def
firebaseBomVersion
=
appPackageJson
[
'sdkVersions'
]
?
appPackageJson
[
'sdkVersions'
][
'android'
][
'firebase'
]
:
"25.3.1"
def
coreVersionDetected
=
appPackageJson
[
'version'
]
def
coreVersionRequired
=
packageJson
[
'peerDependencies'
][
appPackageJson
[
'name'
]]
//
Only
log
after
build
completed
so
log
warning
appears
at
the
end
if
(coreVersionDetected
!=
coreVersionRequired)
{
gradle.buildFinished
{
project.logger.warn(
"ReactNativeFirebase WARNING: NPM package '${packageJson['name']}' depends on '${appPackageJson['name']}' v${coreVersionRequired} but found v${coreVersionDetected}, this might cause build issues or runtime crashes."
)
}
}
project.ext
{
set('react-native'
,
[
versions
:
[
android
:
[
minSdk
:
16
,
targetSdk
:
28
,
compileSdk
:
28
,
//
optional
as
gradle.buildTools
comes
with
one
by
default
//
overriding
here
though
to
match
the
version
RN
uses
buildTools
:
"28.0.3"
],
firebase
:
[
bom
:
firebaseBomVersion
,
],
],
]
)
}
apply
from
:
file(
"./../../app/android/firebase-json.gradle"
)
def
autoInitEnabled
=
"true"
def
notificationChannelId
=
""
def
defaultNotificationColor
=
"@color/white"
;
def
notificationColor
=
defaultNotificationColor
if
(rootProject.ext
&&
rootProject.ext.firebaseJson)
{
if
(rootProject.ext.firebaseJson.isFlagEnabled(
"messaging_auto_init_enabled"
)
==
false
)
{
autoInitEnabled
=
"false"
}
notificationChannelId
=
rootProject.ext.firebaseJson.getStringValue(
"messaging_android_notification_channel_id"
,
""
)
notificationColor
=
rootProject.ext.firebaseJson.getStringValue(
"messaging_android_notification_color"
,
defaultNotificationColor)
}
android
{
defaultConfig
{
multiDexEnabled
true
manifestPlaceholders
=
[
firebaseJsonAutoInitEnabled
:
autoInitEnabled
,
firebaseJsonNotificationChannelId
:
notificationChannelId
,
firebaseJsonNotificationColor
:
notificationColor
]
}
lintOptions
{
disable
'GradleCompatible'
abortOnError
false
}
compileOptions
{
sourceCompatibility
JavaVersion.VERSION_
1
_
8
targetCompatibility
JavaVersion.VERSION_
1
_
8
}
}
repositories
{
google()
jcenter()
}
dependencies
{
api
appProject
implementation
platform(
"com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("
firebase
", "
bom
")}"
)
implementation
"com.google.firebase:firebase-messaging"
}
ReactNative.shared.applyPackageVersion()
ReactNative.shared.applyDefaultExcludes()
ReactNative.module.applyAndroidVersions()
ReactNative.module.applyReactNativeDependency(
"api"
)
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