Merge pull request #2874 from novag/hide-cancel

hide cancel button for drafts
This commit is contained in:
EnesSacid-Buker
2023-02-15 16:50:01 +03:00
committed by GitHub
4 changed files with 7 additions and 9 deletions

View File

@ -108,15 +108,13 @@
@stack('button_cancelled_start')
@if (! $hideCancel)
@if (! $hideCancel && ! in_array($document->status, ['cancelled', 'draft']))
@can($permissionUpdate)
<x-dropdown.divider />
@if ($document->status != 'cancelled')
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}" id="show-more-actions-cancel-{{ $document->type }}">
{{ trans('general.cancel') }}
</x-dropdown.link>
@endif
<x-dropdown.link href="{{ route($cancelledRoute, $document->id) }}" id="show-more-actions-cancel-{{ $document->type }}">
{{ trans('general.cancel') }}
</x-dropdown.link>
@endcan
@endif