<div class="modal fade" tabindex="-1" style="z-index: 9999" id="project_schedule_import_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" style="max-width: 800px">
    <div class="modal-content">
      <div class="modal-header" style="background-color: #00c5dc;border-radius: 4px">
        <h5 class="modal-title" id="exampleModalLabel" style="color: #ffffff" >
          Import Project Schedule
        </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">
            &times;
          </span>
        </button>
      </div>
      <form autocomplete="off" data-form-type="project_task" data-modal-id="project_schedule_import_modal" id="form_project_schedule_import" method="post" action="<?= base_url()?>project_tasks/copy_project_schedule" enctype="multipart/form-data" class="m-form m-form--fit m-form--state m-form--label-align-right " >
        <div class="modal-body" id="">
          <div class="m-form__content">
            <div class="m-alert m-alert--icon alert alert-warning m--hide" role="alert" id="form_document_add_msg">
              <div class="m-alert__icon">
                <i class="la la-warning"></i>
              </div>
              <div class="m-alert__text">
                Oh snap! Change a few things up and try submitting again.
              </div>
              <div class="m-alert__close">
                <button type="button" class="close" data-close="alert" aria-label="Close"></button>
              </div>
            </div>
          </div>
          <div class="row">
            <input type="hidden" name="to_work_id"  value="<?= $work_data->work_id?>">
            <div  class="col-lg-12" >
              <div class="form-group m-form__group m-select2 m-select2--air m-select2--pill" >
                <label for="user_name">
                  From Project
                </label>
                <select required style="width: 100%" class="form-control m-select2 m-select2-general form_project_schedule_import_select" id="schedule_import_from_work_id" name="from_work_id" data-placeholder="Select Project">
                  <option selected disabled>Select Project</option>
                  <?php foreach($other_works as $row): ?>
                    <option data-work-status="<?php echo $row->work_status?>" value="<?php echo $row->work_id?>"><?php echo $row->work_name ?></option>
                  <?php  endforeach; ?>
                </select>
                <span class="m-form__help"></span>
              </div>
            </div>
            <?php if($this->session->userdata('user_role')=='general_manager' || $this->session->userdata('user_role')=='admin' || $this->session->userdata('user_role_id')==20){?>
              <div id="task_assigned" class="col-lg-12" >
                <div class="form-group m-form__group m-select2 m-select2--air m-select2--pill" >
                  <label for="user_name">
                    Task assigned to
                  </label>
                  <select style="width: 100%" class="form-control m-select2 m-select2-general form_project_schedule_import_select" id="schedule_import_task_assigned_to" name="task_assigned_to" data-placeholder="Select Supervisor">
                    <option selected disabled>Select Supervisor</option>
                    <?php foreach($assigned_users as $row): ?>
                      <option value="<?php echo $row->user_id?>"><?php echo $row->user_alias ?></option>
                    <?php  endforeach; ?>
                  </select>
                  <span class="m-form__help"></span>
                </div>
              </div>
            <?php } ?>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary " data-dismiss="modal">
            Close
          </button>
          <button type="submit" class="btn btn-primary">
            Submit
          </button>
        </div>
      </form>
    </div>
  </div>
