feat: Add company association to projects with role management
- Created Company model and migration with fields: name, tax_id, address, phone, email, website, type, notes - Created company_project pivot table with role_in_project field - Added relationships: Project.companies() and Company.projects() - Created Livewire component ProjectCompanies for managing company assignments - Added 'Companies' tab to project edit interface alongside Phases and Users tabs - Implemented assign/remove company functionality with role selection - Applied same permissions logic as user assignment (assign users permission or Admin role)
This commit is contained in:
@@ -18,6 +18,12 @@
|
||||
<label for="tab-users-{{ $project->id }}" class="tab {{ $activeTab === 'users' ? 'tab-active' : '' }}">
|
||||
{{ __('Users') }}
|
||||
</label>
|
||||
|
||||
<input type="radio" name="tabs-project-edit-{{ $project->id }}" id="tab-companies-{{ $project->id }}"
|
||||
{{ $activeTab === 'companies' ? 'checked' : '' }} class="tab-toggle" />
|
||||
<label for="tab-companies-{{ $project->id }}" class="tab {{ $activeTab === 'companies' ? 'tab-active' : '' }}">
|
||||
{{ __('Companies') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Tab Content -->
|
||||
|
||||
Reference in New Issue
Block a user