update for version 1.0.1
This commit is contained in:
3
code/.gitattributes
vendored
Normal file
3
code/.gitattributes
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
* text=auto
|
||||
*.css linguist-vendored
|
||||
*.less linguist-vendored
|
@@ -1,15 +0,0 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
<IfModule mod_negotiation.c>
|
||||
Options -MultiViews
|
||||
</IfModule>
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
# Redirect Trailing Slashes...
|
||||
RewriteRule ^(.*)/$ /$1 [L,R=301]
|
||||
|
||||
# Handle Front Controller...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ index.php [L]
|
||||
</IfModule>
|
94
code/app/Exceptions/Handler.php
Normal file
94
code/app/Exceptions/Handler.php
Normal file
@@ -0,0 +1,94 @@
|
||||
<?php namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
// use App\Http\Controllers\Common\SettingsController;
|
||||
//use App\Model\helpdesk\Email\Smtp;
|
||||
|
||||
class Handler extends ExceptionHandler {
|
||||
|
||||
/**
|
||||
* A list of the exception types that should not be reported.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $dontReport = [
|
||||
'Symfony\Component\HttpKernel\Exception\HttpException'
|
||||
];
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
* @return type response
|
||||
*/
|
||||
// public function __construct() {
|
||||
// SettingsController::smtp();
|
||||
// }
|
||||
|
||||
/**
|
||||
* Report or log an exception.
|
||||
*
|
||||
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
|
||||
*
|
||||
* @param \Exception $e
|
||||
* @return void
|
||||
*/
|
||||
public function report(Exception $e)
|
||||
{
|
||||
return parent::report($e);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render an exception into an HTTP response.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Exception $e
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function render($request, Exception $e)
|
||||
{
|
||||
if ($this->isHttpException($e) && $e->getStatusCode() == 404) {
|
||||
return response()->view('errors.404', []);
|
||||
} else {
|
||||
if(\Config::get('database.install') == 1) {
|
||||
// if(\Config::get('app.ErrorLog') == '%1%') {
|
||||
// \App\Http\Controllers\Common\SettingsController::smtp();
|
||||
// \Mail::send('errors.report', array('e' => $e), function ($message) {
|
||||
// $message->to('', '')->subject('');
|
||||
// });
|
||||
// }
|
||||
}
|
||||
return response()->view('errors.500', []);
|
||||
}
|
||||
return parent::render($request, $e);
|
||||
|
||||
// if ($this->isHttpException($e))
|
||||
// {
|
||||
// return $this->renderHttpException($e);
|
||||
// }
|
||||
|
||||
|
||||
// if (config('app.debug'))
|
||||
// {
|
||||
// return $this->renderExceptionWithWhoops($e);
|
||||
// }
|
||||
|
||||
// return parent::render($request, $e);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// protected function renderExceptionWithWhoops(Exception $e)
|
||||
// {
|
||||
// $whoops = new \Whoops\Run;
|
||||
// $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler());
|
||||
|
||||
// return new \Illuminate\Http\Response(
|
||||
// $whoops->handleException($e),
|
||||
// $e->getStatusCode(),
|
||||
// $e->getHeaders()
|
||||
// );
|
||||
// }
|
||||
|
||||
|
||||
}
|
108
code/app/Http/Controllers/Admin/helpdesk/FormController.php
Normal file
108
code/app/Http/Controllers/Admin/helpdesk/FormController.php
Normal file
@@ -0,0 +1,108 @@
|
||||
<?php namespace App\Http\Controllers\Admin\helpdesk;
|
||||
|
||||
use App\Model\helpdesk\Form\Fields;
|
||||
use App\Model\helpdesk\Form\Forms;
|
||||
use Illuminate\Http\Request;
|
||||
use Input;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Redirect;
|
||||
|
||||
class FormController extends Controller {
|
||||
private $fields;
|
||||
private $forms;
|
||||
|
||||
|
||||
public function __construct(Fields $fields,Forms $forms) {
|
||||
$this->fields = $fields;
|
||||
$this->forms = $forms;
|
||||
// $this->middleware('auth');
|
||||
}
|
||||
|
||||
/**
|
||||
* home
|
||||
* @return type
|
||||
*/
|
||||
public function home() {
|
||||
return view('forms.home');
|
||||
}
|
||||
|
||||
/**
|
||||
* list of forms
|
||||
* @param type Forms $forms
|
||||
* @return Response
|
||||
*/
|
||||
public function index(Forms $forms) {
|
||||
return view('themes.default1.admin.helpdesk.manage.form.index',compact('forms'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
* @return Response
|
||||
*/
|
||||
public function create() {
|
||||
return view('themes.default1.admin.helpdesk.manage.form.form');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* @param int $id
|
||||
* @return Response
|
||||
*/
|
||||
public function show($id) {
|
||||
return view('themes.default1.admin.helpdesk.manage.form.preview',compact('id'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function store(Forms $forms) {
|
||||
if(!Input::get('formname')) {
|
||||
return Redirect::back()->with('fails','Please fill Form name');
|
||||
}
|
||||
$required = Input::get('required');
|
||||
$count = count($required);
|
||||
$require = array();
|
||||
for($i=2;$i<$count+2;$i++) {
|
||||
for($j=0;$j<1;$j++) {
|
||||
array_push($require,$required[$i][$j]);
|
||||
}
|
||||
}
|
||||
$forms->formname = Input::get('formname');
|
||||
$forms->save();
|
||||
$count = count(Input::get('name'));
|
||||
$fields = array();
|
||||
for($i=0; $i<=$count; $i++) {
|
||||
if(!empty(Input::get('name')[$i])) {
|
||||
array_push($fields, array(
|
||||
'forms_id' => $forms->id,
|
||||
'label' => Input::get('label')[$i],
|
||||
'name' => Input::get('name')[$i],
|
||||
'type' => Input::get('type')[$i],
|
||||
'value' => Input::get('value')[$i],
|
||||
'required'=>$require[$i],
|
||||
));
|
||||
}
|
||||
}
|
||||
Fields::insert($fields);
|
||||
return Redirect::back()->with('success','Successfully created Form');
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function delete($id,Forms $forms, Fields $field) {
|
||||
$fields = $field->where('forms_id',$id)->get();
|
||||
foreach($fields as $field) {
|
||||
$field->delete();
|
||||
}
|
||||
$forms = $forms->where('id',$id)->first();
|
||||
$forms->delete();
|
||||
return redirect()->back()->with('success', 'Deleted Successfully');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@@ -7,7 +7,7 @@ use App\Http\Requests\helpdesk\HelptopicUpdate;
|
||||
// models
|
||||
use App\Model\helpdesk\Agent\Agents;
|
||||
use App\Model\helpdesk\Agent\Department;
|
||||
use App\Model\helpdesk\Form\Form_name;
|
||||
use App\Model\helpdesk\Form\Forms;
|
||||
use App\Model\helpdesk\Manage\Help_topic;
|
||||
use App\Model\helpdesk\Manage\Sla_plan;
|
||||
use App\Model\helpdesk\Ticket\Ticket_Priority;
|
||||
@@ -65,7 +65,7 @@ class HelptopicController extends Controller {
|
||||
| 5.Forms Model
|
||||
================================================
|
||||
*/
|
||||
public function create(Ticket_Priority $priority, Department $department, Help_topic $topic, Form_name $form, User $agent, Sla_plan $sla) {
|
||||
public function create(Ticket_Priority $priority, Department $department, Help_topic $topic, Forms $form, User $agent, Sla_plan $sla) {
|
||||
try {
|
||||
$departments = $department->get();
|
||||
$topics = $topic->get();
|
||||
@@ -122,7 +122,7 @@ class HelptopicController extends Controller {
|
||||
* @param type Sla_plan $sla
|
||||
* @return type Response
|
||||
*/
|
||||
public function edit($id, Ticket_Priority $priority, Department $department, Help_topic $topic, Form_name $form, Sla_plan $sla) {
|
||||
public function edit($id, Ticket_Priority $priority, Department $department, Help_topic $topic, Forms $form, Sla_plan $sla) {
|
||||
try {
|
||||
$agents = User::where('role','=','agent')->get();
|
||||
$departments = $department->get();
|
131
code/app/Http/Controllers/Agent/helpdesk/CannedController.php
Normal file
131
code/app/Http/Controllers/Agent/helpdesk/CannedController.php
Normal file
@@ -0,0 +1,131 @@
|
||||
<?php namespace App\Http\Controllers\Agent\helpdesk;
|
||||
// controllers
|
||||
use App\Http\Controllers\Controller;
|
||||
// requests
|
||||
use App\Http\Requests\helpdesk\CannedRequest;
|
||||
use App\Http\Requests\helpdesk\CannedUpdateRequest;
|
||||
// model
|
||||
use App\Model\helpdesk\Agent_panel\Canned;
|
||||
use App\User;
|
||||
|
||||
/**
|
||||
* UserController
|
||||
*
|
||||
* @package Controllers
|
||||
* @subpackage Controller
|
||||
* @author Ladybird <info@ladybirdweb.com>
|
||||
*/
|
||||
class CannedController extends Controller {
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
* constructor to check
|
||||
* 1. authentication
|
||||
* 2. user roles
|
||||
* 3. roles must be agent
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->middleware('auth');
|
||||
$this->middleware('role.agent');
|
||||
// $this->middleware('roles');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
* @param type User $user
|
||||
* @return type Response
|
||||
*/
|
||||
public function index() {
|
||||
return view('themes.default1.agent.helpdesk.canned.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
* @return type Response
|
||||
*/
|
||||
public function create() {
|
||||
return view('themes.default1.agent.helpdesk.canned.create');
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
* @param type User $user
|
||||
* @param type Sys_userRequest $request
|
||||
* @return type Response
|
||||
*/
|
||||
public function store(CannedRequest $request, Canned $canned) {
|
||||
$canned->user_id = \Auth::user()->id;
|
||||
$canned->title = $request->input('title');
|
||||
$canned->message = $request->input('message');
|
||||
$canned->save();
|
||||
return redirect()->route('canned.list')->with('success','Added Successfully');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
* @param type int $id
|
||||
* @param type User $user
|
||||
* @return type Response
|
||||
*/
|
||||
public function edit($id, Canned $canned) {
|
||||
$canned = $canned->where('user_id', '=', \Auth::user()->id)->where('id','=',$id)->first();
|
||||
return view('themes.default1.agent.helpdesk.canned.edit',compact('canned'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* @param type int $id
|
||||
* @param type User $user
|
||||
* @param type Sys_userUpdate $request
|
||||
* @return type Response
|
||||
*/
|
||||
public function update($id, CannedUpdateRequest $request, Canned $canned) {
|
||||
|
||||
$canned = $canned->where('id','=',$id)->where('user_id', '=', \Auth::user()->id)->first();
|
||||
$canned->user_id = \Auth::user()->id;
|
||||
$canned->title = $request->input('title');
|
||||
$canned->message = $request->input('message');
|
||||
$canned->save();
|
||||
|
||||
return redirect()->route('canned.list')->with('success','Updated Successfully');
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* @param type int $id
|
||||
* @param type User $user
|
||||
* @return type Response
|
||||
*/
|
||||
public function destroy($id, Canned $canned) {
|
||||
/* select the field where id = $id(request Id) */
|
||||
$canned = $canned->whereId($id)->first();
|
||||
/* delete the selected field */
|
||||
/* Check whether function success or not */
|
||||
if ($canned->delete() == true) {
|
||||
/* redirect to Index page with Success Message */
|
||||
return redirect()->route('canned.list')->with('success', 'User Deleted Successfully');
|
||||
} else {
|
||||
/* redirect to Index page with Fails Message */
|
||||
return redirect()->route('canned.list')->with('fails', 'User can not Delete');
|
||||
}
|
||||
return view('themes.default1.agent.helpdesk.canned.destroy');
|
||||
}
|
||||
|
||||
/**
|
||||
* get canned
|
||||
* @param type $id
|
||||
* @return type json
|
||||
*/
|
||||
public function get_canned($id) {
|
||||
if($id != "zzz") {
|
||||
$canned = Canned::where('id','=',$id)->where('user_id','=',\Auth::user()->id)->first();
|
||||
$msg = $canned->message;
|
||||
} else {
|
||||
$msg = "";
|
||||
}
|
||||
return \Response::json($msg);
|
||||
}
|
||||
|
||||
}
|
@@ -55,10 +55,10 @@ class DashboardController extends Controller {
|
||||
public function ChartData()
|
||||
{
|
||||
$ticketlist = DB::table('tickets')
|
||||
->select(DB::raw('MONTH(updated_at) as month'),
|
||||
->select(DB::raw('MONTH(updated_at) as month'),
|
||||
DB::raw('count(*) as tickets'))
|
||||
->groupBy('month')
|
||||
->orderBy('month', 'desc')
|
||||
->orderBy('month', 'asc')
|
||||
->get();
|
||||
|
||||
return $ticketlist;
|
@@ -94,14 +94,21 @@ class MailController extends Controller {
|
||||
$date_time = explode(" ", $datetime);
|
||||
$date = $date_time[1] . "-" . $date_time[2] . "-" . $date_time[3] . " " . $date_time[4];
|
||||
$date = date('Y-m-d H:i:s', strtotime($date));
|
||||
$subject = $mail->subject;
|
||||
|
||||
if(isset($mail->subject)){
|
||||
$subject = $mail->subject;
|
||||
} else {
|
||||
$subject = "No Subject";
|
||||
}
|
||||
|
||||
$fromname = $mail->fromName;
|
||||
$fromaddress = $mail->fromAddress;
|
||||
$source = "2";
|
||||
$phone = "";
|
||||
$priority = '1';
|
||||
$assign = "";
|
||||
if ($this->TicketController->create_user($fromaddress, $fromname, $subject, $body, $phone, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign) == true) {
|
||||
$form_data = null;
|
||||
if ($this->TicketController->create_user($fromaddress, $fromname, $subject, $body, $phone, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $form_data) == true) {
|
||||
$thread_id = Ticket_Thread::whereRaw('id = (select max(`id`) from ticket_thread)')->first();
|
||||
$thread_id = $thread_id->id;
|
||||
|
@@ -20,6 +20,8 @@ use App\Model\helpdesk\Ticket\Ticket_Status;
|
||||
use App\Model\helpdesk\Email\Emails;
|
||||
use App\Model\helpdesk\Agent\Department;
|
||||
use App\Model\helpdesk\Manage\Help_topic;
|
||||
use App\Model\helpdesk\Ticket\Ticket_Form_Data;
|
||||
use App\Model\helpdesk\Form\Fields;
|
||||
use App\User;
|
||||
// classes
|
||||
use Auth;
|
||||
@@ -130,8 +132,9 @@ class TicketController extends Controller {
|
||||
$source = "3";
|
||||
$headers = null;
|
||||
$help = Help_topic::where('id','=',$helptopic)->first();
|
||||
$form_data = null;
|
||||
//create user
|
||||
if ($this->create_user($email, $fullname, $subject, $body, $phone, $helptopic, $sla, $priority, $source, $headers, $help->department, $assignto)) {
|
||||
if ($this->create_user($email, $fullname, $subject, $body, $phone, $helptopic, $sla, $priority, $source, $headers, $help->department, $assignto, $form_data)) {
|
||||
return Redirect('newticket')->with('success', 'Ticket created successfully!');
|
||||
} else {
|
||||
return Redirect('newticket')->with('fails', 'fails');
|
||||
@@ -399,7 +402,7 @@ class TicketController extends Controller {
|
||||
* @param type $system
|
||||
* @return type bool
|
||||
*/
|
||||
public function create_user($emailadd, $username, $subject, $body, $phone, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto) {
|
||||
public function create_user($emailadd, $username, $subject, $body, $phone, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $from_data) {
|
||||
// define global variables
|
||||
// dd($source);
|
||||
$email;
|
||||
@@ -436,7 +439,7 @@ class TicketController extends Controller {
|
||||
$username = $checkemail->username;
|
||||
$user_id = $checkemail->id;
|
||||
}
|
||||
$ticket_number = $this->check_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto);
|
||||
$ticket_number = $this->check_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $from_data);
|
||||
$ticket_number2 = $ticket_number[0];
|
||||
$ticketdata = Tickets::where('ticket_number','=',$ticket_number2)->first();
|
||||
$threaddata = Ticket_Thread::where('ticket_id','=',$ticketdata->id)->first();
|
||||
@@ -450,9 +453,23 @@ class TicketController extends Controller {
|
||||
if($is_reply == 0)
|
||||
{
|
||||
$mail = "Admin_mail";
|
||||
Mail::send('emails.Ticket_Create', ['name' => $username, 'ticket_number' => $ticket_number2, 'from'=>$company, 'system' => $system], function ($message) use ($emailadd, $username, $ticket_number2, $updated_subject) {
|
||||
$message->to($emailadd, $username)->subject($updated_subject);
|
||||
});
|
||||
if(Auth::user()) {
|
||||
$sign = Auth::user()->agent_sign;
|
||||
} else {
|
||||
$sign = $company;
|
||||
}
|
||||
|
||||
if($source == 3) {
|
||||
Mail::send('emails.Ticket_Create', ['sign'=>$sign, 'content' => $body, 'name' => $username, 'ticket_number' => $ticket_number2, 'system' => $system], function ($message) use ($emailadd, $username, $ticket_number2, $updated_subject) {
|
||||
$message->to($emailadd, $username)->subject($updated_subject);
|
||||
});
|
||||
} else {
|
||||
$body2 = null;
|
||||
Mail::send('emails.Ticket_Create', ['sign'=>$sign, 'content' => $body2, 'name' => $username, 'ticket_number' => $ticket_number2, 'system' => $system], function ($message) use ($emailadd, $username, $ticket_number2, $updated_subject) {
|
||||
$message->to($emailadd, $username)->subject($updated_subject);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -529,7 +546,7 @@ class TicketController extends Controller {
|
||||
* @param type $priority
|
||||
* @return type string
|
||||
*/
|
||||
public function check_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto) {
|
||||
public function check_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $form_data) {
|
||||
// $read_ticket_number = substr($subject, 0, 6);
|
||||
$read_ticket_number = explode('[#',$subject);
|
||||
if(isset($read_ticket_number[1]))
|
||||
@@ -577,11 +594,11 @@ class TicketController extends Controller {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$ticket_number = $this->create_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto);
|
||||
$ticket_number = $this->create_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $form_data);
|
||||
return array($ticket_number,0);
|
||||
}
|
||||
} else {
|
||||
$ticket_number = $this->create_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto);
|
||||
$ticket_number = $this->create_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $form_data);
|
||||
return array($ticket_number,0);
|
||||
}
|
||||
}
|
||||
@@ -596,7 +613,7 @@ class TicketController extends Controller {
|
||||
* @param type $priority
|
||||
* @return type string
|
||||
*/
|
||||
public function create_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto) {
|
||||
public function create_ticket($user_id, $subject, $body, $helptopic, $sla, $priority, $source, $headers, $dept, $assignto, $form_data) {
|
||||
$max_number = Tickets::whereRaw('id = (select max(`id`) from tickets)')->first();
|
||||
if($max_number == null)
|
||||
{
|
||||
@@ -621,6 +638,27 @@ class TicketController extends Controller {
|
||||
$ticket->save();
|
||||
$ticket_number = $ticket->ticket_number;
|
||||
$id = $ticket->id;
|
||||
|
||||
// store Form Data
|
||||
// Form Data comes from raising a ticket from client panel
|
||||
// dd($helptopic);
|
||||
if($form_data != null) {
|
||||
$help_topic = Help_topic::where('id', '=', $helptopic)->first();
|
||||
$forms = Fields::where('forms_id', '=', $help_topic->custom_form)->get();
|
||||
foreach($form_data as $key=>$form_details) {
|
||||
foreach($forms as $from) {
|
||||
if($from->name == $key) {
|
||||
$form_value = new Ticket_Form_Data;
|
||||
$form_value->ticket_id = $id;
|
||||
$form_value->title = $from->label;
|
||||
$form_value->content = $form_details;
|
||||
$form_value->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// store collaborators
|
||||
$this->store_collaborators($headers, $id);
|
||||
|
||||
@@ -829,7 +867,7 @@ class TicketController extends Controller {
|
||||
$master = Auth::user()->first_name . " " . Auth::user()->last_name;
|
||||
if(Alert::first()->internal_status == 1 || Alert::first()->internal_assigned_agent == 1) {
|
||||
// ticket assigned send mail
|
||||
Mail::send('emails.Ticket_assign', ['agent' => $agent, 'ticket_number' => $ticket_number, 'from'=>$company, 'master' => $master, 'system' => $system], function ($message) use ($agent_email, $agent, $ticket_number) {
|
||||
Mail::send('emails.Ticket_assign', ['agent' => $agent, 'ticket_number' => $ticket_number, 'from'=>$company, 'master' => $master, 'system' => $system], function ($message) use ($agent_email, $agent, $ticket_number, $ticket_subject) {
|
||||
$message->to($agent_email, $agent)->subject($ticket_subject.'[#' . $ticket_number . ']');
|
||||
});
|
||||
}
|
||||
@@ -1183,11 +1221,11 @@ class TicketController extends Controller {
|
||||
}
|
||||
}
|
||||
if($value == "Delete"){
|
||||
return redirect()->back()->with('success',' Moved to trash');
|
||||
return redirect()->back()->with('success','Moved to trash');
|
||||
} elseif($value == "Close") {
|
||||
return redirect()->back()->with('success',' Tickets has been Closed');
|
||||
return redirect()->back()->with('success','Tickets has been Closed');
|
||||
} elseif($value == "Open") {
|
||||
return redirect()->back()->with('success',' Ticket has been Opened');
|
||||
return redirect()->back()->with('success','Ticket has been Opened');
|
||||
}
|
||||
}
|
||||
return redirect()->back()->with('fails','None Selected!');
|
@@ -262,7 +262,7 @@ class UserController extends Controller {
|
||||
$user->save();
|
||||
return redirect('profile-edit')->with('success1', 'Password Updated sucessfully');
|
||||
} else {
|
||||
return redirect('profile-edit')->with('fails1', 'Password was not Updated');
|
||||
return redirect('profile-edit')->with('fails1', 'Password was not Updated. Incorrect old password');
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,17 @@
|
||||
<?php namespace App\Http\Controllers\Auth;
|
||||
// classes
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Contracts\Auth\Guard;
|
||||
use Illuminate\Contracts\Auth\PasswordBroker;
|
||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
use App\User;
|
||||
|
||||
use App\Http\Controllers\Common\SettingsController;
|
||||
|
||||
|
||||
/**
|
||||
* PasswordController
|
||||
@@ -27,6 +35,19 @@ class PasswordController extends Controller {
|
||||
$this->auth = $auth;
|
||||
$this->passwords = $passwords;
|
||||
$this->middleware('guest');
|
||||
\App\Http\Controllers\Common\SettingsController::smtp();
|
||||
SettingsController::smtp();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Display the form to request a password reset link.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function getEmail()
|
||||
{
|
||||
return view('auth.password');
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,85 @@
|
||||
<?php namespace App\Http\Controllers\Client\helpdesk;
|
||||
// controllers
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Controllers\Agent\helpdesk\TicketController;
|
||||
use App\Http\Controllers\Common\SettingsController;
|
||||
// requests
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Requests\helpdesk\CreateTicketRequest;
|
||||
use App\Http\Requests\helpdesk\TicketRequest;
|
||||
use App\Http\Requests\helpdesk\TicketEditRequest;
|
||||
|
||||
// models
|
||||
use App\Model\helpdesk\Email\Banlist;
|
||||
use App\Model\helpdesk\Ticket\Tickets;
|
||||
use App\Model\helpdesk\Ticket\Ticket_attachments;
|
||||
use App\Model\helpdesk\Ticket\Ticket_Collaborator;
|
||||
use App\Model\helpdesk\Ticket\Ticket_Thread;
|
||||
use App\Model\helpdesk\Settings\Company;
|
||||
use App\Model\helpdesk\Settings\System;
|
||||
use App\Model\helpdesk\Settings\Alert;
|
||||
use App\Model\helpdesk\Ticket\Ticket_Status;
|
||||
use App\Model\helpdesk\Email\Emails;
|
||||
use App\Model\helpdesk\Agent\Department;
|
||||
use App\User;
|
||||
// classes
|
||||
use Auth;
|
||||
use Hash;
|
||||
use Input;
|
||||
use Mail;
|
||||
use PDF;
|
||||
|
||||
/**
|
||||
* TicketController2
|
||||
*
|
||||
* @package Controllers
|
||||
* @subpackage Controller
|
||||
* @author Ladybird <info@ladybirdweb.com>
|
||||
*/
|
||||
class ClientTicketController extends Controller {
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
* @return type response
|
||||
*/
|
||||
public function __construct() {
|
||||
SettingsController::smtp();
|
||||
// $this->middleware('auth');
|
||||
// $this->middleware('role.user');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Checked ticket
|
||||
* @param type Tickets $ticket
|
||||
* @param type User $user
|
||||
* @return type response
|
||||
*/
|
||||
public function getCheckTicket(Tickets $ticket, User $user) {
|
||||
return view('themes.default1.client.helpdesk.guest-user.newticket', compact('ticket'));
|
||||
}
|
||||
|
||||
/**
|
||||
* reply
|
||||
* @param type $value
|
||||
* @return type view
|
||||
*/
|
||||
public function reply($id, Request $request) {
|
||||
$comment = $request->input('comment');
|
||||
if($comment != null) {
|
||||
$tickets = Tickets::where('id','=',$id)->first();
|
||||
$threads = new Ticket_Thread;
|
||||
$threads->user_id = Auth::user()->id;
|
||||
$threads->ticket_id = $tickets->id;
|
||||
$threads->poster = "client";
|
||||
$threads->body = $comment;
|
||||
$threads->save();
|
||||
return \Redirect::back()->with('success1','Successfully replied');
|
||||
} else {
|
||||
return \Redirect::back()->with('fails1','Please fill some data!');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
198
code/app/Http/Controllers/Client/helpdesk/FormController.php
Normal file
198
code/app/Http/Controllers/Client/helpdesk/FormController.php
Normal file
@@ -0,0 +1,198 @@
|
||||
<?php namespace App\Http\Controllers\Client\helpdesk;
|
||||
// controllers
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Controllers\Agent\helpdesk\TicketController;
|
||||
use App\Http\Controllers\Common\SettingsController;
|
||||
// requests
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Requests\helpdesk\ClientRequest;
|
||||
// models
|
||||
/* include help topic model */
|
||||
use App\Model\helpdesk\Form\Form_details;
|
||||
/* Include form_name model */
|
||||
use App\Model\helpdesk\Form\Form_name;
|
||||
/* include form_detals model */
|
||||
/* Include form_value model */
|
||||
use App\Model\helpdesk\Manage\Help_topic;
|
||||
use App\Model\helpdesk\Settings\Company;
|
||||
/* Validate form TicketForm using */
|
||||
use App\Model\helpdesk\Ticket\Tickets;
|
||||
use App\Model\helpdesk\Ticket\Ticket_Thread;
|
||||
use App\Model\helpdesk\Settings\System;
|
||||
use App\Model\helpdesk\Settings\Ticket;
|
||||
use App\Model\helpdesk\Agent\Department;
|
||||
use App\Model\helpdesk\Ticket\Ticket_source;
|
||||
use App\User;
|
||||
// classes
|
||||
use Form;
|
||||
use Input;
|
||||
use Mail;
|
||||
use Hash;
|
||||
use Redirect;
|
||||
use Config;
|
||||
|
||||
use DateTime;
|
||||
use DateTimeZone;
|
||||
use App\Model\helpdesk\Form\Fields;
|
||||
use App\Model\helpdesk\Form\Form_value;
|
||||
|
||||
|
||||
/**
|
||||
* FormController
|
||||
*
|
||||
* @package Controllers
|
||||
* @subpackage Controller
|
||||
* @author Ladybird <info@ladybirdweb.com>
|
||||
*/
|
||||
class FormController extends Controller {
|
||||
|
||||
public function __construct(TicketController $TicketController) {
|
||||
SettingsController::smtp();
|
||||
$this->TicketController = $TicketController;
|
||||
}
|
||||
|
||||
// /**
|
||||
// * This Function to get the form for the ticket
|
||||
// * @param type Form_name $name
|
||||
// * @param type Form_details $details
|
||||
// * @param type Help_topic $topics
|
||||
// * @return type Response
|
||||
// */
|
||||
// public function getForm() {
|
||||
// if(Config::get('database.install') == '%0%') {
|
||||
// return Redirect::route('license');
|
||||
// }
|
||||
// if(System::first()->status == 1) {
|
||||
// return view('themes.default1.client.helpdesk.guest-user.form');
|
||||
// } else {
|
||||
// return "hello";
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* getform
|
||||
* @param type Help_topic $topic
|
||||
* @return type
|
||||
*/
|
||||
public function getForm(Help_topic $topic) {
|
||||
if(\Config::get('database.install') == '%0%') {
|
||||
return \Redirect::route('license');
|
||||
}
|
||||
if(System::first()->status == 1) {
|
||||
$topics = $topic->get();
|
||||
return view('themes.default1.client.helpdesk.form', compact('topics'));
|
||||
} else {
|
||||
return \Redirect::route('home');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This Function to post the form for the ticket
|
||||
* @param type Form_name $name
|
||||
* @param type Form_details $details
|
||||
* @return type string
|
||||
*/
|
||||
public function postForm($id,Form_name $name, Form_details $details, Help_topic $topic) {
|
||||
// dd($id);
|
||||
if($id != 0 ){
|
||||
$helptopic = $topic->where('id', '=', $id)->first();
|
||||
$custom_form = $helptopic->custom_form;
|
||||
$values = Fields::where('forms_id', '=', $custom_form)->get();
|
||||
if(!$values) {
|
||||
} if($values) {
|
||||
foreach($values as $value){
|
||||
if($value->type == "select") {
|
||||
$data = $value->value;
|
||||
$value = explode(',', $data);
|
||||
echo '<select class="form-control">';
|
||||
foreach($value as $option){
|
||||
echo '<option>'.$option.'</option>';
|
||||
}
|
||||
echo '</select></br>';
|
||||
} elseif ($value->type == "radio" ) {
|
||||
$type2 = $value->value;
|
||||
$val = explode(',', $type2);
|
||||
echo '<label class="radio-inline">'.$value->label.'</label>   <input type="'.$value->type.'" name="'.$value->name.'"> '.$val[0].'
|
||||
   <input type="'.$value->type.'" name="'.$value->name.'"> '.$val[1].'</br>';
|
||||
} elseif($value->type == "textarea" ) {
|
||||
$type3 = $value->value;
|
||||
$v = explode(',', $type3);
|
||||
//dd($v);
|
||||
if(array_key_exists(1, $v)){
|
||||
echo '<label>'.$value->label.'</label></br><textarea class=form-control rows="'.$v[0].'" cols="'.$v[1].'"></textarea></br>';
|
||||
} else {
|
||||
echo '<label>'.$value->label.'</label></br><textarea class=form-control rows="10" cols="60"></textarea></br>';
|
||||
}
|
||||
} elseif($value->type == "checkbox" ) {
|
||||
$type4 = $value->value;
|
||||
$check = explode(',', $type4);
|
||||
echo '<label class="radio-inline">'.$value->label.'   <input type="'.$value->type.'" name="'.$value->name.'">  '.$check[0].'</label><label class="radio-inline"><input type="'.$value->type.'" name="'.$value->name.'">  '.$check[1].'</label></br>';
|
||||
} else {
|
||||
echo '<label>'.$value->label.'</label><input type="'.$value->type.'" class="form-control" name="'.$value->name.'" /></br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Posted form
|
||||
* @param type Request $request
|
||||
* @param type User $user
|
||||
*/
|
||||
public function postedForm(User $user, ClientRequest $request, Ticket $ticket_settings, Ticket_source $ticket_source) {
|
||||
|
||||
$form_extras = $request->except('Name','Phone','Email','Subject','Details','helptopic','_wysihtml5_mode','_token');
|
||||
|
||||
$name = $request->input('Name');
|
||||
$phone = $request->input('Phone');
|
||||
$email = $request->input('Email');
|
||||
$subject = $request->input('Subject');
|
||||
$details = $request->input('Details');
|
||||
|
||||
$System = System::where('id','=',1)->first();
|
||||
$departments = Department::where('id','=',$System->department)->first();
|
||||
$department = $departments->id;
|
||||
|
||||
$status = $ticket_settings->first()->status;
|
||||
$helptopic = $ticket_settings->first()->help_topic;
|
||||
$sla = $ticket_settings->first()->sla;
|
||||
$priority = $ticket_settings->first()->priority;
|
||||
$source = $ticket_source->where('name','=','web')->first();
|
||||
|
||||
$collaborator = null;
|
||||
|
||||
if($this->TicketController->create_user($email, $name, $subject, $details, $phone, $helptopic, $sla, $priority, $source->id, $collaborator, $department,$assignto = "", $form_extras)) {
|
||||
return Redirect::route('guest.getform')->with('success','Ticket Created Successfully');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* reply
|
||||
* @param type $value
|
||||
* @return type view
|
||||
*/
|
||||
public function post_ticket_reply($id, Request $request) {
|
||||
$comment = $request->input('comment');
|
||||
if($comment != null) {
|
||||
$tickets = Tickets::where('id','=',$id)->first();
|
||||
$threads = new Ticket_Thread;
|
||||
$threads->user_id = $tickets->user_id;
|
||||
$threads->ticket_id = $tickets->id;
|
||||
$threads->poster = "client";
|
||||
$threads->body = $comment;
|
||||
$threads->save();
|
||||
return \Redirect::back()->with('success1','Successfully replied');
|
||||
} else {
|
||||
return \Redirect::back()->with('fails1','Please fill some data!');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -34,7 +34,7 @@ class GuestController extends Controller {
|
||||
*/
|
||||
public function __construct() {
|
||||
SettingsController::smtp();
|
||||
// $this->middleware('auth');
|
||||
$this->middleware('auth');
|
||||
// $this->middleware('role.user');
|
||||
}
|
||||
|
||||
@@ -53,9 +53,9 @@ class GuestController extends Controller {
|
||||
* @param type ProfileRequest $request
|
||||
* @return type Response
|
||||
*/
|
||||
public function postProfile($id, ProfileRequest $request) {
|
||||
$user = Auth::user();
|
||||
$user->gender = $request->input('gender');
|
||||
public function postProfile(ProfileRequest $request) {
|
||||
$user = User::where('id','=',Auth::user()->id)->first();
|
||||
$user->gender = $request->get('gender');
|
||||
$user->save();
|
||||
if ($user->profile_pic == 'avatar5.png' || $user->profile_pic == 'avatar2.png') {
|
||||
if ($request->input('gender') == 1) {
|
||||
@@ -78,10 +78,10 @@ class GuestController extends Controller {
|
||||
$user->profile_pic = $fileName;
|
||||
} else {
|
||||
$user->fill($request->except('profile_pic', 'gender'))->save();
|
||||
return redirect('guest')->with('success', 'Profile Updated sucessfully');
|
||||
return redirect()->back()->with('success1', 'Profile Updated sucessfully');
|
||||
}
|
||||
if ($user->fill($request->except('profile_pic'))->save()) {
|
||||
return redirect('guest')->with('success', 'Profile Updated sucessfully');
|
||||
return redirect()->back()->with('success1', 'Profile Updated sucessfully');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,15 +155,15 @@ class GuestController extends Controller {
|
||||
* @param type ProfilePassword $request
|
||||
* @return type Response
|
||||
*/
|
||||
public function postProfilePassword($id, ProfilePassword $request) {
|
||||
public function postProfilePassword(ProfilePassword $request) {
|
||||
$user = Auth::user();
|
||||
//echo $user->password;
|
||||
if (Hash::check($request->input('old_password'), $user->getAuthPassword())) {
|
||||
$user->password = Hash::make($request->input('new_password'));
|
||||
$user->save();
|
||||
return redirect('guest')->with('success', 'Password Updated sucessfully');
|
||||
return redirect()->back()->with('success2', 'Password Updated sucessfully');
|
||||
} else {
|
||||
return redirect('guest')->with('fails', 'Password was not Updated');
|
||||
return redirect()->back()->with('fails2', 'Password was not Updated. Incorrect old password');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,8 +236,8 @@ class GuestController extends Controller {
|
||||
$message->to($user->email, $username)->subject('Ticket link Request ['.$Ticket_number.']');
|
||||
}
|
||||
);
|
||||
return \Redirect::route('account-forgot-password')
|
||||
->with('success','We have sent you a new password by Email');
|
||||
return \Redirect::back()
|
||||
->with('success','We have sent you a link by Email. Please click on that link to view ticket');
|
||||
}
|
||||
}
|
||||
}
|
@@ -393,6 +393,14 @@ class InstallController extends Controller {
|
||||
$datacontent = File::get($install);
|
||||
$datacontent = str_replace('%0%', $value, $datacontent);
|
||||
File::put($install, $datacontent);
|
||||
|
||||
$smtpfilepath = "\App\Http\Controllers\Common\SettingsController::smtp()";
|
||||
$path22 = app_path('Http\routes.php');
|
||||
$content23 = File::get($path22);
|
||||
$content23 = str_replace('"%smtplink%"', $smtpfilepath, $content23);
|
||||
File::put($path22, $content23);
|
||||
|
||||
|
||||
try {
|
||||
return View::make('themes/default1/installer/helpdesk/view7');
|
||||
} catch (Exception $e) {
|
33
code/app/Http/Requests/helpdesk/CannedRequest.php
Normal file
33
code/app/Http/Requests/helpdesk/CannedRequest.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php namespace App\Http\Requests\helpdesk;
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
/**
|
||||
* AgentRequest
|
||||
*
|
||||
* @package Request
|
||||
* @author Ladybird <info@ladybirdweb.com>
|
||||
*/
|
||||
class CannedRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules() {
|
||||
return [
|
||||
'title' => 'required',
|
||||
'message' => 'required',
|
||||
];
|
||||
}
|
||||
|
||||
}
|
33
code/app/Http/Requests/helpdesk/CannedUpdateRequest.php
Normal file
33
code/app/Http/Requests/helpdesk/CannedUpdateRequest.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php namespace App\Http\Requests\helpdesk;
|
||||
use App\Http\Requests\Request;
|
||||
|
||||
/**
|
||||
* AgentRequest
|
||||
*
|
||||
* @package Request
|
||||
* @author Ladybird <info@ladybirdweb.com>
|
||||
*/
|
||||
class CannedUpdateRequest extends Request {
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules() {
|
||||
return [
|
||||
'title' => 'required',
|
||||
'message' => 'required',
|
||||
];
|
||||
}
|
||||
|
||||
}
|
@@ -27,7 +27,7 @@ class HelptopicRequest extends Request {
|
||||
return [
|
||||
'topic' => 'required|unique:help_topic',
|
||||
// 'parent_topic' => 'required',
|
||||
'custom_form' => 'required',
|
||||
// 'custom_form' => 'required',
|
||||
'department' => 'required',
|
||||
'priority' => 'required',
|
||||
'sla_plan' => 'required',
|
@@ -26,7 +26,7 @@ class HelptopicUpdate extends Request {
|
||||
public function rules() {
|
||||
return [
|
||||
// 'parent_topic' => 'required',
|
||||
'custom_form' => 'required',
|
||||
// 'custom_form' => 'required',
|
||||
'department' => 'required',
|
||||
'priority' => 'required',
|
||||
'sla_plan' => 'required',
|
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
"%smtplink%";
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Routes
|
||||
@@ -20,7 +20,6 @@ Route::controllers([
|
||||
]);
|
||||
|
||||
// Route::get('login','Auth\AuthController@getLogin');
|
||||
|
||||
$router->get('getmail/{token}', 'Auth\AuthController@getMail');
|
||||
|
||||
/*
|
||||
@@ -28,7 +27,6 @@ $router->get('getmail/{token}', 'Auth\AuthController@getMail');
|
||||
|Admin Routes
|
||||
|-------------------------------------------------------------------------------
|
||||
| Here is defining entire routes for the Admin Panel
|
||||
|
|
||||
|
|
||||
*/
|
||||
|
||||
@@ -59,7 +57,10 @@ Route::group(['middleware' => 'roles', 'middleware' => 'auth'], function () {
|
||||
|
||||
Route::resource('sla', 'Admin\helpdesk\SlaController'); // in SLA Plan module, for CRUD
|
||||
|
||||
Route::resource('form', 'Admin\helpdesk\FormController'); // in Form module, for CRUD
|
||||
Route::resource('forms','Admin\helpdesk\FormController');
|
||||
|
||||
Route::get('delete-forms/{id}',['as'=>'forms.delete','uses'=>'Admin\helpdesk\FormController@delete']);
|
||||
|
||||
//$router->model('id','getcompany');
|
||||
|
||||
Route::get('agent-profile-page/{id}',['as'=>'agent.profile.page','uses'=>'Admin\helpdesk\AgentController@agent_profile']);
|
||||
@@ -181,6 +182,27 @@ Route::group(['middleware' => 'role.agent', 'middleware' => 'auth'], function ()
|
||||
/* Profile Password Post */
|
||||
Route::patch('agent-profile-password/{id}', 'Agent\helpdesk\UserController@postProfilePassword');
|
||||
|
||||
/* Canned list */
|
||||
Route::get('canned/list',['as'=>'canned.list','uses'=>'Agent\helpdesk\CannedController@index']);
|
||||
|
||||
/* Canned create */
|
||||
Route::get('canned/create',['as'=>'canned.create','uses'=>'Agent\helpdesk\CannedController@create']);
|
||||
|
||||
/* Canned store */
|
||||
Route::patch('canned/store',['as'=>'canned.store','uses'=>'Agent\helpdesk\CannedController@store']);
|
||||
|
||||
/* Canned edit */
|
||||
Route::get('canned/edit/{id}',['as'=>'canned.edit','uses'=>'Agent\helpdesk\CannedController@edit']);
|
||||
|
||||
/* Canned update */
|
||||
Route::patch('canned/update/{id}',['as'=>'canned.update','uses'=>'Agent\helpdesk\CannedController@update']);
|
||||
|
||||
/* Canned show */
|
||||
Route::get('canned/show/{id}',['as'=>'canned.show','uses'=>'Agent\helpdesk\CannedController@show']);
|
||||
|
||||
/* Canned delete */
|
||||
Route::delete('canned/destroy/{id}',['as'=>'canned.destroy','uses'=>'Agent\helpdesk\CannedController@destroy']);
|
||||
|
||||
// Route::get('/abcd', 'GuestController@getList');
|
||||
// Route::get('/qwer', ['as' => 'thread', 'uses' => 'GuestController@getThread']);
|
||||
|
||||
@@ -281,9 +303,9 @@ Route::group(['middleware' => 'role.agent', 'middleware' => 'auth'], function ()
|
||||
|
||||
Route::post('select_all', ['as'=>'select_all' ,'uses'=>'Agent\helpdesk\TicketController@select_all']);
|
||||
|
||||
Route::post('canned/{id}', 'MessageController@show');
|
||||
Route::post('canned/{id}', 'Agent\helpdesk\CannedController@get_canned');
|
||||
|
||||
Route::get('message' , 'MessageController@show');
|
||||
// Route::get('message' , 'MessageController@show');
|
||||
|
||||
Route::post('lock',['as'=>'lock' , 'uses'=>'Agent\helpdesk\TicketController@lock']);
|
||||
|
||||
@@ -344,7 +366,7 @@ Route::any('getdata', function() {
|
||||
Route::get('/', ['as'=>'/', 'uses'=>'Client\helpdesk\WelcomepageController@index']);
|
||||
|
||||
//getform
|
||||
Route::get('form',['as'=>'form','uses'=>'Client\helpdesk\GuestController@getForm']);
|
||||
Route::get('form',['as'=>'form','uses'=>'Client\helpdesk\FormController@getForm']);
|
||||
//detail ticket information
|
||||
Route::get('mytickets/{id}', ['as' => 'ticketinfo', 'uses' => 'Client\helpdesk\GuestController@singleThread']);
|
||||
//ticket ckeck
|
||||
@@ -356,7 +378,7 @@ Route::any('getdata', function() {
|
||||
//===================================================================================
|
||||
Route::group(['middleware' => 'role.user', 'middleware' => 'auth'], function () {
|
||||
/* User profile get */
|
||||
Route::get('client-profile', 'Client\helpdesk\GuestController@getProfile');
|
||||
Route::get('client-profile', ['as'=>'client.profile', 'uses'=>'Client\helpdesk\GuestController@getProfile']);
|
||||
Route::get('mytickets', ['as' => 'ticket2', 'uses' => 'Client\helpdesk\GuestController@getMyticket']);
|
||||
/* Get my tickets */
|
||||
Route::get('myticket/{id}', ['as' => 'ticket', 'uses' => 'Client\helpdesk\GuestController@thread']);
|
||||
@@ -364,11 +386,13 @@ Route::group(['middleware' => 'role.user', 'middleware' => 'auth'], function ()
|
||||
Route::patch('client-profile-edit', 'Client\helpdesk\GuestController@postProfile');
|
||||
/* Profile Password Post */
|
||||
Route::patch('client-profile-password', 'Client\helpdesk\GuestController@postProfilePassword');
|
||||
|
||||
Route::post('post/reply/{id}',['as'=>'client.reply','uses'=>'Client\helpdesk\ClientTicketController@reply']);
|
||||
});
|
||||
|
||||
//====================================================================================
|
||||
/* Check your Ticket */
|
||||
Route::get('checkticket', 'Client\helpdesk\GuestController@getCheckTicket');
|
||||
Route::get('checkticket', 'Client\helpdesk\ClientTicketController@getCheckTicket');
|
||||
/* Get my tickets */
|
||||
Route::get('myticket', ['as' => 'ticket', 'uses' => 'Client\helpdesk\GuestController@getMyticket']);
|
||||
/* Get my tickets */
|
||||
@@ -377,6 +401,9 @@ Route::get('myticket/{id}', ['as' => 'ticket', 'uses' => 'Client\helpdesk\GuestC
|
||||
Route::post('postcheck', 'Client\helpdesk\GuestController@PostCheckTicket');
|
||||
Route::get('postcheck', 'Client\helpdesk\GuestController@PostCheckTicket');
|
||||
|
||||
Route::post('post-ticket-reply/{id}', 'Client\helpdesk\FormController@post_ticket_reply');
|
||||
|
||||
|
||||
/* 404 page */
|
||||
Route::get('404', 'error\ErrorController@error404');
|
||||
|
||||
@@ -490,4 +517,4 @@ Route::get('testmail',function(){
|
||||
});
|
||||
|
||||
|
||||
// Route::get('smp','HomeController@getsmtp');
|
||||
// Route::get('smp','HomeController@getsmtp');
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user