Commit 5f72758005a686a0ce6d0add9ac5e8fcdd596084

Authored by Андрей Ларионов
1 parent 2a5b45db10
Exists in master

Коммит 19 марта

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 154
129 <textarea name="text" id="txtarea" class="textarea " required>{{ old('text') ?? $Employer[0]->text ?? '' }}</textarea> 155 <textarea name="text" id="txtarea" class="textarea " required>{{ old('text') ?? $Employer[0]->text ?? '' }}</textarea>
130 156
131 @error('text') 157 @error('text')
132 <span class="text-xs text-red-600"> 158 <span class="text-xs text-red-600">
133 {{ $message }} 159 {{ $message }}
134 </span> 160 </span>
135 @enderror 161 @enderror
136 </div> 162 </div>
137 </div> 163 </div>
138 </div> 164 </div>
139 </div><br> 165 </div><br>
140 <button type="submit" class="button cabinet__submit">Сохранить изменения</button> 166 <button type="submit" class="button cabinet__submit">Сохранить изменения</button>
141 </form> 167 </form>
142 168
143 <div class="cabinet__body-item"> 169 <div class="cabinet__body-item">
144 <div class="cabinet__descr"> 170 <div class="cabinet__descr">
145 <h2 class="title cabinet__title">Мой флот</h2> 171 <h2 class="title cabinet__title">Мой флот</h2>
146 </div> 172 </div>
147 173
148 <form action="{{ route('employer.save_add_flot') }}" method="POST" class="cabinet__add" enctype="multipart/form-data"> 174 <form action="{{ route('employer.save_add_flot') }}" method="POST" class="cabinet__add" enctype="multipart/form-data">
149 @csrf 175 @csrf
150 <label class="cabinet__add-pic" style="vertical-align: top"> 176 <label class="cabinet__add-pic" style="vertical-align: top">
151 <input type="file" name="image" id="image"> 177 <input type="file" name="image" id="image">
152 @error('image') 178 @error('image')
153 <span class="text-xs text-red-600"> 179 <span class="text-xs text-red-600">
154 {{ $message }} 180 {{ $message }}
155 </span> 181 </span>
156 @enderror 182 @enderror
157 <input type="hidden" name="employer_id" id="employer_id" value="{{ $Employer[0]->id }}"/> 183 <input type="hidden" name="employer_id" id="employer_id" value="{{ $Employer[0]->id }}"/>
158 <svg> 184 <svg>
159 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> 185 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
160 </svg> 186 </svg>
161 <span> 187 <span>
162 <svg> 188 <svg>
163 <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> 189 <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use>
164 </svg> 190 </svg>
165 Загрузить фото 191 Загрузить фото
166 </span> 192 </span>
167 </label> 193 </label>
168 194
169 <div class="cabinet__add-body"> 195 <div class="cabinet__add-body">
170 <div class="form-group"> 196 <div class="form-group">
171 <label class="form-group__label">Название корабля</label> 197 <label class="form-group__label">Название корабля</label>
172 <div class="form-group__item"> 198 <div class="form-group__item">
173 <input type="text" name="name" id="flot_name" class="input" placeholder="Корабль №000001" required> 199 <input type="text" name="name" id="flot_name" class="input" placeholder="Корабль №000001" required>
174 @error('name') 200 @error('name')
175 <span class="text-xs text-red-600"> 201 <span class="text-xs text-red-600">
176 {{ $message }} 202 {{ $message }}
177 </span> 203 </span>
178 @enderror 204 @enderror
179 </div> 205 </div>
180 </div> 206 </div>
181 <div class="form-group"> 207 <div class="form-group">
182 <label class="form-group__label">Описание</label> 208 <label class="form-group__label">Описание</label>
183 <div class="form-group__item"> 209 <div class="form-group__item">
184 <input type="text" name="text" id="flot_text" class="input" placeholder="Это судно находится..." required> 210 <input type="text" name="text" id="flot_text" class="input" placeholder="Это судно находится..." required>
185 @error('text') 211 @error('text')
186 <span class="text-xs text-red-600"> 212 <span class="text-xs text-red-600">
187 {{ $message }} 213 {{ $message }}
188 </span> 214 </span>
189 @enderror 215 @enderror
190 </div> 216 </div>
191 </div> 217 </div>
192 <div class="form-group"> 218 <div class="form-group">
193 <label class="form-group__label">Регион</label> 219 <label class="form-group__label">Регион</label>
194 <div class="form-group__item"> 220 <div class="form-group__item">
195 <input type="text" name="region" id="region" class="input" placeholder="Мурманск" required> 221 <input type="text" name="region" id="region" class="input" placeholder="Мурманск" required>
196 @error('region') 222 @error('region')
197 <span class="text-xs text-red-600"> 223 <span class="text-xs text-red-600">
198 {{ $message }} 224 {{ $message }}
199 </span> 225 </span>
200 @enderror 226 @enderror
201 </div> 227 </div>
202 </div> 228 </div>
203 <div class="form-group"> 229 <div class="form-group">
204 <label class="form-group__label">Мощность</label> 230 <label class="form-group__label">Мощность</label>
205 <div class="form-group__item"> 231 <div class="form-group__item">
206 <input type="text" name="power" id="flot_power" class="input" placeholder="Dw 40000 9000Kw" required> 232 <input type="text" name="power" id="flot_power" class="input" placeholder="Dw 40000 9000Kw" required>
207 @error('power') 233 @error('power')
208 <span class="text-xs text-red-600"> 234 <span class="text-xs text-red-600">
209 {{ $message }} 235 {{ $message }}
210 </span> 236 </span>
211 @enderror 237 @enderror
212 </div> 238 </div>
213 </div> 239 </div>
214 <button type="submit" class="button" id="ajax_flot" name="ajax_flot">Добавить флот</button> 240 <button type="submit" class="button" id="ajax_flot" name="ajax_flot">Добавить флот</button>
215 </div> 241 </div>
216 242
217 </form> 243 </form>
218 244
219 <div class="cabinet__fleet" id="ajax_flot_div" name="ajax_flot_div"> 245 <div class="cabinet__fleet" id="ajax_flot_div" name="ajax_flot_div">
220 @if (isset($Employer[0]->flots)) 246 @if (isset($Employer[0]->flots))
221 @if ($Employer[0]->flots->count()) 247 @if ($Employer[0]->flots->count())
222 @foreach ($Employer[0]->flots as $it) 248 @foreach ($Employer[0]->flots as $it)
223 <div class="cabinet__fleet-item main__employer-page-one-item"> 249 <div class="cabinet__fleet-item main__employer-page-one-item">
224 <a class="del die_black" href="{{ route('employer.delete_flot', ['Flot' => $it->id]) }}"> 250 <a class="del die_black" href="{{ route('employer.delete_flot', ['Flot' => $it->id]) }}">
225 <svg> 251 <svg>
226 <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> 252 <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use>
227 </svg> 253 </svg>
228 </a> 254 </a>
229 @if (!empty($it->image)) 255 @if (!empty($it->image))
230 <img src="{{ asset(Storage::url($it->image)) }}" alt="{{ $it->name }}"> 256 <img src="{{ asset(Storage::url($it->image)) }}" alt="{{ $it->name }}">
231 @else 257 @else
232 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $it->name }}"/> 258 <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $it->name }}"/>
233 @endif 259 @endif
234 <b>{{ $it->name }}</b> 260 <b>{{ $it->name }}</b>
235 <span>{{ $it->text }}</span> 261 <span>{{ $it->text }}</span>
236 </div> 262 </div>
237 @endforeach 263 @endforeach
238 @endif 264 @endif
239 @endif 265 @endif
240 </div> 266 </div>
241 </div> 267 </div>
242 </div> 268 </div>
243 </div> 269 </div>
244 </div> 270 </div>
245 </section> 271 </section>
246 </div> <!-- END TOP WRAPPER --> 272 </div> <!-- END TOP WRAPPER -->
247 @endsection 273 @endsection
248 274