Skip to content

Commit

Permalink
Role management with features
Browse files Browse the repository at this point in the history
  • Loading branch information
devyaniofficial committed Jan 9, 2024
1 parent eba09cf commit f1f7c72
Show file tree
Hide file tree
Showing 53 changed files with 8,222 additions and 14,213 deletions.
20,679 changes: 6,726 additions & 13,953 deletions package-lock.json

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
16 changes: 8 additions & 8 deletions projects/arc-lib/src/lib/components/auth/auth-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';

import { AuthComponent } from './auth.component';
import { LoginComponent } from './login/login.component';
import { SignupComponent } from './signup/signup.component';
import { ForgotPasswordComponent } from './forgot-password/forgot-password.component';
import { ResetPasswordComponent } from './reset-password/reset-password.component';
import {AuthComponent} from './auth.component';
import {LoginComponent} from './login/login.component';
import {SignupComponent} from './signup/signup.component';
import {ForgotPasswordComponent} from './forgot-password/forgot-password.component';
import {ResetPasswordComponent} from './reset-password/reset-password.component';

const routes: Routes = [
{
Expand All @@ -27,7 +27,7 @@ const routes: Routes = [
{
path: 'resetpassword',
component: ResetPasswordComponent,
}
},
],
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
<router-outlet></router-outlet>
</nb-auth-block>
</nb-layout-column>
</nb-layout>
</nb-layout>
4 changes: 2 additions & 2 deletions projects/arc-lib/src/lib/components/auth/auth.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
.card-row {
flex-grow: 0 !important;
flex-shrink: 0 !important;
flex-basis: 35% !important;
}
flex-basis: 35% !important;
}
16 changes: 11 additions & 5 deletions projects/arc-lib/src/lib/components/auth/auth.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,18 @@ import {AuthRoutingModule} from './auth-routing.module';
import {AuthComponent} from './auth.component';
import {LoginComponent} from './login/login.component';

import { SignupComponent } from './signup/signup.component';
import { ForgotPasswordComponent } from './forgot-password/forgot-password.component';
import { ResetPasswordComponent } from './reset-password/reset-password.component';
import {SignupComponent} from './signup/signup.component';
import {ForgotPasswordComponent} from './forgot-password/forgot-password.component';
import {ResetPasswordComponent} from './reset-password/reset-password.component';

