Existing bugs commits squashed
validation-bugsnag-email auto-update datatables adding-engine backup fixes Apply fixes from StyleCI duedate fixes Apply fixes from StyleCI style-changes changes Apply fixes from StyleCI changes-n Apply fixes from StyleCI manual-update database:sync issues bugfixes mail Apply fixes from StyleCI Apply fixes from StyleCI
This commit is contained in:

committed by
RafficMohammed

parent
2ae90d7fcb
commit
0654723809
@@ -36,6 +36,7 @@ use App\Model\helpdesk\Utility\Date_time_format;
|
||||
use App\Model\helpdesk\Utility\Timezones;
|
||||
use App\User;
|
||||
use Auth;
|
||||
use Carbon\Carbon;
|
||||
use Chumper\Datatable\Facades\DatatableFacade;
|
||||
use Crypt;
|
||||
use DB;
|
||||
@@ -162,7 +163,7 @@ class TicketController extends Controller
|
||||
}
|
||||
}
|
||||
//create user
|
||||
$result = $this->create_user($email, $fullname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source->id, $headers, $help->department, $assignto, $form_data, $auto_response, $status);
|
||||
$result = $this->create_user($email, $fullname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source->id, $headers, $help->department, $assignto, $form_data, $auto_response, $status, $duedate);
|
||||
if ($result[1]) {
|
||||
$status = $this->checkUserVerificationStatus();
|
||||
if ($status == 1) {
|
||||
@@ -630,7 +631,7 @@ class TicketController extends Controller
|
||||
*
|
||||
* @return type bool
|
||||
*/
|
||||
public function create_user($emailadd, $username, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $from_data, $auto_response, $status)
|
||||
public function create_user($emailadd, $username, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $from_data, $auto_response, $status, $duedate = null)
|
||||
{
|
||||
// define global variables
|
||||
|
||||
@@ -714,7 +715,7 @@ class TicketController extends Controller
|
||||
$user_id = $checkemail->id;
|
||||
}
|
||||
event(new \App\Events\ClientTicketFormPost($from_data, $emailadd, $source));
|
||||
$ticket_number = $this->check_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $from_data, $status);
|
||||
$ticket_number = $this->check_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $from_data, $status, $duedate);
|
||||
|
||||
$ticket_number2 = $ticket_number[0];
|
||||
$ticketdata = Tickets::where('ticket_number', '=', $ticket_number2)->first();
|
||||
@@ -912,7 +913,7 @@ class TicketController extends Controller
|
||||
*
|
||||
* @return type string
|
||||
*/
|
||||
public function check_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $form_data, $status)
|
||||
public function check_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $form_data, $status, $duedate = null)
|
||||
{
|
||||
$read_ticket_number = explode('[#', $subject);
|
||||
if (isset($read_ticket_number[1])) {
|
||||
@@ -965,12 +966,12 @@ class TicketController extends Controller
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$ticket_number = $this->createTicket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $form_data, $status);
|
||||
$ticket_number = $this->createTicket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $form_data, $status, $duedate);
|
||||
|
||||
return [$ticket_number, 0];
|
||||
}
|
||||
} else {
|
||||
$ticket_number = $this->createTicket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $form_data, $status);
|
||||
$ticket_number = $this->createTicket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $form_data, $status, $duedate);
|
||||
|
||||
return [$ticket_number, 0];
|
||||
}
|
||||
@@ -988,7 +989,7 @@ class TicketController extends Controller
|
||||
*
|
||||
* @return type string
|
||||
*/
|
||||
public function createTicket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $form_data, $status)
|
||||
public function createTicket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $form_data, $status, $duedate = null)
|
||||
{
|
||||
$ticket_number = '';
|
||||
$max_number = Tickets::whereRaw('id = (select max(`id`) from tickets)')->first();
|
||||
@@ -1036,9 +1037,21 @@ class TicketController extends Controller
|
||||
$ticket->save();
|
||||
|
||||
$sla_plan = Sla_plan::where('id', '=', $sla)->first();
|
||||
$ovdate = $ticket->created_at;
|
||||
$new_date = date_add($ovdate, date_interval_create_from_date_string($sla_plan->grace_period));
|
||||
$ticket->duedate = $new_date;
|
||||
if ($duedate) {
|
||||
$duedate_datetime = Carbon::createFromFormat('d/m/Y', $duedate);
|
||||
|
||||
$grace_period = $sla_plan->grace_period;
|
||||
$grace_interval = \DateInterval::createFromDateString($grace_period);
|
||||
$duedate_datetime->add($grace_interval);
|
||||
|
||||
// Format the due date with time
|
||||
$due_formatted = $duedate_datetime->format('Y-m-d H:i:s');
|
||||
$ticket->duedate = $due_formatted;
|
||||
} else {
|
||||
$ovdate = $ticket->created_at;
|
||||
$new_date = date_add($ovdate, date_interval_create_from_date_string($sla_plan->grace_period));
|
||||
$ticket->duedate = $new_date;
|
||||
}
|
||||
$ticket->save();
|
||||
|
||||
$ticket_number = $ticket->ticket_number;
|
||||
@@ -2344,13 +2357,20 @@ class TicketController extends Controller
|
||||
{
|
||||
$ticketid = $request->input('ticketid');
|
||||
$ticket = Tickets::find($ticketid);
|
||||
$firstThread = $ticket->thread()->select('user_id', 'poster', 'body')->first();
|
||||
$lastThread = $ticket->thread()->select('user_id', 'poster', 'body')->orderBy('id', 'desc')->first();
|
||||
if ($ticket) {
|
||||
$threads = $ticket->thread()->select('user_id', 'poster', 'body')->get();
|
||||
$numThreads = $threads->count();
|
||||
$tooltip = '';
|
||||
|
||||
return '<b>'.$firstThread->user->user_name.' ('.$firstThread->poster.')</b></br>'
|
||||
.$firstThread->purify().'<br><hr>'
|
||||
.'<b>'.$lastThread->user->user_name.'('.$lastThread->poster.')</b>'
|
||||
.$lastThread->purify().'<br><hr>';
|
||||
foreach ($threads as $thread) {
|
||||
$tooltip .= '<b>'.$thread->user->user_name.' ('.$thread->poster.')</b></br>'
|
||||
.$thread->purify().'<br><hr>';
|
||||
}
|
||||
|
||||
$tooltip .= 'This ticket has '.$numThreads.' threads.';
|
||||
|
||||
return $tooltip;
|
||||
}
|
||||
}
|
||||
|
||||
//Auto-close tickets
|
||||
|
@@ -84,14 +84,14 @@ return [
|
||||
'array' => 'The :attribute must not have more than :value items.',
|
||||
'file' => 'The :attribute must be less than or equal to :value kilobytes.',
|
||||
'numeric' => 'The :attribute must be less than or equal to :value.',
|
||||
'string' => 'The :attribute must be less than or equal to :value characters.',
|
||||
'string' => 'The :attribute must not be greater than :max characters.',
|
||||
],
|
||||
'mac_address' => 'The :attribute must be a valid MAC address.',
|
||||
'max' => [
|
||||
'array' => 'The :attribute must not have more than :max items.',
|
||||
'file' => 'The :attribute must not be greater than :max kilobytes.',
|
||||
'numeric' => 'The :attribute must not be greater than :max.',
|
||||
'string' => 'The :attribute must not be greater than :max characters.',
|
||||
'string' => 'The ISO-CODE is invalid',
|
||||
],
|
||||
'max_digits' => 'The :attribute must not have more than :max digits.',
|
||||
'mimes' => 'The :attribute must be a file of type: :values.',
|
||||
|
0
public/lb-faveo/adminlte3.2.0/css-1/adminlte3.2.0.min.css
vendored
Normal file
0
public/lb-faveo/adminlte3.2.0/css-1/adminlte3.2.0.min.css
vendored
Normal file
@@ -66,26 +66,26 @@ $bootstrapPermission = substr(sprintf('%o', fileperms($basePath.DIRECTORY_SEPARA
|
||||
<tr>
|
||||
<td>storage</td>
|
||||
<?php if ($storagePermission >= 755) {
|
||||
?>
|
||||
?>
|
||||
<td style='color:green'><?= $storagePermission; ?></td>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
} else {
|
||||
?>
|
||||
<td style='color:red'><?= $storagePermission; ?> (Directory should be writable by your web server or Faveo will not run. Give preferred permissions as 755 for directory and 644 for files.)</td>
|
||||
<?php
|
||||
} ?>
|
||||
} ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>bootstrap/cache</td>
|
||||
<?php if ($bootstrapPermission >= 755) {
|
||||
?>
|
||||
?>
|
||||
<td style='color:green'><?= $bootstrapPermission; ?></td>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
} else {
|
||||
?>
|
||||
<td style='color:red'><?= $bootstrapPermission; ?> (Directory should be writable by your web server or Faveo will not run. Give preferred permissions as 755 for directory and 644 for files.)</td>
|
||||
<?php
|
||||
} ?>
|
||||
} ?>
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
@@ -95,18 +95,18 @@ $bootstrapPermission = substr(sprintf('%o', fileperms($basePath.DIRECTORY_SEPARA
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
<?php
|
||||
foreach ($extensions as $extension) {
|
||||
echo '<tr>';
|
||||
if (!extension_loaded($extension)) {
|
||||
echo '<td>'.$extension."</td> <td style='color:red'>Not Enabled"
|
||||
."<p>To enable this, please open '".php_ini_loaded_file()."' and add 'extension = ".$extension."'</p>"
|
||||
.'</td>';
|
||||
} else {
|
||||
echo '<td>'.$extension."</td> <td style='color:green'>Enabled</td>";
|
||||
}
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
foreach ($extensions as $extension) {
|
||||
echo '<tr>';
|
||||
if (!extension_loaded($extension)) {
|
||||
echo '<td>'.$extension."</td> <td style='color:red'>Not Enabled"
|
||||
."<p>To enable this, please open '".php_ini_loaded_file()."' and add 'extension = ".$extension."'</p>"
|
||||
.'</td>';
|
||||
} else {
|
||||
echo '<td>'.$extension."</td> <td style='color:green'>Enabled</td>";
|
||||
}
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<br/>
|
||||
<table class="t01">
|
||||
@@ -115,30 +115,30 @@ $bootstrapPermission = substr(sprintf('%o', fileperms($basePath.DIRECTORY_SEPARA
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
<?php
|
||||
echo '<tr>';
|
||||
if (version_compare(phpversion(), '7.1') == -1 || version_compare('7.1.50', phpversion()) == -1) {
|
||||
echo "<td>PHP Version</td> <td style='color:red'>".phpversion().'<p>Recommended PHP version 7.1</p></td>';
|
||||
} else {
|
||||
echo "<td>PHP Version</td> <td style='color:green'>".phpversion().'</td>';
|
||||
}
|
||||
echo '</tr>';
|
||||
echo '<tr>';
|
||||
$env = '../.env';
|
||||
if (!is_file($env)) {
|
||||
echo "<td>.env file</td> <td style='color:green'>Not found</td>";
|
||||
} else {
|
||||
echo "<td>.env file</td> <td style='color:red'>Yes Found<p>Please delete '$env' </p></td>";
|
||||
}
|
||||
echo '</tr>';
|
||||
echo '<tr>';
|
||||
$redirect = in_array('mod_rewrite', apache_get_modules());
|
||||
if ($redirect) {
|
||||
echo "<td>Rewrite Engine (User friendly URL)</td> <td style='color:green'>ON</td>";
|
||||
} else {
|
||||
echo "<td>Rewrite Engine (User friendly URL)</td> <td style='color:red'>OFF</td>";
|
||||
}
|
||||
echo '</tr>';
|
||||
?>
|
||||
echo '<tr>';
|
||||
if (version_compare(phpversion(), '7.1') == -1 || version_compare('7.1.50', phpversion()) == -1) {
|
||||
echo "<td>PHP Version</td> <td style='color:red'>".phpversion().'<p>Recommended PHP version 7.1</p></td>';
|
||||
} else {
|
||||
echo "<td>PHP Version</td> <td style='color:green'>".phpversion().'</td>';
|
||||
}
|
||||
echo '</tr>';
|
||||
echo '<tr>';
|
||||
$env = '../.env';
|
||||
if (!is_file($env)) {
|
||||
echo "<td>.env file</td> <td style='color:green'>Not found</td>";
|
||||
} else {
|
||||
echo "<td>.env file</td> <td style='color:red'>Yes Found<p>Please delete '$env' </p></td>";
|
||||
}
|
||||
echo '</tr>';
|
||||
echo '<tr>';
|
||||
$redirect = in_array('mod_rewrite', apache_get_modules());
|
||||
if ($redirect) {
|
||||
echo "<td>Rewrite Engine (User friendly URL)</td> <td style='color:green'>ON</td>";
|
||||
} else {
|
||||
echo "<td>Rewrite Engine (User friendly URL)</td> <td style='color:red'>OFF</td>";
|
||||
}
|
||||
echo '</tr>';
|
||||
?>
|
||||
</table>
|
||||
<p style='color:red;'>NOTE: Please delete the file 'probe.php' once you have fixed all the issues.</p>
|
||||
</div>
|
||||
|
@@ -51,7 +51,7 @@
|
||||
|
||||
<div class="alert alert-dismissable" style="background: #F3F3F3">
|
||||
<i class="fas fa-info-circle"></i> {!!Lang::get('lang.crone-url-message')!!}
|
||||
<a href="https://www.support.faveohelpdesk.com/show/cron-job-scheduling" style="color:black" target="blank">{!!Lang::get('lang.click')!!}</a> {!!Lang::get('lang.check-cron-set')!!}
|
||||
<a href="https://support.faveohelpdesk.com/show/how-to-configure-cron-jobs-in-faveo" style="color:black" target="blank">{!!Lang::get('lang.click')!!}</a> {!!Lang::get('lang.check-cron-set')!!}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
@@ -15,12 +15,22 @@ class="nav-link active"
|
||||
@section('ticket')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
<style>
|
||||
.clear-input {
|
||||
position: absolute;
|
||||
top: 20%;
|
||||
right: 5%;
|
||||
bottom: 0;
|
||||
width: 30px;
|
||||
margin: auto;
|
||||
}
|
||||
</style>
|
||||
@section('PageHeader')
|
||||
<h1>{{Lang::get('lang.tickets')}}</h1>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
||||
<!-- Main content -->
|
||||
{!! Form::open(['route'=>'post.newticket','method'=>'post','id'=>'form']) !!}
|
||||
@if(Session::has('success'))
|
||||
@@ -191,6 +201,7 @@ class="active"
|
||||
<div class="form-group" id="duedate">
|
||||
<label>{!! Lang::get('lang.due_date') !!}:</label>
|
||||
{!! Form::text('duedate',null,['class' => 'form-control','id'=>'datemask']) !!}
|
||||
<button class="btn clear-input" id="duedates" style="display: none" type="button"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
@@ -351,12 +362,26 @@ class="active"
|
||||
});
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$('#datemask').datetimepicker({
|
||||
format: 'DD/MM/YYYY'
|
||||
$(function () {
|
||||
var picker = $('#datemask').datetimepicker({
|
||||
format: 'DD/MM/YYYY',
|
||||
});
|
||||
picker.on('dp.change', function(e) {
|
||||
if (e.date) {
|
||||
$('.clear-input').show();
|
||||
} else {
|
||||
$('.clear-input').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('.clear-input').click(function() {
|
||||
$('#datemask').val('');
|
||||
$('.clear-input').hide();
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@stop
|
||||
|
||||
|
||||
|
@@ -222,10 +222,12 @@ if ($thread->title != "") {
|
||||
<div class="col-md-3">
|
||||
<b>{!! Lang::get('lang.due_date') !!}: </b>
|
||||
<?php
|
||||
$time = $tickets->created_at;
|
||||
$time = date_create($time);
|
||||
$duedate = $tickets->duedate;
|
||||
$user_timezone = new DateTimeZone('Asia/Kolkata');
|
||||
$time = date_create($tickets->duedate, $user_timezone);
|
||||
date_add($time, date_interval_create_from_date_string($SlaPlan->grace_period));
|
||||
echo UTC::usertimezone(date_format($time, 'Y-m-d H:i:s'));
|
||||
date_add($time, date_interval_create_from_date_string('30 minutes'));
|
||||
echo $time->format('Y-m-d H:i:s');
|
||||
?>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
@@ -885,6 +887,12 @@ if ($thread->title != "") {
|
||||
<div id="show" style="display:none;text-align: center;">
|
||||
<img src="{{asset("lb-faveo/media/images/gifloader.gif")}}">
|
||||
</div>
|
||||
<script>
|
||||
$('#Edit').on('hidden.bs.modal', function (e) {
|
||||
$(this).find('form')[0].reset();
|
||||
|
||||
});
|
||||
</script>
|
||||
<div class="modal-footer justify-content-between">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" id="dismis">{!! Lang::get('lang.close') !!}</button>
|
||||
<input type="submit" class="btn btn-primary" value="{!! Lang::get('lang.update') !!}">
|
||||
|
@@ -588,13 +588,13 @@ class="nav-link active"
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>{!! Lang::get('lang.address') !!}</label>
|
||||
<textarea name="address" class="form-control"></textarea>
|
||||
<textarea name="address" id="address" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>{!! Lang::get('lang.internal_notes') !!}</label>
|
||||
<textarea name="internal" class="form-control"></textarea>
|
||||
<textarea name="internal" id="internal" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -617,6 +617,15 @@ class="nav-link active"
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
<script>
|
||||
|
||||
$('#create_org').on('hidden.bs.modal', function (e) {
|
||||
$(this).find('form')[0].reset();
|
||||
$('#address').summernote('reset');
|
||||
$('#internal').summernote('reset');
|
||||
});
|
||||
|
||||
</script>
|
||||
</div><!-- /.modal -->
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function($) {
|
||||
@@ -696,6 +705,13 @@ class="nav-link active"
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" id="dismis4">{!! Lang::get('lang.close') !!}</button>
|
||||
<button type="submit" class="btn btn-success" id="submt2">{!! Lang::get('lang.assign') !!}</button>
|
||||
</div>
|
||||
<script>
|
||||
$('#assign').on('hidden.bs.modal', function (e) {
|
||||
$(this).find('form')[0].reset();
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
{!! Form::close()!!}
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
|
@@ -60,7 +60,7 @@ class="nav-link active"
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
{!! Form::label('pagination',Lang::get('lang.numberofelementstodisplay')) !!} <span class="text-red"> *</span>
|
||||
<input type="number" class="form-control" name='pagination' value="{!! $settings->pagination !!}" min="2">
|
||||
<input type="number" class="form-control" name='pagination' value="{!! $settings->pagination !!}" min="2" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -3,6 +3,7 @@
|
||||
namespace Chumper\Zipper\Repositories;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Support\Str;
|
||||
use ZipArchive;
|
||||
|
||||
class ZipRepository implements RepositoryInterface
|
||||
@@ -114,10 +115,12 @@ class ZipRepository implements RepositoryInterface
|
||||
if ($stats['size'] === 0 && $stats['crc'] === 0) {
|
||||
continue;
|
||||
}
|
||||
call_user_func_array($callback, [
|
||||
'file' => $this->archive->getNameIndex($i),
|
||||
'stats' => $this->archive->statIndex($i)
|
||||
]);
|
||||
$file = $this->archive->getNameIndex($i);
|
||||
$stats = $this->archive->statIndex($i);
|
||||
if (Str::startsWith($file, 'some_prefix')) {
|
||||
$callback($file, $stats);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user