Commit e4a225e47287fce66f1d14053bf39f1bfd6f2f7c

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

Коммит по ссылке на резюме работника

Showing 1 changed file with 2 additions and 2 deletions Inline Diff

resources/views/employers/dialog.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', '#send_btn', function() { 6 $(document).on('change', '#send_btn', 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 </script> 48 </script>
49 @endsection 49 @endsection
50 50
51 @section('content') 51 @section('content')
52 <section class="cabinet"> 52 <section class="cabinet">
53 <div class="container"> 53 <div class="container">
54 <ul class="breadcrumbs cabinet__breadcrumbs"> 54 <ul class="breadcrumbs cabinet__breadcrumbs">
55 <li><a href="{{ route('index') }}">Главная</a></li> 55 <li><a href="{{ route('index') }}">Главная</a></li>
56 <li><b>Личный кабинет</b></li> 56 <li><b>Личный кабинет</b></li>
57 </ul> 57 </ul>
58 <div class="cabinet__wrapper"> 58 <div class="cabinet__wrapper">
59 <div class="cabinet__side"> 59 <div class="cabinet__side">
60 <div class="cabinet__side-toper"> 60 <div class="cabinet__side-toper">
61 @include('employers.emblema') 61 @include('employers.emblema')
62 </div> 62 </div>
63 @include('employers.menu', ['item' => 5]) 63 @include('employers.menu', ['item' => 5])
64 </div> 64 </div>
65 <div class="cabinet__body"> 65 <div class="cabinet__body">
66 <div class="cabinet__body-item"> 66 <div class="cabinet__body-item">
67 <h2 class="title cabinet__title">Сообщения</h2> 67 <h2 class="title cabinet__title">Сообщения</h2>
68 </div> 68 </div>
69 <div class="cabinet__body-item"> 69 <div class="cabinet__body-item">
70 <a href="{{ route('employer.messages', ['type_message' => 'input']) }}" class="back"> 70 <a href="{{ route('employer.messages', ['type_message' => 'input']) }}" class="back">
71 <svg> 71 <svg>
72 <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use> 72 <use xlink:href="{{ asset('images/sprite.svg#back') }}"></use>
73 </svg> 73 </svg>
74 <span> 74 <span>
75 К списку чатов 75 К списку чатов
76 </span> 76 </span>
77 </a> 77 </a>
78 <div class="chatbox"> 78 <div class="chatbox">
79 <div class="chatbox__toper"> 79 <div class="chatbox__toper">
80 @if ($companion->is_worker) 80 @if ($companion->is_worker)
81 <div class="chatbox__toper-info messages__item-info"> 81 <div class="chatbox__toper-info messages__item-info">
82 <div class="messages__item-photo"> 82 <div class="messages__item-photo">
83 <svg> 83 <svg>
84 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> 84 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
85 </svg> 85 </svg>
86 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 86 <img src="{{ asset('images/default_man.jpg') }}" alt="">
87 </div> 87 </div>
88 <div class="messages__item-text"> 88 <div class="messages__item-text">
89 <div>{{ $companion->surname." ".$companion->name_man." ".$companion->surname2." (".$companion->id.")" }} </div> 89 <div>{{ $companion->surname." ".$companion->name_man." ".$companion->surname2." (".$companion->id.")" }} </div>
90 <div><span>Вакансия:</span> 90 <div><span>Вакансия:</span>
91 @if ($ad_employer == 0) 91 @if ($ad_employer == 0)
92 @if (isset($_GET['ad_name'])){{ $_GET['ad_name'] }}@else Не указано @endif 92 @if (isset($_GET['ad_name'])){{ $_GET['ad_name'] }}@else Не указано @endif
93 @else 93 @else
94 <a href="{{ route('vacancie', ['vacancy' => $ad_employer]) }}"> 94 <a href="{{ route('vacancie', ['vacancy' => $ad_employer]) }}">
95 @if (isset($_GET['ad_name'])){{ $_GET['ad_name'] }} ({{ $ad_employer }}) @else Не указано @endif 95 @if (isset($_GET['ad_name'])){{ $_GET['ad_name'] }} ({{ $ad_employer }}) @else Не указано @endif
96 </a> 96 </a>
97 @endif 97 @endif
98 </div> 98 </div>
99 </div> 99 </div>
100 </div> 100 </div>
101 @if (isset($companion->worker->id)) 101 @if (isset($companion->workers[0]->id))
102 <a href="{{ route('resume_profile', ['worker' => $companion->worker->id]) }}" class="button chatbox__toper-button"> 102 <a href="{{ route('resume_profile', ['worker' => $companion->workers[0]->id]) }}" class="button chatbox__toper-button">
103 <svg> 103 <svg>
104 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use> 104 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use>
105 </svg> 105 </svg>
106 Перейти в резюме 106 Перейти в резюме
107 </a> 107 </a>
108 @endif 108 @endif
109 @else 109 @else
110 <div class="chatbox__toper-info messages__item-info"> 110 <div class="chatbox__toper-info messages__item-info">
111 <div class="messages__item-photo"> 111 <div class="messages__item-photo">
112 <svg> 112 <svg>
113 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> 113 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
114 </svg> 114 </svg>
115 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 115 <img src="{{ asset('images/default_man.jpg') }}" alt="">
116 </div> 116 </div>
117 <div class="messages__item-text"> 117 <div class="messages__item-text">
118 <div>{{ $companion->surname." ".$companion->name_man." ".$companion->surname2." (".$companion->id.")" }} </div> 118 <div>{{ $companion->surname." ".$companion->name_man." ".$companion->surname2." (".$companion->id.")" }} </div>
119 <div><span>Статус:</span> Работодатель или Администратор</div> 119 <div><span>Статус:</span> Работодатель или Администратор</div>
120 </div> 120 </div>
121 </div> 121 </div>
122 @if (isset($companion->employer->id)) 122 @if (isset($companion->employer->id))
123 <a href="" class="button chatbox__toper-button"> 123 <a href="" class="button chatbox__toper-button">
124 <svg> 124 <svg>
125 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use> 125 <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use>
126 </svg> 126 </svg>
127 Перейти в резюме 127 Перейти в резюме
128 </a> 128 </a>
129 @endif 129 @endif
130 @endif 130 @endif
131 </div> 131 </div>
132 132
133 <div class="chatbox__list" id="dialogs" name="dialogs"> 133 <div class="chatbox__list" id="dialogs" name="dialogs">
134 @if ($Messages->count()) 134 @if ($Messages->count())
135 @foreach ($Messages as $it) 135 @foreach ($Messages as $it)
136 @if ($it->user_id == $companion->id) 136 @if ($it->user_id == $companion->id)
137 <div class="chatbox__item"> 137 <div class="chatbox__item">
138 <div class="chatbox__item-photo"> 138 <div class="chatbox__item-photo">
139 <svg> 139 <svg>
140 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> 140 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
141 </svg> 141 </svg>
142 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 142 <img src="{{ asset('images/default_man.jpg') }}" alt="">
143 </div> 143 </div>
144 <div class="chatbox__item-body"> 144 <div class="chatbox__item-body">
145 <div class="chatbox__item-text">{{ $it->text }}</div> 145 <div class="chatbox__item-text">{{ $it->text }}</div>
146 </div> 146 </div>
147 <div class="chatbox__item-time">{{ $it->created_at }}</div> 147 <div class="chatbox__item-time">{{ $it->created_at }}</div>
148 </div> 148 </div>
149 @else 149 @else
150 <div class="chatbox__item chatbox__item_reverse"> 150 <div class="chatbox__item chatbox__item_reverse">
151 <div class="chatbox__item-photo"> 151 <div class="chatbox__item-photo">
152 <svg> 152 <svg>
153 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> 153 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
154 </svg> 154 </svg>
155 <img src="{{ asset('images/default_man.jpg') }}" alt=""> 155 <img src="{{ asset('images/default_man.jpg') }}" alt="">
156 </div> 156 </div>
157 <div class="chatbox__item-body"> 157 <div class="chatbox__item-body">
158 <div class="chatbox__item-text">{{ $it->text }}</div> 158 <div class="chatbox__item-text">{{ $it->text }}</div>
159 @if ((isset($it->file)) && (!empty($it->file))) 159 @if ((isset($it->file)) && (!empty($it->file)))
160 <a href="{{ asset(Storage::url($it->file)) }}" class="chatbox__item-text"> 160 <a href="{{ asset(Storage::url($it->file)) }}" class="chatbox__item-text">
161 <svg> 161 <svg>
162 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use> 162 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use>
163 </svg> 163 </svg>
164 </a> 164 </a>
165 @endif 165 @endif
166 </div> 166 </div>
167 <div class="chatbox__item-time">{{ $it->created_at }}</div> 167 <div class="chatbox__item-time">{{ $it->created_at }}</div>
168 </div> 168 </div>
169 @endif 169 @endif
170 170
171 @endforeach 171 @endforeach
172 @endif 172 @endif
173 </div> 173 </div>
174 <form action="{{ route('employer.test123') }}" class="chatbox__bottom" enctype="multipart/form-data" method="POST" > 174 <form action="{{ route('employer.test123') }}" class="chatbox__bottom" enctype="multipart/form-data" method="POST" >
175 @csrf 175 @csrf
176 <label class="chatbox__bottom-file"> 176 <label class="chatbox__bottom-file">
177 <input id="file" name="file" type="file"> 177 <input id="file" name="file" type="file">
178 <svg> 178 <svg>
179 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use> 179 <use xlink:href="{{ asset('images/sprite.svg#clip') }}"></use>
180 </svg> 180 </svg>
181 </label> 181 </label>
182 <input type="hidden" name="_token" value="{{ csrf_token() }}"/> 182 <input type="hidden" name="_token" value="{{ csrf_token() }}"/>
183 <input type="hidden" id="user_id" name="user_id" value="{{ $sender->id }}"/> 183 <input type="hidden" id="user_id" name="user_id" value="{{ $sender->id }}"/>
184 <input type="hidden" id="to_user_id" name="to_user_id" value="{{ $companion->id }}"/> 184 <input type="hidden" id="to_user_id" name="to_user_id" value="{{ $companion->id }}"/>
185 <input type="hidden" id="ad_employer_id" name="ad_employer_id" value="{{ $ad_employer }}"/> 185 <input type="hidden" id="ad_employer_id" name="ad_employer_id" value="{{ $ad_employer }}"/>
186 <input type="hidden" id="ad_name" name="ad_name" value="@if (isset($_GET['ad_name'])){{ $_GET['ad_name'] }} @endif"/> 186 <input type="hidden" id="ad_name" name="ad_name" value="@if (isset($_GET['ad_name'])){{ $_GET['ad_name'] }} @endif"/>
187 <input id="text" name="text" type="text" class="input chatbox__bottom-text" placeholder="Ответить"> 187 <input id="text" name="text" type="text" class="input chatbox__bottom-text" placeholder="Ответить">
188 <button type="submit" id="send_btn" name="send_btn" class="chatbox__bottom-send"> 188 <button type="submit" id="send_btn" name="send_btn" class="chatbox__bottom-send">
189 <svg> 189 <svg>
190 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use> 190 <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use>
191 </svg> 191 </svg>
192 </button> 192 </button>
193 </form> 193 </form>
194 </div> 194 </div>
195 </div> 195 </div>
196 </div> 196 </div>
197 </div> 197 </div>
198 </div> 198 </div>
199 </section> 199 </section>
200 </div> 200 </div>
201 @endsection 201 @endsection
202 202