Alexander Musikhin 2 тижнів тому
батько
коміт
4859a8047f

+ 6 - 0
lang/ru.json

@@ -0,0 +1,6 @@
+{
+    "Showing": "Показано",
+    "to": "–",
+    "of": "из",
+    "results": "записей"
+}

+ 6 - 0
lang/ru/pagination.php

@@ -0,0 +1,6 @@
+<?php
+
+return [
+    'previous' => 'Назад',
+    'next' => 'Вперед',
+];

+ 112 - 0
resources/sass/app.scss

@@ -418,3 +418,115 @@
   font-size: 0.875em;
   color: #6c757d;
 }
+
+.action-toolbar {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 0.25rem;
+  justify-content: flex-end;
+}
+
+.report-tabs {
+  flex-wrap: nowrap;
+  overflow-x: auto;
+  overflow-y: hidden;
+  -webkit-overflow-scrolling: touch;
+}
+
+.report-tabs .nav-link {
+  white-space: nowrap;
+}
+
+.report-tab-content {
+  padding: 0.75rem;
+}
+
+.schedule-week-controls {
+  display: flex;
+  flex-wrap: wrap;
+  justify-content: flex-end;
+  gap: 0.5rem;
+}
+
+.schedule-week-controls > div {
+  padding: 0 !important;
+}
+
+@media (min-width: 768px) {
+  .report-tab-content {
+    padding: 3rem;
+  }
+}
+
+@media (max-width: 767.98px) {
+  .alerts {
+    position: fixed;
+    left: 0;
+    right: 0;
+    top: 0;
+    padding: 0.5rem;
+  }
+
+  .alerts div {
+    padding-left: 1rem;
+    padding-right: 1rem;
+  }
+
+  .table-buttons {
+    position: sticky;
+    bottom: 0;
+    right: auto;
+    width: 100%;
+    display: flex !important;
+    flex-direction: row !important;
+    justify-content: space-around;
+    opacity: 0.96;
+    border-radius: 0.375rem 0.375rem 0 0 !important;
+  }
+
+  .js-main-table-scroll {
+    padding-bottom: 2.75rem;
+  }
+
+  .table {
+    font-size: 0.875rem;
+  }
+
+  .vertical,
+  .vertical th {
+    writing-mode: horizontal-tb;
+  }
+
+  .filter-menu-wide {
+    width: min(95vw, 320px);
+  }
+
+  .filter-sort-controls {
+    width: 100% !important;
+    flex-direction: column;
+    gap: 0.5rem;
+  }
+
+  .filter-menu-wide [id^="bulk-toggle_"],
+  .filter-menu-wide [id^="modal-footer_"] {
+    flex-direction: column;
+    gap: 0.5rem;
+  }
+
+  .filter-menu-wide .btn.w-50,
+  .filter-menu-wide .btn.w-100 {
+    width: 100% !important;
+  }
+
+  .table-pagination-row {
+    row-gap: 0.5rem;
+  }
+
+  .schedule-week-controls {
+    justify-content: flex-start;
+  }
+
+  .action-toolbar {
+    justify-content: flex-start;
+  }
+}

+ 1 - 1
resources/views/catalog/edit.blade.php

@@ -6,7 +6,7 @@
             <div class="col-6 d-flex align-items-center">
                 <h3 class="mb-0">МАФ {{ $product->common_name ?? 'Новый МАФ' }} ({{ $product->year ?? year() }})</h3>
             </div>
-            <div class="col-6 text-end d-flex align-items-center justify-content-end gap-2">
+            <div class="col-6 d-flex align-items-center justify-content-end action-toolbar">
                 @if(isset($product) && hasRole('admin'))
                     @if($product->image)
                         <a href="{{ $product->image }}" data-toggle="lightbox" data-gallery="photos" data-size="fullscreen">

+ 17 - 15
resources/views/clear-data/index.blade.php

@@ -43,21 +43,23 @@
                     Статистика удаляемых данных за <span id="statsYear"></span> год
                 </div>
                 <div class="card-body">
