Blame view

resources/views/employers/fly-flot.blade.php 9.76 KB
b3d27fa36   Андрей Ларионов   Обновление проект...
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
  @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' => 12])
  
                  </div>
                  <div class="cabinet__body">
                      @include('messages_error')
  
                      <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