(id)
| 801 | } |
| 802 | |
| 803 | function updateStudent(id) { |
| 804 | const student = sampleData.students.find((s) => s.id === id) |
| 805 | if (student) { |
| 806 | student.name = document.getElementById("editStudentName").value |
| 807 | student.class = document.getElementById("editStudentClass").value |
| 808 | student.phone = document.getElementById("editStudentPhone").value |
| 809 | student.email = document.getElementById("editStudentEmail").value |
| 810 | |
| 811 | loadStudentsData() |
| 812 | closeModal() |
| 813 | showNotification("O'quvchi ma'lumotlari yangilandi!", "success") |
| 814 | } |
| 815 | } |
| 816 | |
| 817 | function deleteStudent(id) { |
| 818 | if (confirm("Haqiqatan ham bu o'quvchini o'chirmoqchimisiz?")) { |
no test coverage detected