Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
myAppraisal
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
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
angular
myAppraisal
Commits
d5a4627d
Commit
d5a4627d
authored
2 weeks ago
by
Nattana Chaiyamat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
login แจ้งเตือนรหัสผิด
parent
35a725d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
login-page.component.ts
src/app/authentication/login-page/login-page.component.ts
+8
-3
login-page2.component.html
src/app/authentication/login-page/login-page2.component.html
+4
-0
No files found.
src/app/authentication/login-page/login-page.component.ts
View file @
d5a4627d
...
...
@@ -13,7 +13,7 @@ export class LoginPageComponent {
public
showPassword
=
false
;
disabled
=
''
;
active
:
any
;
errorUser
=
false
constructor
(@
Inject
(
DOCUMENT
)
private
document
:
Document
,
private
elementRef
:
ElementRef
,
...
...
@@ -103,17 +103,22 @@ export class LoginPageComponent {
this
.
authservice
.
loginWithUserPass
(
this
.
loginForm
.
controls
[
'username'
].
value
,
this
.
loginForm
.
controls
[
'password'
].
value
).
subscribe
({
next
:
response
=>
{
if
(
response
){
if
(
response
)
{
this
.
errorUser
=
false
sessionStorage
.
setItem
(
"accessToken"
,
response
.
accessToken
)
sessionStorage
.
setItem
(
"refreshToken"
,
response
.
refreshToken
)
this
.
router
.
navigate
([
'/self-evaluation'
]);
}
}
else
{
this
.
errorUser
=
true
}
},
error
:
error
=>
{
this
.
error
=
'Please check email and passowrd'
;
this
.
errorUser
=
true
}
})
}
else
{
this
.
error
=
'Please check email and passowrd'
;
this
.
errorUser
=
true
}
}
...
...
This diff is collapsed.
Click to expand it.
src/app/authentication/login-page/login-page2.component.html
View file @
d5a4627d
...
...
@@ -74,6 +74,10 @@
</div>
</div> -->
<!-- End Checkbox -->
<div
*
ngIf=
"errorUser"
class=
"bg-danger/10 border border-danger/10 alert text-danger m-0"
role=
"alert"
>
Please check email and passowrd
</div>
<button
type=
"submit"
(
click
)="
Submit
()"
class=
"py-2 px-3 inline-flex justify-center items-center gap-2 rounded-sm border border-transparent font-semibold bg-primary text-white hover:bg-primary focus:outline-none focus:ring-0 focus:ring-primary focus:ring-offset-0 transition-all text-sm dark:focus:ring-offset-white/10"
>
เข้าสู่ระบบ
</button>
<div
class=
"text-center"
>
...
...
This diff is collapsed.
Click to expand it.
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