Commit 13eadb11 authored by EKSAD's avatar EKSAD

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

parents 61329c10 06630a5b
...@@ -115,7 +115,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') => ...@@ -115,7 +115,7 @@ const create = (baseURL = 'https://tia.eksad.com/tia-reporting-dev/public/') =>
const updateAM = (body) => api.post('/approval_matrix/update_approval_matrix', body) const updateAM = (body) => api.post('/approval_matrix/update_approval_matrix', body)
const updateVAM = (body) => api.post('/approval_matrix/visual_approval_matrix', body) const updateVAM = (body) => api.post('/approval_matrix/visual_approval_matrix', body)
const checkUploadAM = (body) => api.post('/approval_matrix/check_import_approval_matrix', body) const checkUploadAM = (body) => api.post('/approval_matrix/check_import_approval_matrix', body)
const uploadAM = (body) => api.post('/approval_matrix/check_import_approval_matrix', body) const uploadAM = (body) => api.post('approval_matrix/import_approval_matrix', body)
//User //User
const getUser = () => api.get('user/get_all_user') const getUser = () => api.get('user/get_all_user')
......
...@@ -46,7 +46,7 @@ export default class ApprovalMatrix extends Component { ...@@ -46,7 +46,7 @@ export default class ApprovalMatrix extends Component {
let fileObj = event let fileObj = event
ExcelRenderer(fileObj, (err, resp) => { ExcelRenderer(fileObj, (err, resp) => {
if (err) { if (err) {
console.log(err); // console.log(err);
} }
else { else {
let judul = resp.rows[2] let judul = resp.rows[2]
...@@ -55,7 +55,7 @@ export default class ApprovalMatrix extends Component { ...@@ -55,7 +55,7 @@ export default class ApprovalMatrix extends Component {
isi.map((item, index) => { isi.map((item, index) => {
if (item.length > 0) { if (item.length > 0) {
payload.push({ payload.push({
// id: index + 1, id: index + 1,
approval_type_name: item[0], approval_type_name: item[0],
orders: item[1], orders: item[1],
fullname: item[2], fullname: item[2],
...@@ -70,192 +70,193 @@ export default class ApprovalMatrix extends Component { ...@@ -70,192 +70,193 @@ export default class ApprovalMatrix extends Component {
} }
this.setState({ payload: body, buttonError: false }) this.setState({ payload: body, buttonError: false })
api.create().checkUploadAM(body).then(response => { api.create().checkUploadAM(body).then(response => {
console.log(response.data) // console.log(response.data)
if (response.data.status === "success") { if(response.data){
let dataRow = response.data.data.map((item, index) => { if (response.data.status === "success") {
return [ let dataRow = response.data.data.map((item, index) => {
index + 1, return [
item.approval_type_name, index + 1,
item.orders, item.approval_type_name,
item.fullname, item.orders,
item.operator_type_name, item.fullname,
item.start_date, item.operator_type_name,
item.end_date, item.start_date,
item.error item.end_date,
] item.error
}) ]
let columns = [ })
"ID", let columns = [
{ "ID",
name: "Tipe Persetujuan", {
options: { name: "Tipe Persetujuan",
customBodyRender: (val, tableMeta) => { options: {
// console.log(tableMeta) customBodyRender: (val, tableMeta) => {
let check = null let check = null
if (tableMeta.rowData[7] != null) { if (tableMeta.rowData[7] != null) {
check = tableMeta.rowData[7].findIndex((val) => val.field.includes('approval_type_name')) check = tableMeta.rowData[7].findIndex((val) => val.field.includes('approval_type_name'))
if (check > -1) { if (check > -1) {
this.setState({ buttonError: true }) this.setState({ buttonError: true })
}
} }
} 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="typename">
<a data-tip={tableMeta.rowData[7][check].message} data-for="typename"> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> : }
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span> <ReactTooltip border={true} id="typename" place="bottom" type="light" effect="solid" />
} </div >
<ReactTooltip border={true} id="typename" place="bottom" type="light" effect="solid" /> );
</div > }
);
} }
} },
}, {
{ name: "Order",
name: "Order", options: {
options: { customBodyRender: (val, tableMeta) => {
customBodyRender: (val, tableMeta) => { let check = null
let check = null if (tableMeta.rowData[7] != null) {
if (tableMeta.rowData[7] != null) { check = tableMeta.rowData[7].findIndex((val) => val.field.includes('orders'))
check = tableMeta.rowData[7].findIndex((val) => val.field.includes('orders')) if (check > -1) {
if (check > -1) { this.setState({ buttonError: true })
this.setState({ buttonError: true }) }
} }
} 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="order">
<a data-tip={tableMeta.rowData[7][check].message} data-for="order"> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> : }
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span> <ReactTooltip border={true} id="order" place="bottom" type="light" effect="solid" />
} </div >
<ReactTooltip border={true} id="order" place="bottom" type="light" effect="solid" /> );
</div > }
);
} }
} },
}, {
{ name: "Nama Pemberi Persetujuan",
name: "Nama Pemberi Persetujuan", options: {
options: { customBodyRender: (val, tableMeta) => {
customBodyRender: (val, tableMeta) => { let check = null
let check = null if (tableMeta.rowData[7] != null) {
if (tableMeta.rowData[7] != null) { check = tableMeta.rowData[7].findIndex((val) => val.field.includes('fullname'))
check = tableMeta.rowData[7].findIndex((val) => val.field.includes('fullname')) if (check > -1) {
if (check > -1) { this.setState({ buttonError: true })
this.setState({ buttonError: true }) }
} }
} 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">
<a data-tip={tableMeta.rowData[7][check].message} data-for="fullname"> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> : }
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span> <ReactTooltip border={true} id="fullname" place="bottom" type="light" effect="solid" />
} </div >
<ReactTooltip border={true} id="fullname" place="bottom" type="light" effect="solid" /> );
</div > }
);
} }
} },
}, {
{ name: "Operator",
name: "Operator", options: {
options: { customBodyRender: (val, tableMeta) => {
customBodyRender: (val, tableMeta) => { let check = null
let check = null if (tableMeta.rowData[7] != null) {
if (tableMeta.rowData[7] != null) { check = tableMeta.rowData[7].findIndex((val) => val.field.includes('operator_type_name'))
check = tableMeta.rowData[7].findIndex((val) => val.field.includes('operator_type_name')) if (check > -1) {
if (check > -1) { this.setState({ buttonError: true })
this.setState({ buttonError: true }) }
} }
} 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">
<a data-tip={tableMeta.rowData[7][check].message} data-for="operatorname"> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> : }
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span> <ReactTooltip border={true} id="operatorname" place="bottom" type="light" effect="solid" />
} </div >
<ReactTooltip border={true} id="operatorname" place="bottom" type="light" effect="solid" /> );
</div > }
);
} }
} },
}, {
{ name: "Berlaku Mulai",
name: "Berlaku Mulai", options: {
options: { customBodyRender: (val, tableMeta) => {
customBodyRender: (val, tableMeta) => { let check = null
let check = null if (tableMeta.rowData[7] != null) {
if (tableMeta.rowData[7] != null) { check = tableMeta.rowData[7].findIndex((val) => val.field.includes('start_date'))
check = tableMeta.rowData[7].findIndex((val) => val.field.includes('start_date')) if (check > -1) {
if (check > -1) { this.setState({ buttonError: true })
this.setState({ buttonError: true }) }
} }
} 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">
<a data-tip={tableMeta.rowData[7][check].message} data-for="startdate"> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> : }
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span> <ReactTooltip border={true} id="startdate" place="bottom" type="light" effect="solid" />
} </div >
<ReactTooltip border={true} id="startdate" place="bottom" type="light" effect="solid" /> );
</div > }
);
} }
} },
}, {
{ name: "Berakhir Hingga",
name: "Berakhir Hingga", options: {
options: { customBodyRender: (val, tableMeta) => {
customBodyRender: (val, tableMeta) => { let check = null
let check = null if (tableMeta.rowData[7] != null) {
if (tableMeta.rowData[7] != null) { check = tableMeta.rowData[7].findIndex((val) => val.field.includes('end_date'))
check = tableMeta.rowData[7].findIndex((val) => val.field.includes('end_date')) if (check > -1) {
if (check > -1) { this.setState({ buttonError: true })
this.setState({ buttonError: true }) }
} }
} 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">
<a data-tip={tableMeta.rowData[7][check].message} data-for="enddate"> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> :
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span> <span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span>
</a> : }
<span style={{ color: check != null && check > -1 ? "red" : 'black' }}>{val}</span> <ReactTooltip border={true} id="enddate" place="bottom" type="light" effect="solid" />
} </div >
<ReactTooltip border={true} id="enddate" place="bottom" type="light" effect="solid" /> );
</div > }
); }
},
{
name: "",
options: {
display: false
} }
} }
}, ]
{
name: "",
options: {
display: false
}
}
]
// console.log(dataRow); // console.log(dataRow);
this.setState({
dataLoaded: true,
cols: columns,
rows: dataRow
});
}
} else {
this.setState({ this.setState({
dataLoaded: true, dataLoaded: false,
cols: columns,
rows: dataRow
}); });
} }
// console.log(response);
}) })
} }
}); });
...@@ -401,10 +402,9 @@ export default class ApprovalMatrix extends Component { ...@@ -401,10 +402,9 @@ export default class ApprovalMatrix extends Component {
uploadAM() { uploadAM() {
api.create().uploadAM(this.state.payload).then(response => { api.create().uploadAM(this.state.payload).then(response => {
console.log(response.data) console.log(response)
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
// console.log(this.state.payload)
this.getData() this.getData()
this.setState({ visibleAM: true, alert: true, messageAlert: response.data.message, tipeAlert: 'success' }) this.setState({ visibleAM: true, alert: true, messageAlert: response.data.message, tipeAlert: 'success' })
} else { } else {
...@@ -547,70 +547,85 @@ export default class ApprovalMatrix extends Component { ...@@ -547,70 +547,85 @@ export default class ApprovalMatrix extends Component {
/> />
</div> </div>
<div style={{ width: '30%', justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}> <div style={{ width: '30%', justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<button <a data-tip={'Download Template'} data-for="template">
style={{ <button
backgroundColor: 'transparent', style={{
cursor: 'pointer', backgroundColor: 'transparent',
borderColor: 'transparent', cursor: 'pointer',
padding: 0, borderColor: 'transparent',
margin: 5 padding: 0,
}} margin: 5
onClick={() => this.downloadFile()} }}
> onClick={() => this.downloadFile()}
<img src={Images.template} title="Download Template" /> >
</button> <img src={Images.template} />
<button </button>
style={{ </a>
backgroundColor: 'transparent', <ReactTooltip border={true} id="template" place="bottom" type="light" effect="solid" />
cursor: 'pointer', <a data-tip={'Upload'} data-for="upload">
borderColor: 'transparent', <button
marginLeft: 16, style={{
padding: 0, backgroundColor: 'transparent',
margin: 5 cursor: 'pointer',
}} borderColor: 'transparent',
onClick={() => this.setState({ visibleUpload: true })} marginLeft: 16,
> padding: 0,
<img src={Images.upload} title="Upload File" /> margin: 5
</button> }}
<button onClick={() => this.setState({ visibleUpload: true })}
style={{ >
backgroundColor: 'transparent', <img src={Images.upload} />
cursor: 'pointer', </button>
borderColor: 'transparent', </a>
marginLeft: 16, <ReactTooltip border={true} id="upload" place="bottom" type="light" effect="solid" />
padding: 0, <a data-tip={'Download'} data-for="download">
margin: 5 <button
}} style={{
onClick={() => this.downloadDataTable()} backgroundColor: 'transparent',
> cursor: 'pointer',
<img src={Images.download} title="Download File" /> borderColor: 'transparent',
</button> marginLeft: 16,
<button padding: 0,
style={{ margin: 5
backgroundColor: 'transparent', }}
cursor: 'pointer', onClick={() => this.downloadDataTable()}
borderColor: 'transparent', >
marginLeft: 16, <img src={Images.download} />
padding: 0, </button>
margin: 5 </a>
}} <ReactTooltip border={true} id="download" place="bottom" type="light" effect="solid" />
onClick={() => this.setState({ visibleVisual: true, visibleAM: false })} <a data-tip={'Visualisasi'} data-for="visualisasi">
> <button
<img src={Images.visualisasi} title="Visualisasi" /> style={{
</button> backgroundColor: 'transparent',
<button cursor: 'pointer',
style={{ borderColor: 'transparent',
backgroundColor: 'transparent', marginLeft: 16,
cursor: 'pointer', padding: 0,
borderColor: 'transparent', margin: 5
marginLeft: 16, }}
padding: 0, onClick={() => this.setState({ visibleVisual: true, visibleAM: false })}
margin: 5 >
}} <img src={Images.visualisasi} />
onClick={() => this.setState({ visibleCreate: true })} </button>
> </a>
<img src={Images.add} title="Tambah Approval Matrix" /> <ReactTooltip border={true} id="visualisasi" place="bottom" type="light" effect="solid" />
</button> <a data-tip={'Tambah'} data-for="create">
<button
style={{
backgroundColor: 'transparent',
cursor: 'pointer',
borderColor: 'transparent',
marginLeft: 16,
padding: 0,
margin: 5
}}
onClick={() => this.setState({ visibleCreate: true })}
>
<img src={Images.add} title="Tambah Approval Matrix" />
</button>
</a>
<ReactTooltip border={true} id="create" place="bottom" type="light" effect="solid" />
</div > </div >
</div> </div>
<div style={{ padding: 25, width: '100%' }}> <div style={{ padding: 25, width: '100%' }}>
...@@ -718,7 +733,7 @@ export default class ApprovalMatrix extends Component { ...@@ -718,7 +733,7 @@ export default class ApprovalMatrix extends Component {
type={this.state.uploadStatus} type={this.state.uploadStatus}
percentage={this.state.percentage} percentage={this.state.percentage}
result={this.state.result} result={this.state.result}
acceptedFiles={["pdf"]} acceptedFiles={["xlsx"]}
onHandle={(dt) => { onHandle={(dt) => {
this.fileHandler(dt) this.fileHandler(dt)
this.setState({ uploadStatus: 'idle', percentage: '0' }) this.setState({ uploadStatus: 'idle', percentage: '0' })
......
...@@ -28,6 +28,10 @@ export default class CreateApprovalMatrix extends Component { ...@@ -28,6 +28,10 @@ export default class CreateApprovalMatrix extends Component {
msgErrOrder: '', msgErrOrder: '',
errorType: false, errorType: false,
msgErrType: '', msgErrType: '',
errorApproved: false,
msgErrApproved: '',
errorOperator: false,
msgErrOperator: '',
errorStartDate: false, errorStartDate: false,
errorEndDate: false, errorEndDate: false,
msgErrorStartDate: "", msgErrorStartDate: "",
...@@ -140,6 +144,10 @@ export default class CreateApprovalMatrix extends Component { ...@@ -140,6 +144,10 @@ export default class CreateApprovalMatrix extends Component {
msgErrOrder: "", msgErrOrder: "",
errorType: false, errorType: false,
msgErrType: '', msgErrType: '',
errorApproved: false,
msgErrApproved: '',
errorOperator: false,
msgErrOperator: '',
errorStartDate: false, errorStartDate: false,
errorEndDate: false, errorEndDate: false,
msgErrorStartDate: "", msgErrorStartDate: "",
...@@ -149,13 +157,18 @@ export default class CreateApprovalMatrix extends Component { ...@@ -149,13 +157,18 @@ export default class CreateApprovalMatrix extends Component {
validasi() { validasi() {
if (R.isNil(this.state.typeId)) { if (R.isNil(this.state.typeId)) {
return alert("Tipe Persetujuan tidak boleh kosong"); this.setState({ errorType: true, msgErrType: 'Tipe Persetujuan tidak boleh kosong' })
} }
else if (R.isEmpty(this.state.order)) { else if (R.isEmpty(this.state.order)) {
this.setState({ errorOrder: true, msgErrOrder: 'Order tidak boleh kosong'}) this.setState({ errorOrder: true, msgErrOrder: 'Order tidak boleh kosong'})
} }
else if (R.isNil(this.state.userId)) return alert("Pemberi Persetujuan tidak boleh kosong"); else if (R.isNil(this.state.userId)) {
else if (R.isNil(this.state.operatorId)) return alert("Operator tidak boleh kosong"); // return alert("Pemberi Persetujuan tidak boleh kosong");
this.setState({ errorApproved: true, msgErrApproved: 'Pemberi Persetujuan tidak boleh kosong' })
}
else if (R.isNil(this.state.operatorId)) {
this.setState({ errorOperator: true, msgErrOperator: 'Operator tidak boleh kosong' })
}
else if (R.isNil(this.state.startDate)) { else if (R.isNil(this.state.startDate)) {
this.setState({ errorStartDate: true, msgErrorStartDate: 'Tanggal Mulai tidak boleh kosong' }) this.setState({ errorStartDate: true, msgErrorStartDate: 'Tanggal Mulai tidak boleh kosong' })
} else if (R.isNil(this.state.endDate)) { } else if (R.isNil(this.state.endDate)) {
...@@ -225,29 +238,26 @@ export default class CreateApprovalMatrix extends Component { ...@@ -225,29 +238,26 @@ export default class CreateApprovalMatrix extends Component {
<Autocomplete <Autocomplete
{...this.state.types} {...this.state.types}
id="tipe" id="tipe"
onChange={(event, newInputValue) => this.setState({typeId:newInputValue})} onChange={(event, newInputValue) => this.setState({typeId:newInputValue}, ()=> this.clearError())}
debug debug
renderInput={(params) => renderInput={(params) =>
<TextField <TextField
{...params} {...params}
label="Tipe Persetujuan" label="Tipe Persetujuan"
onChange={(e) => this.handleChange(e, '')}
error={this.state.errorType}
helperText={this.state.msgErrType}
InputLabelProps={{ InputLabelProps={{
style: { style: {
fontSize: 11, fontSize: 11,
fontFamily: 'Nunito Sans, sans-serif',
color: '#7e8085' color: '#7e8085'
} }
}} }}
InputProps={{ ...params.InputProps, style: { fontSize: 11 } }} InputProps={{ ...params.InputProps, style: { fontSize: 11, fontFamily: 'Nunito Sans, sans-serif' } }}
/> />
} }
value={this.state.typeId} value={this.state.typeId}
error={this.state.errorType}
helperText={this.state.msgErrType}
// inputProps={{
// style: {
// fontSize: 11
// }
// }}
/> />
</div> </div>
</div> </div>
...@@ -284,12 +294,15 @@ export default class CreateApprovalMatrix extends Component { ...@@ -284,12 +294,15 @@ export default class CreateApprovalMatrix extends Component {
<Autocomplete <Autocomplete
{...this.state.approvedBy} {...this.state.approvedBy}
id="approvedby" id="approvedby"
onChange={(event, newInputValue) => this.setState({userId:newInputValue})} onChange={(event, newInputValue) => this.setState({userId:newInputValue}, ()=> this.clearError())}
// disableClearable // disableClearable
debug debug
renderInput={(params) => renderInput={(params) =>
<TextField {...params} <TextField {...params}
label="Pemberi Persetujuan" label="Pemberi Persetujuan"
onChange={(e) => this.handleChange(e, '')}
error={this.state.errorApproved}
helperText={this.state.msgErrApproved}
InputLabelProps={{ InputLabelProps={{
style: { style: {
fontSize: 11, fontSize: 11,
...@@ -299,12 +312,6 @@ export default class CreateApprovalMatrix extends Component { ...@@ -299,12 +312,6 @@ export default class CreateApprovalMatrix extends Component {
InputProps={{ ...params.InputProps, style: { fontSize: 11 } }} InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
/>} />}
value={this.state.userId} value={this.state.userId}
// inputProps={{
// style: {
// fontSize: 11
// }
// }}
// style={{ padding: 0, margin: 0, width: '100%'}}
/> />
</div> </div>
</div> </div>
...@@ -317,10 +324,13 @@ export default class CreateApprovalMatrix extends Component { ...@@ -317,10 +324,13 @@ export default class CreateApprovalMatrix extends Component {
id="operator" id="operator"
// disableClearable // disableClearable
debug debug
onChange={(event, newInputValue) => this.setState({operatorId:newInputValue})} onChange={(event, newInputValue) => this.setState({operatorId:newInputValue}, ()=> this.clearError())}
renderInput={(params) => renderInput={(params) =>
<TextField {...params} <TextField {...params}
label="Operator" label="Operator"
onChange={(e) => this.handleChange(e, '')}
error={this.state.errorOperator}
helperText={this.state.msgErrOperator}
InputLabelProps={{ InputLabelProps={{
style: { style: {
fontSize: 11, fontSize: 11,
...@@ -330,12 +340,6 @@ export default class CreateApprovalMatrix extends Component { ...@@ -330,12 +340,6 @@ export default class CreateApprovalMatrix extends Component {
InputProps={{ ...params.InputProps, style: { fontSize: 11 } }} InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
/>} />}
value={this.state.operatorId} value={this.state.operatorId}
// inputProps={{
// style: {
// fontSize: 11
// }
// }}
// style={{ padding: 0, margin: 0, width: '100%' }}
/> />
</div> </div>
</div> </div>
......
...@@ -22,6 +22,12 @@ export default class EditApprovalMatrix extends Component { ...@@ -22,6 +22,12 @@ export default class EditApprovalMatrix extends Component {
getTypes: null, getTypes: null,
operators: null, operators: null,
getOperators: null, getOperators: null,
errorType: false,
msgErrType: '',
errorApproved: false,
msgErrApproved: '',
errorOperator: false,
msgErrOperator: '',
errorOrder: false, errorOrder: false,
msgErrOrder: '', msgErrOrder: '',
errorStartDate: false, errorStartDate: false,
...@@ -153,6 +159,12 @@ export default class EditApprovalMatrix extends Component { ...@@ -153,6 +159,12 @@ export default class EditApprovalMatrix extends Component {
clearError() { clearError() {
this.setState({ this.setState({
errorType: false,
msgErrType: '',
errorApproved: false,
msgErrApproved: '',
errorOperator: false,
msgErrOperator: '',
errorOrder: false, errorOrder: false,
msgErrOrder: "", msgErrOrder: "",
errorStartDate: false, errorStartDate: false,
...@@ -164,14 +176,17 @@ export default class EditApprovalMatrix extends Component { ...@@ -164,14 +176,17 @@ export default class EditApprovalMatrix extends Component {
validasi() { validasi() {
if (R.isNil(this.state.getTypes)) { if (R.isNil(this.state.getTypes)) {
return alert("Tipe Persetujuan tidak boleh kosong"); this.setState({ errorType: true, msgErrType: 'Tipe Persetujuan tidak boleh kosong' })
} }
else if (R.isEmpty(this.state.order)) { else if (R.isEmpty(this.state.order)) {
this.setState({ errorOrder: true, msgErrOrder: 'Order tidak boleh kosong'}) this.setState({ errorOrder: true, msgErrOrder: 'Order tidak boleh kosong'})
} }
else if (R.isNil(this.state.getApprovedBy)) return alert("Pemberi Persetujuan tidak boleh kosong"); else if (R.isNil(this.state.getApprovedBy)) {
else if (R.isNil(this.state.getOperators)) return alert("Operator tidak boleh kosong"); this.setState({ errorApproved: true, msgErrApproved: 'Pemberi Persetujuan tidak boleh kosong' })
else if (!R.isEmpty(this.state.startDate) && !R.isEmpty(this.state.endDate) && (this.state.startDate > this.state.endDate)) return alert("Masa Berlaku Tidak Boleh Kurang Dari Tanggal Mulai"); }
else if (R.isNil(this.state.getOperators)) {
this.setState({ errorOperator: true, msgErrOperator: 'Operator tidak boleh kosong' })
}
else if (R.isEmpty(this.state.startDate)) { else if (R.isEmpty(this.state.startDate)) {
this.setState({ errorStartDate: true, msgErrorStartDate: 'Tanggal Mulai tidak boleh kosong' }) this.setState({ errorStartDate: true, msgErrorStartDate: 'Tanggal Mulai tidak boleh kosong' })
} else if (R.isEmpty(this.state.endDate)) { } else if (R.isEmpty(this.state.endDate)) {
...@@ -246,10 +261,13 @@ export default class EditApprovalMatrix extends Component { ...@@ -246,10 +261,13 @@ export default class EditApprovalMatrix extends Component {
option option
debug debug
id="tipe" id="tipe"
onChange={(event, newInputValue) => this.setState({getTypes:newInputValue})} onChange={(event, newInputValue) => this.setState({getTypes:newInputValue}, ()=> this.clearError())}
renderInput={(params) => renderInput={(params) =>
<TextField {...params} <TextField {...params}
label="Tipe Persetujuan" label="Tipe Persetujuan"
onChange={(e) => this.handleChange(e, '')}
error={this.state.errorType}
helperText={this.state.msgErrType}
InputLabelProps={{ InputLabelProps={{
style: { style: {
fontSize: 11, fontSize: 11,
...@@ -298,10 +316,13 @@ export default class EditApprovalMatrix extends Component { ...@@ -298,10 +316,13 @@ export default class EditApprovalMatrix extends Component {
option option
debug debug
id="approvedby" id="approvedby"
onChange={(event, newInputValue) => this.setState({getApprovedBy: newInputValue})} onChange={(event, newInputValue) => this.setState({getApprovedBy: newInputValue}, ()=> this.clearError())}
renderInput={(params) => renderInput={(params) =>
<TextField {...params} <TextField {...params}
label="Pemberi Persetujuan" label="Pemberi Persetujuan"
onChange={(e) => this.handleChange(e, '')}
error={this.state.errorApproved}
helperText={this.state.msgErrApproved}
InputLabelProps={{ InputLabelProps={{
style: { style: {
fontSize: 11, fontSize: 11,
...@@ -321,12 +342,15 @@ export default class EditApprovalMatrix extends Component { ...@@ -321,12 +342,15 @@ export default class EditApprovalMatrix extends Component {
<Autocomplete <Autocomplete
{...this.state.operators} {...this.state.operators}
option option
disableClearable debug
id="operator" id="operator"
onChange={(event, newInputValue) => this.setState({getOperators: newInputValue})} onChange={(event, newInputValue) => this.setState({getOperators: newInputValue}, ()=> this.clearError())}
renderInput={(params) => renderInput={(params) =>
<TextField {...params} <TextField {...params}
label="Operator" label="Operator"
onChange={(e) => this.handleChange(e, '')}
error={this.state.errorOperator}
helperText={this.state.msgErrOperator}
InputLabelProps={{ InputLabelProps={{
style: { style: {
fontSize: 11, fontSize: 11,
......
...@@ -82,7 +82,12 @@ export default class CreateParameter extends Component { ...@@ -82,7 +82,12 @@ export default class CreateParameter extends Component {
getSettingGroupID: data.setting_group_id, getSettingGroupID: data.setting_group_id,
getCompanyID: data.company_id, getCompanyID: data.company_id,
settingType: data.setting_type, settingType: data.setting_type,
}, () => this.getAllGroup(), this.getPerusahaan(), this.getParameterByGroup(data.setting_group_id)) }, () => {
this.getAllGroup()
this.getPerusahaan()
this.getParameterByGroup(data.setting_group_id)
console.log(this.state.tempData)
})
} else { } else {
alert(response.data.message) alert(response.data.message)
} }
...@@ -338,7 +343,7 @@ export default class CreateParameter extends Component { ...@@ -338,7 +343,7 @@ export default class CreateParameter extends Component {
// this.setState({ errorDeskripsi: true, msgErrorDeskripsi: 'Deskripsi tidak boleh kosong' }) // this.setState({ errorDeskripsi: true, msgErrorDeskripsi: 'Deskripsi tidak boleh kosong' })
// } else if (R.isEmpty(this.state.tempData.value)) { // } else if (R.isEmpty(this.state.tempData.value)) {
// this.setState({ errorValue: true, msgErrorValue: 'Value tidak boleh kosong' }) // this.setState({ errorValue: true, msgErrorValue: 'Value tidak boleh kosong' })
} else if (!R.isNil(this.state.tempData.max_value) && R.isNil(this.state.tempData.min_value)) { } else if ((!R.isNil(this.state.tempData.max_value) && R.isNil(this.state.tempData.min_value)) || (!R.isNil(this.state.tempData.max_value) && R.isEmpty(this.state.tempData.min_value))) {
this.setState({ errorMinValue: true, msgErrorMinValue: 'Min Value tidak boleh kosong' }) this.setState({ errorMinValue: true, msgErrorMinValue: 'Min Value tidak boleh kosong' })
} else if (R.isNil(this.state.tempData.start_date)) { } else if (R.isNil(this.state.tempData.start_date)) {
this.setState({ errorStartDate: true, msgErrorStartDate: 'Start Date tidak boleh kosong' }) this.setState({ errorStartDate: true, msgErrorStartDate: 'Start Date tidak boleh kosong' })
......
...@@ -48,6 +48,7 @@ export default class Parameter extends Component { ...@@ -48,6 +48,7 @@ export default class Parameter extends Component {
let data = response.data.data let data = response.data.data
let listData = data.map((item, index) => { let listData = data.map((item, index) => {
return [ return [
item.setting_id,
item.setting_id, item.setting_id,
item.setting_group, item.setting_group,
item.setting_type, item.setting_type,
...@@ -559,13 +560,24 @@ export default class Parameter extends Component { ...@@ -559,13 +560,24 @@ export default class Parameter extends Component {
); );
} }
} }
}, { }, {
name: "ID",
options: {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[10] === "Aktif" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{val}</span>
</div >
);
}
}
},{
name: "Group", name: "Group",
options: { options: {
customBodyRender: (val, tableMeta) => { customBodyRender: (val, tableMeta) => {
return ( return (
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[9] === "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}</span>
</div > </div >
); );
} }
...@@ -576,7 +588,7 @@ export default class Parameter extends Component { ...@@ -576,7 +588,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[9] === "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}</span>
</div > </div >
); );
} }
...@@ -587,7 +599,7 @@ export default class Parameter extends Component { ...@@ -587,7 +599,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[9] === "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}</span>
</div > </div >
); );
} }
...@@ -598,7 +610,7 @@ export default class Parameter extends Component { ...@@ -598,7 +610,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[9] === "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}</span>
</div > </div >
); );
} }
...@@ -609,7 +621,7 @@ export default class Parameter extends Component { ...@@ -609,7 +621,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[9] === "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}</span>
</div > </div >
); );
} }
...@@ -620,7 +632,7 @@ export default class Parameter extends Component { ...@@ -620,7 +632,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[9] === "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}</span>
</div > </div >
); );
} }
...@@ -631,7 +643,7 @@ export default class Parameter extends Component { ...@@ -631,7 +643,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[9] === "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}</span>
</div > </div >
); );
} }
...@@ -642,7 +654,7 @@ export default class Parameter extends Component { ...@@ -642,7 +654,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[9] === "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}</span>
</div > </div >
); );
} }
...@@ -653,7 +665,7 @@ export default class Parameter extends Component { ...@@ -653,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[9] === "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}</span>
</div > </div >
); );
} }
......
import React, { Component } from 'react';
import { TextField, Typography } from '@material-ui/core';
import * as R from 'ramda';
import { DateTimePicker, KeyboardDatePicker, DatePicker } from "@material-ui/pickers";
import format from "date-fns/format";
import Autocomplete from '@material-ui/lab/Autocomplete';
import api from '../../../api';
import Images from '../../../assets/Images';
export default class CreatePerusahaan extends Component {
constructor(props) {
super(props)
this.state = {
id: '',
company: '',
parentCompany: '',
unitBisnis: '',
totalReport: '',
startDate: '',
endDate: '',
types: null,
getTypes: null,
perusahaan: null,
getPerusahaan: null,
}
}
componentDidMount() {
this.getParentCompany()
this.getAllUnitBisnis()
}
getParentCompany() {
api.create().getPerusahaanActive().then((response) => {
if (response.data.status == 'success') {
let data = response.data.data
let typeData = data.map((item) => {
return {
company_id: item.company_id,
company_name: item.company_name
}
})
let typeProps = {
options: typeData.sort((a, b) => a.company_id - b.company_id),
getOptionLabel: (option) => option.company_name,
};
this.setState({ perusahaan: typeProps, perusahaanData: response.data.data })
} else {
alert(response.data.message)
}
})
}
getAllUnitBisnis() {
api.create().getUnitBisnisActive().then(response => {
console.log(response);
if (response.data.status == 'success') {
let data = response.data.data
let typeData = data.map((item) => {
return {
business_unit_id: item.business_unit_id,
business_unit_name: item.business_unit_name
}
})
let typeProps = {
options: typeData,
getOptionLabel: (option) => option.business_unit_name,
};
this.setState({ types: typeProps, typeData: response.data.data })
} else {
alert(response.data.message)
}
})
}
handleChange(e, type) {
let data = this.state
let isDate = type !== '' ? true : false
if (isDate && type == 'start_date') {
this.setState({ startDate: format(e, 'yyyy-MM-dd'), endDate: null }, () => {
console.log(this.state.startDate)
})
} else if (isDate && type == 'end_date') {
this.setState({ endDate: format(e, 'yyyy-MM-dd') }, () => {
console.log(this.state.endDate)
})
} else {
// this.setState({...data, tempData: {...this.state.tempData, [e.target.name] : e.target.value}})
}
}
validasi() {
if (R.isEmpty(this.state.company)) return alert("Nama perusahaan harus diisi.");
if (R.isEmpty(this.state.totalReport)) return alert("Total Report is Required.");
if (!R.isEmpty(this.state.startDate) && !R.isEmpty(this.state.endDate) && (this.state.startDate > this.state.endDate)) return alert("Masa Berlaku Tidak Boleh Kurang Dari Tanggal Mulai");
if (R.isEmpty(this.state.startDate)) return alert("Tanggal Mulai is Required.");
if (R.isEmpty(this.state.endDate)) return alert("Tanggal Berakhir is Required.");
let payload = {
"company_name": this.state.company,
"parent": this.state.getPerusahaan.company_id,
"business_unit_id": this.state.getTypes.business_unit_id,
"total_report": this.state.totalReport,
"start_date": this.state.startDate,
"end_date": this.state.endDate
}
console.log(payload);
this.props.createPerusahaan(payload)
}
render() {
return (
<div className="test app-popup-show" style={{ paddingTop: 100 }}>
<div className="popup-content background-white border-radius" style={{ borderRadius: 8 }}>
<div className="popup-panel grid grid-2x main-color" style={{ height: 64, borderTopRightRadius: 8, borderTopLeftRadius: 8 }}>
<div className="col-1" style={{ maxWidth: "inherit", display: 'flex', alignItems: 'center' }}>
<div className="popup-title">
<span style={{ color: '#fff', fontSize: 16, fontWeight: 'bold' }}>Create Data</span>
</div>
</div>
<div className="col-2 content-right" style={{ maxWidth: "inherit", alignSelf: 'center' }}>
<button
type="button"
className="btn btn-circle btn-white"
onClick={() => this.props.onClickClose()}
>
<img src={Images.close}/>
</button>
</div>
</div>
<div className="border-bottom grid grid-2x grid-mobile-none gap-15px" style={{ padding: 20 }}>
<div className="column-1">
<div style={{ backgroundColor: '#e8e8e8', padding: 10, borderRadius: 5 }}>
<TextField
style={{ width: '100%' }}
id="id"
label="ID"
disabled
inputProps={{
style: {
fontSize: 11
}
}}
InputLabelProps={{
style: {
fontSize: 11,
color: '#7e8085'
}
}}
/>
</div>
<div style={{ padding: 10, borderRadius: 5 }}>
<Autocomplete
{...this.state.types}
debug
id="tipe"
onChange={(event, newInputValue) => this.setState({ getTypes: newInputValue })}
renderInput={(params) => <TextField {...params} InputProps={{ ...params.InputProps, style: { fontSize: 11 } }} InputLabelProps={{ style: { fontSize: 11, color: '#7e8085' } }} label="Unit Bisnis" />}
value={this.state.getTypes}
/>
</div>
<div style={{ padding: 10, borderRadius: 5 }}>
<TextField
style={{ width: '100%' }}
id="report"
label="Jumlah Laporan"
value={this.state.totalReport}
inputProps={{
style: {
fontSize: 11
}
}}
InputLabelProps={{
style: {
fontSize: 11,
color: '#7e8085'
}
}}
onChange={(e) => this.setState({ totalReport: e.target.value })}
>
</TextField>
</div>
<div style={{ padding: 10, borderRadius: 5 }}>
<DatePicker
margin="normal"
id="startDate"
label="Berlaku Mulai"
format="dd MMMM yyyy"
value={this.state.startDate == "" ? null : this.state.startDate}
onChange={(e) => this.handleChange(e, 'start_date')}
KeyboardButtonProps={{
'aria-label': 'change date',
}}
inputProps={{
style: {
fontSize: 11
}
}}
InputLabelProps={{
style: {
fontSize: 11,
color: '#7e8085'
}
}}
style={{ padding: 0, margin: 0, width: '100%' }}
/>
</div>
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5, backgroundColor: '#e8e8e8', }}>
<TextField
style={{ width: '100%' }}
defaultValue={"Aktif"}
id="status"
label="Status"
disabled
inputProps={{
style: {
fontSize: 11
}
}}
InputLabelProps={{
style: {
fontSize: 11,
color: '#7e8085'
}
}}
/>
</div>
<div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
<Typography style={{ fontSize: 11 }}>Dibuat : </Typography>
<Typography style={{ fontSize: 11 }}>Diubah : </Typography>
</div>
</div>
<div className="column-2">
<div style={{ padding: 10, borderRadius: 5 }}>
<TextField
style={{ width: '100%' }}
id="perusahaan"
label="Nama Perusahaan"
value={this.state.company}
inputProps={{
style: {
fontSize: 11
}
}}
InputLabelProps={{
style: {
fontSize: 11,
color: '#7e8085'
}
}}
onChange={(e) => this.setState({ company: e.target.value })}
>
</TextField>
</div>
<div style={{ padding: 10, borderRadius: 5 }}>
<Autocomplete
{...this.state.perusahaan}
debug
id="tipe"
onChange={(event, newInputValue) => this.setState({ getPerusahaan: newInputValue })}
renderInput={(params) => <TextField {...params} InputProps={{ ...params.InputProps, style: { fontSize: 11 } }} InputLabelProps={{ style: { fontSize: 11, color: '#7e8085' } }} label="Parent Company" />}
value={this.state.getPerusahaan}
/>
</div>
<div style={{ padding: 10, borderRadius: 5 }}>
<DatePicker
margin="normal"
id="endDate"
label="Berlaku Hingga"
format="dd MMMM yyyy"
minDate={this.state.startDate}
value={this.state.endDate == "" ? null : this.state.endDate}
onChange={(e) => this.handleChange(e, 'end_date')}
KeyboardButtonProps={{
'aria-label': 'change date',
}}
inputProps={{
style: {
fontSize: 11
}
}}
InputLabelProps={{
style: {
fontSize: 11,
color: '#7e8085'
}
}}
style={{ padding: 0, margin: 0, width: '100%' }}
/>
</div>
</div>
</div>
<div className="border-top grid grid-2x" style={{ height: 56, backgroundColor: '#f5f5f5', paddingLeft: 20, paddingRight: 20 }}>
<div className="column-1" style={{ alignSelf: 'center' }}>
<button
type="button"
onClick={() => this.props.onClickClose()}
>
<div style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#354960', fontSize: 11 }}>Batal</span>
</div>
</button>
</div>
<div className="column-2" style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'center' }}>
<button
type="button"
onClick={() => this.validasi()}
>
<div style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
<span style={{ color: '#fff', fontSize: 11 }}>Simpan</span>
</div>
</button>
</div>
</div>
</div>
</div>
);
}
}
...@@ -10,6 +10,7 @@ import UnitBisnis from '../container/MasterData/UnitBisnis' ...@@ -10,6 +10,7 @@ import UnitBisnis from '../container/MasterData/UnitBisnis'
import Parameter from '../container/MasterData/Parameter/Parameter' import Parameter from '../container/MasterData/Parameter/Parameter'
import ReportItems from '../container/MasterData/ReportItems' import ReportItems from '../container/MasterData/ReportItems'
import DashboardCAT from '../container/Laporan/DashboardCAT' import DashboardCAT from '../container/Laporan/DashboardCAT'
import BudgetTahunan from '../container/BudgetTahunan';
const routes = [ const routes = [
{ {
...@@ -30,7 +31,7 @@ const routes = [ ...@@ -30,7 +31,7 @@ const routes = [
}, },
{ {
path: "/home/master-budget", path: "/home/master-budget",
main: BalanceSheet main: BudgetTahunan
}, },
{ {
path: "/home/profile", path: "/home/profile",
......
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