Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
clone_excelso
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Prasetya Saputra
clone_excelso
Commits
0618900f
Commit
0618900f
authored
Jun 25, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
memperbaiki home
parent
afe77d64
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
14 deletions
+43
-14
Auth.js
view/Auth.js
+14
-3
Home.js
view/Home.js
+23
-11
Login.js
view/Login.js
+6
-0
No files found.
view/Auth.js
View file @
0618900f
...
...
@@ -6,6 +6,7 @@ import ActionType from '../redux/globalActionType';
import
MenuSelection
from
'./MenuSelection'
;
import
{
FontAwesome
}
from
'@expo/vector-icons'
;
import
Home
from
'./Home'
;
import
{
SimpleLineIcons
}
from
'@expo/vector-icons'
;
import
Login
from
'./Login'
;
import
Register
from
'./Register'
;
import
ResetPassword
from
'./ResetPassword'
;
...
...
@@ -59,10 +60,11 @@ import UpdateVersion from './UpdateVersion';
import
SettingUrl
from
'./setBaseUrl'
;
import
InboxList
from
'./InboxList'
;
import
InboxDetail
from
'./InboxDetail'
;
import
badgeInbox
from
'./Home'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
enableScreens
();
const
Tab
=
createBottomTabNavigator
();
const
BottomNavigation
=
({
state
,
descriptors
,
navigation
})
=>
{
...
...
@@ -124,9 +126,7 @@ const BottomNavigation = ({ state, descriptors, navigation }) => {
onLongPress
=
{
onLongPress
}
style
=
{{
flex
:
1
,
alignItems
:
'center'
,
backgroundColor
:
'white'
,
borderTopWidth
:
1
,
borderTopColor
:
'#f0f0f0'
}}
>
<
Image
source
=
{
icon
}
style
=
{{
height
:
50
,
width
:
50
,
tintColor
:
isFocused
?
'#CFB368'
:
'gray'
}}
/
>
<
/TouchableOpacity
>
);
})}
...
...
@@ -134,6 +134,16 @@ const BottomNavigation = ({ state, descriptors, navigation }) => {
)
}
function
HandleInbox
({
navigation
})
{
return
(
<
View
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Inbox List'
)}
>
<
SimpleLineIcons
name
=
"bell"
size
=
{
24
}
color
=
"white"
/>
<
/TouchableOpacity
>
<
/View
>
)
}
function
HomePage
({
navigation
})
{
return
(
<
Tab
.
Navigator
tabBar
=
{
props
=>
<
BottomNavigation
{...
props
}
/>
}
...
...
@@ -319,6 +329,7 @@ class Auth extends React.Component {
<
Stack
.
Screen
name
=
"Home"
component
=
{
HomePage
}
options
=
{{
headerShown
:
false
,
headerRight
:
props
=>
<
HandleInbox
{...
props
}
/>
,
title
:
'TODAY PROMOTION'
,
headerStyle
:
{
backgroundColor
:
'#CFB368'
},
headerTitleContainerStyle
:
{
alignContent
:
'center'
},
...
...
view/Home.js
View file @
0618900f
...
...
@@ -14,7 +14,8 @@ import CheckVersion from '../function/CheckVersion';
import
ActionType
from
'../redux/globalActionType'
;
import
Toast
from
'react-native-tiny-toast'
;
import
i18n
from
'i18n-js'
;
import
{
Badge
}
from
'react-native-elements'
import
{
Badge
}
from
'react-native-elements'
;
import
NumberFormat
from
'react-number-format'
;
let
version
=
info
.
expo
.
version
let
buildNumber
=
info
.
expo
.
android
.
versionCode
...
...
@@ -172,7 +173,7 @@ class Home extends React.Component {
}
// console.log(params);
Axios
.
post
(
this
.
props
.
BASE_URL
+
'crm/v2/member/get_profile'
,
params
).
then
(
res
=>
{
console
.
log
(
"data"
+
JSON
.
stringify
(
res
)
)
const
dataCard
=
res
.
data
let
point
=
dataCard
.
kaspro_point
let
balance
=
dataCard
.
kaspro_balance
...
...
@@ -461,7 +462,7 @@ class Home extends React.Component {
<
Text
style
=
{{
fontSize
:
10
,
fontFamily
:
'Gotham-Light'
}}
>
{
i18n
.
t
(
'cardnumber'
)}
<
/Text
>
<
/View
>
<
View
style
=
{{
flex
:
0.5
}}
>
<
Text
style
=
{{
fontSize
:
10
,
textAlign
:
'right'
,
fontFamily
:
'Gotham-Light'
}}
>
{
i18n
.
t
(
'
active
'
)}
{
this
.
state
.
member_since
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
10
,
textAlign
:
'right'
,
fontFamily
:
'Gotham-Light'
}}
>
{
i18n
.
t
(
'
expired
'
)}
{
this
.
state
.
member_since
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
paddingHorizontal
:
10
}}
>
...
...
@@ -493,7 +494,8 @@ class Home extends React.Component {
{
this
.
state
.
old_balance_claimed
==
false
?
(
<
Card
style
=
{{
padding
:
10
,
margin
:
10
,
alignContent
:
'center'
}}
>
<
View
style
=
{{
flex
:
1
,
height
:
80
,
borderRadius
:
20
,
marginRight
:
10
,
marginLeft
:
10
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
14
,
fontFamily
:
'Gotham-Light'
,
textAlign
:
'center'
,
marginBottom
:
10
}}
>
CREDIT
:
{
this
.
state
.
old_balance
}
<
/Text
>
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
this
.
state
.
old_balance
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
top
:
20
,
textAlign
:
'center'
,
color
:
'#838383'
}}
>
CREDIT
:
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
{
/* <Text style={{ fontSize: 14, fontFamily: 'Gotham-Light', textAlign: 'center', marginBottom: 10 }}>CREDIT : {this.state.old_balance} </Text> */
}
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handleClaimCredit
()}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
marginRight
:
20
,
marginLeft
:
20
,
justifyContent
:
'center'
}}
>
...
...
@@ -513,7 +515,7 @@ class Home extends React.Component {
<
Text
style
=
{{
fontSize
:
10
,
fontFamily
:
'Gotham-Light'
}}
>
{
i18n
.
t
(
'cardnumber'
)}
<
/Text
>
<
/View
>
<
View
style
=
{{
flex
:
0.5
}}
>
<
Text
style
=
{{
fontSize
:
10
,
textAlign
:
'right'
,
fontFamily
:
'Gotham-Light'
,
color
:
'red'
}}
>
{
i18n
.
t
(
'expired'
)}
{
this
.
state
.
expire_date
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
10
,
textAlign
:
'right'
,
fontFamily
:
'Gotham-Light'
}}
>
{
i18n
.
t
(
'expired'
)}
{
this
.
state
.
expire_date
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
paddingHorizontal
:
10
}}
>
...
...
@@ -553,7 +555,8 @@ class Home extends React.Component {
{
this
.
state
.
old_balance_claimed
==
false
?
(
<
Card
style
=
{{
padding
:
10
,
margin
:
10
,
alignContent
:
'center'
}}
>
<
View
style
=
{{
flex
:
1
,
height
:
80
,
borderRadius
:
20
,
marginRight
:
10
,
marginLeft
:
10
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
14
,
fontFamily
:
'Gotham-Light'
,
textAlign
:
'center'
,
marginBottom
:
10
}}
>
CREDIT
:
{
this
.
state
.
old_balance
}
<
/Text
>
{
/* <Text style={{ fontSize: 14, fontFamily: 'Gotham-Light', textAlign: 'center', marginBottom: 10 }}>CREDIT : {this.state.old_balance} </Text> */
}
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
this
.
state
.
old_balance
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Light'
,
top
:
20
,
textAlign
:
'center'
,
color
:
'#838383'
}}
>
CREDIT
:
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handleClaimCredit
()}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
marginRight
:
20
,
marginLeft
:
20
,
justifyContent
:
'center'
}}
>
...
...
@@ -571,9 +574,16 @@ class Home extends React.Component {
<
View
style
=
{{
flex
:
0.5
}}
>
<
Text
style
=
{{
fontSize
:
10
,
fontFamily
:
'Gotham-Light'
}}
>
{
i18n
.
t
(
'cardnumber'
)}
<
/Text
>
<
/View
>
{
this
.
state
.
is_expired_date
==
true
?
(
<
View
style
=
{{
flex
:
0.5
}}
>
<
Text
style
=
{{
fontSize
:
10
,
textAlign
:
'right'
,
fontFamily
:
'Gotham-Light
'
}}
>
{
i18n
.
t
(
'expired'
)}
{
this
.
state
.
expire_date
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
10
,
textAlign
:
'right'
,
fontFamily
:
'Gotham-Light'
,
color
:
'red
'
}}
>
{
i18n
.
t
(
'expired'
)}
{
this
.
state
.
expire_date
}
<
/Text
>
<
/View
>
):(
<
View
style
=
{{
flex
:
0.5
}}
>
<
Text
style
=
{{
fontSize
:
10
,
textAlign
:
'right'
,
fontFamily
:
'Gotham-Light'
}}
>
{
i18n
.
t
(
'expired'
)}
{
this
.
state
.
expire_date
}
<
/Text
>
<
/View>
)
}
<
/View
>
<
View
style
=
{{
paddingHorizontal
:
10
}}
>
<
Text
style
=
{{
textAlign
:
"center"
,
fontSize
:
30
,
color
:
'#c9af6d'
,
fontFamily
:
'Gotham-Black'
}}
>
...
...
@@ -599,6 +609,7 @@ class Home extends React.Component {
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
line2
}
><
/View
>
{
this
.
state
.
is_expired_date
==
true
?
(
<
View
style
=
{{
justifyContent
:
'center'
,
marginTop
:
20
}}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Renewal'
)}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
marginRight
:
20
,
marginLeft
:
20
,
justifyContent
:
'center'
}}
>
...
...
@@ -606,6 +617,7 @@ class Home extends React.Component {
<
/View
>
<
/TouchableOpacity
>
<
/View
>
):(
null
)}
<
/Card
>
<
/View
>
)
...
...
view/Login.js
View file @
0618900f
...
...
@@ -183,6 +183,12 @@ class Login extends React.Component {
proses
:
''
}
let
pageProps
=
{
pageEmailConfirmation
:
true
}
this
.
props
.
setPage
(
pageProps
)
this
.
props
.
setProses
(
prosesProps
);
this
.
props
.
setLoginInfo
(
loginProps
);
this
.
setState
({
...
...
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