Commit 2dd42157e10073ec481f3cc72584b4fb8d7e0935
Exists in
master
Merge branch 'master' of http://gitlab.nologostudio.ru/alarionov/rekamore-su
Showing 3 changed files Side-by-side Diff
app/Enums/DbExportColumns.php
... | ... | @@ -8,10 +8,10 @@ enum DbExportColumns: string |
8 | 8 | { |
9 | 9 | use EnumToArray; |
10 | 10 | |
11 | - case job_title = ['column' => 'job_titles.name', 'title' => 'Должность']; | |
12 | - case surname = ['column' => 'users.surname', 'title' => 'Фамилия']; | |
13 | - case name_man = ['column' => 'users.name_man', 'title' => 'Имя']; | |
14 | - case surname2 = ['column' => 'users.surname2', 'title' => 'Отчетство']; | |
15 | - case email = ['column' => 'users.email', 'title' => 'Почта']; | |
16 | - case telephone = ['column' => 'users.telephone', 'title' => 'Телефон']; | |
11 | + case job_titles__name = 'Должность'; | |
12 | + case users__surname = 'Фамилия'; | |
13 | + case users__name_man = 'Имя'; | |
14 | + case users__surname2 = 'Отчетство'; | |
15 | + case users__email = 'Почта'; | |
16 | + case users__telephone = 'Телефон'; | |
17 | 17 | } |
app/Http/Controllers/WorkerController.php
... | ... | @@ -229,8 +229,8 @@ class WorkerController extends Controller |
229 | 229 | |
230 | 230 | foreach (DbExportColumns::toArray() as $key => $value){ |
231 | 231 | if ($request->input($key, 0)){ |
232 | - $sheet->setCellValue("{$columnMap[count($columns)]}1", ucfirst($value['title'])); | |
233 | - $columns[] = $value['column']; | |
232 | + $sheet->setCellValue("{$columnMap[count($columns)]}1", ucfirst($value)); | |
233 | + $columns[] = str_replace('__', '.', $key); | |
234 | 234 | } |
235 | 235 | } |
236 | 236 |
resources/views/employers/bd.blade.php
... | ... | @@ -90,7 +90,7 @@ |
90 | 90 | </button> |
91 | 91 | </div> |
92 | 92 | <div class="cabinet__export-options-wrap"> |
93 | - @foreach ($export_options as $key => $export_option) | |
93 | + @foreach ($export_options as $key => $value) | |
94 | 94 | <label class="checkbox"> |
95 | 95 | <input type="checkbox" value="1" name="{{$key}}" class="checkbox__input" checked=""> |
96 | 96 | <span class="checkbox__icon"> |
... | ... | @@ -99,7 +99,7 @@ |
99 | 99 | </svg> |
100 | 100 | </span> |
101 | 101 | <span class="checkbox__text"> |
102 | - <span>{{$export_option['title']}}</span> | |
102 | + <span>{{$value}}</span> | |
103 | 103 | </span> |
104 | 104 | </label> |
105 | 105 | @endforeach |