diff --git a/firebase/dbOperations.ts b/firebase/dbOperations.ts index 5e683cfc..4702f7e8 100755 --- a/firebase/dbOperations.ts +++ b/firebase/dbOperations.ts @@ -19,7 +19,7 @@ import { TPayloadReviews, TPayloadSemesters, TPayloadSpecializations, -} from '../globals/types' +} from '@globals/types' import { parseReviewId } from './utilityFunctions' import { addOrUpdateReview, @@ -290,8 +290,9 @@ export const getReviews = async ( export const getReviewsRecent50 = async () => { try { const snapshot = await getDoc(doc(db, baseDocumentReviewsRecent50)) - const recentReviews50 = snapshot.data() - return recentReviews50 ?? null + const data = snapshot.data() + const recentReviews50: Review[] = data ? data?.data : [] + return recentReviews50 } catch (e: any) { console.log(e) throw new Error(e) diff --git a/globals/staticDataModels.ts b/globals/staticDataModels.ts index a43e0ca6..6ac6c216 100644 --- a/globals/staticDataModels.ts +++ b/globals/staticDataModels.ts @@ -6,6 +6,7 @@ import { TPayloadSemesters, TPayloadSpecializations, TPayloadSubjectAreas, + TPayloadCoursesDataStatic, } from '@globals/types' export const departments: TPayloadDepartments = { @@ -169,3 +170,630 @@ export const grades: TPayloadGrades = { b: { gradeId: 'b', name: 'B' }, a: { gradeId: 'a', name: 'A' }, } + +export const courses: TPayloadCoursesDataStatic = { + 'CS-6035': { + courseId: 'CS-6035', + name: 'Introduction to Information Security', + departmentId: 'CS', + courseNumber: '6035', + }, + 'CS-6150': { + courseId: 'CS-6150', + name: 'Computing for Good', + departmentId: 'CS', + courseNumber: '6150', + }, + 'CS-6200': { + courseId: 'CS-6200', + name: 'Graduate Introduction to Operating Systems', + departmentId: 'CS', + courseNumber: '6200', + }, + 'CS-6210': { + courseId: 'CS-6210', + name: 'Advanced Operating Systems', + departmentId: 'CS', + courseNumber: '6210', + }, + 'CS-6238': { + courseId: 'CS-6238', + name: 'Secure Computer Systems', + departmentId: 'CS', + courseNumber: '6238', + }, + 'CS-6250': { + courseId: 'CS-6250', + name: 'Computer Networks', + departmentId: 'CS', + courseNumber: '6250', + }, + 'CS-6260': { + courseId: 'CS-6260', + name: 'Applied Cryptography', + departmentId: 'CS', + courseNumber: '6260', + }, + 'CS-6262': { + courseId: 'CS-6262', + name: 'Network Security', + departmentId: 'CS', + courseNumber: '6262', + }, + 'CS-6263': { + courseId: 'CS-6263', + name: 'Intro to Cyber-Physical Systems Security', + departmentId: 'CS', + courseNumber: '6263', + }, + 'CS-6264': { + courseId: 'CS-6264', + name: 'Information Security Lab: System and Network Defenses', + departmentId: 'CS', + courseNumber: '6264', + }, + 'CS-6265': { + courseId: 'CS-6265', + name: 'Information Security Laboratory', + departmentId: 'CS', + courseNumber: '6265', + }, + 'CS-6266': { + courseId: 'CS-6266', + name: 'Information Security Practicum', + departmentId: 'CS', + courseNumber: '6266', + }, + 'CS-6290': { + courseId: 'CS-6290', + name: 'High-Performance Computer Architecture', + departmentId: 'CS', + courseNumber: '6290', + }, + 'CS-6291': { + courseId: 'CS-6291', + name: 'Embedded Software Optimizations', + departmentId: 'CS', + courseNumber: '6291', + }, + 'CS-6300': { + courseId: 'CS-6300', + name: 'Software Development Process', + departmentId: 'CS', + courseNumber: '6300', + }, + 'CS-6310': { + courseId: 'CS-6310', + name: 'Software Architecture and Design', + departmentId: 'CS', + courseNumber: '6310', + }, + 'CS-6340': { + courseId: 'CS-6340', + name: 'Advanced Topics in Software Analysis and Testing', + departmentId: 'CS', + courseNumber: '6340', + }, + 'CS-6400': { + courseId: 'CS-6400', + name: 'Database Systems Concepts and Design', + departmentId: 'CS', + courseNumber: '6400', + }, + 'CS-6440': { + courseId: 'CS-6440', + name: 'Introduction to Health Informatics', + departmentId: 'CS', + courseNumber: '6440', + }, + 'CS-6457': { + courseId: 'CS-6457', + name: 'Video Game Design and Programming', + departmentId: 'CS', + courseNumber: '6457', + }, + 'CS-6460': { + courseId: 'CS-6460', + name: 'Educational Technology: Conceptual Foundations', + departmentId: 'CS', + courseNumber: '6460', + }, + 'CS-6465': { + courseId: 'CS-6465', + name: 'Computational Journalism', + departmentId: 'CS', + courseNumber: '6465', + }, + 'CS-6475': { + courseId: 'CS-6475', + name: 'Computational Photography', + departmentId: 'CS', + courseNumber: '6475', + }, + 'CS-6476': { + courseId: 'CS-6476', + name: 'Introduction to Computer Vision', + departmentId: 'CS', + courseNumber: '6476', + }, + 'CS-6515': { + courseId: 'CS-6515', + name: 'Introduction to Graduate Algorithms', + departmentId: 'CS', + courseNumber: '6515', + }, + 'CS-6601': { + courseId: 'CS-6601', + name: 'Artificial Intelligence', + departmentId: 'CS', + courseNumber: '6601', + }, + 'CS-6603': { + courseId: 'CS-6603', + name: 'AI, Ethics, and Society', + departmentId: 'CS', + courseNumber: '6603', + }, + 'CS-6675': { + courseId: 'CS-6675', + name: 'Advanced Internet Computing Systems and Applications', + departmentId: 'CS', + courseNumber: '6675', + }, + 'CS-6726': { + courseId: 'CS-6726', + name: 'Privacy, Technology, Policy, and Law', + departmentId: 'CS', + courseNumber: '6726', + }, + 'CS-6727': { + courseId: 'CS-6727', + name: 'Cyber Security Practicum', + departmentId: 'CS', + courseNumber: '6727', + }, + 'CS-6747': { + courseId: 'CS-6747', + name: 'Advanced Topics in Malware Analysis', + departmentId: 'CS', + courseNumber: '6747', + }, + 'CS-6750': { + courseId: 'CS-6750', + name: 'Human-Computer Interaction', + departmentId: 'CS', + courseNumber: '6750', + }, + 'CS-6795': { + courseId: 'CS-6795', + name: 'Introduction to Cognitive Science', + departmentId: 'CS', + courseNumber: '6795', + }, + 'CS-7210': { + courseId: 'CS-7210', + name: 'Distributed Computing', + departmentId: 'CS', + courseNumber: '7210', + }, + 'CS-7280': { + courseId: 'CS-7280', + name: 'Network Science: Methods and Applications', + departmentId: 'CS', + courseNumber: '7280', + }, + 'CS-7450': { + courseId: 'CS-7450', + name: 'Information Visualization', + departmentId: 'CS', + courseNumber: '7450', + }, + 'CS-7470': { + courseId: 'CS-7470', + name: 'Mobile and Ubiquitous Computing', + departmentId: 'CS', + courseNumber: '7470', + }, + 'CS-7632': { + courseId: 'CS-7632', + name: 'Game Artificial Intelligence', + departmentId: 'CS', + courseNumber: '7632', + }, + 'CS-7637': { + courseId: 'CS-7637', + name: 'Knowledge-Based Artificial Intelligence: Cognitive Systems', + departmentId: 'CS', + courseNumber: '7637', + }, + 'CS-7638': { + courseId: 'CS-7638', + name: 'Artificial Intelligence Techniques for Robotics', + departmentId: 'CS', + courseNumber: '7638', + }, + 'CS-7639': { + courseId: 'CS-7639', + name: 'Cyber Physical Design and Analysis', + departmentId: 'CS', + courseNumber: '7639', + }, + 'CS-7641': { + courseId: 'CS-7641', + name: 'Machine Learning', + departmentId: 'CS', + courseNumber: '7641', + }, + 'CS-7642': { + courseId: 'CS-7642', + name: 'Reinforcement Learning and Decision Making', + departmentId: 'CS', + courseNumber: '7642', + }, + 'CS-7643': { + courseId: 'CS-7643', + name: 'Deep Learning', + departmentId: 'CS', + courseNumber: '7643', + }, + 'CS-7646': { + courseId: 'CS-7646', + name: 'Machine Learning for Trading', + departmentId: 'CS', + courseNumber: '7646', + }, + 'CS-8803-O04': { + courseId: 'CS-8803-O04', + name: 'Embedded Software', + departmentId: 'CS', + courseNumber: '8803-O04', + }, + 'CS-8803-O05': { + courseId: 'CS-8803-O05', + name: 'Data Visualization for Health Informatics', + departmentId: 'CS', + courseNumber: '8803-O05', + }, + 'CS-8803-O06': { + courseId: 'CS-8803-O06', + name: 'Biomedical Analytics', + departmentId: 'CS', + courseNumber: '8803-O06', + }, + 'CS-8803-O08': { + courseId: 'CS-8803-O08', + name: 'Compilers: Theory and Practice', + departmentId: 'CS', + courseNumber: '8803-O08', + }, + 'CS-8803-O12': { + courseId: 'CS-8803-O12', + name: 'Systems Issues in Cloud Computing', + departmentId: 'CS', + courseNumber: '8803-O12', + }, + 'CS-8803-OC1': { + courseId: 'CS-8803-OC1', + name: 'Security Operations and Incidence Response', + departmentId: 'CS', + courseNumber: '8803-OC1', + }, + 'CS-8813': { + courseId: 'CS-8813', + name: 'Malware Analysis and Defense', + departmentId: 'CS', + courseNumber: '8813', + }, + 'CSE-6040': { + courseId: 'CSE-6040', + name: 'Computing for Data Analysis: Methods and Tools', + departmentId: 'CSE', + courseNumber: '6040', + }, + 'CSE-6140': { + courseId: 'CSE-6140', + name: 'Computational Science and Engineering Algorithms', + departmentId: 'CSE', + courseNumber: '6140', + }, + 'CSE-6220': { + courseId: 'CSE-6220', + name: 'High Performance Computing', + departmentId: 'CSE', + courseNumber: '6220', + }, + 'CSE-6240': { + courseId: 'CSE-6240', + name: 'Web Search and Text Mining', + departmentId: 'CSE', + courseNumber: '6240', + }, + 'CSE-6242': { + courseId: 'CSE-6242', + name: 'Data and Visual Analytics', + departmentId: 'CSE', + courseNumber: '6242', + }, + 'CSE-6250': { + courseId: 'CSE-6250', + name: 'Big Data Analytics for Healthcare', + departmentId: 'CSE', + courseNumber: '6250', + }, + 'CSE-6742': { + courseId: 'CSE-6742', + name: 'Modeling, Simulation, and Military Gaming', + departmentId: 'CSE', + courseNumber: '6742', + }, + 'ECE-6150': { + courseId: 'ECE-6150', + name: 'Computational Aspects of Cyber Physical Systems', + departmentId: 'ECE', + courseNumber: '6150', + }, + 'ECE-6266': { + courseId: 'ECE-6266', + name: 'Energy Systems Practicum', + departmentId: 'ECE', + courseNumber: '6266', + }, + 'ECE-6320': { + courseId: 'ECE-6320', + name: 'Power Systems Control and Operation', + departmentId: 'ECE', + courseNumber: '6320', + }, + 'ECE-6323': { + courseId: 'ECE-6323', + name: 'Power System Protection', + departmentId: 'ECE', + courseNumber: '6323', + }, + 'ECE-8803a': { + courseId: 'ECE-8803a', + name: 'Computational Aspects of Cyber Physical Systems', + departmentId: 'ECE', + courseNumber: '8803a', + }, + 'ECE-8803c': { + courseId: 'ECE-8803c', + name: 'Embedded Systems', + departmentId: 'ECE', + courseNumber: '8803c', + }, + 'ECE-8803d': { + courseId: 'ECE-8803d', + name: 'Embedded Systems Security', + departmentId: 'ECE', + courseNumber: '8803d', + }, + 'ECE-8803e': { + courseId: 'ECE-8803e', + name: 'Introduction to Cyber Physical Electric Energy Systems', + departmentId: 'ECE', + courseNumber: '8803e', + }, + 'ECE-8803g': { + courseId: 'ECE-8803g', + name: 'Smart Grids', + departmentId: 'ECE', + courseNumber: '8803g', + }, + 'ECE-8803h': { + courseId: 'ECE-8803h', + name: 'Software Vulnerabilities & Security', + departmentId: 'ECE', + courseNumber: '8803h', + }, + 'ECE-8813': { + courseId: 'ECE-8813', + name: 'Introduction to Cyber Physical Systems Security', + departmentId: 'ECE', + courseNumber: '8813', + }, + 'ECE-8823': { + courseId: 'ECE-8823', + name: 'Cyber Physical Design', + departmentId: 'ECE', + courseNumber: '8823', + }, + 'ECE-8843': { + courseId: 'ECE-8843', + name: 'Side-Channels and Their Role in Cybersecurity', + departmentId: 'ECE', + courseNumber: '8843', + }, + 'ECE-8853': { + courseId: 'ECE-8853', + name: 'Introduction to Cyber Physical Electric Energy Systems', + departmentId: 'ECE', + courseNumber: '8853', + }, + 'ECE-8863': { + courseId: 'ECE-8863', + name: 'Principles of Smart Electricity Grids', + departmentId: 'ECE', + courseNumber: '8863', + }, + 'ECE-8873': { + courseId: 'ECE-8873', + name: 'Advanced Hardware Oriented Security and Trust', + departmentId: 'ECE', + courseNumber: '8873', + }, + 'INTA-6014': { + courseId: 'INTA-6014', + name: 'Scenario Writing and Path Gaming', + departmentId: 'INTA', + courseNumber: '6014', + }, + 'INTA-6103': { + courseId: 'INTA-6103', + name: 'International Security', + departmentId: 'INTA', + courseNumber: '6103', + }, + 'INTA-6450': { + courseId: 'INTA-6450', + name: 'Data Analytics and Security', + departmentId: 'INTA', + courseNumber: '6450', + }, + 'INTA-8803G': { + courseId: 'INTA-8803G', + name: 'Challenge of Terrorism in Democratic Societies', + departmentId: 'INTA', + courseNumber: '8803G', + }, + 'ISYE-6402': { + courseId: 'ISYE-6402', + name: 'Time Series Analysis', + departmentId: 'ISYE', + courseNumber: '6402', + }, + 'ISYE-6404': { + courseId: 'ISYE-6404', + name: 'Nonparametric Data Analysis', + departmentId: 'ISYE', + courseNumber: '6404', + }, + 'ISYE-6413': { + courseId: 'ISYE-6413', + name: 'Design and Analysis of Experiments', + departmentId: 'ISYE', + courseNumber: '6413', + }, + 'ISYE-6414': { + courseId: 'ISYE-6414', + name: 'Statistical Modeling and Regression Analysis', + departmentId: 'ISYE', + courseNumber: '6414', + }, + 'ISYE-6416': { + courseId: 'ISYE-6416', + name: 'Computational Statistics', + departmentId: 'ISYE', + courseNumber: '6416', + }, + 'ISYE-6420': { + courseId: 'ISYE-6420', + name: 'Introduction to Theory and Practice of Bayesian Statistics', + departmentId: 'ISYE', + courseNumber: '6420', + }, + 'ISYE-6501': { + courseId: 'ISYE-6501', + name: 'Introduction to Analytics Modeling', + departmentId: 'ISYE', + courseNumber: '6501', + }, + 'ISYE-6644': { + courseId: 'ISYE-6644', + name: 'Simulation and Modeling for Engineering and Science', + departmentId: 'ISYE', + courseNumber: '6644', + }, + 'ISYE-6650': { + courseId: 'ISYE-6650', + name: 'Probabilistic Models and Their Applications', + departmentId: 'ISYE', + courseNumber: '6650', + }, + 'ISYE-6669': { + courseId: 'ISYE-6669', + name: 'Deterministic Optimization', + departmentId: 'ISYE', + courseNumber: '6669', + }, + 'ISYE-6740': { + courseId: 'ISYE-6740', + name: 'Computational Data Analysis: Learning, Mining, and Computation', + departmentId: 'ISYE', + courseNumber: '6740', + }, + 'ISYE-7406': { + courseId: 'ISYE-7406', + name: 'Data Mining and Statistical Learning', + departmentId: 'ISYE', + courseNumber: '7406', + }, + 'ISYE-8803': { + courseId: 'ISYE-8803', + name: 'High-Dimensional Data Analytics', + departmentId: 'ISYE', + courseNumber: '8803', + }, + 'MGT-6203': { + courseId: 'MGT-6203', + name: 'Data Analytics in Business', + departmentId: 'MGT', + courseNumber: '6203', + }, + 'MGT-6311': { + courseId: 'MGT-6311', + name: 'Digital Marketing', + departmentId: 'MGT', + courseNumber: '6311', + }, + 'MGT-6727': { + courseId: 'MGT-6727', + name: 'Privacy for Professionals', + departmentId: 'MGT', + courseNumber: '6727', + }, + 'MGT-6748': { + courseId: 'MGT-6748', + name: 'Applied Analytics Practicum', + departmentId: 'MGT', + courseNumber: '6748', + }, + 'MGT-8803': { + courseId: 'MGT-8803', + name: 'Business Fundamentals for Analytics', + departmentId: 'MGT', + courseNumber: '8803', + }, + 'MGT-8813': { + courseId: 'MGT-8813', + name: 'Financial Modeling', + departmentId: 'MGT', + courseNumber: '8813', + }, + 'MGT-8823': { + courseId: 'MGT-8823', + name: 'Data Analytics and Continuous Improvement', + departmentId: 'MGT', + courseNumber: '8823', + }, + 'PUBP-6111': { + courseId: 'PUBP-6111', + name: 'Internet and Public Policy', + departmentId: 'PUBP', + courseNumber: '6111', + }, + 'PUBP-6266': { + courseId: 'PUBP-6266', + name: 'Policy Practicum', + departmentId: 'PUBP', + courseNumber: '6266', + }, + 'PUBP-6501': { + courseId: 'PUBP-6501', + name: 'Information Policy and Management', + departmentId: 'PUBP', + courseNumber: '6501', + }, + 'PUBP-6502': { + courseId: 'PUBP-6502', + name: 'Information and Communications Technology Policy', + departmentId: 'PUBP', + courseNumber: '6502', + }, + 'PUBP-6725': { + courseId: 'PUBP-6725', + name: 'Information Security Policies and Strategies', + departmentId: 'PUBP', + courseNumber: '6725', + }, +} diff --git a/globals/types.ts b/globals/types.ts index 0fa3762f..c8606cc8 100755 --- a/globals/types.ts +++ b/globals/types.ts @@ -18,7 +18,7 @@ type TReviewsCountsByYearSemObject = { export interface Course { courseId: TCourseId - name: string + name: TCourseName departmentId: TDepartmentId courseNumber: string url: string @@ -35,9 +35,9 @@ export interface Course { export interface Review { reviewId: string - courseId: string + courseId: TCourseId year: number - semesterId: string + semesterId: TSemesterId isLegacy: boolean reviewerId: string created: number // Unix timestamp @@ -124,6 +124,13 @@ export interface Grade { name: TGradeName } +export interface CourseDataStatic { + courseId: TCourseId + name: string + departmentId: TDepartmentId + courseNumber: string +} + /* --- PAYLOADS --- */ export type TPayloadCourses = { @@ -170,113 +177,11 @@ export type TPayloadGrades = { [gradeId: string]: Grade } -/* --- DATA MODELS TYPEDEFS --- */ +export type TPayloadCoursesDataStatic = { + [courseId: string]: CourseDataStatic +} -export type TCourseId = - | 'CS-6035' - | 'CS-6150' - | 'CS-6200' - | 'CS-6210' - | 'CS-6238' - | 'CS-6250' - | 'CS-6260' - | 'CS-6262' - | 'CS-6263' - | 'CS-6264' - | 'CS-6265' - | 'CS-6266' - | 'CS-6290' - | 'CS-6291' - | 'CS-6300' - | 'CS-6310' - | 'CS-6340' - | 'CS-6400' - | 'CS-6440' - | 'CS-6457' - | 'CS-6460' - | 'CS-6465' - | 'CS-6475' - | 'CS-6476' - | 'CS-6515' - | 'CS-6601' - | 'CS-6603' - | 'CS-6675' - | 'CS-6726' - | 'CS-6727' - | 'CS-6747' - | 'CS-6750' - | 'CS-6795' - | 'CS-7210' - | 'CS-7280' - | 'CS-7450' - | 'CS-7470' - | 'CS-7632' - | 'CS-7637' - | 'CS-7638' - | 'CS-7639' - | 'CS-7641' - | 'CS-7642' - | 'CS-7643' - | 'CS-7646' - | 'CS-8803-O04' - | 'CS-8803-O05' - | 'CS-8803-O06' - | 'CS-8803-O08' - | 'CS-8803-O12' - | 'CS-8803-OC1' - | 'CS-8813' - | 'CSE-6040' - | 'CSE-6140' - | 'CSE-6220' - | 'CSE-6240' - | 'CSE-6242' - | 'CSE-6250' - | 'CSE-6742' - | 'ECE-6150' - | 'ECE-6266' - | 'ECE-6320' - | 'ECE-6323' - | 'ECE-8803a' - | 'ECE-8803c' - | 'ECE-8803d' - | 'ECE-8803e' - | 'ECE-8803g' - | 'ECE-8803h' - | 'ECE-8813' - | 'ECE-8823' - | 'ECE-8843' - | 'ECE-8853' - | 'ECE-8863' - | 'ECE-8873' - | 'INTA-6014' - | 'INTA-6103' - | 'INTA-6450' - | 'INTA-8803G' - | 'ISYE-6402' - | 'ISYE-6404' - | 'ISYE-6413' - | 'ISYE-6414' - | 'ISYE-6416' - | 'ISYE-6420' - | 'ISYE-6501' - | 'ISYE-6644' - | 'ISYE-6650' - | 'ISYE-6669' - | 'ISYE-6740' - | 'ISYE-7406' - | 'ISYE-8803' - | 'MGT-6203' - | 'MGT-6311' - | 'MGT-6727' - | 'MGT-6748' - | 'MGT-8803' - | 'MGT-8813' - | 'MGT-8823' - | 'PUBP-6111' - | 'PUBP-6266' - | 'PUBP-6501' - | 'PUBP-6502' - | 'PUBP-6725' +/* --- DATA MODELS TYPEDEFS --- */ export type TDepartmentId = | 'CS' @@ -422,3 +327,215 @@ export type TGradeName = | 'F' | 'W (Withdrawal)' | 'Prefer not to say' + +export type TCourseId = + | 'CS-6035' + | 'CS-6150' + | 'CS-6200' + | 'CS-6210' + | 'CS-6238' + | 'CS-6250' + | 'CS-6260' + | 'CS-6262' + | 'CS-6263' + | 'CS-6264' + | 'CS-6265' + | 'CS-6266' + | 'CS-6290' + | 'CS-6291' + | 'CS-6300' + | 'CS-6310' + | 'CS-6340' + | 'CS-6400' + | 'CS-6440' + | 'CS-6457' + | 'CS-6460' + | 'CS-6465' + | 'CS-6475' + | 'CS-6476' + | 'CS-6515' + | 'CS-6601' + | 'CS-6603' + | 'CS-6675' + | 'CS-6726' + | 'CS-6727' + | 'CS-6747' + | 'CS-6750' + | 'CS-6795' + | 'CS-7210' + | 'CS-7280' + | 'CS-7450' + | 'CS-7470' + | 'CS-7632' + | 'CS-7637' + | 'CS-7638' + | 'CS-7639' + | 'CS-7641' + | 'CS-7642' + | 'CS-7643' + | 'CS-7646' + | 'CS-8803-O04' + | 'CS-8803-O05' + | 'CS-8803-O06' + | 'CS-8803-O08' + | 'CS-8803-O12' + | 'CS-8803-OC1' + | 'CS-8813' + | 'CSE-6040' + | 'CSE-6140' + | 'CSE-6220' + | 'CSE-6240' + | 'CSE-6242' + | 'CSE-6250' + | 'CSE-6742' + | 'ECE-6150' + | 'ECE-6266' + | 'ECE-6320' + | 'ECE-6323' + | 'ECE-8803a' + | 'ECE-8803c' + | 'ECE-8803d' + | 'ECE-8803e' + | 'ECE-8803g' + | 'ECE-8803h' + | 'ECE-8813' + | 'ECE-8823' + | 'ECE-8843' + | 'ECE-8853' + | 'ECE-8863' + | 'ECE-8873' + | 'INTA-6014' + | 'INTA-6103' + | 'INTA-6450' + | 'INTA-8803G' + | 'ISYE-6402' + | 'ISYE-6404' + | 'ISYE-6413' + | 'ISYE-6414' + | 'ISYE-6416' + | 'ISYE-6420' + | 'ISYE-6501' + | 'ISYE-6644' + | 'ISYE-6650' + | 'ISYE-6669' + | 'ISYE-6740' + | 'ISYE-7406' + | 'ISYE-8803' + | 'MGT-6203' + | 'MGT-6311' + | 'MGT-6727' + | 'MGT-6748' + | 'MGT-8803' + | 'MGT-8813' + | 'MGT-8823' + | 'PUBP-6111' + | 'PUBP-6266' + | 'PUBP-6501' + | 'PUBP-6502' + | 'PUBP-6725' + +export type TCourseName = + | 'Introduction to Information Security' + | 'Computing for Good' + | 'Graduate Introduction to Operating Systems' + | 'Advanced Operating Systems' + | 'Secure Computer Systems' + | 'Computer Networks' + | 'Applied Cryptography' + | 'Network Security' + | 'Intro to Cyber-Physical Systems Security' + | 'Information Security Lab: System and Network Defenses' + | 'Information Security Laboratory' + | 'Information Security Practicum' + | 'High-Performance Computer Architecture' + | 'Embedded Software Optimizations' + | 'Software Development Process' + | 'Software Architecture and Design' + | 'Advanced Topics in Software Analysis and Testing' + | 'Database Systems Concepts and Design' + | 'Introduction to Health Informatics' + | 'Video Game Design and Programming' + | 'Educational Technology: Conceptual Foundations' + | 'Computational Journalism' + | 'Computational Photography' + | 'Introduction to Computer Vision' + | 'Introduction to Graduate Algorithms' + | 'Artificial Intelligence' + | 'AI, Ethics, and Society' + | 'Advanced Internet Computing Systems and Applications' + | 'Privacy, Technology, Policy, and Law' + | 'Cyber Security Practicum' + | 'Advanced Topics in Malware Analysis' + | 'Human-Computer Interaction' + | 'Introduction to Cognitive Science' + | 'Distributed Computing' + | 'Network Science: Methods and Applications' + | 'Information Visualization' + | 'Mobile and Ubiquitous Computing' + | 'Game Artificial Intelligence' + | 'Knowledge-Based Artificial Intelligence: Cognitive Systems' + | 'Artificial Intelligence Techniques for Robotics' + | 'Cyber Physical Design and Analysis' + | 'Machine Learning' + | 'Reinforcement Learning and Decision Making' + | 'Deep Learning' + | 'Machine Learning for Trading' + | 'Embedded Software' + | 'Data Visualization for Health Informatics' + | 'Biomedical Analytics' + | 'Compilers: Theory and Practice' + | 'Systems Issues in Cloud Computing' + | 'Security Operations and Incidence Response' + | 'Malware Analysis and Defense' + | 'Computing for Data Analysis: Methods and Tools' + | 'Computational Science and Engineering Algorithms' + | 'High Performance Computing' + | 'Web Search and Text Mining' + | 'Data and Visual Analytics' + | 'Big Data Analytics for Healthcare' + | 'Modeling, Simulation, and Military Gaming' + | 'Computational Aspects of Cyber Physical Systems' + | 'Energy Systems Practicum' + | 'Power Systems Control and Operation' + | 'Power System Protection' + | 'Computational Aspects of Cyber Physical Systems' + | 'Embedded Systems' + | 'Embedded Systems Security' + | 'Introduction to Cyber Physical Electric Energy Systems' + | 'Smart Grids' + | 'Software Vulnerabilities & Security' + | 'Introduction to Cyber Physical Systems Security' + | 'Cyber Physical Design' + | 'Side-Channels and Their Role in Cybersecurity' + | 'Introduction to Cyber Physical Electric Energy Systems' + | 'Principles of Smart Electricity Grids' + | 'Advanced Hardware Oriented Security and Trust' + | 'Scenario Writing and Path Gaming' + | 'International Security' + | 'Data Analytics and Security' + | 'Challenge of Terrorism in Democratic Societies' + | 'Time Series Analysis' + | 'Nonparametric Data Analysis' + | 'Design and Analysis of Experiments' + | 'Statistical Modeling and Regression Analysis' + | 'Computational Statistics' + | 'Introduction to Theory and Practice of Bayesian Statistics' + | 'Introduction to Analytics Modeling' + | 'Simulation and Modeling for Engineering and Science' + | 'Probabilistic Models and Their Applications' + | 'Deterministic Optimization' + | 'Computational Data Analysis: Learning, Mining, and Computation' + | 'Data Mining and Statistical Learning' + | 'High-Dimensional Data Analytics' + | 'Data Analytics in Business' + | 'Digital Marketing' + | 'Privacy for Professionals' + | 'Applied Analytics Practicum' + | 'Business Fundamentals for Analytics' + | 'Financial Modeling' + | 'Data Analytics and Continuous Improvement' + | 'Internet and Public Policy' + | 'Policy Practicum' + | 'Information Policy and Management' + | 'Information and Communications Technology Policy' + | 'Information Security Policies and Strategies' diff --git a/globals/utilities.ts b/globals/utilities.ts index 01c520ab..02357f16 100644 --- a/globals/utilities.ts +++ b/globals/utilities.ts @@ -1,4 +1,5 @@ import { + courses, departments, educationLevels, grades, @@ -8,6 +9,7 @@ import { subjectAreas, } from '@globals/staticDataModels' import { + TCourseId, TDepartmentId, TEducationLevelId, TGradeId, @@ -19,6 +21,9 @@ import { /* --- STATIC DATA GETTERS --- */ +export const getCoursesDataStatic = () => courses +export const getCourseDataStatic = (courseId: TCourseId) => courses[courseId] + export const getDepartments = () => departments export const getDepartment = (departmentId: TDepartmentId) => departments[departmentId] diff --git a/pages/course/[courseid].tsx b/pages/course/[courseid].tsx index a6b13733..08a1a965 100755 --- a/pages/course/[courseid].tsx +++ b/pages/course/[courseid].tsx @@ -144,7 +144,7 @@ const CourseId: NextPage = () => { alignItems: 'center', }} > - + {router.query.title} {courseData && ( diff --git a/pages/index.tsx b/pages/index.tsx index 57a6fe63..68c17120 100755 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,21 +1,21 @@ -import React, { useState, useEffect } from 'react' -import type { NextPage } from 'next' -import Container from '@mui/material/Container' -import Typography from '@mui/material/Typography' +import { getCourses } from '@backend/dbOperations' +import { courseFields } from '@globals/constants' +import { Course } from '@globals/types' +import { useMediaQuery } from '@mui/material' import Box from '@mui/material/Box' +import Container from '@mui/material/Container' import Grid from '@mui/material/Grid' -import Link from '@src/Link' -import { useMediaQuery } from '@mui/material' +import Typography from '@mui/material/Typography' import { DataGrid, GridColDef, - GridToolbar, GridRenderCellParams, + GridToolbar, } from '@mui/x-data-grid' -import { Course } from '@globals/types' -import { getCourses } from '@backend/dbOperations' +import Link from '@src/Link' import { mapPayloadToArray, roundNumber } from '@src/utilities' -import { courseFields } from '@globals/constants' +import type { NextPage } from 'next' +import { useEffect, useState } from 'react' const Home: NextPage = () => { const isDesktop = useMediaQuery('(min-width:600px)') @@ -117,15 +117,12 @@ const Home: NextPage = () => { alignItems: 'center', }} > - - GT OMS Courses + + OMS Courses + + + {`Georgia Tech's Online Master's Course Catalog`} - <> { + const [loading, setLoading] = useState() + const [reviews, setReviews] = useState([]) + + useEffect(() => { + setLoading(true) + + getReviewsRecent50() + .then((reviews) => { + if (reviews) { + setReviews(reviews) + setLoading(false) + } + }) + .catch((err: any) => { + console.log(err) + }) + }, []) + + return ( + + + + {`Recent Reviews`} + + + {`A Dynamic List of the 50 Most Recent Reviews`} + + {loading ? ( + + + + ) : ( + <> + {reviews && ( + + {reviews.slice(0, 50).map((value: Review) => { + return ( + + + + ) + })} + + )} + + )} + + + ) +} + +export default Recents diff --git a/src/components/NavBar.tsx b/src/components/NavBar.tsx index c97ea2ac..124d2e2c 100755 --- a/src/components/NavBar.tsx +++ b/src/components/NavBar.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import AppBar from '@mui/material/AppBar' import Button from '@mui/material/Button' import { grey } from '@mui/material/colors' @@ -32,11 +31,29 @@ export const NavBar = ({ ...props }: NavBarProps) => {