@extends('layouts.main') @section('otherCss') @endsection @section('contents')

MSPDCL Surya Ghar

{{ strtoupper(substr($user->name, 0, 1)) }}

{{ $user->name }}

{{ $user->email }}

{{ $user->user_type == 1 ? 'Super Admin' : 'Admin' }}

Member since {{ $user->created_at->format('F Y') }}

Update Profile Information

Update your account's profile information and password.

@csrf

Change Password

Leave blank if you don't want to change your password.

Admin Management

Manage other admin users in the system.

@forelse($admins as $admin)
{{ $admin->name }}
{{ $admin->email }}
{{ $admin->user_type == 1 ? 'Super Admin' : 'Admin' }}
Created {{ $admin->created_at->diffForHumans() }}
@empty

No other admin users found.

@endforelse
@endsection @section('otherJs') {{-- Swal.fire({ title: 'Delete Admin User?', text: `Are you sure you want to delete ${name}? This action cannot be undone.`, icon: 'warning', showCancelButton: true, confirmButtonColor: '#d33', cancelButtonColor: '#3085d6', confirmButtonText: 'Yes, delete!', cancelButtonText: 'Cancel' }).then((result) => { if (result.isConfirmed) { loader.showBodyLoader(); $.ajax({ url: `{{ route('admin.delete-user', '${id}') }}/`, method: 'DELETE', headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, success: function(response) { loader.hideBodyLoader(); if (response.status === 1) { Swal.fire('Deleted!', response.message, 'success').then(() => { location.reload(); }); } }, error: function(xhr) { loader.hideBodyLoader(); const response = xhr.responseJSON; Swal.fire('Error!', response.message || 'Something went wrong!', 'error'); } }); } }); --}} @endsection