Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/change-group-field' into saveCha…
Browse files Browse the repository at this point in the history
…ngeGroupFroField
  • Loading branch information
urchinpro committed Dec 2, 2024
2 parents 344f408 + 741e70e commit 5f9e790
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
1 change: 1 addition & 0 deletions directory/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def get_researches_details(pk, templates_department_pk=None):
"patientControlParam": field.patient_control_param_id if field.patient_control_param else -1,
"cdaOption": field.cda_option_id if field.cda_option else -1,
"patternParam": field.statistic_pattern_param_id if field.statistic_pattern_param else -1,
"newGroupId": None,
}
)
response["groups"].append(g)
Expand Down
25 changes: 20 additions & 5 deletions l2-frontend/src/construct/ParaclinicResearchEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -940,11 +940,21 @@
/>
</div>
<div>
<strong>Подсказка:</strong>
<textarea
v-model="row.helper"
class="form-control"
/>
<div>
<strong>Подсказка:</strong>
<textarea
v-model="row.helper"
class="form-control"
/>
</div>
<div>
<strong>Группа</strong>
<Treeselect
v-model="row.newGroupId"
placeholder="Группа..."
:options="possibleGroupForField"
/>
</div>
</div>
<div>
<strong>Видимость:</strong>
Expand Down Expand Up @@ -1297,6 +1307,7 @@ export default {
showAllDepartmentForTemplateField: false,
userDepartmentId: null,
showPermissionsModal: false,
possibleGroupForField: [],
};
},
computed: {
Expand Down Expand Up @@ -1389,6 +1400,7 @@ export default {
await this.loadDepartmentsForPermissions();
await this.load_deparments();
await this.loadDynamicDirectories();
this.findPossibleGroupForField();
},
mounted() {
window.$(window).on('beforeunload', () => {
Expand Down Expand Up @@ -1787,6 +1799,9 @@ export default {
closePermissionsModal() {
this.showPermissionsModal = false;
},
findPossibleGroupForField() {
this.possibleGroupForField = this.groups.map(group => ({ id: group.pk, label: group.pk }));
},
},
};
</script>
Expand Down

0 comments on commit 5f9e790

Please sign in to comment.