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
f17cb2c6
Commit
f17cb2c6
authored
Jan 23, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev/riri' into 'ENV-DEV'
Fixing Formula OI dan push notif See merge request
!1675
parents
2e381d30
5a1a62f4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
6 deletions
+53
-6
index.js
src/api/index.js
+3
-0
OperatingIndicatorDetail.js
src/container/OperatingIndicator/OperatingIndicatorDetail.js
+1
-1
ProgressReport.js
src/container/ProgressReport/ProgressReport.js
+3
-1
TableProgressReport.js
src/container/ProgressReport/TableProgressReport.js
+46
-4
No files found.
src/api/index.js
View file @
f17cb2c6
...
@@ -493,6 +493,9 @@ const create = (type = "") => {
...
@@ -493,6 +493,9 @@ const create = (type = "") => {
const
createMaintenanceMode
=
(
body
)
=>
api
.
post
(
'maintenance/mode/create_maintenance_mode'
,
body
)
const
createMaintenanceMode
=
(
body
)
=>
api
.
post
(
'maintenance/mode/create_maintenance_mode'
,
body
)
const
updateMaintenanceMode
=
(
body
)
=>
api
.
post
(
'maintenance/mode/update_maintenance_mode'
,
body
)
const
updateMaintenanceMode
=
(
body
)
=>
api
.
post
(
'maintenance/mode/update_maintenance_mode'
,
body
)
// Reminder Manual
const
sendEmail
=
(
body
)
=>
api
.
post
(
'transaction/monitoring/reminder_progress_report'
,
body
)
// Superadmin Approve
// Superadmin Approve
const
getListApprover
=
(
report
,
monthlyReportId
)
=>
api
.
get
(
`transaction/
${
report
}
/get_approver/
${
monthlyReportId
}
`
)
const
getListApprover
=
(
report
,
monthlyReportId
)
=>
api
.
get
(
`transaction/
${
report
}
/get_approver/
${
monthlyReportId
}
`
)
const
getIdToken
=
(
userId
)
=>
api
.
get
(
`transaction/get_token/
${
userId
}
`
)
const
getIdToken
=
(
userId
)
=>
api
.
get
(
`transaction/get_token/
${
userId
}
`
)
...
...
src/container/OperatingIndicator/OperatingIndicatorDetail.js
View file @
f17cb2c6
...
@@ -535,7 +535,7 @@ export default class BalanceSheet extends Component {
...
@@ -535,7 +535,7 @@ export default class BalanceSheet extends Component {
}
else
if
(
item
==
'-'
||
item
==
'+'
||
item
==
'/'
||
item
==
'*'
)
{
}
else
if
(
item
==
'-'
||
item
==
'+'
||
item
==
'/'
||
item
==
'*'
)
{
arrayFormulaConvert
.
push
(
item
)
arrayFormulaConvert
.
push
(
item
)
}
else
{
}
else
{
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
2
1
]
==
item
)
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
2
3
]
==
item
)
if
(
tambahan
)
{
if
(
tambahan
)
{
if
(
item
==
'-'
||
item
==
'+'
||
item
==
'/'
||
item
==
'*'
)
{
if
(
item
==
'-'
||
item
==
'+'
||
item
==
'/'
||
item
==
'*'
)
{
opet
=
item
opet
=
item
...
...
src/container/ProgressReport/ProgressReport.js
View file @
f17cb2c6
...
@@ -201,7 +201,7 @@ class ReportProgress extends Component {
...
@@ -201,7 +201,7 @@ class ReportProgress extends Component {
// report
// report
// ])
// ])
// })
// })
console
.
log
(
dataTable
)
//
console.log(dataTable)
this
.
setState
({
dataTable
,
loading
:
false
})
this
.
setState
({
dataTable
,
loading
:
false
})
}
else
{
}
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
},
()
=>
{
...
@@ -560,8 +560,10 @@ class ReportProgress extends Component {
...
@@ -560,8 +560,10 @@ class ReportProgress extends Component {
// dataTable={this.state.dataTable}
// dataTable={this.state.dataTable}
periode
=
{
this
.
state
.
periode
?
this
.
state
.
periode
.
periode
:
null
}
periode
=
{
this
.
state
.
periode
?
this
.
state
.
periode
.
periode
:
null
}
quarter
=
{
this
.
state
.
quarter
.
name
}
quarter
=
{
this
.
state
.
quarter
.
name
}
month
=
{
this
.
state
.
month
.
month_id
}
company
=
{
this
.
state
.
company
}
company
=
{
this
.
state
.
company
}
typeReport
=
{
String
(
this
.
state
.
reportType
.
name
).
toLocaleUpperCase
()}
typeReport
=
{
String
(
this
.
state
.
reportType
.
name
).
toLocaleUpperCase
()}
year
=
{
this
.
state
.
periodeMB
.
value
}
/
>
/
>
)}
)}
<
/div
>
<
/div
>
...
...
src/container/ProgressReport/TableProgressReport.js
View file @
f17cb2c6
import
React
,
{
Component
}
from
"react"
;
import
React
,
{
Component
}
from
"react"
;
import
{
createMuiTheme
,
FormControlLabel
,
Input
,
MuiThemeProvider
,
TableCell
,
Typography
}
from
"@material-ui/core"
;
import
{
createMuiTheme
,
FormControlLabel
,
Input
,
MuiThemeProvider
,
TableCell
,
Typography
}
from
"@material-ui/core"
;
import
MUIDataTable
from
"mui-datatables"
;
import
MUIDataTable
from
"mui-datatables"
;
import
api
from
'../../api'
;
import
Constant
from
'../../library/Constant'
;
var
ct
=
require
(
"../../library/CustomTable"
);
var
ct
=
require
(
"../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable4
());
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable4
());
...
@@ -26,7 +29,46 @@ export default class TableProgressReport extends Component {
...
@@ -26,7 +29,46 @@ export default class TableProgressReport extends Component {
}
}
}
}
handleSendEmail
(
idCompany
)
{
// console.log(this.props);
let
data
=
this
.
props
let
q1
=
data
.
reportType
===
2
&&
data
.
quarter
===
"Q1"
let
q2
=
data
.
reportType
===
2
&&
data
.
quarter
===
"Q2"
let
q3
=
data
.
reportType
===
2
&&
data
.
quarter
===
"Q3"
console
.
log
(
q1
);
let
payload
=
{
"company_id"
:
idCompany
,
"setting_type_name"
:
data
.
reportType
===
0
?
"master_budget"
:
data
.
reportType
===
1
?
"monthly_report"
:
q1
?
"outlook_q1"
:
q2
?
"outlook_q2"
:
q3
?
"outlook_q3"
:
data
.
reportType
===
3
?
"outlook_pa"
:
null
,
"year"
:
data
.
year
,
"month"
:
data
.
reportType
===
1
?
data
.
month
:
null
}
// api.create().sendEmail(payload).then(response => {
// if (response.data) {
// if (response.ok) {
// if (response.data.status == 'success') {
// this.getData()
// this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' })
// } else {
// this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
// if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
// setTimeout(() => {
// localStorage.removeItem(Constant.TOKEN)
// window.location.reload();
// }, 1000);
// }
// })
// }
// } else {
// this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
// }
// } else {
// this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
// }
// })
}
render
()
{
render
()
{
let
dataTable2
=
this
.
props
.
dataTable
;
let
dataTable2
=
this
.
props
.
dataTable
;
// console.log(this.props);
// console.log(this.props);
const
handleValue
=
(
tableMeta
,
itemName
)
=>
{
const
handleValue
=
(
tableMeta
,
itemName
)
=>
{
...
@@ -142,7 +184,7 @@ export default class TableProgressReport extends Component {
...
@@ -142,7 +184,7 @@ export default class TableProgressReport extends Component {
<
button
<
button
type
=
"button"
type
=
"button"
style
=
{{
background
:
'white'
}}
style
=
{{
background
:
'white'
}}
onClick
=
{()
=>
alert
(
tableMeta
.
rowData
[
5
])}
onClick
=
{()
=>
this
.
handleSendEmail
(
tableMeta
.
rowData
[
5
])}
>
>
<
div
style
=
{{
width
:
85
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
div
style
=
{{
width
:
85
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
{
tableMeta
.
rowData
[
3
]
===
null
||
tableMeta
.
rowData
[
3
]
===
0
?
"Send Email"
:
"Sent"
}
<
/span
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
{
tableMeta
.
rowData
[
3
]
===
null
||
tableMeta
.
rowData
[
3
]
===
0
?
"Send Email"
:
"Sent"
}
<
/span
>
...
@@ -300,7 +342,7 @@ export default class TableProgressReport extends Component {
...
@@ -300,7 +342,7 @@ export default class TableProgressReport extends Component {
<
button
<
button
type
=
"button"
type
=
"button"
style
=
{{
background
:
'white'
}}
style
=
{{
background
:
'white'
}}
onClick
=
{()
=>
alert
(
tableMeta
.
rowData
[
5
])}
onClick
=
{()
=>
this
.
handleSendEmail
(
tableMeta
.
rowData
[
5
])}
>
>
<
div
style
=
{{
width
:
85
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
div
style
=
{{
width
:
85
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
{
tableMeta
.
rowData
[
3
]
===
null
||
tableMeta
.
rowData
[
3
]
===
0
?
"Send Email"
:
"Sent"
}
<
/span
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
{
tableMeta
.
rowData
[
3
]
===
null
||
tableMeta
.
rowData
[
3
]
===
0
?
"Send Email"
:
"Sent"
}
<
/span
>
...
@@ -442,7 +484,7 @@ export default class TableProgressReport extends Component {
...
@@ -442,7 +484,7 @@ export default class TableProgressReport extends Component {
<
button
<
button
type
=
"button"
type
=
"button"
style
=
{{
background
:
'white'
}}
style
=
{{
background
:
'white'
}}
onClick
=
{()
=>
alert
(
tableMeta
.
rowData
[
5
])}
onClick
=
{()
=>
this
.
handleSendEmail
(
tableMeta
.
rowData
[
5
])}
>
>
<
div
style
=
{{
width
:
85
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
div
style
=
{{
width
:
85
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
{
tableMeta
.
rowData
[
3
]
===
null
||
tableMeta
.
rowData
[
3
]
===
0
?
"Send Email"
:
"Sent"
}
<
/span
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
{
tableMeta
.
rowData
[
3
]
===
null
||
tableMeta
.
rowData
[
3
]
===
0
?
"Send Email"
:
"Sent"
}
<
/span
>
...
@@ -584,7 +626,7 @@ export default class TableProgressReport extends Component {
...
@@ -584,7 +626,7 @@ export default class TableProgressReport extends Component {
<
button
<
button
type
=
"button"
type
=
"button"
style
=
{{
background
:
'white'
}}
style
=
{{
background
:
'white'
}}
onClick
=
{()
=>
alert
(
tableMeta
.
rowData
[
5
])}
onClick
=
{()
=>
this
.
handleSendEmail
(
tableMeta
.
rowData
[
5
])}
>
>
<
div
style
=
{{
width
:
85
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
div
style
=
{{
width
:
85
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
{
tableMeta
.
rowData
[
3
]
===
null
||
tableMeta
.
rowData
[
3
]
===
0
?
"Send Email"
:
"Sent"
}
<
/span
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
{
tableMeta
.
rowData
[
3
]
===
null
||
tableMeta
.
rowData
[
3
]
===
0
?
"Send Email"
:
"Sent"
}
<
/span
>
...
...
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