Commit b504585f88d550163814844547192e5dac4d7b80
1 parent
46bf23a74a
Exists in
master
and in
1 other branch
Коммит - баг с удаленными пользователями
Showing 2 changed files with 43 additions and 29 deletions Side-by-side Diff
resources/views/employers/messages.blade.php
... | ... | @@ -102,9 +102,8 @@ |
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') |
106 | + @if (isset($it->user_from->is_worker)) | |
108 | 107 | @if ($it->user_from->is_worker) |
109 | 108 | @if (isset($it->user_from->workers[0]->photo)) |
110 | 109 | <img src="{{ asset(Storage::url($it->user_from->workers[0]->photo)) }}" alt=""> |
... | ... | @@ -118,21 +117,28 @@ |
118 | 117 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
119 | 118 | @endif |
120 | 119 | @endif |
120 | + @else | |
121 | + <img src="{{ asset('images/default_man.jpg') }}" alt=""> | |
122 | + @endif | |
121 | 123 | @endif |
122 | 124 | |
123 | 125 | @if ($type_message == 'output') |
124 | - @if ($it->user_from->is_worker) | |
125 | - @if (isset($it->user_from->workers[0]->photo)) | |
126 | - <img src="{{ asset(Storage::url($it->user_from->workers[0]->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 | |
127 | 133 | @else |
128 | - <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 | |
129 | 139 | @endif |
130 | 140 | @else |
131 | - @if (isset($it->user_from->employers[0]->logo)) | |
132 | - <img src="{{ asset(Storage::url($it->user_from->employers[0]->logo)) }}" alt=""> | |
133 | - @else | |
134 | - <img src="{{ asset('images/default_man.jpg') }}" alt=""> | |
135 | - @endif | |
141 | + <img src="{{ asset('images/default_man.jpg') }}" alt=""> | |
136 | 142 | @endif |
137 | 143 | @endif |
138 | 144 | </div> |
resources/views/workers/messages.blade.php
... | ... | @@ -55,36 +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 | <!-- Обновление исходящих сообщений - фотографии компании и работника --> |
74 | 78 | <!-- коммит 2 --> |
75 | 79 | @if ($type_message == 'output') |
76 | - @if ($it->user_from->is_worker) | |
77 | - @if (isset($it->user_from->workers[0]->photo)) | |
78 | - <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 | |
79 | 87 | @else |
80 | - <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 | |
81 | 93 | @endif |
82 | 94 | @else |
83 | - @if (isset($it->user_from->employers->logo)) | |
84 | - <img src="{{ asset(Storage::url($it->user_from->employers->logo)) }}" alt=""> | |
85 | - @else | |
86 | - <img src="{{ asset('images/default_man.jpg') }}" alt=""> | |
87 | - @endif | |
95 | + <img src="{{ asset('images/default_man.jpg') }}" alt=""> | |
88 | 96 | @endif |
89 | 97 | @endif |
90 | 98 | </div> |