Commit 4c5452fe9352d62bbe4acf32c0bcc7551995e9c4
1 parent
a3f7f05ed3
Exists in
master
and in
1 other branch
Обновление по необязательным полям
Showing 1 changed file with 2 additions and 2 deletions Inline Diff
resources/views/employers/cabinet.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 | 6 | ||
7 | 7 | ||
8 | $(document).on('click', '.die_black', function() { | 8 | $(document).on('click', '.die_black', function() { |
9 | var this_ = $(this); | 9 | var this_ = $(this); |
10 | var ajax_ = $('#ajax_flot_div'); | 10 | var ajax_ = $('#ajax_flot_div'); |
11 | var id_ = this_.attr('data-test'); | 11 | var id_ = this_.attr('data-test'); |
12 | var url_ = this_.attr('data-link'); | 12 | var url_ = this_.attr('data-link'); |
13 | 13 | ||
14 | console.log(url_); | 14 | console.log(url_); |
15 | $.ajax({ | 15 | $.ajax({ |
16 | type: "GET", | 16 | type: "GET", |
17 | url: url_, | 17 | url: url_, |
18 | success: function (data) { | 18 | success: function (data) { |
19 | console.log('Ответка'); | 19 | console.log('Ответка'); |
20 | ajax_.html(data); | 20 | ajax_.html(data); |
21 | }, | 21 | }, |
22 | headers: { | 22 | headers: { |
23 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') | 23 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
24 | }, | 24 | }, |
25 | error: function (data) { | 25 | error: function (data) { |
26 | console.log('Error: ' + data); | 26 | console.log('Error: ' + data); |
27 | } | 27 | } |
28 | }); | 28 | }); |
29 | 29 | ||
30 | }); | 30 | }); |
31 | </script> | 31 | </script> |
32 | @endsection | 32 | @endsection |
33 | @section('content') | 33 | @section('content') |
34 | <section class="cabinet"> | 34 | <section class="cabinet"> |
35 | <div class="container"> | 35 | <div class="container"> |
36 | <ul class="breadcrumbs cabinet__breadcrumbs"> | 36 | <ul class="breadcrumbs cabinet__breadcrumbs"> |
37 | <li><a href="{{ route('index') }}">Главная</a></li> | 37 | <li><a href="{{ route('index') }}">Главная</a></li> |
38 | <li><b>Личный кабинет</b></li> | 38 | <li><b>Личный кабинет</b></li> |
39 | </ul> | 39 | </ul> |
40 | <div class="cabinet__wrapper"> | 40 | <div class="cabinet__wrapper"> |
41 | <div class="cabinet__side"> | 41 | <div class="cabinet__side"> |
42 | <div class="cabinet__side-toper"> | 42 | <div class="cabinet__side-toper"> |
43 | <div class="cabinet__side-toper-pic"> | 43 | <div class="cabinet__side-toper-pic"> |
44 | @if (isset($Employer[0]->logo)) | 44 | @if (isset($Employer[0]->logo)) |
45 | <img src="{{ asset(Storage::url($Employer[0]->logo)) }}" width="150" alt="{{ $Employer[0]->name_company }}"> | 45 | <img src="{{ asset(Storage::url($Employer[0]->logo)) }}" width="150" alt="{{ $Employer[0]->name_company }}"> |
46 | @else | 46 | @else |
47 | <img src="{{ asset('images/logo_emp.png') }}" width="150" alt="{{ $Employer[0]->name_company }}"/> | 47 | <img src="{{ asset('images/logo_emp.png') }}" width="150" alt="{{ $Employer[0]->name_company }}"/> |
48 | @endif | 48 | @endif |
49 | </div> | 49 | </div> |
50 | <b>{{ $Employer[0]->name_company }}</b> | 50 | <b>{{ $Employer[0]->name_company }}</b> |
51 | </div> | 51 | </div> |
52 | 52 | ||
53 | @include('employers.menu') | 53 | @include('employers.menu') |
54 | 54 | ||
55 | </div> | 55 | </div> |
56 | <div class="cabinet__body"> | 56 | <div class="cabinet__body"> |
57 | @include('messages_error') | 57 | @include('messages_error') |
58 | 58 | ||
59 | <form action="{{ route('employer.cabinet_save', ['Employer' => $Employer[0]->id]) }}" method="POST" enctype="multipart/form-data"> | 59 | <form action="{{ route('employer.cabinet_save', ['Employer' => $Employer[0]->id]) }}" method="POST" enctype="multipart/form-data"> |
60 | @csrf | 60 | @csrf |
61 | <div class="cabinet__body-item"> | 61 | <div class="cabinet__body-item"> |
62 | <div class="cabinet__descr"> | 62 | <div class="cabinet__descr"> |
63 | <h2 class="title cabinet__title">Мой профиль</h2> | 63 | <h2 class="title cabinet__title">Мой профиль</h2> |
64 | <p class="cabinet__text">Все поля обязательны для заполнения *</p> | 64 | <p class="cabinet__text">Все поля обязательны для заполнения *</p> |
65 | </div> | 65 | </div> |
66 | <div class="cabinet__avatar"> | 66 | <div class="cabinet__avatar"> |
67 | <div class="cabinet__avatar-pic"> | 67 | <div class="cabinet__avatar-pic"> |
68 | @if (isset($Employer[0]->logo)) | 68 | @if (isset($Employer[0]->logo)) |
69 | <img src="{{ asset(Storage::url($Employer[0]->logo)) }}" width="150" alt="{{ $Employer[0]->name_company }}"> | 69 | <img src="{{ asset(Storage::url($Employer[0]->logo)) }}" width="150" alt="{{ $Employer[0]->name_company }}"> |
70 | @else | 70 | @else |
71 | <img src="{{ asset('images/logo_emp.png') }}" width="150" alt="{{ $Employer[0]->name_company }}"/> | 71 | <img src="{{ asset('images/logo_emp.png') }}" width="150" alt="{{ $Employer[0]->name_company }}"/> |
72 | @endif | 72 | @endif |
73 | </div> | 73 | </div> |
74 | <div class="cabinet__avatar-form"> | 74 | <div class="cabinet__avatar-form"> |
75 | <label class="file"> | 75 | <label class="file"> |
76 | <span class="file__input"> | 76 | <span class="file__input"> |
77 | <input type="file" name="logo"> | 77 | <input type="file" name="logo"> |
78 | <span class="button"> | 78 | <span class="button"> |
79 | <svg> | 79 | <svg> |
80 | <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> | 80 | <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> |
81 | </svg> | 81 | </svg> |
82 | Загрузить | 82 | Загрузить |
83 | </span> | 83 | </span> |
84 | </span> | 84 | </span> |
85 | </label> | 85 | </label> |
86 | <p class="cabinet__text">Загрузите логотип в формате .svg, .jpg, .png или .jpeg</p> | 86 | <p class="cabinet__text">Загрузите логотип в формате .svg, .jpg, .png или .jpeg</p> |
87 | </div> | 87 | </div> |
88 | </div> | 88 | </div> |
89 | <div class="cabinet__inputs"> | 89 | <div class="cabinet__inputs"> |
90 | <div class="cabinet__inputs-item form-group"> | 90 | <div class="cabinet__inputs-item form-group"> |
91 | <label class="form-group__label">Название судоходной компании</label> | 91 | <label class="form-group__label">Название судоходной компании</label> |
92 | <div class="form-group__item"> | 92 | <div class="form-group__item"> |
93 | <input type="text" class="input" name="name_company" id="name_company" placeholder="ООО Река Море" value="{{ old('name_company') ?? $Employer[0]->name_company ?? '' }}" required> | 93 | <input type="text" class="input" name="name_company" id="name_company" placeholder="ООО Река Море" value="{{ old('name_company') ?? $Employer[0]->name_company ?? '' }}" required> |
94 | @error('name_company') | 94 | @error('name_company') |
95 | <span class="text-xs text-red-600"> | 95 | <span class="text-xs text-red-600"> |
96 | {{ $message }} | 96 | {{ $message }} |
97 | </span> | 97 | </span> |
98 | @enderror | 98 | @enderror |
99 | </div> | 99 | </div> |
100 | </div> | 100 | </div> |
101 | <div class="cabinet__inputs-item form-group"> | 101 | <div class="cabinet__inputs-item form-group"> |
102 | <label class="form-group__label">Электронная почта</label> | 102 | <label class="form-group__label">Электронная почта</label> |
103 | <div class="form-group__item"> | 103 | <div class="form-group__item"> |
104 | <input type="email" name="email" class="input" placeholder="info@rekamore.su" value="{{ old('email') ?? $Employer[0]->email ?? '' }}" required> | 104 | <input type="email" name="email" class="input" placeholder="info@rekamore.su" value="{{ old('email') ?? $Employer[0]->email ?? '' }}" required> |
105 | @error('email') | 105 | @error('email') |
106 | <span class="text-xs text-red-600"> | 106 | <span class="text-xs text-red-600"> |
107 | {{ $message }} | 107 | {{ $message }} |
108 | </span> | 108 | </span> |
109 | @enderror | 109 | @enderror |
110 | </div> | 110 | </div> |
111 | </div> | 111 | </div> |
112 | <div class="cabinet__inputs-item form-group"> | 112 | <div class="cabinet__inputs-item form-group"> |
113 | <label class="form-group__label">Номер телефона</label> | 113 | <label class="form-group__label">Номер телефона</label> |
114 | <div class="form-group__item"> | 114 | <div class="form-group__item"> |
115 | <input type="tel" name="telephone" class="input" placeholder="+7 (___) ___-__-__" value="{{ old('telephone') ?? $Employer[0]->telephone ?? '' }}" required> | 115 | <input type="tel" name="telephone" class="input" placeholder="+7 (___) ___-__-__" value="{{ old('telephone') ?? $Employer[0]->telephone ?? '' }}" required> |
116 | @error('telephone') | 116 | @error('telephone') |
117 | <span class="text-xs text-red-600"> | 117 | <span class="text-xs text-red-600"> |
118 | {{ $message }} | 118 | {{ $message }} |
119 | </span> | 119 | </span> |
120 | @enderror | 120 | @enderror |
121 | </div> | 121 | </div> |
122 | </div> | 122 | </div> |
123 | <div class="cabinet__inputs-item form-group"> | 123 | <div class="cabinet__inputs-item form-group"> |
124 | <label class="form-group__label">Адрес компании</label> | 124 | <label class="form-group__label">Адрес компании</label> |
125 | <div class="form-group__item"> | 125 | <div class="form-group__item"> |
126 | <input type="text" name="address" class="input" value="{{ old('address') ?? $Employer[0]->address ?? '' }}" placeholder="692904, Приморский край, г. Находка, ул. Портовая 3А, 5 этаж" required> | 126 | <input type="text" name="address" class="input" value="{{ old('address') ?? $Employer[0]->address ?? '' }}" placeholder="692904, Приморский край, г. Находка, ул. Портовая 3А, 5 этаж"> |
127 | @error('address') | 127 | @error('address') |
128 | <span class="text-xs text-red-600"> | 128 | <span class="text-xs text-red-600"> |
129 | {{ $message }} | 129 | {{ $message }} |
130 | </span> | 130 | </span> |
131 | @enderror | 131 | @enderror |
132 | </div> | 132 | </div> |
133 | </div> | 133 | </div> |
134 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 134 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
135 | <label class="form-group__label">Ссылка на сайт</label> | 135 | <label class="form-group__label">Ссылка на сайт</label> |
136 | <div class="form-group__item"> | 136 | <div class="form-group__item"> |
137 | <input type="url" name="site" class="input" value="{{ old('site') ?? $Employer[0]->site ?? '' }}" placeholder="https://rekamore.su" required> | 137 | <input type="url" name="site" class="input" value="{{ old('site') ?? $Employer[0]->site ?? '' }}" placeholder="https://rekamore.su"> |
138 | @error('site') | 138 | @error('site') |
139 | <span class="text-xs text-red-600"> | 139 | <span class="text-xs text-red-600"> |
140 | {{ $message }} | 140 | {{ $message }} |
141 | </span> | 141 | </span> |
142 | @enderror | 142 | @enderror |
143 | </div> | 143 | </div> |
144 | </div> | 144 | </div> |
145 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> | 145 | <div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group"> |
146 | <label class="form-group__label">О компании</label> | 146 | <label class="form-group__label">О компании</label> |
147 | <div class="form-group__item"> | 147 | <div class="form-group__item"> |
148 | <textarea name="text" class="textarea" required>{{ old('text') ?? $Employer[0]->text ?? '' }}</textarea> | 148 | <textarea name="text" class="textarea" required>{{ old('text') ?? $Employer[0]->text ?? '' }}</textarea> |
149 | @error('text') | 149 | @error('text') |
150 | <span class="text-xs text-red-600"> | 150 | <span class="text-xs text-red-600"> |
151 | {{ $message }} | 151 | {{ $message }} |
152 | </span> | 152 | </span> |
153 | @enderror | 153 | @enderror |
154 | </div> | 154 | </div> |
155 | </div> | 155 | </div> |
156 | </div> | 156 | </div> |
157 | </div><br> | 157 | </div><br> |
158 | <button type="submit" class="button cabinet__submit">Сохранить изменения</button> | 158 | <button type="submit" class="button cabinet__submit">Сохранить изменения</button> |
159 | </form> | 159 | </form> |
160 | 160 | ||
161 | <div class="cabinet__body-item"> | 161 | <div class="cabinet__body-item"> |
162 | <div class="cabinet__descr"> | 162 | <div class="cabinet__descr"> |
163 | <h2 class="title cabinet__title">Мой флот</h2> | 163 | <h2 class="title cabinet__title">Мой флот</h2> |
164 | </div> | 164 | </div> |
165 | 165 | ||
166 | <form action="{{ route('employer.save_add_flot') }}" method="POST" class="cabinet__add" enctype="multipart/form-data"> | 166 | <form action="{{ route('employer.save_add_flot') }}" method="POST" class="cabinet__add" enctype="multipart/form-data"> |
167 | @csrf | 167 | @csrf |
168 | <label class="cabinet__add-pic" style="vertical-align: top"> | 168 | <label class="cabinet__add-pic" style="vertical-align: top"> |
169 | <input type="file" name="image" id="image"> | 169 | <input type="file" name="image" id="image"> |
170 | <input type="hidden" name="employer_id" id="employer_id" value="{{ $Employer[0]->id }}"/> | 170 | <input type="hidden" name="employer_id" id="employer_id" value="{{ $Employer[0]->id }}"/> |
171 | <svg> | 171 | <svg> |
172 | <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> | 172 | <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> |
173 | </svg> | 173 | </svg> |
174 | <span> | 174 | <span> |
175 | <svg> | 175 | <svg> |
176 | <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> | 176 | <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> |
177 | </svg> | 177 | </svg> |
178 | Загрузить фото | 178 | Загрузить фото |
179 | </span> | 179 | </span> |
180 | </label> | 180 | </label> |
181 | 181 | ||
182 | <div class="cabinet__add-body"> | 182 | <div class="cabinet__add-body"> |
183 | <div class="form-group"> | 183 | <div class="form-group"> |
184 | <label class="form-group__label">Название корабля</label> | 184 | <label class="form-group__label">Название корабля</label> |
185 | <div class="form-group__item"> | 185 | <div class="form-group__item"> |
186 | <input type="text" name="name" id="flot_name" class="input" placeholder="Корабль №000001" required> | 186 | <input type="text" name="name" id="flot_name" class="input" placeholder="Корабль №000001" required> |
187 | </div> | 187 | </div> |
188 | </div> | 188 | </div> |
189 | <div class="form-group"> | 189 | <div class="form-group"> |
190 | <label class="form-group__label">Описание</label> | 190 | <label class="form-group__label">Описание</label> |
191 | <div class="form-group__item"> | 191 | <div class="form-group__item"> |
192 | <input type="text" name="text" id="flot_text" class="input" placeholder="Это судно находится..." required> | 192 | <input type="text" name="text" id="flot_text" class="input" placeholder="Это судно находится..." required> |
193 | </div> | 193 | </div> |
194 | </div> | 194 | </div> |
195 | <div class="form-group"> | 195 | <div class="form-group"> |
196 | <label class="form-group__label">Регион</label> | 196 | <label class="form-group__label">Регион</label> |
197 | <div class="form-group__item"> | 197 | <div class="form-group__item"> |
198 | <input type="text" name="region" id="region" class="input" placeholder="Мурманск" required> | 198 | <input type="text" name="region" id="region" class="input" placeholder="Мурманск" required> |
199 | </div> | 199 | </div> |
200 | </div> | 200 | </div> |
201 | <div class="form-group"> | 201 | <div class="form-group"> |
202 | <label class="form-group__label">Мощность</label> | 202 | <label class="form-group__label">Мощность</label> |
203 | <div class="form-group__item"> | 203 | <div class="form-group__item"> |
204 | <input type="text" name="power" id="flot_power" class="input" placeholder="Dw 40000 9000Kw" required> | 204 | <input type="text" name="power" id="flot_power" class="input" placeholder="Dw 40000 9000Kw" required> |
205 | </div> | 205 | </div> |
206 | </div> | 206 | </div> |
207 | <button type="submit" class="button" id="ajax_flot" name="ajax_flot">Добавить флот</button> | 207 | <button type="submit" class="button" id="ajax_flot" name="ajax_flot">Добавить флот</button> |
208 | </div> | 208 | </div> |
209 | 209 | ||
210 | </form> | 210 | </form> |
211 | 211 | ||
212 | <div class="cabinet__fleet" id="ajax_flot_div" name="ajax_flot_div"> | 212 | <div class="cabinet__fleet" id="ajax_flot_div" name="ajax_flot_div"> |
213 | @if (isset($Employer[0]->flots)) | 213 | @if (isset($Employer[0]->flots)) |
214 | @if ($Employer[0]->flots->count()) | 214 | @if ($Employer[0]->flots->count()) |
215 | @foreach ($Employer[0]->flots as $it) | 215 | @foreach ($Employer[0]->flots as $it) |
216 | <div class="cabinet__fleet-item main__employer-page-one-item"> | 216 | <div class="cabinet__fleet-item main__employer-page-one-item"> |
217 | <div class="del die_black" data-test="{{ $it->id }}" data-link="{{ route('employer.delete_flot', ['Flot' => $it->id]) }}"> | 217 | <div class="del die_black" data-test="{{ $it->id }}" data-link="{{ route('employer.delete_flot', ['Flot' => $it->id]) }}"> |
218 | <svg> | 218 | <svg> |
219 | <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> | 219 | <use xlink:href="{{ asset('images/sprite.svg#del') }}"></use> |
220 | </svg> | 220 | </svg> |
221 | </div> | 221 | </div> |
222 | @if (!empty($it->image)) | 222 | @if (!empty($it->image)) |
223 | <img src="{{ asset(Storage::url($it->image)) }}" alt="{{ $it->name }}"> | 223 | <img src="{{ asset(Storage::url($it->image)) }}" alt="{{ $it->name }}"> |
224 | @else | 224 | @else |
225 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $it->name }}"/> | 225 | <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $it->name }}"/> |
226 | @endif | 226 | @endif |
227 | <b>{{ $it->name }}</b> | 227 | <b>{{ $it->name }}</b> |
228 | <span>{{ $it->text }}</span> | 228 | <span>{{ $it->text }}</span> |
229 | </div> | 229 | </div> |
230 | @endforeach | 230 | @endforeach |
231 | @endif | 231 | @endif |
232 | @endif | 232 | @endif |
233 | </div> | 233 | </div> |
234 | </div> | 234 | </div> |
235 | </div> | 235 | </div> |
236 | </div> | 236 | </div> |
237 | </div> | 237 | </div> |
238 | </section> | 238 | </section> |
239 | </div> <!-- END TOP WRAPPER --> | 239 | </div> <!-- END TOP WRAPPER --> |
240 | @endsection | 240 | @endsection |
241 | 241 |