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
50c72da0
Commit
50c72da0
authored
Jan 16, 2021
by
Arfin Syadziy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update arfin
parent
8a2a0821
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
MonthlyReport.js
src/container/MonthlyReport.js
+11
-4
No files found.
src/container/MonthlyReport.js
View file @
50c72da0
...
@@ -67,7 +67,8 @@ export default class MonthlyReport extends Component {
...
@@ -67,7 +67,8 @@ export default class MonthlyReport extends Component {
approverTrue
:
false
,
approverTrue
:
false
,
listStatus
:
[],
listStatus
:
[],
selectedStatus
:
[],
selectedStatus
:
[],
detailRevisiCheck
:
[]
detailRevisiCheck
:
[],
isApprovedMB
:
false
}
}
this
.
myRef
=
React
.
createRef
()
this
.
myRef
=
React
.
createRef
()
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
@@ -206,7 +207,7 @@ export default class MonthlyReport extends Component {
...
@@ -206,7 +207,7 @@ export default class MonthlyReport extends Component {
item
.
number
,
item
.
number
,
item
.
report_name
==
"CAT"
?
"Corporate Annual Target"
:
item
.
report_name
,
item
.
report_name
==
"CAT"
?
"Corporate Annual Target"
:
item
.
report_name
,
item
.
revision
,
item
.
revision
,
this
.
state
.
lastStatus
===
'APPROVED'
?
'CLOSED'
:
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
item
.
current_status
,
this
.
state
.
isApprovedMB
?
(
this
.
state
.
lastStatus
===
'APPROVED'
?
'CLOSED'
:
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
item
.
current_status
)
:
"CLOSED"
,
item
.
report_id
,
item
.
report_id
,
item
.
is_can_upload
,
item
.
is_can_upload
,
item
.
revision
item
.
revision
...
@@ -347,14 +348,14 @@ export default class MonthlyReport extends Component {
...
@@ -347,14 +348,14 @@ export default class MonthlyReport extends Component {
let
data
=
[]
let
data
=
[]
response
.
data
.
data
.
map
((
item
)
=>
{
response
.
data
.
data
.
map
((
item
)
=>
{
if
(
this
.
state
.
isApprover
)
{
if
(
this
.
state
.
isApprover
)
{
if
(
item
>=
2000
&&
item
<=
(
Number
(
currentYear
)
+
1
))
{
if
(
item
>=
2000
&&
item
<=
(
Number
(
currentYear
)))
{
data
.
push
(
item
)
data
.
push
(
item
)
}
}
}
else
{
}
else
{
// if ((item >= 2000) && (item == this.state.lastPeriod || item < this.state.lastPeriod)) {
// if ((item >= 2000) && (item == this.state.lastPeriod || item < this.state.lastPeriod)) {
// data.push(item)
// data.push(item)
// }
// }
if
((
item
>=
2000
)
&&
(
item
==
currentYear
||
item
<=
currentYear
+
1
))
{
if
((
item
>=
2000
)
&&
(
item
==
currentYear
||
item
<=
currentYear
))
{
data
.
push
(
item
)
data
.
push
(
item
)
}
}
}
}
...
@@ -580,6 +581,7 @@ export default class MonthlyReport extends Component {
...
@@ -580,6 +581,7 @@ export default class MonthlyReport extends Component {
lastRevision
:
response
.
data
.
data
.
last_revision
,
lastRevision
:
response
.
data
.
data
.
last_revision
,
btnApprove
:
response
.
data
.
data
.
is_submit
,
btnApprove
:
response
.
data
.
data
.
is_submit
,
monthlyReportId
:
response
.
data
.
data
?
response
.
data
.
data
.
monthly_report_id
:
null
,
monthlyReportId
:
response
.
data
.
data
?
response
.
data
.
data
.
monthly_report_id
:
null
,
isApprovedMB
:
response
.
data
.
data
.
is_approved_master_budget
},
()
=>
{
},
()
=>
{
// // console.log(this.state.lastStatus);
// // console.log(this.state.lastStatus);
this
.
historyApproval
()
this
.
historyApproval
()
...
@@ -1502,6 +1504,11 @@ export default class MonthlyReport extends Component {
...
@@ -1502,6 +1504,11 @@ export default class MonthlyReport extends Component {
<
/div
>
<
/div
>
)}
)}
<
/div
>
<
/div
>
{
this
.
state
.
isApprovedMB
===
false
&&
(
<
div
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
<
span
>
Master
Budget
Has
Not
Been
Approved
<
/span
>
<
/div
>
)}
{
this
.
state
.
approverTrue
===
true
?
{
this
.
state
.
approverTrue
===
true
?
this
.
state
.
lastStatus
===
'WAITING FOR REVIEW'
?
this
.
state
.
lastStatus
===
'WAITING FOR REVIEW'
?
<
div
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
<
div
style
=
{{
width
:
'100%'
,
padding
:
'10px 20px'
,
backgroundColor
:
'yellow'
,
textAlign
:
'center'
,
marginTop
:
20
}}
>
...
...
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