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
b5d200fd
Commit
b5d200fd
authored
Mar 09, 2020
by
didam
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/ad1appraisal-mobile
parents
53da7a24
332ae142
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
2048 additions
and
64 deletions
+2048
-64
appraisal.js
app/container/home/appraisal/appraisal.js
+22
-24
sampleMenuAppraisal.js
app/container/home/appraisal/sampleMenuAppraisal.js
+52
-12
sampleMenuAppraisal2.js
app/container/home/appraisal/sampleMenuAppraisal2.js
+4
-1
sampleMenuAppraisal3.js
app/container/home/appraisal/sampleMenuAppraisal3.js
+12
-2
approval.js
app/container/home/approval/approval.js
+21
-23
sampleMenuApproval.js
app/container/home/approval/sampleMenuApproval.js
+916
-0
sampleMenuApproval2.js
app/container/home/approval/sampleMenuApproval2.js
+281
-0
sampleMenuApproval3.js
app/container/home/approval/sampleMenuApproval3.js
+717
-0
penerimaan.js
app/container/home/penerimaan/penerimaan.js
+2
-1
appNavigation.js
app/navigation/appNavigation.js
+6
-0
api.js
app/service/api.js
+15
-1
No files found.
app/container/home/appraisal/appraisal.js
View file @
b5d200fd
...
...
@@ -30,13 +30,11 @@ export default class Appraisal extends Component {
api
.
create
().
getListAppraisal
({
warehouse_id
:
2
}).
then
((
response
)
=>
{
console
.
log
(
JSON
.
stringify
(
response
.
data
))
// alert
(JSON.stringify(response.data))
if
(
response
.
data
.
status
==
"success"
)
{
let
listData
=
[]
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
if
(
item
.
appraisal_status
!=
'Rejected'
)
{
listData
.
push
(
item
)
}
listData
.
push
(
item
)
})
this
.
setState
({
listData
},
()
=>
{
setTimeout
(()
=>
{
...
...
@@ -54,29 +52,29 @@ export default class Appraisal extends Component {
{
this
.
state
.
listData
.
map
((
item
,
index
)
=>
{
return
(
<
View
key
=
{
index
}
style
=
{{
paddingHorizontal
:
7
}}
>
{
!
this
.
state
.
loading
&&
(
<
TouchableOpacity
style
=
{{
marginTop
:
10
,
borderRadius
:
20
}}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'MenuAppraisal'
,
{
data
:
item
})}
>
<
View
style
=
{{
height
:
60
,
backgroundColor
:
'#e4b300'
,
justifyContent
:
'space-between'
,
paddingHorizontal
:
20
,
flexDirection
:
'row'
,
borderTopRightRadius
:
10
,
borderTopLeftRadius
:
10
}}
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
16
,
fontWeight
:
'700'
}}
>
{
item
.
contract_number
}
<
/Text
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
14
}}
>
{
item
.
nasabah_name
}
<
/Text
>
<
/View
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
14
,
textAlign
:
'center'
}}
>
{
item
.
warehouse_code
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
height
:
60
,
backgroundColor
:
'#E6E6E6'
,
justifyContent
:
'space-between'
,
paddingHorizontal
:
20
,
flexDirection
:
'row'
,
borderBottomRightRadius
:
10
,
borderBottomLeftRadius
:
10
}}
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'black'
,
fontSize
:
14
}}
>
{
item
.
brand
}
-
{
item
.
model
}
<
/Text
>
<
Text
style
=
{{
color
:
'black'
,
fontSize
:
14
}}
>
{
item
.
police_number
}
<
/Text
>
<
TouchableOpacity
style
=
{{
marginTop
:
10
,
borderRadius
:
20
}}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'MenuAppraisal'
,
{
data
:
item
})}
>
<
View
style
=
{{
height
:
60
,
backgroundColor
:
'#e4b300'
,
justifyContent
:
'space-between'
,
paddingHorizontal
:
20
,
flexDirection
:
'row'
,
borderTopRightRadius
:
10
,
borderTopLeftRadius
:
10
}}
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
16
,
fontWeight
:
'700'
}}
>
{
item
.
contract_number
}
<
/Text
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
14
}}
>
{
item
.
nasabah_name
}
<
/Text
>
<
/View
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
14
,
textAlign
:
'center'
}}
>
{
item
.
warehouse_code
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'black'
,
fontSize
:
14
}}
>
{
item
.
appraisal_status
}
<
/Text
>
<
Text
style
=
{{
color
:
'black'
,
fontSize
:
14
}}
>
{
item
.
pull_officer
}
<
/Text
>
<
View
style
=
{{
height
:
60
,
backgroundColor
:
'#E6E6E6'
,
justifyContent
:
'space-between'
,
paddingHorizontal
:
20
,
flexDirection
:
'row'
,
borderBottomRightRadius
:
10
,
borderBottomLeftRadius
:
10
}}
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'black'
,
fontSize
:
14
}}
>
{
item
.
brand
}
-
{
item
.
model
}
<
/Text
>
<
Text
style
=
{{
color
:
'black'
,
fontSize
:
14
}}
>
{
item
.
police_number
}
<
/Text
>
<
/View
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'black'
,
fontSize
:
14
}}
>
{
item
.
appraisal_status
}
<
/Text
>
<
Text
style
=
{{
color
:
'black'
,
fontSize
:
14
}}
>
{
item
.
pull_officer
}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
)}
{
this
.
state
.
loading
&&
(
<
SvgAnimatedLinearGradient
...
...
app/container/home/appraisal/sampleMenuAppraisal.js
View file @
b5d200fd
...
...
@@ -9,14 +9,15 @@ import DateTimePicker from 'react-native-modal-datetime-picker';
import
{
Array
}
from
'../../../library/Array'
;
import
AwesomeButton
from
"react-native-really-awesome-button"
;
import
Colors
from
'../../../library/colors'
;
import
api
from
'../../../service/api'
;
export
default
class
sampleMenuAppraisal
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
data
:
this
.
props
.
navigation
.
state
.
params
.
data
||
""
,
dateUpdate
:
M
(
new
Date
()).
format
(
'
DD-MMM-YYYY
'
),
datePenerimaan
:
M
(
new
Date
()).
format
(
'
DD-MMM-YYYY
'
),
dateUpdate
:
M
(
new
Date
()).
format
(
'
YYYY-MM-DD
'
),
datePenerimaan
:
M
(
new
Date
()).
format
(
'
YYYY-MM-DD
'
),
checked
:
'first'
,
progress
:
false
,
kodeWerehouse
:
''
,
...
...
@@ -36,7 +37,7 @@ export default class sampleMenuAppraisal extends Component {
}
componentDidMount
()
{
// alert(
this.state.date
)
// alert(
JSON.stringify(this.state.data)
)
}
handlePenerimaanDate
(
date
)
{
...
...
@@ -49,6 +50,14 @@ export default class sampleMenuAppraisal extends Component {
this
.
setState
({
dateUpdate
,
isDateTimePickerVisible
:
false
})
}
draftData
()
{
api
.
create
().
postDraftAppraisal
({
contract_id
:
this
.
state
.
data
.
contract_id
}).
then
((
response
)
=>
{
this
.
props
.
navigation
.
navigate
(
'Appraisal'
)
})
}
render
()
{
let
{
data
}
=
this
.
state
return
(
...
...
@@ -283,7 +292,7 @@ export default class sampleMenuAppraisal extends Component {
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
assessment_type
)}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
assessment_type
==
null
?
"-"
:
data
.
assessment_type
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
...
...
@@ -409,14 +418,23 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tgl
Perubahan
Data
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputEnable
}
>
<
TouchableOpacity
style
=
{
styles
.
viewInputEnable
}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
>
<
DateTimePicker
mode
=
{
'date'
}
isVisible
=
{
this
.
state
.
isDateTimePickerVisiblePenerimaan
}
onConfirm
=
{(
date
)
=>
this
.
handlePenerimaanDate
(
date
)}
onCancel
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
false
})}
/
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
namaRemote
}
editable
value
=
{
this
.
state
.
datePenerimaan
}
editable
=
{
false
}
/
>
<
/
View
>
<
/
TouchableOpacity
>
<
/View
>
<
/View
>
...
...
@@ -732,7 +750,7 @@ export default class sampleMenuAppraisal extends Component {
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
key
)}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
unit_
key
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
...
...
@@ -860,7 +878,29 @@ export default class sampleMenuAppraisal extends Component {
<
/CollapseBody
>
<
/Collapse
>
<
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
backgroundColor
=
{
Colors
.
yellowBasic
}
backgroundShadow
=
{
'#DBDBDB'
}
...
...
@@ -875,7 +915,7 @@ export default class sampleMenuAppraisal extends Component {
progress
=
{
!
this
.
state
.
progress
}
onPress
=
{
next
=>
{
setTimeout
(()
=>
{
this
.
props
.
navigation
.
navigate
(
'MenuAppraisal2'
)
this
.
props
.
navigation
.
navigate
(
'MenuAppraisal2'
,
{
contract_id
:
this
.
state
.
data
.
contract_id
}
)
next
()
},
300
);
}}
...
...
app/container/home/appraisal/sampleMenuAppraisal2.js
View file @
b5d200fd
...
...
@@ -25,6 +25,9 @@ export default class sampleMenuAppraisal2 extends Component {
}
}
componentDidMount
(){
}
async
requestCameraPermission
(
type
)
{
try
{
const
granted
=
await
PermissionsAndroid
.
request
(
...
...
@@ -251,7 +254,7 @@ export default class sampleMenuAppraisal2 extends Component {
progress
=
{
!
this
.
state
.
progress
}
onPress
=
{
next
=>
{
setTimeout
(()
=>
{
this
.
props
.
navigation
.
navigate
(
'MenuAppraisal3'
)
this
.
props
.
navigation
.
navigate
(
'MenuAppraisal3'
,
{
contract_id
:
this
.
props
.
navigation
.
state
.
params
.
contract_id
}
)
next
()
},
300
);
}}
...
...
app/container/home/appraisal/sampleMenuAppraisal3.js
View file @
b5d200fd
...
...
@@ -7,6 +7,7 @@ import StepIndicator from 'react-native-step-indicator';
import
{
Array
}
from
'../../../library/Array'
;
import
AwesomeButton
from
"react-native-really-awesome-button"
;
import
Colors
from
'../../../library/colors'
;
import
api
from
'../../../service/api'
;
export
default
class
sampleMenuAppraisal3
extends
Component
{
constructor
(
props
)
{
...
...
@@ -37,6 +38,15 @@ export default class sampleMenuAppraisal3 extends Component {
radiaotor
:
''
}
}
validasi
(){
api
.
create
().
postAppraisal
({
contract_id
:
this
.
props
.
navigation
.
state
.
params
.
contract_id
}).
then
((
response
)
=>
{
this
.
props
.
navigation
.
navigate
(
'Appraisal'
)
})
}
render
()
{
return
(
<
Container
style
=
{{
flex
:
1
,
paddingHorizontal
:
10
}}
>
...
...
@@ -650,12 +660,12 @@ export default class sampleMenuAppraisal3 extends Component {
progress
=
{
!
this
.
state
.
progress
}
onPress
=
{
next
=>
{
setTimeout
(()
=>
{
this
.
props
.
navigation
.
navigate
(
'Appraisal'
)
this
.
validasi
(
)
next
()
},
300
);
}}
>
<
Text
style
=
{{
color
:
'black'
,
fontWeight
:
'700'
}}
>
Berikutnya
<
/Text
>
<
Text
style
=
{{
color
:
'black'
,
fontWeight
:
'700'
}}
>
Simpan
<
/Text
>
<
/AwesomeButton
>
<
/View
>
...
...
app/container/home/approval/approval.js
View file @
b5d200fd
...
...
@@ -34,9 +34,7 @@ export default class Approval extends Component {
if
(
response
.
data
.
status
==
"success"
)
{
let
listData
=
[]
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
if
(
item
.
appraisal_status
!=
'Rejected'
)
{
listData
.
push
(
item
)
}
listData
.
push
(
item
)
})
this
.
setState
({
listData
},
()
=>
{
setTimeout
(()
=>
{
...
...
@@ -54,29 +52,29 @@ export default class Approval extends Component {
{
this
.
state
.
listData
.
map
((
item
,
index
)
=>
{
return
(
<
View
key
=
{
index
}
style
=
{{
paddingHorizontal
:
7
}}
>
{
!
this
.
state
.
loading
&&
(
<
TouchableOpacity
style
=
{{
marginTop
:
10
,
borderRadius
:
20
}}
onLongPress
=
{()
=>
alert
(
'takeit'
)}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'MenuAppraisal'
,
{
data
:
item
})}
>
<
View
style
=
{{
height
:
60
,
backgroundColor
:
'#e4b300'
,
justifyContent
:
'space-between'
,
paddingHorizontal
:
20
,
flexDirection
:
'row'
,
borderTopRightRadius
:
10
,
borderTopLeftRadius
:
10
}}
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
16
,
fontWeight
:
'700'
}}
>
{
item
.
contract_number
}
<
/Text
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
14
}}
>
{
item
.
nasabah_name
}
<
/Text
>
<
/View
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
14
,
textAlign
:
'center'
}}
>
{
item
.
warehouse_code
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
height
:
60
,
backgroundColor
:
'#E6E6E6'
,
justifyContent
:
'space-between'
,
paddingHorizontal
:
20
,
flexDirection
:
'row'
,
borderBottomRightRadius
:
10
,
borderBottomLeftRadius
:
10
}}
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'black'
,
fontSize
:
14
}}
>
{
item
.
brand
}
-
{
item
.
model
}
<
/Text
>
<
Text
style
=
{{
color
:
'black'
,
fontSize
:
14
}}
>
{
item
.
police_number
}
<
/Text
>
<
TouchableOpacity
style
=
{{
marginTop
:
10
,
borderRadius
:
20
}}
onLongPress
=
{()
=>
alert
(
'takeit'
)}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'MenuApproval'
,
{
data
:
item
})}
>
<
View
style
=
{{
height
:
60
,
backgroundColor
:
'#e4b300'
,
justifyContent
:
'space-between'
,
paddingHorizontal
:
20
,
flexDirection
:
'row'
,
borderTopRightRadius
:
10
,
borderTopLeftRadius
:
10
}}
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
16
,
fontWeight
:
'700'
}}
>
{
item
.
contract_number
}
<
/Text
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
14
}}
>
{
item
.
nasabah_name
}
<
/Text
>
<
/View
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
14
,
textAlign
:
'center'
}}
>
{
item
.
warehouse_code
}
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'black'
,
fontSize
:
14
}}
>
{
item
.
appraisal_status
}
<
/Text
>
<
Text
style
=
{{
color
:
'black'
,
fontSize
:
14
}}
>
{
item
.
pull_officer
}
<
/Text
>
<
View
style
=
{{
height
:
60
,
backgroundColor
:
'#E6E6E6'
,
justifyContent
:
'space-between'
,
paddingHorizontal
:
20
,
flexDirection
:
'row'
,
borderBottomRightRadius
:
10
,
borderBottomLeftRadius
:
10
}}
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'black'
,
fontSize
:
14
}}
>
{
item
.
brand
}
-
{
item
.
model
}
<
/Text
>
<
Text
style
=
{{
color
:
'black'
,
fontSize
:
14
}}
>
{
item
.
police_number
}
<
/Text
>
<
/View
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'black'
,
fontSize
:
14
}}
>
{
item
.
appraisal_status
}
<
/Text
>
<
Text
style
=
{{
color
:
'black'
,
fontSize
:
14
}}
>
{
item
.
pull_officer
}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
)}
{
this
.
state
.
loading
&&
(
<
SvgAnimatedLinearGradient
...
...
app/container/home/approval/sampleMenuApproval.js
0 → 100644
View file @
b5d200fd
import
React
,
{
Component
}
from
'react'
import
{
Text
,
View
,
TextInput
,
ScrollView
,
StyleSheet
,
TouchableOpacity
}
from
'react-native'
import
{
Collapse
,
CollapseHeader
,
CollapseBody
}
from
"accordion-collapse-react-native"
;
import
{
Thumbnail
,
List
,
ListItem
,
Separator
,
Container
}
from
'native-base'
;
import
M
from
'moment'
import
{
RadioButton
}
from
'react-native-paper'
;
import
StepIndicator
from
'react-native-step-indicator'
;
import
DateTimePicker
from
'react-native-modal-datetime-picker'
;
import
{
Array
}
from
'../../../library/Array'
;
import
AwesomeButton
from
"react-native-really-awesome-button"
;
import
Colors
from
'../../../library/colors'
;
import
api
from
'../../../service/api'
;
export
default
class
sampleMenuApproval
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
data
:
this
.
props
.
navigation
.
state
.
params
.
data
||
""
,
dateUpdate
:
M
(
new
Date
()).
format
(
'YYYY-MM-DD'
),
datePenerimaan
:
M
(
new
Date
()).
format
(
'YYYY-MM-DD'
),
checked
:
'first'
,
progress
:
false
,
kodeWerehouse
:
''
,
namaWerehouse
:
''
,
kodeRemote
:
''
,
namaRemote
:
''
,
tanggalPenerimaan
:
''
,
tanggalUpdate
:
''
,
isDateTimePickerVisible
:
false
,
isDateTimePickerVisiblePenerimaan
:
false
,
collapseKontrak
:
true
,
collpaseSTNK
:
true
,
collapseFaktur
:
true
,
collapseSertifikat
:
true
,
collapseUnit
:
true
}
}
componentDidMount
()
{
// alert(JSON.stringify(this.state.data))
}
handlePenerimaanDate
(
date
)
{
var
datePenerimaan
=
M
(
date
).
format
(
'DD-MMM-YYYY'
)
this
.
setState
({
datePenerimaan
,
isDateTimePickerVisiblePenerimaan
:
false
})
}
handleUpdateDate
(
date
)
{
var
dateUpdate
=
M
(
date
).
format
(
'DD-MMM-YYYY'
)
this
.
setState
({
dateUpdate
,
isDateTimePickerVisible
:
false
})
}
draftData
()
{
api
.
create
().
postDraftAppraisal
({
contract_id
:
this
.
state
.
data
.
contract_id
}).
then
((
response
)
=>
{
this
.
props
.
navigation
.
navigate
(
'Appraisal'
)
})
}
render
()
{
let
{
data
}
=
this
.
state
return
(
<
Container
style
=
{{
flex
:
1
,
paddingHorizontal
:
20
}}
>
<
ScrollView
showsVerticalScrollIndicator
=
{
false
}
>
<
View
style
=
{{
padding
:
20
,
justifyContent
:
'center'
,
width
:
'100%'
}}
>
<
Text
style
=
{{
alignSelf
:
'center'
,
fontSize
:
18
,
fontWeight
:
'bold'
}}
>
Approval
<
/Text
>
<
/View
>
<
StepIndicator
labels
=
{
Array
.
labelAppraisal
}
currentPosition
=
{
0
}
customStyles
=
{{
stepIndicatorSize
:
20
,
currentStepIndicatorSize
:
20
,
currentStepStrokeWidth
:
1
,
stepStrokeCurrentColor
:
Colors
.
yellowBasic
,
stepIndicatorCurrentColor
:
'white'
,
stepIndicatorLabelCurrentColor
:
Colors
.
yellowBasic
,
currentStepLabelColor
:
Colors
.
yellowBasic
,
stepStrokeUnFinishedColor
:
Colors
.
yellowBasic
,
separatorUnFinishedColor
:
'#DEE1E5'
,
stepIndicatorUnFinishedColor
:
'#DEE1E5'
,
stepIndicatorLabelUnFinishedColor
:
'#ffffff'
,
labelColor
:
'#E6E6E6'
,
stepIndicatorFinishedColor
:
Colors
.
yellowBasic
,
separatorFinishedColor
:
Colors
.
yellowBasic
,
}}
stepCount
=
{
Array
.
labelStep
.
length
}
/
>
{
/* <View style={{ backgroundColor: Colors.yellowBasic, height: 30, justifyContent: 'center', paddingHorizontal: 5, borderRadius: 20, width: '40%', marginBottom: 20 }}>
<Text style={{ fontWeight: '700', textAlign: 'center' }}>Data Kontrak</Text>
</View> */
}
<
Collapse
style
=
{{
marginTop
:
20
}}
isCollapsed
=
{
true
}
onToggle
=
{()
=>
this
.
setState
({
collapseKontrak
:
!
this
.
state
.
collapseKontrak
})}
>
<
CollapseHeader
style
=
{{
backgroundColor
:
Colors
.
yellowBasic
,
width
:
'40%'
,
borderRadius
:
10
}}
>
<
Separator
bordered
style
=
{{
backgroundColor
:
Colors
.
yellowBasic
,
borderRadius
:
10
,
flexDirection
:
'row'
,
justifyContent
:
'flex-start'
,
paddingHorizontal
:
20
,
alignItems
:
'center'
}}
>
<
View
style
=
{{
backgroundColor
:
'#E6E6E6'
,
height
:
10
,
width
:
10
,
backgroundColor
:
'transparent'
,
borderStyle
:
'solid'
,
borderTopWidth
:
0
,
borderRightWidth
:
0
,
borderBottomWidth
:
10
,
borderLeftWidth
:
10
,
borderTopColor
:
'transparent'
,
borderRightColor
:
'transparent'
,
borderBottomColor
:
this
.
state
.
collapseKontrak
==
true
?
'#523c00'
:
'transparent'
,
borderLeftColor
:
this
.
state
.
collapseKontrak
==
true
?
'transparent'
:
'#523c00'
,
}}
/
>
<
View
style
=
{{
alignSelf
:
'center'
,
marginLeft
:
10
}}
>
<
Text
>
Data
Kontrak
<
/Text
>
<
/View
>
<
/Separator
>
<
/CollapseHeader
>
<
CollapseBody
>
<
ListItem
style
=
{{
borderColor
:
'transparent'
}}
>
<
View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Kode
Cabang
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
branch_code
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nama
Cabang
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
branch_name
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
No
Kontrak
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
contract_number
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
No
Subkontrak
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
sub_contract_number
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nama
Nasabah
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
nasabah_name
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Kode
Warehouse
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
kodeWerehouse
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
warehouse_code
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nama
Warehouse
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaWerehouse
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
warehouse_name
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Kode
Remote
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
kodeRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
remote_code
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nama
Remote
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
remote_name
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tanggal
Appraisal
<
/Text
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
viewInputDisable
}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
>
<
DateTimePicker
mode
=
{
'date'
}
isVisible
=
{
this
.
state
.
isDateTimePickerVisiblePenerimaan
}
onConfirm
=
{(
date
)
=>
this
.
handlePenerimaanDate
(
date
)}
onCancel
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
false
})}
/
>
<
TextInput
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
datePenerimaan
}
editable
=
{
false
}
/
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tanggal
Masuk
<
/Text
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
viewInputDisable
}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
>
<
DateTimePicker
mode
=
{
'date'
}
isVisible
=
{
this
.
state
.
isDateTimePickerVisiblePenerimaan
}
onConfirm
=
{(
date
)
=>
this
.
handlePenerimaanDate
(
date
)}
onCancel
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
false
})}
/
>
<
TextInput
style
=
{
styles
.
textInput
}
value
=
{
data
.
date_in
}
editable
=
{
false
}
/
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tipe
Penilaian
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
assessment_type
==
null
?
"-"
:
data
.
assessment_type
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tipe
Jaminan
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
guarantee_type
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Lokasi
Unit
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
location_name
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Keterangan
Lokasi
Unit
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
location_description
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nama
Petugas
Tarik
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
pull_officer
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Int
/
Ext
Kolektor
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
collector
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tgl
Masuk
Werehouse
<
/Text
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
viewInputDisable
}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
>
<
DateTimePicker
mode
=
{
'date'
}
isVisible
=
{
this
.
state
.
isDateTimePickerVisiblePenerimaan
}
onConfirm
=
{(
date
)
=>
this
.
handlePenerimaanDate
(
date
)}
onCancel
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
false
})}
/
>
<
TextInput
style
=
{
styles
.
textInput
}
value
=
{
data
.
warehouse_date_in
}
editable
=
{
false
}
/
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tgl
Pick
up
<
/Text
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
viewInputDisable
}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
>
<
DateTimePicker
mode
=
{
'date'
}
isVisible
=
{
this
.
state
.
isDateTimePickerVisiblePenerimaan
}
onConfirm
=
{(
date
)
=>
this
.
handlePenerimaanDate
(
date
)}
onCancel
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
false
})}
/
>
<
TextInput
style
=
{
styles
.
textInput
}
value
=
{
data
.
pickup_date
}
editable
=
{
false
}
/
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tgl
Perubahan
Data
<
/Text
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
viewInputDisable
}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
>
<
DateTimePicker
mode
=
{
'date'
}
isVisible
=
{
this
.
state
.
isDateTimePickerVisiblePenerimaan
}
onConfirm
=
{(
date
)
=>
this
.
handlePenerimaanDate
(
date
)}
onCancel
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
false
})}
/
>
<
TextInput
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
datePenerimaan
}
editable
=
{
false
}
/
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
/ListItem
>
<
/CollapseBody
>
<
/Collapse
>
<
Collapse
style
=
{{
marginTop
:
20
}}
isCollapsed
=
{
true
}
onToggle
=
{()
=>
this
.
setState
({
collpaseSTNK
:
!
this
.
state
.
collpaseSTNK
})}
>
<
CollapseHeader
style
=
{{
backgroundColor
:
Colors
.
yellowBasic
,
width
:
'40%'
,
borderRadius
:
10
}}
>
<
Separator
bordered
style
=
{{
backgroundColor
:
Colors
.
yellowBasic
,
borderRadius
:
10
,
flexDirection
:
'row'
,
justifyContent
:
'flex-start'
,
paddingHorizontal
:
20
,
alignItems
:
'center'
}}
>
<
View
style
=
{{
backgroundColor
:
'#E6E6E6'
,
height
:
10
,
width
:
10
,
backgroundColor
:
'transparent'
,
borderStyle
:
'solid'
,
borderTopWidth
:
0
,
borderRightWidth
:
0
,
borderBottomWidth
:
10
,
borderLeftWidth
:
10
,
borderTopColor
:
'transparent'
,
borderRightColor
:
'transparent'
,
borderBottomColor
:
this
.
state
.
collpaseSTNK
==
true
?
'#523c00'
:
'transparent'
,
borderLeftColor
:
this
.
state
.
collpaseSTNK
==
true
?
'transparent'
:
'#523c00'
,
}}
/
>
<
View
style
=
{{
alignSelf
:
'center'
,
marginLeft
:
10
}}
>
<
Text
>
Data
STNK
<
/Text
>
<
/View
>
<
/Separator
>
<
/CollapseHeader
>
<
CollapseBody
>
<
ListItem
style
=
{{
borderColor
:
'transparent'
}}
>
<
View
style
=
{{
width
:
'100%'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Rekondisi
STNK
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
String
(
data
.
stnk_recondition
)}
editable
=
{
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tgl
Jatuh
Tempo
STNK
<
/Text
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
viewInputDisable
}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
>
<
DateTimePicker
mode
=
{
'date'
}
isVisible
=
{
this
.
state
.
isDateTimePickerVisiblePenerimaan
}
onConfirm
=
{(
date
)
=>
this
.
handlePenerimaanDate
(
date
)}
onCancel
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
false
})}
/
>
<
TextInput
style
=
{
styles
.
textInput
}
value
=
{
data
.
due_date
}
editable
=
{
false
}
/
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
PKB
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
pkb
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
SWDKLJJ
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
swdkljj
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
/View
>
<
/ListItem
>
<
/CollapseBody
>
<
/Collapse
>
<
Collapse
style
=
{{
marginTop
:
20
}}
isCollapsed
=
{
true
}
onToggle
=
{()
=>
this
.
setState
({
collapseFaktur
:
!
this
.
state
.
collapseFaktur
})}
>
<
CollapseHeader
style
=
{{
backgroundColor
:
Colors
.
yellowBasic
,
width
:
'40%'
,
borderRadius
:
10
}}
>
<
Separator
bordered
style
=
{{
backgroundColor
:
Colors
.
yellowBasic
,
borderRadius
:
10
,
flexDirection
:
'row'
,
justifyContent
:
'flex-start'
,
paddingHorizontal
:
20
,
alignItems
:
'center'
}}
>
<
View
style
=
{{
backgroundColor
:
'#E6E6E6'
,
height
:
10
,
width
:
10
,
backgroundColor
:
'transparent'
,
borderStyle
:
'solid'
,
borderTopWidth
:
0
,
borderRightWidth
:
0
,
borderBottomWidth
:
10
,
borderLeftWidth
:
10
,
borderTopColor
:
'transparent'
,
borderRightColor
:
'transparent'
,
borderBottomColor
:
this
.
state
.
collapseFaktur
==
true
?
'#523c00'
:
'transparent'
,
borderLeftColor
:
this
.
state
.
collapseFaktur
==
true
?
'transparent'
:
'#523c00'
,
}}
/
>
<
View
style
=
{{
alignSelf
:
'center'
,
marginLeft
:
10
}}
>
<
Text
>
Data
Faktur
<
/Text
>
<
/View
>
<
/Separator
>
<
/CollapseHeader
>
<
CollapseBody
>
<
ListItem
style
=
{{
borderColor
:
'transparent'
}}
>
<
View
style
=
{{
width
:
'100%'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tanggal
Faktur
<
/Text
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
viewInputDisable
}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
>
<
DateTimePicker
mode
=
{
'date'
}
isVisible
=
{
this
.
state
.
isDateTimePickerVisiblePenerimaan
}
onConfirm
=
{(
date
)
=>
this
.
handlePenerimaanDate
(
date
)}
onCancel
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
false
})}
/
>
<
TextInput
style
=
{
styles
.
textInput
}
value
=
{
data
.
invoice_date
}
editable
=
{
false
}
/
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nomor
Faktur
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
invoice_number
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
/View
>
<
/ListItem
>
<
/CollapseBody
>
<
/Collapse
>
<
Collapse
style
=
{{
marginTop
:
20
}}
isCollapsed
=
{
true
}
onToggle
=
{()
=>
this
.
setState
({
collapseSertifikat
:
!
this
.
state
.
collapseSertifikat
})}
>
<
CollapseHeader
style
=
{{
backgroundColor
:
Colors
.
yellowBasic
,
width
:
'40%'
,
borderRadius
:
10
}}
>
<
Separator
bordered
style
=
{{
backgroundColor
:
Colors
.
yellowBasic
,
borderRadius
:
10
,
flexDirection
:
'row'
,
justifyContent
:
'flex-start'
,
paddingHorizontal
:
20
,
alignItems
:
'center'
}}
>
<
View
style
=
{{
backgroundColor
:
'#E6E6E6'
,
height
:
10
,
width
:
10
,
backgroundColor
:
'transparent'
,
borderStyle
:
'solid'
,
borderTopWidth
:
0
,
borderRightWidth
:
0
,
borderBottomWidth
:
10
,
borderLeftWidth
:
10
,
borderTopColor
:
'transparent'
,
borderRightColor
:
'transparent'
,
borderBottomColor
:
this
.
state
.
collapseSertifikat
==
true
?
'#523c00'
:
'transparent'
,
borderLeftColor
:
this
.
state
.
collapseSertifikat
==
true
?
'transparent'
:
'#523c00'
,
}}
/
>
<
View
style
=
{{
alignSelf
:
'center'
,
marginLeft
:
10
}}
>
<
Text
>
Data
Sertifikat
<
/Text
>
<
/View
>
<
/Separator
>
<
/CollapseHeader
>
<
CollapseBody
>
<
ListItem
style
=
{{
borderColor
:
'transparent'
}}
>
<
View
style
=
{{
width
:
'100%'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nomor
Sertifikat
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
certificate_number
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tanggal
Sertifikat
<
/Text
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
viewInputDisable
}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
>
<
DateTimePicker
mode
=
{
'date'
}
isVisible
=
{
this
.
state
.
isDateTimePickerVisiblePenerimaan
}
onConfirm
=
{(
date
)
=>
this
.
handlePenerimaanDate
(
date
)}
onCancel
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
false
})}
/
>
<
TextInput
style
=
{
styles
.
textInput
}
value
=
{
data
.
certificate_date
}
editable
=
{
false
}
/
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
/ListItem
>
<
/CollapseBody
>
<
/Collapse
>
<
Collapse
style
=
{{
marginTop
:
20
}}
isCollapsed
=
{
true
}
onToggle
=
{()
=>
this
.
setState
({
collapseUnit
:
!
this
.
state
.
collapseUnit
})}
>
<
CollapseHeader
style
=
{{
backgroundColor
:
Colors
.
yellowBasic
,
width
:
'40%'
,
borderRadius
:
10
}}
>
<
Separator
bordered
style
=
{{
backgroundColor
:
Colors
.
yellowBasic
,
borderRadius
:
10
,
flexDirection
:
'row'
,
justifyContent
:
'flex-start'
,
paddingHorizontal
:
20
,
alignItems
:
'center'
}}
>
<
View
style
=
{{
backgroundColor
:
'#E6E6E6'
,
height
:
10
,
width
:
10
,
backgroundColor
:
'transparent'
,
borderStyle
:
'solid'
,
borderTopWidth
:
0
,
borderRightWidth
:
0
,
borderBottomWidth
:
10
,
borderLeftWidth
:
10
,
borderTopColor
:
'transparent'
,
borderRightColor
:
'transparent'
,
borderBottomColor
:
this
.
state
.
collapseUnit
==
true
?
'#523c00'
:
'transparent'
,
borderLeftColor
:
this
.
state
.
collapseUnit
==
true
?
'transparent'
:
'#523c00'
,
}}
/
>
<
View
style
=
{{
alignSelf
:
'center'
,
marginLeft
:
10
}}
>
<
Text
>
Data
Unit
<
/Text
>
<
/View
>
<
/Separator
>
<
/CollapseHeader
>
<
CollapseBody
>
<
ListItem
style
=
{{
borderColor
:
'transparent'
}}
>
<
View
style
=
{{
width
:
'100%'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nomor
Polisi
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
police_number
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nomor
Rangka
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
chassis_number
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nomor
Mesin
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
engine_number
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
KM
Terakhir
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
last_km
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Kunci
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
unit_key
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Merk
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
brand
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tipe
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
type
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Model
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
model
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tahun
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
unit_year
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Warna
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
unit_color
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Harga
Pasar
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
market_price
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
justifyContent
:
'center'
,
width
:
'45%'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nilai
Pembanding
Rekondisi
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
comparative_value
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
justifyContent
:
'center'
,
width
:
'45%'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Pokok
Pembiayaan
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
principal_financing
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
justifyContent
:
'center'
,
width
:
'45%'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Harga
Karoseri
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
carousel_price
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
/
>
<
/View
>
<
/View
>
<
/View
>
<
/ListItem
>
<
/CollapseBody
>
<
/Collapse
>
<
View
style
=
{{
width
:
'100%'
,
justifyContent
:
'center'
,
marginTop
:
20
,
alignSelf
:
'center'
,
alignContent
:
'flex-end'
,
alignItems
:
'center'
,
marginBottom
:
20
}}
>
<
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
.
props
.
navigation
.
navigate
(
'MenuApproval2'
,
{
data
:
this
.
state
.
data
})
next
()
},
300
);
}}
>
<
Text
style
=
{{
color
:
'black'
,
fontWeight
:
'700'
}}
>
Berikutnya
<
/Text
>
<
/AwesomeButton
>
<
/View
>
<
/ScrollView
>
<
/Container
>
)
}
}
const
styles
=
StyleSheet
.
create
({
viewInputEnable
:
{
width
:
'55%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewInputDisable
:
{
width
:
'55%'
,
backgroundColor
:
'#E6E6E6'
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewRangka
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
:
5
,
height
:
100
,
justifyContent
:
'space-between'
},
viewFotoUnit
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
:
5
,
height
:
150
,
justifyContent
:
'space-between'
},
textInput
:
{
paddingHorizontal
:
10
,
paddingVertical
:
0
,
color
:
'#999999'
},
})
app/container/home/approval/sampleMenuApproval2.js
0 → 100644
View file @
b5d200fd
import
React
,
{
Component
}
from
'react'
import
{
Text
,
View
,
TextInput
,
ScrollView
,
StyleSheet
,
TouchableOpacity
,
PermissionsAndroid
,
Image
,
Modal
}
from
'react-native'
import
ImagePicker
from
'react-native-image-picker'
;
import
{
Container
}
from
'native-base'
import
{
RadioButton
}
from
'react-native-paper'
;
import
StepIndicator
from
'react-native-step-indicator'
;
import
ImageViewer
from
'react-native-image-zoom-viewer'
;
import
{
Array
}
from
'../../../library/Array'
;
import
AwesomeButton
from
"react-native-really-awesome-button"
;
import
DocumentPicker
from
'react-native-document-picker'
import
RNFetchBlob
from
'rn-fetch-blob'
import
Colors
from
'../../../library/colors'
;
export
default
class
sampleMenuPenerimaan3
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
data
:
this
.
props
.
navigation
.
state
.
params
.
data
||
""
,
date
:
new
Date
(),
checked
:
'first'
,
progress
:
false
,
viewerMesin
:
false
,
imageRangka
:
''
,
imageMesin
:
''
,
mesinArray
:
[]
}
}
componentDidMount
()
{
// alert(JSON.stringify(this.state.data))
}
async
requestCameraPermission
(
type
)
{
try
{
const
granted
=
await
PermissionsAndroid
.
request
(
PermissionsAndroid
.
PERMISSIONS
.
CAMERA
,
{
title
:
'Cool Photo App Camera Permission'
,
message
:
'Cool Photo App needs access to your camera '
+
'so you can take awesome pictures.'
,
buttonNeutral
:
'Ask Me Later'
,
buttonNegative
:
'Cancel'
,
buttonPositive
:
'OK'
,
},
);
if
(
granted
===
PermissionsAndroid
.
RESULTS
.
GRANTED
)
{
this
.
_photoProfile
(
type
)
console
.
log
(
'You can use the camera'
);
}
else
{
console
.
log
(
'Camera permission denied'
);
}
}
catch
(
err
)
{
console
.
warn
(
err
);
}
}
async
_photoProfile
(
type
)
{
var
res
=
await
DocumentPicker
.
pick
({
type
:
[
DocumentPicker
.
types
.
images
],
readContent
:
true
});
try
{
RNFetchBlob
.
fs
.
readFile
(
res
.
uri
,
'base64'
)
.
then
((
data
)
=>
{
if
(
type
==
'rangka'
)
{
this
.
setState
({
data
:
{
...
this
.
state
.
data
,
chassis_number_photo
:
res
.
uri
}
})
}
else
{
let
mesinArray
=
[]
mesinArray
.
push
({
uri
:
res
.
uri
})
this
.
setState
({
imageMesin
:
res
.
uri
,
mesinArray
},
()
=>
alert
(
this
.
state
.
mesinArray
))
}
})
}
catch
(
err
)
{
if
(
DocumentPicker
.
isCancel
(
err
))
{
// User cancelled the picker, exit any dialogs or menus and move on
}
else
{
throw
err
;
}
}
}
render
()
{
let
{
data
}
=
this
.
state
return
(
<
Container
style
=
{{
flex
:
1
,
paddingHorizontal
:
20
,
paddingBottom
:
20
}}
>
{
/* Modal Foto IMAGE MESIN */
}
<
Modal
visible
=
{
this
.
state
.
viewerMesin
}
transparent
=
{
true
}
>
<
View
style
=
{{
height
:
'85%'
}}
>
<
ImageViewer
imageUrls
=
{
this
.
state
.
mesinArray
}
// enableSwipeDown={true}
// index={this.state.Index}
// onSwipeDown={() => this.props.navigation.goBack()}
// onChange={(item) => this.next(item)}
// renderIndicator={() => (<View />)}
/
>
<
/View
>
<
/Modal
>
<
ScrollView
showsVerticalScrollIndicator
=
{
false
}
>
<
View
style
=
{{
padding
:
20
,
justifyContent
:
'center'
,
width
:
'100%'
}}
>
<
Text
style
=
{{
alignSelf
:
'center'
,
fontSize
:
18
,
fontWeight
:
'bold'
}}
>
Approval
<
/Text
>
<
/View
>
<
StepIndicator
labels
=
{
Array
.
labelAppraisal
}
currentPosition
=
{
1
}
customStyles
=
{{
stepIndicatorSize
:
20
,
currentStepIndicatorSize
:
20
,
currentStepStrokeWidth
:
1
,
stepStrokeCurrentColor
:
Colors
.
yellowStatusBar
,
stepIndicatorCurrentColor
:
'white'
,
stepIndicatorLabelCurrentColor
:
Colors
.
yellowStatusBar
,
currentStepLabelColor
:
Colors
.
yellowStatusBar
,
stepStrokeUnFinishedColor
:
Colors
.
yellowStatusBar
,
separatorUnFinishedColor
:
'#DEE1E5'
,
stepIndicatorUnFinishedColor
:
'#DEE1E5'
,
stepIndicatorLabelUnFinishedColor
:
'#ffffff'
,
labelColor
:
'#E6E6E6'
,
stepIndicatorFinishedColor
:
Colors
.
yellowStatusBar
,
separatorFinishedColor
:
Colors
.
yellowStatusBar
,
}}
stepCount
=
{
Array
.
labelAppraisal
.
length
}
/
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
,
marginTop
:
20
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Foto
No
Rangka
<
/Text
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
viewRangka
}
onPress
=
{()
=>
this
.
requestCameraPermission
(
'rangka'
)}
>
<
View
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
}}
>
{
data
.
chassis_number_photo
==
''
?
<
View
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
justifyContent
:
'center'
,
alignContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'rgba(237, 57, 99, .5)'
,
textAlign
:
'center'
,
fontSize
:
40
}}
>+<
/Text
>
<
/View>
:
<
Image
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
resizeMode
:
'cover'
}}
source
=
{{
uri
:
data
.
chassis_number_photo
}}
/
>
}
<
/View
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Foto
No
Mesin
<
/Text
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
viewRangka
}
onPress
=
{()
=>
{
this
.
state
.
imageMesin
!=
''
?
this
.
setState
({
viewerMesin
:
true
})
:
this
.
requestCameraPermission
(
'mesin'
)
}}
>
<
View
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
}}
>
{
data
.
engine_number_photo
==
''
?
<
View
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
justifyContent
:
'center'
,
alignContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'rgba(237, 57, 99, .5)'
,
textAlign
:
'center'
,
fontSize
:
40
}}
>+<
/Text
>
<
/View>
:
<
Image
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
resizeMode
:
'stretch'
}}
source
=
{{
uri
:
data
.
engine_number_photo
}}
/
>
}
<
/View
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Foto
Unit
(
6
Foto
)
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewFotoUnit
}
>
<
View
style
=
{{
flexDirection
:
'row'
,
height
:
'45%'
,
justifyContent
:
'space-between'
}}
>
<
View
style
=
{{
width
:
'30%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
}}
>
<
/View
>
<
View
style
=
{{
width
:
'30%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
}}
>
<
/View
>
<
View
style
=
{{
width
:
'30%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
}}
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
height
:
'45%'
,
justifyContent
:
'space-between'
}}
>
<
View
style
=
{{
width
:
'30%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
}}
>
<
/View
>
<
View
style
=
{{
width
:
'30%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
}}
>
<
/View
>
<
View
style
=
{{
width
:
'30%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
}}
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/ScrollView
>
<
View
style
=
{{
width
:
'100%'
,
justifyContent
:
'flex-end'
,
marginTop
:
20
,
alignSelf
:
'center'
,
alignContent
:
'flex-end'
,
alignItems
:
'center'
}}
>
<
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
.
props
.
navigation
.
navigate
(
'MenuApproval3'
,
{
data
:
this
.
state
.
data
})
next
()
},
300
);
}}
>
<
Text
style
=
{{
color
:
'black'
,
fontWeight
:
'700'
}}
>
Selanjutnya
<
/Text
>
<
/AwesomeButton
>
<
/View
>
<
/Container
>
)
}
}
const
styles
=
StyleSheet
.
create
({
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
},
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
:
5
,
height
:
150
,
justifyContent
:
'space-between'
},
textInput
:
{
paddingHorizontal
:
10
,
paddingVertical
:
0
,
color
:
'#999999'
},
})
app/container/home/approval/sampleMenuApproval3.js
0 → 100644
View file @
b5d200fd
import
React
,
{
Component
}
from
'react'
import
{
Text
,
View
,
TextInput
,
ScrollView
,
StyleSheet
}
from
'react-native'
import
{
Collapse
,
CollapseHeader
,
CollapseBody
}
from
"accordion-collapse-react-native"
;
import
{
Thumbnail
,
List
,
ListItem
,
Separator
,
Container
}
from
'native-base'
;
import
{
RadioButton
}
from
'react-native-paper'
;
import
StepIndicator
from
'react-native-step-indicator'
;
import
{
Array
}
from
'../../../library/Array'
;
import
AwesomeButton
from
"react-native-really-awesome-button"
;
import
Colors
from
'../../../library/colors'
;
import
api
from
'../../../service/api'
;
export
default
class
sampleMenuApproval3
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
date
:
new
Date
(),
checked
:
'first'
,
object
:
null
,
merk
:
null
,
noRangka
:
null
,
noPolisi
:
null
,
noMesin
:
null
,
stnk
:
null
,
kunci
:
null
,
collapseFrame
:
true
,
collapseElectrical
:
true
,
collapseEngine
:
true
,
ban
:
''
,
velg
:
''
,
rem
:
''
,
shock
:
''
,
lampu
:
''
,
meter
:
''
,
holder
:
''
,
mesin
:
''
,
blok
:
''
,
sistem
:
''
,
radiaotor
:
''
}
}
validasi
()
{
// alert(this.props.navigation.state.params.data.contract_id)
api
.
create
().
postApprovalDetail
({
contract_id
:
this
.
props
.
navigation
.
state
.
params
.
data
.
contract_id
}).
then
((
response
)
=>
{
alert
(
JSON
.
stringify
(
response
))
this
.
props
.
navigation
.
navigate
(
'Approval'
)
})
}
reject
(){
api
.
create
().
postRejectApproval
({
contract_id
:
this
.
props
.
navigation
.
state
.
params
.
data
.
contract_id
}).
then
((
response
)
=>
{
alert
(
JSON
.
stringify
(
response
))
this
.
props
.
navigation
.
navigate
(
'Approval'
)
})
}
render
()
{
return
(
<
Container
style
=
{{
flex
:
1
,
paddingHorizontal
:
10
}}
>
<
ScrollView
showsVerticalScrollIndicator
=
{
false
}
>
<
View
style
=
{{
padding
:
20
,
justifyContent
:
'center'
,
width
:
'100%'
}}
>
<
Text
style
=
{{
alignSelf
:
'center'
,
fontSize
:
18
,
fontWeight
:
'bold'
}}
>
Appraisal
<
/Text
>
<
/View
>
<
StepIndicator
labels
=
{
Array
.
labelAppraisal
}
currentPosition
=
{
2
}
customStyles
=
{{
stepIndicatorSize
:
20
,
currentStepIndicatorSize
:
20
,
currentStepStrokeWidth
:
1
,
stepStrokeCurrentColor
:
Colors
.
yellowBasic
,
stepIndicatorCurrentColor
:
'white'
,
stepIndicatorLabelCurrentColor
:
Colors
.
yellowBasic
,
currentStepLabelColor
:
Colors
.
yellowBasic
,
stepStrokeUnFinishedColor
:
Colors
.
yellowBasic
,
separatorUnFinishedColor
:
'#DEE1E5'
,
stepIndicatorUnFinishedColor
:
'#DEE1E5'
,
stepIndicatorLabelUnFinishedColor
:
'#ffffff'
,
labelColor
:
'#E6E6E6'
,
stepIndicatorFinishedColor
:
Colors
.
yellowBasic
,
separatorFinishedColor
:
Colors
.
yellowBasic
,
}}
stepCount
=
{
Array
.
labelStep
.
length
}
/
>
<
View
style
=
{{
alignSelf
:
'flex-end'
,
flexDirection
:
'row'
,
paddingVertical
:
10
,
justifyContent
:
'center'
,
width
:
'50%'
,
paddingRight
:
20
}}
>
<
Text
style
=
{{
width
:
'20%'
,
textAlign
:
'center'
,
alignSelf
:
'center'
,
fontSize
:
13
}}
>
25
%<
/Text
>
<
Text
style
=
{{
width
:
'20%'
,
textAlign
:
'center'
,
alignSelf
:
'center'
,
fontSize
:
13
}}
>
50
%<
/Text
>
<
Text
style
=
{{
width
:
'20%'
,
textAlign
:
'center'
,
alignSelf
:
'center'
,
fontSize
:
13
}}
>
75
%<
/Text
>
<
Text
style
=
{{
width
:
'20%'
,
textAlign
:
'center'
,
alignSelf
:
'center'
,
fontSize
:
13
}}
>
85
%<
/Text
>
<
Text
style
=
{{
width
:
'20%'
,
textAlign
:
'center'
,
alignSelf
:
'center'
,
fontSize
:
13
}}
>
100
%<
/Text
>
<
/View
>
<
Collapse
isCollapsed
=
{
true
}
onToggle
=
{()
=>
this
.
setState
({
collapseFrame
:
!
this
.
state
.
collapseFrame
})}
>
<
CollapseHeader
style
=
{{
backgroundColor
:
Colors
.
yellowBasic
,
width
:
'40%'
,
borderRadius
:
10
}}
>
<
Separator
bordered
style
=
{{
backgroundColor
:
Colors
.
yellowBasic
,
borderRadius
:
10
,
flexDirection
:
'row'
,
justifyContent
:
'flex-start'
,
paddingHorizontal
:
20
,
alignItems
:
'center'
}}
>
<
View
style
=
{{
backgroundColor
:
'#E6E6E6'
,
height
:
10
,
width
:
10
,
backgroundColor
:
'transparent'
,
borderStyle
:
'solid'
,
borderTopWidth
:
0
,
borderRightWidth
:
0
,
borderBottomWidth
:
10
,
borderLeftWidth
:
10
,
borderTopColor
:
'transparent'
,
borderRightColor
:
'transparent'
,
borderBottomColor
:
this
.
state
.
collapseFrame
==
true
?
'#523c00'
:
'transparent'
,
borderLeftColor
:
this
.
state
.
collapseFrame
==
true
?
'transparent'
:
'#523c00'
,
}}
/
>
<
View
style
=
{{
alignSelf
:
'center'
,
marginLeft
:
10
}}
>
<
Text
>
Frame
<
/Text
>
<
/View
>
<
/Separator
>
<
/CollapseHeader
>
<
CollapseBody
>
<
ListItem
style
=
{{
borderColor
:
'transparent'
,
marginTop
:
-
10
}}
>
<
View
style
=
{{
width
:
'100%'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
,
width
:
'50%'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Ban
Depan
<
/Text
>
<
/View
>
<
View
style
=
{{
width
:
'50%'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
}}
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"25"
status
=
{
this
.
state
.
ban
===
'25'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
ban
:
'25'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"50"
status
=
{
this
.
state
.
ban
===
'50'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
ban
:
'50'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"75"
status
=
{
this
.
state
.
ban
===
'75'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
ban
:
'75'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"85"
status
=
{
this
.
state
.
ban
===
'85'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
ban
:
'85'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"100"
status
=
{
this
.
state
.
ban
===
'100'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
ban
:
'100'
});
}}
/
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
,
width
:
'50%'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Velg
Depan
Standard
<
/Text
>
<
/View
>
<
View
style
=
{{
width
:
'50%'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
}}
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"25"
status
=
{
this
.
state
.
velg
===
'25'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
velg
:
'25'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"50"
status
=
{
this
.
state
.
velg
===
'50'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
velg
:
'50'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"75"
status
=
{
this
.
state
.
velg
===
'75'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
velg
:
'75'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"85"
status
=
{
this
.
state
.
velg
===
'85'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
velg
:
'85'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"100"
status
=
{
this
.
state
.
velg
===
'100'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
velg
:
'100'
});
}}
/
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
,
width
:
'50%'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Rem
Depan
Set
<
/Text
>
<
/View
>
<
View
style
=
{{
width
:
'50%'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
}}
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"25"
status
=
{
this
.
state
.
rem
===
'25'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
rem
:
'25'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"50"
status
=
{
this
.
state
.
rem
===
'50'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
rem
:
'50'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"75"
status
=
{
this
.
state
.
rem
===
'75'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
rem
:
'75'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"85"
status
=
{
this
.
state
.
rem
===
'85'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
rem
:
'85'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"100"
status
=
{
this
.
state
.
rem
===
'100'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
rem
:
'100'
});
}}
/
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
,
width
:
'50%'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Shock
Depan
<
/Text
>
<
/View
>
<
View
style
=
{{
width
:
'50%'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
}}
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"25"
status
=
{
this
.
state
.
shock
===
'25'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
shock
:
'25'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"50"
status
=
{
this
.
state
.
shock
===
'50'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
shock
:
'50'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"75"
status
=
{
this
.
state
.
shock
===
'75'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
shock
:
'75'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"85"
status
=
{
this
.
state
.
shock
===
'85'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
shock
:
'85'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"100"
status
=
{
this
.
state
.
shock
===
'100'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
shock
:
'100'
});
}}
/
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/ListItem
>
<
/CollapseBody
>
<
/Collapse
>
<
Collapse
isCollapsed
=
{
true
}
style
=
{{
marginTop
:
10
}}
onToggle
=
{()
=>
this
.
setState
({
collapseElectrical
:
!
this
.
state
.
collapseElectrical
})}
>
<
CollapseHeader
style
=
{{
backgroundColor
:
Colors
.
yellowBasic
,
width
:
'40%'
,
borderRadius
:
10
}}
>
<
Separator
bordered
style
=
{{
backgroundColor
:
Colors
.
yellowBasic
,
borderRadius
:
10
,
flexDirection
:
'row'
,
justifyContent
:
'flex-start'
,
paddingHorizontal
:
20
,
alignItems
:
'center'
}}
>
<
View
style
=
{{
backgroundColor
:
'#E6E6E6'
,
height
:
10
,
width
:
10
,
backgroundColor
:
'transparent'
,
borderStyle
:
'solid'
,
borderTopWidth
:
0
,
borderRightWidth
:
0
,
borderBottomWidth
:
10
,
borderLeftWidth
:
10
,
borderTopColor
:
'transparent'
,
borderRightColor
:
'transparent'
,
borderBottomColor
:
this
.
state
.
collapseElectrical
==
true
?
'#523c00'
:
'transparent'
,
borderLeftColor
:
this
.
state
.
collapseElectrical
==
true
?
'transparent'
:
'#523c00'
,
}}
/
>
<
View
style
=
{{
alignSelf
:
'center'
,
marginLeft
:
10
}}
>
<
Text
>
Electircal
<
/Text
>
<
/View
>
<
/Separator
>
<
/CollapseHeader
>
<
CollapseBody
>
<
ListItem
style
=
{{
borderColor
:
'transparent'
,
marginTop
:
-
10
}}
>
<
View
style
=
{{
width
:
'100%'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
,
width
:
'50%'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Lampu
Depan
assy
<
/Text
>
<
/View
>
<
View
style
=
{{
width
:
'50%'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
}}
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"25"
status
=
{
this
.
state
.
lampu
===
'25'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
lampu
:
'25'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"50"
status
=
{
this
.
state
.
lampu
===
'50'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
lampu
:
'50'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"75"
status
=
{
this
.
state
.
lampu
===
'75'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
lampu
:
'75'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"85"
status
=
{
this
.
state
.
lampu
===
'85'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
lampu
:
'85'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"100"
status
=
{
this
.
state
.
lampu
===
'100'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
lampu
:
'100'
});
}}
/
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
,
width
:
'50%'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Meter
combinasi
<
/Text
>
<
/View
>
<
View
style
=
{{
width
:
'50%'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
}}
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"25"
status
=
{
this
.
state
.
meter
===
'25'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
meter
:
'25'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"50"
status
=
{
this
.
state
.
meter
===
'50'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
meter
:
'50'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"75"
status
=
{
this
.
state
.
meter
===
'75'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
meter
:
'75'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"85"
status
=
{
this
.
state
.
meter
===
'85'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
meter
:
'85'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"100"
status
=
{
this
.
state
.
meter
===
'100'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
meter
:
'100'
});
}}
/
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
,
width
:
'50%'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Holder
&
Saklar
<
/Text
>
<
/View
>
<
View
style
=
{{
width
:
'50%'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
}}
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"25"
status
=
{
this
.
state
.
holder
===
'25'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
holder
:
'25'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"50"
status
=
{
this
.
state
.
holder
===
'50'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
holder
:
'50'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"75"
status
=
{
this
.
state
.
holder
===
'75'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
holder
:
'75'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"85"
status
=
{
this
.
state
.
holder
===
'85'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
holder
:
'85'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"100"
status
=
{
this
.
state
.
holder
===
'100'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
holder
:
'100'
});
}}
/
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/ListItem
>
<
/CollapseBody
>
<
/Collapse
>
<
Collapse
isCollapsed
=
{
true
}
style
=
{{
marginTop
:
10
}}
onToggle
=
{()
=>
this
.
setState
({
collapseEngine
:
!
this
.
state
.
collapseEngine
})}
>
<
CollapseHeader
style
=
{{
backgroundColor
:
Colors
.
yellowBasic
,
width
:
'40%'
,
borderRadius
:
10
}}
>
<
Separator
bordered
style
=
{{
backgroundColor
:
Colors
.
yellowBasic
,
borderRadius
:
10
,
flexDirection
:
'row'
,
justifyContent
:
'flex-start'
,
paddingHorizontal
:
20
,
alignItems
:
'center'
}}
>
<
View
style
=
{{
backgroundColor
:
'#E6E6E6'
,
height
:
10
,
width
:
10
,
backgroundColor
:
'transparent'
,
borderStyle
:
'solid'
,
borderTopWidth
:
0
,
borderRightWidth
:
0
,
borderBottomWidth
:
10
,
borderLeftWidth
:
10
,
borderTopColor
:
'transparent'
,
borderRightColor
:
'transparent'
,
borderBottomColor
:
this
.
state
.
collapseEngine
==
true
?
'#523c00'
:
'transparent'
,
borderLeftColor
:
this
.
state
.
collapseEngine
==
true
?
'transparent'
:
'#523c00'
,
}}
/
>
<
View
style
=
{{
alignSelf
:
'center'
,
marginLeft
:
10
}}
>
<
Text
>
Engine
<
/Text
>
<
/View
>
<
/Separator
>
<
/CollapseHeader
>
<
CollapseBody
>
<
ListItem
style
=
{{
borderColor
:
'transparent'
,
marginTop
:
-
10
}}
>
<
View
style
=
{{
width
:
'100%'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
,
width
:
'50%'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Mesin
<
/Text
>
<
/View
>
<
View
style
=
{{
width
:
'50%'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
}}
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"25"
status
=
{
this
.
state
.
mesin
===
'25'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
mesin
:
'25'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"50"
status
=
{
this
.
state
.
mesin
===
'50'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
mesin
:
'50'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"75"
status
=
{
this
.
state
.
mesin
===
'75'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
mesin
:
'75'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"85"
status
=
{
this
.
state
.
mesin
===
'85'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
mesin
:
'85'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"100"
status
=
{
this
.
state
.
mesin
===
'100'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
mesin
:
'100'
});
}}
/
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
,
width
:
'50%'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Blok
Mesin
<
/Text
>
<
/View
>
<
View
style
=
{{
width
:
'50%'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
}}
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"25"
status
=
{
this
.
state
.
blok
===
'25'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
blok
:
'25'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"50"
status
=
{
this
.
state
.
blok
===
'50'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
blok
:
'50'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"75"
status
=
{
this
.
state
.
blok
===
'75'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
blok
:
'75'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"85"
status
=
{
this
.
state
.
blok
===
'85'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
blok
:
'85'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"100"
status
=
{
this
.
state
.
blok
===
'100'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
blok
:
'100'
});
}}
/
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
,
width
:
'50%'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Sistem
Bahan
Bakar
<
/Text
>
<
/View
>
<
View
style
=
{{
width
:
'50%'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
}}
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"25"
status
=
{
this
.
state
.
sistem
===
'25'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
sistem
:
'25'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"50"
status
=
{
this
.
state
.
sistem
===
'50'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
sistem
:
'50'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"75"
status
=
{
this
.
state
.
sistem
===
'75'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
sistem
:
'75'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"85"
status
=
{
this
.
state
.
sistem
===
'85'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
sistem
:
'85'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"100"
status
=
{
this
.
state
.
sistem
===
'100'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
sistem
:
'100'
});
}}
/
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
,
width
:
'50%'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Radiator
Set
<
/Text
>
<
/View
>
<
View
style
=
{{
width
:
'50%'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
}}
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"25"
status
=
{
this
.
state
.
radiaotor
===
'25'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
radiaotor
:
'25'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"50"
status
=
{
this
.
state
.
radiaotor
===
'50'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
radiaotor
:
'50'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"75"
status
=
{
this
.
state
.
radiaotor
===
'75'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
radiaotor
:
'75'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"85"
status
=
{
this
.
state
.
radiaotor
===
'85'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
radiaotor
:
'85'
});
}}
/
>
<
/View
>
<
View
style
=
{{
width
:
'20%'
}}
>
<
RadioButton
value
=
"100"
status
=
{
this
.
state
.
radiaotor
===
'100'
?
'checked'
:
'unchecked'
}
onPress
=
{()
=>
{
this
.
setState
({
radiaotor
:
'100'
});
}}
/
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/ListItem
>
<
/CollapseBody
>
<
/Collapse
>
{
/* <View style={{ flexDirection: 'row', justifyContent: 'space-between', paddingVertical: 2.5 }}>
</View> */
}
<
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
.
reject
()
next
()
},
300
);
}}
>
<
Text
style
=
{{
color
:
'black'
,
fontWeight
:
'700'
}}
>
Reject
<
/Text
>
<
/AwesomeButton
>
<
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
.
validasi
()
next
()
},
300
);
}}
>
<
Text
style
=
{{
color
:
'black'
,
fontWeight
:
'700'
}}
>
Approve
<
/Text
>
<
/AwesomeButton
>
<
/View
>
<
/ScrollView
>
<
/Container
>
)
}
}
const
styles
=
StyleSheet
.
create
({
viewInputEnable
:
{
width
:
'50%'
,
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
},
viewRangka
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
:
5
,
height
:
100
,
justifyContent
:
'space-between'
},
viewFotoUnit
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
:
5
,
height
:
150
,
justifyContent
:
'space-between'
},
textInput
:
{
paddingHorizontal
:
10
,
paddingVertical
:
0
,
color
:
'#999999'
},
})
app/container/home/penerimaan/penerimaan.js
View file @
b5d200fd
...
...
@@ -26,8 +26,9 @@ export default class Penerimaan extends Component {
getListData
()
{
api
.
create
().
getListClar
({
warehouse_id
:
Number
(
this
.
props
.
navigation
.
state
.
params
.
data
)
warehouse_id
:
Number
(
this
.
props
.
navigation
.
state
.
params
.
data
.
value
)
}).
then
((
response
)
=>
{
// alert(JSON.stringify(response))
let
listClar
=
[]
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
listClar
.
push
(
item
)
...
...
app/navigation/appNavigation.js
View file @
b5d200fd
...
...
@@ -20,6 +20,9 @@ import MenuPenerimaan from '../container/home/penerimaan/sampleMenuPenerimaan'
import
MenuPenerimaan2
from
'../container/home/penerimaan/sampleMenuPenerimaan2'
import
MenuPenerimaan3
from
'../container/home/penerimaan/sampleMenuPenerimaan3'
import
Approval
from
'../container/home/approval/approval'
import
MenuApproval
from
'../container/home/approval/sampleMenuApproval'
import
MenuApproval2
from
'../container/home/approval/sampleMenuApproval2'
import
MenuApproval3
from
'../container/home/approval/sampleMenuApproval3'
//IconBack
import
IconBack
from
'react-native-vector-icons/MaterialIcons'
...
...
@@ -48,6 +51,9 @@ const MainNavigator = createStackNavigator({
MenuPenerimaan2
:
{
screen
:
MenuPenerimaan2
,
navigationOptions
:
{
title
:
'Menu Penerimaan'
}
},
MenuPenerimaan3
:
{
screen
:
MenuPenerimaan3
,
navigationOptions
:
{
title
:
'Menu Penerimaan'
}
},
Approval
:
{
screen
:
Approval
,
navigationOptions
:
{
title
:
'Approval'
}
},
MenuApproval
:
{
screen
:
MenuApproval
,
navigationOptions
:
{
title
:
'Menu Approval'
}
},
MenuApproval2
:
{
screen
:
MenuApproval2
,
navigationOptions
:
{
title
:
'Menu Approval'
}
},
MenuApproval3
:
{
screen
:
MenuApproval3
,
navigationOptions
:
{
title
:
'Menu Approval'
}
},
// LatihanDragDrop: { screen: LatihanDragDrop, navigationOptions: { title: 'Latihan'}}
},
{
headerMode
:
'screen'
,
...
...
app/service/api.js
View file @
b5d200fd
...
...
@@ -44,11 +44,18 @@ const create = () => {
const
login
=
(
value
)
=>
POST
(
'auth/login'
,
value
)
const
getListClar
=
(
value
)
=>
api
.
post
(
'demo/get_list_clar'
,
value
)
const
postPenerimaan
=
(
value
)
=>
POST
(
'demo/accepted'
,
value
)
const
postPenolakan
=
(
value
)
=>
POST
(
'demo/rejecting_accept'
,
value
)
const
getWarehouse
=
()
=>
GET
(
'demo/get_user_warehouse'
)
const
getPermission
=
()
=>
GET
(
'demo/get_permission'
)
const
getUserWarehouse
=
()
=>
GET
(
'demo/get_user_warehouse'
)
const
getListAppraisal
=
(
value
)
=>
POST
(
'demo/get_list_appraisal'
,
value
)
const
postDraftAppraisal
=
(
value
)
=>
POST
(
'demo/drafting_appraisal'
,
value
)
const
postAppraisal
=
(
value
)
=>
POST
(
'demo/appraisal'
,
value
)
const
getListApproval
=
(
value
)
=>
POST
(
'demo/get_list_approval'
,
value
)
const
postApproval
=
(
value
)
=>
POST
(
'demo/approval'
,
value
)
const
postRejectApproval
=
(
value
)
=>
POST
(
'demo/rejecting_approval'
,
value
)
const
postApprovalDetail
=
(
value
)
=>
POST
(
'demo/approval_detail'
,
value
)
const
getHistory
=
()
=>
GET
(
'demo/get_history'
)
...
...
@@ -60,7 +67,14 @@ const create = () => {
getUserWarehouse
,
getListAppraisal
,
getListApproval
,
getHistory
getHistory
,
postPenerimaan
,
postAppraisal
,
postApproval
,
postPenolakan
,
postDraftAppraisal
,
postRejectApproval
,
postApprovalDetail
}
}
...
...
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