From 07eec64d7db013bf36227fa0a2e4a96a11ae604f Mon Sep 17 00:00:00 2001 From: Damian Freeman Date: Fri, 14 Jul 2023 21:33:11 +0000 Subject: [PATCH 1/3] [Ready]: Staff Directory Rewrite --- getabb.js | 30 --------- index.html | 175 ++++++++++++++--------------------------------------- script.js | 62 +++++++++---------- 3 files changed, 74 insertions(+), 193 deletions(-) delete mode 100644 getabb.js diff --git a/getabb.js b/getabb.js deleted file mode 100644 index 15f69e6..0000000 --- a/getabb.js +++ /dev/null @@ -1,30 +0,0 @@ -function getAbbreviations() { - const map = new Map(); - map.set('FSEN', 'Fellow of Engineering & Software Development [Board Certified]'); - map.set('FSM', 'Fellow of Moderation [Board Certified]'); - map.set('FSCE', 'Fellow of Community Engagement [Board Certified]'); - map.set('FSCR', 'Fellow of Community Relations & Member Support [Board Certified]'); - map.set('FSO', 'Fellow of Operations [Board Certified]'); - map.set('ENP', 'Engineering Practitioner [Board Certified]'); - map.set('MDP', 'Moderation Practitioner [Board Certified]'); - map.set('CEP', 'Community Engagement Practitioner [Board Certified]') - map.set('CRP', 'Community Relations & Member Support Practitioner [Board Certified]'); - map.set('OAP', 'Operations Practitioner [Board Certified]'); - map.set('CE-I', 'Community Relations Intern'); - map.set('ENG-I', 'Engineering Intern'); - map.set('MOD-I', 'Moderation Intern'); - map.set('CRS-I', 'Community Relations & Member Support Intern'); - map.set('OA-I', 'Operations Intern'); - map.set('AD', 'Administrator'); - map.set('SP', 'Supervisor'); - map.set('ST', 'Staff Team/Core Team [Board Certified]'); - map.set('AS-BC', 'Associate - Board Certified'); - map.set('AS', 'Associate - Intern') - return map; -} -function visible() { - document.getElementById('roles').style.display = "table"; -} -function invisible() { - document.getElementById('roles').style.display = "none"; -} diff --git a/index.html b/index.html index 01e7117..13546ac 100644 --- a/index.html +++ b/index.html @@ -1,128 +1,47 @@ - - - - Staff Directory - - - - - - - - - - - - -
-

- Staff Directory - directory.libraryofcode.org -

- - - - - - - - - - - - - -
- - -
-
-
- - - - - - - - -
-
- - - -

Speciality Titles

-

Below are a list of specialty titles. Board Certification is awarded to those who complete internship in a specialty.

-
-
FSCE
-
Fellow of Community Engagement - Community Engagement/Events | Board Certified
-
CEP
-
Community Engagement Practitioner - Community Engagement/Events | Board Certified
-
CE-I
-
Community Engagement/Events | Intern

-
FSEN
-
Fellow of Engineering - Engineering & Software Development | Board Certified
-
ENP
-
Engineering Practitioner - Engineering & Software Development | Board Certified
-
ENG-I
-
Engineering & Software Development | Intern

-
FSM
-
Fellow of Moderation - Moderation | Board Certified
-
MDP
-
Moderation Practitioner - Moderation | Board Certified
-
MOD-I
-
Moderation | Intern

-
FSO
-
Fellow of Operations - Operations & Administration | Board Certified
-
OAP
-
Operations Practitioner - Operations & Administration | Board Certified
-
OA-I
-
Operations & Administration | Intern

-
FSCR
-
Fellow of Community Relations - Community Relations & Member Support | Board Certified
-
CRP
-
Community Relations Practitioner - Community Relations & Member Support | Board Certified
-
CRS-I
-
Community Relations & Member Support | Intern

-
- -

Positional Titles

-

Below are a list of positional rankings which are awarded based on the chain of command.

-
- -
AD
-
Administrator ~ administrator in one or more projects or departments
-
SP
-
Supervisor ~ high-level staff member in one or more departments with authority
-
ST
-
Staff/Core Team | Board Certified ~ board certified Core Team and Staff member

-
AS-BC
-
Associate | Board Certified ~ board certified Associate whom has completed training
-
AS
-
Associate | Intern ~ associate whom is currently an intern/in-training
-
-
-

Member Titles

-

Staff members and Associates are not eligible to receive these titles, they're reserved for community members only.