</div>
<div class="modal fade" tabindex="-1" style="z-index: 9999" id="project_task_add_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" style="max-width: 800px">
    <div class="modal-content">
      <div class="modal-header" style="background-color: #00c5dc;border-radius: 4px">
        <h5 class="modal-title" id="exampleModalLabel" style="color: #ffffff" >
          Add New Task
        </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">
            &times;
          </span>
        </button>
      </div>
      <form autocomplete="off" data-form-type="project_task" data-modal-id="project_task_add_modal" id="form_project_task_add" method="post" action="<?= base_url()?>project_tasks/create" enctype="multipart/form-data" class="m-form m-form--fit m-form--state m-form--label-align-right " >
        <div class="modal-body" id="">
          <div class="m-form__content">
            <div class="m-alert m-alert--icon alert alert-warning m--hide" role="alert" id="form_document_add_msg">
              <div class="m-alert__icon">
                <i class="la la-warning"></i>
              </div>
              <div class="m-alert__text">
                Oh snap! Change a few things up and try submitting again.
              </div>
              <div class="m-alert__close">
                <button type="button" class="close" data-close="alert" aria-label="Close"></button>
              </div>
            </div>
          </div>
          <div class="row">
            <input type="hidden" name="project_task_work_id" id="project_task_work_id" value="<?= $work_data->work_id?>">
            <input type="hidden" name="parent_task_id" id="parent_task_id">
            <div class="col-lg-12" >
              <div class="form-group m-form__group" >
                <label for="user_name">
                  <span class="subtask_t"></span>Task Title
                </label>
                <div class="m-input-icon m-input-icon--right">
                  <input required type="text"  class="form-control m-input m-input--pill m-input--air form_project_task_add_fields"  aria-describedby="basic-addon1" name="title">
                  <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-edit"></i></span></span>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-lg-12" >
              <div class="form-group m-form__group" >
                <label for="user_name">
                  <span class="subtask_t"></span>Task Description
                </label>
                <textarea type="text" name="description" class="form-control m-input m-input--pill m-input--air form_project_task_add_fields"  aria-describedby="basic-addon1"></textarea>
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-lg-6" >
              <div class="form-group m-form__group" >
                <label for="user_name">
                  Start Date (Planned)
                </label>
                <div class="m-input-icon m-input-icon--right">
                  <input required data-date-format="dd-mm-yyyy" id="planned_start_date"  type="text" name="planned_start_date" class=" form-control m-input m-input--pill m-input--air form_project_task_add_fields" placeholder="Start Date" >
                  <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-calendar"></i></span></span>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-lg-6">
              <div class="form-group m-form__group" >
                <label for="user_name">
                  End Date (Planned)
                </label>
                <div class="m-input-icon m-input-icon--right">
                  <input required data-date-format="dd-mm-yyyy" id="planned_end_date"  type="text" name="planned_end_date" class=" form-control m-input m-input--pill m-input--air form_project_task_add_fields" placeholder="End Date" >
                  <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-calendar"></i></span></span>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
            <?php if($this->session->userdata('user_role')=='general_manager' || $this->session->userdata('user_role')=='admin' || $this->session->userdata('user_role_id')==20){?>
              <div id="task_assigned" class="col-lg-12" >
                <div class="form-group m-form__group m-select2 m-select2--air m-select2--pill" >
                  <label for="user_name">
                    Task assigned to
                  </label>
                  <select style="width: 100%" class="form-control m-select2 m-select2-general form_project_task_add_select" id="task_assigned_to" name="task_assigned_to" data-placeholder="Select Supervisor">
                    <option selected disabled>Select Supervisor</option>
                    <?php foreach($assigned_users as $row): ?>
                      <option value="<?php echo $row->user_id?>"><?php echo $row->user_alias ?></option>
                    <?php  endforeach; ?>
                  </select>
                  <span class="m-form__help"></span>
                </div>
              </div>
            <?php } ?>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary " data-dismiss="modal">
            Close
          </button>
          <button type="submit" class="btn btn-primary form_submit_btn">
            Submit
          </button>
        </div>
      </form>
    </div>
  </div>
