Commit 50eb849a5f559c3dfbbd990151b7897d3ec50e39
Exists in
master
Работа на сервере - сообщения
Showing 2 changed files Side-by-side Diff
resources/views/employers/messages.blade.php
... | ... | @@ -102,39 +102,43 @@ |
102 | 102 | <svg> |
103 | 103 | <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> |
104 | 104 | </svg> |
105 | - | |
106 | - | |
107 | 105 | @if ($type_message == 'input') |
108 | - @if ($it->user_to->is_worker) | |
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=""> | |
106 | + @if (isset($it->user_from->is_worker)) | |
107 | + @if ($it->user_from->is_worker) | |
108 | + @if (isset($it->user_from->workers[0]->photo)) | |
109 | + <img src="{{ asset(Storage::url($it->user_from->workers[0]->photo)) }}" alt=""> | |
113 | 110 | @else |
114 | 111 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
115 | 112 | @endif |
116 | 113 | @else |
117 | - @if (isset($it->user_to->employers->logo)) | |
118 | - <img src="{{ asset(Storage::url($it->user_to->employers->logo)) }}" alt=""> | |
114 | + @if (isset($it->user_from->employers[0]->logo)) | |
115 | + <img src="{{ asset(Storage::url($it->user_from->employers[0]->logo)) }}" alt=""> | |
119 | 116 | @else |
120 | 117 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
121 | 118 | @endif |
122 | 119 | @endif |
120 | + @else | |
121 | + <img src="{{ asset('images/default_man.jpg') }}" alt=""> | |
122 | + @endif | |
123 | 123 | @endif |
124 | 124 | |
125 | 125 | @if ($type_message == 'output') |
126 | - @if ($it->user_from->is_worker) | |
127 | - @if (isset($it->user_from->workers->photo)) | |
128 | - <img src="{{ asset(Storage::url($it->user_from->workers->photo)) }}" alt=""> | |
126 | + @if (isset($it->user_from->is_worker)) | |
127 | + @if ($it->user_from->is_worker) | |
128 | + @if (isset($it->user_from->workers[0]->photo)) | |
129 | + <img src="{{ asset(Storage::url($it->user_from->workers[0]->photo)) }}" alt=""> | |
130 | + @else | |
131 | + <img src="{{ asset('images/default_man.jpg') }}" alt=""> | |
132 | + @endif | |
129 | 133 | @else |
130 | - <img src="{{ asset('images/default_man.jpg') }}" alt=""> | |
134 | + @if (isset($it->user_from->employers[0]->logo)) | |
135 | + <img src="{{ asset(Storage::url($it->user_from->employers[0]->logo)) }}" alt=""> | |
136 | + @else | |
137 | + <img src="{{ asset('images/default_man.jpg') }}" alt=""> | |
138 | + @endif | |
131 | 139 | @endif |
132 | 140 | @else |
133 | - @if (isset($it->user_from->employers->logo)) | |
134 | - <img src="{{ asset(Storage::url($it->user_from->employers->logo)) }}" alt=""> | |
135 | - @else | |
136 | - <img src="{{ asset('images/default_man.jpg') }}" alt=""> | |
137 | - @endif | |
141 | + <img src="{{ asset('images/default_man.jpg') }}" alt=""> | |
138 | 142 | @endif |
139 | 143 | @endif |
140 | 144 | </div> |
resources/views/workers/messages.blade.php
... | ... | @@ -55,35 +55,44 @@ |
55 | 55 | </svg> |
56 | 56 | <!-- Комментарий: обновление структуры вывода картинок, все корректное --> |
57 | 57 | @if ($type_message == 'input') |
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=""> | |
58 | + @if (isset($it->user_from->is_worker)) | |
59 | + @if ($it->user_from->is_worker) | |
60 | + @if (isset($it->user_from->workers[0]->photo)) | |
61 | + <img src="{{ asset(Storage::url($it->user_to->workers[0]->photo)) }}" alt=""> | |
62 | + @else | |
63 | + <img src="{{ asset('images/default_man.jpg') }}" alt=""> | |
64 | + @endif | |
61 | 65 | @else |
62 | - <img src="{{ asset('images/default_man.jpg') }}" alt=""> | |
66 | + @if (isset($it->user_from->employers[0]->logo)) | |
67 | + <img src="{{ asset(Storage::url($it->user_from->employers[0]->logo)) }}" alt=""> | |
68 | + @else | |
69 | + <img src=" asset('images/default_man.jpg') }}" alt=""> | |
70 | + @endif | |
63 | 71 | @endif |
64 | 72 | @else |
65 | - @if (isset($it->user_from->employers[0]->logo)) | |
66 | - <img src="{{ asset(Storage::url($it->user_from->employers[0]->logo)) }}" alt=""> | |
67 | - @else | |
68 | - <img src=" asset('images/default_man.jpg') }}" alt=""> | |
69 | - @endif | |
73 | + <img src=" asset('images/default_man.jpg') }}" alt=""> | |
70 | 74 | @endif |
71 | 75 | @endif |
72 | 76 | |
73 | 77 | <!-- Обновление исходящих сообщений - фотографии компании и работника --> |
78 | + <!-- коммит 2 --> | |
74 | 79 | @if ($type_message == 'output') |
75 | - @if ($it->user_from->is_worker) | |
76 | - @if (isset($it->user_from->workers[0]->photo)) | |
77 | - <img src="{{ asset(Storage::url($it->user_from->workers[0]->photo)) }}" alt=""> | |
80 | + @if (isset($it->user_from->is_worker)) | |
81 | + @if ($it->user_from->is_worker) | |
82 | + @if (isset($it->user_from->workers[0]->photo)) | |
83 | + <img src="{{ asset(Storage::url($it->user_from->workers[0]->photo)) }}" alt=""> | |
84 | + @else | |
85 | + <img src="{{ asset('images/default_man.jpg') }}" alt=""> | |
86 | + @endif | |
78 | 87 | @else |
79 | - <img src="{{ asset('images/default_man.jpg') }}" alt=""> | |
88 | + @if (isset($it->user_from->employers->logo)) | |
89 | + <img src="{{ asset(Storage::url($it->user_from->employers->logo)) }}" alt=""> | |
90 | + @else | |
91 | + <img src="{{ asset('images/default_man.jpg') }}" alt=""> | |
92 | + @endif | |
80 | 93 | @endif |
81 | 94 | @else |
82 | - @if (isset($it->user_from->employers->logo)) | |
83 | - <img src="{{ asset(Storage::url($it->user_from->employers->logo)) }}" alt=""> | |
84 | - @else | |
85 | - <img src="{{ asset('images/default_man.jpg') }}" alt=""> | |
86 | - @endif | |
95 | + <img src="{{ asset('images/default_man.jpg') }}" alt=""> | |
87 | 96 | @endif |
88 | 97 | @endif |
89 | 98 | </div> |