2026-05-08 09:01:00 +02:00
|
|
|
<div>
|
|
|
|
|
@if(session()->has('message'))
|
|
|
|
|
<div class="alert alert-success mb-2">{{ session('message') }}</div>
|
|
|
|
|
@endif
|
2026-05-09 21:17:36 +02:00
|
|
|
@if(session()->has('error'))
|
|
|
|
|
<div class="alert alert-error mb-2">{{ session('error') }}</div>
|
|
|
|
|
@endif
|
2026-05-08 09:01:00 +02:00
|
|
|
|
|
|
|
|
<div class="card bg-base-100 shadow-xl">
|
|
|
|
|
<div class="card-body">
|
2026-05-09 23:14:48 +02:00
|
|
|
<h2 class="card-title">{{ __("Upload Layer") }}</h2>
|
2026-05-09 21:17:36 +02:00
|
|
|
|
|
|
|
|
<form wire:submit.prevent="upload" class="space-y-4">
|
|
|
|
|
<div class="form-control">
|
2026-05-09 23:14:48 +02:00
|
|
|
<label class="label">{{ __("Project") }}</label>
|
2026-05-09 21:17:36 +02:00
|
|
|
<select wire:model.live="projectId" class="select select-bordered" required>
|
2026-05-09 23:14:48 +02:00
|
|
|
<option value="">{{ __("Select project") }}...</option>
|
2026-05-09 21:17:36 +02:00
|
|
|
@foreach($projects as $p)
|
|
|
|
|
<option value="{{ $p->id }}">{{ $p->name }}</option>
|
|
|
|
|
@endforeach
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-control">
|
2026-05-09 23:14:48 +02:00
|
|
|
<label class="label">{{ __("Phase") }}</label>
|
2026-05-09 21:17:36 +02:00
|
|
|
<select wire:model.live="phaseId" class="select select-bordered" required @if(!$projectId) disabled @endif>
|
2026-05-09 23:14:48 +02:00
|
|
|
<option value="">{{ __("Select phase") }}...</option>
|
2026-05-09 21:17:36 +02:00
|
|
|
@foreach($phases as $ph)
|
|
|
|
|
<option value="{{ $ph->id }}">{{ $ph->name }}</option>
|
|
|
|
|
@endforeach
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-05-08 09:01:00 +02:00
|
|
|
<div class="form-control">
|
2026-05-09 23:14:48 +02:00
|
|
|
<label class="label">{{ __("Layer name") }}</label>
|
2026-05-09 21:17:36 +02:00
|
|
|
<input type="text" wire:model="layerName" class="input input-bordered" placeholder="Ej: Cimentación" required />
|
|
|
|
|
@error('layerName') <span class="text-error text-sm">{{ $message }}</span> @enderror
|
2026-05-08 09:01:00 +02:00
|
|
|
</div>
|
2026-05-09 21:17:36 +02:00
|
|
|
|
|
|
|
|
<div class="form-control">
|
2026-05-09 23:14:48 +02:00
|
|
|
<label class="label">{{ __("Color") }}</label>
|
2026-06-16 18:05:53 +02:00
|
|
|
<input type="color" wire:model="layerColor" class="input input-bordered w-20" />
|
2026-05-09 21:17:36 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-control">
|
2026-05-09 23:14:48 +02:00
|
|
|
<label class="label">{{ __("File") }} (GeoJSON, KML, KMZ, Shapefile .zip, DWG)</label>
|
2026-05-09 21:17:36 +02:00
|
|
|
<input type="file" wire:model="uploadFile" class="file-input file-input-bordered" accept=".geojson,.kml,.kmz,.zip,.shp,.dwg" />
|
|
|
|
|
@error('uploadFile') <span class="text-error text-sm">{{ $message }}</span> @enderror
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<button type="submit" class="btn btn-primary w-full">
|
2026-05-09 23:14:48 +02:00
|
|
|
{{ __("Upload Layer") }}
|
2026-05-09 21:17:36 +02:00
|
|
|
</button>
|
2026-05-08 09:01:00 +02:00
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|