</div>
<div class="modal fade" tabindex="9999" style="z-index: 9999" id="project_task_edit_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" style="max-width: 800px">
    <div class="modal-content">
      <div class="modal-header" style="background-color: #00c5dc;border-radius: 4px">
        <h5 class="modal-title" id="exampleModalLabel" style="color: #ffffff" >
          Edit Project Task
        </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">
            &times;
          </span>
        </button>
      </div>
      <form autocomplete="off" data-form-type="project_task" data-modal-id="project_task_edit_modal" id="form_project_task_edit" method="post" action="<?= base_url()?>project_tasks/update" enctype="multipart/form-data" class="m-form m-form--fit m-form--state m-form--label-align-right " >
        <div class="modal-body" id="">
          <div class="m-form__content">
            <div class="m-alert m-alert--icon alert alert-warning m--hide" role="alert" id="form_project_task_edit_msg">
              <div class="m-alert__icon">
                <i class="la la-warning"></i>
              </div>
              <div class="m-alert__text">
                Oh snap! Change a few things up and try submitting again.
              </div>
              <div class="m-alert__close">
                <button type="button" class="close" data-close="alert" aria-label="Close"></button>
              </div>
            </div>
          </div>
          <div class="row">

            <div class="col-lg-12" >
              <div class="form-group m-form__group" >
                <label for="user_name">
                  <span class="subtask_edit"></span>Task Title
                </label>
                <div class="m-input-icon m-input-icon--right">
                  <input required type="text" id="project_task_title_edit" class="form-control m-input m-input--pill m-input--air form_project_task_edit_fields"  aria-describedby="basic-addon1" name="title">
                  <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-edit"></i></span></span>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>

            <div class="col-lg-12" >
              <div class="form-group m-form__group" >
                <label for="user_name">
                  Description
                </label>
                <textarea type="text" id="project_task_description_edit" name="description" class="form-control m-input m-input--pill m-input--air form_project_task_edit_fields"  aria-describedby="basic-addon1"></textarea>
                <span class="m-form__help"></span>
              </div>
            </div>
            <input type="hidden" value="" name="project_task_id_edit" id="project_task_id_edit">
            <div class="col-lg-6" >
              <div class="form-group m-form__group" >
                <label for="user_name">
                  Start Date (Planned)
                </label>
                <div class="m-input-icon m-input-icon--right">
                  <input required data-date-format="dd-mm-yyyy" id="project_task_start_date_edit"  type="text" name="start_date" class=" form-control m-input m-input--pill m-input--air form_project_task_edit_fields" placeholder="Start Date" >
                  <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-calendar"></i></span></span>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-lg-6">
              <div class="form-group m-form__group" >
                <label for="user_name">
                  End Date (Planned)
                </label>
                <div class="m-input-icon m-input-icon--right">
                  <input required data-date-format="dd-mm-yyyy" id="project_task_end_date_edit"  type="text" name="end_date" class=" form-control m-input m-input--pill m-input--air form_project_task_edit_fields" placeholder="End Date" >
                  <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-calendar"></i></span></span>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
            <?php if($this->session->userdata('user_role')=='admin'){ ?>
            <div class="col-lg-6" >
              <div class="form-group m-form__group" >
                <label for="user_name">
                  Start Date (Actual)
                </label>
                <div class="m-input-icon m-input-icon--right">
                  <input data-date-format="dd-mm-yyyy" id="project_task_start_date_actual_edit"  type="text" name="start_date_actual" class=" form-control m-input m-input--pill m-input--air form_project_task_edit_fields" placeholder="Start Date (Actual)" >
                  <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-calendar"></i></span></span>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-lg-6">
              <div class="form-group m-form__group" >
                <label for="user_name">
                  End Date (Actual)
                </label>
                <div class="m-input-icon m-input-icon--right">
                  <input data-date-format="dd-mm-yyyy" id="project_task_end_date_actual_edit"  type="text" name="end_date_actual" class=" form-control m-input m-input--pill m-input--air form_project_task_edit_fields" placeholder="End Date (Actual)" >
                  <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-calendar"></i></span></span>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
          <?php } ?>
            <?php if($this->session->userdata('user_role')=='general_manager' || $this->session->userdata('user_role')=='admin' || $this->session->userdata('user_role_id')==20){?>
              <div id="task_assigned" class="col-lg-12" >
                <div class="form-group m-form__group m-select2 m-select2--air m-select2--pill" >
                  <label for="user_name">
                    Task assigned to
                  </label>
                  <select style="width: 100%" class="form-control m-select2 m-select2-general form_project_task_edit_select" required id="task_assigned_to_edit" name="task_assigned_to_edit" data-placeholder="Select Supervisor">
                    <option selected disabled>Select Supervisor</option>
                    <?php foreach($assigned_users as $row): ?>
                      <option value="<?php echo $row->user_id?>"><?php echo $row->user_alias ?></option>
                    <?php  endforeach; ?>
                  </select>
                  <span class="m-form__help"></span>
                </div>
              </div>
            <?php } ?>

          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary " data-dismiss="modal">
            Close
          </button>
          <button type="submit" class="btn btn-primary form_submit_btn">
            Submit
          </button>
        </div>
      </form>
    </div>
  </div>
