update v1.0.6
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
<?php namespace App\Http\Controllers\Agent\helpdesk;
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Agent\helpdesk;
|
||||
|
||||
// controllers
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Controllers\Agent\helpdesk\TicketController;
|
||||
@@ -36,64 +39,64 @@ use PDF;
|
||||
*/
|
||||
class Ticket2Controller extends Controller {
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
* @return type response
|
||||
*/
|
||||
public function __construct() {
|
||||
SettingsController::smtp();
|
||||
$this->middleware('auth');
|
||||
}
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
* @return type response
|
||||
*/
|
||||
public function __construct() {
|
||||
SettingsController::smtp();
|
||||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the Inbox ticket list page
|
||||
* @return type response
|
||||
*/
|
||||
public function deptopen($id) {
|
||||
$dept = Department::where('name','=',$id)->first();
|
||||
if(Auth::user()->role == 'agent') {
|
||||
if(Auth::user()->dept_id == $dept->id) {
|
||||
return view('themes.default1.agent.helpdesk.dept-ticket.open',compact('id'));
|
||||
} else {
|
||||
return redirect()->back()->with('fails','Unauthorised!');
|
||||
}
|
||||
} else {
|
||||
return view('themes.default1.agent.helpdesk.dept-ticket.open',compact('id'));
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Show the Inbox ticket list page
|
||||
* @return type response
|
||||
*/
|
||||
public function deptopen($id) {
|
||||
$dept = Department::where('name', '=', $id)->first();
|
||||
if (Auth::user()->role == 'agent') {
|
||||
if (Auth::user()->dept_id == $dept->id) {
|
||||
return view('themes.default1.agent.helpdesk.dept-ticket.open', compact('id'));
|
||||
} else {
|
||||
return redirect()->back()->with('fails', 'Unauthorised!');
|
||||
}
|
||||
} else {
|
||||
return view('themes.default1.agent.helpdesk.dept-ticket.open', compact('id'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the Inbox ticket list page
|
||||
* @return type response
|
||||
*/
|
||||
public function deptclose($id) {
|
||||
$dept = Department::where('name','=',$id)->first();
|
||||
if(Auth::user()->role == 'agent') {
|
||||
if(Auth::user()->dept_id == $dept->id) {
|
||||
return view('themes.default1.agent.helpdesk.dept-ticket.closed',compact('id'));
|
||||
} else {
|
||||
return redirect()->back()->with('fails','Unauthorised!');
|
||||
}
|
||||
} else {
|
||||
return view('themes.default1.agent.helpdesk.dept-ticket.closed',compact('id'));
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Show the Inbox ticket list page
|
||||
* @return type response
|
||||
*/
|
||||
public function deptclose($id) {
|
||||
$dept = Department::where('name', '=', $id)->first();
|
||||
if (Auth::user()->role == 'agent') {
|
||||
if (Auth::user()->dept_id == $dept->id) {
|
||||
return view('themes.default1.agent.helpdesk.dept-ticket.closed', compact('id'));
|
||||
} else {
|
||||
return redirect()->back()->with('fails', 'Unauthorised!');
|
||||
}
|
||||
} else {
|
||||
return view('themes.default1.agent.helpdesk.dept-ticket.closed', compact('id'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the Inbox ticket list page
|
||||
* @return type response
|
||||
*/
|
||||
public function deptinprogress($id) {
|
||||
$dept = Department::where('name','=',$id)->first();
|
||||
if(Auth::user()->role == 'agent') {
|
||||
if(Auth::user()->dept_id == $dept->id) {
|
||||
return view('themes.default1.agent.helpdesk.dept-ticket.inprogress',compact('id'));
|
||||
} else {
|
||||
return redirect()->back()->with('fails','Unauthorised!');
|
||||
}
|
||||
} else {
|
||||
return view('themes.default1.agent.helpdesk.dept-ticket.inprogress',compact('id'));
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Show the Inbox ticket list page
|
||||
* @return type response
|
||||
*/
|
||||
public function deptinprogress($id) {
|
||||
$dept = Department::where('name', '=', $id)->first();
|
||||
if (Auth::user()->role == 'agent') {
|
||||
if (Auth::user()->dept_id == $dept->id) {
|
||||
return view('themes.default1.agent.helpdesk.dept-ticket.inprogress', compact('id'));
|
||||
} else {
|
||||
return redirect()->back()->with('fails', 'Unauthorised!');
|
||||
}
|
||||
} else {
|
||||
return view('themes.default1.agent.helpdesk.dept-ticket.inprogress', compact('id'));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user