diff --git a/shiftflow/templates/shiftflow/partials/_workitems_table.html b/shiftflow/templates/shiftflow/partials/_workitems_table.html index 8ff9a25..dad5ee6 100644 --- a/shiftflow/templates/shiftflow/partials/_workitems_table.html +++ b/shiftflow/templates/shiftflow/partials/_workitems_table.html @@ -19,7 +19,14 @@ {% for wi in workitems %} {{ wi.date|date:"d.m.y" }} - {{ wi.deal.number|default:"-" }} + + + {{ wi.deal.number|default:"-" }} + + {% if wi.machine %} {{ wi.workshop.name|default:"—" }}/{{ wi.machine.name }} @@ -33,7 +40,10 @@ {{ wi.operation.name|default:wi.stage|default:"—" }} - {{ wi.entity.drawing_number|default:"—" }} {{ wi.entity.name }} + {% if wi.entity.drawing_number %} + {{ wi.entity.drawing_number }} + {% endif %} + {{ wi.entity.name }} {% if wi.entity.planned_material %} diff --git a/shiftflow/templates/shiftflow/registry_workitems_print.html b/shiftflow/templates/shiftflow/registry_workitems_print.html index a473055..f60e0fe 100644 --- a/shiftflow/templates/shiftflow/registry_workitems_print.html +++ b/shiftflow/templates/shiftflow/registry_workitems_print.html @@ -56,7 +56,6 @@ Материал План Факт - Статус @@ -75,7 +74,6 @@ {{ wi.quantity_plan }} {{ wi.quantity_done }} - {{ wi.status|default:"planned" }} {% endfor %} diff --git a/shiftflow/views.py b/shiftflow/views.py index 70c502b..c5c6b91 100644 --- a/shiftflow/views.py +++ b/shiftflow/views.py @@ -509,7 +509,7 @@ class RegistryView(LoginRequiredMixin, ListView): it.fact_bar_class = 'bg-success' if it.status in ['done', 'partial'] else 'bg-warning' context['items'] = items - work_qs = WorkItem.objects.select_related('deal', 'entity', 'entity__planned_material', 'operation', 'machine', 'workshop') + work_qs = WorkItem.objects.select_related('deal', 'deal__company', 'entity', 'entity__planned_material', 'operation', 'machine', 'workshop') m_ids = [int(i) for i in self.request.GET.getlist('m_ids') if str(i).isdigit()] if m_ids: @@ -881,8 +881,9 @@ class WorkItemUpdateView(LoginRequiredMixin, View): wi.quantity_reported = qty_reported changed_fields.append('quantity_reported') - if machine_id is not None and role in ['admin', 'technologist', 'master']: - wi.machine_id = machine_id + if role in ['admin', 'technologist', 'master'] and 'machine_id' in request.POST: + # Пустое значение из селекта «— без станка —» должно очищать привязку станка. + wi.machine_id = (int(machine_id) if machine_id is not None else None) changed_fields.append('machine') if date_raw and role in ['admin', 'technologist']: diff --git a/static/css/style.css b/static/css/style.css index 4c1da6f..23414a2 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -40,6 +40,14 @@ body { color: #e9ecef !important; } +.navbar.sticky-top { + z-index: 1030; +} + +.navbar.sticky-top { + z-index: 1030; +} + /* --- РЕЕСТР --- */ /* Делаем строку таблицы визуально кликабельной */ diff --git a/templates/components/_navbar.html b/templates/components/_navbar.html index 6a1071a..308ffb9 100644 --- a/templates/components/_navbar.html +++ b/templates/components/_navbar.html @@ -1,4 +1,4 @@ -