diff --git a/resources/views/livewire/projects/project-map-editor-tab.blade.php b/resources/views/livewire/projects/project-map-editor-tab.blade.php new file mode 100644 index 0000000..987d03e --- /dev/null +++ b/resources/views/livewire/projects/project-map-editor-tab.blade.php @@ -0,0 +1,122 @@ + {{-- Feature seleccionado --}} + @if($selectedFeature) +
+

{{ $selectedFeature->name ?? 'Elemento' }}

+

Fase: {{ $selectedFeature->layer?->phase?->name ?? '—' }}

+

Capa: {{ $selectedFeature->layer?->name ?? '—' }}

+
+ + {{-- {{ __("Progress") }} --}} +
+ + +
+ 0%50%100% +
+
+ +
+ + +
+ + + + {{-- Gestor de archivos del feature --}} +
+ + 📎 {{ __("Files of element") }} + +
+ @livewire('media-manager', [ + 'mediableType' => 'App\\Models\\Feature', + 'mediableId' => $selectedFeature->id, + ], key('media-feature-' . $selectedFeature->id)) +
+
+ + {{-- Templates / Inspecciones --}} + @if($templates->isNotEmpty()) +
{{ __("Inspection") }}
+
+ + +
+ + @if($selectedTemplateId && !empty($inspectionFormData)) + @php $template = $templates->firstWhere('id', $selectedTemplateId); @endphp + @if($template) + @foreach($template->fields as $field) +
+ + @switch($field['type'] ?? 'text') + @case('percentage') +
+ + % + +
+ @break + @case('boolean') + + @break + @case('select') + + @break + @case('textarea') + + @break + @default + + @endswitch +
+ @endforeach + + @endif + @endif + + {{-- {{ __("History") }} de inspecciones --}} + @if($inspectionHistory->isNotEmpty()) +
{{ __("History") }}
+
+ @foreach($inspectionHistory as $ins) +
+
+ {{ $ins->template?->name ?? '{{ __("Inspection") }}' }} + {{ $ins->created_at->diffForHumans() }} +
+ @if($ins->user)por {{ $ins->user->name }}@endif +
+ @endforeach +
+ @endif + @else + + @endif + @else +
+

👆

+

Haz clic en un elemento del mapa para editarlo

+
+ @endif \ No newline at end of file diff --git a/resources/views/livewire/projects/project-map-inspections-tab.blade.php b/resources/views/livewire/projects/project-map-inspections-tab.blade.php new file mode 100644 index 0000000..ad4d702 --- /dev/null +++ b/resources/views/livewire/projects/project-map-inspections-tab.blade.php @@ -0,0 +1,90 @@ +
+ +
+ +
+ + +
+
+ + +
+ @if($filteredFeatures->isEmpty()) +
+

{{ __("No elements found") }}

+
+ @else +
+ @foreach($filteredFeatures as $feature) +
+
+
+ {{ $feature->name }}
+ + {{ optional(optional($feature->layer)->phase)->name ?? '—' }} > + {{ optional($feature->layer)->name ?? '—' }} + +
+
+ + {{ $feature->progress }}% + +
+
+
+ @endforeach +
+ @endif +
+
+ + {{-- Historial de inspecciones --}} + @if($selectedFeature) +
+

{{ __("Inspection History") }}

+ @if($inspectionHistory->isEmpty()) +
+

{{ __("No inspections yet for this element") }}

+
+ @else +
+ @foreach($inspectionHistory as $inspection) +
+
+
+ {{ $inspection->template->name ?? 'Inspection' }}
+ + {{ $inspection->created_at->diffForHumans() }} {{ __("ago") }} + + @if($inspection->user) + {{ __("by") }} {{ $inspection->user->name }} + @endif +
+
+ {{ __("View") }} +
+
+
+ @endforeach +
+ @endif +
+ @endif \ No newline at end of file diff --git a/resources/views/livewire/projects/project-map-media-tab.blade.php b/resources/views/livewire/projects/project-map-media-tab.blade.php new file mode 100644 index 0000000..462378e --- /dev/null +++ b/resources/views/livewire/projects/project-map-media-tab.blade.php @@ -0,0 +1,122 @@ +
+ +
+ +
+ + +
+
+ + +
+ @if($filteredFeatures->isEmpty()) +
+

{{ __("No elements found") }}

+
+ @else +
+ @foreach($filteredFeatures as $feature) +
+
+
+ {{ $feature->name }}
+ + {{ optional(optional($feature->layer)->phase)->name ?? '—' }} > + {{ optional($feature->layer)->name ?? '—' }} + +
+
+ + {{ $feature->progress }}% + +
+
+
+ @endforeach +
+ @endif +
+
+ + {{-- Media del proyecto --}} + @if($selectedFeature) +
+

{{ __("Media for this element") }}

+ @if($selectedFeature->media()->exists()) +
+ @foreach($selectedFeature->media as $media) +
+
+
+ {{ $media->name }}
+ + {{ $media->mime_type }} • {{ $media->created_at->diffForHumans() }} {{ __("ago") }} + +
+
+ {{ __("View") }} +
+
+
+ @endforeach +
+ @else +
+

{{ __("No media for this element yet") }}

+
+ @endif +
+ @else +
+

{{ __("Project Media") }}

+ @if($projectMedia->isEmpty()) +
+

{{ __("No project media yet") }}

+
+ @else +
+ @foreach($projectMedia as $media) +
+
+
+ {{ $media->name }}
+ + {{ $media->mime_type }} • {{ $media->created_at->diffForHumans() }} {{ __("ago") }} + + @if($media->model_type === 'App\\Models\\Feature') + {{ __("Feature:") }} {{ optional($media->model)->name ?? '' }} + @elseif($media->model_type === 'App\\Models\\Inspection') + {{ __("Inspection:") }} {{ optional($media->model)->template->name ?? '' }} + @endif +
+
+ {{ __("View") }} +
+
+
+ @endforeach +
+ @endif +
+ @endif \ No newline at end of file