Commit 4882dedc8d790131e266e4523df0985bea0f3ffd

Authored by Hayk Nazaryan
1 parent 365251abd9
Exists in master

verfiy emails

Showing 13 changed files with 258 additions and 6 deletions Inline Diff

app/Http/Controllers/Auth/VerificationController.php
1 <?php 1 <?php
2 2
3 namespace App\Http\Controllers\Auth; 3 namespace App\Http\Controllers\Auth;
4 4
5 use App\Http\Controllers\Controller; 5 use App\Http\Controllers\Controller;
6 use App\Mail\ThankYouForRegistering;
7 use App\Models\User;
6 use App\Providers\RouteServiceProvider; 8 use App\Providers\RouteServiceProvider;
9 use Illuminate\Auth\Access\AuthorizationException;
10 use Illuminate\Auth\Events\Verified;
7 use Illuminate\Foundation\Auth\VerifiesEmails; 11 use Illuminate\Foundation\Auth\VerifiesEmails;
12 use Illuminate\Http\Request;
13 use Illuminate\Support\Facades\Mail;
8 14
9 class VerificationController extends Controller 15 class VerificationController extends Controller
10 { 16 {
11 /* 17 /*
12 |-------------------------------------------------------------------------- 18 |--------------------------------------------------------------------------
13 | Email Verification Controller 19 | Email Verification Controller
14 |-------------------------------------------------------------------------- 20 |--------------------------------------------------------------------------
15 | 21 |
16 | This controller is responsible for handling email verification for any 22 | This controller is responsible for handling email verification for any
17 | user that recently registered with the application. Emails may also 23 | user that recently registered with the application. Emails may also
18 | be re-sent if the user didn't receive the original email message. 24 | be re-sent if the user didn't receive the original email message.
19 | 25 |
20 */ 26 */
21 27
22 use VerifiesEmails; 28 use VerifiesEmails{
23 29 verify as public traitVerify;
30 }
24 /** 31 /**
25 * Where to redirect users after verification. 32 * Where to redirect users after verification.
26 * 33 *
27 * @var string 34 * @var string
28 */ 35 */
29 protected $redirectTo = RouteServiceProvider::HOME; 36 protected $redirectTo = RouteServiceProvider::HOME;
30 37
31 /** 38 /**
32 * Create a new controller instance. 39 * Create a new controller instance.
33 * 40 *
34 * @return void 41 * @return void
35 */ 42 */
36 public function __construct() 43 public function __construct()
37 { 44 {
38 $this->middleware('auth'); 45 $this->middleware('auth')->only('show', 'resend');
39 $this->middleware('signed')->only('verify'); 46 $this->middleware('signed')->only('verify');
40 $this->middleware('throttle:6,1')->only('verify', 'resend'); 47 $this->middleware('throttle:6,1')->only('verify', 'resend');
41 } 48 }
49
50
51 public function verify(Request $request)
52 {
53 if (!auth()->check()) {
54 auth()->loginUsingId($request->route('id'));
55 }
56
57 if ($request->route('id') != $request->user()->getKey()) {
58 throw new AuthorizationException;
59 }
60
61 if ($request->user()->hasVerifiedEmail()) {
62 return redirect($this->redirectPath());
63 }
64
65 if ($request->user()->markEmailAsVerified()) {
66 event(new Verified($request->user()));
67
68 Mail::to($request->user()->email)->send(new ThankYouForRegistering($request->user()));
69 }
70
71 return redirect($this->redirectPath())->with('success', 'Вы успешно подтвердили свой адрес почты');
72 }
73
42 } 74 }
43 75
app/Http/Controllers/WorkerController.php
1 <?php 1 <?php
2 2
3 namespace App\Http\Controllers; 3 namespace App\Http\Controllers;
4 4
5 use App\Classes\RusDate; 5 use App\Classes\RusDate;
6 use App\Classes\Tools; 6 use App\Classes\Tools;
7 use App\Http\Requests\DocumentsRequest; 7 use App\Http\Requests\DocumentsRequest;
8 use App\Http\Requests\PrevCompanyRequest; 8 use App\Http\Requests\PrevCompanyRequest;
9 use App\Http\Requests\SertificationRequest; 9 use App\Http\Requests\SertificationRequest;
10 use App\Models\Ad_employer; 10 use App\Models\Ad_employer;
11 use App\Models\ad_response; 11 use App\Models\ad_response;
12 use App\Models\Chat; 12 use App\Models\Chat;
13 use App\Models\Dop_info; 13 use App\Models\Dop_info;
14 use App\Models\Employer; 14 use App\Models\Employer;
15 use App\Models\EmployerAutoliftOption; 15 use App\Models\EmployerAutoliftOption;
16 use App\Models\infobloks; 16 use App\Models\infobloks;
17 use App\Models\Job_title; 17 use App\Models\Job_title;
18 use App\Models\Like_vacancy; 18 use App\Models\Like_vacancy;
19 use App\Models\Message; 19 use App\Models\Message;
20 use App\Models\place_works; 20 use App\Models\place_works;
21 use App\Models\PrevCompany; 21 use App\Models\PrevCompany;
22 use App\Models\ResponseWork; 22 use App\Models\ResponseWork;
23 use App\Models\sertification; 23 use App\Models\sertification;
24 use App\Models\Static_worker; 24 use App\Models\Static_worker;
25 use App\Models\Title_worker; 25 use App\Models\Title_worker;
26 use App\Models\User; 26 use App\Models\User;
27 use App\Models\User as User_Model; 27 use App\Models\User as User_Model;
28 use App\Models\Worker; 28 use App\Models\Worker;
29 use App\Models\WorkerAutoliftOption; 29 use App\Models\WorkerAutoliftOption;
30 use Barryvdh\DomPDF\Facade\Pdf; 30 use Barryvdh\DomPDF\Facade\Pdf;
31 use Carbon\Carbon; 31 use Carbon\Carbon;
32 use Illuminate\Auth\Events\Registered; 32 use Illuminate\Auth\Events\Registered;
33 use Illuminate\Database\Eloquent\Builder; 33 use Illuminate\Database\Eloquent\Builder;
34 use Illuminate\Http\RedirectResponse; 34 use Illuminate\Http\RedirectResponse;
35 use Illuminate\Http\Request; 35 use Illuminate\Http\Request;
36 use Illuminate\Pagination\LengthAwarePaginator; 36 use Illuminate\Pagination\LengthAwarePaginator;
37 use Illuminate\Support\Facades\Auth; 37 use Illuminate\Support\Facades\Auth;
38 use Illuminate\Support\Facades\DB; 38 use Illuminate\Support\Facades\DB;
39 use Illuminate\Support\Facades\Hash; 39 use Illuminate\Support\Facades\Hash;
40 use Illuminate\Support\Facades\Storage; 40 use Illuminate\Support\Facades\Storage;
41 use Illuminate\Support\Facades\Validator; 41 use Illuminate\Support\Facades\Validator;
42 use Illuminate\View\View; 42 use Illuminate\View\View;
43 use JsonException; 43 use JsonException;
44 use PhpOffice\PhpSpreadsheet\Spreadsheet; 44 use PhpOffice\PhpSpreadsheet\Spreadsheet;
45 use PhpOffice\PhpSpreadsheet\Writer\Xlsx; 45 use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
46 use Symfony\Component\HttpFoundation\StreamedResponse; 46 use Symfony\Component\HttpFoundation\StreamedResponse;
47 use App\Enums\DbExportColumns; 47 use App\Enums\DbExportColumns;
48 use App\Enums\WorkerStatuses; 48 use App\Enums\WorkerStatuses;
49 use DateTime; 49 use DateTime;
50 50
51 class WorkerController extends Controller 51 class WorkerController extends Controller
52 { 52 {
53 //профиль 53 //профиль
54 public function profile(Worker $worker) 54 public function profile(Worker $worker)
55 { 55 {
56 $get_date = date('Y.m'); 56 $get_date = date('Y.m');
57 57
58 $c = Static_worker::query()->where('year_month', '=', $get_date) 58 $c = Static_worker::query()->where('year_month', '=', $get_date)
59 ->where('user_id', '=', $worker->users->id) 59 ->where('user_id', '=', $worker->users->id)
60 ->get(); 60 ->get();
61 61
62 if ($c->count() > 0) { 62 if ($c->count() > 0) {
63 $upd = Static_worker::find($c[0]->id); 63 $upd = Static_worker::find($c[0]->id);
64 $upd->lookin = $upd->lookin + 1; 64 $upd->lookin = $upd->lookin + 1;
65 $upd->save(); 65 $upd->save();
66 } else { 66 } else {
67 $crt = new Static_worker(); 67 $crt = new Static_worker();
68 $crt->lookin = 1; 68 $crt->lookin = 1;
69 $crt->year_month = $get_date; 69 $crt->year_month = $get_date;
70 $crt->user_id = $worker->user_id; 70 $crt->user_id = $worker->user_id;
71 $crt->save(); 71 $crt->save();
72 } 72 }
73 73
74 $stat = Static_worker::query()->where('year_month', '=', $get_date) 74 $stat = Static_worker::query()->where('year_month', '=', $get_date)
75 ->where('user_id', '=', $worker->users->id) 75 ->where('user_id', '=', $worker->users->id)
76 ->get(); 76 ->get();
77 77
78 return view('public.workers.profile', compact('worker', 'stat')); 78 return view('public.workers.profile', compact('worker', 'stat'));
79 } 79 }
80 80
81 // лист база резюме 81 // лист база резюме
82 public function bd_resume(Request $request) 82 public function bd_resume(Request $request)
83 { 83 {
84 84
85 if (!Auth::check()) { 85 if (!Auth::check()) {
86 86
87 return redirect()->route('page', ['pages' => "Usloviya-razmescheniya"])->withErrors(['errors' => ['Вы не можете просматривать базу резюме. Подробнее в меню: "Условия размещения"']]); 87 return redirect()->route('page', ['pages' => "Usloviya-razmescheniya"])->withErrors(['errors' => ['Вы не можете просматривать базу резюме. Подробнее в меню: "Условия размещения"']]);
88 88
89 } 89 }
90 if ((Auth::user()->is_worker) || (!Auth()->user()->is_lookin)) 90 if ((Auth::user()->is_worker) || (!Auth()->user()->is_lookin))
91 return redirect()->route('page', ['pages' => "Usloviya-razmescheniya"])->withErrors(['errors' => ['Вы не можете просматривать базу резюме. Подробнее в меню: "Условия размещения"']]); 91 return redirect()->route('page', ['pages' => "Usloviya-razmescheniya"])->withErrors(['errors' => ['Вы не можете просматривать базу резюме. Подробнее в меню: "Условия размещения"']]);
92 92
93 93
94 $status_work = WorkerStatuses::getWorkerStatuses(); 94 $status_work = WorkerStatuses::getWorkerStatuses();
95 95
96 $resumes = Worker::query()->with('users')->with('job_titles')->orderByDesc('updated_at'); 96 $resumes = Worker::query()->with('users')->with('job_titles')->orderByDesc('updated_at');
97 $resumes = $resumes->whereHas('users', function (Builder $query) { 97 $resumes = $resumes->whereHas('users', function (Builder $query) {
98 $query->Where('is_worker', '=', '1') 98 $query->Where('is_worker', '=', '1')
99 ->Where('is_bd', '=', '0'); 99 ->Where('is_bd', '=', '0');
100 }); 100 });
101 101
102 if (($request->has('job')) && ($request->get('job') > 0)) { 102 if (($request->has('job')) && ($request->get('job') > 0)) {
103 $resumes = $resumes->whereHas('job_titles', function (Builder $query) use ($request) { 103 $resumes = $resumes->whereHas('job_titles', function (Builder $query) use ($request) {
104 $query->Where('job_titles.id', $request->get('job')); 104 $query->Where('job_titles.id', $request->get('job'));
105 }); 105 });
106 } 106 }
107 107
108 $Job_title = Job_title::query() 108 $Job_title = Job_title::query()
109 ->where('is_remove', '=', '0') 109 ->where('is_remove', '=', '0')
110 ->where('is_bd', '=' , '1') 110 ->where('is_bd', '=' , '1')
111 ->orderByDesc('sort') 111 ->orderByDesc('sort')
112 ->get(); 112 ->get();
113 113
114 if ($request->get('sort')) { 114 if ($request->get('sort')) {
115 $sort = $request->get('sort'); 115 $sort = $request->get('sort');
116 switch ($sort) { 116 switch ($sort) {
117 case 'looking_for_work': 117 case 'looking_for_work':
118 $resumes->where('status_work', '=', WorkerStatuses::LookingForWork->value); 118 $resumes->where('status_work', '=', WorkerStatuses::LookingForWork->value);
119 break; 119 break;
120 case 'considering_offers': 120 case 'considering_offers':
121 $resumes->where('status_work', '=', WorkerStatuses::ConsideringOffers->value); 121 $resumes->where('status_work', '=', WorkerStatuses::ConsideringOffers->value);
122 break; 122 break;
123 case 'not_looking_for_work': 123 case 'not_looking_for_work':
124 $resumes->where('status_work', '=', WorkerStatuses::NotLookingForWork->value); 124 $resumes->where('status_work', '=', WorkerStatuses::NotLookingForWork->value);
125 break; 125 break;
126 } 126 }
127 } 127 }
128 128
129 $resumes = $resumes->get()->filter(function ($worker) { 129 $resumes = $resumes->get()->filter(function ($worker) {
130 return Tools::getWorkerProfilePercent($worker) >= 50; 130 return Tools::getWorkerProfilePercent($worker) >= 50;
131 }); 131 });
132 132
133 $res_count = $resumes->count(); 133 $res_count = $resumes->count();
134 134
135 $currentPage = $_GET['page'] ?? 1; 135 $currentPage = $_GET['page'] ?? 1;
136 $resumes = new LengthAwarePaginator( 136 $resumes = new LengthAwarePaginator(
137 items: $resumes->slice(4 * ($currentPage - 1), 4), 137 items: $resumes->slice(4 * ($currentPage - 1), 4),
138 total: $res_count, 138 total: $res_count,
139 perPage: 4, 139 perPage: 4,
140 ); 140 );
141 $resumes->setPath('bd-resume'); 141 $resumes->setPath('bd-resume');
142 142
143 if ($request->ajax()) { 143 if ($request->ajax()) {
144 // Условия обставлены 144 // Условия обставлены
145 if ($request->has('block') && ($request->get('block') == 1)) { 145 if ($request->has('block') && ($request->get('block') == 1)) {
146 return view('ajax.resume_1', compact('resumes', 'status_work', 'res_count')); 146 return view('ajax.resume_1', compact('resumes', 'status_work', 'res_count'));
147 } 147 }
148 } else { 148 } else {
149 return view('resume', compact('resumes', 'status_work', 'res_count', 'Job_title')); 149 return view('resume', compact('resumes', 'status_work', 'res_count', 'Job_title'));
150 } 150 }
151 } 151 }
152 152
153 public function basic_information(){ 153 public function basic_information(){
154 if (!isset(Auth()->user()->id)) { 154 if (!isset(Auth()->user()->id)) {
155 abort(404); 155 abort(404);
156 } 156 }
157 157
158 $user_id = Auth()->user()->id; 158 $user_id = Auth()->user()->id;
159 159
160 $user = User::query() 160 $user = User::query()
161 ->with('workers') 161 ->with('workers')
162 ->with(['jobtitles' => function ($query) { 162 ->with(['jobtitles' => function ($query) {
163 $query->select('job_titles.id'); 163 $query->select('job_titles.id');
164 }]) 164 }])
165 ->where('id', '=', $user_id) 165 ->where('id', '=', $user_id)
166 ->first(); 166 ->first();
167 $user->workers[0]->job_titles = $user->workers[0]->job_titles->pluck('id')->toArray(); 167 $user->workers[0]->job_titles = $user->workers[0]->job_titles->pluck('id')->toArray();
168 168
169 $job_titles = Job_title::query() 169 $job_titles = Job_title::query()
170 ->where('is_remove', '=', 0) 170 ->where('is_remove', '=', 0)
171 ->where('is_bd', '=', 1) 171 ->where('is_bd', '=', 1)
172 ->orderByDesc('sort') 172 ->orderByDesc('sort')
173 ->get() 173 ->get()
174 ; 174 ;
175 175
176 return view('workers.form_basic_information', compact('user', 'job_titles')); 176 return view('workers.form_basic_information', compact('user', 'job_titles'));
177 } 177 }
178 178
179 public function additional_documents(){ 179 public function additional_documents(){
180 if (!isset(Auth()->user()->id)) { 180 if (!isset(Auth()->user()->id)) {
181 abort(404); 181 abort(404);
182 } 182 }
183 183
184 $user_id = Auth()->user()->id; 184 $user_id = Auth()->user()->id;
185 185
186 $info_blocks = infobloks::query()->OrderBy('name')->get(); 186 $info_blocks = infobloks::query()->OrderBy('name')->get();
187 $additional_document_statuses = [0 => 'Не указано', 1 => 'В наличии', 2 => 'Отсутствует']; 187 $additional_document_statuses = [0 => 'Не указано', 1 => 'В наличии', 2 => 'Отсутствует'];
188 188
189 $worker = Worker::query() 189 $worker = Worker::query()
190 ->with('users') 190 ->with('users')
191 ->with('infobloks') 191 ->with('infobloks')
192 ->WhereHas('users', function (Builder $query) use ($user_id) { 192 ->WhereHas('users', function (Builder $query) use ($user_id) {
193 $query->Where('id', $user_id); 193 $query->Where('id', $user_id);
194 }) 194 })
195 ->first(); 195 ->first();
196 if ($worker->dop_info->count()){ 196 if ($worker->dop_info->count()){
197 $worker->dop_info = $worker->dop_info->keyBy('infoblok_id')->toArray(); 197 $worker->dop_info = $worker->dop_info->keyBy('infoblok_id')->toArray();
198 } 198 }
199 199
200 return view('workers.form_additional_documents', compact('worker', 'info_blocks', 'additional_document_statuses')); 200 return view('workers.form_additional_documents', compact('worker', 'info_blocks', 'additional_document_statuses'));
201 } 201 }
202 202
203 //Лайк резюме 203 //Лайк резюме
204 public function like_controller() { 204 public function like_controller() {
205 205
206 } 206 }
207 207
208 // анкета соискателя 208 // анкета соискателя
209 public function resume_profile(Worker $worker) 209 public function resume_profile(Worker $worker)
210 { 210 {
211 if (isset(Auth()->user()->id)) { 211 if (isset(Auth()->user()->id)) {
212 $idiot = Auth()->user()->id; 212 $idiot = Auth()->user()->id;
213 } else { 213 } else {
214 $idiot = 0; 214 $idiot = 0;
215 } 215 }
216 216
217 $status_work = WorkerStatuses::getWorkerStatuses(); 217 $status_work = WorkerStatuses::getWorkerStatuses();
218 $Query = Worker::query()->with('users')->with('job_titles') 218 $Query = Worker::query()->with('users')->with('job_titles')
219 ->with('place_worker')->with('sertificate')->with('prev_company') 219 ->with('place_worker')->with('sertificate')->with('prev_company')
220 ->with('infobloks')->with('response'); 220 ->with('infobloks')->with('response');
221 $Query = $Query->where('id', '=', $worker->id); 221 $Query = $Query->where('id', '=', $worker->id);
222 $Query = $Query->get(); 222 $Query = $Query->get();
223 223
224 $get_date = date('Y.m'); 224 $get_date = date('Y.m');
225 225
226 $infoblocks = infobloks::query()->get(); 226 $infoblocks = infobloks::query()->get();
227 227
228 $c = Static_worker::query()->where('year_month', '=', $get_date) 228 $c = Static_worker::query()->where('year_month', '=', $get_date)
229 ->where('user_id', '=', $worker->user_id) 229 ->where('user_id', '=', $worker->user_id)
230 ->get(); 230 ->get();
231 231
232 if ($c->count() > 0) { 232 if ($c->count() > 0) {
233 $upd = Static_worker::find($c[0]->id); 233 $upd = Static_worker::find($c[0]->id);
234 $upd->lookin = $upd->lookin + 1; 234 $upd->lookin = $upd->lookin + 1;
235 $upd->save(); 235 $upd->save();
236 } else { 236 } else {
237 $crt = new Static_worker(); 237 $crt = new Static_worker();
238 $crt->lookin = 1; 238 $crt->lookin = 1;
239 $crt->year_month = $get_date; 239 $crt->year_month = $get_date;
240 $crt->user_id = $worker->user_id; 240 $crt->user_id = $worker->user_id;
241 $status = $crt->save(); 241 $status = $crt->save();
242 } 242 }
243 243
244 $stat = Static_worker::query()->where('year_month', '=', $get_date) 244 $stat = Static_worker::query()->where('year_month', '=', $get_date)
245 ->where('user_id', '=', $worker->user_id) 245 ->where('user_id', '=', $worker->user_id)
246 ->get(); 246 ->get();
247 247
248 return view('worker', compact('Query', 'infoblocks', 'status_work', 'idiot', 'stat')); 248 return view('worker', compact('Query', 'infoblocks', 'status_work', 'idiot', 'stat'));
249 } 249 }
250 250
251 // скачать анкету соискателя 251 // скачать анкету соискателя
252 public function resume_download(Worker $worker) 252 public function resume_download(Worker $worker)
253 { 253 {
254 $status_work = WorkerStatuses::getWorkerStatuses(); 254 $status_work = WorkerStatuses::getWorkerStatuses();
255 $Query = Worker::query()->with('users')->with('job_titles') 255 $Query = Worker::query()->with('users')->with('job_titles')
256 ->with('place_worker')->with('sertificate')->with('prev_company') 256 ->with('place_worker')->with('sertificate')->with('prev_company')
257 ->with('infobloks'); 257 ->with('infobloks');
258 $Query = $Query->where('id', '=', $worker->id); 258 $Query = $Query->where('id', '=', $worker->id);
259 $Query = $Query->get(); 259 $Query = $Query->get();
260 260
261 view()->share('Query',$Query); 261 view()->share('Query',$Query);
262 262
263 $status_work = WorkerStatuses::getWorkerStatuses(); 263 $status_work = WorkerStatuses::getWorkerStatuses();
264 $infoblocks = infobloks::query()->get(); 264 $infoblocks = infobloks::query()->get();
265 265
266 //return view('layout.pdf', compact('Query', 'status_work', 'infoblocks')); 266 //return view('layout.pdf', compact('Query', 'status_work', 'infoblocks'));
267 $pdf = PDF::loadView('layout.pdf', [ 267 $pdf = PDF::loadView('layout.pdf', [
268 'Query' => $Query, 268 'Query' => $Query,
269 'status_work' => $status_work, 269 'status_work' => $status_work,
270 'infoblocks' => $infoblocks 270 'infoblocks' => $infoblocks
271 ])->setPaper('a4', 'landscape'); 271 ])->setPaper('a4', 'landscape');
272 272
273 return $pdf->download(); 273 return $pdf->download();
274 } 274 }
275 275
276 public function resume_download_all(Request $request) { 276 public function resume_download_all(Request $request) {
277 $spreadsheet = new Spreadsheet(); 277 $spreadsheet = new Spreadsheet();
278 $sheet = $spreadsheet->getActiveSheet(); 278 $sheet = $spreadsheet->getActiveSheet();
279 279
280 $columnMap = range('A', 'Z'); 280 $columnMap = range('A', 'Z');
281 $columns = []; 281 $columns = [];
282 282
283 foreach (DbExportColumns::toArray() as $key => $value){ 283 foreach (DbExportColumns::toArray() as $key => $value){
284 if ($request->input($key, 0)){ 284 if ($request->input($key, 0)){
285 $sheet->setCellValue("{$columnMap[count($columns)]}1", ucfirst($value)); 285 $sheet->setCellValue("{$columnMap[count($columns)]}1", ucfirst($value));
286 $columns[] = str_replace('__', '.', $key); 286 $columns[] = str_replace('__', '.', $key);
287 } 287 }
288 } 288 }
289 289
290 if (empty($columns)) { 290 if (empty($columns)) {
291 return redirect()->back()->with('error', 'Пожалуйста выберите хотя бы 1 колонку для экспорта.'); 291 return redirect()->back()->with('error', 'Пожалуйста выберите хотя бы 1 колонку для экспорта.');
292 } 292 }
293 293
294 $jobIds = $request->input('job_title_list', []); 294 $jobIds = $request->input('job_title_list', []);
295 295
296 /* //query for mysql ver 8.0 or higher 296 /* //query for mysql ver 8.0 or higher
297 $users = DB::select( 297 $users = DB::select(
298 "select `job_titles`.`name`, `users`.`surname`, `users`.`name_man`, `users`.`surname2`, `users`.`email`, `users`.`telephone` 298 "select `job_titles`.`name`, `users`.`surname`, `users`.`name_man`, `users`.`surname2`, `users`.`email`, `users`.`telephone`
299 from users 299 from users
300 join workers on `users`.`id` = `workers`.`user_id` 300 join workers on `users`.`id` = `workers`.`user_id`
301 join `job_titles` 301 join `job_titles`
302 where `users`.`is_bd` = 1 302 where `users`.`is_bd` = 1
303 and (`workers`.`position_work` = `job_titles`.`id` 303 and (`workers`.`position_work` = `job_titles`.`id`
304 or exists (select 1 304 or exists (select 1
305 from JSON_TABLE( 305 from JSON_TABLE(
306 workers.positions_work, 306 workers.positions_work,
307 '$[*]' COLUMNS (id INT PATH '$')) pw 307 '$[*]' COLUMNS (id INT PATH '$')) pw
308 where pw.id = job_titles.id) 308 where pw.id = job_titles.id)
309 )". ((!empty($jobIds)) ? 'and job_titles.id in ('. implode(',', $jobIds).')' : '') 309 )". ((!empty($jobIds)) ? 'and job_titles.id in ('. implode(',', $jobIds).')' : '')
310 );*/ 310 );*/
311 311
312 $selectFields = implode(',', $columns); 312 $selectFields = implode(',', $columns);
313 313
314 $users = DB::select("SELECT $selectFields FROM users 314 $users = DB::select("SELECT $selectFields FROM users
315 JOIN workers ON `users`.`id` = `workers`.`user_id` 315 JOIN workers ON `users`.`id` = `workers`.`user_id`
316 JOIN job_titles ON (`workers`.`position_work` = `job_titles`.`id` 316 JOIN job_titles ON (`workers`.`position_work` = `job_titles`.`id`
317 OR JSON_CONTAINS(`workers`.`positions_work`, JSON_QUOTE(CAST(`job_titles`.`id` AS CHAR)), '$')) 317 OR JSON_CONTAINS(`workers`.`positions_work`, JSON_QUOTE(CAST(`job_titles`.`id` AS CHAR)), '$'))
318 WHERE `users`.`is_bd` = 1 " . ((!empty($jobIds)) ? 'AND job_titles.id IN (' . implode(',', $jobIds) . ')' : '') . ""); 318 WHERE `users`.`is_bd` = 1 " . ((!empty($jobIds)) ? 'AND job_titles.id IN (' . implode(',', $jobIds) . ')' : '') . "");
319 319
320 $users = collect($users); 320 $users = collect($users);
321 321
322 if ($users->count()) { 322 if ($users->count()) {
323 $i = 2; 323 $i = 2;
324 foreach ($users->toArray() as $user){ 324 foreach ($users->toArray() as $user){
325 $j = 0; 325 $j = 0;
326 foreach ($user as $field){ 326 foreach ($user as $field){
327 $sheet->setCellValue("{$columnMap[$j++]}$i", $field); 327 $sheet->setCellValue("{$columnMap[$j++]}$i", $field);
328 } 328 }
329 $i++; 329 $i++;
330 } 330 }
331 } 331 }
332 $writer = new Xlsx($spreadsheet); 332 $writer = new Xlsx($spreadsheet);
333 $fileName = 'DB.xlsx'; 333 $fileName = 'DB.xlsx';
334 334
335 $response = new StreamedResponse(function() use ($writer) { 335 $response = new StreamedResponse(function() use ($writer) {
336 $writer->save('php://output'); 336 $writer->save('php://output');
337 }); 337 });
338 338
339 $response->headers->set('Content-Type', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); 339 $response->headers->set('Content-Type', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
340 $response->headers->set('Content-Disposition', 'attachment;filename="' . $fileName . '"'); 340 $response->headers->set('Content-Disposition', 'attachment;filename="' . $fileName . '"');
341 $response->headers->set('Cache-Control', 'max-age=0'); 341 $response->headers->set('Cache-Control', 'max-age=0');
342 342
343 return $response; 343 return $response;
344 } 344 }
345 345
346 // Кабинет работника 346 // Кабинет работника
347 public function cabinet(Request $request) 347 public function cabinet(Request $request)
348 { 348 {
349 // дата год и месяц 349 // дата год и месяц
350 $get_date = date('Y.m'); 350 $get_date = date('Y.m');
351 351
352 $id = Auth()->user()->id; 352 $id = Auth()->user()->id;
353 353
354 $Infobloks = infobloks::query()->get(); 354 $Infobloks = infobloks::query()->get();
355 355
356 $Worker = Worker::query() 356 $Worker = Worker::query()
357 ->with(['users', 'sertificate', 'prev_company', 'infobloks', 'place_worker']) 357 ->with(['users', 'sertificate', 'prev_company', 'infobloks', 'place_worker'])
358 ->WhereHas('users', function (Builder $query) use ($id) { 358 ->WhereHas('users', function (Builder $query) use ($id) {
359 $query->Where('id', $id); 359 $query->Where('id', $id);
360 })->first(); 360 })->first();
361 361
362 $Job_titles = Job_title::query()->where('is_remove', '=', '0') 362 $Job_titles = Job_title::query()->where('is_remove', '=', '0')
363 ->where('is_bd', '=' , '1') 363 ->where('is_bd', '=' , '1')
364 ->OrderByDesc('sort')->OrderBy('name') 364 ->OrderByDesc('sort')->OrderBy('name')
365 ->get(); 365 ->get();
366 366
367 $stat = Static_worker::query()->where('year_month', '=', $get_date) 367 $stat = Static_worker::query()->where('year_month', '=', $get_date)
368 ->where('user_id', '=', $id) 368 ->where('user_id', '=', $id)
369 ->get(); 369 ->get();
370 370
371 $persent = Tools::getWorkerProfilePercent($Worker); 371 $persent = Tools::getWorkerProfilePercent($Worker);
372 372
373 $status_work = WorkerStatuses::getWorkerStatuses(); 373 $status_work = WorkerStatuses::getWorkerStatuses();
374 $additional_document_statuses = [0 => 'Не указано', 1 => 'В наличии', 2 => 'Отсутствует']; 374 $additional_document_statuses = [0 => 'Не указано', 1 => 'В наличии', 2 => 'Отсутствует'];
375 $info_blocks = infobloks::query()->OrderBy('name')->get(); 375 $info_blocks = infobloks::query()->OrderBy('name')->get();
376 376
377 $worker = Worker::query() 377 $worker = Worker::query()
378 ->with('users') 378 ->with('users')
379 ->with('sertificate') 379 ->with('sertificate')
380 ->with('prev_company') 380 ->with('prev_company')
381 ->with('infobloks') 381 ->with('infobloks')
382 ->with('place_worker') 382 ->with('place_worker')
383 ->with('job_titles') 383 ->with('job_titles')
384 ->WhereHas('users', function (Builder $query) use ($id) { 384 ->WhereHas('users', function (Builder $query) use ($id) {
385 $query->Where('id', $id); 385 $query->Where('id', $id);
386 }) 386 })
387 ->first(); 387 ->first();
388 if ($worker->dop_info->count()){ 388 if ($worker->dop_info->count()){
389 $worker->dop_info = $worker->dop_info->keyBy('infoblok_id')->toArray(); 389 $worker->dop_info = $worker->dop_info->keyBy('infoblok_id')->toArray();
390 } 390 }
391 391
392 //dd($worker->dop_info); 392 //dd($worker->dop_info);
393 393
394 if ($request->has('print')) { 394 if ($request->has('print')) {
395 dd($Worker); 395 dd($Worker);
396 } else { 396 } else {
397 return view('workers.cabinet', compact( 'persent', 'Job_titles', 'stat', 397 return view('workers.cabinet', compact( 'persent', 'Job_titles', 'stat',
398 'worker', 'info_blocks', 'status_work', 'additional_document_statuses' 398 'worker', 'info_blocks', 'status_work', 'additional_document_statuses'
399 )); 399 ));
400 } 400 }
401 } 401 }
402 402
403 // Сохранение данных 403 // Сохранение данных
404 public function cabinet_save(Worker $worker, Request $request) 404 public function cabinet_save(Worker $worker, Request $request)
405 { 405 {
406 $id = $worker->id; 406 $id = $worker->id;
407 $params = $request->all(); 407 $params = $request->all();
408 $job_title_id = $request->get('job_title_id'); 408 $job_title_id = $request->get('job_title_id');
409 409
410 $rules = [ 410 $rules = [
411 'surname' => ['required', 'string', 'max:255'], 411 'surname' => ['required', 'string', 'max:255'],
412 'name_man' => ['required', 'string', 'max:255'], 412 'name_man' => ['required', 'string', 'max:255'],
413 'email' => ['required', 'string', 'email', 'max:255'], 413 'email' => ['required', 'string', 'email', 'max:255'],
414 414
415 ]; 415 ];
416 416
417 $messages = [ 417 $messages = [
418 'required' => 'Укажите обязательное поле', 418 'required' => 'Укажите обязательное поле',
419 'min' => [ 419 'min' => [
420 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 420 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
421 'integer' => 'Поле «:attribute» должно быть :min или больше', 421 'integer' => 'Поле «:attribute» должно быть :min или больше',
422 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 422 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
423 ], 423 ],
424 'max' => [ 424 'max' => [
425 'string' => 'Поле «:attribute» должно быть не больше :max символов', 425 'string' => 'Поле «:attribute» должно быть не больше :max символов',
426 'integer' => 'Поле «:attribute» должно быть :max или меньше', 426 'integer' => 'Поле «:attribute» должно быть :max или меньше',
427 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 427 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
428 ] 428 ]
429 ]; 429 ];
430 430
431 $validator = Validator::make($params, $rules, $messages); 431 $validator = Validator::make($params, $rules, $messages);
432 432
433 if ($validator->fails()) { 433 if ($validator->fails()) {
434 return redirect()->route('worker.cabinet')->withErrors($validator); 434 return redirect()->route('worker.cabinet')->withErrors($validator);
435 } else { 435 } else {
436 436
437 if ($request->has('photo')) { 437 if ($request->has('photo')) {
438 if (!empty($worker->photo)) { 438 if (!empty($worker->photo)) {
439 Storage::delete($worker->photo); 439 Storage::delete($worker->photo);
440 } 440 }
441 $params['photo'] = $request->file('photo')->store("worker/$id", 'public'); 441 $params['photo'] = $request->file('photo')->store("worker/$id", 'public');
442 } 442 }
443 443
444 if ($request->has('file')) { 444 if ($request->has('file')) {
445 if (!empty($worker->file)) { 445 if (!empty($worker->file)) {
446 Storage::delete($worker->file); 446 Storage::delete($worker->file);
447 } 447 }
448 $params['file'] = $request->file('file')->store("worker/$id", 'public'); 448 $params['file'] = $request->file('file')->store("worker/$id", 'public');
449 } 449 }
450 450
451 $worker->update($params); 451 $worker->update($params);
452 $use = User::find($worker->user_id); 452 $use = User::find($worker->user_id);
453 $use->surname = $request->get('surname'); 453 $use->surname = $request->get('surname');
454 $use->name_man = $request->get('name_man'); 454 $use->name_man = $request->get('name_man');
455 $use->surname2 = $request->get('surname2'); 455 $use->surname2 = $request->get('surname2');
456 456
457 $use->save(); 457 $use->save();
458 $worker->job_titles()->sync($job_title_id); 458 $worker->job_titles()->sync($job_title_id);
459 459
460 return redirect()->route('worker.cabinet')->with('success', 'Данные были успешно сохранены'); 460 return redirect()->route('worker.cabinet')->with('success', 'Данные были успешно сохранены');
461 } 461 }
462 } 462 }
463 463
464 public function cabinet_save_foto(Worker $worker, Request $request){ 464 public function cabinet_save_foto(Worker $worker, Request $request){
465 $params = ['photo' => null]; 465 $params = ['photo' => null];
466 466
467 if ($request->has('photo')) { 467 if ($request->has('photo')) {
468 if (!empty($worker->photo)) { 468 if (!empty($worker->photo)) {
469 Storage::delete($worker->photo); 469 Storage::delete($worker->photo);
470 } 470 }
471 $params['photo'] = $request->file('photo')->store("worker/$worker->id", 'public'); 471 $params['photo'] = $request->file('photo')->store("worker/$worker->id", 'public');
472 } 472 }
473 473
474 if ($request->has('file')) { 474 if ($request->has('file')) {
475 if (!empty($worker->file)) { 475 if (!empty($worker->file)) {
476 Storage::delete($worker->file); 476 Storage::delete($worker->file);
477 } 477 }
478 $params['file'] = $request->file('file')->store("worker/$worker->id", 'public'); 478 $params['file'] = $request->file('file')->store("worker/$worker->id", 'public');
479 } 479 }
480 480
481 $worker->update($params); 481 $worker->update($params);
482 482
483 return redirect()->route('worker.cabinet'); 483 return redirect()->route('worker.cabinet');
484 } 484 }
485 485
486 // Сообщения данные 486 // Сообщения данные
487 public function messages($type_message) 487 public function messages($type_message)
488 { 488 {
489 $user_id = Auth()->user()->id; 489 $user_id = Auth()->user()->id;
490 490
491 $chats = Chat::get_user_chats($user_id); 491 $chats = Chat::get_user_chats($user_id);
492 $admin_chat = Chat::get_user_admin_chat($user_id); 492 $admin_chat = Chat::get_user_admin_chat($user_id);
493 $user_type = 'worker'; 493 $user_type = 'worker';
494 494
495 return view('workers.messages', compact('chats', 'admin_chat','user_id', 'user_type')); 495 return view('workers.messages', compact('chats', 'admin_chat','user_id', 'user_type'));
496 } 496 }
497 497
498 // Избранный 498 // Избранный
499 public function favorite() 499 public function favorite()
500 { 500 {
501 return view('workers.favorite'); 501 return view('workers.favorite');
502 } 502 }
503 503
504 // Сменить пароль 504 // Сменить пароль
505 public function new_password() 505 public function new_password()
506 { 506 {
507 $email = Auth()->user()->email; 507 $email = Auth()->user()->email;
508 return view('workers.new_password', compact('email')); 508 return view('workers.new_password', compact('email'));
509 } 509 }
510 510
511 // Обновление пароля 511 // Обновление пароля
512 public function save_new_password(Request $request) { 512 public function save_new_password(Request $request) {
513 $use = Auth()->user(); 513 $use = Auth()->user();
514 $request->validate([ 514 $request->validate([
515 'password' => 'required|string', 515 'password' => 'required|string',
516 'new_password' => 'required|string', 516 'new_password' => 'required|string',
517 'new_password2' => 'required|string' 517 'new_password2' => 'required|string'
518 ]); 518 ]);
519 519
520 if ($request->get('new_password') == $request->get('new_password2')) 520 if ($request->get('new_password') == $request->get('new_password2'))
521 if ($request->get('password') !== $request->get('new_password')) { 521 if ($request->get('password') !== $request->get('new_password')) {
522 $credentials = $request->only('email', 'password'); 522 $credentials = $request->only('email', 'password');
523 if (Auth::attempt($credentials, $request->has('save_me'))) { 523 if (Auth::attempt($credentials, $request->has('save_me'))) {
524 524
525 if (!is_null($use->email_verified_at)){ 525 if (!is_null($use->email_verified_at)){
526 526
527 $user_data = User_Model::find($use->id); 527 $user_data = User_Model::find($use->id);
528 $user_data->update([ 528 $user_data->update([
529 'password' => Hash::make($request->get('new_password')), 529 'password' => Hash::make($request->get('new_password')),
530 'pubpassword' => base64_encode($request->get('new_password')), 530 'pubpassword' => base64_encode($request->get('new_password')),
531 ]); 531 ]);
532 return redirect() 532 return redirect()
533 ->route('worker.new_password') 533 ->route('worker.new_password')
534 ->with('success', 'Поздравляю! Вы обновили свой пароль!'); 534 ->with('success', 'Поздравляю! Вы обновили свой пароль!');
535 } 535 }
536 536
537 return redirect() 537 return redirect()
538 ->route('worker.new_password') 538 ->route('worker.new_password')
539 ->withError('Данная учетная запись не было верифицированна!'); 539 ->withError('Данная учетная запись не было верифицированна!');
540 } 540 }
541 } 541 }
542 542
543 return redirect() 543 return redirect()
544 ->route('worker.new_password') 544 ->route('worker.new_password')
545 ->withErrors('Не совпадение данных, обновите пароли!'); 545 ->withErrors('Не совпадение данных, обновите пароли!');
546 } 546 }
547 547
548 // Удаление профиля форма 548 // Удаление профиля форма
549 public function delete_profile() 549 public function delete_profile()
550 { 550 {
551 $login = Auth()->user()->email; 551 $login = Auth()->user()->email;
552 return view('workers.delete_profile', compact('login')); 552 return view('workers.delete_profile', compact('login'));
553 } 553 }
554 554
555 // Удаление профиля код 555 // Удаление профиля код
556 public function delete_profile_result(Request $request) { 556 public function delete_profile_result(Request $request) {
557 $Answer = $request->all(); 557 $Answer = $request->all();
558 $user_id = Auth()->user()->id; 558 $user_id = Auth()->user()->id;
559 $request->validate([ 559 $request->validate([
560 'password' => 'required|string', 560 'password' => 'required|string',
561 ]); 561 ]);
562 562
563 $credentials = $request->only('email', 'password'); 563 $credentials = $request->only('email', 'password');
564 if (Auth::attempt($credentials)) { 564 if (Auth::attempt($credentials)) {
565 Auth::logout(); 565 Auth::logout();
566 $it = User_Model::find($user_id); 566 $it = User_Model::find($user_id);
567 $it->delete(); 567 $it->delete();
568 return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт'); 568 return redirect()->route('index')->with('success', 'Вы успешно удалили свой аккаунт');
569 } else { 569 } else {
570 return redirect()->route('worker.delete_profile') 570 return redirect()->route('worker.delete_profile')
571 ->withErrors( 'Неверный пароль! Нужен корректный пароль'); 571 ->withErrors( 'Неверный пароль! Нужен корректный пароль');
572 } 572 }
573 } 573 }
574 574
575 // Регистрация соискателя 575 // Регистрация соискателя
576 public function register_worker(Request $request) 576 public function register_worker(Request $request)
577 { 577 {
578 $params = $request->all(); 578 $params = $request->all();
579 $params['is_worker'] = 1; 579 $params['is_worker'] = 1;
580 580
581 $rules = [ 581 $rules = [
582 'surname' => ['required', 'string', 'max:255'], 582 'surname' => ['required', 'string', 'max:255'],
583 'name_man' => ['required', 'string', 'max:255'], 583 'name_man' => ['required', 'string', 'max:255'],
584 'email' => ['required', 'email', 'max:255', 'unique:users'], 584 'email' => ['required', 'email', 'max:255', 'unique:users'],
585 'password' => ['required', 'string', 'min:6'] 585 'password' => ['required', 'string', 'min:6']
586 ]; 586 ];
587 587
588 $messages = [ 588 $messages = [
589 'required' => 'Укажите обязательное поле', 589 'required' => 'Укажите обязательное поле',
590 'min' => [ 590 'min' => [
591 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 591 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
592 'integer' => 'Поле «:attribute» должно быть :min или больше', 592 'integer' => 'Поле «:attribute» должно быть :min или больше',
593 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 593 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
594 ], 594 ],
595 'max' => [ 595 'max' => [
596 'string' => 'Поле «:attribute» должно быть не больше :max символов', 596 'string' => 'Поле «:attribute» должно быть не больше :max символов',
597 'integer' => 'Поле «:attribute» должно быть :max или меньше', 597 'integer' => 'Поле «:attribute» должно быть :max или меньше',
598 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 598 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
599 ] 599 ]
600 ]; 600 ];
601 601
602 $email = $request->get('email'); 602 $email = $request->get('email');
603 if (!preg_match("/^[a-zA-Z0-9_\-.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+$/", $email)) { 603 if (!preg_match("/^[a-zA-Z0-9_\-.]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-.]+$/", $email)) {
604 return json_encode(Array("ERROR" => "Error: Отсутствует емайл или некорректный емайл")); 604 return json_encode(Array("ERROR" => "Error: Отсутствует емайл или некорректный емайл"));
605 } 605 }
606 606
607 if ($request->get('password') !== $request->get('confirmed')){ 607 if ($request->get('password') !== $request->get('confirmed')){
608 return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля")); 608 return json_encode(Array("ERROR" => "Error: Не совпадают пароль и подтверждение пароля"));
609 } 609 }
610 610
611 if (strlen($request->get('password')) < 6) { 611 if (strlen($request->get('password')) < 6) {
612 return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!")); 612 return json_encode(Array("ERROR" => "Error: Недостаточная длина пароля! Увеличьте себе длину пароля!"));
613 } 613 }
614 614
615 if (($request->has('politik')) && ($request->get('politik') == 1)) { 615 if (($request->has('politik')) && ($request->get('politik') == 1)) {
616 $validator = Validator::make($params, $rules, $messages); 616 $validator = Validator::make($params, $rules, $messages);
617 617
618 if ($validator->fails()) { 618 if ($validator->fails()) {
619 return json_encode(array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе.")); 619 return json_encode(array("ERROR" => "Error1: Регистрация оборвалась ошибкой! Не все обязательные поля заполнены. Либо вы уже были зарегистрированы в системе."));
620 } else { 620 } else {
621 $user = $this->create($params); 621 $user = $this->create($params);
622 event(new Registered($user)); 622 event(new Registered($user));
623 Auth::guard()->login($user); 623 Auth::guard()->login($user);
624 } 624 }
625 if ($user) { 625 if ($user) {
626 return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));; 626 return json_encode(Array("REDIRECT" => redirect()->route('worker.cabinet')->getTargetUrl()));;
627 } else { 627 } else {
628 return json_encode(Array("ERROR" => "Error2: Данные были утеряны!")); 628 return json_encode(Array("ERROR" => "Error2: Данные были утеряны!"));
629 } 629 }
630 630
631 } else { 631 } else {
632 return json_encode(Array("ERROR" => "Error3: Вы не согласились с политикой конфидициальности!")); 632 return json_encode(Array("ERROR" => "Error3: Вы не согласились с политикой конфидициальности!"));
633 } 633 }
634 } 634 }
635 635
636 // Звездная оценка и ответ 636 // Звездная оценка и ответ
637 public function stars_answer(Request $request) { 637 public function stars_answer(Request $request) {
638 $params = $request->all(); 638 $params = $request->all();
639 $rules = [ 639 $rules = [
640 'message' => ['required', 'string', 'max:255'], 640 'message' => ['required', 'string', 'max:255'],
641 ]; 641 ];
642 642
643 $messages = [ 643 $messages = [
644 'required' => 'Укажите обязательное поле', 644 'required' => 'Укажите обязательное поле',
645 'min' => [ 645 'min' => [
646 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 646 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
647 'integer' => 'Поле «:attribute» должно быть :min или больше', 647 'integer' => 'Поле «:attribute» должно быть :min или больше',
648 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 648 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
649 ], 649 ],
650 'max' => [ 650 'max' => [
651 'string' => 'Поле «:attribute» должно быть не больше :max символов', 651 'string' => 'Поле «:attribute» должно быть не больше :max символов',
652 'integer' => 'Поле «:attribute» должно быть :max или меньше', 652 'integer' => 'Поле «:attribute» должно быть :max или меньше',
653 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 653 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
654 ] 654 ]
655 ]; 655 ];
656 $response_worker = ResponseWork::create($params); 656 $response_worker = ResponseWork::create($params);
657 return redirect()->route('resume_profile', ['worker' => $request->get('worker_id')])->with('success', 'Ваше сообщение было отправлено!'); 657 return redirect()->route('resume_profile', ['worker' => $request->get('worker_id')])->with('success', 'Ваше сообщение было отправлено!');
658 } 658 }
659 659
660 public function TestWorker() 660 public function TestWorker()
661 { 661 {
662 $Use = new User(); 662 $Use = new User();
663 663
664 $Code_user = $Use->create([ 664 $Code_user = $Use->create([
665 'name' => 'surname name_man', 665 'name' => 'surname name_man',
666 'name_man' => 'name_man', 666 'name_man' => 'name_man',
667 'surname' => 'surname', 667 'surname' => 'surname',
668 'surname2' => 'surname2', 668 'surname2' => 'surname2',
669 'subscribe_email' => '1', 669 'subscribe_email' => '1',
670 'email' => 'email@mail.com', 670 'email' => 'email@mail.com',
671 'telephone' => '1234567890', 671 'telephone' => '1234567890',
672 'password' => Hash::make('password'), 672 'password' => Hash::make('password'),
673 'pubpassword' => base64_encode('password'), 673 'pubpassword' => base64_encode('password'),
674 'email_verified_at' => Carbon::now(), 674 // 'email_verified_at' => Carbon::now(),
675 'is_worker' => 1, 675 'is_worker' => 1,
676 ]); 676 ]);
677 677
678 if ($Code_user->id > 0) { 678 if ($Code_user->id > 0) {
679 $Worker = new Worker(); 679 $Worker = new Worker();
680 $Worker->user_id = $Code_user->id; 680 $Worker->user_id = $Code_user->id;
681 $Worker->position_work = 1; //'job_titles'; 681 $Worker->position_work = 1; //'job_titles';
682 $Worker->email = 'email@email.com'; 682 $Worker->email = 'email@email.com';
683 $Worker->telephone = '1234567890'; 683 $Worker->telephone = '1234567890';
684 $status = $Worker->save(); 684 $status = $Worker->save();
685 685
686 $Title_Worker = new Title_worker(); 686 $Title_Worker = new Title_worker();
687 $Title_Worker->worker_id = $Worker->id; 687 $Title_Worker->worker_id = $Worker->id;
688 $Title_Worker->job_title_id = 1; 688 $Title_Worker->job_title_id = 1;
689 $Title_Worker->save(); 689 $Title_Worker->save();
690 } 690 }
691 } 691 }
692 692
693 // Создание пользователя 693 // Создание пользователя
694 protected function create(array $data) 694 protected function create(array $data)
695 { 695 {
696 $Use = new User(); 696 $Use = new User();
697 697
698 $Code_user = $Use->create([ 698 $Code_user = $Use->create([
699 'name' => $data['surname']." ".$data['name_man'], 699 'name' => $data['surname']." ".$data['name_man'],
700 'name_man' => $data['name_man'], 700 'name_man' => $data['name_man'],
701 'surname' => $data['surname'], 701 'surname' => $data['surname'],
702 'surname2' => $data['surname2'], 702 'surname2' => $data['surname2'],
703 'subscribe_email' => $data['email'], 703 'subscribe_email' => $data['email'],
704 'email' => $data['email'], 704 'email' => $data['email'],
705 'telephone' => $data['telephone'], 705 'telephone' => $data['telephone'],
706 'password' => Hash::make($data['password']), 706 'password' => Hash::make($data['password']),
707 'pubpassword' => base64_encode($data['password']), 707 'pubpassword' => base64_encode($data['password']),
708 'email_verified_at' => Carbon::now(), 708 'email_verified_at' => Carbon::now(),
709 'is_worker' => $data['is_worker'], 709 'is_worker' => $data['is_worker'],
710 ]); 710 ]);
711 711
712 if ($Code_user->id > 0) { 712 if ($Code_user->id > 0) {
713 $Worker = new Worker(); 713 $Worker = new Worker();
714 $Worker->user_id = $Code_user->id; 714 $Worker->user_id = $Code_user->id;
715 $Worker->position_work = $data['job_titles']; 715 $Worker->position_work = $data['job_titles'];
716 $Worker->email = $data['email']; 716 $Worker->email = $data['email'];
717 $Worker->telephone = $data['telephone']; 717 $Worker->telephone = $data['telephone'];
718 $Worker->save(); 718 $Worker->save();
719 719
720 if (isset($Worker->id)) { 720 if (isset($Worker->id)) {
721 $Title_Worker = new Title_worker(); 721 $Title_Worker = new Title_worker();
722 $Title_Worker->worker_id = $Worker->id; 722 $Title_Worker->worker_id = $Worker->id;
723 $Title_Worker->job_title_id = $data['job_titles']; 723 $Title_Worker->job_title_id = $data['job_titles'];
724 $Title_Worker->save(); 724 $Title_Worker->save();
725 } 725 }
726 726
727 return $Code_user; 727 return $Code_user;
728 } 728 }
729 } 729 }
730 730
731 // Вакансии избранные 731 // Вакансии избранные
732 public function colorado(Request $request) { 732 public function colorado(Request $request) {
733 $Arr = Like_vacancy::Query() 733 $Arr = Like_vacancy::Query()
734 ->select('code_record') 734 ->select('code_record')
735 ->where('user_id', Auth::user()->id) 735 ->where('user_id', Auth::user()->id)
736 ->get(); 736 ->get();
737 737
738 if ($Arr->count()) { 738 if ($Arr->count()) {
739 $A = Array(); 739 $A = Array();
740 foreach ($Arr as $it) { 740 foreach ($Arr as $it) {
741 $A[] = $it->code_record; 741 $A[] = $it->code_record;
742 } 742 }
743 743
744 $Query = Ad_employer::query()->whereIn('id', $A); 744 $Query = Ad_employer::query()->whereIn('id', $A);
745 } else { 745 } else {
746 $Query = Ad_employer::query()->where('id', '=', '0'); 746 $Query = Ad_employer::query()->where('id', '=', '0');
747 } 747 }
748 748
749 $Query = $Query->with(['jobs', 'cat', 'employer']) 749 $Query = $Query->with(['jobs', 'cat', 'employer'])
750 ->whereHas('jobs_code', function ($query) use ($request) { 750 ->whereHas('jobs_code', function ($query) use ($request) {
751 if ($request->ajax()) { 751 if ($request->ajax()) {
752 if (null !== ($request->get('job'))) { 752 if (null !== ($request->get('job'))) {
753 $query->where('job_title_id', $request->get('job')); 753 $query->where('job_title_id', $request->get('job'));
754 } 754 }
755 } 755 }
756 }) 756 })
757 ->select('ad_employers.*'); 757 ->select('ad_employers.*');
758 758
759 if ($request->get('search') !== null) { 759 if ($request->get('search') !== null) {
760 $search = $request->get('search'); 760 $search = $request->get('search');
761 $Query->where('name', 'LIKE', "%$search%"); 761 $Query->where('name', 'LIKE', "%$search%");
762 } 762 }
763 763
764 //dd($Query->get()); 764 //dd($Query->get());
765 765
766 $Job_title = Job_title::query()->OrderBy('name')->get(); 766 $Job_title = Job_title::query()->OrderBy('name')->get();
767 767
768 $Query_count = $Query->count(); 768 $Query_count = $Query->count();
769 769
770 $Query = $Query->OrderBy('updated_at')->paginate(3); 770 $Query = $Query->OrderBy('updated_at')->paginate(3);
771 771
772 return view('workers.favorite', compact('Query', 772 return view('workers.favorite', compact('Query',
773 'Query_count', 773 'Query_count',
774 'Job_title')); 774 'Job_title'));
775 775
776 } 776 }
777 777
778 //Переписка 778 //Переписка
779 public function dialog(Chat $chat, Request $request) { 779 public function dialog(Chat $chat, Request $request) {
780 // Получение параметров. 780 // Получение параметров.
781 if ($request->has('ad_employer')){ 781 if ($request->has('ad_employer')){
782 $ad_employer = $request->get('ad_employer'); 782 $ad_employer = $request->get('ad_employer');
783 } else { 783 } else {
784 $ad_employer = 0; 784 $ad_employer = 0;
785 } 785 }
786 786
787 $sender = User_Model::query()->with('workers')->with('employers')->where('id', $chat->user_id)->first(); 787 $sender = User_Model::query()->with('workers')->with('employers')->where('id', $chat->user_id)->first();
788 $companion = User_Model::query()->with('workers')->with('employers')->where('id', $chat->to_user_id)->first(); 788 $companion = User_Model::query()->with('workers')->with('employers')->where('id', $chat->to_user_id)->first();
789 789
790 $Messages = Chat::get_chat_messages($chat); 790 $Messages = Chat::get_chat_messages($chat);
791 791
792 Message::where('chat_id_to', '=', $chat->id)->update(['flag_new' => 0]); 792 Message::where('chat_id_to', '=', $chat->id)->update(['flag_new' => 0]);
793 793
794 return view('workers.dialog', compact('companion', 'sender', 'chat', 'Messages', 'ad_employer')); 794 return view('workers.dialog', compact('companion', 'sender', 'chat', 'Messages', 'ad_employer'));
795 } 795 }
796 796
797 // Даунылоады 797 // Даунылоады
798 public function download(Worker $worker) { 798 public function download(Worker $worker) {
799 $arr_house = ['0' => 'Проверка, проверка, проверка, проверка, проверка...']; 799 $arr_house = ['0' => 'Проверка, проверка, проверка, проверка, проверка...'];
800 view()->share('house',$arr_house); 800 view()->share('house',$arr_house);
801 $pdf = PDF::loadView('layout.pdf', $arr_house)->setPaper('a4', 'landscape'); 801 $pdf = PDF::loadView('layout.pdf', $arr_house)->setPaper('a4', 'landscape');
802 return $pdf->stream(); 802 return $pdf->stream();
803 } 803 }
804 804
805 // Поднятие анкеты 805 // Поднятие анкеты
806 public function up(Worker $worker) { 806 public function up(Worker $worker) {
807 $worker->updated_at = Carbon::now(); 807 $worker->updated_at = Carbon::now();
808 $worker->save(); 808 $worker->save();
809 // 0 809 // 0
810 return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных'); 810 return redirect()->route('worker.cabinet')->with('success', 'Ваша анкета была поднята выше остальных');
811 } 811 }
812 812
813 // Форма сертификате 813 // Форма сертификате
814 public function new_sertificate(Worker $worker) { 814 public function new_sertificate(Worker $worker) {
815 return view('workers.sertificate_add', compact('worker')); 815 return view('workers.sertificate_add', compact('worker'));
816 } 816 }
817 817
818 // Добавление сертификата 818 // Добавление сертификата
819 public function add_serificate(SertificationRequest $request) { 819 public function add_serificate(SertificationRequest $request) {
820 $request->validate([ 820 $request->validate([
821 'name' => 'required|string|max:255', 821 'name' => 'required|string|max:255',
822 'end_begin' => 'required|date|date_format:d.m.Y' 822 'end_begin' => 'required|date|date_format:d.m.Y'
823 ], 823 ],
824 [ 824 [
825 'name' => 'Навание сертификата обязательно для заполнения.', 825 'name' => 'Навание сертификата обязательно для заполнения.',
826 'end_begin' => 'Формат даты должен соответствовать дд.мм.гггг' 826 'end_begin' => 'Формат даты должен соответствовать дд.мм.гггг'
827 ]); 827 ]);
828 828
829 $params = $request->all(); 829 $params = $request->all();
830 830
831 $end_begin = DateTime::createFromFormat('d.m.Y', $params['end_begin']); 831 $end_begin = DateTime::createFromFormat('d.m.Y', $params['end_begin']);
832 $params['end_begin'] = $end_begin->format('Y-m-d'); 832 $params['end_begin'] = $end_begin->format('Y-m-d');
833 833
834 $Sertificate = new sertification(); 834 $Sertificate = new sertification();
835 $Sertificate->create($params); 835 $Sertificate->create($params);
836 836
837 return response()->json([ 837 return response()->json([
838 'success' => true 838 'success' => true
839 ]); 839 ]);
840 } 840 }
841 841
842 // Удалить сертификат 842 // Удалить сертификат
843 public function delete_sertificate(sertification $doc) { 843 public function delete_sertificate(sertification $doc) {
844 $doc->delete(); 844 $doc->delete();
845 845
846 return redirect()->route('worker.cabinet'); 846 return redirect()->route('worker.cabinet');
847 } 847 }
848 848
849 // Редактирование сертификата 849 // Редактирование сертификата
850 public function edit_sertificate(Worker $worker, sertification $doc) { 850 public function edit_sertificate(Worker $worker, sertification $doc) {
851 return view('workers.sertificate_edit', compact('doc', 'worker')); 851 return view('workers.sertificate_edit', compact('doc', 'worker'));
852 } 852 }
853 853
854 // Редактирование обновление сертификата 854 // Редактирование обновление сертификата
855 public function update_serificate(SertificationRequest $request, sertification $doc) { 855 public function update_serificate(SertificationRequest $request, sertification $doc) {
856 $request->validate([ 856 $request->validate([
857 'name' => 'required|string|max:255', 857 'name' => 'required|string|max:255',
858 'end_begin' => 'required|date|date_format:d.m.Y' 858 'end_begin' => 'required|date|date_format:d.m.Y'
859 ], 859 ],
860 [ 860 [
861 'name' => 'Навание сертификата обязательно для заполнения.', 861 'name' => 'Навание сертификата обязательно для заполнения.',
862 'end_begin' => 'Формат даты должен соответствовать дд.мм.гггг' 862 'end_begin' => 'Формат даты должен соответствовать дд.мм.гггг'
863 ]); 863 ]);
864 864
865 $all = $request->all(); 865 $all = $request->all();
866 866
867 $end_begin = DateTime::createFromFormat('d.m.Y', $all['end_begin']); 867 $end_begin = DateTime::createFromFormat('d.m.Y', $all['end_begin']);
868 $all['end_begin'] = $end_begin->format('Y-m-d'); 868 $all['end_begin'] = $end_begin->format('Y-m-d');
869 869
870 $doc->worker_id = $all['worker_id']; 870 $doc->worker_id = $all['worker_id'];
871 $doc->name = $all['name']; 871 $doc->name = $all['name'];
872 $doc->end_begin = $all['end_begin']; 872 $doc->end_begin = $all['end_begin'];
873 $doc->save(); 873 $doc->save();
874 874
875 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!'); 875 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!');
876 } 876 }
877 877
878 public function edit_diploms(Request $request, Worker $worker) { 878 public function edit_diploms(Request $request, Worker $worker) {
879 $dop_info_data = $request->input('diploms'); 879 $dop_info_data = $request->input('diploms');
880 880
881 if (empty($dop_info_data)) { 881 if (empty($dop_info_data)) {
882 return redirect()->route('worker.additional_documents')->with('error', 'Данные не предоставлены!'); 882 return redirect()->route('worker.additional_documents')->with('error', 'Данные не предоставлены!');
883 } 883 }
884 884
885 foreach ($dop_info_data as $infoblok_id => $status) { 885 foreach ($dop_info_data as $infoblok_id => $status) {
886 Dop_info::updateOrCreate( 886 Dop_info::updateOrCreate(
887 ['worker_id' => $worker->id, 'infoblok_id' => $infoblok_id], 887 ['worker_id' => $worker->id, 'infoblok_id' => $infoblok_id],
888 ['status' => $status] 888 ['status' => $status]
889 ); 889 );
890 } 890 }
891 891
892 return redirect()->route('worker.additional_documents')->with('success', 'Успешно сохранено!'); 892 return redirect()->route('worker.additional_documents')->with('success', 'Успешно сохранено!');
893 } 893 }
894 894
895 public function delete_add_diplom(Request $request, Worker $worker) { 895 public function delete_add_diplom(Request $request, Worker $worker) {
896 $infoblok_id = $request->get('infoblok_id'); 896 $infoblok_id = $request->get('infoblok_id');
897 897
898 if (Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->count() > 0) 898 if (Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->count() > 0)
899 $id = Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->delete(); 899 $id = Dop_info::query()->where('worker_id', $worker->id)->where('infoblok_id', $infoblok_id)->delete();
900 else { 900 else {
901 $params['infoblok_id'] = $infoblok_id; 901 $params['infoblok_id'] = $infoblok_id;
902 $params['worker_id'] = $worker->id; 902 $params['worker_id'] = $worker->id;
903 $params['status'] = $request->get('val'); 903 $params['status'] = $request->get('val');
904 $id = Dop_info::create($params); 904 $id = Dop_info::create($params);
905 //$id = $worker->infobloks()->sync([$infoblok_id]); 905 //$id = $worker->infobloks()->sync([$infoblok_id]);
906 } 906 }
907 907
908 //$Infoblocks = infobloks::query()->get(); 908 //$Infoblocks = infobloks::query()->get();
909 return $id; //redirect()->route('worker.cabinet')->getTargetUrl(); //view('workers.ajax.diploms_dop', compact('worker', 'Infoblocks')); 909 return $id; //redirect()->route('worker.cabinet')->getTargetUrl(); //view('workers.ajax.diploms_dop', compact('worker', 'Infoblocks'));
910 } 910 }
911 911
912 912
913 913
914 // Добавление диплома 914 // Добавление диплома
915 public function add_diplom_ajax(Request $request) { 915 public function add_diplom_ajax(Request $request) {
916 // конец 916 // конец
917 $params = $request->all(); 917 $params = $request->all();
918 $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); 918 $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count();
919 919
920 if ($count == 0) $dop_info = Dop_info::create($params); 920 if ($count == 0) $dop_info = Dop_info::create($params);
921 $Infoblocks = infobloks::query()->get(); 921 $Infoblocks = infobloks::query()->get();
922 $Worker = Worker::query()->where('id', $request->get('worker_id'))->get(); 922 $Worker = Worker::query()->where('id', $request->get('worker_id'))->get();
923 $data = Dop_info::query()->where('worker_id', $request->has('worker_id')); 923 $data = Dop_info::query()->where('worker_id', $request->has('worker_id'));
924 return view('ajax.dop_info', compact('data', 'Infoblocks', 'Worker')); 924 return view('ajax.dop_info', compact('data', 'Infoblocks', 'Worker'));
925 } 925 }
926 926
927 // Добавление диплома без ajax 927 // Добавление диплома без ajax
928 public function add_diplom(Worker $worker) { 928 public function add_diplom(Worker $worker) {
929 $worker_id = $worker->id; 929 $worker_id = $worker->id;
930 $Infoblocks = infobloks::query()->get(); 930 $Infoblocks = infobloks::query()->get();
931 return view('workers.dop_info', compact('worker_id', 'worker', 'Infoblocks')); 931 return view('workers.dop_info', compact('worker_id', 'worker', 'Infoblocks'));
932 } 932 }
933 // Сохранить 933 // Сохранить
934 // Сохраняю диплом 934 // Сохраняю диплом
935 public function add_diplom_save(Request $request) { 935 public function add_diplom_save(Request $request) {
936 $params = $request->all(); 936 $params = $request->all();
937 $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count(); 937 $count = Dop_info::query()->where('worker_id', $request->get('worker_id'))->where('infoblok_id', $request->get('infoblok_id'))->count();
938 if ($count == 0) $dop_info = Dop_info::create($params); 938 if ($count == 0) $dop_info = Dop_info::create($params);
939 return redirect()->route('worker.cabinet'); 939 return redirect()->route('worker.cabinet');
940 } 940 }
941 941
942 // Добавление стандартного документа 942 // Добавление стандартного документа
943 public function add_document(Worker $worker) { 943 public function add_document(Worker $worker) {
944 return view('workers.docs', compact('worker')); 944 return view('workers.docs', compact('worker'));
945 } 945 }
946 946
947 //Сохранение стандартого документа 947 //Сохранение стандартого документа
948 public function add_document_save(DocumentsRequest $request) { 948 public function add_document_save(DocumentsRequest $request) {
949 $params = $request->all(); 949 $params = $request->all();
950 place_works::create($params); 950 place_works::create($params);
951 return response()->json(['success' => true]); 951 return response()->json(['success' => true]);
952 } 952 }
953 953
954 // Редактирование документа 954 // Редактирование документа
955 public function edit_document(place_works $doc, Worker $worker) { 955 public function edit_document(place_works $doc, Worker $worker) {
956 956
957 return view('workers.docs-edit', compact('doc', 'worker')); 957 return view('workers.docs-edit', compact('doc', 'worker'));
958 } 958 }
959 959
960 //Сохранение отредактированного документа 960 //Сохранение отредактированного документа
961 public function edit_document_save(DocumentsRequest $request, place_works $doc) { 961 public function edit_document_save(DocumentsRequest $request, place_works $doc) {
962 $params = $request->all(); 962 $params = $request->all();
963 $doc->update($params); 963 $doc->update($params);
964 964
965 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!'); 965 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись!');
966 } 966 }
967 967
968 // Удаление документа 968 // Удаление документа
969 public function delete_document(place_works $doc) { 969 public function delete_document(place_works $doc) {
970 $doc->delete(); 970 $doc->delete();
971 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!'); 971 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!');
972 } 972 }
973 973
974 //Отправка нового сообщения 974 //Отправка нового сообщения
975 public function new_message(Request $request) 975 public function new_message(Request $request)
976 { 976 {
977 $params = $request->all(); 977 $params = $request->all();
978 978
979 $id = $params['user_from']; 979 $id = $params['user_from'];
980 980
981 Message::add_message( 981 Message::add_message(
982 $request, 982 $request,
983 $params['user_from'], 983 $params['user_from'],
984 $params['user_to'], 984 $params['user_to'],
985 [ 985 [
986 'text' => $params['comment'] ?? null, 986 'text' => $params['comment'] ?? null,
987 'ad_employer_id' => $params['vacancy'], 987 'ad_employer_id' => $params['vacancy'],
988 'flag_new' => 1 988 'flag_new' => 1
989 ], 989 ],
990 file_store_path: "worker/$id" 990 file_store_path: "worker/$id"
991 ); 991 );
992 992
993 if ($request->ajax()) { 993 if ($request->ajax()) {
994 return response([]); 994 return response([]);
995 } 995 }
996 return redirect()->back(); 996 return redirect()->back();
997 } 997 }
998 998
999 999
1000 public function test123(Request $request) { 1000 public function test123(Request $request) {
1001 $params = $request->all(); 1001 $params = $request->all();
1002 $user1 = $params['user_id']; 1002 $user1 = $params['user_id'];
1003 $user2 = $params['to_user_id']; 1003 $user2 = $params['to_user_id'];
1004 1004
1005 $rules = [ 1005 $rules = [
1006 'text' => 'nullable|required_without:file|min:1|max:150000', 1006 'text' => 'nullable|required_without:file|min:1|max:150000',
1007 'file' => 'nullable|file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000' 1007 'file' => 'nullable|file|mimes:doc,docx,xlsx,csv,txt,xlx,xls,pdf|max:150000'
1008 ]; 1008 ];
1009 $messages = [ 1009 $messages = [
1010 'required_without' => 'Поле «:attribute» обязательно, если файл не прикреплен', 1010 'required_without' => 'Поле «:attribute» обязательно, если файл не прикреплен',
1011 'min' => [ 1011 'min' => [
1012 'string' => 'Поле «:attribute» должно быть не меньше :min символов', 1012 'string' => 'Поле «:attribute» должно быть не меньше :min символов',
1013 'integer' => 'Поле «:attribute» должно быть :min или больше', 1013 'integer' => 'Поле «:attribute» должно быть :min или больше',
1014 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт' 1014 'file' => 'Файл «:attribute» должен быть не меньше :min Кбайт'
1015 ], 1015 ],
1016 'max' => [ 1016 'max' => [
1017 'string' => 'Поле «:attribute» должно быть не больше :max символов', 1017 'string' => 'Поле «:attribute» должно быть не больше :max символов',
1018 'integer' => 'Поле «:attribute» должно быть :max или меньше', 1018 'integer' => 'Поле «:attribute» должно быть :max или меньше',
1019 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт' 1019 'file' => 'Файл «:attribute» должен быть не больше :max Кбайт'
1020 ] 1020 ]
1021 ]; 1021 ];
1022 1022
1023 $validator = Validator::make($request->all(), $rules, $messages); 1023 $validator = Validator::make($request->all(), $rules, $messages);
1024 1024
1025 if ($validator->fails()) { 1025 if ($validator->fails()) {
1026 $chat = Chat::where('user_id', $user1) 1026 $chat = Chat::where('user_id', $user1)
1027 ->where('to_user_id', $user2) 1027 ->where('to_user_id', $user2)
1028 ->where('is_removed', 0) 1028 ->where('is_removed', 0)
1029 ->first(); 1029 ->first();
1030 1030
1031 if ($chat->id){ 1031 if ($chat->id){
1032 return redirect()->route('worker.dialog', ['chat' => $chat->id])->withErrors($validator); 1032 return redirect()->route('worker.dialog', ['chat' => $chat->id])->withErrors($validator);
1033 } else { 1033 } else {
1034 return redirect()->route('cabinet.messages', ['type_message' => 'input'])->withErrors($validator); 1034 return redirect()->route('cabinet.messages', ['type_message' => 'input'])->withErrors($validator);
1035 } 1035 }
1036 } else { 1036 } else {
1037 $new_message = Message::add_message($request, $user1, $user2, $request->all(), file_store_path: 'messages'); 1037 $new_message = Message::add_message($request, $user1, $user2, $request->all(), file_store_path: 'messages');
1038 1038
1039 //dd('new message', $new_message); 1039 //dd('new message', $new_message);
1040 return redirect()->route('worker.dialog', ['chat' => $new_message->chat_id_from]); 1040 return redirect()->route('worker.dialog', ['chat' => $new_message->chat_id_from]);
1041 } 1041 }
1042 } 1042 }
1043 1043
1044 // Информация о предыдущих компаниях 1044 // Информация о предыдущих компаниях
1045 public function new_prev_company(Worker $worker) { 1045 public function new_prev_company(Worker $worker) {
1046 return view('workers.prev_company_form', compact('worker')); 1046 return view('workers.prev_company_form', compact('worker'));
1047 } 1047 }
1048 1048
1049 // Добавление контакта компании 1049 // Добавление контакта компании
1050 public function add_prev_company(PrevCompanyRequest $request) { 1050 public function add_prev_company(PrevCompanyRequest $request) {
1051 // Возвращение параметров 1051 // Возвращение параметров
1052 $all = $request->all(); 1052 $all = $request->all();
1053 PrevCompany::create($all); 1053 PrevCompany::create($all);
1054 1054
1055 return response()->json(['success' => true]); 1055 return response()->json(['success' => true]);
1056 } 1056 }
1057 1057
1058 // Редактирование контакта компании 1058 // Редактирование контакта компании
1059 public function edit_prev_company(PrevCompany $doc, Worker $worker) { 1059 public function edit_prev_company(PrevCompany $doc, Worker $worker) {
1060 return view('workers.prev_company_edit_form', compact('doc', 'worker')); 1060 return view('workers.prev_company_edit_form', compact('doc', 'worker'));
1061 } 1061 }
1062 1062
1063 //Сохранение редактирования контакта компании 1063 //Сохранение редактирования контакта компании
1064 public function update_prev_company(PrevCompany $doc, Request $request){ 1064 public function update_prev_company(PrevCompany $doc, Request $request){
1065 $all = $request->all(); 1065 $all = $request->all();
1066 $doc->update($all); 1066 $doc->update($all);
1067 1067
1068 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись'); 1068 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно отредактировали запись');
1069 } 1069 }
1070 1070
1071 // Удаление контакта предыдущей компании 1071 // Удаление контакта предыдущей компании
1072 public function delete_prev_company(PrevCompany $doc) { 1072 public function delete_prev_company(PrevCompany $doc) {
1073 $doc->delete(); 1073 $doc->delete();
1074 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!'); 1074 return redirect()->route('worker.cabinet')->with('success', 'Вы успешно удалили запись!');
1075 } 1075 }
1076 1076
1077 public function autoresponder() 1077 public function autoresponder()
1078 { 1078 {
1079 $user = Auth::user(); 1079 $user = Auth::user();
1080 return view('workers.autoresponder', compact('user')); 1080 return view('workers.autoresponder', compact('user'));
1081 } 1081 }
1082 1082
1083 public function autoresponderSave(Request $request): RedirectResponse 1083 public function autoresponderSave(Request $request): RedirectResponse
1084 { 1084 {
1085 /** @var Employer $employer */ 1085 /** @var Employer $employer */
1086 $employer = Auth::user(); 1086 $employer = Auth::user();
1087 $employer->autoresponder = $request->get('autoresponder', false) === 'on'; 1087 $employer->autoresponder = $request->get('autoresponder', false) === 'on';
1088 $employer->autoresponder_message = $request->get('autoresponder_message'); 1088 $employer->autoresponder_message = $request->get('autoresponder_message');
1089 $employer->save(); 1089 $employer->save();
1090 1090
1091 return redirect(route('worker.autoresponder')); 1091 return redirect(route('worker.autoresponder'));
1092 } 1092 }
1093 /** 1093 /**
1094 * @throws JsonException 1094 * @throws JsonException
1095 */ 1095 */
1096 public function resumeAutoLiftForm(): View 1096 public function resumeAutoLiftForm(): View
1097 { 1097 {
1098 $worker = Auth::user()->workers[0]; 1098 $worker = Auth::user()->workers[0];
1099 1099
1100 $options = $worker->autoliftOptions ?? new WorkerAutoliftOption(); 1100 $options = $worker->autoliftOptions ?? new WorkerAutoliftOption();
1101 1101
1102 return view('workers.resume_autolift', compact('worker', 'options')); 1102 return view('workers.resume_autolift', compact('worker', 'options'));
1103 } 1103 }
1104 1104
1105 /** 1105 /**
1106 * @throws JsonException 1106 * @throws JsonException
1107 */ 1107 */
1108 public function resumeAutoLiftSave(Request $request) 1108 public function resumeAutoLiftSave(Request $request)
1109 { 1109 {
1110 $worker = Auth::user()->workers[0]; 1110 $worker = Auth::user()->workers[0];
1111 1111
1112 $worker->autoliftOptions()->updateOrCreate( 1112 $worker->autoliftOptions()->updateOrCreate(
1113 [ 1113 [
1114 'worker_id' => $worker->id, 1114 'worker_id' => $worker->id,
1115 ], 1115 ],
1116 [ 1116 [
1117 'is_enabled' => $request->get('is_enabled') === 'true', 1117 'is_enabled' => $request->get('is_enabled') === 'true',
1118 'times_per_day' => $request->get('times_per_day'), 1118 'times_per_day' => $request->get('times_per_day'),
1119 'days_repeat' => $request->get('days_repeat'), 1119 'days_repeat' => $request->get('days_repeat'),
1120 'time_send_first' => $request->get('time_send_first'), 1120 'time_send_first' => $request->get('time_send_first'),
1121 'time_send_second' => $request->get('time_send_second'), 1121 'time_send_second' => $request->get('time_send_second'),
1122 'time_send_third' => $request->get('time_send_third'), 1122 'time_send_third' => $request->get('time_send_third'),
1123 'time_send_tg' => $request->get('time_send_tg'), 1123 'time_send_tg' => $request->get('time_send_tg'),
1124 'autolift_site' => $request->get('autolift_site') === 'on', 1124 'autolift_site' => $request->get('autolift_site') === 'on',
1125 ] 1125 ]
1126 ); 1126 );
1127 1127
1128 return response()->json(['success' => true]); 1128 return response()->json(['success' => true]);
1129 } 1129 }
1130 } 1130 }
1131 1131
1132 1132
app/Mail/ThankYouForRegistering.php
File was created 1 <?php
2
3 namespace App\Mail;
4
5 use Illuminate\Bus\Queueable;
6 use Illuminate\Contracts\Queue\ShouldQueue;
7 use Illuminate\Mail\Mailable;
8 use Illuminate\Mail\Mailables\Content;
9 use Illuminate\Mail\Mailables\Envelope;
10 use Illuminate\Queue\SerializesModels;
11
12 class ThankYouForRegistering extends Mailable
13 {
14 use Queueable, SerializesModels;
15
16 /**
17 * Create a new message instance.
18 *
19 * @return void
20 */
21 public $user;
22
23 public function __construct($user)
24 {
25 $this->user = $user;
26 }
27
28 /**
29 * Get the message envelope.
30 *
31 * @return \Illuminate\Mail\Mailables\Envelope
32 */
33 public function envelope()
34 {
35 return new Envelope(
36 subject: 'Благодарим за регистрацию на нашем сайте',
37 );
38 }
39
40 /**
41 * Get the message content definition.
42 *
43 * @return \Illuminate\Mail\Mailables\Content
44 */
45 public function content()
46 {
47 return new Content(
48 view: 'emails.send_already_registered',
49 );
50 }
51
52 /**
53 * Get the attachments for the message.
54 *
55 * @return array
56 */
57 public function attachments()
58 {
59 return [];
60 }
61 }
62
1 <?php 1 <?php
2 2
3 namespace App\Models; 3 namespace App\Models;
4 4
5 // use Illuminate\Contracts\Auth\MustVerifyEmail; 5 // use Illuminate\Contracts\Auth\MustVerifyEmail;
6 use Illuminate\Contracts\Auth\MustVerifyEmail;
6 use Illuminate\Database\Eloquent\Factories\HasFactory; 7 use Illuminate\Database\Eloquent\Factories\HasFactory;
7 use Illuminate\Database\Eloquent\Relations\HasMany; 8 use Illuminate\Database\Eloquent\Relations\HasMany;
8 use Illuminate\Foundation\Auth\User as Authenticatable; 9 use Illuminate\Foundation\Auth\User as Authenticatable;
9 use Illuminate\Notifications\Notifiable; 10 use Illuminate\Notifications\Notifiable;
10 use JsonException; 11 use JsonException;
11 use Laravel\Sanctum\HasApiTokens; 12 use Laravel\Sanctum\HasApiTokens;
12 13
13 class User extends Authenticatable 14 class User extends Authenticatable implements MustVerifyEmail
14 { 15 {
15 use HasApiTokens, HasFactory, Notifiable; 16 use HasApiTokens, HasFactory, Notifiable;
16 17
17 /** 18 /**
18 * The attributes that are mass assignable. 19 * The attributes that are mass assignable.
19 * 20 *
20 * @var array<int, string> 21 * @var array<int, string>
21 */ 22 */
22 23
23 protected $fillable = [ 24 protected $fillable = [
24 'name', 25 'name',
25 'email', 26 'email',
26 'password', 27 'password',
27 'admin', 28 'admin',
28 'telephone', 29 'telephone',
29 'surname', 30 'surname',
30 'name_man', 31 'name_man',
31 'surname2', 32 'surname2',
32 'is_worker', 33 'is_worker',
33 'is_lookin', 34 'is_lookin',
34 'is_message', 35 'is_message',
35 'is_public', 36 'is_public',
36 'is_worker', 37 'is_worker',
37 'is_remove', 38 'is_remove',
38 'is_ban', 39 'is_ban',
39 'is_new', 40 'is_new',
40 'is_bd', 41 'is_bd',
41 'email_verified_at', 42 'email_verified_at',
42 'created_at', 43 'created_at',
43 'updated_at', 44 'updated_at',
44 'birthday', 45 'birthday',
45 'file', 46 'file',
46 'pubpassword', 47 'pubpassword',
47 'is_manager', 48 'is_manager',
48 'subscribe_email', 49 'subscribe_email',
49 'subscribe', 50 'subscribe',
50 'autoresponder', 51 'autoresponder',
51 'autoresponder_message', 52 'autoresponder_message',
52 ]; 53 ];
53 54
54 /** 55 /**
55 * The attributes that should be hidden for serialization. 56 * The attributes that should be hidden for serialization.
56 * 57 *
57 * @var array<int, string> 58 * @var array<int, string>
58 */ 59 */
59 protected $hidden = [ 60 protected $hidden = [
60 'password', 61 'password',
61 'remember_token', 62 'remember_token',
62 ]; 63 ];
63 64
64 /** 65 /**
65 * The attributes that should be cast. 66 * The attributes that should be cast.
66 * 67 *
67 * @var array<string, string> 68 * @var array<string, string>
68 */ 69 */
69 protected $casts = [ 70 protected $casts = [
70 'email_verified_at' => 'datetime', 71 'email_verified_at' => 'datetime',
71 ]; 72 ];
72 73
73 /* 74 /*
74 * Связь Пользователей системы с работодателями 75 * Связь Пользователей системы с работодателями
75 * users - employers 76 * users - employers
76 */ 77 */
77 public function employers(): HasMany 78 public function employers(): HasMany
78 { 79 {
79 return $this->hasMany(Employer::class, 'user_id'); 80 return $this->hasMany(Employer::class, 'user_id');
80 } 81 }
81 82
82 /* 83 /*
83 * Связь Пользователей системы с работниками 84 * Связь Пользователей системы с работниками
84 * users - workers 85 * users - workers
85 */ 86 */
86 public function workers() { 87 public function workers() {
87 return $this->hasMany(Worker::class, 'user_id'); 88 return $this->hasMany(Worker::class, 'user_id');
88 } 89 }
89 90
90 /* 91 /*
91 * Связь Пользователей системы с работниками 92 * Связь Пользователей системы с работниками
92 * users - workers 93 * users - workers
93 */ 94 */
94 public function work() { 95 public function work() {
95 return $this->hasMany(Worker::class, 'user_id') 96 return $this->hasMany(Worker::class, 'user_id')
96 ->select('telephone', 'email', 'position_work', 'persent_anketa'); 97 ->select('telephone', 'email', 'position_work', 'persent_anketa');
97 } 98 }
98 99
99 /* 100 /*
100 * Связь Модели Пользователей(Users) с Группами (Group_users) 101 * Связь Модели Пользователей(Users) с Группами (Group_users)
101 * users - group_users 102 * users - group_users
102 многие-ко-многим 103 многие-ко-многим
103 */ 104 */
104 public function ingroup() { 105 public function ingroup() {
105 return $this->belongsToMany(Group_user::class, 'group_works'); 106 return $this->belongsToMany(Group_user::class, 'group_works');
106 } 107 }
107 108
108 /* 109 /*
109 * Связь Пользователей системы с ссобщениями 110 * Связь Пользователей системы с ссобщениями
110 * users - messages 111 * users - messages
111 */ 112 */
112 public function messages() { 113 public function messages() {
113 return $this->hasMany(Message::class); 114 return $this->hasMany(Message::class);
114 } 115 }
115 116
116 /* 117 /*
117 * Связь Пользователей системы с статистика 118 * Связь Пользователей системы с статистика
118 * users - static_workers 119 * users - static_workers
119 */ 120 */
120 public function static_user() { 121 public function static_user() {
121 return $this->hasMany(Static_worker::class); 122 return $this->hasMany(Static_worker::class);
122 } 123 }
123 124
124 /* 125 /*
125 * Связь модели Юзеры (users) с моделью Группы пользователей (Group_works) 126 * Связь модели Юзеры (users) с моделью Группы пользователей (Group_works)
126 один-ко-многим 127 один-ко-многим
127 */ 128 */
128 public function peoples() { 129 public function peoples() {
129 return $this->hasMany(Group_works::class); 130 return $this->hasMany(Group_works::class);
130 } 131 }
131 132
132 /* 133 /*
133 * Связь Модели Пользователей(Users) с Группами (Group_users) 134 * Связь Модели Пользователей(Users) с Группами (Group_users)
134 * users - group_users 135 * users - group_users
135 многие-ко-многим 136 многие-ко-многим
136 */ 137 */
137 public function jobtitles() { 138 public function jobtitles() {
138 return $this->belongsToMany(Job_title::class, 'workers', 'user_id', 'position_work'); 139 return $this->belongsToMany(Job_title::class, 'workers', 'user_id', 'position_work');
139 } 140 }
140 141
141 public function scopeActive($query) { 142 public function scopeActive($query) {
142 return $query->where('is_remove', '=', '0'); 143 return $query->where('is_remove', '=', '0');
143 } 144 }
144 145
145 public function scopeIsWorker($query) { 146 public function scopeIsWorker($query) {
146 return $query->where('is_worker', '=', '1'); 147 return $query->where('is_worker', '=', '1');
147 } 148 }
148 public function scopeIsLookin($query) { 149 public function scopeIsLookin($query) {
149 return $query->where('is_lookin', '=', '1'); 150 return $query->where('is_lookin', '=', '1');
150 } 151 }
151 152
152 public function scopeBaseuser($query) { 153 public function scopeBaseuser($query) {
153 return $query->where('is_bd', '=', '1'); 154 return $query->where('is_bd', '=', '1');
154 } 155 }
155 156
156 public function scopeRealuser($query) { 157 public function scopeRealuser($query) {
157 return $query->where('is_bd', '=', '0'); 158 return $query->where('is_bd', '=', '0');
158 } 159 }
159 160
160 public function scopeAdmin($query) { 161 public function scopeAdmin($query) {
161 return $query->where('admin', '=', '1'); 162 return $query->where('admin', '=', '1');
162 } 163 }
163 164
164 public function scopeNotadmin($query) { 165 public function scopeNotadmin($query) {
165 return $query->where('admin', '=', '0'); 166 return $query->where('admin', '=', '0');
166 } 167 }
167 168
168 /** 169 /**
169 * @throws JsonException 170 * @throws JsonException
170 */ 171 */
171 public function getJobAttribute(): ?string 172 public function getJobAttribute(): ?string
172 { 173 {
173 $positions = $this->workers[0]?->positions_work; 174 $positions = $this->workers[0]?->positions_work;
174 if (is_string($positions)) { 175 if (is_string($positions)) {
175 $jobIds = json_decode($positions, true, 512, JSON_THROW_ON_ERROR); 176 $jobIds = json_decode($positions, true, 512, JSON_THROW_ON_ERROR);
176 } else { 177 } else {
177 $jobIds = $positions; 178 $jobIds = $positions;
178 } 179 }
179 180
180 if ($jobIds !== null && count($jobIds) > 0) { 181 if ($jobIds !== null && count($jobIds) > 0) {
181 return Job_title::whereIn('id', $jobIds)->first()?->name; 182 return Job_title::whereIn('id', $jobIds)->first()?->name;
182 } 183 }
183 return null; 184 return null;
184 } 185 }
185 186
186 } 187 }
187 188
app/Providers/AppServiceProvider.php
1 <?php 1 <?php
2 2
3 namespace App\Providers; 3 namespace App\Providers;
4 4
5 use Carbon\Carbon;
6 use Illuminate\Auth\Notifications\VerifyEmail;
7 use Illuminate\Notifications\Messages\MailMessage;
5 use Illuminate\Support\ServiceProvider; 8 use Illuminate\Support\ServiceProvider;
9 use Illuminate\Support\Facades\URL;
6 10
7 class AppServiceProvider extends ServiceProvider 11 class AppServiceProvider extends ServiceProvider
8 { 12 {
9 /** 13 /**
10 * Register any application services. 14 * Register any application services.
11 * 15 *
12 * @return void 16 * @return void
13 */ 17 */
14 public function register() 18 public function register()
15 { 19 {
16 // 20 //
17 } 21 }
18 22
19 /** 23 /**
20 * Bootstrap any application services. 24 * Bootstrap any application services.
21 * 25 *
22 * @return void 26 * @return void
23 */ 27 */
24 public function boot() 28 public function boot()
25 { 29 {
26 // 30 VerifyEmail::toMailUsing(function ($notifiable) {
31 $verifyUrl = URL::temporarySignedRoute(
32 'verification.verify', Carbon::now()->addMinutes(60), ['id' => $notifiable->getKey(), 'hash' => sha1($notifiable->getEmailForVerification()),]
33 );
34
35 return (new MailMessage)
36 ->subject('Подтвердите ваш адрес электронной почты!')
37 ->view('emails.send_verify', ['url' => $verifyUrl]);
38 });
27 } 39 }
40
28 } 41 }
29 42
public/images/emails/19.svg
File was created 1 <svg width="222" height="74" viewBox="0 0 222 74" fill="none" xmlns="http://www.w3.org/2000/svg">
2 <rect x="0.5" y="0.5" width="221" height="73" rx="7.5" fill="#377D87"/>
3 <rect x="0.5" y="0.5" width="221" height="73" rx="7.5" stroke="#377D87"/>
4 <path d="M46.9875 64C61.8923 64 73.975 51.9117 73.975 37C73.975 22.0883 61.8923 10 46.9875 10C32.0827 10 20 22.0883 20 37C20 51.9117 32.0827 64 46.9875 64Z" fill="white"/>
5 <path d="M86.9395 47.1174C86.7741 46.5879 86.6419 46.2901 86.6419 44.6357V41.4593C86.6419 39.5732 86.0135 38.9115 84.5583 38.9115H83.4669V47.1174H80.2588V26.9666H85.0874C88.3947 26.9666 89.8499 28.4887 89.8499 31.599V33.1872C89.8499 35.2718 89.1885 36.6284 87.7663 37.2901C89.3538 37.9519 89.883 39.474 89.883 41.5916V44.7019C89.883 45.6946 89.9161 46.3894 90.2468 47.1504H86.9395V47.1174ZM83.4669 29.8453V36.0328H84.7236C85.9143 36.0328 86.6419 35.5034 86.6419 33.9151V31.9298C86.6419 30.5071 86.1458 29.8453 85.0213 29.8453H83.4669Z" fill="white"/>
6 <path d="M95.1749 35.4705H99.5736V38.3491H95.1749V44.2389H100.698V47.1175H91.9668V26.9668H100.698V29.8455H95.1749V35.4705Z" fill="white"/>
7 <path d="M106.883 39.1102L105.891 40.9631V47.1506H102.683V26.9668H105.891V35.7352L110.091 26.9668H113.299L108.834 35.9337L113.299 47.1175H109.992L106.883 39.1102Z" fill="white"/>
8 <path d="M125.138 47.1175H121.897L121.335 43.4778H117.399L116.837 47.1175H113.927L117.201 26.9668H121.864L125.138 47.1175ZM117.829 40.7315H120.905L119.351 30.5403L117.829 40.7315Z" fill="white"/>
9 <path d="M133.408 41.294L135.591 26.9999H140.055V47.1506H137.013V32.6911L134.797 47.1506H131.787L129.406 32.8896V47.1506H126.595V26.9668H131.06L133.408 41.294Z" fill="white"/>
10 <path d="M142.138 31.8311C142.138 28.6215 143.858 26.7686 147 26.7686C150.142 26.7686 151.862 28.6215 151.862 31.8311V42.32C151.862 45.5296 150.142 47.3825 147 47.3825C143.858 47.3825 142.138 45.5296 142.138 42.32V31.8311ZM145.347 42.4855C145.347 43.9083 145.975 44.4708 147 44.4708C148.025 44.4708 148.654 43.9083 148.654 42.4855V31.6325C148.654 30.2097 148.025 29.6472 147 29.6472C145.975 29.6472 145.347 30.2097 145.347 31.6325V42.4855Z" fill="white"/>
11 <path d="M160.659 47.1175C160.494 46.5881 160.361 46.2903 160.361 44.6359V41.4594C160.361 39.5734 159.733 38.9116 158.278 38.9116H157.186V47.1175H153.945V26.9668H158.774C162.081 26.9668 163.536 28.4889 163.536 31.5992V33.1874C163.536 35.2719 162.875 36.6286 161.453 37.2903C163.04 37.9521 163.57 39.4741 163.57 41.5918V44.7021C163.57 45.6947 163.603 46.3896 163.933 47.1506H160.659V47.1175ZM157.153 29.8455V36.033H158.41C159.601 36.033 160.328 35.5036 160.328 33.9153V31.93C160.328 30.5072 159.832 29.8455 158.708 29.8455H157.153Z" fill="white"/>
12 <path d="M168.861 35.4705H173.26V38.3491H168.861V44.2389H174.385V47.1175H165.653V26.9668H174.385V29.8455H168.861V35.4705Z" fill="white"/>
13 <path d="M179.478 44.0732V47.1174H176.402V44.0732H179.478Z" fill="white"/>
14 <path d="M185.993 26.7686C189.102 26.7686 190.722 28.6215 190.722 31.8311V32.4597H187.68V31.6325C187.68 30.2097 187.084 29.6472 186.092 29.6472C185.067 29.6472 184.505 30.2097 184.505 31.6325C184.505 35.7686 190.788 36.5627 190.788 42.32C190.788 45.5296 189.168 47.3825 185.993 47.3825C182.851 47.3825 181.197 45.5296 181.197 42.32V41.0958H184.24V42.5186C184.24 43.9413 184.868 44.4708 185.894 44.4708C186.919 44.4708 187.547 43.9413 187.547 42.5186C187.547 38.3825 181.263 37.5884 181.263 31.8311C181.263 28.5884 182.851 26.7686 185.993 26.7686Z" fill="white"/>
15 <path d="M195.65 26.9668V42.5183C195.65 43.9411 196.279 44.4705 197.304 44.4705C198.329 44.4705 198.958 43.9411 198.958 42.5183V26.9668H202V42.3197C202 45.5293 200.38 47.3822 197.205 47.3822C194.063 47.3822 192.409 45.5293 192.409 42.3197V26.9668H195.65Z" fill="white"/>
16 <path d="M38.2894 21.5145V23.2351C38.2894 25.3197 37.198 26.4778 34.949 26.4778H33.8907V31.4079H31.6748V18.2719H34.949C37.198 18.2719 38.2894 19.3969 38.2894 21.5145ZM33.8907 20.1248V24.5586H34.949C35.6436 24.5586 36.0404 24.2609 36.0404 23.3344V21.3822C36.0404 20.4557 35.6436 20.1579 34.949 20.1579H33.8907V20.1248Z" fill="#377D87"/>
17 <path d="M41.5638 23.7977H44.6396V25.6837H41.5638V29.522H45.4333V31.408H39.3148V18.272H45.4002V20.158H41.5638V23.7977Z" fill="#377D87"/>
18 <path d="M49.6994 26.147L49.0048 27.3381V31.3749H46.7889V18.272H49.0048V23.9962L51.9483 18.272H54.1642L51.0553 24.1286L54.1642 31.408H51.8822L49.6994 26.147Z" fill="#377D87"/>
19 <path d="M62.3994 31.3753H60.1505L59.7536 28.9929H57.0416L56.6448 31.3753H54.5942L56.8763 18.2393H60.1505L62.3994 31.3753ZM57.3062 27.2062H59.456L58.3976 20.5885L57.3062 27.2062Z" fill="#377D87"/>
20 <path d="M35.9413 42.2946L37.3304 32.9637H40.1746V46.0997H38.2564V36.7027L36.8343 46.0997H34.883L33.3616 36.835V46.0997H31.5757V32.9968H34.42L35.9413 42.2946Z" fill="#377D87"/>
21 <path d="M41.4977 36.1404C41.4977 34.0558 42.5891 32.8315 44.6065 32.8315C46.624 32.8315 47.7154 34.0227 47.7154 36.1404V42.9565C47.7154 45.0411 46.624 46.2654 44.6065 46.2654C42.5891 46.2654 41.4977 45.0742 41.4977 42.9565V36.1404ZM43.5482 43.0889C43.5482 44.0154 43.9451 44.3793 44.6065 44.3793C45.268 44.3793 45.6649 44.0154 45.6649 43.0889V36.008C45.6649 35.0815 45.268 34.7176 44.6065 34.7176C43.9451 34.7176 43.5482 35.0815 43.5482 36.008V43.0889Z" fill="#377D87"/>
22 <path d="M55.0909 36.2387V37.9593C55.0909 40.0439 54.0987 41.202 52.0482 41.202H51.0891V46.1321H49.0386V32.9961H52.0482C54.0987 32.9961 55.0909 34.1211 55.0909 36.2387ZM51.0891 34.849V39.2829H52.0482C52.7097 39.2829 53.0404 38.9851 53.0404 38.0586V36.1064C53.0404 35.1799 52.6766 34.8821 52.0482 34.8821H51.0891V34.849Z" fill="#377D87"/>
23 <path d="M58.1003 38.5218H60.9115V40.4079H58.1003V44.2461H61.6391V46.1321H56.0498V32.9961H61.6391V34.8821H58.1003V38.5218Z" fill="#377D87"/>
24 <path d="M61.2087 50.169C61.0102 49.408 60.018 49.1764 59.2904 49.6727C58.9266 49.9374 58.5628 50.2352 58.166 50.4999C57.3061 51.0624 56.3139 50.9962 55.4871 50.3676C55.0571 50.0367 54.6272 49.7058 54.1641 49.3749C53.4035 48.8786 52.5766 48.4815 51.5514 48.5146C50.6253 48.5477 49.8647 48.8786 49.1701 49.3418C48.5748 49.7389 48.0457 50.169 47.4173 50.5661C46.6566 51.0624 45.7306 50.9962 45.0029 50.4668C44.6391 50.2021 44.2753 49.9043 43.9115 49.6396C42.1587 48.2499 40.2405 48.1507 38.3222 49.408C37.8592 49.7058 37.4623 50.0367 37.0324 50.3676C36.2717 50.9301 35.478 51.0293 34.7173 50.6654C34.6511 50.6323 34.5519 50.5992 34.4858 50.533C34.4196 50.4999 34.3535 50.4337 34.2873 50.4007C34.0227 50.2021 33.7912 50.0036 33.4936 49.8051C32.9644 49.4742 32.3691 49.5073 31.9392 49.8712C31.5423 50.2021 31.5423 50.7315 31.9722 51.1286C32.2368 51.3602 32.5345 51.5918 32.8652 51.8234C32.9313 51.8896 33.0306 51.9227 33.0967 51.9889V52.022C33.6589 52.3859 34.2873 52.5845 34.9157 52.6837C34.9819 52.6837 35.0149 52.7168 35.0811 52.7168C35.1142 52.7168 35.1142 52.7168 35.1472 52.7168C35.3457 52.7499 35.5441 52.7499 35.7425 52.7499C36.6686 52.7499 37.6277 52.4521 38.4876 51.8565C38.9506 51.5257 39.3806 51.1948 39.8436 50.8639C40.7365 50.2683 41.3649 50.2683 42.2579 50.897C42.6548 51.1948 43.0516 51.4926 43.4485 51.7904C44.4407 52.4852 45.5652 52.8161 46.9212 52.6837C47.9134 52.5514 48.7071 52.1543 49.4347 51.658C49.8977 51.3271 50.3608 50.9632 50.8569 50.6654C51.4852 50.2683 51.9813 50.2683 52.6097 50.6984C53.1389 51.0293 53.6019 51.3933 54.098 51.7573C54.9248 52.3859 55.8839 52.7168 57.0415 52.7168C57.8022 52.6837 58.5959 52.5845 59.2574 52.1543C59.9188 51.7573 60.5141 51.294 61.1095 50.7977C61.1756 50.6984 61.2417 50.4007 61.2087 50.169Z" fill="#377D87"/>
25 <path d="M61.2087 53.8751C61.0102 53.1141 60.018 52.8824 59.2904 53.3788C58.9266 53.6435 58.5628 53.9413 58.166 54.206C57.3061 54.7685 56.3139 54.7023 55.4871 54.0736C55.0571 53.7427 54.6272 53.4119 54.1641 53.081C53.4035 52.5846 52.5766 52.1876 51.5514 52.2207C50.6253 52.2538 49.8647 52.5847 49.1701 53.0479C48.5748 53.4449 48.0457 53.8751 47.4173 54.2722C46.6566 54.7685 45.7306 54.7023 45.0029 54.1729C44.6391 53.9082 44.2753 53.6104 43.9115 53.3457C42.1587 51.956 40.2405 51.8567 38.3222 53.1471C37.8592 53.4449 37.4623 53.7758 37.0324 54.1067C36.2717 54.6692 35.478 54.7685 34.7173 54.4045C34.6511 54.3714 34.5519 54.3383 34.4858 54.2722C34.4196 54.2391 34.3535 54.1729 34.2873 54.1398C34.0227 53.9413 33.7912 53.7427 33.4936 53.5442C32.9644 53.2133 32.3691 53.2464 31.9392 53.6104C31.5423 53.9413 31.5423 54.4707 31.9722 54.8677C32.2368 55.0994 32.5345 55.331 32.8652 55.5626C32.9313 55.6288 33.0306 55.6619 33.0967 55.728V55.7611C33.6589 56.1251 34.2873 56.3236 34.9157 56.4229C34.9819 56.4229 35.0149 56.456 35.0811 56.456C35.1142 56.456 35.1142 56.456 35.1472 56.456C35.3457 56.4891 35.5441 56.4891 35.7425 56.4891C36.6686 56.4891 37.6277 56.1913 38.4876 55.5957C38.9506 55.2648 39.3806 54.9339 39.8436 54.603C40.7365 54.0074 41.3649 54.0074 42.2579 54.6361C42.6548 54.9339 43.0516 55.2317 43.4485 55.5295C44.4407 56.2244 45.5652 56.5552 46.9212 56.4229C47.9134 56.2905 48.7071 55.8935 49.4347 55.3971C49.8977 55.0663 50.3608 54.7023 50.8569 54.4045C51.4852 54.0074 51.9813 54.0074 52.6097 54.4376C53.1389 54.7685 53.6019 55.1324 54.098 55.4964C54.9248 56.1251 55.8839 56.456 57.0415 56.456C57.8022 56.4229 58.5959 56.3236 59.2574 55.8935C59.9188 55.4964 60.5141 55.0332 61.1095 54.5369C61.1756 54.4045 61.2417 54.0736 61.2087 53.8751Z" fill="#377D87"/>
26 </svg>
27
public/images/emails/20.svg
File was created 1 <svg width="182" height="54" viewBox="0 0 182 54" fill="none" xmlns="http://www.w3.org/2000/svg">
2 <path d="M26.9876 54C41.8924 54 53.9751 41.9117 53.9751 27C53.9751 12.0883 41.8924 0 26.9876 0C12.0827 0 0 12.0883 0 27C0 41.9117 12.0827 54 26.9876 54Z" fill="#377D87"/>
3 <path d="M66.939 37.1176C66.7737 36.5882 66.6414 36.2904 66.6414 34.636V31.4595C66.6414 29.5735 66.013 28.9117 64.5578 28.9117H63.4664V37.1176H60.2583V16.9669H65.087C68.3943 16.9669 69.8495 18.4889 69.8495 21.5992V23.1875C69.8495 25.272 69.188 26.6286 67.7659 27.2904C69.3534 27.9522 69.8825 29.4742 69.8825 31.5919V34.7022C69.8825 35.6948 69.9156 36.3897 70.2463 37.1507H66.939V37.1176ZM63.4664 19.8455V26.033H64.7232C65.9138 26.033 66.6414 25.5036 66.6414 23.9154V21.9301C66.6414 20.5073 66.1453 19.8455 65.0208 19.8455H63.4664Z" fill="#377D87"/>
4 <path d="M75.1746 25.4705H79.5733V28.3491H75.1746V34.2389H80.6978V37.1175H71.9666V16.9668H80.6978V19.8455H75.1746V25.4705Z" fill="#377D87"/>
5 <path d="M86.8829 29.1102L85.8907 30.9631V37.1506H82.6826V16.9668H85.8907V25.7352L90.091 16.9668H93.299L88.8342 25.9337L93.299 37.1175H89.9918L86.8829 29.1102Z" fill="#377D87"/>
6 <path d="M105.139 37.1175H101.898L101.336 33.4778H97.3999L96.8377 37.1175H93.9272L97.2015 16.9668H101.865L105.139 37.1175ZM97.8299 30.7315H100.906L99.3512 20.5403L97.8299 30.7315Z" fill="#377D87"/>
7 <path d="M113.407 31.294L115.59 16.9999H120.055V37.1506H117.012V22.6911L114.796 37.1506H111.787L109.405 22.8896V37.1506H106.594V16.9668H111.059L113.407 31.294Z" fill="#377D87"/>
8 <path d="M122.139 21.8313C122.139 18.6217 123.858 16.7688 127 16.7688C130.142 16.7688 131.862 18.6217 131.862 21.8313V32.3203C131.862 35.5298 130.142 37.3828 127 37.3828C123.858 37.3828 122.139 35.5298 122.139 32.3203V21.8313ZM125.347 32.4857C125.347 33.9085 125.975 34.471 127 34.471C128.026 34.471 128.654 33.9085 128.654 32.4857V21.6328C128.654 20.21 128.026 19.6475 127 19.6475C125.975 19.6475 125.347 20.21 125.347 21.6328V32.4857Z" fill="#377D87"/>
9 <path d="M140.659 37.1175C140.493 36.5881 140.361 36.2903 140.361 34.6359V31.4594C140.361 29.5734 139.733 28.9116 138.277 28.9116H137.186V37.1175H133.945V16.9668H138.773C142.081 16.9668 143.536 18.4889 143.536 21.5992V23.1874C143.536 25.2719 142.875 26.6286 141.452 27.2903C143.04 27.9521 143.569 29.4741 143.569 31.5918V34.7021C143.569 35.6947 143.602 36.3896 143.933 37.1506H140.659V37.1175ZM137.153 19.8455V26.033H138.41C139.6 26.033 140.328 25.5036 140.328 23.9153V21.93C140.328 20.5072 139.832 19.8455 138.707 19.8455H137.153Z" fill="#377D87"/>
10 <path d="M148.861 25.4705H153.26V28.3491H148.861V34.2389H154.384V37.1175H145.653V16.9668H154.384V19.8455H148.861V25.4705Z" fill="#377D87"/>
11 <path d="M159.477 34.0737V37.1178H156.402V34.0737H159.477Z" fill="#377D87"/>
12 <path d="M165.993 16.7688C169.102 16.7688 170.723 18.6217 170.723 21.8313V22.46H167.68V21.6328C167.68 20.21 167.085 19.6475 166.092 19.6475C165.067 19.6475 164.505 20.21 164.505 21.6328C164.505 25.7688 170.789 26.5629 170.789 32.3203C170.789 35.5298 169.168 37.3828 165.993 37.3828C162.851 37.3828 161.198 35.5298 161.198 32.3203V31.096H164.24V32.5188C164.24 33.9416 164.869 34.471 165.894 34.471C166.919 34.471 167.548 33.9416 167.548 32.5188C167.548 28.3828 161.264 27.5887 161.264 21.8313C161.264 18.5887 162.851 16.7688 165.993 16.7688Z" fill="#377D87"/>
13 <path d="M175.65 16.9668V32.5183C175.65 33.9411 176.278 34.4705 177.303 34.4705C178.329 34.4705 178.957 33.9411 178.957 32.5183V16.9668H182V32.3197C182 35.5293 180.379 37.3822 177.204 37.3822C174.062 37.3822 172.409 35.5293 172.409 32.3197V16.9668H175.65Z" fill="#377D87"/>
14 <path d="M18.2895 11.5143V13.2349C18.2895 15.3194 17.1981 16.4775 14.9492 16.4775H13.8908V21.4077H11.6749V8.27164H14.9492C17.1981 8.27164 18.2895 9.39664 18.2895 11.5143ZM13.8908 10.1246V14.5584H14.9492C15.6437 14.5584 16.0406 14.2606 16.0406 13.3341V11.3819C16.0406 10.4555 15.6437 10.1577 14.9492 10.1577H13.8908V10.1246Z" fill="white"/>
15 <path d="M21.5643 13.7975H24.6401V15.6835H21.5643V19.5217H25.4338V21.4078H19.3153V8.27173H25.4007V10.1578H21.5643V13.7975Z" fill="white"/>
16 <path d="M29.6995 16.1467L29.005 17.3379V21.3747H26.7891V8.27173H29.005V13.996L31.9484 8.27173H34.1643L31.0555 14.1283L34.1643 21.4078H31.8823L29.6995 16.1467Z" fill="white"/>
17 <path d="M42.3998 21.375H40.1509L39.754 18.9927H37.042L36.6451 21.375H34.5946L36.8766 8.23901H40.1509L42.3998 21.375ZM37.3066 17.2059H39.4563L38.398 10.5883L37.3066 17.2059Z" fill="white"/>
18 <path d="M15.9413 32.2946L17.3304 22.9637H20.1747V36.0997H18.2564V26.7027L16.8343 36.0997H14.883L13.3616 26.835V36.0997H11.5757V22.9968H14.42L15.9413 32.2946Z" fill="white"/>
19 <path d="M21.4979 26.1404C21.4979 24.0558 22.5893 22.8315 24.6068 22.8315C26.6242 22.8315 27.7156 24.0227 27.7156 26.1404V32.9565C27.7156 35.0411 26.6242 36.2654 24.6068 36.2654C22.5893 36.2654 21.4979 35.0742 21.4979 32.9565V26.1404ZM23.5484 33.0889C23.5484 34.0154 23.9453 34.3793 24.6068 34.3793C25.2682 34.3793 25.6651 34.0154 25.6651 33.0889V26.008C25.6651 25.0815 25.2682 24.7176 24.6068 24.7176C23.9453 24.7176 23.5484 25.0815 23.5484 26.008V33.0889Z" fill="white"/>
20 <path d="M35.0906 26.239V27.9596C35.0906 30.0441 34.0984 31.2022 32.0478 31.2022H31.0887V36.1324H29.0382V22.9963H32.0478C34.0984 22.9963 35.0906 24.1213 35.0906 26.239ZM31.0887 24.8493V29.2831H32.0478C32.7093 29.2831 33.04 28.9853 33.04 28.0588V26.1066C33.04 25.1802 32.6762 24.8824 32.0478 24.8824H31.0887V24.8493Z" fill="white"/>
21 <path d="M38.1003 28.5221H40.9115V30.4081H38.1003V34.2463H41.6391V36.1324H36.0498V22.9963H41.6391V24.8824H38.1003V28.5221Z" fill="white"/>
22 <path d="M41.2089 40.169C41.0104 39.408 40.0182 39.1764 39.2906 39.6727C38.9268 39.9374 38.563 40.2352 38.1662 40.4999C37.3063 41.0624 36.3141 40.9962 35.4872 40.3676C35.0573 40.0367 34.6273 39.7058 34.1643 39.3749C33.4036 38.8786 32.5768 38.4815 31.5516 38.5146C30.6255 38.5477 29.8648 38.8786 29.1703 39.3418C28.575 39.7389 28.0458 40.169 27.4174 40.5661C26.6568 41.0624 25.7307 40.9962 25.0031 40.4668C24.6393 40.2021 24.2755 39.9043 23.9117 39.6396C22.1588 38.2499 20.2406 38.1507 18.3224 39.408C17.8593 39.7058 17.4625 40.0367 17.0325 40.3676C16.2718 40.9301 15.4781 41.0293 14.7174 40.6654C14.6513 40.6323 14.552 40.5992 14.4859 40.533C14.4198 40.4999 14.3536 40.4337 14.2875 40.4007C14.0229 40.2021 13.7914 40.0036 13.4937 39.8051C12.9645 39.4742 12.3692 39.5073 11.9393 39.8712C11.5424 40.2021 11.5424 40.7315 11.9724 41.1286C12.2369 41.3602 12.5346 41.5918 12.8653 41.8234C12.9315 41.8896 13.0307 41.9227 13.0968 41.9889V42.022C13.6591 42.3859 14.2875 42.5845 14.9158 42.6837C14.982 42.6837 15.0151 42.7168 15.0812 42.7168C15.1143 42.7168 15.1143 42.7168 15.1474 42.7168C15.3458 42.7499 15.5442 42.7499 15.7427 42.7499C16.6687 42.7499 17.6278 42.4521 18.4877 41.8565C18.9508 41.5257 19.3807 41.1948 19.8437 40.8639C20.7367 40.2683 21.3651 40.2683 22.258 40.897C22.6549 41.1948 23.0518 41.4926 23.4487 41.7904C24.4409 42.4852 25.5653 42.8161 26.9213 42.6837C27.9135 42.5514 28.7073 42.1543 29.4349 41.658C29.8979 41.3271 30.3609 40.9632 30.857 40.6654C31.4854 40.2683 31.9815 40.2683 32.6099 40.6984C33.1391 41.0293 33.6021 41.3933 34.0982 41.7573C34.925 42.3859 35.8841 42.7168 37.0417 42.7168C37.8024 42.6837 38.5961 42.5845 39.2576 42.1543C39.919 41.7573 40.5143 41.294 41.1097 40.7977C41.1758 40.6984 41.2419 40.4007 41.2089 40.169Z" fill="white"/>
23 <path d="M41.2089 43.8748C41.0104 43.1138 40.0182 42.8822 39.2906 43.3785C38.9268 43.6432 38.563 43.941 38.1662 44.2057C37.3063 44.7682 36.3141 44.7021 35.4872 44.0734C35.0573 43.7425 34.6273 43.4116 34.1643 43.0807C33.4036 42.5844 32.5768 42.1873 31.5516 42.2204C30.6255 42.2535 29.8648 42.5844 29.1703 43.0476C28.575 43.4447 28.0458 43.8748 27.4174 44.2719C26.6568 44.7682 25.7307 44.7021 25.0031 44.1726C24.6393 43.9079 24.2755 43.6101 23.9117 43.3454C22.1588 41.9557 20.2406 41.8565 18.3224 43.1469C17.8593 43.4447 17.4625 43.7756 17.0325 44.1065C16.2718 44.669 15.4781 44.7682 14.7174 44.4043C14.6513 44.3712 14.552 44.3381 14.4859 44.2719C14.4198 44.2388 14.3536 44.1726 14.2875 44.1396C14.0229 43.941 13.7914 43.7425 13.4937 43.544C12.9645 43.2131 12.3692 43.2462 11.9393 43.6101C11.5424 43.941 11.5424 44.4704 11.9724 44.8675C12.2369 45.0991 12.5346 45.3307 12.8653 45.5623C12.9315 45.6285 13.0307 45.6616 13.0968 45.7278V45.7609C13.6591 46.1248 14.2875 46.3234 14.9158 46.4226C14.982 46.4226 15.0151 46.4557 15.0812 46.4557C15.1143 46.4557 15.1143 46.4557 15.1474 46.4557C15.3458 46.4888 15.5442 46.4888 15.7427 46.4888C16.6687 46.4888 17.6278 46.191 18.4877 45.5954C18.9508 45.2646 19.3807 44.9337 19.8437 44.6028C20.7367 44.0072 21.3651 44.0072 22.258 44.6359C22.6549 44.9337 23.0518 45.2315 23.4487 45.5293C24.4409 46.2241 25.5653 46.555 26.9213 46.4226C27.9135 46.2903 28.7073 45.8932 29.4349 45.3969C29.8979 45.066 30.3609 44.7021 30.857 44.4043C31.4854 44.0072 31.9815 44.0072 32.6099 44.4373C33.1391 44.7682 33.6021 45.1322 34.0982 45.4962C34.925 46.1248 35.8841 46.4557 37.0417 46.4557C37.8024 46.4226 38.5961 46.3234 39.2576 45.8932C39.919 45.4962 40.5143 45.0329 41.1097 44.5366C41.1758 44.4043 41.2419 44.0734 41.2089 43.8748Z" fill="white"/>
24 </svg>
25
public/images/emails/21.svg
File was created 1 <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
2 <rect x="0.5" y="0.5" width="39" height="39" rx="19.5" stroke="#377D87"/>
3 <path d="M27.7901 13.1495C27.5648 12.9619 27.2008 12.9449 26.5769 13.1325C26.1436 13.2689 22.2959 14.7017 18.8989 16.0834C15.8485 17.3286 13.37 18.4202 13.0754 18.5567C12.7461 18.659 12.0355 18.9661 12.0008 19.4437C11.9835 19.7507 12.2435 20.0236 12.7461 20.2453C13.2834 20.5183 15.6578 21.3029 16.1605 21.4564C16.3338 22.0364 17.3564 25.4307 17.4083 25.6354C17.4777 25.9425 17.6857 26.113 17.7896 26.1813C17.807 26.1983 17.8416 26.2324 17.8763 26.2495C17.9283 26.2836 17.9976 26.3007 18.0843 26.3007C18.2056 26.3007 18.3443 26.2495 18.4656 26.1642C19.1069 25.6525 20.2161 24.5096 20.5281 24.1856C21.8973 25.2431 23.3878 26.4201 23.5265 26.5565L23.5438 26.5736C23.8731 26.8465 24.2198 27 24.5317 27C24.6357 27 24.7397 26.9829 24.8437 26.9488C25.2077 26.8294 25.4677 26.4883 25.5543 26.0277C25.5543 26.0107 25.5716 25.9425 25.6063 25.8231C26.1956 23.2986 26.6636 21.0811 27.0449 19.2219C27.4088 17.3968 27.7035 15.6058 27.8768 14.6506C27.9114 14.4118 27.9461 14.2241 27.9634 14.1047C28.0154 13.7636 28.0501 13.3713 27.7901 13.1495ZM16.5244 21.4052L24.7917 16.0152C24.809 15.9981 24.8437 15.981 24.861 15.964C24.8784 15.964 24.8784 15.9469 24.8957 15.9469C24.913 15.9469 24.913 15.9469 24.9304 15.9299C24.913 15.9469 24.8957 15.9981 24.861 16.0322L22.7639 17.9597C21.308 19.2731 19.4015 20.9959 18.1363 22.1216C18.1363 22.1216 18.1363 22.1216 18.1363 22.1387L18.119 22.1558C18.119 22.1558 18.119 22.1728 18.1016 22.1728C18.1016 22.1899 18.1016 22.1899 18.0843 22.2069V22.224C18.0843 22.224 18.0843 22.224 18.0843 22.241C17.9976 23.1962 17.8416 24.8337 17.7723 25.5672C17.7723 25.5672 17.7723 25.5672 17.7723 25.5501C17.703 25.3454 16.7324 22.0875 16.5244 21.4052Z" fill="#377D87"/>
4 </svg>
5
public/images/emails/22.svg
File was created 1 <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
2 <rect x="0.5" y="0.5" width="39" height="39" rx="19.5" stroke="#377D87"/>
3 <path fill-rule="evenodd" clip-rule="evenodd" d="M14.351 15.0014H12.6003C12.1 15.0014 12 15.2415 12 15.5016C12 15.9618 12.6003 18.2627 14.7612 21.304C16.2118 23.3749 18.2526 24.5054 20.1034 24.5054C21.2139 24.5054 21.354 24.2553 21.354 23.8251V22.2544C21.354 21.7542 21.454 21.6542 21.8142 21.6542C22.0743 21.6542 22.5144 21.7842 23.5549 22.7846C24.7454 23.9752 24.9355 24.5054 25.6058 24.5054H27.3565C27.8567 24.5054 28.1068 24.2553 27.9568 23.7651C27.8067 23.2649 27.2364 22.5646 26.4861 21.7142C26.086 21.224 25.4657 20.7138 25.2856 20.4537C25.0255 20.1135 25.0855 19.9635 25.2856 19.6733C25.2856 19.6733 27.4165 16.6721 27.6366 15.6416C27.7467 15.2715 27.6366 15.0014 27.1064 15.0014H25.3556C25.1919 14.9916 25.0294 15.035 24.8924 15.1251C24.7554 15.2153 24.6511 15.3473 24.5953 15.5016C24.5953 15.5016 23.6949 17.6625 22.4444 19.0731C22.0342 19.4833 21.8442 19.6133 21.6241 19.6133C21.524 19.6133 21.354 19.4833 21.354 19.1131V15.6416C21.354 15.2014 21.2239 15.0014 20.8537 15.0014H18.1026C17.8225 15.0014 17.6524 15.2014 17.6524 15.4015C17.6524 15.8217 18.2927 15.9217 18.3527 17.1022V19.6833C18.3527 20.2536 18.2526 20.3536 18.0326 20.3536C17.4323 20.3536 15.9917 18.1727 15.1313 15.6816C14.9713 15.2014 14.8012 15.0014 14.351 15.0014Z" fill="#377D87"/>
4 </svg>
5
public/images/emails/23.svg
File was created 1 <svg width="432" height="274" viewBox="0 0 432 274" fill="none" xmlns="http://www.w3.org/2000/svg">
2 <g opacity="0.4" clip-path="url(#clip0_3612_8627)">
3 <path d="M756.927 -50.7875C697.88 -23.8578 661.923 24.0806 631.754 68.5532C620.485 84.9791 605.839 103.842 581.837 109.507C551.473 116.494 527.513 97.2506 497.253 99.6131C471.78 101.459 449.206 117.467 430.809 132.355C399.611 157.951 370.755 185.602 345.109 213.54C337.869 221.609 330.725 230.035 320.308 236.274C291.886 253.848 253.062 249.313 223.332 241.957C193.602 234.602 159.443 225.752 126.79 237.565C107.218 244.725 96.063 269.93 75.307 274.342C57.5708 278.329 32.4626 273.182 32.4626 273.182C32.4626 273.182 62.4354 385.042 72.2029 421.495C135.107 412.301 189.863 377.711 251.495 360.431C296.836 347.515 343.962 342.932 390.191 336.673C539.288 316.641 688.861 280.01 831.907 229.041L756.927 -50.7875Z" fill="url(#paint0_linear_3612_8627)"/>
4 <path d="M82.3211 309.509C93.1363 316.454 110.217 321.719 129.313 324.476C135.376 325.382 141.787 325.914 150.075 325.1C174.382 322.242 195.037 307.428 204.972 296.048C224.076 273.776 231.41 252.689 251.003 230.567C270.595 208.444 308.572 183.084 357.239 170.887C409.667 157.683 453.085 164.327 483.972 174.329C514.788 184.069 542.477 197.178 589.498 195.546C597.927 195.256 607.469 194.105 615.96 190.705C626.817 186.109 630.006 179.63 639.399 174.582C654.636 166.282 678.041 165.072 690.937 168.084C703.832 171.097 712.902 176.54 730.318 176.373C735.195 176.191 740.836 175.523 745.708 173.655C750.58 171.787 753.012 169.167 756.003 166.96C776.724 150.722 824.904 138.374 849.09 143.423L866.876 209.802L110.09 413.145L82.3211 309.509Z" fill="url(#paint1_linear_3612_8627)"/>
5 <path d="M118.004 328.013C128.414 336.805 138.662 346.662 161.587 350.397C184.513 354.132 222.289 351.504 258.686 340.389C288.906 331.27 312.584 317.772 329.914 305.635C347.244 293.498 361.738 282.461 380.065 269.035C400.974 253.554 426.928 226.844 514.74 215.577C544.653 211.99 567.494 215.407 585.904 218.99C604.229 222.254 619.052 227.479 640.13 229.325C671.328 232.206 715.784 227.788 761.714 217.184C807.227 206.692 853.379 190.238 887.068 172.355L946.925 395.743L190.464 598.436L118.004 328.013Z" fill="url(#paint2_linear_3612_8627)"/>
6 </g>
7 <defs>
8 <linearGradient id="paint0_linear_3612_8627" x1="338.801" y1="108.974" x2="455.361" y2="337.345" gradientUnits="userSpaceOnUse">
9 <stop stop-color="#F4F7FC"/>
10 <stop offset="1" stop-color="#8BA6DB"/>
11 </linearGradient>
12 <linearGradient id="paint1_linear_3612_8627" x1="444.619" y1="147.506" x2="488.601" y2="311.65" gradientUnits="userSpaceOnUse">
13 <stop offset="0.211458" stop-color="#A5D5DD"/>
14 <stop offset="1" stop-color="#0E5C69"/>
15 </linearGradient>
16 <linearGradient id="paint2_linear_3612_8627" x1="493.814" y1="217.371" x2="535.265" y2="372.067" gradientUnits="userSpaceOnUse">
17 <stop stop-color="#E7EDF9"/>
18 <stop offset="1" stop-color="#C5D1E8"/>
19 </linearGradient>
20 <clipPath id="clip0_3612_8627">
21 <rect width="432" height="274.13" fill="white"/>
22 </clipPath>
23 </defs>
24 </svg>
25
public/images/emails/24.svg
File was created 1 <svg width="17" height="14" viewBox="0 0 17 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2 <path d="M16.2901 0.149541C16.0648 -0.0380885 15.7008 -0.0551456 15.0769 0.132484C14.6436 0.268942 10.7959 1.70175 7.39889 3.08338C4.34848 4.32856 1.87003 5.42022 1.57539 5.55668C1.24608 5.65902 0.535477 5.96605 0.500814 6.44365C0.483482 6.75068 0.743459 7.0236 1.24608 7.24534C1.78337 7.51826 4.15783 8.30289 4.66046 8.4564C4.83377 9.03635 5.85635 12.4307 5.90835 12.6354C5.97768 12.9425 6.18566 13.113 6.28965 13.1813C6.30698 13.1983 6.34164 13.2324 6.37631 13.2495C6.4283 13.2836 6.49763 13.3007 6.58429 13.3007C6.70561 13.3007 6.84427 13.2495 6.96559 13.1642C7.60687 12.6525 8.71611 11.5096 9.02808 11.1856C10.3973 12.2431 11.8878 13.4201 12.0265 13.5565L12.0438 13.5736C12.3731 13.8465 12.7198 14 13.0317 14C13.1357 14 13.2397 13.9829 13.3437 13.9488C13.7077 13.8294 13.9677 13.4883 14.0543 13.0277C14.0543 13.0107 14.0716 12.9425 14.1063 12.8231C14.6956 10.2986 15.1636 8.08115 15.5449 6.22191C15.9088 4.39679 16.2035 2.60578 16.3768 1.65058C16.4114 1.41177 16.4461 1.22415 16.4634 1.10475C16.5154 0.763601 16.5501 0.371285 16.2901 0.149541ZM5.02442 8.40523L13.2917 3.01515C13.309 2.9981 13.3437 2.98104 13.361 2.96398C13.3784 2.96398 13.3784 2.94692 13.3957 2.94692C13.413 2.94692 13.413 2.94692 13.4304 2.92987C13.413 2.94692 13.3957 2.9981 13.361 3.03221L11.2639 4.95968C9.80801 6.27308 7.90151 7.99586 6.63629 9.12164C6.63629 9.12164 6.63629 9.12164 6.63629 9.13869L6.61895 9.15575C6.61895 9.15575 6.61895 9.17281 6.60162 9.17281C6.60162 9.18987 6.60162 9.18987 6.58429 9.20692V9.22398C6.58429 9.22398 6.58429 9.22398 6.58429 9.24104C6.49763 10.1962 6.34164 11.8337 6.27232 12.5672C6.27232 12.5672 6.27232 12.5672 6.27232 12.5501C6.20299 12.3454 5.23241 9.08752 5.02442 8.40523Z" fill="white"/>
3 </svg>
4
resources/views/emails/send_already_registered.blade.php
File was created 1 <!DOCTYPE html>
2 <html lang="ru">
3
4 <head>
5 <meta charset="utf-8">
6 <title>BAIKALY</title>
7 </head>
8
9 <body style="background: #eff2fb;">
10 <div class="email__first" style="background: #fff url({{asset('images/emails/23.svg')}}) no-repeat 100% 100%; border: 1px solid #377d87; border-radius: 10px; max-width: 600px; margin: 0 auto; margin-top: 32px; font-family: sans-serif; padding: 60px; text-align: center;">
11 <a href="#" target="_blank" style="display: block; margin: 0 auto;"><img src="{{asset('images/emails/20.svg')}}" alt="" style="display: block; margin: 0 auto;"></a>
12 <b style="font-size: 24px; line-height: 32px; display: block; margin: 32px 0;">Ваш&nbsp;аккаунт готов к&nbsp;работе, желаем удачи в&nbsp;поисках работы.</b>
13 <b style="font-size: 24px; line-height: 32px; display: block; margin: 32px 0;">Также&nbsp;рекомендуем Вам&nbsp;подписаться на&nbsp;наш&nbsp;Телеграм канал и&nbsp;группу Вконтакте:</b>
14 <div style="text-align:center;margin-top: 32px;font-size: 0;">
15 <a href="https://t.me/rekamore_su" target="_blank" style="background: #20A0E1;font-size: 16px;font-weight: 700;margin:0 16px;border-radius: 8px;height: 44px;line-height: 44px;text-decoration: none;color:#fff;display: inline-block;vertical-align: top;padding: 0 32px;">
16 <img src="{{asset('images/emails/24.svg')}}" alt="" style="margin-right:5px;">
17 Телеграм
18 </a>
19 <a href="https://vk.com/rekamore_su" target="_blank" style="background: #2787F5;font-size: 16px;font-weight: 700;margin:0 16px;border-radius: 8px;height: 44px;line-height: 44px;text-decoration: none;color:#fff;display: inline-block;vertical-align: top;padding: 0 32px;">
20 <img src="{{asset('images/emails/25.svg')}}" alt="" style="margin-right:5px;">
21 ВКонтакте
22 </a>
23 </div>
24 </div>
25 <div class="email__text" style="margin:32px 0;font-style: italic;font-size: 14px;line-height: 20px;font-family: sans-serif;color:#37393a;text-align: center;display: block;">Это&nbsp;письмо отправлено автоматически. Пожалуйста, не&nbsp;отвечайте на&nbsp;него.</div>
26 <a href="#" target="_blank" style="display: block; margin: 0 auto;"><img src="{{asset('images/emails/19.svg')}}" alt="" style="display: block; margin: 0 auto;"></a>
27 <div class="email__socials" style="display: block;text-align: center;margin-top: 56px;font-size: 0;">
28 <a href="https://vk.com/rekamore_su" style="display:inline-block;vertical-align: middle;margin:0 4px;"><img src="{{asset('images/emails/22.svg')}}" alt=""></a>
29 <a href="https://t.me/rekamore_su" style="display:inline-block;vertical-align: middle;margin:0 4px;"><img src="{{asset('images/emails/21.svg')}}" alt=""></a>
30 </div>
31 <div class="email__bottom" style="font-family: sans-serif;color:#37393A;text-align: center;margin-top: 24px;font-size: 14px;line-height: 20px;margin-bottom: 32px;">&copy; 2023 &mdash; RekaMore.su</div>
32 </body>
33
34 </html>
35
resources/views/emails/send_verify.blade.php
File was created 1 <!DOCTYPE html>
2 <html lang="ru">
3
4 <head>
5 <meta charset="utf-8">
6 <title>BAIKALY</title>
7 </head>
8
9 <body style="background: #eff2fb;">
10 <div class="email__first" style="background: #fff url({{asset('images/emails/23.svg')}}) no-repeat 100% 100%; border: 1px solid #377d87; border-radius: 10px; max-width: 600px; margin: 0 auto; margin-top: 32px; font-family: sans-serif; padding: 60px; text-align: center;">
11 <a href="#" target="_blank" style="display: block; margin: 0 auto;"><img src="{{asset('images/emails/20.svg')}}" alt="" style="display: block; margin: 0 auto;"></a>
12 <b style="font-size: 24px; line-height: 32px; display: block; margin: 32px 0;">Благодарим за&nbsp;регистрацию на&nbsp;нашем сайте. Пожалуйста, подтвердите регистрацию, перейдя по&nbsp;ссылке:</b>
13 <a href="{{ $url }}" target="_blank" style="word-wrap: break-word; word-break: break-all; color: #1a55a6; font-size: 16px; line-height: 24px; display: inline-block; text-align: left; max-width: 90%; margin: 0 auto;">
14 {{ $url }}
15 </a>
16 </div>
17 <div class="email__text" style="margin:32px 0;font-style: italic;font-size: 14px;line-height: 20px;font-family: sans-serif;color:#37393a;text-align: center;display: block;">Это&nbsp;письмо отправлено автоматически. Пожалуйста, не&nbsp;отвечайте на&nbsp;него.</div>
18 <a href="{{$url}}" target="_blank" style="display: block; margin: 0 auto;"><img src="{{asset('images/emails/19.svg')}}" alt="" style="display: block; margin: 0 auto;"></a>
19 <div class="email__socials" style="display: block;text-align: center;margin-top: 56px;font-size: 0;">
20 <a href="https://vk.com/rekamore_su" target="_blank" style="display:inline-block;vertical-align: middle;margin:0 4px;"><img src="{{asset('images/emails/22.svg')}}" alt=""></a>
21 <a href="https://t.me/rekamore_su" target="_blank" style="display:inline-block;vertical-align: middle;margin:0 4px;"><img src="{{asset('images/emails/21.svg')}}" alt=""></a>
22 </div>
23 <div class="email__bottom" style="font-family: sans-serif;color:#37393A;text-align: center;margin-top: 24px;font-size: 14px;line-height: 20px;margin-bottom: 32px;">&copy; 2023 &mdash; RekaMore.su</div>
24 </body>
25
26 </html>
27