fix
This commit is contained in:
parent
89b1399fb8
commit
d05d582122
@ -10,7 +10,7 @@ namespace UniversityDataBaseImplemet
|
||||
{
|
||||
if (optionsBuilder.IsConfigured == false)
|
||||
{
|
||||
optionsBuilder.UseNpgsql("Host=localhost;Port=5432;Database=UniversityCourseWork;Username=postgres;Password=0000");
|
||||
optionsBuilder.UseNpgsql("Host=localhost;Port=5432;Database=UniversityCourseWork;Username=postgres;Password=123");
|
||||
}
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
}
|
||||
|
@ -8,19 +8,21 @@ const errorDivShell = document.getElementById("error-div-shell");
|
||||
students = []
|
||||
|
||||
window.addEventListener("load", () => {
|
||||
const studentsResponse = $.ajax({
|
||||
url: `/student/getallbyuser`,
|
||||
$.ajax({
|
||||
url: "/student/getallbyuser",
|
||||
type: "GET",
|
||||
contentType: "json"
|
||||
}).done((result) => {
|
||||
students = result;
|
||||
});
|
||||
students = studentsResponse;
|
||||
})
|
||||
|
||||
const correctData = () => {
|
||||
|
||||
};
|
||||
|
||||
const validate = () => {
|
||||
const validate = () => {
|
||||
console.log(students)
|
||||
var validStudentCard = true
|
||||
if (nameInput.value === "") {
|
||||
errorDivShell.style.gridTemplateRows = "1fr";
|
||||
@ -41,7 +43,7 @@ const validate = () => {
|
||||
students.forEach((student) => {
|
||||
if (student.studentCard === parseInt(studCardInput.value)) {
|
||||
errorDivShell.style.gridTemplateRows = "1fr";
|
||||
errorP.innerHTML = "Заполните поле 'Дата рождения'";
|
||||
errorP.innerHTML = "Заполните поле 'Номер студенческого билета' правильными данными, возможно пользователь с таким номером уже есть";
|
||||
validStudentCard = false;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user