Commit c55e65d2 authored by Riri Novita's avatar Riri Novita

Merge branch 'ENV-DEV' into 'ENV-STAGING'

update download

See merge request !2076
parents 5bd11c52 569eab65
...@@ -2520,7 +2520,8 @@ export default class BudgetTahunan extends Component { ...@@ -2520,7 +2520,8 @@ export default class BudgetTahunan extends Component {
"report_id": selectReport, "report_id": selectReport,
"month": "", "month": "",
"quartal": "", "quartal": "",
"type_report_name": "Master Budget" "type_report_name": "Master Budget",
"currency_id" : defaultCurrency.id
} }
// console.log(payload); // console.log(payload);
api.create().createDownloadFile(payload).then((response) => { api.create().createDownloadFile(payload).then((response) => {
......
...@@ -867,10 +867,10 @@ export default class CreateParameter extends Component { ...@@ -867,10 +867,10 @@ export default class CreateParameter extends Component {
} else if (this.state.getTypes.setting_group_name == "THRESHOLD_VARIANCE" || this.state.getTypes.setting_group_name == "THRESHOLD_CONTROL") { } else if (this.state.getTypes.setting_group_name == "THRESHOLD_VARIANCE" || this.state.getTypes.setting_group_name == "THRESHOLD_CONTROL") {
if (R.isEmpty(data.minValue)) { if (R.isEmpty(data.minValue)) {
} else { } else {
if (data.minValue.match(minMaxValidasi.minMaxRegex) && data.minValue.substring(0, 1) != "0" && data.minValue.length <= minMaxValidasi.minLength) { if (data.minValue.match(minMaxValidasi.minMaxRegex) && (this.state.getTypes.setting_group_name != "THRESHOLD_CONTROL" ? data.minValue.substring(0,1) != "0" : true ) && (this.state.getTypes.setting_group_name != "THRESHOLD_CONTROL" ? data.minValue.length <= minMaxValidasi.minLength : true )) {
if (R.isEmpty(data.maxValue)) { if (R.isEmpty(data.maxValue)) {
} else { } else {
if (data.maxValue.match(minMaxValidasi.minMaxRegex) && data.maxValue.substring(0, 1) != "0" && data.maxValue.length <= minMaxValidasi.maxLength) { if (data.maxValue.match(minMaxValidasi.minMaxRegex) && (this.state.getTypes.setting_group_name != "THRESHOLD_CONTROL" ? data.maxValue.substring(0,1) != "0" : true ) && (this.state.getTypes.setting_group_name != "THRESHOLD_CONTROL" ? data.maxValue.length <= minMaxValidasi.maxLength : true )) {
this.updateParameter() this.updateParameter()
} }
} }
...@@ -1104,10 +1104,10 @@ export default class CreateParameter extends Component { ...@@ -1104,10 +1104,10 @@ export default class CreateParameter extends Component {
}) })
break break
case "THRESHOLD_CONTROL": case "THRESHOLD_CONTROL":
this.setState({ errorMinValue: true, msgErrorMinValue: 'Incorrect min value format, example : 99999999' }) this.setState({ errorMinValue: true, msgErrorMinValue: 'Incorrect min value format, example : -99999999' })
break break
case "THRESHOLD_VARIANCE": case "THRESHOLD_VARIANCE":
this.setState({ errorMinValue: true, msgErrorMinValue: 'Incorrect min value format, example : 99999999' }) this.setState({ errorMinValue: true, msgErrorMinValue: 'Incorrect min value format, example : -99999999' })
break break
default: default:
this.setState({ errorMinValue: false, msgErrorMinValue: '' }) this.setState({ errorMinValue: false, msgErrorMinValue: '' })
...@@ -1191,7 +1191,7 @@ export default class CreateParameter extends Component { ...@@ -1191,7 +1191,7 @@ export default class CreateParameter extends Component {
} }
break break
case "THRESHOLD_CONTROL": case "THRESHOLD_CONTROL":
obj = { minMaxRegex: (/-?\d+(\.?\d+)?$/), minLength: this.state.minValue.length, maxLength: this.state.maxValue.length } obj = { minMaxRegex: (/^-?\d+(\.\d+)?$/), minLength: this.state.minValue.length, maxLength: this.state.maxValue.length }
break break
default: default:
obj = { regexValue: null, minLength: 11, maxLength: 11 } obj = { regexValue: null, minLength: 11, maxLength: 11 }
...@@ -1211,9 +1211,6 @@ export default class CreateParameter extends Component { ...@@ -1211,9 +1211,6 @@ export default class CreateParameter extends Component {
} }
validasiCurrencyTC(){ validasiCurrencyTC(){
console.log(this.state.getThresholdCurrency)
console.log(this.state.errorThresholdCurrency)
console.log(this.state.msgErrorThresholdCurrency)
if (R.isNil(this.state.getThresholdCurrency)){ if (R.isNil(this.state.getThresholdCurrency)){
this.setState({ errorThresholdCurrency: true, msgErrorThresholdCurrency: 'Currency Cannot be Empty' }) this.setState({ errorThresholdCurrency: true, msgErrorThresholdCurrency: 'Currency Cannot be Empty' })
} }
...@@ -1234,7 +1231,7 @@ export default class CreateParameter extends Component { ...@@ -1234,7 +1231,7 @@ export default class CreateParameter extends Component {
this.validasiCurrencyTC() this.validasiCurrencyTC()
} }
}else { }else {
if (data.maxValue.match(minMaxValidasi.minMaxRegex) && (this.state.getTypes.setting_group_name != "THRESHOLD_CONTROL" ? data.maxValue.substring(0,1) != "0" : true ) && data.maxValue.length <= minMaxValidasi.maxLength) { if (data.maxValue.match(minMaxValidasi.minMaxRegex) && (this.state.getTypes.setting_group_name != "THRESHOLD_CONTROL" ? data.maxValue.substring(0,1) != "0" : true ) && (this.state.getTypes.setting_group_name != "THRESHOLD_CONTROL" ? data.maxValue.length <= minMaxValidasi.maxLength : true ) ) {
this.validasiCurrencyTC() this.validasiCurrencyTC()
} else { } else {
this.validasiMaxResponse() this.validasiMaxResponse()
...@@ -1268,7 +1265,7 @@ export default class CreateParameter extends Component { ...@@ -1268,7 +1265,7 @@ export default class CreateParameter extends Component {
this.validasiFormatData() this.validasiFormatData()
} }
}else { }else {
if(data.minValue.match(minMaxValidasi.minMaxRegex) && (this.state.getTypes.setting_group_name != "THRESHOLD_CONTROL" ? data.minValue.substring(0,1) != "0" : true ) && data.minValue.length <= minMaxValidasi.minLength){ if(data.minValue.match(minMaxValidasi.minMaxRegex) && (this.state.getTypes.setting_group_name != "THRESHOLD_CONTROL" ? data.minValue.substring(0,1) != "0" : true ) && (this.state.getTypes.setting_group_name != "THRESHOLD_CONTROL" ? data.minValue.length <= minMaxValidasi.minLength : true )){
this.validasiFormatData() this.validasiFormatData()
} else { } else {
this.validasiMinResponse() this.validasiMinResponse()
......
...@@ -2311,7 +2311,8 @@ export default class MonthlyReport extends Component { ...@@ -2311,7 +2311,8 @@ export default class MonthlyReport extends Component {
"report_id": selectReport, "report_id": selectReport,
"month": month ? String(month.month_id).toString() : "", "month": month ? String(month.month_id).toString() : "",
"quartal": "", "quartal": "",
"type_report_name": "Monthly Report" "type_report_name": "Monthly Report",
"currency_id" : defaultCurrency.id
} }
console.log(payload); console.log(payload);
api.create().createDownloadFile(payload).then((response) => { api.create().createDownloadFile(payload).then((response) => {
......
...@@ -658,7 +658,8 @@ export default class OperatingIndicator extends Component { ...@@ -658,7 +658,8 @@ export default class OperatingIndicator extends Component {
"report_id": selectReport, "report_id": selectReport,
"month": "", "month": "",
"quartal": "", "quartal": "",
"type_report_name": "Operating Indicator" "type_report_name": "Operating Indicator",
"currency_id" : defaultCurrency.id
} }
console.log(payload); console.log(payload);
api.create().createDownloadFile(payload).then((response) => { api.create().createDownloadFile(payload).then((response) => {
......
...@@ -1545,7 +1545,8 @@ export default class OutlookPA extends Component { ...@@ -1545,7 +1545,8 @@ export default class OutlookPA extends Component {
"report_id": selectReport, "report_id": selectReport,
"month": "", "month": "",
"quartal": "", "quartal": "",
"type_report_name": "Outlook PA" "type_report_name": "Outlook PA",
"currency_id" : defaultCurrency.id
} }
console.log(payload); console.log(payload);
api.create().createDownloadFile(payload).then((response) => { api.create().createDownloadFile(payload).then((response) => {
......
...@@ -1560,7 +1560,8 @@ export default class RollingOutlook extends Component { ...@@ -1560,7 +1560,8 @@ export default class RollingOutlook extends Component {
"report_id": selectReport, "report_id": selectReport,
"month": "", "month": "",
"quartal": quarter ? quarter.value : "", "quartal": quarter ? quarter.value : "",
"type_report_name": "Rolling Outlook" "type_report_name": "Rolling Outlook",
"currency_id" : defaultCurrency.id
} }
console.log(payload); console.log(payload);
api.create().createDownloadFile(payload).then((response) => { api.create().createDownloadFile(payload).then((response) => {
......
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