update 1.0.8.0

Commits for version update
This commit is contained in:
Manish Verma
2016-10-17 12:02:27 +05:30
parent dec927987b
commit 76e85db070
9674 changed files with 495757 additions and 58922 deletions

View File

@@ -0,0 +1,427 @@
@extends('themes.default1.agent.layout.agent')
@section('Tickets')
class="active"
@stop
@section('ticket-bar')
active
@stop
@section('approvel')
class="active"
@stop
@section('PageHeader')
<h1>{{Lang::get('lang.approval_tickets')}}</h1>
@stop
@section('content')
<?php
$date_time_format = UTC::getDateTimeFormat();
if (Auth::user()->role == 'agent') {
$dept = App\Model\helpdesk\Agent\Department::where('id', '=', Auth::user()->primary_dpt)->first();
$tickets = App\Model\helpdesk\Ticket\Tickets::whereIn('status', array(1, 7))->where('dept_id', '=', $dept->id)->orderBy('id', 'DESC')->paginate(20);
} else {
$tickets = App\Model\helpdesk\Ticket\Tickets::whereIn('status', array(1, 7))->orderBy('id', 'DESC')->paginate(20);
}
?>
<!-- Main content -->
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{!! Lang::get('lang.inbox') !!} </h3> <small id="title_refresh">{!! $tickets->total() !!} {!! Lang::get('lang.tickets') !!}</small>
</div><!-- /.box-header -->
<div class="box-body ">
@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">&times;</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> {!! Lang::get('lang.alert') !!}! </b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
</div>
@endif
{!! Form::open(['id'=>'modalpopup', 'route'=>'select_all','method'=>'post']) !!}
<!--<div class="mailbox-controls">-->
<!-- Check all button -->
@if(Auth::user()->role == 'admin')
<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="submit btn btn-default text-orange btn-sm" id="delete" name="submit" value="{!! Lang::get('lang.delete') !!}">
<input type="submit" class="submit btn btn-default text-yellow btn-sm" id="close" name="submit" value="{!! Lang::get('lang.close') !!}">
<button type="button" class="btn btn-sm btn-default text-green" id="Edit_Ticket" data-toggle="modal" data-target="#MergeTickets"><i class="fa fa-code-fork"> </i> {!! Lang::get('lang.merge') !!}</button>
@endif
<!--</div>-->
<p><p/>
<div class="mailbox-messages" id="refresh">
<!--datatable-->
{!! Datatable::table()
->addColumn(
"",
Lang::get('lang.subject'),
Lang::get('lang.ticket_id'),
Lang::get('lang.priority'),
Lang::get('lang.from'),
Lang::get('lang.assigned_to'),
Lang::get('lang.last_activity'))
->setUrl(route('get.approval.ticket'))
->setOrder(array(6=>'desc'))
->setClass('table table-hover table-bordered table-striped')
->setCallbacks("fnCreatedRow", 'function( nRow, aData, iDataIndex ) {
var str = aData[3];
if(str.search("#000") == -1) {
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #F3F3F3"});
$("td", nRow).mouseenter(function(){
$("td", nRow).css({"background-color":"#DEDFE0", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
});
$("td", nRow).mouseleave(function(){
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd","border-right":"solid 0.5px #F3F3F3"});
});
} else {
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
$("td", nRow).mouseenter(function(){
$("td", nRow).css({"background-color":"#DEDFE0", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
});
$("td", nRow).mouseleave(function(){
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
});
}
}')
->render();!!}
<!-- /.datatable -->
</div><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div><!-- /.box-body -->
</div><!-- /. box -->
<!-- merge tickets modal -->
<div class="modal fade" id="MergeTickets">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" id="merge-close" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">{!! Lang::get('lang.merge-ticket') !!} </h4>
</div><!-- /.modal-header-->
<div class ="modal-body">
<div class="row">
<div class="col-md-4">
</div>
<div class="col-md-6" id="merge_loader" style="display:none;">
<img src="{{asset("lb-faveo/media/images/gifloader.gif")}}"><br/><br/><br/>
</div><!-- /.merge-loader -->
</div>
<div id="merge_body">
<div id="merge-body-alert">
<div class="row">
<div class="col-md-12">
<div id="merge-succ-alert" class="alert alert-success alert-dismissable" style="display:none;" >
<!--<button id="dismiss-merge" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>-->
<h4><i class="icon fa fa-check"></i>{!! Lang::get('lang.alert') !!}!</h4>
<div id="message-merge-succ"></div>
</div>
<div id="merge-err-alert" class="alert alert-danger alert-dismissable" style="display:none;">
<!--<button id="dismiss-merge2" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>-->
<h4><i class="icon fa fa-ban"></i>{!! Lang::get('lang.alert') !!}!</h4>
<div id="message-merge-err"></div>
</div>
</div>
</div>
</div><!-- /.merge-alert -->
<div id="merge-body-form">
<div class="row">
<div class="col-md-6">
{!! Form::open(['id'=>'merge-form','method' => 'PATCH'] )!!}
<label>{!! Lang::get('lang.title') !!}</label>
<input type="text" name='title' class="form-control" value="" placeholder="Optional" />
</div>
<div class="col-md-6">
<label>{!! Lang::get('lang.select-pparent-ticket') !!}</label>
<select class="form-control" id="select-merge-parent" name='p_id' data-placeholder="{!! Lang::get('lang.select_tickets') !!}" style="width: 100%;"><option value=""></option></select>
</div>
</div>
<div class="row">
<div class="col-md-8">
<label>{!! Lang::get('lang.merge-reason') !!}</label>
<textarea name="reason" class="form-control"></textarea>
</div>
</div>
</div><!-- mereg-body-form -->
</div><!-- merge-body -->
</div><!-- /.modal-body -->
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis2">{!! Lang::get('lang.close') !!}</button>
<input type="submit" id="merge-btn" class="btn btn-primary pull-right" value="{!! Lang::get('lang.merge') !!}"></input>
{!! Form::close() !!}
</div><!-- /.modal-footer -->
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- Modal -->
<div class="modal fade in" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none; padding-right: 15px;background-color: rgba(0, 0, 0, 0.7);">
<div class="modal-dialog" role="document">
<div class="col-md-2"></div>
<div class="col-md-8">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close closemodal" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel"></h4>
</div>
<div class="modal-body" id="custom-alert-body" >
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary pull-left yes" data-dismiss="modal">{{Lang::get('lang.ok')}}</button>
<button type="button" class="btn btn-default no">{{Lang::get('lang.cancel')}}</button>
</div>
</div>
</div>
</div>
</div>
<script>
var t_id = [];
var option = null;
$(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");
// alert($("input[type='checkbox']").val());
t_id = $('.selectval').map(function() {
return $(this).val();
}).get();
// alert(checkboxValues);
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
// alert('Hallo');
t_id = [];
}
$(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();
});
$(".select2").select2();
$('#delete').on('click', function() {
option = 0;
$('#myModalLabel').html("{{Lang::get('lang.delete-tickets')}}");
});
$('#close').on('click', function() {
option = 1;
$('#myModalLabel').html("{{Lang::get('lang.close-tickets')}}");
});
$("#modalpopup").on('submit', function(e) {
e.preventDefault();
var msg = "{{Lang::get('lang.confirm')}}";
var values = getValues();
if (values == "") {
msg = "{{Lang::get('lang.select-ticket')}}";
$('.yes').html("{{Lang::get('lang.ok')}}");
$('#myModalLabel').html("{{Lang::get('lang.alert')}}");
} else {
$('.yes').html("Yes");
}
$('#custom-alert-body').html(msg);
$("#myModal").css("display", "block");
});
$(".closemodal, .no").click(function() {
$("#myModal").css("display", "none");
});
$(".closemodal, .no").click(function() {
$("#myModal").css("display", "none");
});
$('.yes').click(function() {
var values = getValues();
if (values == "") {
$("#myModal").css("display", "none");
} else {
$("#myModal").css("display", "none");
$("#modalpopup").unbind('submit');
if (option == 0) {
//alert('delete');
$('#delete').click();
} else {
//alert('close');
$('#close').click();
}
}
});
function getValues() {
var values = $('.selectval:checked').map(function() {
return $(this).val();
}).get();
return values;
}
//checking merging tickets
$('#MergeTickets').on('show.bs.modal', function() {
// alert("hi");
$.ajax({
type: "GET",
url: "{{route('check.merge.tickets',0)}}",
dataType: "html",
data: {data1: t_id},
beforeSend: function() {
$("#merge_body").hide();
$("#merge_loader").show();
},
success: function(response) {
if (response == 0) {
$("#merge_body").show();
$("#merge-succ-alert").hide();
$("#merge-body-alert").show();
$("#merge-body-form").hide();
$("#merge_loader").hide();
$("#merge-btn").attr('disabled', true);
var message = "{{Lang::get('lang.select-tickets-to merge')}}";
$("#merge-err-alert").show();
$('#message-merge-err').html(message);
} else if (response == 2) {
$("#merge_body").show();
$("#merge-succ-alert").hide();
$("#merge-body-alert").show();
$("#merge-body-form").hide();
$("#merge_loader").hide();
$("#merge-btn").attr('disabled', true);
var message = "{{Lang::get('lang.different-users')}}";
$("#merge-err-alert").show();
$('#message-merge-err').html(message);
} else {
$("#merge_body").show();
$("#merge-body-alert").hide();
$("#merge-body-form").show();
$("#merge_loader").hide();
$("#merge-btn").attr('disabled', false);
$("#merge_loader").hide();
$.ajax({
url: "{{ route('get.merge.tickets',0) }}",
dataType: "html",
data: {data1: t_id},
success: function(data) {
$('#select-merge-parent').html(data);
}
// return false;
});
}
}
});
});
//submit merging form
$('#merge-form').on('submit', function() {
$.ajax({
type: "POST",
url: "{!! url('merge-tickets/') !!}/" + t_id,
dataType: "json",
data: $(this).serialize(),
beforeSend: function() {
$("#merge_body").hide();
$("#merge_loader").show();
},
success: function(response) {
if (response == 0) {
$("#merge_body").show();
$("#merge-succ-alert").hide();
$("#merge-body-alert").show();
$("#merge-body-form").hide();
$("#merge_loader").hide();
$("#merge-btn").attr('disabled', true);
var message = "{{Lang::get('lang.merge-error')}}";
$("#merge-err-alert").show();
$('#message-merge-err').html(message);
} else {
$("#merge_body").show();
$("#merge-err-alert").hide();
$("#merge-body-alert").show();
$("#merge-body-form").hide();
$("#merge_loader").hide();
$("#merge-btn").attr('disabled', true);
var message = "{{Lang::get('lang.merge-success')}}";
$("#merge-succ-alert").show();
$('#message-merge-succ').html(message);
setInterval(function() {
$("#alert11").hide();
setTimeout(function() {
var link = document.querySelector('#load-inbox');
if (link) {
link.click();
}
}, 100);
}, 1000);
}
}
})
return false;
});
});
function someFunction(id) {
if (document.getElementById(id).checked) {
t_id.push(id);
// alert(t_id);
} else if(document.getElementById(id).checked === undefined){
var index = t_id.indexOf(id);
if (index === -1){
t_id.push(id);
} else{
t_id.splice(index, 1);
}
} else {
var index = t_id.indexOf(id);
t_id.splice(index, 1);
// alert(t_id);
}
}
</script>
@stop

View File

@@ -82,18 +82,30 @@ class="active"
}
}
?>
<div class="col-md-3 col-sm-6 col-xs-12">
<a href="{!! route('inbox.ticket') !!}">
<div class="info-box">
<span class="info-box-icon bg-aqua"><i class="fa fa-envelope-o"></i></span>
<div class="info-box-content">
<span class="info-box-text">{!! Lang::get('lang.inbox') !!}</span>
<span class="info-box-number"><?php echo count($tickets); ?> <small> {!! Lang::get('lang.tickets') !!}</small></span>
</div><!-- /.info-box-content -->
</div><!-- /.info-box -->
</a>
</div><!-- /.col -->
<div class="col-md-3 col-sm-6 col-xs-12">
<?php
if (Auth::user()->role == 'admin' || Auth::user()->role == 'agent') {
$todaytickets = count(App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->whereRaw('date(duedate) = ?', [date('Y-m-d')])->get());
} else {
$dept = App\Model\helpdesk\Agent\Department::where('id', '=', Auth::user()->primary_dpt)->first();
$todaytickets = count(App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->whereRaw('date(duedate) = ?', [date('Y-m-d')])->where('dept_id', '=', $dept->id)->get());
}
?>
<div class="col-md-2" style="width:20%;">
<a href="{!! route('inbox.ticket') !!}">
<div class="info-box">
<span class="info-box-icon bg-aqua"><i class="fa fa-envelope-o"></i></span>
<div class="info-box-content">
<span class="info-box-text">{!! Lang::get('lang.inbox') !!}</span>
<span class="info-box-number"><?php echo count($tickets); ?> <small> {!! Lang::get('lang.tickets') !!}</small>
</div>
<!-- /.info-box-content -->
</div>
</a>
<!-- /.info-box -->
</div>
<!-- /.col -->
<div class="col-md-2" style="width:20%;">
<a href="{!! route('unassigned') !!}">
<div class="info-box">
<span class="info-box-icon bg-orange"><i class="fa fa-user-times"></i></span>
@@ -103,13 +115,12 @@ class="active"
</div><!-- /.info-box-content -->
</div><!-- /.info-box -->
</a>
</div><!-- /.col -->
<!-- /.info-box -->
</div>
<!-- /.col -->
<!-- fix for small devices only -->
<div class="clearfix visible-sm-block"></div>
<div class="col-md-3 col-sm-6 col-xs-12">
<a href="{!! route('overdue.ticket') !!}">
<div class="col-md-2" style="width:20%;" >
<a href="{!! route('overdue.ticket') !!}">
<div class="info-box">
<span class="info-box-icon bg-red"><i class="fa fa-calendar-times-o"></i></span>
<div class="info-box-content">
@@ -118,9 +129,10 @@ class="active"
</div><!-- /.info-box-content -->
</div><!-- /.info-box -->
</a>
</div><!-- /.col -->
<div class="col-md-3 col-sm-6 col-xs-12">
<a href="{!! route('myticket.ticket') !!}">
</div>
<div class="col-md-2" style="width:20%;">
<a href="{!! route('myticket.ticket') !!}">
<div class="info-box">
<span class="info-box-icon bg-yellow"><i class="fa fa-user"></i></span>
<div class="info-box-content">
@@ -129,7 +141,21 @@ class="active"
</div><!-- /.info-box-content -->
</div><!-- /.info-box -->
</a>
</div><!-- /.col -->
</div>
<!-- /.col -->
<div class="col-md-2" style="width:20%;">
<a href="{!! route('ticket.duetoday') !!}">
<div class="info-box">
<span class="info-box-icon bg-red"><i class="glyphicon glyphicon-eye-open"></i></span>
<div class="info-box-content">
<span class="info-box-text">{!! Lang::get('lang.duetoday') !!}</span>
<span class="info-box-number">{{ $todaytickets }} <small> Tickets</small></span>
</div><!-- /.info-box-content -->
</div><!-- /.info-box -->
</a>
<!-- /.info-box -->
</div>
<!-- /.col -->
</div>
<div class="box box-info">
@@ -141,7 +167,7 @@ class="active"
<div class="form-group">
<div class="row">
<div class='col-sm-2'>
{!! Form::label('date', 'Date:',['class' => 'lead']) !!}
{!! Form::label('date', 'Start Date:',['class' => 'lead']) !!}
{!! Form::text('start_date',null,['class'=>'form-control','id'=>'datepicker4'])!!}
</div>
<?php

View File

