<%- include('partials/header') %> 
<%- include('partials/sidemenu') %> 
<style>
	button.btn.dropdown-toggle.btn-light {
    display: none;
}
.dropdown.bootstrap-select.form-control {
    padding: 0;
}
</style>
        <!--**********************************
            Content body start
        ***********************************-->
        <div class="content-body">
            <div class="container-fluid">
                <div class="page-titles">
					<ol class="breadcrumb">
						<li class="breadcrumb-item"><a href="javascript:void(0)">User</a></li>
						<li class="breadcrumb-item active"><a href="javascript:void(0)">My Profile</a></li>
					</ol>
                </div>
                <!-- row -->
                <div class="row">
                    <div class="col-lg-12">
                        <div class="profile card card-body px-3 pt-3 pb-0">
                            <div class="profile-head">
                                <div class="photo-content">
                                    <div class="cover-photo"></div>
                                </div>
                                <div class="profile-info">
									<% if(owner.profileimage.path !== undefined) { %>
										<div class="profile-photo">
											<img src="/<%=owner.profileimage.path%>" class="img-fluid rounded-circle" alt="" style=" width:120px !important; height:120px !important; max-width: unset;">
										</div>
									<%} else{ %>
										<div class="profile-photo" >
											<img src="../images/avatar/profile.png" class="img-fluid rounded-circle" alt="">
										</div>
							     	<%}%>
									
									<div class="profile-details">
										<div class="profile-name px-3 pt-2">
											<h4 class="text-primary mb-0"><%=owner.fullnames.firstname%> <%=owner.fullnames.lastname%></h4>
											<p>Fountain Core User</p>
										</div>
										<div class="profile-email px-2 pt-2">
											<h4 class="text-muted mb-0"><%=owner.username%></h4>
											<p>Email</p>
										</div>
										
									</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                   
                    <div class="col-xl-12">
                        <div class="card">
                            <div class="card-body">
                                <div class="profile-tab">
                                    <div class="custom-tab-1">
                                        <ul class="nav nav-tabs">
                                            <li class="nav-item"><a href="#profilesettings" data-toggle="tab" class="nav-link active show">Profile Details</a>
                                            </li>
                                            <li class="nav-item"><a href="#accountsettings" data-toggle="tab" class="nav-link">Account Details</a>
                                            </li>
                                           
                                        </ul>
                                        <div class="tab-content">
											<div id="profilesettings" class="tab-pane fade active show">
												<h4>Edit User Profile Details</h4>
                                                <div class="pt-3">
                                                    <div class="settings-form">
                                                        
                                                        <form method="POST" action="/update-admin" enctype="multipart/form-data">
                                                            <div class="form-row">
                                                                <div class="form-group col-md-6">
																	<label>First Name</label>
                                                                    <input type="text" value="<%=owner.fullnames.firstname%>" class="form-control" name="firstname" readonly>
                                                                </div>
                                                                <div class="form-group col-md-6">
                                                                    <label>Last Name</label>
                                                                    <input type="text" value="<%=owner.fullnames.lastname%>" class="form-control" name="lastname" readonly>
                                                                </div>
															</div>
															<div class="form-row">
                                                                <div class="form-group col-md-6">
																	<label>Email</label>
                                                                    <input type="text" value="<%=owner.username%>" class="form-control" readonly>
                                                                </div>
                                                                
                                                                <div class="form-group col-md-6">
                                                                    <label>Password</label>
																	<input type="password" value="<%=owner.password%>" class="form-control" name="password" required>
																	<input type="text" value="<%=owner._id%>" class="form-control" name="userid" hidden>
                                                                </div>
															</div>
															<div class="form-row">
                                                                <div class="form-group col-md-6">
																	<label>Phone</label>
                                                                    <input type="text" value="<%=owner.phone%>" class="form-control" name="phone" required>
                                                                </div>
                                                                <div class="form-group col-md-6">
                                                                    <label>Profile Image</label>
                                                                    <input type="file" name="profileimage" class="form-control">
                                                                </div>
                                                            </div>
                                                           
                                                            
                                                            
                                                            <button class="btn btn-primary" type="submit"> Update Profile                       </button>
                                                        </form>
                                                    </div>
                                                </div>
											</div>
											<div id="accountsettings" class="tab-pane fade">
												<h4>Account Details</h4>
                                                <div class="pt-3">
                                                    <div class="settings-form">
                                                        
                                                        <form>
                                                            <div class="form-row">
                                                                <div class="form-group col-md-6">
                                                                    <label>Account Type</label>
                                                                    <input type="text" value="<%=owner.accountype%>" class="form-control" readonly>
																
                                                                </div>
                                                                <div class="form-group col-md-6">
                                                                    <label>Account Number</label>
                                                                    <input type="text" value="<%=owner.accountnumber%>" placeholder=" Format 051234567X" class="form-control" name="accountnumber" readonly>
                                                                </div>
															</div>
															<div class="form-row">
                                                                <div class="form-group col-md-6">
																	<label>Main Account Balance</label>
                                                                    <input type="text" value="<%=owner.mainbalance%>" class="form-control" name="mainbalance" readonly>
                                                                </div>
                                                                <div class="form-group col-md-6">
                                                                    <label>Loan Balance</label>
																	<input type="text" value="<%=owner.loanbalance%>" class="form-control" name="loanbalance" readonly>
																	<input type="text" value="<%=owner._id%>" class="form-control" name="userid" hidden>
                                                                </div>
															</div>
															<div class="form-row">
                                                                <div class="form-group col-md-6">
																	<label>Card Balance</label>
                                                                    <input type="text" value="<%=owner.cardbalance%>" class="form-control" name="cardbalance" readonly>
                                                                </div>
                                                                <div class="form-group col-md-6">
                                                                    <label>Certificates of deposit (CDs) Balance</label>
                                                                    <input type="text"  value="<%=owner.termdepositbalance%>" class="form-control" name="termdepositbalance" readonly>
                                                                </div>
                                                            </div>
                                                           
                                                            
                                                            
                                                            
                                                        </form>
                                                    </div>
                                                </div>
                                            </div>
                                          
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--**********************************
            Content body end
        ***********************************-->


        <!--**********************************
            Footer start
        ***********************************-->
        <div class="footer">
            <div class="copyright">
                <p>Copyright © 2024 Fountain Core Finance</p>
            </div>
        </div>
        <!--**********************************
            Footer end
        ***********************************-->

        <!--**********************************
           Support ticket button start
        ***********************************-->

        <!--**********************************
           Support ticket button end
        ***********************************-->

        
    </div>
    <!--**********************************
        Main wrapper end
    ***********************************-->
	
	<!--removeIf(production)-->
        
    <!--**********************************
        Scripts
    ***********************************-->
    <!-- Required vendors -->
    <script src="/vendor/global/global.min.js"></script>
	<script src="/vendor/bootstrap-select/dist/js/bootstrap-select.min.js"></script>
    <script src="/js/custom.min.js"></script>
	<script src="/js/deznav-init.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
          setTimeout(function(){
            $('#flash').remove();
          }, 5000);
         })
    </script>
	
    



	
		
</body>


</html>