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
Mar 13, 2025
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 {
...
@@ -13,7 +13,7 @@ export class LoginPageComponent {
public
showPassword
=
false
;
public
showPassword
=
false
;
disabled
=
''
;
disabled
=
''
;
active
:
any
;
active
:
any
;
errorUser
=
false
constructor
(@
Inject
(
DOCUMENT
)
constructor
(@
Inject
(
DOCUMENT
)
private
document
:
Document
,
private
document
:
Document
,
private
elementRef
:
ElementRef
,
private
elementRef
:
ElementRef
,
...
@@ -103,17 +103,22 @@ export class LoginPageComponent {
...
@@ -103,17 +103,22 @@ export class LoginPageComponent {
this
.
authservice
.
loginWithUserPass
(
this
.
loginForm
.
controls
[
'username'
].
value
,
this
.
authservice
.
loginWithUserPass
(
this
.
loginForm
.
controls
[
'username'
].
value
,
this
.
loginForm
.
controls
[
'password'
].
value
).
subscribe
({
this
.
loginForm
.
controls
[
'password'
].
value
).
subscribe
({
next
:
response
=>
{
next
:
response
=>
{
if
(
response
){
if
(
response
)
{
this
.
errorUser
=
false
sessionStorage
.
setItem
(
"accessToken"
,
response
.
accessToken
)
sessionStorage
.
setItem
(
"accessToken"
,
response
.
accessToken
)
sessionStorage
.
setItem
(
"refreshToken"
,
response
.
refreshToken
)
sessionStorage
.
setItem
(
"refreshToken"
,
response
.
refreshToken
)
this
.
router
.
navigate
([
'/self-evaluation'
]);
this
.
router
.
navigate
([
'/self-evaluation'
]);
}
}
else
{
this
.
errorUser
=
true
}
},
error
:
error
=>
{
},
error
:
error
=>
{
this
.
error
=
'Please check email and passowrd'
;
this
.
error
=
'Please check email and passowrd'
;
this
.
errorUser
=
true
}
}
})
})
}
else
{
}
else
{
this
.
error
=
'Please check email and passowrd'
;
this
.
error
=
'Please check email and passowrd'
;
this
.
errorUser
=
true
}
}
}
}
...
...
src/app/authentication/login-page/login-page2.component.html
View file @
d5a4627d
...
@@ -74,6 +74,10 @@
...
@@ -74,6 +74,10 @@
</div>
</div>
</div> -->
</div> -->
<!-- End Checkbox -->
<!-- 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
()"
<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>
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"
>
<div
class=
"text-center"
>
...
...
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