()
| 698 | |
| 699 | // CRUD functions |
| 700 | function 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 | |
| 721 | function addTeacher() { |
| 722 | const name = document.getElementById("teacherName").value |
no test coverage detected