</div>
<div class="modal fade" tabindex="9999" style="z-index: 9999"  id="project_task_delete_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" >
    <form autocomplete="off" data-form-type="project_task" data-modal-id="project_task_delete_modal" id="form_project_task_delete" method="post" action="<?php echo base_url().'project_tasks/delete'?>" class="form-horizontal">
      <div class="modal-content">
        <div class="alert alert-danger" role="alert" style="margin-bottom: 0px">
          <button type="button" class="close" data-dismiss="modal"></button>
          <br/>
          <h4 class="alert-heading">Warning! Please Confirm Your Action</h4>
          <br/>
          <p> Are You Sure to Delete this Project <span class="subtask_delete"></span>Task ? This can not be undone ! </p>
          <p>
            <button class="btn btn-danger form_submit_btn" type="submit" name="submit">Confirm & Delete</button>
            <button type="button" class="btn btn-primary modal-dismiss" data-dismiss="modal">Cancel</button>
          </p>
          <input type="hidden" value name="project_task_id_delete" id="project_task_id_delete">
        </div>
      </div>
    </form>
  </div>
</div>
<div class="modal fade" tabindex="9999" style="z-index:9999" id="project_task_progress_update_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" style="max-width: 800px">
    <div class="modal-content">
      <div class="modal-header" style="background-color: #00c5dc;border-radius: 4px">
        <h5 class="modal-title" id="exampleModalLabel" style="color: #ffffff" >
          Update Project Task Progress
        </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">
            &times;
          </span>
        </button>
      </div>
      <form autocomplete="off" data-form-type="project_task" data-modal-id="project_task_progress_update_modal" id="form_project_task_progress_update" method="post" action="<?= base_url()?>project_tasks/update_task_progess" enctype="multipart/form-data" class="m-form m-form--fit m-form--state m-form--label-align-right " >
        <div class="modal-body" id="">
          <div class="m-form__content">
            <div class="m-alert m-alert--icon alert alert-warning m--hide" role="alert" id="form_project_task_edit_msg">
              <div class="m-alert__icon">
                <i class="la la-warning"></i>
              </div>
              <div class="m-alert__text">
                Oh snap! Change a few things up and try submitting again.
              </div>
              <div class="m-alert__close">
                <button type="button" class="close" data-close="alert" aria-label="Close"></button>
              </div>
            </div>
          </div>
          <div class="row">
            <input type="hidden" value="" name="task_id" id="project_task_id_progress">
            <div class="col-lg-12" >
              <div class="alert alert-warning alert-dismissible fade show   m-alert m-alert--air m-alert--outline m-alert--outline-2x" role="alert">
                <strong>Pleas Note!</strong> You Can't Backward Progress Once You Update it.
              </div>
            </div>
            <div class="col-lg-10" >
              <div class="form-group m-form__group" >
                <label for="user_name">
                  Progress
                </label>
                <div class="progress" >
                  <div id="progressbar_update_bar" class="progress-bar progress-bar-striped '.$progress_style.' progress-bar-animated" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%"></div>
                </div>
                <div style="margin-top: 15px;" id="task_progress" class="m-nouislider m-nouislider--handle-info m-nouislider--connect-warning rangeSliderComponent"></div>
                <input type="hidden" id="task_progress_value" value="0"  name="task_progress">
                <input type="hidden" id="task_progress_current_value" value="0" >
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-lg-2 font-weight-bold" style=" padding: 4%; ">
              <span class="" id="task_rogress_value"></span>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary " data-dismiss="modal">
            Close
          </button>
          <button type="submit" class="btn btn-primary form_submit_btn" id="progress_update">
            Submit
          </button>
        </div>
      </form>
    </div>
  </div>
</div>
<div class="modal fade" tabindex="-1" style="z-index: 9999" id="project_task_activity_add_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" style="max-width: 800px">
    <div class="modal-content">
      <div class="modal-header" style="background-color: #00c5dc;border-radius: 4px">
        <h5 class="modal-title" id="exampleModalLabel" style="color: #ffffff" >
          Add New Task Activity
        </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">
            &times;
          </span>
        </button>
      </div>
      <form autocomplete="off" data-form-type="project_task_activity" data-modal-id="project_task_activity_add_modal" id="form_project_task_activity_add" method="post" action="<?= base_url()?>project_tasks/create_activity" enctype="multipart/form-data" class="m-form m-form--fit m-form--state m-form--label-align-right " >
        <div class="modal-body" id="">
          <div class="m-form__content">
            <div class="m-alert m-alert--icon alert alert-warning m--hide" role="alert" id="form_project_task_activity_add_msg">
              <div class="m-alert__icon">
                <i class="la la-warning"></i>
              </div>
              <div class="m-alert__text">
                Oh snap! Change a few things up and try submitting again.
              </div>
              <div class="m-alert__close">
                <button type="button" class="close" data-close="alert" aria-label="Close"></button>
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-lg-6" style="display:none;">
              <div class="form-group m-form__group m-select2 m-select2--air m-select2--pill" >
                <label for="user_name">
                  Task
                </label>
                <select style="width: 100%" class="form-control m-select2 m-select2-general" required name="activity_add_task_id" id="activity_add_task_id" data-placeholder="Select Task">
                </select>
                <span class="m-form__help"></span>
                <input type="hidden"  id="activity_add_task_id_value" name="activity_add_task_id_value" value="">
              </div>
            </div>
            <div class="col-lg-6">
              <div class="form-group m-form__group" >
                <label for="user_name">
                  Activity Title
                </label>
                <div class="m-input-icon m-input-icon--right">
                  <input required type="text"  class="form-control m-input m-input--pill m-input--air form_project_task_activity_add_fields"  aria-describedby="basic-addon1" name="activity_title">
                  <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-edit"></i></span></span>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-lg-6">
              <div class="form-group m-form__group" >
                <label for="user_name">
                  Date
                </label>
                <div class="m-input-icon m-input-icon--right">
                  <input required data-date-format="dd-mm-yyyy" id="activity_date"  type="text" name="activity_date" class="form_project_task_activity_add_fields form-control m-input m-input--pill m-input--air " placeholder="Activity Date" >
                  <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-calendar"></i></span></span>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-lg-12" >
              <div class="form-group m-form__group" >
                <label for="user_name">
                  Description
                </label>
                <textarea type="text" name="activity_description" class="form-control m-input m-input--pill m-input--air form_project_task_activity_add_fields"  aria-describedby="basic-addon1"></textarea>
                <span class="m-form__help"></span>
              </div>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary " data-dismiss="modal">
            Close
          </button>
          <button type="submit" class="btn btn-primary form_submit_btn">
            Submit
          </button>
        </div>
      </form>
    </div>
  </div>
</div>
<div class="modal fade" tabindex="-1" style="z-index: 9999" id="project_task_activity_edit_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" style="max-width: 800px">
    <div class="modal-content">
      <div class="modal-header" style="background-color: #00c5dc;border-radius: 4px">
        <h5 class="modal-title" id="exampleModalLabel" style="color: #ffffff" >
          Edit Task Activity
        </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">
            &times;
          </span>
        </button>
      </div>
      <form autocomplete="off" data-form-type="project_task_activity" data-modal-id="project_task_activity_edit_modal" id="form_project_task_activity_edit" method="post" action="<?= base_url()?>project_tasks/update_activity" enctype="multipart/form-data" class="m-form m-form--fit m-form--state m-form--label-align-right " >
        <div class="modal-body" id="">
          <div class="m-form__content">
            <div class="m-alert m-alert--icon alert alert-warning m--hide" role="alert" id="form_project_task_activity_edit_msg">
              <div class="m-alert__icon">
                <i class="la la-warning"></i>
              </div>
              <div class="m-alert__text">
                Oh snap! Change a few things up and try submitting again.
              </div>
              <div class="m-alert__close">
                <button type="button" class="close" data-close="alert" aria-label="Close"></button>
              </div>
            </div>
          </div>
          <div class="row">
            <input type="hidden" name="activity_id_edit" id="activity_id_edit">

            <div class="col-lg-12" >
              <div class="form-group m-form__group" >
                <label for="user_name">
                  Activity Title
                </label>
                <div class="m-input-icon m-input-icon--right">
                  <input required type="text" id="activity_title_edit" class="form-control m-input m-input--pill m-input--air"  aria-describedby="basic-addon1" name="activity_title">
                  <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-edit"></i></span></span>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-lg-12" >
              <div class="form-group m-form__group" >
                <label for="user_name">
                  Description
                </label>
                <textarea type="text" id="activity_description_edit" name="activity_description" class="form-control m-input m-input--pill m-input--air "  aria-describedby="basic-addon1"></textarea>
                <span class="m-form__help"></span>
              </div>
            </div>
            <div class="col-lg-6" >
              <div class="form-group m-form__group" >
                <label for="user_name">
                  Date
                </label>
                <div class="m-input-icon m-input-icon--right">
                  <input required data-date-format="dd-mm-yyyy" id="activity_date_edit"  type="text" name="activity_date" class=" form-control m-input m-input--pill m-input--air " placeholder="Start Date" >
                  <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-calendar"></i></span></span>
                </div>
                <span class="m-form__help"></span>
              </div>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary " data-dismiss="modal">
            Close
          </button>
          <button type="submit" class="btn btn-primary form_submit_btn">
            Submit
          </button>
        </div>
      </form>
    </div>
  </div>
