Implement sidebar component and signing component
This commit is contained in:
@ -1,11 +1,11 @@
|
|||||||
import {NgModule} from '@angular/core';
|
import {NgModule} from '@angular/core';
|
||||||
import {RouterModule, Routes} from '@angular/router';
|
import {RouterModule, Routes} from '@angular/router';
|
||||||
import {HelloComponent} from './components/hello/hello.component';
|
import {SigningComponent} from './components/signing/signing.component';
|
||||||
import {LoginComponent} from './components/login/login.component';
|
import {LoginComponent} from './components/login/login.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{path: "login", component: LoginComponent},
|
{path: "login", component: LoginComponent},
|
||||||
{path: "", component: HelloComponent}
|
{path: "", component: SigningComponent}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -3,7 +3,7 @@ import {BrowserModule} from '@angular/platform-browser';
|
|||||||
|
|
||||||
import {AppRoutingModule} from './app-routing.module';
|
import {AppRoutingModule} from './app-routing.module';
|
||||||
import {AppComponent} from './components/app.component';
|
import {AppComponent} from './components/app.component';
|
||||||
import {HelloComponent} from './components/hello/hello.component';
|
import {SigningComponent} from './components/signing/signing.component';
|
||||||
import {BASE_PATH} from '../gen';
|
import {BASE_PATH} from '../gen';
|
||||||
import {environment} from '../environments/environment';
|
import {environment} from '../environments/environment';
|
||||||
import {HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi} from '@angular/common/http';
|
import {HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi} from '@angular/common/http';
|
||||||
@ -11,12 +11,15 @@ import { LoginComponent } from './components/login/login.component';
|
|||||||
import {FormsModule} from '@angular/forms';
|
import {FormsModule} from '@angular/forms';
|
||||||
import {RequestInterceptor} from './interceptors/request.interceptor';
|
import {RequestInterceptor} from './interceptors/request.interceptor';
|
||||||
import {UnauthorizedInterceptor} from './interceptors/unauthorizedResponseInterceptor';
|
import {UnauthorizedInterceptor} from './interceptors/unauthorizedResponseInterceptor';
|
||||||
|
import {SigningSidebarComponent} from './components/signing/signing-sidebar/signing-sidebar.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
AppComponent,
|
AppComponent,
|
||||||
HelloComponent,
|
SigningComponent,
|
||||||
LoginComponent
|
LoginComponent,
|
||||||
|
SigningSidebarComponent,
|
||||||
|
SigningSidebarComponent
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
|
@ -1 +0,0 @@
|
|||||||
<h1 class="text-3xl font-bold underline">{{ helloValue }}</h1>
|
|
@ -1,26 +0,0 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
|
||||||
import {HelloResponse, HelloService} from '../../../gen';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-hello',
|
|
||||||
standalone: false,
|
|
||||||
templateUrl: './hello.component.html',
|
|
||||||
styleUrl: './hello.component.css'
|
|
||||||
})
|
|
||||||
export class HelloComponent implements OnInit {
|
|
||||||
public helloValue: string = "Loading...";
|
|
||||||
|
|
||||||
constructor(private helloService: HelloService) {
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit(): void {
|
|
||||||
this.helloService.getHello().subscribe({
|
|
||||||
next: (response: HelloResponse): void => {
|
|
||||||
this.helloValue = response.value || "";
|
|
||||||
},
|
|
||||||
error: (err: Error): void => {
|
|
||||||
this.helloValue = err.message;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,17 @@
|
|||||||
|
<div class="w-full h-full bg-white p-6 shadow-lg">
|
||||||
|
<h2 class="text-lg font-semibold mb-2">Signing 4 documents</h2>
|
||||||
|
<p class="text-gray-500 text-sm mb-4">Submitted 5 days ago.</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li class="bg-green-100 text-green-700 p-2 rounded mb-2">✅ Form W-8BEN.pdf</li>
|
||||||
|
<li class="bg-green-100 text-green-700 p-2 rounded mb-2">✅ 1195 - Identity declaration.pdf</li>
|
||||||
|
<li class="bg-gray-200 p-2 rounded mb-2">👁️ CGA.pdf</li>
|
||||||
|
<li class="bg-red-600 text-white p-2 rounded mb-2">⚠️ Review document →</li>
|
||||||
|
<li class="bg-gray-200 p-2 rounded">📄 Terms and conditions for US citizens.pdf</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="mt-6 flex justify-between">
|
||||||
|
<button class="px-4 py-2 bg-gray-300 rounded">Reject all</button>
|
||||||
|
<button class="px-4 py-2 bg-gray-500 text-white rounded" disabled>Confirm signing</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -0,0 +1,23 @@
|
|||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { SigningSidebarComponent } from './signing-sidebar.component';
|
||||||
|
|
||||||
|
describe('SigningSidebarComponent', () => {
|
||||||
|
let component: SigningSidebarComponent;
|
||||||
|
let fixture: ComponentFixture<SigningSidebarComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
declarations: [SigningSidebarComponent]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(SigningSidebarComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
@ -0,0 +1,12 @@
|
|||||||
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-signing-sidebar',
|
||||||
|
standalone: false,
|
||||||
|
|
||||||
|
templateUrl: './signing-sidebar.component.html',
|
||||||
|
styleUrl: './signing-sidebar.component.css'
|
||||||
|
})
|
||||||
|
export class SigningSidebarComponent {
|
||||||
|
|
||||||
|
}
|
19
src/app/components/signing/signing.component.html
Normal file
19
src/app/components/signing/signing.component.html
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<div class="flex h-screen bg-gray-100">
|
||||||
|
<div class="w-1/4">
|
||||||
|
<app-signing-sidebar></app-signing-sidebar>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="w-3/4 p-6">
|
||||||
|
<div class="bg-gray-700 text-white p-4 flex justify-between">
|
||||||
|
<span>Review document before confirming</span>
|
||||||
|
<button class="bg-red-600 px-4 py-2 rounded">Confirm</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="bg-white p-6 shadow-lg mt-4">
|
||||||
|
<h2 class="text-xl font-bold">Dear Mr. Jones</h2>
|
||||||
|
<p class="mt-2 text-gray-700">
|
||||||
|
Evelitat endanda nonsecto bland autemque re exerio volorporeium eos eicabo...
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -1,18 +1,18 @@
|
|||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { HelloComponent } from './hello.component';
|
import { SigningComponent } from './signing.component';
|
||||||
|
|
||||||
describe('HelloComponent', () => {
|
describe('HelloComponent', () => {
|
||||||
let component: HelloComponent;
|
let component: SigningComponent;
|
||||||
let fixture: ComponentFixture<HelloComponent>;
|
let fixture: ComponentFixture<SigningComponent>;
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [HelloComponent]
|
declarations: [SigningComponent]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
|
|
||||||
fixture = TestBed.createComponent(HelloComponent);
|
fixture = TestBed.createComponent(SigningComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
16
src/app/components/signing/signing.component.ts
Normal file
16
src/app/components/signing/signing.component.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import {Component, OnInit} from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-hello',
|
||||||
|
standalone: false,
|
||||||
|
templateUrl: './signing.component.html',
|
||||||
|
styleUrl: './signing.component.css'
|
||||||
|
})
|
||||||
|
export class SigningComponent implements OnInit {
|
||||||
|
constructor() {
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user