Merge pull request #2853 from CihanSenturk/removed-check-cancel

Removed Document cancel button checking
This commit is contained in:
Cüneyt Şentürk 2022-12-29 16:50:00 +03:00 committed by GitHub
commit cb2ad9a2ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 12 deletions

View File

@ -78,9 +78,6 @@ abstract class Show extends Component
/** @var bool */ /** @var bool */
public $hidePrint; public $hidePrint;
/** @var bool */
public $checkCancelled;
/** @var string */ /** @var string */
public $printRoute; public $printRoute;
@ -330,7 +327,7 @@ abstract class Show extends Component
$type, $document, $transactions = [], $type, $document, $transactions = [],
string $permissionCreate = '', string $permissionUpdate = '', string $permissionDelete = '', string $textPage = '', string $permissionCreate = '', string $permissionUpdate = '', string $permissionDelete = '', string $textPage = '',
bool $hideCreate = false, string $createRoute = '', string $textCreate = '', bool $hideButtonStatuses = false, bool $hideEdit = false, string $editRoute = '', string $showRoute = '', bool $hideCreate = false, string $createRoute = '', string $textCreate = '', bool $hideButtonStatuses = false, bool $hideEdit = false, string $editRoute = '', string $showRoute = '',
bool $hideMoreActions = false, bool $hideDuplicate = false, string $duplicateRoute = '', bool $hidePrint = false, bool $checkCancelled = true, string $printRoute = '', bool $hideMoreActions = false, bool $hideDuplicate = false, string $duplicateRoute = '', bool $hidePrint = false, string $printRoute = '',
bool $hideShare = false, string $shareRoute = '', string $signedUrl = '', bool $hideEmail = false, string $emailRoute = '', string $textEmail = '', bool $hidePdf = false, string $pdfRoute = '', bool $hideShare = false, string $shareRoute = '', string $signedUrl = '', bool $hideEmail = false, string $emailRoute = '', string $textEmail = '', bool $hidePdf = false, string $pdfRoute = '',
bool $hideCancel = false, string $cancelledRoute = '', bool $hideCustomize = false, string $permissionCustomize = '', string $customizeRoute = '', bool $hideCancel = false, string $cancelledRoute = '', bool $hideCustomize = false, string $permissionCustomize = '', string $customizeRoute = '',
bool $hideEnd = false, string $endRoute = '', bool $hideEnd = false, string $endRoute = '',
@ -381,7 +378,6 @@ abstract class Show extends Component
$this->duplicateRoute = $this->getDuplicateRoute($type, $duplicateRoute); $this->duplicateRoute = $this->getDuplicateRoute($type, $duplicateRoute);
$this->hidePrint = $hidePrint; $this->hidePrint = $hidePrint;
$this->checkCancelled = $checkCancelled;
$this->printRoute = $this->getPrintRoute($type, $printRoute); $this->printRoute = $this->getPrintRoute($type, $printRoute);
$this->hideShare = $hideShare; $this->hideShare = $hideShare;

View File

@ -112,17 +112,11 @@
@can($permissionUpdate) @can($permissionUpdate)
<x-dropdown.divider /> <x-dropdown.divider />
@if ($checkCancelled)
@if ($document->status != 'cancelled') @if ($document->status != 'cancelled')
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}" id="show-more-actions-cancel-{{ $document->type }}"> <x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}" id="show-more-actions-cancel-{{ $document->type }}">
{{ trans('general.cancel') }} {{ trans('general.cancel') }}
</x-dropdown.link> </x-dropdown.link>
@endif @endif
@else
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}" id="show-more-actions-cancel-{{ $document->type }}">
{{ trans('general.cancel') }}
</x-dropdown.link>
@endif
@endcan @endcan
@endif @endif