Skip to content

Commit 0d11438

Browse files
committed
resolve comments on PR
1 parent 870dbd5 commit 0d11438

File tree

13 files changed

+104
-208
lines changed

13 files changed

+104
-208
lines changed

projects/arc-lib/src/lib/components/auth/auth.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ export class AuthComponent extends NbAuthComponent {
1515
override readonly location: Location,
1616
) {
1717
super(auth, location);
18-
this.image="../../../images/auth/login-img.png";
19-
this.altText="loginImg";
2018

2119
}
2220
}

projects/arc-lib/src/lib/components/auth/forgot-password/forgot-password.component.scss

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,7 @@
2121
}
2222
}
2323

24-
.google-btn {
25-
width: 24.125rem;
26-
height: 4rem;
27-
border-radius: 0.375rem;
28-
font-size: 1.25rem;
29-
font-family: #{nb-theme(font-family-primary)};
30-
font-weight: 600;
31-
line-height: 1.5rem;
32-
background-color: map.get($font, 'light');
33-
border: 0.063rem solid map.get($color, 'border-disable');
34-
position: absolute;
3524

36-
&:hover {
37-
border-color: map-get($font, 'placeholder');
38-
}
39-
40-
&:active {
41-
border-color: map-get($font, 'primary');
42-
}
43-
}
4425
.card-row {
4526
display: flex;
4627
margin: 0 -0.5rem;
@@ -69,33 +50,7 @@
6950
}
7051
}
7152
}
72-
.input {
73-
input {
74-
width: 80%;
75-
margin: 10px 0;
76-
max-width: inherit;
77-
border-radius: 0;
78-
background: #fff;
79-
}
80-
}
81-
.input-title {
82-
margin-top: 10px;
83-
span {
84-
font-size: 13px;
85-
}
86-
}
87-
.loginbtn {
88-
margin: 20px 0;
89-
button {
90-
background: #8f8f8f;
91-
color: #fff;
92-
text-transform: inherit;
93-
&:hover {
94-
color: rgb(41, 40, 40);
95-
border: 1px solid #8f8f8f;
96-
}
97-
}
98-
}
53+
9954
.sign-in-button {
10055
button {
10156
font-weight: normal;

projects/arc-lib/src/lib/components/auth/forgot-password/forgot-password.component.ts

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { ActivatedRoute, Router } from '@angular/router';
44
import { AuthService } from '@project-lib/core/auth';
55
import { RouteComponentBaseDirective } from '@project-lib/core/route-component-base';
66
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
7+
import { NbToastrService } from '@nebular/theme';
78

89
@Component({
910
selector: 'lib-forgot-password',
@@ -19,7 +20,8 @@ export class ForgotPasswordComponent extends RouteComponentBaseDirective implem
1920
override readonly location: Location,
2021
private readonly authService: AuthService,
2122
private readonly router: Router,
22-
private fb: FormBuilder
23+
private fb: FormBuilder,
24+
private toastrService: NbToastrService
2325

2426
) {
2527
super(route, location);
@@ -32,21 +34,36 @@ export class ForgotPasswordComponent extends RouteComponentBaseDirective implem
3234
});
3335
}
3436

37+
// onSubmit() {
38+
// if (this.forgotPasswordForm.valid) {
39+
// const email = this.forgotPasswordForm.value.email;
40+
// this.authService.forgetPasswordReq(email).subscribe(
41+
// (response) => {
42+
// // Handle successful link sending
43+
// console.log('Reset Password link sent successfully:', response);
44+
45+
// },
46+
// (error) => {
47+
// // Handle error
48+
// console.error('Error sending reset password link:', error);
49+
// }
50+
// );
51+
// }
52+
// }
3553
onSubmit() {
3654
if (this.forgotPasswordForm.valid) {
3755
const email = this.forgotPasswordForm.value.email;
3856
this.authService.forgetPasswordReq(email).subscribe(
3957
(response) => {
4058
// Handle successful link sending
41-
console.log('Reset Password link sent successfully:', response);
59+
this.toastrService.success('Reset Password link sent successfully', 'Success');
4260
},
4361
(error) => {
4462
// Handle error
45-
console.error('Error sending reset password link:', error);
63+
this.toastrService.danger('Error sending reset password link', 'Error');
4664
}
4765
);
4866
}
4967
}
5068

51-
5269
}