-                    <table class="table table-sm table-striped" id="statsTable">
-                        <thead>
-                            <tr>
-                                <th>Сущность</th>
-                                <th class="text-end">Количество</th>
-                            </tr>
-                        </thead>
-                        <tbody></tbody>
-                        <tfoot>
-                            <tr class="table-dark">
-                                <th>Итого</th>
-                                <th class="text-end" id="statsTotal"></th>
-                            </tr>
-                        </tfoot>
-                    </table>
+                    <div class="table-responsive">
+                        <table class="table table-sm table-striped" id="statsTable">
+                            <thead>
+                                <tr>
+                                    <th>Сущность</th>
+                                    <th class="text-end">Количество</th>
+                                </tr>
+                            </thead>
+                            <tbody></tbody>
+                            <tfoot>
+                                <tr class="table-dark">
+                                    <th>Итого</th>
+                                    <th class="text-end" id="statsTotal"></th>
+                                </tr>
+                            </tfoot>
+                        </table>
+                    </div>
 
                     <div class="alert alert-danger">
                         <strong>Внимание!</strong> Это действие необратимо. Все данные за выбранный год будут удалены безвозвратно.

+ 1 - 1
resources/views/orders/show.blade.php

@@ -14,7 +14,7 @@
                     <div class="badge text-bg-{{ Order::STATUS_COLOR[$order->order_status_id] }}">{{ $order->orderStatus->name }}</div>
                 </h3>
             </div>
-            <div class="col-md-6 text-end">
+            <div class="col-md-6 action-toolbar">
                 @if(hasRole('admin,manager'))
                     <a href="{{ route('order.edit', ['order' => $order, 'previous_url' => $previous_url]) }}"
                        class="btn btn-sm mb-1 btn-primary">Редактировать</a>

+ 1 - 1
resources/views/partials/newFilterElement.blade.php

@@ -2,7 +2,7 @@
     <div class="px-1">
         <div class="d-flex mb-2 {{ $isSort ? '' : 'd-none' }}">
             <div class="me-3">Сортировка</div>
-            <div class="d-flex w-75">
+            <div class="d-flex filter-sort-controls">
                 <button type="button" class="btn btn-outline-secondary btn-sm w-100" id="sort-by-asc-{{$id}}"><i class="bi bi-arrow-up"></i>ASC</button>
                 <button type="button" class="btn btn-outline-secondary btn-sm w-100" id="sort-by-desc-{{$id}}"><i class="bi bi-arrow-down"></i>DESC</button>
             </div>

+ 2 - 2
resources/views/partials/pagination.blade.php

@@ -5,10 +5,10 @@
 
 
 <div class="row px-3 py-1 align-items-center table-pagination-row">
-    <div class="col-md-7 pagination">
+    <div class="col-12 col-md-7 pagination">
         {{ $items->links() }}
     </div>
-    <div class="col-md-5">
+    <div class="col-12 col-md-5">
         @if($items->count())
             @include('partials.select', ['name' => 'per_page', 'title' => 'Результатов на странице:', 'options' => $pp, 'value' => $per_page, 'key_as_val' => true, 'mb' => 1])
         @endif

+ 1 - 1
resources/views/partials/submit.blade.php

@@ -1,5 +1,5 @@
 <div class="row">
-    <div class="@if(!($right ?? null)) offset-md-{{ $offset ?? 4 }} col-md-{{ (isset($offset)) ? 12 - $offset : 8  }} @endif buttons">
+    <div class="@if(!($right ?? null)) offset-md-{{ $offset ?? 4 }} col-md-{{ (isset($offset)) ? 12 - $offset : 8  }} @endif buttons d-flex flex-wrap gap-1">
         <button type="submit" class="btn btn-sm mb-1 btn-primary text-white" @disabled($disabled ?? false)>{{ $name ?? 'Сохранить' }}</button>
         @if(isset($delete) && !($deleteDisabled ?? false))
             <a href="#" class="btn btn-sm mb-1 btn-danger delete">{{ $delete['title'] ?? 'Удалить' }}</a>

+ 37 - 13
resources/views/partials/table.blade.php

@@ -415,6 +415,20 @@
             return $(target).closest('a, button, input, select, textarea, label, .dropdown, [data-bs-toggle], [data-no-row-select]').length > 0;
         }
 
+        function openRow($row) {
+            const href = $row.data('row-href');
+            if (!href) {
+                return;
+            }
+            selectRow($row, false);
+            const target = $row.data('open-target');
+            if (target === '_blank') {
+                window.open(href, '_blank');
+            } else {
+                window.location.href = href;
+            }
+        }
+
         function selectRow($row, updateHash = true) {
             if (!$row || !$row.length) {
                 return;
@@ -438,25 +452,35 @@
             if (isRowActionTarget(e.target)) {
                 return;
             }
-            selectRow($(this));
-        });
+            const $row = $(this);
+            selectRow($row);
 
