Commit 5f0a2947 authored by Riri Novita's avatar Riri Novita

Merge branch 'dev/riri' into 'ENV-DEV'

issue Parameter

See merge request !1959
parents f36293e0 7d79b770
...@@ -624,13 +624,13 @@ export default class CreateParameter extends Component { ...@@ -624,13 +624,13 @@ export default class CreateParameter extends Component {
"end_date": this.state.tempData.end_date "end_date": this.state.tempData.end_date
} }
console.log(body); console.log(body);
this.props.updateParameter(body) // this.props.updateParameter(body)
} }
createParameter() { createParameter() {
let char = this.state.value let char = this.state.value
let arrayChar = char.split(''); let arrayChar = char.split('');
// console.log(char); console.log(char);
let body = { let body = {
"setting_group_id": this.state.getTypes.setting_group_id, "setting_group_id": this.state.getTypes.setting_group_id,
"setting_type_id": this.state.getParameter.setting_type_id, "setting_type_id": this.state.getParameter.setting_type_id,
...@@ -640,14 +640,14 @@ export default class CreateParameter extends Component { ...@@ -640,14 +640,14 @@ export default class CreateParameter extends Component {
"orders": this.state.order, "orders": this.state.order,
"value": this.state.value, "value": this.state.value,
// convert IDR to IDR mn // convert IDR to IDR mn
"value": this.state.enableReportName ? this.state.value.includes(".") || arrayChar.length == 2 ? this.state.value : Number((this.state.value)/1000).toFixed(1) : this.state.value , "value": this.state.enableReportName ? this.state.value.includes(".") || arrayChar.length == 2 ? this.state.value : this.state.value/1000 : this.state.value ,
"max_value": this.state.maxValue, "max_value": this.state.maxValue,
"min_value": this.state.minValue, "min_value": this.state.minValue,
"start_date": this.state.startDate, "start_date": this.state.startDate,
"end_date": this.state.endDate "end_date": this.state.endDate
} }
console.log(body); console.log(body);
this.props.createParameter(body) // this.props.createParameter(body)
} }
render() { render() {
......
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