diff --git a/app/Http/Controllers/Ad_jobsController.php b/app/Http/Controllers/Ad_jobsController.php index 21376d9..d98500b 100644 --- a/app/Http/Controllers/Ad_jobsController.php +++ b/app/Http/Controllers/Ad_jobsController.php @@ -118,6 +118,7 @@ class Ad_jobsController extends Controller } $handler->sendVacancy($vacancy); - return response()->redirectTo(route('employer.vacancy_list')); + return redirect()->route('employer.vacancy_list') + ->with('success', 'Вакансия отправлена в телеграм'); } } diff --git a/app/Http/Controllers/EmployerController.php b/app/Http/Controllers/EmployerController.php index 774e3ee..3d7104d 100644 --- a/app/Http/Controllers/EmployerController.php +++ b/app/Http/Controllers/EmployerController.php @@ -30,6 +30,7 @@ use Illuminate\Database\Eloquent\Builder; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Mail; @@ -301,7 +302,7 @@ class EmployerController extends Controller $ad_employer->delete(); return redirect()->route('employer.vacancy_list') - ->with('success', 'Данные были успешно сохранены'); + ->with('success', 'Вакансия удалена'); } // Обновление даты @@ -310,16 +311,23 @@ class EmployerController extends Controller $ad_employer->updated_at = $up; $ad_employer->save(); - return redirect()->back(); + return redirect()->route('employer.vacancy_list') + ->with('success', 'Вакансия поднята'); } //Видимость вакансии public function vacancy_eye(Ad_employer $ad_employer, $status) { + $statusMessages = [ + 'Вакансия скрыта', + 'Вакансия видна работникам' + ]; + $vac_emp = Ad_employer::findOrFail($ad_employer->id); $vac_emp->active_is = $status; $vac_emp->save(); - return redirect()->route('employer.vacancy_list'); + return redirect()->route('employer.vacancy_list') + ->with('success', $statusMessages[$status]); } //Вакансия редактирования (шаблон) @@ -382,7 +390,14 @@ class EmployerController extends Controller $chat_id = $request->get('id'); $is_fixed = $request->get('is_fixed'); - Chat::pin_chat($chat_id, $is_fixed); + $new_state = Chat::pin_chat($chat_id, $is_fixed); + + if ($new_state !== null) { + $message = $new_state ? 'Сообщение закреплено' : 'Сообщение откреплено'; + return redirect()->back()->with('success', $message); + } + + return redirect()->back()->withErrors(['message' => 'Ошибка: сообщение не удалось обновить.']); } public function remove_chat(Request $request){ @@ -581,14 +596,13 @@ class EmployerController extends Controller ->orWhere('email', 'LIKE', "%$find_key%") ->orWhere('telephone', 'LIKE', "%$find_key%"); } + $count_users = $users->count(); // Данные $users = $users ->Baseuser() - ->orderByDesc(Worker::select('created_at') - ->whereColumn('workers.user_id', 'users.id')); - $count_users = $users->count(); - $users = $users->paginate(10); + ->orderByDesc('created_at') + ->paginate(10); $export_options = DbExportColumns::toArray(); diff --git a/public/css/custom-ckeditor.css b/public/css/custom-ckeditor.css new file mode 100644 index 0000000..77e2368 --- /dev/null +++ b/public/css/custom-ckeditor.css @@ -0,0 +1,8 @@ +p { + margin: 5px; + line-height: 1.5; +} + +br { + display: inline; +} diff --git a/public/css/general.css b/public/css/general.css index 12987ec..188e71c 100644 --- a/public/css/general.css +++ b/public/css/general.css @@ -50,3 +50,24 @@ .review-image-modal{ cursor: pointer; } + +.cabinet__export-options-wrap { + display: flex; + flex-wrap: nowrap; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + scroll-behavior: smooth; + gap: 10px; +} + +.cabinet__export-options-wrap::-webkit-scrollbar { + display: none; +} + +@media (min-width: 768px) { + .cabinet__export-options-wrap { + flex-wrap: wrap; + overflow-x: visible; + gap: 20px; + } +} diff --git a/public/css/style_may2024.css b/public/css/style_may2024.css index 052a138..6b39047 100644 --- a/public/css/style_may2024.css +++ b/public/css/style_may2024.css @@ -8348,7 +8348,8 @@ main + .news { } .cabinet__title { font-size: 24px; - color: #6b6c6d; + /*color: #6b6c6d;*/ + color: #000000 } @media (min-width: 768px) { .cabinet__title { @@ -9802,7 +9803,7 @@ nav .drop-down.closed { /* When toggled via jQuery this class will reduce the height of the ul which inconjuction with overflow: hidden set on the ul will hide all list items apart from the first */ /* current li height 38px + 5px border */ - height: 43px; + height: 35px; } .select2-selection__choice[title*="Все должности"] .select2-selection__choice__remove { diff --git a/resources/views/chats/chats_list.blade.php b/resources/views/chats/chats_list.blade.php index f9ed4bd..fd4746b 100644 --- a/resources/views/chats/chats_list.blade.php +++ b/resources/views/chats/chats_list.blade.php @@ -27,6 +27,10 @@ @endif @if ($chats->count()) + @include('modals.flash-message', [ + 'title' => 'Успешно!', + 'message' => session('success') + ]) @foreach($chats as $chat) @if(!$chat->is_admin_chat)