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 @@