From 46f0caeb4dcba4d158d4c421d6d86f1f4ebbc8ef Mon Sep 17 00:00:00 2001 From: Aleksey Filippov Date: Thu, 28 Nov 2024 14:35:33 +0400 Subject: [PATCH] Add addStudent and editStudent functions --- db.json | 88 +++++++++++++++++++++++++++++++--------------------- page-js.html | 86 ++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 119 insertions(+), 55 deletions(-) diff --git a/db.json b/db.json index ce524a4..9576a20 100644 --- a/db.json +++ b/db.json @@ -1,36 +1,54 @@ { - "students": [ - { - "id": 1, - "last_name": "Ivanov", - "first_name": "Ivan", - "bdate": "01.01.1999", - "email": "i.ivanov@mail.ru", - "phone": "8 111 111 11 11", - "groupId": 1 - }, - { - "id": 2, - "last_name": "Petrov", - "first_name": "Petr", - "bdate": "12.12.2000", - "email": "p.petrov@mail.ru", - "phone": "8 222 222 22 22", - "groupId": 1 - }, - { - "id": 3, - "last_name": "Sidorov", - "first_name": "Sidr", - "bdate": "12.12.2000", - "email": "s.sidorov@mail.ru", - "phone": "8 333 333 33 33", - "groupId": 2 - } - ], - "groups": [ - { "id": 1, "name": "SomeGroup-11" }, - { "id": 2, "name": "SomeGroup-12" }, - { "id": 2, "name": "SomeGroup-13" } - ] -} + "students": [ + { + "last_name": "Ivanov", + "first_name": "Ivan", + "bdate": "1999-01-01", + "email": "i.ivanov@mail.ru", + "phone": "8 111 111 11 11", + "groupId": "1", + "id": 1 + }, + { + "last_name": "Petrov", + "first_name": "Petr", + "bdate": "2000-12-12", + "email": "p.petrov@mail.ru", + "phone": "8 222 222 22 22", + "groupId": "1", + "id": 2 + }, + { + "last_name": "Sidorov", + "first_name": "Sidr", + "bdate": "2000-12-12", + "email": "s.sidorov@mail.ru", + "phone": "8 333 333 33 33", + "groupId": "2", + "id": 3 + }, + { + "last_name": "!!!!", + "first_name": "asdasd", + "bdate": "0001-01-01", + "email": "asd@asd", + "phone": "3459345", + "groupId": "2", + "id": 4 + } + ], + "groups": [ + { + "id": 1, + "name": "SomeGroup-11" + }, + { + "id": 2, + "name": "SomeGroup-12" + }, + { + "id": 3, + "name": "SomeGroup-13" + } + ] +} \ No newline at end of file diff --git a/page-js.html b/page-js.html index 0c7d0f3..e78be2b 100644 --- a/page-js.html +++ b/page-js.html @@ -79,12 +79,12 @@
- - + +
- - + +
@@ -99,8 +99,8 @@
- + @@ -120,15 +120,31 @@ Автор, 2022