2026-05-07 23:31:33 +02:00
|
|
|
<x-app-layout>
|
2026-05-14 10:19:32 +02:00
|
|
|
<div class="card bg-base-100 shadow-sm">
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
<div x-data="{ tabActivo: 1 }">
|
|
|
|
|
<div role="tablist" class="tabs tabs-border">
|
|
|
|
|
<a role="tab" class="tab" :class="{ 'tab-active': tabActivo === 1 }" @click.prevent="tabActivo = 1">{{ __("Project Data") }}</a>
|
|
|
|
|
<a role="tab" class="tab" :class="{ 'tab-active': tabActivo === 2 }" @click.prevent="tabActivo = 2">{{ __("Phases") }}</a>
|
|
|
|
|
<a role="tab" class="tab" :class="{ 'tab-active': tabActivo === 3 }" @click.prevent="tabActivo = 3">{{ __("Users") }}</a>
|
|
|
|
|
<a role="tab" class="tab" :class="{ 'tab-active': tabActivo === 4 }" @click.prevent="tabActivo = 4">{{ __("Companies") }}</a>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Los contenedores del contenido -->
|
|
|
|
|
<div class="py-4" x-show="tabActivo === 1">
|
|
|
|
|
<h1 class="text-2xl font-bold mb-4">{{ __('Edit Project') }}: {{ $project->name }}</h1>
|
|
|
|
|
<form action="{{ route('projects.update', $project) }}" method="POST" class="space-y-4">
|
|
|
|
|
@csrf
|
|
|
|
|
@method('PUT')
|
|
|
|
|
|
|
|
|
|
<table class="w-full mb-8">
|
|
|
|
|
<tbody>
|
|
|
|
|
{{-- Nombre --}}
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="w-1/4 py-3 pr-4 align-bootom font-bold">
|
|
|
|
|
{{ __('Reference') }}
|
|
|
|
|
</td>
|
|
|
|
|
<td class="py-3">
|
|
|
|
|
<input type="text"
|
|
|
|
|
name="reference"
|
|
|
|
|
value="{{ old('reference', $project->reference) }}"
|
|
|
|
|
class="input w-64"
|
|
|
|
|
required
|
|
|
|
|
autofocus>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
{{-- Nombre --}}
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="w-1/4 py-3 pr-4 align-bootom font-bold">
|
|
|
|
|
{{ __('Name') }}
|
|
|
|
|
</td>
|
|
|
|
|
<td class="py-3">
|
|
|
|
|
<input type="text"
|
|
|
|
|
name="name"
|
|
|
|
|
value="{{ old('name', $project->name) }}"
|
|
|
|
|
class="input w-64"
|
|
|
|
|
required
|
|
|
|
|
>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
{{-- Dirección --}}
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="w-1/4 py-3 pr-4 align-bottom font-bold">
|
|
|
|
|
{{ __('Address') }}
|
|
|
|
|
</td>
|
|
|
|
|
<td class="py-3">
|
|
|
|
|
<input type="text"
|
|
|
|
|
name="address"
|
|
|
|
|
value="{{ old('address', $project->address) }}"
|
|
|
|
|
class="input w-1/2"
|
|
|
|
|
required>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
{{-- Coordenadas --}}
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="w-1/4 py-3 pr-4 align-bottom font-bold">
|
|
|
|
|
{{ __('Coordinates') }}
|
|
|
|
|
</td>
|
|
|
|
|
<td class="py-3">
|
|
|
|
|
<div class="grid grid-cols-2 gap-4">
|
|
|
|
|
<div>
|
|
|
|
|
<label class="label">{{ __('Latitude') }}</label>
|
|
|
|
|
<input type="number"
|
|
|
|
|
step="any"
|
|
|
|
|
name="lat"
|
|
|
|
|
value="{{ old('lat', $project->lat) }}"
|
|
|
|
|
class="input w-64"
|
|
|
|
|
required>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<label class="label">{{ __('Longitude') }}</label>
|
|
|
|
|
<input type="number"
|
|
|
|
|
step="any"
|
|
|
|
|
name="lng"
|
|
|
|
|
value="{{ old('lng', $project->lng) }}"
|
|
|
|
|
class="input w-64"
|
|
|
|
|
required>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
{{-- Estatus --}}
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="w-1/4 py-3 pr-4 align-bottom ">
|
|
|
|
|
{{ __('Status') }}
|
|
|
|
|
</td>
|
|
|
|
|
<td class="py-3">
|
|
|
|
|
<select name="status" class="select select-bordered w-full">
|
|
|
|
|
<option value="planning" @selected($project->status == 'planning')>{{ __('Planning') }}</option>
|
|
|
|
|
<option value="in_progress" @selected($project->status == 'in_progress')>{{ __('In progress') }}</option>
|
|
|
|
|
<option value="paused" @selected($project->status == 'paused')>{{ __('Paused') }}</option>
|
|
|
|
|
<option value="completed" @selected($project->status == 'completed')>{{ __('Completed') }}</option>
|
|
|
|
|
</select>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
{{-- Fecha de Inicio --}}
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="w-1/4 py-3 pr-4 align-bottom font-bold">
|
|
|
|
|
{{ __('Start date') }}
|
|
|
|
|
</td>
|
|
|
|
|
<td class="py-3">
|
|
|
|
|
<input type="date"
|
|
|
|
|
name="start_date"
|
|
|
|
|
value="{{ old('start_date', $project->start_date->format('Y-m-d')) }}"
|
|
|
|
|
class="input w-64"
|
|
|
|
|
required>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
{{-- Fechas de finalización --}}
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="w-1/4 py-3 pr-4 align-bottom">
|
|
|
|
|
{{ __('Estimated end date') }}
|
|
|
|
|
</td>
|
|
|
|
|
<td class="py-3">
|
|
|
|
|
<input type="date"
|
|
|
|
|
name="end_date_estimated"
|
|
|
|
|
value="{{ old('end_date_estimated', $project->end_date_estimated?->format('Y-m-d')) }}"
|
|
|
|
|
class="input w-64">
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<button type="submit" class="btn btn-primary">{{ __('Update') }}</button>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="py-4" x-show="tabActivo === 2">
|
|
|
|
|
<h2 class="text-xl font-bold mb-2">{{ __('Phases') }}</h2>
|
|
|
|
|
<livewire:phase-list :project="$project" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="py-4" x-show="tabActivo === 3">
|
|
|
|
|
|
|
|
|
|
<h2 class="text-xl font-bold mb-2">{{ __('Users') }}</h2>
|
|
|
|
|
<livewire:project-users :project="$project" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-05-07 23:31:33 +02:00
|
|
|
</div>
|
2026-05-12 09:51:56 +02:00
|
|
|
</x-app-layout>
|