UNPKG

@rehan-warsi/sms

Version:

This project is a simple console based Student Management System. In this project you will be learning how to add new students, how to generate a 5 digit unique studentID for each student, how to enroll students in the given courses. Also, you will be imp

38 lines (37 loc) 1.19 kB
#!/usr/bin/env node import inquirer from 'inquirer'; import chalk from 'chalk'; import { studentOptions } from './student.js'; import { teacherOptions } from './teacher.js'; import { courseOptions } from './course.js'; console.clear(); console.log(chalk.bold.rgb(204, 204, 204)(`\n <<<===========================================>>>`)); console.log(chalk.bold.rgb(204, 204, 204)(`<<<=======>>> ${chalk.redBright.bold('STUDENT MANAGEMENT SYSTEM')} <<<=======>>>`)); console.log(chalk.bold.rgb(204, 204, 204)(` <<<===========================================>>>\n`)); while (true) { const result = await inquirer.prompt([ { type: "rawlist", name: "menu_type", message: "Choose Menu : ", choices: [ "Student", "Course", "Teacher", "Exit" ], } ]); if (result.menu_type == "Exit") { break; } if (result.menu_type == "Student") { await studentOptions(); } if (result.menu_type == "Course") { await courseOptions(); } if (result.menu_type == "Teacher") { await teacherOptions(); } }