Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
new_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
new_excelso
Commits
c8f3c23a
Commit
c8f3c23a
authored
Jun 05, 2020
by
Trisno
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://repo.cs.co.id:2222/wahyu/bahanoprek
parents
784de36c
06b84cb9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
17 deletions
+12
-17
session.js
function/session.js
+9
-16
Home.js
view/Home.js
+1
-1
Login.js
view/Login.js
+2
-0
No files found.
function/session.js
View file @
c8f3c23a
import
{
Alert
}
from
'react-native'
;
import
{
Alert
,
ToastAndroid
}
from
'react-native'
;
export
default
function
session
(
response
,
error_status
,
navigation
)
{
export
default
function
session
(
response
,
error_status
,
navigation
)
{
if
(
response
.
code
===
"WRONG_SESSION_ID"
)
{
if
(
error_status
!=
500
)
{
if
(
response
.
code
==
"WRONG_SESSION_ID"
)
{
Alert
.
alert
(
Alert
.
alert
(
''
,
response_data
.
msg
);
'Session'
,
}
else
{
'Session Anda Sudah Habis Silahkan Logout Terlebih Dahulu ! '
,
Alert
.
alert
(
''
,
response_data
.
msg
);
[
}
}
else
{
{
text
:
'OK'
,
onPress
:
()
=>
navigation
.
replace
(
'Login'
)
}
]
)
}
else
if
(
error_status
==
500
)
{
Alert
.
alert
(
Alert
.
alert
(
'Server'
,
'Server'
,
'Server Error '
,
'Server Error '
,
...
@@ -23,7 +18,5 @@ export default function session(response,error_status, navigation) {
...
@@ -23,7 +18,5 @@ export default function session(response,error_status, navigation) {
]
]
)
)
}
else
{
Alert
.
alert
(
response_data
.
msg
);
}
}
}
}
\ No newline at end of file
view/Home.js
View file @
c8f3c23a
...
@@ -297,7 +297,7 @@ class Home extends React.Component {
...
@@ -297,7 +297,7 @@ class Home extends React.Component {
<
ActivityIndicator
size
=
"small"
color
=
"#c9af6d"
/>
<
ActivityIndicator
size
=
"small"
color
=
"#c9af6d"
/>
)
:
(
)
:
(
<
Text
style
=
{{
textAlign
:
"center"
,
fontSize
:
12
,
top
:
5
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
<
Text
style
=
{{
textAlign
:
"center"
,
fontSize
:
12
,
top
:
5
,
fontFamily
:
'Gotham-Light'
,
color
:
'#838383'
}}
>
Excelso
{
this
.
props
.
name_outlet
}
{
this
.
props
.
name_outlet
}
<
/Text
>
<
/Text
>
)}
)}
{
/* <TouchableOpacity style={styles.submitOrder} activeOpacity={.5} onPress={() => this._orderNow()}>
{
/* <TouchableOpacity style={styles.submitOrder} activeOpacity={.5} onPress={() => this._orderNow()}>
...
...
view/Login.js
View file @
c8f3c23a
...
@@ -205,6 +205,7 @@ class Login extends React.Component {
...
@@ -205,6 +205,7 @@ class Login extends React.Component {
autoCapitalize
=
"none"
autoCapitalize
=
"none"
value
=
{
this
.
state
.
email
}
value
=
{
this
.
state
.
email
}
keyboardType
=
'email-address'
keyboardType
=
'email-address'
removeClippedSubviews
=
{
false
}
/
>
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
1
,
height
:
50
,
marginRight
:
30
,
marginLeft
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
flex
:
1
,
height
:
50
,
marginRight
:
30
,
marginLeft
:
30
,
justifyContent
:
'center'
}}
>
...
@@ -214,6 +215,7 @@ class Login extends React.Component {
...
@@ -214,6 +215,7 @@ class Login extends React.Component {
onChangeText
=
{
password
=>
this
.
setState
({
password
})}
onChangeText
=
{
password
=>
this
.
setState
({
password
})}
value
=
{
this
.
state
.
password
}
value
=
{
this
.
state
.
password
}
secureTextEntry
=
{
true
}
secureTextEntry
=
{
true
}
removeClippedSubviews
=
{
false
}
/
>
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
1
,
height
:
40
,
marginRight
:
70
,
marginLeft
:
70
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
flex
:
1
,
height
:
40
,
marginRight
:
70
,
marginLeft
:
70
,
justifyContent
:
'center'
}}
>
...
...
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