2026-05-13 11:20:33 +02:00
|
|
|
<div>
|
2026-06-18 16:22:59 +02:00
|
|
|
{{-- Asignar empresa --}}
|
|
|
|
|
@can('assign companies')
|
2026-05-13 11:20:33 +02:00
|
|
|
<form wire:submit.prevent="assignCompany" class="flex items-end gap-2 mb-4">
|
|
|
|
|
<div class="flex-1">
|
|
|
|
|
<label class="label-text text-xs">{{ __('Companies') }}</label>
|
|
|
|
|
<select wire:model="selectedCompanyId" class="select select-bordered select-sm w-full">
|
|
|
|
|
<option value="">{{ __('Select') }}...</option>
|
|
|
|
|
@foreach($allCompanies as $company)
|
|
|
|
|
<option value="{{ $company->id }}">{{ $company->name }} @if($company->tax_id) ({{ $company->tax_id }}) @endif</option>
|
|
|
|
|
@endforeach
|
|
|
|
|
</select>
|
2026-06-18 16:22:59 +02:00
|
|
|
@error('selectedCompanyId') <span class="text-error text-xs">{{ $message }}</span> @enderror
|
2026-05-13 11:20:33 +02:00
|
|
|
</div>
|
2026-06-18 16:22:59 +02:00
|
|
|
<div class="w-40">
|
2026-05-13 11:20:33 +02:00
|
|
|
<label class="label-text text-xs">{{ __('Role') }}</label>
|
|
|
|
|
<select wire:model="selectedRole" class="select select-bordered select-sm w-full">
|
2026-06-18 16:22:59 +02:00
|
|
|
@foreach($roles as $value => $label)
|
|
|
|
|
<option value="{{ $value }}">{{ $label }}</option>
|
|
|
|
|
@endforeach
|
2026-05-13 11:20:33 +02:00
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<button type="submit" class="btn btn-primary btn-sm">{{ __('Assign') }}</button>
|
|
|
|
|
</form>
|
|
|
|
|
@endcan
|
|
|
|
|
|
2026-06-18 16:22:59 +02:00
|
|
|
{{-- Tabla Rappasoft de empresas asignadas --}}
|
|
|
|
|
<livewire:project-companies-table :project-id="$project->id" :key="'project-companies-table-'.$project->id" />
|
|
|
|
|
</div>
|