bug-fix-patch

# not sending diagnostic mail while configuring system mail
# correct due today ticket count in agent panel
# iframe height in client panel ticket pages
# Removed place holder in client profile edit
# reload page while after edit/assign/surrender tickets
This commit is contained in:
Manish Verma
2016-11-29 18:05:23 +05:30
parent cb1402f481
commit e878835ae3
5 changed files with 44 additions and 38 deletions

View File

@@ -75,7 +75,7 @@ class EmailsController extends Controller
// fetch all the departments from the department table
$departments = $department->get();
// fetch all the helptopics from the helptopic table
$helps = $help->get();
$helps = $help->where('status', '=', 1)->get();
// fetch all the types of active priority from the ticket_priority table
$priority = $ticket_priority->where('status', '=', 1)->get();
// fetch all the types of mailbox protocols from the mailbox_protocols table
@@ -114,7 +114,7 @@ class EmailsController extends Controller
}
if ($request->input('sending_status') === 'on') {
$this->emailService($service, $service_request);
$send = $this->sendDiagnoEmail($request);
$send = $this->checkMail($request);
}
if ($send == 1 && $fetch == 1) {
$this->store($request, $service_request, $id);
@@ -318,7 +318,7 @@ class EmailsController extends Controller
//get count of emails
$count = $email->count();
// get all the helptopic
$helps = $help->get();
$helps = $help->where('status', '=', 1)->get();
// get all active the priority
$priority = $ticket_priority->where('status', '=', 1)->get();
// get all the mailbox protocols
@@ -638,4 +638,25 @@ class EmailsController extends Controller
$controller = new \App\Http\Controllers\Agent\helpdesk\MailController($TicketWorkflowController);
$controller->fetch($email);
}
public function checkMail($request) {
$mailservice_id = $request->input('sending_protocol');
$driver = $this->getDriver($mailservice_id);
$username = $request->input('email_address');
$password = $request->input('password');
$name = $request->input('email_name');
$host = $request->input('sending_host');
$port = $request->input('sending_port');
$enc = $request->input('sending_encryption');
$service_request = $request->except('sending_status', '_token', 'email_address', 'email_name', 'password', 'department', 'priority', 'help_topic', 'fetching_protocol', 'fetching_host', 'fetching_port', 'fetching_encryption', 'imap_authentication', 'sending_protocol', 'sending_host', 'sending_port', 'sending_encryption', 'smtp_authentication', 'internal_notes', '_wysihtml5_mode');
$this->emailService($driver, $service_request);
$this->setMailConfig($driver, $username, $name, $password, $enc, $host, $port);
$transport = \Swift_SmtpTransport::newInstance($host, $port, $enc);
$transport->setUsername($username);
$transport->setPassword($password);
$mailer = \Swift_Mailer::newInstance($transport);
$mailer->getTransport()->start();
return 1;
}
}

View File

@@ -83,7 +83,7 @@ class="active"
}
?>
<?php
if (Auth::user()->role == 'admin' || Auth::user()->role == 'agent') {
if (Auth::user()->role == 'admin') {
$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();

View File

@@ -1528,13 +1528,14 @@ if ($thread->title != "") {
$("#show").hide();
$("#hide").show();
if (response == 0) {
message = "{!! Lang::get('lang.ticket_updated_successfully') !!}"
$("#dismis").trigger("click");
$("#refresh1").load("../thread/{{$tickets->id}} #refresh1");
$("#refresh2").load("../thread/{{$tickets->id}} #refresh2");
$("#alert11").show();
$('#message-success1').html(message);
setInterval(function(){$("#alert11").hide(); }, 4000);
location.reload();
// message = "{!! Lang::get('lang.ticket_updated_successfully') !!}"
// $("#dismis").trigger("click");
// $("#refresh1").load("../thread/{{$tickets->id}} #refresh1");
// $("#refresh2").load("../thread/{{$tickets->id}} #refresh2");
// $("#alert11").show();
// $('#message-success1').html(message);
// setInterval(function(){$("#alert11").hide(); }, 4000);
}
else if (response == 1) {
$("#error-subject").show();
@@ -1573,7 +1574,7 @@ if ($thread->title != "") {
// var message = "Success";
// $('#message-success1').html(message);
// setInterval(function(){$("#alert11").hide(); },4000);
location.reload();
var message = "Success!";
$("#alert11").show();
$('#message-success1').html(message);
@@ -1868,6 +1869,7 @@ if ($thread->title != "") {
if (response == 1)
{
location.reload();
// alert('ticket has been un assigned');
var message = "{!! Lang::get('lang.you_have_unassigned_your_ticket') !!}";
$("#alert11").show();

View File

@@ -224,27 +224,10 @@ foreach ($conversations as $conversation) {
<div class="comment-content">
@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>
<script type="text/javascript">
jQuery(document).ready(function () {
jQuery('.embed-responsive-16by9').css('height','auto');
jQuery('.embed-responsive-16by9').css('padding','0');
jQuery('#loader_frame{{$conversation->id}}').css('width','100%');
jQuery('#loader_frame{{$conversation->id}}').css('position','static');
jQuery('#loader_frame{{$conversation->id}}').css('border','none');
var mydiv = jQuery('#loader_frame{{$conversation->id}}').contents().find("body");
var h = mydiv.height();
jQuery('#loader_frame{{$conversation->id}}').css('height', h+20);
setInterval(function(){
h = jQuery('#loader_frame{{$conversation->id}}').height();
if (!!navigator.userAgent.match(/Trident\/7\./)){
jQuery('#loader_frame{{$conversation->id}}').css('height', h);
}else{
jQuery('#loader_frame{{$conversation->id}}').css('height', h);
}
}, 2000);
});
</script>
<iframe id="loader_frame{{$conversation->id}}" class="embed-responsive-item" onload="iframeLoaded()">Body of html email here</iframe>
<script>
$('#loader_frame{{$conversation->id}}')[0].contentDocument.body.innerHTML = '{!!$conversation->purify()!!}';
</script>
</div>
<script>
setTimeout(function(){

View File

@@ -64,10 +64,10 @@ class="active"
{!! Form::label('gender',Lang::get('lang.gender')) !!}
<div class="row">
<div class="col-xs-3">
{!! Form::radio('gender','1',true) !!}{{Lang::get('lang.male')}}
{!! Form::radio('gender','1',true) !!} {{Lang::get('lang.male')}}
</div>
<div class="col-xs-3">
{!! Form::radio('gender','0') !!}{{Lang::get('lang.female')}}
{!! Form::radio('gender','0') !!} {{Lang::get('lang.female')}}
</div>
</div>
</div>
@@ -150,21 +150,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',['placeholder'=>'Password','class' => 'form-control']) !!}
{!! Form::password('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',['placeholder'=>'New Password','class' => 'form-control']) !!}
{!! Form::password('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>
<!-- cofirm 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',['placeholder'=>'Confirm Password','class' => 'form-control']) !!}
{!! Form::password('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>