From d89b10b3455912000d679996c750527b8426dff7 Mon Sep 17 00:00:00 2001 From: Derek Holloway Date: Tue, 26 Aug 2025 17:28:55 -0700 Subject: [PATCH] Add resume viewer --- .../applicationviewer/appviewer.component.css | 134 ++++++++++++++++++ .../appviewer.component.html | 15 ++ .../applicationviewer/appviewer.component.ts | 48 +++++++ 3 files changed, 197 insertions(+) create mode 100644 src/Client/src/app/pages/applicationviewer/appviewer.component.css create mode 100644 src/Client/src/app/pages/applicationviewer/appviewer.component.html create mode 100644 src/Client/src/app/pages/applicationviewer/appviewer.component.ts diff --git a/src/Client/src/app/pages/applicationviewer/appviewer.component.css b/src/Client/src/app/pages/applicationviewer/appviewer.component.css new file mode 100644 index 0000000..8eecdb8 --- /dev/null +++ b/src/Client/src/app/pages/applicationviewer/appviewer.component.css @@ -0,0 +1,134 @@ +button { + height: 45px; + border-radius: 5px; + margin: 10px; + text-align: center; + padding: 15px 20px; + transition: 0.5s; + background-color: #00000000; + border: 1px solid var(--Mistox-Black); + color: var(--Mistox-Black); + text-decoration: none; + font: inherit; +} + + button:hover { + background-color: #00000044; + color: var(--Mistox-Light); + } + +.top-bar { + width: 100%; + height: 60px; +} + +.content-frame { + background-color: #3c3c3c; + width: calc(100% - 40px); + height: calc(100vh - 400px); + border-radius: 20px; + margin: 10px; + overflow: scroll; + padding: 10px; + color: var(--Mistox-White); +} + +.center-item { + display: flex; + width: 100%; + justify-content: center; +} + +.content-edit { + position: absolute; + right: 20px; +} + +.center-item img { + width: 300px; +} + +.content-name { + width: 300px; + text-align: center; + font-size: 30px; +} + +.content-name h1 { + margin: 0; +} + +.content-link { + display: flex; + width: 300px; + justify-content: center; +} + +.content-link a { + text-decoration: none; + color: var(--Mistox-White); + margin-top: auto; +} + +.content-desc { + border: solid 1px red; + border-radius: 5px; + padding: 20px; + margin: 0 100px; + margin-bottom: 50px; +} + +.content-desc h1 { + margin: 0; + font-size: 20px; + color: #ddd; +} + +.content-button { + display: flex; + justify-content: center; +} + +.content-button span { + align-content: center; +} + +.split-frame { + display: flex; + width: 100%; +} + +.half-frame { + width: 50%; + border-right: solid 1px var(--Mistox-Black); + border-left: solid 1px var(--Mistox-Black); +} + +.half-frame h2 { + text-align: center; +} + +.job-tile { + display: flex; + background-color: var(--Mistox-Black); + justify-content: end; + align-items: center; + border-radius: 10px; + margin: 0 5px; + margin-bottom: 10px; +} + +.center-text { + display: flex; + flex: 1; + justify-content: center; +} + +.job-tile h1 { + margin: 0; +} + +.job-tile button { + color: white; + border-color: white; +} \ No newline at end of file diff --git a/src/Client/src/app/pages/applicationviewer/appviewer.component.html b/src/Client/src/app/pages/applicationviewer/appviewer.component.html new file mode 100644 index 0000000..487c6ff --- /dev/null +++ b/src/Client/src/app/pages/applicationviewer/appviewer.component.html @@ -0,0 +1,15 @@ +
+ @for (application of List; track application.trackUUID){ +
+

{{ application.responseEmail }}

+

{{ application.notes }}

+

{{ application.hasBeenViewed }}

+

{{ application.rating }}

+

{{ application.responseStatus }}

+ +

Date Applied:

{{ application.dateApplied }}

+ + +
+ } +
\ No newline at end of file diff --git a/src/Client/src/app/pages/applicationviewer/appviewer.component.ts b/src/Client/src/app/pages/applicationviewer/appviewer.component.ts new file mode 100644 index 0000000..6de59ae --- /dev/null +++ b/src/Client/src/app/pages/applicationviewer/appviewer.component.ts @@ -0,0 +1,48 @@ +import { Component } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { FormsModule } from '@angular/forms'; +import { Router, ActivatedRoute, RouterModule } from '@angular/router'; +import { Title } from '@angular/platform-browser'; +import { CommonModule } from '@angular/common'; +import { Authentication } from 'app/services/Authentication'; +import { Application } from 'app/models/Application'; + +@Component({ + selector: 'App-Viewer', + templateUrl: './appviewer.component.html', + styleUrls: [ './appviewer.component.css' ], + imports: [ FormsModule, CommonModule, RouterModule ] +}) +export class AppViewerComponent { + public ErrorMsg: string = ""; + + public List: Application[] = []; + + constructor( private http: HttpClient, private router: Router, private route: ActivatedRoute, private title: Title, public auth: Authentication ) { + this.title.setTitle("Applications | BoredCareers"); + if (!auth.isLoggedIn){ + router.navigate(["/"]); + } + }; + + ngOnInit(){ + this.route.queryParams.subscribe(params => { + const JobListingID = params['JobID'] ? +params['JobID'] : null; + if (JobListingID !== null){ + this.http.get("api/application?JobListingID=" + JobListingID).subscribe({ + next: data => { + this.List = data; + }, + error: err => { + this.ErrorMsg = err.error; + } + }); + } + }); + } + + viewResume(app: Application) { + window.open('/resumes/viewer?ResumeID=' + app.resumeID, '_blank'); + } + +} \ No newline at end of file