added sender ID to the clients Tab in Show view plus bug fixes

This commit is contained in:
Kwesi Banson
2024-08-26 10:23:49 +00:00
parent 4a0248e40d
commit 6cede6d980
54 changed files with 1948 additions and 120 deletions

View File

@@ -0,0 +1,44 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Http\Controllers\ContractRenewalReminderController;
class ProcessSupportFeesRenewalReminders extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'support_fees_renewal:send';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Send Reminders on Support Fees';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct(ContractRenewalReminderController $contractRenewalReminder)
{
parent::__construct();
$this->contractRenewalReminder = $contractRenewalReminder;
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->contractRenewalReminder->getSupportFeesList();
}
}

View File

@@ -29,6 +29,7 @@ class Kernel extends ConsoleKernel
// ->hourly();
$schedule->command('renewal:send')->weekdays()->at('13:00');
$schedule->command('client_renewal:send')->weekdays()->at('14:00');
$schedule->command('support_fees_renewal:send')->weekdays()->at('15:00');
}
/**

View File

@@ -13,6 +13,7 @@ use App\Jobs\SendOnboardingCompletedEmailAlert;
use App\Http\Requests;
use Carbon\Carbon;
use App\Libs\PaperLessNgx;
use Spatie\Activitylog\Models\Activity;
class ClientsController extends Controller
{
@@ -22,6 +23,21 @@ class ClientsController extends Controller
* @return \Illuminate\Http\Response
*/
public function index(){
/*
$currentuser = session('current_user.name');
$user_model = Models\SystemUser::find(session('current_user.id'));
#\Auth::user()->actions;
$actions = $user_model->actions;
dd($actions);
$clientModel = new Models\Client;
$currentuser = session('current_user.name');
$user_model = Models\SystemUser::find(session('current_user.id'));
activity()->performedOn($clientModel)
->causedBy($user_model)
->log($currentuser . ' Opened the Client Module at: ' . date('Y-m-d H:i:s'));
*/
// ->log('viewed');
/*
$client = Models\Client::find(3);
dd($client->client_services);
@@ -341,11 +357,20 @@ class ClientsController extends Controller
'invoice_amount' => 'required|numeric',
'invoice_date' => 'required',
'invoice_status' => 'required',
'short_code' => 'sometimes|numeric'
// 'short_code' => 'sometimes|numeric'
]);
$auth_user = session('current_user');
// dump($request->has('short_code'));
//dd($request->all());
// dump($request->short_code);
if ($request->short_code !== null) {
$check = is_numeric($request->short_code);
if ($check == false) {
$data = ['code' => 3, 'msg' => 'Short Code must be a number'];
return response()->json($data, 200);
}
}
// dd($request->all());
$finance_arr = [
'invoice_number' => $request->invoice_number,
'invoice_amount' => $request->invoice_amount,
@@ -359,7 +384,7 @@ class ClientsController extends Controller
if ($request->has('remarks')) {
$finance_arr['remarks'] = $request->remarks;
}
// dd($finance_arr);
$result = Models\ClientPayment::create($finance_arr);
#$payments = Models\ClientPayment::with('client_info', 'created_by_info')->find($result->id);
@@ -591,6 +616,14 @@ class ClientsController extends Controller
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);
//$clientModel = new Models\Client;
/*
$currentuser = session('current_user.name');
$user_model = Models\SystemUser::find(session('current_user.id'));
activity()->performedOn($showclient)
->causedBy($user_model)
->log($currentuser . ' Opened the page for : ' . $showclient->name . date('Y-m-d H:i:s'));
*/
// dd(json_decode($showclient->progress_indicators, true));
/*
"Initial talks\/ discussions",
@@ -629,6 +662,7 @@ class ClientsController extends Controller
$support_fees = Models\ClientSupportFees::where('client_id', $id)->orderBy('id', 'DESC')->get();
$showdocuments = Models\ClientFile::where('client_id', $id)->get();
$client_sender_ids = Models\SenderId::with('network_info', 'created_by_info')->where('client_id', $id)->orderBy('senderid', 'ASC')->get();
// dd($showdocuments[0]->name);
if ($showclient->status == 'Live') {
$status_bg = "info";
@@ -697,7 +731,7 @@ class ClientsController extends Controller
sort($networks_raw);
$recurring_arr = ['NO' => 'NO', 'Monthly' => 'Monthly', 'Quarterly' => 'Quarterly', 'Semiannual' => 'Semiannual', 'Yearly' => 'Yearly'];
$sender_id_statuses = ['Pending' => 'Pending', 'Inactive' => 'Inactive', 'Approved' => 'Approved'];
$data = [
'page_title' => 'Client Profile',
'showclient' => $showclient,
@@ -719,8 +753,14 @@ class ClientsController extends Controller
'highlight_colour' => $highlight_colour,
'showdocuments' => $showdocuments,
'support_fees' => $support_fees,
'recurring_arr' => $recurring_arr
'recurring_arr' => $recurring_arr,
'client_sender_ids' => $client_sender_ids,
'sender_id_statuses' => $sender_id_statuses
];
// dump($client_sender_ids);
// foreach ($client_sender_ids as $value) {
// dd($value->network_info->name);
// }
return view('client.show', $data);
}
@@ -1070,6 +1110,7 @@ class ClientsController extends Controller
*/
public function update(Requests\UpdateClientRequest $request, $id){
// dump($request->all());
// \DB::connection()->enableQueryLog();
$client_update = Models\Client::find($id);
$paperless = new PaperLessNgx();
if ($client_update->progress_indicator != 'COMPLETED') {
@@ -1117,7 +1158,6 @@ class ClientsController extends Controller
$existing_documents = Models\ClientFile::where('client_id', $id)->get();
if ($request->has('document_one') && $request->has('document_one_name')) {
if ($request->file('document_one')->isValid()) {
$filename = "erp_" . time() . str_random(4) . "." . $request->document_one->extension();
@@ -1270,6 +1310,10 @@ class ClientsController extends Controller
'device' => $request->header('User-Agent')
];
$retval = Models\UserActivity::create($activity_arr);
// $queries = \DB::getQueryLog();
// dd($queries);
// \Log::info($queries);
Session::flash('success_message', 'Client successfully Updated');
return redirect(url('clients', $id));
}

View File

@@ -9,6 +9,7 @@ use App\Models;
use Session;
use Illuminate\Support\Arr;
use App\Jobs\SendMnoContractRenewalEmailAlert;
use App\Jobs\SendSupportFeesReminderEmailAlert;
use App\Http\Requests;
use Carbon\Carbon;
@@ -36,4 +37,51 @@ class ContractRenewalReminderController extends Controller
\Log::info('MNOs due for renewal ' . $log_data);
$this->sendNtfy('MNOs due for renewal ' . $log_data);
}
public function getSupportFeesList(){
$support_fees_arr = Models\ClientSupportFees::with('created_by_info', 'client_info')->where('recurring', '<>', 'NO')->get();
// dd($support_fees_arr);
$renew_ready = [];
$current_date = date('Y-m-d');
foreach ($support_fees_arr as $value) {
// dd($value->created_by_info);
$date1 = date_create($current_date);
switch ($value->recurring) {
case 'Annual':
$date2 = date('Y-m-d', strtotime('+1 year', strtotime($value->invoice_date)));
$date2 = date_create($value->invoice_date);
$difference = date_diff($date1, $date2);
break;
case 'Semiannual':
$date2 = date('Y-m-d', strtotime('+6 months', strtotime($value->invoice_date)));
$date2 = date_create($value->invoice_date);
$difference = date_diff($date1, $date2);
break;
case 'Quarterly':
$date2 = date('Y-m-d', strtotime('+3 months', strtotime($value->invoice_date)));
$date2 = date_create($value->invoice_date);
$difference = date_diff($date1, $date2);
break;
case 'Monthly':
$date2 = date('Y-m-d', strtotime('+1 month', strtotime($value->invoice_date)));
$date2 = date_create($date2);
$difference = date_diff($date1, $date2);
break;
default:
continue 2;
break;
}
}
if ($difference->days <= 10) {
$renew_ready['client_name'] = $value->client_info->name;
$renew_ready['account_manager_email'] = $value->created_by_info->email;
$renew_ready['days_to_renew'] = $difference->days;
dispatch(new SendSupportFeesReminderEmailAlert($renew_ready));
}
\Log::info('Support Fees Reminder schedule has successfully ran ');
if (count($renew_ready) > 0) {
$log_data = implode(', ', $renew_ready);
\Log::info('Support Fees Reminder for ' . $log_data);
$this->sendNtfy('Support Fees due for renewal ' . $log_data);
}
}
}

View File

@@ -64,6 +64,15 @@ class Controller extends BaseController{
$retval = Models\UserActivity::create($activity_arr);
return true;
}
public function logUsersActivityTwo($content){
$clientModel = new Models\Client;
$currentuser = session('current_user.name');
$user_model = Models\SystemUser::find(session('current_user.id'));
activity()->performedOn($clientModel)
->causedBy($user_model)
->log($currentuser . ' Opened the Client Module at: ' . date('Y-m-d H:i:s'));
return true;
}
public function storeLoggedUser(){
$user_id = session('current_user.id');
$logged_arr = [

View File

@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models;
use Spatie\Activitylog\Models\Activity;
class LoginController extends Controller
{
@@ -32,7 +33,9 @@ class LoginController extends Controller
$request->session()->put('current_user.designation', $logged_in->designation_info->name);
\Log::info($logged_in->name . ' Successfully logged in at : ' . date('Y-m-d H:i:s'));
$content = $logged_in->name . " Successfully Logged In";
activity()->log($logged_in->name . ' Successfully logged in at : ' . date('Y-m-d H:i:s'));
$this->logUsersActivity($type = 'staff', $content, $logged_in->id);
$this->deleteLoggedUser();
@@ -62,7 +65,8 @@ class LoginController extends Controller
$request->session()->flush();
$request->session()->regenerate(true);
$this->logUsersActivity($type = 'staff', $content, $user_id);
activity()->log($username . " Logged Out : " . date('Y-m-d H:i:s'));
// $this->logUsersActivity($type = 'staff', $content, $user_id);
return redirect("/");
}

View File

@@ -21,8 +21,7 @@ class NetworkOperatorsController extends Controller
*
* @return \Illuminate\Http\Response
*/
public function indexBAK()
{
public function indexBAK(){
$network_operators = new Models\NetworkOps;
$table_columns = \DB::select(\DB::raw("show full columns from network_operators"));
$exclude_arr = [
@@ -99,14 +98,16 @@ class NetworkOperatorsController extends Controller
$account_manager = Models\SystemUser::pluck('name', 'id');
$services = Models\Service::pluck('name', 'name');
$status = ['Active' => 'Active', 'Inactive' => 'Inactive', 'Pending' => 'Pending'];
$direct_arr = ['Direct' => 'Direct', 'Non Direct' => 'Non Direct'];
// dd('foo bar');
$data = [
'page_title' => 'Create Network Operator',
'countries'=> $countries,
'account_manager' => $account_manager,
'services' => $services,
'status' => $status
'status' => $status,
'direct_arr' => $direct_arr
];
return view('network_ops.create', $data);
}
@@ -119,12 +120,14 @@ class NetworkOperatorsController extends Controller
public function store(Request $request){
$request->validate([
'name' => 'required',
'direct_status' => 'required',
'country' => 'required',
'account_manager_id' => 'required',
'services' => 'required',
'contact_person' => 'required',
'email' => 'required',
'phone' => 'required'
'account_manager_id' => 'required_if:direct_status,Direct',
'services' => 'required_if:direct_status,Direct',
'contact_person' => 'required_if:direct_status,Direct',
'email' => 'required_if:direct_status,Direct',
'phone' => 'required_if:direct_status,Direct',
'status' => 'required'
]);
$operator_arr = [
@@ -140,6 +143,9 @@ class NetworkOperatorsController extends Controller
if ($request->has('services')) {
$operator_arr['services'] = json_encode($request->services);
}
if ($request->account_manager_id == false) {
$operator_arr['account_manager_id'] = session('current_user.id');
}
if ($request->has('phone')) {
$operator_arr['phone'] = $request->phone;
}
@@ -152,7 +158,7 @@ class NetworkOperatorsController extends Controller
if ($request->has('contact_person')) {
$operator_arr['contact_person'] = $request->contact_person;
}
// dd($operator_arr);
$saved = Models\NetworkOps::create($operator_arr);
Session::flash('success_message', 'Network Operator successfully added');
return redirect(url('mnos'));

View File

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

View File

@@ -26,6 +26,7 @@ class ReportsController extends Controller
}
public function getRecentClientsJson(){
// $period = $request->period;
// $clients = Models\Client::where()->get();
/*
$clients = \DB::table('clients')

View File

@@ -145,4 +145,28 @@ class SenderIdController extends Controller
Session::flash('success_message', 'Sender ID successfully Updated');
return redirect(url('senderids'));
}
public function direct_store(Request $request)
{
$request->validate([
'senderid' => 'required|max:11',
'network_id' => 'required',
'status' => 'required',
'remarks' => 'sometimes',
]);
$senderid_arr = $request->except('_token');
$senderid_arr['created_by'] = session('current_user.id');
$senderid_arr['last_modified_by'] = session('current_user.id');
$senderid_arr['remarks'] = $request->remarks ?? '';
$result = Models\SenderId::create($senderid_arr);
if($result){
return response()->json([ 'code' => 1, 'result' => 'success']);
}
else {
return response()->json([ 'code' => 3, 'msg' => 'Request could not be handled at this time']);
}
}
}

View File

@@ -0,0 +1,145 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models;
use Session;
class SystemCredentialsController extends Controller{
public function index(){
$data = [
'page_title' => 'Credentials',
];
return view('sys_credentials.index', $data);
}
public function getCredListJson(Request $request){
//$this->log_query();
$credentials_arr = \DB::table('sys_credentials')
->join('auth_users AS userModify', 'userModify.id', '=', 'sys_credentials.last_modified_by_id')
->join('auth_users AS userCreate', 'userCreate.id', '=', 'sys_credentials.created_by_id')
->join('clients', 'clients.id', '=', 'sys_credentials.client_id')
->join('network_operators', 'network_operators.id', '=', 'sys_credentials.network_operator_id')
->select('sys_credentials.id', 'clients.name AS clientName', 'network_operators.name AS networkOpsName', 'sys_credentials.service', 'userCreate.name AS created_by_user', 'userModify.name AS modified_by_user', 'sys_credentials.client_id','sys_credentials.network_operator_id', 'sys_credentials.url_endpoint', 'sys_credentials.credentials', 'sys_credentials.expiry_date', 'sys_credentials.remarks', 'sys_credentials.created_at', 'sys_credentials.updated_at')
->orderBy('sys_credentials.service', 'ASC')
->paginate(20);
if($request->has('keyword')){
$keyword = $request->keyword;
$credentials_arr = \DB::table('sys_credentials')
->join('auth_users AS userModify', 'userModify.id', '=', 'sys_credentials.last_modified_by_id')
->join('auth_users AS userCreate', 'userCreate.id', '=', 'sys_credentials.created_by_id')
->join('clients', 'clients.id', '=', 'sys_credentials.client_id')
->join('network_operators', 'network_operators.id', '=', 'sys_credentials.network_operator_id')
->select('sys_credentials.id', 'clients.name AS clientName', 'network_operators.name AS networkOpsName', 'sys_credentials.service', 'userCreate.name AS created_by_user', 'userModify.name AS modified_by_user', 'sys_credentials.client_id','sys_credentials.network_operator_id', 'sys_credentials.url_endpoint', 'sys_credentials.credentials', 'sys_credentials.expiry_date', 'sys_credentials.remarks', 'sys_credentials.created_at', 'sys_credentials.updated_at')
->whereRaw("sys_credentials.service LIKE '%$keyword%' OR userCreate.name LIKE '%$keyword%' OR sys_credentials.url_endpoint LIKE '%$keyword%' OR sys_credentials.expiry_date LIKE '%$keyword%' OR userModify.name LIKE '%$keyword%' OR sys_credentials.created_at LIKE '%$keyword%' OR sys_credentials.remarks LIKE '%$keyword%' OR sys_credentials.updated_at LIKE '%$keyword%' OR network_operators.name LIKE '%$keyword%'")
->orderBy('sys_credentials.service', 'ASC')
->paginate(15);
}
return response()->json($credentials_arr);
}
public function create(){
$networks = \DB::table('network_operators')->Select(\DB::raw('id, concat(name, " (", country, ")") AS network'))->orderBy('network')->get()->toArray();
$network_arr = array_pluck($networks, 'network', 'id');
$services = Models\Service::pluck('name', 'name');
$clients = Models\Client::pluck('name', 'id');
$auth_users = Models\SystemUser::pluck('name', 'id');
$data = [
'page_title' => 'System Credentialss',
'clients' => $clients,
'network_arr' => $network_arr,
'services' => $services,
'auth_users' => $auth_users
];
return view('sys_credentials.create', $data);
}
public function store(Request $request){
$request->validate([
'service' => 'required',
'client_id' => 'required',
'network_operator_id' => 'required',
'url_endpoint' => 'required',
'credentials' => 'required',
'expiry_date' => 'required',
'remarks' => 'sometimes',
]);
// dump($request->all());
$credentials_arr = $request->except('_token');
$credentials_arr['last_modified_by_id'] = session('current_user.id');
$credentials_arr['created_by_id'] = session('current_user.id');
// dd($credentials_arr);
// TODO: add user activity here
$result = Models\SystemCredential::create($credentials_arr);
Session::flash('success_message', 'Credentials successfully added');
return redirect(url('systemcreds'));
}
public function edit($id){
$credential = Models\SystemCredential::find($id);
$networks = \DB::table('network_operators')->Select(\DB::raw('id, concat(name, " (", country, ")") AS network'))->orderBy('network')->get()->toArray();
$network_arr = array_pluck($networks, 'network', 'id');
$clients = Models\Client::pluck('name', 'id');
$auth_users = Models\SystemUser::pluck('name', 'id');
$data = [
'page_title' => 'System Credentials',
'credential' => $credential,
'clients' => $clients,
'network_arr' => $network_arr,
'auth_users' => $auth_users
];
return view('sys_credentials.edit', $data);
}
public function update(Request $request, $id){
$request->validate([
'friendly_name' => 'required',
'server_id' => 'required',
'public_ip_address' => 'sometimes|ip',
'private_ip_address' => 'sometimes|nullable|ip',
'main_use' => 'required',
'remarks' => 'nullable',
'status' => 'required',
'server_number' => 'required',
]);
$server = Models\ClickServer::findOrFail($id);
$server_arr = $request->except('_token', 'server_id', 'server_number');
$server_arr['last_modified_by_id'] = session('current_user.id');
$server_arr['server_id'] = $request->server_number;
$result = $server->update($server_arr);
Session::flash('success_message', 'Server Details successfully updated');
return redirect(url('infrastructure/server-list'));
}
public function reveal_password($id){
$server = Models\ClickServer::find($id);
if ($server) {
$response_arr = [
'code' => 1,
'password' => decrypt($server->root_password)
];
}
else{
$response_arr = [
'code' => 3,
'msg' => 'not found'
];
}
return response()->json($response_arr);
}
}

View File

@@ -5,13 +5,16 @@ namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models;
use Spatie\Activitylog\Models\Activity;
// use Illuminate\Contracts\Mail\Mailer;
class UtilityController extends Controller
{
public function underconstruction(){
return view('utility.underconstruction');
}
public function EmailTest(Mailer $mailer)
{
@@ -28,6 +31,11 @@ class UtilityController extends Controller
$message->to($emails)->subject('New Notes');
});
}
/**
* maptest function to display the map view.
*
* @return Illuminate\View\View
*/
public function maptest(){
return view('utility.map');
@@ -111,5 +119,31 @@ class UtilityController extends Controller
}
dump($count_cl);
}
function loggingTest(){
$rando = uniqid();
$newsItem = Models\Utility::create([
'name' => 'original name : ' . $rando,
'type' => 'Lorum'
]);
$activity = Activity::all()->last();
dump($activity->description); //returns 'created'
dump($activity->subject); //returns the instance of NewsItem that was created
dump($activity->changes); //returns ['attributes' => ['name' => 'original name', 'text' => 'Lorum']];
//
$rando = uniqid();
$newsItem->name = 'updated name to something like this ' . $rando;
$newsItem->type = 'franko';
$newsItem->save();
//updating the newsItem will cause an activity being logged
$activity_up = Activity::all()->last();
dump($activity_up);
dump($activity_up->description); //returns 'updated'
dump($activity_up->subject); //returns the instance of NewsItem that was created
dump($activity_up->changes);
}
}
// https://www.tokyvideo.com/video/sheena-the-queen-of-the-jungle-1984-movie-with-tanya-roberts-ted-wass-donovan-scott

View File

@@ -17,6 +17,7 @@ class CheckCurrentlyLoggedInUsers
{
if($request->session()->has('current_user')){
$id = session('current_user.id');
$device = $request->server('HTTP_USER_AGENT');
$realm = $id . $device;
$current_user = Models\LoggedUser::where('user_id', $id)->where('device', $device)->first();

View File

@@ -0,0 +1,52 @@
<?php
namespace App\Jobs;
use App\Models;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Contracts\Mail\Mailer;
class SendSupportFeesReminderEmailAlert implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
protected $renewalSet;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($renewalSet)
{
$this->renewalSet = $renewalSet;
}
/**
* Execute the job.
*
* @return void
*/
public function handle(Mailer $mailer){
$renewalSet = $this->renewalSet;
$emails = ['samuel@click-mobile.com'];
$emails = ['kwesi@click-mobile.com'];
$emails = ['effie@click-mobile.com'];
$emails = ['priscilla@click-mobile.com'];
$emails = ['jim@click-mobile.com'];
$emails = ['daniel@click-mobile.com'];
$emails = ['mansa@click-mobile.com'];
$emails[] = $renewalSet['account_manager_email'];
$data = [
'client_name' => $renewalSet['client_name'],
'alert_body' => 'Support fees for ' . $renewalSet['client_name'] . ' will be due in ' . $renewalSet['days_to_renew'] . ' days. Take note'
];
$mailer->send('emails.supportfees-alert', $data, function ($message) use ($data, $emails) {
$message->from('support@click-mobile.com', 'Click Mobile ERP');
$message->to($emails)->subject('Support Fees Reminder');
});
}
}

View File

@@ -4,11 +4,29 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Models;
#use Spatie\Activitylog\Traits\LogsActivity;
//use Spatie\Activitylog\Traits\CausesActivity;
#use Spatie\Activitylog\LogOptions;
class Client extends Model
{
#use LogsActivity;
protected $guarded = array('id');
public $table = "clients";
protected $appends = ['client_services'];
/*
protected static $logName = 'clients_log';
protected static $logOnlyDirty = true;
protected static $dontSubmitEmptyLogs = true;
protected static $logUnguarded = true;
public function getActivitylogOptions(): LogOptions{
return LogOptions::defaults()
->logUnguarded()->useLogName('client')->logOnlyDirty()->dontSubmitEmptyLogs();
}
*/
/*
public function getprogressIndicatorsAttribute($value){

View File

@@ -3,10 +3,17 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Spatie\Activitylog\Traits\LogsActivity;
use Spatie\Activitylog\LogOptions;
class ClientNote extends Model
{
protected $guarded = array('id');
protected static $logUnguarded = true;
public function getActivitylogOptions(): LogOptions{
return LogOptions::defaults()->logUnguarded();
}
public function client_info(){
return $this->hasOne('App\Models\Client', 'id', 'client_id');

View File

@@ -14,6 +14,6 @@ class ClientSupportFees extends Model
}
public function created_by_info(){
// return $this->hasOne('App\Models\Account', 'id', 'auth_user_id');
return $this->hasOne('App\Models\SystemUser', 'id', 'auth_user_id');
return $this->hasOne('App\Models\SystemUser', 'id', 'user_id');
}
}

View File

@@ -11,6 +11,6 @@ class LoggedUser extends Model
public function auth_user_info(){
return $this->hasOne('App\Models\Account', 'id', 'user_id');
return $this->hasOne('App\Models\SystemUser', 'id', 'user_id');
}
}

View File

@@ -3,17 +3,33 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Spatie\Activitylog\Traits\LogsActivity;
use Spatie\Activitylog\LogOptions;
class SenderId extends Model{
use LogsActivity;
protected $guarded = array('id');
public $table = "sender_ids";
protected static $logName = 'senderid_log';
// protected static $causedBy = $user_model;
protected static $logOnlyDirty = true;
protected static $dontSubmitEmptyLogs = true;
protected static $logUnguarded = true;
public function getActivitylogOptions(): LogOptions{
return LogOptions::defaults()
->logUnguarded()->useLogName('senderid_log')->logOnlyDirty()->dontSubmitEmptyLogs();
}
public function modified_by_info(){
return $this->hasOne('App\Models\StaffMember', 'id', 'last_modified_by');
}
public function network_info(){
return $this->hasOne('App\Models\NetworkOps', 'id', 'netowkr_id');
return $this->hasOne('App\Models\NetworkOps', 'id', 'network_id');
}
public function created_by_info(){
return $this->hasOne('App\Models\StaffMember', 'id', 'created_by');

View File

@@ -0,0 +1,24 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class SystemCredential extends Model{
protected $guarded = array('id');
public $table = "sys_credentials";
public function modified_by_info(){
return $this->hasOne('App\Models\SystemUser', 'id', 'last_modified_by_id');
}
public function network_info(){
return $this->hasOne('App\Models\NetworkOps', 'id', 'network_id');
}
public function client_info(){
return $this->hasOne('App\Models\Client', 'id', 'client_id');
}
public function created_by_info(){
return $this->hasOne('App\Models\SystemUser', 'id', 'created_by_id');
}
}

View File

@@ -3,11 +3,20 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
// use Spatie\Activitylog\Traits\LogsActivity;
use Spatie\Activitylog\Traits\CausesActivity;
use Spatie\Activitylog\LogOptions;
class SystemUser extends Model
{
// use LogsActivity;
use CausesActivity;
protected $guarded = array('id');
public $table = "auth_users";
protected static $logUnguarded = true;
// public function getActivitylogOptions(): LogOptions{
// return LogOptions::defaults()->logUnguarded();
// }
public function designation_info(){
return $this->hasOne('App\Models\Designation', 'id', 'designation');

View File

@@ -14,6 +14,9 @@ class UserActivity extends Model
public function userInfo(){
return $this->hasOne('App\Models\StaffMember', 'id', 'user_id');
}
public function userInfoSystem(){
return $this->hasOne('App\Models\SystemUser', 'id', 'user_id');
}
public function getActivityTimeAttribute(){
$created = $this->created_at;
$parsed_created_date = Carbon::parse($created);

23
app/Models/Utility.php Normal file
View File

@@ -0,0 +1,23 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Spatie\Activitylog\Traits\LogsActivity;
use Spatie\Activitylog\LogOptions;
class Utility extends Model{
use LogsActivity;
protected $guarded = ['id'];
protected $table = "utility";
protected static $logUnguarded = true;
public function getActivitylogOptions(): LogOptions
{
return LogOptions::defaults()
->logUnguarded();
// ->logOnly(['name', 'type']);
// Chain fluent methods for configuration options
}
}

View File

@@ -10,7 +10,8 @@
"laravel/framework": "5.5.*",
"laravel/tinker": "~1.0",
"laravelcollective/html": "^5.4.0",
"maatwebsite/excel": "^3.1"
"maatwebsite/excel": "^3.1",
"spatie/laravel-activitylog": "^3.2"
},
"require-dev": {
"filp/whoops": "~2.0",

272
composer.lock generated
View File

@@ -4,8 +4,63 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "1b55af854942faedd605d375de12227b",
"content-hash": "6220800cdce8e79b948fcc3175695707",
"packages": [
{
"name": "anahkiasen/underscore-php",
"version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/Anahkiasen/underscore-php.git",
"reference": "48f97b295c82d99c1fe10d8b0684c43f051b5580"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Anahkiasen/underscore-php/zipball/48f97b295c82d99c1fe10d8b0684c43f051b5580",
"reference": "48f97b295c82d99c1fe10d8b0684c43f051b5580",
"shasum": ""
},
"require": {
"doctrine/inflector": "^1.0",
"patchwork/utf8": "^1.2",
"php": ">=5.4.0"
},
"require-dev": {
"fabpot/php-cs-fixer": "2.0.*@dev",
"phpunit/phpunit": "^4.6"
},
"type": "library",
"autoload": {
"psr-4": {
"Underscore\\": [
"src",
"tests"
]
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Maxime Fabre",
"email": "ehtnam6@gmail.com"
}
],
"description": "A redacted port of Underscore.js for PHP",
"keywords": [
"internals",
"laravel",
"toolkit"
],
"support": {
"issues": "https://github.com/Anahkiasen/underscore-php/issues",
"source": "https://github.com/Anahkiasen/underscore-php/tree/develop"
},
"abandoned": true,
"time": "2015-05-16T19:24:58+00:00"
},
{
"name": "dnoegel/php-xdg-base-dir",
"version": "v0.1.1",
@@ -1679,6 +1734,83 @@
},
"time": "2020-10-15T08:29:30+00:00"
},
{
"name": "patchwork/utf8",
"version": "v1.3.3",
"source": {
"type": "git",
"url": "https://github.com/tchwork/utf8.git",
"reference": "e1fa4d4a57896d074c9a8d01742b688d5db4e9d5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tchwork/utf8/zipball/e1fa4d4a57896d074c9a8d01742b688d5db4e9d5",
"reference": "e1fa4d4a57896d074c9a8d01742b688d5db4e9d5",
"shasum": ""
},
"require": {
"lib-pcre": ">=7.3",
"php": ">=5.3.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^3.4|^4.4"
},
"suggest": {
"ext-iconv": "Use iconv for best performance",
"ext-intl": "Use Intl for best performance",
"ext-mbstring": "Use Mbstring for best performance",
"ext-wfio": "Use WFIO for UTF-8 filesystem access on Windows"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3-dev"
}
},
"autoload": {
"psr-4": {
"Patchwork\\": "src/Patchwork/"
},
"classmap": [
"src/Normalizer.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"(Apache-2.0 or GPL-2.0)"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
}
],
"description": "Portable and performant UTF-8, Unicode and Grapheme Clusters for PHP",
"homepage": "https://github.com/tchwork/utf8",
"keywords": [
"grapheme",
"i18n",
"unicode",
"utf-8",
"utf8"
],
"support": {
"issues": "https://github.com/tchwork/utf8/issues",
"source": "https://github.com/tchwork/utf8/tree/v1.3.3"
},
"funding": [
{
"url": "https://github.com/nicolas-grekas",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/patchwork/utf8",
"type": "tidelift"
}
],
"abandoned": "symfony/polyfill-mbstring or symfony/string",
"time": "2021-01-07T16:38:58+00:00"
},
{
"name": "phpoffice/phpspreadsheet",
"version": "1.29.0",
@@ -2274,6 +2406,144 @@
],
"time": "2021-08-06T20:32:15+00:00"
},
{
"name": "spatie/laravel-activitylog",
"version": "3.2.2",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-activitylog.git",
"reference": "8db5d2f314a26ee9a1617bdecd98947fdf29fcfa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-activitylog/zipball/8db5d2f314a26ee9a1617bdecd98947fdf29fcfa",
"reference": "8db5d2f314a26ee9a1617bdecd98947fdf29fcfa",
"shasum": ""
},
"require": {
"illuminate/config": "~5.5.0|~5.6.0|~5.7.0|~5.8.0",
"illuminate/database": "~5.5.0|~5.6.0|~5.7.0|~5.8.0",
"illuminate/support": "~5.5.0|~5.6.0|~5.7.0|~5.8.0",
"php": "^7.1",
"spatie/string": "^2.1"
},
"require-dev": {
"ext-json": "*",
"orchestra/testbench": "~3.5.0|~3.6.0|~3.7.0|~3.8.0",
"phpunit/phpunit": "^7.4 | ^8.0",
"scrutinizer/ocular": "^1.5"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Spatie\\Activitylog\\ActivitylogServiceProvider"
]
}
},
"autoload": {
"files": [
"src/helpers.php"
],
"psr-4": {
"Spatie\\Activitylog\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Sebastian De Deyne",
"email": "sebastian@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
},
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "A very simple activity logger to monitor the users of your website or application",
"homepage": "https://github.com/spatie/activitylog",
"keywords": [
"activity",
"laravel",
"log",
"spatie",
"user"
],
"support": {
"issues": "https://github.com/spatie/laravel-activitylog/issues",
"source": "https://github.com/spatie/laravel-activitylog/tree/master"
},
"time": "2019-02-27T12:41:17+00:00"
},
{
"name": "spatie/string",
"version": "2.2.3",
"source": {
"type": "git",
"url": "https://github.com/spatie/string.git",
"reference": "79ed501c8d624fb85bf71da4254e1878fb616c51"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/string/zipball/79ed501c8d624fb85bf71da4254e1878fb616c51",
"reference": "79ed501c8d624fb85bf71da4254e1878fb616c51",
"shasum": ""
},
"require": {
"anahkiasen/underscore-php": "^2.0",
"php": "^7.0|^8.0"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
},
"type": "library",
"autoload": {
"files": [
"src/string_functions.php"
],
"psr-4": {
"Spatie\\String\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "String handling evolved",
"homepage": "https://github.com/spatie/string",
"keywords": [
"handling",
"handy",
"spatie",
"string"
],
"support": {
"issues": "https://github.com/spatie/string/issues",
"source": "https://github.com/spatie/string/tree/2.2.3"
},
"funding": [
{
"url": "https://spatie.be/open-source/support-us",
"type": "custom"
}
],
"time": "2020-11-28T22:24:20+00:00"
},
{
"name": "swiftmailer/swiftmailer",
"version": "v6.2.7",

45
config/activitylog.php Normal file
View File

@@ -0,0 +1,45 @@
<?php
return [
/*
* If set to false, no activities will be saved to the database.
*/
'enabled' => env('ACTIVITY_LOGGER_ENABLED', true),
/*
* When the clean-command is executed, all recording activities older than
* the number of days specified here will be deleted.
*/
'delete_records_older_than_days' => 365,
/*
* If no log name is passed to the activity() helper
* we use this default log name.
*/
'default_log_name' => 'default',
/*
* You can specify an auth driver here that gets user models.
* If this is null we'll use the default Laravel auth driver.
*/
'default_auth_driver' => null,
/*
* If set to true, the subject returns soft deleted models.
*/
'subject_returns_soft_deleted_models' => false,
/*
* This model will be used to log activity.
* It should be implements the Spatie\Activitylog\Contracts\Activity interface
* and extend Illuminate\Database\Eloquent\Model.
*/
'activity_model' => \Spatie\Activitylog\Models\Activity::class,
/*
* This is the name of the table that will be created by the migration and
* used by the Activity model shipped with this package.
*/
'table_name' => 'activity_log',
];

View File

@@ -0,0 +1,38 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateActivityLogTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create(config('activitylog.table_name'), function (Blueprint $table) {
$table->increments('id');
$table->string('log_name')->nullable();
$table->text('description');
$table->integer('subject_id')->nullable();
$table->string('subject_type')->nullable();
$table->integer('causer_id')->nullable();
$table->string('causer_type')->nullable();
$table->text('properties')->nullable();
$table->timestamps();
$table->index('log_name');
});
}
/**
* Reverse the migrations.
*/
public function down()
{
Schema::dropIfExists(config('activitylog.table_name'));
}
}

46
live.env Normal file
View File

@@ -0,0 +1,46 @@
APP_NAME=Tracker
APP_ENV=production
APP_KEY=base64:8gXdEEPNnQJeaD4v9y4djtdj3h13Db3KeWbAlV4fYo0=
APP_DEBUG=false
APP_URL=http://localhost
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=click_team_tracker
DB_USERNAME=root
DB_PASSWORD=n1h1!1st
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=erp@click-mobile.com
MAIL_PASSWORD=sqczcsrtcehpywjv
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

View File

@@ -1,11 +1,5 @@
# Onboarding process
# Date 2024-01-18
i Effie,
Lets have app fee and development once off 100,000 and at 13% annual maintenance, which reminds me we are not billing customers for support and annual maintenance ☹.
@'Kwesi Banson' we need to add these on the ERP.
Kind Regards,
Sam
Thank you sir,
@@ -38,22 +32,9 @@ Dynamic Numeric- Yes/No
Delivery Report- Yes/No
Comments
# Short Code Licence/Certificate Renewal Date
Our ZICTA certificate for the Geopoll short code 5155 will expire on the 22nd of March. Renewal fee is K18,000.
Kind Regards,
Martha
VFGH83347501
https://youtu.be/6kBAkodqBRM
https://youtu.be/OUSTGLL51m0
In response to SSL Certificate renewal
Anything that needs renewal etc - needs to be on the ERP under tech,
Kind Regards
1. Charity suggested we link clients with Sender IDs to avoid having to enter Sender IDS on a separate page
2. Charity and the team also suggested it would be good for us country managers to have more options on the ERP. Country documents should also have an option to add expiry dates. Have the same notes function under countries just like AMs.
3. Charity also suggested that we have a feature that sends emails to AMs to remind them of the invoices. Since invoices have validity period to say to be paid after so an so date, it should be used to send reminders to alert AMs to followup on payments. Dont know if it makes sense.
4. I have asked Kwesi if we could have a page on the ERP that displays all activities rather than just on the home page. Also suggested that we be able to click on some activities like when AM leaves a note, we should be able to open and view that note.
5. The other suggestion was to have an option to view all clients instead of just showing 15 clients per page, have an option to view 15, view 50. view 100. view all. that way will be able to download XLSX/PDF for all clients if we view all. currently it only downloads 15 clients of that particular page

View File

@@ -66,6 +66,11 @@
$('#shortCodeType').val('voice');
$('#newShortCodeFormModal').modal('show');
});
$('#createSenderIdBtn').click(function(evt){
evt.preventDefault();
console.log('Heere at the wall');
$('#newSenderIdFormModal').modal('show');
});
$('#createPaymentBtn').click(function(evt){
evt.preventDefault();
@@ -264,7 +269,7 @@
location.reload();
}, 8000);
}
else if (data.code > 5) {
else if (data.code > 1) {
$.alert({
title: 'Alert!',
content: data.msg,
@@ -343,7 +348,7 @@
});
});
/*
$('#financeServicesStore').change(function(evtt){
let currentServices = $('#financeServicesStore').val();
$.each(currentServices, function (key, value) {
@@ -359,6 +364,7 @@
}
});
});
*/
$('#financeEditForm').submit(function(evt){
evt.preventDefault();
@@ -521,4 +527,52 @@
});
});
$('#newSenderIdForm').submit(function(evt){
evt.preventDefault();
var formData = new FormData($(this)[0]);
$.ajax({
type: "POST",
url: base_url + '/senderids/direct_store',
data : formData,
processData: false,
contentType: false,
async: false,
success: function (data){
if (data.code === 1) {
$.alert({
title: 'Alert!',
content: 'Sender ID successfully saved',
});
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 !',
});
}
},
error: function (data) {
var output = $.parseJSON(data.responseText);
console.log(output.errors);
$('#senderIdnotifyArea').removeClass('hidden');
$.each(output.errors, function (key, value) {
console.log(value[0]);
$('#senderIdnotifyArea').text(value[0]);
});
},
fail : function(errordata){
console.log(errordata);
}
});
});
});

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -17,3 +17,9 @@
<canvas width="600" height="200" style="width: 600px; height: 200px;"></canvas>
# Call with Priscilla - 30-07-2024
## Custom Reminders
- Email :
- Subject
- Body :
- Date :