-
-
RCA
-
Registered Community Ambassador - this member is a registered Community Ambassador. They were nominated by the Staff Team for the role and elected by the community.
-
PRF-C
-
Proficient/Experienced | Board Certified - this member's proficiency credentials in an IT field have been board certified.
-
EdP-C
-
Educational Services Course | Certified - this member was certified by an Educational Services Instructor by taking one of our courses.
-
-
-
© 2021 Library of Code sp-us | Department of Operations
-
-
- - - - + + + + + + + Staff Directory + + + + + + +
+ + + + + + + + + +
NameTitle/DepartmentEmail
+ + + + +
+ + + diff --git a/script.js b/script.js index 11b6b93..30ec6de 100644 --- a/script.js +++ b/script.js @@ -1,56 +1,48 @@ -(async function() { - const fetched = await fetch('https://loc.sh/int/directory'); - //const fetched = await fetch('http://localhost:3890/int/directory'); +(async function () { + const fetched = await fetch("https://loc.sh/int/directory"); const data = await fetched.json(); - const table = document.getElementById('directory'); - const table2 = document.getElementById('roles'); - // users.sort((a, b) => a.firstname.localeCompare(b.firstname)) + const table = document.getElementById("directory"); + let completed = 0; - document.getElementById('loading').innerText += ` ${completed}/${data.length - 1}` + document.getElementById("loading").innerText += ` ${completed}/${ + data.length - 1 + }`; for (const info of data.sort((a, b) => a.name.localeCompare(b.name))) { completed++; - document.getElementById('loading').innerText = `Loading... | ${completed}/${data.length}`; - // console.log(info); - const fetched2 = await fetch(`https://loc.sh/int/directory?id=${info.userID}`); - //const fetched2 = await fetch(`http://localhost:3890/int/directory?id=${info.userID}`); + document.getElementById( + "loading" + ).innerText = `Loading... | ${completed}/${data.length}`; + const fetched2 = await fetch( + `https://loc.sh/int/directory?id=${info.userID}` + ); const user = await fetched2.json(); - // console.log(user); if (!user.staff) continue; + const row = table.insertRow(); - const row2 = table2.insertRow(); let name = `${user.username}`; - let pn = []; - if (info.pn && info.pn.length > 0) { - for (const nominal of info.pn) { - pn.push(`${nominal}`) - } - name += `, ${pn.join(', ')}`; - } - row.insertCell().innerHTML = `${user.username} ${name}`; - // row.insertCell().innerText = `${info.userID} | #${user.discriminator}`; - let departmentAndTitle = ''; + row.insertCell().innerHTML = `${user.username} ${name} ${info.isManager ? " [k]" : ""}`; + + let departmentAndTitle = ""; if (info.title && info.dept) { departmentAndTitle += `${info.title}, ${info.dept}`; } else if (info.dept) { departmentAndTitle += info.dept; } row.insertCell().innerText = departmentAndTitle; - row.insertCell().innerHTML = info.emailAddress ? `${info.emailAddress} ` : ''; - row.insertCell().innerText = user.pager ? user.pager : ''; - row.insertCell().innerText = info.extension ? info.extension : ''; + row.insertCell().innerHTML = info.emailAddress + ? `${info.emailAddress} ` + : ""; - row2.insertCell().innerHTML = `${name}`; - let rankings = '"; } else { - rankings = ''; + rankings = ""; } - row2.insertCell().innerHTML = rankings; } - document.getElementById('loading').style.display = "none"; - document.getElementById('directory').style.display = "block"; + document.getElementById("loading").style.display = "none"; + table.style.display = "block"; })(); -- 2.20.1 From a8c24183a2b794598538d8a3bf442388512e0508 Mon Sep 17 00:00:00 2001 From: Matthew Date: Fri, 14 Jul 2023 17:42:33 -0400 Subject: [PATCH 2/3] add abbr to [k] --- script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.js b/script.js index 30ec6de..2891983 100644 --- a/script.js +++ b/script.js @@ -20,7 +20,7 @@ const row = table.insertRow(); let name = `${user.username}`; - row.insertCell().innerHTML = `${user.username} ${name} ${info.isManager ? " [k]" : ""}`; + row.insertCell().innerHTML = `${user.username} ${name} ${info.isManager ? " [k]" : ""}`; let departmentAndTitle = ""; if (info.title && info.dept) { -- 2.20.1 From fca3b5d813f3a5f54843d65d9c52aa84d2ade5bd Mon Sep 17 00:00:00 2001 From: Damian Freeman Date: Thu, 20 Jul 2023 23:34:01 +0000 Subject: [PATCH 3/3] Update index.html --- index.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.html b/index.html index 13546ac..a9e1c16 100644 --- a/index.html +++ b/index.html @@ -19,6 +19,11 @@ /> +

+ Staff Directory + directory.libraryofcode.org +

+
-- 2.20.1