Added CancelOrder action with output handling for order cancellation. Introduced CancelOrderOutput enum to represent cancellation states. Refactored ShopPolicy to simplify user checks in viewPickupTimeslots. Updated tests to reflect changes in policy behavior.
17 lines
296 B
PHP
17 lines
296 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Policies\Frontend;
|
|
|
|
use App\Models\Customer;
|
|
use App\Models\Shop;
|
|
use App\Models\User;
|
|
|
|
class ShopPolicy
|
|
{
|
|
public function viewPickupTimeslots(null | User | Customer $user, Shop $__): bool
|
|
{
|
|
return $user instanceof Customer;
|
|
}
|
|
}
|