From ea2a5ac1335f301d646e09729610d73b16c74913 Mon Sep 17 00:00:00 2001 From: Sergey Panarin Date: Thu, 20 Jun 2024 12:57:26 +0200 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8=D1?= =?UTF-8?q?=8F=20=D0=B4=D0=BB=D1=8F=20=D1=80=D0=B0=D0=B7=D0=B4=D0=B5=D0=BB=D0?= =?UTF-8?q?=B0=20"=D0=91=D0=B0=D0=B7=D0=B0=20=D0=B4=D0=B0=D0=BD=D0=BD=D1=8B=D1?= =?UTF-8?q?=85"=20=D0=B2=20=D0=BB=D0=B8=D1=87=D0=BD=D0=BE=D0=BC=20=D0=BA=D0=B0?= =?UTF-8?q?=D0=B1=D0=B8=D0=BD=D0=B5=D1=82=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Enums/DbExportColumns.php | 12 ++++++------ app/Http/Controllers/WorkerController.php | 4 ++-- resources/views/employers/bd.blade.php | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/Enums/DbExportColumns.php b/app/Enums/DbExportColumns.php index 7ee2a86..53476a8 100644 --- a/app/Enums/DbExportColumns.php +++ b/app/Enums/DbExportColumns.php @@ -8,10 +8,10 @@ enum DbExportColumns: string { use EnumToArray; - case job_title = ['column' => 'job_titles.name', 'title' => 'Должность']; - case surname = ['column' => 'users.surname', 'title' => 'Фамилия']; - case name_man = ['column' => 'users.name_man', 'title' => 'Имя']; - case surname2 = ['column' => 'users.surname2', 'title' => 'Отчетство']; - case email = ['column' => 'users.email', 'title' => 'Почта']; - case telephone = ['column' => 'users.telephone', 'title' => 'Телефон']; + case job_titles__name = 'Должность'; + case users__surname = 'Фамилия'; + case users__name_man = 'Имя'; + case users__surname2 = 'Отчетство'; + case users__email = 'Почта'; + case users__telephone = 'Телефон'; } diff --git a/app/Http/Controllers/WorkerController.php b/app/Http/Controllers/WorkerController.php index 9b574b1..06c6488 100644 --- a/app/Http/Controllers/WorkerController.php +++ b/app/Http/Controllers/WorkerController.php @@ -229,8 +229,8 @@ class WorkerController extends Controller foreach (DbExportColumns::toArray() as $key => $value){ if ($request->input($key, 0)){ - $sheet->setCellValue("{$columnMap[count($columns)]}1", ucfirst($value['title'])); - $columns[] = $value['column']; + $sheet->setCellValue("{$columnMap[count($columns)]}1", ucfirst($value)); + $columns[] = str_replace('__', '.', $key); } } diff --git a/resources/views/employers/bd.blade.php b/resources/views/employers/bd.blade.php index e5ff101..106be4c 100644 --- a/resources/views/employers/bd.blade.php +++ b/resources/views/employers/bd.blade.php @@ -90,7 +90,7 @@
- @foreach ($export_options as $key => $export_option) + @foreach ($export_options as $key => $value) @endforeach -- 1.7.10.4