Rework frontend

This commit is contained in:
F4ilji
2025-03-23 00:38:16 +05:00
parent 17518ceed2
commit 49072e50c7
438 changed files with 14375 additions and 20015 deletions
-108
View File
@@ -1,108 +0,0 @@
<?php
namespace App\Policies;
use App\Models\User;
use App\Models\ExternalVacancy;
use Illuminate\Auth\Access\HandlesAuthorization;
class ExternalVacancyPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->can('view_any_external::vacancy');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, ExternalVacancy $externalVacancy): bool
{
return $user->can('view_external::vacancy');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->can('create_external::vacancy');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, ExternalVacancy $externalVacancy): bool
{
return $user->can('update_external::vacancy');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, ExternalVacancy $externalVacancy): bool
{
return $user->can('delete_external::vacancy');
}
/**
* Determine whether the user can bulk delete.
*/
public function deleteAny(User $user): bool
{
return $user->can('delete_any_external::vacancy');
}
/**
* Determine whether the user can permanently delete.
*/
public function forceDelete(User $user, ExternalVacancy $externalVacancy): bool
{
return $user->can('force_delete_external::vacancy');
}
/**
* Determine whether the user can permanently bulk delete.
*/
public function forceDeleteAny(User $user): bool
{
return $user->can('force_delete_any_external::vacancy');
}
/**
* Determine whether the user can restore.
*/
public function restore(User $user, ExternalVacancy $externalVacancy): bool
{
return $user->can('restore_external::vacancy');
}
/**
* Determine whether the user can bulk restore.
*/
public function restoreAny(User $user): bool
{
return $user->can('restore_any_external::vacancy');
}
/**
* Determine whether the user can replicate.
*/
public function replicate(User $user, ExternalVacancy $externalVacancy): bool
{
return $user->can('replicate_external::vacancy');
}
/**
* Determine whether the user can reorder.
*/
public function reorder(User $user): bool
{
return $user->can('reorder_external::vacancy');
}
}
@@ -3,10 +3,10 @@
namespace App\Policies;
use App\Models\User;
use App\Models\LibraryNews;
use App\Models\Slide;
use Illuminate\Auth\Access\HandlesAuthorization;
class LibraryNewsPolicy
class SlidePolicy
{
use HandlesAuthorization;
@@ -15,15 +15,15 @@ class LibraryNewsPolicy
*/
public function viewAny(User $user): bool
{
return $user->can('view_any_library::news');
return $user->can('view_any_slide');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, LibraryNews $libraryNews): bool
public function view(User $user, Slide $slide): bool
{
return $user->can('view_library::news');
return $user->can('view_slide');
}
/**
@@ -31,23 +31,23 @@ class LibraryNewsPolicy
*/
public function create(User $user): bool
{
return $user->can('create_library::news');
return $user->can('create_slide');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, LibraryNews $libraryNews): bool
public function update(User $user, Slide $slide): bool
{
return $user->can('update_library::news');
return $user->can('update_slide');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, LibraryNews $libraryNews): bool
public function delete(User $user, Slide $slide): bool
{
return $user->can('delete_library::news');
return $user->can('delete_slide');
}
/**
@@ -55,15 +55,15 @@ class LibraryNewsPolicy
*/
public function deleteAny(User $user): bool
{
return $user->can('delete_any_library::news');
return $user->can('delete_any_slide');
}
/**
* Determine whether the user can permanently delete.
*/
public function forceDelete(User $user, LibraryNews $libraryNews): bool
public function forceDelete(User $user, Slide $slide): bool
{
return $user->can('force_delete_library::news');
return $user->can('force_delete_slide');
}
/**
@@ -71,15 +71,15 @@ class LibraryNewsPolicy
*/
public function forceDeleteAny(User $user): bool
{
return $user->can('force_delete_any_library::news');
return $user->can('force_delete_any_slide');
}
/**
* Determine whether the user can restore.
*/
public function restore(User $user, LibraryNews $libraryNews): bool
public function restore(User $user, Slide $slide): bool
{
return $user->can('restore_library::news');
return $user->can('restore_slide');
}
/**
@@ -87,15 +87,15 @@ class LibraryNewsPolicy
*/
public function restoreAny(User $user): bool
{
return $user->can('restore_any_library::news');
return $user->can('restore_any_slide');
}
/**
* Determine whether the user can replicate.
*/
public function replicate(User $user, LibraryNews $libraryNews): bool
public function replicate(User $user, Slide $slide): bool
{
return $user->can('replicate_library::news');
return $user->can('replicate_slide');
}
/**
@@ -103,6 +103,6 @@ class LibraryNewsPolicy
*/
public function reorder(User $user): bool
{
return $user->can('reorder_library::news');
return $user->can('reorder_slide');
}
}
@@ -3,10 +3,10 @@
namespace App\Policies;
use App\Models\User;
use App\Models\VacantPosition;
use App\Models\Slider;
use Illuminate\Auth\Access\HandlesAuthorization;
class VacantPositionPolicy
class SliderPolicy
{
use HandlesAuthorization;
@@ -15,15 +15,15 @@ class VacantPositionPolicy
*/
public function viewAny(User $user): bool
{
return $user->can('view_any_vacant::position');
return $user->can('view_any_slider');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, VacantPosition $vacantPosition): bool
public function view(User $user, Slider $slider): bool
{
return $user->can('view_vacant::position');
return $user->can('view_slider');
}
/**
@@ -31,23 +31,23 @@ class VacantPositionPolicy
*/
public function create(User $user): bool
{
return $user->can('create_vacant::position');
return $user->can('create_slider');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, VacantPosition $vacantPosition): bool
public function update(User $user, Slider $slider): bool
{
return $user->can('update_vacant::position');
return $user->can('update_slider');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, VacantPosition $vacantPosition): bool
public function delete(User $user, Slider $slider): bool
{
return $user->can('delete_vacant::position');
return $user->can('delete_slider');
}
/**
@@ -55,15 +55,15 @@ class VacantPositionPolicy
*/
public function deleteAny(User $user): bool
{
return $user->can('delete_any_vacant::position');
return $user->can('delete_any_slider');
}
/**
* Determine whether the user can permanently delete.
*/
public function forceDelete(User $user, VacantPosition $vacantPosition): bool
public function forceDelete(User $user, Slider $slider): bool
{
return $user->can('force_delete_vacant::position');
return $user->can('force_delete_slider');
}
/**
@@ -71,15 +71,15 @@ class VacantPositionPolicy
*/
public function forceDeleteAny(User $user): bool
{
return $user->can('force_delete_any_vacant::position');
return $user->can('force_delete_any_slider');
}
/**
* Determine whether the user can restore.
*/
public function restore(User $user, VacantPosition $vacantPosition): bool
public function restore(User $user, Slider $slider): bool
{
return $user->can('restore_vacant::position');
return $user->can('restore_slider');
}
/**
@@ -87,15 +87,15 @@ class VacantPositionPolicy
*/
public function restoreAny(User $user): bool
{
return $user->can('restore_any_vacant::position');
return $user->can('restore_any_slider');
}
/**
* Determine whether the user can replicate.
*/
public function replicate(User $user, VacantPosition $vacantPosition): bool
public function replicate(User $user, Slider $slider): bool
{
return $user->can('replicate_vacant::position');
return $user->can('replicate_slider');
}
/**
@@ -103,6 +103,6 @@ class VacantPositionPolicy
*/
public function reorder(User $user): bool
{
return $user->can('reorder_vacant::position');
return $user->can('reorder_slider');
}
}
-108
View File
@@ -1,108 +0,0 @@
<?php
namespace App\Policies;
use App\Models\User;
use App\Models\VirtualExhibition;
use Illuminate\Auth\Access\HandlesAuthorization;
class VirtualExhibitionPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->can('view_any_virtual::exhibition');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, VirtualExhibition $virtualExhibition): bool
{
return $user->can('view_virtual::exhibition');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->can('create_virtual::exhibition');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, VirtualExhibition $virtualExhibition): bool
{
return $user->can('update_virtual::exhibition');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, VirtualExhibition $virtualExhibition): bool
{
return $user->can('delete_virtual::exhibition');
}
/**
* Determine whether the user can bulk delete.
*/
public function deleteAny(User $user): bool
{
return $user->can('delete_any_virtual::exhibition');
}
/**
* Determine whether the user can permanently delete.
*/
public function forceDelete(User $user, VirtualExhibition $virtualExhibition): bool
{
return $user->can('force_delete_virtual::exhibition');
}
/**
* Determine whether the user can permanently bulk delete.
*/
public function forceDeleteAny(User $user): bool
{
return $user->can('force_delete_any_virtual::exhibition');
}
/**
* Determine whether the user can restore.
*/
public function restore(User $user, VirtualExhibition $virtualExhibition): bool
{
return $user->can('restore_virtual::exhibition');
}
/**
* Determine whether the user can bulk restore.
*/
public function restoreAny(User $user): bool
{
return $user->can('restore_any_virtual::exhibition');
}
/**
* Determine whether the user can replicate.
*/
public function replicate(User $user, VirtualExhibition $virtualExhibition): bool
{
return $user->can('replicate_virtual::exhibition');
}
/**
* Determine whether the user can reorder.
*/
public function reorder(User $user): bool
{
return $user->can('reorder_virtual::exhibition');
}
}