VaKeR CYBER ARMY
Logo of a company Server : Apache
System : Linux host44.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
User : vapecompany ( 2719)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /home/vapecompany/demo.vapecompany.com.bd/resources/views/backend/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/vapecompany/demo.vapecompany.com.bd/resources/views/backend/profile.blade.php
@extends('backend.layout.app')
@section('content')
      <style type="text/css">

@media screen and (max-width: 767px){
    #dtables_filter{
        margin-top: 10px;
    }
}

</style>

        <!-- ============================================================== -->
        <!-- Page wrapper  -->
        <!-- ============================================================== -->
        <div class="page-wrapper">
            <!-- ============================================================== -->
            <!-- Bread crumb and right sidebar toggle -->
            <!-- ============================================================== -->
            <div class="page-breadcrumb">
                <div class="row">
                    <div class="col-5 align-self-center">
                        <!-- <h4 class="page-title">Product List</h4> -->
                        <div class="d-flex align-items-center">
                            <nav aria-label="breadcrumb">
                                <ol class="breadcrumb">
                                    <li class="breadcrumb-item"><a href="#">Home</a></li>
                                    <li class="breadcrumb-item active" aria-current="page">Profile</li>
                                </ol>
                            </nav>
                        </div>
                    </div>

                </div>
            </div>
            <!-- ============================================================== -->
            <!-- End Bread crumb and right sidebar toggle -->
            <!-- ============================================================== -->
            <!-- ============================================================== -->
            <!-- Container fluid  -->
            <!-- ============================================================== -->
   <div class="container-fluid">
                <!-- ============================================================== -->
                <!-- Start Page Content -->
                <!-- ============================================================== -->
                <!-- Row -->
                <div class="row">
                    <!-- Column -->
                    <div class="col-lg-4 col-xlg-3 col-md-5">
                        <div class="card">
                            <div class="card-body">
                                <center class="mt-4"> <img src="{{url('public/images/1.jpg')}}" class="rounded-circle" width="150">
                                    <h4 class="card-title mt-2">{{$employee->employee_name}}</h4>
                                    <h6 class="card-subtitle">{{$employee->designation->designation_name }} <br/> {{$employee->department->department_name }}</h6>
                                    <h6 class="card-subtitle">Role:{{auth()->user()->getrole()->role_name }}</h6>

                                   <!--  <div class="row text-center justify-content-md-center">
                                        <div class="col-4"><a href="javascript:void(0)" class="link"><i class="icon-people"></i> <font class="font-medium">254</font></a></div>
                                        <div class="col-4"><a href="javascript:void(0)" class="link"><i class="icon-picture"></i> <font class="font-medium">54</font></a></div>
                                    </div> -->
                                </center>
                            </div>
                            <div>
                                <hr> </div>
                            <div class="card-body">
                                <small class="text-muted">Email address </small>

                                <h6>{{$employee->employee_email}}</h6> <small class="text-muted pt-4 db">Phone</small>
                                <h6>{{$employee->employee_phone}}</h6> <small class="text-muted pt-4 db">Address</small>
                                <h6>{{$employee->employee_address}}</h6>
                            </div>
                            @if(auth()->user()->employee->user_type == 3)
                             <div class="card-body">
                                <h3>Sales Area</h3>
                                @if($employee->district->region)
                                <small class="text-muted pt-4 db">Region</small>
                                <h6>{{$employee->district->region->region_name}}</h6>
                                @endif

                                <small class="text-muted">Division </small>

                                <h6>{{$employee->division->division_name}}</h6>
                                <small class="text-muted pt-4 db">District</small>
                                <h6>{{$employee->district->district_name}}</h6>
                                 @if($employee->district->area)
                                <small class="text-muted pt-4 db">Area</small>
                                <h6>{{$employee->district->area->area_name}}</h6>
                                @endif
                            </div>
                            @endif
                        </div>
                    </div>
                    <!-- Column -->
                    <!-- Column -->
                    <div class="col-lg-8 col-xlg-9 col-md-7">
                        <div class="card">
                            <!-- Tabs -->
                            <ul class="nav nav-pills custom-pills" id="pills-tab" role="tablist">

                                <li class="nav-item">
                                    <a class="nav-link active" id="pills-setting-tab" data-toggle="pill" href="#previous-month" role="tab" aria-controls="pills-setting" aria-selected="true">Account Setting</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" id="pills-password-tab" data-toggle="pill" href="#change_password" role="tab" aria-controls="pills-password" aria-selected="false">Change Password</a>
                                </li>
                            </ul>
                            <!-- Tabs -->
                            <div class="tab-content" id="pills-tabContent">


                                <div class="tab-pane fade active show" id="previous-month" role="tabpanel" aria-labelledby="pills-setting-tab">
                                    <div class="card-body">
                                        <form action="{{route('updateprofile')}}" method="Post" class="form-horizontal form-material">
                                            @csrf
                                            <div class="form-group">
                                                <label class="col-md-12">Full Name</label>
                                                <div class="col-md-12">
                                                <input type="hidden" name="employee_id" value="{{$employee->employee_id}}">
                                                    <input name="employee_name" type="text" value="{{$employee->employee_name}}" class="form-control form-control-line">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="example-email" class="col-md-12">Email</label>
                                                <div class="col-md-12">
                                                    <input type="email" value="{{$employee->employee_email}}" class="form-control form-control-line" name="employee_email" id="example-email">
                                                </div>
                                            </div>

                                            <div class="form-group">
                                                <label class="col-md-12">Phone No</label>
                                                <div class="col-md-12">
                                                    <input name="employee_phone" type="text" value="{{$employee->employee_phone}}" class="form-control form-control-line">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-md-12">Address</label>
                                                <div class="col-md-12">
                                                    <textarea name="employee_address" rows="5" class="form-control form-control-line">{{$employee->employee_address}}</textarea>
                                                </div>
                                            </div>

                                            <div class="form-group">
                                                <div class="col-sm-12">
                                                    <button type="submit" class="btn btn-success">Update Profile</button>
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                </div>



                                <div class="tab-pane fade" id="change_password" role="tabpanel" aria-labelledby="pills-password-tab">
                                    <div class="card-body">
                                        <form id="addpermission" method="Post" class="form-horizontal form-material">
                                            @csrf
                                             @include('backend.layout.verror_message')
                                            <div class="form-group">
                                                <label class="col-md-12">Old Password</label>
                                                <div class="col-md-12">

                                                    <input name="old_password" type="password" value="" class="form-control form-control-line">
                                                    <input name="user_id" type="hidden" value="{{$employee->user->user_id}}" >
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label for="example-email" class="col-md-12">New Password</label>
                                                <div class="col-md-12">
                                                    <input type="password" value="" class="form-control form-control-line" name="new_password" id="new_password">
                                                </div>
                                            </div>



                                            <div class="form-group">
                                                <div class="col-sm-12">
                                                    <button type="submit" class="btn btn-success">Change Password</button>
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                            <!-- end tab -->
                        </div>
                    </div>
                    <!-- Column -->
                </div>
                <!-- Row -->
                <!-- ============================================================== -->
                <!-- End PAge Content -->
                <!-- ============================================================== -->
                <!-- ============================================================== -->
                <!-- Right sidebar -->
                <!-- ============================================================== -->
                <!-- .right-sidebar -->
                <!-- ============================================================== -->
                <!-- End Right sidebar -->
                <!-- ============================================================== -->
            </div>
            <!-- ============================================================== -->
            <!-- End Container fluid  -->
            @endsection
            @section('script')
            <script src="{{url('public/backend/js/jquery.validate.min.js')}}"></script>
                <script type="text/javascript">

                     $("#addpermission").validate({

                        rules:
                       {
                            old_password: {
                                required: true,

                            },
                            new_password: {
                                required: true,

                            },


                       },
                        submitHandler: submitForm
                      });


                       function submitForm()
                        {

                        event.preventDefault();

                         var data = $("#addpermission").serialize();

                            $.ajax({

                                type : 'POST',
                                url  : "{{url('change_user_password')}}",
                                data : data,
                               // dataType : 'json',
                                success :  function (data)
                                {
                                    console.log(data);
                                    if(data.errors=='0'){
                                        $('.alert-success').show();
                                        $('.alert-danger').hide();
                                        $('.alert-success').append('<p>'+data.success+'</p>');

                                    }else{
                                         var val="";
                                        //$.each(data.errors, function(key, value){
                                            $('.alert-danger').show();
                                            $('.alert-success').hide();
                                            val+= '<p>'+data.errors+'</p>';

                                       // });
                                        $('.alert-danger').html(val);
                                    }

                                },error: function(response) {
                                    //console.log(response);
                                }
                            });


                   }
                </script>
            @endsection

VaKeR 2022