Skip to content

Commit f1f7c72

Browse files
Role management with features
1 parent eba09cf commit f1f7c72

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+8222
-14213
lines changed

package-lock.json

Lines changed: 6726 additions & 13953 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.
Binary file not shown.
Binary file not shown.

projects/arc-lib/src/lib/components/auth/auth-routing.module.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { NgModule } from '@angular/core';
2-
import { RouterModule, Routes } from '@angular/router';
1+
import {NgModule} from '@angular/core';
2+
import {RouterModule, Routes} from '@angular/router';
33

4-
import { AuthComponent } from './auth.component';
5-
import { LoginComponent } from './login/login.component';
6-
import { SignupComponent } from './signup/signup.component';
7-
import { ForgotPasswordComponent } from './forgot-password/forgot-password.component';
8-
import { ResetPasswordComponent } from './reset-password/reset-password.component';
4+
import {AuthComponent} from './auth.component';
5+
import {LoginComponent} from './login/login.component';
6+
import {SignupComponent} from './signup/signup.component';
7+
import {ForgotPasswordComponent} from './forgot-password/forgot-password.component';
8+
import {ResetPasswordComponent} from './reset-password/reset-password.component';
99

1010
const routes: Routes = [
1111
{
@@ -27,7 +27,7 @@ const routes: Routes = [
2727
{
2828
path: 'resetpassword',
2929
component: ResetPasswordComponent,
30-
}
30+
},
3131
],
3232
},
3333
];

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
<router-outlet></router-outlet>
1515
</nb-auth-block>
1616
</nb-layout-column>
17-
</nb-layout>
17+
</nb-layout>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@
2828
.card-row {
2929
flex-grow: 0 !important;
3030
flex-shrink: 0 !important;
31-
flex-basis: 35% !important;
32-
}
31+
flex-basis: 35% !important;
32+
}

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

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,18 @@ import {AuthRoutingModule} from './auth-routing.module';
1212
import {AuthComponent} from './auth.component';
1313
import {LoginComponent} from './login/login.component';
1414

15-
import { SignupComponent } from './signup/signup.component';
16-
import { ForgotPasswordComponent } from './forgot-password/forgot-password.component';
17-
import { ResetPasswordComponent } from './reset-password/reset-password.component';
15+
import {SignupComponent} from './signup/signup.component';
16+
import {ForgotPasswordComponent} from './forgot-password/forgot-password.component';
17+
import {ResetPasswordComponent} from './reset-password/reset-password.component';
1818

