

@extends('layouts.agencies')
 
@section('content')
<?php Fun::lang()?>
<div class="main-content-wrapper">
	 <div class="main-content-wrapper">
		<div class="breadcrumb">
			<div class="container">
				<ul class="">
					<li><a href="{{route('dashboard-agencies.index')}}">Dashboard<span>/</span></a></li>
					<li><a href="#">Agency<span>/</span></a></li>
					<li><a href="">Agency list</a></li>
				</ul>
			</div>
		</div>
		
	</section>  

	<div class="main-box">
		<div class="main-content">
			<div class="main-admin-dashboard">
				<div class="container">
					<div class="page-wrapper">
						
					<div class="row">
						<div class="agency-chart">
							<div class="col-sm-2">
								<div class="box-profile">
									<div class="thum">
										<img src='{{asset("/assets/images/resize/".$find_childs[0]->avatar)}}' alt="" class="icon-profile" width="150px">
									</div>
								</div>
	  						</div>
	  						<div class="col-sm-10">
	  							<div class="list-chart">
						       		<div class="show-border">
										<div class="pull-left"><h4>Profile Info</h4></div>
										
									</div>
						       		<ul class="personal-info" id="fixed_content">
						       			<li><span class="span">ID:</span> {{ $find_childs[0]->user_code }}</li>
						       			<li><span class="span">Name :</span> {{ $find_childs[0]->user_firstname }} {{ $find_childs[0]->user_lastname }}</li>
						       			<li><span class="span">Date of Birth:</span> {{ date("d-m-Y",strtotime($find_childs[0]->user_dob)) }}</li>
						       			<li><span class="span">Phone Number:</span> {{ $find_childs[0]->user_phone }}</li>
						       			<li><span class="span">Email:</span> {{ $find_childs[0]->email }}</li>
						       			<li><span class="span">Gender:</span> {{ $find_childs[0]->user_gender }}</li>
						       			<li><span class="span">User Reference:</span> {{ $find_childs[0]->user_reference }}</li>
									</ul>
								
						       </div>
						       	<div class="list-chart">
						       		<h4>List Of Chart</h4>
						       		<div class="header">
						       			<span class="head-1">Name</span>
							       		<span class="head-2">Status</span>
							       		<span class="head-3">Action</span>
						       		</div>
							       	<ul id="tree1">
							       		
							            @foreach($find_childs as $find_child)
							                <li>
							                   {{ $find_child->user_code }}
							                   {{ $find_child->user_firstname }}
							                   {{ $find_child->user_lastname }}
							                   <span class="table-chart">
										       		<span class="col">
										       			<a href="{{route('admin-agency.show',$find_child->id)}}">
										       				<i class="fa fa-eye"></i>
										       			</a>
										       		</span>
										       		<span class="col"><a href="">
										       			@if($find_child->user_activity==0) 
										       				<strong class="text-danger"><i class="fa fa-close"></i> Deactivate</strong> 
										       			@else 
										       				<strong class="text-success"><i class="fa fa-check"></i> Active</strong>@endif</a>
										      	 	</span>
										       </span>
							                    @if(count($find_child->childs))
							                    	(<?php echo count($find_child->childs)?>)

							                        @include('manageChildAdmin',['childs' => $find_child->childs])
							                    @endif
							                </li>
							            @endforeach
							        </ul>
						       	</div>
	  						</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
@endsection

@section('script')

	
@endsection
