diff --git a/app/Models/Account.php b/app/Models/Account.php index 333e7b5e73cf..e9662b892033 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -216,7 +216,6 @@ class Account extends Eloquent ENTITY_QUOTE => 4, ENTITY_TASK => 8, ENTITY_EXPENSE => 16, - ENTITY_VENDOR => 32, ]; public static $dashboardSections = [ @@ -1617,10 +1616,17 @@ class Account extends Eloquent ENTITY_TASK, ENTITY_EXPENSE, ENTITY_VENDOR, + ENTITY_PROJECT, ])) { return true; } + if ($entityType == ENTITY_VENDOR) { + $entityType = ENTITY_EXPENSE; + } elseif ($entityType == ENTITY_PROJECT) { + $entityType = ENTITY_TASK; + } + // note: single & checks bitmask match return $this->enabled_modules & static::$modules[$entityType]; } diff --git a/app/Models/EntityModel.php b/app/Models/EntityModel.php index ba7a9ce088c4..e830e56a0348 100644 --- a/app/Models/EntityModel.php +++ b/app/Models/EntityModel.php @@ -327,6 +327,7 @@ class EntityModel extends Eloquent 'settings' => 'cog', 'self-update' => 'download', 'reports' => 'th-list', + 'projects' => 'briefcase', ]; return array_get($icons, $entityType); diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 42b3b1f52282..56ca39bfb928 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -2588,6 +2588,11 @@ $LANG = array( 'archived_subscription' => 'Successfully archived subscription', 'project_error_multiple_clients' => 'The projects can\'t belong to different clients', 'invoice_project' => 'Invoice Project', + 'module_recurring_invoice' => 'Recurring Invoices', + 'module_credit' => 'Credits', + 'module_quote' => 'Quotes', + 'module_task' => 'Tasks & Projects', + 'module_expense' => 'Expenses & Vendors', ); diff --git a/resources/views/accounts/management.blade.php b/resources/views/accounts/management.blade.php index edc4ad613963..ec4ea2cfa3c1 100644 --- a/resources/views/accounts/management.blade.php +++ b/resources/views/accounts/management.blade.php @@ -185,7 +185,7 @@ @foreach (\App\Models\Account::$modules as $entityType => $value)
@endforeach diff --git a/resources/views/header.blade.php b/resources/views/header.blade.php index f016e10e44c1..f0da5196670c 100644 --- a/resources/views/header.blade.php +++ b/resources/views/header.blade.php @@ -347,6 +347,7 @@ 'payments' => false, 'credits' => false, 'quotes' => false, + 'projects' => false, 'tasks' => false, 'expenses' => false, 'vendors' => false, @@ -373,6 +374,7 @@ 'payments', 'credits', 'quotes', + 'projects', 'tasks', 'expenses', 'vendors', diff --git a/resources/views/list.blade.php b/resources/views/list.blade.php index 8762039213fe..5f24a00b0e1e 100644 --- a/resources/views/list.blade.php +++ b/resources/views/list.blade.php @@ -85,19 +85,6 @@ @elseif ($entityType == ENTITY_TASK) {!! Button::normal(trans('texts.time_tracker'))->asLinkTo('javascript:openTimeTracker()')->appendIcon(Icon::create('time')) !!} - {!! DropdownButton::normal(trans('texts.projects')) - ->withAttributes(['class'=>'projectsDropdown']) - ->withContents([ - ['label' => trans('texts.new_project'), 'url' => url('/projects/create')], - ] - )->split() !!} - @endif @if (Auth::user()->can('create', $entityType) && empty($vendorId))