Commit dc2f45e1 authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'GGMAC' into 'master'

update banyak

See merge request !1537
parents db93bb4b 9e22657a
...@@ -474,10 +474,10 @@ const create = (type = "") => { ...@@ -474,10 +474,10 @@ const create = (type = "") => {
const deleteDocument = (id) => api.post(`document/delete_document/${id}`) const deleteDocument = (id) => api.post(`document/delete_document/${id}`)
// Monitoring // Monitoring
const getMonitoringMB = (body) => api.get(`transaction/monitoring/master_budget/${body.year}`) const getMonitoringMB = (body) => api.get(`transaction/monitoring/master_budget?year=${body.year}`)
const getMonitoringMR = (body) => api.get(`transaction/monitoring/monthly_report/${body.year}/${body.month}`) const getMonitoringMR = (body) => api.get(`transaction/monitoring/monthly_report/${body.year}/${body.month}`)
const getMonitoringRO = (body) => api.get(`transaction/monitoring/rolling_outlook/${body.year}/${body.quarter}`) const getMonitoringRO = (body) => api.get(`transaction/monitoring/rolling_outlook/${body.year}/${body.quarter}`)
const getMonitoringOLPA = (body) => api.get(`transaction/monitoring/outlook_pa/${body.year}`) const getMonitoringOLPA = (body) => api.get(`transaction/monitoring/outlook_pa?year=${body.year}`)
// ------ // ------
// STEP 3 // STEP 3
// ------ // ------
......
...@@ -169,13 +169,23 @@ class ReportProgress extends Component { ...@@ -169,13 +169,23 @@ class ReportProgress extends Component {
if (response.data.status === "success") { if (response.data.status === "success") {
let data = response.data.data let data = response.data.data
data.map((item,index) => { data.map((item,index) => {
let report = item.report let report = []
report.push({report_name: 'Operating Indicator', status_report: item.operating_indicator}, {report_name: 'Submission Status', status_report: item.submission_status}) item.report.map((items,indexs) => {
if (!String(items.report_name).includes('Indicator') && !String(items.report_name).includes('OLPA')) {
if (String(items.report_name).includes('Fixed')) {
report.push({...items, status_report: (items.report_date == null? items.status_report : items.status_report + ' - ' + items.report_date), report_name: 'Fixed Assets Movement'})
} else {
report.push({...items, status_report: (items.report_date == null? items.status_report : items.status_report + ' - ' + items.report_date)})
}
}
})
report.push({report_name: 'Operating Indicator', status_report: item.operatingIndicator}, {report_name: 'Submission Status', status_report: (item.submissionStatusDate == null? item.submissionStatus : item.submissionStatus + ' - ' + item.submissionStatusDate)})
dataTable.push([ dataTable.push([
item.company_name, item.companyName,
report report
]) ])
}) })
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 }, () => {
...@@ -265,12 +275,27 @@ class ReportProgress extends Component { ...@@ -265,12 +275,27 @@ class ReportProgress extends Component {
if (response.data.status === "success") { if (response.data.status === "success") {
let data = response.data.data let data = response.data.data
data.map((item,index) => { data.map((item,index) => {
let report = item.report let report = []
report.push({report_name: 'Operating Indicator', status_report: item.operating_indicator}, {report_name: 'OLPA Status', status_report: item.olpa_status}) item.report.map((items,indexs) => {
if (!String(items.report_name).includes('Indicator') && !String(items.report_name).includes('OLPA')) {
if (String(items.report_name).includes('Fixed')) {
report.push({...items, status_report: (items.report_date == null? items.status_report : items.status_report + ' - ' + items.report_date), report_name: 'Fixed Assets Movement'})
} else {
report.push({...items, status_report: (items.report_date == null? items.status_report : items.status_report + ' - ' + items.report_date)})
}
}
})
report.push({report_name: 'Operating Indicator', status_report: item.operatingIndicator}, {report_name: 'OLPA Status', status_report: (item.submissionStatusDate == null? item.submissionStatus : item.submissionStatus + ' - ' + item.submissionStatusDate)})
dataTable.push([ dataTable.push([
item.company_name, item.companyName,
report report
]) ])
// let report = item.report
// report.push({report_name: 'Operating Indicator', status_report: item.operating_indicator}, {report_name: 'OLPA Status', status_report: item.olpa_status})
// dataTable.push([
// item.company_name,
// report
// ])
}) })
this.setState({dataTable, loading: false}) this.setState({dataTable, loading: false})
} else { } else {
...@@ -401,7 +426,7 @@ class ReportProgress extends Component { ...@@ -401,7 +426,7 @@ class ReportProgress extends Component {
renderInput={(params) => <TextField {...params} label="Month" margin="normal" style={{ marginTop: 7 }} />} renderInput={(params) => <TextField {...params} label="Month" margin="normal" style={{ marginTop: 7 }} />}
value={this.state.month} value={this.state.month}
/>} />}
{this.state.reportType != null && this.state.reportType.value == 3 && <Autocomplete {this.state.reportType != null && this.state.reportType.value == 2 && <Autocomplete
{...this.state.listQuarter} {...this.state.listQuarter}
id="quarter" id="quarter"
onChange={(event, newInputValue) => this.setState({ quarter: newInputValue, loading: true }, () => { onChange={(event, newInputValue) => this.setState({ quarter: newInputValue, loading: true }, () => {
......
...@@ -595,8 +595,8 @@ export function customTable4() { ...@@ -595,8 +595,8 @@ export function customTable4() {
root: { root: {
display: 'table-cell', display: 'table-cell',
padding: 7, padding: 7,
paddingLeft: 25, paddingLeft: 0,
paddingRight: 25, paddingRight: 0,
fontSize: '0.875rem', fontSize: '0.875rem',
textAlign: 'left', textAlign: 'left',
fontFamily: "Roboto, Helvetica, Arial, sans-serif", fontFamily: "Roboto, Helvetica, Arial, sans-serif",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment