diff --git a/src/Client/src/app/pages/main/jobs/new/jobnew.component.css b/src/Client/src/app/pages/main/jobs/new/jobnew.component.css index 9d97a2c..3606281 100644 --- a/src/Client/src/app/pages/main/jobs/new/jobnew.component.css +++ b/src/Client/src/app/pages/main/jobs/new/jobnew.component.css @@ -1,3 +1,75 @@ +.title-text { + width: 100%; + text-align: center; +} + +form { + display: grid; + grid-template-areas: "stack"; + position: relative; + width: 100%; + overflow: hidden; + transition: 0.5s; +} + +.center { + width: 100%; + display: flex; + justify-content: center; +} + +.sub-frame { + position: relative; + grid-area: stack; + transition: 0.5s; + width: 100%; + text-align: center; +} + +.content-frame { + background-color: #00000088; + border-radius: 10px; + padding: 40px; + break-inside: avoid; +} + +.split { + column-count: 2; +} + +.half-frame { + width: 400px; + break-inside: avoid; +} + +.content-frame label { + color: #FFF; +} + +.content-frame textarea { + width: calc(100% - 40px); + margin: 0 20px; + height: 200px; + resize: none; +} + +.content-frame input { + width: calc(50% - 24px); + margin: 0 calc(25% + 10px); + margin-bottom: 20px; + appearance: textfield; +} + +.content-frame input:focus ~ label { + color: green; +} + +.content-frame select { + width: calc(50% - 24px); + margin: 0 calc(25% + 10px); + margin-bottom: 20px; +} + .tile-frame { column-count: 4; column-gap: 20px; diff --git a/src/Client/src/app/pages/main/jobs/new/jobnew.component.html b/src/Client/src/app/pages/main/jobs/new/jobnew.component.html index c9e2958..fd17166 100644 --- a/src/Client/src/app/pages/main/jobs/new/jobnew.component.html +++ b/src/Client/src/app/pages/main/jobs/new/jobnew.component.html @@ -1,56 +1,106 @@ +
+

POST A NEW JOB

+
-
-

Title

- -
-
-

Description

- -
-
-
-

Postal Code

- -
-
-

Country

- -
-
-

State/Region

- -
-
-

City

- + +
+
+
+ + + +
-
-
-

Minimum Salary

- -
-
-

Maximum Salary

- + + +
+
+
+ + + + +
-
-

Job Type

- + + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + +
+
-
-

Remote Position

- + + +
+
+
+
+ + +
+
+ + +
+ + +
+
-
- + + +
+
+
+
+ + +
+
+ + +
+ + +
+
+
+ + +
+
+
+ + +
+
\ No newline at end of file diff --git a/src/Client/src/app/pages/main/jobs/new/jobnew.component.ts b/src/Client/src/app/pages/main/jobs/new/jobnew.component.ts index f4a8b35..0d8a586 100644 --- a/src/Client/src/app/pages/main/jobs/new/jobnew.component.ts +++ b/src/Client/src/app/pages/main/jobs/new/jobnew.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, ElementRef, QueryList, ViewChildren } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { FormsModule } from '@angular/forms'; import { Router, ActivatedRoute, RouterModule } from '@angular/router'; @@ -15,6 +15,9 @@ import { Authentication } from 'app/services/Authentication'; }) export class JobNewComponent { + @ViewChildren('step') formSteps!: QueryList>; + currentStep: number = 0; + public newListing: JobListing = new JobListing(); public ErrorMsg: string = ""; @@ -22,6 +25,44 @@ export class JobNewComponent { this.title.setTitle("Jobs - new | BoredCareers"); }; + ngAfterViewInit(){ + this.formSteps.forEach((step: ElementRef, i: number) => { + if (i === this.currentStep) { + step.nativeElement.style.left = '0%'; + } else if (i < this.currentStep) { + step.nativeElement.style.left = '-100%'; + } else { + step.nativeElement.style.left = '100%'; + } + }); + } + + nextStep(){ + this.currentStep += 1; + this.formSteps.forEach((step: ElementRef, i: number) => { + if (i === this.currentStep) { + step.nativeElement.style.left = '0%'; + } else if (i < this.currentStep) { + step.nativeElement.style.left = '-100%'; + } else { + step.nativeElement.style.left = '100%'; + } + }); + } + + prevStep(){ + this.currentStep -= 1; + this.formSteps.forEach((step: ElementRef, i: number) => { + if (i === this.currentStep) { + step.nativeElement.style.left = '0%'; + } else if (i < this.currentStep) { + step.nativeElement.style.left = '-100%'; + } else { + step.nativeElement.style.left = '100%'; + } + }); + } + PostJobListing(jobListing: JobListing){ this.http.post("api/joblisting", jobListing).subscribe({ next: data => {