diff --git a/directory/models.py b/directory/models.py index 785c449862..dcd357ee74 100644 --- a/directory/models.py +++ b/directory/models.py @@ -63,8 +63,8 @@ def get_or_create_relation(relation_data): @staticmethod def get_all_relation(): - relations = ReleationsFT.objects.all() - data = [{"id": i.pk, "label": f"{i.tube.title}-({i.pk})"} for i in relations] + relations = ReleationsFT.objects.all().select_related('tube').order_by('tube__title') + data = [{"id": i.pk, "label": f"{i.tube.title} ({i.pk})", "color": i.tube.color} for i in relations] return data diff --git a/l2-frontend/src/construct/FractionsGroup.vue b/l2-frontend/src/construct/FractionsGroup.vue index da6a5d7e74..4cf88d5ac4 100644 --- a/l2-frontend/src/construct/FractionsGroup.vue +++ b/l2-frontend/src/construct/FractionsGroup.vue @@ -22,7 +22,26 @@ :multiple="false" class="treeselect-wide treeselect-26px" placeholder="Выберите пробирку" - /> + > +