update for version 1.0.1
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Tools')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('tools-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('tools')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
<!-- open a form -->
|
||||
{!! Form::open(['route'=>'canned.store','method' => 'patch']) !!}
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Create </h3>
|
||||
<div class="pull-right">{!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
<div class="row">
|
||||
<!-- username -->
|
||||
<div class="col-xs-6 form-group {{ $errors->has('title') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('title',Lang::get('lang.title')) !!}
|
||||
{!! $errors->first('title', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('title',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
<!-- firstname -->
|
||||
<div class="col-xs-12 form-group {{ $errors->has('message') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('message',Lang::get('lang.message')) !!}
|
||||
{!! $errors->first('message', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::textarea('message',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
//Add text editor
|
||||
$("textarea").wysihtml5();
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
@@ -0,0 +1,56 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Tools')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('tools-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('tools')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
<!-- open a form -->
|
||||
|
||||
{!! Form::model($canned, ['url' => 'canned/update/'.$canned->id,'method' => 'PATCH'] )!!}
|
||||
|
||||
<!-- <section class="content"> -->
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Edit</h3>{!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
<div class="row">
|
||||
<!-- username -->
|
||||
<div class="col-xs-6 form-group {{ $errors->has('title') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('title',Lang::get('lang.title')) !!}
|
||||
{!! $errors->first('title', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('title',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
<!-- firstname -->
|
||||
<div class="col-xs-12 form-group {{ $errors->has('message') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('message',Lang::get('lang.message')) !!}
|
||||
{!! $errors->first('message', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::textarea('message',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
//Add text editor
|
||||
$("textarea").wysihtml5();
|
||||
});
|
||||
</script>
|
||||
|
||||
@stop
|
||||
@@ -0,0 +1,104 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Tools')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('tools-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('tools')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h2 class="box-title">Canned Response</h2><a href="{{route('canned.create')}}" class="btn btn-primary pull-right">Create Canned Response</a></div>
|
||||
<div class="box-body table-responsive">
|
||||
<?php
|
||||
$Canneds = App\Model\helpdesk\Agent_panel\Canned::where('user_id', '=', Auth::user()->id)->paginate(20);
|
||||
?>
|
||||
<!-- check whether success or not -->
|
||||
{{-- Success message --}}
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"></i>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
{{-- failure message --}}
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- Agent table -->
|
||||
<table class="table table-bordered table-hover" id="example1" >
|
||||
<tr>
|
||||
<th width="100px">{{Lang::get('lang.name')}}</th>
|
||||
<th width="100px">{{Lang::get('lang.action')}}</th>
|
||||
</tr>
|
||||
@foreach($Canneds as $Canned)
|
||||
|
||||
<tr>
|
||||
<td>{{$Canned->title }}</td>
|
||||
<td>
|
||||
{!! Form::open(['route'=>['canned.destroy', $Canned->id],'method'=>'DELETE']) !!}
|
||||
<a data-toggle="modal" data-target="#view{!! $Canned->id !!}" href="#" class="btn btn-info btn-xs btn-flat">View</a>
|
||||
<a href="{!! URL::route('canned.edit',$Canned->id) !!}" class="btn btn-primary btn-xs btn-flat">Edit</a>
|
||||
|
||||
{!! Form::button('<i class="fa fa-trash" style="color:black;"> </i> Delete',
|
||||
['type' => 'submit',
|
||||
'class'=> 'btn btn-warning btn-xs btn-flat',
|
||||
'onclick'=>'return confirm("Are you sure?")'])
|
||||
!!}
|
||||
|
||||
{!! Form::close() !!}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Surrender Modal -->
|
||||
<div class="modal fade" id="view{!! $Canned->id !!}">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">Surrender</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><pre>{!! $Canned->message !!}</pre></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis6">Close</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$("#example1").DataTable();
|
||||
$('#example2').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
<!-- /content -->
|
||||
@@ -0,0 +1,30 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Tools')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('tools-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('tools')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
<!-- <section class="content"> -->
|
||||
<div class="box box-primary">
|
||||
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">hi</h3>
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
<pre>hello</pre>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
<!-- /content -->
|
||||
@@ -0,0 +1,210 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Dashboard')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('dashboard-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('dashboard')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="box box-info">
|
||||
|
||||
<?php
|
||||
|
||||
// $tickets = App\Model\Ticket\Tickets::where('created_at','>=',date('Y-m-d'))->get();
|
||||
|
||||
// echo count($tickets);
|
||||
|
||||
?>
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Line Chart</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
<button class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="chart" >
|
||||
<div id="legendDiv"></div>
|
||||
<canvas class="chart-data" id="tickets-graph" width="1000" height="400"></canvas>
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
<hr/>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h1>Statistics</h1>
|
||||
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<table class="table table-hover" style="overflow:hidden;">
|
||||
|
||||
<tr>
|
||||
<th>Department</th>
|
||||
<th>Opened</th>
|
||||
<th>Resolved</th>
|
||||
<th>Closed</th>
|
||||
<th>Deleted</th>
|
||||
</tr>
|
||||
|
||||
<?php $departments = App\Model\helpdesk\Agent\Department::all(); ?>
|
||||
@foreach($departments as $department)
|
||||
<?php
|
||||
$open = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$department->id)->where('status','=',1)->count();
|
||||
$resolve = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$department->id)->where('status','=',2)->count();
|
||||
$close = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$department->id)->where('status','=',3)->count();
|
||||
$delete = App\Model\helpdesk\Ticket\Tickets::where('dept_id','=',$department->id)->where('status','=',5)->count();
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>{!! $department->name !!}</td>
|
||||
<td>{!! $open !!}</td>
|
||||
<td>{!! $resolve !!}</td>
|
||||
<td>{!! $close !!}</td>
|
||||
<td>{!! $delete !!}</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="{{asset("lb-faveo/plugins/chartjs/Chart.min.js")}}" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$.getJSON("agen", function (result) {
|
||||
|
||||
|
||||
var labels = [],data=[],data2=[];
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
|
||||
$var12 = result[i].month;
|
||||
if($var12 == 1){
|
||||
$var13 = "January";
|
||||
}
|
||||
if($var12 == 2){
|
||||
$var13 = "Febuary";
|
||||
}
|
||||
if($var12 == 3){
|
||||
$var13 = "March";
|
||||
}
|
||||
if($var12 == 4){
|
||||
$var13 = "April";
|
||||
}
|
||||
if($var12 == 5){
|
||||
$var13 = "May";
|
||||
}
|
||||
if($var12 == 6){
|
||||
$var13 = "June";
|
||||
}
|
||||
if($var12 == 7){
|
||||
$var13 = "July";
|
||||
}
|
||||
if($var12 == 8){
|
||||
$var13 = "August";
|
||||
}
|
||||
if($var12 == 9){
|
||||
$var13 = "September";
|
||||
}
|
||||
if($var12 == 10){
|
||||
$var13 = "October";
|
||||
}
|
||||
if($var12 == 11){
|
||||
$var13 = "November";
|
||||
}
|
||||
if($var12 == 12){
|
||||
$var13 = "December";
|
||||
}
|
||||
labels.push($var13);
|
||||
data.push(result[i].tickets);
|
||||
// data2.push(result[i].monthNum);
|
||||
}
|
||||
|
||||
var buyerData = {
|
||||
labels : labels,
|
||||
datasets : [
|
||||
{
|
||||
label : "Tickets" ,
|
||||
fillColor : "rgba(240, 127, 110, 0.3)",
|
||||
strokeColor : "#f56954",
|
||||
pointColor : "#A62121",
|
||||
pointStrokeColor : "#741F1F",
|
||||
data : data
|
||||
|
||||
}
|
||||
//,
|
||||
// {
|
||||
// label : "Closed Tickets",
|
||||
// fillColor : "rgba(151,187,205,0.2)",
|
||||
// strokeColor : "rgba(151,187,205,1)",
|
||||
// pointColor : "rgba(151,187,205,1)",
|
||||
// pointStrokeColor : "#fff",
|
||||
// pointHighlightFill : "#fff",
|
||||
// pointHighlightStroke : "rgba(151,187,205,1)",
|
||||
// data : data2
|
||||
// }
|
||||
]
|
||||
};
|
||||
|
||||
var myLineChart = new Chart(document.getElementById("tickets-graph").getContext("2d")).Line(buyerData, {
|
||||
showScale: true,
|
||||
//Boolean - Whether grid lines are shown across the chart
|
||||
scaleShowGridLines: false,
|
||||
//String - Colour of the grid lines
|
||||
scaleGridLineColor: "rgba(0,0,0,.05)",
|
||||
//Number - Width of the grid lines
|
||||
scaleGridLineWidth: 1,
|
||||
//Boolean - Whether to show horizontal lines (except X axis)
|
||||
scaleShowHorizontalLines: true,
|
||||
//Boolean - Whether to show vertical lines (except Y axis)
|
||||
scaleShowVerticalLines: true,
|
||||
//Boolean - Whether the line is curved between points
|
||||
bezierCurve: false,
|
||||
//Number - Tension of the bezier curve between points
|
||||
bezierCurveTension: 0.3,
|
||||
//Boolean - Whether to show a dot for each point
|
||||
pointDot: true,
|
||||
//Number - Radius of each point dot in pixels
|
||||
pointDotRadius: 4,
|
||||
//Number - Pixel width of point dot stroke
|
||||
pointDotStrokeWidth: 1,
|
||||
//Number - amount extra to add to the radius to cater for hit detection outside the drawn point
|
||||
pointHitDetectionRadius: 20,
|
||||
//Boolean - Whether to show a stroke for datasets
|
||||
datasetStroke: true,
|
||||
//Number - Pixel width of dataset stroke
|
||||
datasetStrokeWidth: 1,
|
||||
//Boolean - Whether to fill the dataset with a color
|
||||
datasetFill: true,
|
||||
//String - A legend template
|
||||
//Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container
|
||||
maintainAspectRatio: false,
|
||||
//Boolean - whether to make the chart responsive to window resizing
|
||||
responsive: true,
|
||||
legendTemplate : '<ul style="list-style-type: square;">'
|
||||
+'<% for (var i=0; i<datasets.length; i++) { %>'
|
||||
+'<li style="color: <%=datasets[i].pointColor%>;">'
|
||||
+'<span style=\"background-color:<%=datasets[i].pointColor%>\"></span>'
|
||||
+'<% if (datasets[i].label) { %><%= datasets[i].label %><% } %>'
|
||||
+'</li>'
|
||||
+'<% } %>'
|
||||
+'</ul>'
|
||||
});
|
||||
|
||||
document.getElementById("legendDiv").innerHTML = myLineChart.generateLegend();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@stop
|
||||
@@ -0,0 +1,233 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Tickets')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('ticket-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('inbox')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<?php
|
||||
$dept = App\Model\helpdesk\Agent\Department::where('name','=',$id)->first();
|
||||
if(Auth::user()->role == 'agent') {
|
||||
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status','=','2')->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
} else {
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status','=','2')->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
}
|
||||
?>
|
||||
<!-- Main content -->
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Inbox </h3> <small>{!! $tickets->total() !!} tickets</small>
|
||||
</div><!-- /.box-header -->
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding ">
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
<div class="mailbox-controls">
|
||||
<h3 class="pull-right" style="margin-top:0;margin-bottom:0;"> {!! $tickets->count().'-'.$tickets->total(); !!}</h3>
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<a class="btn btn-default btn-sm" id="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" value="Delete">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="Close">
|
||||
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>Loading...</b></p>
|
||||
<!-- table -->
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th>
|
||||
</th>
|
||||
<th>Subject</th>
|
||||
<th>Ticket ID</th>
|
||||
<th>Priority</th>
|
||||
<th>From</th>
|
||||
<th>Last Replier</th>
|
||||
<th>Assigned To</th>
|
||||
<th>Last Activity</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
|
||||
@foreach ($tickets as $ticket)
|
||||
<?php
|
||||
// title
|
||||
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
if($title)
|
||||
if($title == null){
|
||||
|
||||
} else {
|
||||
?>
|
||||
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php } ?> >
|
||||
<td ><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
|
||||
<?php
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
|
||||
if (strlen($string) > 40) {
|
||||
$stringCut = substr($string, 0, 40);
|
||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
|
||||
}
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
$username = $LastResponse->user_name;
|
||||
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
|
||||
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
|
||||
$username = $LastResponse->user_name;
|
||||
}}
|
||||
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
$count = count($titles);
|
||||
foreach($titles as $title)
|
||||
{
|
||||
$title = $title;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null)
|
||||
{
|
||||
$assigned = "Unassigned";
|
||||
}
|
||||
else
|
||||
{
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority_desc}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
@if($from->role == "user")
|
||||
<td class="mailbox-from" >{!! $from->user_name !!}</td>
|
||||
@else
|
||||
<td class="mailbox-from" >{!! $from->first_name." ".$from->last_name !!}</td>
|
||||
@endif
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/ticket/inbox'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /. box -->
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
//Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function () {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
|
||||
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("check");
|
||||
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
// Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function() {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() { /// Wait till page is loaded
|
||||
$('#click').click(function() {
|
||||
$('#refresh').load('open #refresh');
|
||||
$("#show").show();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// check box get data
|
||||
// jQuery(function($) {
|
||||
// $("form input[id='check_all']").click(function() { // triggred check
|
||||
|
||||
// var inputs = $("form input[type='checkbox']"); // get the checkbox
|
||||
|
||||
// for(var i = 0; i < inputs.length; i++) { // count input tag in the form
|
||||
// var type = inputs[i].getAttribute("type"); // get the type attribute
|
||||
// if(type == "checkbox") {
|
||||
// if(this.checked) {
|
||||
// inputs[i].checked = true; // checked
|
||||
// } else {
|
||||
// inputs[i].checked = false; // unchecked
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
// $("form input[id='submit']").click(function() { // triggred submit
|
||||
|
||||
// var count_checked = $("[name='data[]']:checked").length; // count the checked
|
||||
// if(count_checked == 0) {
|
||||
// alert("Please select a product(s) to delete.");
|
||||
// return false;
|
||||
// }
|
||||
// if(count_checked == 1) {
|
||||
// return confirm("Are you sure you want to delete these product?");
|
||||
// } else {
|
||||
// return confirm("Are you sure you want to delete these products?");
|
||||
// }
|
||||
// });
|
||||
// }); // jquery end
|
||||
|
||||
</script>
|
||||
@stop
|
||||
@@ -0,0 +1,233 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Tickets')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('ticket-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('inbox')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<?php
|
||||
$dept = App\Model\helpdesk\Agent\Department::where('name','=',$id)->first();
|
||||
if(Auth::user()->role == 'agent') {
|
||||
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status','=','1')->where('assigned_to','>', 0)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
} else {
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status','=','1')->where('assigned_to','>', 0)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
}
|
||||
?>
|
||||
<!-- Main content -->
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Inbox </h3> <small>{!! $tickets->total() !!} tickets</small>
|
||||
</div><!-- /.box-header -->
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding ">
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
<div class="mailbox-controls">
|
||||
<h3 class="pull-right" style="margin-top:0;margin-bottom:0;"> {!! $tickets->count().'-'.$tickets->total(); !!}</h3>
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<a class="btn btn-default btn-sm" id="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" value="Delete">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="Close">
|
||||
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>Loading...</b></p>
|
||||
<!-- table -->
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th>
|
||||
</th>
|
||||
<th>Subject</th>
|
||||
<th>Ticket ID</th>
|
||||
<th>Priority</th>
|
||||
<th>From</th>
|
||||
<th>Last Replier</th>
|
||||
<th>Assigned To</th>
|
||||
<th>Last Activity</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
|
||||
@foreach ($tickets as $ticket)
|
||||
<?php
|
||||
// title
|
||||
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
if($title)
|
||||
if($title == null){
|
||||
|
||||
} else {
|
||||
?>
|
||||
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php } ?> >
|
||||
<td ><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
|
||||
<?php
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
|
||||
if (strlen($string) > 40) {
|
||||
$stringCut = substr($string, 0, 40);
|
||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
|
||||
}
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
$username = $LastResponse->user_name;
|
||||
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
|
||||
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
|
||||
$username = $LastResponse->user_name;
|
||||
}}
|
||||
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
$count = count($titles);
|
||||
foreach($titles as $title)
|
||||
{
|
||||
$title = $title;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null)
|
||||
{
|
||||
$assigned = "Unassigned";
|
||||
}
|
||||
else
|
||||
{
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority_desc}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
@if($from->role == "user")
|
||||
<td class="mailbox-from" >{!! $from->user_name !!}</td>
|
||||
@else
|
||||
<td class="mailbox-from" >{!! $from->first_name." ".$from->last_name !!}</td>
|
||||
@endif
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/ticket/inbox'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /. box -->
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
//Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function () {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
|
||||
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("check");
|
||||
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
// Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function() {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() { /// Wait till page is loaded
|
||||
$('#click').click(function() {
|
||||
$('#refresh').load('open #refresh');
|
||||
$("#show").show();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// check box get data
|
||||
// jQuery(function($) {
|
||||
// $("form input[id='check_all']").click(function() { // triggred check
|
||||
|
||||
// var inputs = $("form input[type='checkbox']"); // get the checkbox
|
||||
|
||||
// for(var i = 0; i < inputs.length; i++) { // count input tag in the form
|
||||
// var type = inputs[i].getAttribute("type"); // get the type attribute
|
||||
// if(type == "checkbox") {
|
||||
// if(this.checked) {
|
||||
// inputs[i].checked = true; // checked
|
||||
// } else {
|
||||
// inputs[i].checked = false; // unchecked
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
// $("form input[id='submit']").click(function() { // triggred submit
|
||||
|
||||
// var count_checked = $("[name='data[]']:checked").length; // count the checked
|
||||
// if(count_checked == 0) {
|
||||
// alert("Please select a product(s) to delete.");
|
||||
// return false;
|
||||
// }
|
||||
// if(count_checked == 1) {
|
||||
// return confirm("Are you sure you want to delete these product?");
|
||||
// } else {
|
||||
// return confirm("Are you sure you want to delete these products?");
|
||||
// }
|
||||
// });
|
||||
// }); // jquery end
|
||||
|
||||
</script>
|
||||
@stop
|
||||
@@ -0,0 +1,232 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Tickets')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('ticket-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('inbox')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<?php
|
||||
$dept = App\Model\helpdesk\Agent\Department::where('name','=',$id)->first();
|
||||
if(Auth::user()->role == 'agent') {
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status','=','1')->where('assigned_to','=', 0)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
} else {
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status','=','1')->where('assigned_to','=', 0)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
}
|
||||
?>
|
||||
<!-- Main content -->
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Inbox </h3> <small>{!! $tickets->total() !!} tickets</small>
|
||||
</div><!-- /.box-header -->
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding ">
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
<div class="mailbox-controls">
|
||||
<h3 class="pull-right" style="margin-top:0;margin-bottom:0;"> {!! $tickets->count().'-'.$tickets->total(); !!}</h3>
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<a class="btn btn-default btn-sm" id="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" value="Delete">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="Close">
|
||||
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>Loading...</b></p>
|
||||
<!-- table -->
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th>
|
||||
</th>
|
||||
<th>Subject</th>
|
||||
<th>Ticket ID</th>
|
||||
<th>Priority</th>
|
||||
<th>From</th>
|
||||
<th>Last Replier</th>
|
||||
<th>Assigned To</th>
|
||||
<th>Last Activity</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
|
||||
@foreach ($tickets as $ticket)
|
||||
<?php
|
||||
// title
|
||||
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
if($title)
|
||||
if($title == null){
|
||||
|
||||
} else {
|
||||
?>
|
||||
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php } ?> >
|
||||
<td ><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
|
||||
<?php
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
|
||||
if (strlen($string) > 40) {
|
||||
$stringCut = substr($string, 0, 40);
|
||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
|
||||
}
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
$username = $LastResponse->user_name;
|
||||
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
|
||||
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
|
||||
$username = $LastResponse->user_name;
|
||||
}}
|
||||
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
$count = count($titles);
|
||||
foreach($titles as $title)
|
||||
{
|
||||
$title = $title;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null)
|
||||
{
|
||||
$assigned = "Unassigned";
|
||||
}
|
||||
else
|
||||
{
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority_desc}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
@if($from->role == "user")
|
||||
<td class="mailbox-from" >{!! $from->user_name !!}</td>
|
||||
@else
|
||||
<td class="mailbox-from" >{!! $from->first_name." ".$from->last_name !!}</td>
|
||||
@endif
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/ticket/inbox'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /. box -->
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
//Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function () {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
|
||||
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("check");
|
||||
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
// Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function() {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() { /// Wait till page is loaded
|
||||
$('#click').click(function() {
|
||||
$('#refresh').load('open #refresh');
|
||||
$("#show").show();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// check box get data
|
||||
// jQuery(function($) {
|
||||
// $("form input[id='check_all']").click(function() { // triggred check
|
||||
|
||||
// var inputs = $("form input[type='checkbox']"); // get the checkbox
|
||||
|
||||
// for(var i = 0; i < inputs.length; i++) { // count input tag in the form
|
||||
// var type = inputs[i].getAttribute("type"); // get the type attribute
|
||||
// if(type == "checkbox") {
|
||||
// if(this.checked) {
|
||||
// inputs[i].checked = true; // checked
|
||||
// } else {
|
||||
// inputs[i].checked = false; // unchecked
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
// $("form input[id='submit']").click(function() { // triggred submit
|
||||
|
||||
// var count_checked = $("[name='data[]']:checked").length; // count the checked
|
||||
// if(count_checked == 0) {
|
||||
// alert("Please select a product(s) to delete.");
|
||||
// return false;
|
||||
// }
|
||||
// if(count_checked == 1) {
|
||||
// return confirm("Are you sure you want to delete these product?");
|
||||
// } else {
|
||||
// return confirm("Are you sure you want to delete these products?");
|
||||
// }
|
||||
// });
|
||||
// }); // jquery end
|
||||
|
||||
</script>
|
||||
@stop
|
||||
@@ -0,0 +1,93 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Users')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('user-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('organizations')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
|
||||
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
<!-- open a form -->
|
||||
|
||||
{!! Form::open(['action'=>'Agent\helpdesk\OrganizationController@store','method'=>'post']) !!}
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="content-header">
|
||||
<h4>{{Lang::get('lang.create')}} {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<!-- name : text : Required -->
|
||||
<div class="row">
|
||||
<div class="col-xs-4 form-group {{ $errors->has('name') ? 'has-error' : '' }}">
|
||||
{!! Form::label('name',Lang::get('lang.name')) !!}
|
||||
{!! $errors->first('name', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('name',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<!-- phone : Text : -->
|
||||
<div class="col-xs-4 form-group {{ $errors->has('phone') ? 'has-error' : '' }}">
|
||||
{!! Form::label('phone',Lang::get('lang.phone')) !!}
|
||||
{!! $errors->first('phone', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('phone',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<!-- website : Text : -->
|
||||
<div class="col-xs-4 form-group {{ $errors->has('website') ? 'has-error' : '' }}">
|
||||
{!! Form::label('website',Lang::get('lang.website')) !!}
|
||||
{!! $errors->first('website', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('website',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Internal Notes : Textarea -->
|
||||
<div class="row">
|
||||
<div class="col-xs-6 form-group">
|
||||
{!! Form::label('address',Lang::get('lang.address')) !!}
|
||||
{!! Form::textarea('address',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 form-group">
|
||||
|
||||
{!! Form::label('internal_notes',Lang::get('lang.internal_notes')) !!}
|
||||
{!! Form::textarea('internal_notes',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@section('FooterInclude')
|
||||
|
||||
@stop
|
||||
@stop
|
||||
<!-- /content -->
|
||||
@stop
|
||||
@section('FooterInclude')
|
||||
|
||||
@stop
|
||||
|
||||
<!-- /content -->
|
||||
@@ -0,0 +1,86 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
@section('Users')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('user-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('organizations')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
|
||||
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
<!-- open a form -->
|
||||
|
||||
{!! Form::model($orgs,['url'=>'organizations/'.$orgs->id,'method'=>'PATCH']) !!}
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="content-header">
|
||||
<h4>{{Lang::get('lang.edit')}} {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<!-- name : text : Required -->
|
||||
<div class="row">
|
||||
<div class="col-xs-4 form-group {{ $errors->has('name') ? 'has-error' : '' }}">
|
||||
{!! Form::label('name',Lang::get('lang.name')) !!}
|
||||
{!! $errors->first('name', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('name',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<!-- phone : Text : -->
|
||||
<div class="col-xs-4 form-group {{ $errors->has('phone') ? 'has-error' : '' }}">
|
||||
{!! Form::label('phone',Lang::get('lang.phone')) !!}
|
||||
{!! $errors->first('phone', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('phone',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<!--website : Text : -->
|
||||
<div class="col-xs-4 form-group {{ $errors->has('website') ? 'has-error' : '' }}">
|
||||
{!! Form::label('website',Lang::get('lang.website')) !!}
|
||||
{!! $errors->first('website', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('website',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Internal Notes : Textarea -->
|
||||
<div class="row">
|
||||
<div class="col-xs-6 form-group">
|
||||
{!! Form::label('address',Lang::get('lang.address')) !!}
|
||||
{!! Form::textarea('address',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<div class="col-xs-6 form-group">
|
||||
{!! Form::label('internal_notes',Lang::get('lang.internal_notes')) !!}
|
||||
{!! Form::textarea('internal_notes',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@section('FooterInclude')
|
||||
|
||||
@stop
|
||||
@stop
|
||||
<!-- /content -->
|
||||
@stop
|
||||
@section('FooterInclude')
|
||||
|
||||
@stop
|
||||
|
||||
<!-- /content -->
|
||||
@@ -0,0 +1,91 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Users')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('user-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('organizations')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h2 class="box-title">{{Lang::get('lang.organization')}}</h2><a href="{{route('organizations.create')}}" class="btn btn-primary pull-right">{{Lang::get('lang.create_organisations')}}</a></div>
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<!-- check whether success or not -->
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"></i>
|
||||
<b>Success!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Alert!</b> Failed.
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<?php
|
||||
$orgs = App\Model\helpdesk\Agent_panel\Organization::orderBy('id', 'ASC')->paginate(20);
|
||||
?>
|
||||
<table class="table table-hover" style="overflow:hidden;">
|
||||
<tr>
|
||||
<th width="100px">{{Lang::get('lang.name')}}</th>
|
||||
<th width="100px">{{Lang::get('lang.phone')}}</th>
|
||||
<th width="100px">{{Lang::get('lang.website')}}</th>
|
||||
<th width="100px">{{Lang::get('lang.action')}}</th>
|
||||
</tr>
|
||||
@foreach($orgs as $org)
|
||||
<tr>
|
||||
<td><a href="{{route('organizations.show', $org->id)}}"> {{$org->name }}</a></td>
|
||||
|
||||
<td>{{ $org->phone }}</td>
|
||||
<td>{{ $org->website }}</td>
|
||||
<td>
|
||||
{!! Form::open(['route'=>['organizations.destroy', $org->id],'method'=>'DELETE']) !!}
|
||||
|
||||
<div class="">
|
||||
<a href="{{route('organizations.edit', $org->id)}}" class="btn btn-info btn-xs btn-flat"><i class="fa fa-edit" style="color:black;"> </i> Edit</a>
|
||||
<!-- To pop up a confirm Message -->
|
||||
{!! Form::button('<i class="fa fa-trash" style="color:black;"> </i> Delete',
|
||||
['type' => 'submit',
|
||||
'class'=> 'btn btn-warning btn-xs btn-flat',
|
||||
'onclick'=>'return confirm("Are you sure?")'])
|
||||
!!}
|
||||
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
<div class="pull-right">
|
||||
<?php echo $orgs->setPath(url('/organizations'))->render();?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@section('FooterInclude')
|
||||
|
||||
@stop
|
||||
@stop
|
||||
<!-- /content -->
|
||||
@stop
|
||||
@section('FooterInclude')
|
||||
|
||||
@stop
|
||||
|
||||
<!-- /content -->
|
||||
@@ -0,0 +1,220 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Users')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('user-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('organizations')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
{{-- <div><h1 style="margin-top:-10px;margin-bottom:-10px;">Organization Profile</h1></div>
|
||||
<a href="{{route('organizations.edit', $orgs->id)}}" class="btn btn-info btn-xs btn-flat"><i class="fa fa-edit" style="color:black;"> </i> Edit</a>
|
||||
--}}
|
||||
<div class="box-header" style="margin-top:-15px;margin-bottom:-15px;"><h3 class="box-title">Organization Profile</h3><a href="{{route('organizations.edit', $orgs->id)}}" class="btn btn-info btn-sm btn-flat pull-right"><i class="fa fa-edit" style="color:black;"> </i> Edit</a></div>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
|
||||
<?php $org_hd = App\Model\helpdesk\Agent_panel\Organization::where('id','=',$orgs->id)->first(); ?>
|
||||
<div id="alert-success" class="alert alert-success alert-dismissable" style="display:none;">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success <span id="get-success"></span></b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="box box-widget widget-user">
|
||||
<!-- Add the bg color to the header using any of the bg-* classes -->
|
||||
<div class="widget-user-header bg-aqua">
|
||||
<h3 class="widget-user-username">{{$orgs->name}}</h3>
|
||||
<h5 class="widget-user-desc">{!! $orgs->website !!}</h5>
|
||||
</div>
|
||||
<div class="box-footer no-padding">
|
||||
<ul class="nav nav-stacked">
|
||||
@if($orgs->phone)<li><a><b>Phone</b> <span class="pull-right"> {{$orgs->phone}}</span></a></li>@endif
|
||||
@if($orgs->address)<li><a><b>Address</b> <br/> <center>{!! $orgs->address !!}</center></a></li>@endif
|
||||
@if($orgs->internal_notes)<li><a><b>Internal Notes</b> <br/> <center>{!! $orgs->internal_notes !!}</center></a></li>@endif
|
||||
</ul>
|
||||
<button data-toggle="modal" data-target="#assign_head" id="button_select" class="btn btn-primary btn-flat btn-block">Select Department Manager</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="refresh">
|
||||
@if($org_hd->head > 0)
|
||||
<?php $users = App\User::where('id','=',$org_hd->head)->first(); ?>
|
||||
<div class="box box-widget widget-user-2">
|
||||
<!-- Add the bg color to the header using any of the bg-* classes -->
|
||||
<div class="widget-user-header bg-yellow">
|
||||
<div class="widget-user-image">
|
||||
<img class="img-circle" src="{{ Gravatar::src( $users->email) }}" alt="User Avatar">
|
||||
</div><!-- /.widget-user-image -->
|
||||
<h3 class="widget-user-username">{!! $users->user_name !!}</h3>
|
||||
<h5 class="widget-user-desc">Organization's head</h5>
|
||||
</div>
|
||||
<div class="box-footer no-padding">
|
||||
<ul class="nav nav-stacked">
|
||||
<li><a href="#">E-mail <span class="pull-right">{!! $users->email !!}</span></a></li>
|
||||
<li><a href="#">Phone <span class="pull-right">{!! $users->phone_number !!}</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="box box-primary">
|
||||
<?php
|
||||
$user_orgs = App\Model\helpdesk\Agent_panel\User_org::where('org_id','=',$orgs->id)->paginate(5);
|
||||
?>
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Users of {{$orgs->name}}</h3>
|
||||
<div class="pull-right" style="margin-top:-25px;margin-bottom:-25px;">
|
||||
<?php echo $user_orgs->setPath('../organizations/'.$orgs->id)->render(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<hr style="margin-top:0px;margin:bottom:0px;">
|
||||
|
||||
<div class="box-body">
|
||||
<table class="table table-hover table-bordered">
|
||||
<tbody><tr>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Phone</th>
|
||||
<th>Status</th>
|
||||
<th>Ban</th>
|
||||
</tr>
|
||||
|
||||
@foreach($user_orgs as $user_org)
|
||||
<?php
|
||||
$user_detail = App\User::where('id','=',$user_org->user_id)->first();
|
||||
?>
|
||||
<tr>
|
||||
<td>{!! $user_detail->user_name !!}</td>
|
||||
<td>{!! $user_detail->email !!}</td>
|
||||
<td>{!! $user_detail->phone_number !!}</td>
|
||||
@if($user_detail->active == 1)
|
||||
<td><span class="label label-success">Active</span></td>
|
||||
@elseif($user_detail->active == 0)
|
||||
<td><span class="label label-warning">Inactive</span></td>
|
||||
@endif
|
||||
<td>{!! $user_detail->ban !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Organisation Assign Modal -->
|
||||
<div class="modal fade" id="assign_head">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
{!! Form::model($orgs->id, ['id'=>'org_head','method' => 'PATCH'] )!!}
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" id="dismiss" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">Assign</h4>
|
||||
</div>
|
||||
<div id="assign_alert" class="alert alert-success alert-dismissable" style="display:none;">
|
||||
<button id="assign_dismiss" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-check"></i>Alert!</h4>
|
||||
<div id="message-success1"></div>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
<div class="col-md-6" id="assign_loader" style="display:none;">
|
||||
<img src="{{asset("lb-faveo/dist/img/gifloader.gif")}}"><br/><br/><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="assign_body">
|
||||
<p>Please Select an Organization</p>
|
||||
<select id="user" class="form-control" name="user">
|
||||
<?php
|
||||
$org_heads = App\Model\helpdesk\Agent_panel\User_org::where('org_id','=',$orgs->id)->get();
|
||||
?>
|
||||
<optgroup label="Select Organizations">
|
||||
@foreach($org_heads as $org_head)
|
||||
<?php $user_org_heads = App\User::where('id','=',$org_head->user_id)->first(); ?>
|
||||
<option value="{{$user_org_heads->id}}">{!! $user_org_heads->user_name !!}</option>
|
||||
@endforeach
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis4">Close</button>
|
||||
<button type="submit" class="btn btn-success pull-right" id="submt2">Assign</button>
|
||||
</div>
|
||||
{!! Form::close()!!}
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
// Assign a ticket
|
||||
jQuery(document).ready(function($) {
|
||||
// create org
|
||||
$('#org_head').on('submit', function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "../head-org/{!! $orgs->id !!}",
|
||||
dataType: "html",
|
||||
data: $(this).serialize(),
|
||||
beforeSend: function() {
|
||||
$("#assign_body").hide();
|
||||
$("#assign_loader").show();
|
||||
},
|
||||
success: function(response) {
|
||||
$("#assign_loader").hide();
|
||||
$("#assign_body").show();
|
||||
|
||||
if (response == 1) {
|
||||
message = "Organization head added Successfully."
|
||||
$("#dismiss").trigger("click");
|
||||
$("#refresh").load("../organizations/{!! $orgs->id !!} #refresh");
|
||||
// $("#refresh2").load("../thread/1 #refresh2");
|
||||
// $("#show").show();
|
||||
$("#alert-success").show();
|
||||
$('#get-success').html(message);
|
||||
setInterval(function(){$("#alert-success").hide(); },4000);
|
||||
}
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@stop
|
||||
|
||||
<!-- /content -->
|
||||
@@ -0,0 +1,211 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Tickets')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('ticket-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('answered')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<?php
|
||||
if(Auth::user()->role == 'agent')
|
||||
{
|
||||
$dept = App\Model\helpdesk\Agent\Department::where('name','=',Auth::user()->primary_dpt)->first();
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('isanswered', '=', 1)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
} else {
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('isanswered', '=', 1)->orderBy('id', 'DESC')->paginate(20);
|
||||
}
|
||||
?>
|
||||
<!-- Main content -->
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Answered </h3> <small id="title_refresh">{!! $tickets->total() !!} tickets</small>
|
||||
<div class="box-tools pull-right">
|
||||
<div class="has-feedback">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding ">
|
||||
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
<div class="mailbox-controls">
|
||||
<h3 class="pull-right" style="margin-top:0;margin-bottom:0;"> <div id="count_refresh">{!! $tickets->count().'-'.$tickets->total(); !!}</div></h3>
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<a class="btn btn-default btn-sm" id="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" value="Delete">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="Close">
|
||||
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>Loading...</b></p>
|
||||
<!-- table -->
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th>
|
||||
</th>
|
||||
<th>Subject</th>
|
||||
<th>Ticket ID</th>
|
||||
<th>Priority</th>
|
||||
<th>From</th>
|
||||
<th>Last Replier</th>
|
||||
<th>Assigned To</th>
|
||||
<th>Last Activity</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
|
||||
@foreach ($tickets as $ticket)
|
||||
<?php
|
||||
// title
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
if($title)
|
||||
if($title == null){
|
||||
|
||||
} else {
|
||||
?>
|
||||
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php } ?> >
|
||||
<td ><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
|
||||
<?php
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
|
||||
if (strlen($string) > 40) {
|
||||
$stringCut = substr($string, 0, 40);
|
||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
|
||||
}
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
$username = $LastResponse->user_name;
|
||||
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
|
||||
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
|
||||
$username = $LastResponse->user_name;
|
||||
}}
|
||||
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
$count = count($titles);
|
||||
foreach($titles as $title)
|
||||
{
|
||||
$title = $title;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null)
|
||||
{
|
||||
$assigned = "Unassigned";
|
||||
}
|
||||
else
|
||||
{
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority_desc}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
@if($from->role == "user")
|
||||
<td class="mailbox-from" >{!! $from->user_name !!}</td>
|
||||
@else
|
||||
<td class="mailbox-from" >{!! $from->first_name." ".$from->last_name !!}</td>
|
||||
@endif
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
|
||||
</tr>
|
||||
<?php } ?>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/ticket/answered'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /. box -->
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
//Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function () {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
|
||||
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("check");
|
||||
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
// Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function() {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() { /// Wait till page is loaded
|
||||
$('#click').click(function() {
|
||||
$('#refresh').load('answered #refresh');
|
||||
$('#title_refresh').load('answered #title_refresh');
|
||||
$('#count_refresh').load('answered #count_refresh');
|
||||
$("#show").show();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
@stop
|
||||
@@ -0,0 +1,235 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Tickets')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('ticket-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('assigned')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<?php
|
||||
if(Auth::user()->role == 'agent') {
|
||||
$dept = App\Model\helpdesk\Agent\Department::where('name','=',Auth::user()->primary_dpt)->first();
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('assigned_to', '>', 0)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
} else {
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('assigned_to', '>', 0)->orderBy('id', 'DESC')->paginate(20);
|
||||
}
|
||||
?>
|
||||
<!-- Main content -->
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Assigned </h3> <small id="title_refresh"> {!! $tickets->total() !!} tickets</small>
|
||||
</div><!-- /.box-header -->
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding ">
|
||||
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
|
||||
<div class="mailbox-controls">
|
||||
<h3 class="pull-right" style="margin-top:0;margin-bottom:0;"> <div id="count_refresh">{!! $tickets->count().'-'.$tickets->total(); !!}</div></h3>
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<a class="btn btn-default btn-sm" id="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" value="Delete">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="Close">
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>Loading...</b></p>
|
||||
<!-- table -->
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th>
|
||||
</th>
|
||||
<th>Subject</th>
|
||||
<th>Ticket ID</th>
|
||||
<th>Priority</th>
|
||||
<th>From</th>
|
||||
<th>Last Replier</th>
|
||||
<th>Assigned To</th>
|
||||
<th>Last Activity</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
|
||||
@foreach ($tickets as $ticket)
|
||||
<?php
|
||||
// title
|
||||
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
if($title)
|
||||
if($title == null){
|
||||
|
||||
} else {
|
||||
?>
|
||||
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php } ?> >
|
||||
<td ><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
|
||||
<?php
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
|
||||
if (strlen($string) > 40) {
|
||||
$stringCut = substr($string, 0, 40);
|
||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
|
||||
}
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
$username = $LastResponse->user_name;
|
||||
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
|
||||
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
|
||||
$username = $LastResponse->user_name;
|
||||
}}
|
||||
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
$count = count($titles);
|
||||
foreach($titles as $title)
|
||||
{
|
||||
$title = $title;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null)
|
||||
{
|
||||
$assigned = "Unassigned";
|
||||
}
|
||||
else
|
||||
{
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority_desc}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
@if($from->role == "user")
|
||||
<td class="mailbox-from" >{!! $from->user_name !!}</td>
|
||||
@else
|
||||
<td class="mailbox-from" >{!! $from->first_name." ".$from->last_name !!}</td>
|
||||
@endif
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/ticket/assigned'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /. box -->
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
//Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function () {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
|
||||
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("check");
|
||||
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
// Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function() {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() { /// Wait till page is loaded
|
||||
$('#click').click(function() {
|
||||
$('#refresh').load('assigned #refresh');
|
||||
$('#title_refresh').load('assigned #title_refresh');
|
||||
$('#count_refresh').load('assigned #count_refresh');
|
||||
$("#show").show();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// check box get data
|
||||
// jQuery(function($) {
|
||||
// $("form input[id='check_all']").click(function() { // triggred check
|
||||
|
||||
// var inputs = $("form input[type='checkbox']"); // get the checkbox
|
||||
|
||||
// for(var i = 0; i < inputs.length; i++) { // count input tag in the form
|
||||
// var type = inputs[i].getAttribute("type"); // get the type attribute
|
||||
// if(type == "checkbox") {
|
||||
// if(this.checked) {
|
||||
// inputs[i].checked = true; // checked
|
||||
// } else {
|
||||
// inputs[i].checked = false; // unchecked
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
// $("form input[id='submit']").click(function() { // triggred submit
|
||||
|
||||
// var count_checked = $("[name='data[]']:checked").length; // count the checked
|
||||
// if(count_checked == 0) {
|
||||
// alert("Please select a product(s) to delete.");
|
||||
// return false;
|
||||
// }
|
||||
// if(count_checked == 1) {
|
||||
// return confirm("Are you sure you want to delete these product?");
|
||||
// } else {
|
||||
// return confirm("Are you sure you want to delete these products?");
|
||||
// }
|
||||
// });
|
||||
// }); // jquery end
|
||||
|
||||
</script>
|
||||
@stop
|
||||
@@ -0,0 +1,192 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Tickets')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('ticket-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('closed')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
|
||||
@section('content')
|
||||
<?php
|
||||
if(Auth::user()->role == 'agent') {
|
||||
$dept = App\Model\helpdesk\Agent\Department::where('name','=',Auth::user()->primary_dpt)->first();
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '>', 1)->where('dept_id','=',$dept->id)->where('status', '<', 4)->orderBy('id', 'DESC')->paginate(20);
|
||||
} else {
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '>', 1)->where('status', '<', 4)->orderBy('id', 'DESC')->paginate(20);
|
||||
}
|
||||
?>
|
||||
<!-- Main content -->
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Closed </h3> <small id="title_refresh">{!! $tickets->total() !!} tickets</small>
|
||||
</div><!-- /.box-header -->
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding ">
|
||||
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
|
||||
<div class="mailbox-controls">
|
||||
<h3 class="pull-right" style="margin-top:0;margin-bottom:0;"><div id="count_refresh"> {!! $tickets->count().'-'.$tickets->total(); !!}</div></h3>
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<a class="btn btn-default btn-sm" id="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" value="Delete">
|
||||
<input type="submit" class="btn btn-default text-blue btn-sm" name="submit" value="Open">
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>Loading...</b></p>
|
||||
<!-- table -->
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th></th>
|
||||
<th>Subject</th>
|
||||
<th>Ticket ID</th>
|
||||
<th>Priority</th>
|
||||
<th>From</th>
|
||||
<th>Last Replier</th>
|
||||
<th>Assigned To</th>
|
||||
<th>Last Activity</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
|
||||
|
||||
@foreach ($tickets as $ticket )
|
||||
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php }
|
||||
?> >
|
||||
<td><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
|
||||
<?php
|
||||
// title
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
|
||||
if (strlen($string) > 40) {
|
||||
$stringCut = substr($string, 0, 40);
|
||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
|
||||
}
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
$username = $LastResponse->user_name;
|
||||
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
|
||||
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
|
||||
$username = $LastResponse->user_name;
|
||||
}}
|
||||
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
$count = count($titles);
|
||||
foreach($titles as $title)
|
||||
{
|
||||
$title = $title;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null)
|
||||
{
|
||||
$assigned = "Unassigned";
|
||||
}
|
||||
else
|
||||
{
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority_desc}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
@if($from->role == "user")
|
||||
<td class="mailbox-from" >{!! $from->user_name !!}</td>
|
||||
@else
|
||||
<td class="mailbox-from" >{!! $from->first_name." ".$from->last_name !!}</td>
|
||||
@endif
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/ticket/closed'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /. box -->
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
//Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function () {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
|
||||
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("check");
|
||||
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
// Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function() {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() { /// Wait till page is loaded
|
||||
$('#click').click(function() {
|
||||
$('#refresh').load('closed #refresh');
|
||||
$('#title_refresh').load('closed #title_refresh');
|
||||
$('#count_refresh').load('closed #count_refresh');
|
||||
$("#show").show();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
@@ -0,0 +1,193 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Tickets')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('ticket-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('inbox')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<?php
|
||||
if(Auth::user()->role == 'agent') {
|
||||
$dept = App\Model\helpdesk\Agent\Department::where('name','=',Auth::user()->primary_dpt)->first();
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
} else {
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->orderBy('id', 'DESC')->paginate(20);
|
||||
}
|
||||
?>
|
||||
<!-- Main content -->
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Inbox </h3> <small id="title_refresh">{!! $tickets->total() !!} tickets</small>
|
||||
</div><!-- /.box-header -->
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding ">
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
<div class="mailbox-controls">
|
||||
<h3 class="pull-right" style="margin-top:0;margin-bottom:0;"> <div id="count_refresh">{!! $tickets->count().'-'.$tickets->total(); !!}</div> </h3>
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<a class="btn btn-default btn-sm" id="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" value="Delete">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="Close">
|
||||
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>Loading...</b></p>
|
||||
<!-- table -->
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th>
|
||||
</th>
|
||||
<th>Subject</th>
|
||||
<th>Ticket ID</th>
|
||||
<th>Priority</th>
|
||||
<th>From</th>
|
||||
<th>Last Replier</th>
|
||||
<th>Assigned To</th>
|
||||
<th>Last Activity</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
|
||||
@foreach ($tickets as $ticket)
|
||||
<?php
|
||||
// title
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
if($title)
|
||||
if($title == null){
|
||||
} else {
|
||||
?>
|
||||
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php } ?> >
|
||||
<td ><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
|
||||
<?php
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
if (strlen($string) > 40) {
|
||||
$stringCut = substr($string, 0, 40);
|
||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
|
||||
}
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
$username = $LastResponse->user_name;
|
||||
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
|
||||
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
|
||||
$username = $LastResponse->user_name;
|
||||
}}
|
||||
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
$count = count($titles);
|
||||
foreach($titles as $title) {
|
||||
$title = $title;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null) {
|
||||
$assigned = "Unassigned";
|
||||
} else {
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority_desc}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
@if($from->role == "user")
|
||||
<td class="mailbox-from" >{!! $from->user_name !!}</td>
|
||||
@else
|
||||
<td class="mailbox-from" >{!! $from->first_name." ".$from->last_name !!}</td>
|
||||
@endif
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/ticket/inbox'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /. box -->
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
//Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function () {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
|
||||
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("check");
|
||||
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
// Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function() {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() { /// Wait till page is loaded
|
||||
$('#click').click(function() {
|
||||
$('#refresh').load('inbox #refresh');
|
||||
$('#title_refresh').load('inbox #title_refresh');
|
||||
$('#count_refresh').load('inbox #count_refresh');
|
||||
$("#show").show();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
@stop
|
||||
@@ -0,0 +1,190 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Tickets')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('ticket-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('myticket')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<?php
|
||||
if(Auth::user()->role == 'agent') {
|
||||
$dept = App\Model\helpdesk\Agent\Department::where('name','=',Auth::user()->primary_dpt)->first();
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('assigned_to', '=', Auth::user()->id)->orderBy('id', 'ASC')->paginate(20);
|
||||
} else {
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('assigned_to', '=', Auth::user()->id)->orderBy('id', 'ASC')->paginate(20);
|
||||
}
|
||||
?>
|
||||
<!-- Main content -->
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">My Ticket </h3> <small id="title_refresh">{!! $tickets->total() !!} tickets</small>
|
||||
</div><!-- /.box-header -->
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding ">
|
||||
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
<div class="mailbox-controls">
|
||||
<h3 class="pull-right" style="margin-top:0;margin-bottom:0;"><div id="count_refresh"> {!! $tickets->count().'-'.$tickets->total(); !!}</div></h3>
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<a class="btn btn-default btn-sm" id="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" value="Delete">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="Close">
|
||||
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>Loading...</b></p>
|
||||
<!-- table -->
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th></th>
|
||||
<th>Subject</th>
|
||||
<th>Ticket ID</th>
|
||||
<th>Priority</th>
|
||||
<th>From</th>
|
||||
<th>Last Replier</th>
|
||||
<th>Assigned To</th>
|
||||
<th>Last Activity</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
|
||||
@foreach ($tickets as $ticket )
|
||||
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php }
|
||||
?> >
|
||||
<td><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
|
||||
<?php
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
// title
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
|
||||
if (strlen($string) > 40) {
|
||||
$stringCut = substr($string, 0, 40);
|
||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
|
||||
}
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->where('is_internal', '=', 0)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
$username = $LastResponse->user_name;
|
||||
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
|
||||
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
|
||||
$username = $LastResponse->user_name;
|
||||
}}
|
||||
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
$count = count($titles);
|
||||
foreach($titles as $title)
|
||||
{
|
||||
$title = $title;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null)
|
||||
{
|
||||
$assigned = "Unassigned";
|
||||
}
|
||||
else
|
||||
{
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority_desc}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
@if($from->role == "user")
|
||||
<td class="mailbox-from" >{!! $from->user_name !!}</td>
|
||||
@else
|
||||
<td class="mailbox-from" >{!! $from->first_name." ".$from->last_name !!}</td>
|
||||
@endif
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/ticket/myticket'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /. box -->
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
//Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function () {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
|
||||
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("check");
|
||||
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
// Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function() {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() { /// Wait till page is loaded
|
||||
$('#click').click(function() {
|
||||
$('#refresh').load('myticket #refresh');
|
||||
$('#title_refresh').load('myticket #title_refresh');
|
||||
$('#count_refresh').load('myticket #count_refresh');
|
||||
$("#show").show();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
@@ -0,0 +1,216 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Tickets')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('ticket-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('newticket')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
|
||||
@section('content')
|
||||
<!-- Main content -->
|
||||
{!! Form::open(['route'=>'post.newticket','method'=>'post']) !!}
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Create Ticket</h3>
|
||||
<!-- <div class="box-tools pull-right">
|
||||
<div class="has-feedback">
|
||||
<input type="text" class="form-control input-sm" placeholder="Search Mail"/>
|
||||
<span class="glyphicon glyphicon-search form-control-feedback"></span>
|
||||
</div>
|
||||
</div> --><!-- /.box-tools -->
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<!-- user detail -->
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"></i>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="form-group">
|
||||
<h4><b>User Details:<b></h4>
|
||||
{{-- <div class="row"> --}}
|
||||
{{-- <div class="col-md-6"> --}}
|
||||
{{-- <div class="has-feedback"> --}}
|
||||
{{-- <input type="text" class="form-control input-ls" placeholder="Search Users"/> --}}
|
||||
{{-- <span class="glyphicon glyphicon-search form-control-feedback"></span> --}}
|
||||
{{-- </div> --}}
|
||||
{{-- <input type="text" name="email" id="" class="form-control" placeholder="Search User"> --}}
|
||||
{{-- </div> --}}
|
||||
{{-- </div> --}}
|
||||
<br/>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<!-- email -->
|
||||
<div class="form-group">
|
||||
<label>Email:</label>
|
||||
<input type="text" name="email" id="" class="form-control">
|
||||
{!! $errors->first('email', '<spam class="help-block text-red">:message</spam>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<!-- full name -->
|
||||
<div class="form-group">
|
||||
<label>Full Name:</label>
|
||||
<input type="text" name="fullname" id="" class="form-control">
|
||||
{!! $errors->first('fullname', '<spam class="help-block text-red">:message</spam>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<!-- phone -->
|
||||
<div class="form-group">
|
||||
<label>Phone:</label>
|
||||
<input type="number" name="phone" id="" class="form-control">
|
||||
{!! $errors->first('phone', '<spam class="help-block text-red">:message</spam>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<div class="col-md-2">
|
||||
<label>Ticket Notice:</label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="checkbox" name="notice" id=""> Send alert to User
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- ticket options -->
|
||||
<div class="form-group">
|
||||
<h4><b>Ticket Option<b></h4>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<label>Help Topic:</label>
|
||||
<!-- helptopic -->
|
||||
<select class="form-control" name="helptopic">
|
||||
<!-- <option>--select--</option> -->
|
||||
<?php $helptopic = App\Model\helpdesk\Manage\Help_topic::all();?>
|
||||
@foreach($helptopic as $topic)
|
||||
<option value="{!! $topic->id !!}">{!! $topic->topic !!}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
{!! $errors->first('helptopic', '<spam class="help-block text-red">:message</spam>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<!-- sla plan -->
|
||||
<div class="form-group">
|
||||
<label>SLA Plan:</label>
|
||||
<select class="form-control" name="sla">
|
||||
<!-- <option>--select--</option> -->
|
||||
<?php $sla_plan = App\Model\helpdesk\Manage\Sla_plan::all();?>
|
||||
@foreach($sla_plan as $sla)
|
||||
<option value="{!! $sla->id !!}">{!! $sla->grace_period !!}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
{!! $errors->first('sla', '<spam class="help-block text-red">:message</spam>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<!-- due date -->
|
||||
<div class="form-group">
|
||||
<label>Due Date:</label>
|
||||
<input type="text" class="form-control" name="duedate" id="datemask">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<!-- assign to -->
|
||||
<div class="form-group">
|
||||
<label>Assign To:</label>
|
||||
<select class="form-control" name="assignto">
|
||||
<!-- <option>--select--</option> -->
|
||||
<?php $agents = App\User::where('role','!=','user')->get();?>
|
||||
<option value="">--- select ---</option>
|
||||
@foreach($agents as $agent)
|
||||
<option value="{!! $agent->id !!}">
|
||||
{!! $agent->first_name !!} {!! $agent->last_name !!}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ticket details -->
|
||||
<div class="form-group">
|
||||
<h4><b>Ticket Detail<b></h4>
|
||||
<!-- subject -->
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
<label>Subject:</label>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input type="text" name="subject" class="form-control">
|
||||
{!! $errors->first('subject', '<spam class="help-block text-red">:message</spam>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<!-- details -->
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
<label>Detail:</label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<textarea class="form-control" id="body" name="body" style="width:100%; height:100px;"></textarea>
|
||||
{!! $errors->first('body', '<spam class="help-block text-red">:message</spam>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<!-- priority -->
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
<label>Priority:</label>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<select class="form-control" name="priority">
|
||||
<!-- <option>--select--</option> -->
|
||||
<?php $Priority = App\Model\helpdesk\Ticket\Ticket_Priority::all();?>
|
||||
@foreach($Priority as $priority)
|
||||
<option value="{{$priority->priority_id}}">{!! $priority->priority_desc !!}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
{!! $errors->first('priority', '<spam class="help-block text-red">:message</spam>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="submit" value="Create Ticket" class="btn btn-primary">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /. box -->
|
||||
{!! Form::close() !!}
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('#datemask').datepicker({changeMonth: true, changeYear: true}).mask('99/99/9999');
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
@@ -0,0 +1,219 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Tickets')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('ticket-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('open')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<?php
|
||||
if(Auth::user()->role == 'agent') {
|
||||
$dept = App\Model\helpdesk\Agent\Department::where('name','=',Auth::user()->primary_dpt)->first();
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('isanswered', '=', 0)->where('assigned_to', '=', 0)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
} else {
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('isanswered', '=', 0)->where('assigned_to', '=', 0)->orderBy('id', 'DESC')->paginate(20);
|
||||
}
|
||||
?>
|
||||
<!-- Main content -->
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Open </h3> <small id="title_refresh">{!! $tickets->total() !!} tickets</small>
|
||||
<div class="box-tools pull-right">
|
||||
<div class="has-feedback">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding ">
|
||||
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
|
||||
|
||||
<div class="mailbox-controls">
|
||||
<h3 class="pull-right" style="margin-top:0;margin-bottom:0;"> <div id="count_refresh">{!! $tickets->count().'-'.$tickets->total(); !!}</div></h3>
|
||||
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<a class="btn btn-default btn-sm" id="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" value="Delete">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="Close">
|
||||
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>Loading...</b></p>
|
||||
<!-- table -->
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th>
|
||||
</th>
|
||||
<th>Subject</th>
|
||||
<th>Ticket ID</th>
|
||||
<th>Priority</th>
|
||||
<th>From</th>
|
||||
<th>Last Replier</th>
|
||||
<th>Assigned To</th>
|
||||
<th>Last Activity</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
|
||||
@foreach ($tickets as $ticket)
|
||||
<?php
|
||||
|
||||
// // title
|
||||
$ticket_reply = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->where('is_internal', '=', 0)->max('id');
|
||||
|
||||
$ticket_reply1 = App\Model\helpdesk\Ticket\Ticket_Thread::where('id','=',$ticket_reply)->first();
|
||||
|
||||
$last_replier = App\User::where('id','=', $ticket_reply1->user_id)->first();
|
||||
|
||||
if($last_replier->role == 'agent') {
|
||||
|
||||
} else {
|
||||
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
|
||||
if($title == null){
|
||||
|
||||
} else {
|
||||
?>
|
||||
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php } ?> >
|
||||
<td ><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
|
||||
<?php
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
|
||||
if (strlen($string) > 40) {
|
||||
$stringCut = substr($string, 0, 40);
|
||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
|
||||
}
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
$username = $LastResponse->user_name;
|
||||
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
|
||||
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
|
||||
$username = $LastResponse->user_name;
|
||||
}}
|
||||
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
$count = count($titles);
|
||||
foreach($titles as $title)
|
||||
{
|
||||
$title = $title;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null)
|
||||
{
|
||||
$assigned = "Unassigned";
|
||||
}
|
||||
else
|
||||
{
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority_desc}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
@if($from->role == "user")
|
||||
<td class="mailbox-from" >{!! $from->user_name !!}</td>
|
||||
@else
|
||||
<td class="mailbox-from" >{!! $from->first_name." ".$from->last_name !!}</td>
|
||||
@endif
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
</tr>
|
||||
<?php } } ?>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/ticket/open'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /. box -->
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
//Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function () {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
|
||||
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("check");
|
||||
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
// Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function() {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() { /// Wait till page is loaded
|
||||
$('#click').click(function() {
|
||||
$('#refresh').load('open #refresh');
|
||||
$('#title_refresh').load('open #title_refresh');
|
||||
$('#count_refresh').load('open #count_refresh');
|
||||
$("#show").show();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@stop
|
||||
@@ -0,0 +1,199 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Tickets')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('ticket-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('overdue')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<?php
|
||||
if(Auth::user()->role == 'agent') {
|
||||
$dept = App\Model\helpdesk\Agent\Department::where('name','=',Auth::user()->primary_dpt)->first();
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
} else {
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->orderBy('id', 'DESC')->paginate(20);
|
||||
}
|
||||
?>
|
||||
<!-- Main content -->
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Overdue </h3> <small>{!! $tickets->total() !!} tickets</small>
|
||||
</div><!-- /.box-header -->
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding ">
|
||||
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
|
||||
<div class="mailbox-controls">
|
||||
<h3 class="pull-right" style="margin-top:0;margin-bottom:0;"> {!! $tickets->count().'-'.$tickets->total(); !!}</h3>
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<a class="btn btn-default btn-sm" id="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" value="Delete">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="Close">
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>Loading...</b></p>
|
||||
<!-- table -->
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th></th>
|
||||
<th>Subject</th>
|
||||
<th>Ticket ID</th>
|
||||
<th>Priority</th>
|
||||
<th>From</th>
|
||||
<th>Last Replier</th>
|
||||
<th>Assigned To</th>
|
||||
<th>Last Activity</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
|
||||
@foreach ($tickets as $ticket )
|
||||
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php }
|
||||
|
||||
|
||||
$sla = $ticket->sla;
|
||||
$SlaPlan = App\Model\helpdesk\Manage\Sla_plan::where('id', '=', $sla)->first();
|
||||
|
||||
$time = $ticket->created_at;
|
||||
$time = date_create($time);
|
||||
date_add($time, date_interval_create_from_date_string($SlaPlan->grace_period));
|
||||
echo date_format($time, 'd/m/Y H:i:s');
|
||||
|
||||
?> >
|
||||
<td><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
|
||||
<?php
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
// title
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
|
||||
if (strlen($string) > 40) {
|
||||
$stringCut = substr($string, 0, 40);
|
||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
|
||||
}
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
$username = $LastResponse->user_name;
|
||||
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
|
||||
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
|
||||
$username = $LastResponse->user_name;
|
||||
}}
|
||||
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
$count = count($titles);
|
||||
foreach($titles as $title)
|
||||
{
|
||||
$title = $title;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null)
|
||||
{
|
||||
$assigned = "Unassigned";
|
||||
}
|
||||
else
|
||||
{
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority_desc}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
@if($from->role == "user")
|
||||
<td class="mailbox-from" >{!! $from->user_name !!}</td>
|
||||
@else
|
||||
<td class="mailbox-from" >{!! $from->first_name." ".$from->last_name !!}</td>
|
||||
@endif
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/ticket/overdue'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /. box -->
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
//Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function () {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
|
||||
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("check");
|
||||
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
// Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function() {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() { /// Wait till page is loaded
|
||||
$('#click').click(function() {
|
||||
$('#refresh').load('open #refresh');
|
||||
$("#show").show();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@stop
|
||||
@@ -0,0 +1,211 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<!-- <link href="{{asset("downloads/bootstrap.min.css")}}" rel="stylesheet" type="text/css" /> -->
|
||||
<link href="{{asset("lb-faveo/dist/css/AdminLTE.min.css")}}" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h2>
|
||||
<div class="logo"><b>Faveo</b>HELPDESK</div><hr>
|
||||
</h2>
|
||||
|
||||
<h4>{{$thread->title}}</h4><br/>
|
||||
|
||||
<?php $ticket_source = App\Model\helpdesk\Ticket\Ticket_source::where('id','=',$tickets->source)->first();
|
||||
$ticket_source = $ticket_source->value;
|
||||
|
||||
|
||||
|
||||
$user = App\User::where('id', '=', $tickets->user_id)->first(); ?>
|
||||
<?php $response = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->get(); ?>
|
||||
@foreach($response as $last)
|
||||
<?php $ResponseDate = $last->created_at; ?>
|
||||
@endforeach
|
||||
|
||||
<?php $status = App\Model\helpdesk\Ticket\Ticket_Status::where('id', '=', $tickets->status)->first(); ?>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $tickets->priority_id)->first(); ?>
|
||||
<?php $help_topic = App\Model\helpdesk\Manage\Help_topic::where('id', '=', $tickets->help_topic_id)->first(); ?>
|
||||
<?php $help_topic = App\Model\helpdesk\Manage\Help_topic::where('id', '=', $tickets->help_topic_id)->first(); ?>
|
||||
<?php $dept = App\Model\helpdesk\Agent\Department::where('id','=',$help_topic->department)->first(); ?>
|
||||
<table class="table">
|
||||
<tr><th></th><th></th></tr>
|
||||
<tr><td><b>Status:</b></td> <td>{{$status->state}}</td></tr>
|
||||
<tr><td><b>Priority:</b></td> <td>{{$priority->priority}}</td></tr>
|
||||
<tr><td><b>Department:</b></td> <td>{{$dept->name}}</td></tr>
|
||||
<tr><td><b>Email:</b></td> <td>{{$user->email}}</td></tr>
|
||||
<tr><td><b>Phone:</b></td> <td>{{$user->mobile}}</td></tr>
|
||||
<tr><td><b>Source:</b></td> <td>{{$ticket_source}}</td></tr>
|
||||
<tr><td><b>Help Topic:</b></td> <td>{{$help_topic->topic}}</td></tr>
|
||||
</table>
|
||||
|
||||
<?php $conversations = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->get(); ?>
|
||||
@foreach($conversations as $conversation)
|
||||
<br/><hr>
|
||||
<span class="time-label">
|
||||
<?php
|
||||
$role = App\User::where('id','=',$conversation->user_id)->first();
|
||||
?>
|
||||
<?php if($conversation->is_internal) { ?>
|
||||
<i class="fa fa-tag bg-purple" title="Posted by System"></i>
|
||||
<?php }else{ if ($role->role == 'agent' || $role->role == 'admin') { ?>
|
||||
<i class="fa fa-mail-reply-all bg-yellow" title="Posted by Support Team"></i>
|
||||
<?php } elseif ($role->role == 'user') { ?>
|
||||
<i class="fa fa-user bg-aqua" title="Posted by Customer"></i>
|
||||
<?php } else { ?>
|
||||
<i class="fa fa-mail-reply-all bg-purple" title="Posted by System"></i>
|
||||
<?php } }
|
||||
$attachment = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->first();
|
||||
if($attachment == null ) {
|
||||
$body = $conversation->body;
|
||||
}
|
||||
else {
|
||||
// dd($attachment->file);
|
||||
// print $attachment->file;
|
||||
// header("Content-type: image/jpeg");
|
||||
// echo "<img src='".base64_decode($attachment->file)."' style='width:128px;height:128px'/> ";
|
||||
$body = $conversation->body;
|
||||
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->orderBy('id', 'DESC')->get();
|
||||
|
||||
// $i = 0;
|
||||
|
||||
foreach($attachments as $attachment)
|
||||
{
|
||||
// $i++;
|
||||
if($attachment->type == 'pdf')
|
||||
{
|
||||
// echo "hello";
|
||||
}elseif($attachment->type == 'docx')
|
||||
{
|
||||
// echo "hello";
|
||||
}
|
||||
else
|
||||
{
|
||||
$image = @imagecreatefromstring($attachment->file);
|
||||
ob_start();
|
||||
imagejpeg($image, null, 80);
|
||||
$data = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$var = '<img width="20px" src="data:image/jpg;base64,' . base64_encode($data) . '" />';
|
||||
// echo $var;
|
||||
// echo $attachment->name;
|
||||
// $body = explode($attachment->name, $body);
|
||||
$body = str_replace($attachment->name, "data:image/jpg;base64," . base64_encode($data), $body);
|
||||
|
||||
$string = $body;
|
||||
$start = "<head>";
|
||||
$end = "</head>";
|
||||
if(strpos($string,$start) == false || strpos($string,$start) == false)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
$ini = strpos($string,$start);
|
||||
$ini += strlen($start);
|
||||
$len = strpos($string,$end,$ini) - $ini;
|
||||
$parsed = substr($string,$ini,$len);
|
||||
$body2 = $parsed;
|
||||
$body = str_replace($body2 ," " ,$body);
|
||||
}
|
||||
}
|
||||
}
|
||||
// echo $body;
|
||||
|
||||
// $body = explode($attachment->file, $body);
|
||||
// $body = $body[0];
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
$string = $body;
|
||||
$start = "<head>";
|
||||
$end = "</head>";
|
||||
if(strpos($string,$start) == false || strpos($string,$start) == false)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
$ini = strpos($string,$start);
|
||||
$ini += strlen($start);
|
||||
$len = strpos($string,$end,$ini) - $ini;
|
||||
$parsed = substr($string,$ini,$len);
|
||||
$body2 = $parsed;
|
||||
$body = str_replace($body2 ," " ,$body);
|
||||
}
|
||||
?>
|
||||
<div class="timeline-item">
|
||||
<span id="date" class="time" style="color:#fff;"><i class="fa fa-clock-o"> </i> {{date_format($conversation->created_at, 'd/m/Y H:i:s')}}</span>
|
||||
|
||||
<h3 class="timeline-header" style="background-color:<?php
|
||||
if($conversation->is_internal)
|
||||
{
|
||||
$color = '#046380';
|
||||
echo $color;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($role->role == 'agent' || $role->role == 'admin')
|
||||
{
|
||||
$color = '#FFD34E';
|
||||
echo $color;
|
||||
} elseif ($role->role == 'user')
|
||||
{
|
||||
$color = '#00A388';
|
||||
echo $color;
|
||||
} else
|
||||
{
|
||||
$color = '#046380';
|
||||
echo $color;
|
||||
}
|
||||
}
|
||||
?>;
|
||||
">
|
||||
<a href="#" style="color:#fff;"><?php if($role->role == "user") {echo $role->user_name; } else { echo $role->first_name . " " . $role->last_name; } ?> </a><strong>Date:</strong> {!! $thread->created_at !!}<br/></h3>
|
||||
<div class="timeline-body" style="padding-left:30px;">
|
||||
{!! $body !!}
|
||||
</div>
|
||||
<div class="timeline-footer" >
|
||||
<?php
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->get();
|
||||
$i = 0;
|
||||
foreach($attachments as $attachment) {
|
||||
if($attachment->poster == 'ATTACHMENT') {
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
if($i>0)
|
||||
{
|
||||
echo "<hr style='height:1px;color:#2D3244;background-color:#2D3244;''><h4 class='box-title'><b>".$i." </b> Attachments</h4>";
|
||||
}
|
||||
?>
|
||||
<ul class='mailbox-attachments clearfix'>
|
||||
<?php
|
||||
foreach($attachments as $attachment)
|
||||
{
|
||||
if($attachment->poster == 'ATTACHMENT')
|
||||
{
|
||||
if($attachment->type == 'jpg'||$attachment->type == 'JPG'||$attachment->type == 'jpeg'||$attachment->type == 'JPEG'||$attachment->type == 'png'||$attachment->type == 'PNG'||$attachment->type == 'gif'||$attachment->type == 'GIF')
|
||||
{
|
||||
$image = @imagecreatefromstring($attachment->file);
|
||||
ob_start();
|
||||
imagejpeg($image, null, 80);
|
||||
$data = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$var = '<a href="'.URL::route('image', array('image_id' => $attachment->id)).'" target="_blank"><img style="max-width:200px;max-height:150px;" src="data:image/jpg;base64,' . base64_encode($data) . '"/></a>';
|
||||
echo '<li><span class="mailbox-attachment-icon has-img">'.$var.'</span></li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$var = '<a href="'.URL::route('image', array('image_id' => $attachment->id)).'" target="_blank">'.$attachment->name.'</a>';
|
||||
echo '<li>'.$var.'</li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,189 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Tickets')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('ticket-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('trash')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<?php
|
||||
if(Auth::user()->role == 'agent') {
|
||||
$dept = App\Model\helpdesk\Agent\Department::where('name','=',Auth::user()->primary_dpt)->first();
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 5)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
} else {
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 5)->orderBy('id', 'DESC')->paginate(20);
|
||||
}
|
||||
?>
|
||||
<!-- Main content -->
|
||||
<div class="box box-warning">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Trash </h3> <small id="title_refresh">{!! $tickets->total() !!} tickets</small>
|
||||
</div><!-- /.box-header -->
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding ">
|
||||
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
<div class="mailbox-controls">
|
||||
<h3 class="pull-right" style="margin-top:0;margin-bottom:0;"> <div id="count_refresh">{!! $tickets->count().'-'.$tickets->total(); !!}</div></h3>
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<a class="btn btn-default btn-sm" id="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-blue btn-sm" name="submit" value="Open">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="Close">
|
||||
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>Loading...</b></p>
|
||||
<!-- table -->
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th>
|
||||
</th>
|
||||
<th>Subject</th>
|
||||
<th>Ticket ID</th>
|
||||
<th>Priority</th>
|
||||
<th>From</th>
|
||||
<th>Last Replier</th>
|
||||
<th>Assigned To</th>
|
||||
<th>Last Activity</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
|
||||
|
||||
@foreach ($tickets as $ticket )
|
||||
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php }
|
||||
?> >
|
||||
<td><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
|
||||
<?php
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
// title
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
|
||||
if (strlen($string) > 40) {
|
||||
$stringCut = substr($string, 0, 40);
|
||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
|
||||
}
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
$username = $LastResponse->user_name;
|
||||
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
|
||||
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
|
||||
$username = $LastResponse->user_name;
|
||||
}}
|
||||
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
$count = count($titles);
|
||||
foreach($titles as $title)
|
||||
{
|
||||
$title = $title;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null)
|
||||
{
|
||||
$assigned = "Unassigned";
|
||||
}
|
||||
else
|
||||
{
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority_desc}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
@if($from->role == "user")
|
||||
<td class="mailbox-from" >{!! $from->user_name !!}</td>
|
||||
@else
|
||||
<td class="mailbox-from" >{!! $from->first_name." ".$from->last_name !!}</td>
|
||||
@endif
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/trash'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /. box -->
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
//Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function () {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
|
||||
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("check");
|
||||
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
$(function() {
|
||||
// Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function() {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
$(document).ready(function() { /// Wait till page is loaded
|
||||
$('#click').click(function() {
|
||||
$('#refresh').load('trash #refresh');
|
||||
$('#title_refresh').load('trash #title_refresh');
|
||||
$('#count_refresh').load('trash #count_refresh');
|
||||
$("#show").show();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@stop
|
||||
@@ -0,0 +1,196 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Tickets')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('ticket-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('unassigned')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<?php
|
||||
if(Auth::user()->role == 'agent') {
|
||||
$dept = App\Model\helpdesk\Agent\Department::where('name','=',Auth::user()->primary_dpt)->first();
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '=', 0)->where('dept_id','=',$dept->id)->where('status','1')->orderBy('id', 'DESC')->paginate(20);
|
||||
} else {
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '=', 0)->where('status','1')->orderBy('id', 'DESC')->paginate(20);
|
||||
}
|
||||
?>
|
||||
<!-- Main content -->
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<?php $counted = count(App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '=', 0)->get());?>
|
||||
<h3 class="box-title">Unassigned </h3> <small id="title_refresh"> {!! $tickets->total() !!} tickets</small>
|
||||
</div><!-- /.box-header -->
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding ">
|
||||
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
|
||||
<div class="mailbox-controls">
|
||||
<h3 class="pull-right" style="margin-top:0;margin-bottom:0;"> <div id="count_refresh">{!! $tickets->count().'-'.$tickets->total(); !!}</div></h3>
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<a class="btn btn-default btn-sm" id="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" value="Delete">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="Close">
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>Loading...</b></p>
|
||||
<!-- table -->
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th>
|
||||
</th>
|
||||
<th>Subject</th>
|
||||
<th>Ticket ID</th>
|
||||
<th>Priority</th>
|
||||
<th>From</th>
|
||||
<th>Last Replier</th>
|
||||
<th>Assigned To</th>
|
||||
<th>Last Activity</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
|
||||
|
||||
|
||||
@foreach ($tickets as $ticket )
|
||||
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php }
|
||||
?> >
|
||||
<td><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
|
||||
<?php
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
// title
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
|
||||
if (strlen($string) > 40) {
|
||||
$stringCut = substr($string, 0, 40);
|
||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
|
||||
}
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
$username = $LastResponse->user_name;
|
||||
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
|
||||
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
|
||||
$username = $LastResponse->user_name;
|
||||
}}
|
||||
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
$count = count($titles);
|
||||
foreach($titles as $title)
|
||||
{
|
||||
$title = $title;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null)
|
||||
{
|
||||
$assigned = "Unassigned";
|
||||
}
|
||||
else
|
||||
{
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a class="text-red" href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority_desc}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
@if($from->role == "user")
|
||||
<td class="mailbox-from" >{!! $from->user_name !!}</td>
|
||||
@else
|
||||
<td class="mailbox-from" >{!! $from->first_name." ".$from->last_name !!}</td>
|
||||
@endif
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/unassigned'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /. box -->
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
//Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function () {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
|
||||
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("check");
|
||||
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
// Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function() {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() { /// Wait till page is loaded
|
||||
$('#click').click(function() {
|
||||
$('#refresh').load('unassigned #refresh');
|
||||
$('#title_refresh').load('unassigned #title_refresh');
|
||||
$('#count_refresh').load('unassigned #count_refresh');
|
||||
$("#show").show();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
@stop
|
||||
@@ -0,0 +1,144 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
|
||||
@section('Users')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('user-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('user')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
|
||||
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
<!-- open a form -->
|
||||
|
||||
{!! Form::open(['action'=>'Agent\helpdesk\UserController@store','method'=>'post']) !!}
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="content-header">
|
||||
|
||||
<h4>Create {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
<!-- Email Address : Email : Required -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xs-4 form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('email',Lang::get('lang.email')) !!}
|
||||
{!! $errors->first('email', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::email('email',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Full Name : Text : Required-->
|
||||
|
||||
<div class="col-xs-4 form-group {{ $errors->has('full_name') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('full_name',Lang::get('lang.full_name')) !!}
|
||||
{!! $errors->first('full_name', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('full_name',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<!-- mobile Number : Text : -->
|
||||
|
||||
<div class="col-md-4 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('mobile',Lang::get('lang.mobile')) !!}
|
||||
{!! $errors->first('mobile', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xs-1 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
|
||||
|
||||
<label for="ext">EXT</label>
|
||||
{!! $errors->first('ext', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('ext',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xs-5 form-group {{ $errors->has('phone_number') ? 'has-error' : '' }}">
|
||||
|
||||
<label for="phone_number">Phone</label>
|
||||
{!! $errors->first('phone_number', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('phone_number',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 form-group {{ $errors->has('active') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('active',Lang::get('lang.status')) !!}
|
||||
{!! $errors->first('active', '<spam class="help-block">:message</spam>') !!}
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
{!! Form::radio('active','1',true) !!}{{Lang::get('lang.active')}}
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
{!! Form::radio('active','0') !!}{{Lang::get('lang.inactive')}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Internal Notes : Textarea -->
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
{!! Form::label('internal_note',Lang::get('lang.internal_notes')) !!}
|
||||
{!! Form::textarea('internal_note',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$("textarea").wysihtml5();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@section('FooterInclude')
|
||||
|
||||
@stop
|
||||
@stop
|
||||
<!-- /content -->
|
||||
@stop
|
||||
@section('FooterInclude')
|
||||
|
||||
@stop
|
||||
|
||||
<!-- /content -->
|
||||
@@ -0,0 +1,149 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
|
||||
@section('Users')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('user-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('user')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
<!-- open a form -->
|
||||
|
||||
{!! Form::model($users,['url'=>'user/'.$users->id,'method'=>'PATCH']) !!}
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="content-header">
|
||||
|
||||
<h4>{{Lang::get('lang.edit')}} {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
<!-- Email Address : Email : Required -->
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4 form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('email',Lang::get('lang.email')) !!}
|
||||
{!! $errors->first('email', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::email('email',null,['disabled'=>'disabled', 'class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Full Name : Text : Required-->
|
||||
|
||||
<div class="col-md-4 form-group {{ $errors->has('user_name') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('user_name',Lang::get('lang.full_name')) !!}
|
||||
{!! $errors->first('user_name', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('user_name',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<!-- mobile Number : Text : -->
|
||||
|
||||
<div class="col-md-4 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('mobile',Lang::get('lang.mobile')) !!}
|
||||
{!! $errors->first('mobile', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xs-1 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
|
||||
|
||||
<label for="ext">EXT</label>
|
||||
{!! $errors->first('ext', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('ext',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xs-5 form-group {{ $errors->has('phone_number') ? 'has-error' : '' }}">
|
||||
|
||||
<label for="phone_number">Phone</label>
|
||||
{!! $errors->first('phone_number', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('phone_number',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xs-3 form-group {{ $errors->has('active') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('active',Lang::get('lang.status')) !!}
|
||||
{!! $errors->first('active', '<spam class="help-block">:message</spam>') !!}
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
{!! Form::radio('active','1',true) !!}{{Lang::get('lang.active')}}
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
{!! Form::radio('active','0') !!}{{Lang::get('lang.inactive')}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xs-3 form-group {{ $errors->has('ban') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('ban',Lang::get('lang.ban')) !!}
|
||||
{!! $errors->first('ban', '<spam class="help-block">:message</spam>') !!}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
{!! Form::radio('ban','1',true) !!}{{Lang::get('lang.enable')}}
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
{!! Form::radio('ban','0') !!}{{Lang::get('lang.disable')}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Internal Notes : Textarea -->
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
{!! Form::label('internal_note',Lang::get('lang.internal_notes')) !!}
|
||||
{!! Form::textarea('internal_note',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$("textarea").wysihtml5();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@section('FooterInclude')
|
||||
|
||||
@stop
|
||||
@stop
|
||||
<!-- /content -->
|
||||
@stop
|
||||
@section('FooterInclude')
|
||||
|
||||
@stop
|
||||
|
||||
<!-- /content -->
|
||||
@@ -0,0 +1,112 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
|
||||
@section('Users')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('user-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('user')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
|
||||
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
|
||||
<!-- open a form -->
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">{{Lang::get('lang.user')}}</h3><a href="{{route('user.create')}}" class="btn btn-primary pull-right">{{Lang::get('lang.create_user')}}</a></div>
|
||||
|
||||
<div class="box-body table-responsive no-padding">
|
||||
|
||||
|
||||
<!-- check whether success or not -->
|
||||
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"></i>
|
||||
<b>Success!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Alert!</b> Failed.
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<?php
|
||||
$users = App\User::where('role','=','user')->orderBy('id', 'ASC')->paginate(20);
|
||||
?>
|
||||
<table class="table table-hover" style="overflow:hidden;">
|
||||
<tr>
|
||||
<th width="100px">{{Lang::get('lang.name')}}</th>
|
||||
<th width="100px">{{Lang::get('lang.status')}}</th>
|
||||
<th width="100px">Last Login</th>
|
||||
<th width="100px">{{Lang::get('lang.action')}}</th>
|
||||
|
||||
</tr>
|
||||
|
||||
@foreach($users as $user)
|
||||
<tr>
|
||||
<td><a href="{{route('user.show', $user->id)}}"> {{$user->user_name }}</a></td>
|
||||
<td><?php if($user->active == 1) { ?> <button class="btn btn-success btn-xs">Active</button> <?php } else { ?> <button class="btn btn-danger btn-xs">Inactive</button> <?php } ?></td>
|
||||
<td>{{ UTC::usertimezone($user->updated_at) }}</td>
|
||||
<td>
|
||||
{!! Form::open(['route'=>['user.destroy', $user->id],'method'=>'DELETE']) !!}
|
||||
<a href="{{route('user.edit', $user->id)}}" class="btn btn-info btn-xs btn-flat"><i class="fa fa-edit" style="color:black;"> </i> Edit</a>
|
||||
{{-- <div class="form-group"> --}}
|
||||
<!-- To pop up a confirm Message -->
|
||||
{!! Form::button(' <i class="fa fa-trash" style="color:black;"> </i> Delete',['type' => 'submit',
|
||||
'class'=> 'btn btn-warning btn-xs btn-flat',
|
||||
'onclick'=>'return confirm("Are you sure?")'])
|
||||
!!}
|
||||
|
||||
{{-- </div> --}}
|
||||
{!! Form::close() !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
<div class="pull-right">
|
||||
<?php echo $users->setPath(url('/user'))->render();?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@section('FooterInclude')
|
||||
|
||||
@stop
|
||||
@stop
|
||||
<!-- /content -->
|
||||
@stop
|
||||
@section('FooterInclude')
|
||||
|
||||
@stop
|
||||
|
||||
<!-- /content -->
|
||||
@@ -0,0 +1,214 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Dashboard')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('dashboard-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('profile')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
{!! Form::model($user,['url'=>'agent-profile', 'method' => 'PATCH','files'=>true]) !!}
|
||||
|
||||
<div class="box box-primary">
|
||||
|
||||
<div class="content-header">
|
||||
|
||||
<h4>Profile {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Alert!</b> Success.
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- fail message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Alert!</b> Failed.
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- first name -->
|
||||
<div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('first_name',Lang::get('lang.first_name')) !!}
|
||||
{!! $errors->first('first_name', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('first_name',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
<!-- last name -->
|
||||
<div class="form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('last_name',Lang::get('lang.last_name')) !!}
|
||||
{!! $errors->first('last_name', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('last_name',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
<!-- gender -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('gender',Lang::get('lang.gender')) !!}
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
{!! Form::radio('gender','1',true) !!}{{Lang::get('lang.male')}}
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
{!! Form::radio('gender','0') !!}{{Lang::get('lang.female')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<!-- email address -->
|
||||
{!! Form::label('email',Lang::get('lang.email_address')) !!}
|
||||
<div>
|
||||
{{$user->email}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group {{ $errors->has('company') ? 'has-error' : '' }}">
|
||||
<!-- company -->
|
||||
{!! Form::label('company',Lang::get('lang.company')) !!}
|
||||
{!! $errors->first('company', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('company',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- phone extension -->
|
||||
<div class="col-xs-3 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('ext',Lang::get('lang.ext')) !!}
|
||||
{!! $errors->first('ext', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('ext',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
<!-- phone number -->
|
||||
<div class="col-xs-9 form-group {{ $errors->has('phone_number') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('phone_number',Lang::get('lang.phone')) !!}
|
||||
{!! $errors->first('phone_number', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('phone_number',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- mobile -->
|
||||
<div class="form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('mobile',Lang::get('lang.mobile_number')) !!}
|
||||
{!! $errors->first('mobile', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group {{ $errors->has('agent_sign') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('agent_sign',Lang::get('lang.agent_sign')) !!}
|
||||
{!! $errors->first('agent_sign', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::textarea('agent_sign',null,['class' => 'form-control']) !!}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group {{ $errors->has('profile_pic') ? 'has-error' : '' }}">
|
||||
<!-- profile pic -->
|
||||
<div type="file" class="btn btn-default btn-file" style="color:orange">
|
||||
<i class="fa fa-user"> </i>
|
||||
{!! Form::label('profile_pic',Lang::get('lang.profile_pic')) !!}
|
||||
{!! $errors->first('profile_pic', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::file('profile_pic',['class' => 'form-file']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! Form::token() !!}
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
{!! Form::model($user,['url'=>'agent-profile-password/'.$user->id , 'method' => 'PATCH']) !!}
|
||||
|
||||
<div class="box box-primary">
|
||||
|
||||
<div class="content-header">
|
||||
|
||||
<h4>Change Password {!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary pull-right'])!!}</h4>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
@if(Session::has('success1'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Alert!</b> Success.
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success1')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- fail message -->
|
||||
@if(Session::has('fails1'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>Alert!</b> Failed.
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails1')}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- old password -->
|
||||
<div class="form-group has-feedback {{ $errors->has('old_password') ? 'has-error' : '' }}">
|
||||
{!! Form::label('old_password',Lang::get('lang.old_password')) !!}
|
||||
{!! Form::password('old_password',['placeholder'=>'Password','class' => 'form-control']) !!}
|
||||
{!! $errors->first('old_password', '<spam class="help-block">:message</spam>') !!}
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
</div>
|
||||
<!-- new password -->
|
||||
<div class="form-group has-feedback {{ $errors->has('new_password') ? 'has-error' : '' }}">
|
||||
{!! Form::label('new_password',Lang::get('lang.new_password')) !!}
|
||||
{!! Form::password('new_password',['placeholder'=>'New Password','class' => 'form-control']) !!}
|
||||
{!! $errors->first('new_password', '<spam class="help-block">:message</spam>') !!}
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
</div>
|
||||
<!-- confirm password -->
|
||||
<div class="form-group has-feedback {{ $errors->has('confirm_password') ? 'has-error' : '' }}">
|
||||
{!! Form::label('confirm_password',Lang::get('lang.confirm_password')) !!}
|
||||
{!! Form::password('confirm_password',['placeholder'=>'Confirm Password','class' => 'form-control']) !!}
|
||||
{!! $errors->first('confirm_password', '<spam class="help-block">:message</spam>') !!}
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$("textarea").wysihtml5();
|
||||
});
|
||||
</script>
|
||||
|
||||
@stop
|
||||
@@ -0,0 +1,75 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
|
||||
@section('content')
|
||||
|
||||
@section('Dashboard')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('dashboard-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('profile')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
|
||||
@section('profileimg')
|
||||
@if(Auth::user() && Auth::user()->profile_pic)
|
||||
<img src="{{asset('lb-faveo/profilepic')}}{{'/'}}{{Auth::user()->profile_pic}}" class="img-circle" alt="User Image" />
|
||||
@else
|
||||
@if(Auth::user())
|
||||
<img src="{{ Gravatar::src(Auth::user()->email,200) }}" class="img-circle" alt="User Image">
|
||||
@endif
|
||||
@endif
|
||||
@stop
|
||||
|
||||
|
||||
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
{{-- style="background-image:url({{ URL::asset('/dist/img/boxed-bg.jpg')}}); color:#DBDBDB;" --}}
|
||||
<div class="col-md-12 box box-primary">
|
||||
<div class="col-md-6">
|
||||
{{-- <div class="box box-success"> --}}
|
||||
{{-- <section class="content"> --}}
|
||||
{{-- <div class=" box-header"> --}}
|
||||
<h3><b>User Information</b> <a href="{{URL::route('agent-profile-edit')}}"><i class="fa fa-fw fa-edit"> </i></a></h3>
|
||||
{{-- </div> --}}
|
||||
<div class="box-body">
|
||||
<table class="row">
|
||||
@if($user->gender == 1)
|
||||
<tr><th class="col-md-8"><h4><b>Gender:<b></h4></th><td class="col-md-6"><h4>{{ 'Male' }}</h4></td></tr>
|
||||
@else
|
||||
<tr><th class="col-md-8"><h4><b>gender:</b></h4></th><td class="col-md-6"><h4>{{ 'Female' }}</h4></td></tr>
|
||||
@endif
|
||||
<tr><th class="col-md-8"><h4><b>department:</b></h4></th><td class="col-md-6"><h4>{{ $user->primary_dpt }}</h4></td></tr>
|
||||
<tr><th class="col-md-8"><h4><b>group:</b></h4></th><td class="col-md-6"><h4>{{ $user->assign_group }}</h4></td></tr>
|
||||
<tr><th class="col-md-8"><h4><b>Company:</b></h4></th><td class="col-md-6"> <h4>{{ $user->company }}</h4></td></tr>
|
||||
<tr><th class="col-md-8"><h4><b>Time-zone:</b></h4></th><td class="col-md-6"><h4> {{ $user->agent_tzone }}</h4></td></tr>
|
||||
<tr><th class="col-md-8"><h4><b>Role:</b></h4></th><td class="col-md-6"> <h4>{{ $user->role }}</h4></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
{{-- </section> --}}
|
||||
{{-- </div> --}}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{{-- <div class="box box-primary"> --}}
|
||||
{{-- <section class="content"> --}}
|
||||
<h3><b>Contact Information</b></h3>
|
||||
<div class="box-body">
|
||||
<table>
|
||||
<tr><th class="col-md-8"><h4><b>Email:</b></h4> </th> <td class="col-md-6"><h4> {{ $user->email }}</h4> </td></tr>
|
||||
<tr><th class="col-md-8"><h4><b>Phone Number:</b></h4> </th> <td class="col-md-6"><h4> {{ $user->ext }}{{ $user->phone_number }}</h4> </td></tr>
|
||||
<tr><th class="col-md-8"><h4><b>Moble:</b></h4></th><td class="col-md-6"><h4> {{ $user->mobile }}</h4></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
{{-- </section> --}}
|
||||
</div>
|
||||
{{-- </div> --}}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@stop
|
||||
@@ -0,0 +1,755 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Users')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('user-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('user')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<div class="box-header" style="margin-top:-15px;margin-bottom:-15px;"><h3 class="box-title">User Profile</h3><a href="{{route('user.edit', $users->id)}}" class="btn btn-info btn-sm btn-flat pull-right"><i class="fa fa-edit" style="color:black;"> </i> Edit</a></div>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
{{-- style="display:none" --}}
|
||||
<!-- success message -->
|
||||
<div id="alert-success" class="alert alert-success alert-dismissable" style="display:none;">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success <span id="get-success"></span></b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<div>
|
||||
<center>
|
||||
<img src="{{ Gravatar::src($users -> email) }}" class="img-circle" alt="User Image" style="border:3px solid #CBCBDA;padding:3px;">
|
||||
@if($users->first_name || $users->last_name)
|
||||
<h3 class="">{{$users->first_name}} {{$users->last_name}}</h3>
|
||||
@else
|
||||
<h3 class="">{{$users->user_name}}</h3>
|
||||
@endif
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<b>{{Lang::get('lang.email')}}</b>
|
||||
<a class="pull-right">
|
||||
{{$users->email }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div id="refresh-org">
|
||||
<?php
|
||||
$user_org = App\Model\helpdesk\Agent_panel\User_org::where('user_id','=', $users->id)->first();
|
||||
?>
|
||||
@if($user_org == null)
|
||||
<b>Organisation</b>
|
||||
|
||||
<a href="" class="pull-right" data-toggle="modal" data-target="#assign"><i class="fa fa-hand-o-right" style="color:orange;"> </i> Assign </a>
|
||||
<a href="" data-toggle="modal" data-target="#create_org" class="pull-right"> {{Lang::get('lang.create')}} <b style="color:#000"> / </b> </a>
|
||||
@else
|
||||
<?php $org_id = $user_org->org_id;
|
||||
$organization = App\Model\helpdesk\Agent_panel\Organization::where('id','=',$org_id)->first(); ?>
|
||||
<b>Organisations</b>
|
||||
<a href="{!! URL::route('organizations.show',$organization->id) !!}" class="pull-right">{!! $organization->name !!}</a>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-footer">
|
||||
<b>{{Lang::get('lang.status')}}</b>
|
||||
<a class="pull-right">
|
||||
@if($users->active == '1')
|
||||
<span style="color:green;">Active</span>
|
||||
@else
|
||||
<span style="color:red;">Inactive</span>
|
||||
@endif
|
||||
</a>
|
||||
</div>
|
||||
@if($users->phone_number)
|
||||
<div class="box-footer">
|
||||
<b>{{Lang::get('lang.phone')}}</b>
|
||||
<a class="pull-right">{{$users->phone_number}}</a>
|
||||
</div>
|
||||
@endif
|
||||
@if($users->internal_note)
|
||||
<div class="box-footer">
|
||||
<b>{{Lang::get('lang.internal_notes')}}</b>
|
||||
<br/>
|
||||
{!! $users->internal_note !!}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{-- detals table starts --}}
|
||||
<?php $user = App\User::where('id',$users->id)->first(); ?>
|
||||
<?php $open = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','1')->get());
|
||||
$counted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','2')->get());
|
||||
$deleted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','5')->get()); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- Custom Tabs -->
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab_1" data-toggle="tab">Open Tickets ({{$open}})</a></li>
|
||||
<li><a href="#tab_2" data-toggle="tab">Closed Tickets ({{$counted}})</a></li>
|
||||
<li><a href="#tab_3" data-toggle="tab">Deleted Tickets ({{$deleted}})</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab_1">
|
||||
{{-- open tab --}}
|
||||
<?php $open = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','1')->get()); ?>
|
||||
|
||||
@if(Session::has('success'))
|
||||
<div id="success-alert" class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding ">
|
||||
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
<div class="mailbox-controls">
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<a class="btn btn-default btn-sm" id="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" value="Delete">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="Close">
|
||||
<div class="pull-right">
|
||||
<?php
|
||||
$counted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','1')->get());
|
||||
if ($counted < 20) {
|
||||
echo $counted . "/" . $counted;
|
||||
} else {
|
||||
echo "20/" . $counted;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>Loading...</b></p>
|
||||
<!-- table -->
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th>
|
||||
</th>
|
||||
<th>Subject</th>
|
||||
<th>Ticket ID</th>
|
||||
<th>Priority</th>
|
||||
<th>From</th>
|
||||
<th>Last Replier</th>
|
||||
<th>Assigned To</th>
|
||||
<th>Last Activity</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
<?php $tickets = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','1')->orderBy('id', 'DESC')->paginate(20);?>
|
||||
@foreach ($tickets as $ticket)
|
||||
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php }
|
||||
?> >
|
||||
<td ><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
|
||||
<?php
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
// title
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
|
||||
if (strlen($string) > 40) {
|
||||
$stringCut = substr($string, 0, 40);
|
||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
|
||||
}
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
$username = $LastResponse->user_name;
|
||||
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
|
||||
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
|
||||
$username = $LastResponse->user_name;
|
||||
}}
|
||||
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
$count = count($titles);
|
||||
foreach($titles as $title) {
|
||||
$title = $title;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null) {
|
||||
$assigned = "Unassigned";
|
||||
} else {
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
@if($from->role == "user")
|
||||
<td class="mailbox-from" >{!! $from->user_name !!}</td>
|
||||
@else
|
||||
<td class="mailbox-from" >{!! $from->first_name." ".$from->last_name !!}</td>
|
||||
@endif
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/ticket/open'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
|
||||
{{-- end deleted tickets --}}
|
||||
</div>
|
||||
</div><!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="tab_2">
|
||||
{{-- open tab --}}
|
||||
<?php $closed = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', 2)->get()); ?>
|
||||
@if(Session::has('success'))
|
||||
<div id="success-alert" class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding">
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
<div class="mailbox-controls">
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<a class="btn btn-default btn-sm" id="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" value="Delete">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="Close">
|
||||
<div class="pull-right">
|
||||
<?php
|
||||
$counted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','2')->get());
|
||||
if ($counted < 20) {
|
||||
echo $counted . "/" . $counted;
|
||||
} else {
|
||||
echo "20/" . $counted;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>Loading...</b></p>
|
||||
<!-- table -->
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th>
|
||||
</th>
|
||||
<th>Subject</th>
|
||||
<th>Ticket ID</th>
|
||||
<th>Priority</th>
|
||||
<th>From</th>
|
||||
<th>Last Replier</th>
|
||||
<th>Assigned To</th>
|
||||
<th>Last Activity</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
<?php $tickets = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','2')->orderBy('id', 'DESC')->paginate(20);?>
|
||||
@foreach ($tickets as $ticket)
|
||||
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php } ?> >
|
||||
<td ><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
|
||||
<?php
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
// title
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
|
||||
if (strlen($string) > 40) {
|
||||
$stringCut = substr($string, 0, 40);
|
||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
|
||||
}
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
$username = $LastResponse->user_name;
|
||||
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
|
||||
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
|
||||
$username = $LastResponse->user_name;
|
||||
}}
|
||||
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
$count = count($titles);
|
||||
foreach($titles as $title) {
|
||||
$title = $title;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null) {
|
||||
$assigned = "Unassigned";
|
||||
} else {
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
@if($from->role == "user")
|
||||
<td class="mailbox-from" >{!! $from->user_name !!}</td>
|
||||
@else
|
||||
<td class="mailbox-from" >{!! $from->first_name." ".$from->last_name !!}</td>
|
||||
@endif
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/ticket/open'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
|
||||
{{-- end deleted tickets --}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab_3">
|
||||
{{-- open tab --}}
|
||||
<?php $deleted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','5')->get()); ?>
|
||||
|
||||
@if(Session::has('success'))
|
||||
<div id="success-alert" class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success </b>
|
||||
<button type="button" id="close-alert" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding ">
|
||||
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
<div class="mailbox-controls">
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<a class="btn btn-default btn-sm" id="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" value="Delete">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="Close">
|
||||
<div class="pull-right">
|
||||
<?php
|
||||
$counted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','5')->get());
|
||||
if ($counted < 20) {
|
||||
echo $counted . "/" . $counted;
|
||||
} else {
|
||||
echo "20/" . $counted;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>Loading...</b></p>
|
||||
<!-- table -->
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th>
|
||||
</th>
|
||||
<th>Subject</th>
|
||||
<th>Ticket ID</th>
|
||||
<th>Priority</th>
|
||||
<th>From</th>
|
||||
<th>Last Replier</th>
|
||||
<th>Assigned To</th>
|
||||
<th>Last Activity</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
<?php $tickets = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','5')->orderBy('id', 'DESC')->paginate(20);?>
|
||||
@foreach ($tickets as $ticket)
|
||||
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php }
|
||||
?> >
|
||||
<td ><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
|
||||
<?php
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
// title
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
|
||||
if (strlen($string) > 40) {
|
||||
$stringCut = substr($string, 0, 40);
|
||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
|
||||
}
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
$username = $LastResponse->user_name;
|
||||
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
|
||||
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
|
||||
$username = $LastResponse->user_name;
|
||||
}}
|
||||
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
$count = count($titles);
|
||||
foreach($titles as $title)
|
||||
{
|
||||
$title = $title;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null)
|
||||
{
|
||||
$assigned = "Unassigned";
|
||||
}
|
||||
else
|
||||
{
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
@if($from->role == "user")
|
||||
<td class="mailbox-from" >{!! $from->user_name !!}</td>
|
||||
@else
|
||||
<td class="mailbox-from" >{!! $from->first_name." ".$from->last_name !!}</td>
|
||||
@endif
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/ticket/open'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
|
||||
</div><!-- /.tab-pane -->
|
||||
</div><!-- /.tab-content -->
|
||||
</div><!-- nav-tabs-custom -->
|
||||
</div><!-- /.col -->
|
||||
</div> <!-- /.row -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- END CUSTOM TABS -->
|
||||
|
||||
{{-- MODAL POPUPS --}}
|
||||
|
||||
<div class="modal fade" id="create_org">
|
||||
<div class="modal-dialog" style="width:84%;height:70%;">
|
||||
<div class="modal-content">
|
||||
{!! Form::model($users->id, ['id'=>'form','method' => 'PATCH'] )!!}
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidd en="true">×</span></button>
|
||||
<h4 class="modal-title">Create Organization</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- failure message -->
|
||||
<div class="alert alert-danger alert-dismissable" id="alert-danger" style="display:none;">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! <span id="get-danger"></span> </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="row" id="hide">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label>Name</label>
|
||||
<input type="text" name="name" class="form-control">
|
||||
<spam id="error-name" style="display:none;position:fixed" class="call-out text-red">This is a required field</spam>
|
||||
<spam id="error-name1" style="display:none;position:fixed" class="call-out text-red">! Allready Taken</spam>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label>Phone</label>
|
||||
<input type="number" name="phone" class="form-control">
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label>Website</label>
|
||||
<input type="url" name="website" placeholder="https://www.example.com" class="form-control">
|
||||
<spam id="error-website" style="display:none" class="help-block text-red">! Allready Taken</spam>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>Address</label>
|
||||
<textarea name="address" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>Internal</label>
|
||||
<textarea name="internal" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="show2" style="display:none;">
|
||||
<div class="row row-md-12">
|
||||
<div class="col-xs-5">
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<img src="{{asset("lb-faveo/dist/img/gifloader.gif")}}">
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis">Close</button>
|
||||
<input type="submit" class="btn btn-primary pull-right" value="Update">
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
jQuery(document).ready(function($) {
|
||||
// create org
|
||||
$('#form').on('submit', function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "../user-org/{{$users->id}}",
|
||||
dataType: "html",
|
||||
data: $(this).serialize(),
|
||||
beforeSend: function() {
|
||||
$("#hide").hide();
|
||||
$("#show2").show();
|
||||
},
|
||||
success: function(response) {
|
||||
$("#show2").hide();
|
||||
$("#hide").show();
|
||||
|
||||
if (response == 0) {
|
||||
message = "Organization added successfully."
|
||||
$("#dismis").trigger("click");
|
||||
$("#refresh-org").load("../user/{{ $users->id }} #refresh-org");
|
||||
// $("#refresh2").load("../thread/{{$users->id}} #refresh2");
|
||||
// $("#show").show();
|
||||
$("#alert-success").show();
|
||||
$('#get-success').html(message);
|
||||
setInterval(function(){$("#alert-success").hide(); },4000);
|
||||
|
||||
} else {
|
||||
message = response;
|
||||
$("#alert-danger").show();
|
||||
$('#get-danger').html(message);
|
||||
}
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<!-- Organisation Assign Modal -->
|
||||
<div class="modal fade" id="assign">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
{!! Form::model($users->id, ['id'=>'org_assign','method' => 'PATCH'] )!!}
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" id="dismiss" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">Assign</h4>
|
||||
</div>
|
||||
<div id="assign_alert" class="alert alert-success alert-dismissable" style="display:none;">
|
||||
<button id="assign_dismiss" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-check"></i>Alert!</h4>
|
||||
<div id="message-success1"></div>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
<div class="col-md-6" id="assign_loader" style="display:none;">
|
||||
<img src="{{asset("lb-faveo/dist/img/gifloader.gif")}}"><br/><br/><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="assign_body">
|
||||
<p>Please Select an Organization</p>
|
||||
<select id="org" class="form-control" name="org">
|
||||
<?php
|
||||
$orgs = App\Model\helpdesk\Agent_panel\Organization::all();
|
||||
?>
|
||||
<optgroup label="Select Organizations">
|
||||
@foreach($orgs as $org)
|
||||
<option value="{{$org->id}}">{!! $org->name !!}</option>
|
||||
@endforeach
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis4">Close</button>
|
||||
<button type="submit" class="btn btn-success pull-right" id="submt2">Assign</button>
|
||||
</div>
|
||||
{!! Form::close()!!}
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
// Assign a ticket
|
||||
jQuery(document).ready(function($) {
|
||||
// create org
|
||||
$('#org_assign').on('submit', function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "../user-org-assign/{{$users->id}}",
|
||||
dataType: "html",
|
||||
data: $(this).serialize(),
|
||||
beforeSend: function() {
|
||||
$("#hide").hide();
|
||||
$("#show2").show();
|
||||
},
|
||||
success: function(response) {
|
||||
$("#show2").hide();
|
||||
$("#hide").show();
|
||||
|
||||
if (response == 1) {
|
||||
message = "Organization added successfully."
|
||||
$("#dismiss").trigger("click");
|
||||
$("#refresh-org").load("../user/{{ $users->id }} #refresh-org");
|
||||
// $("#refresh2").load("../thread/{{$users->id}} #refresh2");
|
||||
// $("#show").show();
|
||||
$("#alert-success").show();
|
||||
$('#get-success').html(message);
|
||||
setInterval(function(){$("#alert-success").hide(); },4000);
|
||||
}
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function () {
|
||||
//Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function () {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
|
||||
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("check");
|
||||
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
// Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function() {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() { /// Wait till page is loaded
|
||||
$('#click').click(function() {
|
||||
$('#refresh').load('open #refresh');
|
||||
$("#show").show();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@stop
|
||||
<!-- /content -->
|
||||
@@ -0,0 +1,409 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" ng-app="myApp">
|
||||
<title>Faveo | HELP DESK</title>
|
||||
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
||||
<meta name="_token" content="{!! csrf_token() !!}"/>
|
||||
<!-- Bootstrap 3.3.2 -->
|
||||
<link href="{{asset("lb-faveo/downloads/bootstrap.min.css")}}" rel="stylesheet" type="text/css" />
|
||||
<!-- Font Awesome Icons -->
|
||||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
|
||||
<!-- Ionicons -->
|
||||
<link href="{{asset("lb-faveo/downloads/ionicons.min.css")}}" rel="stylesheet" type="text/css" />
|
||||
<!-- fullCalendar 2.2.5-->
|
||||
<link href="{{asset("lb-faveo/plugins/fullcalendar/fullcalendar.min.css")}}" rel="stylesheet" type="text/css" />
|
||||
<link href="{{asset("lb-faveo/plugins/fullcalendar/fullcalendar.print.css")}}" rel="stylesheet" type="text/css" media='print' />
|
||||
<!-- Theme style -->
|
||||
<link href="{{asset("lb-faveo/dist/css/AdminLTE.css")}}" rel="stylesheet" type="text/css" />
|
||||
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
||||
folder instead of downloading all of them to reduce the load. -->
|
||||
<link href="{{asset("lb-faveo/dist/css/skins/_all-skins.min.css")}}" rel="stylesheet" type="text/css" />
|
||||
<!-- iCheck -->
|
||||
<link href="{{asset("lb-faveo/plugins/iCheck/flat/blue.css")}}" rel="stylesheet" type="text/css" />
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<link rel="stylesheet" href="{{asset("lb-faveo/dist/css/tabby.css")}}" type="text/css">
|
||||
<link href="{{asset("lb-faveo/downloads/jquerysctipttop.css")}}" rel="stylesheet" type="text/css">
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<link rel="stylesheet" href="{{asset("lb-faveo/dist/css/editor.css")}}" type="text/css">
|
||||
<link href="{{asset("lb-faveo/plugins/filebrowser/plugin.js")}}" rel="stylesheet" type="text/css" />
|
||||
{{-- jquery ui css --}}
|
||||
<link type="text/css" href="{{asset("lb-faveo/downloads/jquery.ui.css")}}" rel="stylesheet">
|
||||
<link type="text/css" href="{{asset("lb-faveo/plugins/datatables/dataTables.bootstrap.css")}}" rel="stylesheet">
|
||||
<link href="{{asset("lb-faveo/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css")}}" rel="stylesheet" type="text/css" />
|
||||
|
||||
|
||||
<!-- <link type="text/css" href="http://code.jquery.com/ui/1.9.1/themes/redmond/jquery-ui.css" rel="stylesheet"> -->
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
|
||||
@yield('HeadInclude')
|
||||
</head>
|
||||
<body class="skin-yellow fixed">
|
||||
|
||||
<div class="wrapper">
|
||||
|
||||
<header class="main-header">
|
||||
<a href="" class="logo"><b>Faveo </b>HELPDESK</a>
|
||||
|
||||
<?php
|
||||
$company = App\Model\helpdesk\Settings\Company::where('id', '=', '1')->first();
|
||||
if ($company != null) {
|
||||
}
|
||||
?>
|
||||
<!-- Header Navbar: style can be found in header.less -->
|
||||
<nav class="navbar navbar-static-top" role="navigation">
|
||||
<!-- Sidebar toggle button-->
|
||||
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</a>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbar-collapse">
|
||||
<ul class="tabs tabs-horizontal nav navbar-nav navbar-left">
|
||||
<li @yield('Dashboard')><a data-target="#tabA" href="#">Dashboard</a></li>
|
||||
<li @yield('Users')><a data-target="#tabB" href="#">Users</a></li>
|
||||
<li @yield('Tickets')><a data-target="#tabC" href="#">Tickets</a></li>
|
||||
<li @yield('Tools')><a data-target="#tabD" href="#">Tools</a></li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
@if(Auth::user()->role == 'admin')
|
||||
<li><a href="{{url('agents')}}">Admin Panel</a></li>
|
||||
@endif
|
||||
<!-- User Account: style can be found in dropdown.less -->
|
||||
<li class="dropdown user user-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
@if(Auth::user())
|
||||
@if(Auth::user()->profile_pic)
|
||||
<img src="{{asset('lb-faveo/profilepic')}}{{'/'}}{{Auth::user()->profile_pic}}"class="user-image" alt="User Image"/>
|
||||
@else
|
||||
<img src="{{ Gravatar::src(Auth::user()->email) }}" class="user-image" alt="User Image">
|
||||
@endif
|
||||
<span class="hidden-xs">{{Auth::user()->first_name." ".Auth::user()->last_name}}</span>
|
||||
@endif
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<!-- User image -->
|
||||
<li class="user-header" style="background-color:#343F44;">
|
||||
@if(Auth::user()->profile_pic)
|
||||
<img src="{{asset('lb-faveo/profilepic')}}{{'/'}}{{Auth::user()->profile_pic}}" class="img-circle" alt="User Image" />
|
||||
@else
|
||||
<img src="{{ Gravatar::src(Auth::user()->email) }}" class="img-circle" alt="User Image">
|
||||
@endif
|
||||
<p>
|
||||
{{Auth::user()->first_name." ".Auth::user()->last_name}} - {{Auth::user()->role}}
|
||||
<small></small>
|
||||
</p>
|
||||
</li>
|
||||
<!-- Menu Footer-->
|
||||
<li class="user-footer" style="background-color:#1a2226;">
|
||||
<div class="pull-left">
|
||||
<a href="{{URL::route('profile')}}" class="btn btn-info btn-sm"><b>Profile</b></a>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="{{url('auth/logout')}}" class="btn btn-danger btn-sm"><b>Sign out</b></a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</nav>
|
||||
</header>
|
||||
<!-- Left side column. contains the logo and sidebar -->
|
||||
<aside class="main-sidebar">
|
||||
<!-- sidebar: style can be found in sidebar.less -->
|
||||
<section class="sidebar">
|
||||
|
||||
<div class="user-panel">
|
||||
@if (trim($__env->yieldContent('profileimg')))
|
||||
<h1>@yield('profileimg')</h1>
|
||||
@else
|
||||
<div class = "row">
|
||||
<div class="col-xs-3"></div>
|
||||
|
||||
<div class="col-xs-2" style="width:50%;">
|
||||
<a href="{!! url('profile') !!}">
|
||||
@if(Auth::user() && Auth::user()->profile_pic)
|
||||
<img src="{{asset('lb-faveo/profilepic')}}{{'/'}}{{Auth::user()->profile_pic}}" class="img-circle" alt="User Image" />
|
||||
@else
|
||||
<img src="{{ Gravatar::src(Auth::user()->email) }}" class="img-circle" alt="User Image">
|
||||
@endif
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="info" style="text-align:center;">
|
||||
@if(Auth::user())
|
||||
<p>{{Auth::user()->first_name." ".Auth::user()->last_name}}</p>
|
||||
@endif
|
||||
@if(Auth::user() && Auth::user()->active==1)
|
||||
<a href="#"><i class="fa fa-circle text-success"></i> Online</a>
|
||||
@else
|
||||
<a href="#"><i class="fa fa-circle"></i> Offline</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<!-- search form -->
|
||||
{{-- <form action="#" method="get" class="sidebar-form"> --}}
|
||||
{{-- <div class="input-group"> --}}
|
||||
{{-- <input type="text" name="q" class="form-control" placeholder="Search..."/> --}}
|
||||
{{-- <span class="input-group-btn"> --}}
|
||||
{{-- <button type='submit' name='seach' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button> --}}
|
||||
{{-- </span> --}}
|
||||
{{-- </div> --}}
|
||||
{{-- </form> --}}
|
||||
<!-- /.search form -->
|
||||
<!-- sidebar menu: : style can be found in sidebar.less -->
|
||||
<ul class="sidebar-menu">
|
||||
@yield('sidebar')
|
||||
<li class="header">TICKETS</li>
|
||||
|
||||
<?php
|
||||
$inbox = App\Model\helpdesk\Ticket\Tickets::all();
|
||||
|
||||
?>
|
||||
<?php $myticket = App\Model\helpdesk\Ticket\Tickets::where('assigned_to', Auth::user()->id)->where('status','1')->get();?>
|
||||
<?php $unassigned = App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '0')->where('status','1')->get();
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status','1')->get();
|
||||
$i = count($tickets);
|
||||
?>
|
||||
<li @yield('inbox')>
|
||||
<a href="{{ url('/ticket/inbox') }}" id="load-inbox">
|
||||
<i class="fa fa-envelope"></i> <span>Inbox</span> <small class="label pull-right bg-green"><?php echo $i;?></small>
|
||||
</a>
|
||||
</li>
|
||||
<li @yield('myticket')>
|
||||
<a href="{{url('ticket/myticket')}}">
|
||||
<i class="fa fa-user"></i> <span>My Tickets</span>
|
||||
<small class="label pull-right bg-green">{{count($myticket) }}</small>
|
||||
</a>
|
||||
</li>
|
||||
<li @yield('unassigned')>
|
||||
<a href="{{url('unassigned')}}">
|
||||
<i class="fa fa-th"></i> <span>Unassigned</span>
|
||||
<small class="label pull-right bg-green">{{count($unassigned)}}</small>
|
||||
</a>
|
||||
</li>
|
||||
<li @yield('trash')>
|
||||
<a href="{{url('trash')}}">
|
||||
<i class="fa fa-trash-o"></i> <span>Trash</span>
|
||||
<?php $deleted = App\Model\helpdesk\Ticket\Tickets::where('status', '5')->get();?>
|
||||
<small class="label pull-right bg-green">{{count($deleted)}}</small>
|
||||
</a>
|
||||
</li>
|
||||
<li class="header">DEPARTMENTS</li>
|
||||
|
||||
<?php
|
||||
$depts = App\Model\helpdesk\Agent\Department::all();
|
||||
|
||||
foreach ($depts as $dept) {
|
||||
|
||||
$open = App\Model\helpdesk\Ticket\Tickets::where('status','=','1')->where('assigned_to','=', 0)->where('dept_id','=',$dept->id)->get();
|
||||
$open = count($open);
|
||||
|
||||
$underprocess = App\Model\helpdesk\Ticket\Tickets::where('status','=','1')->where('assigned_to','>', 0)->where('dept_id','=',$dept->id)->get();
|
||||
$underprocess = count($underprocess);
|
||||
|
||||
$closed = App\Model\helpdesk\Ticket\Tickets::where('status','=','2')->where('dept_id','=',$dept->id)->get();
|
||||
$closed = count($closed);
|
||||
|
||||
// $underprocess = 0;
|
||||
// foreach ($inbox as $ticket4) {
|
||||
// if ($ticket4->assigned_to == null) {
|
||||
// } else {
|
||||
// $underprocess++;
|
||||
// }
|
||||
// }
|
||||
|
||||
if (Auth::user()->role == 'admin') { ?>
|
||||
<li class="treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-folder-open"></i> <span>{!! $dept->name !!}</span> <i class="fa fa-angle-left pull-right"></i>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li><a href="{!! url::route('dept.open.ticket',$dept->name) !!}"><i class="fa fa-circle-o"></i>Open<small class="label pull-right bg-green">{!! $open !!}</small></a></li>
|
||||
<li><a href="{!! url::route('dept.inprogress.ticket',$dept->name) !!}"><i class="fa fa-circle-o"></i>Inprogress<small class="label pull-right bg-green">{!! $underprocess !!}</small></a></li>
|
||||
<li><a href="{!! url::route('dept.closed.ticket',$dept->name) !!}"><i class="fa fa-circle-o"></i>Closed<small class="label pull-right bg-green">{!! $closed !!}</small></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } if (Auth::user()->role == 'agent' && Auth::user()->primary_dpt == $dept->name) { ?>
|
||||
<li class="treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-folder-open"></i> <span>{!! $dept->name !!}</span> <i class="fa fa-angle-left pull-right"></i>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li><a href="{!! url::route('dept.open.ticket',$dept->name) !!}"><i class="fa fa-circle-o"></i>Open<small class="label pull-right bg-green">{!! $open !!}</small></a></li>
|
||||
<li><a href="{!! url::route('dept.inprogress.ticket',$dept->name) !!}"><i class="fa fa-circle-o"></i>Inprogress<small class="label pull-right bg-green">{!! $underprocess !!}</small></a></li>
|
||||
<li><a href="{!! url::route('dept.closed.ticket',$dept->name) !!}"><i class="fa fa-circle-o"></i>Closed<small class="label pull-right bg-green">{!! $closed !!}</small></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php } } ?>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
<?php $agent_group = Auth::user()->assign_group;
|
||||
$group = App\Model\helpdesk\Agent\Groups::where('name', '=', $agent_group)->where('group_status', '=', '1')->first();
|
||||
// dd($group); ?>
|
||||
<!-- Right side column. Contains the navbar and content of the page -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<div class="tab-content" style="background-color: white;padding: 0 20px 0 20px">
|
||||
<div class="collapse navbar-collapse" id="navbar-collapse">
|
||||
<div class="tabs-content">
|
||||
<div class="tabs-pane @yield('dashboard-bar')" id="tabA">
|
||||
<ul class="nav navbar-nav">
|
||||
<li id="bar" @yield('dashboard') ><a href="{{url('dashboard')}}">Dashboard</a></li>
|
||||
<li id="bar" @yield('profile') ><a href="{{url('profile')}}">Profile</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs-pane @yield('user-bar')" id="tabB">
|
||||
<ul class="nav navbar-nav">
|
||||
<li id="bar" @yield('user')><a href="{{ url('user') }}" >User Directory</a></li></a></li>
|
||||
<li id="bar" @yield('organizations')><a href="{{ url('organizations') }}" >Organizations</a></li></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs-pane @yield('ticket-bar')" id="tabC">
|
||||
<ul class="nav navbar-nav">
|
||||
<li id="bar" @yield('open')><a href="{{ url('/ticket/open') }}" >Open</a></li>
|
||||
<li id="bar" @yield('answered')><a href="{{ url('/ticket/answered') }}" >Answered</a></li>
|
||||
<li id="bar" @yield('myticket')><a href="{{ url('/ticket/myticket') }}" >My Ticket</a></li>
|
||||
{{-- <li id="bar" @yield('ticket')><a href="{{ url('ticket') }}" >Ticket</a></li> --}}
|
||||
{{-- <li id="bar" @yield('overdue')><a href="{{ url('/ticket/overdue') }}" >Overdue</a></li> --}}
|
||||
<li id="bar" @yield('assigned')><a href="{{ url('/ticket/assigned') }}" >Assigned</a></li>
|
||||
<li id="bar" @yield('closed')><a href="{{ url('/ticket/closed') }}" >Closed</a></li>
|
||||
<?php if ($group->can_create_ticket == 1) {?>
|
||||
<li id="bar" @yield('newticket')><a href="{{ url('/newticket') }}" >Create Ticket
|
||||
</a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tabs-pane @yield('tools-bar')" id="tabD">
|
||||
<ul class="nav navbar-nav">
|
||||
<li id="bar" @yield('tools')><a href="{{ url('/canned/list') }}" >Canned</a></li>
|
||||
{{-- <li id="bar" @yield('answered')><a href="{{ url('/ticket/answered') }}" >Answered</a></li> --}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-header">
|
||||
@yield('PageHeader')
|
||||
@yield('breadcrumbs')
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
|
||||
@yield('content')
|
||||
</section><!-- /.content -->
|
||||
<!-- /.content-wrapper -->
|
||||
</div>
|
||||
<footer class="main-footer">
|
||||
<div class="pull-right hidden-xs">
|
||||
<b>Version</b> {!! Config::get('app.version') !!}
|
||||
</div>
|
||||
<strong>Copyright © {!! date('Y') !!} <a href="{!! $company->website !!}">{!! $company->company_name !!}</a>.</strong> All rights reserved. Powered by <a href="http://www.faveohelpdesk.com/">Faveo</a>
|
||||
</footer>
|
||||
</div><!-- ./wrapper -->
|
||||
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
|
||||
<!-- Bootstrap 3.3.2 JS -->
|
||||
<script src="{{asset("lb-faveo/downloads/bootstrap.min.js")}}" type="text/javascript"></script>
|
||||
<!-- Slimscroll -->
|
||||
<script src="{{asset("lb-faveo/plugins/slimScroll/jquery.slimscroll.min.js")}}" type="text/javascript"></script>
|
||||
<!-- FastClick -->
|
||||
<script src="{{asset("lb-faveo/plugins/fastclick/fastclick.min.js")}}"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="{{asset("lb-faveo/dist/js/app.min.js")}}" type="text/javascript"></script>
|
||||
<!-- AdminLTE for demo purposes -->
|
||||
{{-- // <script src="{{asset("dist/js/demo.js")}}" type="text/javascript"></script> --}}
|
||||
<!-- iCheck -->
|
||||
<script src="{{asset("lb-faveo/plugins/iCheck/icheck.min.js")}}" type="text/javascript"></script>
|
||||
{{-- maskinput --}}
|
||||
<script src="js/jquery.maskedinput.min.js" type="text/javascript"></script>
|
||||
{{-- jquery ui --}}
|
||||
<script src="{{asset("lb-faveo/downloads/jquery.ui.js")}}" type="text/javascript"></script>
|
||||
<script src="{{asset("lb-faveo/plugins/datatables/dataTables.bootstrap.js")}}" type="text/javascript"></script>
|
||||
<script src="{{asset("lb-faveo/plugins/datatables/jquery.dataTables.js")}}" type="text/javascript"></script>
|
||||
<!-- Page Script -->
|
||||
<script>
|
||||
$(function() {
|
||||
//Enable iCheck plugin for checkboxes
|
||||
//iCheck for checkbox and radio inputs
|
||||
// $('input[type="checkbox"]').iCheck({
|
||||
// checkboxClass: 'icheckbox_flat-blue',
|
||||
// radioClass: 'iradio_flat-blue'
|
||||
// });
|
||||
|
||||
//Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function() {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
|
||||
//Handle starring for glyphicon and font awesome
|
||||
$(".mailbox-star").click(function(e) {
|
||||
e.preventDefault();
|
||||
//detect type
|
||||
var $this = $(this).find("a > i");
|
||||
var glyph = $this.hasClass("glyphicon");
|
||||
var fa = $this.hasClass("fa");
|
||||
|
||||
//Switch states
|
||||
if (glyph) {
|
||||
$this.toggleClass("glyphicon-star");
|
||||
$this.toggleClass("glyphicon-star-empty");
|
||||
}
|
||||
|
||||
if (fa) {
|
||||
$this.toggleClass("fa-star");
|
||||
$this.toggleClass("fa-star-o");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
// $(document).ready(function() {
|
||||
|
||||
// $("#content").Editor();
|
||||
|
||||
// });
|
||||
// </script>
|
||||
<!-- // <script src="../plugins/jQuery/jQuery-2.1.3.min.js"></script> -->
|
||||
<script src="{{asset("lb-faveo/dist/js/tabby.js")}}"></script>
|
||||
<!-- // <script src="{{asset("dist/js/editor.js")}}"></script> -->
|
||||
<!-- CK Editor -->
|
||||
<!-- // <script src="{{asset("//cdn.ckeditor.com/4.4.3/standard/ckeditor.js")}}"></script> -->
|
||||
<script src="{{asset("lb-faveo/downloads/CKEditor.js")}}"></script>
|
||||
<script src="{{asset("lb-faveo/plugins/filebrowser/plugin.js")}}"></script>
|
||||
<script src="{{asset("lb-faveo/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js")}}" type="text/javascript"></script>
|
||||
|
||||
|
||||
<script>
|
||||
// $(function () {
|
||||
// //Add text editor
|
||||
// $("textarea").wysihtml5();
|
||||
// });
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$.ajaxSetup({
|
||||
headers: { 'X-CSRF-Token' : $('meta[name=_token]').attr('content') }
|
||||
});
|
||||
</script>
|
||||
@yield('FooterInclude')
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user