Skip to content

Commit

Permalink
Merge branch 'develop' into cheque-v0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
urchinpro authored Sep 17, 2024
2 parents 420dc25 + 3d3a83f commit 8c68495
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 7 deletions.
6 changes: 5 additions & 1 deletion api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ def directive_from(request):
queryset=(
users.DoctorProfile.objects.filter(user__groups__name__in=["Лечащий врач", "Врач параклиники"])
.distinct("fio", "pk")
.filter(Q(hospital=hospital) | Q(hospital__isnull=True))
.filter(Q(hospital=hospital) | Q(hospital__isnull=True), dismissed=False)
.order_by("fio")
),
)
Expand Down Expand Up @@ -1464,6 +1464,7 @@ def user_view(request):
"resource_schedule": resource_researches,
"notControlAnketa": False,
"additionalInfo": "{}",
"dismissed": False,
}
else:
doc: users.DoctorProfile = users.DoctorProfile.objects.get(pk=pk)
Expand Down Expand Up @@ -1522,6 +1523,7 @@ def user_view(request):
"replace_doctor_cda": doc.replace_doctor_cda_id if doc.replace_doctor_cda_id else -1,
"department_doctors": [{"id": x.pk, "label": f"{x.get_fio()}"} for x in department_doctors],
"additionalInfo": doc.additional_info,
"dismissed": doc.dismissed,
}

return JsonResponse({"user": data})
Expand Down Expand Up @@ -1556,6 +1558,7 @@ def user_save_view(request):
not_control_anketa = ud.get("notControlAnketa", False)
date_stop_external_access = ud.get("date_stop_external_access")
additional_info = ud.get("additionalInfo", "{}")
dismissed = ud.get("dismissed", False)

if date_stop_external_access == "":
date_stop_external_access = None
Expand Down Expand Up @@ -1673,6 +1676,7 @@ def user_save_view(request):
doc.date_stop_certificate = date_stop_certificate
doc.replace_doctor_cda_id = replace_doctor_cda
doc.additional_info = additional_info
doc.dismissed = dismissed
if rmis_login:
doc.rmis_login = rmis_login
if rmis_password:
Expand Down
21 changes: 20 additions & 1 deletion l2-frontend/src/pages/Profiles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@
</div>
</div>
<div
class="col-xs-4 left-padding right-padding"
class="col-xs-3 left-padding right-padding"
>
<div
class="input-group"
Expand All @@ -504,6 +504,24 @@
</label>
</div>
</div>
<div
class="col-xs-1 left-padding right-padding"
>
<div
class="input-group"
style="width: 100%"
>
<label
class="input-group-addon"
style="height: 34px; text-align: left"
>
<input
v-model="user.dismissed"
type="checkbox"
> Уволен
</label>
</div>
</div>
</div>
<div class="more-title">
Запрет на создание направлений с назначениями:
Expand Down Expand Up @@ -1052,6 +1070,7 @@ export default {
replace_doctor_cda: -1,
department_doctors: [],
additionalInfo: '{}',
dismissed: false,
},
selected_hospital: -1,
open_pk: -2,
Expand Down
6 changes: 3 additions & 3 deletions l2-frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2933,9 +2933,9 @@ caniuse-api@^3.0.0:
lodash.uniq "^4.5.0"

caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001449, caniuse-lite@^1.0.30001464:
version "1.0.30001655"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001655.tgz"
integrity sha512-jRGVy3iSGO5Uutn2owlb5gR6qsGngTw9ZTb4ali9f3glshcNmJ2noam4Mo9zia5P9Dk3jNNydy7vQjuE5dQmfg==
version "1.0.30001660"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001660.tgz"
integrity sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg==

case-sensitive-paths-webpack-plugin@^2.3.0:
version "2.4.0"
Expand Down
2 changes: 1 addition & 1 deletion laboratory/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "2024.9.50202+5d7008"
__version__ = "2024.9.170532+93c334"
VERSION = __version__
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ skip-string-normalization = true

[tool.poetry]
name = "l2"
version = "2024.9.50202+5d7008"
version = "2024.9.170532+93c334"
description = ""
authors = ["Mikhail Privalov <[email protected]>"]
license = "MIT"
Expand Down
1 change: 1 addition & 0 deletions users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ class DoctorProfile(models.Model):
verbose_name="Услуга стационара по котрой по умолчанию подгружаются шаблоны",
on_delete=models.CASCADE,
)
dismissed = models.BooleanField(default=False, help_text="Уволен")

@staticmethod
def get_system_profile():
Expand Down

0 comments on commit 8c68495

Please sign in to comment.