Commit eea62381 authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into deni-dev(pc)

parents d3edbf34 09451156
......@@ -41,7 +41,7 @@ class ForgotPassword extends Component {
if (this.state.email.trim() == "") {
this.setState({ errorEmail: true, msgEmail: 'Email Cannot be Empty.' })
} else if (!isEmail) {
this.setState({ errorEmail: true, msgEmail: 'Email format is not correct.' })
this.setState({ errorEmail: true, msgEmail: 'Email Format is Not Correct.' })
} else {
this.verification()
}
......
......@@ -77,7 +77,7 @@ class Login extends Component {
if (this.state.email.trim() == "") {
this.setState({ errorEmail: true, msgEmail: 'Email Cannot be Empty.' })
} else if (!isEmail) {
this.setState({ errorEmail: true, msgEmail: 'Email format is not correct.' })
this.setState({ errorEmail: true, msgEmail: 'Email Format is Not Correct.' })
} else if (this.state.password.trim() == "") {
this.setState({ errorPassword: true, msgPassword: 'Password Cannot be Empty.' })
} else {
......
......@@ -147,32 +147,32 @@ export default class CreateReportItems extends Component {
validasi() {
// alert('coba ya')
if (R.isNil(this.state.reportType)) {
this.setState({errorJenisLaporan: true, msgErrorJenisLaporan: 'Report type cannot be empty.'})
this.setState({errorJenisLaporan: true, msgErrorJenisLaporan: 'Report Type Cannot be Empty.'})
} else if (R.isNil(this.state.company)){
this.setState({ errorPerusahaan: true, msgErrorPerusahaan: 'Company name cannot be empty.'})
this.setState({ errorPerusahaan: true, msgErrorPerusahaan: 'Company Name Cannot be Empty.'})
} else if (R.isEmpty(this.state.order)) {
this.setState({ errorOrder: true, msgErrorOrder: 'Order cannot be empty.' })
this.setState({ errorOrder: true, msgErrorOrder: 'Order Cannot be Empty.' })
}
else if (R.isEmpty(this.state.description)) {
this.setState({ errorDesc: true, msgErrorDesc: 'Description cannot be empty.' })
this.setState({ errorDesc: true, msgErrorDesc: 'Description Cannot be Empty.' })
}
else if (R.isNil(this.state.InputType)) {
this.setState({ errorTipeData: true, msgErrorTipeData: 'Data type cannot be empty.' })
this.setState({ errorTipeData: true, msgErrorTipeData: 'Data Type Cannot be Empty.' })
}
else if (this.state.disabledFormula === false && R.isEmpty(this.state.formula)) {
this.setState({ errorFormula: true, msgErrorFormula: 'Formula cannot be empty.' })
this.setState({ errorFormula: true, msgErrorFormula: 'Formula Cannot be Empty.' })
}
else if (this.state.disabledValue === false && R.isEmpty(this.state.realVal)) {
this.setState({ errorRV: true, msgErrorRV: 'True value cannot be empty.' })
this.setState({ errorRV: true, msgErrorRV: 'True Value Cannot be Empty.' })
}
else if (this.state.disabledCondt === false && R.isEmpty(this.state.condition)) {
this.setState({ errorCondition: true, msgErrorCondition: 'False condition cannot be empty.' })
this.setState({ errorCondition: true, msgErrorCondition: 'False Condition Cannot be Empty.' })
}
else if (R.isNil(this.state.startDate)) {
this.setState({ errorStartDate: true, msgErrorSD: 'Valid From cannot be empty.' })
this.setState({ errorStartDate: true, msgErrorSD: 'Valid From Cannot be Empty.' })
}
else if (R.isNil(this.state.endDate)) {
this.setState({ errorEndDate: true, msgErrorED: 'Valid To cannot be empty.' })
this.setState({ errorEndDate: true, msgErrorED: 'Valid To Cannot be Empty.' })
}
else {
this.addReportItems()
......
......@@ -128,25 +128,25 @@ export default class EditReportItems extends Component {
validasi() {
// alert('coba ya')
if (R.isNil(this.state.reportType)){
this.setState({errorJenisLaporan: true, msgErrorJenisLaporan: 'Report type cannot be empty.'})
this.setState({errorJenisLaporan: true, msgErrorJenisLaporan: 'Report Type Cannot be Empty.'})
} else if (R.isNil(this.state.company)){
this.setState({ errorPerusahaan: true, msgErrorPerusahaan: 'Company name cannot be empty.'})
this.setState({ errorPerusahaan: true, msgErrorPerusahaan: 'Company Name Cannot be Empty.'})
} else if (R.isEmpty(this.state.tempData.order)) {
this.setState({ errorOrder: true, msgErrorOrder: 'Order cannot be empty.' })
this.setState({ errorOrder: true, msgErrorOrder: 'Order Cannot be Empty.' })
} else if (R.isEmpty(this.state.tempData.description)) {
this.setState({ errorDesc: true, msgErrorDesc: 'Description cannot be empty.' })
this.setState({ errorDesc: true, msgErrorDesc: 'Description Cannot be Empty.' })
} else if (R.isNil(this.state.InputType)) {
this.setState({ errorTipeData: true, msgErrorTipeData: 'Data type cannot be empty.' })
this.setState({ errorTipeData: true, msgErrorTipeData: 'Data Type Cannot be Empty.' })
} else if ((this.state.InputType.type_item_report_name === 'Formula' && R.isEmpty(this.state.tempData.formula)) || (this.state.InputType.type_item_report_name === 'Validation' && R.isEmpty(this.state.tempData.formula))) {
this.setState({ errorFormula: true, msgErrorFormula: 'Formula cannot be empty.' })
this.setState({ errorFormula: true, msgErrorFormula: 'Formula Cannot be Empty.' })
} else if (this.state.InputType.type_item_report_name === 'Validation' && R.isEmpty(this.state.tempData.condition_it_should_be)) {
this.setState({ errorRV: true, msgErrorRV: 'True value cannot be empty.' })
this.setState({ errorRV: true, msgErrorRV: 'True Value Cannot be Empty.' })
} else if (this.state.InputType.type_item_report_name === 'Validation' && R.isNil(this.state.tempData.condition_if_wrong)) {
this.setState({ errorCondition: true, msgErrorCondition: 'False condition cannot be empty.' })
this.setState({ errorCondition: true, msgErrorCondition: 'False Condition Cannot be Empty.' })
} else if (R.isNil(this.state.tempData.start_date)) {
this.setState({ errorStartDate: true, msgErrorSD: 'Valid From cannot be empty.' })
this.setState({ errorStartDate: true, msgErrorSD: 'Valid From Cannot be Empty.' })
} else if (R.isNil(this.state.tempData.end_date)) {
this.setState({ errorEndDate: true, msgErrorED: 'Valid To cannot be empty.' })
this.setState({ errorEndDate: true, msgErrorED: 'Valid To Cannot be Empty.' })
} else {
this.updateReportItems()
}
......
......@@ -36,9 +36,9 @@ export default class Profile extends Component {
errorOldPassword: false,
errorPassword: false,
errorConfirmPassword: false,
msgOldPassword: 'Consists of 8 characters with a combination of numbers.',
msgPassword: 'Consists of 8 characters with a combination of numbers.',
msgConfirmPassword: 'Consists of 8 characters with a combination of numbers.',
msgOldPassword: 'Consists of 8 Characters with a Combination of Numbers.',
msgPassword: 'Consists of 8 Characters with a Combination of Numbers.',
msgConfirmPassword: 'Consists of 8 Characters with a Combination of Numbers.',
company: [],
listCompany: [],
selectedIndex: 0,
......@@ -68,41 +68,35 @@ export default class Profile extends Component {
this.setState({ ...data, [e.target.name]: e.target.value })
console.log(e.target.name);
if (e.target.name == "password") {
this.setState({ errorPassword: false, msgPassword: 'Consists of 8 characters with a combination of numbers.' })
this.setState({ errorPassword: false, msgPassword: 'Consists of 8 Characters with a Combination of Numbers.' })
} else if (e.target.name == "confirmPassword") {
this.setState({ errorConfirmPassword: false, msgConfirmPassword: 'Consists of 8 characters with a combination of numbers.' })
this.setState({ errorConfirmPassword: false, msgConfirmPassword: 'Consists of 8 Characters with a Combination of Numbers.' })
} else if (e.target.name == "oldPassword") {
this.setState({ errorOldPassword: false, msgOldPassword: 'Consists of 8 characters with a combination of numbers.' })
this.setState({ errorOldPassword: false, msgOldPassword: 'Consists of 8 Characters with a Combination of Numbers.' })
}
}
validasi() {
if (this.state.oldPassword == "") {
this.setState({ errorOldPassword: true, msgOldPassword: 'Old password Cannot be Empty.' })
this.setState({ errorOldPassword: true, msgOldPassword: 'Old Password Cannot be Empty.' })
} else if (this.state.oldPassword.length < 8) {
this.setState({ errorOldPassword: true, msgOldPassword: 'Old password minimum 8 characters.' })
this.setState({ errorOldPassword: true, msgOldPassword: 'Old Password Minimum 8 Characters.' })
} else if (this.isEmail(this.state.oldPassword)) {
this.setState({ errorOldPassword: true, msgOldPassword: 'Old password format should not use email.' })
this.setState({ errorOldPassword: true, msgOldPassword: 'Old Password Format Should Not Use Email.' })
} else if (!this.isRegex(this.state.oldPassword)) {
this.setState({ errorOldPassword: true, msgOldPassword: 'Old password must be a combination of characters, letters and numbers.' })
this.setState({ errorOldPassword: true, msgOldPassword: 'Old Password Must be a Combination of Characters, Letters and Numbers.' })
} else if (this.state.password.trim() == "") {
this.setState({ errorPassword: true, msgPassword: 'Password Cannot be Empty.' })
} else if (this.state.password.length < 8) {
this.setState({ errorPassword: true, msgPassword: 'Password minimum 8 characters.' })
this.setState({ errorPassword: true, msgPassword: 'Password Minimum 8 Characters.' })
} else if (this.isEmail(this.state.password)) {
this.setState({ errorPassword: true, msgPassword: 'Password format should not use email.' })
this.setState({ errorPassword: true, msgPassword: 'Password Format Should Not Use Email.' })
} else if (!this.isRegex(this.state.password)) {
this.setState({ errorPassword: true, msgPassword: 'Password must be a combination of characters, letters and numbers.' })
this.setState({ errorPassword: true, msgPassword: 'Password Must be a Combination of Characters, Letters and Numbers.' })
} else if (this.state.confirmPassword.trim() == "") {
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'Password confirmation Cannot be Empty.' })
} else if (this.state.confirmPassword.length < 8) {
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'Password confirmation of at least 8 characters.' })
} else if (this.isEmail(this.state.confirmPassword)) {
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'Password confirmation format should not use email.' })
} else if (!this.isRegex(this.state.confirmPassword)) {
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'Password confirmation must be a combination of characters, letters and numbers.' })
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'Password Confirmation Cannot be Empty.' })
} else if (this.state.password !== this.state.confirmPassword) {
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'Confirmation password must match the password.' })
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'Password Does Not Match.' })
} else {
this.confirmPassword()
}
......
......@@ -20,8 +20,8 @@ class ResetPassword extends Component {
showPass2: false,
errorPassword: false,
errorConfirmPassword: false,
msgPassword: 'Consists of 8 characters with a combination of numbers.',
msgConfirmPassword: 'Consists of 8 characters with a combination of numbers.',
msgPassword: 'Consists of 8 Characters with a Combination of Numbers.',
msgConfirmPassword: 'Consists of 8 Characters with a Combination of Numbers.',
userId: 0,
alert: false,
tipeAlert: '',
......@@ -70,19 +70,13 @@ class ResetPassword extends Component {
if (this.state.password.trim() == "") {
this.setState({ errorPassword: true, msgPassword: 'New Password Cannot be Empty.' })
} else if (this.state.password.length < 8) {
this.setState({ errorPassword: true, msgPassword: 'New Password minimum 8 characters.' })
this.setState({ errorPassword: true, msgPassword: 'New Password Minimum 8 Characters.' })
} else if (this.isEmail(this.state.password)) {
this.setState({ errorPassword: true, msgPassword: 'New Password format should not use email.' })
this.setState({ errorPassword: true, msgPassword: 'New Password Format Should Not Use Email.' })
} else if (!this.isRegex(this.state.password)) {
this.setState({ errorPassword: true, msgPassword: 'New Password must be a combination of characters, letters and numbers.' })
this.setState({ errorPassword: true, msgPassword: 'New Password Must be a Combination of Characters, Letters and Numbers.' })
} else if (this.state.confirmPassword.trim() == "") {
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'Password Confirmation Cannot be Empty.' })
} else if (this.state.confirmPassword.length < 8) {
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'Password Confirmation minimum 8 characters.' })
} else if (this.isEmail(this.state.confirmPassword)) {
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'Password confirmation format should not use email.' })
} else if (!this.isRegex(this.state.confirmPassword)) {
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'Password confirmation must be a combination of characters, letters and numbers.' })
} else if (this.state.password !== this.state.confirmPassword) {
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'Password Does Not Match.' })
} else {
......@@ -125,9 +119,9 @@ class ResetPassword extends Component {
let data = this.state
this.setState({ ...data, [e.target.name]: e.target.value })
if (e.target.name == "password") {
this.setState({ errorPassword: false, msgPassword: 'Password consists of 8 characters with a combination of numbers.' })
this.setState({ errorPassword: false, msgPassword: 'Consists of 8 Characters with a Combination of Numbers.' })
} else if (e.target.name == "confirmPassword") {
this.setState({ errorConfirmPassword: false, msgConfirmPassword: 'Password Confirmation consists of 8 characters with a combination of numbers.' })
this.setState({ errorConfirmPassword: false, msgConfirmPassword: 'Consists of 8 Characters with a Combination of Numbers.' })
}
}
......
......@@ -20,8 +20,8 @@ class SetPassword extends Component {
showPass2: false,
errorPassword: false,
errorConfirmPassword: false,
msgPassword: 'Consists of 8 characters with a combination of numbers.',
msgConfirmPassword: 'Consists of 8 characters with a combination of numbers.',
msgPassword: 'Consists of 8 Characters with a Combination of Numbers.',
msgConfirmPassword: 'Consists of 8 Characters with a Combination of Numbers.',
userId: 0,
alert: false,
tipeAlert: '',
......@@ -70,19 +70,13 @@ class SetPassword extends Component {
if (this.state.password.trim() == "") {
this.setState({ errorPassword: true, msgPassword: 'New Password Cannot be Empty.' })
} else if (this.state.password.length < 8) {
this.setState({ errorPassword: true, msgPassword: 'New Password minimum 8 characters.' })
this.setState({ errorPassword: true, msgPassword: 'New Password Minimum 8 Characters.' })
} else if (this.isEmail(this.state.password)) {
this.setState({ errorPassword: true, msgPassword: 'New Password format should not use email.' })
this.setState({ errorPassword: true, msgPassword: 'New Password Format Should Not Use Email.' })
} else if (!this.isRegex(this.state.password)) {
this.setState({ errorPassword: true, msgPassword: 'New Password must be a combination of characters, letters and numbers.' })
this.setState({ errorPassword: true, msgPassword: 'New Password Must be a Combination of Characters, Letters and Numbers.' })
} else if (this.state.confirmPassword.trim() == "") {
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'Password Confirmation Cannot be Empty.' })
} else if (this.state.confirmPassword.length < 8) {
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'Password Confirmation minimum 8 characters.' })
} else if (this.isEmail(this.state.confirmPassword)) {
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'Password confirmation format should not use email.' })
} else if (!this.isRegex(this.state.confirmPassword)) {
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'Password confirmation must be a combination of characters, letters and numbers.' })
} else if (this.state.password !== this.state.confirmPassword) {
this.setState({ errorConfirmPassword: true, msgConfirmPassword: 'Password Does Not Match.' })
} else {
......@@ -125,9 +119,9 @@ class SetPassword extends Component {
let data = this.state
this.setState({ ...data, [e.target.name]: e.target.value })
if (e.target.name == "password") {
this.setState({ errorPassword: false, msgPassword: 'Password consists of 8 characters with a combination of numbers.' })
this.setState({ errorPassword: false, msgPassword: 'Consists of 8 Characters with a Combination of Numbers.' })
} else if (e.target.name == "confirmPassword") {
this.setState({ errorConfirmPassword: false, msgConfirmPassword: 'Password Confirmation consists of 8 characters with a combination of numbers.' })
this.setState({ errorConfirmPassword: false, msgConfirmPassword: 'Consists of 8 Characters with a Combination of Numbers.' })
}
}
......
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