From f2a5b8b23491886a5d8429f7c6ca8efa0fde0ab1 Mon Sep 17 00:00:00 2001 From: jank Date: Tue, 8 Jul 2025 09:26:32 +0200 Subject: [PATCH] some routing --- public/Untitled.jpeg | Bin 0 -> 9454 bytes src/app/app.routes.ts | 16 ++++++- src/app/dashboard/container/container.css | 0 src/app/dashboard/container/container.html | 2 + src/app/dashboard/container/container.spec.ts | 23 ++++++++++ src/app/dashboard/container/container.ts | 11 +++++ .../dashboard-navbar/dashboard-navbar.css | 0 .../dashboard-navbar/dashboard-navbar.html | 7 +++ .../dashboard-navbar/dashboard-navbar.spec.ts | 23 ++++++++++ .../dashboard-navbar/dashboard-navbar.ts | 10 ++++ .../dashboard-users/dashboard-users.css | 0 .../dashboard-users/dashboard-users.html | 3 ++ .../dashboard-users/dashboard-users.spec.ts | 23 ++++++++++ .../dashboard-users/dashboard-users.ts | 10 ++++ src/app/dashboard/dashboard.css | 0 src/app/dashboard/dashboard.html | 1 + src/app/dashboard/dashboard.spec.ts | 23 ++++++++++ src/app/dashboard/dashboard.ts | 11 +++++ src/app/login/login.html | 2 + src/app/login/login.ts | 9 ++-- src/app/register/register.html | 43 +++++++++++++++++- src/app/register/register.ts | 30 ++++++++---- 22 files changed, 231 insertions(+), 16 deletions(-) create mode 100644 public/Untitled.jpeg create mode 100644 src/app/dashboard/container/container.css create mode 100644 src/app/dashboard/container/container.html create mode 100644 src/app/dashboard/container/container.spec.ts create mode 100644 src/app/dashboard/container/container.ts create mode 100644 src/app/dashboard/dashboard-navbar/dashboard-navbar.css create mode 100644 src/app/dashboard/dashboard-navbar/dashboard-navbar.html create mode 100644 src/app/dashboard/dashboard-navbar/dashboard-navbar.spec.ts create mode 100644 src/app/dashboard/dashboard-navbar/dashboard-navbar.ts create mode 100644 src/app/dashboard/dashboard-users/dashboard-users.css create mode 100644 src/app/dashboard/dashboard-users/dashboard-users.html create mode 100644 src/app/dashboard/dashboard-users/dashboard-users.spec.ts create mode 100644 src/app/dashboard/dashboard-users/dashboard-users.ts create mode 100644 src/app/dashboard/dashboard.css create mode 100644 src/app/dashboard/dashboard.html create mode 100644 src/app/dashboard/dashboard.spec.ts create mode 100644 src/app/dashboard/dashboard.ts diff --git a/public/Untitled.jpeg b/public/Untitled.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..23b441805c6d4fa9f2ee00ed274dbac6362805cf GIT binary patch literal 9454 zcmX|mWl)^K()9z2Cb+x11$PJ%2<~pd-95Ow2DczV7u^7h2X}W{+#z_71OjjFSNFT! zT|HBCPMzvMQ#C#Py7IaWU@6GT%K~t4008&Tf!B2)0zgGV#=*tG$Hm3P$Hylm#3%Ys z5dPZ{;S>BP{d00ADk5@vQbIy%E^2yaRt^phLP{P%9(DmHb`Dm!H*elxpkt6?VUe=a zQ_{a?z|X4 zfK!D)IyDeVU4^b1h~`Tn zUW6LRyq$S*Rw8Pd#6VhNppLgG9Y{4+RFoh%tKxa1UxZOtR|X$~)6N*QG$C_+CIAQ!5xWKCTEoscTp^?U^<6SYZW;EJ;@?t zZ&~n=@nI!5+YmX!!_XxC1o3;@0CC0JdAaMk)=0d;R`C99MP8~h8X_}sR61hDg+(&8 z_7wfJ@Y$G+^2@>mdnS908mm>cZax;qh68x8!|VgOLlv)vqoSZlMdl|>O8X|ZgFkit zn3p;bLib|(Nppy!*KG+`!&e0ilR?<8*Ez5T7{J!UVQGWGC;A=6j82~Rk4aLv@->{tz?Ftrn#JLQ%e!kq853`J8Vr3 z3itHx;k`YgO@cTh4%FmOtv3Ok0Vz&&I{&8w>QRD9ejx8bTVwZNjlrLM+!_0z1y;hf zgJ)E6%U3{BQg9eU(cEJ{e3zsN@DjdFw999A%q!DyMk}F1O7x-|!1(01|7_r#Ic#uZ z_lair@d=V&_5J|;6==85dQ5zvmTsf#(Vmmv2dW^jH@_`lpEW!b2%2+GTr0 zVU^#OaCdO6bM;`dkhRk~gPw!xC9DLQAL)`0@&Fb}? z<)RkP88n;^4#!^N3uauGemh!Mrva8JB^a8>Il0hf5LvyKG}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!EQhhzLjAsvOD5uAm%&eE>^ynK4E?x1d0fqEF03HUHGohBaM|Ila^`D@la^NEszndE!^P zK7EjW%77QHpWU~rgwEs}$vw}J)bo6*aUc)vt=M<8;<-zo9iIxtf`yx%SBt=?WS;Z0 zhv2nlom4xFcyI6=pN4Ez#xb@dpRhfGeULqTq*rdu{m5DcyPQF2M!1ap=6t@gc00=Y zZV3C^G-EBN4T|)1M2e^fsaWoSsKac%f?qd9-mT$0IilN`@BWmCJwFF^G0zg1Gz7o9 zG%~PnZG-PX_w$@DpbmQs#Tj3~Y%zcfl%q@Ptd)Mj2H=wT= zMlOwE{IM9O_JpS~@nL3EqGKaR_78<<-qTF}Cy?hx;800(RE8VRH+9q91auhoFYpl@ zS@rBS5$n4#%(KHtb6;kX%G87IL2-F?+o6|1`6qI_D9m&Xe$ZH1?l*qU^t-;<`LObr zak(M|Gw@)im^i6_SEwhOyJFH5nUM@2Q|YH z4O~(TvKH$+9Y$)BVDJgQt!w_2^q2PUr@4C9de9Zu}GMRU*TB!PMt#RA>9mJAE9#?T}Z(1WdzMK-2&$2w$C$TDzTKPYT`I?I|(Ie zZEC86v`m$J@ca}d{I>m-mE + import('./dashboard/container/container').then((c) => c.Container), + children: [ + { + path: 'dashboard', + component: Dashboard, + }, + { + path: 'users', + component: DashboardUsers, + }, + ], }, { path: 'login', diff --git a/src/app/dashboard/container/container.css b/src/app/dashboard/container/container.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/dashboard/container/container.html b/src/app/dashboard/container/container.html new file mode 100644 index 0000000..143b127 --- /dev/null +++ b/src/app/dashboard/container/container.html @@ -0,0 +1,2 @@ + + diff --git a/src/app/dashboard/container/container.spec.ts b/src/app/dashboard/container/container.spec.ts new file mode 100644 index 0000000..217460a --- /dev/null +++ b/src/app/dashboard/container/container.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { Container } from './container'; + +describe('Container', () => { + let component: Container; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [Container] + }) + .compileComponents(); + + fixture = TestBed.createComponent(Container); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/dashboard/container/container.ts b/src/app/dashboard/container/container.ts new file mode 100644 index 0000000..06f20cb --- /dev/null +++ b/src/app/dashboard/container/container.ts @@ -0,0 +1,11 @@ +import { Component } from '@angular/core'; +import { RouterOutlet } from '@angular/router'; +import { DashboardNavbar } from '../dashboard-navbar/dashboard-navbar'; + +@Component({ + selector: 'app-container', + imports: [RouterOutlet, DashboardNavbar], + templateUrl: './container.html', + styleUrl: './container.css', +}) +export class Container {} diff --git a/src/app/dashboard/dashboard-navbar/dashboard-navbar.css b/src/app/dashboard/dashboard-navbar/dashboard-navbar.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/dashboard/dashboard-navbar/dashboard-navbar.html b/src/app/dashboard/dashboard-navbar/dashboard-navbar.html new file mode 100644 index 0000000..24fa9ef --- /dev/null +++ b/src/app/dashboard/dashboard-navbar/dashboard-navbar.html @@ -0,0 +1,7 @@ + diff --git a/src/app/dashboard/dashboard-navbar/dashboard-navbar.spec.ts b/src/app/dashboard/dashboard-navbar/dashboard-navbar.spec.ts new file mode 100644 index 0000000..57ef083 --- /dev/null +++ b/src/app/dashboard/dashboard-navbar/dashboard-navbar.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DashboardNavbar } from './dashboard-navbar'; + +describe('DashboardNavbar', () => { + let component: DashboardNavbar; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [DashboardNavbar] + }) + .compileComponents(); + + fixture = TestBed.createComponent(DashboardNavbar); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/dashboard/dashboard-navbar/dashboard-navbar.ts b/src/app/dashboard/dashboard-navbar/dashboard-navbar.ts new file mode 100644 index 0000000..398b2dd --- /dev/null +++ b/src/app/dashboard/dashboard-navbar/dashboard-navbar.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; +import { RouterLink } from '@angular/router'; + +@Component({ + selector: 'app-dashboard-navbar', + imports: [RouterLink], + templateUrl: './dashboard-navbar.html', + styleUrl: './dashboard-navbar.css', +}) +export class DashboardNavbar {} diff --git a/src/app/dashboard/dashboard-users/dashboard-users.css b/src/app/dashboard/dashboard-users/dashboard-users.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/dashboard/dashboard-users/dashboard-users.html b/src/app/dashboard/dashboard-users/dashboard-users.html new file mode 100644 index 0000000..10ece67 --- /dev/null +++ b/src/app/dashboard/dashboard-users/dashboard-users.html @@ -0,0 +1,3 @@ +

dashboard-users works!

+ + diff --git a/src/app/dashboard/dashboard-users/dashboard-users.spec.ts b/src/app/dashboard/dashboard-users/dashboard-users.spec.ts new file mode 100644 index 0000000..b1b4989 --- /dev/null +++ b/src/app/dashboard/dashboard-users/dashboard-users.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DashboardUsers } from './dashboard-users'; + +describe('DashboardUsers', () => { + let component: DashboardUsers; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [DashboardUsers] + }) + .compileComponents(); + + fixture = TestBed.createComponent(DashboardUsers); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/dashboard/dashboard-users/dashboard-users.ts b/src/app/dashboard/dashboard-users/dashboard-users.ts new file mode 100644 index 0000000..fcf31e3 --- /dev/null +++ b/src/app/dashboard/dashboard-users/dashboard-users.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; +import { RouterLink } from '@angular/router'; + +@Component({ + selector: 'app-dashboard-users', + imports: [], + templateUrl: './dashboard-users.html', + styleUrl: './dashboard-users.css', +}) +export class DashboardUsers {} diff --git a/src/app/dashboard/dashboard.css b/src/app/dashboard/dashboard.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/dashboard/dashboard.html b/src/app/dashboard/dashboard.html new file mode 100644 index 0000000..3e762dd --- /dev/null +++ b/src/app/dashboard/dashboard.html @@ -0,0 +1 @@ +

