multiple bug fixes including sender ID filtering
This commit is contained in:
@@ -24,11 +24,8 @@ class DashboardController extends Controller
|
||||
$recent_clients = Models\Client::with('auth_user_info')->orderBy('id', 'DESC')->take(5)->get();
|
||||
// $upcoming_birthdays = Models\StaffMember::whereDate('dob', '>=', $currentdate)->orderBy('dob', 'ASC')->take(5)->get();
|
||||
$upcoming_birthdays = Models\StaffMember::whereRaw("(month(dob) >= month(curdate())) AND day(dob) >= day(curdate())")->orderBy('dob', 'ASC')->take(5)->get();
|
||||
$upcoming_hodidays = Models\NationalHoliday::whereRaw("(month(event_date) >= month(curdate()))")->whereRaw("(year(event_date) >= year(curdate()))")->orderBy('event_date', 'ASC')->take(15)->get();
|
||||
|
||||
// dd($upcoming_hodidays);
|
||||
// $recent_clients = Models\Client::orderBy('id', 'DESC')->take(5)->get();
|
||||
// dd($recent_clients);
|
||||
$upcoming_hodidays = Models\NationalHoliday::whereRaw("(month(event_date) >= month(curdate()))")->whereRaw("(year(event_date) >= year(curdate()))")->whereRaw("(date(event_date) >= curdate())")->orderBy('event_date', 'ASC')->take(15)->get();
|
||||
$main_quote = Models\DailyQuote::where('status', 'active')->first();
|
||||
$data = [
|
||||
'page_title' => 'Dashboard',
|
||||
'sms' => $sms_clients,
|
||||
@@ -36,6 +33,7 @@ class DashboardController extends Controller
|
||||
'voice' => $voice_clients,
|
||||
'airtime' => $airtime_clients,
|
||||
'total' => $total_clients,
|
||||
'main_quote' => $main_quote,
|
||||
'recent_clients' => $recent_clients,
|
||||
'user_activities' => $user_activities,
|
||||
'expiring_contracts' => $expiring_contracts,
|
||||
@@ -67,7 +65,6 @@ class DashboardController extends Controller
|
||||
|
||||
$daily_quotes = DB::table('daily_quotes')
|
||||
->where('id', '>=', DB::raw('(SELECT FLOOR(RAND() * (SELECT MAX(id) FROM daily_quotes)))'))
|
||||
// ->limit(5)
|
||||
->first();
|
||||
return response()->json($daily_quotes);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user