|
|
@@ -227,6 +227,7 @@ class DashboardService
|
|
|
|
|
|
'provider_media.path as provider_photo_path',
|
|
|
)
|
|
|
+ ->orderBy('distance_km', 'asc')
|
|
|
->get();
|
|
|
|
|
|
$providersClose->each(function ($item) {
|
|
|
@@ -337,6 +338,13 @@ class DashboardService
|
|
|
])
|
|
|
->get();
|
|
|
|
|
|
+ $custom_schedules_with_no_proposals = Schedule::where('client_id', $cliente->id)
|
|
|
+ ->where('schedule_type', 'custom')
|
|
|
+ ->where('status', 'pending')
|
|
|
+ ->whereDate('date', '>=', now()->toDateString())
|
|
|
+ ->doesntHave('proposals')
|
|
|
+ ->get();
|
|
|
+
|
|
|
$schedulesProposals->each(function ($item) {
|
|
|
$item->provider_photo = $item->provider_photo_path
|
|
|
? Storage::temporaryUrl($item->provider_photo_path, now()->addMinutes(60))
|
|
|
@@ -428,6 +436,7 @@ class DashboardService
|
|
|
'providersClose' => $providersClose,
|
|
|
'todaySchedules' => $todaySchedules,
|
|
|
'schedulesProposals' => $schedulesProposals,
|
|
|
+ 'customSchedulesNoProposals' => $custom_schedules_with_no_proposals,
|
|
|
'notifications' => $notifications,
|
|
|
'has_payment_methods' => $hasPaymentMethods,
|
|
|
];
|