@@ -0,0 +1,427 @@
@extends('themes.default1.agent.layout.agent')
@section('Tickets')
class="active"
@stop
@section('ticket-bar')
active
@stop
@section('followup')
class="active"
@stop
@section('PageHeader')
<h1>{{Lang::get('lang.followup_tickets')}}</h1>
@stop
@section('content')
<?php
$date_time_format = UTC::getDateTimeFormat();
if (Auth::user()->role == 'agent') {
$dept = App\Model\helpdesk\Agent\Department::where('id', '=', Auth::user()->primary_dpt)->first();
$tickets = App\Model\helpdesk\Ticket\Tickets::where('follow_up','=','1')->where('dept_id', '=', $dept->id)->orderBy('id', 'DESC')->paginate(20);
} else {
$tickets = App\Model\helpdesk\Ticket\Tickets::where('follow_up','=','1')->orderBy('id', 'DESC')->paginate(20);
}
?>
<!-- Main content -->
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{!! Lang::get('lang.inbox') !!} </h3> <small id="title_refresh">{!! $tickets->total() !!} {!! Lang::get('lang.tickets') !!}</small>
</div><!-- /.box-header -->
<div class="box-body ">
@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">&times;</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> {!! Lang::get('lang.alert') !!}! </b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
</div>
@endif
{!! Form::open(['id'=>'modalpopup', 'route'=>'select_all','method'=>'post']) !!}
<!--<div class="mailbox-controls">-->
<!-- Check all button -->
@if(Auth::user()->role == 'admin')
<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="submit btn btn-default text-orange btn-sm" id="delete" name="submit" value="{!! Lang::get('lang.delete') !!}">
<input type="submit" class="submit btn btn-default text-yellow btn-sm" id="close" name="submit" value="{!! Lang::get('lang.close') !!}">
<button type="button" class="btn btn-sm btn-default text-green" id="Edit_Ticket" data-toggle="modal" data-target="#MergeTickets"><i class="fa fa-code-fork"> </i> {!! Lang::get('lang.merge') !!}</button>
@endif
<!--</div>-->
<p><p/>
<div class="mailbox-messages" id="refresh">
<!--datatable-->
{!! Datatable::table()
->addColumn(
"",
Lang::get('lang.subject'),
Lang::get('lang.ticket_id'),
Lang::get('lang.priority'),
Lang::get('lang.from'),
Lang::get('lang.assigned_to'),
Lang::get('lang.last_activity'))
->setUrl(route('get.followup.ticket'))
->setOrder(array(6=>'desc'))
->setClass('table table-hover table-bordered table-striped')
->setCallbacks("fnCreatedRow", 'function( nRow, aData, iDataIndex ) {
var str = aData[3];
if(str.search("#000") == -1) {
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #F3F3F3"});
$("td", nRow).mouseenter(function(){
$("td", nRow).css({"background-color":"#DEDFE0", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
});
$("td", nRow).mouseleave(function(){
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd","border-right":"solid 0.5px #F3F3F3"});
});
} else {
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
$("td", nRow).mouseenter(function(){
$("td", nRow).css({"background-color":"#DEDFE0", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
});
$("td", nRow).mouseleave(function(){
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
});
}
}')
->render();!!}
<!-- /.datatable -->
</div><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div><!-- /.box-body -->
</div><!-- /. box -->
<!-- merge tickets modal -->
<div class="modal fade" id="MergeTickets">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" id="merge-close" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">{!! Lang::get('lang.merge-ticket') !!} </h4>
</div><!-- /.modal-header-->
<div class ="modal-body">
<div class="row">
<div class="col-md-4">
</div>
<div class="col-md-6" id="merge_loader" style="display:none;">
<img src="{{asset("lb-faveo/media/images/gifloader.gif")}}"><br/><br/><br/>
</div><!-- /.merge-loader -->
</div>
<div id="merge_body">
<div id="merge-body-alert">
<div class="row">
<div class="col-md-12">
<div id="merge-succ-alert" class="alert alert-success alert-dismissable" style="display:none;" >
<!--<button id="dismiss-merge" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>-->
<h4><i class="icon fa fa-check"></i>{!! Lang::get('lang.alert') !!}!</h4>
<div id="message-merge-succ"></div>
</div>
<div id="merge-err-alert" class="alert alert-danger alert-dismissable" style="display:none;">
<!--<button id="dismiss-merge2" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>-->
<h4><i class="icon fa fa-ban"></i>{!! Lang::get('lang.alert') !!}!</h4>
<div id="message-merge-err"></div>
</div>
</div>
</div>
</div><!-- /.merge-alert -->
<div id="merge-body-form">
<div class="row">
<div class="col-md-6">
{!! Form::open(['id'=>'merge-form','method' => 'PATCH'] )!!}
<label>{!! Lang::get('lang.title') !!}</label>
<input type="text" name='title' class="form-control" value="" placeholder="Optional" />
</div>
<div class="col-md-6">
<label>{!! Lang::get('lang.select-pparent-ticket') !!}</label>
<select class="form-control" id="select-merge-parent" name='p_id' data-placeholder="{!! Lang::get('lang.select_tickets') !!}" style="width: 100%;"><option value=""></option></select>
</div>
</div>
<div class="row">
<div class="col-md-8">
<label>{!! Lang::get('lang.merge-reason') !!}</label>
<textarea name="reason" class="form-control"></textarea>
</div>
</div>
</div><!-- mereg-body-form -->
</div><!-- merge-body -->
</div><!-- /.modal-body -->
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis2">{!! Lang::get('lang.close') !!}</button>
<input type="submit" id="merge-btn" class="btn btn-primary pull-right" value="{!! Lang::get('lang.merge') !!}"></input>
{!! Form::close() !!}
</div><!-- /.modal-footer -->
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- Modal -->
<div class="modal fade in" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none; padding-right: 15px;background-color: rgba(0, 0, 0, 0.7);">
<div class="modal-dialog" role="document">
<div class="col-md-2"></div>
<div class="col-md-8">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close closemodal" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel"></h4>
</div>
<div class="modal-body" id="custom-alert-body" >
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary pull-left yes" data-dismiss="modal">{{Lang::get('lang.ok')}}</button>
<button type="button" class="btn btn-default no">{{Lang::get('lang.cancel')}}</button>
</div>
</div>
</div>
</div>
</div>
<script>
var t_id = [];
var option = null;
$(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");
// alert($("input[type='checkbox']").val());
t_id = $('.selectval').map(function() {
return $(this).val();
}).get();
// alert(checkboxValues);
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
// alert('Hallo');
t_id = [];
}
$(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();
});
$(".select2").select2();
$('#delete').on('click', function() {
option = 0;
$('#myModalLabel').html("{{Lang::get('lang.delete-tickets')}}");
});
$('#close').on('click', function() {
option = 1;
$('#myModalLabel').html("{{Lang::get('lang.close-tickets')}}");
});
$("#modalpopup").on('submit', function(e) {
e.preventDefault();
var msg = "{{Lang::get('lang.confirm')}}";
var values = getValues();
if (values == "") {
msg = "{{Lang::get('lang.select-ticket')}}";
$('.yes').html("{{Lang::get('lang.ok')}}");
$('#myModalLabel').html("{{Lang::get('lang.alert')}}");
} else {
$('.yes').html("Yes");
}
$('#custom-alert-body').html(msg);
$("#myModal").css("display", "block");
});
$(".closemodal, .no").click(function() {
$("#myModal").css("display", "none");
});
$(".closemodal, .no").click(function() {
$("#myModal").css("display", "none");
});
$('.yes').click(function() {
var values = getValues();
if (values == "") {
$("#myModal").css("display", "none");
} else {
$("#myModal").css("display", "none");
$("#modalpopup").unbind('submit');
if (option == 0) {
//alert('delete');
$('#delete').click();
} else {
//alert('close');
$('#close').click();
}
}
});
function getValues() {
var values = $('.selectval:checked').map(function() {
return $(this).val();
}).get();
return values;
}
//checking merging tickets
$('#MergeTickets').on('show.bs.modal', function() {
// alert("hi");
$.ajax({
type: "GET",
url: "{{route('check.merge.tickets',0)}}",
dataType: "html",
data: {data1: t_id},
beforeSend: function() {
$("#merge_body").hide();
$("#merge_loader").show();
},
success: function(response) {
if (response == 0) {
$("#merge_body").show();
$("#merge-succ-alert").hide();
$("#merge-body-alert").show();
$("#merge-body-form").hide();
$("#merge_loader").hide();
$("#merge-btn").attr('disabled', true);
var message = "{{Lang::get('lang.select-tickets-to merge')}}";
$("#merge-err-alert").show();
$('#message-merge-err').html(message);
} else if (response == 2) {
$("#merge_body").show();
$("#merge-succ-alert").hide();
$("#merge-body-alert").show();
$("#merge-body-form").hide();
$("#merge_loader").hide();
$("#merge-btn").attr('disabled', true);
var message = "{{Lang::get('lang.different-users')}}";
$("#merge-err-alert").show();
$('#message-merge-err').html(message);
} else {
$("#merge_body").show();
$("#merge-body-alert").hide();
$("#merge-body-form").show();
$("#merge_loader").hide();
$("#merge-btn").attr('disabled', false);
$("#merge_loader").hide();
$.ajax({
url: "{{ route('get.merge.tickets',0) }}",
dataType: "html",
data: {data1: t_id},
success: function(data) {
$('#select-merge-parent').html(data);
}
// return false;
});
}
}
});
});
//submit merging form
$('#merge-form').on('submit', function() {
$.ajax({
type: "POST",
url: "{!! url('merge-tickets/') !!}/" + t_id,
dataType: "json",
data: $(this).serialize(),
beforeSend: function() {
$("#merge_body").hide();
$("#merge_loader").show();
},
success: function(response) {
if (response == 0) {
$("#merge_body").show();
$("#merge-succ-alert").hide();
$("#merge-body-alert").show();
$("#merge-body-form").hide();
$("#merge_loader").hide();
$("#merge-btn").attr('disabled', true);
var message = "{{Lang::get('lang.merge-error')}}";
$("#merge-err-alert").show();
$('#message-merge-err').html(message);
} else {
$("#merge_body").show();
$("#merge-err-alert").hide();
$("#merge-body-alert").show();
$("#merge-body-form").hide();
$("#merge_loader").hide();
$("#merge-btn").attr('disabled', true);
var message = "{{Lang::get('lang.merge-success')}}";
$("#merge-succ-alert").show();
$('#message-merge-succ').html(message);
setInterval(function() {
$("#alert11").hide();
setTimeout(function() {
var link = document.querySelector('#load-inbox');
if (link) {
link.click();
}
}, 100);
}, 1000);
}
}
})
return false;
});
});
function someFunction(id) {
if (document.getElementById(id).checked) {
t_id.push(id);
// alert(t_id);
} else if(document.getElementById(id).checked === undefined){
var index = t_id.indexOf(id);
if (index === -1){
t_id.push(id);
} else{
t_id.splice(index, 1);
}
} else {
var index = t_id.indexOf(id);
t_id.splice(index, 1);
// alert(t_id);
}
}
</script>
@stop

View File

@@ -49,14 +49,14 @@ class="active"
<div class="box-footer no-padding">
<ul class="nav nav-stacked">
@if($orgs->phone)<li><a>
<b>{!! Lang::get('lang.phone') !!}</b>
<span class="pull-right"> {{$orgs->phone}}</span></a></li>@endif
<b>{!! Lang::get('lang.phone') !!}</b>
<span class="pull-right"> {{$orgs->phone}}</span></a></li>@endif
@if($orgs->address)<li><a>
<b>{!! Lang::get('lang.address') !!}</b>
<br/> <center>{!! $orgs->address !!}</center></a></li>@endif
<b>{!! Lang::get('lang.address') !!}</b>
<br/> <center>{!! $orgs->address !!}</center></a></li>@endif
@if($orgs->internal_notes)<li><a>
<b>{!! Lang::get('lang.internal_notes') !!}</b>
<br/> <center>{!! $orgs->internal_notes !!}</center></a></li>@endif
<b>{!! Lang::get('lang.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">{!! Lang::get('lang.select_organization_manager') !!}</button>
</div>
@@ -130,9 +130,13 @@ class="active"
foreach ($user_orga_relations as $user_orga_relation) {
$user_orga_relation_id[] = $user_orga_relation->user_id;
}
// dd($user_orga_relation_id);
// $models = \App\Model\helpdesk\Ticket\Tickets::whereIn('user_id', $user_orga_relation_id)->get();
$open = count(\App\Model\helpdesk\Ticket\Tickets::whereIn('user_id', $user_orga_relation_id)->where('status', '=', '1')->get());
$counted = count(\App\Model\helpdesk\Ticket\Tickets::whereIn('user_id', $user_orga_relation_id)->where('status', '=', '2')->get());
$deleted = count(\App\Model\helpdesk\Ticket\Tickets::whereIn('user_id', $user_orga_relation_id)->where('status', '=', '5')->get());
// dd($open);
?>
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">

View File

@@ -0,0 +1,689 @@
@extends('themes.default1.agent.layout.agent')
@section('sidebar')
<li class="header">{!! Lang::get('lang.Report') !!}</li>
<li>
<a href="">
<i class="fa fa-area-chart"></i> <span>{!! Lang::get('lang.help_topic') !!}</span> <small class="label pull-right bg-green"></small>
</a>
</li>
<li>
</li>
@stop
@section('Report')
class="active"
@stop
@section('dashboard-bar')
active
@stop
@section('PageHeader')
<h1>{!! Lang::get('lang.report') !!}</h1>
@stop
@section('dashboard')
class="active"
@stop
@section('content')
<!-- 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">&times;</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>{!! Lang::get('lang.alert') !!}!</b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
</div>
@endif
<link type="text/css" href="{{asset("lb-faveo/css/bootstrap-datetimepicker4.7.14.min.css")}}" rel="stylesheet">
{{-- <script src="{{asset("lb-faveo/dist/js/bootstrap-datetimepicker4.7.14.min.js")}}" type="text/javascript"></script> --}}
<div class="box box-info">
<div class="box-header with-border">
<h3 class="box-title">{!! Lang::get('lang.help_topic') !!}</h3>
</div>
<div class="box-body">
<form id="foo">
<input type="hidden" name="duration" value="" id="duration">
<input type="hidden" name="default" value="false" id="default">
<div class="form-group">
<div class="row">
<div class='col-sm-2'>
{!! Form::label('helptopic', Lang::get('lang.help_topic')) !!}
<select name="help_topic" id="help_topic" class="form-control">
<?php $helptopics = App\Model\helpdesk\Manage\Help_topic::where('status', '=', '1')->get([ 'id', 'topic']); ?>
@foreach($helptopics as $helptopic)
<option value="{!! $helptopic->id !!}">{!! $helptopic->topic !!}</option>
@endforeach
</select>
</div>
<div class='col-sm-2 form-group' id="start_date">
{!! Form::label('date', Lang::get('lang.start_date').':') !!}
{!! Form::text('start_date',null,['class'=>'form-control','id'=>'datepicker4'])!!}
</div>
<?php
$start_date = App\Model\helpdesk\Ticket\Tickets::where('id', '=', '1')->first();
if ($start_date != null) {
$created_date = $start_date->created_at;
$created_date = explode(' ', $created_date);
$created_date = $created_date[0];
$start_date = date("m/d/Y", strtotime($created_date . ' -1 months'));
} else {
$start_date = date("m/d/Y", strtotime(date("m/d/Y") . ' -1 months'));
}
?>
<script type="text/javascript">
$(function() {
var timestring1 = "{!! $start_date !!}";
var timestring2 = "{!! date('m/d/Y') !!}";
$('#datepicker4').datetimepicker({
format: 'DD/MM/YYYY',
minDate: moment(timestring1).startOf('day'),
maxDate: moment(timestring2).startOf('day')
});
});
</script>
<div class='col-sm-2 form-group' id="end_date">
{!! Form::label('start_time', Lang::get('lang.end_date').':') !!}
{!! Form::text('end_date',null,['class'=>'form-control','id'=>'datetimepicker3'])!!}
</div>
<script type="text/javascript">
$(function() {
var timestring1 = "{!! $start_date !!}";
var timestring2 = "{!! date('m/d/Y') !!}";
$('#datetimepicker3').datetimepicker({
format: 'DD/MM/YYYY',
minDate: moment(timestring1).startOf('day'),
maxDate: moment(timestring2).startOf('day')
});
});
</script>
<div class='col-sm-1' style="padding-right:0px;padding-left:0px">
<label>{!! Lang::get('lang.status') !!}</label>
<div class="btn-group">
<button type="button" class="btn btn-default">{!! Lang::get('lang.select') !!}</button>
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a href="#" id="stop"><input type="checkbox" name="open" id="open"> {!! lang::get('lang.created') !!} {!! lang::get('lang.tickets') !!}</a></li>
<li><a href="#" id="stop"><input type="checkbox" name="closed" id="closed"> {!! lang::get('lang.closed') !!} {!! lang::get('lang.tickets') !!}</a></li>
<li><a href="#" id="stop"><input type="checkbox" name="reopened" id="reopened"> {!! Lang::get('lang.reopened') !!} {!! lang::get('lang.tickets') !!}</a></li>
</ul>
</div>
</div>
<div class='col-sm-1'>
{!! Form::label('filter', 'Filter:') !!}<br>
<input type="submit" class="btn btn-primary" value="Submit" id="submit">
</div>
<br/>
<div class="col-md-4">
<div class="btn-group">
<button type="button" class="btn btn-default">{!! Lang::get('lang.generate') !!}</button>
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a href="#" id="pdf">{!! Lang::get('lang.generate_pdf') !!}</a></li>
</ul>
</div>
<div class="pull-right">
<div class="btn-group">
<button type="button" class="btn btn-default" id="click_day">Day</button>
<button type="button" class="btn btn-default" id="click_week">Week</button>
<button type="button" class="btn btn-default" id="click_month">Month</button>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-1" style="margin-bottom:0px;">
<label>{!! Lang::get('lang.Legend') !!}:</label>
</div>
<style>
#legend-holder { float: left; width: 32px; height: 16px;}
</style>
<div class="col-md-2"><span id="legend-holder" style="background-color: #6C96DF;"></span>&nbsp; <span> <span id="total-created-tickets1" ></span> {!! Lang::get('lang.tickets') !!} {!! Lang::get('lang.created') !!}</span></div>
<div class="col-md-2"><span id="legend-holder" style="background-color: #6DC5B2;"></span>&nbsp; <span> <span id="total-reopen-tickets1"></span> {!! Lang::get('lang.tickets') !!} {!! Lang::get('lang.reopen') !!}</span></div>
<div class="col-md-2"><span id="legend-holder" style="background-color: #E3B870;"></span>&nbsp; <span> <span id="total-closed-tickets1"></span> {!! Lang::get('lang.tickets') !!} {!! Lang::get('lang.closed') !!}</span></div>
</div>
</div>
</form>
<!--<div id="legendDiv"></div>-->
<div class="chart">
<canvas class="chart-data" id="tickets-graph" width="1000" height="250"></canvas>
</div>
</div><!-- /.box-body -->
<div class="box-footer">
<div class="row">
<div class="col-sm-3 col-xs-6">
<div class="description-block border-right">
<h3><span class="description-percentage text-yellow" ><i class="fa fa-file-text-o"> </i> <small class="text-yellow"><i class="fa fa-random"> </i></small> <span id="total-inprogress-tickets"> </span> </span></h3>
<span class="">{!! Lang::get('lang.Currnet_In_Progress') !!}</span>
</div>
<!-- /.description-block -->
</div>
<!-- /.col -->
<div class="col-sm-3 col-xs-6">
<div class="description-block border-right">
<h3><span class="description-percentage text-blue" ><i class="fa fa-file-text-o"> </i> + <span id="total-created-tickets"> </span> </span></h3>
<span class="">{!! Lang::get('lang.Total_Created') !!}</span>
</div>
<!-- /.description-block -->
</div>
<!-- /.col -->
<div class="col-sm-3 col-xs-6">
<div class="description-block border-right">
<h3><span class="description-percentage text-yellow" ><i class="fa fa-file-text-o"></i> <small class="text-yellow"><i class="fa fa-refresh"> </i></small> <span id="total-reopen-tickets"> </span> </span></h3>
<span class="">{!! Lang::get('lang.Total_Reopened') !!}</span>
</div>
<!-- /.description-block -->
</div>
<!-- /.col -->
<div class="col-sm-3 col-xs-6">
<div class="description-block">
<h3><span class="description-percentage text-green" ><i class="fa fa-file-text-o"> </i> <small class="text-green"><i class="fa fa-times"> </i></small> <span id="total-closed-tickets"> </span> </span></h3>
<span class="">{!! Lang::get('lang.Total_Closed') !!}</span>
</div>
<!-- /.description-block -->
</div>
<!-- /.col -->
</div>
</div>
</div><!-- /.box -->
<div class="box box-info">
<div class="box-header with-border">
<h3 class="box-title">Tabular</h3>
</div>
<div class="box-body">
<table class="table table-bordered" id="tabular">
</table>
</div>
</div>
<form action="{!! route('help.topic.pdf') !!}" method="POST" id="form_pdf">
<input type="hidden" name="pdf_form" value="" id="pdf_form">
<input type="hidden" name="pdf_form_help_topic" value="" id="pdf_form_help_topic">
<input type="submit" style="display:none;">
</form>
<div id="refresh">
<script src="{{asset("lb-faveo/plugins/chartjs/Chart.min.js")}}" type="text/javascript"></script>
</div>
<script src="{{asset("lb-faveo/plugins/chartjs/Chart.min.js")}}" type="text/javascript"></script>
<script type="text/javascript">
var result1a;
// var help_topic_global;
$(document).ready(function() {
$.getJSON("help-topic-report", function(result) {
var labels = [], open = [], closed = [], reopened = [], open_total = 0, closed_total = 0, reopened_total = 0;
//,data2=[],data3=[],data4=[];+
var tableRef = document.getElementById('tabular');
while (tableRef.rows.length > 0)
{
tableRef.deleteRow(0);
}
var header = tableRef.createTHead();
var row = header.insertRow(0);
var body = tableRef.createTBody();
window.result1a = result;
// window.help_topic_global = document.getElementById('help_topic');
for (var i = 0; i < result.length; i++) {
var row1 = body.insertRow(0);
// if(i % 4 === 0) {
labels.push(result[i].date);
// } else {
// labels.push("");
// }
open.push(result[i].open);
if (i == 1) {
var cell = row.insertCell(0);
cell.innerHTML = "<b>{!! Lang::get('lang.reopened') !!}</b>";
var cell = row.insertCell(0);
cell.innerHTML = "<b>{!! Lang::get('lang.closed') !!}</b>";
var cell = row.insertCell(0);
cell.innerHTML = "<b>{!! Lang::get('lang.created') !!}</b>";
var cell = row.insertCell(0);
cell.innerHTML = "<b>{!! Lang::get('lang.date') !!}</b>";
}
var cell1 = row1.insertCell(0);
cell1.innerHTML = "<b>" + result[i].reopened + "</b>";
var cell1 = row1.insertCell(0);
cell1.innerHTML = "<b>" + result[i].closed + "</b>";
var cell1 = row1.insertCell(0);
cell1.innerHTML = "<b>" + result[i].open + "</b>";
var cell1 = row1.insertCell(0);
cell1.innerHTML = "<b>" + result[i].date + "</b>";
closed.push(result[i].closed);
reopened.push(result[i].reopened);
// data4.push(result[i].open);
open_total += parseInt(result[i].open);
closed_total += parseInt(result[i].closed);
reopened_total += parseInt(result[i].reopened);
$inprog = result[i].inprogress;
}
var buyerData = {
labels: labels,
datasets: [
{
label: "Open Tickets",
fillColor: "rgba(93, 189, 255, 0.05)",
strokeColor: "rgba(2, 69, 195, 0.9)",
pointColor: "rgba(2, 69, 195, 0.9)",
pointStrokeColor: "#c1c7d1",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(220,220,220,1)",
data: open
}, {
label: "Closed Tickets",
fillColor: "rgba(255, 206, 96, 0.08)",
strokeColor: "rgba(221, 129, 0, 0.94)",
pointColor: "rgba(221, 129, 0, 0.94)",
pointStrokeColor: "rgba(60,141,188,1)",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(60,141,188,1)",
data: closed
}, {
label: "Reopened Tickets",
fillColor: "rgba(104, 255, 220, 0.06)",
strokeColor: "rgba(0, 149, 115, 0.94)",
pointColor: "rgba(0, 149, 115, 0.94)",
pointStrokeColor: "rgba(60,141,188,1)",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(60,141,188,1)",
data: reopened
}
]
};
$("#total-created-tickets").html(open_total);
$("#total-reopen-tickets").html(reopened_total);
$("#total-closed-tickets").html(closed_total);
$("#total-inprogress-tickets").html($inprog);
var myLineChart = new Chart(document.getElementById("tickets-graph").getContext("2d")).Line(buyerData, {
showScale: true,
//Boolean - Whether grid lines are shown across the chart
scaleShowGridLines: true,
//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: true,
//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: 1,
//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: 10,
//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: true,
//Boolean - whether to make the chart responsive to window resizing
responsive: true
});
// document.getElementById("legendDiv").innerHTML = myLineChart.generateLegend();
});
$('#click_day').click(function() {
$('#click_week').removeClass('btn-primary');
$('#click_week').addClass('btn-default');
$('#click_month').removeClass('btn-primary');
$('#click_month').addClass('btn-default');
$('#click_day').removeClass('btn-default');
$('#click_day').addClass('btn-primary');
$("#duration").val("day");
document.getElementById("open").checked = false;
document.getElementById("closed").checked = false;
document.getElementById("reopened").checked = false;
$('#foo').submit();
});
$('#click_week').click(function() {
$('#click_day').removeClass('btn-primary');
$('#click_day').addClass('btn-default');
$('#click_month').removeClass('btn-primary');
$('#click_month').addClass('btn-default');
$('#click_week').removeClass('btn-default');
$('#click_week').addClass('btn-primary');
$("#duration").val("week");
document.getElementById("open").checked = false;
document.getElementById("closed").checked = false;
document.getElementById("reopened").checked = false;
$('#foo').submit();
});
$('#click_month').click(function() {
$('#click_week').removeClass('btn-primary');
$('#click_week').addClass('btn-default');
$('#click_day').removeClass('btn-primary');
$('#click_day').addClass('btn-default');
$('#click_month').removeClass('btn-default');
$('#click_month').addClass('btn-primary');
$("#duration").val("month");
document.getElementById("open").checked = false;
document.getElementById("closed").checked = false;
document.getElementById("reopened").checked = false;
$('#foo').submit();
});
$('#submit').click(function() {
$('#click_week').removeClass('btn-primary');
$('#click_week').addClass('btn-default');
$('#click_day').removeClass('btn-primary');
$('#click_day').addClass('btn-default');
$('#click_month').removeClass('btn-primary');
$('#click_month').addClass('btn-default');
$("#duration").val('');
});
$('#foo').submit(function(event) {
// get the form data
// there are many ways to get this data using jQuery (you can use the class or id also)
var date1 = $('#datepicker4').val();
var date2 = $('#datetimepicker3').val();
var help_topic = $('#help_topic').val();
var duration = $('#duration').val();
if (!duration) {
if (!date1) {
$('#start_date').addClass("has-error");
} else {
$('#start_date').removeClass("has-error");
}
if (!date2) {
$('#end_date').addClass("has-error");
} else {
$('#end_date').removeClass("has-error");
}
if (!date1 || !date2) {
return false;
}
var formData = date1.split("/").join('-');
var dateData = date2.split("/").join('-');
} else {
var formData = null;
var dateData = null;
$('#datepicker4').val('');
$('#datetimepicker3').val('');
}
var data = $('#foo').serialize();
// process the form
$.ajax({
type: 'POST', // define the type of HTTP verb we want to use (POST for our form)
url: 'help-topic-report/' + dateData + '/' + formData + '/' + help_topic, // the url where we want to POST
dataType: 'json', // what type of data do we expect back from the server
data: data, // our data object
success: function(result2) {
window.result1a = result2;
var tableRef = document.getElementById('tabular');
while (tableRef.rows.length > 0)
{
tableRef.deleteRow(0);
}
var labels = [], open = [], closed = [], reopened = [], open_total = 0, closed_total = 0, reopened_total = 0;
var header = tableRef.createTHead();
var row = header.insertRow(0);
var body = tableRef.createTBody();
for (var i = 0; i < result2.length; i++) {
labels.push(result2[i].date);
var date123 = result2[i].date;
var row1 = body.insertRow(0);
if (result2[i].reopened) {
reopened.push(result2[i].reopened);
reopened_total += parseInt(result2[i].reopened);
if (i == 1) {
var cell = row.insertCell(0);
cell.innerHTML = "<b>{!! Lang::get('lang.reopened') !!}</b>";
}
var cell1 = row1.insertCell(0);
cell1.innerHTML = "<b>" + result2[i].reopened + "</b>";
} else {
reopened.push("");
reopened_total += 0;
}
if (result2[i].closed) {
closed.push(result2[i].closed);
closed_total += parseInt(result2[i].closed);
if (i == 1) {
var cell = row.insertCell(0);
cell.innerHTML = "<b>{!! Lang::get('lang.closed') !!}</b>";
}
var cell1 = row1.insertCell(0);
cell1.innerHTML = "<b>" + result2[i].closed + "</b>";
} else {
closed.push("");
closed_total += 0;
}
if (result2[i].open) {
open.push(result2[i].open);
open_total += parseInt(result2[i].open);
if (i == 1) {
var cell = row.insertCell(0);
cell.innerHTML = "<b>{!! Lang::get('lang.created') !!}</b>";
}
var cell1 = row1.insertCell(0);
cell1.innerHTML = "<b>" + result2[i].open + "</b>";
} else {
open.push("");
open_total += 0;
}
if (i == 1) {
var cell = row.insertCell(0);
cell.innerHTML = "<b>{!! Lang::get('lang.date') !!}</b>";
}
var cell1 = row1.insertCell(0);
cell1.innerHTML = "<b>" + result2[i].date + "</b>";
$inprog = result2[i].inprogress;
}
$("#head123").html("</tr>");
var buyerData = {
labels: labels,
datasets: [
{
label: "Open Tickets",
fillColor: "rgba(93, 189, 255, 0.05)",
strokeColor: "rgba(2, 69, 195, 0.9)",
pointColor: "rgba(2, 69, 195, 0.9)",
pointStrokeColor: "#c1c7d1",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(220,220,220,1)",
data: open
}
, {
label: "Closed Tickets",
fillColor: "rgba(255, 206, 96, 0.08)",
strokeColor: "rgba(221, 129, 0, 0.94)",
pointColor: "rgba(221, 129, 0, 0.94)",
pointStrokeColor: "rgba(60,141,188,1)",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(60,141,188,1)",
data: closed
}
, {
label: "Reopened Tickets",
fillColor: "rgba(104, 255, 220, 0.06)",
strokeColor: "rgba(0, 149, 115, 0.94)",
pointColor: "rgba(0, 149, 115, 0.94)",
pointStrokeColor: "rgba(60,141,188,1)",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(60,141,188,1)",
data: reopened
}
]
};
$("#total-created-tickets").html(open_total);
$("#total-reopen-tickets").html(reopened_total);
$("#total-closed-tickets").html(closed_total);
$("#total-inprogress-tickets").html($inprog);
var myLineChart = new Chart(document.getElementById("tickets-graph").getContext("2d")).Line(buyerData, {
showScale: true,
//Boolean - Whether grid lines are shown across the chart
scaleShowGridLines: true,
//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: false,
//Boolean - Whether to show vertical lines (except Y axis)
scaleShowVerticalLines: false,
//Boolean - Whether the line is curved between points
bezierCurve: true,
//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: 1,
//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: 10,
//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: true,
//Boolean - whether to make the chart responsive to window resizing
responsive: true
});
myLineChart.options.responsive = false;
$("#tickets-graph").remove();
$(".chart").html("<canvas id='tickets-graph' width='1000' height='250'></canvas>");
var myLineChart1 = new Chart(document.getElementById("tickets-graph").getContext("2d")).Line(buyerData, {
showScale: true,
//Boolean - Whether grid lines are shown across the chart
scaleShowGridLines: true,
//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: false,
//Boolean - Whether the line is curved between points
bezierCurve: true,
//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: 1,
//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: 10,
//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: true,
//Boolean - whether to make the chart responsive to window resizing
responsive: true
});
// document.getElementById("legendDiv").innerHTML = myLineChart1.generateLegend();
}
});
// using the done promise callback
// stop the form from submitting the normal way and refreshing the page
event.preventDefault();
});
$("#pdf").on('click', function(){
document.getElementById("pdf_form").value = JSON.stringify(result1a);
document.getElementById("pdf_form_help_topic").value = $('#help_topic :selected').val();
document.getElementById("form_pdf").submit();
// $("#form_pdf").submit(function(){
// alert('saasdas');
// });
});
});
</script>
<script>
$(function () {
// $("#tabular").DataTable();
$('#tabular').DataTable({
"paging": true,
"lengthChange": false,
"searching": false,
"ordering": true,
"info": true,
"autoWidth": false
});
});
</script>
<script type="text/javascript">
jQuery(document).ready(function() {
// Close a ticket
$('#close').on('click', function(e) {
$.ajax({
type: "GET",
url: "agen",
beforeSend: function() {
},
success: function(response) {
}
})
return false;
});
});
</script>
<script src="{{asset("lb-faveo/plugins/moment-develop/moment.js")}}" type="text/javascript"></script>
<script src="{{asset("lb-faveo/js/bootstrap-datetimepicker4.7.14.min.js")}}" type="text/javascript"></script>
@stop

View File

@@ -0,0 +1,117 @@
<!DOCTYPE html>
<html>
<head>
<title>PDF</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<style type="text/css">
* {
font-family: "DejaVu Sans Mono", monospace;
}
</style>
<link href="{{asset("lb-faveo/css/bootstrap.min.css")}}" rel="stylesheet" type="text/css" />
</head>
<body>
<div style="background-color:#F2F2F2;">
<h2>
<div id="logo" class="site-logo text-center" style="font-size: 30px;">
<?php
$company = App\Model\helpdesk\Settings\Company::where('id', '=', '1')->first();
$system = App\Model\helpdesk\Settings\System::where('id', '=', '1')->first();
?>
<center>
@if($system->url)
<a href="{!! $system->url !!}" rel="home">
@else
<a href="{{url('/')}}" rel="home" style="text-decoration:none;">
@endif
@if($company->use_logo == 1)
<img src="{!! public_path().'/uploads/company'.'/'.$company->logo !!}" width="100px;"/>
@else
@if($system->name)
{!! $system->name !!}
@else
<b>SUPPORT</b> CENTER
@endif
@endif
</a>
</center>
</div>
</h2>
</div>
<br/><br/>
<?php $help_topic_name = App\Model\helpdesk\Manage\Help_topic::where('id', '=', $table_help_topic)->first(); ?>
<span class="lead"> Help Topic : {!! $help_topic_name->topic !!} </span>
<br/>
Date Range : {!! reset($table_datas[0]) !!} --- {!! end($table_datas)->date !!}
<br/><br/>
<span class="lead">SUMMARY</span>
<table class="table table-striped" style="font-size:8;">
<thead>
<tr>
<td>Date</td>
@if(array_key_exists('open', $table_datas[1]))
<td>Created</td>
@endif
@if(array_key_exists('closed', $table_datas[1]))
<td>Closed</td>
@endif
@if(array_key_exists('reopened', $table_datas[1]))
<td>Reopened</td>
@endif
</tr>
</thead>
<tbody>
<?php
//dd($table_datas[1]);
$table_open = '';
$table_closed = '';
$table_reopened = '';
foreach ($table_datas as $table_data) {
echo '<tr>';
echo '<td>' . $table_data->date . '</td>';
if (array_key_exists('open', $table_data)) {
echo '<td>' . $table_data->open . '</td>';
$table_open += $table_data->open;
}
if (array_key_exists('closed', $table_data)) {
echo '<td>' . $table_data->closed . '</td>';
$table_closed += $table_data->closed;
}
if (array_key_exists('reopened', $table_data)) {
echo '<td>' . $table_data->reopened . '</td>';
$table_reopened += $table_data->reopened;
}
echo '</tr>';
}
?>
</tbody>
</table>
<table>
<tr>
<td>
<span style="color:#F7CF07;">TOTAL IN PROGRESS</span> : {!! $table_datas[1]->inprogress !!}
</td>
<td>
@if(array_key_exists('open', $table_data))
<span style="color:blue;">TOTAL CREATED</span> : {!! $table_open !!}
@endif
</td>
<td>
@if(array_key_exists('reopened', $table_data))
<span style="color:orange;">TOTAL REOPENED</span> : {!! $table_reopened !!}
@endif
</td>
<td>
@if(array_key_exists('closed', $table_data))
<span style="color:#00e765;">TOTAL CLOSED</span> : {!! $table_closed !!}
@endif
</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,421 @@
@extends('themes.default1.agent.layout.agent')
@section('Tickets')
class="active"
@stop
@section('ticket-bar')
active
@stop
@section('open')
class="active"
@stop
@section('PageHeader')
<h1>{{Lang::get('lang.today-due_tickets')}}</h1>
@stop
@section('content')
<?php
if (Auth::user()->role == 'admin' || user()->role == 'agent') {
$todaytickets = count(App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->whereRaw('date(duedate) = ?', [date('Y-m-d')])->get());
} else {
$dept = App\Model\helpdesk\Agent\Department::where('id', '=', Auth::user()->primary_dpt)->first();
$todaytickets = count(App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->whereRaw('date(duedate) = ?', [date('Y-m-d')])->where('dept_id', '=', $dept->id)->get());
}
?>
<!-- //no need -->
<?php
$date_time_format = UTC::getDateTimeFormat();
if (Auth::user()->role == 'agent') {
$dept = App\Model\helpdesk\Agent\Department::where('id', '=', Auth::user()->primary_dpt)->first();
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('isanswered', '=', 0)->where('dept_id', '=', $dept->id)->orderBy('id', 'DESC')->paginate(20);
} else {
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('isanswered', '=', 0)->orderBy('id', 'DESC')->paginate(20);
}
?>
<!-- Main content -->
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{!! Lang::get('lang.open') !!} </h3> <small id="title_refresh">{!! $todaytickets !!} {!! Lang::get('lang.tickets') !!}</small>
<div class="box-tools pull-right">
<div class="has-feedback">
</div>
</div>
</div><!-- /.box-header -->
<div class="box-body">
@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">&times;</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> Fail! </b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
</div>
@endif
{!! Form::open(['id'=>'modalpopup', '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>
<input type="submit" class="submit btn btn-default text-orange btn-sm" id="delete" name="submit" value="{!! Lang::get('lang.delete') !!}">
<input type="submit" class="submit btn btn-default text-yellow btn-sm" id="close" name="submit" value="{!! Lang::get('lang.close') !!}">
<button type="button" class="btn btn-sm btn-default text-green" id="Edit_Ticket" data-toggle="modal" data-target="#MergeTickets"><i class="fa fa-code-fork"> </i> {!! Lang::get('lang.merge') !!}</button>
<!--</div>-->
<p><p/>
<div class="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>{!! Lang::get('lang.loading') !!}...</b></p>
<!-- table -->
{!! Datatable::table()
->addColumn(
"",
Lang::get('lang.subject'),
Lang::get('lang.ticket_id'),
Lang::get('lang.priority'),
Lang::get('lang.from'),
Lang::get('lang.assigned_to'),
Lang::get('lang.last_activity'))
->setUrl(route('ticket.post.duetoday'))
->setOrder(array(6=>'desc'))
->setClass('table table-hover table-bordered table-striped')
->setCallbacks("fnRowCallback",'function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
var str = aData[3];
if(str.search("#000") == -1) {
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #F3F3F3"});
$("td", nRow).mouseenter(function(){
$("td", nRow).css({"background-color":"#DEDFE0", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
});
$("td", nRow).mouseleave(function(){
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd","border-right":"solid 0.5px #F3F3F3"});
});
} else {
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
$("td", nRow).mouseenter(function(){
$("td", nRow).css({"background-color":"#DEDFE0", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
});
$("td", nRow).mouseleave(function(){
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
});
}
}')
->render();!!}
</div><!-- /.mail-box-messages -->
{!! Form::close() !!}
</div><!-- /.box-body -->
</div><!-- /. box -->
<!-- merge tickets modal -->
<div class="modal fade" id="MergeTickets">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" id="merge-close" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">{!! Lang::get('lang.merge-ticket') !!} </h4>
</div><!-- /.modal-header-->
<div class ="modal-body">
<div class="row">
<div class="col-md-4">
</div>
<div class="col-md-6" id="merge_loader" style="display:none;">
<img src="{{asset("lb-faveo/media/images/gifloader.gif")}}"><br/><br/><br/>
</div><!-- /.merge-loader -->
</div>
<div id="merge_body">
<div id="merge-body-alert">
<div class="row">
<div class="col-md-12">
<div id="merge-succ-alert" class="alert alert-success alert-dismissable" style="display:none;" >
<!--<button id="dismiss-merge" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>-->
<h4><i class="icon fa fa-check"></i>{!! Lang::get('lang.alert') !!}!</h4>
<div id="message-merge-succ"></div>
</div>
<div id="merge-err-alert" class="alert alert-danger alert-dismissable" style="display:none;">
<!--<button id="dismiss-merge2" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>-->
<h4><i class="icon fa fa-ban"></i>{!! Lang::get('lang.alert') !!}!</h4>
<div id="message-merge-err"></div>
</div>
</div>
</div>
</div><!-- /.merge-alert -->
<div id="merge-body-form">
<div class="row">
<div class="col-md-6">
{!! Form::open(['id'=>'merge-form','method' => 'PATCH'] )!!}
<label>{!! Lang::get('lang.title') !!}</label>
<input type="text" name='title' class="form-control" value="" placeholder="Optional" />
</div>
<div class="col-md-6">
<label>{!! Lang::get('lang.select-pparent-ticket') !!}</label>
<select class="form-control" id="select-merge-parent" name='p_id' data-placeholder="{!! Lang::get('lang.select_tickets') !!}" style="width: 100%;"><option value=""></option></select>
</div>
</div>
<div class="row">
<div class="col-md-8">
<label>{!! Lang::get('lang.merge-reason') !!}</label>
<textarea name="reason" class="form-control"></textarea>
</div>
</div>
</div><!-- mereg-body-form -->
</div><!-- merge-body -->
</div><!-- /.modal-body -->
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis2">{!! Lang::get('lang.close') !!}</button>
<input type="submit" id="merge-btn" class="btn btn-primary pull-right" value="{!! Lang::get('lang.merge') !!}"></input>
{!! Form::close() !!}
</div><!-- /.modal-footer -->
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- Modal -->
<div class="modal fade in" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none; padding-right: 15px;background-color: rgba(0, 0, 0, 0.7);">
<div class="modal-dialog" role="document">
<div class="col-md-2"></div>
<div class="col-md-8">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close closemodal" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel"></h4>
</div>
<div class="modal-body" id="custom-alert-body" >
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary pull-left yes" data-dismiss="modal">{{Lang::get('lang.ok')}}</button>
<button type="button" class="btn btn-default no">{{Lang::get('lang.cancel')}}</button>
</div>
</div>
</div>
</div>
</div>
<script>
var t_id = [];
$(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");
// alert($("input[type='checkbox']").val());
t_id = $('.selectval').map(function() {
return $(this).val();
}).get();
// alert(checkboxValues);
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
// alert('Hallo');
t_id = [];
}
$(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();
});
$(".select2").select2();
$('#delete').on('click', function() {
option = 0;
$('#myModalLabel').html("{{Lang::get('lang.delete-tickets')}}");
});
$('#close').on('click', function() {
option = 1;
$('#myModalLabel').html("{{Lang::get('lang.close-tickets')}}");
});
$("#modalpopup").on('submit', function(e) {
e.preventDefault();
var msg = "{{Lang::get('lang.confirm')}}";
var values = getValues();
if (values == "") {
msg = "{{Lang::get('lang.select-ticket')}}";
$('.yes').html("{{Lang::get('lang.ok')}}");
$('#myModalLabel').html("{{Lang::get('lang.alert')}}");
} else {
$('.yes').html("Yes");
}
$('#custom-alert-body').html(msg);
$("#myModal").css("display", "block");
});
$(".closemodal, .no").click(function() {
$("#myModal").css("display", "none");
});
$('.yes').click(function() {
var values = getValues();
if (values == "") {
$("#myModal").css("display", "none");
} else {
$("#myModal").css("display", "none");
$("#modalpopup").unbind('submit');
if (option == 0) {
//alert('delete');
$('#delete').click();
} else {
//alert('close');
$('#close').click();
}
}
});
function getValues() {
var values = $('.selectval:checked').map(function() {
return $(this).val();
}).get();
return values;
}
//checking merging tickets
$('#MergeTickets').on('show.bs.modal', function() {
// alert("hi");
$.ajax({
type: "GET",
url: "{{route('check.merge.tickets',0)}}",
dataType: "html",
data: {data1: t_id},
beforeSend: function() {
$("#merge_body").hide();
$("#merge_loader").show();
},
success: function(response) {
if (response == 0) {
$("#merge_body").show();
$("#merge-succ-alert").hide();
$("#merge-body-alert").show();
$("#merge-body-form").hide();
$("#merge_loader").hide();
$("#merge-btn").attr('disabled', true);
var message = "{{Lang::get('lang.select-tickets-to merge')}}";
$("#merge-err-alert").show();
$('#message-merge-err').html(message);
} else if (response == 2) {
$("#merge_body").show();
$("#merge-succ-alert").hide();
$("#merge-body-alert").show();
$("#merge-body-form").hide();
$("#merge_loader").hide();
$("#merge-btn").attr('disabled', true);
var message = "{{Lang::get('lang.different-users')}}";
$("#merge-err-alert").show();
$('#message-merge-err').html(message);
} else {
$("#merge_body").show();
$("#merge-body-alert").hide();
$("#merge-body-form").show();
$("#merge_loader").hide();
$("#merge-btn").attr('disabled', false);
$("#merge_loader").hide();
$.ajax({
url: "{{ route('get.merge.tickets',0) }}",
dataType: "html",
data: {data1: t_id},
success: function(data) {
$('#select-merge-parent').html(data);
}
// return false;
});
}
}
});
});
//submit merging form
$('#merge-form').on('submit', function() {
$.ajax({
type: "POST",
url: "{!! url('merge-tickets/') !!}/" + t_id,
dataType: "json",
data: $(this).serialize(),
beforeSend: function() {
$("#merge_body").hide();
$("#merge_loader").show();
},
success: function(response) {
if (response == 0) {
$("#merge_body").show();
$("#merge-succ-alert").hide();
$("#merge-body-alert").show();
$("#merge-body-form").hide();
$("#merge_loader").hide();
$("#merge-btn").attr('disabled', true);
var message = "{{Lang::get('lang.merge-error')}}";
$("#merge-err-alert").show();
$('#message-merge-err').html(message);
} else {
$("#merge_body").show();
$("#merge-err-alert").hide();
$("#merge-body-alert").show();
$("#merge-body-form").hide();
$("#merge_loader").hide();
$("#merge-btn").attr('disabled', true);
var message = "{{Lang::get('lang.merge-success')}}";
$("#merge-succ-alert").show();
$('#message-merge-succ').html(message);
setInterval(function() {
$("#alert11").hide();
setTimeout(function() {
var link = document.querySelector('#load-open');
if (link) {
link.click();
}
}, 500);
}, 2000);
}
}
})
return false;
});
});
function someFunction(id) {
if (document.getElementById(id).checked) {
t_id.push(id);
// alert(t_id);
} else if(document.getElementById(id).checked === undefined){
var index = t_id.indexOf(id);
if (index === -1){
t_id.push(id);
} else{
t_id.splice(index, 1);
}
} else {
var index = t_id.indexOf(id);
t_id.splice(index, 1);
// alert(t_id);
}
}
</script>
@stop

View File

@@ -1,18 +1,23 @@
<?php
$term=$_GET["term"];
$users = app\User::where('email', 'LIKE', '%'.$term.'%')->where('active', '=', 1)->get();
$json=array();
$term = $_GET["term"];
$users = app\User::where('email', 'LIKE', '%' . $term . '%')->where('active', '=', 1)->where('role', '=', 'user')->get();
$json = array();
foreach ($users as $user) {
$json[] = array(
'value'=> $user["email"],
'label'=>'Name: '.$user["first_name"] .' '.$user["last_name"].' | '.('Email: <'.$user["email"].'>'),
'email' =>$user["email"],
'user_name' =>$user["user_name"],
'first_name' =>$user["first_name"],
'last_name' =>$user["last_name"],
'country_code' =>$user["country_code"],
'mobile' =>$user["mobile"],
'phone_number' =>$user["phone_number"]
'value' => $user["email"],
'label' => 'Name: '.$user["first_name"] .' '.$user["last_name"].' | '.('Email: <'.$user["email"].'>'),
'email' => $user["email"],
'user_name' => $user["user_name"],
'first_name' => $user["first_name"],
'last_name' => $user["last_name"],
'country_code' => $user["country_code"],
'mobile' => $user["mobile"],
'phone_number' => $user["phone_number"]
);
}
echo json_encode($json);
echo json_encode($json);

View File

@@ -20,9 +20,9 @@ class="active"
$date_time_format = UTC::getDateTimeFormat();
if (Auth::user()->role == 'agent') {
$dept = App\Model\helpdesk\Agent\Department::where('id', '=', Auth::user()->primary_dpt)->first();
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('dept_id', '=', $dept->id)->orderBy('id', 'DESC')->paginate(20);
$tickets = App\Model\helpdesk\Ticket\Tickets::whereIn('status', array(1, 7))->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);
$tickets = App\Model\helpdesk\Ticket\Tickets::whereIn('status', array(1, 7))->orderBy('id', 'DESC')->paginate(20);
}
?>
<!-- Main content -->
@@ -52,8 +52,11 @@ if (Auth::user()->role == 'agent') {
<!-- 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="submit btn btn-default text-orange btn-sm" id="delete" name="submit" value="{!! Lang::get('lang.delete') !!}">
{{--@if(Auth::user()->role == 'admin')--}}
<input type="submit" class="submit btn btn-default text-yellow btn-sm" id="close" name="submit" value="{!! Lang::get('lang.close') !!}">
{{--@endif--}}
<button type="button" class="btn btn-sm btn-default text-green" id="Edit_Ticket" data-toggle="modal" data-target="#MergeTickets"><i class="fa fa-code-fork"> </i> {!! Lang::get('lang.merge') !!}</button>
<!--</div>-->
<p><p/>

View File

@@ -16,10 +16,7 @@ class="active"
<h1>{{Lang::get('lang.tickets')}}</h1>
@stop
@section('content')
<!-- Main content -->
{!! Form::open(['route'=>'post.newticket','method'=>'post','id'=>'form']) !!}
<div class="box box-primary">
@@ -84,12 +81,15 @@ class="active"
<div class="col-md-4">
<!-- email -->
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
{!! Form::label('email',Lang::get('lang.email')) !!} <span class="text-red"> *</span>
<!-- {!! Form::text('email',null,['class' => 'form-control'],['id' => 'email']) !!} -->
<input type="text" name="email" id="email" class="form-control">
{!! Form::label('email',Lang::get('lang.email')) !!}
@if ($email_mandatory->status == 1)
<span class="text-red"> *</span>
@endif
{!! Form::text('email',null,['class' => 'form-control', 'id' => 'email']) !!}
</div>
</div>
<div class="col-md-4">
<!-- email -->
<div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
@@ -109,16 +109,23 @@ class="active"
</div>
<div class="row">
<div class="col-md-1 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
<div class="form-group {{ $errors->has('code') ? 'has-error' : '' }}">
{!! Form::label('code',Lang::get('lang.country-code')) !!}
@if ($email_mandatory->status == 0 || $settings->status == 1)
<span class="text-red"> *</span>
@endif
{!! Form::text('code',null,['class' => 'form-control', 'id' => 'country_code', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code')]) !!}
</div>
</div>
<div class="col-md-5">
<!-- phone -->
<div class="form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
<label>{!! Lang::get('lang.mobile_number') !!}:</label>
@if ($email_mandatory->status == 0 || $settings->status == 1)
<span class="text-red"> *</span>
@endif
{!! Form::input('number','mobile',null,['class' => 'form-control', 'id' => 'mobile']) !!}
{!! $errors->first('mobile', '<spam class="help-block text-red">:message</spam>') !!}
</div>
</div>
<div class="col-md-5">
@@ -151,8 +158,8 @@ class="active"
<div class="form-group">
<label>{!! Lang::get('lang.help_topic') !!}:</label>
<!-- helptopic -->
<?php $helptopic = App\Model\helpdesk\Manage\Help_topic::where('status','=',1)->get(); ?>
{!! Form::select('helptopic', ['Helptopic'=>$helptopic->lists('topic','id')->toArray()],null,['class' => 'form-control select']) !!}
<?php $helptopic = App\Model\helpdesk\Manage\Help_topic::where('status', '=', 1)->get(); ?>
{!! Form::select('helptopic', ['Helptopic'=>$helptopic->lists('topic','id')->toArray()],null,['class' => 'form-control select','id'=>'selectid']) !!}
</div>
</div>
<div class="col-md-3">
@@ -178,6 +185,7 @@ class="active"
{!! Form::select('assignto', [''=>'Select an Agent','Agents'=>$agents->lists('first_name','id')->toArray()],null,['class' => 'form-control select']) !!}
</div>
</div>
<div id="response" class="col-md-6 form-group"></div>
</div>
</div>
</div>
@@ -217,11 +225,13 @@ class="active"
<label>{!! Lang::get('lang.priority') !!}:</label>
</div>
<div class="col-md-3">
<?php $Priority = App\Model\helpdesk\Ticket\Ticket_Priority::all(); ?>
<?php $Priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('status','=',1)->get(); ?>
{!! Form::select('priority', ['Priority'=>$Priority->lists('priority_desc','priority_id')->toArray()],null,['class' => 'form-control select']) !!}
</div>
</div>
</div>
</div>
</div>
<div class="box-footer">
@@ -236,30 +246,34 @@ class="active"
</div><!-- /. box -->
{!! Form::close() !!}
<script type="text/javascript">
$(function() {
$(document).ready(function () {
var helpTopic = $("#selectid").val();
send(helpTopic);
$("#selectid").on("change", function () {
helpTopic = $("#selectid").val();
send(helpTopic);
});
function send(helpTopic) {
$.ajax({
url: "{{url('/get-helptopic-form')}}",
data: {'helptopic': helpTopic},
type: "GET",
dataType: "html",
success: function (response) {
$("#response").html(response);
},
error: function (response) {
$("#response").html(response);
}
});
}
});
$(function () {
$("textarea").wysihtml5();
});
$(document).ready(function(){
$("#email").autocomplete({
source:"{!!URL::route('post.newticket.autofill')!!}",
minLength:1,
select:function(evt, ui) {
// this.form.phone_number.value = ui.item.phone_number;
// this.form.user_name.value = ui.item.user_name;
this.form.first_name.value = ui.item.first_name;
this.form.last_name.value = ui.item.last_name;
this.form.country_code.value = ui.item.country_code;
this.form.phone_number.value = ui.item.phone_number;
this.form.mobile.value = ui.item.mobile;
}
});
});
$(document).ready(function() {
$('#form').submit(function() {
$(document).ready(function () {
$('#form').submit(function () {
var duedate = document.getElementById('datemask').value;
if (duedate) {
var pattern = /^([0-9]{2})\/([0-9]{2})\/([0-9]{4})$/;
@@ -275,12 +289,39 @@ class="active"
}
});
});
$(document).ready(function(){
$("#email").autocomplete({
source:"{!!URL::route('post.newticket.autofill')!!}",
minLength:1,
select:function(evt, ui) {
// this.form.phone_number.value = ui.item.phone_number;
// this.form.user_name.value = ui.item.user_name;
if(ui.item.first_name) {
this.form.first_name.value = ui.item.first_name;
}
if(ui.item.last_name) {
this.form.last_name.value = ui.item.last_name;
}
if(ui.item.country_code) {
this.form.country_code.value = ui.item.country_code;
}
if(ui.item.phone_number) {
this.form.phone_number.value = ui.item.phone_number;
}
if(ui.item.mobile) {
this.form.mobile.value = ui.item.mobile;
}
}
});
});
$(function() {
$(function () {
$('#datemask').datepicker({changeMonth: true, changeYear: true}).mask('99/99/9999');
});
</script>
@stop
</script>
@stop

View File

@@ -0,0 +1,66 @@
<!DOCTYPE html>
<html>
<head>
<title>PDF</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
<h2>
<div id="logo" class="site-logo text-center" style="font-size: 30px;">
<center>
@if($system->url)
<a href="{!! $system->url !!}" rel="home">
@else
<a href="{{url('/')}}" rel="home" style="text-decoration:none;">
@endif
@if($company->use_logo == 1)
<img src="{!! public_path().'/uploads/company'.'/'.$company->logo !!}" width="100px;"/>
@else
@if($system->name)
{!! $system->name !!}
@else
<b>SUPPORT</b> CENTER
@endif
@endif
</a>
</center>
</div>
</h2>
<hr>
<h4>Subject : {!! $thread->title !!}</h4><br/>
<table>
<tr><td><b>{!! Lang::get('lang.ticket_number') !!}:</b></td> <td>{{$thread->ticket_number}}</td></tr>
<tr><td><b>{!! Lang::get('lang.first_name') !!}:</b></td> <td>{{ucfirst($thread->first_name)}}</td></tr>
<tr><td><b>{!! Lang::get('lang.last_name') !!}:</b></td> <td>{{ucfirst($thread->last_name)}}</td></tr>
<tr><td><b>{!! Lang::get('lang.email') !!}:</b></td> <td>{{$thread->email}}</td></tr>
<tr><td><b>{!! Lang::get('lang.phone') !!}:</b></td> <td>{{$thread->phone}}</td></tr>
<tr><td><b>{!! Lang::get('lang.mobile') !!}:</b></td> <td>{{$thread->mobile}}</td></tr>
</table>
<hr>
@if($ticket->extraFields()->count()>0)
<div>
<table class="table" style="border: 1px solid black;border-collapse: collapse; width: 100%">
@foreach($ticket->extraFields() as $ticket_form_data)
<tr style="border: 1px solid black;border-collapse: collapse;">
<td style="border: 1px solid black;border-collapse: collapse; padding: 14px;">&nbsp;&nbsp;<b>{!! $ticket_form_data->title !!}</b></td>
<td style="border: 1px solid black; width: 100%;border-collapse: collapse;padding: 14px;">{!! $ticket_form_data->content !!}</td>
</tr>
@endforeach
</table>
</div>
<hr>
@endif
<div>
<h3>Issue</h3>
</div>
<div>
{!! $thread->body !!}
</div>
<hr>
</body>
</html>

View File

@@ -75,6 +75,7 @@ $group = App\Model\helpdesk\Agent\Groups::where('id', '=', $agent_group)->where(
if ($rating_value == null) {
$avg_rating = '0';
} else {
$avg_rate = explode('.', $rating_value);
$avg_rating = $avg_rate[0];
}
@@ -103,11 +104,12 @@ if ($thread->title != "") {
<!-- Main content -->
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title" id="refresh2"><i class="fa fa-user"> </i> <?= $title ?></h3>
<h3 class="box-title" id="refresh2"><i class="fa fa-user"> </i> {!! $thread->getSubject() !!}</h3>
<div class="pull-right">
<!-- <button type="button" class="btn btn-default"><i class="fa fa-edit" style="color:green;"> </i> Edit</button> -->
<?php
Event::fire(new \App\Events\TicketBoxHeader($user->id));
if ($group->can_edit_ticket == 1) {
?>
<button type="button" class="btn btn-default" id="Edit_Ticket" data-toggle="modal" data-target="#Edit"><i class="fa fa-edit" style="color:green;"> </i> {!! Lang::get('lang.edit') !!}</button>
@@ -121,6 +123,8 @@ if ($thread->title != "") {
<button type="button" id="surrender_button" class="btn btn-default" data-toggle="modal" data-target="#surrender"> <i class="fa fa-arrows-alt" style="color:red;"> </i> {!! Lang::get('lang.surrender') !!}</button>
@endif
<?php Event::fire('show-add-event-btn', array()); ?>
<a href="{{url('ticket/print/'.$tickets->id)}}" target="_blank" class="btn btn-primary"><i class="fa fa-print" > </i> {!! Lang::get('lang.generate_pdf') !!}</a>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" id="d1"><i class="fa fa-exchange" style="color:teal;" id="hidespin"> </i><i class="fa fa-spinner fa-spin" style="color:teal; display:none;" id="spin"></i>
@@ -128,9 +132,25 @@ if ($thread->title != "") {
</button>
<ul class="dropdown-menu">
<li id="open"><a href="#"><i class="fa fa-folder-open-o" style="color:red;"> </i>{!! Lang::get('lang.open') !!}</a></li>
<?php if ( $tickets_approval->status==7) {?>
@if(Auth::user()->role == 'admin')
<li id="approval_close"><a href="#"><i class="glyphicon glyphicon-thumbs-up" style="color:red;"> </i>{!! Lang::get('lang.approval') !!}</a></li>
@endif
<?php } ?>
<?php if ( $tickets_approval->status==3) {?>
<?php if ($group->can_edit_ticket == 1) {?>
<li id="close"><a href="#"><i class="fa fa-check" style="color:green;"> </i>{!! Lang::get('lang.close') !!}</a></li>
<?php } ?>
<?php } ?>
<?php if ( $tickets_approval->status==1) {?>
<?php if ($group->can_edit_ticket == 1) {?>
<li id="close"><a href="#"><i class="fa fa-check" style="color:green;"> </i>{!! Lang::get('lang.close') !!}</a></li>
<?php } ?>
<?php } ?>
<li id="resolved"><a href="#"><i class="fa fa-check-circle-o " style="color:green;"> </i>{!! Lang::get('lang.resolved') !!} </a></li>
</ul>
</div>
@@ -225,7 +245,7 @@ if ($thread->title != "") {
<tr><td><b>{!! Lang::get('lang.status') !!}:</b></td> <?php $status = App\Model\helpdesk\Ticket\Ticket_Status::where('id', '=', $tickets->status)->first(); ?><td title="{{$status->properties}}">{{$status->name}}</td></tr>
<tr><td><b>{!! Lang::get('lang.priority') !!}:</b></td> <?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $tickets->priority_id)->first(); ?><td title="{{$priority->priority_desc}}">{{$priority->priority_desc}}</td></tr>
<tr><td><b>{!! Lang::get('lang.department') !!}:</b></td> <?php $dept123 = App\Model\helpdesk\Agent\Department::where('id', '=', $tickets->dept_id)->first(); ?><td title="{{$dept123->name}}">{{$dept123->name}}</td></tr>
<tr><td><b>{!! Lang::get('lang.email') !!}:</b></td> <td>{{$user->email}}</td></tr>
<tr><td><b>{!! Lang::get('lang.email') !!}:</b></td> <td>{{str_limit($user->email,30)}}</td></tr>
@if($user->ban > 0) <tr><td style="color:orange;"><i class="fa fa-warning"></i><b>
{!! Lang::get('lang.this_ticket_is_under_banned_user')!!}</td><td></td></tr>@endif
</div>
@@ -239,8 +259,10 @@ if ($thread->title != "") {
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
if ($LastResponse->role == "user") {
$rep = "#F39C12";
$username = $LastResponse->user_name;
} else {
$username = $LastResponse->first_name . " " . $LastResponse->last_name;
if ($LastResponse->first_name == null || $LastResponse->first_name == '') {
$username = $LastResponse->user_name;
} } else {
$rep = "#000";
$username = $LastResponse->first_name . " " . $LastResponse->last_name;
if ($LastResponse->first_name == null || $LastResponse->last_name == null) {
@@ -257,10 +279,11 @@ if ($thread->title != "") {
<div id="refresh3">
@if($user->phone_number !=null)<tr><td><b>{!! Lang::get('lang.phone') !!}:</b></td> <td>{{$user->phone_number}}</td></tr>@endif
@if($user->mobile !=null)<tr><td><b>{!! Lang::get('lang.mobile') !!}:</b></td> <td>{{$user->ext . $user->phone_number}}</td></tr>@endif
@if($user->mobile !=null)<tr><td><b>{!! Lang::get('lang.mobile') !!}:</b></td> <td>{{$user->ext . $user->mobile}}</td></tr>@endif
<tr><td><b>{!! Lang::get('lang.source') !!}:</b></td> <td>{{$ticket_source}}</td></tr>
<tr><td><b>{!! Lang::get('lang.help_topic') !!}:</b></td> <?php $help_topic = App\Model\helpdesk\Manage\Help_topic::where('id', '=', $tickets->help_topic_id)->first(); ?><td title="{{$help_topic->topic}}">{{$help_topic->topic}}</td></tr>
<tr><td><b>{!! Lang::get('lang.last_message') !!}:</b></td> <td>{{$username}}</td></tr>
<tr><td><b>{!! Lang::get('lang.last_message') !!}:</b></td> <td>{{str_limit($username,30)}}</td></tr>
<tr><td><b>{!! Lang::get('lang.organization') !!}:</b></td> <td>{!!$LastResponse->getOrgWithLink()!!}</td></tr>
<?php Event::fire(new App\Events\TicketDetailTable($TicketData)); ?>
</div>
</table>
@@ -442,7 +465,7 @@ if ($thread->title != "") {
<div class="form-group">
<div class="row">
<!-- internal note -->
<div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}">
<div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}" id="internal_content_class">
<div class="col-md-2">
<label>{!! Lang::get('lang.internal_note') !!}:<span class="text-red"> *</span></label>
</div>
@@ -489,7 +512,7 @@ if ($thread->title != "") {
<?php echo $conversations->setPath(url('/thread/' . $tickets->id))->render(); ?>
</ul>
<div class="col-md-12">
<div class="col-md-12" >
<link rel="stylesheet" type="text/css" href="{{asset("lb-faveo/css/faveo-css.css")}}">
<link href="{{asset("lb-faveo/css/jquery.rating.css")}}" rel="stylesheet" type="text/css" />
@@ -505,6 +528,7 @@ if ($thread->title != "") {
<?php
$ConvDate1 = $conversation->created_at;
$ConvDate = explode(' ', $ConvDate1);
$date = $ConvDate[0];
$time = $ConvDate[1];
$time = substr($time, 0, -3);
@@ -518,7 +542,7 @@ if ($thread->title != "") {
}
if($conversation->user_id != null) {
$role = App\User::where('id', '=', $conversation->user_id)->first();
}
}
?>
</li>
<li>
@@ -545,47 +569,45 @@ if ($thread->title != "") {
$attachment = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->first();
if ($attachment == null) {
$body = $conversation->body;
$body = $conversation->thread($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;
$body = $conversation->thread($body);
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->orderBy('id', 'DESC')->get();
// $i = 0;
foreach ($attachments as $attachment) {
if ($attachment->type == 'jpg' || $attachment->type == 'png' || $attachment->type == 'PNG' || $attachment->type == 'JPG' || $attachment->type == 'jpeg' || $attachment->type == 'JPEG' || $attachment->type == 'gif' || $attachment->type == 'GIF') {
if($attachment->size > 0) {
$image = @imagecreatefromstring($attachment->file);
if($image == false) {
} else {
ob_start();
imagejpeg($image, null, 80);
$data = ob_get_contents();
ob_end_clean();
$var = '<img style="max-width:200px;max-height:200px;" src="data:image/' . $attachment->type . ';base64,' . base64_encode($data) . '" />';
// echo $var;
// echo $attachment->name;
// $body = explode($attachment->name, $body);
$body = str_replace($attachment->name, "data:image/" . $attachment->type . ";base64," . base64_encode($data), $body);
$string = $body;
$start = "<head>";
$end = "</head>";
if (strpos($string, $start) == false || strpos($string, $start) == false) {
// $i++;
if (mime($attachment->type)==true) {
$image = @imagecreatefromstring($attachment->file);
ob_start();
imagejpeg($image, null, 80);
$data = ob_get_contents();
ob_end_clean();
$var = '<img style="max-width:200px;max-height:200px;" src="data:image/' . $attachment->type . ';base64,' . base64_encode($data) . '" />';
// echo $var;
// echo $attachment->name;
// $body = explode($attachment->name, $body);
$body = str_replace($attachment->name, "data:image/" . $attachment->type . ";base64," . base64_encode($data), $body);
} 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);
}
}
$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);
}
} else {
}
}
// echo $body;
// $body = explode($attachment->file, $body);
@@ -620,6 +642,9 @@ if ($thread->title != "") {
?>
<div class="timeline-item">
<span style="color:#fff;"><div class="pull-right"> <table><tbody>
@if($role)
@if($role->role != null)
@if($role->role != 'user' && $conversation->is_internal != 1)
@foreach($ratings as $rating)
@if($rating->rating_area == 'Comment Area')
<?php
@@ -632,20 +657,24 @@ if ($thread->title != "") {
?>
<tr>
<th><div class="ticketratingtitle" style="color:#3c8dbc;" >{!! $rating->name !!} &nbsp;</div></th>&nbsp
<td style="button:disabled;">
<td style="button:disabled;">
<?php for ($i = 1; $i <= $rating->rating_scale; $i++) { ?>
<input type="radio" class="star star-rating-readonly" id="star5" name="{!! $rating->name !!},{!! $conversation->id !!}" value="{!! $i !!}"<?php echo ($ratingval == $i) ? 'checked' : '' ?> />
<?php } ?>&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
<?php } ?>&nbsp;&nbsp;&nbsp;&nbsp;
</td>
</tr>
@endif
@endforeach
@endif
@endforeach
@endif
@endif
</tbody></table></div>
</span>
<h3 class="timeline-header">
<?php
if($conversation->user_id != null) {
if ($role->role == "user") {
if ($role->first_name == '' || $role->first_name == null) {
$usernam = $role->user_name;
} else {
$usernam = $role->first_name . " " . $role->last_name;
@@ -654,35 +683,43 @@ if ($thread->title != "") {
$usernam = Lang::get('lang.system');
}
?>
<div class="user-block" style="margin-bottom:-5px;margin-top:-2px;">
@if($conversation->user_id != null)
@if($role->profile_pic != null)
<img src="{{$role->profile_pic}}"class="img-circle img-bordered-sm" alt="User Image"/>
@else
<img src="{{ Gravatar::src($role->email) }}" class="img-circle img-bordered-sm" alt="img-circle img-bordered-sm">
@endif
@else
<img src="{{asset('lb-faveo/media/images/avatar_1.png')}}" class="img-circle img-bordered-sm" alt="img-circle img-bordered-sm">
@endif
<span class="username" style="margin-bottom:4px;margin-top:2px;">
@if($conversation->user_id != null)
<a href='{!! url("/user/".$role->id) !!}'>{!! $usernam !!}</a>
<a href='{!! url("/user/".$role->id) !!}'>{!! str_limit($usernam,30) !!}</a>
@else
{!! $usernam !!}
{!! str_limit($usernam,30) !!}
@endif
</span>
<span class="description" style="margin-bottom:4px;margin-top:4px;"><i class="fa fa-clock-o"></i> {{UTC::usertimezone($conversation->created_at)}}</span>
@if($conversation->id == $ij->id)
<a href="{{url('genereate-pdf/'.$conversation->id)}}" class= "pull-right fa fa-newspaper-o" title="generate pdf of this thread"></a>
@endif
</div><!-- /.user-block -->
</h3>
<div class="timeline-body" style="padding-left:30px;margin-bottom:-20px">
{!! nl2br($body) !!}
</div>
@if($conversation->id == $ij->id)
@if($conversation->firstContent()=='yes')
<div class="embed-responsive embed-responsive-16by9">
<iframe id="loader_frame{{$conversation->id}}" class="embed-responsive-item">Body of html email here</iframe>
</div>
<script>
$('#loader_frame{{$conversation->id}}')[0].contentDocument.body.innerHTML = '{!!$conversation->purify()!!}';
</script>
@else
{!! $body !!}
@endif
@if($conversation->id == $ij->id)
<?php $ticket_form_datas = App\Model\helpdesk\Ticket\Ticket_Form_Data::where('ticket_id', '=', $tickets->id)->get(); ?>
@if(isset($ticket_form_datas))
<div class="box-body col-md-9">
<br/>
<table class="table table-bordered">
<tbody>
@@ -693,9 +730,11 @@ if ($thread->title != "") {
</tr>
@endforeach
</tbody></table>
@endif
@endif
</div>
@endif
@endif
<br/><br/>
<div class="timeline-footer" style="margin-bottom:-5px">
@if(!$conversation->is_internal)
@@ -718,32 +757,25 @@ if ($thread->title != "") {
<ul class='mailbox-attachments clearfix'>
<?php
foreach ($attachments as $attachment) {
$size = $attachment->size;
$units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
$power = $size > 0 ? floor(log($size, 1024)) : 0;
$value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];
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);
if($image == false) {
$var = '<a style="max-width:200px;height:133px;color:#666;" href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><span class="mailbox-attachment-icon" style="background-color:#fff;">' . strtoupper($attachment->type) . '</span><div class="mailbox-attachment-info"><span ><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></span></div></a>';
echo '<li style="background-color:#f4f4f4;">' . $var . '</li>';
} else {
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;height:133px;" src="data:image/jpg;base64,' . base64_encode($data) . '"/></a>';
echo '<li style="background-color:#f4f4f4;"><span class="mailbox-attachment-icon has-img">' . $var . '</span><div class="mailbox-attachment-info"><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></div></li>';
}
} else {
$var = '<a style="max-width:200px;height:133px;color:#666;" href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><span class="mailbox-attachment-icon" style="background-color:#fff;">' . strtoupper($attachment->type) . '</span><div class="mailbox-attachment-info"><span ><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></span></div></a>';
echo '<li style="background-color:#f4f4f4;">' . $var . '</li>';
}
$size = $attachment->size;
$units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
$power = $size > 0 ? floor(log($size, 1024)) : 0;
$value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];
if ($attachment->poster == 'ATTACHMENT') {
if (mime($attachment->type)==true) {
$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;height:133px;" src="data:image/jpg;base64,' . base64_encode($data) . '"/></a>';
echo '<li style="background-color:#f4f4f4;"><span class="mailbox-attachment-icon has-img">' . $var . '</span><div class="mailbox-attachment-info"><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></div></li>';
} else {
//$var = '<a href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><img style="max-width:200px;height:133px;" src="data:'.$attachment->type.';base64,' . base64_encode($data) . '"/></a>';
$var = '<a style="max-width:200px;height:133px;color:#666;" href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><span class="mailbox-attachment-icon" style="background-color:#fff; font-size:18px;">' . strtoupper($attachment->type) . '</span><div class="mailbox-attachment-info"><span ><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></span></div></a>';
echo '<li style="background-color:#f4f4f4;">' . $var . '</li>';
}
}
}
?>
</ul>
@@ -1022,9 +1054,9 @@ if ($thread->title != "") {
<p>{!! Lang::get('lang.whome_do_you_want_to_assign_ticket') !!}?</p>
<select id="asssign" class="form-control" name="assign_to">
<?php
$assign = App\User::where('role', '!=', 'user')->get();
$assign = App\User::where('role', '!=', 'user')->where('active', '=', '1')->get();
$count_assign = count($assign);
$teams = App\Model\helpdesk\Agent\Teams::all();
$teams = App\Model\helpdesk\Agent\Teams::where('status', '=', '1')->get();
$count_teams = count($teams);
?>
<optgroup label="Teams ( {!! $count_teams !!} )">
@@ -1068,7 +1100,7 @@ if ($thread->title != "") {
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<?php \Event::fire('show-add-calendar-model', array())?>
<!-- add or search user Modal -->
<div class="modal fade" id="addccc">
<div class="modal-dialog">
@@ -1086,6 +1118,7 @@ if ($thread->title != "") {
<div class="tab-pane active" id="ahah">
<div class="modal-body" id="def">
<div class="callout callout-info" id="hide1234" ><i class="icon fa fa-info"> </i>&nbsp;&nbsp;&nbsp; {!! Lang::get('lang.search_existing_users_or_add_new_users') !!}</div>
<div id="here"></div>
<div id="show7" style="display:none;">
<div class="row col-md-12">
<div class="col-xs-5">
@@ -1097,7 +1130,7 @@ if ($thread->title != "") {
</div>
</div>
</div>
<div id="here"></div>
{!! Form::model($tickets->id, ['id'=>'search-user','method' => 'PATCH'] )!!}
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<input type="text" class="form-control" name="search" id="tags" placeholder="{!! Lang::get('lang.search_by_email') !!}">
@@ -1311,6 +1344,7 @@ if ($thread->title != "") {
// $('#cand').wysihtml5();
var wysihtml5Editor = $('#reply_content').wysihtml5().data("wysihtml5").editor;
$('#select').on('change', function (e) {
//alert('hello2');
var $_token = $('#token').val();
var data = $('#select').val();
@@ -1324,6 +1358,7 @@ if ($thread->title != "") {
dataType : 'json',
data : ({data}),
success : function(response) {
// alert(response);
wysihtml5Editor.setValue(response, true);
console.log(wysihtml5Editor.getValue());
@@ -1348,6 +1383,7 @@ if ($thread->title != "") {
$("#loader").show();
},
success: function (response) {
$("#refresh").load("../thread/{{$tickets->id}} #refresh");
$("#refresh").show();
$("#loader").hide();
@@ -1361,6 +1397,7 @@ if ($thread->title != "") {
});
});
$(document).ready(function () {
//Initialize Select2 Elements
$(".select2").select2();
setInterval(function(){
@@ -1395,6 +1432,39 @@ if ($thread->title != "") {
var message = "{!! Lang::get('lang.your_ticket_have_been_closed') !!}";
$("#alert11").show();
$('#message-success1').html(message);
setTimeout(function() {
window.location = document.referrer;
}, 500);
}
})
return false;
});
// approval close ticket
$('#approval_close').on('click', function(e) {
$.ajax({
type: "GET",
url: "../ticket/close/get-approval/{{$tickets->id}}",//route 600
beforeSend: function() {
$("#hidespin").hide();
$("#spin").show();
$("#hide2").hide();
$("#show2").show();
},
success: function(response) {
$("#refresh").load("../thread/{{$tickets->id}} #refresh");
$("#show2").hide();
$("#spin").hide();
$("#hide2").show();
$("#hidespin").show();
$("#d1").trigger("click");
var message = "successfull approval";
$("#alert11").show();
$('#message-success1').html(message);
setInterval(function(){
$("#alert11").hide();
setTimeout(function() {
@@ -1405,6 +1475,7 @@ if ($thread->title != "") {
})
return false;
});
// Resolved a ticket
$('#resolved').on('click', function(e) {
$.ajax({
@@ -1509,11 +1580,13 @@ if ($thread->title != "") {
// $('#t1').hide();
// $('#t2').show();
// });
// comment a ticket
// $('#aa').click(function() {
// $('#t1').show();
// $('#t2').hide();
// });
// Edit a ticket
$('#form').on('submit', function() {
$.ajax({
@@ -1574,6 +1647,7 @@ if ($thread->title != "") {
// var message = "Success";
// $('#message-success1').html(message);
// setInterval(function(){$("#alert11").hide(); },4000);
var message = "Success!";
$("#alert11").show();
$('#message-success1').html(message);
@@ -1675,6 +1749,19 @@ if ($thread->title != "") {
});
// Internal Note
$('#form2').on('submit', function() {
var internal_content = document.getElementById('InternalContent').value;
if(internal_content) {
$("#internal_content_class").removeClass('has-error');
$("#alert23").hide();
} else {
var message = "<li>{!! Lang::get('lang.internal_content_is_a_required_field') !!}</li>";
$("#internal_content_class").addClass('has-error');
$("#alert23").show();
$('#message-danger2').html(message);
$("#show3").hide();
$("#t1").show();
return false;
}
$.ajax({
type: "POST",
url: "../internal/note/{{ $tickets->id }}",
@@ -1685,6 +1772,7 @@ if ($thread->title != "") {
$("#show5").show();
},
success: function(response) {
if (response == 1)
{
$("#refresh1").load("../thread/{{$tickets->id}} #refresh1");
@@ -1700,6 +1788,16 @@ if ($thread->title != "") {
var div1 = document.getElementById('newtextarea1');
div1.innerHTML = div1.innerHTML + '<textarea style="width:98%;height:200px;" name="InternalContent" class="form-control" id="InternalContent"/></textarea>';
var wysihtml5Editor = $('textarea').wysihtml5().data("wysihtml5").editor;
setInterval(function(){
var head= document.getElementsByTagName('head')[0];
var script= document.createElement('script');
script.type= 'text/javascript';
script.src= '{{asset("lb-faveo/js/jquery.rating.pack.js")}}';
head.appendChild(script);
// $('.rating-cancel').hide();
// $(".star-rating-control").attr("disabled", "disabled").off('hover');
// $(".star-rating-control").addClass("disabled")
}, 4000);
} else {
// alert('fail');
var message = "{!! Lang::get('lang.for_some_reason_your_message_was_not_posted_please_try_again_later') !!}";
@@ -1756,10 +1854,10 @@ if ($thread->title != "") {
var i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
}
$('#form3').on('submit', function() {
var fd = new FormData(document.getElementById("form3"));
var reply_content = document.getElementById("reply_content").value;
var reply_content = document.getElementById('reply_content').value;
if(reply_content) {
$("#reply_content_class").removeClass('has-error');
$("#alert23").hide();
@@ -1815,9 +1913,9 @@ if ($thread->title != "") {
// $(".star-rating-control").attr("disabled", "disabled").off('hover');
// $(".star-rating-control").addClass("disabled")
}, 4000);
$( "#clear-file" ).trigger( "click" );
} else {
// alert('fail');
// $( "#dismis4" ).trigger( "click" );
var message = "{!! Lang::get('lang.for_some_reason_your_reply_was_not_posted_please_try_again_later') !!}";
$("#alert23").show();
$('#message-danger2').html(message);
@@ -1839,6 +1937,7 @@ if ($thread->title != "") {
type: "GET",
url: "../ticket/surrender/{{ $tickets->id }}",
success: function(response) {
if (response == 1)
{
// alert('ticket has been un assigned');
@@ -1870,8 +1969,9 @@ if ($thread->title != "") {
dataType: "html",
data: $(this).serialize(),
beforeSend: function() {
$('#show7').show();
$('#hide1234').hide();
$('#here').html("");
$('#show7').show();
$('#hide1234').hide();
},
success: function(response) {
$('#show7').hide();
@@ -1884,7 +1984,7 @@ if ($thread->title != "") {
// if(link) {
// link.click();
// }
$('#cc-close').trigger('click');
// $('#cc-close').trigger('click');
}, 500);
}
})
@@ -1951,6 +2051,7 @@ if ($thread->title != "") {
type: 'GET',
data: $(this).serialize(),
success: function(data) {
$('#select-merge-tickts').html(data);
}
// return false;
@@ -2028,12 +2129,15 @@ if ($thread->title != "") {
$("#recepients").load("../thread/{{$tickets->id}} #recepients");
};
// $('#here2').html(response);
// $("#surrender22").load("../thread/{{$tickets->id}} #surrender22");
}
})
return false;
}
$(document).ready(function() {
var Vardata = "";
var count = 0;
$(".select2").on('select2:select', function(){
@@ -2069,6 +2173,7 @@ echo $ticket_data->title;
}
});
}
}
var locktime = '<?php echo $var->collision_avoid; ?>' * 60 * 1000;
var ltf = '<?php echo $var->lock_ticket_frequency;?>';
@@ -2096,6 +2201,7 @@ echo $ticket_data->title;
break;
}
}
$(this).data("prevType", e.type);
});
}
@@ -2146,7 +2252,9 @@ echo $ticket_data->title;
}
})
}
$(function() {
$('h5').html('<span class="stars">' + parseFloat($('input[name=amount]').val()) + '</span>');
$('span.stars').stars();
$('h4').html('<span class="stars2">' + parseFloat($('input[name=amt]').val()) + '</span>');
@@ -2158,5 +2266,4 @@ echo $ticket_data->title;
});
}
</script>
@stop

View File

@@ -43,60 +43,84 @@ class="active"
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<br/>
@if($errors->first('first_name'))
<li class="error-message-padding">{!! $errors->first('first_name', ':message') !!}</li>
<li class="error-message-padding">{!! $errors->first('first_name', ':message') !!}</li>
@endif
@if($errors->first('last_name'))
<li class="error-message-padding">{!! $errors->first('last_name', ':message') !!}</li>
<li class="error-message-padding">{!! $errors->first('last_name', ':message') !!}</li>
@endif
@if($errors->first('user_name'))
<li class="error-message-padding">{!! $errors->first('user_name', ':message') !!}</li>
<li class="error-message-padding">{!! $errors->first('user_name', ':message') !!}</li>
@endif
@if($errors->first('email'))
<li class="error-message-padding">{!! $errors->first('email', ':message') !!}</li>
<li class="error-message-padding">{!! $errors->first('email', ':message') !!}</li>
@endif
@if($errors->first('country_code'))
<li class="error-message-padding">{!! $errors->first('country_code', ':message') !!}</li>
@endif
@if($errors->first('mobile'))
<li class="error-message-padding">{!! $errors->first('mobile', ':message') !!}</li>
<li class="error-message-padding">{!! $errors->first('mobile', ':message') !!}</li>
@endif
@if($errors->first('ext'))
<li class="error-message-padding">{!! $errors->first('ext', ':message') !!}</li>
<li class="error-message-padding">{!! $errors->first('ext', ':message') !!}</li>
@endif
@if($errors->first('phone_number'))
<li class="error-message-padding">{!! $errors->first('phone_number', ':message') !!}</li>
<li class="error-message-padding">{!! $errors->first('phone_number', ':message') !!}</li>
@endif
@if($errors->first('active'))
<li class="error-message-padding">{!! $errors->first('active', ':message') !!}</li>
<li class="error-message-padding">{!! $errors->first('active', ':message') !!}</li>
@endif
</div>
@endif
<div class="row">
<!-- First name : first name : Required -->
<div class="col-xs-3 form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
<div class="col-xs-6 form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
{!! Form::label('first_name',Lang::get('lang.first_name')) !!}<span class="text-red"> *</span>
{!! Form::text('first_name',null,['class' => 'form-control']) !!}
</div>
<!-- Last name : last name : Required -->
<div class="col-xs-3 form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
<div class="col-xs-6 form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
{!! Form::label('last_name',Lang::get('lang.last_name')) !!}
{!! Form::text('last_name',null,['class' => 'form-control']) !!}
</div>
<!-- User Name : Text : Required-->
<div class="col-xs-3 form-group {{ $errors->has('user_name') ? 'has-error' : '' }}">
</div>
<div class="row">
<!-- Email Address : Email : Required -->
<div class="col-xs-6 form-group {{ $errors->has('email') ? 'has-error' : '' }}">
{!! Form::label('email',Lang::get('lang.email')) !!}
@if ($email_mandatory->status == 1 || $email_mandatory->status == '1')
<span class="text-red"> *</span>
@endif
{!! Form::email('email',null,['class' => 'form-control']) !!}
</div>
<div class="col-xs-6 form-group {{ $errors->has('user_name') ? 'has-error' : '' }}">
{!! Form::label('user_name',Lang::get('lang.user_name')) !!}<span class="text-red"> *</span>
{!! Form::text('user_name',null,['class' => 'form-control']) !!}
</div>
<!-- Email Address : Email : Required -->
<div class="col-xs-3 form-group {{ $errors->has('email') ? 'has-error' : '' }}">
{!! Form::label('email',Lang::get('lang.email')) !!}<span class="text-red"> *</span>
{!! Form::email('email',null,['class' => 'form-control']) !!}
</div>
<div class="row">
<div class="col-xs-6 form-group {{ $errors->has('organization') ? 'has-error' : '' }}">
{!! Form::label('organization',Lang::get('lang.organization')) !!}
{!! Form::select('org_id',[''=>'Select','Organization'=>$org],null,['class' => 'form-control','id'=>'org']) !!}
</div>
<div class="col-xs-1 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
</div>
<div class="row">
<div class="col-xs-1 form-group {{ $errors->has('country_code') ? 'has-error' : '' }}">
{!! Form::label('country_code',Lang::get('lang.country-code')) !!}
{!! $errors->first('country_code', '<spam class="help-block">:message</spam>') !!}
@if ($email_mandatory->status == 0 || $settings->status == 1)
<span class="text-red"> *</span>
@endif
<!-- {!! $errors->first('country_code', '<spam class="help-block">:message</spam>') !!} -->
{!! Form::text('country_code',null,['class' => 'form-control', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code')]) !!}
</div>
<!-- mobile Number : Text : -->
<div class="col-md-3 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
{!! Form::label('mobile',Lang::get('lang.mobile')) !!}
@if ($email_mandatory->status == 0 || $settings->status == 1)
<span class="text-red"> *</span>
@endif
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
</div>
<div class="col-xs-1 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
@@ -134,16 +158,43 @@ class="active"
</div>
</div>
<script>
$(function() {
$(function () {
$("textarea").wysihtml5();
$('input[type="checkbox"]').iCheck({
checkboxClass: 'icheckbox_flat-blue'
});
$('input[type="radio"]').iCheck({
radioClass: 'iradio_flat-blue'
});
});
});
</script>
@stop
@section('FooterInclude')
<!--<script>
$('#org').autocomplete({
minLength: 1,
source: function (request, response) {
$.getJSON("{{url('get-organization')}}", {
term: request.term
}, function (data) {
var array = data.error ? [] : $.map(data, function (m) {
return {
label: m.label,
value: m.value
};
});
response(array);
});
},
select: function (event, ui) {
$("#org").val(ui.item.label); // display the selected text
$("#field_id").val(ui.item.value); // save selected id to hidden input
return false;
}
});
</script>-->
@stop

View File

@@ -70,27 +70,36 @@ class="active"
@endif
</div>
@endif
<!-- Email Address : Email : Required -->
<div class="row">
<!-- First name : first name : Required -->
<div class="col-xs-3 form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
<div class="col-xs-4 form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
{!! Form::label('first_name',Lang::get('lang.first_name')) !!}<span class="text-red"> *</span>
{!! Form::text('first_name',null,['class' => 'form-control']) !!}
</div>
<!-- Last name : last name : Required -->
<div class="col-xs-3 form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
<div class="col-xs-4 form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
{!! Form::label('last_name',Lang::get('lang.last_name')) !!}
{!! Form::text('last_name',null,['class' => 'form-control']) !!}
</div>
<!-- User Name : Text : Required-->
<div class="col-xs-3 form-group {{ $errors->has('user_name') ? 'has-error' : '' }}">
<div class="col-xs-4 form-group {{ $errors->has('user_name') ? 'has-error' : '' }}">
{!! Form::label('user_name',Lang::get('lang.user_name')) !!}<span class="text-red"> *</span>
{!! Form::text('user_name',null,['class' => 'form-control']) !!}
</div>
<div class="col-md-3 form-group {{ $errors->has('email') ? 'has-error' : '' }}">
{!! Form::label('email',Lang::get('lang.email')) !!} <span class="text-red"> *</span>
</div>
<div class="row">
<!-- Email Address : Email : Required -->
<div class="col-xs-6 form-group {{ $errors->has('email') ? 'has-error' : '' }}">
{!! Form::label('email',Lang::get('lang.email')) !!}<span class="text-red"> *</span>
{!! Form::email('email',null,['class' => 'form-control']) !!}
</div>
</div>
<div class="col-xs-6 form-group {{ $errors->has('organization') ? 'has-error' : '' }}">
{!! Form::label('organization',Lang::get('lang.organization')) !!}
{!! Form::select('org_id',[''=>'Select','Organization'=>$org],null,['class' => 'form-control','id'=>'org']) !!}
</div>
</div>
<div class="row">
<div class="col-xs-1 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
{!! Form::label('country_code',Lang::get('lang.country-code')) !!}
{!! $errors->first('country_code', '<spam class="help-block">:message</spam>') !!}
@@ -155,4 +164,31 @@ class="active"
});
</script>
@stop
@section('FooterInclude')
<!--<script>
$('#org').autocomplete({
minLength: 1,
source: function (request, response) {
$.getJSON("{{url('get-organization')}}", {
term: request.term
}, function (data) {
var array = data.error ? [] : $.map(data, function (m) {
return {
label: m.label,
value: m.value
};
});
response(array);
});
},
select: function (event, ui) {
$("#org").val(ui.item.label); // display the selected text
$("#field_id").val(ui.item.value); // save selected id to hidden input
return false;
}
});
</script>-->
@stop

View File

@@ -0,0 +1,106 @@
@extends('themes.default1.agent.layout.agent')
@section('Users')
class="active"
@stop
@section('user-bar')
active
@stop
@section('user')
class="active"
@stop
<!-- header -->
@section('PageHeader')
<h1>Export User</h1>
@stop
<!-- /header -->
<!-- content -->
@section('content')
<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/bootstrap.daterangepicker/2/daterangepicker.css" />
{!! Form::open(['url'=>'user-export','method'=>'post']) !!}
<div class="box box-primary">
@if (count($errors) > 0)
<div class="alert alert-danger">
<strong>Whoops!</strong> There were some problems with your input.<br><br>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
@if(Session::has('success'))
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('success')}}
</div>
@endif
<!-- fail message -->
@if(Session::has('fails'))
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{Session::get('fails')}}
</div>
@endif
<div class="box-header with-border">
<h3 class="box-title">
Users
</h3>
</div>
<div class="box-body">
<div class="row">
<div class="col-md-6">
<div id="reportrange" class="pull-right" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%">
<i class="glyphicon glyphicon-calendar fa fa-calendar"></i>&nbsp;
<span id="date"></span> <b class="caret"></b>
</div>
</div>
<div class="col-md-6">
{!! Form::hidden('date',null,['id'=>'hidden']) !!}
{!! Form::submit('Export',['class'=>'btn btn-success','id'=>'submit']) !!}
</div>
</div>
</div>
</div>
{!! Form::close() !!}
@stop
@section('FooterInclude')
<script type="text/javascript" src="//cdn.jsdelivr.net/bootstrap.daterangepicker/2/daterangepicker.js"></script>
<script type="text/javascript">
$(function () {
var start = moment().subtract(29, 'days');
var end = moment();
function cb(start, end) {
$('#reportrange span').html(start.format('YYYY-MM-DD') + ' : ' + end.format('YYYY-MM-DD'));
}
$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
}
}, cb);
cb(start, end);
});
$("#submit").on('click', function () {
var date = $("#date").text();
$("#hidden").val(date);
});
</script>
@stop

View File

@@ -67,6 +67,7 @@ class="active"
Lang::get('lang.status'),
Lang::get('lang.ban'),
Lang::get('lang.last_login'),
Lang::get('lang.role'),
Lang::get('lang.action')) // these are the column headings to be shown
->setUrl(route('user.list')) // this is the route where data will be retrieved
->render() !!}

View File

@@ -19,7 +19,7 @@ class="active"
@section('content')
<div class="row">
<div class="col-md-6">
{!! Form::model($user,['url'=>'agent-profile', 'method' => 'PATCH','files'=>true]) !!}
{!! Form::model($user,['url'=>'agent-profile', 'id' => 'agent-profile', 'method' => 'PATCH','files'=>true]) !!}
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">
@@ -53,6 +53,7 @@ class="active"
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<br/>
<li class="error-message-padding">{!! $errors->first('first_name', ':message') !!}</li>
<li class="error-message-padding">{!! $errors->first('mobile', ':message') !!}</li>
</div>
@endif
@endif
@@ -94,7 +95,7 @@ class="active"
<!-- phone extension -->
<div class="col-xs-2 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
{!! Form::label('country_code',Lang::get('lang.country-code')) !!}
{!! Form::text('country_code',null,['class' => 'form-control', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code')]) !!}
{!! Form::text('country_code',null,['class' => 'form-control', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code'), 'id' => 'code']) !!}
</div>
<div class="col-xs-2 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
{!! Form::label('ext',Lang::get('lang.ext')) !!}
@@ -109,7 +110,7 @@ class="active"
<!-- mobile -->
<div class="form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
{!! Form::label('mobile',Lang::get('lang.mobile_number')) !!}
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
{!! Form::text('mobile',null,['class' => 'form-control', 'id' => 'mobile']) !!}
</div>
<div class="form-group {{ $errors->has('agent_sign') ? 'has-error' : '' }}">
{!! Form::label('agent_sign',Lang::get('lang.agent_sign')) !!}
@@ -158,21 +159,21 @@ class="active"
<!-- old password -->
<div class="form-group has-feedback {{ $errors->has('old_password') ? 'has-error' : '' }}">
{!! Form::label('old_password',Lang::get('lang.old_password')) !!} <span class="text-red"> *</span>
{!! Form::password('old_password',['class' => 'form-control']) !!}
{!! Form::password('old_password',['placeholder'=>Lang::get('lang.old_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')) !!} <span class="text-red"> *</span>
{!! Form::password('new_password',['class' => 'form-control']) !!}
{!! Form::password('new_password',['placeholder'=>Lang::get('lang.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')) !!} <span class="text-red"> *</span>
{!! Form::password('confirm_password',['class' => 'form-control']) !!}
{!! Form::password('confirm_password',['placeholder'=>Lang::get('lang.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>
@@ -184,9 +185,146 @@ class="active"
</div>
</div>
{!! Form::close() !!}
<!-- Modal for last step of setting -->
<div class="modal fade in" id="last-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none; padding-right: 15px;background-color: rgba(0, 0, 0, 0.7);">
<div class="modal-dialog" role="document">
<div class="col-md-2"></div>
<div class="col-md-12" style="height:40%">
<div class="modal-content">
<div class="modal-header">
<span style="font-size:1.2em">{{Lang::get('lang.verify-number')}}</span>
<button type="button" class="close closemodal" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
<div class="modal-body">
<div id="custom-alert-body2">
<div class="row">
<div class="col-md-12">
<div id="loader2" style="display:none">
<center><img src="{{asset('lb-faveo/media/images/gifloader.gif')}}"></center>
</div>
<div id="verify-success" style="display:none" class="alert alert-success alert-dismissable">
<i class="fa fa-check-circle"> </i>
<span id = "success_message"></span>
</div>
<div id="verify-fail" style="display:none" class="alert alert-danger alert-dismissable">
<i class="fa fa-ban"> </i> <b> {!! Lang::get('lang.alert') !!}! </b>
<span id = "error_message"></span>
</div>
</div>
</div>
</div>
<div id="verify-number-form">
{!! Form::open(['id'=>'verify-otp','method' => 'POST'] )!!}
<div class="row">
<div class="col-md-8">
{{ Lang::get('lang.get-verify-message') }}
</div>
<div class="col-md-4">
{!! Form::text('token','',['class' => 'form-control', 'required' => true, 'placeholder' => Lang::get('lang.enter-otp'), 'id' => 'otp']) !!}
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" id="close-last" class="btn btn-default closemodal pull-left">{{Lang::get('lang.close')}}</button>
<div id="last-submit"><input type="submit" id="merge-btn" class="btn btn-primary pull-right" value="{!! Lang::get('lang.verify') !!}"></input></div>
</div>
{!! Form::close() !!}
</div>
</div>
</div>
</div>
<!-- modal end -->
<script>
$(function() {
$("textarea").wysihtml5();
});
</script>
@if($verify == 1 || $verify == '1')
<script type="text/javascript">
$('#agent-profile').on('submit', function(e){
var old_mobile = "<?php echo $user->mobile;?>";
var email = "<?php echo $user->email;?>";
var full_name = "<?php echo $user->first_name; ?>";
var mobile = document.getElementById('mobile').value;
var code = document.getElementById('code').value;
if (code == '' || code == null) {
//do nothingalert
} else {
var id = "<?php echo $user->id; ?>";
if (mobile !== old_mobile) {
e.preventDefault();
$('#last-modal').css('display', 'block');
$.ajax({
url: '{{URL::route("agent-verify-number")}}',
type: 'post', // performing a POST request
data : {
mobile : mobile,
full_name: full_name,
email: email,
code: code // will be accessible in $_POST['data1']
},
dataType: 'json',
beforeSend: function() {
$('#loader2').css('display', 'block');
$('#verify-number-form').css('display', 'none');
$('#verify-fail').css('display', 'none');
$('verify-success').css('display', 'none');
},
success: function(response) {
$('#loader2').css('display', 'none');
$('#verify-number-form').css('display', 'block');
$('#verify-otp').on('submit', function(e){
e.preventDefault();
var otp = document.getElementById('otp').value;
$.ajax({
url: '{{URL::route("post-agent-verify-number")}}',
type: 'POST',
data: {
otp: otp,
u_id: id,
},
dataType: 'html',
beforeSend: function(){
$('#loader2').css('display', 'block');
$('#verify-number-form').css('display', 'none');
$('#verify-fail').css('display', 'none');
$('verify-success').css('display', 'none');
},
success: function(response){
if( response == 1) {
$('#loader2').css('display', 'none');
var message = "{{Lang::get('lang.number-verification-sussessfull')}}";
$('#success_message').html(message);
$('#verify-success').css('display', 'block');
$('#agent-profile').unbind('submit').submit();
} else {
$('#loader2').css('display', 'none');
$("#error_message").html(response);
$('#verify-fail').css('display', 'block');
$('#verify-number-form').css('display', 'block');
}
}
});
});
},
complete: function( jqXHR, textStatus) {
if (textStatus === "parsererror" || textStatus === "timeout" || textStatus === "abort" || textStatus === "error") {
var message = "{{Lang::get('lang.otp-not-sent')}}";
$('#loader2').css('display', 'none');
$("#error_message").html(message);
$("#merge-btn").css('display', 'none');
$('#verify-fail').css('display', 'block');
}
}
});
}
}
});
$('.closemodal').on('click', function(){
$('#last-modal').css('display', 'none');
});
</script>
@endif
@stop

View File

@@ -16,7 +16,13 @@ class="active"
@stop
<!-- header -->
@section('PageHeader')
@if($users->role == 'user')
<h1>{!! Lang::get('lang.user_profile') !!} </h1>
@elseif($users->role == 'agent')
<h1>{!! Lang::get('lang.agent_profile') !!} </h1>
@endif
@stop
<!-- /header -->
<!-- breadcrumbs -->
@@ -50,12 +56,12 @@ class="active"
<div class="col-md-3">
<div class="box box-primary">
<div class="box-header">
<a href="{{route('user.edit', $users->id)}}" data-toggle="tooltip" data-placement="left" class="pull-right" title="{!! Lang::get('lang.edit') !!}"><i class="fa fa-edit"></i></a>
<!-- <a href="{{route('user.edit', $users->id)}}" data-toggle="tooltip" data-placement="left" class="pull-right" title="{!! Lang::get('lang.edit') !!}"><i class="fa fa-edit"></i></a> -->
</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;">
<img src="{{ $users->profile_pic }}" 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
@@ -65,17 +71,17 @@ class="active"
</div>
</div>
@if($users->user_name)
<div class="box-footer">
<b>{{Lang::get('lang.user_name')}}</b>
<a class="pull-right" href="{{route('user.show', $users->id)}}">
{{$users->user_name }}
</a>
</div>
<div class="box-footer">
<b>{{Lang::get('lang.user_name')}}</b>
<a class="pull-right" href="{{route('user.show', $users->id)}}">
{{str_limit($users->user_name,10) }}
</a>
</div>
@endif
<div class="box-footer">
<b>{{Lang::get('lang.email')}}</b>
<a class="pull-right" href="{{route('user.show', $users->id)}}">
{{$users->email }}
{{str_limit($users->email,10) }}
</a>
</div>
<div class="box-footer">
@@ -86,7 +92,7 @@ class="active"
@if($user_org == null)
<b>{!! Lang::get('lang.organization') !!}</b>
<a href="" class="pull-right" data-toggle="modal" data-target="#assign"><i class="fa fa-hand-o-right" style="color:orange;"> </i> {!! Lang::get('lang.assign') !!} </a>
<a href="" data-toggle="modal" data-target="#create_org" class="pull-right"> {{Lang::get('lang.create')}} <b style="color:#000"> / </b>&nbsp; </a>
<a href="" data-toggle="modal" data-target="#create_org" class="pull-right"> {{Lang::get('lang.create')}} |&nbsp;</a>
@else
<?php
$org_id = $user_org->org_id;
@@ -94,7 +100,6 @@ class="active"
?>
<b>{!! Lang::get('lang.organization') !!}</b>
<a class="pull-right" href="#" data-toggle="modal" data-target="#{{$org_id}}delete" title="{!! Lang::get('lang.remove') !!}"><i class="fa fa-times" style="color:red;"> </i></a>
<a href="{!! URL::route('organizations.show',$organization->id) !!}" class="pull-right">{!! $organization->name !!}&nbsp;/&nbsp;</a>
<div class="modal fade" id="{{$org_id}}delete">
<div class="modal-dialog">
<div class="modal-content">
@@ -117,6 +122,15 @@ class="active"
</div>
</div>
<div class="box-footer">
<b>{{Lang::get('lang.role')}}</b>
<a class="pull-right">
<span style="color:green;">{!! $users->role !!}</span>
</a>
</div>
<div class="box-footer">
<b>{{Lang::get('lang.status')}}</b>
<a class="pull-right">
@@ -128,28 +142,28 @@ class="active"
</a>
</div>
@if($users->country_code)
<div class="box-footer">
<b>{{Lang::get('lang.country_code')}}</b>
<a class="pull-right"> {{$users->country_code}}</a>
</div>
<div class="box-footer">
<b>{{Lang::get('lang.country_code')}}</b>
<a class="pull-right"> {{$users->country_code}}</a>
</div>
@endif
@if($users->ext)
<div class="box-footer">
<b>{{Lang::get('lang.ext')}}</b>
<a class="pull-right"> {{$users->ext}}</a>
</div>
<div class="box-footer">
<b>{{Lang::get('lang.ext')}}</b>
<a class="pull-right"> {{$users->ext}}</a>
</div>
@endif
@if($users->mobile)
<div class="box-footer">
<b>{{Lang::get('lang.mobile')}}</b>
<a class="pull-right"> {{$users->mobile}}</a>
</div>
<div class="box-footer">
<b>{{Lang::get('lang.mobile')}}</b>
<a class="pull-right"> {{$users->mobile}}</a>
</div>
@endif
@if($users->phone_number)
<div class="box-footer">
<b>{{Lang::get('lang.phone')}}</b>
<a class="pull-right"> {{$users->phone_number}}</a>
</div>
<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">
@@ -158,15 +172,329 @@ class="active"
{!! $users->internal_note !!}
</div>
@endif
@if($users->twitterLink()!=="")
<div class="box-footer">
{!! $users->twitterLink() !!}
</div>
@endif
</div>
</div>
<div class="col-md-6 pull-right">
<!-- <div class="box box-primary"> -->
<div class="box-body">
@if(Auth::user()->role == 'admin')
@if($users->role == 'user')
<div class="btn-group">
<button type="button" href="#myPopup" data-rel="popup" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#addNewCategoryModal1">{{Lang::get('lang.change_role_to_agent')}}</button>
</div>
<div class="btn-group">
<button type="button" href="#myPopup" data-rel="popup" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#addNewCategoryModal4">{{Lang::get('lang.change_role_to_admin')}}</button>
</div>
@else
<div class="btn-group">
<button type="button" href="#myPopup" data-rel="popup" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#addNewCategoryModal2">{{Lang::get('lang.change_role_to_user')}}</button>
<!-- <button type="button" class="btn btn-primary" id="role_user">Change Role TO User</button> -->
</div>
<div class="btn-group">
<button type="button" href="#myPopup" data-rel="popup" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#addNewCategoryModal4">{{Lang::get('lang.change_role_to_admin')}}</button>
</div>
@endif
@endif
<a href="{{route('user.edit', $users->id)}}"><button type="button" href="{{route('user.edit', $users->id)}}" class="btn btn-primary btn-sm">{{Lang::get('lang.edit')}}</button></a>
<button type="button" href="#myPopup" data-rel="popup" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#addNewCategoryModal">{{Lang::get('lang.change_password')}}</button>
<button type="button" href="#myPopup" data-rel="popup" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#addNewCategoryModal3">{{Lang::get('lang.delete')}}</button>
<!-- <button type="button" class="btn btn-primary">Delete</button> -->
</div>
</div>
<!-- Delete -->
<form action="{!!URL::route('user.post.delete', $users->id)!!}" method="post" role="form">
<div class="modal fade" id="addNewCategoryModal3" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="titleLabel">Delete Agent</h4>
</div>
<div class="modal-body">
What should be done with content owned by this user?</br>
<?php $user = App\User::where('id', $users->id)->first(); ?>
@if($user->role == 'agent')
{!! Form::label('delete_all_content',Lang::get('lang.delete_all_content')) !!} <span class="text-red"> *</span>
<?php
$open = App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '=', $users->id)->where('status', '=', '1')->get();
?>
<?php $user = App\User::where('id', $users->id)->first(); ?>
<?php
$open = count(App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '=', $users->id)->where('status', '=', '1')->get());
?>
@if(!$open)
<!-- <input type="checkbox" id="delete_checkbox" name="delete_all" value="1" checked> -->
@elseif($open)
<input type="checkbox" id="delete_checkbox" name="delete_all" value="1">
@endif
@endif
<!-- Hi Admin
@if($users->role=='agent')
Assign tickets of the agent will delete?
Create ticket By agent Will Delete?
@elseif($users->role=='user')
Crete ticket by user Will Delete?
@endif -->
<!-- -->
<?php $user = App\User::where('id', $users->id)->first(); ?>
<?php
$open = count(App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '=', $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());
?>
@if($open>0)
<div id="delete_assign_body">
<p>{!! Lang::get('lang.whome_do_you_want_to_assign_ticket') !!}?</p>
<select id="asssign" class="form-control" name="assign_to">
<?php
$assign = App\User::where('role', '!=', 'user')->get();
$count_assign = count($assign);
$teams = App\Model\helpdesk\Agent\Teams::all();
$count_teams = count($teams);
?>
<!-- <optgroup label="Teams ( {!! $count_teams !!} )">
@foreach($teams as $team)
<option value="team_{{$team->id}}">{!! $team->name !!}</option>
@endforeach
</optgroup> -->
<optgroup label="Agents ( {!! $count_assign !!} )">
@foreach($assign as $user)
<option value="user_{{$user->id}}">{{$user->first_name." ".$user->last_name}}</option>
@endforeach
</optgroup>
</select>
</div>
@endif
</div>
</div>
<div class="box-footer">
{!! Form::submit(Lang::get('lang.confirm_deletion'),['class'=>'btn btn-primary'])!!}
</div>
</div>
</div>
</form>
<!-- Role -->
<!-- Admin -->
<form action="{!!URL::route('user.post.rolechangeadmin', $users->id)!!}" method="post" role="form">
<div class="modal fade" id="addNewCategoryModal4" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="titleLabel">{{Lang::get('lang.role_change')}}:</h4>
</div>
<div class="modal-body">
<?php
$groups = App\Model\helpdesk\Agent\Groups::all(array('id', 'name'));
$departments = App\Model\helpdesk\Agent\Department::all(array('id', 'name'));
?>
<!-- <div class="col-xs-4 form-group {{ $errors->has('group') ? 'has-error' : '' }}"> -->
{!! Form::label('assign_group',Lang::get('lang.assigned_group')) !!} <span class="text-red"> *</span>
{!!Form::select('group',[Lang::get('lang.groups')=>$groups->lists('name','id')->toArray()],null,['class' => 'form-control select']) !!}
<!-- </div> -->
<!-- primary dept -->
<!-- <div class="col-xs-4 form-group {{ $errors->has('primary_department') ? 'has-error' : '' }}"> -->
{!! Form::label('primary_dpt',Lang::get('lang.primary_department')) !!} <span class="text-red"> *</span>
{!! Form::select('primary_department', [Lang::get('lang.departments')=>$departments->lists('name','id')->toArray()],null,['class' => 'form-control select']) !!}
<!-- </div> -->
</div>
</div>
<div class="box-footer">
{!! Form::submit(Lang::get('lang.submit'),['class'=>'btn btn-primary'])!!}
</div>
</div>
</div>
</form>
<!-- user -->
<form action="{!!URL::route('user.post.rolechangeuser', $users->id)!!}" method="post" role="form">
<div class="modal fade" id="addNewCategoryModal2" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="titleLabel">{{Lang::get('lang.role_change')}}:</h4>
</div>
<div class="modal-body">
Are u sure?
Role Change Agent To User
</div>
</div>
<div class="box-footer">
{!! Form::submit(Lang::get('lang.submit'),['class'=>'btn btn-primary'])!!}
</div>
</div>
</div>
</form>
<!-- agent -->
<form action="{!!URL::route('user.post.rolechangeagent', $users->id)!!}" method="post" role="form">
<div class="modal fade" id="addNewCategoryModal1" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="titleLabel">{{Lang::get('lang.role_change')}}:</h4>
</div>
<div class="modal-body">
<?php
$groups = App\Model\helpdesk\Agent\Groups::all(array('id', 'name'));
$departments = App\Model\helpdesk\Agent\Department::all(array('id', 'name'));
?>
<!-- <div class="col-xs-4 form-group {{ $errors->has('group') ? 'has-error' : '' }}"> -->
{!! Form::label('assign_group',Lang::get('lang.assigned_group')) !!} <span class="text-red"> *</span>
{!!Form::select('group',[Lang::get('lang.groups')=>$groups->lists('name','id')->toArray()],null,['class' => 'form-control select']) !!}
<!-- </div> -->
<!-- primary dept -->
<!-- <div class="col-xs-4 form-group {{ $errors->has('primary_department') ? 'has-error' : '' }}"> -->
{!! Form::label('primary_dpt',Lang::get('lang.primary_department')) !!} <span class="text-red"> *</span>
{!! Form::select('primary_department', [Lang::get('lang.departments')=>$departments->lists('name','id')->toArray()],null,['class' => 'form-control select']) !!}
<!-- </div> -->
</div>
</div>
<div class="box-footer">
{!! Form::submit(Lang::get('lang.submit'),['class'=>'btn btn-primary'])!!}
</div>
</div>
</div>
</form>
<!-- Change password -->
<div class="modal fade" id="addNewCategoryModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="titleLabel">{{Lang::get('lang.change_password')}}:</h4>
</div>
<div class="modal-body">
<button class="btn btn-warning pull-right" id="changepassword">{{Lang::get('lang.password_generator')}}</button>
<br/>
<form name="myForm" action="{!!URL::route('user.post.changepassword', $users->id)!!}" method="post" role="form" onsubmit="return validateForm()">
<div class="form-group">
<!-- <div class="form-group {{ $errors->has('change_password') ? 'has-error' : '' }}"> -->
{!! Form::label('New password',Lang::get('lang.new_password')) !!} <span class="text-red"> *</span>
<input type="text" class="form-control" name="change_password" id="changepassword1" >
<p id="demo" style="color:red"></p>
<!-- </div> -->
</div>
</div>
</div>
<div class="box-footer">
{!! Form::submit(Lang::get('lang.submit'),['class'=>'btn btn-primary','id'=>'savepassword'])!!}
</div>
</form>
</div>
</div>
<script>
$("#delete_checkbox").click(function () {
// alert('ok');
$("#delete_assign_body").toggle();
});
</script>
<script>
function validateForm() {
var x = document.forms["myForm"]["change_password"].value;
if (x == null || x == "") {
// alert("please enter your password");
document.getElementById("demo").innerHTML = "Enter Password";
return false;
}
}
</script>
<script>
$('#changepassword').click(function () {
$.ajax({
type: 'get',
url: '{{route("user.changepassword")}}',
// data: {settings_approval: settings_approval},
success: function (result) {
// with('success', Lang::get('lang.approval_settings-created-successfully'));
// alert("Hi, testing");
// var x =result;
var sum = result;
document.getElementById("changepassword1").value = sum;
}
});
});
</script>
<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());
$user = App\User::where('id', $users->id)->first();
// dd( $user->role);
if ($users->role != 'user') {
$open = count(App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '=', $users->id)->where('status', '=', '1')->get());
$tickets = App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '=', $users->id)->where('status', '=', '2')->orderBy('id', 'DESC')->paginate(20);
$counted = count(App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '=', $users->id)->where('status', '=', '2')->get());
$deleted = count(App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '=', $users->id)->where('status', '=', '5')->get());
}
if ($users->role == 'user') {
$open = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=', '1')->get());
$tickets = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=', '2')->orderBy('id', 'DESC')->paginate(20);
$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());
// dd($deleted);
}
?>
<div class="row">
<div class="col-md-12">
@@ -228,7 +556,11 @@ class="active"
<th>{!! Lang::get('lang.last_activity') !!}</th>
</thead>
<tbody id="hello">
@if($users->role != 'user')
<?php $tickets = App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '=', $users->id)->where('status', '=', '1')->orderBy('id', 'DESC')->paginate(20); ?>
@elseif($users->role ='user')
<?php $tickets = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=', '1')->orderBy('id', 'DESC')->paginate(20); ?>
@endif
@foreach ($tickets as $ticket)
<tr <?php if ($ticket->seen_by == null) { ?> style="color:green;" <?php }
?> >
@@ -273,14 +605,14 @@ class="active"
$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>
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="{{$ticket->sourceCss()}}"></i>
@if($collab > 0)&nbsp;<i class="fa fa-users"></i>@endif
@if($attach > 0)&nbsp;<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">@if($priority != null)<spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam>@endif</td>
<?php $from = App\User::where('id', '=', $ticket->user_id)->first(); ?>
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! str_limit($username,20) !!}</td>
<td>{!! $assigned !!}</td>
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
</tr>
@@ -347,7 +679,11 @@ class="active"
<th>{!! Lang::get('lang.last_activity') !!}</th>
</thead>
<tbody id="hello">
@if($users->role != 'user')
<?php $tickets = App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '=', $users->id)->where('status', '=', '2')->orderBy('id', 'DESC')->paginate(20); ?>
@elseif($users->role ='user')
<?php $tickets = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=', '2')->orderBy('id', 'DESC')->paginate(20); ?>
@endif
@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>
@@ -398,7 +734,7 @@ class="active"
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first(); ?>
<td class="mailbox-priority">@if($priority != null)<spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam>@endif</td>
<?php $from = App\User::where('id', '=', $ticket->user_id)->first(); ?>
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! str_limit($username,20) !!}</td>
<td>{!! $assigned !!}</td>
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
</tr>
@@ -468,7 +804,11 @@ class="active"
<th>{!! Lang::get('lang.last_activity') !!}</th>
</thead>
<tbody id="hello">
@if($users->role != 'user')
<?php $tickets = App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '=', $users->id)->where('status', '=', '5')->orderBy('id', 'DESC')->paginate(20); ?>
@elseif($users->role ='user')
<?php $tickets = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=', '5')->orderBy('id', 'DESC')->paginate(20); ?>
@endif
@foreach ($tickets as $ticket)
<tr <?php if ($ticket->seen_by == null) { ?> style="color:green;" <?php }
?> >
@@ -520,7 +860,7 @@ class="active"
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first(); ?>
<td class="mailbox-priority">@if($priority != null)<spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam>@endif</td>
<?php $from = App\User::where('id', '=', $ticket->user_id)->first(); ?>
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! str_limit($username,20) !!}</td>
<td>{!! $assigned !!}</td>
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
</tr>
@@ -539,6 +879,7 @@ class="active"
</div><!-- /.col -->
</div> <!-- /.row -->
</div>
@if(Auth::user()->role == 'user')
<div class="row">
<div class="col-md-12">
<link type="text/css" href="{{asset("lb-faveo/css/bootstrap-datetimepicker4.7.14.min.css")}}" rel="stylesheet">
@@ -566,7 +907,7 @@ class="active"
}
?>
<script type="text/javascript">
$(function() {
$(function () {
var timestring1 = "{!! $start_date !!}";
var timestring2 = "{!! date('m/d/Y') !!}";
$('#datepicker4').datetimepicker({
@@ -582,7 +923,7 @@ class="active"
{!! Form::text('end_date',null,['class'=>'form-control','id'=>'datetimepicker3'])!!}
</div>
<script type="text/javascript">
$(function() {
$(function () {
var timestring1 = "{!! $start_date !!}";
var timestring2 = "{!! date('m/d/Y') !!}";
$('#datetimepicker3').datetimepicker({
@@ -619,6 +960,7 @@ class="active"
</div>
</div>
</div>
@endif
<!-- END CUSTOM TABS -->
{{-- MODAL POPUPS --}}
<div class="modal fade" id="create_org">
@@ -630,16 +972,16 @@ class="active"
<h4 class="modal-title">{!! Lang::get('lang.create_organization') !!}</h4>
</div>
<div class="modal-body">
<!-- failure message -->
<!-- failure message -->
<div class="alert alert-danger alert-dismissable" id="alert-danger" style="display:none;">
<i class="fa fa-ban"> </i> <b> {!! Lang::get('lang.alert') !!} ! <span id="get-danger"></span> </b>
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
</div>
</div>
<div class="row" id="hide">
<div class="col-md-4">
<div class="form-group">
<label>{!! Lang::get('lang.name') !!}</label>
<input type="text" name="name" class="form-control">
<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/>
@@ -694,19 +1036,19 @@ class="active"
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<script type="text/javascript">
jQuery(document).ready(function($) {
jQuery(document).ready(function ($) {
// create org
$('#form').on('submit', function() {
$('#form').on('submit', function () {
$.ajax({
type: "POST",
url: "../user-org/{{$users->id}}",
dataType: "html",
data: $(this).serialize(),
beforeSend: function() {
beforeSend: function () {
$("#hide").hide();
$("#show2").show();
},
success: function(response) {
success: function (response) {
$("#show2").hide();
$("#hide").show();
if (response == 0) {
@@ -717,7 +1059,7 @@ class="active"
// $("#show").show();
$("#alert-success").show();
$('#get-success').html(message);
setInterval(function() {
setInterval(function () {
$("#alert-success").hide();
}, 4000);
} else {
@@ -778,19 +1120,19 @@ class="active"
<script type="text/javascript">
// Assign a ticket
jQuery(document).ready(function($) {
jQuery(document).ready(function ($) {
// create org
$('#org_assign').on('submit', function() {
$('#org_assign').on('submit', function () {
$.ajax({
type: "POST",
url: "../user-org-assign/{{$users->id}}",
dataType: "html",
data: $(this).serialize(),
beforeSend: function() {
beforeSend: function () {
$("#hide").hide();
$("#show2").show();
},
success: function(response) {
success: function (response) {
$("#show2").hide();
$("#hide").show();
@@ -802,7 +1144,7 @@ class="active"
// $("#show").show();
$("#alert-success").show();
$('#get-success').html(message);
setInterval(function() {
setInterval(function () {
$("#alert-success").hide();
}, 4000);
}
@@ -812,17 +1154,17 @@ class="active"
});
});
$(function() {
$(function () {
//Enable check and uncheck all functionality
$(".checkbox-toggle").click(function() {
$(".checkbox-toggle").click(function () {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
$(" 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");
$("input[type='checkbox']").iCheck("check");
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
}
$(this).data("clicks", !clicks);
@@ -831,9 +1173,9 @@ class="active"
$(function() {
$(function () {
// Enable check and uncheck all functionality
$(".checkbox-toggle").click(function() {
$(".checkbox-toggle").click(function () {
var clicks = $(this).data('clicks');
if (clicks) {
//Uncheck all checkboxes
@@ -847,8 +1189,8 @@ class="active"
});
$(document).ready(function() { /// Wait till page is loaded
$('#click').click(function() {
$(document).ready(function () { /// Wait till page is loaded
$('#click').click(function () {
$('#refresh').load('open #refresh');
$("#show").show();
});
@@ -856,7 +1198,7 @@ class="active"
$(function() {
$(function () {
$("textarea").wysihtml5();
});
</script>
@@ -865,8 +1207,8 @@ class="active"
</div>
<script src="{{asset("lb-faveo/plugins/chartjs/Chart.min.js")}}" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$.getJSON("../user-agen/<?php echo $users->id; ?>", function(result) {
$(document).ready(function () {
$.getJSON("../user-agen/<?php echo $users->id; ?>", function (result) {
var labels = [], open = [], closed = [], reopened = [], open_total = 0, closed_total = 0, reopened_total = 0;
for (var i = 0; i < result.length; i++) {
labels.push(result[i].date);
@@ -955,10 +1297,10 @@ class="active"
});
});
$('#click me').click(function() {
$('#click me').click(function () {
$('#foo').submit();
});
$('#foo').submit(function(event) {
$('#foo').submit(function (event) {
// get the form data
// there are many ways to get this data using jQuery (you can use the class or id also)
var date1 = $('#datepicker4').val();
@@ -972,7 +1314,7 @@ class="active"
data: formData, // our data object
dataType: 'json', // what type of data do we expect back from the server
success: function(result2) {
success: function (result2) {
var labels = [], open = [], closed = [], reopened = [], open_total = 0, closed_total = 0, reopened_total = 0;
@@ -1111,15 +1453,15 @@ class="active"
});
});
jQuery(document).ready(function() {
jQuery(document).ready(function () {
// Close a ticket
$('#close').on('click', function(e) {
$('#close').on('click', function (e) {
$.ajax({
type: "GET",
url: "agen",
beforeSend: function() {
beforeSend: function () {
},
success: function(response) {
success: function (response) {
}
})
return false;
@@ -1129,4 +1471,3 @@ class="active"
<script src="{{asset("lb-faveo/plugins/moment-develop/moment.js")}}" type="text/javascript"></script>
<script src="{{asset("lb-faveo/js/bootstrap-datetimepicker4.7.14.min.js")}}" type="text/javascript"></script>
@stop
<!-- /content -->

View File

@@ -15,7 +15,7 @@ class="active"
@stop
@section('content')
<script src="{{asset('ckeditor/ckeditor.js')}}"></script>
<script src="{{asset('vendor/unisharp/laravel-ckeditor/ckeditor.js')}}"></script>
{!! Form::open(array('action' => 'Agent\kb\ArticleController@store' , 'method' => 'post') )!!}
<div class="row">
<div class="content-header">
@@ -88,11 +88,11 @@ class="active"
{!! Form::textarea('description',null,['class' => 'form-control','id'=>'editor','size' => '128x20','placeholder'=>Lang::get('lang.enter_the_description')]) !!}
</div>
<script>
CKEDITOR.replace( 'editor', {
filebrowserImageBrowseUrl: '{{url("laravel-filemanager?type=Images")}}',
filebrowserImageUploadUrl: '{{url("laravel-filemanager/upload?type=Images")}}',
filebrowserBrowseUrl: '{{url("laravel-filemanager?type=Files")}}',
filebrowserUploadUrl: '{{url("laravel-filemanager/upload?type=Files")}}'
CKEDITOR.replace( 'description', {
filebrowserImageBrowseUrl: "{{url('laravel-filemanager?type=Images')}}",
filebrowserImageUploadUrl: "{{url('laravel-filemanager/upload?type=Images')}}",
filebrowserBrowseUrl: "{{url('laravel-filemanager?type=Files')}}",
filebrowserUploadUrl: "{{url('laravel-filemanager/upload?type=Files')}}"
});
</script>
</div>

View File

@@ -15,7 +15,7 @@ class="active"
@stop
@section('content')
<script src="{{asset('ckeditor/ckeditor.js')}}"></script>
<script src="{{asset('vendor/unisharp/laravel-ckeditor/ckeditor.js')}}"></script>
{!! Form::model($article,['url' => 'article/'.$article->id , 'method' => 'PATCH'] )!!}
<div class="row">
<div class="content-header">
@@ -85,14 +85,13 @@ class="active"
{!! Form::textarea('description',$article->description,['class' => 'form-control','id'=>'editor','size' => '128x20','placeholder'=>Lang::get('lang.enter_the_description')]) !!}
</div>
<script>
CKEDITOR.config.allowedContent = true;
CKEDITOR.replace('editor', {
filebrowserImageBrowseUrl: '{{url("laravel-filemanager?type=Images")}}',
filebrowserImageUploadUrl: '{{url("laravel-filemanager/upload?type=Images")}}',
filebrowserBrowseUrl: '{{url("laravel-filemanager?type=Files")}}',
filebrowserUploadUrl: '{{url("laravel-filemanager/upload?type=Files")}}'
});
</script>
CKEDITOR.replace( 'description', {
filebrowserImageBrowseUrl: "{{url('laravel-filemanager?type=Images')}}",
filebrowserImageUploadUrl: "{{url('laravel-filemanager/upload?type=Images')}}",
filebrowserBrowseUrl: "{{url('laravel-filemanager?type=Files')}}",
filebrowserUploadUrl: "{{url('laravel-filemanager/upload?type=Files')}}"
});
</script>
</div>
</div>
</div>

View File

@@ -34,12 +34,9 @@ class="active"
<div class="row">
<div class="col-sm-12">
{!! Datatable::table()
->addColumn(Lang::get('lang.name'),
Lang::get('lang.email'),
Lang::get('lang.website'),
->addColumn(Lang::get('lang.details'),
Lang::get('lang.comment'),
Lang::get('lang.status'),
Lang::get('lang.created'),
Lang::get('lang.action')) // these are the column headings to be shown
->setUrl(route('api.comment')) // this is the route where data will be retrieved
->render() !!}

View File

@@ -24,7 +24,6 @@
<link href="{{asset("lb-faveo/css/jquerysctipttop.css")}}" rel="stylesheet" type="text/css"/>
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<link href="{{asset("lb-faveo/css/editor.css")}}" rel="stylesheet" type="text/css"/>
<link href="{{asset("lb-faveo/css/jquery.ui.css")}}" rel="stylesheet" rel="stylesheet"/>
@@ -40,8 +39,11 @@
<link href="{{asset("lb-faveo/css/jquery.rating.css")}}" rel="stylesheet" type="text/css" />
<!-- Select2 -->
<link href="{{asset("lb-faveo/plugins/select2/select2.min.css")}}" rel="stylesheet" type="text/css" />
<!-- autocomplete -->
<link href="{{asset("lb-faveo/css/autocomplete.css")}}" rel="stylesheet" type="text/css" />
<!--Daterangepicker-->
<link rel="stylesheet" href="{{asset("lb-faveo/plugins/daterangepicker/daterangepicker.css")}}" rel="stylesheet" type="text/css" />
<!--calendar -->
<!-- fullCalendar 2.2.5-->
<link href="{{asset('lb-faveo/plugins/fullcalendar/fullcalendar.min.css')}}" rel="stylesheet" type="text/css" />
<!--[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>
@@ -94,11 +96,14 @@
<div class="collapse navbar-collapse" id="navbar-collapse">
@if($replacetop==0)
<ul class="tabs tabs-horizontal nav navbar-nav navbar-left">
<li @yield('Dashboard')><a data-target="#tabA" href="{{URL::route('dashboard')}}" onclick="clickDashboard();">{!! Lang::get('lang.dashboard') !!}</a></li>
<li @yield('Dashboard')><a id="dash" data-target="#tabA" href="{{URL::route('dashboard')}}" onclick="clickDashboard(event);">{!! Lang::get('lang.dashboard') !!}</a></li>
<li @yield('Users')><a data-target="#tabB" href="#">{!! Lang::get('lang.users') !!}</a></li>
<li @yield('Tickets')><a data-target="#tabC" href="#">{!! Lang::get('lang.tickets') !!}</a></li>
<li @yield('Tools')><a data-target="#tabD" href="#">{!! Lang::get('lang.tools') !!}</a></li>
@if(Auth::user()->role == 'admin')
<li @yield('Report')><a href="{{URL::route('report.index')}}" onclick="clickReport(event);">Report</a></li>
@endif
<?php \Event::fire('calendar.topbar', array()); ?>
</ul>
@else
<?php \Event::fire('service.desk.agent.topbar', array()); ?>
@@ -215,9 +220,7 @@
<div class="col-xs-3"></div>
<div class="col-xs-2" style="width:50%;">
<a href="{!! url('profile') !!}">
<img src="{{Auth::user()->profile_pic}}" class="img-circle" alt="User Image" />
</a>
</div>
</div>
@@ -250,16 +253,23 @@
<li class="header">{!! Lang::get('lang.Tickets') !!}</li>
<?php
if (Auth::user()->role == 'admin') {
//$inbox = App\Model\helpdesk\Ticket\Tickets::all();
$myticket = App\Model\helpdesk\Ticket\Tickets::where('assigned_to', Auth::user()->id)->where('status', '1')->get();
$unassigned = App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '=', null)->where('status', '=', '1')->get();
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '1')->get();
$tickets = App\Model\helpdesk\Ticket\Tickets::whereIn('status', array(1, 7))->get();
$closingapproval = App\Model\helpdesk\Ticket\Tickets::where('status', '7')->get();
$deleted = App\Model\helpdesk\Ticket\Tickets::where('status', '5')->get();
} elseif (Auth::user()->role == 'agent') {
//$inbox = App\Model\helpdesk\Ticket\Tickets::where('dept_id','',Auth::user()->primary_dpt)->get();
$myticket = App\Model\helpdesk\Ticket\Tickets::where('assigned_to', Auth::user()->id)->where('status', '1')->get();
$unassigned = App\Model\helpdesk\Ticket\Tickets::where('assigned_to', '=', null)->where('status', '=', '1')->where('dept_id', '=', Auth::user()->primary_dpt)->get();
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '1')->where('dept_id', '=', Auth::user()->primary_dpt)->get();
$tickets = App\Model\helpdesk\Ticket\Tickets::whereIn('status', array(1, 7))->where('dept_id', '=', Auth::user()->primary_dpt)->get();
$closingapproval = App\Model\helpdesk\Ticket\Tickets::where('status', '7')->get();
$deleted = App\Model\helpdesk\Ticket\Tickets::where('status', '5')->where('dept_id', '=', Auth::user()->primary_dpt)->get();
}
if (Auth::user()->role == 'agent') {
@@ -292,27 +302,40 @@
}
?>
<li @yield('inbox')>
<a href="{{ url('/ticket/inbox')}}" id="load-inbox">
<i class="fa fa-envelope"></i> <span>{!! Lang::get('lang.inbox') !!}</span> <small class="label pull-right bg-green"><?php echo count($tickets); ?></small> </a>
<a href="{{ url('/ticket/inbox')}}" id="load-inbox">
<i class="fa fa-envelope"></i> <span>{!! Lang::get('lang.inbox') !!}</span> <small class="label pull-right bg-green"><?php echo count($tickets); ?></small>
</a>
</li>
<li @yield('myticket')>
<a href="{{url('ticket/myticket')}}" id="load-myticket">
<a href="{{url('ticket/myticket')}}" id="load-myticket">
<i class="fa fa-user"></i> <span>{!! Lang::get('lang.my_tickets') !!} </span>
<small class="label pull-right bg-green">{{count($myticket)}}</small>
</a>
</li>
<li @yield('unassigned')>
<a href="{{url('unassigned')}}" id="load-unassigned">
<a href="{{url('unassigned')}}" id="load-unassigned">
<i class="fa fa-th"></i> <span>{!! Lang::get('lang.unassigned') !!}</span>
<small class="label pull-right bg-green">{{count($unassigned)}}</small>
</a>
</li>
<li @yield('overdue')>
<a href="{{url('ticket/overdue')}}" id="load-unassigned">
<a href="{{url('ticket/overdue')}}" id="load-unassigned">
<i class="fa fa-calendar-times-o"></i> <span>{!! Lang::get('lang.overdue') !!}</span>
<small class="label pull-right bg-green">{{$overdue_ticket}}</small>
</a>
</li>
<?php
$settings = App\Model\helpdesk\Settings\Approval::where('id','=',1)->first();
// dd($settings);
?>
{{--@if($settings->status == 1)
<li @yield('approval')>
<a href="{{url('ticket/approval/closed')}}" id="load-unassigned">
<i class="fa fa fa-bell"></i> <span>{!! Lang::get('lang.approval') !!}</span>
<small class="label pull-right bg-green">{{count($closingapproval)}}</small>
</a>
</li>
@endif--}}
<li @yield('trash')>
<a href="{{url('trash')}}">
<i class="fa fa-trash-o"></i> <span>{!! Lang::get('lang.trash') !!}</span>
@@ -356,7 +379,6 @@
<?php }
}
?>
@endif
<?php \Event::fire('service.desk.agent.sidebar', array()); ?>
</ul>
@@ -366,7 +388,6 @@
<?php
$agent_group = Auth::user()->assign_group;
$group = App\Model\helpdesk\Agent\Groups::where('id', '=', $agent_group)->where('group_status', '=', '1')->first();
// dd($group);
?>
<!-- Right side column. Contains the navbar and content of the page -->
<div class="content-wrapper">
@@ -392,7 +413,9 @@
<li id="bar" @yield('myticket')><a href="{{ url('/ticket/myticket')}}" >{!! Lang::get('lang.my_tickets') !!}</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')}}" id="load-assigned" >{!! Lang::get('lang.assigned') !!}</a></li>
<li id="bar" @yield('approvel')><a href="{{ url('ticket/approval/closed')}}" >{!! Lang::get('lang.approval') !!}</a></li>
<li id="bar" @yield('closed')><a href="{{ url('/ticket/closed')}}" >{!! Lang::get('lang.closed') !!}</a></li>
<?php if ($group->can_create_ticket == 1) { ?>
<li id="bar" @yield('newticket')><a href="{{ url('/newticket')}}" >{!! Lang::get('lang.create_ticket') !!}</a></li>
@@ -402,25 +425,23 @@
<div class="tabs-pane @yield('tools-bar')" id="tabD">
<ul class="nav navbar-nav">
<li id="bar" @yield('tools')><a href="{{ url('/canned/list')}}" >{!! Lang::get('lang.canned_response') !!}</a></li>
@if(Auth::user()->role == 'admin')
<li id="bar" @yield('kb')><a href="{{ url('/comment')}}" >{!! Lang::get('lang.knowledge_base') !!}</a></li>
@endif
</ul>
</div>
@if(Auth::user()->role == 'admin')
<div class="tabs-pane @yield('report-bar')" id="tabD">
<ul class="nav navbar-nav">
</ul>
</div>
@endif
@endif
<?php \Event::fire('service.desk.agent.topsubbar', array()); ?>
</div>
</div>
</div>
<section class="content-header">
<!--<div class="row">-->
<!--<div class="col-md-6">-->
@yield('PageHeader')
<!--</div>-->
<!--<div class="pull-right">-->
{!! Breadcrumbs::renderIfExists() !!}
<!--</div>-->
<!--</div>-->
</section>
<!-- Main content -->
<section class="content">
@@ -435,7 +456,6 @@
</footer>
</div><!-- ./wrapper -->
<script src="{{asset("lb-faveo/js/ajax-jquery.min.js")}}" type="text/javascript"></script>
<script src="{{asset("lb-faveo/js/bootstrap-datetimepicker4.7.14.min.js")}}" type="text/javascript"></script>
@@ -447,6 +467,7 @@
<script src="{{asset("lb-faveo/plugins/fastclick/fastclick.min.js")}}" type="text/javascript"></script>
<!-- AdminLTE App -->
<script src="{{asset("lb-faveo/js/app.min.js")}}" type="text/javascript"></script>
<!-- iCheck -->
<script src="{{asset("lb-faveo/plugins/iCheck/icheck.min.js")}}" type="text/javascript"></script>
<!-- jquery ui -->
@@ -465,10 +486,11 @@
<script src="{{asset("lb-faveo/plugins/select2/select2.full.min.js")}}" type="text/javascript"></script>
<script src="{{asset("lb-faveo/plugins/moment/moment.js")}}" type="text/javascript"></script>
<!-- full calendar-->
<script src="{{asset('lb-faveo/plugins/fullcalendar/fullcalendar.min.js')}}" type="text/javascript"></script>
<script src="{{asset('lb-faveo/plugins/daterangepicker/daterangepicker.js')}}" type="text/javascript"></script>
<script>
$(document).ready(function () {
$('.noti_User').click(function () {
var id = this.id;
var dataString = 'id=' + id;
@@ -480,7 +502,6 @@
cache: false,
success: function (html)
{
}
});
});
@@ -555,10 +576,23 @@
});
</script>
<script type="text/javascript">
function clickDashboard() {
window.location = "{{URL::route('dashboard')}}";
function clickDashboard(e) {
if (e.ctrlKey === true) {
window.open('{{URL::route("dashboard")}}', '_blank');
} else {
window.location = "{{URL::route('dashboard')}}";
}
}
function clickReport(e) {
if (e.ctrlKey === true) {
window.open('{{URL::route("report.index")}}', '_blank');
} else {
window.location = "{{URL::route('report.index')}}";
}
}
</script>
<?php Event::fire('show.calendar.script', array()); ?>
<?php Event::fire('load-calendar-scripts', array()); ?>
@yield('FooterInclude')
</body>
</html>