worked on the new onboarding steps

This commit is contained in:
Kwesi Banson
2024-01-31 20:40:33 +00:00
parent bc97f69748
commit 7a64019001
184 changed files with 11292 additions and 173 deletions

View File

@@ -0,0 +1,45 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models;
use Session;
use Illuminate\Support\Arr;
use App\Jobs\SendNewUssdClientEmail;
use App\Jobs\SendUssdClientActiveEmail;
use App\Jobs\SendNewNotesEmailAlert;
use App\Http\Requests;
use Carbon\Carbon;
class ReportsController extends Controller
{
public function getRecentClients(){
$data = [
'page_title' => 'Recent Clients',
'current_user' => session('current_user')
];
return view('reports.recent_clients', $data);
}
public function getRecentClientsJson(){
// $clients = Models\Client::where()->get();
/*
$clients = \DB::table('clients')
->whereRaw('week(created_at) = WEEK(NOW())')
->with('auth_user_info')
->get();
*/
$clients = \DB::table('clients')
->join('auth_users AS aumngr', 'aumngr.id', '=', 'clients.auth_user_id')
->select('clients.id','clients.name', 'clients.status', 'clients.country', 'aumngr.name As accountMgr', 'clients.created_at')
->whereRaw("week(clients.created_at) = WEEK(NOW())")
->orderBy('name', 'ASC')->paginate(50);
return response()->json($clients);
}
}