diff --git a/app/Livewire/CompanyManagement.php b/app/Livewire/CompanyManagement.php index 4f2974d..d6d58a6 100644 --- a/app/Livewire/CompanyManagement.php +++ b/app/Livewire/CompanyManagement.php @@ -3,12 +3,14 @@ namespace App\Livewire; use Livewire\Component; +use Livewire\Attributes\Layout; use Livewire\WithFileUploads; use App\Models\Company; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Storage; use Illuminate\Http\Response; +#[Layout('layouts.app')] class CompanyManagement extends Component { use WithFileUploads; @@ -236,6 +238,8 @@ class CompanyManagement extends Component public function render() { - return view('livewire.company-management'); + return view('livewire.company-management', [ + 'companies' => $this->getCompaniesProperty(), + ]); } } \ No newline at end of file diff --git a/app/Livewire/PhaseProgress.php b/app/Livewire/PhaseProgress.php index 1d35524..67561ab 100644 --- a/app/Livewire/PhaseProgress.php +++ b/app/Livewire/PhaseProgress.php @@ -3,9 +3,11 @@ namespace App\Livewire; use Livewire\Component; +use Livewire\Attributes\Layout; use App\Models\Phase; use Illuminate\Support\Facades\Auth; +#[Layout('layouts.app')] class PhaseProgress extends Component { public Phase $phase; diff --git a/app/Livewire/ProjectList.php b/app/Livewire/ProjectList.php index b7277d7..2b3fbc9 100644 --- a/app/Livewire/ProjectList.php +++ b/app/Livewire/ProjectList.php @@ -3,10 +3,12 @@ namespace App\Livewire; use Livewire\Component; +use Livewire\Attributes\Layout; use Livewire\WithPagination; use App\Models\Project; use Illuminate\Support\Facades\Auth; +#[Layout('layouts.app')] class ProjectList extends Component { use WithPagination; diff --git a/app/Livewire/ProjectMap.php b/app/Livewire/ProjectMap.php index 6fbf4b0..f765259 100644 --- a/app/Livewire/ProjectMap.php +++ b/app/Livewire/ProjectMap.php @@ -42,9 +42,6 @@ class ProjectMap extends Component public $showFeatureImages = false; public $featureImageMarkers = []; - // Tab management - public $activeTab = 'edit'; // edit or list - public function mount(Project $project) { $user = Auth::user(); diff --git a/app/Models/User.php b/app/Models/User.php index 832f15d..77e0f2b 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -49,6 +49,11 @@ class User extends Authenticatable 'password' => 'hashed', ]; } + public function company() + { + return $this->belongsTo(Company::class); + } + // Many-to-many with projects public function projects() { diff --git a/config/session.php b/config/session.php index f9d71f1..1c530fa 100644 --- a/config/session.php +++ b/config/session.php @@ -169,8 +169,7 @@ return [ | */ - // Default to true in production; set SESSION_SECURE_COOKIE=false in local .env if needed - 'secure' => env('SESSION_SECURE_COOKIE', app()->environment('production')), + 'secure' => env('SESSION_SECURE_COOKIE', env('APP_ENV', 'production') === 'production'), /* |-------------------------------------------------------------------------- diff --git a/resources/views/admin/users.blade.php b/resources/views/admin/users.blade.php index f7cce07..cec97cb 100644 --- a/resources/views/admin/users.blade.php +++ b/resources/views/admin/users.blade.php @@ -15,7 +15,7 @@
{{ __('Manage the companies that participate in projects') }}
-- {{ __('Complete the company information. Fields marked with * are required.') }} -
-{{ __('No companies registered. Create your first company using the button above.') }}
-- @if($company->tax_id) - {{ $company->tax_id }} - @else - {{ __('No tax ID') }} - @endif -
- @if($company->type) - - {{ ucfirst($company->type) }} - - @endif -{{ __('Manage the companies that participate in projects') }}
| {{ __('Name') }} | {{ __('Address') }} | {{ __('Status') }} | {{ __('Progress') }} | {{ __('Actions') }} |
|---|---|---|---|---|
| {{ $project->name }} | -{{ $project->address }} | -{{ __(ucfirst(str_replace('_', ' ', $project->status))) }} | -
-
-
-
- |
-
-
- |
-