Commit 87a82fb2125a0b9520d5779cee10e4570d557b6a
1 parent
6b3a11e4b2
Exists in
master
Коммит сообщения у работодателя и работника
Showing 2 changed files with 18 additions and 14 deletions Side-by-side Diff
resources/views/employers/messages.blade.php
... | ... | @@ -103,10 +103,13 @@ |
103 | 103 | <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> |
104 | 104 | </svg> |
105 | 105 | |
106 | + | |
106 | 107 | @if ($type_message == 'input') |
107 | 108 | @if ($it->user_to->is_worker) |
108 | - @if (isset($it->user_to->workers->phote)) | |
109 | - <img src="{{ asset(Storage::url($it->user_to->workers->phote)) }}" alt=""> | |
109 | + @if (isset($it->user_to->workers->photo)) | |
110 | + <img src="{{ asset(Storage::url($it->user_to->workers->photo)) }}" alt=""> | |
111 | + @elseif(isset($it->user_to->file)) | |
112 | + <img src="{{ asset(Storage::url($it->user_to->file)) }}" alt=""> | |
110 | 113 | @else |
111 | 114 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
112 | 115 | @endif |
... | ... | @@ -121,8 +124,8 @@ |
121 | 124 | |
122 | 125 | @if ($type_message == 'output') |
123 | 126 | @if ($it->user_from->is_worker) |
124 | - @if (isset($it->user_from->workers->phote)) | |
125 | - <img src="{{ asset(Storage::url($it->user_from->workers->phote)) }}" alt=""> | |
127 | + @if (isset($it->user_from->workers->photo)) | |
128 | + <img src="{{ asset(Storage::url($it->user_from->workers->photo)) }}" alt=""> | |
126 | 129 | @else |
127 | 130 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
128 | 131 | @endif |
resources/views/workers/messages.blade.php
... | ... | @@ -44,36 +44,37 @@ |
44 | 44 | </div> |
45 | 45 | </div>--> |
46 | 46 | </div> |
47 | - | |
48 | 47 | @if ($messages->count()) |
49 | 48 | @foreach($messages as $it) |
50 | 49 | <div class="messages__item"> |
51 | 50 | <div class="messages__item-info"> |
51 | + <!--<pre> print_r(asset(Storage::url($it->user_from->employers[0]->logo))) }}</pre>--> | |
52 | 52 | <div class="messages__item-photo"> |
53 | 53 | <svg> |
54 | 54 | <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> |
55 | 55 | </svg> |
56 | - | |
56 | + <!-- Комментарий: обновление структуры вывода картинок, все корректное --> | |
57 | 57 | @if ($type_message == 'input') |
58 | - @if ($it->user_to->is_worker) | |
59 | - @if (isset($it->user_to->workers->phote)) | |
60 | - <img src="{{ asset(Storage::url($it->user_to->workers->phote)) }}" alt=""> | |
58 | + @if ($it->user_from->is_worker) | |
59 | + @if (isset($it->user_from->workers[0]->photo)) | |
60 | + <img src="{{ asset(Storage::url($it->user_to->workers[0]->photo)) }}" alt=""> | |
61 | 61 | @else |
62 | 62 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
63 | 63 | @endif |
64 | 64 | @else |
65 | - @if (isset($it->user_to->employers->logo)) | |
66 | - <img src="{{ asset(Storage::url($it->user_to->employers->logo)) }}" alt=""> | |
65 | + @if (isset($it->user_from->employers[0]->logo)) | |
66 | + <img src="{{ asset(Storage::url($it->user_from->employers[0]->logo)) }}" alt=""> | |
67 | 67 | @else |
68 | - <img src="{{ asset('images/default_man.jpg') }}" alt=""> | |
68 | + <img src=" asset('images/default_man.jpg') }}" alt=""> | |
69 | 69 | @endif |
70 | 70 | @endif |
71 | 71 | @endif |
72 | 72 | |
73 | + <!-- Обновление исходящих сообщений - фотографии компании и работника --> | |
73 | 74 | @if ($type_message == 'output') |
74 | 75 | @if ($it->user_from->is_worker) |
75 | - @if (isset($it->user_from->workers->phote)) | |
76 | - <img src="{{ asset(Storage::url($it->user_from->workers->phote)) }}" alt=""> | |
76 | + @if (isset($it->user_from->workers[0]->photo)) | |
77 | + <img src="{{ asset(Storage::url($it->user_from->workers[0]->photo)) }}" alt=""> | |
77 | 78 | @else |
78 | 79 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
79 | 80 | @endif |