mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-21 13:33:57 +00:00
55 lines
1.3 KiB
PHP
55 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Bookings\Standards\Rules;
|
|
|
|
|
|
use App\Classes\General\Abstracts\AbstractRule;
|
|
use App\Classes\Modules\Bookings\Standards\Validators\BookingSalesInvoiceValidation;
|
|
use App\Classes\Modules\Bookings\DataTransferObjects\UpdateBookingSalesInvoiceDTO;
|
|
use Illuminate\Support\Facades\Auth;
|
|
|
|
class CanUpdateBookingSalesInvoice extends AbstractRule
|
|
{
|
|
|
|
/** @var BookingSalesInvoiceValidation */
|
|
private $bookingSalesInvoiceValidation;
|
|
|
|
|
|
/**
|
|
* CanUpdateBookingSalesInvoice constructor.
|
|
* @param UpdateBookingSalesInvoiceDTO $bookingSalesInvoiceValidation
|
|
*/
|
|
public function __construct(BookingSalesInvoiceValidation $bookingSalesInvoiceValidation)
|
|
{
|
|
$this->bookingSalesInvoiceValidation = $bookingSalesInvoiceValidation;
|
|
}
|
|
|
|
/**
|
|
* @return bool
|
|
*/
|
|
protected function authorized($object): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* @param UpdateBookingSalesInvoiceDTO $object
|
|
* @return bool
|
|
* @throws \App\Classes\Exceptions\RequestValidationException
|
|
*/
|
|
protected function validators($object): bool
|
|
{
|
|
return $this->bookingSalesInvoiceValidation->validate($object);
|
|
}
|
|
|
|
/**
|
|
* @param UpdateBookingSalesInvoiceDTO $object
|
|
* @return bool
|
|
*/
|
|
protected function criteria($object): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
}
|