Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Ad1Appraisal-Mobile
Project
Project
Details
Activity
Releases
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
Dida Adams Arizona
Ad1Appraisal-Mobile
Commits
50c0c1d5
Commit
50c0c1d5
authored
Mar 09, 2020
by
didam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
didam
parent
0fb3b39d
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
87 additions
and
16 deletions
+87
-16
history.js
app/container/history/history.js
+11
-1
appraisal.js
app/container/home/appraisal/appraisal.js
+22
-5
approval.js
app/container/home/approval/approval.js
+8
-2
homepageScreen.js
app/container/home/homepageScreen.js
+4
-3
penerimaan.js
app/container/home/penerimaan/penerimaan.js
+17
-3
notif.js
app/container/notif/notif.js
+14
-1
profile.js
app/container/profile/profile.js
+11
-1
No files found.
app/container/history/history.js
View file @
50c0c1d5
import
React
,
{
Component
}
from
'react'
;
import
{
Container
,
Text
}
from
'native-base'
;
import
{
View
,
ScrollView
}
from
'react-native'
;
import
{
View
,
ScrollView
,
BackHandler
}
from
'react-native'
;
import
M
from
'moment'
import
SvgAnimatedLinearGradient
from
'react-native-svg-animated-linear-gradient'
import
Svg
,
{
Circle
,
Rect
}
from
'react-native-svg'
...
...
@@ -84,8 +84,18 @@ class History extends Component {
this
.
setState
({
dataLoad
:
true
,
loading
:
false
})
},
2000
);
this
.
getHistory
()
BackHandler
.
addEventListener
(
"hardwareBackPress"
,
this
.
onBackPressed
);
}
componentWillUnmount
()
{
BackHandler
.
removeEventListener
(
"hardwareBackPress"
,
this
.
onBackPressed
);
}
onBackPressed
=
()
=>
{
this
.
props
.
navigation
.
goBack
();
return
true
;
};
getHistory
()
{
api
.
create
().
getHistory
().
then
((
response
)
=>
{
...
...
app/container/home/appraisal/appraisal.js
View file @
50c0c1d5
import
React
,
{
Component
}
from
'react'
import
{
Text
,
View
,
ScrollView
,
TouchableOpacity
}
from
'react-native'
import
{
Text
,
View
,
ScrollView
,
TouchableOpacity
,
BackHandler
}
from
'react-native'
import
{
Container
}
from
'native-base'
import
api
from
'../../../service/api'
import
SvgAnimatedLinearGradient
from
'react-native-svg-animated-linear-gradient'
...
...
@@ -24,8 +24,19 @@ export default class Appraisal extends Component {
componentDidMount
()
{
this
.
getListAppraisal
()
BackHandler
.
addEventListener
(
"hardwareBackPress"
,
this
.
onBackPressed
);
// AsyncStorage.setItem(Constant.TOKEN, 'keisiiii')
}
componentWillUnmount
()
{
BackHandler
.
removeEventListener
(
"hardwareBackPress"
,
this
.
onBackPressed
);
}
onBackPressed
=
()
=>
{
this
.
props
.
navigation
.
goBack
()
return
true
;
};
getListAppraisal
()
{
this
.
setState
({
loading
:
true
})
// alert(this.props.navigation.state.params.data.value)
...
...
@@ -43,6 +54,8 @@ export default class Appraisal extends Component {
this
.
setState
({
loading
:
false
})
},
500
);
})
}
else
{
this
.
setState
({
loading
:
false
})
}
})
}
...
...
@@ -53,7 +66,11 @@ export default class Appraisal extends Component {
<
NavigationEvents
onDidFocus
=
{()
=>
this
.
getListAppraisal
()}
/
>
<
ScrollView
style
=
{{
paddingHorizontal
:
20
,
backgroundColor
:
'#F5F5F5'
,
paddingTop
:
10
}}
showsVerticalScrollIndicator
=
{
false
}
>
{
this
.
state
.
listData
.
length
==
0
&&
<
View
style
=
{{
flex
:
1
,
alignItems
:
'center'
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontStyle
:
'italic'
}}
>
No
data
found
...
<
/Text
>
<
/View>
}
{
this
.
state
.
listData
.
length
>
0
&&
<
ScrollView
style
=
{{
paddingHorizontal
:
20
,
backgroundColor
:
'#F5F5F5'
,
paddingTop
:
10
}}
showsVerticalScrollIndicator
=
{
false
}
>
{
this
.
state
.
listData
.
map
((
item
,
index
)
=>
{
return
(
<
View
key
=
{
index
}
style
=
{{
paddingHorizontal
:
7
}}
>
...
...
@@ -98,7 +115,7 @@ export default class Appraisal extends Component {
)
})}
<
/ScrollView
>
<
/ScrollView>
}
<
/Container
>
)
}
...
...
app/container/home/approval/approval.js
View file @
50c0c1d5
...
...
@@ -64,6 +64,8 @@ export default class Approval extends Component {
this
.
setState
({
loading
:
false
})
},
500
);
})
}
else
{
this
.
setState
({
loading
:
false
})
}
})
}
...
...
@@ -122,7 +124,11 @@ export default class Approval extends Component {
/
>
<
Text
style
=
{{
marginLeft
:
-
10
}}
>
Select
All
<
/Text
>
<
/TouchableOpacity>
}
<
ScrollView
style
=
{{
paddingHorizontal
:
20
,
backgroundColor
:
'#F5F5F5'
,
paddingTop
:
this
.
state
.
longPress
?
0
:
10
}}
showsVerticalScrollIndicator
=
{
false
}
>
{
this
.
state
.
listData
.
length
==
0
&&
<
View
style
=
{{
flex
:
1
,
alignItems
:
'center'
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontStyle
:
'italic'
}}
>
No
data
found
...
<
/Text
>
<
/View>
}
{
this
.
state
.
listData
.
length
>
0
&&
<
ScrollView
style
=
{{
paddingHorizontal
:
20
,
backgroundColor
:
'#F5F5F5'
,
paddingTop
:
this
.
state
.
longPress
?
0
:
10
}}
showsVerticalScrollIndicator
=
{
false
}
>
{
this
.
state
.
listData
.
map
((
item
,
index
)
=>
{
return
(
<
View
key
=
{
index
}
style
=
{{
paddingHorizontal
:
7
}}
>
...
...
@@ -178,7 +184,7 @@ export default class Approval extends Component {
<
/View
>
)
})}
<
/ScrollView
>
<
/ScrollView>
}
{
this
.
state
.
longPress
&&
<
View
style
=
{{
width
:
'100%'
,
paddingHorizontal
:
50
,
paddingBottom
:
10
,
backgroundColor
:
"#f5f5f5"
,
alignItems
:
'center'
,
justifyContent
:
'center'
,}}
>
<
AwesomeButton
width
=
{
'100%'
}
raiseLevel
=
{
3
}
springRelease
=
{
true
}
type
=
"primary"
...
...
app/container/home/homepageScreen.js
View file @
50c0c1d5
...
...
@@ -197,6 +197,7 @@ class HomePageScreen extends Component {
<
/View
>
<
/View
>
<
/Modal
>
<
ScrollView
style
=
{{
flex
:
1
}}
>
<
ImageBackground
source
=
{
Images
.
background2
}
style
=
{{
width
:
'100%'
,
height
:
200
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
alignItems
:
'center'
,
justifyContent
:
'flex-end'
,
flex
:
1
}}
>
...
...
@@ -247,12 +248,12 @@ class HomePageScreen extends Component {
<FontAwesome5Icon name={'angle-down'} color={'#fff'} size={20} style={{marginLeft: 10, marginBottom: -1}}/> */
}
<
/View
>
<
/ImageBackground
>
<
View
style
=
{{
padding
:
10
,
paddingVertical
:
20
,
flexDirection
:
'row'
,
width
:
'100%'
}}
>
<
View
style
=
{{
padding
:
10
,
paddingVertical
:
20
,
flexDirection
:
'row'
,
width
:
'100%'
,
justifyContent
:
'space-evenly'
,
}}
>
{
this
.
state
.
data
.
map
((
item
,
index
)
=>
{
var
itemVis
=
item
==
'Penerimaan'
?
this
.
state
.
visAccepted
:
item
==
'Appraisal'
?
this
.
state
.
visAppraisal
:
this
.
state
.
visApproved
return
(
itemVis
&&
<
TouchableOpacity
onPress
=
{()
=>
this
.
handleNav
(
item
)}
key
=
{
index
}
activeOpacity
=
{.
5
}
>
<
Image
source
=
{
item
==
'Penerimaan'
?
Images
.
IconPenerimaan
:
item
==
'Appraisal'
?
Images
.
IconAppraisal
:
Images
.
IconApproval
}
style
=
{{
width
:
125
,
height
:
125
,
marginLeft
:
0
}}
/
>
itemVis
&&
<
TouchableOpacity
onPress
=
{()
=>
this
.
handleNav
(
item
)}
key
=
{
index
}
activeOpacity
=
{.
5
}
style
=
{{
width
:
'30%'
,
height
:
125
}}
>
<
Image
source
=
{
item
==
'Penerimaan'
?
Images
.
IconPenerimaan
:
item
==
'Appraisal'
?
Images
.
IconAppraisal
:
Images
.
IconApproval
}
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
marginLeft
:
0
}}
/
>
<
/TouchableOpacity
>
)
})}
...
...
app/container/home/penerimaan/penerimaan.js
View file @
50c0c1d5
import
React
,
{
Component
}
from
'react'
import
{
Text
,
View
,
ScrollView
,
TouchableOpacity
}
from
'react-native'
import
{
Text
,
View
,
ScrollView
,
TouchableOpacity
,
BackHandler
}
from
'react-native'
import
{
Container
,
Fab
,
Icon
}
from
'native-base'
import
SvgAnimatedLinearGradient
from
'react-native-svg-animated-linear-gradient'
import
Svg
,
{
Circle
,
Rect
}
from
'react-native-svg'
...
...
@@ -23,8 +23,18 @@ export default class Penerimaan extends Component {
componentDidMount
()
{
this
.
getListData
()
// alert(JSON.stringify(this.props))
BackHandler
.
addEventListener
(
"hardwareBackPress"
,
this
.
onBackPressed
);
}
componentWillUnmount
()
{
BackHandler
.
removeEventListener
(
"hardwareBackPress"
,
this
.
onBackPressed
);
}
onBackPressed
=
()
=>
{
this
.
props
.
navigation
.
goBack
()
return
true
;
};
getListData
()
{
api
.
create
().
getListClar
({
warehouse_id
:
Number
(
this
.
props
.
navigation
.
state
.
params
.
data
.
value
)
...
...
@@ -48,7 +58,11 @@ export default class Penerimaan extends Component {
<
NavigationEvents
onDidFocus
=
{()
=>
this
.
getListData
()}
/
>
<
ScrollView
style
=
{{
paddingHorizontal
:
20
,
backgroundColor
:
'#F5F5F5'
,
paddingTop
:
10
}}
showsVerticalScrollIndicator
=
{
false
}
>
{
this
.
state
.
listClar
.
length
==
0
&&
<
View
style
=
{{
flex
:
1
,
alignItems
:
'center'
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontStyle
:
'italic'
}}
>
No
data
found
...
<
/Text
>
<
/View>
}
{
this
.
state
.
listClar
.
length
>
0
&&
<
ScrollView
style
=
{{
paddingHorizontal
:
20
,
backgroundColor
:
'#F5F5F5'
,
paddingTop
:
10
}}
showsVerticalScrollIndicator
=
{
false
}
>
{
this
.
state
.
listClar
.
map
((
item
,
index
)
=>
{
return
(
<
View
key
=
{
index
}
style
=
{{
paddingHorizontal
:
7
}}
>
...
...
@@ -91,7 +105,7 @@ export default class Penerimaan extends Component {
)
})}
<
/ScrollView
>
<
/ScrollView>
}
<
Fab
active
=
{
true
}
direction
=
"up"
...
...
app/container/notif/notif.js
View file @
50c0c1d5
import
React
,
{
Component
}
from
'react'
;
import
{
Container
}
from
'native-base'
;
import
{
View
,
Text
,
ScrollView
,
Image
}
from
'react-native'
;
import
{
View
,
Text
,
ScrollView
,
Image
,
BackHandler
}
from
'react-native'
;
import
Images
from
'../../library/images'
;
class
Notif
extends
Component
{
...
...
@@ -27,6 +27,19 @@ class Notif extends Component {
]
}
}
componentDidMount
()
{
BackHandler
.
addEventListener
(
"hardwareBackPress"
,
this
.
onBackPressed
);
}
componentWillUnmount
()
{
BackHandler
.
removeEventListener
(
"hardwareBackPress"
,
this
.
onBackPressed
);
}
onBackPressed
=
()
=>
{
this
.
props
.
navigation
.
goBack
();
return
true
;
};
render
()
{
return
(
<
Container
>
...
...
app/container/profile/profile.js
View file @
50c0c1d5
...
...
@@ -4,7 +4,7 @@ import LinearGradient from 'react-native-linear-gradient';
import
Colors
from
'../../library/colors'
;
import
FontAwesome5
from
'react-native-vector-icons/FontAwesome5'
import
MaterialIcons
from
'react-native-vector-icons/MaterialIcons'
import
{
Image
,
Keyboard
}
from
'react-native'
;
import
{
Image
,
Keyboard
,
BackHandler
}
from
'react-native'
;
import
Images
from
'../../library/images'
;
import
AwesomeButton
from
'react-native-really-awesome-button'
;
import
AsyncStorage
from
'@react-native-community/async-storage'
;
...
...
@@ -25,8 +25,18 @@ class Profile extends Component {
componentDidMount
()
{
this
.
getToken
()
BackHandler
.
addEventListener
(
"hardwareBackPress"
,
this
.
onBackPressed
);
}
componentWillUnmount
()
{
BackHandler
.
removeEventListener
(
"hardwareBackPress"
,
this
.
onBackPressed
);
}
onBackPressed
=
()
=>
{
this
.
props
.
navigation
.
goBack
();
return
true
;
};
navigateToLogin
(
next
)
{
next
()
AsyncStorage
.
clear
(()
=>
{
...
...
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