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
0fb3b39d
Commit
0fb3b39d
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
afb13d44
b042b3a8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
18 deletions
+51
-18
appraisal.js
app/container/home/appraisal/appraisal.js
+2
-1
sampleMenuAppraisal.js
app/container/home/appraisal/sampleMenuAppraisal.js
+45
-13
approval.js
app/container/home/approval/approval.js
+2
-2
homepageScreen.js
app/container/home/homepageScreen.js
+2
-2
No files found.
app/container/home/appraisal/appraisal.js
View file @
0fb3b39d
...
@@ -28,8 +28,9 @@ export default class Appraisal extends Component {
...
@@ -28,8 +28,9 @@ export default class Appraisal extends Component {
getListAppraisal
()
{
getListAppraisal
()
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
// alert(this.props.navigation.state.params.data.value)
api
.
create
().
getListAppraisal
({
api
.
create
().
getListAppraisal
({
warehouse_id
:
2
warehouse_id
:
Number
(
this
.
props
.
navigation
.
state
.
params
.
data
.
value
)
}).
then
((
response
)
=>
{
}).
then
((
response
)
=>
{
// alert(JSON.stringify(response.data))
// alert(JSON.stringify(response.data))
if
(
response
.
data
.
status
==
"success"
)
{
if
(
response
.
data
.
status
==
"success"
)
{
...
...
app/container/home/appraisal/sampleMenuAppraisal.js
View file @
0fb3b39d
...
@@ -10,6 +10,8 @@ import { Array } from '../../../library/Array';
...
@@ -10,6 +10,8 @@ import { Array } from '../../../library/Array';
import
AwesomeButton
from
"react-native-really-awesome-button"
;
import
AwesomeButton
from
"react-native-really-awesome-button"
;
import
Colors
from
'../../../library/colors'
;
import
Colors
from
'../../../library/colors'
;
import
api
from
'../../../service/api'
;
import
api
from
'../../../service/api'
;
import
LinearGradient
from
'react-native-linear-gradient'
;
import
Modal
from
"react-native-modal"
;
export
default
class
sampleMenuAppraisal
extends
Component
{
export
default
class
sampleMenuAppraisal
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -32,25 +34,22 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -32,25 +34,22 @@ export default class sampleMenuAppraisal extends Component {
collpaseSTNK
:
true
,
collpaseSTNK
:
true
,
collapseFaktur
:
true
,
collapseFaktur
:
true
,
collapseSertifikat
:
true
,
collapseSertifikat
:
true
,
collapseUnit
:
true
collapseUnit
:
true
,
alertBack
:
false
}
}
}
}
componentDidMount
()
{
componentDidMount
()
{
BackHandler
.
addEventListener
(
'hardwareBackPress'
,
this
.
_onBackPressed
)
BackHandler
.
addEventListener
(
'hardwareBackPress'
,
this
.
handleBackButtonClick
);
}
}
componentWillUnmount
()
{
componentWillUnmount
()
{
BackHandler
.
removeEventListener
(
'hardwareBackPress'
,
this
.
_onBackPressed
)
BackHandler
.
removeEventListener
(
'hardwareBackPress'
,
this
.
handleBackButtonClick
);
}
}
_onBackPressed
=
()
=>
{
handleBackButtonClick
=
()
=>
{
api
.
create
().
postDraftAppraisal
({
this
.
setState
({
alertBack
:
true
})
contract_id
:
this
.
state
.
data
.
contract_id
return
true
;
}).
then
((
response
)
=>
{
this
.
props
.
navigation
.
goBack
()
return
true
})
}
}
handlePenerimaanDate
(
date
)
{
handlePenerimaanDate
(
date
)
{
...
@@ -71,10 +70,43 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -71,10 +70,43 @@ export default class sampleMenuAppraisal extends Component {
})
})
}
}
draftDataBack
(){
api
.
create
().
postDraftAppraisal
({
contract_id
:
this
.
state
.
data
.
contract_id
}).
then
((
response
)
=>
{
this
.
props
.
navigation
.
goBack
()
})
}
render
()
{
render
()
{
let
{
data
}
=
this
.
state
let
{
data
}
=
this
.
state
return
(
return
(
<
Container
style
=
{{
flex
:
1
,
paddingHorizontal
:
20
}}
>
<
Container
style
=
{{
flex
:
1
,
paddingHorizontal
:
20
}}
>
<
Modal
isVisible
=
{
this
.
state
.
alertBack
}
animationIn
=
{
"swing"
}
animationInTiming
=
{
1000
}
animationOut
=
{
"fadeOutDown"
}
animationOutTiming
=
{
500
}
>
<
View
style
=
{{
backgroundColor
:
'white'
,
height
:
250
,
width
:
'100%'
,
alignSelf
:
'center'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
borderRadius
:
20
}}
>
{
/* <Image source={Images.warningCircleRed} style={{ width: 75, height: 75 }} /> */
}
<
Text
style
=
{{
paddingTop
:
10
}}
>
Kamu
yakin
tetap
ingin
keluar
dari
page
ini
?
<
/Text
>
<
View
style
=
{{
width
:
'100%'
,
flexDirection
:
'row'
,
justifyContent
:
'space-around'
,
marginTop
:
30
,
paddingHorizontal
:
25
}}
>
<
LinearGradient
start
=
{{
x
:
0
,
y
:
0
}}
end
=
{{
x
:
0.9
,
y
:
0.5
}}
colors
=
{[
Colors
.
yellowBasic
,
'#fcc000'
]}
style
=
{{
borderRadius
:
10
,
width
:
'40%'
}}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
setState
({
alertBack
:
false
})}
style
=
{{
alignItems
:
'center'
,
justifyContent
:
'center'
,
height
:
50
}}
>
<
Text
style
=
{{
color
:
'white'
}}
>
Tidak
<
/Text
>
<
/TouchableOpacity
>
<
/LinearGradient
>
<
LinearGradient
start
=
{{
x
:
0
,
y
:
0
}}
end
=
{{
x
:
0.9
,
y
:
0.5
}}
colors
=
{[
Colors
.
yellowBasic
,
'#fcc000'
]}
style
=
{{
borderRadius
:
10
,
width
:
'40%'
}}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
setState
({
alertBack
:
false
},
()
=>
this
.
draftDataBack
())}
style
=
{{
alignItems
:
'center'
,
justifyContent
:
'center'
,
height
:
50
}}
>
<
Text
style
=
{{
color
:
'white'
}}
>
Ya
<
/Text
>
<
/TouchableOpacity
>
<
/LinearGradient
>
<
/View
>
<
/View
>
<
/Modal
>
<
ScrollView
<
ScrollView
showsVerticalScrollIndicator
=
{
false
}
showsVerticalScrollIndicator
=
{
false
}
>
>
...
...
app/container/home/approval/approval.js
View file @
0fb3b39d
...
@@ -51,7 +51,7 @@ export default class Approval extends Component {
...
@@ -51,7 +51,7 @@ export default class Approval extends Component {
getListApproval
()
{
getListApproval
()
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
api
.
create
().
getListApproval
({
api
.
create
().
getListApproval
({
warehouse_id
:
2
warehouse_id
:
Number
(
this
.
props
.
navigation
.
state
.
params
.
data
.
value
)
}).
then
((
response
)
=>
{
}).
then
((
response
)
=>
{
reactotron
.
log
(
response
.
data
)
reactotron
.
log
(
response
.
data
)
if
(
response
.
data
.
status
==
"success"
)
{
if
(
response
.
data
.
status
==
"success"
)
{
...
...
app/container/home/homepageScreen.js
View file @
0fb3b39d
...
@@ -56,9 +56,9 @@ class HomePageScreen extends Component {
...
@@ -56,9 +56,9 @@ class HomePageScreen extends Component {
// alert('Select Warehouse First!')
// alert('Select Warehouse First!')
}
}
}
else
if
(
item
==
'Appraisal'
)
{
}
else
if
(
item
==
'Appraisal'
)
{
this
.
props
.
navigation
.
navigate
(
'Appraisal'
)
this
.
props
.
navigation
.
navigate
(
'Appraisal'
,
{
data
:
this
.
state
.
selectedWarehouse
}
)
}
else
{
}
else
{
this
.
props
.
navigation
.
navigate
(
'Approval'
)
this
.
props
.
navigation
.
navigate
(
'Approval'
,
{
data
:
this
.
state
.
selectedWarehouse
}
)
}
}
}
}
...
...
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