Dashboard Home

diff --git a/src/app/dashboard/dashboard.spec.ts b/src/app/dashboard/dashboard.spec.ts new file mode 100644 index 0000000..d4f1a13 --- /dev/null +++ b/src/app/dashboard/dashboard.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { Dashboard } from './dashboard'; + +describe('Dashboard', () => { + let component: Dashboard; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [Dashboard] + }) + .compileComponents(); + + fixture = TestBed.createComponent(Dashboard); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/dashboard/dashboard.ts b/src/app/dashboard/dashboard.ts new file mode 100644 index 0000000..dcfff61 --- /dev/null +++ b/src/app/dashboard/dashboard.ts @@ -0,0 +1,11 @@ +import { Component } from '@angular/core'; +import { RouterLink, RouterOutlet } from '@angular/router'; +import { DashboardNavbar } from './dashboard-navbar/dashboard-navbar'; + +@Component({ + selector: 'app-dashboard', + imports: [RouterLink, RouterOutlet, DashboardNavbar], + templateUrl: './dashboard.html', + styleUrl: './dashboard.css', +}) +export class Dashboard {} diff --git a/src/app/login/login.html b/src/app/login/login.html index 147cfc4..52430ca 100644 --- a/src/app/login/login.html +++ b/src/app/login/login.html @@ -1 +1,3 @@

