Commit 89571848 authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'rifka' into 'master'

update managdoc taxplan

See merge request !333
parents ee945e60 654f4d75
...@@ -206,7 +206,8 @@ const create = (type = "") => { ...@@ -206,7 +206,8 @@ const create = (type = "") => {
const uploadFoto = (body) => api.post('attachment/upload_foto', body) const uploadFoto = (body) => api.post('attachment/upload_foto', body)
// MANAGEMENT DOCUMENT // MANAGEMENT DOCUMENT
const getDocumentCategory = (body) => api.post('setting/get_all_setting_document_category', body) // const getDocumentCategory = (body) => api.post('setting/get_all_setting_document_category', body)
const getDocumentCategory = () => api.get('setting/get_all_setting_document_category')
const getAllDocument = (body) => api.post('document/get_all_document', body) const getAllDocument = (body) => api.post('document/get_all_document', body)
const uploadDocument = (body) => api.post('document/upload_document', body) const uploadDocument = (body) => api.post('document/upload_document', body)
const updateDocument = (body) => api.post('document/update_document', body) const updateDocument = (body) => api.post('document/update_document', body)
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Container, Row, Col } from "react-bootstrap"; import { Container, Row, Col } from "react-bootstrap";
import { makeStyles, createMuiTheme, MuiThemeProvider, withStyles } from '@material-ui/core/styles'; import { makeStyles, createMuiTheme, MuiThemeProvider } from '@material-ui/core/styles';
import { TextField, InputBase, Snackbar } from "@material-ui/core"; import { TextField, InputBase, Snackbar, withStyles, Tooltip } from "@material-ui/core";
import { ExcelRenderer } from 'react-excel-renderer'; import { ExcelRenderer } from 'react-excel-renderer';
import Images from '../../assets/Images'; import Images from '../../assets/Images';
import MUIDataTable from "mui-datatables"; import MUIDataTable from "mui-datatables";
...@@ -17,6 +17,16 @@ import api from "../../api"; ...@@ -17,6 +17,16 @@ import api from "../../api";
import Constant from '../../library/Constant'; import Constant from '../../library/Constant';
import { css } from "@emotion/core"; import { css } from "@emotion/core";
import PropagateLoader from "react-spinners/PropagateLoader" import PropagateLoader from "react-spinners/PropagateLoader"
const LightTooltip = withStyles((theme) => ({
tooltip: {
backgroundColor: theme.palette.common.white,
color: 'rgba(0, 0, 0, 0.87)',
boxShadow: theme.shadows[1],
fontSize: 11,
},
}))(Tooltip);
var ct = require("../../library/CustomTable"); var ct = require("../../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable()); const getMuiTheme = () => createMuiTheme(ct.customTable());
const options = ct.customOptions(); const options = ct.customOptions();
...@@ -66,7 +76,6 @@ export default class ApprovalMatrix extends Component { ...@@ -66,7 +76,6 @@ export default class ApprovalMatrix extends Component {
let isi = resp.rows.slice(3) let isi = resp.rows.slice(3)
let payload = [] let payload = []
isi.map((item, index) => { isi.map((item, index) => {
console.log(item)
if (item.length > 0) { if (item.length > 0) {
payload.push({ payload.push({
id: index + 1, id: index + 1,
...@@ -173,12 +182,11 @@ export default class ApprovalMatrix extends Component { ...@@ -173,12 +182,11 @@ export default class ApprovalMatrix extends Component {
return ( return (
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[7] != null && check > -1 ? {tableMeta.rowData[7] != null && check > -1 ?
<a data-tip={tableMeta.rowData[7][check].message} data-for="email"> <LightTooltip title={tableMeta.rowData[7][check].message} arrow>
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
</a> : </LightTooltip> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
} }
<ReactTooltip border={true} id="email" place="bottom" type="light" effect="solid" />
</div > </div >
); );
} }
...@@ -198,12 +206,11 @@ export default class ApprovalMatrix extends Component { ...@@ -198,12 +206,11 @@ export default class ApprovalMatrix extends Component {
return ( return (
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[7] != null && check > -1 ? {tableMeta.rowData[7] != null && check > -1 ?
<a data-tip={tableMeta.rowData[7][check].message} data-for="fullname"> <LightTooltip title={tableMeta.rowData[7][check].message} arrow>
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> : </LightTooltip> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
} }
<ReactTooltip border={true} id="fullname" place="bottom" type="light" effect="solid" />
</div > </div >
); );
} }
...@@ -223,12 +230,11 @@ export default class ApprovalMatrix extends Component { ...@@ -223,12 +230,11 @@ export default class ApprovalMatrix extends Component {
return ( return (
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[7] != null && check > -1 ? {tableMeta.rowData[7] != null && check > -1 ?
<a data-tip={tableMeta.rowData[7][check].message} data-for="operatorname"> <LightTooltip title={tableMeta.rowData[7][check].message} arrow>
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
</a> : </LightTooltip> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
} }
<ReactTooltip border={true} id="operatorname" place="bottom" type="light" effect="solid" />
</div > </div >
); );
} }
...@@ -248,12 +254,11 @@ export default class ApprovalMatrix extends Component { ...@@ -248,12 +254,11 @@ export default class ApprovalMatrix extends Component {
return ( return (
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[7] != null && check > -1 ? {tableMeta.rowData[7] != null && check > -1 ?
<a data-tip={tableMeta.rowData[7][check].message} data-for="startdate"> <LightTooltip title={tableMeta.rowData[7][check].message} arrow>
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
</a> : </LightTooltip> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
} }
<ReactTooltip border={true} id="startdate" place="bottom" type="light" effect="solid" />
</div > </div >
); );
} }
...@@ -273,12 +278,11 @@ export default class ApprovalMatrix extends Component { ...@@ -273,12 +278,11 @@ export default class ApprovalMatrix extends Component {
return ( return (
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
{tableMeta.rowData[7] != null && check > -1 ? {tableMeta.rowData[7] != null && check > -1 ?
<a data-tip={tableMeta.rowData[7][check].message} data-for="enddate"> <LightTooltip title={tableMeta.rowData[7][check].message} arrow>
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
</a> : </LightTooltip> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
} }
<ReactTooltip border={true} id="enddate" place="bottom" type="light" effect="solid" />
</div > </div >
); );
} }
......
...@@ -683,8 +683,7 @@ export default class BudgetTahunan extends Component { ...@@ -683,8 +683,7 @@ 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)} getReport={this.getCompanyActive.bind(this)}
getReportAttachment={this.getReportAttachment.bind(this)}
/> />
)} )}
{this.state.visibleFAM && ( {this.state.visibleFAM && (
......
This diff is collapsed.
This diff is collapsed.
...@@ -6,6 +6,7 @@ import ManualBookTia from './ManualBookTia' ...@@ -6,6 +6,7 @@ import ManualBookTia from './ManualBookTia'
import api from '../../api' import api from '../../api'
import AuditTahunan from './AuditTahunan' import AuditTahunan from './AuditTahunan'
import CreateManagementDoc from './CreateManagementDoc' import CreateManagementDoc from './CreateManagementDoc'
import AllDocument from './AllDocument'
import QReview from './QReview' import QReview from './QReview'
import BOD from './BOD' import BOD from './BOD'
import ManualBookETMS from './ManualBookETMS' import ManualBookETMS from './ManualBookETMS'
...@@ -57,7 +58,7 @@ export default class DocumentManagement extends Component { ...@@ -57,7 +58,7 @@ export default class DocumentManagement extends Component {
selectTab = (event, newEvent) => { selectTab = (event, newEvent) => {
this.setState({ tab: newEvent }) this.setState({ tab: newEvent })
console.log(this.state.tab) // console.log(this.state.tab)
} }
componentDidMount() { componentDidMount() {
...@@ -66,13 +67,13 @@ export default class DocumentManagement extends Component { ...@@ -66,13 +67,13 @@ export default class DocumentManagement extends Component {
} }
getDataDocument(id) { getDataDocument(id) {
let payload = { // let payload = {
"setting_group_id": 7, // "setting_group_id": 7,
"setting_type_id": 167, // "setting_type_id": 167,
"company_id": 0 // "company_id": 0
} // }
api.create().getDocumentCategory(payload).then(response => { api.create().getDocumentCategory().then(response => {
console.log(response); console.log(response);
if (response) { if (response) {
if (response.data.status === "success") { if (response.data.status === "success") {
...@@ -82,7 +83,7 @@ export default class DocumentManagement extends Component { ...@@ -82,7 +83,7 @@ export default class DocumentManagement extends Component {
loadTable: true, loadTable: true,
refresh: id === undefined ? '' : 'create' refresh: id === undefined ? '' : 'create'
}) })
console.log(this.state.listData) // console.log(this.state.listData)
} else { } else {
} }
...@@ -176,6 +177,7 @@ export default class DocumentManagement extends Component { ...@@ -176,6 +177,7 @@ export default class DocumentManagement extends Component {
render() { render() {
return ( return (
<div style={{ height: this.props.height, backgroundColor: '#f8f8f8' }}> <div style={{ height: this.props.height, backgroundColor: '#f8f8f8' }}>
{/* {this.props.load && ()} */}
<Snackbar open={this.state.alert} autoHideDuration={6000} onClose={() => this.closeAlert()}> <Snackbar open={this.state.alert} autoHideDuration={6000} onClose={() => this.closeAlert()}>
<Alert onClose={() => this.closeAlert()} severity={this.state.tipeAlert}> <Alert onClose={() => this.closeAlert()} severity={this.state.tipeAlert}>
{this.state.messageAlert} {this.state.messageAlert}
...@@ -214,56 +216,64 @@ export default class DocumentManagement extends Component { ...@@ -214,56 +216,64 @@ export default class DocumentManagement extends Component {
{this.state.listData.map((item, index) => { {this.state.listData.map((item, index) => {
return ( return (
<Tab <Tab
onClick={() => this.setState({ id: item.setting_id })} onClick={() => this.setState({ id: item.setting_id, refresh: '' })}
label={item.value} label={item.value}
/> />
) )
})} })}
</Tabs> </Tabs>
{this.state.loadTable && ( {this.state.loadTable && (
this.state.id === 68542 ? <AllDocument
<AuditTahunan data={this.state.listData[this.state.tab]}
data={this.state.listData[this.state.tab]} refresh={this.state.refresh}
refresh={this.state.refresh} btnedit={this.state.btnedit}
btnedit={this.state.btnedit} btndelete={this.state.btndelete}
btndelete={this.state.btndelete} load={this.state.load}
load={this.state.load} setId={this.state.id}
/> />
: // this.state.id === 68542 ?
this.state.id === 68541 ? // <AuditTahunan
<ManualBookTia // data={this.state.listData[this.state.tab]}
data={this.state.listData[this.state.tab]} // refresh={this.state.refresh}
refresh={this.state.refresh} // btnedit={this.state.btnedit}
btnedit={this.state.btnedit} // btndelete={this.state.btndelete}
btndelete={this.state.btndelete} // load={this.state.load}
load={this.state.load} // />
/> // :
: // this.state.id === 68541 ?
this.state.id === 68544 ? // <ManualBookTia
<QReview // data={this.state.listData[this.state.tab]}
data={this.state.listData[this.state.tab]} // refresh={this.state.refresh}
refresh={this.state.refresh} // btnedit={this.state.btnedit}
btnedit={this.state.btnedit} // btndelete={this.state.btndelete}
btndelete={this.state.btndelete} // load={this.state.load}
load={this.state.load} // />
/> // :
: // this.state.id === 68544 ?
this.state.id === 68543 ? // <QReview
<BOD // data={this.state.listData[this.state.tab]}
data={this.state.listData[this.state.tab]} // refresh={this.state.refresh}
refresh={this.state.refresh} // btnedit={this.state.btnedit}
btnedit={this.state.btnedit} // btndelete={this.state.btndelete}
btndelete={this.state.btndelete} // load={this.state.load}
load={this.state.load} // />
/> // :
// : // this.state.id === 68543 ?
// this.state.id === 68545 ? // <BOD
// <ManualBookETMS // data={this.state.listData[this.state.tab]}
// data={this.state.listData[this.state.tab]} // refresh={this.state.refresh}
// refresh={this.state.refresh} // btnedit={this.state.btnedit}
// /> // btndelete={this.state.btndelete}
: // load={this.state.load}
<span>Coming Soon</span> // />
// // :
// // this.state.id === 68545 ?
// // <ManualBookETMS
// // data={this.state.listData[this.state.tab]}
// // refresh={this.state.refresh}
// // />
// :
// <span>Coming Soon</span>
)} )}
</div> </div>
......
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