169 lines
11 KiB
PHP
169 lines
11 KiB
PHP
@extends('layout.layout')
|
|
|
|
@php
|
|
$title = 'Verifikasi Pendaftaran';
|
|
$subTitle = 'Detail Pendaftaran Baru';
|
|
|
|
$wargaBaseUrl = rtrim(config('app.warga_url', 'http://127.0.0.1:8000'), '/');
|
|
@endphp
|
|
|
|
@section('content')
|
|
|
|
<div class="grid grid-cols-1 lg:grid-cols-12 gap-6">
|
|
|
|
{{-- KOLOM KIRI - INFO PROFIL --}}
|
|
<div class="col-span-12 lg:col-span-4">
|
|
<div class="user-grid-card relative border border-neutral-200 dark:border-neutral-600 rounded-2xl overflow-hidden bg-white dark:bg-neutral-700 h-full">
|
|
<div class="pb-6 ms-6 mb-6 me-6 -mt-[100px]">
|
|
<div class="text-center border-b border-neutral-200 dark:border-neutral-600 pb-4">
|
|
<h6 class="mb-0 mt-4 text-lg font-semibold">{{ $user->name }}</h6>
|
|
<span class="text-secondary-light mb-4 block">{{ $user->email }}</span>
|
|
</div>
|
|
|
|
<div class="mt-6">
|
|
<h6 class="text-xl mb-4 font-semibold text-neutral-800 dark:text-white">Personal Info</h6>
|
|
<ul>
|
|
<li class="flex items-center gap-1 mb-3">
|
|
<span class="w-[35%] text-base font-semibold text-neutral-600 dark:text-neutral-200">Full Name</span>
|
|
<span class="w-[65%] text-secondary-light font-medium">: {{ $user->name }}</span>
|
|
</li>
|
|
<li class="flex items-center gap-1 mb-3">
|
|
<span class="w-[35%] text-base font-semibold text-neutral-600 dark:text-neutral-200">Email</span>
|
|
<span class="w-[65%] text-secondary-light font-medium">: {{ $user->email }}</span>
|
|
</li>
|
|
<li class="flex items-center gap-1 mb-3">
|
|
<span class="w-[35%] text-base font-semibold text-neutral-600 dark:text-neutral-200">Phone</span>
|
|
<span class="w-[65%] text-secondary-light font-medium">: {{ $user->profile->phone_number ?? '-' }}</span>
|
|
</li>
|
|
<li class="flex items-center gap-1 mb-3">
|
|
<span class="w-[35%] text-base font-semibold text-neutral-600 dark:text-neutral-200">Address</span>
|
|
<span class="w-[65%] text-secondary-light font-medium">: {{ $user->profile->address ?? '-' }}</span>
|
|
</li>
|
|
<li class="flex items-center gap-1 mb-3">
|
|
<span class="w-[35%] text-base font-semibold">KTP</span>
|
|
<span class="w-[65%] text-secondary-light">:
|
|
@if($user->profile->ktp)
|
|
<a href="{{ $wargaBaseUrl }}/storage/{{ $user->profile->ktp }}" target="_blank" class="text-primary-600 hover:underline">Lihat KTP</a>
|
|
@else - @endif
|
|
</span>
|
|
</li>
|
|
<li class="flex items-center gap-1 mb-3">
|
|
<span class="w-[35%] text-base font-semibold">Selfie</span>
|
|
<span class="w-[65%] text-secondary-light">:
|
|
@if($user->profile->foto)
|
|
<a href="{{ $wargaBaseUrl }}/storage/{{ $user->profile->foto }}" target="_blank" class="text-primary-600 hover:underline">Lihat Foto</a>
|
|
@else - @endif
|
|
</span>
|
|
</li>
|
|
<li class="flex items-center gap-1 mb-3">
|
|
<span class="w-[35%] text-base font-semibold">Lokasi GPS</span>
|
|
<span class="w-[65%] text-secondary-light">:
|
|
@if($user->profile->latitude && $user->profile->longitude)
|
|
<a href="https://maps.google.com/?q={{ $user->profile->latitude }},{{ $user->profile->longitude }}" target="_blank" class="text-primary-600 hover:underline">Buka Maps</a>
|
|
@else - @endif
|
|
</span>
|
|
</li>
|
|
<li class="flex items-center gap-1 mb-3">
|
|
<span class="w-[35%] text-base font-semibold text-neutral-600 dark:text-neutral-200">ID Meteran</span>
|
|
<span class="w-[65%] text-secondary-light font-medium">:
|
|
@if($user->meteran)
|
|
<span class="text-primary-600 font-medium">{{ $user->meteran->nomor_seri }}</span>
|
|
@else
|
|
<span class="text-warning-600">Belum dipasang</span>
|
|
@endif
|
|
</span>
|
|
</li>
|
|
@if($user->meteran)
|
|
<li class="flex items-center gap-1 mb-3">
|
|
<span class="w-[35%] text-base font-semibold text-neutral-600 dark:text-neutral-200">Tgl Pasang</span>
|
|
<span class="w-[65%] text-secondary-light font-medium">: {{ $user->meteran->tanggal_pasang?->translatedFormat('d M Y') ?? '-' }}</span>
|
|
</li>
|
|
@endif
|
|
<li class="flex items-center gap-1 mb-3">
|
|
<span class="w-[35%] text-base font-semibold text-neutral-600 dark:text-neutral-200">Status</span>
|
|
<span class="w-[65%] text-secondary-light font-medium">:
|
|
<span class="px-3 py-1 rounded-full text-sm font-medium
|
|
@if($user->status == 'aktif') bg-success-100 text-success-600
|
|
@elseif($user->status == 'nonaktif') bg-danger-100 text-danger-600
|
|
@elseif($user->status == 'disetujui') bg-info-100 text-info-600
|
|
@else bg-warning-100 text-warning-600
|
|
@endif">
|
|
{{ ucfirst($user->status) }}
|
|
</span>
|
|
</span>
|
|
</li>
|
|
<li class="flex items-center gap-1">
|
|
<span class="w-[35%] text-base font-semibold text-neutral-600 dark:text-neutral-200">Joined Date</span>
|
|
<span class="w-[65%] text-secondary-light font-medium">: {{ $user->created_at->translatedFormat('d M Y') }}</span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{{-- KOLOM KANAN - FORM EDIT --}}
|
|
<div class="col-span-12 lg:col-span-8">
|
|
<div class="card h-full border-0 shadow-sm">
|
|
<div class="card-body p-6">
|
|
|
|
<ul class="tab-style-gradient flex flex-wrap text-sm font-medium text-center mb-5" id="default-tab" data-tabs-toggle="#default-tab-content" role="tablist">
|
|
<li class="me-2" role="presentation">
|
|
<button class="py-2.5 px-4 border-b-2 font-semibold text-base inline-flex items-center gap-3" id="edit-profile-tab" data-tabs-target="#edit-profile" type="button" role="tab">
|
|
Edit Profile
|
|
</button>
|
|
</li>
|
|
</ul>
|
|
|
|
<div id="default-tab-content">
|
|
<div id="edit-profile" role="tabpanel">
|
|
|
|
<form action="{{ route('DataPelanggan.update', $user->id) }}" method="POST" enctype="multipart/form-data">
|
|
@csrf
|
|
@method('PUT')
|
|
|
|
<div class="grid grid-cols-1 sm:grid-cols-12 gap-x-6">
|
|
<div class="col-span-12 sm:col-span-6 mb-5">
|
|
<label class="inline-block font-semibold text-neutral-600 dark:text-neutral-200 text-sm mb-2">Full Name <span class="text-danger-600">*</span></label>
|
|
<input type="text" name="name" class="form-control rounded-lg" value="{{ old('name', $user->name) }}" required>
|
|
</div>
|
|
|
|
<div class="col-span-12 sm:col-span-6 mb-5">
|
|
<label class="inline-block font-semibold text-neutral-600 dark:text-neutral-200 text-sm mb-2">Email</label>
|
|
<input type="email" class="form-control rounded-lg bg-gray-100" value="{{ $user->email }}" readonly>
|
|
<small class="text-neutral-400">Email tidak dapat diubah.</small>
|
|
</div>
|
|
|
|
<div class="col-span-12 sm:col-span-6 mb-5">
|
|
<label class="inline-block font-semibold text-neutral-600 dark:text-neutral-200 text-sm mb-2">Phone</label>
|
|
<input type="text" name="phone_number" class="form-control rounded-lg" value="{{ old('phone_number', $user->profile->phone_number ?? '') }}">
|
|
</div>
|
|
|
|
<div class="col-span-12 sm:col-span-6 mb-5">
|
|
<label class="inline-block font-semibold text-neutral-600 dark:text-neutral-200 text-sm mb-2">Status <span class="text-danger-600">*</span></label>
|
|
<select name="status" class="form-control rounded-lg form-select" required>
|
|
<option value="aktif" {{ old('status', $user->status) == 'aktif' ? 'selected' : '' }}>Aktif</option>
|
|
<option value="nonaktif" {{ old('status', $user->status) == 'nonaktif' ? 'selected' : '' }}>Nonaktif</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="col-span-12 mb-5">
|
|
<label class="inline-block font-semibold text-neutral-600 dark:text-neutral-200 text-sm mb-2">Address</label>
|
|
<textarea name="address" class="form-control rounded-lg" rows="3">{{ old('address', $user->profile->address ?? '') }}</textarea>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="flex items-center justify-end gap-3 mt-6 border-t pt-4">
|
|
<a href="{{ route('DataPelanggan') }}" class="px-8 py-2.5 rounded-lg border border-neutral-300 text-neutral-600 hover:bg-neutral-50 transition">Cancel</a>
|
|
<button type="submit" class="px-8 py-2.5 rounded-lg bg-primary-600 text-white hover:bg-primary-700 transition">Simpan</button>
|
|
</div>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@endsection |