Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Tia-dev
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
Tia-dev
Commits
baad8972
Commit
baad8972
authored
Aug 16, 2020
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update AM
parent
1b49c58d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
5 deletions
+35
-5
VisualisasiAM.js
src/container/ApprovalMatrix/VisualisasiAM.js
+35
-5
No files found.
src/container/ApprovalMatrix/VisualisasiAM.js
View file @
baad8972
...
@@ -32,7 +32,9 @@ export default class VisualisasiAM extends Component {
...
@@ -32,7 +32,9 @@ export default class VisualisasiAM extends Component {
visibleAM
:
false
,
visibleAM
:
false
,
visibleVisual
:
true
,
visibleVisual
:
true
,
data
,
data
,
listApproval
:
[]
listApproval
:
[],
listEdit
:
[],
listOriginal
:
[]
}
}
}
}
...
@@ -84,7 +86,7 @@ export default class VisualisasiAM extends Component {
...
@@ -84,7 +86,7 @@ export default class VisualisasiAM extends Component {
listVisual
[
indexId
].
data
.
push
(
item
)
listVisual
[
indexId
].
data
.
push
(
item
)
}
}
})
})
this
.
setState
({
listApproval
:
listVisual
})
this
.
setState
({
listApproval
:
listVisual
})
console
.
log
(
listVisual
);
console
.
log
(
listVisual
);
}
else
{
}
else
{
alert
(
response
.
data
.
message
)
alert
(
response
.
data
.
message
)
...
@@ -94,9 +96,37 @@ export default class VisualisasiAM extends Component {
...
@@ -94,9 +96,37 @@ export default class VisualisasiAM extends Component {
handleChangeOrder
(
fromIndex
,
toIndex
,
that
)
{
handleChangeOrder
(
fromIndex
,
toIndex
,
that
)
{
let
listApproval
=
that
.
state
.
listApproval
let
listApproval
=
that
.
state
.
listApproval
let
orderIdFrom
=
listApproval
[
fromIndex
].
orderId
listApproval
[
fromIndex
].
orderId
=
listApproval
[
toIndex
].
orderId
listApproval
[
fromIndex
].
orderId
=
listApproval
[
toIndex
].
orderId
listApproval
[
toIndex
].
orderId
=
listApproval
[
fromIndex
].
orderId
listApproval
[
toIndex
].
orderId
=
orderIdFrom
console
.
log
(
fromIndex
,
toIndex
)
that
.
setState
({
listEdit
:
listApproval
})
}
handleSave
()
{
let
data
=
[]
this
.
state
.
listEdit
.
map
((
item
,
index
)
=>
{
item
.
data
.
map
((
items
,
index
)
=>
{
data
.
push
({
approval_matrix_id
:
items
.
approval_matrix_id
,
approval_type_id
:
items
.
approval_type_id
,
approval_type_name
:
items
.
approval_type_name
,
created
:
items
.
created
,
end_date
:
items
.
end_date
,
fullname
:
items
.
fullname
,
operator_type_id
:
items
.
operator_type_id
,
operator_type_name
:
items
.
operator_type_name
,
orders
:
item
.
orderId
,
start_date
:
items
.
start_date
,
status
:
items
.
status
,
updated
:
items
.
updated
,
user_id
:
items
.
user_id
})
})
})
setTimeout
(()
=>
{
this
.
setState
({
listOriginal
:
data
})
},
500
);
}
}
render
()
{
render
()
{
...
@@ -211,7 +241,7 @@ export default class VisualisasiAM extends Component {
...
@@ -211,7 +241,7 @@ export default class VisualisasiAM extends Component {
<
div
onClick
=
{()
=>
this
.
props
.
onClickClose
()}
style
=
{{
width
:
102
,
height
:
30
,
border
:
'solid 1px #354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
,
cursor
:
"pointer"
}}
>
<
div
onClick
=
{()
=>
this
.
props
.
onClickClose
()}
style
=
{{
width
:
102
,
height
:
30
,
border
:
'solid 1px #354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
,
cursor
:
"pointer"
}}
>
<
span
style
=
{{
color
:
'#354960'
,
fontSize
:
11
}}
>
Batal
<
/span
>
<
span
style
=
{{
color
:
'#354960'
,
fontSize
:
11
}}
>
Batal
<
/span
>
<
/div
>
<
/div
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
marginLeft
:
25
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
,
cursor
:
"pointer"
}}
>
<
div
onClick
=
{()
=>
this
.
handleSave
()}
style
=
{{
width
:
102
,
height
:
30
,
marginLeft
:
25
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
,
cursor
:
"pointer"
}}
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
Simpan
<
/span
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
Simpan
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
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