Commit 06630a5b authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'deni-dev(pc)' into 'master'

isue parameter

See merge request !147
parents 7fcb2538 6c3b07ce
...@@ -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,
...@@ -560,12 +561,23 @@ export default class Parameter extends Component { ...@@ -560,12 +561,23 @@ 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 >
); );
} }
......
...@@ -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