Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Tia-dev
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dida Adams Arizona
Tia-dev
Commits
48e65be2
Commit
48e65be2
authored
Sep 09, 2020
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'riri' into 'master'
titik See merge request
!273
parents
6bceff12
ecd7b8bb
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
72 additions
and
72 deletions
+72
-72
ForgotPassword.js
src/container/ForgotPassword.js
+2
-2
Login.js
src/container/Login.js
+3
-3
CreateParameter.js
src/container/MasterData/Parameter/CreateParameter.js
+16
-16
CreatePerusahaan.js
src/container/MasterData/Perusahaan/CreatePerusahaan.js
+5
-5
CreateReportItems.js
...container/MasterData/formReportItems/CreateReportItems.js
+10
-10
EditReportItems.js
src/container/MasterData/formReportItems/EditReportItems.js
+10
-10
CreateUnitBisnis.js
src/container/MasterData/formUnitBisnis/CreateUnitBisnis.js
+6
-6
ResetPassword.js
src/container/ResetPassword.js
+10
-10
SetPassword.js
src/container/SetPassword.js
+10
-10
No files found.
src/container/ForgotPassword.js
View file @
48e65be2
...
...
@@ -43,9 +43,9 @@ class ForgotPassword extends Component {
var
isEmail
=
this
.
isEmail
(
this
.
state
.
email
)
if
(
this
.
state
.
email
.
trim
()
==
""
)
{
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email Cannot be Empty
.
'
})
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email Cannot be Empty'
})
}
else
if
(
!
isEmail
)
{
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Please enter a valid email address
.
'
})
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Please enter a valid email address'
})
}
else
{
this
.
verification
()
}
...
...
src/container/Login.js
View file @
48e65be2
...
...
@@ -75,11 +75,11 @@ class Login extends Component {
validateLogin
()
{
var
isEmail
=
this
.
isEmail
(
this
.
state
.
email
)
if
(
this
.
state
.
email
.
trim
()
==
""
)
{
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email Cannot be Empty
.
'
})
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email Cannot be Empty'
})
}
else
if
(
!
isEmail
)
{
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Please enter a valid email address
.
'
})
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Please enter a valid email address'
})
}
else
if
(
this
.
state
.
password
.
trim
()
==
""
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password Cannot be Empty
.
'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password Cannot be Empty'
})
}
else
{
this
.
login
()
}
...
...
src/container/MasterData/Parameter/CreateParameter.js
View file @
48e65be2
...
...
@@ -423,25 +423,25 @@ export default class CreateParameter extends Component {
validasi
()
{
if
(
R
.
isNil
(
this
.
state
.
getTypes
))
{
this
.
setState
({
errorGroup
:
true
,
msgErrorGroup
:
'Group Cannot be Empty
.
'
})
this
.
setState
({
errorGroup
:
true
,
msgErrorGroup
:
'Group Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
getParameter
))
{
this
.
setState
({
errorParameter
:
true
,
msgErrorParameter
:
'Parameter Cannot be Empty
.
'
})
this
.
setState
({
errorParameter
:
true
,
msgErrorParameter
:
'Parameter Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
getPerusahaan
))
{
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company Cannot be Empty
.
'
})
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company Cannot be Empty'
})
// } else if (R.isEmpty(this.state.tempData.description)) {
// this.setState({ errorDeskripsi: true, msgErrorDeskripsi: 'Deskripsi tidak boleh kosong' })
}
else
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
value
)
&&
R
.
isEmpty
(
this
.
state
.
tempData
.
min_value
)
&&
R
.
isEmpty
(
this
.
state
.
tempData
.
max_value
))
{
this
.
setState
({
errorValue
:
true
,
msgErrorValue
:
'Value Cannot be Empty
.
'
})
this
.
setState
({
errorValue
:
true
,
msgErrorValue
:
'Value Cannot be Empty'
})
}
else
if
((
!
R
.
isEmpty
(
this
.
state
.
tempData
.
max_value
)
&&
R
.
isEmpty
(
this
.
state
.
tempData
.
min_value
)))
{
this
.
setState
({
errorMinValue
:
true
,
msgErrorMinValue
:
'Min Value Cannot be Empty
.
'
})
this
.
setState
({
errorMinValue
:
true
,
msgErrorMinValue
:
'Min Value Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
start_date
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Valid From Cannot be Empty
.
'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Valid From Cannot be Empty'
})
// } else if (R.isNil(this.state.tempData.order)) {
// this.setState({ errorOrder: true, msgErrorOrder: 'Order tidak boleh kosong' })
}
else
if
((
!
R
.
isEmpty
(
this
.
state
.
tempData
.
min_value
)
&&
R
.
isEmpty
(
this
.
state
.
tempData
.
max_value
)))
{
this
.
setState
({
errorMaxValue
:
true
,
msgErrorMaxValue
:
'Max Value Cannot be Empty
.
'
})
this
.
setState
({
errorMaxValue
:
true
,
msgErrorMaxValue
:
'Max Value Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
end_date
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty
.
'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
this
.
updateParameter
()
}
...
...
@@ -449,25 +449,25 @@ export default class CreateParameter extends Component {
validasiCreate
()
{
if
(
R
.
isNil
(
this
.
state
.
getTypes
))
{
this
.
setState
({
errorGroup
:
true
,
msgErrorGroup
:
'Group Cannot be Empty
.
'
})
this
.
setState
({
errorGroup
:
true
,
msgErrorGroup
:
'Group Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
getParameter
))
{
this
.
setState
({
errorParameter
:
true
,
msgErrorParameter
:
'Parameter Cannot be Empty
.
'
})
this
.
setState
({
errorParameter
:
true
,
msgErrorParameter
:
'Parameter Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
getPerusahaan
))
{
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company Cannot be Empty
.
'
})
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company Cannot be Empty'
})
// } else if (R.isEmpty(this.state.description)) {
// this.setState({ errorDeskripsi: true, msgErrorDeskripsi: 'Deskripsi tidak boleh kosong' })
}
else
if
((
R
.
isEmpty
(
this
.
state
.
value
)
&&
R
.
isEmpty
(
this
.
state
.
maxValue
)
&&
R
.
isEmpty
(
this
.
state
.
minValue
)))
{
this
.
setState
({
errorValue
:
true
,
msgErrorValue
:
'Value Cannot be Empty
.
'
})
this
.
setState
({
errorValue
:
true
,
msgErrorValue
:
'Value Cannot be Empty'
})
}
else
if
((
!
R
.
isEmpty
(
this
.
state
.
maxValue
)
&&
R
.
isEmpty
(
this
.
state
.
minValue
)))
{
this
.
setState
({
errorMinValue
:
true
,
msgErrorMinValue
:
'Min Value Cannot be Empty
.
'
})
this
.
setState
({
errorMinValue
:
true
,
msgErrorMinValue
:
'Min Value Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Valid From Cannot be Empty
.
'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Valid From Cannot be Empty'
})
// } else if (R.isNil(this.state.order)) {
// this.setState({ errorOrder: true, msgErrorOrder: 'Order tidak boleh kosong' })
}
else
if
((
!
R
.
isEmpty
(
this
.
state
.
minValue
)
&&
R
.
isEmpty
(
this
.
state
.
maxValue
)))
{
this
.
setState
({
errorMaxValue
:
true
,
msgErrorMaxValue
:
'Max Value Cannot be Empty
.
'
})
this
.
setState
({
errorMaxValue
:
true
,
msgErrorMaxValue
:
'Max Value Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty
.
'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
this
.
createParameter
()
}
...
...
src/container/MasterData/Perusahaan/CreatePerusahaan.js
View file @
48e65be2
...
...
@@ -262,15 +262,15 @@ export default class CreatePerusahaan extends Component {
validasiEdit
()
{
if
(
R
.
isEmpty
(
this
.
state
.
company
))
{
this
.
setState
({
errorNP
:
true
,
msgErrorNP
:
'Company Name Cannot be Empty
.
'
})
this
.
setState
({
errorNP
:
true
,
msgErrorNP
:
'Company Name Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
getPerusahaan
))
{
this
.
setState
({
errorPC
:
true
,
msgErrorPC
:
'Parent Company Cannot be Empty
.
'
})
this
.
setState
({
errorPC
:
true
,
msgErrorPC
:
'Parent Company Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
getTypes
))
{
this
.
setState
({
errorUB
:
true
,
msgErrorUB
:
'Business Unit Cannot be Empty
.
'
})
this
.
setState
({
errorUB
:
true
,
msgErrorUB
:
'Business Unit Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorSD
:
true
,
msgErrorSD
:
'Valid From Cannot be Empty
.
'
})
this
.
setState
({
errorSD
:
true
,
msgErrorSD
:
'Valid From Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorED
:
true
,
msgErrorED
:
'Valid To Cannot be Empty
.
'
})
this
.
setState
({
errorED
:
true
,
msgErrorED
:
'Valid To Cannot be Empty'
})
}
else
{
let
payload
=
{
"company_id"
:
this
.
state
.
companyID
,
...
...
src/container/MasterData/formReportItems/CreateReportItems.js
View file @
48e65be2
...
...
@@ -153,32 +153,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
()
...
...
src/container/MasterData/formReportItems/EditReportItems.js
View file @
48e65be2
...
...
@@ -135,25 +135,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
()
}
...
...
src/container/MasterData/formUnitBisnis/CreateUnitBisnis.js
View file @
48e65be2
...
...
@@ -124,11 +124,11 @@ export default class CreateUnitBisnis extends Component {
validasi
()
{
if
(
R
.
isEmpty
(
this
.
state
.
name
))
{
this
.
setState
({
errorName
:
true
,
msgErrorName
:
'Business Unit Cannot be Empty
.
'
})
this
.
setState
({
errorName
:
true
,
msgErrorName
:
'Business Unit Cannot be Empty'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Valid From Cannot be Empty
.
'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Valid From Cannot be Empty'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
endDate
)
||
this
.
state
.
endDate
===
null
)
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty
.
'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
let
payload
=
{
"business_unit_id"
:
this
.
state
.
id
,
...
...
@@ -142,11 +142,11 @@ export default class CreateUnitBisnis extends Component {
validasiCreate
()
{
if
(
R
.
isEmpty
(
this
.
state
.
name
))
{
this
.
setState
({
errorName
:
true
,
msgErrorName
:
'Business Unit Cannot be Empty
.
'
})
this
.
setState
({
errorName
:
true
,
msgErrorName
:
'Business Unit Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Valid From Cannot be Empty
.
'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Valid From Cannot be Empty'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty
.
'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Valid To Cannot be Empty'
})
}
else
{
let
payload
=
{
"business_unit_name"
:
this
.
state
.
name
,
...
...
src/container/ResetPassword.js
View file @
48e65be2
...
...
@@ -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
:
''
,
...
...
@@ -68,17 +68,17 @@ class ResetPassword extends Component {
validateReset
()
{
if
(
this
.
state
.
password
.
trim
()
==
""
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'New Password Cannot be Empty
.
'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'New Password Cannot be Empty'
})
}
else
if
(
this
.
state
.
password
.
length
<
8
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Invalid password. Minimum length : 8
.
'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Invalid password. Minimum length : 8'
})
}
else
if
(
this
.
isEmail
(
this
.
state
.
password
))
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Invalid password. Should not be same as Email Address
.
'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Invalid password. Should not be same as Email Address'
})
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
password
))
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Invalid password. Must using combination of characters, letters and numbers
.
'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Invalid password. Must using combination of characters, letters and numbers'
})
}
else
if
(
this
.
state
.
confirmPassword
.
trim
()
==
""
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Repeat Password Cannot be Empty
.
'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Repeat Password Cannot be Empty'
})
}
else
if
(
this
.
state
.
password
!==
this
.
state
.
confirmPassword
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'The password and password confirmation do not match
.
'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'The password and password confirmation do not match'
})
}
else
{
this
.
confirmPassword
()
}
...
...
@@ -119,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
:
'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'
})
}
}
...
...
src/container/SetPassword.js
View file @
48e65be2
...
...
@@ -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
:
''
,
...
...
@@ -68,17 +68,17 @@ class SetPassword extends Component {
validateReset
()
{
if
(
this
.
state
.
password
.
trim
()
==
""
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'New Password Cannot be Empty
.
'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'New Password Cannot be Empty'
})
}
else
if
(
this
.
state
.
password
.
length
<
8
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Invalid password. Minimum length : 8
.
'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Invalid password. Minimum length : 8'
})
}
else
if
(
this
.
isEmail
(
this
.
state
.
password
))
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Invalid password. Should not be same as Email Address
.
'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Invalid password. Should not be same as Email Address'
})
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
password
))
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Invalid password. Must using combination of characters, letters and numbers
.
'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Invalid password. Must using combination of characters, letters and numbers'
})
}
else
if
(
this
.
state
.
confirmPassword
.
trim
()
==
""
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Repeat Password Cannot be Empty
.
'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Repeat Password Cannot be Empty'
})
}
else
if
(
this
.
state
.
password
!==
this
.
state
.
confirmPassword
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'The password and password confirmation do not match
.
'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'The password and password confirmation do not match'
})
}
else
{
this
.
confirmPassword
()
}
...
...
@@ -119,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
:
'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'
})
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment