Commit 61ad008e authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'riri' into 'master'

ganti nama file Report Items

See merge request !80
parents da413824 0c81fde3
import React, { Component } from "react";
import { Container, Row, Col } from "react-bootstrap";
import { makeStyles, createMuiTheme, MuiThemeProvider } from '@material-ui/core/styles';
import SearchIcon from '@material-ui/icons/Search';
import Images from "../../assets/Images";
import MUIDataTable from "mui-datatables";
import { TextField, InputBase } from "@material-ui/core";
import { ExcelRenderer } from 'react-excel-renderer';
import CreateItemLaporan from "./formItemLaporan/CreateItemLaporan";
import EditItemLaporan from "./formItemLaporan/EditItemLaporan";
var ct = require("../../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable());
const options = ct.customOptions();
const options2 = ct.customOptions2();
export default class ItemLaporan extends Component {
constructor(props) {
super(props)
this.state = {
dataTable: [],
listData: [],
data: [],
add: false,
edit: false
}
}
closeEdit() {
this.setState({edit: false})
}
closeAdd() {
this.setState({add: false})
}
render() {
const columns = [{
name: "Action",
options: {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent'
}}
onClick={() => this.setState({ edit: true })}
>
<img src={Images.editCopy} />
</button>
</div >
);
}
}
}, "ID", "Jenis Laporan", "Perusahaan", "Order", "Deskripsi", "Parent ID", "UOM", "Weight", "Tipe Data", "Status"]
const data = [
["", "1", "KPI", "TIA", "1", "Financial Perspective", "0", "-", "35%", "Formula", "Aktif"],
["", "2", "KPI", "TIA", "2", "Trading Profit", "1", "Rp Bio", "35%", "Formula", "Aktif"],
["", "3", "KPI", "TIA", "3", "Revenue", "1", "Rp Bio", "0%", "Formula", "Aktif"],
["", "4", "KPI", "TIA", "4", "EBITDA", "1", "Rp Bio", "0%", "Formula", "Non Aktif"],
["", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-"],
]
const options = {
filter: false,
sort: false,
responsive: "scroll",
print: false,
download: false,
selectableRows: false,
viewColumns: false,
rowsPerPage: 5,
search: false
}
return (
<div style={{ height: this.props.height }}>
{/* <Row> */}
<div style={{ height: 199, backgroundColor: '#354960', width: '100%' }} />
<div>
<div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', paddingRight: 25, paddingLeft: 25, marginTop: -150 }}>
<label style={{ color: 'white', fontSize: 16, alignSelf: 'center' }}>Master Data - Item Laporan</label>
<div style={{ color: 'white', width: '50%', height: 37, display: 'flex', backgroundColor: 'white', borderWidth: 2, alignItems: 'center', borderRadius: 6, paddingLeft: 5, paddingRight: 5 }}>
<img src={Images.searchBlack} style={{ marginRight: 10 }} />
<InputBase
style={{ width: '100%' }}
placeholder="Search"
value={""}
onChange={(e) => this.handleInputChange(e)}
inputProps={{ 'aria-label': 'naked' }}
/>
</div>
<div style={{ width: '20%', justifyContent: 'space-around', display: 'flex' }}>
<img src={Images.template} />
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent'
}}
onClick={() => this.setState({ visibleUpload: true })}
>
<img src={Images.upload} />
</button>
<img src={Images.download} />
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent'
}}
>
<img src={Images.visualisasi} />
</button>
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent'
}}
onClick={() => this.setState({ add: true })}
>
<img src={Images.add} />
</button>
</div>
</div>
<div style={{ padding: 25 }}>
<MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable
theme={getMuiTheme()}
data={data}
columns={columns}
options={options}
/>
</MuiThemeProvider>
</div>
</div>
{this.state.add && (
<CreateItemLaporan
onClickClose={this.closeAdd.bind(this)}
data={this.state.indexData}
/>
)}
{this.state.edit && (
<EditItemLaporan
onClickClose={this.closeEdit.bind(this)}
data={this.state.indexData}
/>
)}
</div>
);
}
}
This diff is collapsed.
......@@ -62,7 +62,7 @@ const companies = [
},
];
export default class CreateItemLaporan extends Component {
export default class CreateReportItems extends Component {
constructor(props) {
super(props)
this.state = {
......
......@@ -62,7 +62,7 @@ const companies = [
},
];
export default class EditItemLaporan extends Component {
export default class EditReportItems extends Component {
constructor(props) {
super(props)
this.state = {
......
......@@ -16,7 +16,7 @@ const type = [
},
];
export default class VisualisasiItemReport extends Component {
export default class VisualReportItems extends Component {
constructor(props) {
super(props)
this.state = {
......
......@@ -71,7 +71,7 @@ const arraySide = [
{
img: '',
label: 'Item Laporan',
path: 'itemlaporan',
path: 'report-items',
},
{
img: '',
......
......@@ -9,8 +9,8 @@ import BalanceSheet from '../container/BudgetTahunan/BalanceSheet';
import Profile from '../container/Profile';
import Perusahaan from '../container/MasterData/Perusahaan/Perusahaan';
import UnitBisnis from '../container/MasterData/UnitBisnis'
import ItemLaporan from '../container/MasterData/ItemLaporan'
import Parameter from '../container/MasterData/Parameter/Parameter'
import ReportItems from '../container/MasterData/ReportItems'
import DashboardCAT from '../container/Laporan/DashboardCAT'
const routes = [
......@@ -27,8 +27,8 @@ const routes = [
main: ApprovalMatrix
},
{
path: "/home/itemlaporan",
main: ItemLaporan
path: "/home/report-items",
main: ReportItems
},
{
path: "/home/budget-tahunan",
......
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