</div>
<div class="modal fade" tabindex="9999" style="z-index: 9999" id="project_task_activity_delete_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" >
    <form autocomplete="off" data-form-type="project_task_activity" data-modal-id="project_task_activity_delete_modal" id="form_project_task_activity_delete" method="post" action="<?php echo base_url().'project_tasks/delete_activity'?>" class="form-horizontal">
      <div class="modal-content">
        <div class="alert alert-danger" role="alert" style="margin-bottom: 0px">
          <button type="button" class="close" data-dismiss="modal"></button>
          <br/>
          <h4 class="alert-heading">Warning! Please Confirm Your Action</h4>
          <br/>
          <p> Are You Sure to Delete this Project Task Activity ? This can not be undone ! </p>
          <p>
            <button class="btn btn-danger form_submit_btn" type="submit" name="submit">Confirm & Delete</button>
            <button type="button" class="btn btn-primary modal-dismiss" data-dismiss="modal">Cancel</button>
          </p>
          <input type="hidden" value name="project_task_activity_id_delete" id="project_task_activity_id_delete">
        </div>
      </div>
    </form>
  </div>
</div>
<div class="modal fade" tabindex="0" id="project_task_popup_modal" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog " role="document" style="max-width: 900px">
    <div class="modal-content">
      <div class="modal-header" style="background-color: #00c5dc;border-radius: 4px">
        <h5 class="modal-title" id="project_task_popup_modal_title" style="color: #ffffff" >

        </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">
            &times;
          </span>
        </button>
      </div>
      <div class="modal-body" id="">
        <div class="m-form__content">
          <div class="m-alert m-alert--icon alert alert-warning m--hide" role="alert" id="form_project_task_activity_add_msg">
            <div class="m-alert__icon">
              <i class="la la-warning"></i>
            </div>
            <div class="m-alert__text">
              Oh snap! Change a few things up and try submitting again.
            </div>
            <div class="m-alert__close">
              <button type="button" class="close" data-close="alert" aria-label="Close"></button>
            </div>
          </div>
        </div>


        <div class="kt-portlet kt-portlet--tabs">
          <div class="kt-portlet__head">
            <div class="kt-portlet__head-toolbar">
              <ul class="nav nav-tabs nav-tabs-line nav-tabs-line-success" role="tablist">
                <li class="nav-item">
                  <a class="nav-link active project_task_details_modal_info_tab" data-toggle="tab" href="#info" role="tab">
                    <i class="la la-info-circle"></i> Info
                  </a>
                </li>
                <li class="nav-item" >
                  <a class="nav-link project_task_details_modal_tabs" data-toggle="tab" href="#activities" role="tab">
                    <i class="la la-bar-chart"></i> Activities
                  </a>
                </li>
                <li class="nav-item schedule_tabs" data-table-name="project_tasks_view_table" id="subtask_tab_pan" >
                  <a class="nav-link project_task_details_modal_tabs" id="subtask_tab_btn" data-toggle="tab" href="#subtasks" role="tab">
                    <i class="la la-tasks"></i> Subtasks
                  </a>
                </li>
              </ul>
            </div>
          </div>
          <div class="kt-portlet__body">
            <div class="tab-content">
              <div class="tab-pane active project_task_details_modal_info_tab project_task_details_modal_tabs" id="info" role="tabpanel">
                <div class="tab-pane fade show active " id="pills-info" role="tabpanel" aria-labelledby="pills-home-tab"style=" font-size: 110%; ">
                  <span id="task_id_popup" style="display: none"></span>
                  <div class="row">
                    <div class="col-lg-4" >
                      <div class="form-group m-form__group" >
                        <label for="user_name">
                          <span></span>Task Title
                        </label>
                        <div class="m-input-icon m-input-icon--right">
                          <input readonly disabled type="text" id="task_name_popup" class="form-control m-input m-input--pill m-input--air"  aria-describedby="basic-addon1" name="title">
                          <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-edit"></i></span></span>
                        </div>
                        <span class="m-form__help"></span>
                      </div>
                    </div>
                    <div class="col-lg-4" >
                      <div class="form-group m-form__group" >
                        <label for="user_name">
                          <span></span>Task Description
                        </label>
                        <div class="m-input-icon m-input-icon--right">
                          <input readonly disabled type="text" id="task_desc_popup" class="form-control m-input m-input--pill m-input--air"  aria-describedby="basic-addon1" name="description">
                          <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-edit"></i></span></span>
                        </div>
                        <span class="m-form__help"></span>
                      </div>
                    </div>
                    <div class="col-lg-4" >
                      <div class="form-group m-form__group" >
                        <label for="user_name">
                          <span></span>Task Assigned to
                        </label>
                        <div class="m-input-icon m-input-icon--right">
                          <input readonly disabled type="text" id="task_supervisor_popup" class="form-control m-input m-input--pill m-input--air"  aria-describedby="basic-addon1" name="supervisor">
                          <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-user"></i></span></span>
                        </div>
                        <span class="m-form__help"></span>
                      </div>
                    </div>
                  </div>
                  <div class="row">
                    <div class="col-lg-3" >
                      <div class="form-group m-form__group" >
                        <label for="user_name">
                          <span></span>Planned Start Date
                        </label>
                        <div class="m-input-icon m-input-icon--right">
                          <input readonly disabled type="text" id="task_start_popup" class="form-control m-input m-input--pill m-input--air"  aria-describedby="basic-addon1" name="title">
                          <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-calendar"></i></span></span>
                        </div>
                        <span class="m-form__help"></span>
                      </div>
                    </div>
                    <div class="col-lg-3" >
                      <div class="form-group m-form__group" >
                        <label for="user_name">
                          <span></span>Actual Start Date
                        </label>
                        <div class="m-input-icon m-input-icon--right">
                          <input readonly disabled type="text" id="task_start_popup_actual" class="form-control m-input m-input--pill m-input--air"  aria-describedby="basic-addon1" name="title">
                          <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-calendar"></i></span></span>
                        </div>
                        <span class="m-form__help"></span>
                      </div>
                    </div>

                    <div class="col-lg-3" >
                      <div class="form-group m-form__group" >
                        <label for="user_name">
                          <span></span>Planned End Date
                        </label>
                        <div class="m-input-icon m-input-icon--right">
                          <input readonly disabled type="text" id="task_end_popup" class="form-control m-input m-input--pill m-input--air"  aria-describedby="basic-addon1" name="title">
                          <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-calendar"></i></span></span>
                        </div>
                        <span class="m-form__help"></span>
                      </div>
                    </div>
                    <div class="col-lg-3" >
                      <div class="form-group m-form__group" >
                        <label for="user_name">
                          <span></span>Actual End Date
                        </label>
                        <div class="m-input-icon m-input-icon--right">
                          <input readonly disabled type="text" id="task_end_popup_actual" class="form-control m-input m-input--pill m-input--air"  aria-describedby="basic-addon1" name="title">
                          <span class="m-input-icon__icon m-input-icon__icon--right"><span><i class="la la-calendar"></i></span></span>
                        </div>
                        <span class="m-form__help"></span>
                      </div>
                    </div>
                  </div>
                  <form autocomplete="off" data-form-type="project_task_activity" data-modal-id="project_task_popup_modal" id="form_project_task_activity_popup" method="post" action="<?= base_url()?>project_tasks/update_task_progess" enctype="multipart/form-data" class="m-form m-form--fit m-form--state m-form--label-align-right " >
                    <div class="row" style=" padding-bottom: 2%; ">
                      <div class="col-lg-10" >
                        <div class="form-group m-form__group" >
                          <label for="user_name">
                            Task Progress
                          </label>
                          <div class="progress" >
                            <div id="task_progress_popup" class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuemin="0" aria-valuemax="100"></div>
                          </div>
                          <?php if($this->session->userdata('user_role')=='admin' || $this->session->userdata('user_role')=='madmin' || $this->session->userdata('user_role')=='general_manager'){ ?>
                            <div style="margin-top: 15px;" id="task_progress2" class="m-nouislider m-nouislider--handle-info m-nouislider--connect-warning rangeSliderComponent"></div>
                            <input type="hidden" id="task_progress_value2" value="0"  name="task_progress">
                            <input type="hidden" id="task_progress_current_value2" value="0" >
                          <?php } ?>
                          <span class="m-form__help"></span>
                        </div>
                      </div>
                      <div class="col-lg-2 font-weight-bold" style=" padding: 4%; ">
                        <span class="" id="task_rogress_value2"></span>
                      </div>
                      <input type="hidden" name="task_id" id="task_id_popup_update_progress">
                    </div>
                    <?php if($this->session->userdata('user_role')=='admin' || $this->session->userdata('user_role')=='madmin' || $this->session->userdata('user_role')=='general_manager'){ ?>
                      <button type="submit" class="btn btn-primary form_submit_btn" style=" margin-left: 74.5%;">
                        Update Progress
                      </button>
                      <button type="button" class="btn btn-secondary " data-dismiss="modal">
                      <?php } else { ?>
                        <button type="button" class="btn btn-secondary " data-dismiss="modal" style=" margin-left: 91.5%;">
                        <?php } ?>
                        Close
                      </button>
                    </form>
                  </div>
                </div>
                <div class="tab-pane project_task_details_modal_tabs" id="subtasks" role="tabpanel">
                  <a id="new_subtask" href="#project_task_add_modal" data-toggle="modal" class="btn btn-sm btn-danger m-btn m-btn--custom m-btn--icon m-btn--air m-btn--pill" style="margin-left: 80%;margin-bottom: 1%;">
                    <input type="hidden" id="data-task-id">
                    <span>
                      <i class="la la-plus"></i>
                      <span>
                        New Subtask
                      </span>
                    </span>
                  </a>
                  <table class="table" id="subtask_table">
                    <thead class="thead-light">
                      <tr>
                        <th scope="col">#</th>
                        <th scope="col" class="hidden">task_id</th>
                        <th scope="col">Sub Task Name</th>
                        <th scope="col">Assigned To</th>
                        <th scope="col">Start Date</th>
                        <th scope="col">End Date</th>
                        <th scope="col">Progress</th>
                        <th scope="col">Action</th>
                      </tr>
                    </thead>
                    <tbody id="subtask_table_body">
                    </tbody>
                  </table>
                </div>
                <div class="tab-pane project_task_details_modal_tabs" id="activities" role="tabpanel">
                  <a  id="new_activity_task" href="#project_task_activity_add_modal" data-toggle="modal" class="btn btn-sm btn-danger m-btn m-btn--custom m-btn--icon m-btn--air m-btn--pill" style="margin-left: 81%;margin-bottom: 1%;">
                    <input type="hidden" id="data-task-id">
                    <span>
                      <i class="la la-plus"></i>
                      <span>
                        New Activity
                      </span>
                    </span>
                  </a>
                  <table width="100%" class="table" id="project_tasks_activities_view_table">
                    <thead class="thead-light">
                      <tr class="">
                        <th>Sl No</th>
                        <th>Title</th>
                        <th>Description</th>
                        <th>Activity Date</th>
                        <th>Created By</th>
                        <th>Created On</th>
                        <th>Actions</th>
                        <th class="hidden">Activity ID</th>
                        <th class="hidden"></th>
                        <th class="hidden"></th>
                        <th class="hidden"></th>
                        <th class="hidden">Task ID</th>
                      </tr>
                    </thead>
                    <tbody id="project_tasks_activities_table_body">
                    </tbody>
                  </table>
                </div>
              </div>
            </div>
          </div>
        </div>
        <!-- <div class="modal-footer">
        <button type="button" class="btn btn-secondary " data-dismiss="modal">
        Close
      </button>
      <button type="submit" class="btn btn-primary form_submit_btn">
      Update
    </button>
  </div> -->
</div>
</div>
</div>
<style type="text/css">
.shownothing{
  display: none;
}
</style>
