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
692c6cd3
Commit
692c6cd3
authored
Mar 09, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tambahan buat demo katanya
parent
3a4d696a
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
468 additions
and
227 deletions
+468
-227
sampleMenuAppraisal.js
app/container/home/appraisal/sampleMenuAppraisal.js
+46
-75
sampleMenuAppraisal2.js
app/container/home/appraisal/sampleMenuAppraisal2.js
+217
-97
sampleMenuAppraisal3.js
app/container/home/appraisal/sampleMenuAppraisal3.js
+49
-6
penerimaan.js
app/container/home/penerimaan/penerimaan.js
+2
-2
sampleMenuPenerimaan.js
app/container/home/penerimaan/sampleMenuPenerimaan.js
+118
-30
sampleMenuPenerimaan2.js
app/container/home/penerimaan/sampleMenuPenerimaan2.js
+11
-2
sampleMenuPenerimaan3.js
app/container/home/penerimaan/sampleMenuPenerimaan3.js
+20
-14
api.js
app/service/api.js
+5
-1
No files found.
app/container/home/appraisal/sampleMenuAppraisal.js
View file @
692c6cd3
This diff is collapsed.
Click to expand it.
app/container/home/appraisal/sampleMenuAppraisal2.js
View file @
692c6cd3
This diff is collapsed.
Click to expand it.
app/container/home/appraisal/sampleMenuAppraisal3.js
View file @
692c6cd3
import
React
,
{
Component
}
from
'react'
import
React
,
{
Component
}
from
'react'
import
{
Text
,
View
,
TextInput
,
ScrollView
,
StyleSheet
}
from
'react-native'
import
{
Text
,
View
,
TextInput
,
ScrollView
,
StyleSheet
,
BackHandler
}
from
'react-native'
import
{
Collapse
,
CollapseHeader
,
CollapseBody
}
from
"accordion-collapse-react-native"
;
import
{
Collapse
,
CollapseHeader
,
CollapseBody
}
from
"accordion-collapse-react-native"
;
import
{
Thumbnail
,
List
,
ListItem
,
Separator
,
Container
}
from
'native-base'
;
import
{
Thumbnail
,
List
,
ListItem
,
Separator
,
Container
}
from
'native-base'
;
import
{
RadioButton
}
from
'react-native-paper'
;
import
{
RadioButton
}
from
'react-native-paper'
;
...
@@ -39,10 +39,31 @@ export default class sampleMenuAppraisal3 extends Component {
...
@@ -39,10 +39,31 @@ export default class sampleMenuAppraisal3 extends Component {
}
}
}
}
validasi
(){
componentDidMount
()
{
BackHandler
.
addEventListener
(
'hardwareBackPress'
,
this
.
handleBackButtonClick
);
}
componentWillUnmount
()
{
BackHandler
.
removeEventListener
(
'hardwareBackPress'
,
this
.
handleBackButtonClick
);
}
handleBackButtonClick
=
()
=>
{
this
.
props
.
navigation
.
goBack
()
return
true
;
}
validasi
()
{
api
.
create
().
postAppraisal
({
api
.
create
().
postAppraisal
({
contract_id
:
this
.
props
.
navigation
.
state
.
params
.
contract_id
contract_id
:
this
.
props
.
navigation
.
state
.
params
.
contract_id
}).
then
((
response
)
=>
{
}).
then
((
response
)
=>
{
this
.
props
.
navigation
.
navigate
(
'Appraisal'
)
})
}
draftData
()
{
api
.
create
().
postDraftAppraisal
({
contract_id
:
this
.
state
.
data
.
contract_id
}).
then
((
response
)
=>
{
this
.
props
.
navigation
.
navigate
(
'Appraisal'
)
this
.
props
.
navigation
.
navigate
(
'Appraisal'
)
})
})
}
}
...
@@ -239,7 +260,7 @@ export default class sampleMenuAppraisal3 extends Component {
...
@@ -239,7 +260,7 @@ export default class sampleMenuAppraisal3 extends Component {
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
,
width
:
'50%'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
,
width
:
'50%'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Shock
Depan
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Shock
Depan
<
/Text
>
<
/View
>
<
/View
>
...
@@ -645,7 +666,29 @@ export default class sampleMenuAppraisal3 extends Component {
...
@@ -645,7 +666,29 @@ export default class sampleMenuAppraisal3 extends Component {
{
/* <View style={{ flexDirection: 'row', justifyContent: 'space-between', paddingVertical: 2.5 }}>
{
/* <View style={{ flexDirection: 'row', justifyContent: 'space-between', paddingVertical: 2.5 }}>
</View> */
}
</View> */
}
<
View
style
=
{{
width
:
'100%'
,
justifyContent
:
'flex-end'
,
marginTop
:
20
,
alignSelf
:
'center'
,
alignContent
:
'flex-end'
,
alignItems
:
'center'
,
marginBottom
:
20
}}
>
<
View
style
=
{{
width
:
'100%'
,
justifyContent
:
'space-evenly'
,
marginTop
:
20
,
alignSelf
:
'center'
,
alignContent
:
'flex-end'
,
alignItems
:
'center'
,
marginBottom
:
20
,
flexDirection
:
'row'
}}
>
<
AwesomeButton
backgroundColor
=
{
Colors
.
yellowBasic
}
backgroundShadow
=
{
'#DBDBDB'
}
backgroundPlaceholder
=
{
null
}
backgroundDarker
=
{
'#FFED75'
}
backgroundProgress
=
{
null
}
width
=
{
120
}
height
=
{
45
}
raiseLevel
=
{
5
}
borderRadius
=
{
10
}
progressLoadingTime
=
{
1000
}
progress
=
{
!
this
.
state
.
progress
}
onPress
=
{
next
=>
{
setTimeout
(()
=>
{
this
.
draftData
()
next
()
},
300
);
}}
>
<
Text
style
=
{{
color
:
'black'
,
fontWeight
:
'700'
}}
>
Draft
<
/Text
>
<
/AwesomeButton
>
<
AwesomeButton
<
AwesomeButton
backgroundColor
=
{
Colors
.
yellowBasic
}
backgroundColor
=
{
Colors
.
yellowBasic
}
backgroundShadow
=
{
'#DBDBDB'
}
backgroundShadow
=
{
'#DBDBDB'
}
...
@@ -660,7 +703,7 @@ export default class sampleMenuAppraisal3 extends Component {
...
@@ -660,7 +703,7 @@ export default class sampleMenuAppraisal3 extends Component {
progress
=
{
!
this
.
state
.
progress
}
progress
=
{
!
this
.
state
.
progress
}
onPress
=
{
next
=>
{
onPress
=
{
next
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
validasi
()
this
.
validasi
()
next
()
next
()
},
300
);
},
300
);
}}
}}
...
...
app/container/home/penerimaan/penerimaan.js
View file @
692c6cd3
...
@@ -67,7 +67,7 @@ export default class Penerimaan extends Component {
...
@@ -67,7 +67,7 @@ export default class Penerimaan extends Component {
return
(
return
(
<
View
key
=
{
index
}
style
=
{{
paddingHorizontal
:
7
}}
>
<
View
key
=
{
index
}
style
=
{{
paddingHorizontal
:
7
}}
>
{
!
this
.
state
.
loading
&&
(
{
!
this
.
state
.
loading
&&
(
<
TouchableOpacity
style
=
{{
marginTop
:
10
,
borderRadius
:
20
}}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'MenuPenerimaan'
,
{
data
:
item
})}
>
<
TouchableOpacity
style
=
{{
marginTop
:
10
,
borderRadius
:
20
}}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'MenuPenerimaan'
,
{
data
:
item
,
type
:
'clar'
})}
>
<
View
style
=
{{
height
:
60
,
backgroundColor
:
'#e4b300'
,
justifyContent
:
'space-between'
,
paddingHorizontal
:
20
,
flexDirection
:
'row'
,
borderTopRightRadius
:
10
,
borderTopLeftRadius
:
10
}}
>
<
View
style
=
{{
height
:
60
,
backgroundColor
:
'#e4b300'
,
justifyContent
:
'space-between'
,
paddingHorizontal
:
20
,
flexDirection
:
'row'
,
borderTopRightRadius
:
10
,
borderTopLeftRadius
:
10
}}
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
16
,
fontWeight
:
'700'
}}
>
{
item
.
contract_number
}
<
/Text
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
16
,
fontWeight
:
'700'
}}
>
{
item
.
contract_number
}
<
/Text
>
...
@@ -112,7 +112,7 @@ export default class Penerimaan extends Component {
...
@@ -112,7 +112,7 @@ export default class Penerimaan extends Component {
containerStyle
=
{{}}
containerStyle
=
{{}}
style
=
{{
backgroundColor
:
'#e4b300'
}}
style
=
{{
backgroundColor
:
'#e4b300'
}}
position
=
"bottomRight"
position
=
"bottomRight"
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'MenuPenerimaan'
,
{
data
:
""
})}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'MenuPenerimaan'
,
{
data
:
""
})}
>
>
<
Icon
name
=
"add"
/>
<
Icon
name
=
"add"
/>
<
/Fab
>
<
/Fab
>
...
...
app/container/home/penerimaan/sampleMenuPenerimaan.js
View file @
692c6cd3
This diff is collapsed.
Click to expand it.
app/container/home/penerimaan/sampleMenuPenerimaan2.js
View file @
692c6cd3
import
React
,
{
Component
}
from
'react'
import
React
,
{
Component
}
from
'react'
import
{
Text
,
View
,
TextInput
,
ScrollView
,
StyleSheet
}
from
'react-native'
import
{
Text
,
View
,
TextInput
,
ScrollView
,
StyleSheet
,
BackHandler
}
from
'react-native'
import
{
Container
}
from
'native-base'
import
{
Container
}
from
'native-base'
import
{
RadioButton
}
from
'react-native-paper'
;
import
{
RadioButton
}
from
'react-native-paper'
;
import
StepIndicator
from
'react-native-step-indicator'
;
import
StepIndicator
from
'react-native-step-indicator'
;
...
@@ -25,7 +25,16 @@ export default class sampleMenuPenerimaan2 extends Component {
...
@@ -25,7 +25,16 @@ export default class sampleMenuPenerimaan2 extends Component {
}
}
componentDidMount
(){
componentDidMount
(){
// alert(JSON.stringify(this.state.data))
BackHandler
.
addEventListener
(
'hardwareBackPress'
,
this
.
handleBackButtonClick
);
}
componentWillUnmount
()
{
BackHandler
.
removeEventListener
(
'hardwareBackPress'
,
this
.
handleBackButtonClick
);
}
handleBackButtonClick
=
()
=>
{
this
.
props
.
navigation
.
goBack
()
return
true
;
}
}
render
()
{
render
()
{
...
...
app/container/home/penerimaan/sampleMenuPenerimaan3.js
View file @
692c6cd3
import
React
,
{
Component
}
from
'react'
import
React
,
{
Component
}
from
'react'
import
{
Text
,
View
,
TextInput
,
ScrollView
,
StyleSheet
,
TouchableOpacity
,
PermissionsAndroid
,
Image
,
Modal
}
from
'react-native'
import
{
Text
,
View
,
TextInput
,
ScrollView
,
StyleSheet
,
TouchableOpacity
,
PermissionsAndroid
,
Image
,
Modal
,
BackHandler
}
from
'react-native'
import
ImagePicker
from
'react-native-image-picker'
;
import
ImagePicker
from
'react-native-image-picker'
;
import
{
Container
}
from
'native-base'
import
{
Container
}
from
'native-base'
import
{
RadioButton
}
from
'react-native-paper'
;
import
{
RadioButton
}
from
'react-native-paper'
;
...
@@ -45,8 +45,17 @@ export default class sampleMenuPenerimaan3 extends Component {
...
@@ -45,8 +45,17 @@ export default class sampleMenuPenerimaan3 extends Component {
photo6
:
this
.
props
.
navigation
.
state
.
params
.
data
.
photo_unit
[
5
]
photo6
:
this
.
props
.
navigation
.
state
.
params
.
data
.
photo_unit
[
5
]
})
})
}
}
// alert(JSON.stringify(this.state.data))
// alert(JSON.stringify(this.state.data)) componentDidMount(){
BackHandler
.
addEventListener
(
'hardwareBackPress'
,
this
.
handleBackButtonClick
);
}
componentWillUnmount
()
{
BackHandler
.
removeEventListener
(
'hardwareBackPress'
,
this
.
handleBackButtonClick
);
}
handleBackButtonClick
=
()
=>
{
this
.
props
.
navigation
.
goBack
()
return
true
;
}
}
async
requestCameraPermission
(
type
)
{
async
requestCameraPermission
(
type
)
{
...
@@ -119,8 +128,11 @@ export default class sampleMenuPenerimaan3 extends Component {
...
@@ -119,8 +128,11 @@ export default class sampleMenuPenerimaan3 extends Component {
uri
:
res
.
uri
uri
:
res
.
uri
})
})
this
.
setState
({
this
.
setState
({
imageMesin
:
res
.
uri
,
mesinArray
data
:
{
},
()
=>
alert
(
this
.
state
.
mesinArray
))
...
this
.
state
.
data
,
engine_number_photo
:
res
.
uri
}
})
}
}
})
})
...
@@ -169,12 +181,7 @@ export default class sampleMenuPenerimaan3 extends Component {
...
@@ -169,12 +181,7 @@ export default class sampleMenuPenerimaan3 extends Component {
>
>
<
View
style
=
{{
height
:
'85%'
}}
>
<
View
style
=
{{
height
:
'85%'
}}
>
<
ImageViewer
<
ImageViewer
imageUrls
=
{
this
.
state
.
mesinArray
}
imageUrls
=
{
this
.
state
.
mesinArray
}
// enableSwipeDown={true}
// index={this.state.Index}
// onSwipeDown={() => this.props.navigation.goBack()}
// onChange={(item) => this.next(item)}
// renderIndicator={() => (<View />)}
/
>
/
>
<
/View
>
<
/View
>
<
/Modal
>
<
/Modal
>
...
@@ -234,7 +241,7 @@ export default class sampleMenuPenerimaan3 extends Component {
...
@@ -234,7 +241,7 @@ export default class sampleMenuPenerimaan3 extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Foto
No
Mesin
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Foto
No
Mesin
<
/Text
>
<
/View
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
viewRangka
}
onPress
=
{()
=>
{
this
.
state
.
imageMesin
!=
''
?
this
.
setState
({
viewerMesin
:
true
})
:
this
.
requestCameraPermission
(
'mesin'
)
}}
>
<
TouchableOpacity
style
=
{
styles
.
viewRangka
}
onPress
=
{()
=>
{
this
.
requestCameraPermission
(
'mesin'
)
}}
>
<
View
<
View
style
=
{{
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
width
:
'100%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
...
@@ -370,8 +377,7 @@ export default class sampleMenuPenerimaan3 extends Component {
...
@@ -370,8 +377,7 @@ export default class sampleMenuPenerimaan3 extends Component {
<
/View
>
<
/View
>
<
Text
style
=
{{
fontSize
:
10
}}
>
Belakang
Kiri
<
/Text
>
<
Text
style
=
{{
fontSize
:
10
}}
>
Belakang
Kiri
<
/Text
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/ScrollView
>
<
/ScrollView
>
...
@@ -456,6 +462,6 @@ const styles = StyleSheet.create({
...
@@ -456,6 +462,6 @@ const styles = StyleSheet.create({
viewInputEnable
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewInputEnable
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewInputDisable
:
{
width
:
'63%'
,
backgroundColor
:
'#E6E6E6'
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewInputDisable
:
{
width
:
'63%'
,
backgroundColor
:
'#E6E6E6'
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewRangka
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
:
10
,
height
:
100
,
justifyContent
:
'space-between'
},
viewRangka
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
:
10
,
height
:
100
,
justifyContent
:
'space-between'
},
viewFotoUnit
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
:
1
0
,
height
:
150
,
justifyContent
:
'space-between'
},
viewFotoUnit
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
Horizontal
:
10
,
paddingVertical
:
2
0
,
height
:
150
,
justifyContent
:
'space-between'
},
textInput
:
{
paddingHorizontal
:
10
,
paddingVertical
:
0
,
color
:
'#999999'
},
textInput
:
{
paddingHorizontal
:
10
,
paddingVertical
:
0
,
color
:
'#999999'
},
})
})
app/service/api.js
View file @
692c6cd3
...
@@ -57,6 +57,8 @@ const create = () => {
...
@@ -57,6 +57,8 @@ const create = () => {
const
postRejectApproval
=
(
value
)
=>
POST
(
'demo/rejecting_approval'
,
value
)
const
postRejectApproval
=
(
value
)
=>
POST
(
'demo/rejecting_approval'
,
value
)
const
postApprovalDetail
=
(
value
)
=>
POST
(
'demo/approval_detail'
,
value
)
const
postApprovalDetail
=
(
value
)
=>
POST
(
'demo/approval_detail'
,
value
)
const
getHistory
=
()
=>
GET
(
'demo/get_history'
)
const
getHistory
=
()
=>
GET
(
'demo/get_history'
)
const
getBranch
=
()
=>
GET
(
'demo/get_branch'
)
const
getListClarByBranch
=
(
value
)
=>
POST
(
'demo/get_clar_by_branch_code'
,
value
)
return
{
return
{
...
@@ -74,7 +76,9 @@ const create = () => {
...
@@ -74,7 +76,9 @@ const create = () => {
postPenolakan
,
postPenolakan
,
postDraftAppraisal
,
postDraftAppraisal
,
postRejectApproval
,
postRejectApproval
,
postApprovalDetail
postApprovalDetail
,
getBranch
,
getListClarByBranch
}
}
}
}
...
...
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