1919
@NgModule({
20-
declarations: [LoginComponent, AuthComponent, SignupComponent, ForgotPasswordComponent, ResetPasswordComponent],
20+
declarations: [
21+
LoginComponent,
22+
AuthComponent,
23+
SignupComponent,
24+
ForgotPasswordComponent,
25+
ResetPasswordComponent,
26+
],
2127
schemas: [CUSTOM_ELEMENTS_SCHEMA],
2228
imports: [
2329
CommonModule,
@@ -29,7 +35,7 @@ import { ResetPasswordComponent } from './reset-password/reset-password.componen
2935
HttpClientModule,
3036
NbLayoutModule,
3137
TranslateModule,
32-
NbThemeModule.forRoot(),
38+
NbThemeModule.forRoot({name: 'boiler'}),
3339
NbAuthModule.forRoot({
3440
strategies: [
3541
NbPasswordAuthStrategy.setup({

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

Lines changed: 136 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -2,102 +2,148 @@
22
<nb-card-body class="m-0">
33
<div>
44
<img [src]="imageUrl" [alt]="altText" draggable="false" />
5-
6-
75
</div>
86
<div class="main-wrapper">
97
<div>
10-
<div class="sign-in-title">
11-
<h2>Sign In</h2>
12-
<h3>Welcome to Arc by SourceFuse</h3>
13-
<p>
14-
Cut down your application development process to 60% Sign In to your
15-
account
16-
</p>
17-
</div>
8+
<div class="sign-in-title">
9+
<h2>Sign In</h2>
10+
<h3>Welcome to Arc by SourceFuse</h3>
11+
<p>
12+
Cut down your application development process to 60% Sign In to your
13+
account
14+
</p>
15+
</div>
1816

19-
<form [formGroup]="loginForm" (ngSubmit)="onSubmit()">
20-
<!-- Email field -->
21-
<div>
22-
<div class="input-title">
23-
<span>Email</span>
24-
</div>
25-
<div class="input">
26-
<input type="text" placeholder="Email" nbInput fieldSize="medium" formControlName="email" required/>
27-
</div>
28-
<div *ngIf="loginForm.get('email').hasError('required') && loginForm.get('email').touched">
29-
Email is required.
30-
</div>
31-
<div *ngIf="loginForm.get('email').hasError('email') && loginForm.get('email').touched">
32-
Invalid email format.
33-
</div>
34-
</div>
35-
36-
<!-- Password field -->
37-
<div>
38-
<div class="input-title">
39-
<span>Password</span>
40-
</div>
41-
<div class="input">
42-
<input placeholder=" Enter New Password" [type]="getInputType()" formControlName="password" required nbInput>
43-
<button type="button" nbSuffix nbButton ghost (click)="toggleShowPassword()">
44-
<nb-icon [icon]="showPassword ? 'eye-outline' : 'eye-off-2-outline'"
45-
pack="eva"
46-
[attr.aria-label]="showPassword ? 'hide password' : 'show password'">
47-
</nb-icon>
48-
</button>
49-
<!-- forgot password link -->
50-
<div class="forgot-password">
51-
<a [routerLink]="['/auth/forgotpassword']">Forgot Password</a>
52-
</div>
53-
</div>
54-
<div *ngIf="loginForm.get('password').hasError('required') && loginForm.get('password').touched">
55-
Password is required.
56-
</div>
57-
<div *ngIf="loginForm.get('password').hasError('minlength') && loginForm.get('password').touched">
58-
Password must be at least 6 characters.
59-
</div>
60-
</div>
61-
62-
<!-- login button -->
63-
<div class="loginbtn">
64-
<button
65-
nbButton
66-
shape="round"
67-
size="medium"
68-
type="submit"
69-
status="basic"
70-
[disabled]="!loginForm.valid"
71-
(click)="onSubmit()"
72-
>
73-
Sign In
74-
</button>
75-
</div>
76-
</form>
17+
<form [formGroup]="loginForm">
18+
<!-- Email field -->
19+
<div>
20+
<div class="input-title">
21+
<span>Email</span>
22+
</div>
23+
<div class="input">
24+
<input
25+
type="text"
26+
placeholder="Email"
27+
nbInput
28+
fieldSize="medium"
29+
formControlName="email"
30+
required
31+
/>
32+
</div>
33+
<div
34+
*ngIf="
35+
loginForm.get('email').hasError('required') &&
36+
loginForm.get('email').touched
37+
"
38+
>
39+
Email is required.
40+
</div>
41+
<div
42+
*ngIf="
43+
loginForm.get('email').hasError('email') &&
44+
loginForm.get('email').touched
45+
"
46+
>
47+
Invalid email format.
48+
</div>
49+
</div>
7750

78-
<div class="devider align-center">
79-
<span> You can also Sign In via </span>
80-
</div>
51+
<!-- Password field -->
52+
<div>
53+
<div class="input-title">
54+
<span>Password</span>
55+
</div>
56+
<div class="input">
57+
<input
58+
placeholder=" Enter New Password"
59+
[type]="getInputType()"
60+
formControlName="password"
61+
required
62+
nbInput
63+
/>
64+
<button
65+
type="button"
66+
nbSuffix
67+
nbButton
68+
ghost
69+
(click)="toggleShowPassword()"
70+
>
71+
<nb-icon
72+
[icon]="showPassword ? 'eye-outline' : 'eye-off-2-outline'"
73+
pack="eva"
74+
[attr.aria-label]="
75+
showPassword ? 'hide password' : 'show password'
76+
"
77+
>
78+
</nb-icon>
79+
</button>
80+
<!-- forgot password link -->
81+
<div class="forgot-password">
82+
<a [routerLink]="['/auth/forgotpassword']">Forgot Password</a>
83+
</div>
84+
</div>
85+
<div
86+
*ngIf="
87+
loginForm.get('password').hasError('required') &&
88+
loginForm.get('password').touched
89+
"
90+
>
91+
Password is required.
92+
</div>
93+
<div
94+
*ngIf="
95+
loginForm.get('password').hasError('minlength') &&
96+
loginForm.get('password').touched
97+
"
98+
>
99+
Password must be at least 6 characters.
100+
</div>
101+
</div>
81102

82-
<!-- Social login button -->
83-
<div class="sign-up-button">
84-
<button nbButton shape="round" size="medium" (click)="loginViaGoogle()">
85-
<img
86-
src="../../../assets/images/auth/image.png"
87-
alt="googlelogo"
88-
margin-let="5px"
89-
draggable="false"
90-
/>
91-
Sign In with Google
92-
</button>
93-
</div>
94-
<div class="align-center footer footer">
95-
<span class="text-center">
96-
I don't have an account in Arc by SourceFuse
97-
<a [routerLink]="['/auth/signup']">Sign Up</a>
98-
</span>
99-
</div>
100-
</div>
103+
<!-- login button -->
104+
<div class="loginbtn">
105+
<button
106+
nbButton
107+
shape="round"
108+
size="medium"
109+
type="submit"
110+
status="basic"
111+
[disabled]="!loginForm.valid"
112+
(click)="onSubmit()"
113+
>
114+
Sign In
115+
</button>
116+
</div>
117+
</form>
118+
119+
<div class="devider align-center">
120+
<span> You can also Sign In via </span>
121+
</div>
122+
123+
<!-- Social login button -->
124+
<div class="sign-up-button">
125+
<button
126+
nbButton
127+
shape="round"
128+
size="medium"
129+
(click)="loginViaGoogle()"
130+
>
131+
<img
132+
src="../../../assets/images/auth/image.png"
133+
alt="googlelogo"
134+
margin-let="5px"
135+
draggable="false"
136+
/>
137+
Sign In with Google
138+
</button>
139+
</div>
140+
<div class="align-center footer footer">
141+
<span class="text-center">
142+
I don't have an account in Arc by SourceFuse
143+
<a [routerLink]="['/auth/signup']">Sign Up</a>
144+
</span>
145+
</div>
146+
</div>
101147
</div>
102148
</nb-card-body>
103149
</nb-card>

0 commit comments

Comments
 (0)