fix(tasks): auto-open create modal when accessing /projects/{project}/tasks/create
This commit is contained in:
@@ -78,6 +78,8 @@ class TaskForm extends Component
|
|||||||
} else {
|
} else {
|
||||||
$this->mode = 'create';
|
$this->mode = 'create';
|
||||||
abort_unless(Auth::user()->can('create tasks', $project), 403);
|
abort_unless(Auth::user()->can('create tasks', $project), 403);
|
||||||
|
// Auto-open modal when accessed via route (create page)
|
||||||
|
$this->showModal = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -74,44 +74,46 @@ new class extends Component
|
|||||||
@endcan
|
@endcan
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Language Switcher -->
|
<div class="flex justify-between h-16">
|
||||||
<div class="hidden sm:flex sm:items-center sm:ms-2">
|
<!-- Language Switcher -->
|
||||||
@livewire('common.language-switcher')
|
<div class="hidden sm:flex sm:items-center sm:ms-2">
|
||||||
</div>
|
@livewire('common.language-switcher')
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Notification Bell -->
|
<!-- Notification Bell -->
|
||||||
<div class="hidden sm:flex sm:items-center sm:ms-1">
|
<div class="hidden sm:flex sm:items-center sm:ms-1">
|
||||||
@livewire('common.notification-bell')
|
@livewire('common.notification-bell')
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Settings Dropdown -->
|
<!-- Settings Dropdown -->
|
||||||
<div class="hidden sm:flex sm:items-center sm:ms-1">
|
<div class="hidden sm:flex sm:items-center sm:ms-1">
|
||||||
<x-dropdown align="right" width="48">
|
<x-dropdown align="right" width="48">
|
||||||
<x-slot name="trigger">
|
<x-slot name="trigger">
|
||||||
<button class="inline-flex items-center px-3 py-2 border border-transparent text-sm leading-4 font-medium rounded-md text-gray-500 bg-white hover:text-gray-700 focus:outline-none transition ease-in-out duration-150">
|
<button class="inline-flex items-center px-3 py-2 border border-transparent text-sm leading-4 font-medium rounded-md text-gray-500 bg-white hover:text-gray-700 focus:outline-none transition ease-in-out duration-150">
|
||||||
<div x-data="{{ json_encode(['name' => auth()->user()->name]) }}" x-text="name" x-on:profile-updated.window="name = $event.detail.name"></div>
|
<div x-data="{{ json_encode(['name' => auth()->user()->name]) }}" x-text="name" x-on:profile-updated.window="name = $event.detail.name"></div>
|
||||||
|
|
||||||
<div class="ms-1">
|
<div class="ms-1">
|
||||||
<svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
|
<svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
|
||||||
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
|
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</x-slot>
|
</x-slot>
|
||||||
|
|
||||||
<x-slot name="content">
|
<x-slot name="content">
|
||||||
<x-dropdown-link :href="route('profile')" wire:navigate>
|
<x-dropdown-link :href="route('profile')" wire:navigate>
|
||||||
{{ __('Profile') }}
|
{{ __('Profile') }}
|
||||||
</x-dropdown-link>
|
|
||||||
|
|
||||||
<!-- Authentication -->
|
|
||||||
<button wire:click="logout" class="w-full text-start">
|
|
||||||
<x-dropdown-link>
|
|
||||||
{{ __('Log Out') }}
|
|
||||||
</x-dropdown-link>
|
</x-dropdown-link>
|
||||||
</button>
|
|
||||||
</x-slot>
|
<!-- Authentication -->
|
||||||
</x-dropdown>
|
<button wire:click="logout" class="w-full text-start">
|
||||||
|
<x-dropdown-link>
|
||||||
|
{{ __('Log Out') }}
|
||||||
|
</x-dropdown-link>
|
||||||
|
</button>
|
||||||
|
</x-slot>
|
||||||
|
</x-dropdown>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Hamburger -->
|
<!-- Hamburger -->
|
||||||
|
|||||||
Reference in New Issue
Block a user