Commit 2156322c authored by fahrur huzain's avatar fahrur huzain

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

update popup information

See merge request !2050
parents 369c4090 6f3ef048
......@@ -702,33 +702,33 @@ export default class CreateParameter extends Component {
} else {
switch (this.state.getParameter.setting_type_name) {
case "MASTER_BUDGET":
this.setState({errorValue: true, msgErrorValue: 'format value salah, contoh : 2023'})
this.setState({errorValue: true, msgErrorValue: 'Incorrect value format, example : 2023'})
break
case "MONTHLY_REPORT":
this.setState({
errorValue: true,
msgErrorValue: 'format value salah, contoh : Jan 2023'
msgErrorValue: 'Incorrect value format, example : Jan 2023'
})
break
case "OUTLOOK_Q1":
this.setState({errorValue: true, msgErrorValue: 'format value salah, contoh : Q1 2023'})
this.setState({errorValue: true, msgErrorValue: 'Incorrect value format, example : Q1 2023'})
break
case "OUTLOOK_Q2":
this.setState({errorValue: true, msgErrorValue: 'format value salah, contoh : Q2 2023'})
this.setState({errorValue: true, msgErrorValue: 'Incorrect value format, example : Q2 2023'})
break
case "OUTLOOK_Q3":
this.setState({errorValue: true, msgErrorValue: 'format value salah, contoh : Q3 2023'})
this.setState({errorValue: true, msgErrorValue: 'Incorrect value format, example : Q3 2023'})
break
case "OUTLOOK_PA":
this.setState({errorValue: true, msgErrorValue: 'format value salah, contoh : 2023'})
this.setState({errorValue: true, msgErrorValue: 'Incorrect value format, example : 2023'})
break
default:
this.setState({errorValue: true, msgErrorValue: 'format value salah, contoh : 2023'})
this.setState({errorValue: true, msgErrorValue: 'Incorrect value format, example : 2023'})
}
}
}
} else if (this.state.getTypes.setting_group_name == "CURRENCY") {
this.setState({errorValue: true, msgErrorValue: 'format value salah, contoh : 15000'})
this.setState({errorValue: true, msgErrorValue: 'Incorrect value format, example : 15000'})
}
}
}
......@@ -737,6 +737,7 @@ export default class CreateParameter extends Component {
let data = await this.validasiValueData()
let response = await this.validasiRegexValue()
let minMaxValidasi = await this.validasiMinMaxValue()
console.log("Masuk ke menu creat : " + R.isNil(this.state.getFormatData))
if (this.props.type === "edit"){
if (R.isNil(this.state.getTypes)) {
} else {
......@@ -746,6 +747,7 @@ export default class CreateParameter extends Component {
if (R.isNil(this.state.getPerusahaan)){
}else {
if (R.isNil(this.state.getFormatData)){
}else {
this.updateParameterCurrebcyMoneyFormat()
}
}
......@@ -817,9 +819,7 @@ export default class CreateParameter extends Component {
}else {
if (R.isNil(this.state.getPerusahaan)){
}else {
if (R.isNil(this.state.getFormatData)){
this.updateParameter()
}
this.updateParameter()
}
}
}
......@@ -832,7 +832,9 @@ export default class CreateParameter extends Component {
}else {
if (R.isNil(this.state.getPerusahaan)){
}else {
console.log()
if (R.isNil(this.state.getFormatData)){
}else {
this.createParameterCurrebcyMoneyFormat()
}
}
......@@ -904,9 +906,7 @@ export default class CreateParameter extends Component {
}else {
if (R.isNil(this.state.getPerusahaan)){
}else {
if (R.isNil(this.state.getFormatData)){
this.createParameter()
}
this.createParameter()
}
}
}
......@@ -956,7 +956,7 @@ export default class CreateParameter extends Component {
obj = { regexValue: (/Q3\s\d{4}/), valueLength: 7 }
break
case "OUTLOOK_PA":
obj = { regexValue: (/Q1\s\d{4}/), valueLength: 7 }
obj = { regexValue: (/\b\d{4}\b/), valueLength: 4 }
break
default:
obj = { regexValue: (/Q1\s\d{4}/), valueLength: 7 }
......@@ -974,20 +974,20 @@ export default class CreateParameter extends Component {
case "REPORT_SUBMIT_PERIOD":
this.setState({
errorMaxValue: true,
msgErrorMaxValue: 'format max value salah, contoh : 31 Jan 2023'
msgErrorMaxValue: 'Incorrect max value format, example : 31 Jan 2023'
})
break
case "CURRENCY":
this.setState({
errorMaxValue: true,
msgErrorMaxValue: 'format max value salah, contoh : 31 Jan 2023'
msgErrorMaxValue: 'Incorrect max value format, example : 31 Jan 2023'
})
break
case "THRESHOLD_CONTROL":
this.setState({ errorMaxValue: true, msgErrorMaxValue: 'format max value salah, contoh : 99999999' })
this.setState({ errorMaxValue: true, msgErrorMaxValue: 'Incorrect max value format, example : 99999999' })
break
case "THRESHOLD_VARIANCE":
this.setState({ errorMaxValue: true, msgErrorMaxValue: 'format max value salah, contoh : 99999999' })
this.setState({ errorMaxValue: true, msgErrorMaxValue: 'Incorrect max value format, example : 99999999' })
break
default:
this.setState({ errorMaxValue: false, msgErrorMaxValue: '' })
......@@ -1002,20 +1002,20 @@ export default class CreateParameter extends Component {
case "REPORT_SUBMIT_PERIOD":
this.setState({
errorMinValue: true,
msgErrorMinValue: 'format min value salah, contoh : 1 Jan 2023'
msgErrorMinValue: 'Incorrect min value format, example : 1 Jan 2023'
})
break
case "CURRENCY":
this.setState({
errorMinValue: true,
msgErrorMinValue: 'format min value salah, contoh : 1 Jan 2023'
msgErrorMinValue: 'Incorrect min value format, example : 1 Jan 2023'
})
break
case "THRESHOLD_CONTROL":
this.setState({ errorMinValue: true, msgErrorMinValue: 'format min value salah, contoh : 99999999' })
this.setState({ errorMinValue: true, msgErrorMinValue: 'Incorrect min value format, example : 99999999' })
break
case "THRESHOLD_VARIANCE":
this.setState({ errorMinValue: true, msgErrorMinValue: 'format min value salah, contoh : 99999999' })
this.setState({ errorMinValue: true, msgErrorMinValue: 'Incorrect min value format, example : 99999999' })
break
default:
this.setState({ errorMinValue: false, msgErrorMinValue: '' })
......
......@@ -79,15 +79,15 @@ export default class PopUpInformation extends Component {
reportName(){
if (this.props.reportName == "MASTER_BUDGET"){
return "master budget"
return "Master Budget"
} else if (this.props.reportName == "OUTLOOK_Q1"){
return "rolling outlook"
return "Rolling Outlook"
} else if (this.props.reportName == "OUTLOOK_Q2"){
return "rolling outlook"
return "Rolling Outlook"
} else if (this.props.reportName == "OUTLOOK_Q3"){
return "rolling outlook"
return "Rolling Outlook"
} else if (this.props.reportName == "OUTLOOK_PA"){
return "outlook PA"
return "Outlook PA"
}
}
......@@ -99,12 +99,12 @@ export default class PopUpInformation extends Component {
if (this.props.reportName == "MONTHLY_REPORT"){
return (
<div className="test app-popup-show">
<div className="popup-content border-radius" style={{ background: '#FFF27D', borderRadius: 10, width: 600, height: 550 }}>
<div className="popup-content border-radius" style={{ background: '#FFF27D', borderRadius: 10, width: 530, height: 520 }}>
<div style={{ margin: 30 }}>
<div style={{ display: 'grid', justifyContent: 'center', marginTop: 20, paddingBottom: 20 }}>
<span style={{ textAlign: 'center', fontSize: 14, fontWeight: 'bold', color: '#1D2995', fontFamily: 'Nunito Sans, sans-serif' }}>
{this.namaJudul()}
</span>
<div style={{ justifyContent: 'center', fontSize: 20, color: '#1D2995', fontFamily: 'Nunito Sans, sans-serif' }}>
<b>Format max-min value</b> Monthly Report:
</div>
</div>
<div className="border-top grid grid-2x" >
<div className="column-1" style={{ alignSelf: 'center', width: 70 }}>
......@@ -116,16 +116,13 @@ export default class PopUpInformation extends Component {
}}/>
</div>
<div className="column-2" style={{ display: 'grid', justifyContent: 'center', marginTop: 20, marginLeft: 20, paddingBottom: 20, width: 400 }}>
<div style={{ justifyContent: 'center', fontSize: 14, color: '#1D2995', fontFamily: 'Nunito Sans, sans-serif' }}>
<div style={{ justifyContent: 'center', fontSize: 12, color: '#1D2995', fontFamily: 'Nunito Sans, sans-serif' }}>
Please enter the date in the following format: <b>'dd MMM YYYY.'</b>
</div>
<div style={{ justifyContent: 'center', fontSize: 14, color: '#1D2995', fontFamily: 'Nunito Sans, sans-serif' }}>
<div style={{ justifyContent: 'center', fontSize: 12, color: '#1D2995', fontFamily: 'Nunito Sans, sans-serif' }}>
For example, 1 Jan 2023.
</div>
<div style={{ justifyContent: 'center', fontSize: 14, color: '#1D2995', fontFamily: 'Nunito Sans, sans-serif' }}>
<b>format max-min value</b> Monthly Report:
</div>
<div className="grid grid-3x" >
<div className="grid grid-3x" style={{marginTop: 10}}>
<div className="column-1" style={{ justifyContent: 'center', fontSize: 14, width: 40, color: '#1D2995', fontFamily: 'Nunito Sans, sans-serif' }}>
Jan:
</div>
......@@ -276,12 +273,12 @@ export default class PopUpInformation extends Component {
}else {
return (
<div className="test app-popup-show">
<div className="popup-content border-radius" style={{ background: '#FFF27D', borderRadius: 10, width: 500, height: (this.props.reportName == "MASTER_BUDGET") || (this.props.reportName=="OUTLOOK_PA") ? 300 : 350 }}>
<div style={{ margin: 30 }}>
<div className="popup-content border-radius" style={{ background: '#FFF27D', borderRadius: 10, width: 460, height: (this.props.reportName == "MASTER_BUDGET") || (this.props.reportName=="OUTLOOK_PA") ? 250 : 300 }}>
<div style={{ margin: 15 }}>
<div style={{ display: 'grid', justifyContent: 'center', marginTop: 20, paddingBottom: 20 }}>
<span style={{ textAlign: 'center', fontSize: 14, fontWeight: 'bold', color: '#1D2995', fontFamily: 'Nunito Sans, sans-serif' }}>
{this.namaJudul()}
</span>
<div style={{ justifyContent: 'center', fontSize: 20, color: '#1D2995', fontFamily: 'Nunito Sans, sans-serif' }}>
<b>Format max-min value</b> <span>{this.reportName()}</span> :
</div>
</div>
<div className="border-top grid grid-2x" >
<div className="column-1" style={{ alignSelf: 'center', width: 70 }}>
......@@ -293,23 +290,20 @@ export default class PopUpInformation extends Component {
}}/>
</div>
<div className="column-2" style={{ display: 'grid', justifyContent: 'center', marginTop: 20, paddingBottom: 20, width: 350 }}>
<div style={{ justifyContent: 'center', fontSize: 14, color: '#1D2995', fontFamily: 'Nunito Sans, sans-serif' }}>
<div style={{ justifyContent: 'center', fontSize: 12, color: '#1D2995', fontFamily: 'Nunito Sans, sans-serif' }}>
Please enter the date in the following format: <b>'dd MMM YYYY.'</b>
</div>
<div style={{ justifyContent: 'center', fontSize: 14, color: '#1D2995', fontFamily: 'Nunito Sans, sans-serif' }}>
<div style={{ justifyContent: 'center', fontSize: 12, color: '#1D2995', fontFamily: 'Nunito Sans, sans-serif' }}>
For example, 1 Jan 2023.
</div>
<div style={{ justifyContent: 'center', fontSize: 14, color: '#1D2995', fontFamily: 'Nunito Sans, sans-serif' }}>
<b>format max-min value</b> <span>{this.reportName()}</span> :
</div>
<div style={{ justifyContent: 'center', fontSize: 14, color: '#1D2995', fontFamily: 'Nunito Sans, sans-serif' }}>
<div style={{ justifyContent: 'center', fontSize: 14, marginTop: 10, color: '#1D2995', fontFamily: 'Nunito Sans, sans-serif' }}>
Min Value : <span>{this.minValue()}</span>
</div>
<div style={{ justifyContent: 'center', fontSize: 14, color: '#1D2995', paddingBottom: 5, fontFamily: 'Nunito Sans, sans-serif' }}>
<div style={{ justifyContent: 'center', fontSize: 14, color: '#1D2995', fontFamily: 'Nunito Sans, sans-serif' }}>
Max Value : <span>{this.maxValue()}</span>
</div>
{this.state.notes &&
<div style={{ justifyContent: 'center', fontSize: 12, color: '#1D2995', fontFamily: 'Nunito Sans, sans-serif' }}>
<div style={{ justifyContent: 'center', fontSize: 12, color: '#1D2995', paddingTop: 5, fontFamily: 'Nunito Sans, sans-serif' }}>
Note: The actual maximum value <span>{this.notesMessage()}</span>
</div>
}
......
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