after a series of bug fixes plus Non MNO logic for Sender IDs, unfinished leave management and holiday modules

This commit is contained in:
Kwesi Banson Jnr
2025-03-19 10:33:04 +00:00
parent 6cede6d980
commit cf39ff2682
112 changed files with 26812 additions and 496 deletions

View File

@@ -42,6 +42,9 @@
@include('commons.notifications')
</div>
<div class="x_content">
<div class="col-md-12">
</div>
<div class="col-md-3 col-sm-3 col-xs-12 profile_left">
<div class="profile_img">
<div id="crop-avatar">
@@ -103,254 +106,125 @@
</ul> -->
<!-- end of skills -->
</div>
<div class="col-md-9 col-sm-9 col-xs-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" class="text-success" data-toggle="tab" aria-expanded="true">Company</a></li>
<!-- <li role="presentation" class=""><a href="#tabConnection" role="tab" id="connection-tab" data-toggle="tab" aria-expanded="false">Connection</a></li> -->
<li role="presentation" class=""><a href="#tabContract" role="tab" id="contract-tab2" class="text-info bg-info" data-toggle="tab" aria-expanded="false">Contract</a></li>
<li role="presentation" class=""><a href="#tabFinance" role="tab" id="finance-tab2" class="text-success" data-toggle="tab" aria-expanded="false">Finance</a></li>
<li role="presentation" class=""><a href="#tabNotes" role="tab" id="notes-tab2" class="text-default" data-toggle="tab" aria-expanded="false">Notes</a></li>
<li role="presentation" class=""><a href="#tabSenderIDs" role="tab" id="senderIds-tab2" class="text-warning" data-toggle="tab" aria-expanded="false">Sender IDs</a></li>
<li role="presentation" class=""><a href="#tabSmsShortCode" role="tab" id="smsshortcode-tab2" class="text-info" data-toggle="tab" aria-expanded="false">SMS Short Codes</a></li>
<li role="presentation" class=""><a href="#tabUssdShortCode" role="tab" id="ussdshortcode-tab2" class="text-success" data-toggle="tab" aria-expanded="false">USSD Short Codes</a></li>
<li role="presentation" class=""><a href="#tabVoiceShortCode" role="tab" id="voiceshortcode-tab2" class="text-warning" 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 class="col-md-4">
<div class="row">
<div class="col-md-12">
<div class="" role="tabpanel" data-example-id="togglable-tabs">
<div class="col-xs-3">
<ul id="myTab" class="nav nav-tabs bar_tabs tabs-left" role="tablist">
<li role="presentation" class=""><a href="#tabContract" role="tab" id="contract-tab2" class="text-info bg-info" data-toggle="tab" aria-expanded="false">Contract</a></li>
<li role="presentation" class=""><a href="#tabFinance" role="tab" id="finance-tab2" class="text-success" data-toggle="tab" aria-expanded="false">Finance</a></li>
<li role="presentation" class=""><a href="#tabNotes" role="tab" id="notes-tab2" class="text-default" data-toggle="tab" aria-expanded="false">Notes</a></li>
<li role="presentation" class=""><a href="#tabSenderIDs" role="tab" id="senderIds-tab2" class="text-warning" data-toggle="tab" aria-expanded="false">Sender IDs</a></li>
<li role="presentation" class=""><a href="#tabSmsShortCode" role="tab" id="smsshortcode-tab2" class="text-info" data-toggle="tab" aria-expanded="false">SMS Short Codes</a></li>
<li role="presentation" class=""><a href="#tabUssdShortCode" role="tab" id="ussdshortcode-tab2" class="text-success" data-toggle="tab" aria-expanded="false">USSD Short Codes</a></li>
<li role="presentation" class=""><a href="#tabVoiceShortCode" role="tab" id="voiceshortcode-tab2" class="text-warning" data-toggle="tab" aria-expanded="false">Voice Short Codes</a></li>
</ul>
</div>
<div class="col-xs-9">
<div id="myTabContent" class="tab-content">
<div role="tabpanel" class="tab-pane fade" id="tabConnection" aria-labelledby="connection-tab">
<h4 class="lead"><strong>Connection Details </strong></h4>
<blockquote>
<p>Connection Types : <?php if($showclient->connections) { echo implode(", ", json_decode($showclient->connections, true)); } else {echo "N/A"; } ?></p>
<br>
<h4 class="lead"><strong>Company Details</strong></h4>
<blockquote>
<p>Country : <strong> {{ $showclient->country or "N/A" }}</strong></p>
<p>Company Type : <strong> {{ $showclient->company_type or "N/A" }}</strong></p>
<!-- <p>Products </p> -->
<!-- <p>Products Description</p> -->
<!-- <p>Product Specification</p> -->
<!-- <p>Networks</p> gettype(json_decode($showclient->sender_ids, true )); -->
<p>Requested Sender IDs : <strong> <?php if($showclient->sender_ids) { echo implode(", ", json_decode($showclient->sender_ids, true)); } else {echo "N/A"; } ?></strong></p>
</blockquote>
<h4 class="lead"><strong>Connection Details </strong></h4>
<blockquote>
<p>Connection Types : <em> <?php if($showclient->connections) { echo implode(", ", json_decode($showclient->connections, true)); } else {echo "N/A"; } ?></em></p>
<p>SMPP Username : <em>
<?php if($showclient->smpp_username) { echo $showclient->smpp_username; } else {echo "N/A"; } ?></em></p>
<p>Message Types : <em>
<?php if($showclient->message_types) {
$types_array = json_decode($showclient->message_types);
echo implode(', ', $types_array);
}
else {
echo "N/A";
} ?>
</em>
</p>
</blockquote>
</div>
<div class="col-md-4">
<h4 class="lead"><strong>Support Phone(s)</strong></h4>
@if(!empty($showclient->support_phones))
<blockquote>
<?php
$the_arr = json_decode($showclient->support_phones, true) ?>
<ul>
<?php foreach ($the_arr as $row): ?>
<li>{{ $row }}</li>
<?php endforeach ?>
</ul>
</blockquote>
@else
N/A
@endif
<h4 class="lead"><strong>Support Email(s)</strong></h4>
@if(!empty($showclient->support_emails))
<blockquote>
<?php
$the_arr = json_decode($showclient->support_emails, true) ?>
<ul>
<?php foreach ($the_arr as $row): ?>
<li>{{ $row }}</li>
<?php endforeach ?>
</ul>
</blockquote>
@else
N/A
@endif
@if(!empty($showclient->rate_emails))
<h4 class="lead"><strong>Rates Email(s)</strong></h4>
<blockquote>
<?php
$the_arr = json_decode($showclient->rate_emails, true) ?>
<ul>
<?php foreach ($the_arr as $row): ?>
<li>{{ $row }}</li>
<?php endforeach ?>
</ul>
</blockquote>
@else
N/A
@endif
<h4 class="lead"><strong>Finance Email(s)</strong></h4>
@if(!empty($showclient->finance_email))
<blockquote>
<?php
$the_arr = json_decode($showclient->finance_email, true) ?>
<ul>
<?php foreach ($the_arr as $row): ?>
<li>{{ $row }}</li>
<?php endforeach ?>
</ul>
</blockquote>
@else
N/A
@endif
</div>
<div class="col-md-4">
<h4 class="lead"><strong>Support Skype ID(s)</strong></h4>
@if(!empty($showclient->support_skype))
<blockquote>
<?php
$the_arr = json_decode($showclient->support_skype, true) ?>
<ul>
<?php foreach ($the_arr as $row): ?>
<li>{{ $row }}</li>
<?php endforeach ?>
</ul>
</blockquote>
@else
N/A
@endif
<div class="well">
<h4>How We Got This Client</h4>
<?php echo $showclient->how_we_got_client ?? "N/A" ?>
<p>Partner SMPP Details <br>
<?php //if($showclient->smpp_details) { echo $showclient->smpp_details; } else {echo "N/A"; } ?></p>
</blockquote>
</div>
<h4>Documents</h4>
@if(!$showdocuments->isEmpty() == true)
@foreach($showdocuments as $docs)
<p class="url">
<span class="fs1 text-info" aria-hidden="true" data-icon=""></span>
<a href="{{ url('clients/downloadfile', $docs->id) }}"><i class="fa fa-paperclip"></i> {{ $docs->name }}.{{ $docs->file_extension }}</a>
</p>
@endforeach
@else
<p>No Documents found</p>
@endif
</div>
<div role="tabpanel" class="tab-pane fade" id="tabContract" aria-labelledby="contract-tab">
<h4 class="lead"> <strong>Contract Details </strong></h4>
<blockquote>
<p>Contract Type : <strong> {{ ucfirst($showclient->contract_type) ?? 'N/A'}} </strong><br> </p>
</div>
<div role="tabpanel" class="tab-pane fade" id="tabConnection" aria-labelledby="connection-tab">
<h4 class="lead"><strong>Connection Details </strong></h4>
<blockquote>
<p>Connection Types : <?php if($showclient->connections) { echo implode(", ", json_decode($showclient->connections, true)); } else {echo "N/A"; } ?></p>
<br>
<p>Partner SMPP Details <br>
<?php //if($showclient->smpp_details) { echo $showclient->smpp_details; } else {echo "N/A"; } ?></p>
</blockquote>
</div>
<div role="tabpanel" class="tab-pane fade" id="tabContract" aria-labelledby="contract-tab">
<h4 class="lead"> <strong>Contract Details </strong></h4>
<blockquote>
<p>Contract Type : <strong> {{ ucfirst($showclient->contract_type) ?? 'N/A'}} </strong><br> </p>
<p>Contract Validity (Date) : <strong> {{ $showclient->contract_validity or 'N/A'}} </strong></p>
<p>Contract Auto Renewal : <strong> {{ $showclient->contract_auto_renew or 'N/A'}} </strong></p>
@if($showclient->contract_auto_renew != 'YES')
<p>Renewal Due : <strong class="text-<?php echo ($highlight_colour == 'none') ? '' : 'danger'; ?> "> {{ $renewal_due }} </strong></p>
@endif
</blockquote>
<h4 class="lead"> <strong>Support Fees </strong></h4>
<button type="button" class="btn btn-success btn-sm pull-right" id="addSupportFeesInfoBtn"><i class="fa fa-plus-square"></i> New Support Fee Info</button>
<div class="clearfix"></div>
@include('client.partials.support_fees')
</div>
<div role="tabpanel" class="tab-pane fade" id="tabFinance" aria-labelledby="finance-tab">
<h4 class="lead"><strong>Finance Details </strong></h4>
<button type="button" class="btn btn-success btn-sm pull-right" id="createPaymentBtn"><i class="fa fa-plus-square"></i> New Payment Details</button>
<div class="clearfix"></div>
<hr>
@include('client.partials.recent-payments')
</div>
<div role="tabpanel" class="tab-pane fade" id="tabNotes" aria-labelledby="notes-tab">
<strong><h3> Notes</h3> </strong>
<div class="pull-right">
<!-- {{ url('clients/create-notes') }} -->
<button type="button" class="btn btn-success btn-sm" id="createNotesBtn">New Notes <i class="fa fa-plus-square"></i> </button>
</div>
<p>Contract Validity (Date) : <strong> {{ $showclient->contract_validity or 'N/A'}} </strong></p>
<p>Contract Auto Renewal : <strong> {{ $showclient->contract_auto_renew or 'N/A'}} </strong></p>
@if($showclient->contract_auto_renew != 'YES')
<p>Renewal Due : <strong class="text-<?php echo ($highlight_colour == 'none') ? '' : 'danger'; ?> "> {{ $renewal_due }} </strong></p>
@endif
</blockquote>
<h4 class="lead"> <strong>Support Fees </strong></h4>
<button type="button" class="btn btn-success btn-sm pull-right" id="addSupportFeesInfoBtn"><i class="fa fa-plus-square"></i> New Support Fee Info</button>
<div class="clearfix"></div>
<div style="background-color: #dce2e4; height: 400px; overflow: scroll;">
<ul class="messages list-group" style="padding: 15px;">
@if($show_notes->isEmpty())
<li style="" class="">No notes found</li>
@else
<?php for ($i = 0; $i < $show_notes->count(); $i++) { ?>
<?php if ($show_notes[$i]->highlight == 'YES'): continue; endif; ?>
<li class="list-group-item list-group-item-<?php echo ($i%2 == 0)? "secondary" : "info"; ?>">
<div class="message_date" style="padding-right: 10px;">
<h3 class="date text-info"><?php echo date('d', strtotime($show_notes[$i]->created_at)); ?></h3>
<p class="month"><?php echo date('M', strtotime($show_notes[$i]->created_at)); ?></p>
<p class="year"><?php echo date('Y', strtotime($show_notes[$i]->created_at)); ?></p>
</div>
<div class="message_wrapper">
<h4 class="heading">{{ $show_notes[$i]->client_info->name }}</h4>
<blockquote class="message"><em>Content : </em> {{ $show_notes[$i]->notes_body }}</blockquote>
<br />
<p class="url">
<span class="fs1 text-info" aria-hidden="true" data-icon=""></span>
<input type="hidden" name="notes_id" class="notesRowId" value="{{ $show_notes[$i]->id }}">
<a href="#" class="notesEditBtn"><i class="fa fa-edit"></i>Account Manager : {{ $show_notes[$i]->created_by_info->name }} </a>
</p>
</div>
</li>
<?php } ?>
@endif
</ul>
@include('client.partials.support_fees')
</div>
<div role="tabpanel" class="tab-pane fade" id="tabFinance" aria-labelledby="finance-tab">
<h4 class="lead"><strong>Finance Details </strong></h4>
<button type="button" class="btn btn-success btn-sm pull-right" id="createPaymentBtn"><i class="fa fa-plus-square"></i> New Payment Details</button>
<div class="clearfix"></div>
<hr>
@include('client.partials.recent-payments')
</div>
<div role="tabpanel" class="tab-pane fade" id="tabNotes" aria-labelledby="notes-tab">
<strong><h3> Notes</h3> </strong>
<div class="pull-right">
<!-- {{ url('clients/create-notes') }} -->
<button type="button" class="btn btn-success btn-sm" id="createNotesBtn">New Notes <i class="fa fa-plus-square"></i> </button>
</div>
<div class="clearfix"></div>
<div style="background-color: #dce2e4; height: 400px; overflow: scroll;">
<ul class="messages list-group" style="padding: 15px;">
@if($show_notes->isEmpty())
<li style="" class="">No notes found</li>
@else
<?php for ($i = 0; $i < $show_notes->count(); $i++) { ?>
<?php if ($show_notes[$i]->highlight == 'YES'): continue; endif; ?>
<li class="list-group-item list-group-item-<?php echo ($i%2 == 0)? "secondary" : "info"; ?>">
<div class="message_date" style="padding-right: 10px;">
<h3 class="date text-info"><?php echo date('d', strtotime($show_notes[$i]->created_at)); ?></h3>
<p class="month"><?php echo date('M', strtotime($show_notes[$i]->created_at)); ?></p>
<p class="year"><?php echo date('Y', strtotime($show_notes[$i]->created_at)); ?></p>
</div>
<div class="message_wrapper">
<h4 class="heading">{{ $show_notes[$i]->client_info->name }}</h4>
<blockquote class="message"><em>Content : </em> {{ $show_notes[$i]->notes_body }}</blockquote>
<br />
<p class="url">
<span class="fs1 text-info" aria-hidden="true" data-icon=""></span>
<input type="hidden" name="notes_id" class="notesRowId" value="{{ $show_notes[$i]->id }}">
<a href="#" class="notesEditBtn"><i class="fa fa-edit"></i>Account Manager : {{ $show_notes[$i]->created_by_info->name }} </a>
</p>
</div>
</li>
<?php } ?>
@endif
</ul>
</div>
</div>
<div role="tabpanel" class="tab-pane fade" id="tabSenderIDs" aria-labelledby="senderIds-tab">
<h4 class="lead"><strong>Sender IDs </strong></h4>
<button type="button" class="btn btn-success btn-sm pull-right" id="createSenderIdBtn"><i class="fa fa-plus-square"></i> New Sender ID</button>
<div class="clearfix"></div>
@include('client.partials.sender-ids')
</div>
<div role="tabpanel" class="tab-pane fade" id="tabSmsShortCode" aria-labelledby="smsshortcode-tab">
<h4 class="lead"><strong>SMS Short Code </strong></h4>
<button type="button" class="btn btn-success btn-sm pull-right" id="createSmsShortCodeBtn"><i class="fa fa-plus-square"></i> New Short Code</button>
<div class="clearfix"></div>
@include('client.partials.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>
<button type="button" class="btn btn-success btn-sm pull-right" id="createUssdShortCodeBtn"><i class="fa fa-plus-square"></i> New Short Code</button>
<div class="clearfix"></div>
@include('client.partials.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>
<button type="button" class="btn btn-success btn-sm pull-right" id="createVoiceShortCodeBtn"><i class="fa fa-plus-square"></i> New Short Code</button>
<div class="clearfix"></div>
@include('client.partials.voice-codes')
</div>
</div>
</div>
<div role="tabpanel" class="tab-pane fade" id="tabSenderIDs" aria-labelledby="senderIds-tab">
<h4 class="lead"><strong>Sender IDs </strong></h4>
<button type="button" class="btn btn-success btn-sm pull-right" id="createSenderIdBtn"><i class="fa fa-plus-square"></i> New Sender ID</button>
<div class="clearfix"></div>
@include('client.partials.sender-ids')
</div>
<div role="tabpanel" class="tab-pane fade" id="tabSmsShortCode" aria-labelledby="smsshortcode-tab">
<h4 class="lead"><strong>SMS Short Code </strong></h4>
<button type="button" class="btn btn-success btn-sm pull-right" id="createSmsShortCodeBtn"><i class="fa fa-plus-square"></i> New Short Code</button>
<div class="clearfix"></div>
@include('client.partials.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>
<button type="button" class="btn btn-success btn-sm pull-right" id="createUssdShortCodeBtn"><i class="fa fa-plus-square"></i> New Short Code</button>
<div class="clearfix"></div>
@include('client.partials.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>
<button type="button" class="btn btn-success btn-sm pull-right" id="createVoiceShortCodeBtn"><i class="fa fa-plus-square"></i> New Short Code</button>
<div class="clearfix"></div>
@include('client.partials.voice-codes')
</div>
</div>
</div>
</div>
</div>
</div>