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
fded6b6a
Commit
fded6b6a
authored
Aug 24, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'syadziy' into 'master'
update standarisasi ui See merge request
!171
parents
72013a79
03710feb
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
139 additions
and
79 deletions
+139
-79
ReportItems.js
src/container/MasterData/ReportItems.js
+4
-4
CreateReportItems.js
...container/MasterData/formReportItems/CreateReportItems.js
+14
-10
EditReportItems.js
src/container/MasterData/formReportItems/EditReportItems.js
+10
-10
VisualReportItems.js
...container/MasterData/formReportItems/VisualReportItems.js
+95
-39
Profile.js
src/container/Profile.js
+13
-13
ResetPassword.js
src/container/ResetPassword.js
+3
-3
No files found.
src/container/MasterData/ReportItems.js
View file @
fded6b6a
...
@@ -575,7 +575,7 @@ export default class ReportItems extends Component {
...
@@ -575,7 +575,7 @@ export default class ReportItems extends Component {
api
.
create
().
uploadReportItems
(
this
.
state
.
payload
).
then
(
response
=>
{
api
.
create
().
uploadReportItems
(
this
.
state
.
payload
).
then
(
response
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
alert
(
response
.
data
.
message
)
//
alert(response.data.message)
this
.
getData
()
this
.
getData
()
this
.
setState
({
itemReport
:
true
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
})
this
.
setState
({
itemReport
:
true
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
})
}
else
{
}
else
{
...
@@ -824,7 +824,7 @@ export default class ReportItems extends Component {
...
@@ -824,7 +824,7 @@ export default class ReportItems extends Component {
<
/button
>
<
/button
>
<
/a
>
<
/a
>
<
ReactTooltip
border
=
{
true
}
id
=
"visualisasi"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"visualisasi"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
a
data
-
tip
=
{
'Add'
}
data
-
for
=
"tambah"
>
<
a
data
-
tip
=
{
'Add
New
'
}
data
-
for
=
"tambah"
>
<
button
<
button
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
...
@@ -881,7 +881,7 @@ export default class ReportItems extends Component {
...
@@ -881,7 +881,7 @@ export default class ReportItems extends Component {
style
=
{{
marginRight
:
20
}}
style
=
{{
marginRight
:
20
}}
>
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
border
:
'solid 1px #354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
border
:
'solid 1px #354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#354960'
,
fontSize
:
11
}}
>
Bata
l
<
/span
>
<
span
style
=
{{
color
:
'#354960'
,
fontSize
:
11
}}
>
Cance
l
<
/span
>
<
/div
>
<
/div
>
<
/button
>
<
/button
>
<
button
<
button
...
@@ -890,7 +890,7 @@ export default class ReportItems extends Component {
...
@@ -890,7 +890,7 @@ export default class ReportItems extends Component {
style
=
{{}}
style
=
{{}}
>
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
S
impan
<
/span
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
S
ave
<
/span
>
<
/div
>
<
/div
>
<
/button
>
<
/button
>
<
/div
>
<
/div
>
...
...
src/container/MasterData/formReportItems/CreateReportItems.js
View file @
fded6b6a
...
@@ -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 empty
.'
})
this
.
setState
({
errorJenisLaporan
:
true
,
msgErrorJenisLaporan
:
'Report type
is required
.'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
company
)){
}
else
if
(
R
.
isNil
(
this
.
state
.
company
)){
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company
cannot be empty
.'
})
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company
is required
.'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
order
))
{
}
else
if
(
R
.
isEmpty
(
this
.
state
.
order
))
{
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order
cannot be empty
.'
})
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order
is required
.'
})
}
}
else
if
(
R
.
isEmpty
(
this
.
state
.
description
))
{
else
if
(
R
.
isEmpty
(
this
.
state
.
description
))
{
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Description
cannot be empty
.'
})
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Description
is required
.'
})
}
}
else
if
(
R
.
isNil
(
this
.
state
.
InputType
))
{
else
if
(
R
.
isNil
(
this
.
state
.
InputType
))
{
this
.
setState
({
errorTipeData
:
true
,
msgErrorTipeData
:
'Data type
cannot be empty
'
})
this
.
setState
({
errorTipeData
:
true
,
msgErrorTipeData
:
'Data type
is required.
'
})
}
}
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 empty
'
})
this
.
setState
({
errorFormula
:
true
,
msgErrorFormula
:
'Formula
is required.
'
})
}
}
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 empty
'
})
this
.
setState
({
errorRV
:
true
,
msgErrorRV
:
'True
value is required.
'
})
}
}
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 empty
'
})
this
.
setState
({
errorCondition
:
true
,
msgErrorCondition
:
'False
condition is required.
'
})
}
}
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
else
if
(
R
.
isNil
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Start
Date cannot be empty
'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Start
date is required.
'
})
}
}
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
else
if
(
R
.
isNil
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'End
Date cannot be empty
'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'End
date is required.
'
})
}
}
else
{
else
{
this
.
addReportItems
()
this
.
addReportItems
()
...
@@ -338,6 +338,10 @@ export default class CreateReportItems extends Component {
...
@@ -338,6 +338,10 @@ export default class CreateReportItems extends Component {
})
})
}
}
closeAlert
()
{
this
.
setState
({
alert
:
false
})
}
render
()
{
render
()
{
return
(
return
(
...
...
src/container/MasterData/formReportItems/EditReportItems.js
View file @
fded6b6a
...
@@ -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 empty
'
})
this
.
setState
({
errorJenisLaporan
:
true
,
msgErrorJenisLaporan
:
'Report type
is required.
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
company
)){
}
else
if
(
R
.
isNil
(
this
.
state
.
company
)){
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company
cannot be empty
'
})
this
.
setState
({
errorPerusahaan
:
true
,
msgErrorPerusahaan
:
'Company
is required.
'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
order
))
{
}
else
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
order
))
{
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order
cannot be empty
.'
})
this
.
setState
({
errorOrder
:
true
,
msgErrorOrder
:
'Order
is required.
.'
})
}
else
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
description
))
{
}
else
if
(
R
.
isEmpty
(
this
.
state
.
tempData
.
description
))
{
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Description
cannot be empty
.'
})
this
.
setState
({
errorDesc
:
true
,
msgErrorDesc
:
'Description
is required.
.'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
InputType
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
InputType
))
{
this
.
setState
({
errorTipeData
:
true
,
msgErrorTipeData
:
'Data type
cannot be empty
'
})
this
.
setState
({
errorTipeData
:
true
,
msgErrorTipeData
:
'Data type
is required.
'
})
}
else
if
((
this
.
state
.
InputType
.
type_report_name
===
'Formula'
&&
R
.
isEmpty
(
this
.
state
.
tempData
.
formula
))
||
(
this
.
state
.
InputType
.
type_report_name
===
'Validation'
&&
R
.
isEmpty
(
this
.
state
.
tempData
.
formula
)))
{
}
else
if
((
this
.
state
.
InputType
.
type_report_name
===
'Formula'
&&
R
.
isEmpty
(
this
.
state
.
tempData
.
formula
))
||
(
this
.
state
.
InputType
.
type_report_name
===
'Validation'
&&
R
.
isEmpty
(
this
.
state
.
tempData
.
formula
)))
{
this
.
setState
({
errorFormula
:
true
,
msgErrorFormula
:
'Formula
cannot be empty
'
})
this
.
setState
({
errorFormula
:
true
,
msgErrorFormula
:
'Formula
is required.
'
})
}
else
if
(
this
.
state
.
InputType
.
type_report_name
===
'Validation'
&&
R
.
isEmpty
(
this
.
state
.
tempData
.
condition_it_should_be
))
{
}
else
if
(
this
.
state
.
InputType
.
type_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 is required.
'
})
}
else
if
(
this
.
state
.
InputType
.
type_report_name
===
'Validation'
&&
R
.
isNil
(
this
.
state
.
tempData
.
condition_if_wrong
))
{
}
else
if
(
this
.
state
.
InputType
.
type_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 is required.
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
start_date
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
start_date
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Start
Date cannot be empty
'
})
this
.
setState
({
errorStartDate
:
true
,
msgErrorSD
:
'Start
date is required.
'
})
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
end_date
))
{
}
else
if
(
R
.
isNil
(
this
.
state
.
tempData
.
end_date
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'End
Date cannot be empty
'
})
this
.
setState
({
errorEndDate
:
true
,
msgErrorED
:
'End
date is required.
'
})
}
else
{
}
else
{
this
.
updateReportItems
()
this
.
updateReportItems
()
}
}
...
...
src/container/MasterData/formReportItems/VisualReportItems.js
View file @
fded6b6a
This diff is collapsed.
Click to expand it.
src/container/Profile.js
View file @
fded6b6a
...
@@ -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
:
'
Terdiri 8 karakter dengan kombinasi angka
.'
,
msgOldPassword
:
'
Consists of 8 characters with a combination of numbers
.'
,
msgPassword
:
'
Terdiri 8 karakter dengan kombinasi angka
.'
,
msgPassword
:
'
Consists of 8 characters with a combination of numbers
.'
,
msgConfirmPassword
:
'
Terdiri 8 karakter dengan kombinasi angka
.'
,
msgConfirmPassword
:
'
Consists of 8 characters with a combination of numbers
.'
,
company
:
[],
company
:
[],
listCompany
:
[],
listCompany
:
[],
selectedIndex
:
0
,
selectedIndex
:
0
,
...
@@ -68,23 +68,23 @@ export default class Profile extends Component {
...
@@ -68,23 +68,23 @@ 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
:
'
Password c
onsists of 8 characters with a combination of numbers.'
})
this
.
setState
({
errorPassword
:
false
,
msgPassword
:
'
C
onsists of 8 characters with a combination of numbers.'
})
}
else
if
(
e
.
target
.
name
==
"confirmPassword"
)
{
}
else
if
(
e
.
target
.
name
==
"confirmPassword"
)
{
this
.
setState
({
errorConfirmPassword
:
false
,
msgConfirmPassword
:
'
Password c
onsists of 8 characters with a combination of numbers.'
})
this
.
setState
({
errorConfirmPassword
:
false
,
msgConfirmPassword
:
'
C
onsists of 8 characters with a combination of numbers.'
})
}
else
if
(
e
.
target
.
name
==
"oldPassword"
)
{
}
else
if
(
e
.
target
.
name
==
"oldPassword"
)
{
this
.
setState
({
errorOldPassword
:
false
,
msgOldPassword
:
'
Password c
onsists of 8 characters with a combination of numbers.'
})
this
.
setState
({
errorOldPassword
:
false
,
msgOldPassword
:
'
C
onsists of 8 characters with a combination of numbers.'
})
}
}
}
}
validasi
()
{
validasi
()
{
if
(
this
.
state
.
oldPassword
==
""
)
{
if
(
this
.
state
.
oldPassword
==
""
)
{
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
P
assword is required.'
})
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
p
assword is required.'
})
}
else
if
(
this
.
state
.
oldPassword
.
length
<
8
)
{
}
else
if
(
this
.
state
.
oldPassword
.
length
<
8
)
{
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
P
assword minimum 8 characters.'
})
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
p
assword minimum 8 characters.'
})
}
else
if
(
this
.
isEmail
(
this
.
state
.
oldPassword
))
{
}
else
if
(
this
.
isEmail
(
this
.
state
.
oldPassword
))
{
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
P
assword format should not use email.'
})
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
p
assword format should not use email.'
})
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
oldPassword
))
{
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
oldPassword
))
{
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
P
assword must be a combination of characters, letters and numbers.'
})
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old
p
assword must be a combination of characters, letters and numbers.'
})
}
else
if
(
this
.
state
.
password
.
trim
()
==
""
)
{
}
else
if
(
this
.
state
.
password
.
trim
()
==
""
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password is required.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password is required.'
})
}
else
if
(
this
.
state
.
password
.
length
<
8
)
{
}
else
if
(
this
.
state
.
password
.
length
<
8
)
{
...
@@ -94,11 +94,11 @@ export default class Profile extends Component {
...
@@ -94,11 +94,11 @@ export default class Profile extends Component {
}
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 numbers.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password must be a combination of characters, letters and numbers.'
})
}
else
if
(
this
.
state
.
confirmPassword
.
trim
()
==
""
)
{
}
else
if
(
this
.
state
.
confirmPassword
.
trim
()
==
""
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'
Confirm Password
is required.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'
Password confirmation
is required.'
})
}
else
if
(
this
.
state
.
confirmPassword
.
length
<
8
)
{
}
else
if
(
this
.
state
.
confirmPassword
.
length
<
8
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'
Confirm password
of at least 8 characters.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'
Password confirmation
of at least 8 characters.'
})
}
else
if
(
this
.
isEmail
(
this
.
state
.
confirmPassword
))
{
}
else
if
(
this
.
isEmail
(
this
.
state
.
confirmPassword
))
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password confirmation format
may
not use email.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password confirmation format
should
not use email.'
})
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
confirmPassword
))
{
}
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 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
)
{
...
...
src/container/ResetPassword.js
View file @
fded6b6a
...
@@ -33,7 +33,7 @@ class ResetPassword extends Component {
...
@@ -33,7 +33,7 @@ class ResetPassword extends Component {
console
.
log
(
this
.
props
.
match
.
params
.
id
)
console
.
log
(
this
.
props
.
match
.
params
.
id
)
let
userId
=
this
.
props
.
match
.
params
.
id
let
userId
=
this
.
props
.
match
.
params
.
id
this
.
setState
({
userId
})
this
.
setState
({
userId
})
//
this.checkExpiredLink(userId)
this
.
checkExpiredLink
(
userId
)
// console.log(this.props)
// console.log(this.props)
}
}
...
@@ -67,7 +67,7 @@ class ResetPassword extends Component {
...
@@ -67,7 +67,7 @@ class ResetPassword extends Component {
if
(
this
.
state
.
password
.
trim
()
==
""
)
{
if
(
this
.
state
.
password
.
trim
()
==
""
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password is required'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password is required'
})
}
else
if
(
this
.
state
.
password
.
length
<
8
)
{
}
else
if
(
this
.
state
.
password
.
length
<
8
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password
of at least
8 characters.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password
minimum
8 characters.'
})
}
else
if
(
this
.
isEmail
(
this
.
state
.
password
))
{
}
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
))
{
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
password
))
{
...
@@ -75,7 +75,7 @@ class ResetPassword extends Component {
...
@@ -75,7 +75,7 @@ class ResetPassword extends Component {
}
else
if
(
this
.
state
.
confirmPassword
.
trim
()
==
""
)
{
}
else
if
(
this
.
state
.
confirmPassword
.
trim
()
==
""
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Confirm password is required.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Confirm password is required.'
})
}
else
if
(
this
.
state
.
confirmPassword
.
length
<
8
)
{
}
else
if
(
this
.
state
.
confirmPassword
.
length
<
8
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Confirm password
of at least
8 characters.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Confirm password
minimum
8 characters.'
})
}
else
if
(
this
.
isEmail
(
this
.
state
.
confirmPassword
))
{
}
else
if
(
this
.
isEmail
(
this
.
state
.
confirmPassword
))
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password confirmation format should not use email.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password confirmation format should not use email.'
})
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
confirmPassword
))
{
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
confirmPassword
))
{
...
...
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