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
28a9d4c6
Commit
28a9d4c6
authored
Jun 16, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update version
parent
2abb5789
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
123 additions
and
4 deletions
+123
-4
CheckVersion.js
function/CheckVersion.js
+29
-0
Home.js
view/Home.js
+5
-4
UpdateVersion.js
view/UpdateVersion.js
+89
-0
No files found.
function/CheckVersion.js
0 → 100644
View file @
28a9d4c6
import
Axios
from
'axios'
;
import
Constants
from
'expo-constants'
;
import
{
Alert
}
from
'react-native'
;
export
default
function
CheckVersion
(
navigation
)
{
let
version
=
Constants
.
manifest
.
version
Axios
.
get
(
'https://excelsocrm.ravintoladev.com/cms/v2/detail/apps-version'
).
then
(
respon
=>
{
let
version_server
=
respon
.
data
.
content5
let
msg_res
=
respon
.
data
.
content6
if
(
version_server
!==
'2.0.1'
)
{
Alert
.
alert
(
'Update Version'
,
msg_res
,
[
{
text
:
'Cancel'
,
onPress
:
()
=>
console
.
log
(
'Cancel Pressed'
),
style
:
'cancel'
},
{
text
:
'OK'
,
onPress
:
()
=>
navigation
.
navigate
(
'UpdateVersion'
)
}
],
{
cancelable
:
false
}
);
}
}).
catch
(
error
=>
{
console
.
log
(
error
)
})
}
\ No newline at end of file
view/Home.js
View file @
28a9d4c6
...
@@ -10,6 +10,7 @@ import { Card } from 'react-native-shadow-cards';
...
@@ -10,6 +10,7 @@ import { Card } from 'react-native-shadow-cards';
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
info
from
'../app.json'
;
import
info
from
'../app.json'
;
import
session
from
'../function/session'
;
import
session
from
'../function/session'
;
import
CheckVersion
from
'../function/CheckVersion'
;
import
ActionType
from
'../redux/globalActionType'
;
import
ActionType
from
'../redux/globalActionType'
;
import
Toast
from
'react-native-tiny-toast'
;
import
Toast
from
'react-native-tiny-toast'
;
...
@@ -37,10 +38,9 @@ class Home extends React.Component {
...
@@ -37,10 +38,9 @@ class Home extends React.Component {
}
}
componentDidMount
()
{
componentDidMount
()
{
console
.
log
(
'ini outlet id'
+
this
.
props
.
outlet_id
)
const
{
navigation
}
=
this
.
props
console
.
log
(
'ini nama outlet '
+
this
.
props
.
name_outlet
)
CheckVersion
(
navigation
)
console
.
log
(
'ini alamat outlet '
+
this
.
props
.
outlet_detailadress
)
const
screenWidth
=
Math
.
round
(
Dimensions
.
get
(
'window'
).
width
);
const
screenWidth
=
Math
.
round
(
Dimensions
.
get
(
'window'
).
width
);
this
.
setState
({
this
.
setState
({
slider_height
:
screenWidth
slider_height
:
screenWidth
...
@@ -671,6 +671,7 @@ const mapStateToProps = (state) => {
...
@@ -671,6 +671,7 @@ const mapStateToProps = (state) => {
// login
// login
in_payment
:
state
.
in_payment
,
in_payment
:
state
.
in_payment
,
BASE_URL
:
state
.
BASE_URL
,
email
:
state
.
email
,
email
:
state
.
email
,
outlet_id
:
state
.
outlet_id
,
outlet_id
:
state
.
outlet_id
,
name_outlet
:
state
.
name_outlet
,
name_outlet
:
state
.
name_outlet
,
...
...
view/UpdateVersion.js
0 → 100644
View file @
28a9d4c6
import
Axios
from
'axios'
;
import
React
from
'react'
;
import
{
ScrollView
,
StyleSheet
,
Text
,
View
,
Image
,
StatusBar
}
from
'react-native'
;
import
{
TouchableOpacity
}
from
'react-native-gesture-handler'
;
import
HTML
from
'react-native-render-html'
;
import
{
Collapse
,
CollapseHeader
,
CollapseBody
,
AccordionList
}
from
'accordion-collapse-react-native'
import
{
getStatusBarHeight
}
from
'react-native-status-bar-height'
;
import
MyStatusBar
from
'./MyStatusBar'
;
export
default
class
TopUpInfo
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
}
}
componentDidMount
()
{
}
render
()
{
return
(
<
View
style
=
{
styles
.
container
}
>
<
ScrollView
>
<
View
style
=
{
styles
.
content
}
>
<
View
>
<
/View
>
<
/View
>
<
/ScrollView
>
<
/View
>
)
}
}
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
backgroundColor
:
'white'
},
headerTitle
:
{
flex
:
1
,
textAlign
:
'center'
,
margin
:
20
,
fontSize
:
23
,
alignSelf
:
'center'
,
color
:
'white'
,
fontFamily
:
'Gotham-Black'
},
image_container
:
(
height
)
=>
({
height
:
height
,
backgroundColor
:
'gray'
}),
image
:
(
height
)
=>
({
width
:
'100%'
,
height
:
height
}),
title
:
{
textAlign
:
'center'
,
fontFamily
:
'Gotham-Black'
,
fontSize
:
22
,
marginBottom
:
10
,
color
:
'#CFB368'
},
content
:
{
paddingHorizontal
:
20
,
paddingVertical
:
25
},
item_container
:
{
borderColor
:
'gray'
,
borderWidth
:
1
,
borderRadius
:
10
,
marginBottom
:
20
,
color
:
'#adadad'
},
item_title
:
{
fontSize
:
18
,
color
:
'#adadad'
,
fontFamily
:
'Gotham-Black'
,
flex
:
1
,
alignSelf
:
'center'
,
},
item_image
:
{
width
:
96
,
height
:
28
,
alignItems
:
'flex-end'
}
})
\ No newline at end of file
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