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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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