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
a6b340bf
Commit
a6b340bf
authored
Mar 16, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev/riri' into 'ENV-DEV'
Reminder Cuti See merge request
!1742
parents
aa7168d4
7786dbeb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
4 deletions
+38
-4
ProgressReport.js
src/container/ProgressReport/ProgressReport.js
+4
-0
TableProgressReport.js
src/container/ProgressReport/TableProgressReport.js
+34
-4
No files found.
src/container/ProgressReport/ProgressReport.js
View file @
a6b340bf
...
...
@@ -570,6 +570,10 @@ class ReportProgress extends Component {
company
=
{
this
.
state
.
company
}
typeReport
=
{
String
(
this
.
state
.
reportType
.
name
).
toLocaleUpperCase
()}
year
=
{
this
.
state
.
periodeMB
.
value
}
getMonitoringMB
=
{
this
.
getMonitoringMB
.
bind
(
this
)}
getMonitoringMR
=
{
this
.
getMonitoringMR
.
bind
(
this
)}
getMonitoringRO
=
{
this
.
getMonitoringRO
.
bind
(
this
)}
getMonitoringOLPA
=
{
this
.
getMonitoringOLPA
.
bind
(
this
)}
/
>
)}
<
/div
>
...
...
src/container/ProgressReport/TableProgressReport.js
View file @
a6b340bf
...
...
@@ -41,6 +41,7 @@ export default class TableProgressReport extends Component {
}
handleShowPopup
(
id
,
data
)
{
console
.
log
(
this
.
props
);
let
item
=
this
.
props
let
bulan
=
item
.
month
==
1
?
"Jan"
:
item
.
month
==
2
?
"Feb"
:
item
.
month
==
3
?
"Mar"
:
item
.
month
==
4
?
"Apr"
:
item
.
month
==
5
?
"May"
:
item
.
month
==
6
?
"Jun"
:
item
.
month
==
7
?
"Jul"
:
item
.
month
==
8
?
"Aug"
:
item
.
month
==
9
?
"Sep"
:
item
.
month
==
10
?
"Oct"
:
item
.
month
==
11
?
"Nov"
:
item
.
month
==
12
?
"Dec"
:
null
this
.
setState
({
visiblePopup
:
true
,
idCompany
:
id
,
companyName
:
data
[
0
],
month
:
bulan
})
...
...
@@ -58,17 +59,46 @@ export default class TableProgressReport extends Component {
"year"
:
data
.
year
,
"month"
:
data
.
reportType
===
1
?
data
.
month
:
null
}
console
.
log
(
payload
);
let
payloadGetData
=
{
"year"
:
data
.
year
,
"month"
:
data
.
month
,
"quarter"
:
data
.
quarter
===
"Q1"
?
"q1"
:
data
.
quarter
===
"Q2"
?
"q2"
:
data
.
quarter
===
"Q3"
?
"q3"
:
null
}
console
.
log
(
payloadGetData
);
api
.
create
().
sendEmail
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
this
.
setState
({
loading
:
false
})
if
(
response
.
data
.
status
==
'success'
)
{
this
.
setState
({
loading
:
false
,
visiblePopup
:
false
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
})
if
(
data
.
reportType
===
0
)
{
this
.
props
.
getMonitoringMB
(
payloadGetData
)
}
else
if
(
data
.
reportType
===
1
)
{
this
.
props
.
getMonitoringMR
(
payloadGetData
)
}
else
if
(
data
.
reportType
===
2
)
{
this
.
props
.
getMonitoringRO
(
payloadGetData
)
}
else
if
(
data
.
reportType
===
3
)
{
this
.
props
.
getMonitoringOLPA
(
payloadGetData
)
}
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
,
visiblePopup
:
false
,
loading
:
false
})
// this.setState({ visiblePopup: false, alert: true, messageAlert: response.data.message, tipeAlert: 'success' }, () => {
// setTimeout(() => {
// if (data.reportType === 0 ) {
// this.props.getMonitoringMB(payloadGetData)
// } else if (data.reportType === 1 ) {
// this.props.getMonitoringMR(payloadGetData)
// } else if (data.reportType === 2 ) {
// this.props.getMonitoringRO(payloadGetData)
// } else if (data.reportType === 3 ) {
// this.props.getMonitoringOLPA(payloadGetData)
// }
// this.setState({ loading: false })
// }, 1000)
// })
// this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' })
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
...
...
@@ -78,7 +108,7 @@ export default class TableProgressReport extends Component {
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
,
loading
:
false
})
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
,
loading
:
false
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
,
loading
:
false
})
...
...
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