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
eea62381
Commit
eea62381
authored
Aug 31, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into deni-dev(pc)
parents
d3edbf34
09451156
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
69 deletions
+51
-69
ForgotPassword.js
src/container/ForgotPassword.js
+1
-1
Login.js
src/container/Login.js
+1
-1
CreateReportItems.js
...container/MasterData/formReportItems/CreateReportItems.js
+10
-10
EditReportItems.js
src/container/MasterData/formReportItems/EditReportItems.js
+10
-10
Profile.js
src/container/Profile.js
+15
-21
ResetPassword.js
src/container/ResetPassword.js
+7
-13
SetPassword.js
src/container/SetPassword.js
+7
-13
No files found.
src/container/ForgotPassword.js
View file @
eea62381
...
@@ -41,7 +41,7 @@ class ForgotPassword extends Component {
...
@@ -41,7 +41,7 @@ class ForgotPassword extends Component {
if
(
this
.
state
.
email
.
trim
()
==
""
)
{
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
)
{
}
else
if
(
!
isEmail
)
{
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email
format is not c
orrect.'
})
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email
Format is Not C
orrect.'
})
}
else
{
}
else
{
this
.
verification
()
this
.
verification
()
}
}
...
...
src/container/Login.js
View file @
eea62381
...
@@ -77,7 +77,7 @@ class Login extends Component {
...
@@ -77,7 +77,7 @@ class Login extends Component {
if
(
this
.
state
.
email
.
trim
()
==
""
)
{
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
)
{
}
else
if
(
!
isEmail
)
{
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email
format is not c
orrect.'
})
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email
Format is Not C
orrect.'
})
}
else
if
(
this
.
state
.
password
.
trim
()
==
""
)
{
}
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
{
}
else
{
...
...
src/container/MasterData/formReportItems/CreateReportItems.js
View file @
eea62381
...
@@ -147,32 +147,32 @@ export default class CreateReportItems extends Component {
...
@@ -147,32 +147,32 @@ export default class CreateReportItems extends Component {
validasi
()
{
validasi
()
{
// alert('coba ya')
// alert('coba ya')
if
(
R
.
isNil
(
this
.
state
.
reportType
))
{
if
(
R
.
isNil
(
this
.
state
.
reportType
))
{
this
.
setState
({
errorJenisLaporan
:
true
,
msgErrorJenisLaporan
:
'Report
type cannot be e
mpty.'
})
this
.
setState
({
errorJenisLaporan
:
true
,
msgErrorJenisLaporan
:
'Report
Type Cannot be E
mpty.'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
company
)){
}
else
if
(
R
.
isNil
(
this
.
state
.
company
)){
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company
name cannot be e
mpty.'
})
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company
Name Cannot be E
mpty.'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
order
))
{
}
else
if
(
R
.
isEmpty
(
this
.
state
.
order
))
{
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order
cannot be e
mpty.'
})
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order
Cannot be E
mpty.'
})
}
}
else
if
(
R
.
isEmpty
(
this
.
state
.
description
))
{
else
if
(
R
.
isEmpty
(
this
.
state
.
description
))
{
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Description
cannot be e
mpty.'
})
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Description
Cannot be E
mpty.'
})
}
}
else
if
(
R
.
isNil
(
this
.
state
.
InputType
))
{
else
if
(
R
.
isNil
(
this
.
state
.
InputType
))
{
this
.
setState
({
errorTipeData
:
true
,
msgErrorTipeData
:
'Data
type cannot be e
mpty.'
})
this
.
setState
({
errorTipeData
:
true
,
msgErrorTipeData
:
'Data
Type Cannot be E
mpty.'
})
}
}
else
if
(
this
.
state
.
disabledFormula
===
false
&&
R
.
isEmpty
(
this
.
state
.
formula
))
{
else
if
(
this
.
state
.
disabledFormula
===
false
&&
R
.
isEmpty
(
this
.
state
.
formula
))
{
this
.
setState
({
errorFormula
:
true
,
msgErrorFormula
:
'Formula
cannot be e
mpty.'
})
this
.
setState
({
errorFormula
:
true
,
msgErrorFormula
:
'Formula
Cannot be E
mpty.'
})
}
}
else
if
(
this
.
state
.
disabledValue
===
false
&&
R
.
isEmpty
(
this
.
state
.
realVal
))
{
else
if
(
this
.
state
.
disabledValue
===
false
&&
R
.
isEmpty
(
this
.
state
.
realVal
))
{
this
.
setState
({
errorRV
:
true
,
msgErrorRV
:
'True
value cannot be e
mpty.'
})
this
.
setState
({
errorRV
:
true
,
msgErrorRV
:
'True
Value Cannot be E
mpty.'
})
}
}
else
if
(
this
.
state
.
disabledCondt
===
false
&&
R
.
isEmpty
(
this
.
state
.
condition
))
{
else
if
(
this
.
state
.
disabledCondt
===
false
&&
R
.
isEmpty
(
this
.
state
.
condition
))
{
this
.
setState
({
errorCondition
:
true
,
msgErrorCondition
:
'False
condition cannot be e
mpty.'
})
this
.
setState
({
errorCondition
:
true
,
msgErrorCondition
:
'False
Condition Cannot be E
mpty.'
})
}
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Valid From
cannot be e
mpty.'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Valid From
Cannot be E
mpty.'
})
}
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'Valid To
cannot be e
mpty.'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'Valid To
Cannot be E
mpty.'
})
}
}
else
{
else
{
this
.
addReportItems
()
this
.
addReportItems
()
...
...
src/container/MasterData/formReportItems/EditReportItems.js
View file @
eea62381
...
@@ -128,25 +128,25 @@ export default class EditReportItems extends Component {
...
@@ -128,25 +128,25 @@ export default class EditReportItems extends Component {
validasi
()
{
validasi
()
{
// alert('coba ya')
// alert('coba ya')
if
(
R
.
isNil
(
this
.
state
.
reportType
)){
if
(
R
.
isNil
(
this
.
state
.
reportType
)){
this
.
setState
({
errorJenisLaporan
:
true
,
msgErrorJenisLaporan
:
'Report
type cannot be e
mpty.'
})
this
.
setState
({
errorJenisLaporan
:
true
,
msgErrorJenisLaporan
:
'Report
Type Cannot be E
mpty.'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
company
)){
}
else
if
(
R
.
isNil
(
this
.
state
.
company
)){
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company
name cannot be e
mpty.'
})
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company
Name Cannot be E
mpty.'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
order
))
{
}
else
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
order
))
{
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order
cannot be e
mpty.'
})
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order
Cannot be E
mpty.'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
description
))
{
}
else
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
description
))
{
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Description
cannot be e
mpty.'
})
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Description
Cannot be E
mpty.'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
InputType
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
InputType
))
{
this
.
setState
({
errorTipeData
:
true
,
msgErrorTipeData
:
'Data
type cannot be e
mpty.'
})
this
.
setState
({
errorTipeData
:
true
,
msgErrorTipeData
:
'Data
Type Cannot be E
mpty.'
})
}
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
)))
{
}
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 e
mpty.'
})
this
.
setState
({
errorFormula
:
true
,
msgErrorFormula
:
'Formula
Cannot be E
mpty.'
})
}
else
if
(
this
.
state
.
InputType
.
type_item_report_name
===
'Validation'
&&
R
.
isEmpty
(
this
.
state
.
tempData
.
condition_it_should_be
))
{
}
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 e
mpty.'
})
this
.
setState
({
errorRV
:
true
,
msgErrorRV
:
'True
Value Cannot be E
mpty.'
})
}
else
if
(
this
.
state
.
InputType
.
type_item_report_name
===
'Validation'
&&
R
.
isNil
(
this
.
state
.
tempData
.
condition_if_wrong
))
{
}
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 e
mpty.'
})
this
.
setState
({
errorCondition
:
true
,
msgErrorCondition
:
'False
Condition Cannot be E
mpty.'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
start_date
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
start_date
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Valid From
cannot be e
mpty.'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Valid From
Cannot be E
mpty.'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
end_date
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
end_date
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'Valid To
cannot be e
mpty.'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'Valid To
Cannot be E
mpty.'
})
}
else
{
}
else
{
this
.
updateReportItems
()
this
.
updateReportItems
()
}
}
...
...
src/container/Profile.js
View file @
eea62381
...
@@ -36,9 +36,9 @@ export default class Profile extends Component {
...
@@ -36,9 +36,9 @@ export default class Profile extends Component {
errorOldPassword
:
false
,
errorOldPassword
:
false
,
errorPassword
:
false
,
errorPassword
:
false
,
errorConfirmPassword
:
false
,
errorConfirmPassword
:
false
,
msgOldPassword
:
'Consists of 8
characters with a combination of n
umbers.'
,
msgOldPassword
:
'Consists of 8
Characters with a Combination of N
umbers.'
,
msgPassword
:
'Consists of 8
characters with a combination of n
umbers.'
,
msgPassword
:
'Consists of 8
Characters with a Combination of N
umbers.'
,
msgConfirmPassword
:
'Consists of 8
characters with a combination of n
umbers.'
,
msgConfirmPassword
:
'Consists of 8
Characters with a Combination of N
umbers.'
,
company
:
[],
company
:
[],
listCompany
:
[],
listCompany
:
[],
selectedIndex
:
0
,
selectedIndex
:
0
,
...
@@ -68,41 +68,35 @@ export default class Profile extends Component {
...
@@ -68,41 +68,35 @@ export default class Profile extends Component {
this
.
setState
({
...
data
,
[
e
.
target
.
name
]:
e
.
target
.
value
})
this
.
setState
({
...
data
,
[
e
.
target
.
name
]:
e
.
target
.
value
})
console
.
log
(
e
.
target
.
name
);
console
.
log
(
e
.
target
.
name
);
if
(
e
.
target
.
name
==
"password"
)
{
if
(
e
.
target
.
name
==
"password"
)
{
this
.
setState
({
errorPassword
:
false
,
msgPassword
:
'Consists of 8
characters with a combination of n
umbers.'
})
this
.
setState
({
errorPassword
:
false
,
msgPassword
:
'Consists of 8
Characters with a Combination of N
umbers.'
})
}
else
if
(
e
.
target
.
name
==
"confirmPassword"
)
{
}
else
if
(
e
.
target
.
name
==
"confirmPassword"
)
{
this
.
setState
({
errorConfirmPassword
:
false
,
msgConfirmPassword
:
'Consists of 8
characters with a combination of n
umbers.'
})
this
.
setState
({
errorConfirmPassword
:
false
,
msgConfirmPassword
:
'Consists of 8
Characters with a Combination of N
umbers.'
})
}
else
if
(
e
.
target
.
name
==
"oldPassword"
)
{
}
else
if
(
e
.
target
.
name
==
"oldPassword"
)
{
this
.
setState
({
errorOldPassword
:
false
,
msgOldPassword
:
'Consists of 8
characters with a combination of n
umbers.'
})
this
.
setState
({
errorOldPassword
:
false
,
msgOldPassword
:
'Consists of 8
Characters with a Combination of N
umbers.'
})
}
}
}
}
validasi
()
{
validasi
()
{
if
(
this
.
state
.
oldPassword
==
""
)
{
if
(
this
.
state
.
oldPassword
==
""
)
{
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
p
assword Cannot be Empty.'
})
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
P
assword Cannot be Empty.'
})
}
else
if
(
this
.
state
.
oldPassword
.
length
<
8
)
{
}
else
if
(
this
.
state
.
oldPassword
.
length
<
8
)
{
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
password minimum 8 c
haracters.'
})
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
Password Minimum 8 C
haracters.'
})
}
else
if
(
this
.
isEmail
(
this
.
state
.
oldPassword
))
{
}
else
if
(
this
.
isEmail
(
this
.
state
.
oldPassword
))
{
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
password format should not use e
mail.'
})
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
Password Format Should Not Use E
mail.'
})
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
oldPassword
))
{
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
oldPassword
))
{
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
password must be a combination of characters, letters and n
umbers.'
})
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
Password Must be a Combination of Characters, Letters and N
umbers.'
})
}
else
if
(
this
.
state
.
password
.
trim
()
==
""
)
{
}
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
if
(
this
.
state
.
password
.
length
<
8
)
{
}
else
if
(
this
.
state
.
password
.
length
<
8
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password
minimum 8 c
haracters.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password
Minimum 8 C
haracters.'
})
}
else
if
(
this
.
isEmail
(
this
.
state
.
password
))
{
}
else
if
(
this
.
isEmail
(
this
.
state
.
password
))
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password
format should not use e
mail.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password
Format Should Not Use E
mail.'
})
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
password
))
{
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
password
))
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password
must be a combination of characters, letters and n
umbers.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password
Must be a Combination of Characters, Letters and N
umbers.'
})
}
else
if
(
this
.
state
.
confirmPassword
.
trim
()
==
""
)
{
}
else
if
(
this
.
state
.
confirmPassword
.
trim
()
==
""
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password confirmation Cannot be Empty.'
})
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.'
})
}
else
if
(
this
.
state
.
password
!==
this
.
state
.
confirmPassword
)
{
}
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
{
}
else
{
this
.
confirmPassword
()
this
.
confirmPassword
()
}
}
...
...
src/container/ResetPassword.js
View file @
eea62381
...
@@ -20,8 +20,8 @@ class ResetPassword extends Component {
...
@@ -20,8 +20,8 @@ class ResetPassword extends Component {
showPass2
:
false
,
showPass2
:
false
,
errorPassword
:
false
,
errorPassword
:
false
,
errorConfirmPassword
:
false
,
errorConfirmPassword
:
false
,
msgPassword
:
'Consists of 8
characters with a combination of n
umbers.'
,
msgPassword
:
'Consists of 8
Characters with a Combination of N
umbers.'
,
msgConfirmPassword
:
'Consists of 8
characters with a combination of n
umbers.'
,
msgConfirmPassword
:
'Consists of 8
Characters with a Combination of N
umbers.'
,
userId
:
0
,
userId
:
0
,
alert
:
false
,
alert
:
false
,
tipeAlert
:
''
,
tipeAlert
:
''
,
...
@@ -70,19 +70,13 @@ class ResetPassword extends Component {
...
@@ -70,19 +70,13 @@ class ResetPassword extends Component {
if
(
this
.
state
.
password
.
trim
()
==
""
)
{
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
)
{
}
else
if
(
this
.
state
.
password
.
length
<
8
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'New Password
minimum 8 c
haracters.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'New Password
Minimum 8 C
haracters.'
})
}
else
if
(
this
.
isEmail
(
this
.
state
.
password
))
{
}
else
if
(
this
.
isEmail
(
this
.
state
.
password
))
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'New Password
format should not use e
mail.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'New Password
Format Should Not Use E
mail.'
})
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
password
))
{
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
password
))
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'New Password
must be a combination of characters, letters and n
umbers.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'New Password
Must be a Combination of Characters, Letters and N
umbers.'
})
}
else
if
(
this
.
state
.
confirmPassword
.
trim
()
==
""
)
{
}
else
if
(
this
.
state
.
confirmPassword
.
trim
()
==
""
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password Confirmation Cannot be Empty.'
})
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
)
{
}
else
if
(
this
.
state
.
password
!==
this
.
state
.
confirmPassword
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password Does Not Match.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password Does Not Match.'
})
}
else
{
}
else
{
...
@@ -125,9 +119,9 @@ class ResetPassword extends Component {
...
@@ -125,9 +119,9 @@ class ResetPassword extends Component {
let
data
=
this
.
state
let
data
=
this
.
state
this
.
setState
({
...
data
,
[
e
.
target
.
name
]:
e
.
target
.
value
})
this
.
setState
({
...
data
,
[
e
.
target
.
name
]:
e
.
target
.
value
})
if
(
e
.
target
.
name
==
"password"
)
{
if
(
e
.
target
.
name
==
"password"
)
{
this
.
setState
({
errorPassword
:
false
,
msgPassword
:
'
Password consists of 8 characters with a combination of n
umbers.'
})
this
.
setState
({
errorPassword
:
false
,
msgPassword
:
'
Consists of 8 Characters with a Combination of N
umbers.'
})
}
else
if
(
e
.
target
.
name
==
"confirmPassword"
)
{
}
else
if
(
e
.
target
.
name
==
"confirmPassword"
)
{
this
.
setState
({
errorConfirmPassword
:
false
,
msgConfirmPassword
:
'
Password Confirmation consists of 8 characters with a combination of n
umbers.'
})
this
.
setState
({
errorConfirmPassword
:
false
,
msgConfirmPassword
:
'
Consists of 8 Characters with a Combination of N
umbers.'
})
}
}
}
}
...
...
src/container/SetPassword.js
View file @
eea62381
...
@@ -20,8 +20,8 @@ class SetPassword extends Component {
...
@@ -20,8 +20,8 @@ class SetPassword extends Component {
showPass2
:
false
,
showPass2
:
false
,
errorPassword
:
false
,
errorPassword
:
false
,
errorConfirmPassword
:
false
,
errorConfirmPassword
:
false
,
msgPassword
:
'Consists of 8
characters with a combination of n
umbers.'
,
msgPassword
:
'Consists of 8
Characters with a Combination of N
umbers.'
,
msgConfirmPassword
:
'Consists of 8
characters with a combination of n
umbers.'
,
msgConfirmPassword
:
'Consists of 8
Characters with a Combination of N
umbers.'
,
userId
:
0
,
userId
:
0
,
alert
:
false
,
alert
:
false
,
tipeAlert
:
''
,
tipeAlert
:
''
,
...
@@ -70,19 +70,13 @@ class SetPassword extends Component {
...
@@ -70,19 +70,13 @@ class SetPassword extends Component {
if
(
this
.
state
.
password
.
trim
()
==
""
)
{
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
)
{
}
else
if
(
this
.
state
.
password
.
length
<
8
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'New Password
minimum 8 c
haracters.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'New Password
Minimum 8 C
haracters.'
})
}
else
if
(
this
.
isEmail
(
this
.
state
.
password
))
{
}
else
if
(
this
.
isEmail
(
this
.
state
.
password
))
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'New Password
format should not use e
mail.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'New Password
Format Should Not Use E
mail.'
})
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
password
))
{
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
password
))
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'New Password
must be a combination of characters, letters and n
umbers.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'New Password
Must be a Combination of Characters, Letters and N
umbers.'
})
}
else
if
(
this
.
state
.
confirmPassword
.
trim
()
==
""
)
{
}
else
if
(
this
.
state
.
confirmPassword
.
trim
()
==
""
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password Confirmation Cannot be Empty.'
})
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
)
{
}
else
if
(
this
.
state
.
password
!==
this
.
state
.
confirmPassword
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password Does Not Match.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password Does Not Match.'
})
}
else
{
}
else
{
...
@@ -125,9 +119,9 @@ class SetPassword extends Component {
...
@@ -125,9 +119,9 @@ class SetPassword extends Component {
let
data
=
this
.
state
let
data
=
this
.
state
this
.
setState
({
...
data
,
[
e
.
target
.
name
]:
e
.
target
.
value
})
this
.
setState
({
...
data
,
[
e
.
target
.
name
]:
e
.
target
.
value
})
if
(
e
.
target
.
name
==
"password"
)
{
if
(
e
.
target
.
name
==
"password"
)
{
this
.
setState
({
errorPassword
:
false
,
msgPassword
:
'
Password consists of 8 characters with a combination of n
umbers.'
})
this
.
setState
({
errorPassword
:
false
,
msgPassword
:
'
Consists of 8 Characters with a Combination of N
umbers.'
})
}
else
if
(
e
.
target
.
name
==
"confirmPassword"
)
{
}
else
if
(
e
.
target
.
name
==
"confirmPassword"
)
{
this
.
setState
({
errorConfirmPassword
:
false
,
msgConfirmPassword
:
'
Password Confirmation consists of 8 characters with a combination of n
umbers.'
})
this
.
setState
({
errorConfirmPassword
:
false
,
msgConfirmPassword
:
'
Consists of 8 Characters with a Combination of N
umbers.'
})
}
}
}
}
...
...
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