From a5a732e8fd33ccc81125dbdea7e65020b7266efc Mon Sep 17 00:00:00 2001 From: Matthew R Date: Tue, 6 Jul 2021 14:19:07 -0400 Subject: [PATCH] changes or whatever --- getabb.js | 30 +++++ index.html | 328 +++++++++++++++++++++-------------------------------- script.js | 56 +++++++++ 3 files changed, 214 insertions(+), 200 deletions(-) create mode 100644 getabb.js create mode 100644 script.js diff --git a/getabb.js b/getabb.js new file mode 100644 index 0000000..15f69e6 --- /dev/null +++ b/getabb.js @@ -0,0 +1,30 @@ +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 c8b2a45..01e7117 100644 --- a/index.html +++ b/index.html @@ -1,200 +1,128 @@ - - - - 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
-
CE-I
-
Community Engagement/Events | Intern

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

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

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

-
FSCR
-
Fellow of Community Relations - Community Relations & User Support | Board Certified
-
CRS-I
-
Community Relations & User 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 + + + + + + + + + + + + +
+

+ 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
+
+
+ + + + diff --git a/script.js b/script.js new file mode 100644 index 0000000..11b6b93 --- /dev/null +++ b/script.js @@ -0,0 +1,56 @@ +(async function() { + const fetched = await fetch('https://loc.sh/int/directory'); + //const fetched = await fetch('http://localhost:3890/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)) + let completed = 0; + 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}`); + 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 = ''; + 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 : ''; + + row2.insertCell().innerHTML = `${name}`; + let rankings = ''; + } else { + rankings = ''; + } + row2.insertCell().innerHTML = rankings; + } + document.getElementById('loading').style.display = "none"; + document.getElementById('directory').style.display = "block"; +})();