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)
@@ -62,10 +66,20 @@ @if($chat->unread_messages_count > 0)
{{ $chat->unread_messages_count }}
@endif - - +
@endsection diff --git a/resources/views/employers/bd.blade.php b/resources/views/employers/bd.blade.php index 6c2431b..e711317 100644 --- a/resources/views/employers/bd.blade.php +++ b/resources/views/employers/bd.blade.php @@ -22,6 +22,20 @@ wrap.find('[name="search"]').val(''); wrap.find('button').click(); }); + + const $exportOptionsWrap = $(".cabinet__export-options-wrap"); + + if ($exportOptionsWrap.length && $exportOptionsWrap[0].scrollWidth > $exportOptionsWrap[0].clientWidth) { + const $scrollHint = $('
', { + style: `position: absolute; + top: 0; + right: 0; + width: 50px; + height: 100%; + background: linear-gradient(to left, rgba(255,255,255,1), rgba(255,255,255,0)); + pointer-events: none;`}); + $exportOptionsWrap.parent().css("position", "relative").append($scrollHint); + } }); @@ -146,7 +160,6 @@ - @@ -160,14 +173,13 @@ @if ($users->count()) @foreach ($users as $key => $it) + @php $worker = !empty($it->workers[0]) ? $it->workers[0] : ''; @endphp - - diff --git a/resources/views/employers/favorite.blade.php b/resources/views/employers/favorite.blade.php index 576c13a..5944982 100644 --- a/resources/views/employers/favorite.blade.php +++ b/resources/views/employers/favorite.blade.php @@ -157,7 +157,7 @@ data-src="#send2" data-vacancy="0" data-uid="{{ Auth()->user()->id }}" - data-tuid="{{ $it->users->id }}" + data-tuid="{{ $it->users ? $it->users->id : '' }}" data-options='{"touch":false,"autoFocus":false}'> diff --git a/resources/views/employers/list_vacancy.blade.php b/resources/views/employers/list_vacancy.blade.php index f7c3e54..014371a 100644 --- a/resources/views/employers/list_vacancy.blade.php +++ b/resources/views/employers/list_vacancy.blade.php @@ -26,13 +26,23 @@ } }); }); + + $(document).on('click', '.js-delete-trigger', function () { + var targetModal = $(this).data('target'); + $.fancybox.open({ + src: targetModal, + type: 'inline', + opts: { touch: false } + }); + }); + @endsection @section('content')
@include('modals.flash-message', [ - 'title' => 'Спасибо!', + 'title' => 'Успешно!', 'message' => session('success') ])
@@ -136,20 +146,24 @@ - + + @include('modals.vacancy.delete_vacancy', ['modalId' => "delete-{$it->id}", 'vacancyId' => $it->id, 'vacancyName' => $it->name]) @if ($it->active_is) - + @else - + diff --git a/resources/views/modals/chats/remove_chat.blade.php b/resources/views/modals/chats/remove_chat.blade.php index ba8c466..01d15ff 100644 --- a/resources/views/modals/chats/remove_chat.blade.php +++ b/resources/views/modals/chats/remove_chat.blade.php @@ -4,7 +4,7 @@

Удалить чат

ФИО соискателя Должность Наличие
анкеты
{{ $it->workers[0]->comment }}{{ $it->surname." ".$it->name_man }}
{{ $it->surname2 }}
- @if($it->workers[0]->positions_work) - {{ $it->workers[0]->jobs->first()->name }} + @if($worker && $worker->positions_work) + {{ !empty($worker->jobs) ? $worker->jobs->first()->name : '' }} @endif