Commit 2fa52189 by Alfiro Pratama

Fix kondisi proposalUrl

parent cd38bd41
...@@ -178,7 +178,7 @@ class ProposalController extends Controller ...@@ -178,7 +178,7 @@ class ProposalController extends Controller
<tr> <tr>
<th>Video Produk</th> <th>Video Produk</th>
<td>'; <td>';
if ($record->url) { if ($record->url && $record->url !== '-') {
$aksi .= '<button id="preview-video' . $record->id . '" class="btn btn-success btn-sm" data-video="' . $record->url . '"> $aksi .= '<button id="preview-video' . $record->id . '" class="btn btn-success btn-sm" data-video="' . $record->url . '">
<i class="far fa-eye"></i> Lihat Video <i class="far fa-eye"></i> Lihat Video
</button>'; </button>';
......
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
<tr> <tr>
<th>Video Produk</th> <th>Video Produk</th>
<td> <td>
@if($item->upload_dokumen) @if($item->rProposalUrl && $item->rProposalUrl->url && $item->rProposalUrl->url !== '-')
{{-- @php {{-- @php
@dd($item->rProposalUrl->url); @dd($item->rProposalUrl->url);
@endphp --}} @endphp --}}
......
...@@ -62,10 +62,18 @@ ...@@ -62,10 +62,18 @@
<div class="col-sm-10"> <div class="col-sm-10">
<ul> <ul>
@foreach ($proposal->proposalUrl as $item) @foreach ($proposal->proposalUrl as $item)
@if($item->url && $item->url !== '-')
<li> <li>
<a class="btn btn-link" href="{{ $item->url }}">{{ $item->url_name }}</a> <a class="btn btn-link" href="{{ $item->url }}">{{ $item->url_name }}</a>
<p>{{ $item->deskripsi }}</p> <p>{{ $item->deskripsi }}</p>
</li> </li>
@else
<li>
<div class="alert alert-danger mb-0" role="alert">
<strong>Informasi!</strong> File tidak ditemukan.
</div>
</li>
@endif
@endforeach @endforeach
</ul> </ul>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment