Skip to content

Commit

Permalink
permissions arranged
Browse files Browse the repository at this point in the history
  • Loading branch information
sevannerse committed Sep 2, 2021
1 parent 1b648a2 commit 613da78
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 5 deletions.
4 changes: 3 additions & 1 deletion resources/views/banking/accounts/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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') !!}
Expand Down
6 changes: 4 additions & 2 deletions resources/views/banking/transfers/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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') !!}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,15 @@

@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>
@endif
@else
<a class="dropdown-item" href="{{ route($routeButtonEdit, $item->id) }}">{{ trans('general.edit') }}</a>
@endif
@endcan
@endif
@stack('edit_button_end')

Expand Down
2 changes: 2 additions & 0 deletions resources/views/purchases/payments/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion resources/views/purchases/vendors/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion resources/views/sales/customers/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions resources/views/sales/revenues/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 613da78

Please sign in to comment.