Commit c728778b authored by EKSAD's avatar EKSAD

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into riri

parents 13eadb11 2f4cacc7
...@@ -2,6 +2,7 @@ import React, { Component } from 'react'; ...@@ -2,6 +2,7 @@ import React, { Component } from 'react';
import { Typography, Paper, TextField, MenuItem } from '@material-ui/core'; import { Typography, Paper, TextField, MenuItem } 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 BalanceSheet from './BudgetTahunan/BalanceSheet';
export default class BudgetTahunan extends Component { export default class BudgetTahunan extends Component {
constructor(props) { constructor(props) {
...@@ -9,7 +10,9 @@ export default class BudgetTahunan extends Component { ...@@ -9,7 +10,9 @@ export default class BudgetTahunan extends Component {
this.state = { this.state = {
periode: '2020', periode: '2020',
perusahaan: 'TAP Group', perusahaan: 'TAP Group',
revisi: '0' revisi: '0',
visibleBudgetTahunan: true,
visibleBalanceSheet: false
} }
} }
render() { render() {
...@@ -41,7 +44,7 @@ export default class BudgetTahunan extends Component { ...@@ -41,7 +44,7 @@ export default class BudgetTahunan extends Component {
cursor: 'pointer', cursor: 'pointer',
borderColor: 'transparent' borderColor: 'transparent'
}} }}
onClick={() => null} onClick={() => this.setState({ visibleBudgetTahunan: false, visibleBalanceSheet: true })}
> >
<Typography style={{ color: '#5198ea', fontSize: 12, }}>Detail</Typography> <Typography style={{ color: '#5198ea', fontSize: 12, }}>Detail</Typography>
</button> </button>
...@@ -99,6 +102,8 @@ export default class BudgetTahunan extends Component { ...@@ -99,6 +102,8 @@ export default class BudgetTahunan extends Component {
] ]
return ( return (
<div style={{ flex: 1, backgroundColor: '#f8f8f8' }}> <div style={{ flex: 1, backgroundColor: '#f8f8f8' }}>
{this.state.visibleBudgetTahunan && (
<div>
<div className={"main-color"} style={{ height: 78, display: 'flex', alignItems: 'center', paddingLeft: 20 }}> <div className={"main-color"} style={{ height: 78, display: 'flex', alignItems: 'center', paddingLeft: 20 }}>
<Typography style={{ fontSize: '16px', color: 'white' }}>Pengajuan Budget Tahunan</Typography> <Typography style={{ fontSize: '16px', color: 'white' }}>Pengajuan Budget Tahunan</Typography>
</div> </div>
...@@ -191,6 +196,12 @@ export default class BudgetTahunan extends Component { ...@@ -191,6 +196,12 @@ export default class BudgetTahunan extends Component {
</Paper> </Paper>
</div> </div>
</div>
)}
{this.state.visibleBalanceSheet && (
<BalanceSheet />
)}
</div > </div >
); );
} }
......
...@@ -39,7 +39,7 @@ export default class BalanceSheet extends Component { ...@@ -39,7 +39,7 @@ export default class BalanceSheet extends Component {
: :
tableMeta.rowIndex == 2 || tableMeta.rowIndex == 6 || tableMeta.rowIndex == 7 || tableMeta.rowIndex == 8 ? tableMeta.rowIndex == 2 || tableMeta.rowIndex == 6 || tableMeta.rowIndex == 7 || tableMeta.rowIndex == 8 ?
<span style={{ fontSize: 12, marginLeft: 10 }}>{val}</span> : <span style={{ fontSize: 12, marginLeft: 10 }}>{val}</span> :
<span style={{ fontSize: 12, marginLeft: 20}}>{val}</span> <span style={{ fontSize: 12, marginLeft: 20 }}>{val}</span>
} }
</div> </div>
) )
...@@ -258,7 +258,7 @@ export default class BalanceSheet extends Component { ...@@ -258,7 +258,7 @@ export default class BalanceSheet extends Component {
<Typography style={{ fontSize: '16px', color: 'white' }}>Pengajuan Budget Tahunan</Typography> <Typography style={{ fontSize: '16px', color: 'white' }}>Pengajuan Budget Tahunan</Typography>
</div> </div>
<div style={{ flex: 1, padding: 20, width: '100%' }}> <div style={{ flex: 1, padding: 20, width: '100%' }}>
<Paper style={{ paddingTop: 10 }}> <Paper style={{ paddingTop: 10, paddingBottom: 20 }}>
<div style={{ borderBottom: 'solid 1px #c4c4c4' }} > <div style={{ borderBottom: 'solid 1px #c4c4c4' }} >
<Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Budget Tahunan - Balance Sheet</Typography> <Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Budget Tahunan - Balance Sheet</Typography>
</div> </div>
...@@ -279,6 +279,21 @@ export default class BalanceSheet extends Component { ...@@ -279,6 +279,21 @@ export default class BalanceSheet extends Component {
</MuiThemeProvider> </MuiThemeProvider>
</div> </div>
</div> </div>
<div className="grid grid-2x">
<div className="col-1">
<div style={{ backgroundColor: '#019ce5', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Kembali</Typography>
</div>
</div>
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%'}}>
<div style={{ backgroundColor: '#fff', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #354960', marginRight: 20 }}>
<Typography style={{ fontSize: '11px', color: '#354960', textAlign: 'center' }}>Batal</Typography>
</div>
<div style={{ backgroundColor: '#354960', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center' }}>
<Typography style={{ fontSize: '11px', color: '#fff', textAlign: 'center' }}>Simpan</Typography>
</div>
</div>
</div>
</Paper> </Paper>
</div> </div>
</div> </div>
......
...@@ -283,7 +283,7 @@ export default class Parameter extends Component { ...@@ -283,7 +283,7 @@ export default class Parameter extends Component {
} }
}, },
{ {
name: "Perusahaan", name: "Company",
options: { options: {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
let check = null let check = null
...@@ -308,7 +308,7 @@ export default class Parameter extends Component { ...@@ -308,7 +308,7 @@ export default class Parameter extends Component {
} }
}, },
{ {
name: "Deskripsi", name: "Description",
options: { options: {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
let check = null let check = null
...@@ -594,7 +594,7 @@ export default class Parameter extends Component { ...@@ -594,7 +594,7 @@ export default class Parameter extends Component {
} }
} }
}, { }, {
name: "Perusahaan", name: "Company",
options: { options: {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
return ( return (
...@@ -605,7 +605,7 @@ export default class Parameter extends Component { ...@@ -605,7 +605,7 @@ export default class Parameter extends Component {
} }
} }
}, { }, {
name: "Deskripsi", name: "Description",
options: { options: {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
return ( return (
...@@ -665,7 +665,7 @@ export default class Parameter extends Component { ...@@ -665,7 +665,7 @@ export default class Parameter extends Component {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
return ( return (
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[10] === "Aktif" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{val}</span> <span style={{ color: tableMeta.rowData[10] === "Aktif" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{val === "Aktif" ? "Active" : "Inactive"}</span>
</div > </div >
); );
} }
...@@ -744,7 +744,7 @@ export default class Parameter extends Component { ...@@ -744,7 +744,7 @@ export default class Parameter extends Component {
</button> </button>
</a> </a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
<a data-tip={'Tambah'} data-for="create"> <a data-tip={'Add'} data-for="create">
<button <button
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
......
...@@ -6,13 +6,14 @@ import Images from '../../../assets/Images'; ...@@ -6,13 +6,14 @@ import Images from '../../../assets/Images';
import UploadFile from "../../../library/Upload"; import UploadFile from "../../../library/Upload";
import MUIDataTable from "mui-datatables"; import MUIDataTable from "mui-datatables";
import { render } from '@testing-library/react'; import { render } from '@testing-library/react';
import { TextField, InputBase } from "@material-ui/core";
import { ExcelRenderer } from 'react-excel-renderer'; import { ExcelRenderer } from 'react-excel-renderer';
import CreatePerusahaan from "./CreatePerusahaan"; import CreatePerusahaan from "./CreatePerusahaan";
import EditPerusahaan from "./EditPerusahaan" import EditPerusahaan from "./EditPerusahaan"
import VisualPerusahaan from "./VisualPerusahaan"; import VisualPerusahaan from "./VisualPerusahaan";
import api from "../../../api"; import api from "../../../api";
import ReactTooltip from 'react-tooltip'; import ReactTooltip from 'react-tooltip';
import MuiAlert from '@material-ui/lab/Alert';
import { TextField, InputBase, Snackbar, withStyles } from "@material-ui/core";
import PopUpFailedSave from '../../../library/PopUpFailedSave'; import PopUpFailedSave from '../../../library/PopUpFailedSave';
var ct = require("../../../library/CustomTable"); var ct = require("../../../library/CustomTable");
...@@ -20,6 +21,9 @@ const getMuiTheme = () => createMuiTheme(ct.customTable()); ...@@ -20,6 +21,9 @@ const getMuiTheme = () => createMuiTheme(ct.customTable());
const options = ct.customOptions(); const options = ct.customOptions();
const options2 = ct.customOptions2(); const options2 = ct.customOptions2();
const Alert = withStyles({
})((props) => <MuiAlert elevation={6} variant="filled" {...props} />);
export default class Perusahaan extends Component { export default class Perusahaan extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
...@@ -35,7 +39,10 @@ export default class Perusahaan extends Component { ...@@ -35,7 +39,10 @@ export default class Perusahaan extends Component {
cols: null, cols: null,
rows: null, rows: null,
dataLoaded: false, dataLoaded: false,
popupError: false popupError: false,
alert: false,
tipeAlert: '',
messageAlert: ''
} }
this.fileHandler = this.fileHandler.bind(this); this.fileHandler = this.fileHandler.bind(this);
} }
...@@ -83,7 +90,7 @@ export default class Perusahaan extends Component { ...@@ -83,7 +90,7 @@ export default class Perusahaan extends Component {
let columns = [ let columns = [
"Data Ke-", "Data Ke-",
{ {
name: "Nama Perusahaan", name: "Company Name",
options: { options: {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
let check = null let check = null
...@@ -236,14 +243,18 @@ export default class Perusahaan extends Component { ...@@ -236,14 +243,18 @@ export default class Perusahaan extends Component {
getData() { getData() {
api.create().getPerusahaan().then((response) => { api.create().getPerusahaan().then((response) => {
console.log(response) console.log(response)
if (response.data) {
if (response.data.status == 'success') { if (response.data.status == 'success') {
let data = response.data.data let data = response.data.data
let listData = data.sort((a, b) => a.company_id - b.company_id).map((item, index) => { 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 }) this.setState({ dataTable: listData, listData: response.data.data })
} else { } else {
alert(response.data.message) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', dataTable: [] })
} }
}) })
} }
...@@ -268,15 +279,18 @@ export default class Perusahaan extends Component { ...@@ -268,15 +279,18 @@ export default class Perusahaan extends Component {
"keyword": e "keyword": e
} }
api.create().searchPerusahaan(body).then(response => { api.create().searchPerusahaan(body).then(response => {
// console.log(response.data); if (response.data) {
if (response.data.status == 'success') { if (response.data.status == 'success') {
let data = response.data.data let data = response.data.data
let listData = data.map((item, index) => { 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 }) this.setState({ dataTable: listData, listData: response.data.data })
} else { } else {
alert(response.data.message) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
} }
}) })
} }
...@@ -284,11 +298,15 @@ export default class Perusahaan extends Component { ...@@ -284,11 +298,15 @@ export default class Perusahaan extends Component {
updatePerusahaan = (payload) => { updatePerusahaan = (payload) => {
this.setState({ visibleEdit: false }) this.setState({ visibleEdit: false })
api.create().updatePerusahaan(payload).then(response => { api.create().updatePerusahaan(payload).then(response => {
if (response.data) {
if (response.data.status == 'success') { if (response.data.status == 'success') {
alert(response.data.message)
this.getData() this.getData()
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' })
}
} else { } else {
alert(response.data.message) this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
} }
}) })
} }
...@@ -296,11 +314,15 @@ export default class Perusahaan extends Component { ...@@ -296,11 +314,15 @@ export default class Perusahaan extends Component {
createPerusahaan = (payload) => { createPerusahaan = (payload) => {
this.setState({ visibleCreate: false }) this.setState({ visibleCreate: false })
api.create().createPerusahaan(payload).then(response => { api.create().createPerusahaan(payload).then(response => {
if (response.data) {
if (response.data.status == 'success') { if (response.data.status == 'success') {
alert(response.data.message)
this.getData() this.getData()
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' })
} else { } else {
alert(response.data.message) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
} }
}) })
} }
...@@ -338,11 +360,23 @@ export default class Perusahaan extends Component { ...@@ -338,11 +360,23 @@ export default class Perusahaan extends Component {
uploadPerusahaan() { uploadPerusahaan() {
api.create().uploadPerusahaan(this.state.payload).then(response => { api.create().uploadPerusahaan(this.state.payload).then(response => {
console.log(response) console.log(response)
if (response.data) {
if (response.data.status == "success") {
this.getData() this.getData()
this.setState({ visiblePerusahaan: true }) this.setState({ visiblePerusahaan: true, alert: true, messageAlert: response.data.message, tipeAlert: 'success' })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error' })
}
}) })
} }
closeAlert() {
this.setState({ alert: false })
}
render() { render() {
const columns = [{ const columns = [{
name: "Action", name: "Action",
...@@ -371,18 +405,18 @@ export default class Perusahaan extends Component { ...@@ -371,18 +405,18 @@ export default class Perusahaan extends Component {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
return ( return (
<div style={{ display: 'flex' }}> <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 > </div >
); );
} }
} }
}, { }, {
name: "Nama Perusahaan", name: "Company Name",
options: { options: {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
return ( return (
<div style={{ display: 'flex' }}> <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 > </div >
); );
} }
...@@ -393,29 +427,18 @@ export default class Perusahaan extends Component { ...@@ -393,29 +427,18 @@ export default class Perusahaan extends Component {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
return ( return (
<div style={{ display: 'flex' }}> <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",
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 > </div >
); );
} }
} }
}, { }, {
name: "Jumlah Laporan", name: "Business Unit",
options: { options: {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
return ( return (
<div style={{ display: 'flex' }}> <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 > </div >
); );
} }
...@@ -426,7 +449,7 @@ export default class Perusahaan extends Component { ...@@ -426,7 +449,7 @@ export default class Perusahaan extends Component {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
return ( return (
<div style={{ display: 'flex' }}> <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 > </div >
); );
} }
...@@ -443,10 +466,15 @@ export default class Perusahaan extends Component { ...@@ -443,10 +466,15 @@ export default class Perusahaan extends Component {
<div style={{ height: this.props.height }}> <div style={{ height: this.props.height }}>
{/* <Row> */} {/* <Row> */}
<div className={"main-color"} style={{ height: 199, width: '100%' }} /> <div className={"main-color"} style={{ height: 199, width: '100%' }} />
<Snackbar open={this.state.alert} autoHideDuration={6000} onClose={() => this.closeAlert()}>
<Alert onClose={() => this.closeAlert()} severity={this.state.tipeAlert}>
{this.state.messageAlert}
</Alert>
</Snackbar>
{this.state.visiblePerusahaan === true ? {this.state.visiblePerusahaan === true ?
<div> <div>
<div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', paddingRight: 25, paddingLeft: 25, marginTop: -150 }}> <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' }}> <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 }} /> <img src={Images.searchBlack} style={{ marginRight: 10 }} />
<InputBase <InputBase
...@@ -500,7 +528,7 @@ export default class Perusahaan extends Component { ...@@ -500,7 +528,7 @@ export default class Perusahaan extends Component {
</button> </button>
</a> </a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" /> <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 <button
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
...@@ -514,7 +542,7 @@ export default class Perusahaan extends Component { ...@@ -514,7 +542,7 @@ export default class Perusahaan extends Component {
</button> </button>
</a> </a>
<ReactTooltip border={true} id="visual" place="bottom" type="light" effect="solid" /> <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 <button
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
......
...@@ -858,9 +858,6 @@ export default class ReportItems extends Component { ...@@ -858,9 +858,6 @@ export default class ReportItems extends Component {
height={this.props.height} height={this.props.height}
/> />
: :
<div style={{ height: this.props.height }}>
<div style={{ height: 199, width: '100%' }} className={"main-color"} />
<div>
<div> <div>
<div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', paddingRight: 25, paddingLeft: 25, marginTop: -150 }}> <div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', paddingRight: 25, paddingLeft: 25, marginTop: -150 }}>
<label style={{ color: 'white', fontSize: 16, alignSelf: 'center' }}>Preview Data</label> <label style={{ color: 'white', fontSize: 16, alignSelf: 'center' }}>Preview Data</label>
...@@ -898,8 +895,6 @@ export default class ReportItems extends Component { ...@@ -898,8 +895,6 @@ export default class ReportItems extends Component {
</button> </button>
</div> </div>
</div> </div>
</div>
</div>
} }
{this.state.add && ( {this.state.add && (
<CreateReportItems <CreateReportItems
......
...@@ -85,7 +85,7 @@ export default class UnitBisnis extends Component { ...@@ -85,7 +85,7 @@ export default class UnitBisnis extends Component {
let columns = [ let columns = [
"Data Ke-", "Data Ke-",
{ {
name: "Unit Bisnis", name: "Business Unit",
options: { options: {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
let check = null let check = null
...@@ -363,7 +363,7 @@ export default class UnitBisnis extends Component { ...@@ -363,7 +363,7 @@ export default class UnitBisnis extends Component {
} }
} }
}, { }, {
name: "Unit Bisnis", name: "Business Unit",
options: { options: {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
return ( return (
...@@ -379,7 +379,7 @@ export default class UnitBisnis extends Component { ...@@ -379,7 +379,7 @@ export default class UnitBisnis extends Component {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
return ( return (
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[3] === "Aktif" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{val}</span> <span style={{ color: tableMeta.rowData[3] === "Aktif" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{val === "Aktif" ? "Active" : "Inactive"}</span>
</div > </div >
); );
} }
...@@ -404,7 +404,7 @@ export default class UnitBisnis extends Component { ...@@ -404,7 +404,7 @@ export default class UnitBisnis extends Component {
{this.state.visibleUnitBisnis === true ? {this.state.visibleUnitBisnis === true ?
<div> <div>
<div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', paddingRight: 25, paddingLeft: 25, marginTop: -150 }}> <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 - Unit Bisnis</label> <label style={{ color: 'white', fontSize: 16, alignSelf: 'center', width: '20%', }}>Master Data - Business Unit</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' }}> <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 }} /> <img src={Images.searchBlack} style={{ marginRight: 10 }} />
<InputBase <InputBase
...@@ -458,7 +458,7 @@ export default class UnitBisnis extends Component { ...@@ -458,7 +458,7 @@ export default class UnitBisnis extends Component {
</button> </button>
</a> </a>
<ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
<a data-tip={'Tambah'} data-for="create"> <a data-tip={'Add'} data-for="create">
<button <button
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
......
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