From b57c92f3c7469cdabc6e956716aaf0d7d5f63387 Mon Sep 17 00:00:00 2001 From: rahmagustin Date: Sun, 18 Jan 2026 15:06:33 +0700 Subject: [PATCH] perbaikan edit tps --- resources/views/admin/tps/edit.blade.php | 250 ++++++++++++----------- 1 file changed, 135 insertions(+), 115 deletions(-) diff --git a/resources/views/admin/tps/edit.blade.php b/resources/views/admin/tps/edit.blade.php index 7de36ad..57a9bee 100644 --- a/resources/views/admin/tps/edit.blade.php +++ b/resources/views/admin/tps/edit.blade.php @@ -1,134 +1,154 @@ +@php + function decimalToDms($decimal, $type = 'lat') + { + if ($decimal === null || $decimal === '') return ''; + + $direction = $decimal >= 0 + ? ($type === 'lat' ? 'N' : 'E') + : ($type === 'lat' ? 'S' : 'W'); + + $decimal = abs($decimal); + + $degree = floor($decimal); + $minuteFloat = ($decimal - $degree) * 60; + $minute = floor($minuteFloat); + $second = round(($minuteFloat - $minute) * 60, 2); + + return "{$degree}°{$minute}'{$second}\"{$direction}"; + } +@endphp + @extends('admin.template') @section('content') -
-
-
-
-
-

Edit Data TPS

-

- Form edit data Tempat Pembuangan Sampah -

+
+
+
+
+
+

Edit Data TPS

+

+ Form edit data Tempat Pembuangan Sampah +

-
- @csrf - @method('PUT') + + @csrf + @method('PUT') - {{-- Nama TPS --}} -
- - -
+ {{-- Nama TPS --}} +
+ + +
- {{-- Alamat --}} -
- - -
+ {{-- Alamat --}} +
+ + +
- {{-- Kategori TPS --}} -
- - -
- - {{-- Tahun Pembuatan --}} -
- - -
- - {{-- Kapasitas TPS --}} -
- - -
- - {{-- Status TPS --}} -
- - + + @foreach ($kategori as $item) + - - - + @endforeach + +
+ {{-- Tahun Pembuatan --}} +
+ + +
+ + {{-- Kapasitas TPS --}} +
+ + +
+ + {{-- Status TPS --}} +
+ + +
+ + {{-- Latitude (DMS) --}} +
+ + +
+ + {{-- Longitude (DMS) --}} +
+ + +
+ + {{-- Foto TPS --}} +
+ + + +
+ + + +
- {{-- Latitude --}} -
- - -
- - {{-- Longitude --}} -
- - -
- - {{-- Foto TPS --}} -
- - - - -
- - - - + {{-- Foto Lama --}} + @if ($tps->foto_tps) +
+
+ @endif +
- {{-- Foto Lama --}} - @if ($tps->foto_tps) -
- -
- @endif -
+ {{-- Button --}} + + + Batal + - {{-- Button --}} - - - Batal - - - -
+
+
@endsection