- Added getTabs method to ListCardPinOrders, ListLoanOrders, and ListLoanOrderMobiles pages to display order statuses for system users. - Implemented default sorting by 'created_at' in LoanOrdersTable and LoanOrderMobilesTable for improved data organization. - Updated ManageCards page to ensure proper type declaration for getTitle method.
50 lines
1.3 KiB
PHP
50 lines
1.3 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Modules\VisaMasterPaymentOrder\Policies;
|
|
|
|
use App\Models\User;
|
|
use App\Modules\VisaMasterPaymentOrder\Models\VisaMasterPaymentOrder;
|
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
|
|
|
class VisaMasterPaymentOrderPolicy
|
|
{
|
|
use HandlesAuthorization;
|
|
|
|
public function viewAny(User $user): bool
|
|
{
|
|
return $user->can('ViewAny:VisaMasterPaymentOrder');
|
|
}
|
|
|
|
public function view(User $user, VisaMasterPaymentOrder $visaMasterPaymentOrder): bool
|
|
{
|
|
return $user->can('View:VisaMasterPaymentOrder');
|
|
}
|
|
|
|
public function create(User $user): bool
|
|
{
|
|
return $user->can('Create:VisaMasterPaymentOrder');
|
|
}
|
|
|
|
public function update(User $user, VisaMasterPaymentOrder $visaMasterPaymentOrder): bool
|
|
{
|
|
return $user->can('Update:VisaMasterPaymentOrder');
|
|
}
|
|
|
|
public function delete(User $user, VisaMasterPaymentOrder $visaMasterPaymentOrder): bool
|
|
{
|
|
return $user->can('Delete:VisaMasterPaymentOrder');
|
|
}
|
|
|
|
public function restore(User $user, VisaMasterPaymentOrder $visaMasterPaymentOrder): bool
|
|
{
|
|
return $user->can('Restore:VisaMasterPaymentOrder');
|
|
}
|
|
|
|
public function forceDelete(User $user, VisaMasterPaymentOrder $visaMasterPaymentOrder): bool
|
|
{
|
|
return $user->can('ForceDelete:VisaMasterPaymentOrder');
|
|
}
|
|
}
|