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
49512e0a
Commit
49512e0a
authored
Nov 17, 2020
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push gadang
parent
c9bde168
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
783 additions
and
116 deletions
+783
-116
BudgetTahunan.js
src/container/BudgetTahunan.js
+44
-8
CorporateAnnualTarget.js
src/container/BudgetTahunan/CorporateAnnualTarget.js
+739
-108
No files found.
src/container/BudgetTahunan.js
View file @
49512e0a
...
@@ -252,12 +252,13 @@ export default class BudgetTahunan extends Component {
...
@@ -252,12 +252,13 @@ export default class BudgetTahunan extends Component {
dataTableRevision
.
push
([
dataTableRevision
.
push
([
item
.
report_id
,
item
.
report_id
,
item
.
report_name
===
'CAT'
?
'Corporate Annual Target'
:
item
.
report_name
,
item
.
report_name
===
'CAT'
?
'Corporate Annual Target'
:
item
.
report_name
,
""
""
,
item
.
number
])
])
}
}
})
})
// // console.log(dataTableRevision);
// // console.log(dataTableRevision);
this
.
setState
({
dataTable
,
loading
:
false
,
dataTableRevision
,
dataForRevision
:
response
.
data
.
data
},
()
=>
{
this
.
setState
({
dataTable
,
loading
:
false
,
dataTableRevision
:
dataTableRevision
.
sort
((
a
,
b
)
=>
a
.
number
-
b
.
number
)
,
dataForRevision
:
response
.
data
.
data
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
document
.
body
.
style
.
overflow
=
'unset'
;
})
})
}
}
...
@@ -953,6 +954,9 @@ export default class BudgetTahunan extends Component {
...
@@ -953,6 +954,9 @@ export default class BudgetTahunan extends Component {
)
)
}
}
}
}
},
{
name
:
""
,
options
:
{
display
:
false
}
}
}
]
]
...
@@ -973,17 +977,49 @@ export default class BudgetTahunan extends Component {
...
@@ -973,17 +977,49 @@ export default class BudgetTahunan extends Component {
let
detailRevisiCheck
=
this
.
state
.
detailRevisiCheck
let
detailRevisiCheck
=
this
.
state
.
detailRevisiCheck
let
payload
=
{
let
payload
=
{
report_id
:
value
[
0
],
report_id
:
value
[
0
],
remarks
:
value
[
2
]
remarks
:
value
[
2
],
number
:
value
[
3
]
}
}
let
indexDataRevisi
=
this
.
state
.
dataTableRevision
.
findIndex
((
val
)
=>
val
[
3
]
==
value
[
3
])
let
indexId
=
detailRevisiCheck
.
findIndex
((
val
)
=>
val
.
report_id
==
value
[
0
])
let
indexId
=
detailRevisiCheck
.
sort
((
a
,
b
)
=>
a
.
number
-
b
.
number
).
findIndex
((
val
)
=>
val
.
number
==
value
[
3
])
// console.log(indexId)
if
(
indexId
==
-
1
)
{
if
(
indexId
==
-
1
)
{
this
.
state
.
dataTableRevision
.
map
((
item
,
index
)
=>
{
if
(
index
>
indexDataRevisi
)
{
let
indexIds
=
detailRevisiCheck
.
findIndex
((
val
)
=>
val
.
number
==
item
[
3
])
if
(
indexIds
==
-
1
)
{
let
payload2
=
{
report_id
:
item
[
0
],
remarks
:
item
[
2
],
number
:
item
[
3
]
}
detailRevisiCheck
.
push
(
payload2
)
}
}
})
detailRevisiCheck
.
push
(
payload
)
detailRevisiCheck
.
push
(
payload
)
}
else
{
}
else
{
detailRevisiCheck
.
splice
(
indexId
,
1
)
let
x
=
0
detailRevisiCheck
.
sort
((
a
,
b
)
=>
a
.
number
-
b
.
number
).
map
((
item
,
index
)
=>
{
if
(
item
.
number
<
value
[
3
])
{
x
+=
1
}
})
if
(
x
<
1
)
{
this
.
state
.
dataTableRevision
.
map
((
item
,
index
)
=>
{
if
(
index
>
indexDataRevisi
)
{
let
indexIdz
=
detailRevisiCheck
.
findIndex
((
val
)
=>
val
.
number
==
item
[
3
])
if
(
indexIdz
!==
-
1
)
{
detailRevisiCheck
.
splice
(
indexIdz
,
1
)
}
}
})
detailRevisiCheck
.
splice
(
indexId
,
1
)
}
}
}
this
.
setState
({
detailRevisiCheck
})
this
.
setState
({
detailRevisiCheck
:
detailRevisiCheck
.
sort
((
a
,
b
)
=>
a
.
number
-
b
.
number
)
})
//
//
console.log(detailRevisiCheck)
// console.log(detailRevisiCheck)
}
}
const
options
=
{
const
options
=
{
...
...
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
49512e0a
This diff is collapsed.
Click to expand it.
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