Commit 3f0dc5bf authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into deni-dev(pc)

parents 5c02bc17 4844e929
...@@ -193,6 +193,11 @@ const create = (type = "") => { ...@@ -193,6 +193,11 @@ const create = (type = "") => {
const checkUploadMB = (body) => api.post('transaction/master_budget/check_import', body) const checkUploadMB = (body) => api.post('transaction/master_budget/check_import', body)
const uploadMasterBudget = (body) => api.post('transaction/master_budget/import_master_budget', body) const uploadMasterBudget = (body) => api.post('transaction/master_budget/import_master_budget', body)
const getAllOperatingInd = (body) => api.post('/transaction/get_all_operating_indicator_report', body)
const getOperatingIndDetail = (body) => api.post('/transaction/operating_indicator/get_operating_indicator_report_hierarki', body)
const createOpetaingInd = (body) => api.post('/transaction/operating_indicator/create_submission_report', body)
//Template //Template
const downloadTemplate = (fileName, fileType) => api.get(`attachment/download_file?fileName=${fileName}&&fileType=${fileType}`) const downloadTemplate = (fileName, fileType) => api.get(`attachment/download_file?fileName=${fileName}&&fileType=${fileType}`)
...@@ -323,6 +328,9 @@ const create = (type = "") => { ...@@ -323,6 +328,9 @@ const create = (type = "") => {
createSubmitReport, createSubmitReport,
getSubmission, getSubmission,
checkUploadMB, checkUploadMB,
getAllOperatingInd,
getOperatingIndDetail,
createOpetaingInd,
uploadMasterBudget uploadMasterBudget
} }
} }
......
...@@ -674,6 +674,7 @@ export default class BudgetTahunan extends Component { ...@@ -674,6 +674,7 @@ export default class BudgetTahunan extends Component {
)} )}
{this.state.visibleTP && ( {this.state.visibleTP && (
<TaxPlanning <TaxPlanning
open={this.props.open}
report_id={this.state.report_id} report_id={this.state.report_id}
height={this.props.height} height={this.props.height}
width={this.props.width} width={this.props.width}
...@@ -683,6 +684,8 @@ export default class BudgetTahunan extends Component { ...@@ -683,6 +684,8 @@ export default class BudgetTahunan extends Component {
submissionID={this.state.submissionID} submissionID={this.state.submissionID}
saveToMasterBudget={this.saveToMasterBudget.bind(this)} saveToMasterBudget={this.saveToMasterBudget.bind(this)}
onClickClose={() => this.setState({ visibleTP: false, visibleBudgetTahunan: true })} onClickClose={() => this.setState({ visibleTP: false, visibleBudgetTahunan: true })}
getReport={this.getReport.bind(this)}
getReportAttachment={this.getReportAttachment.bind(this)}
/> />
)} )}
{this.state.visibleFAM && ( {this.state.visibleFAM && (
......
...@@ -9,6 +9,7 @@ import ReactTooltip from 'react-tooltip'; ...@@ -9,6 +9,7 @@ import ReactTooltip from 'react-tooltip';
import PopUpDelete from "./PopUpDelete"; import PopUpDelete from "./PopUpDelete";
import api from '../../api'; import api from '../../api';
import CreateManagementDoc from './CreateManagementDoc'; import CreateManagementDoc from './CreateManagementDoc';
import EditManagementDoc from './EditManagementDoc';
var ct = require("../../library/CustomTable"); var ct = require("../../library/CustomTable");
...@@ -24,6 +25,7 @@ export default class AuditTahunan extends Component { ...@@ -24,6 +25,7 @@ export default class AuditTahunan extends Component {
this.state = { this.state = {
dataTable: [], dataTable: [],
visibleCreate: false, visibleCreate: false,
visibleEdit: false,
refresh: '', refresh: '',
alert: false, alert: false,
popupDel: false, popupDel: false,
...@@ -122,7 +124,11 @@ export default class AuditTahunan extends Component { ...@@ -122,7 +124,11 @@ export default class AuditTahunan extends Component {
}) })
} }
if (type === 'edit') { if (type === 'edit') {
alert("edit") this.setState({
id: this.state.docId[val],
rowData: index,
visibleEdit: true
})
} }
} }
...@@ -153,7 +159,33 @@ export default class AuditTahunan extends Component { ...@@ -153,7 +159,33 @@ export default class AuditTahunan extends Component {
} }
}) })
} }
updateDocument(payload) {
api.create().updateDocument(payload).then(response => {
console.log(response)
if (response.data) {
if (response.ok) {
if (response.data.status === "success") {
this.getData()
this.setState({ konfirmasi: false, alert: true, messageAlert: response.data.message, tipeAlert: 'success', visibleEdit: false })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) {
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' })
}
})
}
closeAlert() { closeAlert() {
this.setState({ alert: false }) this.setState({ alert: false })
...@@ -252,6 +284,15 @@ export default class AuditTahunan extends Component { ...@@ -252,6 +284,15 @@ export default class AuditTahunan extends Component {
deleteDoc={this.deleteDoc.bind(this)} deleteDoc={this.deleteDoc.bind(this)}
/> />
)} )}
{this.state.visibleEdit && (
<EditManagementDoc
type={"edit"}
onClickClose={() => this.setState({ visibleEdit: false })}
data={this.state.rowData}
idoc={this.state.id}
updateDocument={this.updateDocument.bind(this)}
/>
)}
</div> </div>
) )
} }
......
...@@ -9,6 +9,7 @@ import Images from '../../assets/Images'; ...@@ -9,6 +9,7 @@ import Images from '../../assets/Images';
import ReactTooltip from 'react-tooltip'; import ReactTooltip from 'react-tooltip';
import PopUpDelete from "./PopUpDelete"; import PopUpDelete from "./PopUpDelete";
import CreateManagementDoc from './CreateManagementDoc'; import CreateManagementDoc from './CreateManagementDoc';
import EditManagementDoc from './EditManagementDoc';
var ct = require("../../library/CustomTable"); var ct = require("../../library/CustomTable");
...@@ -24,6 +25,7 @@ export default class BOD extends Component { ...@@ -24,6 +25,7 @@ export default class BOD extends Component {
this.state = { this.state = {
dataTable: [], dataTable: [],
visibleCreate: false, visibleCreate: false,
visibleEdit: false,
refresh: '', refresh: '',
alert: false, alert: false,
popupDel: false, popupDel: false,
...@@ -125,10 +127,41 @@ export default class BOD extends Component { ...@@ -125,10 +127,41 @@ export default class BOD extends Component {
}) })
} }
if (type === 'edit') { if (type === 'edit') {
alert("edit") this.setState({
id: this.state.docId[val],
rowData: index,
visibleEdit: true
})
} }
} }
updateDocument(payload) {
api.create().updateDocument(payload).then(response => {
console.log(response)
if (response.data) {
if (response.ok) {
if (response.data.status === "success") {
this.getData()
this.setState({ konfirmasi: false, alert: true, messageAlert: response.data.message, tipeAlert: 'success', visibleEdit: false })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) {
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' })
}
})
}
closeAlert() { closeAlert() {
this.setState({ alert: false }) this.setState({ alert: false })
} }
...@@ -255,6 +288,15 @@ export default class BOD extends Component { ...@@ -255,6 +288,15 @@ export default class BOD extends Component {
deleteDoc={this.deleteDoc.bind(this)} deleteDoc={this.deleteDoc.bind(this)}
/> />
)} )}
{this.state.visibleEdit && (
<EditManagementDoc
type={"edit"}
onClickClose={() => this.setState({ visibleEdit: false })}
data={this.state.rowData}
idoc={this.state.id}
updateDocument={this.updateDocument.bind(this)}
/>
)}
</div> </div>
) )
} }
......
...@@ -186,14 +186,21 @@ export default class DocumentManagement extends Component { ...@@ -186,14 +186,21 @@ export default class DocumentManagement extends Component {
</div> </div>
<div style={{ padding: 20 }}> <div style={{ padding: 20 }}>
<Paper style={{ padding: 20 }}> <Paper style={{ padding: 20 }}>
<div style={{ display: 'grid', justifyContent: 'flex-end' }}> <div style={{ display: 'flex', justifyContent: 'flex-end' }}>
<button {this.state.btncreate && <span>
type="button" <a data-tip={'Add'} data-for="add">
onClick={() => this.setState({ visibleCreate: true, refresh: '' })} <div style={{ display: 'grid', justifyContent: 'flex-end' }}>
style={{ marginRight: 25, background: 'transparent' }} <button
> type="button"
<img src={Images.add} /> onClick={() => this.setState({ visibleCreate: true, refresh: '' })}
</button> style={{ marginRight: 25, background: 'transparent' }}
>
<img src={Images.add} />
</button>
</div>
</a>
<ReactTooltip border={true} id="add" place="bottom" type="light" effect="solid" />
</span>}
</div> </div>
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
<Tabs <Tabs
...@@ -275,7 +282,6 @@ export default class DocumentManagement extends Component { ...@@ -275,7 +282,6 @@ export default class DocumentManagement extends Component {
// getDataDocument={this.getDataDocument.bind(this)} // getDataDocument={this.getDataDocument.bind(this)}
createDocument={this.createDocument.bind(this)} createDocument={this.createDocument.bind(this)}
setting_id={this.state.id} setting_id={this.state.id}
btncreate={this.state.btncreate}
/> />
)} )}
</div> </div>
......
import React, { Component } from 'react' import React, { Component } from 'react'
import Images from '../../assets/Images' import Images from '../../assets/Images'
import { TextField, withStyles, Snackbar } from '@material-ui/core' import { TextField, withStyles, Snackbar, Typography } from '@material-ui/core'
import MuiAlert from '@material-ui/lab/Alert'; import MuiAlert from '@material-ui/lab/Alert';
import api from '../../api' import api from '../../api'
import Autocomplete from '@material-ui/lab/Autocomplete' import Autocomplete from '@material-ui/lab/Autocomplete'
...@@ -61,11 +61,11 @@ export default class EditManagementDoc extends Component { ...@@ -61,11 +61,11 @@ export default class EditManagementDoc extends Component {
categoryId: data.setting_id, categoryId: data.setting_id,
categoryName: data.values, categoryName: data.values,
period: data.document_periode, period: data.document_periode,
description: data.description description: data.description,
// id: data.approval_matrix_id, // id: data.approval_matrix_id,
// status: data.status, // status: data.status,
// created: data.created, created: data.created,
// updated: data.updated === null ? "" : data.updated updated: data.updated === null ? "" : data.updated
}, () => { }, () => {
this.getDataCompany() this.getDataCompany()
this.getDataDocument() this.getDataDocument()
...@@ -225,8 +225,9 @@ export default class EditManagementDoc extends Component { ...@@ -225,8 +225,9 @@ export default class EditManagementDoc extends Component {
formData.append("documentPeriode", this.state.periode.periode); formData.append("documentPeriode", this.state.periode.periode);
formData.append("description", this.state.description); formData.append("description", this.state.description);
formData.append("extension", this.state.fileType); formData.append("extension", this.state.fileType);
formData.append("documentId", this.props.idoc);
this.setState({ formData }, ()=> { this.setState({ formData }, ()=> {
this.props.createDocument(this.state.formData, this.props.setting_id) this.props.updateDocument(this.state.formData)
}) })
} }
} }
...@@ -368,6 +369,16 @@ export default class EditManagementDoc extends Component { ...@@ -368,6 +369,16 @@ export default class EditManagementDoc extends Component {
> >
</TextField> </TextField>
</div> </div>
<div className="margin-top-10px" style={{ paddingLeft: 30, paddingRight: 30, borderRadius: 5, paddingBottom: 20 }}>
<div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11, width: '12%' }}>Created By</Typography>
<Typography style={{ fontSize: 11 }}>: {this.state.created}</Typography>
</div>
<div style={{ display: 'flex' }}>
<Typography style={{ fontSize: 11, width: '12%' }}>Updated By</Typography>
<Typography style={{ fontSize: 11 }}>: {this.state.updated == - null ? "" : this.state.updated}</Typography>
</div>
</div>
<div className="border-top grid grid-2x" style={{ height: 56, backgroundColor: '#f5f5f5', paddingLeft: 20, paddingRight: 20 }}> <div className="border-top grid grid-2x" style={{ height: 56, backgroundColor: '#f5f5f5', paddingLeft: 20, paddingRight: 20 }}>
<div className="column-1" style={{ alignSelf: 'center' }}> <div className="column-1" style={{ alignSelf: 'center' }}>
<button <button
......
...@@ -161,6 +161,33 @@ export default class ManualBookTia extends Component { ...@@ -161,6 +161,33 @@ export default class ManualBookTia extends Component {
}) })
} }
updateDocument(payload) {
api.create().updateDocument(payload).then(response => {
console.log(response)
if (response.data) {
if (response.ok) {
if (response.data.status === "success") {
this.getData()
this.setState({ konfirmasi: false, alert: true, messageAlert: response.data.message, tipeAlert: 'success', visibleEdit: false })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) {
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 columns = [{ let columns = [{
name: "Action", name: "Action",
...@@ -260,7 +287,7 @@ export default class ManualBookTia extends Component { ...@@ -260,7 +287,7 @@ export default class ManualBookTia extends Component {
onClickClose={() => this.setState({ visibleEdit: false })} onClickClose={() => this.setState({ visibleEdit: false })}
data={this.state.rowData} data={this.state.rowData}
idoc={this.state.id} idoc={this.state.id}
// updateAM={this.updateAM.bind(this)} updateDocument={this.updateDocument.bind(this)}
/> />
)} )}
</div> </div>
......
...@@ -9,6 +9,7 @@ import ReactTooltip from 'react-tooltip'; ...@@ -9,6 +9,7 @@ import ReactTooltip from 'react-tooltip';
import api from '../../api'; import api from '../../api';
import PopUpDelete from "./PopUpDelete"; import PopUpDelete from "./PopUpDelete";
import CreateManagementDoc from './CreateManagementDoc'; import CreateManagementDoc from './CreateManagementDoc';
import EditManagementDoc from './EditManagementDoc';
var ct = require("../../library/CustomTable"); var ct = require("../../library/CustomTable");
...@@ -24,6 +25,7 @@ export default class QReview extends Component { ...@@ -24,6 +25,7 @@ export default class QReview extends Component {
this.state = { this.state = {
dataTable: [], dataTable: [],
visibleCreate: false, visibleCreate: false,
visibleEdit: false,
refresh: '', refresh: '',
alert: false, alert: false,
popupDel: false, popupDel: false,
...@@ -121,7 +123,11 @@ export default class QReview extends Component { ...@@ -121,7 +123,11 @@ export default class QReview extends Component {
}) })
} }
if (type === 'edit') { if (type === 'edit') {
alert("edit") this.setState({
id: this.state.docId[val],
rowData: index,
visibleEdit: true
})
} }
} }
...@@ -157,6 +163,33 @@ export default class QReview extends Component { ...@@ -157,6 +163,33 @@ export default class QReview extends Component {
}) })
} }
updateDocument(payload) {
api.create().updateDocument(payload).then(response => {
console.log(response)
if (response.data) {
if (response.ok) {
if (response.data.status === "success") {
this.getData()
this.setState({ konfirmasi: false, alert: true, messageAlert: response.data.message, tipeAlert: 'success', visibleEdit: false })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
if (response.data.message.includes("Someone Logged In")) {
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 columns = [{ let columns = [{
name: "Action", name: "Action",
...@@ -247,6 +280,15 @@ export default class QReview extends Component { ...@@ -247,6 +280,15 @@ export default class QReview extends Component {
deleteDoc={this.deleteDoc.bind(this)} deleteDoc={this.deleteDoc.bind(this)}
/> />
)} )}
{this.state.visibleEdit && (
<EditManagementDoc
type={"edit"}
onClickClose={() => this.setState({ visibleEdit: false })}
data={this.state.rowData}
idoc={this.state.id}
updateDocument={this.updateDocument.bind(this)}
/>
)}
</div> </div>
) )
} }
......
...@@ -3,11 +3,33 @@ import { Typography, MuiThemeProvider, createMuiTheme } from '@material-ui/core' ...@@ -3,11 +3,33 @@ import { Typography, MuiThemeProvider, createMuiTheme } from '@material-ui/core'
import MUIDataTable from "mui-datatables"; import MUIDataTable from "mui-datatables";
import Images from '../assets/Images'; import Images from '../assets/Images';
import DonutChart from 'react-d3-donut'; import DonutChart from 'react-d3-donut';
import Constant from '../library/Constant';
import api from '../api';
var ct = require("../library/CustomTable"); var ct = require("../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable()); const getMuiTheme = () => createMuiTheme(ct.customTable());
class HomePage extends Component { class HomePage extends Component {
constructor(props) {
super(props)
this.state = {
userData: null
}
}
componentDidMount() {
let userId = localStorage.getItem(Constant.USER)
api.create().getDetailUser(userId).then((response) => {
if (response.data) {
if (response.data.status == 'success') {
this.setState({userData: response.data.data}, () => {
console.log(this.state.userData)
})
}
}
})
}
render() { render() {
const columns = ["#", "Nama Perusahaan", "Revisi", "Status", { const columns = ["#", "Nama Perusahaan", "Revisi", "Status", {
name: "Action", name: "Action",
...@@ -89,7 +111,7 @@ class HomePage extends Component { ...@@ -89,7 +111,7 @@ class HomePage extends Component {
return ( return (
<div style={{ flex: 1, backgroundColor: '#f8f8f8' }}> <div style={{ flex: 1, backgroundColor: '#f8f8f8' }}>
<div className={"main-color"} style={{ height: 78, flex: 1, display: 'flex', alignItems: 'center', paddingLeft: 20 }}> <div className={"main-color"} style={{ height: 78, flex: 1, display: 'flex', alignItems: 'center', paddingLeft: 20 }}>
<Typography style={{ fontSize: '24px', color: 'white' }}>Selamat Datang, John!</Typography> <Typography style={{ fontSize: '24px', color: 'white' }}>{this.state.userData == null? '' : `Selamat Datang, ${this.state.userData.fullname} !`}</Typography>
</div> </div>
<div style={{ flex: 1, padding: 20, width: '100%' }}> <div style={{ flex: 1, padding: 20, width: '100%' }}>
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Typography, Paper, TextField, MenuItem, Select, FormControlLabel } from '@material-ui/core'; import { Typography, Paper, TextField, MenuItem, Select, FormControlLabel } from '@material-ui/core';
import MUIDataTable from 'mui-datatables'; import MUIDataTable from 'mui-datatables';
import Images from '../assets/Images'; import Images from '../../assets/Images';
import api from '../api'; import OperatingIndicatorDetail from './OperatingIndicatorDetail'
import api from '../../api';
import Autocomplete from '@material-ui/lab/Autocomplete'; import Autocomplete from '@material-ui/lab/Autocomplete';
import { titleCase } from '../library/Utils'; import { titleCase } from '../../library/Utils';
import { ExcelRenderer } from 'react-excel-renderer'; import { ExcelRenderer } from 'react-excel-renderer';
import UploadFile from "../library/Upload"; import UploadFile from "../../library/Upload";
import { format } from 'date-fns'; import { format } from 'date-fns';
export default class OperatingIndicator extends Component { export default class OperatingIndicator extends Component {
...@@ -17,14 +18,15 @@ export default class OperatingIndicator extends Component { ...@@ -17,14 +18,15 @@ export default class OperatingIndicator extends Component {
listRevision: null, listRevision: null,
revision: null, revision: null,
visibleOperatingIndicator: true, visibleOperatingIndicator: true,
visibleMB: false, visibleDetailOpt: false,
listPeriode: null, listPeriode: null,
periode: null, periode: null,
listCompany: null, listCompany: null,
company: null, company: null,
report_id: null, report_id: null,
listAttachment: [], listAttachment: [],
visibleUpload: false visibleUpload: false,
submissionID: null
} }
this.fileHandler = this.fileHandler.bind(this); this.fileHandler = this.fileHandler.bind(this);
} }
...@@ -53,25 +55,25 @@ export default class OperatingIndicator extends Component { ...@@ -53,25 +55,25 @@ export default class OperatingIndicator extends Component {
let payload = { let payload = {
"company_id": this.state.company.company_id, "company_id": this.state.company.company_id,
"periode": this.state.periode.periode, "periode": this.state.periode.periode,
"report_type": "Operating Indicator", "report_type": "operating indicator",
} }
api.create().getReportTypeBody(payload).then(response => { api.create().getAllOperatingInd(payload).then(response => {
// console.log(response); console.log(response);
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
let dataTable = response.data.data.map((item, index) => { let dataTable = response.data.data.map((item, index) => {
return [ return [
item.number, item.number,
item.report_name, item.report_name,
item.revision, // item.revision,
item.current_status, item.current_status,
item.report_id, item.report_id,
item.is_can_upload, item.is_can_upload,
item.revision // item.revision
] ]
}) })
// console.log(dataTable); // console.log(dataTable);
this.setState({ dataTable }) this.setState({ dataTable, dataReport: response.data.data})
} }
} }
}) })
...@@ -118,7 +120,8 @@ export default class OperatingIndicator extends Component { ...@@ -118,7 +120,8 @@ export default class OperatingIndicator extends Component {
}; };
let index = data.sort((a, b) => a - b).findIndex((val) => val == year) let index = data.sort((a, b) => a - b).findIndex((val) => val == year)
this.setState({ listPeriode: defaultProps, periode: index == -1 ? periodeData[0] : periodeData[index] }, () => { this.setState({ listPeriode: defaultProps, periode: index == -1 ? periodeData[0] : periodeData[index] }, () => {
this.getRevision() this.getReport()
this.getSubmission()
}) })
} }
} }
...@@ -153,14 +156,31 @@ export default class OperatingIndicator extends Component { ...@@ -153,14 +156,31 @@ export default class OperatingIndicator extends Component {
}) })
} }
getSubmission() {
let payload = {
"company_id": this.state.company.company_id,
"periode": this.state.periode.periode
}
api.create().getSubmission(payload).then(response => {
if (response) {
if (response.data.data) {
this.setState({ submissionID: response.data.data.submission_id })
} else {
this.setState({ submissionID: null })
}
}
})
}
clickDetail(item, id) { clickDetail(item, id) {
this.setState({ report_id: id }) let index = this.state.dataReport.findIndex((val) => val.report_name == item[1])
if (item === 'Master Budget') { if (index !== -1) {
this.setState({ this.setState({
dataDetail: {...this.state.dataReport[index], periode: this.state.periode.periode, submissionID: this.state.submissionID, company: this.state.company},
visibleOperatingIndicator: false, visibleOperatingIndicator: false,
visibleMB: true, visibleDetailOpt: true,
}) })
} }
} }
handleChange(value, tableMeta) { handleChange(value, tableMeta) {
...@@ -266,7 +286,7 @@ export default class OperatingIndicator extends Component { ...@@ -266,7 +286,7 @@ export default class OperatingIndicator extends Component {
borderColor: 'transparent' borderColor: 'transparent'
}} }}
onClick={() => onClick={() =>
tableMeta.rowData[5] ? this.clickDetail(tableMeta.rowData[1], tableMeta.rowData[4]) : null tableMeta.rowData[4] ? this.clickDetail(tableMeta.rowData) : null
} }
> >
<Typography style={{ color: tableMeta.rowData[5] ? '#5198ea' : 'GrayText', fontSize: 12, }}>Detail</Typography> <Typography style={{ color: tableMeta.rowData[5] ? '#5198ea' : 'GrayText', fontSize: 12, }}>Detail</Typography>
...@@ -282,23 +302,6 @@ export default class OperatingIndicator extends Component { ...@@ -282,23 +302,6 @@ export default class OperatingIndicator extends Component {
name: "", name: "",
options: { display: false } options: { display: false }
}] }]
const dataTable = [
["1", "Balance Sheet", "done"],
["2", "Profit & Loss", ""],
["3", "CAT", "done"],
["4", "Fixed Assets Movement", ""],
["5", "Tax Planning", "done"],
["6", "Balance Sheet", "done"],
["7", "Profit & Loss", ""],
["8", "CAT", "done"],
["9", "Fixed Assets Movement", ""],
["10", "Tax Planning", "done"],
["11", "Balance Sheet", "done"],
["12", "Profit & Loss", "done"],
["13", "CAT", "done"],
["14", "Fixed Assets Movement", "done"],
["15", "Tax Planning", "done"],
]
const options = { const options = {
filter: false, filter: false,
sort: false, sort: false,
...@@ -349,7 +352,8 @@ export default class OperatingIndicator extends Component { ...@@ -349,7 +352,8 @@ export default class OperatingIndicator extends Component {
id="periode" id="periode"
onChange={(event, newInputValue) => this.setState({ periode: newInputValue }, () => { onChange={(event, newInputValue) => this.setState({ periode: newInputValue }, () => {
this.getReport() this.getReport()
this.getReportAttachment() this.getSubmission()
// this.getReportAttachment()
})} })}
debug debug
disableClearable disableClearable
...@@ -364,7 +368,8 @@ export default class OperatingIndicator extends Component { ...@@ -364,7 +368,8 @@ export default class OperatingIndicator extends Component {
id="company" id="company"
onChange={(event, newInputValue) => this.setState({ company: newInputValue }, () => { onChange={(event, newInputValue) => this.setState({ company: newInputValue }, () => {
this.getReport() this.getReport()
this.getReportAttachment() this.getSubmission()
// this.getReportAttachment()
})} })}
debug debug
disableClearable disableClearable
...@@ -396,7 +401,7 @@ export default class OperatingIndicator extends Component { ...@@ -396,7 +401,7 @@ export default class OperatingIndicator extends Component {
options={options} options={options}
/> />
</div> </div>
<div style={{ display: 'flex', marginTop: 20 }}> {/* <div style={{ display: 'flex', marginTop: 20 }}>
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
<Typography style={{ fontSize: '16px', color: '#4b4b4b', fontWeight: 'bold' }}>Attachment: </Typography> <Typography style={{ fontSize: '16px', color: '#4b4b4b', fontWeight: 'bold' }}>Attachment: </Typography>
</div> </div>
...@@ -435,7 +440,7 @@ export default class OperatingIndicator extends Component { ...@@ -435,7 +440,7 @@ export default class OperatingIndicator extends Component {
: null : null
} }
</div> </div>
</div> </div> */}
</div> </div>
<div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} > <div style={{ borderTop: 'solid 1px #c4c4c4', padding: 10, backgroundColor: '#f5f5f5', width: '100%', display: 'flex', justifyContent: 'flex-end' }} >
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}> <div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
...@@ -448,6 +453,15 @@ export default class OperatingIndicator extends Component { ...@@ -448,6 +453,15 @@ export default class OperatingIndicator extends Component {
</div> </div>
)} )}
{this.state.visibleDetailOpt &&
<OperatingIndicatorDetail
data={this.state.dataDetail}
height={this.props.height}
width={this.props.width}
onClickClose={() => this.setState({ visibleDetailOpt: false, visibleOperatingIndicator: true }, this.forceUpdate())}
/>
}
{this.state.visibleUpload && ( {this.state.visibleUpload && (
<div className="test app-popup-show"> <div className="test app-popup-show">
<div className="popup-content background-white border-radius" style={{ borderRadius: 8 }}> <div className="popup-content background-white border-radius" style={{ borderRadius: 8 }}>
......
This diff is collapsed.
...@@ -12,7 +12,7 @@ import ReportItems from '../container/MasterData/ReportItems' ...@@ -12,7 +12,7 @@ import ReportItems from '../container/MasterData/ReportItems'
import DashboardCAT from '../container/Laporan/DashboardCAT' import DashboardCAT from '../container/Laporan/DashboardCAT'
import BudgetTahunan from '../container/BudgetTahunan'; import BudgetTahunan from '../container/BudgetTahunan';
import RollingOutlook from '../container/RollingOutlook'; import RollingOutlook from '../container/RollingOutlook';
import OperatingIndicator from '../container/OperatingIndicator' import OperatingIndicator from '../container/OprIndicator/OperatingIndicator'
import MonthlyReport from '../container/MonthlyReport'; import MonthlyReport from '../container/MonthlyReport';
import DocumentManagement from '../container/DocumentManagement/DocumentManagement'; import DocumentManagement from '../container/DocumentManagement/DocumentManagement';
......
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