@NgModule({
declarations: [LoginComponent, AuthComponent, SignupComponent, ForgotPasswordComponent, ResetPasswordComponent],
declarations: [
LoginComponent,
AuthComponent,
SignupComponent,
ForgotPasswordComponent,
ResetPasswordComponent,
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [
CommonModule,
Expand All @@ -29,7 +35,7 @@ import { ResetPasswordComponent } from './reset-password/reset-password.componen
HttpClientModule,
NbLayoutModule,
TranslateModule,
NbThemeModule.forRoot(),
NbThemeModule.forRoot({name: 'boiler'}),
NbAuthModule.forRoot({
strategies: [
NbPasswordAuthStrategy.setup({
Expand Down
226 changes: 136 additions & 90 deletions projects/arc-lib/src/lib/components/auth/login/login.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,102 +2,148 @@
<nb-card-body class="m-0">
<div>
<img [src]="imageUrl" [alt]="altText" draggable="false" />


</div>
<div class="main-wrapper">
<div>
<div class="sign-in-title">
<h2>Sign In</h2>
<h3>Welcome to Arc by SourceFuse</h3>
<p>
Cut down your application development process to 60% Sign In to your
account
</p>
</div>
<div class="sign-in-title">
<h2>Sign In</h2>
<h3>Welcome to Arc by SourceFuse</h3>
<p>
Cut down your application development process to 60% Sign In to your
account
</p>
</div>

<form [formGroup]="loginForm" (ngSubmit)="onSubmit()">
<!-- Email field -->
<div>
<div class="input-title">
<span>Email</span>
</div>
<div class="input">
<input type="text" placeholder="Email" nbInput fieldSize="medium" formControlName="email" required/>
</div>
<div *ngIf="loginForm.get('email').hasError('required') && loginForm.get('email').touched">
Email is required.
</div>
<div *ngIf="loginForm.get('email').hasError('email') && loginForm.get('email').touched">
Invalid email format.
</div>
</div>

<!-- Password field -->
<div>
<div class="input-title">
<span>Password</span>
</div>
<div class="input">
<input placeholder=" Enter New Password" [type]="getInputType()" formControlName="password" required nbInput>
<button type="button" nbSuffix nbButton ghost (click)="toggleShowPassword()">
<nb-icon [icon]="showPassword ? 'eye-outline' : 'eye-off-2-outline'"
pack="eva"
[attr.aria-label]="showPassword ? 'hide password' : 'show password'">
</nb-icon>
</button>
<!-- forgot password link -->
<div class="forgot-password">
<a [routerLink]="['/auth/forgotpassword']">Forgot Password</a>
</div>
</div>
<div *ngIf="loginForm.get('password').hasError('required') && loginForm.get('password').touched">
Password is required.
</div>
<div *ngIf="loginForm.get('password').hasError('minlength') && loginForm.get('password').touched">
Password must be at least 6 characters.
</div>
</div>

<!-- login button -->
<div class="loginbtn">
<button
nbButton
shape="round"
size="medium"
type="submit"
status="basic"
[disabled]="!loginForm.valid"
(click)="onSubmit()"
>
Sign In
</button>
</div>
</form>
<form [formGroup]="loginForm">
<!-- Email field -->
<div>
<div class="input-title">
<span>Email</span>
</div>
<div class="input">
<input
type="text"
placeholder="Email"
nbInput
fieldSize="medium"
formControlName="email"
required
/>
</div>
<div
*ngIf="
loginForm.get('email').hasError('required') &&
loginForm.get('email').touched
"
>
Email is required.
</div>
<div
*ngIf="
loginForm.get('email').hasError('email') &&
loginForm.get('email').touched
"
>
Invalid email format.
</div>
</div>

<div class="devider align-center">
<span> You can also Sign In via </span>
</div>
<!-- Password field -->
<div>
<div class="input-title">
<span>Password</span>
</div>
<div class="input">
<input
placeholder=" Enter New Password"
[type]="getInputType()"
formControlName="password"
required
nbInput
/>
<button
type="button"
nbSuffix
nbButton
ghost
(click)="toggleShowPassword()"
>
<nb-icon
[icon]="showPassword ? 'eye-outline' : 'eye-off-2-outline'"
pack="eva"
[attr.aria-label]="
showPassword ? 'hide password' : 'show password'
"
>
</nb-icon>
</button>
<!-- forgot password link -->
<div class="forgot-password">
<a [routerLink]="['/auth/forgotpassword']">Forgot Password</a>
</div>
</div>
<div
*ngIf="
loginForm.get('password').hasError('required') &&
loginForm.get('password').touched
"
>
Password is required.
</div>
<div
*ngIf="
loginForm.get('password').hasError('minlength') &&
loginForm.get('password').touched
"
>
Password must be at least 6 characters.
</div>
</div>

<!-- Social login button -->
<div class="sign-up-button">
<button nbButton shape="round" size="medium" (click)="loginViaGoogle()">
<img
src="../../../assets/images/auth/image.png"
alt="googlelogo"
margin-let="5px"
draggable="false"
/>
Sign In with Google
</button>
</div>
<div class="align-center footer footer">
<span class="text-center">
I don't have an account in Arc by SourceFuse
<a [routerLink]="['/auth/signup']">Sign Up</a>
</span>
</div>
</div>
<!-- login button -->
<div class="loginbtn">
<button
nbButton
shape="round"
size="medium"
type="submit"
status="basic"
[disabled]="!loginForm.valid"
(click)="onSubmit()"
>
Sign In
</button>
</div>
</form>

<div class="devider align-center">
<span> You can also Sign In via </span>
</div>

<!-- Social login button -->
<div class="sign-up-button">
<button
nbButton
shape="round"
size="medium"
(click)="loginViaGoogle()"
>
<img
src="../../../assets/images/auth/image.png"
alt="googlelogo"
margin-let="5px"
draggable="false"
/>
Sign In with Google
</button>
</div>
<div class="align-center footer footer">
<span class="text-center">
I don't have an account in Arc by SourceFuse
<a [routerLink]="['/auth/signup']">Sign Up</a>
</span>
</div>
</div>
</div>
</nb-card-body>
</nb-card>
Loading

0 comments on commit f1f7c72

Please sign in to comment.