short code in client payment, edit logic for short codes
This commit is contained in:
@@ -41,6 +41,6 @@ class ProcessClientContractRenewalAlert extends Command
|
||||
{
|
||||
|
||||
$this->client_contractRenewalReminder->getClientDetails();
|
||||
\Log::info('SendClientContractRenewalReminders command completed...');
|
||||
// \Log::info('SendClientContractRenewalReminders command completed...');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,6 @@ class SendContractRenewalReminders extends Command
|
||||
{
|
||||
|
||||
$this->contractRenewalReminder->getMnos();
|
||||
\Log::info('SendContractRenewalReminders command completed...');
|
||||
// \Log::info('SendContractRenewalReminders command completed...');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ class Kernel extends ConsoleKernel
|
||||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
Commands\SendContractRenewalReminders::class
|
||||
Commands\SendContractRenewalReminders::class,
|
||||
Commands\ProcessClientContractRenewalAlert::class
|
||||
];
|
||||
|
||||
|
||||
@@ -338,15 +338,15 @@ class ClientsController extends Controller
|
||||
$this->logUsersActivity($type = 'staff', $content);
|
||||
return response()->json($data, 200);
|
||||
}
|
||||
public function financeStore(Request $request)
|
||||
{
|
||||
public function financeStore(Request $request){
|
||||
$request->validate([
|
||||
'client_id' => 'required',
|
||||
'services' => 'required',
|
||||
'invoice_number' => 'required',
|
||||
'invoice_amount' => 'required|numeric',
|
||||
'invoice_date' => 'required',
|
||||
'invoice_status' => 'required'
|
||||
'invoice_status' => 'required',
|
||||
'short_code' => 'sometimes|numeric'
|
||||
]);
|
||||
$auth_user = session('current_user');
|
||||
|
||||
@@ -356,6 +356,7 @@ class ClientsController extends Controller
|
||||
'invoice_amount' => $request->invoice_amount,
|
||||
'invoice_date' => $request->invoice_date,
|
||||
'invoice_status' => $request->invoice_status,
|
||||
'short_code' => ($request->short_code) ? $request->short_code : "",
|
||||
'services' => implode(',', $request->services),
|
||||
'user_id' => $auth_user['id'],
|
||||
'client_id' => $request->client_id
|
||||
@@ -394,7 +395,12 @@ class ClientsController extends Controller
|
||||
]);
|
||||
$auth_user = session('current_user');
|
||||
#$network = Models\NetworkOps::find($request->network);
|
||||
|
||||
$mnoCountry = $this->getMnoCountry($request->network);
|
||||
if ($mnoCountry == false) {
|
||||
$data = ['code' => 3, 'msg' => 'Your request could not be handled at this time'];
|
||||
return response()->json($data, 200);
|
||||
}
|
||||
/*
|
||||
$networks_raw = [
|
||||
'AirtelTigo GH' => 'AirtelTigo GH',
|
||||
'MTN GH' => 'MTN GH',
|
||||
@@ -426,16 +432,17 @@ class ClientsController extends Controller
|
||||
$data = ['code' => 3, 'msg' => 'Your request could not be handled at this time'];
|
||||
return response()->json($data, 200);
|
||||
}
|
||||
*/
|
||||
|
||||
$shortcode_arr = [
|
||||
'name' => $request->name,
|
||||
'client_id' => $request->client_id,
|
||||
'network' => $request->network,
|
||||
'country' => $country, //$network->country,
|
||||
'country' => $mnoCountry, //$network->country,
|
||||
'shortcode' => $request->shortcode,
|
||||
'code_type' => $request->code_type,
|
||||
'toll_free' => $request->toll_free,
|
||||
'last_updaed_by' => $auth_user['id'],
|
||||
'last_updated_by' => $auth_user['id'],
|
||||
'launch_date' => $request->launch_date,
|
||||
'expiry_date' => $request->expiry_date,
|
||||
'status' => $request->status
|
||||
@@ -458,8 +465,7 @@ class ClientsController extends Controller
|
||||
$this->logUsersActivity($type = 'staff', $content);
|
||||
return response()->json($data, 200);
|
||||
}
|
||||
public function financeUpdate(Request $request)
|
||||
{
|
||||
public function financeUpdate(Request $request){
|
||||
$request->validate([
|
||||
'payment_id' => 'required',
|
||||
'client_id' => 'required',
|
||||
@@ -491,14 +497,63 @@ class ClientsController extends Controller
|
||||
$this->logUsersActivity($type = 'staff', $content);
|
||||
return response()->json($data, 200);
|
||||
}
|
||||
public function shortCodeUpdate(Request $request){
|
||||
$request->validate([
|
||||
'client_id' => 'required',
|
||||
'network' => 'required',
|
||||
'shortcode' => 'required',
|
||||
'code_type' => 'required',
|
||||
'toll_free' => 'required',
|
||||
'status' => 'required',
|
||||
'remarks' => 'required',
|
||||
'launch_date' => 'required',
|
||||
'expiry_date' => 'required'
|
||||
]);
|
||||
$auth_user = session('current_user');
|
||||
$mnoCountry = $this->getMnoCountry($request->network);
|
||||
if ($mnoCountry == false) {
|
||||
$data = ['code' => 3, 'msg' => 'Your request could not be handled at this time'];
|
||||
return response()->json($data, 200);
|
||||
// code...
|
||||
}
|
||||
$shortcode_arr = [
|
||||
'name' => $request->name,
|
||||
'client_id' => $request->client_id,
|
||||
'network' => $request->network,
|
||||
'country' => $mnoCountry, //$network->country,
|
||||
'shortcode' => $request->shortcode,
|
||||
'code_type' => $request->code_type,
|
||||
'toll_free' => $request->toll_free,
|
||||
'last_updated_by' => $auth_user['id'],
|
||||
'launch_date' => $request->launch_date,
|
||||
'expiry_date' => $request->expiry_date,
|
||||
'status' => $request->status
|
||||
];
|
||||
if ($request->has('remarks')) {
|
||||
$shortcode_arr['remarks'] = $request->remarks;
|
||||
}
|
||||
// $payment = Models\ClientShortCode::findOrFail($request->shortcode_id);
|
||||
$result = Models\ClientShortCode::where('id', $request->shortcode_id)->update($shortcode_arr);
|
||||
|
||||
if ($result) {
|
||||
$data = ['code' => 1, 'msg' => 'Payment Details successfully updated'];
|
||||
}
|
||||
else{
|
||||
$data = ['code' => 3, 'msg' => 'Your request could not be handled at this time'];
|
||||
}
|
||||
$user_id = session('current_user.id');
|
||||
$username = session('current_user.name');
|
||||
$content = "User ID : " . $user_id . " (" . $username . ") updated short code enty";
|
||||
$this->logUsersActivity($type = 'staff', $content);
|
||||
return response()->json($data, 200);
|
||||
}
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
public function show($id){
|
||||
//with('short_code_info')->
|
||||
$showclient = Models\Client::with('service_info', 'country_flag_info', 'auth_user_info', 'short_code_info')->find($id);
|
||||
// dd(json_decode($showclient->progress_indicators, true));
|
||||
@@ -629,8 +684,7 @@ class ClientsController extends Controller
|
||||
];
|
||||
return view('client.show', $data);
|
||||
}
|
||||
public function showReadonly($id)
|
||||
{
|
||||
public function showReadonly($id){
|
||||
//with('short_code_info')->
|
||||
$showclient = Models\Client::with('service_info', 'country_info', 'auth_user_info', 'short_code_info')->find($id);
|
||||
$service_type = Models\Service::pluck('name', 'id');
|
||||
@@ -738,8 +792,7 @@ class ClientsController extends Controller
|
||||
];
|
||||
return view('client.service-edit', $data);
|
||||
}
|
||||
public function getPayment($id)
|
||||
{
|
||||
public function getPayment($id){
|
||||
$payment = Models\ClientPayment::find($id);
|
||||
if ($payment) {
|
||||
$services_arr = explode(',', $payment->services);
|
||||
@@ -749,9 +802,17 @@ class ClientsController extends Controller
|
||||
else{
|
||||
return response()->json([ 'code' => 3, 'msg' => 'Request could not be handled at this time']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function getShortCodeDetails($id){
|
||||
$shortcode = Models\ClientShortCode::with('client_info', 'update_info')->find($id);
|
||||
if ($shortcode) {
|
||||
$services_arr = Models\Service::pluck('name', 'id');
|
||||
return response()->json([ 'code' => 1, 'result' => $shortcode, 'services_arr' => $services_arr]);
|
||||
}
|
||||
else{
|
||||
return response()->json([ 'code' => 3, 'msg' => 'Request could not be handled at this time']);
|
||||
}
|
||||
}
|
||||
public function getShortCodes($type){
|
||||
//$auth_users = Models\SystemUser::pluck('name', 'id');
|
||||
//todo : separate the short codes into individual pages
|
||||
@@ -1244,4 +1305,38 @@ class ClientsController extends Controller
|
||||
|
||||
return $string;
|
||||
}
|
||||
|
||||
public function getMnoCountry($network){
|
||||
$networks_raw = [
|
||||
'AirtelTigo GH' => 'AirtelTigo GH',
|
||||
'MTN GH' => 'MTN GH',
|
||||
'Airtel MW' => 'Airtel MW',
|
||||
'Airtel Zambia' => 'Airtel Zambia',
|
||||
'TNM MW' => 'TNM MW',
|
||||
'Airtel MW' => 'Airtel MW',
|
||||
'Safaricom Kenya' => 'Safaricom Kenya',
|
||||
'Airtel Kenya' => 'Airtel Kenya',
|
||||
'Telkom Kenya' => 'Telkom Kenya',
|
||||
'Orange Kenya' => 'Orange Kenya'
|
||||
];
|
||||
if (stripos($network, 'MW') !== false ) {
|
||||
$country = 'Malawi';
|
||||
}
|
||||
elseif (stripos($network, 'GH') !== false) {
|
||||
$country = 'Ghana';
|
||||
}
|
||||
elseif (stripos($network, 'Zambia') !== false) {
|
||||
$country = 'Zambia';
|
||||
}
|
||||
elseif (stripos($network, 'Bots') !== false) {
|
||||
$country = 'Botswana';
|
||||
}
|
||||
elseif (stripos($network, 'KE') !== false) {
|
||||
$country = 'Kenya';
|
||||
}
|
||||
else{
|
||||
$country = false;
|
||||
}
|
||||
return $country;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace App\Http\Controllers;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use App\Models;
|
||||
use Illuminate\Contracts\Mail\Mailer;
|
||||
// use Illuminate\Contracts\Mail\Mailer;
|
||||
|
||||
|
||||
|
||||
@@ -32,6 +32,11 @@ class UtilityController extends Controller
|
||||
|
||||
return view('utility.map');
|
||||
}
|
||||
|
||||
public function showPage(){
|
||||
|
||||
return view('utility.arraylogic');
|
||||
}
|
||||
public function ntfyTest(){
|
||||
$this->sendNtfy('In the ERP');
|
||||
}
|
||||
|
||||
@@ -38,8 +38,6 @@ class SendMnoContractRenewalEmailAlert implements ShouldQueue
|
||||
'mno_name' => $renewalSet['mno_name'],
|
||||
'alert_body' => 'Contract for ' . $renewalSet['mno_name'] . ' will expire in ' . $renewalSet['days_to_expire'] . ' days. Take note'
|
||||
];
|
||||
|
||||
\Log::info("Contract Renewal Alert triggered by : ");
|
||||
$mailer->send('emails.renewal-alert', $data, function ($message) use ($data, $emails) {
|
||||
$message->from('support@click-mobile.com', 'Click Mobile ERP');
|
||||
$message->to($emails)->subject('Contract Renewal Alert');
|
||||
|
||||
96
public/assets/js/clientshow.js
vendored
96
public/assets/js/clientshow.js
vendored
@@ -109,6 +109,51 @@
|
||||
});
|
||||
|
||||
|
||||
$('.shortCodeEditBtn').click(function(tve){
|
||||
tve.preventDefault();
|
||||
var theIDD = $(this).siblings('.shortCodeEntryRowId').val();
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: base_url + '/clients/get_shortcode/' + theIDD,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
async: false,
|
||||
success: function (data){
|
||||
if (data.code === 1) {
|
||||
console.log(theIDD);
|
||||
console.log(data);
|
||||
$('#shortCodeIDEdit').val(theIDD);
|
||||
$('#nameEdit').val(data.result.name);
|
||||
$('#shortCodeClientIdEdit').val(data.result.client_id);
|
||||
$('#shortCodeTypeEdit').val(data.result.code_type);
|
||||
$('#shortCodeEdit').val(data.result.shortcode);
|
||||
$('#tollFreeEdit').val(data.result.toll_free).change();
|
||||
$('#launchDateEdit').val(data.result.launch_date);
|
||||
$('#expiryDateEdit').val(data.result.expiry_date);
|
||||
$('#codeStatusEdit').val(data.result.status).change();
|
||||
$('#network').val(data.result.network).change();
|
||||
$('#remarksEdit').val(data.result.remarks);
|
||||
$('#shortCodeEditModal').modal('show');
|
||||
}
|
||||
else if (data.code > 1) {
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: data.msg,
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: 'Your request could not be handled. Try again !',
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('.notesEditBtn').click(function(tve){
|
||||
tve.preventDefault();
|
||||
@@ -240,6 +285,21 @@
|
||||
});
|
||||
});
|
||||
|
||||
$('#financeServicesStore').change(function(evtt){
|
||||
let currentServices = $('#financeServicesStore').val();
|
||||
$.each(currentServices, function (key, value) {
|
||||
// console.log(value);
|
||||
let short_code_services = ["USSD", "SMS Application", "IVR"];
|
||||
let checkArray = $.inArray(value, short_code_services) > -1;
|
||||
// console.log(checkArray);
|
||||
if (checkArray == true) {
|
||||
$('#ShortCodeFormGrp').removeClass('hidden');
|
||||
}
|
||||
else{
|
||||
$('#ShortCodeFormGrp').addClass('hidden');
|
||||
}
|
||||
});
|
||||
});
|
||||
$('#financeEditForm').submit(function(evt){
|
||||
evt.preventDefault();
|
||||
var formData = new FormData($(this)[0]);
|
||||
@@ -276,6 +336,42 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
$('#shortCodeEditForm').submit(function(evt){
|
||||
evt.preventDefault();
|
||||
var formData = new FormData($(this)[0]);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: base_url + '/clients/shortcode_update',
|
||||
data : formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
async: false,
|
||||
success: function (data){
|
||||
if (data.code === 1) {
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: 'Short Code Details successfully updated',
|
||||
});
|
||||
setTimeout(function(){
|
||||
location.reload();
|
||||
}, 8000);
|
||||
}
|
||||
else if (data.code > 1) {
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: data.msg,
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.alert({
|
||||
title: 'Alert!',
|
||||
content: 'Your request could not be handled. Try again !',
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#editNotesForm').submit(function(evt){
|
||||
evt.preventDefault();
|
||||
|
||||
107
resources/views/client/partials/edit-shortcodes.blade.php
Normal file
107
resources/views/client/partials/edit-shortcodes.blade.php
Normal file
@@ -0,0 +1,107 @@
|
||||
<div class="modal fade" id="shortCodeEditModal" tabindex="-1" role="dialog" aria-labelledby="shortCodeEditModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<!-- <h4 class="modal-title">Default Modal</h4> -->
|
||||
<h5 class="modal-title text-center" id="shortCodeEditModalLabelHeading">Edit Short Code Form</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="notifyAreaEdit" class="alert alert-danger hidden"></div>
|
||||
<form class="form-vertical" method="POST" id="shortCodeEditForm" action="{{ url('clients/shortcodes_update') }}">
|
||||
{{ csrf_field() }}
|
||||
<input type="hidden" name="shortcode_id" id="shortCodeIDEdit">
|
||||
<input type="hidden" name="code_type" id="shortCodeTypeEdit">
|
||||
<input type="hidden" name="client_id" id="shortCodeClientIdEdit">
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group" >
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<label for="nameEdit">Friendly Name *</label>
|
||||
<input type="text" class="form-control" name="name" id="nameEdit" required >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-12" style="padding-bottom: 5px">
|
||||
<label for="networks">Network *</label>
|
||||
<!-- 'multiple'=> 'true', -->
|
||||
{!! Form::select('network', $networks_raw, null, ['class' => 'form-control' , 'id' => 'networks', 'required' => 'required', 'style' => 'width: 100%']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" >
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<label for="shortCodeEdit">Code *</label>
|
||||
<input type="number" class="form-control" name="shortcode" id="shortCodeEdit" required >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-12" style="padding-bottom: 5px">
|
||||
<label for="tollFreeEdit">Toll Free</label>
|
||||
<select name="toll_free" id="tollFreeEdit" class="form-control" required style="width: 100%;">
|
||||
<option value="YES">YES</option>
|
||||
<option value="NO">NO</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-6">
|
||||
<div class='input-group date' id='myDatepicker22Edit' style="padding-bottom: 5px;">
|
||||
<label for="launchDateEdit">Launch Date</label>
|
||||
<input type="text" class="form-control" name="launch_date" id="launchDateEdit" required >
|
||||
<div class="input-group-addon">
|
||||
<span class="fa fa-calendar"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class='input-group date' id='myDatepicker223Edit' style="padding-bottom: 5px;">
|
||||
<label for="expiryDateEdit">Expiry Date</label>
|
||||
<input type="text" class="form-control" name="expiry_date" id="expiryDateEdit" required >
|
||||
<div class="input-group-addon">
|
||||
<span class="fa fa-calendar"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-12" style="padding-bottom: 5px">
|
||||
<label for="codeStatusEdit">Status</label>
|
||||
<select id="codeStatusEdit" name="status" class="form-control" required style="width: 100%;">
|
||||
<option value="LIVE">Live</option>
|
||||
<option value="PENDING">Pending</option>
|
||||
<option value="TESTING">Testing</option>
|
||||
<option value="INACTIVE">Inactive </option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" >
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<label for="remarksEdit">Remarks</label>
|
||||
<input type="text" class="form-control" name="remarks" id="remarksEdit"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" style="margin-bottom: 0.2rem; padding-bottom: 5px; padding-top: 5px;">
|
||||
<div class="col-md-12" style="padding-bottom: 10px;">
|
||||
<button type="submit" class="btn btn-success btn-block updateBtn"> <i class="fa fa-send"></i> Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin-bottom: 0.5rem; padding-bottom: 5px; padding-top: 5px;">
|
||||
<div class="col-md-12">
|
||||
<button type="button" class="btn btn-dark btn-block" data-dismiss="modal"><i class="fa fa-close"></i> Close</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
<!-- /.modal -->
|
||||
@@ -16,8 +16,15 @@
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<div class="col-md-12">
|
||||
<label for="financeServices">Services *</label>
|
||||
{!! Form::select('services[]', $service_type_names , old('services'), ['class' => 'form-control' , 'id' => 'financeServices', 'required' => 'required', 'multiple'=> 'true', 'style' => 'width: 100%']) !!}
|
||||
<label for="financeServicesStore">Services *</label>
|
||||
{!! Form::select('services[]', $service_type_names , old('services'), ['class' => 'form-control' , 'id' => 'financeServicesStore', 'required' => 'required', 'multiple'=> 'true', 'style' => 'width: 100%']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group hidden" id="ShortCodeFormGrp" >
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<label for="shortCode">Short Code</label>
|
||||
<input type="text" class="form-control" name="short_code" id="shortCode" required >
|
||||
<p class="text-warning">Enter Short related to the selected service</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" >
|
||||
|
||||
@@ -39,7 +39,8 @@
|
||||
</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>
|
||||
<input type="hidden" name="short_code_entry_id" value="{{ $row->id }}" class="shortCodeEntryRowId">
|
||||
<a href="" class="btn btn-xs btn-primary shortCodeEditBtn"><i class="fa fa-edit"></i></a>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -42,7 +42,8 @@
|
||||
|
||||
<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>
|
||||
<input type="hidden" name="short_code_entry_id" value="{{ $row->id }}" class="shortCodeEntryRowId">
|
||||
<a href="" class="btn btn-xs btn-primary shortCodeEditBtn"><i class="fa fa-edit"></i></a>
|
||||
<a title="" data-val="{{ $row->id }}" class="btn btn-xs btn-danger removeCode"><i class="fa fa-trash"></i></a>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
@@ -39,7 +39,8 @@
|
||||
</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>
|
||||
<input type="hidden" name="short_code_entry_id" value="{{ $row->id }}" class="shortCodeEntryRowId">
|
||||
<a href="" class="btn btn-xs btn-primary shortCodeEditBtn"><i class="fa fa-edit"></i></a>
|
||||
<a title="" data-val="{{ $row->id }}" class="btn btn-xs btn-danger removeCode"><i class="fa fa-trash"></i></a>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
@include('client.partials.edit-notes')
|
||||
@include('client.partials.finance')
|
||||
@include('client.partials.create-shortcodes')
|
||||
@include('client.partials.edit-shortcodes')
|
||||
@include('client.partials.edit-finance')
|
||||
@include('client.partials.progress_indicator_details')
|
||||
<?php ?>
|
||||
|
||||
166
resources/views/utility/arraylogic.blade.php
Normal file
166
resources/views/utility/arraylogic.blade.php
Normal file
@@ -0,0 +1,166 @@
|
||||
@extends('layouts.master')
|
||||
@section('page_title')
|
||||
@if(isset($page_title))
|
||||
{{ $page_title }}
|
||||
@endif
|
||||
@endsection
|
||||
@section('css')
|
||||
<!-- JQVMap -->
|
||||
|
||||
@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 class=""><a href=""> Reports</a></li> -->
|
||||
<li class="active">Client Payments</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="title_right">
|
||||
<div class="row">
|
||||
<form method="GET" action="{!! url('clientpaymentreports') !!}">
|
||||
<div class="col-md-5 col-sm-5 col-xs-12 form-group">
|
||||
<div style="margin-top:1px; margin-right:-90px;" class="top_search">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search" style="margin-top: -2px;">
|
||||
<div class="input-group">
|
||||
<input type="text" name="keyword" class="form-control" id="keywordField" placeholder="Keyword here...">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-primary" style="color: #fff;" type="button">Go!</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</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> Testing </h2>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div class="x_content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="x_panel">
|
||||
<div class="x_title">
|
||||
<h2>Transaction Summary <small>Weekly progress</small></h2>
|
||||
<div class="filter">
|
||||
<div id="reportrange" class="pull-right" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc">
|
||||
<i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
|
||||
<span>December 30, 2014 - January 28, 2015</span> <b class="caret"></b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="x_content">
|
||||
<div class="col-md-9 col-sm-12 col-xs-12">
|
||||
<div class="demo-container" style="height:280px">
|
||||
<div id="chart_plot_02" class="demo-placeholder"></div>
|
||||
</div>
|
||||
<div class="tiles">
|
||||
<div class="col-md-4 tile">
|
||||
<span>Total Sessions</span>
|
||||
<h2>231,809</h2>
|
||||
<span class="sparkline11 graph" style="height: 160px;">
|
||||
<canvas width="200" height="60" style="display: inline-block; vertical-align: top; width: 94px; height: 30px;"></canvas>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-4 tile">
|
||||
<span>Total Revenue</span>
|
||||
<h2>$231,809</h2>
|
||||
<span class="sparkline22 graph" style="height: 160px;">
|
||||
<canvas width="200" height="60" style="display: inline-block; vertical-align: top; width: 94px; height: 30px;"></canvas>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-4 tile">
|
||||
<span>Total Sessions</span>
|
||||
<h2>231,809</h2>
|
||||
<span class="sparkline11 graph" style="height: 160px;">
|
||||
<canvas width="200" height="60" style="display: inline-block; vertical-align: top; width: 94px; height: 30px;"></canvas>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 col-sm-12 col-xs-12">
|
||||
<div>
|
||||
<div class="x_title">
|
||||
<h2>Top Profiles</h2>
|
||||
<ul class="nav navbar-right panel_toolbox">
|
||||
<li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="#">Settings 1</a>
|
||||
</li>
|
||||
<li><a href="#">Settings 2</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="close-link"><i class="fa fa-close"></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('javascript')
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
|
||||
// $('#financeServicesStore').change(function(evtt){
|
||||
console.log('we have changed');
|
||||
var currentServices =['USSD', 'SMS', 'IVR', 'Hosting', 'Ninped'];
|
||||
console.log(currentServices);
|
||||
// var myarr = ["USSD", "like", "turtles"];
|
||||
var selected_services = ["USSD", "SMS"]
|
||||
// var checkArray = $.inArray(selected_services, currentServices) > -1;
|
||||
// console.log(checkArray);
|
||||
// var success = selected_services.every(function(val) {
|
||||
// return currentServices.indexOf(val) !== -1;
|
||||
// });
|
||||
// var success = $.grep(currentServices, function(v,i) {
|
||||
// return $.inArray(v, selected_services) !== -1;
|
||||
// }).length === selected_services.length;
|
||||
let success = selected_services.every((val) => currentServices.includes(val));
|
||||
console.log(success);
|
||||
// });
|
||||
//
|
||||
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -22,12 +22,17 @@ Auth::routes();
|
||||
|
||||
Route::get('/home', 'HomeController@index')->name('home');
|
||||
*/
|
||||
// Route::post('testjs', 'UtilityController@showPage');
|
||||
// Route::get('/testjs', function () {
|
||||
// return view('contacts');
|
||||
// return view('utility.arraylogic');
|
||||
// });
|
||||
//Route::post('ipstore', 'NetworkOperatorsController@ipStore');
|
||||
|
||||
Route::get('testemail', 'UtilityController@EmailTest');
|
||||
Route::get('testmno', 'ContractRenewalReminderController@getMnos');
|
||||
Route::get('ntfy', 'UtilityController@ntfyTest');
|
||||
Route::get('client-renewal', 'ClientContractRenewalAlertsController@getClientDetails');
|
||||
//Route::get('testemail', 'UtilityController@EmailTest');
|
||||
//Route::get('testmno', 'ContractRenewalReminderController@getMnos');
|
||||
//Route::get('ntfy', 'UtilityController@ntfyTest');
|
||||
//Route::get('client-renewal', 'ClientContractRenewalAlertsController@getClientDetails');
|
||||
//insertOnboardingProgress
|
||||
|
||||
|
||||
@@ -94,8 +99,10 @@ Route::group(['middleware' => ['checklogin', 'checkcurrentlylogged']], function(
|
||||
Route::post('clients/notes_store', 'ClientsController@notesStore');
|
||||
Route::post('clients/finance_store', 'ClientsController@financeStore');
|
||||
Route::post('clients/finance_update', 'ClientsController@financeUpdate');
|
||||
Route::post('clients/shortcode_update', 'ClientsController@shortCodeUpdate');
|
||||
|
||||
Route::get('clients/get_payment/{id}', 'ClientsController@getPayment');
|
||||
Route::get('clients/get_shortcode/{id}', 'ClientsController@getShortCodeDetails');
|
||||
Route::get('clients/get_note/{id}', 'ClientsController@getSingleNote');
|
||||
Route::get('clients/create-notes', 'ClientsController@createNotes');
|
||||
Route::get('clients/shortcodes/{type}', 'ClientsController@getShortCodes');
|
||||
|
||||
1
storage/laravel-2024-06-11.log
Normal file
1
storage/laravel-2024-06-11.log
Normal file
@@ -0,0 +1 @@
|
||||
[2024-06-11 21:10:55] production.INFO: Kwesi Banson Successfully logged in at : 2024-06-11 21:10:55
|
||||
Reference in New Issue
Block a user