Commit a9d6ce8ffd5957987134371787e872fd8731c5e1

Authored by Андрей Ларионов
1 parent 831caae20a

Обновление по допам

Showing 4 changed files with 69 additions and 3 deletions Inline Diff

app/Models/Employer.php
1 <?php 1 <?php
2 2
3 namespace App\Models; 3 namespace App\Models;
4 4
5 use Illuminate\Database\Eloquent\Factories\HasFactory; 5 use Illuminate\Database\Eloquent\Factories\HasFactory;
6 use Illuminate\Database\Eloquent\Model; 6 use Illuminate\Database\Eloquent\Model;
7 7
8 class Employer extends Model 8 class Employer extends Model
9 { 9 {
10 use HasFactory; 10 use HasFactory;
11 11
12 protected $fillable = [ 12 protected $fillable = [
13 'name_company', 13 'name_company',
14 'email', 14 'email',
15 'telephone', 15 'telephone',
16 'logo', 16 'logo',
17 'rate', 17 'rate',
18 'user_id', 18 'user_id',
19 'sort', 19 'sort',
20 'text', 20 'text',
21 'address', 21 'address',
22 'map', 22 'map',
23 'site', 23 'site',
24 'coord', 24 'coord',
25 'plus', 25 'plus',
26 'is_remove', 26 'is_remove',
27 'oficial_status', 27 'oficial_status',
28 'social_is', 28 'social_is',
29 'sending_is', 29 'sending_is',
30 'category', 30 'category',
31 'comment_admin', 31 'comment_admin',
32 'code', 32 'code',
33 'status_hidden' 33 'status_hidden',
34 'email_2',
35 'telephone_2'
34 ]; 36 ];
35 37
36 /* 38 /*
37 * Связь таблицы users с таблицей employers 39 * Связь таблицы users с таблицей employers
38 */ 40 */
39 public function users() { 41 public function users() {
40 return $this->belongsTo(User::class, 'user_id'); 42 return $this->belongsTo(User::class, 'user_id');
41 } 43 }
42 44
43 /* 45 /*
44 * Связь Работодателя с вакансиями 46 * Связь Работодателя с вакансиями
45 */ 47 */
46 public function ads() { 48 public function ads() {
47 return $this->hasMany(Ad_employer::class); 49 return $this->hasMany(Ad_employer::class);
48 } 50 }
49 51
50 // связь Работодателя с флотом 52 // связь Работодателя с флотом
51 public function flots(){ 53 public function flots(){
52 return $this->hasMany(Flot::class); 54 return $this->hasMany(Flot::class);
53 } 55 }
54 56
55 // связь Работодателя с Должностями в Вакансиях 57 // связь Работодателя с Должностями в Вакансиях
56 //public function ad_jobs() { 58 //public function ad_jobs() {
57 // return $this->belongsToMany(Ad_jobs::class, 'ad_employers'); 59 // return $this->belongsToMany(Ad_jobs::class, 'ad_employers');
58 //} 60 //}
59 61
60 public function scopeActive($query) { 62 public function scopeActive($query) {
61 return $query->where('is_remove', '=', '0'); 63 return $query->where('is_remove', '=', '0');
62 } 64 }
63 } 65 }
64 66
database/migrations/2024_03_15_035922_alter_table_employers.php
File was created 1 <?php
2
3 use Illuminate\Database\Migrations\Migration;
4 use Illuminate\Database\Schema\Blueprint;
5 use Illuminate\Support\Facades\Schema;
6
7 return new class extends Migration
8 {
9 /**
10 * Run the migrations.
11 *
12 * @return void
13 */
14 public function up()
15 {
16 Schema::table('employers', function (Blueprint $table) {
17 $table->string('email_2', 255)->nullable(true);
18 $table->string('telephone_2', 255)->nullable(true);
19 });
20 }
21
22 /**
23 * Reverse the migrations.
24 *
25 * @return void
26 */
27 public function down()
28 {
29 Schema::table('employers', function (Blueprint $table) {
30 $table->dropColumn('email_2');
31 $table->dropColumn('telephone_2');
32 });
33 }
34 };
35
resources/views/companies.blade.php
1 @extends('layout.frontend', ['title' => 'Судоходные компании РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Судоходные компании РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 <script> 4 <script>
5 console.log('Test system'); 5 console.log('Test system');
6 $(document).on('change', '#sort_ajax', function() { 6 $(document).on('change', '#sort_ajax', function() {
7 var this_ = $(this); 7 var this_ = $(this);
8 var val_ = this_.val(); 8 var val_ = this_.val();
9 console.log('sort items '+val_); 9 console.log('sort items '+val_);
10 10
11 $.ajax({ 11 $.ajax({
12 type: "GET", 12 type: "GET",
13 url: "{{ route('shipping_companies') }}", 13 url: "{{ route('shipping_companies') }}",
14 data: "sort="+val_+"&block=1", 14 data: "sort="+val_+"&block=1",
15 success: function (data) { 15 success: function (data) {
16 console.log('Выбор сортировки'); 16 console.log('Выбор сортировки');
17 console.log(data); 17 console.log(data);
18 $('#block_1').html(data); 18 $('#block_1').html(data);
19 }, 19 },
20 headers: { 20 headers: {
21 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 21 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
22 }, 22 },
23 error: function (data) { 23 error: function (data) {
24 data = JSON.stringify(data); 24 data = JSON.stringify(data);
25 console.log('Error: ' + data); 25 console.log('Error: ' + data);
26 } 26 }
27 }); 27 });
28 28
29 $.ajax({ 29 $.ajax({
30 type: "GET", 30 type: "GET",
31 url: "{{ route('shipping_companies') }}", 31 url: "{{ route('shipping_companies') }}",
32 data: "sort="+val_+"&block=2", 32 data: "sort="+val_+"&block=2",
33 success: function (data) { 33 success: function (data) {
34 console.log('Выбор сортировки2'); 34 console.log('Выбор сортировки2');
35 console.log(data); 35 console.log(data);
36 history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif"); 36 history.pushState({}, '', "{{ route('shipping_companies') }}?sort="+val_+"@if (isset($_GET['page']))&page={{ $_GET['page'] }}@endif");
37 $('#block_2').html(data); 37 $('#block_2').html(data);
38 }, 38 },
39 headers: { 39 headers: {
40 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 40 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
41 }, 41 },
42 error: function (data) { 42 error: function (data) {
43 data = JSON.stringify(data); 43 data = JSON.stringify(data);
44 console.log('Error: ' + data); 44 console.log('Error: ' + data);
45 } 45 }
46 }); 46 });
47 }); 47 });
48 48
49 $(document).ready(function(){ 49 $(document).ready(function(){
50 var sel = $('#select2-sort_ajax-container'); 50 var sel = $('#select2-sort_ajax-container');
51 var key = getUrlParameter('sort'); 51 var key = getUrlParameter('sort');
52 52
53 if (key !=='') { 53 if (key !=='') {
54 console.log(key); 54 console.log(key);
55 switch (key) { 55 switch (key) {
56 case "default": sel.html('Сортировка (по умолчанию)'); break; 56 case "default": sel.html('Сортировка (по умолчанию)'); break;
57 case "name_up": sel.html('По имени (возрастание)'); break; 57 case "name_up": sel.html('По имени (возрастание)'); break;
58 case "name_down": sel.html('По дате (убывание)'); break; 58 case "name_down": sel.html('По дате (убывание)'); break;
59 case "created_at_up": sel.html('По дате (возрастание)'); break; 59 case "created_at_up": sel.html('По дате (возрастание)'); break;
60 case "created_at_down": sel.html('По дате (убывание)'); break; 60 case "created_at_down": sel.html('По дате (убывание)'); break;
61 } 61 }
62 62
63 } 63 }
64 }); 64 });
65 </script> 65 </script>
66 @endsection 66 @endsection
67 67
68 @section('content') 68 @section('content')
69 <section class="thing"> 69 <section class="thing">
70 <div class="container"> 70 <div class="container">
71 <form class="thing__body"> 71 <form class="thing__body">
72 @csrf 72 @csrf
73 <ul class="breadcrumbs thing__breadcrumbs"> 73 <ul class="breadcrumbs thing__breadcrumbs">
74 <li><a href="{{ route('index') }}">Главная</a></li> 74 <li><a href="{{ route('index') }}">Главная</a></li>
75 <li><b>Работодатели</b></li> 75 <li><b>Работодатели</b></li>
76 </ul> 76 </ul>
77 <h1 class="thing__title">Работодатели</h1> 77 <h1 class="thing__title">Работодатели</h1>
78 <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для 78 <p class="thing__text">С другой стороны, социально-экономическое развитие не оставляет шанса для
79 существующих финансовых и административных условий.</p> 79 существующих финансовых и административных условий.</p>
80 <div class="search thing__search"> 80 <div class="search thing__search">
81 <input type="search" id="search" name="search" class="input" value="{{ (isset($_GET['search'])) ? $_GET['search'] : '' }}" placeholder="Введите наименование работодателя"> 81 <input type="search" id="search" name="search" class="input" value="{{ (isset($_GET['search'])) ? $_GET['search'] : '' }}" placeholder="Введите наименование работодателя">
82 <button type="submit" class="button">Найти</button> 82 <button type="submit" class="button">Найти</button>
83 <span> 83 <span>
84 <svg> 84 <svg>
85 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use> 85 <use xlink:href="{{ asset('images/sprite.svg#search') }}"></use>
86 </svg> 86 </svg>
87 </span> 87 </span>
88 </div> 88 </div>
89 </form> 89 </form>
90 </div> 90 </div>
91 </section> 91 </section>
92 <main class="main"> 92 <main class="main">
93 <div class="container"> 93 <div class="container">
94 <div class="main__employers"> 94 <div class="main__employers">
95 <div class="filters"> 95 <div class="filters">
96 <div class="filters__label">Показано @if ($count_emps < 4) 1 - {{ $count_emps }} @else 1 – 4 @endif из {{ $count_emps }} результатов поиска</div> 96 <div class="filters__label">Показано @if ($count_emps < 4) 1 - {{ $count_emps }} @else 1 – 4 @endif из {{ $count_emps }} результатов поиска</div>
97 <div class="filters__body"> 97 <div class="filters__body">
98 <div class="select filters__select"> 98 <div class="select filters__select">
99 <select class="js-select2" id="sort_ajax" name="sort_ajax"> 99 <select class="js-select2" id="sort_ajax" name="sort_ajax">
100 <option value="default">Сортировка (по умолчанию)</option> 100 <option value="default">Сортировка (по умолчанию)</option>
101 <option value="name_up">По имени (возрастание)</option> 101 <option value="name_up">По имени (возрастание)</option>
102 <option value="name_down">По имени (убывание)</option> 102 <option value="name_down">По имени (убывание)</option>
103 <option value="created_at_up">По дате (возрастание)</option> 103 <option value="created_at_up">По дате (возрастание)</option>
104 <option value="created_at_down">По дате (убывание)</option> 104 <option value="created_at_down">По дате (убывание)</option>
105 </select> 105 </select>
106 </div> 106 </div>
107 <button type="button" class="filters__item active" data-tab="1"> 107 <button type="button" class="filters__item active" data-tab="1">
108 <svg> 108 <svg>
109 <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use> 109 <use xlink:href="{{ asset('images/sprite.svg#grid-1') }}"></use>
110 </svg> 110 </svg>
111 </button> 111 </button>
112 <button type="button" class="filters__item" data-tab="2"> 112 <button type="button" class="filters__item" data-tab="2">
113 <svg> 113 <svg>
114 <use xlink:href="{{ asset('images/sprite.svg#grid-2') }}"></use> 114 <use xlink:href="{{ asset('images/sprite.svg#grid-2') }}"></use>
115 </svg> 115 </svg>
116 </button> 116 </button>
117 </div> 117 </div>
118 </div> 118 </div>
119 <div class="main__employers-body showed" data-body="1" id="block_1" name="block_1"> 119 <div class="main__employers-body showed" data-body="1" id="block_1" name="block_1">
120 <div class="main__employers-one"> 120 <div class="main__employers-one">
121 @if ($emps->count()) 121 @if ($emps->count())
122 @foreach($emps as $emp) 122 @foreach($emps as $emp)
123 <div class="main__employers-item"> 123 <div class="main__employers-item">
124 <span class="main__employers-item-inner"> 124 <span class="main__employers-item-inner">
125 @if (!empty($emp->logo)) 125 @if (!empty($emp->logo))
126 <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> 126 <a href="{{ route('info_company', ['company' => $emp->id]) }}">
127 <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic">
128 </a>
127 @else 129 @else
128 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> 130 <a href="{{ route('info_company', ['company' => $emp->id]) }}">
131 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic">
132 </a>
129 @endif 133 @endif
130 <span class="main__employers-item-body"> 134 <span class="main__employers-item-body">
131 <b>{{ $emp->name_company }}</b> 135 <b>{{ $emp->name_company }}</b>
132 <i>{{ $emp->ads->count() }} вакансия(ий)</i> 136 <i>{{ $emp->ads->count() }} вакансия(ий)</i>
133 </span> 137 </span>
134 </span> 138 </span>
135 <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a> 139 <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a>
136 140
137 @if ($emp->oficial_status == 1) 141 @if ($emp->oficial_status == 1)
138 <span class="main__employers-item-label"> 142 <span class="main__employers-item-label">
139 <svg> 143 <svg>
140 <use xlink:href="images/sprite.svg#v"></use> 144 <use xlink:href="images/sprite.svg#v"></use>
141 </svg> 145 </svg>
142 <span>Компания одобрена сервисом rekamore.su</span> 146 <span>Компания одобрена сервисом rekamore.su</span>
143 </span> 147 </span>
144 @endif 148 @endif
145 </div> 149 </div>
146 @endforeach 150 @endforeach
147 </div> 151 </div>
148 152
149 {{ $emps->appends($_GET)->links('paginate') }} 153 {{ $emps->appends($_GET)->links('paginate') }}
150 @else 154 @else
151 <H2>Нет данных</H2> 155 <H2>Нет данных</H2>
152 @endif 156 @endif
153 </div> 157 </div>
154 <div class="main__employers-body" data-body="2" id="block_2" name="block_2"> 158 <div class="main__employers-body" data-body="2" id="block_2" name="block_2">
155 @if ($emps->count()) 159 @if ($emps->count())
156 <div class="main__employers-two"> 160 <div class="main__employers-two">
157 @foreach($emps as $emp) 161 @foreach($emps as $emp)
158 <div class="main__employers-item"> 162 <div class="main__employers-item">
159 <span class="main__employers-item-inner"> 163 <span class="main__employers-item-inner">
160 @if (!empty($emp->logo)) 164 @if (!empty($emp->logo))
161 <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> 165 <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic">
162 @else 166 @else
163 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> 167 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic">
164 @endif 168 @endif
165 <span class="main__employers-item-body"> 169 <span class="main__employers-item-body">
166 <b>{{ $emp->name_company }}</b> 170 <b>{{ $emp->name_company }}</b>
167 <i>{{ $emp->ads->count() }} вакансия(ий)</i> 171 <i>{{ $emp->ads->count() }} вакансия(ий)</i>
168 </span> 172 </span>
169 </span> 173 </span>
170 <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a> 174 <a href="{{ route('info_company', ['company' => $emp->id]) }}" class="button button_light main__employers-item-more">Подробнее</a>
171 @if ($emp->oficial_status == 1) 175 @if ($emp->oficial_status == 1)
172 <span class="main__employers-item-label"> 176 <span class="main__employers-item-label">
173 <svg> 177 <svg>
174 <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use> 178 <use xlink:href="{{ asset('images/sprite.svg#v') }}"></use>
175 </svg> 179 </svg>
176 <span>Компания одобрена сервисом rekamore.su</span> 180 <span>Компания одобрена сервисом rekamore.su</span>
177 </span> 181 </span>
178 @endif 182 @endif
179 </div> 183 </div>
180 @endforeach 184 @endforeach
181 </div> 185 </div>
182 {{ $emps->appends($_GET)->links('paginate') }} 186 {{ $emps->appends($_GET)->links('paginate') }}
183 @else 187 @else
184 <H2>Нет данных</H2> 188 <H2>Нет данных</H2>
185 @endif 189 @endif
186 </div> 190 </div>
187 </div> 191 </div>
188 </div> 192 </div>
189 </main> 193 </main>
190 @endsection 194 @endsection
191 195
resources/views/employers/cabinet45.blade.php
1 @extends('layout.frontend', ['title' => 'Образование и образовательные программы - РекаМоре']) 1 @extends('layout.frontend', ['title' => 'Образование и образовательные программы - РекаМоре'])
2 2
3 @section('scripts') 3 @section('scripts')
4 <script src="https://cdn.ckeditor.com/ckeditor5/23.0.0/classic/ckeditor.js"></script> 4 <script src="https://cdn.ckeditor.com/ckeditor5/23.0.0/classic/ckeditor.js"></script>
5 <script> 5 <script>
6 ClassicEditor 6 ClassicEditor
7 .create( document.querySelector( '#txtarea' ) ) 7 .create( document.querySelector( '#txtarea' ) )
8 .catch( error => { 8 .catch( error => {
9 console.error( error ); 9 console.error( error );
10 } ); 10 } );
11 </script> 11 </script>
12 @endsection 12 @endsection
13 @section('content') 13 @section('content')
14 <section class="cabinet"> 14 <section class="cabinet">
15 <div class="container"> 15 <div class="container">
16 <ul class="breadcrumbs cabinet__breadcrumbs"> 16 <ul class="breadcrumbs cabinet__breadcrumbs">
17 <li><a href="{{ route('index') }}">Главная</a></li> 17 <li><a href="{{ route('index') }}">Главная</a></li>
18 <li><b>Личный кабинет</b></li> 18 <li><b>Личный кабинет</b></li>
19 </ul> 19 </ul>
20 <div class="cabinet__wrapper"> 20 <div class="cabinet__wrapper">
21 <div class="cabinet__side"> 21 <div class="cabinet__side">
22 <div class="cabinet__side-toper"> 22 <div class="cabinet__side-toper">
23 <div class="cabinet__side-toper-pic"> 23 <div class="cabinet__side-toper-pic">
24 @if (!empty($Employer[0]->logo)) 24 @if (!empty($Employer[0]->logo))
25 <img src="{{ asset(Storage::url($Employer[0]->logo)) }}" width="150" alt="{{ $Employer[0]->name_company }}"> 25 <img src="{{ asset(Storage::url($Employer[0]->logo)) }}" width="150" alt="{{ $Employer[0]->name_company }}">
26 @else 26 @else
27 <img src="{{ asset('images/logo_emp.png') }}" width="150" alt="{{ $Employer[0]->name_company }}"/> 27 <img src="{{ asset('images/logo_emp.png') }}" width="150" alt="{{ $Employer[0]->name_company }}"/>
28 @endif 28 @endif
29 </div> 29 </div>
30 <b>{{ $Employer[0]->name_company }}</b> 30 <b>{{ $Employer[0]->name_company }}</b>
31 </div> 31 </div>
32 32
33 @include('employers.menu', ['item' => 1]) 33 @include('employers.menu', ['item' => 1])
34 34
35 </div> 35 </div>
36 <div class="cabinet__body"> 36 <div class="cabinet__body">
37 @include('messages_error') 37 @include('messages_error')
38 38
39 <form action="{{ route('employer.cabinet_save', ['Employer' => $Employer[0]->id]) }}" method="POST" enctype="multipart/form-data"> 39 <form action="{{ route('employer.cabinet_save', ['Employer' => $Employer[0]->id]) }}" method="POST" enctype="multipart/form-data">
40 @csrf 40 @csrf
41 <div class="cabinet__body-item"> 41 <div class="cabinet__body-item">
42 <div class="cabinet__descr"> 42 <div class="cabinet__descr">
43 <h2 class="title cabinet__title">Мой профиль</h2> 43 <h2 class="title cabinet__title">Мой профиль</h2>
44 <p class="cabinet__text">Все поля обязательны для заполнения *</p> 44 <p class="cabinet__text">Все поля обязательны для заполнения *</p>
45 </div> 45 </div>
46 <div class="cabinet__avatar"> 46 <div class="cabinet__avatar">
47 <div class="cabinet__avatar-pic"> 47 <div class="cabinet__avatar-pic">
48 @if (!empty($Employer[0]->logo)) 48 @if (!empty($Employer[0]->logo))
49 <img src="{{ asset(Storage::url($Employer[0]->logo)) }}" width="150" alt="{{ $Employer[0]->name_company }}"> 49 <img src="{{ asset(Storage::url($Employer[0]->logo)) }}" width="150" alt="{{ $Employer[0]->name_company }}">
50 @else 50 @else
51 <img src="{{ asset('images/logo_emp.png') }}" width="150" alt="{{ $Employer[0]->name_company }}"/> 51 <img src="{{ asset('images/logo_emp.png') }}" width="150" alt="{{ $Employer[0]->name_company }}"/>
52 @endif 52 @endif
53 </div> 53 </div>
54 <div class="cabinet__avatar-form"> 54 <div class="cabinet__avatar-form">
55 <label class="file"> 55 <label class="file">
56 <span class="file__input"> 56 <span class="file__input">
57 <input type="file" name="logo"> 57 <input type="file" name="logo">
58 <span class="button"> 58 <span class="button">
59 <svg> 59 <svg>
60 <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> 60 <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use>
61 </svg> 61 </svg>
62 Загрузить 62 Загрузить
63 </span> 63 </span>
64 </span> 64 </span>
65 </label> 65 </label>
66 <p class="cabinet__text">Загрузите логотип в формате .svg, .jpg, .png или .jpeg</p> 66 <p class="cabinet__text">Загрузите логотип в формате .svg, .jpg, .png или .jpeg</p>
67 </div> 67 </div>
68 </div> 68 </div>
69 <div class="cabinet__inputs"> 69 <div class="cabinet__inputs">
70 <div class="cabinet__inputs-item form-group"> 70 <div class="cabinet__inputs-item form-group">
71 <label class="form-group__label">Название судоходной компании</label> 71 <label class="form-group__label">Название судоходной компании</label>
72 <div class="form-group__item"> 72 <div class="form-group__item">
73 <input type="text" class="input" name="name_company" id="name_company" placeholder="ООО Река Море" value="{{ old('name_company') ?? $Employer[0]->name_company ?? '' }}" required> 73 <input type="text" class="input" name="name_company" id="name_company" placeholder="ООО Река Море" value="{{ old('name_company') ?? $Employer[0]->name_company ?? '' }}" required>
74 @error('name_company') 74 @error('name_company')
75 <span class="text-xs text-red-600"> 75 <span class="text-xs text-red-600">
76 {{ $message }} 76 {{ $message }}
77 </span> 77 </span>
78 @enderror 78 @enderror
79 </div> 79 </div>
80 </div> 80 </div>
81 <div class="cabinet__inputs-item form-group"> 81 <div class="cabinet__inputs-item form-group">
82 <label class="form-group__label">Электронная почта</label> 82 <label class="form-group__label">Электронная почта</label>
83 <div class="form-group__item"> 83 <div class="form-group__item">
84 <input type="email" name="email" class="input" placeholder="info@rekamore.su" value="{{ old('email') ?? $Employer[0]->email ?? '' }}" required> 84 <input type="email" name="email" class="input" placeholder="info@rekamore.su" value="{{ old('email') ?? $Employer[0]->email ?? '' }}" required>
85 @error('email') 85 @error('email')
86 <span class="text-xs text-red-600"> 86 <span class="text-xs text-red-600">
87 {{ $message }} 87 {{ $message }}
88 </span> 88 </span>
89 @enderror 89 @enderror
90 </div> 90 </div>
91 </div> 91 </div>
92
93 <div class="cabinet__inputs-item form-group">
94 <label class="form-group__label">Электронная почта (alt)</label>
95 <div class="form-group__item">
96 <input type="email" name="email_2" class="input" placeholder="info@rekamore.su" value="{{ old('email_2') ?? $Employer[0]->email_2 ?? '' }}">
97 @error('email')
98 <span class="text-xs text-red-600">
99 {{ $message }}
100 </span>
101 @enderror
102 </div>
103 </div>
104
92 <div class="cabinet__inputs-item form-group"> 105 <div class="cabinet__inputs-item form-group">
93 <label class="form-group__label">Номер телефона</label> 106 <label class="form-group__label">Номер телефона</label>
94 <div class="form-group__item"> 107 <div class="form-group__item">
95 <input type="tel" name="telephone" class="input" placeholder="+7 (___) ___-__-__" value="{{ old('telephone') ?? $Employer[0]->telephone ?? '' }}" required> 108 <input type="tel" name="telephone" class="input" placeholder="+7 (___) ___-__-__" value="{{ old('telephone') ?? $Employer[0]->telephone ?? '' }}" required>
96 @error('telephone') 109 @error('telephone')
97 <span class="text-xs text-red-600"> 110 <span class="text-xs text-red-600">
98 {{ $message }} 111 {{ $message }}
99 </span> 112 </span>
100 @enderror 113 @enderror
101 </div> 114 </div>
102 </div> 115 </div>
116
117 <div class="cabinet__inputs-item form-group">
118 <label class="form-group__label">Номер телефона (alt)</label>
119 <div class="form-group__item">
120 <input type="tel" name="telephone_2" class="input" placeholder="+7 (___) ___-__-__" value="{{ old('telephone_2') ?? $Employer[0]->telephone_2 ?? '' }}">
121 @error('telephone')
122 <span class="text-xs text-red-600">
123 {{ $message }}
124 </span>
125 @enderror
126 </div>
127 </div>
128
103 <div class="cabinet__inputs-item form-group"> 129 <div class="cabinet__inputs-item form-group">
104 <label class="form-group__label">Адрес компании</label> 130 <label class="form-group__label">Адрес компании</label>
105 <div class="form-group__item"> 131 <div class="form-group__item">
106 <input type="text" name="address" class="input" value="{{ old('address') ?? $Employer[0]->address ?? '' }}" placeholder="692904, Приморский край, г. Находка, ул. Портовая 3А, 5 этаж" required> 132 <input type="text" name="address" class="input" value="{{ old('address') ?? $Employer[0]->address ?? '' }}" placeholder="692904, Приморский край, г. Находка, ул. Портовая 3А, 5 этаж" required>
107 @error('address') 133 @error('address')
108 <span class="text-xs text-red-600"> 134 <span class="text-xs text-red-600">
109 {{ $message }} 135 {{ $message }}
110 </span> 136 </span>
111 @enderror 137 @enderror
112 </div> 138 </div>
113 </div> 139 </div>
114 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 140 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
115 <label class="form-group__label">Ссылка на сайт</label> 141 <label class="form-group__label">Ссылка на сайт</label>
116 <div class="form-group__item"> 142 <div class="form-group__item">
117 <input type="url" name="site" class="input" value="{{ old('site') ?? $Employer[0]->site ?? '' }}" placeholder="https://rekamore.su" required> 143 <input type="url" name="site" class="input" value="{{ old('site') ?? $Employer[0]->site ?? '' }}" placeholder="https://rekamore.su" required>
118 @error('site') 144 @error('site')
119 <span class="text-xs text-red-600"> 145 <span class="text-xs text-red-600">
120 {{ $message }} 146 {{ $message }}
121 </span> 147 </span>
122 @enderror 148 @enderror
123 </div> 149 </div>
124 </div> 150 </div>
125 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> 151 <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
126 <label class="form-group__label">О компании</label> 152 <label class="form-group__label">О компании</label>
127 <div class="form-group__item"> 153 <div class="form-group__item">
128 <textarea name="text" id="txtarea" class="textarea ckeditor" required>{{ old('text') ?? $Employer[0]->text ?? '' }}</textarea> 154 <textarea name="text" id="txtarea" class="textarea ckeditor" required>{{ old('text') ?? $Employer[0]->text ?? '' }}</textarea>
129 @error('text') 155 @error('text')
130 <span class="text-xs text-red-600"> 156 <span class="text-xs text-red-600">
131 {{ $message }} 157 {{ $message }}
132 </span> 158 </span>
133 @enderror 159 @enderror
134 </div> 160 </div>
135 </div> 161 </div>
136 </div> 162 </div>
137 </div><br> 163 </div><br>
138 <button type="submit" class="button cabinet__submit">Сохранить изменения</button> 164 <button type="submit" class="button cabinet__submit">Сохранить изменения</button>
139 </form> 165 </form>
140 166
141 <div class="cabinet__body-item"> 167 <div class="cabinet__body-item">
142 <div class="cabinet__descr"> 168 <div class="cabinet__descr">
143 <h2 class="title cabinet__title">Мой флот</h2> 169 <h2 class="title cabinet__title">Мой флот</h2>
144 </div> 170 </div>
145 171
146 <form action="{{ route('employer.save_add_flot') }}" method="POST" class="cabinet__add" enctype="multipart/form-data"> 172 <form action="{{ route('employer.save_add_flot') }}" method="POST" class="cabinet__add" enctype="multipart/form-data">
147 @csrf 173 @csrf
148 <label class="cabinet__add-pic" style="vertical-align: top"> 174 <label class="cabinet__add-pic" style="vertical-align: top">
149 <input type="file" name="image" id="image"> 175 <input type="file" name="image" id="image">
150 @error('image') 176 @error('image')
151 <span class="text-xs text-red-600"> 177 <span class="text-xs text-red-600">
152 {{ $message }} 178 {{ $message }}
153 </span> 179 </span>
154 @enderror 180 @enderror
155 <input type="hidden" name="employer_id" id="employer_id" value="{{ $Employer[0]->id }}"/> 181 <input type="hidden" name="employer_id" id="employer_id" value="{{ $Employer[0]->id }}"/>
156 <svg> 182 <svg>
157 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> 183 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
158 </svg> 184 </svg>
159 <span> 185 <span>
160 <svg> 186 <svg>
161 <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> 187 <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use>
162 </svg> 188 </svg>
163 Загрузить фото 189 Загрузить фото
164 </span> 190 </span>
165 </label> 191 </label>
166 192
167 <div class="cabinet__add-body"> 193 <div class="cabinet__add-body">
168 <div class="form-group"> 194 <div class="form-group">
169 <label class="form-group__label">Название корабля</label> 195 <label class="form-group__label">Название корабля</label>
170 <div class="form-group__item"> 196 <div class="form-group__item">
171 <input type="text" name="name" id="flot_name" class="input" placeholder="Корабль №000001" required> 197 <input type="text" name="name" id="flot_name" class="input" placeholder="Корабль №000001" required>
172 @error('name') 198 @error('name')
173 <span class="text-xs text-red-600"> 199 <span class="text-xs text-red-600">
174 {{ $message }} 200 {{ $message }}
175 </span> 201 </span>
176 @enderror 202 @enderror
177 </div> 203 </div>
178 </div> 204 </div>
179 <div class="form-group"> 205 <div class="form-group">
180 <label class="form-group__label">Описание</label> 206 <label class="form-group__label">Описание</label>
181 <div class="form-group__item"> 207 <div class="form-group__item">
182 <input type="text" name="text" id="flot_text" class="input" placeholder="Это судно находится..." required> 208 <input type="text" name="text" id="flot_text" class="input" placeholder="Это судно находится..." required>
183 @error('text') 209 @error('text')
184 <span class="text-xs text-red-600"> 210 <span class="text-xs text-red-600">
185 {{ $message }} 211 {{ $message }}
186 </span> 212 </span>
187 @enderror 213 @enderror
188 </div> 214 </div>
189 </div> 215 </div>
190 <div class="form-group"> 216 <div class="form-group">
191 <label class="form-group__label">Регион</label> 217 <label class="form-group__label">Регион</label>
192 <div class="form-group__item"> 218 <div class="form-group__item">
193 <input type="text" name="region" id="region" class="input" placeholder="Мурманск" required> 219 <input type="text" name="region" id="region" class="input" placeholder="Мурманск" required>
194 @error('region') 220 @error('region')
195 <span class="text-xs text-red-600"> 221 <span class="text-xs text-red-600">
196 {{ $message }} 222 {{ $message }}
197 </span> 223 </span>
198 @enderror 224 @enderror
199 </div> 225 </div>
200 </div> 226 </div>
201 <div class="form-group"> 227 <div class="form-group">
202 <label class="form-group__label">Мощность</label> 228 <label class="form-group__label">Мощность</label>
203 <div class="form-group__item"> 229 <div class="form-group__item">
204 <input type="text" name="power" id="flot_power" class="input" placeholder="Dw 40000 9000Kw" required> 230 <input type="text" name="power" id="flot_power" class="input" placeholder="Dw 40000 9000Kw" required>
205 @error('power') 231 @error('power')
206 <span class="text-xs text-red-600"> 232 <span class="text-xs text-red-600">
207 {{ $message }} 233 {{ $message }}
208 </span> 234 </span>
209 @enderror 235 @enderror
210 </div> 236 </div>
211 </div> 237 </div>
212 <button type="submit" class="button" id="ajax_flot" name="ajax_flot">Добавить флот</button> 238 <button type="submit" class="button" id="ajax_flot" name="ajax_flot">Добавить флот</button>
213 </div> 239 </div>
214 240
215 </form> 241 </form>
216 242
217 <div class="cabinet__fleet" id="ajax_flot_div" name="ajax_flot_div"> 243 <div class="cabinet__fleet" id="ajax_flot_div" name="ajax_flot_div">
218 @if (isset($Employer[0]->flots)) 244 @if (isset($Employer[0]->flots))
219 @if ($Employer[0]->flots->count()) 245 @if ($Employer[0]->flots->count())
220 @foreach ($Employer[0]->flots as $it) 246 @foreach ($Employer[0]->flots as $it)
221 <div class="cabinet__fleet-item main__employer-page-one-item"> 247 <div class="cabinet__fleet-item main__employer-page-one-item">
222 <a class="del die_black" href="{{ route('employer.delete_flot', ['Flot' => $it->id]) }}"> 248 <a class="del die_black" href="{{ route('employer.delete_flot', ['Flot' => $it->id]) }}">
223 <svg> 249 <svg>
224 <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> 250 <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use>
225 </svg> 251 </svg>
226 </a> 252 </a>
227 @if (!empty($it->image)) 253 @if (!empty($it->image))
228 <img src="{{ asset(Storage::url($it->image)) }}" alt="{{ $it->name }}"> 254 <img src="{{ asset(Storage::url($it->image)) }}" alt="{{ $it->name }}">
229 @else 255 @else
230 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $it->name }}"/> 256 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $it->name }}"/>
231 @endif 257 @endif
232 <b>{{ $it->name }}</b> 258 <b>{{ $it->name }}</b>
233 <span>{{ $it->text }}</span> 259 <span>{{ $it->text }}</span>
234 </div> 260 </div>
235 @endforeach 261 @endforeach
236 @endif 262 @endif
237 @endif 263 @endif
238 </div> 264 </div>
239 </div> 265 </div>
240 </div> 266 </div>
241 </div> 267 </div>
242 </div> 268 </div>
243 </section> 269 </section>
244 </div> <!-- END TOP WRAPPER --> 270 </div> <!-- END TOP WRAPPER -->
245 @endsection 271 @endsection
246 272