bug fixes, mno,client contract renewals, scheduling

This commit is contained in:
Kwesi Banson
2024-06-10 21:40:28 +00:00
parent 1a4a3acfda
commit 464b544587
110 changed files with 531 additions and 127 deletions

View File

@@ -0,0 +1,46 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Http\Controllers\ClientContractRenewalAlertsController;
class ProcessClientContractRenewalAlert extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'client_renewal:send';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Send notices on client pending contract renewals';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct(ClientContractRenewalAlertsController $client_contractRenewalReminder)
{
parent::__construct();
$this->client_contractRenewalReminder = $client_contractRenewalReminder;
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->client_contractRenewalReminder->getClientDetails();
\Log::info('SendClientContractRenewalReminders command completed...');
}
}

View File

@@ -0,0 +1,46 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Http\Controllers\ContractRenewalReminderController;
class SendContractRenewalReminders extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'renewal:send';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Send notices on pending contract renewals';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct(ContractRenewalReminderController $contractRenewalReminder)
{
parent::__construct();
$this->contractRenewalReminder = $contractRenewalReminder;
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->contractRenewalReminder->getMnos();
\Log::info('SendContractRenewalReminders command completed...');
}
}

View File

@@ -13,7 +13,8 @@ class Kernel extends ConsoleKernel
* @var array
*/
protected $commands = [
//
Commands\SendContractRenewalReminders::class
Commands\ProcessClientContractRenewalAlert::class
];
/**
@@ -26,6 +27,8 @@ class Kernel extends ConsoleKernel
{
// $schedule->command('inspire')
// ->hourly();
$schedule->command('renewal:send')->weekdays()->at('13:00');
$schedule->command('client_renewal:send')->weekdays()->at('14:00');
}
/**