Current File : /home/tradevaly/public_html/resources/views/user/pages/profile_view.blade.php
@extends('user.ayaan.master')

@push('style')
     <link href="{{ asset('/assets/libs/select2/select2.min.css') }}" rel="stylesheet" type="text/css" />
 <style>
     .my_select2_optgroup_selected {
    background-color: #ddd;
}
.my_select2_optgroup_hovered {
    color: #FFF;
    background-color: #5897fb !important;
    cursor: pointer;
}
strong.select2-results__group {
    padding: 0 !important;
}
.my_select2_optgroup {
    display: block;
    padding: 6px;
}
 </style>
@endpush
 @component('components.breadcrumb')
        @slot('li_1') Dashboards @endslot
        @slot('title') Manage Profile @endslot
    @endcomponent
@section('content')
<div class="container-fluid">
    <div class="row">
      <div class="col-md-6">
        <div class="card">
          <div class="card-header card-header-icon card-header-info">
           
            <h4 class="card-title">Basic Information
            </h4>
          </div>
          <div class="card-body">
            <form action="{{route('user.profile.basic_infirmation')}}" method="POST"> @csrf
              <div class="row">
                  <div class="col-md-12">
                  <div class="form-group">
                    <label class="bmd-label-floating">Full Name</label>
                    <input name="name" type="text" value="{{Auth::guard('web')->user()->name}}" class="form-control">
                  </div>
                </div>
               <div class="col-md-12">
                  <div class="form-group">
                    <label class="bmd-label-floating">Industry</label>
                    <select class="form-control select2" name="industry">
                        @foreach(\App\Models\Category::where('parent_id', 0)->get() as $cat)
                        <option {{ $cat->id == Auth::user()->category_id? 'selected':''}} value="{{$cat->id}}">{{ $cat->name }}</option>
                        @endforeach
                    </select>
                  </div>
                </div>
                
                <div class="col-md-12">
                  <div class="form-group">
                    <label class="bmd-label-floating">Products</label>
                    <input name="products" type="text" value="{{Auth::guard('web')->user()->products}}" class="form-control">
                  </div>
                </div>
                <div class="col-md-12">
                  <div class="form-group">
                    <label class="bmd-label-floating">Gender</label>
                    <select class="form-control" name="gender">
                        <option value="">Your Gender</option>
                        <option value="male" @if(Auth::guard('web')->user()->gender == 'male') selected @endif >Male</option>
                        <option value="female" @if(Auth::guard('web')->user()->gender == 'female') selected @endif>Female</option>
                    </select>
                  </div>
                </div>
                <div class="col-md-12">
                  <div class="form-group">
                    <label class="bmd-label-floating">Profile Picture</label>
                    @if(Auth::guard('web')->user()->image != 'image.jpg') <img style="width:50px; border-radius:10%;" src="{{asset('storage/images/user/avatar/'.Auth::guard('web')->user()->image)}}"> @endif
                    <input type="file" class="form-control" name="image">
                  </div>
                </div>
                <div class="col-md-12">
                  <div class="form-group">
                    <label class="bmd-label-floating">Address</label>
                    <input name="address" type="text"  value="{{Auth::guard('web')->user()->address}}" class="form-control" >
                  </div>
                </div>
                
                <div class="col-md-12">
                  <div class="form-group">
                    <label class="bmd-label-floating">City</label>
                    <input type="text" name="city"  value="{{Auth::guard('web')->user()->city}}" class="form-control" > 
                  </div>
                </div>
                <div class="col-md-12">
                  <div class="form-group">
                    <label class="bmd-label-floating">Province/State</label>
                    <input type="text" name="state" class="form-control"  value="{{Auth::guard('web')->user()->state}}" >
                  </div>
                </div>
                <div class="col-md-12">
                    <div class="form-group">
                      <label class="bmd-label-floating">Country</label>
                      <select class="form-control select2" name="country_id">
                        @foreach(\App\Models\Country::all() as $country)
                        <option value="{{$country->id}}" @if(Auth::guard('web')->user()->country_id == $country->id) selected @endif>{{$country->name}}</option>
                        @endforeach
                    </select>
                    </div>
                </div>
                <div class="col-md-12">
                  <div class="form-group">
                    <label class="bmd-label-floating">Zip Code</label>
                    <input name="postal" type="text"  value="{{Auth::guard('web')->user()->postal}}" class="form-control" >
                  </div>
                </div>
              </div>
              <br>
            
              <div class="clearfix"></div>
           
          </div>
        </div>
      </div>
     <div class="col-md-6">
        <div class="card">
          <div class="card-header card-header-icon card-header-info">
           
            <h4 class="card-title">Account Information
            </h4>
          </div>
          <div class="card-body">
                    <table class="table" border="1" cellspacing="1" cellpadding="0">
                       
                        <tbody>
                        <tr>
                            <td><label>I am a</label></td>
                            <td class="instant_notify_td  checkboxs">
                                <input type="radio" id="type_yes" name="type" value="seller" @if(Auth::guard('web')->user()->type == 'seller') checked="" @endif>
                                <label for="type_yes">Seller</label>
                                <input type="radio" id="type_no" name="type" value="buyer"  @if(Auth::guard('web')->user()->type == 'buyer') checked="" @endif>
                                <label for="type_no">Buyer</label>
                            </td>
                        </tr>
                        <tr>
                            <td><label>Member Id</label></td>
                            <td>TV{{Auth::guard('web')->user()->id}}</td>
                        </tr>
                        <tr>
                            <td><label>Package Name</label></td>
                            <td>{{Auth::guard('web')->user()->package->name}}</td>
                        </tr>
                        <tr>
                            <td><label>Expiry Date </label></td>
                            <td> @if(Auth::guard('web')->user()->package->id != 0)
                                                                    {{ date('d F, Y', strtotime(Auth::guard('web')->user()->next_pay))}}
                                                                    @else
                                                                    Unlimted
                                                                    @endif
                                                            </td>
                        </tr>
                       <tr>
                           <td><label>Change Password</label></td>
                           <td><a href="{{ route('user.password') }}">Click Here</a></td>
                       </tr>
                        </tbody>
                    </table>
                </div></div>
                
                
                
                
            <div class="card">
          <div class="card-header card-header-icon card-header-info">
           
            <h4 class="card-title">Preferred Instant Messenger ID(s)
            </h4>
          </div>
            <div class="card-body">
                    <div class="row">
                          <div class="col-md-12">
                              <div class="form-group">
                                <label class="bmd-label-floating">FB Page</label>
                                <input name="qq" type="text" value="{{Auth::guard('web')->user()->qq}}" class="form-control" >
                              </div>
                          </div>
                          <div class="col-md-12">
                              <div class="form-group">
                                <label class="bmd-label-floating">Skype</label>
                                <input name="skype" type="text" value="{{Auth::guard('web')->user()->skype}}" class="form-control" >
                              </div>
                        </div>
                        <div class="col-md-12">
                              <div class="form-group">
                                <label class="bmd-label-floating">Linkdin</label>
                                <input name="wechat" type="text" value="{{Auth::guard('web')->user()->wechat}}" class="form-control" >
                              </div>
                        </div>
                        
                        <div class="col-md-12">
                              <div class="form-group">
                                <label class="bmd-label-floating">Whatsapp</label>
                                <input name="whatsapp" type="text" value="{{Auth::guard('web')->user()->whatsapp}}" class="form-control" >
                              </div>
                        </div>
                    </div>
            </div>
            
            
            
            </div>    
                
                
                
                
                
                
                
                </div>
                
                
          
        <div class="col-md-12 profile-btn">
                    <div class="submit button-sav">
                        
                        <button type="submit" class="btn-primary btn-submit">Update</button>
                    </div>
                </div>        
                
          </form>  
          <br/>
          <br/>
          <br/>
          <br/>
          <br/>
        
</div>
@stop

@push('script')

 <script src="{{ asset('/assets/libs/select2/select2.min.js') }}"></script>
<script src="{{ asset('/assets/js/pages/ecommerce-select2.init.js') }}"></script>
<script>

   $(function() {
$('.select2').select2({
         maximumSelectionSize: 1,
         placeholder: "Select Industry"
    });
});
</script>
@endpush