clients profile,slack, new email, bug fixes

This commit is contained in:
Kwesi Banson
2023-04-17 20:25:52 +00:00
parent a8301660fc
commit 903c1703b9
37 changed files with 2031 additions and 165 deletions

View File

@@ -6,7 +6,10 @@
@endsection
@section('content')
@include('client.new_notes')
@include('client.partials.new_notes')
@include('client.partials.finance')
@include('client.partials.create-shortcodes')
@include('client.partials.edit-finance')
<div class="">
<div class="page-title">
<div class="title_left">
@@ -83,28 +86,143 @@
<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="home-tab" role="tab" data-toggle="tab" aria-expanded="true">Company</a></li>
<li role="presentation" class=""><a href="#tabConnection" role="tab" id="profile-tab" data-toggle="tab" aria-expanded="false">Connection</a></li>
<li role="presentation" class=""><a href="#tabContract" role="tab" id="profile-tab2" data-toggle="tab" aria-expanded="false">Contract</a></li>
<li role="presentation" class=""><a href="#tabFinance" role="tab" id="profile-tab2" data-toggle="tab" aria-expanded="false">Finance</a></li>
<li role="presentation" class=""><a href="#tabNotes" role="tab" id="profile-tab2" data-toggle="tab" aria-expanded="false">Notes</a></li>
<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=""><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" data-toggle="tab" aria-expanded="false">Contract</a></li>
<li role="presentation" class=""><a href="#tabFinance" role="tab" id="finance-tab2" data-toggle="tab" aria-expanded="false">Finance</a></li>
<li role="presentation" class=""><a href="#tabNotes" role="tab" id="notes-tab2" data-toggle="tab" aria-expanded="false">Notes</a></li>
<li role="presentation" class=""><a href="#tabSmsShortCode" role="tab" id="smsshortcode-tab2" data-toggle="tab" aria-expanded="false">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="home-tab">
<div role="tabpanel" class="tab-pane fade active in" id="tabCompany" aria-labelledby="company-tab">
<div class="col-md-4">
<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>
<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($showclient->support_phones !== null)
<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($showclient->support_emails !== null)
<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($showclient->rate_emails !== null)
<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($showclient->finance_emails !== null)
<blockquote>
<?php
$the_arr = json_decode($showclient->finance_emails, 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($showclient->support_skype !== null)
<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" ?>
</div>
</div>
</div>
<div role="tabpanel" class="tab-pane fade" id="tabConnection" aria-labelledby="profile-tab">
<div role="tabpanel" class="tab-pane fade" id="tabConnection" aria-labelledby="connection-tab">
<h4 class="lead"><strong>Connection Details </strong></h4>
<blockquote>
@@ -112,32 +230,32 @@
<br>
<p>Partner SMPP Details <br>
<?php if($showclient->smpp_details) { echo $showclient->smpp_details; } else {echo "N/A"; } ?></p>
<?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="profile-tab">
<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 (years) : <strong> {{ $showclient->contract_validity or 'N/A'}} </strong></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>
<p>Renewal Due : <strong class="text-<?php echo ($highlight_colour == 'none') ? '' : 'danger'; ?> "> {{ $renewal_due }} </strong></p>
</blockquote>
</div>
<div role="tabpanel" class="tab-pane fade" id="tabFinance" aria-labelledby="profile-tab">
<div role="tabpanel" class="tab-pane fade" id="tabFinance" aria-labelledby="finance-tab">
<h4 class="lead"><strong>Finance Details </strong></h4>
<blockquote>
<p>Last Invoice Sent : "N/A" </p><br>
<p>Payment Status : N/A</p>
</blockquote>
<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="profile-tab">
<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="creatNotesBtn">New Notes <i class="fa fa-plus-square"></i> </button>
<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;">
@@ -169,6 +287,24 @@
</ul>
</div>
</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>
@@ -180,55 +316,5 @@
</div>
@endsection
@section('javascript')
<script type="text/javascript">
$(document).ready(function(){
$('select').select2();
$('#creatNotesBtn').click(function(evt){
evt.preventDefault();
$('#newNotesForm').modal('show');
});
$('#newNotesFormForm').submit(function(evt){
evt.preventDefault();
var formData = new FormData($(this)[0]);
$.ajax({
type: "POST",
url: base_url + '/clients/notes_store',
data : formData,
processData: false,
contentType: false,
async: false,
success: function (data){
if (data.code === 1) {
$("#newNotesFormForm")[0].reset();
$.alert({
title: 'Alert!',
content: 'Notes added successfully',
});
setTimeout(function(){
location.reload();
}, 8000);
}
else if (data.code > 5) {
$.alert({
title: 'Alert!',
content: data.msg,
});
}
else {
$.alert({
title: 'Alert!',
content: 'Your request could not be handled. Try again !',
});
}
}
});
});
});
</script>
<script type="text/javascript" src="{{ url('public/assets/js/clientshow.js') }}"></script>
@endsection