From 964974fd65ff5f15a1a5a02afd4720a034442649 Mon Sep 17 00:00:00 2001 From: Ernesto Jr Fundal Osorio <114483893+nyolarraklay@users.noreply.github.com> Date: Tue, 9 Jan 2024 19:32:11 +0100 Subject: [PATCH 1/4] absolute path for logo svg --- index.html | 81 ++++++++++++++++++++++++++------ src/js/api/auth/login.js | 4 +- src/js/api/users/editStudent.js | 3 +- src/js/ui/header/index.js | 7 ++- src/js/ui/header/logoutRender.js | 4 +- 5 files changed, 77 insertions(+), 22 deletions(-) diff --git a/index.html b/index.html index 2a524684..05cced9d 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,12 @@ - +
@@ -20,9 +25,16 @@
-

Welcome to Noroff Job Agency, where industry and eductation meets

+

+ Welcome to Noroff Job Agency, where industry and eductation meets +

- +
@@ -31,42 +43,81 @@

Welcome to Norof
-
+

Your direct access to Noroff's best candidates

- Three people with laptops and notebooks laughing together at a table. + Three people with laptops and notebooks laughing together at a table.
-

Your direct access to Noroff's best candidates

-

Find talents for your organisation. Noroff Jobs offers a unique advantage over other recruitment platforms. As a platform designed, developed, and maintained by students at Noroff, it provides direct access to a talented pool of candidates with diverse skillsets, ranging from 3D design to software development and artificial intelligence.

-

We invite you to take advantage of our platform by submitting your job listing for free. Partner with Noroff Jobs and expand your team with highly skilled and motivated individuals.

+

+ Your direct access to Noroff's best candidates +

+

+ Find talents for your organisation. Noroff Jobs + offers a unique advantage over other recruitment platforms. As a platform designed, + developed, and maintained by students at Noroff, it provides direct access to a + talented pool of candidates with diverse skillsets, ranging from 3D design to software + development and artificial intelligence. +

+

+ We invite you to take advantage of our platform by submitting your job listing for + free. Partner with Noroff Jobs and expand your team with highly skilled and motivated + individuals. +

-
+

Your direct access to industry

-

Meet your next employer today. Showcase your unique skill sets with Noroff Jobs. Our platform, designed by and for students, provides you with an exclusive opportunity to find your next employer. With listings from a wide variety of organisations, you can browse and discover your dream job.

-

Whether your talents lie in software development, design or security, we want to be your partner in achieving your career goals. Join Noroff Jobs today.

+

+ Meet your next employer today. Showcase your unique + skill sets with Noroff Jobs. Our platform, designed by and for students, provides you + with an exclusive opportunity to find your next employer. With listings from a wide + variety of organisations, you can browse and discover your dream job. +

+

+ Whether your talents lie in software development, design or security, we want to be + your partner in achieving your career goals. Join Noroff Jobs today. +

Your direct access to Noroff's best candidates

- Man presenting in front of a group of men in a meeting. + Man presenting in front of a group of men in a meeting.
- diff --git a/src/js/api/auth/login.js b/src/js/api/auth/login.js index 53263df0..10f5b8d7 100644 --- a/src/js/api/auth/login.js +++ b/src/js/api/auth/login.js @@ -68,11 +68,11 @@ export async function login(profile) { // add chck for id : if (id === id) { // spiderman.gif - window.location.replace('/pages/user/index'); + window.location.replace('../../../pages/user/index.html'); } else if (profile.admin) { window.location.replace('#'); // TODO: Add admin page url } else { - window.location.replace('/pages/user/index.html'); + window.location.replace('../../../pages/user/index.html'); } break; case 403: diff --git a/src/js/api/users/editStudent.js b/src/js/api/users/editStudent.js index a45f5d72..10a117c4 100644 --- a/src/js/api/users/editStudent.js +++ b/src/js/api/users/editStudent.js @@ -12,7 +12,8 @@ const action = 'users/'; */ export async function editStudent(profile) { - const { id } = profile; + const id = JSON.parse(localStorage.getItem('id')); + console.log(id); const profileURL = apiPath + action + `${id}`; const body = JSON.stringify(profile); const options = { diff --git a/src/js/ui/header/index.js b/src/js/ui/header/index.js index 1b6c4461..309bdfed 100644 --- a/src/js/ui/header/index.js +++ b/src/js/ui/header/index.js @@ -15,7 +15,7 @@ export const header = () => {
- +
Noroff Job Agency @@ -51,8 +51,11 @@ pageTitle.innerText = 'Standard'; */ export const checkState = () => { const role = localStorage.getItem('Role'); + console.log(role); const navBarNav = document.getElementById('navbarNav'); - if (role == 'user') { + + if (role == 'Applicant') { + navBarNav.innerText = 'hello'; return (navBarNav.innerHTML = `
`); }; -// For testing states -const stateValue = 'null'; -localStorage.setItem('Role', stateValue); let pageTitle = document.querySelector('title'); pageTitle.innerText = 'Standard'; @@ -50,12 +49,12 @@ pageTitle.innerText = 'Standard'; * */ export const checkState = () => { - const role = localStorage.getItem('Role'); + const role = JSON.parse(localStorage.getItem('role')); console.log(role); const navBarNav = document.getElementById('navbarNav'); - if (role == 'Applicant') { - navBarNav.innerText = 'hello'; + if (role === 'Applicant') { + // checkLoginStatus(); return (navBarNav.innerHTML = `
From 7e5a2559bdd7650e6f6cea07b6d45c0a9bfedd38 Mon Sep 17 00:00:00 2001 From: Ernesto Jr Fundal Osorio <114483893+nyolarraklay@users.noreply.github.com> Date: Wed, 10 Jan 2024 09:08:01 +0000 Subject: [PATCH 4/4] link search and sort icons to correct path --- pages/listings/index.html | 60 ++++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 19 deletions(-) diff --git a/pages/listings/index.html b/pages/listings/index.html index 75343b2f..7a9d46cb 100644 --- a/pages/listings/index.html +++ b/pages/listings/index.html @@ -5,19 +5,27 @@ - + Noroff Jobs - +
-
+
@@ -26,18 +34,38 @@

Job Listings

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

-
- -
+