bug fixes on activity log and array_key_first alt using reset

This commit is contained in:
Kwesi Banson
2024-02-16 19:46:38 +00:00
parent d4ab479e0c
commit 7b3a29ca53
25 changed files with 579 additions and 160 deletions

BIN
1_KMA.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

View File

@@ -82,14 +82,14 @@ class ClientsController extends Controller
public function getClientJsonRawJs(Request $request){ public function getClientJsonRawJs(Request $request){
#$client_arr = new Models\Client; #$client_arr = new Models\Client;
#$client_arr = $client_arr->with('auth_user_info','country_info', 'created_by_info', 'modified_by_info')->orderBy('name', 'ASC')->paginate(20); #$client_arr = $client_arr->with('auth_user_info','country_info', 'created_by_info', 'modified_by_info')->orderBy('name', 'ASC')->paginate(20);
//$this->log_query();
$client_arr = \DB::table('clients') $client_arr = \DB::table('clients')
->join('auth_users AS aumngr', 'aumngr.id', '=', 'clients.auth_user_id') ->join('auth_users AS aumngr', 'aumngr.id', '=', 'clients.auth_user_id')
->join('auth_users AS aumodify', 'aumodify.id', '=', 'clients.last_modified_by') ->join('auth_users AS aumodify', 'aumodify.id', '=', 'clients.last_modified_by')
->select('clients.id', 'clients.name', 'clients.status', 'clients.country', 'aumngr.name As accountMgr', 'aumodify.name AS modifiedBy') ->select('clients.id', 'clients.name', 'clients.status', 'clients.country', 'aumngr.name As accountMgr', 'aumodify.name AS modifiedBy')
->paginate(10); ->paginate(10);
if($request->has('keyword')){ // != '' if($request->has('keyword')){
$keyword = $request->keyword; $keyword = $request->keyword;
$client_arr = \DB::table('clients') $client_arr = \DB::table('clients')
->join('auth_users AS aumngr', 'aumngr.id', '=', 'clients.auth_user_id') ->join('auth_users AS aumngr', 'aumngr.id', '=', 'clients.auth_user_id')
@@ -156,6 +156,7 @@ class ClientsController extends Controller
'industry' => 'required', 'industry' => 'required',
'auth_user_id' => 'required', // account manager 'auth_user_id' => 'required', // account manager
]); ]);
$onboarding_stages = Models\ClientOnboardingMainStage::orderBy('stage_id')->get(); $onboarding_stages = Models\ClientOnboardingMainStage::orderBy('stage_id')->get();
// dd($onboarding_stages); // dd($onboarding_stages);
$client_current_stages = []; $client_current_stages = [];
@@ -219,7 +220,8 @@ class ClientsController extends Controller
]; ];
$clients_onboarding_progress = Models\ClientOnboardingProgress::create($progress_arr); $clients_onboarding_progress = Models\ClientOnboardingProgress::create($progress_arr);
} }
if (in_array('3', $request->services)) {
if (in_array('USSD', $request->services)) {
\Log::info('ussd client detected'); \Log::info('ussd client detected');
$ussd_client_payment_arr = [ $ussd_client_payment_arr = [
'client_id' => $result->id, 'client_id' => $result->id,
@@ -263,7 +265,7 @@ class ClientsController extends Controller
//dd($notes_arr); //dd($notes_arr);
$result = Models\ClientNote::create($notes_arr); $result = Models\ClientNote::create($notes_arr);
// dd($result);
$notes = Models\ClientNote::with('client_info', 'created_by_info')->find($result->id); $notes = Models\ClientNote::with('client_info', 'created_by_info')->find($result->id);
//todo : send emails //todo : send emails
dispatch(new SendNewNotesEmailAlert($notes)); dispatch(new SendNewNotesEmailAlert($notes));
@@ -606,6 +608,8 @@ class ClientsController extends Controller
} }
sort($networks_raw); sort($networks_raw);
$data = [ $data = [
'page_title' => 'Client Profile', 'page_title' => 'Client Profile',
'showclient' => $showclient, 'showclient' => $showclient,
@@ -752,26 +756,30 @@ class ClientsController extends Controller
} }
public function getShortCodes(){ public function getShortCodes($type){
//$auth_users = Models\SystemUser::pluck('name', 'id'); //$auth_users = Models\SystemUser::pluck('name', 'id');
//todo : separate the short codes into individual pages
$voice_codes = Models\ClientShortCode::with('client_info', 'client_info', 'update_info')->where('code_type', 'voice')->get(); switch ($type) {
$sms_codes = Models\ClientShortCode::with('client_info','client_info', 'update_info')->where('code_type', 'sms')->get(); case 'sms':
$ussd_codes = Models\ClientShortCode::with('client_info', 'client_info', 'update_info')->where('code_type', 'ussd')->get(); $codes_data = Models\ClientShortCode::with('client_info','client_info', 'update_info')->where('code_type', 'sms')->get();
//dd($voice_codes); break;
case 'ussd':
// dump($sms_codes[0]->last_updaed_by); $codes_data = Models\ClientShortCode::with('client_info', 'client_info', 'update_info')->where('code_type', 'ussd')->get();
// dd($auth_users[$sms_codes[0]->last_updaed_by]); break;
case 'voice':
$codes_data = Models\ClientShortCode::with('client_info', 'client_info', 'update_info')->where('code_type', 'voice')->get();
break;
default:
// code... show 404
break;
}
$codes = Models\ClientShortCode::with('update_info')->get(); $codes = Models\ClientShortCode::with('update_info')->get();
$data = [ $data = [
'page_title' => 'Client Short Codes', 'page_title' => 'Client Short Codes',
'voice_codes' => $voice_codes, 'codes_data' => $codes_data,
'sms_codes' => $sms_codes, 'type' => $type
'ussd_codes' => $ussd_codes,
]; ];
// dd($data);
return view('client.shortcodes', $data); return view('client.shortcodes', $data);
} }
/** /**
@@ -783,7 +791,6 @@ class ClientsController extends Controller
public function edit($id) public function edit($id)
{ {
$client = Models\Client::find($id); $client = Models\Client::find($id);
$service_type = Models\Service::orderBy('name', 'ASC')->pluck('name', 'name'); $service_type = Models\Service::orderBy('name', 'ASC')->pluck('name', 'name');
$countries = Models\Country::orderBy('en_short_name', 'ASC')->pluck('en_short_name','en_short_name'); $countries = Models\Country::orderBy('en_short_name', 'ASC')->pluck('en_short_name','en_short_name');
@@ -977,7 +984,10 @@ class ClientsController extends Controller
$pending_stage = Arr::where($onboarding_progress_stage, function ($value, $key) { $pending_stage = Arr::where($onboarding_progress_stage, function ($value, $key) {
return $value == "PENDING"; return $value == "PENDING";
}); });
$pending_stage = array_key_first($pending_stage);
#$pending_stage = array_key_first($pending_stage);
reset($pending_stage);
$pending_stage = key($pending_stage);
if ($pending_stage == true) { if ($pending_stage == true) {
//Pending Exist //Pending Exist
@@ -1215,10 +1225,12 @@ class ClientsController extends Controller
public function showOnboardingForm($client_id){ public function showOnboardingForm($client_id){
$client = Models\Client::findOrFail($client_id); $client = Models\Client::findOrFail($client_id);
$onboarding_stages = Models\ClientOnboardingProgress::where('client_id', $client_id)->orderBy('stage_id')->get();
//dd($onboarding_stages);
$data = [ $data = [
'page_title' => 'Clients | Onboarding Checklist', 'page_title' => 'Clients | Onboarding Checklist',
'client' => $client 'client' => $client,
'onboarding_stages' => $onboarding_stages
]; ];
return view('client.onboarding_show', $data); return view('client.onboarding_show', $data);
} }

View File

@@ -47,8 +47,10 @@ class Controller extends BaseController
return $response; return $response;
} }
public function logUsersActivity($type, $content){ public function logUsersActivity($type, $content, $user_id = null){
if($user_id == null){
$user_id = session('current_user.id'); $user_id = session('current_user.id');
}
$activity_arr = [ $activity_arr = [
'type' => $type, 'type' => $type,
'content' => $content, 'content' => $content,

View File

@@ -0,0 +1,17 @@
<?php
namespace App\Http\Controllers\Finance;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class DashboardController extends Controller
{
public function index(){
$data = [
'page_title' => 'Finance | Dashboard'
];
return view('finance.dashboard', $data);
}
}

View File

@@ -12,7 +12,6 @@ class LoginController extends Controller
$data = [ $data = [
'designation' => $designation 'designation' => $designation
]; ];
return view('login.index', $data); return view('login.index', $data);
} }
@@ -35,10 +34,19 @@ class LoginController extends Controller
\Log::info($logged_in->name . ' Successfully logged in at : ' . date('Y-m-d H:i:s')); \Log::info($logged_in->name . ' Successfully logged in at : ' . date('Y-m-d H:i:s'));
$content = $logged_in->name . " Successfully Logged In"; $content = $logged_in->name . " Successfully Logged In";
$this->logUsersActivity($type = 'staff', $content); $this->logUsersActivity($type = 'staff', $content, $logged_in->id);
$this->deleteLoggedUser(); $this->deleteLoggedUser();
$this->storeLoggedUser(); $this->storeLoggedUser();
switch ($logged_in->designation_info->name) {
case 'Accounts & Finance':
return redirect(url('finance'));
break;
default:
return redirect(url('/')); return redirect(url('/'));
break;
}
} }
public function handle_logout(Request $request) { public function handle_logout(Request $request) {
@@ -51,7 +59,7 @@ class LoginController extends Controller
$request->session()->flush(); $request->session()->flush();
$request->session()->regenerate(true); $request->session()->regenerate(true);
$this->logUsersActivity($type = 'staff', $content); $this->logUsersActivity($type = 'staff', $content, $user_id);
return redirect("/"); return redirect("/");
} }

View File

@@ -0,0 +1,10 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class TestingController extends Controller
{
//
}

View File

@@ -36,7 +36,41 @@ class UtilityController extends Controller
$all_clients = Models\Client::get(); $all_clients = Models\Client::get();
$count_cl = 0; $count_cl = 0;
foreach ($all_clients as $row) { foreach ($all_clients as $row) {
$get_stage_subs_items = Models\ClientOnboardingSubItem::get();
foreach ($get_stage_subs_items as $value) {
$stage_id = ['stage_id' => $value->stage_id, 'client_id' => $row->id, 'name' => $value->name ];
$progress_arr = [
'status' => 'PENDING'
];
$clients_onboarding_progress = Models\ClientOnboardingProgress::updateOrCreate($stage_id, $progress_arr);
}
$count_cl++;
}
dump($count_cl);
}
function massOnboardingProgress($client_id){
//todo : update
/*
-- client_onboarding_sub_items -- this holds all sub items
-- client_onboarding_progress -- update to completed
-- in the clients table
-- onboarding_progress_stage == update to complete,
-- progress_indicator to complete,
-- progress_indicator_score to 100
*/
$get_stage_subs_items = Models\ClientOnboardingSubItem::get();
foreach ($get_stage_subs_items as $value) {
$progress_arr = [
'stage_id' => $value->stage_id,
'client_id' => $client_id,
'name' => $value->name,
'status' => 'COMPLETE'
];
$clients_onboarding_progress = Models\ClientOnboardingProgress::create($progress_arr);
}
$all_clients = Models\Client::get();
$count_cl = 0;
foreach ($all_clients as $row) {
$get_stage_subs_items = Models\ClientOnboardingSubItem::get(); $get_stage_subs_items = Models\ClientOnboardingSubItem::get();
foreach ($get_stage_subs_items as $value) { foreach ($get_stage_subs_items as $value) {
$stage_id = ['stage_id' => $value->stage_id, 'client_id' => $row->id, 'name' => $value->name ]; $stage_id = ['stage_id' => $value->stage_id, 'client_id' => $row->id, 'name' => $value->name ];
@@ -50,3 +84,4 @@ class UtilityController extends Controller
dump($count_cl); dump($count_cl);
} }
} }
// https://www.tokyvideo.com/video/sheena-the-queen-of-the-jungle-1984-movie-with-tanya-roberts-ted-wass-donovan-scott

View File

@@ -0,0 +1,21 @@
<?php
namespace App\Http\Middleware;
use Closure;
class CheckDesignation
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
//this idea is on hold ... i will put the logic in the login handler function
return $next($request);
}
}

