@extends('admin.admin_master')
@section('admin')


 <div class="page-content">
                    <div class="container-fluid">

                        <!-- start page title -->
                        <div class="row">
                            <div class="col-12">
                                <div class="page-title-box d-sm-flex align-items-center justify-content-between">
                                    <h4 class="mb-sm-0">All users</h4>



                                </div>
                            </div>
                        </div>
                        <!-- end page title -->

    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-body">

    <a href="{{ route('add.user') }}" class="btn btn-dark btn-rounded waves-effect waves-light" style="float:right;"><i class="fas fa-plus-circle"> Add User </i></a> <br>  <br>               

                    <h4 class="card-title">All Users Data </h4>


                    <table id="datatable" class="table table-bordered dt-responsive nowrap" style="border-collapse: collapse; border-spacing: 0; width: 100%;">
                        <thead>
                        <tr>
                            <th>Sn.</th>
                            <th>Full Name</th>
                            <th>Membership #</th>
                            <th>Mobile Number </th>
                            <th>Address</th>
                            <th>Hisa</th>
                            <th>Akiba</th> 
                            <th>Action</th>

                        </thead>


                        <tbody>

                        	
                            @foreach($all_info as $key => $item)
                            
                
                        <tr>
                            <td> {{ $key+1}} </td>
                            <td> {{ $item->name." ".$item->sname." ".$item->lname }} </td>
                            <td> {{ $item->membership_no }} </td>
                            <td> {{ $item->mobile_no }} </td>
                            <td> {{ $item->address }} </td>
                            <td> {{ number_format($item->hisa_amount,2) }} </td>
                            <td> {{ number_format($item->akiba_amount,2) }} </td>
                            <td>
                            <a href="{{ route('user.hisa',$item->id) }}" class="btn btn-info sm" title="Edit Hisa">  <i class="fas fa-edit"></i> </a>
                            <a href="{{ route('user.akiba',$item->id) }}" class="btn btn-info sm" title="Edit Akiba">  <i class="fas fa-edit"></i> </a>
                            <!-- <a href="{{ route('user.delete',$item->id) }}" class="btn btn-danger sm" title="Delete Data" id="delete">  <i class="fas fa-trash-alt"></i> </a> -->
                            </td>

                        </tr>
                        @endforeach

                        </tbody>
                    </table>

                                    </div>
                                </div>
                            </div> <!-- end col -->
                        </div> <!-- end row -->



                    </div> <!-- container-fluid -->
                </div>


@endsection