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,50 @@
<?php
namespace App\Console\Commands;
use App\Http\Controllers\Client\helpdesk\UnAuthController;
use Illuminate\Console\Command;
class CloseWork extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'ticket:close';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Ticket will close according to workflow';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
if (env('DB_INSTALL') == 1) {
$PhpMailController = new \App\Http\Controllers\Common\PhpMailController();
$controller = new UnAuthController($PhpMailController);
$controller->autoCloseTickets();
loging('ticket-close-workflow', 'Close ticket workflow executed', 'info');
//\Log::info('Close ticket workflow executed');
$this->info('Close ticket workflow executed');
}
}
}

View File

@@ -22,8 +22,6 @@ class SendReport extends Command
* @var string
*/
protected $description = 'Sending the report mail ';
protected $report;
protected $mail;
/**
* Create a new command instance.
@@ -32,9 +30,6 @@ class SendReport extends Command
*/
public function __construct()
{
$mail = new PhpMailController();
$report = new NotificationController($mail);
$this->report = $report;
parent::__construct();
}
@@ -46,11 +41,23 @@ class SendReport extends Command
public function handle()
{
try {
$this->report->send_notification();
\Log::info('Report has send');
$this->info('Report has send');
if (env('DB_INSTALL') == 1) {
$mail = new PhpMailController();
$mail->setQueue();
$this_report = new NotificationController($mail);
$report = $this_report->send_notification();
if ($report !== 0) {
loging('sending-mail-report', 'Report has send', 'info');
//\Log::info("Report has send");
$this->info('Report has send');
} else {
loging('sending-mail-report', 'Nothing to send', 'info');
$this->info('Nothing to send');
}
}
} catch (Exception $ex) {
dd($ex);
//dd($ex);
$this->error($ex->getMessage());
}
}

View File

@@ -0,0 +1,67 @@
<?php
namespace App\Console\Commands;
use App\Http\Controllers\Agent\helpdesk\MailController;
use App\Http\Controllers\Agent\helpdesk\TicketWorkflowController;
use Event;
use Illuminate\Console\Command;
class TicketFetch extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'ticket:fetch';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Fetching the tickets from service provider';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
if (env('DB_INSTALL') == 1) {
$controller = $this->mailController();
$emails = new \App\Model\helpdesk\Email\Emails();
$settings_email = new \App\Model\helpdesk\Settings\Email();
$system = new \App\Model\helpdesk\Settings\System();
$ticket = new \App\Model\helpdesk\Settings\Ticket();
$controller->readmails($emails, $settings_email, $system, $ticket);
Event::fire('ticket.fetch', ['event' => '']);
loging('fetching-ticket', 'Ticket has read', 'info');
//\Log::info('Ticket has read');
$this->info('Ticket has read');
}
}
public function mailController()
{
$PhpMailController = new \App\Http\Controllers\Common\PhpMailController();
$NotificationController = new \App\Http\Controllers\Common\NotificationController();
$ticket = new \App\Http\Controllers\Agent\helpdesk\TicketController($PhpMailController, $NotificationController);
$work = new TicketWorkflowController($ticket);
$controller = new MailController($work);
return $controller;
}
}