View File

@@ -0,0 +1,64 @@
<div class="modal fade" id="newSenderIdFormModal" tabindex="-1" role="dialog" aria-labelledby="senderidModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="senderidModalLabelLabel">New Sender ID Form</h4>
</div>
<div class="modal-body">
<div id="senderIdnotifyArea" class="alert alert-danger hidden"></div>
<form class="form-vertical" method="POST" id="newSenderIdForm" action="">
{{ csrf_field() }}
<input type="hidden" name="client_id" id="clientID" value="{{ $showclient->id }}">
<input type="hidden" name="created_by" id="createdByIDD" value="{{ session('current_user.id') }}">
<input type="hidden" name="last_modified_by" id="modifiedByIDD" value="{{ session('current_user.id') }}">
<input type="hidden" name="" id="">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label class="control-label" for="senderIDD">Sender ID *</label>
<div class="{{ $errors->has('senderid') ? 'has-error' : ''}}">
{!! Form::text('senderid', old('senderid'), ['class' => 'form-control ', 'placeholder'=>'Enter sender ID' , 'id' => 'senderIDD', 'required' => 'true']) !!}
{!! $errors->first('name', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label" for="status">Status *</label>
<div class=" {{ $errors->has('status') ? 'has-error' : ''}}">
{!! Form::select('status', $sender_id_statuses ,old('status'), ['class' => 'form-control ', 'placeholder'=>'Select Status ' , 'id' => 'status', 'required' => 'true', 'style' => 'width: 100%']) !!}
{!! $errors->first('status', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label" for="network">Network *</label>
<div class=" {{ $errors->has('network') ? 'has-error' : ''}}">
{!! Form::select('network_id', $networks, old('network_id'), ['class' => 'form-control ', 'placeholder'=>'Select Network ' , 'id' => 'network', 'required' => 'true', 'style' => 'width: 100%']) !!}
{!! $errors->first('network', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label" for="remarks">Remarks</label>
<div class=" {{ $errors->has('remarks') ? 'has-error' : ''}}">
{!! Form::text('remarks', old('remarks'), ['class' => 'form-control ', 'placeholder'=>'Enter remarks here' , 'id' => 'remarks']) !!}
{!! $errors->first('remarks', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="ln_solid"></div>
<div class="form-group">
<div class="">
<button type="submit" class="btn btn-success btn-block"><i class="fa fa-save"></i> Submit</button>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->

View File

@@ -20,10 +20,10 @@
{!! 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="form-group" 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 >
<input type="text" class="form-control" name="short_code" id="shortCode" >
<p class="text-warning">Enter Short related to the selected service</p>
</div>
</div>

View File

@@ -0,0 +1,43 @@
<div>
<div class="table-responsive">
<table class="table table-striped table-condensed table-bordered">
<thead>
<tr class="headings">
<th class="column-title">Sender ID</th>
<th class="column-title">Network</th>
<th class="column-title">Country</th>
<th class="column-title">Status</th>
<th class="column-title">Created By</th>
<th class="column-title">Remarks</th>
<th class="column-title no-link last"><span class="nobr">Action</span>
</th>
</tr>
</thead>
<tbody>
@if ($client_sender_ids->isEmpty())
<tr>
<td class="" colspan="12">No Records found</td>
</tr>
@else
@foreach ($client_sender_ids as $row)
<tr class="even pointer">
<td class="mes-td col-md-2">{{ $row->senderid }} </td>
<td class="col-md-2">{{ $row->network_info->name }}</td>
<td class="col-md-2">{{ $row->network_info->country }}</td>
<td class="col-md-1"><span class="label label-<?php echo ($row->status == 'Approved') ? 'success' : 'warning'; ?>"> {{ $row->status }}</span></td>
<td class="col-md-2">{{ $row->created_by_info->name }}</td>
<td class="mes-td col-md-2" style="width: 100px;">{{ $row->remarks }}</td>
<td class="last col-md-1" style="width: 100px;">
<span>
<input type="hidden" name="senderId_entry_id" value="{{ $row->id }}" class="senderIdEntryRowId">
<a href="" class="btn btn-xs btn-primary senderIdEditBtn"><i class="fa fa-edit"></i></a>
</span>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</div>

View File

@@ -17,6 +17,7 @@
@include('client.partials.edit-finance')
@include('client.partials.progress_indicator_details')
@include('client.partials.support_fees_form')
@include('client.partials.create-senderids')
<?php ?>
<div class="">
<div class="page-title">
@@ -105,14 +106,15 @@
<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" data-toggle="tab" aria-expanded="true">Company</a></li>
<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" 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>
<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">
@@ -278,8 +280,7 @@
<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')
@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>
@@ -304,7 +305,7 @@
<?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">
<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>
@@ -325,6 +326,12 @@
</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>

View File

@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
</head>
<body>
<div class="">
<img src="{!! url('public/assets/img/click-banner.png') !!}" alt="Click Mobile Banner Logo">
</div>
<h2>{{ date('F d, Y') }} Client Support Reminder <br></h2>
Hello Team<br>
<br>
<strong>Reminder Details</strong>
<br>
<em>{{ $alert_body }}</em>
<p>
Sincerely, <br>
Click Mobile ERP
</p>
</body>
</html>

View File

@@ -0,0 +1,120 @@
@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" style="width:800px !important;">
<ol class="breadcrumb">
<li><a href="{!! url('dashboard') !!}">Dashboard</a></li>
<li><a href="{!! url('infrastructure/server-list') !!}">Server List</a></li>
<li class="active">Add Server</li>
</ol>
</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">
Add Server
<div class="clearfix"></div>
</div>
{{-- start of content --}}
<div class="x_content">
<br>
<!-- `service` varchar(150) DEFAULT NULL,
`client_id` int(11) DEFAULT NULL,
`network_operator_id` int(11) DEFAULT NULL, -->
{!! Form::open(['url' => 'infrastructure/storeserver', 'class' => 'form-horizontal form-label-left']) !!}
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="serverNumber">DS Number *</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('server_number') ? 'has-error' : ''}}">
{!! Form::text('service', old('server_id'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter DS number' , 'id' => 'serverNumber']) !!}
{!! $errors->first('server_number', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="friendlyName">Friendly Name *</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('friendly_name') ? 'has-error' : ''}}">
{!! Form::text('client_id', old('friendly_name'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter partner name' , 'id' => 'friendlyName']) !!}
{!! $errors->first('friendly_name', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="publicIpAddress">Public IP Address </label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('public_ip_address') ? 'has-error' : ''}}">
{!! Form::text('network_operator_id', old('public_ip_address'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Public IP Address' , 'id' => 'publicIpAddress']) !!}
{!! $errors->first('public_ip_address', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="privateIpAddress">Private IP Address </label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('private_ip_address') ? 'has-error' : ''}}">
{!! Form::text('url_endpoint', old('private_ip_address'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter private ip address' , 'id' => 'privateIpAddress']) !!}
{!! $errors->first('private_ip_address', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="mainUse">Main Use</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('main_use') ? 'has-error' : ''}}">
{!! Form::textarea('credentials', old('main_use'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter main use' , 'id' => 'mainUse']) !!}
{!! $errors->first('main_use', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="mainUse">Main Use</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('main_use') ? 'has-error' : ''}}">
{!! Form::text('expiry_date', old('main_use'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter main use' , 'id' => 'mainUse']) !!}
{!! $errors->first('main_use', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="remarks">Remarks </label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('remarks') ? 'has-error' : ''}}">
{!! Form::text('url_endpoint', old('remarks'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter remarks' , 'id' => 'remarks']) !!}
{!! $errors->first('remarks', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="remarks">Remarks </label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('remarks') ? 'has-error' : ''}}">
{!! Form::textarea('remarks', old('remarks'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter remarks' , 'id' => 'remarks']) !!}
{!! $errors->first('remarks', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="ln_solid"></div>
<div class="form-group">
<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
<button type="submit" class="btn btn-success btn-block"><i class="fa fa-save"></i> Update</button>
</div>
</div>
{!! Form::close() !!}
</div>
{{-- end of x_content --}}
</div>
{{-- end of x_panel --}}
</div>
</div>
</div>
@endsection
@section('javascript')
<script type="text/javascript">
$(function(){
$('select').select2();
});
</script>
@endsection

0
resources/views/infrastructure/create.blade.php Executable file → Normal file
View File

View File

@@ -32,6 +32,17 @@
<li><a href="{!! url('clientpaymentreports') !!}">Client Payments</a></li>
<li><a href="{!! url('mnopaymentreports') !!}">MNO Payments</a></li>
<li><a href="{!! url('reports/recentclients') !!}">Recent Clients</a></li>
<li><a href="{!! url('reports/useractivities') !!}">User Activities</a></li>
</ul>
</li>
<li><a><i class="fa fa-list"></i>Utilities <span class="fa fa-chevron-down"></span></a>
<ul class="nav child_menu">
<li><a href="{!! url('reminders') !!}">Reminders</a></li>
<li><a href="{!! url('underconstruction') !!}">Services</a></li>
<li><a href="{!! url('underconstruction') !!}">Company Types</a></li>
<li><a href="{!! url('underconstruction') !!}">How We Got A Client</a></li>
<li><a href="{!! url('underconstruction') !!}">Countries & Currencies </a></li>
</ul>
</li>
</ul>
@@ -51,12 +62,14 @@
<ul class="nav child_menu">
<li><a href="{!! url('infrastructure/servers') !!}">Overview</a></li>
<li><a href="{!! url('infrastructure/server-list') !!}">Server List </a></li>
</ul>
</li>
@endif
<li><a><i class="fa fa-gear"></i>System <span class="fa fa-chevron-down"></span></a>
<ul class="nav child_menu">
<li><a href="{!! url('systemusers') !!}">System Users</a></li>
<li><a href="{!! url('systemcreds') !!}">System Credentials </a></li>
<li><a href="{!! url('logout') !!}">Logout</a></li>
</ul>
</li>

View File

@@ -33,6 +33,13 @@
{!! $errors->first('name', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="country">Direct/None Direct</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('direct_status') ? 'has-error' : ''}}">
{!! Form::select('direct_status', $direct_arr ,old('direct_status'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Select one' , 'id' => 'directStatus']) !!}
{!! $errors->first('direct_status', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="country">Country *</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('country') ? 'has-error' : ''}}">
@@ -85,7 +92,7 @@
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="status">Status *</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('status') ? 'has-error' : ''}}">
{!! Form::select('status', $status ,old('status'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Status ' , 'id' => 'status']) !!}
{!! Form::select('status', $status ,old('status'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Select Status ' , 'id' => 'status']) !!}
{!! $errors->first('status', '<p class="help-block">:message</p>') !!}
</div>
</div>

View File

@@ -145,7 +145,7 @@
$('#keywordField').on('keyup', function(){
console.log('up');
var keyword = $(this).val();
table.setData("clients/all?keyword=" + keyword);
table.setData("recentclients/all?keyword=" + keyword);
});

View File

@@ -0,0 +1,100 @@
@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" style="width:800px !important;">
<ol class="breadcrumb">
<li><a href="{!! url('dashboard') !!}">Dashboard</a></li>
<li><a href="{!! url('infrastructure/server-list') !!}">Server List</a></li>
<li class="active">Add Server</li>
</ol>
</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">
Add Server
<div class="clearfix"></div>
</div>
{{-- start of content --}}
<div class="x_content">
<br>
{!! Form::open(['url' => 'infrastructure/storeserver', 'class' => 'form-horizontal form-label-left']) !!}
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="serverNumber">DS Number *</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('server_number') ? 'has-error' : ''}}">
{!! Form::text('server_number', old('server_id'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter DS number' , 'id' => 'serverNumber']) !!}
{!! $errors->first('server_number', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="friendlyName">Friendly Name *</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('friendly_name') ? 'has-error' : ''}}">
{!! Form::text('friendly_name', old('friendly_name'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter partner name' , 'id' => 'friendlyName']) !!}
{!! $errors->first('friendly_name', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="publicIpAddress">Public IP Address </label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('public_ip_address') ? 'has-error' : ''}}">
{!! Form::text('public_ip_address', old('public_ip_address'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Public IP Address' , 'id' => 'publicIpAddress']) !!}
{!! $errors->first('public_ip_address', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="privateIpAddress">Private IP Address </label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('private_ip_address') ? 'has-error' : ''}}">
{!! Form::text('private_ip_address', old('private_ip_address'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter private ip address' , 'id' => 'privateIpAddress']) !!}
{!! $errors->first('private_ip_address', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="mainUse">Main Use</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('main_use') ? 'has-error' : ''}}">
{!! Form::text('main_use', old('main_use'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter main use' , 'id' => 'mainUse']) !!}
{!! $errors->first('main_use', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="remarks">Remarks </label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('remarks') ? 'has-error' : ''}}">
{!! Form::text('remarks', old('remarks'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter remarks' , 'id' => 'remarks']) !!}
{!! $errors->first('remarks', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="ln_solid"></div>
<div class="form-group">
<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
<button type="submit" class="btn btn-success btn-block"><i class="fa fa-save"></i> Update</button>
</div>
</div>
{!! Form::close() !!}
</div>
{{-- end of x_content --}}
</div>
{{-- end of x_panel --}}
</div>
</div>
</div>
@endsection
@section('javascript')
<script type="text/javascript">
$(function(){
$('select').select2();
});
</script>
@endsection

View File

@@ -0,0 +1,111 @@
@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" style="width:800px !important;">
<ol class="breadcrumb">
<li><a href="{!! url('dashboard') !!}">Dashboard</a></li>
<li><a href="{!! url('systemcreds') !!}">Credentials List</a></li>
<li class="active">Add Credentials</li>
</ol>
</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">
Add Credentials
<div class="clearfix"></div>
</div>
{{-- start of content --}}
<div class="x_content">
<br>
{!! Form::open(['url' => 'systemcreds', 'class' => 'form-horizontal form-label-left']) !!}
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="serviceName">Service *</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('service') ? 'has-error' : ''}}">
{!! Form::select('service', $services, old('service'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Select Service Type' , 'id' => 'serviceName']) !!}
{!! $errors->first('service', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="clientID">Client Name *</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('client') ? 'has-error' : ''}}">
{!! Form::select('client_id', $clients, old('client_id'), ['class' => 'form-control', 'placeholder'=>'Select Client' , 'id' => 'clientID', 'required' => 'true']) !!}
{!! $errors->first('client_id', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="networkOpsID">Network Operator *</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('network_operator_id') ? 'has-error' : ''}}">
{!! Form::select('network_operator_id', $network_arr, old('network_operator_id'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Select Network ' , 'id' => 'networkOpsID', 'required' => 'true']) !!}
{!! $errors->first('network_operator_id', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="UrlEndpoint">URL/Endpoint *</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('url_endpoint') ? 'has-error' : ''}}">
{!! Form::text('url_endpoint', old('url_endpoint'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter url/endpoint' , 'id' => 'UrlEndpoint']) !!}
{!! $errors->first('url_endpoint', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="credentials">Credentials *</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('main_use') ? 'has-error' : ''}}">
{!! Form::textarea('credentials', old('credentials'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter main credentials' , 'rows' => '4', 'id' => 'credentials']) !!}
{!! $errors->first('credentials', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="expiryDate">Expiry Date *</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('main_use') ? 'has-error' : ''}}">
{!! Form::text('expiry_date', old('expiry_date'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Select date' , 'id' => 'expiryDate']) !!}
{!! $errors->first('expiry_date', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="remarks">Remarks</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('remarks') ? 'has-error' : ''}}">
{!! Form::textarea('remarks', old('remarks'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter remarks' , 'rows' => '3', 'id' => 'remarks']) !!}
{!! $errors->first('remarks', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="ln_solid"></div>
<div class="form-group">
<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
<button type="submit" class="btn btn-success btn-block"><i class="fa fa-save"></i> Update</button>
</div>
</div>
{!! Form::close() !!}
</div>
{{-- end of x_content --}}
</div>
{{-- end of x_panel --}}
</div>
</div>
</div>
@endsection
@section('javascript')
<script type="text/javascript">
$(function(){
$('select').select2();
$('#expiryDate').datetimepicker({
format: 'YYYY-MM-DD'
});
});
</script>
@endsection

View File

@@ -0,0 +1,107 @@
@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" style="width:800px !important;">
<ol class="breadcrumb">
<li><a href="{!! url('dashboard') !!}">Dashboard</a></li>
<li><a href="{!! url('infrastructure/server-list') !!}">Server List</a></li>
<li class="active">Update Server</li>
</ol>
</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">
Updating Server Details for <b><em>{{ $server->friendly_name }} | {{ $server->public_ip_address}} ({{ $server->private_ip_address}} )</em></b>
<div class="clearfix"></div>
</div>
{{-- start of content --}}
<div class="x_content">
<br>
{!! Form::open(['url' => 'infrastructure/updateserver', 'class' => 'form-horizontal form-label-left']) !!}
<input type="hidden" name="server_id" value="{{ $server->id }}">
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="serverNumber">DS Number *</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('server_number') ? 'has-error' : ''}}">
{!! Form::text('server_number', $server->server_id, ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter DS number' , 'id' => 'serverNumber']) !!}
{!! $errors->first('server_number', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="friendlyName">Friendly Name *</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('friendly_name') ? 'has-error' : ''}}">
{!! Form::text('friendly_name', $server->friendly_name, ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter partner name' , 'id' => 'friendlyName']) !!}
{!! $errors->first('friendly_name', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="publicIpAddress">Public IP Address </label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('public_ip_address') ? 'has-error' : ''}}">
{!! Form::text('public_ip_address', $server->public_ip_address, ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Public IP Address' , 'id' => 'publicIpAddress']) !!}
{!! $errors->first('public_ip_address', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="privateIpAddress">Private IP Address </label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('private_ip_address') ? 'has-error' : ''}}">
{!! Form::text('private_ip_address', $server->private_ip_address, ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter private ip address' , 'id' => 'privateIpAddress']) !!}
{!! $errors->first('private_ip_address', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="mainUse">Main Use</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('main_use') ? 'has-error' : ''}}">
{!! Form::text('main_use', $server->main_use, ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter main user' , 'id' => 'mainUse']) !!}
{!! $errors->first('main_use', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="remarks">Remarks </label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('remarks') ? 'has-error' : ''}}">
{!! Form::text('remarks', $server->remarks, ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter remarks' , 'id' => 'remarks']) !!}
{!! $errors->first('remarks', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="serverStatus">Status</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('status') ? 'has-error' : ''}}">
{!! Form::select('status', $status_arr ,old('status'), ['class' => 'form-control col-md-7 col-xs-12', 'id' => 'serverStatus']) !!}
{!! $errors->first('status', '<p class="help-block">:message</p>') !!}
</div>
</div>
<div class="ln_solid"></div>
<div class="form-group">
<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
<button type="submit" class="btn btn-success btn-block"><i class="fa fa-save"></i> Update</button>
</div>
</div>
{!! Form::close() !!}
</div>
{{-- end of x_content --}}
</div>
{{-- end of x_panel --}}
</div>
</div>
</div>
@endsection
@section('javascript')
<script type="text/javascript">
$(function(){
$('select').select2();
});
</script>
@endsection

View File

@@ -0,0 +1,186 @@
@extends('layouts.master')
@section('page_title')
@if(isset($page_title))
{{ $page_title }}
@endif
@endsection
@section('css')
<link href="{!! url('public/assets/vendors/tabulator/css/bootstrap/tabulator_bootstrap.css') !!}" type="text/css" rel="stylesheet">
@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="active">Credentials</li>
</ol>
</div>
</div>
<div class="title_right">
<div class="row">
</div>
<div class="row">
<div class="col-sm-12">
<div class="pull-right">
<!-- <a href="{!! url('clients') !!}" class="btn btn-warning btn-xs"><i class="fa fa-refresh"></i> Reset Filter</a> -->
</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> Credentials </h2>
<div class="clearfix"></div>
<div class="pull-left">
<button id="credentials-download-xlsx" class="btn btn-success btn-sm"><i class="fa fa-file-excel-o"></i> Download XLSX</button>
<button id="credentials-download-pdf" class="btn btn-danger btn-sm"><i class="fa fa-file-pdf-o"></i> Download PDF</button>
<a class="btn btn-primary btn-sm" href="{!! url('systemcreds/create') !!}"><i class="fa fa-plus-square"></i> Add Credentials</a>
</div>
<div class="pull-right">
<form method="GET" action="{!! url('systemcreds') !!}">
<input type="hidden" name="code_type" value="sms">
<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-12 form-group pull-left 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 class="clearfix"></div>
<div class="pull-right">
</div>
<div class="clearfix"></div>
</div>
<div class="x_content">
<div id="systemCredentialsTable"></div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('javascript')
<script src="{!! url('public/assets/vendors/tabulator/js/tabulator.js') !!}"></script>
<script type="text/javascript" src="{!! url('public/assets/vendors/tabulator/js/xlsx.full.min.js') !!}"></script>
<script type="text/javascript" src="{!! url('public/assets/vendors/tabulator/js/jspdf.min.js') !!}"></script>
<script type="text/javascript" src="{!! url('public/assets/vendors/tabulator/js/jspdf.plugin.autotable.js') !!}"></script>
<script type="text/javascript">
$(document).ready(function(){
function link(cell, formatterParams){
var url = cell.getValue();
var rowID = cell.getData().id
return "<a href='"+ base_url + "/systemcreds/edit/"+rowID+"' class='btn btn-link'>"+url+"</a>";
}
var table = new Tabulator("#systemCredentialsTable", {
ajaxURL: "systemcreds/all",
paginationSize: 15,
layout: "fitColumns",
rowFormatter:function(row){
if(row.getData().connection_status == "active"){
//row.getElement().style.backgroundColor = "#1e3b20";
row.getElement().style.backgroundColor = "red";
}
},
pagination: "remote",
selectable: false,
printAsHtml: true,
ajaxLoaderLoading: $('#logo_spinner').html(),
columns: [
{
title: "Service Name",
field: "service",
sorter: "string",
// formatter:link,
},
{
title: "Client",
field: "clientName",
sorter: "string",
},
{
title: "Network Operator",
field: "networkOpsName",
sorter: "string",
},
{
title: "URL/Endpoint",
field: "url_endpoint",
sorter: "string",
},
{
title: "Expiry Date",
field: "expiry_date",
sorter: "string",
},
{
title: "Created By",
field: "created_by_user",
sorter: "string",
},
{
title: "Last Modified By",
field: "modified_by_user",
sorter: "string",
},
{
title: "Created At",
field: "created_at",
sorter: "string",
},
{
title: "Remarks",
field: "remarks",
sorter: "string",
}
],
rowClick:function(e, row){
var userID = row.getData().id;
console.log(userID);
//$('#userEditModal').modal('show');
},
});
document.getElementById("credentials-download-xlsx").addEventListener("click", function(){
table.download("xlsx", "click_credentials-list.xlsx", {sheetName:"CredentialsList"});
});
//trigger download of data.pdf file
document.getElementById("credentials-download-pdf").addEventListener("click", function(){
table.download("pdf", "click_credentials-list.pdf", {
orientation:"portrait", //set page orientation to portrait
title:"Click Mobile - Credentials List", //add title to report
});
});
$('#keywordField').on('keyup', function(){
console.log('up');
var keyword = $(this).val();
table.setData("systemcreds/all?keyword=" + keyword);
});
});
</script>
@endsection

View File

@@ -0,0 +1,53 @@
@extends('layouts.master')
@section('content')
<div class="">
<div class="page-title">
<div class="title_left">
<h3>Development In Progress</h3>
</div>
<div class="title_right">
<div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search for...">
<span class="input-group-btn">
<button class="btn btn-default" type="button">Go!</button>
</span>
</div>
</div>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2>Plain Page</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 class="x_content">
Page Design Not ready
</div>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -14,7 +14,7 @@
Route::get('/contacts', function () {
return view('contacts');
});
use Spatie\Activitylog\Models\Activity;
0204040805
browser.pipe.aria.microsoft.com
@@ -23,10 +23,19 @@ 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::get('loggingtest', 'UtilityController@loggingTest');
Route::get('/testlog', function () {
$rando = uniqid();
activity()->log('Look mum, I logged something like this : ' . $rando);
$lastActivity = Activity::all()->last(); //returns the last logged activity
dump($lastActivity->description);
//$lastActivity->description; //returns 'Look mum, I logged something';
});
//Route::post('ipstore', 'NetworkOperatorsController@ipStore');
//Route::get('testemail', 'UtilityController@EmailTest');
@@ -40,6 +49,8 @@ Route::get('dumpprogress', 'UtilityController@insertOnboardingProgress');
Route::get('paperless', 'UtilityController@paperlessTest');
Route::get('paperless_getparams/{name}', 'UtilityController@getPaperlessAttributes');
Route::get('underconstruction', 'UtilityController@underconstruction');
Route::get('testmap', 'UtilityController@maptest');
@@ -98,6 +109,7 @@ Route::group(['middleware' => ['checklogin', 'checkcurrentlylogged']], function(
Route::get('senderids/all', 'SenderIdController@getSenderIdsJson');
Route::post('senderids/direct_store', 'SenderIdController@direct_store');
Route::resource('senderids', 'SenderIdController');
Route::get('staffmembers/all', 'StaffMembersController@getstaffMemberssJson');
@@ -132,6 +144,9 @@ Route::group(['middleware' => ['checklogin', 'checkcurrentlylogged']], function(
Route::get('clients/services/{id}', 'ClientsController@showservices')->name('clients.services');
Route::resource('clients', 'ClientsController');
Route::get('reports/useractivities', 'ReportsController@getUserActivities');
Route::get('reports/useractivities/all', 'ReportsController@getUserActivitiesJson');
Route::get('reports/recentclients', 'ReportsController@getRecentClients');
Route::get('reports/recentclients/all', 'ReportsController@getRecentClientsJson');
Route::get('reports/search', 'MeetingReportsController@search');
@@ -188,4 +203,7 @@ Route::group(['middleware' => ['checklogin', 'checkcurrentlylogged']], function(
Route::get('finance', 'Finance\DashboardController@index');
Route::get('systemcreds/all', 'SystemCredentialsController@getCredListJson');
Route::resource('systemcreds', 'SystemCredentialsController')->except(['destroy']);
});

View File

@@ -57,3 +57,13 @@ if(date('D') == 'Sat' || date('D') == 'Sun') {
// comments
?>
select * from property where upn = '641-0548-0446';
-- 641-0548-0446-1
select * from property_payments order by id desc limit 100;
select * from business_payments order by id desc limit 100;
select * from system_transactionlog order by id desc limit 100;
select * from business where districtid = 1 limit 100;
select upn, subupn, districtid, owner from business where upn = '653-0738-0134';
select * from business_payments where upn = '653-0738-0134';