Skip to content

Commit

Permalink
Merge pull request #4596 from mikhailprivalov/setupSendMail
Browse files Browse the repository at this point in the history
настройка отправки почты организации
  • Loading branch information
urchinpro authored Dec 24, 2024
2 parents a70a5ed + abc642d commit ba19371
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
7 changes: 7 additions & 0 deletions api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2177,6 +2177,7 @@ def organization_data(request):
"licenseData": hospital.license_data,
"currentManager": hospital.current_manager,
"okpo": hospital.okpo,
"needSendMail": hospital.need_send_result,
}

if SettingManager.l2("ftp") and request.user.doctorprofile.has_group("Конструктор: Настройка всех организаций"):
Expand Down Expand Up @@ -2219,6 +2220,7 @@ def organization_data_update(request):
"hl7SenderApplication": str,
"hl7ReceiverAapplication": str,
"isAutotransfer": bool,
"needSendMail": bool,
}

data = data_parse(
Expand All @@ -2238,6 +2240,7 @@ def organization_data_update(request):
"hl7SenderApplication": None,
"hl7ReceiverAapplication": None,
"isAutotransfer": False,
"needSendMail": False,
},
)

Expand All @@ -2262,6 +2265,7 @@ def organization_data_update(request):
hl7_sender_application: Optional[str] = data[18] or None
hl7_receiver_appplication: Optional[str] = data[19] or None
is_auto_transfer = data[20] if data[20] else False
need_send_mail = data[21] if data[21] else False

if not title:
return status_response(False, "Название не может быть пустым")
Expand All @@ -2284,6 +2288,7 @@ def organization_data_update(request):
"license_data": hospital.license_data,
"www": hospital.www,
"email": hospital.email,
"need_send_mail": hospital.need_send_result,
"okpo": hospital.okpo,
**(
{
Expand All @@ -2310,6 +2315,7 @@ def organization_data_update(request):
"license_data": license_data,
"www": www,
"email": email,
"need_send_mail": need_send_mail,
"okpo": okpo,
**(
{
Expand Down Expand Up @@ -2341,6 +2347,7 @@ def organization_data_update(request):
hospital.hl7_receiver_appplication = hl7_receiver_appplication
hospital.hl7_sender_application = hl7_sender_application
hospital.is_auto_transfer_hl7_file = is_auto_transfer
hospital.need_send_result = need_send_mail

if has_full_ftp_access:
hospital.orders_pull_by_numbers = orders_pull_by_numbers
Expand Down
18 changes: 17 additions & 1 deletion l2-frontend/src/construct/ConstructOrg.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,20 @@
</div>

<template v-if="ftp && hasAccessToAllHospitals">
<div class="full-width">
<div
class="full-width; show-layout"
>
<FormulateInput
type="checkbox"
name="strictDataOwnership"
label="У организации доступ только к собственной картотеке"
/>
<FormulateInput
class="layout-padding-send-mail"
type="checkbox"
name="needSendMail"
label="Отправлять результаты на почту"
/>
</div>
<div class="full-width">
<FormulateInput
Expand Down Expand Up @@ -473,6 +481,14 @@ export default class ConstructOrg extends Vue {
max-width: 100%;
}
.show-layout {
display: flex;
}
.layout-padding-send-mail {
padding-left: 40px;
}
.f-row {
margin-bottom: 15px;
}
Expand Down

0 comments on commit ba19371

Please sign in to comment.