cabinet45.blade.php
18.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
@extends('layout.frontend', ['title' => 'Образование и образовательные программы - РекаМоре'])
@section('scripts')
<script src="https://cdn.ckeditor.com/ckeditor5/23.0.0/classic/ckeditor.js"></script>
<script>
ClassicEditor
.create( document.querySelector( '#txtarea' ) )
.catch( error => {
console.error( error );
} );
</script>
@endsection
@section('content')
<section class="cabinet">
<div class="container">
<ul class="breadcrumbs cabinet__breadcrumbs">
<li><a href="{{ route('index') }}">Главная</a></li>
<li><b>Личный кабинет</b></li>
</ul>
<div class="cabinet__wrapper">
<div class="cabinet__side">
<div class="cabinet__side-toper">
@include('employers.emblema')
</div>
@include('employers.menu', ['item' => 1])
</div>
<div class="cabinet__body">
@include('messages_error')
<form action="{{ route('employer.cabinet_save', ['Employer' => $Employer[0]->id]) }}" method="POST" enctype="multipart/form-data">
@csrf
<div class="cabinet__body-item">
<div class="cabinet__descr">
<h2 class="title cabinet__title">Мой профиль</h2>
<p class="cabinet__text">Все поля обязательны для заполнения *</p>
</div>
<div class="cabinet__avatar">
<div class="cabinet__avatar-pic">
@if (!empty($Employer[0]->logo))
<img src="{{ asset(Storage::url($Employer[0]->logo)) }}" width="150" alt="{{ $Employer[0]->name_company }}">
@else
<img src="{{ asset('images/logo_emp.png') }}" width="150" alt="{{ $Employer[0]->name_company }}"/>
@endif
</div>
<div class="cabinet__avatar-form">
<label class="file">
<span class="file__input">
<input type="file" name="logo">
<span class="button">
<svg>
<use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use>
</svg>
Загрузить
</span>
</span>
</label>
<p class="cabinet__text">Загрузите логотип в формате .svg, .jpg, .png или .jpeg</p>
</div>
</div>
<div class="cabinet__inputs">
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Название судоходной компании</label>
<div class="form-group__item">
<input type="text" class="input" name="name_company" id="name_company" placeholder="ООО Река Море" value="{{ old('name_company') ?? $Employer[0]->name_company ?? '' }}" required>
@error('name_company')
<span class="text-xs text-red-600">
{{ $message }}
</span>
@enderror
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Электронная почта</label>
<div class="form-group__item">
<input type="email" name="email" class="input" placeholder="info@rekamore.su" value="{{ old('email') ?? $Employer[0]->email ?? '' }}" required>
@error('email')
<span class="text-xs text-red-600">
{{ $message }}
</span>
@enderror
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Электронная почта (alt)</label>
<div class="form-group__item">
<input type="email" name="email_2" class="input" placeholder="info@rekamore.su" value="{{ old('email_2') ?? $Employer[0]->email_2 ?? '' }}">
@error('email')
<span class="text-xs text-red-600">
{{ $message }}
</span>
@enderror
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Номер телефона</label>
<div class="form-group__item">
<input type="tel" name="telephone" class="input" placeholder="+7 (___) ___-__-__" value="{{ old('telephone') ?? $Employer[0]->telephone ?? '' }}" required>
@error('telephone')
<span class="text-xs text-red-600">
{{ $message }}
</span>
@enderror
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Номер телефона (alt)</label>
<div class="form-group__item">
<input type="tel" name="telephone_2" class="input" placeholder="+7 (___) ___-__-__" value="{{ old('telephone_2') ?? $Employer[0]->telephone_2 ?? '' }}">
@error('telephone')
<span class="text-xs text-red-600">
{{ $message }}
</span>
@enderror
</div>
</div>
<div class="cabinet__inputs-item form-group">
<label class="form-group__label">Адрес компании</label>
<div class="form-group__item">
<input type="text" name="address" class="input" value="{{ old('address') ?? $Employer[0]->address ?? '' }}" placeholder="692904, Приморский край, г. Находка, ул. Портовая 3А, 5 этаж" required>
@error('address')
<span class="text-xs text-red-600">
{{ $message }}
</span>
@enderror
</div>
</div>
<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
<label class="form-group__label">Ссылка на сайт</label>
<div class="form-group__item">
<input type="url" name="site" class="input" value="{{ old('site') ?? $Employer[0]->site ?? '' }}" placeholder="https://rekamore.su" required>
@error('site')
<span class="text-xs text-red-600">
{{ $message }}
</span>
@enderror
</div>
</div>
<div class="cabinet__inputs-item cabinet__inputs-item_fullwidth form-group">
<label class="form-group__label">О компании</label>
<div class="form-group__item">
<textarea name="text" id="txtarea" class="textarea " required>{{ old('text') ?? $Employer[0]->text ?? '' }}</textarea>
@error('text')
<span class="text-xs text-red-600">
{{ $message }}
</span>
@enderror
</div>
</div>
</div>
</div><br>
<button type="submit" class="button cabinet__submit">Сохранить изменения</button>
</form>
<div class="cabinet__body-item">
<div class="cabinet__descr">
<h2 class="title cabinet__title">Мой флот</h2>
</div>
<form action="{{ route('employer.save_add_flot') }}" method="POST" class="cabinet__add" enctype="multipart/form-data">
@csrf
<label class="cabinet__add-pic" style="vertical-align: top">
<input type="file" name="image" id="image">
@error('image')
<span class="text-xs text-red-600">
{{ $message }}
</span>
@enderror
<input type="hidden" name="employer_id" id="employer_id" value="{{ $Employer[0]->id }}"/>
<svg>
<use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
</svg>
<span>
<svg>
<use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use>
</svg>
Загрузить фото
</span>
</label>
<div class="cabinet__add-body">
<div class="form-group">
<label class="form-group__label">Название корабля</label>
<div class="form-group__item">
<input type="text" name="name" id="flot_name" class="input" placeholder="Корабль №000001" required>
@error('name')
<span class="text-xs text-red-600">
{{ $message }}
</span>
@enderror
</div>
</div>
<div class="form-group">
<label class="form-group__label">Описание</label>
<div class="form-group__item">
<input type="text" name="text" id="flot_text" class="input" placeholder="Это судно находится..." required>
@error('text')
<span class="text-xs text-red-600">
{{ $message }}
</span>
@enderror
</div>
</div>
<div class="form-group">
<label class="form-group__label">Регион</label>
<div class="form-group__item">
<input type="text" name="region" id="region" class="input" placeholder="Мурманск" required>
@error('region')
<span class="text-xs text-red-600">
{{ $message }}
</span>
@enderror
</div>
</div>
<div class="form-group">
<label class="form-group__label">Мощность</label>
<div class="form-group__item">
<input type="text" name="power" id="flot_power" class="input" placeholder="Dw 40000 9000Kw" required>
@error('power')
<span class="text-xs text-red-600">
{{ $message }}
</span>
@enderror
</div>
</div>
<div class="form-group">
<label class="form-group__label">DWT</label>
<div class="form-group__item">
<input type="text" name="DWT" id="flot_DWT" class="input" placeholder="4000 т">
@error('DWT')
<span class="text-xs text-red-600">
{{ $message }}
</span>
@enderror
</div>
</div>
<div class="form-group">
<label class="form-group__label">Мощность ГД</label>
<div class="form-group__item">
<input type="text" name="POWER_GD" id="flot_POWER_GD" class="input" placeholder="14000 кВт">
@error('POWER_GD')
<span class="text-xs text-red-600">
{{ $message }}
</span>
@enderror
</div>
</div>
<div class="form-group">
<label class="form-group__label">IMO</label>
<div class="form-group__item">
<input type="text" name="IMO" id="flot_IMO" class="input" placeholder="8814275">
@error('IMO')
<span class="text-xs text-red-600">
{{ $message }}
</span>
@enderror
</div>
</div>
<button type="submit" class="button" id="ajax_flot" name="ajax_flot">Добавить флот</button>
</div>
</form>
<div class="cabinet__fleet" id="ajax_flot_div" name="ajax_flot_div">
@if (isset($Employer[0]->flots))
@if ($Employer[0]->flots->count())
@foreach ($Employer[0]->flots as $it)
<div class="cabinet__fleet-item main__employer-page-one-item">
<a class="del die_black" href="{{ route('employer.delete_flot', ['Flot' => $it->id]) }}">
<svg>
<use xlink:href="{{ asset('images/sprite.svg#del') }}"></use>
</svg>
</a>
@if (!empty($it->image))
<img src="{{ asset(Storage::url($it->image)) }}" alt="{{ $it->name }}">
@else
<img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $it->name }}"/>
@endif
<b>{{ $it->name }}</b>
<span>{{ $it->region }}</span>
<span><i>DWT</i>{{ $it->DWT }}</span>
<span><i>Мощность ГД</i>{{ $it->POWER_GD }}</span>
<span><i>IMO</i>{{ $it->IMO }}</span>
<span>{{ $it->power }}</span>
</div>
@endforeach
@endif
@endif
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<!-- END TOP WRAPPER -->
@endsection