From 4532d5de4681b51b0120d7c2377ccc9531cfb0b2 Mon Sep 17 00:00:00 2001 From: Sergei Kasianenko Date: Tue, 10 Oct 2023 11:08:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=D1=83=D1=87=D0=B5=D1=82=20"=D0=92=D1=8B?= =?UTF-8?q?=D0=BF=D0=B8=D1=81=D0=BE=D0=BA=20=D0=B8=D0=B7=20=D0=BA=D0=B0?= =?UTF-8?q?=D0=B4=D1=80=D0=BE=D0=B2"=20=D0=B8=20=D0=A1=D0=B5=D1=80=D1=82?= =?UTF-8?q?=D0=B8=D1=84=D0=B8=D0=BA=D0=B0=D1=82=D0=BE=D0=B2=20=D1=81=D0=BE?= =?UTF-8?q?=D1=82=D1=80=D1=83=D0=B4=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/views.py | 14 +++ l2-frontend/src/pages/Profiles.vue | 147 +++++++++++++++++++---------- pyproject.toml | 2 +- users/models.py | 3 +- 4 files changed, 115 insertions(+), 51 deletions(-) diff --git a/api/views.py b/api/views.py index 14e0e05ede..703fb553ff 100644 --- a/api/views.py +++ b/api/views.py @@ -1438,6 +1438,8 @@ def user_view(request): "sendPassword": False, "external_access": False, "date_stop_external_access": None, + "date_extract_employee": None, + "date_stop_certificate": None, "resource_schedule": resource_researches, "notControlAnketa": False, } @@ -1490,6 +1492,8 @@ def user_view(request): "sendPassword": False, "external_access": doc.external_access, "date_stop_external_access": doc.date_stop_external_access, + "date_stop_certificate": doc.date_stop_certificate, + "date_extract_employee": doc.date_extract_employee, "resource_schedule": resource_researches, "notControlAnketa": doc.not_control_anketa, } @@ -1525,8 +1529,16 @@ def user_save_view(request): external_access = ud.get("external_access", False) not_control_anketa = ud.get("notControlAnketa", False) date_stop_external_access = ud.get("date_stop_external_access") + if date_stop_external_access == "": date_stop_external_access = None + date_extract_employee = ud.get("date_extract_employee") + if date_extract_employee == "": + date_extract_employee = None + date_stop_certificate = ud.get("date_stop_certificate") + if date_stop_certificate == "": + date_stop_certificate = None + if position == -1: position = None if district == -1: @@ -1627,6 +1639,8 @@ def user_save_view(request): doc.external_access = external_access doc.not_control_anketa = not_control_anketa doc.date_stop_external_access = date_stop_external_access + doc.date_extract_employee = date_extract_employee + doc.date_stop_certificate = date_stop_certificate if rmis_login: doc.rmis_login = rmis_login if rmis_password: diff --git a/l2-frontend/src/pages/Profiles.vue b/l2-frontend/src/pages/Profiles.vue index 8c8cd9af68..798d79ccdc 100644 --- a/l2-frontend/src/pages/Profiles.vue +++ b/l2-frontend/src/pages/Profiles.vue @@ -732,65 +732,109 @@ -
- Анализаторы: - -
- Анализаторы - + + + +
- Кабинеты - + Анализаторы + +
+
+
+
+
+ Кабинеты + +
+
+
+
+
+
+ Дата выписки из кадров + +
+
+
+
+ Срок сертификата + +
@@ -925,6 +969,8 @@ export default { date_stop_external_access: '', resource_schedule: [], notControlAnketa: false, + date_extract_employee: '', + date_stop_certificate: '', }, selected_hospital: -1, open_pk: -2, @@ -1442,4 +1488,7 @@ li.selected { .right-padding { padding-right: 0 } +.left-padding-10 { + padding-left: 10px +} diff --git a/pyproject.toml b/pyproject.toml index f9fa2df43d..f1de5eeebf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,7 +72,7 @@ beren = "0.7.1" transliterate = "1.10.2" imgkit = "1.2.3" astm = {git = "https://github.com/moodpulse/python-astm.git", rev = "v0.6"} -psycopg2-binary = "^2.9.4" +#psycopg2-binary = "^2.9.4" boto3 = "^1.26.157" prompt-toolkit = "^3.0.36" pdf2docx = "^0.5.6" diff --git a/users/models.py b/users/models.py index b8454eabe8..3e646df5c2 100644 --- a/users/models.py +++ b/users/models.py @@ -105,8 +105,9 @@ class DoctorProfile(models.Model): max_age_patient_registration = models.SmallIntegerField(help_text='Ограничения возраста записи указать в месяцах', default=-1) available_quotas_time = models.TextField(default='', blank=True, help_text='Доступная запись для подразделений по времени {"id-подразделения": "10:00-15:00"}') is_system_user = models.BooleanField(default=False, blank=True) - room_access = models.ManyToManyField('podrazdeleniya.Room', blank=True, help_text='Доступ к кабинетам') + date_extract_employee = models.DateField(help_text='Дата выписки запрошена', db_index=True, default=None, blank=True, null=True) + date_stop_certificate = models.DateField(help_text='Дата окончания сертификата', db_index=True, default=None, blank=True, null=True) @staticmethod def get_system_profile(): From 5ce50cb409bcc3e2ec3be57f42cc80ef0e94886e Mon Sep 17 00:00:00 2001 From: Sergei Kasianenko Date: Tue, 10 Oct 2023 11:10:09 +0800 Subject: [PATCH 2/2] fix --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f1de5eeebf..f9fa2df43d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,7 +72,7 @@ beren = "0.7.1" transliterate = "1.10.2" imgkit = "1.2.3" astm = {git = "https://github.com/moodpulse/python-astm.git", rev = "v0.6"} -#psycopg2-binary = "^2.9.4" +psycopg2-binary = "^2.9.4" boto3 = "^1.26.157" prompt-toolkit = "^3.0.36" pdf2docx = "^0.5.6"