Commit 24f6eb8f authored by Deni Rinaldi's avatar Deni Rinaldi

banyak dah

parent 9a7dd62f
......@@ -167,6 +167,7 @@ const create = (type = "") => {
const saveVisualisasiReport = (body) => api.post('item_report/save_visualization', body)
const getReportParent = (body) => api.post('item_report/get_parent_item_report', body)
const deleteReportItems = (id) => api.post(`item_report/delete_item_report/${id}`)
const getAllSettingByType = (body) => api.post('setting/get_all_setting_by_type', body)
//PARAMETER
const getAllParameter = () => api.get('/setting/get_all_setting')
......@@ -331,7 +332,8 @@ const create = (type = "") => {
getAllOperatingInd,
getOperatingIndDetail,
createOpetaingInd,
uploadMasterBudget
uploadMasterBudget,
getAllSettingByType
}
}
......
......@@ -2000,7 +2000,7 @@ export default class BalanceSheet extends Component {
</div>
</div>
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150), height: this.props.height - 400 }}>
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
{!this.state.loading && <MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable
data={dataTable2}
......
......@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import { createMuiTheme, MuiThemeProvider } from '@material-ui/core/styles';
import Images from '../../../assets/Images';
import MUIDataTable from "mui-datatables";
import { InputBase, Snackbar, withStyles, Typography } from "@material-ui/core";
import { InputBase, Snackbar, withStyles, Typography, Tooltip } from "@material-ui/core";
import MuiAlert from '@material-ui/lab/Alert';
import CreateParameter from '../Parameter/CreateParameter';
import api from '../../../api';
......@@ -15,6 +15,15 @@ import PopUpDelete from '../../../library/PopUpDelete';
import { css } from "@emotion/core";
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");
const getMuiTheme = () => createMuiTheme(ct.customTable());
const options = ct.customOptions();
......@@ -73,7 +82,7 @@ export default class Parameter extends Component {
}
getAllParameter() {
this.setState({loading: true})
this.setState({ loading: true })
api.create().getAllParameter().then(response => {
if (response.data) {
if (response.ok) {
......@@ -97,9 +106,9 @@ export default class Parameter extends Component {
})
this.setState({ dataTable: listData, data: response.data.data }, () => {
setTimeout(() => {
this.setState({loading: false})
this.setState({ loading: false })
}, 2000);
})
})
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In")) {
......@@ -344,12 +353,11 @@ export default class Parameter extends Component {
return (
<div style={{ display: 'flex' }}>
{tableMeta.rowData[11] != null && check > -1 ?
<a data-tip={tableMeta.rowData[11][check].message} data-for="group">
<LightTooltip title={tableMeta.rowData[11][check].message} arrow>
<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>
}
<ReactTooltip border={true} id="group" place="bottom" type="light" effect="solid" />
</div >
);
}
......@@ -369,12 +377,11 @@ export default class Parameter extends Component {
return (
<div style={{ display: 'flex' }}>
{tableMeta.rowData[11] != null && check > -1 ?
<a data-tip={tableMeta.rowData[11][check].message} data-for="parameter">
<LightTooltip title={tableMeta.rowData[11][check].message} arrow>
<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>
}
<ReactTooltip border={true} id="parameter" place="bottom" type="light" effect="solid" />
</div >
);
}
......@@ -394,12 +401,11 @@ export default class Parameter extends Component {
return (
<div style={{ display: 'flex' }}>
{tableMeta.rowData[11] != null && check > -1 ?
<a data-tip={tableMeta.rowData[11][check].message} data-for="company">
<LightTooltip title={tableMeta.rowData[11][check].message} arrow>
<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>
}
<ReactTooltip border={true} id="company" place="bottom" type="light" effect="solid" />
</div >
);
}
......@@ -419,12 +425,11 @@ export default class Parameter extends Component {
return (
<div style={{ display: 'flex' }}>
{tableMeta.rowData[11] != null && check > -1 ?
<a data-tip={tableMeta.rowData[11][check].message} data-for="description">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> :
<LightTooltip title={tableMeta.rowData[11][check].message} arrow>
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
</LightTooltip> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
}
<ReactTooltip border={true} id="description" place="bottom" type="light" effect="solid" />
</div >
);
}
......@@ -444,12 +449,11 @@ export default class Parameter extends Component {
return (
<div style={{ display: 'flex' }}>
{tableMeta.rowData[11] != null && check > -1 ?
<a data-tip={tableMeta.rowData[11][check].message} data-for="order">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> :
<LightTooltip title={tableMeta.rowData[11][check].message} arrow>
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
</LightTooltip> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
}
<ReactTooltip border={true} id="order" place="bottom" type="light" effect="solid" />
</div >
);
}
......@@ -469,12 +473,11 @@ export default class Parameter extends Component {
return (
<div style={{ display: 'flex' }}>
{tableMeta.rowData[11] != null && check > -1 ?
<a data-tip={tableMeta.rowData[11][check].message} data-for="value">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> :
<LightTooltip title={tableMeta.rowData[11][check].message} arrow>
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
</LightTooltip> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
}
<ReactTooltip border={true} id="value" place="bottom" type="light" effect="solid" />
</div >
);
}
......@@ -494,12 +497,11 @@ export default class Parameter extends Component {
return (
<div style={{ display: 'flex' }}>
{tableMeta.rowData[11] != null && check > -1 ?
<a data-tip={tableMeta.rowData[11][check].message} data-for="min_value">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> :
<LightTooltip title={tableMeta.rowData[11][check].message} arrow>
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
</LightTooltip> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
}
<ReactTooltip border={true} id="min_value" place="bottom" type="light" effect="solid" />
</div >
);
}
......@@ -519,12 +521,11 @@ export default class Parameter extends Component {
return (
<div style={{ display: 'flex' }}>
{tableMeta.rowData[11] != null && check > -1 ?
<a data-tip={tableMeta.rowData[11][check].message} data-for="max_value">
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
<LightTooltip title={tableMeta.rowData[11][check].message} arrow>
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
</LightTooltip> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val === "" ? "Empty" : val}</span>
}
<ReactTooltip border={true} id="max_value" place="bottom" type="light" effect="solid" />
</div >
);
}
......@@ -544,12 +545,11 @@ export default class Parameter extends Component {
return (
<div style={{ display: 'flex' }}>
{tableMeta.rowData[11] != null && check > -1 ?
<a data-tip={tableMeta.rowData[11][check].message} data-for="start_date">
<LightTooltip title={tableMeta.rowData[11][check].message} arrow>
<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>
}
<ReactTooltip border={true} id="start_date" place="bottom" type="light" effect="solid" />
</div >
);
}
......@@ -569,12 +569,11 @@ export default class Parameter extends Component {
return (
<div style={{ display: 'flex' }}>
{tableMeta.rowData[11] != null && check > -1 ?
<a data-tip={tableMeta.rowData[11][check].message} data-for="enddate">
<LightTooltip title={tableMeta.rowData[11][check].message} arrow>
<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>
}
<ReactTooltip border={true} id="enddate" place="bottom" type="light" effect="solid" />
</div >
);
}
......@@ -693,7 +692,7 @@ export default class Parameter extends Component {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
{this.state.edit &&
{this.state.edit &&
<span>
<a data-tip={'Edit'} data-for="edit">
<button
......@@ -712,7 +711,7 @@ export default class Parameter extends Component {
<ReactTooltip border={true} id="edit" place="bottom" type="light" effect="solid" />
</span>
}
{this.state.delete &&
{this.state.delete &&
<span>
<a data-tip={'Delete'} data-for="delete">
<button
......@@ -731,7 +730,7 @@ export default class Parameter extends Component {
</span>
}
</div >
);
}
}
......@@ -854,15 +853,15 @@ export default class Parameter extends Component {
["", "-", "-", "-", "-", "-"]
]
const loadingComponent = (
<div style={{position: 'absolute', zIndex: 110, top: 0, left: 0, width: '100%', height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.8)'}}>
<PropagateLoader
// css={override}
size={20}
color={"#274B80"}
loading={this.state.loading}
/>
<div style={{ position: 'absolute', zIndex: 110, top: 0, left: 0, width: '100%', height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.8)' }}>
<PropagateLoader
// css={override}
size={20}
color={"#274B80"}
loading={this.state.loading}
/>
</div>
);
);
return (
<div style={{ height: this.props.height }}>
{/* <Row> */}
......@@ -955,7 +954,7 @@ export default class Parameter extends Component {
)}
<div style={{ padding: 25 }}>
{this.state.loading && loadingComponent}
{this.state.loading && loadingComponent}
<MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable
theme={getMuiTheme()}
......
......@@ -8,7 +8,7 @@ import MUIDataTable from "mui-datatables";
import CreateUnitBisnis from "./formUnitBisnis/CreateUnitBisnis";
import ReactTooltip from 'react-tooltip';
import MuiAlert from '@material-ui/lab/Alert';
import { TextField, InputBase, Snackbar, withStyles, LinearProgress } from "@material-ui/core";
import { TextField, InputBase, Snackbar, withStyles, LinearProgress, Tooltip } from "@material-ui/core";
import { ExcelRenderer } from 'react-excel-renderer';
import api from "../../api";
import { isThisSecond } from "date-fns";
......@@ -18,6 +18,15 @@ import Constant from "../../library/Constant";
import { css } from "@emotion/core";
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");
const getMuiTheme = () => createMuiTheme(ct.customTable());
const options = ct.customOptions();
......@@ -118,12 +127,11 @@ export default class UnitBisnis extends Component {
return (
<div style={{ display: 'flex' }}>
{tableMeta.rowData[3] != null && check > -1 ?
<a data-tip={tableMeta.rowData[3][check].message} data-for="unitbisnis">
<LightTooltip title={tableMeta.rowData[3][check].message} arrow>
<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>
}
<ReactTooltip border={true} id="unitbisnis" place="bottom" type="light" effect="solid" />
</div >
);
}
......@@ -143,12 +151,11 @@ export default class UnitBisnis extends Component {
return (
<div style={{ display: 'flex' }}>
{tableMeta.rowData[3] != null && check > -1 ?
<a data-tip={tableMeta.rowData[3][check].message} data-for="startdate">
<LightTooltip title={tableMeta.rowData[3][check].message} arrow>
<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>
}
<ReactTooltip border={true} id="startdate" place="bottom" type="light" effect="solid" />
</div >
);
}
......@@ -168,12 +175,11 @@ export default class UnitBisnis extends Component {
return (
<div style={{ display: 'flex' }}>
{tableMeta.rowData[3] != null && check > -1 ?
<a data-tip={tableMeta.rowData[3][check].message} data-for="enddate">
<LightTooltip title={tableMeta.rowData[3][check].message} arrow>
<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>
}
<ReactTooltip border={true} id="enddate" place="bottom" type="light" effect="solid" />
</div >
);
}
......
......@@ -33,7 +33,7 @@ exports.customTable = function () {
MUIDataTableToolbar: {
root: {
position: 'relative',
padding: "0px 15px",
padding: "0px 15px",
backgroundColor: '#f2f6fa', //'rgba(0,76,151,0.05)',
},
titleText: {
......@@ -138,7 +138,7 @@ exports.customTable = function () {
color: "#555",
padding: "10px 20px",
height: "auto"
,
,
marginTop: "10px"
},
},
......@@ -362,6 +362,8 @@ exports.customTable3 = function () {
overflow: "hidden",
},
},
responsiveScrollMaxHeight: {
},
MuiToolbar: {
root: {
left: {
......@@ -486,7 +488,7 @@ exports.customOptions = function () {
selectableRows: 'none',
filterType: 'multiselect',
responsive: 'scroll',
viewColumns:true,
viewColumns: true,
rowsPerPage: 5,
rowsPerPageOptions: [5, 10, 20, 50],
print: false,
......@@ -519,12 +521,12 @@ exports.customOptionsFixedColumn = function () {
filter: false,
sort: false,
responsive: 'scrollMaxHeight',
viewColumns:false,
overflowX: 'auto',
viewColumns: false,
// overflowX: 'auto',
print: false,
download: false,
elevation: 5,
search:false,
search: false,
pagination: false
}
}
......@@ -535,7 +537,7 @@ exports.customOptionsManagementDocument = function () {
selectableRows: 'none',
filterType: 'multiselect',
responsive: 'scroll',
viewColumns:true,
viewColumns: true,
rowsPerPage: 10,
rowsPerPageOptions: [10, 20, 30, 50],
print: false,
......
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