first commit, after modifying client section

This commit is contained in:
Kwesi Banson
2023-02-22 07:48:50 +00:00
commit ad0dd6a6e1
1880 changed files with 538494 additions and 0 deletions

View File

@@ -0,0 +1,145 @@
@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 class="active"><a href="{!! url('clients') !!}">Clients</a></li>
<li class="active">Create Client</li>
</ol>
</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">
New Client
@include('commons.notifications')
<div class="clearfix"></div>
</div>
{{-- start of content --}}
<div class="x_content">
<br>
{!! Form::open(['url' => 'clients', 'class' => 'form-horizontal form-label-left']) !!}
<div class="row">
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Name</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('name') ? 'has-error' : ''}}">
{!! Form::text('name', old('name'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter name' , 'id' => 'name']) !!}
{!! $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="email">Contact Person</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('name') ? 'has-error' : ''}}">
{!! Form::text('contact_person', old('contact_person'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Contact Person' , 'id' => 'contact_person']) !!}
{!! $errors->first('contact_person', '<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="email">Email</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('name') ? 'has-error' : ''}}">
{!! Form::text('email', old('email'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter email' , 'id' => 'email']) !!}
{!! $errors->first('email', '<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="skypeName">Skype Name</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('name') ? 'has-error' : ''}}">
{!! Form::text('skype_name', old('skype_name'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Skype Name' , 'id' => 'skypeName']) !!}
{!! $errors->first('skype_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="linkedIn">Linked In</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('name') ? 'has-error' : ''}}">
{!! Form::text('linkedin_name', old('linkedin_name'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter LinkedIn Name' , 'id' => 'linkedIn']) !!}
{!! $errors->first('linkedin_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="auth_user_id">Account Manager</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('auth_user_id') ? 'has-error' : ''}}">
{!! Form::select('auth_user_id', $auth_users ,old('auth_user_id'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Account Manager ' , 'id' => 'auth_user_id']) !!}
{!! $errors->first('auth_user_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="type">Services</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('services') ? 'has-error' : ''}}">
{!! Form::select('services[]', $service_type ,old('services'), ['class' => 'form-control col-md-7 col-xs-12' , 'id' => 'services', 'multiple'=> 'true']) !!}
{!! $errors->first('typeservices', '<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' : ''}}">
{!! Form::select('country', $countries ,old('country'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Country ' , 'id' => 'country']) !!}
{!! $errors->first('country', '<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="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']) !!}
{!! $errors->first('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="payment_mode">Payment Mode</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('payment_mode') ? 'has-error' : ''}}">
{!! Form::select('payment_mode', $payment_type ,old('payment_mode'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Payment Type ' , 'id' => 'payment_mode']) !!}
{!! $errors->first('payment_mode', '<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="currency">Currency</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('currency') ? 'has-error' : ''}}">
{!! Form::select('currency', $currency ,old('currency'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Currency ' , 'id' => 'currency']) !!}
{!! $errors->first('currency', '<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="clientNotes">Notes</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('notes') ? 'has-error' : ''}}">
{!! Form::textarea('notes', old('notes'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter additional information here', 'rows' => '5', 'id' => 'clientNotes']) !!}
{!! $errors->first('notes', '<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"><i class="fa fa-save"></i> Submit</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,151 @@
@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 class="active">Create Service</li>
</ol>
</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">
Update Client Details
@include('commons.notifications')
<div class="clearfix"></div>
</div>
{{-- start of content --}}
<div class="x_content">
<br>
{!! Form::model($client, [
'method' => 'PATCH',
'url' => ['clients', $client],
'class' => 'form-horizontal form-label-left'
]) !!}
<div class="row">
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">Name</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('name') ? 'has-error' : ''}}">
{!! Form::text('name', old('name'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter client name' , 'id' => 'name']) !!}
{!! $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="email">Contact Person</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('name') ? 'has-error' : ''}}">
{!! Form::text('contact_person', old('contact_person'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Contact Person' , 'id' => 'contact_person']) !!}
{!! $errors->first('contact_person', '<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="email">Email</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('name') ? 'has-error' : ''}}">
{!! Form::text('email', old('email'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter email' , 'id' => 'email']) !!}
{!! $errors->first('email', '<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="skypeName">Skype Name</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('name') ? 'has-error' : ''}}">
{!! Form::text('skype_name', old('skype_name'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Skype Name' , 'id' => 'skypeName']) !!}
{!! $errors->first('skype_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="linkedIn">Linked In</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('name') ? 'has-error' : ''}}">
{!! Form::text('linkedin_name', old('linkedin_name'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter LinkedIn Name' , 'id' => 'linkedIn']) !!}
{!! $errors->first('linkedin_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="auth_user_id">Account Manager</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('auth_user_id') ? 'has-error' : ''}}">
{!! Form::select('auth_user_id', $auth_users ,old('auth_user_id'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Account Manager ' , 'id' => 'auth_user_id']) !!}
{!! $errors->first('auth_user_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="type">Services</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('services') ? 'has-error' : ''}}">
{!! Form::select('services[]', $service_type, ['1' => 'A2P', '2' => 'USSD'], ['class' => 'form-control col-md-7 col-xs-12 typeServices' , 'id' => 'services', 'multiple'=> 'true']) !!}
{!! $errors->first('services', '<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' : ''}}">
{!! Form::select('country', $countries, old('country'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter Country ' , 'id' => 'country']) !!}
{!! $errors->first('country', '<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="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']) !!}
{!! $errors->first('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="payment_mode">Payment Mode</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('payment_mode') ? 'has-error' : ''}}">
{!! Form::select('payment_mode', $payment_type, old('pay_mode'), ['class' => 'form-control col-md-7 col-xs-12' , 'id' => 'payment_mode']) !!}
{!! $errors->first('payment_mode', '<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="currency">Currency</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('currency') ? 'has-error' : ''}}">
{!! Form::select('currency', $currency ,old('currency'), ['class' => 'form-control col-md-7 col-xs-12' , 'id' => 'currency']) !!}
{!! $errors->first('currency', '<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="clientNotes">Notes</label>
<div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('notes') ? 'has-error' : ''}}">
{!! Form::textarea('notes', old('notes'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter additional information here', 'rows' => '5', 'id' => 'clientNotes']) !!}
{!! $errors->first('notes', '<p class="help-block">:message</p>') !!}
</div>
</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"><i class="fa fa-save"></i> Submit</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();
// var PRESELECTED_FRUITS = ['A2P','USSD'];
// $('.typeServices').select2({}).select2('val', PRESELECTED_FRUITS);
$('.typeServices').select2({
tags : true
});
});
</script>
@endsection

View File

@@ -0,0 +1,141 @@
@extends('layouts.master')
@section('page_title')
@if(isset($page_title))
{{ $page_title }}
@endif
@endsection
@section('css')
@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">Clients</li>
</ol>
</div>
</div>
<div class="title_right">
<div class="row">
<form method="GET" action="">
<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="search" placeholder="Keyword here...">
<span class="input-group-btn">
<button type="button" class="btn btn-primary" style="color: #fff;" type="button">Go!</button>
</span>
</div>
</div>
</form>
</div>
<div class="row">
<div class="col-sm-12">
<div class="pull-right"></div>
</div>
</div>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
@include('commons.notifications')
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2> Clients </h2>
<div class="pull-right">
<a class="btn btn-primary btn-sm" href="{!! url('clients/create') !!}"><i class="fa fa-plus-circle"></i> Add Client
</a>
</div>
<div class="clearfix"></div>
</div>
<div class="x_content">
<div class="table-responsive">
<table class="table table-striped jambo_table bulk_action table-condensed" style="width: 100%;">
<thead>
<tr class="headings">
<th class="column-title">#</th>
<th class="column-title">Client</th>
<th class="column-title">Account Manager</th>
<th class="column-title">Status</th>
<th class="column-title">Country</th>
<th class="column-title">Last Modified By</th>
<th class="column-title no-link last"><span class="nobr">Action</span>
</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('javascript')
<script type="text/javascript">
$(document).ready(function(){
console.log('heere at the wall');
$('#search').on('keyup', function(){
console.log('clicked');
search();
});
search();
function search(){
var keyword = $('#search').val();
console.log(keyword);
$.post('{{ url("clients/raw") }}',
{
_token: $('meta[name="csrf-token"]').attr('content'),
keyword:keyword
},
function(data){
// console.log(data.data);
// return false;
table_post_row(data);
console.log(data);
});
}
// table row with ajax
function table_post_row(result){
let htmlView = '';
if(result.data.length <= 0){
htmlView += `
<tr>
<td colspan="4">No data.</td>
</tr>`;
}
for(let i = 0; i < result.data.length; i++){
htmlView += `
<tr>
<td>`+ (i+1) +`</td>
<td><a href="` + base_url + `/clients/`+result.data[i].id+`" class="btn btn-link" >` + result.data[i].name +`</a> </td>
<td>`+result.data[i].accountMgr+`</td>
<td>`+result.data[i].status+`</td>
<td>`+result.data[i].country+`</td>
<td>`+result.data[i].modifiedBy+`</td>
<td>
<a href="` + base_url + `/clients/`+result.data[i].id+`" class="btn btn-link" ><i class="fa fa-eye"></i></a>
<a href="` + base_url + `/clients/`+result.data[i].id+`/edit" class="btn btn-link" ><i class="fa fa-edit"></i></a>
</td>
</tr>`;
}
$('tbody').html(htmlView);
}
});
</script>
@endsection

View File

@@ -0,0 +1,137 @@
@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">Clients</li>
</ol>
</div>
</div>
<div class="title_right">
<div class="row">
<form method="GET" action="{!! url('clients') !!}">
<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 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> Clients </h2>
<div class="pull-right">
<a class="btn btn-primary btn-sm" href="{!! url('clients/create') !!}"><i class="fa fa-plus-circle"></i> Add Client
</a>
</div>
<div class="clearfix"></div>
</div>
<div class="x_content">
<div id="clientsTable"></div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('javascript')
<script src="{!! url('public/assets/vendors/tabulator/js/tabulator.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 + "/clients/"+rowID+"' class='btn btn-link'>"+url+"</a>";
//return '<a href="'+ base_url + '"/clients/"'+rowID+'" class="btn btn-link">'+ url +'</a>';
}
var table = new Tabulator("#clientsTable", {
ajaxURL: "clients/all",
paginationSize: 20,
layout: "fitColumns",
pagination: "remote",
selectable: false,
printAsHtml: true,
ajaxLoaderLoading: $('#logo_spinner').html(),
columns: [
{
title: "Client",
field: "name",
sorter: "string",
formatter:link,
},
{
title: "Account Manager",
field: "accountMgr",
sorter: "string",
},
{
title: "Status",
field: "status",
sorter: "string",
},
{
title: "Country",
field: "country",
sorter: "string",
},
{
title: "Last Modified By",
field: "modifiedBy",
sorter: "string",
}
],
rowClick:function(e, row){
var userID = row.getData().id;
console.log(userID);
//$('#userEditModal').modal('show');
},
});
$('#keywordField').on('keyup', function(){
console.log('up');
var keyword = $(this).val();
table.setData("clients/all?keyword=" + keyword);
});
});
</script>
@endsection

View File

@@ -0,0 +1,125 @@
@extends('layouts.master')
@section('page_title')
@if(isset($page_title))
{{ $page_title }}
@endif
@endsection
@section('content')
<div class="">
<div class="page-title">
<div class="title_left">
<div class="title_left">
<ol class="breadcrumb">
<li><a href="{!! url('dashboard') !!}">Dashboard</a></li>
<li class="active">Clients</li>
</ol>
</div>
</div>
<div class="title_right">
<div class="row">
<form method="GET" action="{!! url('clients') !!}">
<div class="col-md-5 col-sm-5 col-xs-12 form-group">
<div style="margin-top:1px; margin-right:-90px;" class="top_search">
{!! Form::select('filter', $columns, null, ['class' => 'form-control', 'placeholder' => 'Select Filter here']) !!}
</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" 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="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> Clients </h2>
<div class="pull-right">
<a class="btn btn-primary btn-sm" href="{!! url('clients/create') !!}"><i class="fa fa-plus-circle"></i> Add Client
</a>
</div>
<div class="clearfix"></div>
</div>
<div class="x_content">
<div class="table-responsive">
<table class="table table-striped jambo_table bulk_action table-condensed" style="width: 100%;">
<thead>
<tr class="headings">
<th class="column-title">Client</th>
<th class="column-title">Account Manager</th>
<th class="column-title">Status</th>
<th class="column-title">Country</th>
<th class="column-title">Last Modified By</th>
<th class="column-title no-link last"><span class="nobr">Action</span>
</th>
<th class="bulk-actions" colspan="7">
<a class="antoo" style="color:#fff; font-weight:500;">Bulk Actions ( <span class="action-cnt"> </span> ) <i class="fa fa-chevron-down"></i></a>
</th>
</tr>
</thead>
<tbody>
@if ($client_arr->isEmpty())
<tr>
<td class="" colspan="6">No Records found</td>
</tr>
@else
@foreach ($client_arr as $row)
<tr class="even pointer">
<td class="mes-td"><a href="{!! route('clients.show', [$row->id]) !!}" class="btn btn-link" > {{ $row->name }} </a></td>
<td class="mes-td" >{{ $row->auth_user_info->name }}</td>
<td class="mes-td">{{ $row->status }}</td>
<td class="mes-td" style="word-wrap: break-word; width: 120px;" >@if(isset($row->country_info)) {{ $row->country_info->en_short_name }} @else N/A @endif</td>
<td class="mes-td" >@if(isset($row->modified_by_info)) {{ $row->modified_by_info->name }}@else N/A @endif</td>
<td class="last">
<a href="{!! route('clients.show', [$row->id]) !!}" class="btn btn-xs btn-success"><i class="fa fa-eye"></i></a>
<a href="{!! route('clients.edit', [$row->id]) !!}" class="btn btn-xs btn-primary"><i class="fa fa-edit"></i></a>
<!-- <a title="Remove Client" class="btn btn-xs btn-danger removeClient"><i class="fa fa-trash"></i></a> -->
<input type="hidden" name="client_id" class="clientID" value="{{ $row->id }}">
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
{{ $client_arr->links() }} <br>
Page : {{ $client_arr->currentPage() }} of {{ $client_arr->lastPage() }} |
Total Records : <span id="totalRecords">{{ $client_arr->total() }}</span>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('javascript')
<script type="text/javascript">
$(document).ready(function(){
});
</script>
@endsection

View File

@@ -0,0 +1,173 @@
@extends('layouts.master')
@section('page_title')
@if(isset($page_title))
{{ $page_title }}
@endif
@endsection
@section('content')
<div class="">
<div class="page-title">
<div class="title_left">
<div class="title_left">
<ol class="breadcrumb">
<li><a href="{!! url('dashboard') !!}">Dashboard</a></li>
<li class="active">Clients</li>
</ol>
</div>
</div>
<div class="title_right">
<div class="row">
<form method="GET" action="{!! url('clients') !!}">
<div class="col-md-5 col-sm-5 col-xs-12 form-group">
<div style="margin-top:1px; margin-right:-90px;" class="top_search">
{!! Form::select('filter', $columns, null, ['class' => 'form-control', 'placeholder' => 'Select Filter here']) !!}
</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" 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="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> Clients </h2>
<div class="pull-right">
<a class="btn btn-primary btn-sm" href="{!! url('clients/create') !!}"><i class="fa fa-plus-circle"></i> Add Client
</a>
</div>
<div class="clearfix"></div>
</div>
<div class="x_content">
<div class="table-responsive">
<table class="table table-striped jambo_table bulk_action table-condensed" style="width: 100%;">
<thead>
<tr class="headings">
<th class="column-title">Client</th>
<th class="column-title">Account Manager</th>
<th class="column-title">Status</th>
<th class="column-title">Country</th>
<th class="column-title">Last Modified By</th>
<th class="column-title no-link last"><span class="nobr">Action</span>
</th>
<th class="bulk-actions" colspan="7">
<a class="antoo" style="color:#fff; font-weight:500;">Bulk Actions ( <span class="action-cnt"> </span> ) <i class="fa fa-chevron-down"></i></a>
</th>
</tr>
</thead>
<tbody>
@if ($client_arr->isEmpty())
<tr>
<td class="" colspan="6">No Records found</td>
</tr>
@else
@foreach ($client_arr as $row)
<tr class="even pointer">
<td class="mes-td" >
<a href="{!! route('clients.show', [$row->id]) !!}" class="btn btn-link" > {{ $row->name }} </a><br>
</td>
<td class="mes-td" >{{ $row->auth_user_info->name }}</td>
<!-- <td class="mes-td" >{{ strtoupper($row->status) }}</td> -->
<td class="mes-td">N/A</td>
<!-- <td class="mes-td" style="word-wrap: break-word; width: 120px;" >{{ $row->country_info->en_short_name }}</td> -->
<td class="mes-td" style="word-wrap: break-word; width: 120px;" >N/A</td>
<!-- <td class="mes-td" >{{ $row->modified_by_info->name or "N/A" }}</td> -->
<td class="mes-td" >N/A</td>
<td class="last" >
<a href="{!! route('clients.show', [$row->id]) !!}" class="btn btn-xs btn-success"><i class="fa fa-eye"></i></a>
<a href="{!! route('clients.edit', [$row->id]) !!}" class="btn btn-xs btn-primary"><i class="fa fa-edit"></i></a>
<a title="Remove Client" class="btn btn-xs btn-danger removeClient"><i class="fa fa-trash"></i></a>
<input type="hidden" name="client_id" class="clientID" value="{{ $row->id }}">
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
{{ $client_arr->links() }} <br>
Page : {{ $client_arr->currentPage() }} of {{ $client_arr->lastPage() }} |
Total Records : <span id="totalRecords">{{ $client_arr->total() }}</span>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('javascript')
<script type="text/javascript">
$(document).ready(function(){
//$('select').select2();
$(".removeClient").click(function(evt){
var recordsTotal = Number($('#totalRecords').text());
var Rrow = $(this).parents('tr');
var theUrl = "{!! url('clients/destroy') !!}";
var clientID = $(this).siblings('.clientID').val();
var linker = base_url + "/clients/" + clientID;
swal({
title: "Delete Confirmation",
text: "This will remove the Client completely from the system. Do you want to continue",
type: "info",
showCancelButton: true,
confirmButtonClass: "btn-danger conBtn",
confirmButtonText: "Yes, remove it!",
showLoaderOnConfirm: true,
closeOnConfirm: false,
closeOnCancel: false
},
function(isConfirm){
if (isConfirm) {
$.ajax({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
type: "DELETE",
data: { id: clientID },
url: base_url + "/clients/" + clientID,
success: function(data){
if (data.code === 1) {
$(Rrow).remove();
$('#totalRecords').text(recordsTotal - 1);
swal("Deleted!", "Selected Client has been removed .", "success");
}
if (data.code === 3) {
swal("Not Permitted", "This Operator has transactions! .", "warning");
}
}
});// end of ajax function
} else {
swal("Cancelled", "You cancelled the operation :)", "error");
}
});
});
});
</script>
@endsection

View File

@@ -0,0 +1,49 @@
<div class="modal fade" id="newNotesForm" tabindex="-1" role="dialog" aria-labelledby="approveModalLabel" 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="approveModalLabelHeading">New Notes</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form class="form-vertical" method="POST" id="newNotesFormForm" action="{{ url('clients/notes_store') }}">
{{ csrf_field() }}
<!-- <input type="hidden" name="user_id" value="" id="userID" > -->
<input type="hidden" name="client_id" id="clientID" value="{{ $showclient->id }}">
<div class="row">
<div class="form-group">
<label for="notesServices">Services</label>
<div class="col-md-12">
{!! Form::select('services[]', $service_type_names , old('services'), ['class' => 'form-control' , 'id' => 'notesServices', 'required' => 'required', 'multiple'=> 'true', 'style' => 'width: 100%']) !!}
</div>
</div>
<div class="form-group" >
<div class="col-md-12" style="padding-bottom: 5px;">
<label for="notesBody">Notes</label>
<textarea class="form-control" name="notes_body" rows="5" id="notesBody"></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 -->

View File

@@ -0,0 +1,210 @@
@extends('layouts.master')
@section('page_title')
@if(isset($page_title))
{{ $page_title }}
@endif
@endsection
@section('content')
@include('client.new_notes')
<div class="">
<div class="page-title">
<div class="title_left">
</div>
<div class="title_left">
<ol class="breadcrumb">
<li><a href="{!! url('dashboard') !!}">Dashboard</a></li>
<li><a href="{!! url('clients') !!}">Client</a></li>
<li class="active">Client Details</li>
</ol>
</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>Client Details </h2>
<div class="clearfix"></div>
</div>
<div class="x_content">
<div class="col-md-3 col-sm-3 col-xs-12 profile_left">
<div class="profile_img">
<div id="crop-avatar">
<!-- Current avatar -->
<img class="img-responsive avatar-view" src="{{ url('public/assets/img/generic-client.png') }}" alt="Generic Client Icon" title="Change the avatar" width="100px">
</div>
</div>
<h3>{{ $showclient->name }}</h3>
<div class="well" style="border-radius: 25px;">
Click Account Manager <br>
<strong><em> <?php echo $showclient->auth_user_info->name ?? 'N/A' ?> </em></strong>
</div>
<h4>Client Name Account Manager</h4>
<ul class="list-unstyled user_data">
<li><i class="fa fa-phone user-profile-icon"></i> <?php echo $showclient->phone ?? "N/A"; ?></li>
<li><i class="fa fa-envelope user-profile-icon"></i> <?php echo $showclient->email ?? "N/A"; ?> </li>
<li class="m-top-xs"><i class="fa fa-skype user-profile-icon"></i> <?php echo $showclient->skype_name ?? "N/A"; ?></li>
<li class="m-top-xs"><i class="fa fa-linkedin user-profile-icon"></i> <?php echo $showclient->linkedin_name ?? "N/A"; ?></li>
</ul>
<!-- <a class="btn btn-success"><i class="fa fa-edit m-right-xs"></i>Edit Profile</a> -->
<br />
<!-- start skills -->
<h4>Finance</h4>
<ul class="list-unstyled user_data">
<li><i class="fa fa-phone user-profile-icon"></i> [Phone Number here]</li>
<li><i class="fa fa-envelope user-profile-icon"></i> [email here] </li>
<li class="m-top-xs"><i class="fa fa-skype user-profile-icon"></i> [Skype ID Here]</li>
</ul>
<!-- end of skills -->
</div>
<div class="col-md-9 col-sm-9 col-xs-12" style="border: 1px solid; min-height: 500px;">
<div class="" role="tabpanel" data-example-id="togglable-tabs">
<ul id="myTab" class="nav nav-tabs bar_tabs" role="tablist">
<li role="presentation" class="active"><a href="#tabCompany" id="home-tab" role="tab" data-toggle="tab" aria-expanded="true">Company</a></li>
<li role="presentation" class=""><a href="#tabConnection" role="tab" id="profile-tab" data-toggle="tab" aria-expanded="false">Connection</a></li>
<li role="presentation" class=""><a href="#tabContract" role="tab" id="profile-tab2" data-toggle="tab" aria-expanded="false">Contract</a></li>
<li role="presentation" class=""><a href="#tabFinance" role="tab" id="profile-tab2" data-toggle="tab" aria-expanded="false">Finance</a></li>
<li role="presentation" class=""><a href="#tabNotes" role="tab" id="profile-tab2" data-toggle="tab" aria-expanded="false">Notes</a></li>
</ul>
<div id="myTabContent" class="tab-content">
<div role="tabpanel" class="tab-pane fade active in" id="tabCompany" aria-labelledby="home-tab">
<strong>Company Details</strong>
<p>Country : </p>
<p>Company Type : </p>
<p>Products </p>
<p>Products Description</p>
<p>Product Specification</p>
<p>Networks</p>
<p>Requested Sender IDs</p>
</div>
<div role="tabpanel" class="tab-pane fade" id="tabConnection" aria-labelledby="profile-tab">
<strong>Connection Details </strong>
Click Mobile SMPP Details <br>
SMPP Categorisation <br>
SMPP Account Name<br>
<br>
Partner SMPP Details <br>
SMPP Categorisation<br>
SMPP Account Name<br>
</div>
<div role="tabpanel" class="tab-pane fade" id="tabContract" aria-labelledby="profile-tab">
<strong>Contract Details </strong>
Contract Type : Bilateral <br>
Contract Validity : [------]
</div>
<div role="tabpanel" class="tab-pane fade" id="tabFinance" aria-labelledby="profile-tab">
<strong>Finance Details </strong>
Last Invoice Sent : YES (2023-01-12) <br>
Payment Status : Paid (2023-01-15)
</div>
<div role="tabpanel" class="tab-pane fade" id="tabNotes" aria-labelledby="profile-tab">
<strong><h3> Notes</h3> </strong>
<div class="pull-right">
<!-- {{ url('clients/create-notes') }} -->
<button type="button" class="btn btn-primary btn-sm" id="creatNotesBtn">New Notes <i class="fa fa-plus-square"></i> </button>
</div>
<div class="clearfix"></div>
<div style="background-color: #dce2e4; height: 400px; overflow: scroll;">
<ul class="messages" style="padding: 15px;">
@if($show_notes->isEmpty())
<li>No notes found</li>
@else
<?php for ($i = 0; $i < $show_notes->count(); $i++) { ?>
<li>
<div class="message_date">
<h3 class="date text-info"><?php echo date('d', strtotime($show_notes[$i]->created_at)); ?></h3>
<p class="month"><?php echo date('M', strtotime($show_notes[$i]->created_at)); ?></p>
<p class="year"><?php echo date('Y', strtotime($show_notes[$i]->created_at)); ?></p>
</div>
<div class="message_wrapper">
<h4 class="heading">{{ $show_notes[$i]->client_info->name }}</h4>
<blockquote class="message"><em>Content : </em> {{ $show_notes[$i]->notes_body }}</blockquote>
<br />
<p class="url">
<span class="fs1 text-info" aria-hidden="true" data-icon=""></span>
<a href="#"><i class="fa fa-edit"></i>Account Manager : {{ $show_notes[$i]->created_by_info->name }} </a>
</p>
</div>
</li>
<?php } ?>
@endif
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('javascript')
<script type="text/javascript">
$(document).ready(function(){
$('select').select2();
$('#creatNotesBtn').click(function(evt){
evt.preventDefault();
$('#newNotesForm').modal('show');
});
$('#newNotesFormForm').submit(function(evt){
evt.preventDefault();
var formData = new FormData($(this)[0]);
$.ajax({
type: "POST",
url: base_url + '/clients/notes_store',
data : formData,
processData: false,
contentType: false,
async: false,
success: function (data){
if (data.code === 1) {
$("#newNotesFormForm")[0].reset();
$.alert({
title: 'Alert!',
content: 'Notes added successfully',
});
setTimeout(function(){
location.reload();
}, 8000);
}
else if (data.code > 5) {
$.alert({
title: 'Alert!',
content: data.msg,
});
}
else {
$.alert({
title: 'Alert!',
content: 'Your request could not be handled. Try again !',
});
}
}
});
});
});
</script>
@endsection

View File

@@ -0,0 +1,162 @@
@extends('layouts.master')
@section('page_title')
@if(isset($page_title))
{{ $page_title }}
@endif
@endsection
@section('content')
<div class="">
<div class="page-title">
<div class="title_left">
</div>
<div class="title_left">
<ol class="breadcrumb">
<li><a href="{!! url('dashboard') !!}">Dashboard</a></li>
<li><a href="{!! url('clients') !!}">Client</a></li>
<li class="active">Client Details</li>
</ol>
</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>Client Details </h2>
<div class="clearfix"></div>
</div>
<div class="x_content">
<section class="content invoice">
<!-- title row -->
<div class="row">
<div class="col-xs-12 invoice-header">
<h1>
<i class="fa fa-cube"></i> {{ $showclient->name }}
<!-- <small class="pull-right">Date: 16/08/2016</small> -->
</h1>
</div>
<!-- /.col -->
</div>
<!-- info row -->
<div class="row invoice-info">
<div class="col-sm-4 invoice-col">
<address>
<strong>Contact Person :{{ $showclient->contact_person or 'N/A' }}</strong>
<br>Country: @if($showclient->country_info) {{ $showclient->country_info->en_short_name }} @else None Entered @endif
<br>Email: ironadmin.com
<br>Skype: ironadmin.com
<br>Linked In: ironadmin.com
</address>
</div>
<div class="col-sm-4 invoice-col">
<b>Last Payment</b>
<br>
<br>
<b>Invoice Number :</b> 4F3S8J
<br>
<b>Payment Date:</b> 12/22/2022
<br>
<b>Amount :</b> $3,4567
</div>
<div class="col-sm-4 invoice-col">
Account Manager
<address>
<strong>{{ $showclient->auth_user_info->name }}</strong>
</address>
</div>
</div>
<!-- /.row -->
<!-- Table row -->
<div class="row">
<h3>Services</h3>
<div class="col-xs-12 table">
<table class="table table-striped">
<thead>
<tr>
<th>Service Name</th>
<th>Date Started</th>
<th style="width: 45%">Description</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@if ($show_services->isEmpty())
<tr>
<td class="" colspan="5">No Services found</td>
</tr>
@else
@foreach($show_services as $service)
<tr>
<td>{{ $service_type[$service->category_id] }}</td>
<td>{{ $service->date_started or 'N/A' }}</td>
<td>{{ $service->description or 'N/A' }} </td>
<td>{{ $service->status }}</td>
<td class="last" >
<a href="" class="btn btn-xs btn-primary"><i class="fa fa-edit"></i></a>
<!-- <a href="{!! route('clients.edit', [$service->id]) !!}" class="btn btn-xs btn-primary"><i class="fa fa-edit"></i></a>
<a title="Remove Service" class="btn btn-xs btn-danger removeService"><i class="fa fa-trash"></i></a> -->
<input type="hidden" name="service_id" class="serviceID" value="{{ $service->id }}">
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
<div class="row">
<!-- accepted payments column -->
<!-- /.col -->
<!-- <div class="col-xs-12">
<p class="lead">Amount Due 01/31/2023</p>
<div class="table-responsive">
<table class="table">
<tbody>
<tr>
<th style="width:50%">Subtotal:</th>
<td>$250.30</td>
</tr>
<tr>
<th>Tax (9.3%)</th>
<td>$10.34</td>
</tr>
<tr>
<th>Total:</th>
<td>$260.24</td>
</tr>
</tbody>
</table>
</div>
</div> -->
<!-- /.col -->
</div>
<!-- /.row -->
<!-- this row will not appear when printing -->
<!-- <div class="row no-print">
<div class="col-xs-12">
<button class="btn btn-default" onclick="window.print();"><i class="fa fa-print"></i> Print</button>
<button class="btn btn-success pull-right"><i class="fa fa-credit-card"></i> Submit Payment</button>
<button class="btn btn-primary pull-right" style="margin-right: 5px;"><i class="fa fa-download"></i> Generate PDF</button>
</div>
</div> -->
</section>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection