MCPcopy Create free account
hub / github.com/Muhammadsiddiq-code/Admin-dashboard / addStudent

Function addStudent

app.js:700–719  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

698
699// CRUD functions
700function addStudent() {
701 const name = document.getElementById("studentName").value
702 const studentClass = document.getElementById("studentClass").value
703 const phone = document.getElementById("studentPhone").value
704 const email = document.getElementById("studentEmail").value
705
706 const newStudent = {
707 id: sampleData.students.length + 1,
708 name: name,
709 class: studentClass,
710 phone: phone,
711 email: email,
712 status: "active",
713 }
714
715 sampleData.students.push(newStudent)
716 loadStudentsData()
717 closeModal()
718 showNotification("O'quvchi muvaffaqiyatli qo'shildi!", "success")
719}
720
721function addTeacher() {
722 const name = document.getElementById("teacherName").value

Callers 1

showAddStudentModalFunction · 0.85

Calls 3

loadStudentsDataFunction · 0.85
closeModalFunction · 0.85
showNotificationFunction · 0.85

Tested by

no test coverage detected