Merge branch 'develop' into trunk
This commit is contained in:
commit
e21029d295
1 changed files with 7 additions and 2 deletions
|
|
@ -142,7 +142,7 @@ class TicketController extends Controller
|
|||
public function create()
|
||||
{
|
||||
$user = Auth::user();
|
||||
if ($user->role === 1) {
|
||||
if ($user->role->value === 1) {
|
||||
$projects = Project::orderBy('name')->get();
|
||||
} else {
|
||||
$projects = $user->projects;
|
||||
|
|
@ -190,7 +190,12 @@ class TicketController extends Controller
|
|||
// phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass
|
||||
public function edit(Ticket $ticket)
|
||||
{
|
||||
$projects = Project::all();
|
||||
$user = Auth::user();
|
||||
if ($user->role->value === 1) {
|
||||
$projects = Project::orderBy('name')->get();
|
||||
} else {
|
||||
$projects = $user->projects;
|
||||
}
|
||||
return view('ticket.edit', compact('ticket', 'projects'));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue