<div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel" style="text-align: center;">Follow up History</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <form >
        
      <div class="modal-body" style="height: auto">
        <input type="hidden" id="property_id" name="property_id" value="{{$property->id}}">

        @if(!$property->chatHistory->isEmpty())
        <ul style="overflow-y: scroll;
    height: 300px;
    border: 1px solid;">

        @foreach($property->chatHistory as $c)
        <li style="    line-height: 25px;">

        
          
           
                <label><b>{{date('d:m:Y h:i',strtotime($c->created_at))}}</b>&nbsp;&nbsp;&nbsp;</label>
          
          
                <label>{{$c->remarks}}</label><br>
           
            
              <label style="margin-left: 30px;"><b>Follow up : </b>{{date('d:m:Y',strtotime($c->next_follow_up))}}</label>
             

              <label style="margin-left:20px;"><b>added by : </b>{{$c->user ? $c->user->name : ''}}</label> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

              <a style="color: red;" href="javascript:;" onclick="deleteFollowup({{$c->id}})"><i class="fa fa-trash"> &nbsp;</i>Delete</a>
          
      </li>


        @endforeach
      </ul>

        @else

        <div class="form-group form-group-sm" style="margin-top: 30px;">
            <div class="col-xs-12" style="text-align: center;">
                <label >No History!..</label>
            </div>
            
        </div>


        @endif

        <br><hr>





        <div class="form-group form-group-sm" style="margin-top: 30px;">
            <div class="col-xs-4">
                <label><b>Add New</b></label>
            </div>
            <div class="col-xs-8">
                <textarea class="form-control" id="remarks" rows="5" name="remarks" ></textarea>
            </div>
            
        </div>

        <div class="form-group form-group-sm" style="margin-top: 5px;">
            <div class="col-xs-4">
                <label><b>Next Follow up</b></label>
            </div>
            
            <div class="col-xs-8" style="margin-bottom: 10px;">
                <input type="date" class="form-control" name="next_follow_up" id="next_follow_up">
            </div>
        </div>
      </div>

      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" onclick="updateChat()" class="btn btn-primary">Update</button>
      </div>
      </form>
    </div>
  </div>