mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 18:44:28 -04:00
Proposals
This commit is contained in:
parent
59143f3526
commit
cb54e9e8b7
@ -17,7 +17,11 @@ class ProposalCategoryDatatable extends EntityDatatable
|
|||||||
[
|
[
|
||||||
'name',
|
'name',
|
||||||
function ($model) {
|
function ($model) {
|
||||||
|
if (! Auth::user()->can('editByOwner', [ENTITY_PROPOSAL_CATEGORY, $model->user_id])) {
|
||||||
return $model->name;
|
return $model->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
return link_to("proposals/categories/{$model->public_id}/edit", $model->name)->toHtml();
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
@ -15,13 +15,13 @@ class ProposalSnippetDatatable extends EntityDatatable
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
[
|
[
|
||||||
'proposal',
|
'name',
|
||||||
function ($model) {
|
function ($model) {
|
||||||
if (! Auth::user()->can('editByOwner', [ENTITY_PROPOSAL_SNIPPET, $model->user_id])) {
|
if (! Auth::user()->can('editByOwner', [ENTITY_PROPOSAL_SNIPPET, $model->user_id])) {
|
||||||
return $model->proposal;
|
return $model->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
return link_to("proposals/snippets/{$model->public_id}/edit", $model->proposal)->toHtml();
|
return link_to("proposals/snippets/{$model->public_id}/edit", $model->name)->toHtml();
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
@ -26,7 +26,7 @@ class ProposalSnippetRepository extends BaseRepository
|
|||||||
->leftjoin('proposal_categories', 'proposal_categories.id', '=', 'proposal_snippets.proposal_category_id')
|
->leftjoin('proposal_categories', 'proposal_categories.id', '=', 'proposal_snippets.proposal_category_id')
|
||||||
->where('proposal_snippets.account_id', '=', Auth::user()->account_id)
|
->where('proposal_snippets.account_id', '=', Auth::user()->account_id)
|
||||||
->select(
|
->select(
|
||||||
'proposal_snippets.name as proposal',
|
'proposal_snippets.name',
|
||||||
'proposal_snippets.public_id',
|
'proposal_snippets.public_id',
|
||||||
'proposal_snippets.user_id',
|
'proposal_snippets.user_id',
|
||||||
'proposal_snippets.deleted_at',
|
'proposal_snippets.deleted_at',
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<center class="buttons">
|
<center class="buttons">
|
||||||
{!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(HTMLUtils::previousUrl('/expense_categories'))->appendIcon(Icon::create('remove-circle')) !!}
|
{!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(HTMLUtils::previousUrl('/proposals/categories'))->appendIcon(Icon::create('remove-circle')) !!}
|
||||||
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
|
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user