Initial commit - construprogress app
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<x-app-layout>
|
||||
<div class="max-w-2xl mx-auto p-4">
|
||||
<h1 class="text-2xl font-bold mb-4">Crear Nuevo Proyecto</h1>
|
||||
<form action="{{ route('projects.store') }}" method="POST" class="space-y-4">
|
||||
@csrf
|
||||
<div>
|
||||
<label class="label">Nombre del proyecto</label>
|
||||
<input type="text" name="name" class="input input-bordered w-full" required>
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">Dirección</label>
|
||||
<input type="text" name="address" class="input input-bordered w-full" required>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label class="label">Latitud</label>
|
||||
<input type="number" step="any" name="lat" class="input input-bordered w-full" required>
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">Longitud</label>
|
||||
<input type="number" step="any" name="lng" class="input input-bordered w-full" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label class="label">Fecha inicio</label>
|
||||
<input type="date" name="start_date" class="input input-bordered w-full" required>
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">Fecha estimada fin</label>
|
||||
<input type="date" name="end_date_estimated" class="input input-bordered w-full">
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary w-full">Crear Proyecto</button>
|
||||
</form>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
@@ -0,0 +1,52 @@
|
||||
<x-app-layout>
|
||||
<div class="max-w-2xl mx-auto p-4">
|
||||
<h1 class="text-2xl font-bold mb-4">Editar Proyecto: {{ $project->name }}</h1>
|
||||
<form action="{{ route('projects.update', $project) }}" method="POST" class="space-y-4">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
<div>
|
||||
<label class="label">Nombre</label>
|
||||
<input type="text" name="name" value="{{ old('name', $project->name) }}" class="input input-bordered w-full" required>
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">Dirección</label>
|
||||
<input type="text" name="address" value="{{ old('address', $project->address) }}" class="input input-bordered w-full" required>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label class="label">Latitud</label>
|
||||
<input type="number" step="any" name="lat" value="{{ old('lat', $project->lat) }}" class="input input-bordered w-full" required>
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">Longitud</label>
|
||||
<input type="number" step="any" name="lng" value="{{ old('lng', $project->lng) }}" class="input input-bordered w-full" required>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">Estado</label>
|
||||
<select name="status" class="select select-bordered w-full">
|
||||
<option value="planning" @selected($project->status == 'planning')>Planificación</option>
|
||||
<option value="in_progress" @selected($project->status == 'in_progress')>En obra</option>
|
||||
<option value="paused" @selected($project->status == 'paused')>Pausado</option>
|
||||
<option value="completed" @selected($project->status == 'completed')>Finalizado</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label class="label">Fecha inicio</label>
|
||||
<input type="date" name="start_date" value="{{ old('start_date', $project->start_date->format('Y-m-d')) }}" class="input input-bordered w-full" required>
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">Fecha fin estimada</label>
|
||||
<input type="date" name="end_date_estimated" value="{{ old('end_date_estimated', $project->end_date_estimated?->format('Y-m-d')) }}" class="input input-bordered w-full">
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary w-full">Actualizar Proyecto</button>
|
||||
</form>
|
||||
|
||||
<hr class="my-6">
|
||||
|
||||
<h2 class="text-xl font-bold mb-2">Fases del proyecto</h2>
|
||||
<livewire:phase-list :project="$project" />
|
||||
</div>
|
||||
</x-app-layout>
|
||||
@@ -0,0 +1,12 @@
|
||||
<x-app-layout>
|
||||
|
||||
<div class="py-12">
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<h1 class="text-2xl font-bold">Mis Proyectos</h1>
|
||||
@can('create projects')
|
||||
<a href="{{ route('projects.create') }}" class="btn btn-primary">+ Nuevo Proyecto</a>
|
||||
@endcan
|
||||
</div>
|
||||
<livewire:project-list />
|
||||
</div>
|
||||
</x-app-layout>
|
||||
@@ -0,0 +1,5 @@
|
||||
<x-app-layout>
|
||||
<div class="relative">
|
||||
<livewire:project-map :project="$project" />
|
||||
</div>
|
||||
</x-app-layout>
|
||||
@@ -0,0 +1,3 @@
|
||||
<x-app-layout>
|
||||
<livewire:template-manager :project="$project" />
|
||||
</x-app-layout>
|
||||
Reference in New Issue
Block a user