projects/arc-lib/src/lib/components/auth/login/login.component.scss

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,6 @@
2121
}
2222
}
2323

24-
.google-btn {
25-
width: 24.125rem;
26-
height: 4rem;
27-
border-radius: 0.375rem;
28-
font-size: 1.25rem;
29-
font-family: #{nb-theme(font-family-primary)};
30-
font-weight: 600;
31-
line-height: 1.5rem;
32-
background-color: map.get($font, 'light');
33-
border: 0.063rem solid map.get($color, 'border-disable');
34-
position: absolute;
35-
36-
&:hover {
37-
border-color: map-get($font, 'placeholder');
38-
}
39-
40-
&:active {
41-
border-color: map-get($font, 'primary');
42-
}
43-
}
4424
.card-row {
4525
display: flex;
4626
margin: 0 -0.5rem;
@@ -69,33 +49,7 @@
6949
}
7050
}
7151
}
72-
.input {
73-
input {
74-
width: 80%;
75-
margin: 10px 0;
76-
max-width: inherit;
77-
border-radius: 0;
78-
background: #fff;
79-
}
80-
}
81-
.input-title {
82-
margin-top: 10px;
83-
span {
84-
font-size: 13px;
85-
}
86-
}
87-
.loginbtn {
88-
margin: 20px 0;
89-
button {
90-
background: #8f8f8f;
91-
color: #fff;
92-
text-transform: inherit;
93-
&:hover {
94-
color: rgb(41, 40, 40);
95-
border: 1px solid #8f8f8f;
96-
}
97-
}
98-
}
52+
9953
.sign-in-button {
10054
button {
10155
font-weight: normal;

projects/arc-lib/src/lib/components/auth/reset-password/reset-password.component.scss

Lines changed: 19 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,26 @@
2121
}
2222
}
2323

24-
.google-btn {
25-
width: 24.125rem;
26-
height: 4rem;
27-
border-radius: 0.375rem;
28-
font-size: 1.25rem;
29-
font-family: #{nb-theme(font-family-primary)};
30-
font-weight: 600;
31-
line-height: 1.5rem;
32-
background-color: map.get($font, 'light');
33-
border: 0.063rem solid map.get($color, 'border-disable');
34-
position: absolute;
24+
// .google-btn {
25+
// width: 24.125rem;
26+
// height: 4rem;
27+
// border-radius: 0.375rem;
28+
// font-size: 1.25rem;
29+
// font-family: #{nb-theme(font-family-primary)};
30+
// font-weight: 600;
31+
// line-height: 1.5rem;
32+
// background-color: map.get($font, 'light');
33+
// border: 0.063rem solid map.get($color, 'border-disable');
34+
// position: absolute;
3535

36-
&:hover {
37-
border-color: map-get($font, 'placeholder');
38-
}
36+
// &:hover {
37+
// border-color: map-get($font, 'placeholder');
38+
// }
3939

40-
&:active {
41-
border-color: map-get($font, 'primary');
42-
}
43-
}
40+
// &:active {
41+
// border-color: map-get($font, 'primary');
42+
// }
43+
// }
4444
.card-row {
4545
display: flex;
4646
margin: 0 -0.5rem;
@@ -69,33 +69,7 @@
6969
}
7070
}
7171
}
72-
.input {
73-
input {
74-
width: 75%;
75-
margin: 10px 0;
76-
max-width: inherit;
77-
border-radius: 0;
78-
background: #fff;
79-
}
80-
}
81-
.input-title {
82-
margin-top: 10px;
83-
span {
84-
font-size: 13px;
85-
}
86-
}
87-
.loginbtn {
88-
margin: 20px 0;
89-
button {
90-
background: #8f8f8f;
91-
color: #fff;
92-
text-transform: inherit;
93-
&:hover {
94-
color: rgb(41, 40, 40);
95-
border: 1px solid #8f8f8f;
96-
}
97-
}
98-
}
72+
9973
.sign-in-button {
10074
button {
10175
font-weight: normal;

projects/arc-lib/src/lib/components/auth/signup/signup.component.scss

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,6 @@
2121
}
2222
}
2323