login works!

+ + diff --git a/src/app/login/login.ts b/src/app/login/login.ts index c39dbb9..7027c09 100644 --- a/src/app/login/login.ts +++ b/src/app/login/login.ts @@ -1,11 +1,10 @@ import { Component } from '@angular/core'; +import { RouterLink } from '@angular/router'; @Component({ selector: 'app-login', - imports: [], + imports: [RouterLink], templateUrl: './login.html', - styleUrl: './login.css' + styleUrl: './login.css', }) -export class Login { - -} +export class Login {} diff --git a/src/app/register/register.html b/src/app/register/register.html index 6b0ba2e..48507e2 100644 --- a/src/app/register/register.html +++ b/src/app/register/register.html @@ -1 +1,42 @@ -

register works!

+
+ + + +

Address

+
+ + + + + + +
+ +
diff --git a/src/app/register/register.ts b/src/app/register/register.ts index b0da4cc..b87d497 100644 --- a/src/app/register/register.ts +++ b/src/app/register/register.ts @@ -1,9 +1,14 @@ import { Component } from '@angular/core'; -import { FormControl, FormGroup, Validators } from '@angular/forms'; +import { + FormControl, + FormGroup, + ReactiveFormsModule, + Validators, +} from '@angular/forms'; @Component({ selector: 'app-register', - imports: [], + imports: [ReactiveFormsModule], templateUrl: './register.html', styleUrl: './register.css', }) @@ -12,17 +17,26 @@ export class Register { ngOnInit() { this.registrationForm = new FormGroup({ - email: new FormControl('', Validators.required), + email: new FormControl('', [Validators.required, Validators.email]), username: new FormControl('', Validators.required), password: new FormControl('', Validators.required), address: new FormGroup({ - street1: new FormControl(''), + street1: new FormControl('', Validators.required), street2: new FormControl(''), - city: new FormControl(''), - state: new FormControl(''), - zip: new FormControl(''), - country: new FormControl(''), + city: new FormControl('', Validators.required), + state: new FormControl('', Validators.required), + zip: new FormControl('', [Validators.required]), + country: new FormControl('', Validators.required), }), }); } + + submit() { + if (!this.registrationForm.valid) { + for (const control in this.registrationForm.controls) { + console.log(this.registrationForm.controls[control].errors); + } + return; + } + } }