Merge pull request #2238 from sevannerse/permissions-fixed

Permissions arranged
This commit is contained in:
Cüneyt Şentürk 2021-09-02 11:31:23 +03:00 committed by GitHub
commit 332d76b77b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 15 additions and 5 deletions

View File

@ -64,7 +64,9 @@
<i class="fa fa-ellipsis-h text-muted"></i>
</a>
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
<a class="dropdown-item" href="{{ route('accounts.edit', $item->id) }}">{{ trans('general.edit') }}</a>
@can('update-banking-accounts')
<a class="dropdown-item" href="{{ route('accounts.edit', $item->id) }}">{{ trans('general.edit') }}</a>
@endcan
@can('delete-banking-accounts')
<div class="dropdown-divider"></div>
{!! Form::deleteLink($item, 'accounts.destroy') !!}

View File

@ -63,8 +63,10 @@
</a>
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
<a class="dropdown-item" href="{{ route('transfers.show', $item->id) }}">{{ trans('general.show') }}</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{ route('transfers.edit', $item->id) }}">{{ trans('general.edit') }}</a>
@can('update-banking-transfers')
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{ route('transfers.edit', $item->id) }}">{{ trans('general.edit') }}</a>
@endcan
@can('delete-banking-transfers')
<div class="dropdown-divider"></div>
{!! Form::deleteLink($item, 'transfers.destroy') !!}

View File

@ -95,6 +95,7 @@
@stack('edit_button_start')
@if (!$hideButtonEdit)
@can($permissionUpdate)
@if ($checkButtonReconciled)
@if (!$item->reconciled)
<a class="dropdown-item" href="{{ route($routeButtonEdit, $item->id) }}">{{ trans('general.edit') }}</a>
@ -102,6 +103,7 @@
@else
<a class="dropdown-item" href="{{ route($routeButtonEdit, $item->id) }}">{{ trans('general.edit') }}</a>
@endif
@endcan
@endif
@stack('edit_button_end')

View File

@ -88,8 +88,10 @@
<a class="dropdown-item" href="{{ route('payments.show', $item->id) }}">{{ trans('general.show') }}</a>
@if (!$item->reconciled)
@can('update-purchases-payments')
<a class="dropdown-item" href="{{ route('payments.edit', $item->id) }}">{{ trans('general.edit') }}</a>
<div class="dropdown-divider"></div>
@endcan
@endif
@if (empty($item->document_id))

View File

@ -79,7 +79,7 @@
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
<a class="dropdown-item" href="{{ route('vendors.show', $item->id) }}">{{ trans('general.show') }}</a>
@can('create-purchases-vendors')
@can('update-purchases-vendors')
<a class="dropdown-item" href="{{ route('vendors.edit', $item->id) }}">{{ trans('general.edit') }}</a>
@endcan

View File

@ -87,7 +87,7 @@
{{ trans('general.show') }}
</a>
@can('create-sales-customers')
@can('update-sales-customers')
<a class="dropdown-item" href="{{ route('customers.edit', $item->id) }}">
{{ trans('general.edit') }}
</a>

View File

@ -88,8 +88,10 @@
<a class="dropdown-item" href="{{ route('revenues.show', $item->id) }}">{{ trans('general.show') }}</a>
@if (!$item->reconciled)
@can('update-sales-revenues')
<a class="dropdown-item" href="{{ route('revenues.edit', $item->id) }}">{{ trans('general.edit') }}</a>
<div class="dropdown-divider"></div>
@endcan
@endif
@if (empty($item->document_id))