Commit e96a9b3e 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 3f20484f 1222eb09
......@@ -6,6 +6,7 @@ import BalanceSheet from './BudgetTahunan/BalanceSheet';
import api from '../api';
import Autocomplete from '@material-ui/lab/Autocomplete';
import { titleCase } from '../library/Utils';
import ProfitLoss from './BudgetTahunan/ProfitLoss';
export default class BudgetTahunan extends Component {
constructor(props) {
......@@ -18,7 +19,8 @@ export default class BudgetTahunan extends Component {
visibleBS: false,
listCompany: null,
company: null,
report_id: null
report_id: null,
visiblePL: false
}
}
......@@ -78,6 +80,15 @@ export default class BudgetTahunan extends Component {
visibleFAM: false,
visibleTP: false,
})
} else if (item === 'Profit & Loss') {
this.setState({
visibleBudgetTahunan: false,
visibleBS: false,
visiblePL: true,
visibleCAT: false,
visibleFAM: false,
visibleTP: false
})
}
}
......@@ -268,6 +279,9 @@ export default class BudgetTahunan extends Component {
company_id={this.state.company.company_id}
/>
)}
{this.state.visiblePL && (
<ProfitLoss />
)}
</div >
);
}
......
This diff is collapsed.
......@@ -90,7 +90,7 @@ export default class Perusahaan extends Component {
let columns = [
"Data Ke-",
{
name: "Nama Perusahaan",
name: "Company Name",
options: {
customBodyRender: (val, tableMeta) => {
let check = null
......@@ -247,7 +247,7 @@ export default class Perusahaan extends Component {
if (response.data.status == 'success') {
let data = response.data.data
let listData = data.sort((a, b) => a.company_id - b.company_id).map((item, index) => {
return [index, item.company_id, item.company_name, item.parent_name, item.business_unit_name, item.total_report, item.status]
return [index, item.company_id, item.company_name, item.parent_name, item.business_unit_name, item.status]
})
this.setState({ dataTable: listData, listData: response.data.data })
} else {
......@@ -283,7 +283,7 @@ export default class Perusahaan extends Component {
if (response.data.status == 'success') {
let data = response.data.data
let listData = data.map((item, index) => {
return [index, item.company_id, item.company_name, item.parent_name, item.business_unit_name, item.total_report, item.status]
return [index, item.company_id, item.company_name, item.parent_name, item.business_unit_name, item.status]
})
this.setState({ dataTable: listData, listData: response.data.data })
} else {
......@@ -405,18 +405,18 @@ export default class Perusahaan extends Component {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[6] === "Aktif" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{val}</span>
<span style={{ color: tableMeta.rowData[5] === "Aktif" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{val}</span>
</div >
);
}
}
}, {
name: "Nama Perusahaan",
name: "Company Name",
options: {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[6] === "Aktif" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{val}</span>
<span style={{ color: tableMeta.rowData[5] === "Aktif" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{val}</span>
</div >
);
}
......@@ -427,29 +427,18 @@ export default class Perusahaan extends Component {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[6] === "Aktif" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{val}</span>
<span style={{ color: tableMeta.rowData[5] === "Aktif" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{val}</span>
</div >
);
}
}
}, {
name: "Unit Bisnis",
name: "Business Unit",
options: {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[6] === "Aktif" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{val}</span>
</div >
);
}
}
}, {
name: "Jumlah Laporan",
options: {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[6] === "Aktif" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{val}</span>
<span style={{ color: tableMeta.rowData[5] === "Aktif" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{val}</span>
</div >
);
}
......@@ -460,7 +449,7 @@ export default class Perusahaan extends Component {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[6] === "Aktif" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{val}</span>
<span style={{ color: tableMeta.rowData[5] === "Aktif" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{val === "Aktif" ? "Active" : "Inactive"}</span>
</div >
);
}
......@@ -485,7 +474,7 @@ export default class Perusahaan extends Component {
{this.state.visiblePerusahaan === true ?
<div>
<div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', paddingRight: 25, paddingLeft: 25, marginTop: -150 }}>
<label style={{ color: 'white', fontSize: 16, alignSelf: 'center', width: '20%', }}>Master Data - Perusahaan</label>
<label style={{ color: 'white', fontSize: 16, alignSelf: 'center', width: '20%', }}>Master Data - Company</label>
<div style={{ color: 'white', width: '50%', height: 37, display: 'flex', backgroundColor: 'white', borderWidth: 2, alignItems: 'center', borderRadius: 6, paddingLeft: 5, paddingRight: 5, alignSelf: 'center' }}>
<img src={Images.searchBlack} style={{ marginRight: 10 }} />
<InputBase
......@@ -539,7 +528,7 @@ export default class Perusahaan extends Component {
</button>
</a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
<a data-tip={'Visualisasi'} data-for="visual">
<a data-tip={'Visualization'} data-for="visual">
<button
style={{
backgroundColor: 'transparent',
......@@ -553,7 +542,7 @@ export default class Perusahaan extends Component {
</button>
</a>
<ReactTooltip border={true} id="visual" place="bottom" type="light" effect="solid" />
<a data-tip={'Tambah'} data-for="create">
<a data-tip={'Add'} data-for="create">
<button
style={{
backgroundColor: 'transparent',
......
This diff is collapsed.
......@@ -198,7 +198,7 @@ export default class VisualReportItems extends Component {
return (
<div>
<button type="button" onClick={() => this.collapse(item.id)}>{collapseIcon ? (this.state.arrayCollapse.includes(item.id) ? <AddIcon /> : <RemoveIcon />) : null}</button>
<label style={{ marginLeft: collapseIcon ? 10 : 0 }}>{item.report_name}</label>
<label style={{ marginLeft: collapseIcon ? 10 : 0 }}>{item.description}</label>
</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