24-
.google-btn {
25-
width: 24.125rem;
26-
height: 4rem;
27-
border-radius: 0.375rem;
28-
font-size: 1.25rem;
29-
font-family: #{nb-theme(font-family-primary)};
30-
font-weight: 600;
31-
line-height: 1.5rem;
32-
background-color: map.get($font, 'light');
33-
border: 0.063rem solid map.get($color, 'border-disable');
34-
position: absolute;
35-
36-
&:hover {
37-
border-color: map-get($font, 'placeholder');
38-
}
39-
40-
&:active {
41-
border-color: map-get($font, 'primary');
42-
}
43-
}
4424
.card-row {
4525
display: flex;
4626
margin: 0 -0.5rem;
@@ -84,33 +64,7 @@
8464
background: #fff;
8565
}
8666
}
87-
.input {
88-
input {
89-
width: 90%;
90-
margin: 10px 0;
91-
max-width: inherit;
92-
border-radius: 0;
93-
background: #fff;
94-
}
95-
}
96-
.input-title {
97-
margin-top: 10px;
98-
span {
99-
font-size: 13px;
100-
}
101-
}
102-
.loginbtn {
103-
margin: 20px 0;
104-
button {
105-
background: #8f8f8f;
106-
color: #fff;
107-
text-transform: inherit;
108-
&:hover {
109-
color: rgb(41, 40, 40);
110-
border: 1px solid #8f8f8f;
111-
}
112-
}
113-
}
67+
11468
.sign-up-button {
11569
button {
11670
font-weight: normal;

projects/arc-lib/src/lib/core/auth/auth.service.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -207,17 +207,10 @@ export class AuthService {
207207
this.appConfig,
208208
);
209209

210-
// const token = new HttpHeaders({
211-
212-
// 'Authorization': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InRpbnlqb2VAZXhhbXBsZS5jb20iLCJpYXQiOjE3MDA2NTk2NTgsImV4cCI6MTcwMDY2MTQ1OCwiaXNzIjoic291cmNlZnVzZSIsInN1YiI6InRpbnlqb2VAZXhhbXBsZS5jb20ifQ.dep1UOseV6XbHRI6SQUUK_kHAqqOOHLXflSyRiogGmA', // Add your authorization token if needed
213-
// // Add other headers as needed
214-
// });
215-
// command.parameters.headers=headers;
216-
210+
217211

218212
command.parameters = {
219213
data: user,
220-
// headers:token
221214
};
222215

223216
return command.execute();

projects/arc-lib/src/lib/core/auth/models/logged-in-user.model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class LoggedInUserDM {
5252
this.userTenantId = data.userTenantId;
5353
this.role = data.role;
5454
} else if (data) {
55-
// throw new Error('Mandatory fields missing for LoggedInUser model');
55+
throw new Error('Mandatory fields missing for LoggedInUser model');
5656
} else {
5757
// Do nothing
5858
}

projects/arc-lib/src/lib/core/interceptors/auth.interceptor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class AuthInterceptor implements HttpInterceptor {
2929
const headers = req.headers.delete(AuthTokenSkipHeader);
3030
return next.handle(req.clone({ headers }));
3131
}
32-
const authToken = this.sessionStore.getAccessToken() || 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImZlcnJ5QGV4YW1wbGUuY29tIiwiaWF0IjoxNzAxMTgyNDA0LCJleHAiOjE3MDExODQyMDQsImlzcyI6InNvdXJjZWZ1c2UiLCJzdWIiOiJmZXJyeUBleGFtcGxlLmNvbSJ9.ZYq7Y_77_4FYD9YMUKtZQjUc2G1VkpVRy2O1gLPXrIE';
32+
const authToken = this.sessionStore.getAccessToken() ;
3333

3434
if (authToken) {
3535
return next.handle(

projects/arc/src/app/main/main.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ export class MainComponent
3838
link: '/main/home',
3939
home: true,
4040
pathMatch: 'prefix',
41-
},
41+
}
42+
4243
];
4344

4445
toggle() {

0 commit comments

Comments
 (0)