View File

@@ -30,6 +30,7 @@ class NewMnoNotesEmailAlerts implements ShouldQueue
*/ */
public function handle(Mailer $mailer) public function handle(Mailer $mailer)
{ {
$note = $this->note; $note = $this->note;
$emails = ['samuel@click-mobile.com']; $emails = ['samuel@click-mobile.com'];
@@ -39,6 +40,7 @@ class NewMnoNotesEmailAlerts implements ShouldQueue
'services' => $note->services, 'services' => $note->services,
'notes_body' => $note->notes_body 'notes_body' => $note->notes_body
]; ];
\Log::info($note->notes_body);
$mailer->send('emails.new-mno-notes', $data, function ($message) use ($data, $emails) { $mailer->send('emails.new-mno-notes', $data, function ($message) use ($data, $emails) {
$message->from('support@click-mobile.com', 'Click Mobile ERP'); $message->from('support@click-mobile.com', 'Click Mobile ERP');
$message->to($emails)->subject('New Notes on Mobile Operators'); $message->to($emails)->subject('New Notes on Mobile Operators');

View File

@@ -42,6 +42,10 @@ class SendNewNotesEmailAlert implements ShouldQueue
'services' => $note->services, 'services' => $note->services,
'notes_body' => $note->notes_body 'notes_body' => $note->notes_body
]; ];
\Log::info("New notes for : " . $note->client_info->name);
\Log::info("New notes triggered by : " . $note->created_by_info->name);
\Log::info($note->notes_body);
$mailer->send('emails.new-notes', $data, function ($message) use ($data, $emails) { $mailer->send('emails.new-notes', $data, function ($message) use ($data, $emails) {
$message->from('support@click-mobile.com', 'Click Mobile ERP'); $message->from('support@click-mobile.com', 'Click Mobile ERP');
$message->to($emails)->subject('New Notes'); $message->to($emails)->subject('New Notes');

20
common-fixes.md Normal file
View File

@@ -0,0 +1,20 @@
# Inability to insert emojis into DB tables
Step 1, change your database's default charset:
ALTER DATABASE database_name CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
if the db is not created yet, create it with correct encodings:
CREATE DATABASE database_name DEFAULT CHARSET = utf8mb4 DEFAULT COLLATE = utf8mb4_unicode_ci;
Step 2, set charset when creating table:
CREATE TABLE IF NOT EXISTS table_name (
...
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;
or alter table
ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE table_name MODIFY field_name TEXT CHARSET utf8mb4;
### Source
- https://stackoverflow.com/questions/39463134/how-to-store-emoji-character-in-mysql-database

View File

@@ -1,41 +0,0 @@
version: '3'
services:
app:
image: 'php:7.4-fpm'
volumes:
- .:/var/www/html
working_dir: /var/www/html
networks:
- laravel
web:
image: 'nginx:latest'
ports:
- '82:82'
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
depends_on:
- app
networks:
- laravel
mysql:
image: 'mysql:5.7'
environment:
MYSQL_DATABASE: laravel
MYSQL_ROOT_PASSWORD: secret
networks:
- laravel
redis:
image: 'redis:latest'
networks:
- laravel
worker:
build:
context: .
dockerfile: Dockerfile.worker
volumes:
- .:/var/www/html
working_dir: /var/www/html
networks:
- laravel
networks:
laravel:

View File

@@ -16,7 +16,7 @@
*/ */
$('.progressIndicatorCheckbox').on('change', function() { $('.progressIndicatorCheckbox').on('change', function() {
// From the other examples // From the other examples
console.log('finker'); // console.log('finker');
if (!this.checked) { if (!this.checked) {
var sure = confirm("Are you sure?"); var sure = confirm("Are you sure?");
this.checked = !sure; this.checked = !sure;
@@ -38,7 +38,7 @@
$('#newNotesForm').modal('show'); $('#newNotesForm').modal('show');
}); });
$('#progressIndicatorBtn').click(function(evt){ $('#progressIndicatorBtn').click(function(evt){
console.log('foo bars'); // console.log('foo bars');
evt.preventDefault(); evt.preventDefault();
$('#progressIndicatorDetailsModal').modal('show'); $('#progressIndicatorDetailsModal').modal('show');
}); });
@@ -77,7 +77,7 @@
async: false, async: false,
success: function (data){ success: function (data){
if (data.code === 1) { if (data.code === 1) {
console.log(theIDD); // console.log(theIDD);
$('#paymentIdEdit').val(theIDD); $('#paymentIdEdit').val(theIDD);
$('#financeServicesEdit').val(data.services_arr).change(); $('#financeServicesEdit').val(data.services_arr).change();
$('#invoiceNumberEdit').val(data.result.invoice_number); $('#invoiceNumberEdit').val(data.result.invoice_number);
@@ -111,7 +111,7 @@
tve.preventDefault(); tve.preventDefault();
//var theIDD = $("input[name=payment_entry_id]").val(); //var theIDD = $("input[name=payment_entry_id]").val();
var theIDD = $(this).siblings('.notesRowId').val(); var theIDD = $(this).siblings('.notesRowId').val();
console.log(theIDD); // console.log(theIDD);
$.ajax({ $.ajax({
type: "GET", type: "GET",
@@ -121,7 +121,7 @@
async: false, async: false,
success: function (data){ success: function (data){
if (data.code === 1) { if (data.code === 1) {
console.log(theIDD); // console.log(theIDD);
$('#noteIdEdit').val(theIDD); $('#noteIdEdit').val(theIDD);
$('#notesServicesEdit').val(data.services_arr).change(); $('#notesServicesEdit').val(data.services_arr).change();
$('#notesBodyEdit').val(data.result.notes_body); $('#notesBodyEdit').val(data.result.notes_body);
@@ -226,11 +226,11 @@
//console.log(error); //console.log(error);
//console.log("AJAX error in request: " + JSON.stringify(err, null, 2)); //console.log("AJAX error in request: " + JSON.stringify(err, null, 2));
var output = $.parseJSON(error.responseText); var output = $.parseJSON(error.responseText);
console.log(output.errors); // console.log(output.errors);
$('#financeNotifyArea').removeClass('hidden'); $('#financeNotifyArea').removeClass('hidden');
$('#financeNotifyArea').addClass('alert alert-danger'); $('#financeNotifyArea').addClass('alert alert-danger');
$.each(output.errors, function (key, value) { $.each(output.errors, function (key, value) {
console.log(value[0]); // console.log(value[0]);
$('#financeNotifyArea').text(value[0]); $('#financeNotifyArea').text(value[0]);
}); });
} }
@@ -276,7 +276,7 @@
$('#editNotesForm').submit(function(evt){ $('#editNotesForm').submit(function(evt){
evt.preventDefault(); evt.preventDefault();
console.log($(this).length); // console.log($(this).length);
var formData = new FormData($(this)[0]); var formData = new FormData($(this)[0]);
$.ajax({ $.ajax({
type: "POST", type: "POST",
@@ -348,15 +348,15 @@
}, },
error: function (data) { error: function (data) {
var output = $.parseJSON(data.responseText); var output = $.parseJSON(data.responseText);
console.log(output.errors); // console.log(output.errors);
$('#notifyArea').removeClass('hidden'); $('#notifyArea').removeClass('hidden');
$.each(output.errors, function (key, value) { $.each(output.errors, function (key, value) {
console.log(value[0]); // console.log(value[0]);
$('#notifyArea').text(value[0]); $('#notifyArea').text(value[0]);
}); });
}, },
fail : function(errordata){ fail : function(errordata){
console.log(errordata); // console.log(errordata);
} }
}); });
}); });

25
public/assets/js/financedashboard.js vendored Normal file
View File

@@ -0,0 +1,25 @@
$(document).ready(function(){
/*
$.ajax({
type: "get",
url: base_url + '/dashboard/get_events',
// data : formData,
processData: false,
contentType: false,
async: false,
success: function (data){
//init_calendar(data);
},
error: function(error){
var output = $.parseJSON(error.responseText);
console.log(output.errors);
$('#ipNotifyArea').removeClass('hidden');
$('#ipNotifyArea').addClass('alert alert-danger');
$.each(output.errors, function (key, value) {
//console.log(value[0]);
$('#ipNotifyArea').text(value[0]);
});
}
});
*/
});

View File

@@ -108,7 +108,8 @@
field: "accountMgr", field: "accountMgr",
sorter: "string", sorter: "string",
}, },
{ title:"Progress", /*
{ title:"Onboarding Progress Score",
field:"progress_indicator_score", field:"progress_indicator_score",
sorter:"number", sorter:"number",
hozAlign:"left", hozAlign:"left",
@@ -116,6 +117,11 @@
width:200, width:200,
editable:true editable:true
}, },
*/
{ title:"Onboarding %",
field:"progress_indicator_score",
sorter:"number",
},
{ {
title: "Status", title: "Status",
field: "status", field: "status",

View File

@@ -29,42 +29,36 @@
<div class="x_content"> <div class="x_content">
<br> <br>
<div class="row"> <div class="table-responsive">
<div class="col-md-12"> <table class="table table-striped table-bordered table-condensed" style="width: 100%;">
<h4>Agreement Stage</h4> <thead>
<div> <tr class="headings">
<div class="form-group" > <th class="column-title">Stage</th>
<div class=" {{ $errors->has('progress_indicators') ? 'has-error' : ''}}"> <th class="column-title">Activity</th>
<label class="" for="payment_mode">Checklist Items</label> <th class="column-title">Status</th>
{!! Form::select('progress_indicators[]', $progress_indicators, $current_progress_indicators, ['class' => 'form-control' , 'id' => 'progressIndicators', 'multiple' => 'true']) !!} </tr>
{!! $errors->first('progress_indicators', '<p class="help-block">:message</p>') !!} </thead>
</div>
</div>
</div>
<h4>Interconnectional (Bilateral)</h4>
<div>
</div> <tbody>
<h4>Tests Completed</h4> @if ($onboarding_stages->isEmpty())
<div> <tr>
<td class="" colspan="6">No Records found</td>
</tr>
@else
@foreach ($onboarding_stages as $row)
<tr class="even pointer">
<td class="mes-td" >{{ $row->stage_id }}</td>
<td class="mes-td">{{ $row->name }}</td>
<td class="mes-td <?php echo ($row->status == 'COMPLETED') ? 'text-success' : 'text-danger'; ?>" >
{{ $row->status }}
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div> </div>
<h4>Rate Card Sharing</h4>
<div>
</div>
<h4>Rates Uploaded</h4>
<div>
</div>
</div>
</div>
<div class="ln_solid"></div>
<div class="form-group">
</div>
</div> </div>
{{-- end of x_content --}} {{-- end of x_content --}}
</div> </div>
@@ -79,13 +73,7 @@
@section('javascript') @section('javascript')
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
$('select').select2();
// $('.typeServices').select2({}).select2('val', PRESELECTED_FRUITS);
$('.typeServices').select2({
tags : true
});
}); });
</script> </script>
@endsection @endsection

View File

@@ -10,29 +10,28 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class=""> <div class="">
<?php if ($showclient->progress_indicators !== null): ?> <?php if ($showclient->onboarding_progress_stage !== null): ?>
<ul class="to_do"> <ul class="to_do">
<?php $current_indicators = json_decode($showclient->progress_indicators, true); ?> <?php $current_indicators = json_decode($showclient->onboarding_progress_stage, true); ?>
@foreach($progress_indicators as $indirow) @foreach($current_indicators as $key => $value)
<?php <?php
$arr_check = in_array($indirow, $current_indicators); $theCheck = ($value == "COMPLETED") ? "fa-check-circle green" : "fa-question red";
$theCheck = ($arr_check == true) ? "fa-check-circle green" : "fa-question red";
?> ?>
<li> <li>
<p> <p>
<span class="fa {{ $theCheck }}"></span> <span class="fa {{ $theCheck }}"></span>
{{ $indirow }} {{ $key }}
</p> </p>
</li> </li>
@endforeach @endforeach
</ul> </ul>
<?php else: ?> <?php else: ?>
@foreach($progress_indicators as $indirow) @foreach($current_indicators as $indkey => $indival)
<ul class="to_do"> <ul class="to_do">
<li> <li>
<p> <p>
<span class="fa fa-question red"></span> <span class="fa fa-question red"></span>
{{ $indirow }} {{ $indkey }}
</p> </p>
</li> </li>
</ul> </ul>

View File

@@ -0,0 +1,45 @@
<div>
<div class="table-responsive">
<table class="table table-striped ">
<thead>
<tr class="headings">
{{-- <th>#</th> --}}
<th class="column-title">Name</th>
<th class="column-title">Code</th>
<th class="column-title">Network</th>
<th class="column-title">Toll Free</th>
<th class="column-title">Status</th>
<th class="column-title">Remarks</th>
<th class="column-title">Launch Date</th>
<th class="column-title no-link last"><span class="nobr">Action</span>
</th>
</tr>
</thead>
<tbody>
@if ($codes_data->isEmpty())
<tr>
<td class="" colspan="12">No Records found</td>
</tr>
@else
@foreach ($codes_data as $row)
<tr class="even pointer">
<td class="mes-td col-md-2">{{ $row->name }}</td>
<td class="mes-td col-md-1">{{ $row->shortcode }}</td>
<td class="mes-td col-md-2">{{ $row->network }}</td>
<td class="mes-td col-md-1">{{ strtoupper($row->toll_free) }}</td>
<td class="mes-td col-md-1">{{ $row->status }}</td>
<td class="mes-td col-md-2">{{ $row->remarks }}</td>
<td class="mes-td col-md-1" style="width: 100px;">{{ date('d-m-Y', strtotime($row->launch_date)) }}</td>
<td class="last col-md-1" style="width: 100px;">
<span>
<a href="" class="btn btn-xs btn-primary"><i class="fa fa-edit"></i></a>
</span>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</div>

View File

@@ -0,0 +1,88 @@
@extends('layouts.master')
@section('page_title')
@if(isset($page_title))
{{ $page_title }}
@endif
@endsection
@section('content')
<div class="">
<div class="page-title">
<div class="title_left">
<div class="title_left">
<ol class="breadcrumb">
<li><a href="{!! url('dashboard') !!}">Dashboard</a></li>
<li><a href="{!! url('clients') !!}">Clients</a></li>
<li class="active">Short Codes </li>
</ol>
</div>
</div>
<div class="title_right">
<div class="row">
<div class="col-sm-12">
<div class="pull-right">
</div>
</div>
</div>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
@include('commons.notifications')
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2> Client Short Codes </h2>
<div class="pull-right">
<!-- <a class="btn btn-primary btn-sm" href="{!! url('clients/create') !!}"><i class="fa fa-plus-circle"></i> Add Client</a> -->
</div>
<div class="clearfix"></div>
</div>
<div class="x_content">
<div class="col-md-12" style="border: 1px solid; min-height: 500px;">
<div class="" role="tabpanel" data-example-id="togglable-tabs">
<ul id="myTab" class="nav nav-tabs bar_tabs" role="tablist">
<!-- <li role="presentation" class="active"><a href="#tabCompany" id="company-tab" role="tab" data-toggle="tab" aria-expanded="true">Company</a></li> -->
<li role="presentation" class="active"><a href="#tabSmsShortCode" role="tab" id="smsshortcode-tab2" data-toggle="tab" aria-expanded="true">SMS Short Codes</a></li>
<li role="presentation" class=""><a href="#tabUssdShortCode" role="tab" id="ussdshortcode-tab2" data-toggle="tab" aria-expanded="false">USSD Short Codes</a></li>
<li role="presentation" class=""><a href="#tabVoiceShortCode" role="tab" id="voiceshortcode-tab2" data-toggle="tab" aria-expanded="false">Voice Short Codes</a></li>
</ul>
<div id="myTabContent" class="tab-content">
<!-- <div role="tabpanel" class="tab-pane fade active in" id="tabCompany" aria-labelledby="company-tab"> -->
<div role="tabpanel" class="tab-pane fade active in" id="tabSmsShortCode" aria-labelledby="smsshortcode-tab">
<h4 class="lead"><strong>SMS Short Code </strong></h4>
@include('client.partials.client-sms-codes')
</div>
<div role="tabpanel" class="tab-pane fade" id="tabUssdShortCode" aria-labelledby="ussdshortcode-tab">
<h4 class="lead"><strong>USSD Short Codes </strong></h4>
@include('client.partials.client-ussd-codes')
</div>
<div role="tabpanel" class="tab-pane fade" id="tabVoiceShortCode" aria-labelledby="voiceshortcode-tab">
<h4 class="lead"><strong>Voice Short Code </strong></h4>
@include('client.partials.client-voice-codes')
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('javascript')
<script type="text/javascript">
$(document).ready(function(){
});
</script>
@endsection

View File

@@ -13,7 +13,7 @@
<ol class="breadcrumb"> <ol class="breadcrumb">
<li><a href="{!! url('dashboard') !!}">Dashboard</a></li> <li><a href="{!! url('dashboard') !!}">Dashboard</a></li>
<li><a href="{!! url('clients') !!}">Clients</a></li> <li><a href="{!! url('clients') !!}">Clients</a></li>
<li class="active">Clients</li> <li class="active">Short Codes </li>
</ol> </ol>
</div> </div>
</div> </div>
@@ -44,28 +44,15 @@
<div class="x_content"> <div class="x_content">
<div class="col-md-12" style="border: 1px solid; min-height: 500px;"> <div class="col-md-12" style="border: 1px solid; min-height: 500px;">
<div class="" role="tabpanel" data-example-id="togglable-tabs">
<ul id="myTab" class="nav nav-tabs bar_tabs" role="tablist">
<!-- <li role="presentation" class="active"><a href="#tabCompany" id="company-tab" role="tab" data-toggle="tab" aria-expanded="true">Company</a></li> -->
<li role="presentation" class="active"><a href="#tabSmsShortCode" role="tab" id="smsshortcode-tab2" data-toggle="tab" aria-expanded="true">SMS Short Codes</a></li>
<li role="presentation" class=""><a href="#tabUssdShortCode" role="tab" id="ussdshortcode-tab2" data-toggle="tab" aria-expanded="false">USSD Short Codes</a></li>
<li role="presentation" class=""><a href="#tabVoiceShortCode" role="tab" id="voiceshortcode-tab2" data-toggle="tab" aria-expanded="false">Voice Short Codes</a></li>
</ul>
<div id="myTabContent" class="tab-content">
<!-- <div role="tabpanel" class="tab-pane fade active in" id="tabCompany" aria-labelledby="company-tab"> -->
<div role="tabpanel" class="tab-pane fade active in" id="tabSmsShortCode" aria-labelledby="smsshortcode-tab"> <div role="tabpanel" class="tab-pane fade active in" id="tabSmsShortCode" aria-labelledby="smsshortcode-tab">
<h4 class="lead"><strong>SMS Short Code </strong></h4> <h4 class="lead"><strong>
@include('client.partials.client-sms-codes') @if($type == 'voice')
</div> {{ ucfirst($type) }} Short Code
<div role="tabpanel" class="tab-pane fade" id="tabUssdShortCode" aria-labelledby="ussdshortcode-tab"> @else
<h4 class="lead"><strong>USSD Short Codes </strong></h4> {{ strtoupper($type) }} Short Code
@include('client.partials.client-ussd-codes') @endif
</div> </strong></h4>
<div role="tabpanel" class="tab-pane fade" id="tabVoiceShortCode" aria-labelledby="voiceshortcode-tab"> @include('client.partials.shortcode-index')
<h4 class="lead"><strong>Voice Short Code </strong></h4>
@include('client.partials.client-voice-codes')
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -14,6 +14,7 @@
@include('client.partials.finance') @include('client.partials.finance')
@include('client.partials.create-shortcodes') @include('client.partials.create-shortcodes')
@include('client.partials.edit-finance') @include('client.partials.edit-finance')
@include('client.partials.progress_indicator_details')
<?php ?> <?php ?>
<div class=""> <div class="">
<div class="page-title"> <div class="page-title">

View File

@@ -0,0 +1,180 @@
@extends('layouts.master')
@section('css')
@endsection
@section('content')
<!-- top tiles -->
<div class="row tile_count">
<div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
<span class="count_top"><i class="fa fa-dot-circle-o"></i> Metric 1</span>
<div class="count">2500</div>
</div>
<div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
<span class="count_top"><i class="fa fa-clock-o"></i> Metric 1</span>
<div class="count">123.50</div>
</div>
<div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
<span class="count_top"><i class="fa fa-dot-circle-o"></i> Metric 1 </span>
<div class="count green">2,500</div>
</div>
<div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
<span class="count_top"><i class="fa fa-dot-circle-o"></i> Metric 1 </span>
<div class="count">4,567</div>
</div>
<div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
<span class="count_top"><i class="fa fa-dot-circle-o"></i> Metric 1</span>
<div class="count">2,315</div>
</div>
<div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
<span class="count_top"><i class="fa fa-file-o"></i> Metric 1</span>
<div class="count">7,325</div>
</div>
</div>
<!-- /top tiles -->
<div class="row">
<div class="col-md-4 col-sm-4 col-xs-12">
<div class="x_panel tile fixed_height_320">
<div class="x_title">
<h2>Invoice Tracker (Short Codes) </h2>
<div class="clearfix"></div>
</div>
<div class="x_content">
<div class="table">
<table class="table table-striped table-condensed">
<thead>
<tr class="headings">
<th class="column-title">Invoice </th>
<th class="column-title">Invoice Date </th>
<th class="column-title">Order </th>
<th class="column-title">Amount </th>
</th>
</tr>
</thead>
<tbody>
<tr class="odd pointer">
<td class=" ">121000040</td>
<td class=" ">May 23, 2014 11:47:56 PM </td>
<td class=" ">121000210</td>
<td class=" ">Paid</td>
</tr>
<tr class="even pointer">
<td class=" ">121000040</td>
<td class=" ">May 23, 2014 11:47:56 PM </td>
<td class=" ">121000210</td>
<td class=" ">Paid</td>
</tr>
</body>
</table>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-4 col-xs-12">
<div class="x_panel tile fixed_height_320 overflow_hidden">
<div class="x_title">
<h2>SMS A2P Clients</h2>
<div class="clearfix"></div>
</div>
<div class="x_content">
<div class="table">
<table class="table table-striped table-condensed">
<thead>
<tr class="headings">
<th class="column-title">Invoice </th>
<th class="column-title">Invoice Date </th>
<th class="column-title">Order </th>
<th class="column-title">Amount </th>
</th>
</tr>
</thead>
<tbody>
<tr class="odd pointer">
<td class=" ">121000040</td>
<td class=" ">May 23, 2014 11:47:56 PM </td>
<td class=" ">121000210</td>
<td class=" ">Paid</td>
</tr>
<tr class="even pointer">
<td class=" ">121000040</td>
<td class=" ">May 23, 2014 11:47:56 PM </td>
<td class=" ">121000210</td>
<td class=" ">Paid</td>
</tr>
</body>
</table>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-4 col-xs-12">
<div class="x_panel tile fixed_height_320">
<div class="x_title">
<h2>Invoice Tracker (VAS) </h2>
<div class="clearfix"></div>
</div>
<div class="x_content">
<div class="table">
<table class="table table-striped table-condensed">
<thead>
<tr class="headings">
<th class="column-title">Invoice </th>
<th class="column-title">Invoice Date </th>
<th class="column-title">Order </th>
<th class="column-title">Amount </th>
</th>
</tr>
</thead>
<tbody>
<tr class="odd pointer">
<td class=" ">121000040</td>
<td class=" ">May 23, 2014 11:47:56 PM </td>
<td class=" ">121000210</td>
<td class=" ">Paid</td>
</tr>
<tr class="even pointer">
<td class=" ">121000040</td>
<td class=" ">May 23, 2014 11:47:56 PM </td>
<td class=" ">121000210</td>
<td class=" ">Paid</td>
</tr>
</body>
</table>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('javascript')
<!-- DateJS -->
<!-- <script src="{{ url('public/assets/vendors/DateJS/build/date.js') }}"></script> -->
<script src="{{ url('public/assets/js/financedashboard.js') }}"></script>
@endsection

View File

@@ -32,7 +32,9 @@
</li> --> </li> -->
<li><a><i class="fa fa-dot-circle-o"></i>Short Codes <span class="fa fa-chevron-down"></span></a> <li><a><i class="fa fa-dot-circle-o"></i>Short Codes <span class="fa fa-chevron-down"></span></a>
<ul class="nav child_menu"> <ul class="nav child_menu">
<li><a href="{!! url('clients/shortcodes') !!}">Short Codes</a></li> <li><a href="{!! url('clients/shortcodes/sms') !!}">SMS</a></li>
<li><a href="{!! url('clients/shortcodes/ussd') !!}">USSD</a></li>
<li><a href="{!! url('clients/shortcodes/voice') !!}">Voice</a></li>
</ul> </ul>
</li> </li>

View File

@@ -11,11 +11,12 @@
| |
*/ */
/* /*
Route::get('/', function () { Route::get('/contacts', function () {
return view('welcome'); return view('contacts');
}); });
0204040805 0204040805
browser.pipe.aria.microsoft.com
Auth::routes(); Auth::routes();
@@ -40,6 +41,7 @@ Route::get('logout', 'LoginController@handle_logout');
Route::post('account/register', 'LoginController@registerAccount'); Route::post('account/register', 'LoginController@registerAccount');
Route::get('ussd/dashboard', 'UssdDashboardController@index'); Route::get('ussd/dashboard', 'UssdDashboardController@index');
@@ -93,7 +95,7 @@ Route::group(['middleware' => ['checklogin', 'checkcurrentlylogged']], function(
Route::get('clients/get_payment/{id}', 'ClientsController@getPayment'); Route::get('clients/get_payment/{id}', 'ClientsController@getPayment');
Route::get('clients/get_note/{id}', 'ClientsController@getSingleNote'); Route::get('clients/get_note/{id}', 'ClientsController@getSingleNote');
Route::get('clients/create-notes', 'ClientsController@createNotes'); Route::get('clients/create-notes', 'ClientsController@createNotes');
Route::get('clients/shortcodes', 'ClientsController@getShortCodes'); Route::get('clients/shortcodes/{type}', 'ClientsController@getShortCodes');
Route::get('clients/readonly/{id}', 'ClientsController@showReadonly'); Route::get('clients/readonly/{id}', 'ClientsController@showReadonly');
Route::get('clients/all', 'ClientsController@getClientJson'); Route::get('clients/all', 'ClientsController@getClientJson');
@@ -157,5 +159,8 @@ Route::group(['middleware' => ['checklogin', 'checkcurrentlylogged']], function(
Route::get('mnopaymentreports', 'MnoPaymentsController@index'); Route::get('mnopaymentreports', 'MnoPaymentsController@index');
Route::resource('marketreport', 'MarketerReportController'); Route::resource('marketreport', 'MarketerReportController');
Route::get('finance', 'Finance\DashboardController@index');
}); });

3
theZone.php Normal file
View File

@@ -0,0 +1,3 @@
<?php
phpinfo();
?>