Merge pull request #220 from WDI-Ideas/sayli

Sayli
This commit is contained in:
Sayli Raut
2024-07-01 15:02:35 +05:30
committed by GitHub
7 changed files with 48 additions and 27 deletions

View File

@@ -15,6 +15,7 @@ class RestaurantExport implements FromCollection, WithHeadings
public function collection()
{
return ManageRestaurant::select(
'id',
'name',
'description',
'phone_number',
@@ -36,6 +37,7 @@ class RestaurantExport implements FromCollection, WithHeadings
public function headings(): array
{
return [
'Id',
'Restaurant Name',
'Description',
'Phone Number',

View File

@@ -27,6 +27,7 @@ class RestaurantExportSelected implements FromCollection, WithHeadings
$selected_restaurant = ManageRestaurant::whereIn('id', $selectedCareIds)
->orderBy('id', 'Desc')
->select(
'id',
'name',
'description',
'phone_number',
@@ -50,6 +51,7 @@ class RestaurantExportSelected implements FromCollection, WithHeadings
public function headings(): array
{
return [
'Id',
'Restaurant Name',
'Description',
'Phone Number',

View File

@@ -13,11 +13,12 @@ class customer_export implements FromCollection , WithHeadings
/**
* @return \Illuminate\Support\Collection
*/
public function collection(){
return IamPrincipal::where('principal_type_xid',3)
->select('first_name',
->select('id',
'first_name',
'last_name',
'email_address',
'date_of_birth',
@@ -27,6 +28,7 @@ class customer_export implements FromCollection , WithHeadings
->get()
->map(function ($customer) {
return [
'id' => $customer->id,
'first_name' => $customer->first_name,
'last_name' => $customer->last_name,
'email_address' => $customer->email_address,
@@ -35,7 +37,7 @@ class customer_export implements FromCollection , WithHeadings
'phone_number' => $customer->phone_number,
];
});
}
@@ -43,18 +45,19 @@ class customer_export implements FromCollection , WithHeadings
public function headings(): array
{
return [
'User Id',
'first_name',
'last_name',
'email_address',
'date_of_birth',
'email_address',
'date_of_birth',
'state_name',
'phone_number'
'phone_number'
];
}
}

View File

@@ -29,6 +29,7 @@ class customer_export_selected implements FromCollection, WithHeadings
->with('state:id,name') // Eager load the state relationship
->orderBy('id', 'desc')
->select(
'id',
'first_name',
'last_name',
'email_address',
@@ -39,6 +40,7 @@ class customer_export_selected implements FromCollection, WithHeadings
->get()
->map(function ($customer) {
return [
'id' => $customer->id,
'first_name' => $customer->first_name,
'last_name' => $customer->last_name,
'email_address' => $customer->email_address,
@@ -57,6 +59,7 @@ class customer_export_selected implements FromCollection, WithHeadings
public function headings(): array
{
return [
'User Id',
'First Name',
'Last Name',
'Email Address',

View File

@@ -248,7 +248,7 @@ class ManageRestrauntController extends Controller
return view('Admin.pages.manage_restaurants.view_restaurant', compact('restaurantItem', 'operating_hours'));
} catch (Exception $e) {
Log::error("view Voucher Load Failed" . $e->getMessage());
Log::error("view Voucher Load Failed" . $e->getMessage()) ;
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}

View File

@@ -5,12 +5,23 @@
$currentPage = 'restraunt';
@endphp
<style>
.description-cell {
max-width: 200px;
/* Adjust the width as necessary */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
.text-scrollable {
max-height: 100px;
/* Adjust based on your layout */
overflow-y: auto;
word-wrap: break-word;
white-space: pre-wrap;
/* Preserve whitespace and wrap text */
}
table {
width: 100%;
table-layout: auto;
}
td {
padding: 10px;
vertical-align: top;
}
</style>
@@ -52,12 +63,11 @@
<td>Saturday :</td>
<td>Sunday :</td>
<td>Image :</td>
</tr>
<tr class="w-100">
<td>{{ $restaurantItem->name }}</td>
<td>{{ $restaurantItem->restaurant_id }}</td>
<td class="description-cell">{{ $restaurantItem->bio }}</td>
<td class="text-scrollable">{{ $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' }}
@@ -75,7 +85,7 @@
<div class="col-md-6 mb-10">
<table>
<tr class="title">
<td>Description :</td>
{{-- <td>Description :</td> --}}
<td>Status :</td>
<td>Address :</td>
<td>Try on 1 :</td>
@@ -87,15 +97,15 @@
<td>Longitude :</td>
</tr>
<tr class="w-100">
<td class="description-cell">{!! $restaurantItem->description !!}</td>
{{-- <td class="text-scrollable">{!! $restaurantItem->description !!}</td> --}}
<td>{{ $restaurantItem->is_active == 1 ? 'Active' : 'Expired' }}
</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->address }}</td>
<td class="text-scrollable">{{ $restaurantItem->try_on_1 }}</td>
<td class="text-scrollable">{{ $restaurantItem->try_on_2 }}</td>
<td class="text-scrollable">{{ $restaurantItem->try_on_3 }}</td>
<td class="text-scrollable">{{ $restaurantItem->try_on_4 }}</td>
<td>{{ $restaurantItem->exclusion }}</td>
<td>{{ $restaurantItem->latitude }}</td>
<td>{{ $restaurantItem->longtitude }}</td>
</tr>
@@ -110,6 +120,7 @@
</div>
</div>
</div>
@endsection

View File

@@ -63,7 +63,7 @@ $currentPage = 'manage-customer';
<tr class="w-100">
<td>{{ $customers_data->first_name }} {{ $customers_data->last_name }}</td>
<td>{{ $customers_data->id }}</td>
<td>{{ \Carbon\Carbon::parse($customers_data->date_of_birth)->format('d/m/Y') }}</td>
<td>{{ \Carbon\Carbon::parse($customers_data->date_of_birth)->format('m/d/Y') }}</td>
<td>{{ $customers_data->phone_number }}</td>
</tr>
</table>