This commit is contained in:
sayliraut
2024-06-17 17:00:14 +05:30
parent 66b1eb640d
commit af3fd16e33

View File

@@ -4,6 +4,15 @@
@php
$currentPage = 'restraunt';
@endphp
<style>
.description-cell {
max-width: 200px;
/* Adjust the width as necessary */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
<div class="layout-px-spacing">
<div class="middle-content container-xxl p-0">
@@ -48,17 +57,18 @@
<tr class="w-100">
<td>{{ $restaurantItem->name }}</td>
<td>{{ $restaurantItem->restaurant_id }}</td>
<td>{{ $restaurantItem->bio }}</td>
<td class="description-cell">{{ $restaurantItem->bio }}</td>
@foreach (['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'] as $day)
<td>
{{ isset($operating_hours[$day]) ? $operating_hours[$day]->start_time . ' - ' . $operating_hours[$day]->end_time : 'N/A' }}
</td>
@endforeach
<td> <div id="imageInputPreviewNormal" style="width: 30%;">
<img src="{{ $restaurantItem->image }}" alt="Image Preview"
style="width: 40%;">
</div>
</td>
<td>
<div id="imageInputPreviewNormal" style="width: 30%;">
<img src="{{ $restaurantItem->image }}" alt="Image Preview"
style="width: 40%;">
</div>
</td>
</tr>
</table>
</div>
@@ -77,15 +87,15 @@
<td>Longitude :</td>
</tr>
<tr class="w-100">
<td>{!! $restaurantItem->description !!}</td>
<td class="description-cell">{!! $restaurantItem->description !!}</td>
<td>{{ $restaurantItem->is_active == 1 ? 'Active' : 'Expired' }}
</td>
<td>{{ $restaurantItem->address }}</td>
<td>{{ $restaurantItem->try_on_1 }}</td>
<td>{{ $restaurantItem->try_on_2 }}</td>
<td>{{ $restaurantItem->try_on_3 }}</td>
<td>{{ $restaurantItem->try_on_4 }}</td>
<td>{{ $restaurantItem->exclusion }}</td>
<td class="description-cell">{{ $restaurantItem->address }}</td>
<td class="description-cell">{{ $restaurantItem->try_on_1 }}</td>
<td class="description-cell">{{ $restaurantItem->try_on_2 }}</td>
<td class="description-cell">{{ $restaurantItem->try_on_3 }}</td>
<td class="description-cell">{{ $restaurantItem->try_on_4 }}</td>
<td class="description-cell">{{ $restaurantItem->exclusion }}</td>
<td>{{ $restaurantItem->latitude }}</td>
<td>{{ $restaurantItem->longtitude }}</td>
</tr>
@@ -105,27 +115,26 @@
@endsection
@section('section_script')
<script>
<script>
const imageInputEdit = document.getElementById('imageInputNormal');
const imagePreviewEdit = document.getElementById('imageInputPreviewNormal');
const imageInputEdit = document.getElementById('imageInputNormal');
const imagePreviewEdit = document.getElementById('imageInputPreviewNormal');
imageInputEdit.addEventListener('change', function() {
const file = this.files[0];
if (file) {
const reader = new FileReader();
reader.onload = function(event) {
const img = document.createElement('img');
img.src = event.target.result;
img.style.maxWidth = '200px';
img.style.maxHeight = '200px';
imageInputEdit.addEventListener('change', function() {
const file = this.files[0];
if (file) {
const reader = new FileReader();
reader.onload = function(event) {
const img = document.createElement('img');
img.src = event.target.result;
img.style.maxWidth = '200px';
img.style.maxHeight = '200px';
imagePreviewEdit.innerHTML = '';
imagePreviewEdit.appendChild(img);
};
reader.readAsDataURL(file);
} else {
imagePreviewEdit.innerHTML = '';
imagePreviewEdit.appendChild(img);
};
reader.readAsDataURL(file);
} else {
imagePreviewEdit.innerHTML = '';
}
});
</script>
}
});
</script>
@endsection