after a series of bug fixes plus Non MNO logic for Sender IDs, unfinished leave management and holiday modules
This commit is contained in:
@@ -6,9 +6,8 @@ use Illuminate\Http\Request;
|
||||
|
||||
use App\Models;
|
||||
use Spatie\Activitylog\Models\Activity;
|
||||
// use Illuminate\Contracts\Mail\Mailer;
|
||||
|
||||
|
||||
use Illuminate\Contracts\Mail\Mailer;
|
||||
use App\Jobs\SendTestEmail;
|
||||
|
||||
class UtilityController extends Controller
|
||||
{
|
||||
@@ -17,7 +16,8 @@ class UtilityController extends Controller
|
||||
}
|
||||
public function EmailTest(Mailer $mailer)
|
||||
{
|
||||
|
||||
dispatch(new SendTestEmail());
|
||||
/*
|
||||
$emails = ['kwesi@click-mobile.com', 'kwesi_banson@hotmail.com'];
|
||||
|
||||
$data = [
|
||||
@@ -30,6 +30,20 @@ class UtilityController extends Controller
|
||||
$message->from('erp@click-mobile.com', 'Click Mobile ERP');
|
||||
$message->to($emails)->subject('New Notes');
|
||||
});
|
||||
*/
|
||||
/*
|
||||
$emails = [
|
||||
'kwesi@click-mobile.com',
|
||||
'kwesi_banson@hotmail.com'
|
||||
];
|
||||
$data = [];
|
||||
$top = $mailer->send('emails.test', $data, function ($message) use ($data, $emails) {
|
||||
$message->from('support@click-mobile.com', 'Click Mobile ERP');
|
||||
$message->to($emails)->subject('Short Code Invoices');
|
||||
});
|
||||
|
||||
dd($top);
|
||||
*/
|
||||
}
|
||||
/**
|
||||
* maptest function to display the map view.
|
||||
@@ -37,7 +51,6 @@ class UtilityController extends Controller
|
||||
* @return Illuminate\View\View
|
||||
*/
|
||||
public function maptest(){
|
||||
|
||||
return view('utility.map');
|
||||
}
|
||||
|
||||
@@ -145,5 +158,71 @@ class UtilityController extends Controller
|
||||
dump($activity_up->subject); //returns the instance of NewsItem that was created
|
||||
dump($activity_up->changes);
|
||||
}
|
||||
|
||||
public function loadShortCodes(){
|
||||
$short_codes_file = public_path('misc/client_short_codes.csv');
|
||||
$codes_arr = file($short_codes_file);
|
||||
|
||||
dump($codes_arr);
|
||||
// "Friendly Name"
|
||||
// 1 => "Shortcode"
|
||||
// 2 => "Network"
|
||||
// 3 => "Client"
|
||||
// 4 => "Status"
|
||||
// 0 => "Nexmo"
|
||||
// 1 => "40520"
|
||||
// 2 => "Safaricom"
|
||||
// 3 => "Nexmo"
|
||||
// 4 => "LIVE\r\n"
|
||||
|
||||
$client_arr = [];
|
||||
foreach ($codes_arr as $row) {
|
||||
$row_arr = explode(',', $row);
|
||||
$client_arr['name'] = trim($row_arr[0]);
|
||||
$client_arr['shortcode'] = trim($row_arr[1]);
|
||||
$client_arr['network'] = trim($row_arr[2]);
|
||||
$client_arr['client'] = trim($row_arr[3]);
|
||||
$client_arr['status'] = trim($row_arr[4]);
|
||||
|
||||
dd($client_arr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getClient($name){
|
||||
|
||||
}
|
||||
public function getNetwork($name){
|
||||
|
||||
}
|
||||
public function processMnoWorldwideFile(){
|
||||
|
||||
|
||||
$file = public_path('helper_documents/mcc_mnc_table.json');
|
||||
|
||||
$jsonData = file_get_contents($file);
|
||||
|
||||
// Decode the JSON string into an associative array
|
||||
$dataArray = json_decode($jsonData, true);
|
||||
|
||||
if (json_last_error() === JSON_ERROR_NONE) {
|
||||
$counter = 0;
|
||||
foreach ($dataArray as $key => $value) {
|
||||
$result = Models\Worldwidemno::create($value);
|
||||
$counter++;
|
||||
}
|
||||
dump($counter . " Records found and inserted");
|
||||
} else {
|
||||
dump('Error decoding JSON: ' . json_last_error_msg());
|
||||
}
|
||||
|
||||
|
||||
|
||||
// dd($file);
|
||||
// $decoded = json_decode($file, true);
|
||||
// dd($decoded);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
// https://www.tokyvideo.com/video/sheena-the-queen-of-the-jungle-1984-movie-with-tanya-roberts-ted-wass-donovan-scott
|
||||
|
||||
Reference in New Issue
Block a user