Skip to content

Commit

Permalink
Merge pull request #3795 from mikhailprivalov/fix-lab-constructor
Browse files Browse the repository at this point in the history
Fix lab constructor
  • Loading branch information
urchinpro authored May 10, 2024
2 parents 1932df1 + 6f292ee commit 717b218
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
2 changes: 1 addition & 1 deletion api/construct/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def change_visibility_research(request):
@group_required("Конструктор: Лабораторные исследования")
def get_lab_research(request):
request_data = json.loads(request.body)
result = Researches.get_research(request_data["researchPk"])
result = Researches.get_lab_research(request_data["researchPk"])
return JsonResponse({"result": result})


Expand Down
2 changes: 1 addition & 1 deletion directory/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ def change_visibility(research_pk: int):
return True

@staticmethod
def get_research(research_pk: int):
def get_lab_research(research_pk: int):
research = Researches.objects.get(pk=research_pk)
research_tubes = Researches.get_tube_data(research_pk, True)
result = {
Expand Down
1 change: 1 addition & 0 deletions l2-frontend/src/construct/FractionsGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
maxWidth: '50%',
}"
:title="fraction.title"
maxlength="255"
:disabled="fraction.hide"
:class="fraction.hide ? 'hide-background form-control fraction-input' : 'form-control fraction-input'"
placeholder="Введите название"
Expand Down
19 changes: 6 additions & 13 deletions l2-frontend/src/construct/ResearchDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<div class="flex">
<h4
class="header"
@click="showAdditionalModal"
>
Редактирование анализа - {{ researchShortTitle }}
</h4>
Expand All @@ -22,6 +21,7 @@
v-tippy="{
maxWidth: '50%'
}"
maxlength="255"
:title="research.title"
class="form-control"
placeholder="Введите полное наименование"
Expand All @@ -35,6 +35,7 @@
<input
id="shortTitle"
v-model="research.shortTitle"
maxlength="255"
class="form-control"
placeholder="Введите краткое наименование"
>
Expand Down Expand Up @@ -75,6 +76,7 @@
<input
id="ecpId"
v-model="research.ecpId"
maxlength="16"
class="form-control"
placeholder="Введите код"
>
Expand All @@ -87,6 +89,7 @@
<input
id="internalCode"
v-model="research.internalCode"
maxlength="255"
class="form-control"
placeholder="Введите код"
>
Expand Down Expand Up @@ -115,6 +118,7 @@
id="preparation"
v-model="research.preparation"
class="form-control"
maxlength="2047"
style="height: 90px"
rows="4"
placeholder="Введите подготовку (напр. 'Не требуется')"
Expand All @@ -129,6 +133,7 @@
<input
id="laboratoryDuration"
v-model="research.laboratoryDuration"
maxlength="3"
class="form-control"
type="number"
>
Expand Down Expand Up @@ -314,11 +319,6 @@
</button>
</div>
</div>
<LabResearchAdditional
v-if="showAdditional"
:research-id="research.pk"
@hideAdditionalModal="hideAdditionalModal"
/>
</div>
</template>

Expand Down Expand Up @@ -402,13 +402,6 @@ interface researchData {
const showAdditional = ref(false);

Check warning on line 403 in l2-frontend/src/construct/ResearchDetail.vue

View workflow job for this annotation

GitHub Actions / webpack_build_prod

'showAdditional' is assigned a value but never used

Check warning on line 403 in l2-frontend/src/construct/ResearchDetail.vue

View workflow job for this annotation

GitHub Actions / webpack_build_prod

'showAdditional' is assigned a value but never used
const hideAdditionalModal = () => {
showAdditional.value = false;
};
const showAdditionalModal = () => {
showAdditional.value = true;
};
const selectedTubes = ref({
id: -1,
label: 'Выберите ёмкость',
Expand Down

0 comments on commit 717b218

Please sign in to comment.