Current File : /home/tradevaly/demo.tradevaly.com.bd/resources/views/backend/companies/show.blade.php
@extends('layouts.backend')
    

    @section('content')  
<!-- Container Fluid-->
            <div class="row">
                <div class="col-lg-12">
                  <!-- Form Basic -->
                  <div class="card mb-4">
                    <div class="card-header card-header-modify py-3 d-flex flex-row align-items-center justify-content-between">
                      <h6 class="m-0 font-weight-bold text-heading-bar"> Company Details</h6>
                        <a href="{{ url()->previous() }}" class="btn btn-default-index  btn-sm text-right "><i class="fas fa-arrow-alt-circle-left"></i> Back</a>
                    </div>
                    <div class="card-body">
                        

                        <div class="row">

                                <div class="form-group col-sm-4">
                                  <label for="exampleInputEmail1">Company Name</label>
                                    <div>{{ $company->company_name}}</div>
                                </div>

                                <div class="form-group col-sm-4">
                                  <label for="exampleInputEmail1">Contact Person Name</label>
                                    <div>{{ $company->person_name}}</div>
                                </div>


                                <div class="form-group col-sm-4">
                                  <label for="exampleInputEmail1">Designation</label>
                                  <div>{{ $company->designation}}</div>
                                </div>
                                
                                
                                <div class="form-group col-sm-4">
                                  <label for="exampleInputEmail1">Country</label>
                                    <div>
                                         {!! Form::select('country_ids[]', [null=>'Select Country']+$country['countryNameOnly'],json_decode($company->country_ids), array('id' => 'country_id', 'class' => 'js-example-basic-multiple js-states form-control select2-hidden-accessible country_ids', 'id' => 'country_ids', 'tabindex' => '-1', 'aria-hidden' => 'true', 'multiple')) !!} 

                                        
                                  
                                        @error('country_ids')
                                            <span class="invalid-feedback" role="alert">
                                                <strong>{{ $errors->first('country_ids') }}</strong>
                                            </span>
                                        @enderror

                                        <span class="invalid-feedback  alert-country_ids" role="alert" style="font-weight: bold;"></span>
                                    </div>
                                    <div>
                                        @php 
                                            $jsonId = json_decode($company->country_ids); 
                                            $loopVal =  [];
                                        @endphp

                                        @if( isset($jsonId) &&  !empty($jsonId) )
                                        @foreach( $jsonId as $key=> $value)
                                            
                                            @php 
                                             $loopVal[] = $country['countryNameOnly'][$value];
                                            @endphp
                                        
                                        @endforeach

                                        {{ implode(', ', $loopVal)  }}
                                        @endif
                                        @php 
                                            $loopVal =  [];
                                        @endphp
                                    </div>
                                </div>

                                <div class="form-group col-sm-4">
                                  <label for="exampleInputEmail1">City</label>
                                    <div>
                                        @php 
                                            $jsonId = json_decode($company->city_ids); 
                                            $loopVal =  [];
                                        @endphp

                                        @if( isset($jsonId) &&  !empty($jsonId) )
                                            @foreach( $jsonId as $key=> $value)
                                                
                                                @php 
                                                 $loopVal[] = $city[$value];
                                                @endphp
                                            
                                            @endforeach

                                            {{ implode(', ', $loopVal)  }}
                                        @endif
                                        @php 
                                            $loopVal =  [];
                                        @endphp
                                        
                                    </div>
                                </div>


                                

                                <div class="form-group col-sm-4">
                                  <label for="exampleInputEmail1">Mobile No.</label>
                                    <div>{{$company->mobile}}</div>
                                </div>

                                <div class="form-group col-sm-4">
                                  <label for="exampleInputEmail1">Alternative Mobile No.</label>
                                    <div>{{$company->alt_mobile}}</div>
                                </div>

                                
                                <div class="form-group col-sm-4">
                                  <label for="exampleInputEmail1">Telephone No.</label>
                                    <div>{{$company->tel}}</div>
                                </div>


                                <div class="form-group col-sm-4">
                                  <label for="exampleInputEmail1">Email</label>
                                    <div>{{$company->email}}</div>
                                </div>


                                <div class="form-group col-sm-4">
                                  <label for="exampleInputEmail1">Alternative Email</label>
                                    <div>{{$company->alt_email}}</div>
                                </div>


                                <div class="form-group col-sm-4">
                                  <label for="exampleInputEmail1">Website</label>
                                    <div>{{$company->website}}</div>
                                </div>  


                                <div class="form-group col-sm-4">
                                  <label for="exampleInputEmail1">Established Year</label>
                                    <div>{{ !empty($years[$company->year_id]) ? $years[$company->year_id] : '' }}</div>
                                </div>




                                <div class="form-group col-sm-12">
                                  <label for="exampleInputEmail1">Address</label>

                                    <div>{{$company->address}}</div>
                                </div>


                                <div class="form-group col-sm-4">
                                  <label for="exampleInputEmail1"> Latitude</label>
                                    <div>{{$company->latitude}}</div>
                                </div>


                                 <div class="form-group col-sm-4">
                                  <label for="exampleInputEmail1"> Longitude</label>
                                    <div>{{$company->longitude}}</div>
                                </div>


                                


                                <div class="form-group col-sm-4">
                                  <label for="exampleInputEmail1">Expire Date</label>
                                    <div>
                                       {{ !empty($company->exp_date) ? date("d-m-Y", strtotime($company->exp_date)) : 'No Exists' }}
                                    </div>
                                </div>

                              

                                <div class="form-group col-sm-4">
                                  <label for="exampleInputEmail1">Company Logo</label>
                                    <div>
                                        <img id="previewImg" width="64px" height="64px" src="{{ asset('storage/app/public/company_logo/'.$company->logo) }}" alt="">
                                    </div>
                                </div>


                                <div class="form-group col-sm-4">
                                  <label for="exampleInputEmail1">Photo Galley 1</label>
                                    <div>

                                        @php 
                                            $galleries = json_decode($company->galleries) ;

                                            $gal1 = !empty($galleries[0]) ? $galleries[0] : '';
                                            
                                            $gal2 = !empty($galleries[1]) ? $galleries[1] : '';
                                            
                                            $gal3 = !empty($galleries[2]) ? $galleries[2] : '';

                                        @endphp

                                        
                                        <span class="invalid-feedback  alert-galleries1" role="alert" style="font-weight: bold;"></span>
                                        
                                        <img id="previewGal1Img" width="64px" height="64px" src="{{ asset('storage/app/public/company_gallery/'.$gal1) }}" alt="">

                                    </div>
                                </div>

                                <div class="form-group col-sm-4">
                                  <label for="exampleInputEmail1"> Photo Galley 2</label>
                                    <div>
                                          <img id="previewGal2Img" width="64px" height="64px" src="{{ asset('storage/app/public/company_gallery/'.$gal2) }}" alt="">

                                    </div>
                                </div>


                                <div class="form-group col-sm-4">
                                  <label for="exampleInputEmail1"> Photo Galley 3</label>
                                    <div>
                                        
                                         <img id="previewGal3Img" width="64px" height="64px" src="{{ asset('storage/app/public/company_gallery/'.$gal3) }}" alt="">

                                    </div>
                                </div>



                                 <div class="form-group col-sm-4">
                                  <label for="exampleInputEmail1">Youtube URL</label>
                                    <div>
                                        <a href="{{$company->youtube_url}}" target="_blank" style="color:#red">{{$company->youtube_url}}</a>
                                    </div>
                                </div>

                                


                                <div class="form-group col-sm-12">
                                  <label for="exampleInputEmail1">Brand</label>
                                    <div>
                                        {!! Form::select('brand_ids[]', [null=>'Select Brand']+$brands,json_decode($company->brand_ids), array('id' => 'brand_id', 'class' => 'js-example-basic-multiple js-states form-control select2-hidden-accessible brand_ids', 'tabindex' => '-1', 'aria-hidden' => 'true', 'multiple')) !!} 
                                  
                                        @error('brand_ids')
                                            <span class="invalid-feedback" role="alert">
                                                <strong>{{ $errors->first('brand_ids') }}</strong>
                                            </span>
                                        @enderror

                                        <span class="invalid-feedback  alert-brand_ids" role="alert" style="font-weight: bold;"></span>
                                    </div>
                                </div>

                                

                                <div class="form-group col-sm-12">
                                  <label for="exampleInputEmail1">Company Category</label>
                                    <div>
                                        @php 
                                            $jsonId = json_decode($company->company_category_ids); 
                                            $loopVal =  [];
                                        @endphp

                                        @if( isset($jsonId) &&  !empty($jsonId) )
                                            @foreach( $jsonId as $key=> $value)
                                                
                                                @php 
                                                 $loopVal[] = !empty($companyCategory[$value]) ? $companyCategory[$value] : '' ;
                                                @endphp
                                            
                                            @endforeach

                                            {{ implode(', ', $loopVal)  }}
                                        @endif
                                        @php 
                                            $loopVal =  [];
                                        @endphp

                                    </div>
                                </div>

                                <div class="form-group col-sm-12">
                                  <label for="exampleInputEmail1">Related Company</label>
                                    <div>
                                        

                                        @php 
                                            $jsonId = [];
                                            $jsonId = json_decode($company->related_company); 
                                            $loopVal =  [];
                                        @endphp

                                        @if( isset($jsonId) &&  !empty($jsonId) )
                                            @foreach( $jsonId as $key=> $value)
                                                
                                                @php 
                                                 $loopVal[] = !empty($companies[$value]) ? $companies[$value] : '';
                                                @endphp
                                            
                                            @endforeach

                                        {{ implode(', ', $loopVal)  }}

                                        @endif

                                        @php 
                                            $loopVal =  [];
                                        @endphp


                                    </div>
                                </div>





                                <div class="form-group col-sm-12">
                                  <label for="exampleInputEmail1">About Company</label>
                                    <div>{{ $company->about_company }}</div>
                                </div>


                               

                                <div class="form-group col-sm-3">
                                  <label for="exampleInputEmail1">Feature Company</label>
                                    <div>
                                        {{ ($company->feature_company == 1) ? 'Yes' : 'No' }}
                                    </div>
                                </div>


                                <div class="form-group col-sm-3">
                                  <label for="exampleInputEmail1">Special Offer Email</label>
                                    <div>
                                        {{ ($company->special_email_offer == 1) ? 'Yes' : 'No' }}
                                    </div>
                                </div>


                                <div class="form-group col-sm-3">
                                  <label for="exampleInputEmail1">Membership Agreement</label>
                                    <div>
                                        {{ ($company->membership_agreements == 1) ? 'Yes' : 'No' }}

                                    </div>
                                </div>


                                 <div class="form-group col-sm-3">
                                  <label for="exampleInputEmail1">Status</label>

                                    <div>{{ ($company->status == 1) ? 'Listed' : 'Pending' }}</div>
                                </div>

                                                                                   
                            </div>                 
                    </div>
                  </div>
                </div>
            </div>
          <!--Row-->




    @endsection