-        $(document).on('dblclick', '.table-interactive tbody tr', function (e) {
-            if (isRowActionTarget(e.target)) {
+            // На мобильных dblclick часто не срабатывает, поэтому поддерживаем двойной тап.
+            const isTouchDevice = window.matchMedia('(pointer: coarse)').matches || ('ontouchstart' in window);
+            if (!isTouchDevice) {
                 return;
             }
-            const $row = $(this);
-            const href = $row.data('row-href');
-            if (!href) {
+
+            const now = Date.now();
+            const rowKey = String($row.data('row-id') ?? $row.data('row-href') ?? '');
+            const lastTapAt = Number($row.data('last-tap-at') ?? 0);
+            const lastTapKey = String($row.data('last-tap-key') ?? '');
+
+            if (lastTapAt && (now - lastTapAt) < 450 && rowKey && lastTapKey === rowKey) {
+                openRow($row);
+                $row.removeData('last-tap-at').removeData('last-tap-key');
                 return;
             }
-            selectRow($row, false);
-            const target = $row.data('open-target');
-            if (target === '_blank') {
-                window.open(href, '_blank');
-            } else {
-                window.location.href = href;
+
+            $row.data('last-tap-at', now);
+            $row.data('last-tap-key', rowKey);
+        });
+
+        $(document).on('dblclick', '.table-interactive tbody tr', function (e) {
+            if (isRowActionTarget(e.target)) {
+                return;
             }
+            openRow($(this));
         });
 
         $('.toggle-column').on('change', function () {

+ 16 - 16
resources/views/reclamations/edit.blade.php

@@ -7,7 +7,7 @@
             <div class="col-xl-6">
                 <h4>Рекламация</h4>
             </div>
-            <div class="col-xl-6 text-end mb-2">
+            <div class="col-xl-6 action-toolbar mb-2">
                 @if(hasRole('admin') && !is_null($reclamation->brigadier_id) && !is_null($reclamation->start_work_date))
                     <button class="btn btn-sm btn-primary" id="createScheduleButton">Перенести в график</button>
                 @endif
@@ -121,8 +121,8 @@
                         @csrf
                         <div class="spare-parts-rows">
                             @forelse($reclamation->spareParts as $idx => $sp)
-                                <div class="row mb-1 spare-part-row" data-index="{{ $idx }}">
-                                    <div class="col-6 position-relative">
+                                <div class="row mb-1 spare-part-row g-1" data-index="{{ $idx }}">
+                                    <div class="col-12 col-md-6 position-relative">
                                         <input type="hidden" name="rows[{{ $idx }}][spare_part_id]" value="{{ $sp->id }}" class="spare-part-id">
                                         <input type="text" class="form-control form-control-sm spare-part-search"
                                                value="{{ $sp->article }}@if($sp->used_in_maf) ({{ $sp->used_in_maf }})@endif"
@@ -131,13 +131,13 @@
                                                @disabled(!hasRole('admin,manager'))>
                                         <div class="spare-part-dropdown"></div>
                                     </div>
-                                    <div class="col-2">
+                                    <div class="col-4 col-md-2">
                                         <input type="number" name="rows[{{ $idx }}][quantity]" value="{{ $sp->pivot->quantity }}"
                                                min="0" class="form-control form-control-sm text-end"
                                                @disabled(!hasRole('admin,manager'))
                                                placeholder="кол-во">
                                     </div>
-                                    <div class="col-3">
+                                    <div class="col-5 col-md-3">
                                         <div class="form-check form-check-inline mt-1">
                                             <input type="hidden" name="rows[{{ $idx }}][with_documents]" value="0">
                                             <input type="checkbox" name="rows[{{ $idx }}][with_documents]" value="1"
@@ -147,15 +147,15 @@
                                             <label class="form-check-label small" for="with_docs_{{ $idx }}">с док.</label>
                                         </div>
                                     </div>
-                                    <div class="col-1">
+                                    <div class="col-3 col-md-1">
                                         <span class="btn btn-sm text-danger remove-spare-part-row" title="Удалить строку">
                                             <i class="bi bi-x-circle"></i>
                                         </span>
                                     </div>
                                 </div>
                             @empty
-                                <div class="row mb-1 spare-part-row" data-index="0">
-                                    <div class="col-6 position-relative">
+                                <div class="row mb-1 spare-part-row g-1" data-index="0">
+                                    <div class="col-12 col-md-6 position-relative">
                                         <input type="hidden" name="rows[0][spare_part_id]" value="" class="spare-part-id">
                                         <input type="text" class="form-control form-control-sm spare-part-search"
                                                value=""
@@ -164,13 +164,13 @@
                                                @disabled(!hasRole('admin,manager'))>
                                         <div class="spare-part-dropdown"></div>
                                     </div>
-                                    <div class="col-2">
+                                    <div class="col-4 col-md-2">
                                         <input type="number" name="rows[0][quantity]" value=""
                                                min="0" class="form-control form-control-sm text-end"
                                                @disabled(!hasRole('admin,manager'))
                                                placeholder="кол-во">
                                     </div>
-                                    <div class="col-3">
+                                    <div class="col-5 col-md-3">
                                         <div class="form-check form-check-inline mt-1">
                                             <input type="hidden" name="rows[0][with_documents]" value="0">
                                             <input type="checkbox" name="rows[0][with_documents]" value="1"
@@ -179,7 +179,7 @@
                                             <label class="form-check-label small" for="with_docs_0">с док.</label>
                                         </div>
                                     </div>
-                                    <div class="col-1">
+                                    <div class="col-3 col-md-1">
                                         <span class="btn btn-sm text-danger remove-spare-part-row" title="Удалить строку">
                                             <i class="bi bi-x-circle"></i>
                                         </span>
@@ -187,8 +187,8 @@
                                 </div>
                             @endforelse
                         </div>
-                        <div class="row mb-1 spare-part-row spare-part-template d-none" data-index="__INDEX__">
-                            <div class="col-6 position-relative">
+                        <div class="row mb-1 spare-part-row spare-part-template g-1 d-none" data-index="__INDEX__">
+                            <div class="col-12 col-md-6 position-relative">
                                 <input type="hidden" name="rows[__INDEX__][spare_part_id]" value="" class="spare-part-id">
                                 <input type="text" class="form-control form-control-sm spare-part-search"
                                        value=""
@@ -197,12 +197,12 @@
                                        disabled>
                                 <div class="spare-part-dropdown"></div>
                             </div>
-                            <div class="col-2">
+                            <div class="col-4 col-md-2">
                                 <input type="number" name="rows[__INDEX__][quantity]" value=""
                                        min="0" class="form-control form-control-sm text-end" disabled
                                        placeholder="кол-во">
                             </div>
-                            <div class="col-3">
+                            <div class="col-5 col-md-3">
                                 <div class="form-check form-check-inline mt-1">
                                     <input type="hidden" name="rows[__INDEX__][with_documents]" value="0">
                                     <input type="checkbox" name="rows[__INDEX__][with_documents]" value="1"
@@ -210,7 +210,7 @@
                                     <label class="form-check-label small">с док.</label>
                                 </div>
                             </div>
-                            <div class="col-1">
+                            <div class="col-3 col-md-1">
                                 <span class="btn btn-sm text-danger remove-spare-part-row" title="Удалить строку">
                                     <i class="bi bi-x-circle"></i>
                                 </span>

+ 3 - 3
resources/views/reports/index.blade.php

@@ -26,7 +26,7 @@
         <div class="col-md-4 text-end"></div>
     </div>
 
-    <ul class="nav nav-tabs" id="myTab" role="tablist">
+    <ul class="nav nav-tabs report-tabs" id="myTab" role="tablist">
         <li class="nav-item" role="presentation">
             <button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#mount" type="button"
                     role="tab" aria-controls="mount" aria-selected="true">Монтаж МАФ
@@ -49,7 +49,7 @@
         </li>
     </ul>
 
-    <div class="tab-content border-end border-start border-bottom p-5" id="myTabContent">
+    <div class="tab-content border-end border-start border-bottom report-tab-content" id="myTabContent">
 
         <div class="tab-pane fade show active" id="mount" role="tabpanel" aria-labelledby="home-tab" tabindex="0">
             <div class="row">
@@ -184,7 +184,7 @@
             </div>
             <div class="col-12 border-top my-3"></div>
             <div class="row">
-                <div class="col-12 table-responsive js-subtable-scroll">
+                <div class="col-12">
                     @include('reports.svod')
                 </div>
             </div>

+ 69 - 67
resources/views/reports/svod.blade.php

@@ -1,71 +1,73 @@
-<table class="table small svod">
-    <thead>
-        <tr class="vertical">
-            <th>Округ</th>
-            <th>Сумма</th>
-            <th>Сдано на сумму</th>
-            <th colspan="2">Всего</th>
-            <th colspan="2">Готов к монтажу</th>
-            <th colspan="2">В монтаже</th>
-            <th colspan="2">Готов к сдаче</th>
-            <th colspan="2">Сдан</th>
-            <th colspan="2">Остаток</th>
-            <th colspan="2">Двор всего</th>
-            <th colspan="2">Двор установлено</th>
-            <th colspan="2">Двор остаток</th>
-            <th colspan="2">Школы всего</th>
-            <th colspan="2">Школы установлено</th>
-            <th colspan="2">Школы остаток</th>
-            <th colspan="2">Знаковые всего</th>
-            <th colspan="2">Знаковые установлено</th>
-            <th colspan="2">Знаковые остаток</th>
-        </tr>
-        <tr class="text-center">
-            <th></th>
-            <th></th>
-            <th></th>
-            <th>Адр</th>
-            <th>МАФ</th>
-            <th>Адр</th>
-            <th>МАФ</th>
-            <th>Адр</th>
-            <th>МАФ</th>
-            <th>Адр</th>
-            <th>МАФ</th>
-            <th>Адр</th>
-            <th>МАФ</th>
-            <th>Адр</th>
-            <th>МАФ</th>
-            <th>Адр</th>
-            <th>МАФ</th>
-            <th>Адр</th>
-            <th>МАФ</th>
-            <th>Адр</th>
-            <th>МАФ</th>
-            <th>Адр</th>
-            <th>МАФ</th>
-            <th>Адр</th>
-            <th>МАФ</th>
-            <th>Адр</th>
-            <th>МАФ</th>
-            <th>Адр</th>
-            <th>МАФ</th>
-            <th>Адр</th>
-            <th>МАФ</th>
-            <th>Адр</th>
-            <th>МАФ</th>
-        </tr>
-    </thead>
-    <tbody>
-        @foreach($byDistrict as $vvv)
-            <tr>
-                @foreach($vvv as $v)
-                    <td class="text-center svod-{{ $loop->iteration }}">{!! $v !!}</td>
-                @endforeach
+<div class="table-responsive js-subtable-scroll">
+    <table class="table small svod">
+        <thead>
+            <tr class="vertical">
+                <th>Округ</th>
+                <th>Сумма</th>
+                <th>Сдано на сумму</th>
+                <th colspan="2">Всего</th>
+                <th colspan="2">Готов к монтажу</th>
+                <th colspan="2">В монтаже</th>
+                <th colspan="2">Готов к сдаче</th>
+                <th colspan="2">Сдан</th>
+                <th colspan="2">Остаток</th>
+                <th colspan="2">Двор всего</th>
+                <th colspan="2">Двор установлено</th>
+                <th colspan="2">Двор остаток</th>
+                <th colspan="2">Школы всего</th>
+                <th colspan="2">Школы установлено</th>
+                <th colspan="2">Школы остаток</th>
+                <th colspan="2">Знаковые всего</th>
+                <th colspan="2">Знаковые установлено</th>
+                <th colspan="2">Знаковые остаток</th>
             </tr>
-        @endforeach
-    </tbody>
-</table>
+            <tr class="text-center">
+                <th></th>
+                <th></th>
+                <th></th>
+                <th>Адр</th>
+                <th>МАФ</th>
+                <th>Адр</th>
+                <th>МАФ</th>
+                <th>Адр</th>
+                <th>МАФ</th>
+                <th>Адр</th>
+                <th>МАФ</th>
+                <th>Адр</th>
+                <th>МАФ</th>
+                <th>Адр</th>
+                <th>МАФ</th>
+                <th>Адр</th>
+                <th>МАФ</th>
+                <th>Адр</th>
+                <th>МАФ</th>
+                <th>Адр</th>
+                <th>МАФ</th>
+                <th>Адр</th>
+                <th>МАФ</th>
+                <th>Адр</th>
+                <th>МАФ</th>
+                <th>Адр</th>
+                <th>МАФ</th>
+                <th>Адр</th>
+                <th>МАФ</th>
+                <th>Адр</th>
+                <th>МАФ</th>
+                <th>Адр</th>
+                <th>МАФ</th>
+            </tr>
+        </thead>
+        <tbody>
+            @foreach($byDistrict as $vvv)
+                <tr>
+                    @foreach($vvv as $v)
+                        <td class="text-center svod-{{ $loop->iteration }}">{!! $v !!}</td>
+                    @endforeach
+                </tr>
+            @endforeach
+        </tbody>
+    </table>
+</div>
 
 
 

+ 4 - 4
resources/views/schedule/index.blade.php

@@ -7,7 +7,7 @@
                 <h3>График монтажей</h3>
             </div>
             <div class="col-md-6 text-end">
-                <ul class="nav nav-tabs justify-content-end">
+                <ul class="nav nav-tabs justify-content-end report-tabs">
                     <li class="nav-item">
                         <a class="nav-link @if($activeTab === 'week') active @endif"
                            href="{{ route('schedule.index', ['week' => $weekNumber, 'tab' => 'week', 'year' => $scheduleYear]) }}">Неделя</a>
@@ -23,14 +23,14 @@
         @if($activeTab === 'week')
             <div class="row mb-3">
                 <div class="col-md-12 text-end">
-                    <div class="d-flex flex-row justify-content-end">
+                    <div class="schedule-week-controls">
                         <div class="p-2">
                             <button @disabled($weekNumber == 1) class="btn btn-sm btn-primary"
                                     onclick="document.location = '{{ route('schedule.index', ['week' => $weekNumber - 1, 'tab' => 'week', 'year' => $scheduleYear]) }}'">
                                 <i class="bi bi-arrow-left"></i>
                             </button>
                         </div>
-                        <label class="p-2 d-none d-mb-block small mt-1" for="fromDate">Неделя №</label>
+                        <label class="p-2 d-none d-md-block small mt-1" for="fromDate">Неделя №</label>
                         <div class="p-2">
                             <input type="number" value="{{ $weekNumber }}"
                                    class="form-control form-control-sm week-number-input" name="weekNumber"
@@ -57,7 +57,7 @@
                             </button>
                         </div>
                         @if(hasRole('admin'))
-                        <div class="p-2 ms-3">
+                        <div class="p-2 ms-md-3">
                             <form action="{{ route('schedule.export') }}" method="post">
                                 @csrf
                                 <input type="hidden" name="start_date" value="{{ $weekDates['mon'] }}">

+ 71 - 67
resources/views/spare_part_orders/edit.blade.php

@@ -96,7 +96,7 @@
                     <textarea class="form-control" id="note" name="note" rows="3">{{ old('note', $spare_part_order->note ?? '') }}</textarea>
                 </div>
 
-                <div class="mb-3">
+                <div class="mb-3 d-flex flex-wrap gap-1 align-items-start">
                     <button type="submit" class="btn btn-success">Сохранить</button>
                     <a href="{{ $previous_url ?? route('spare_part_orders.index') }}" class="btn btn-secondary">Назад</a>
 
@@ -108,7 +108,7 @@
                     @endif
 
                     @if($spare_part_order && hasRole('admin'))
-                        <button type="button" class="btn btn-danger float-end" data-bs-toggle="modal" data-bs-target="#deleteModal">
+                        <button type="button" class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#deleteModal">
                             Удалить
                         </button>
                     @endif
@@ -121,47 +121,49 @@
                 {{-- Резервы --}}
                 @if($spare_part_order->reservations->where('status', 'active')->count() > 0)
                     <h3>Активные резервы</h3>
-                    <table class="table table-sm table-striped">
-                        <thead>
-                            <tr>
-                                <th>Кол-во</th>
-                                <th>Рекламация</th>
-                                <th>Дата</th>
-                                <th></th>
-                            </tr>
-                        </thead>
-                        <tbody>
-                            @foreach($spare_part_order->reservations->where('status', 'active') as $reservation)
+                    <div class="table-responsive js-subtable-scroll">
+                        <table class="table table-sm table-striped">
+                            <thead>
                                 <tr>
-                                    <td>{{ $reservation->reserved_qty }}</td>
-                                    <td>
-                                        @if($reservation->reclamation)
-                                            <a href="{{ route('reclamations.show', $reservation->reclamation->id) }}">#{{ $reservation->reclamation->id }}</a>
-                                        @else
-                                            -
-                                        @endif
-                                    </td>
-                                    <td>{{ $reservation->created_at->format('d.m.Y H:i') }}</td>
-                                    <td>
-                                        @if(hasRole('admin,manager'))
-                                            <form action="{{ route('spare_part_reservations.issue', $reservation) }}" method="POST" class="d-inline">
-                                                @csrf
-                                                <button type="submit" class="btn btn-sm btn-success" title="Списать">
-                                                    <i class="fas fa-check"></i>
-                                                </button>
-                                            </form>
-                                            <form action="{{ route('spare_part_reservations.cancel', $reservation) }}" method="POST" class="d-inline">
-                                                @csrf
-                                                <button type="submit" class="btn btn-sm btn-warning" title="Отменить резерв">
-                                                    <i class="fas fa-times"></i>
-                                                </button>
-                                            </form>
-                                        @endif
-                                    </td>
+                                    <th>Кол-во</th>
+                                    <th>Рекламация</th>
+                                    <th>Дата</th>
+                                    <th></th>
                                 </tr>
-                            @endforeach
-                        </tbody>
-                    </table>
+                            </thead>
+                            <tbody>
+                                @foreach($spare_part_order->reservations->where('status', 'active') as $reservation)
+                                    <tr>
+                                        <td>{{ $reservation->reserved_qty }}</td>
+                                        <td>
+                                            @if($reservation->reclamation)
+                                                <a href="{{ route('reclamations.show', $reservation->reclamation->id) }}">#{{ $reservation->reclamation->id }}</a>
+                                            @else
+                                                -
+                                            @endif
+                                        </td>
+                                        <td>{{ $reservation->created_at->format('d.m.Y H:i') }}</td>
+                                        <td>
+                                            @if(hasRole('admin,manager'))
+                                                <form action="{{ route('spare_part_reservations.issue', $reservation) }}" method="POST" class="d-inline">
+                                                    @csrf
+                                                    <button type="submit" class="btn btn-sm btn-success" title="Списать">
+                                                        <i class="fas fa-check"></i>
+                                                    </button>
+                                                </form>
+                                                <form action="{{ route('spare_part_reservations.cancel', $reservation) }}" method="POST" class="d-inline">
+                                                    @csrf
+                                                    <button type="submit" class="btn btn-sm btn-warning" title="Отменить резерв">
+                                                        <i class="fas fa-times"></i>
+                                                    </button>
+                                                </form>
+                                            @endif
+                                        </td>
+                                    </tr>
+                                @endforeach
+                            </tbody>
+                        </table>
+                    </div>
                 @endif
 
                 {{-- История движений --}}
@@ -179,33 +181,35 @@
                 @endif
 
                 @if($spare_part_order->movements->count() > 0)
-                    <table class="table table-striped">
-                        <thead>
-                            <tr>
-                                <th>Дата</th>
-                                <th>Тип</th>
-                                <th>Кол-во</th>
-                                <th>Примечание</th>
-                                <th>Пользователь</th>
-                            </tr>
-                        </thead>
-                        <tbody>
-                            @foreach($spare_part_order->movements->sortByDesc('created_at') as $movement)
-                                <tr class="@if($movement->movement_type === 'issue') table-danger @elseif($movement->movement_type === 'reserve') table-warning @elseif($movement->movement_type === 'reserve_cancel') table-info @endif">
-                                    <td>{{ $movement->created_at->format('d.m.Y H:i') }}</td>
-                                    <td>{{ $movement->type_name }}</td>
-                                    <td>{{ $movement->qty }}</td>
-                                    <td>
-                                        {{ $movement->note }}
-                                        @if($movement->source_type === 'reclamation' && $movement->source_id)
-                                            <br><small><a href="{{ route('reclamations.show', $movement->source_id) }}">Рекламация #{{ $movement->source_id }}</a></small>
-                                        @endif
-                                    </td>
-                                    <td>{{ $movement->user->name ?? '-' }}</td>
+                    <div class="table-responsive js-subtable-scroll">
+                        <table class="table table-striped">
+                            <thead>
+                                <tr>
+                                    <th>Дата</th>
+                                    <th>Тип</th>
+                                    <th>Кол-во</th>
+                                    <th>Примечание</th>
+                                    <th>Пользователь</th>
                                 </tr>
-                            @endforeach
-                        </tbody>
-                    </table>
+                            </thead>
+                            <tbody>
+                                @foreach($spare_part_order->movements->sortByDesc('created_at') as $movement)
+                                    <tr class="@if($movement->movement_type === 'issue') table-danger @elseif($movement->movement_type === 'reserve') table-warning @elseif($movement->movement_type === 'reserve_cancel') table-info @endif">
+                                        <td>{{ $movement->created_at->format('d.m.Y H:i') }}</td>
+                                        <td>{{ $movement->type_name }}</td>
+                                        <td>{{ $movement->qty }}</td>
+                                        <td>
+                                            {{ $movement->note }}
+                                            @if($movement->source_type === 'reclamation' && $movement->source_id)
+                                                <br><small><a href="{{ route('reclamations.show', $movement->source_id) }}">Рекламация #{{ $movement->source_id }}</a></small>
+                                            @endif
+                                        </td>
+                                        <td>{{ $movement->user->name ?? '-' }}</td>
+                                    </tr>
+                                @endforeach
+                            </tbody>
+                        </table>
+                    </div>
                 @else
                     <p class="text-muted">Движений пока нет</p>
                 @endif

+ 41 - 37
resources/views/year-data/index.blade.php

@@ -34,21 +34,23 @@
 
                         <div id="exportStatsBlock" class="mt-3 is-hidden">
                             <h6>Данные для экспорта за <span id="exportStatsYear"></span> год:</h6>
-                            <table class="table table-sm table-striped" id="exportStatsTable">
-                                <thead>
-                                    <tr>
-                                        <th>Сущность</th>
-                                        <th class="text-end">Количество</th>
-                                    </tr>
-                                </thead>
-                                <tbody></tbody>
-                                <tfoot>
-                                    <tr class="table-dark">
-                                        <th>Итого</th>
-                                        <th class="text-end" id="exportStatsTotal"></th>
-                                    </tr>
-                                </tfoot>
-                            </table>
+                            <div class="table-responsive">
+                                <table class="table table-sm table-striped" id="exportStatsTable">
+                                    <thead>
+                                        <tr>
+                                            <th>Сущность</th>
+                                            <th class="text-end">Количество</th>
+                                        </tr>
+                                    </thead>
+                                    <tbody></tbody>
+                                    <tfoot>
+                                        <tr class="table-dark">
+                                            <th>Итого</th>
+                                            <th class="text-end" id="exportStatsTotal"></th>
+                                        </tr>
+                                    </tfoot>
+                                </table>
+                            </div>
 
                             <form action="{{ route('year-data.export') }}" method="post">
                                 @csrf
@@ -121,28 +123,30 @@
                     <i class="bi bi-clock-history me-2"></i>Недавние экспорты
                 </div>
                 <div class="card-body">
-                    <table class="table table-striped table-hover">
-                        <thead>
-                            <tr>
-                                <th>Файл</th>
-                                <th>Дата создания</th>
-                                <th>Действия</th>
-                            </tr>
-                        </thead>
-                        <tbody>
-                            @foreach($exports as $export)
-                            <tr>
-                                <td>{{ $export->original_name }}</td>
-                                <td>{{ $export->created_at->format('d.m.Y H:i') }}</td>
-                                <td>
-                                    <a href="{{ $export->link }}" class="btn btn-sm btn-outline-primary" target="_blank">
-                                        <i class="bi bi-download"></i> Скачать
-                                    </a>
-                                </td>
-                            </tr>
-                            @endforeach
-                        </tbody>
-                    </table>
+                    <div class="table-responsive">
+                        <table class="table table-striped table-hover">
+                            <thead>
+                                <tr>
+                                    <th>Файл</th>
+                                    <th>Дата создания</th>
+                                    <th>Действия</th>
+                                </tr>
+                            </thead>
+                            <tbody>
+                                @foreach($exports as $export)
+                                <tr>
+                                    <td>{{ $export->original_name }}</td>
+                                    <td>{{ $export->created_at->format('d.m.Y H:i') }}</td>
+                                    <td>
+                                        <a href="{{ $export->link }}" class="btn btn-sm btn-outline-primary" target="_blank">
+                                            <i class="bi bi-download"></i> Скачать
+                                        </a>
+                                    </td>
+                                </tr>
+                                @endforeach
+                            </tbody>
+                        </table>
+                    </div>
                 </div>
             </div>
         </div>