NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

<?php
require('task_manager_common.php');
include INCLUDES . 'task_manager_functions.php';

$page = !empty($_GET['page']) ? (int)$_GET['page'] : 1;
$user = $_SESSION[LOGGED_IN_USER_SESSION_NAME]['email'];

if (empty($_SESSION[LOGGED_IN_USER_SESSION_NAME]['email'])) {
header('Location: /');
exit;
}

// search & filter records
$where_clause = '';
$where_clause_data = '';
$where = array();
if (!empty($_POST['filter']) || (!empty($_GET['page']) && !empty($_SESSION['task_manager_filter']))) {

$filters = !empty($_POST['filter']) ? $_POST['filter'] : $_SESSION['task_manager_filter'];
$_SESSION['task_manager_filter'] = $filters;
if ((isset($filters['task_name'])) && (trim($filters['task_name']) != '')) {

$where[] = " task_name LIKE '%" . trim(strtolower($filters['task_name'])) . "%' ";
}
if ((isset($filters['assigned_to_id'])) && (trim($filters['assigned_to_id']) != '0') && (trim($filters['assigned_to_id']) != '')) {
$where[] = " assigned_to_id = '" . $filters['assigned_to_id'] . "' ";
}
if ((isset($filters['developer_id'])) && (trim($filters['developer_id']) != '0') && (trim($filters['developer_id']) != '')) {
$where[] = " developer_id = '" . $filters['developer_id'] . "' ";
}
if ((!empty($filters['status_id'])) && (trim($filters['status_id']) != '0') && (trim($filters['status_id']) != '')) {
$where[] = " status_id= '" . $filters['status_id'] . "'";
}

if (!empty($filters['start_date']) && empty($filters['end_date']) && (trim($filters['start_date']) != '')) {
$where[] = " (start_date BETWEEN '" . trim(strtolower($filters['start_date'])) . "' AND '" . trim(strtolower($filters['start_date'])) . "') OR (end_date BETWEEN '" . trim(strtolower($filters['start_date'])) . "' AND '" . trim(strtolower($filters['start_date'])) . "') OR ( start_date <= '" . trim(strtolower($filters['start_date'])) . "' AND end_date > '" . trim(strtolower($filters['start_date'])) . "') ";
} else if (!empty($filters['end_date']) && empty($filters['start_date']) && (trim($filters['end_date']) != '')) {
$where[] = " (start_date BETWEEN '" . trim(strtolower($filters['end_date'])) . "' AND '" . trim(strtolower($filters['end_date'])) . "') OR (end_date BETWEEN '" . trim(strtolower($filters['end_date'])) . "' AND '" . trim(strtolower($filters['end_date'])) . "') OR ( start_date <= '" . trim(strtolower($filters['end_date'])) . "' AND end_date > '" . trim(strtolower($filters['end_date'])) . "') ";
} else if (!empty($filters['end_date']) && !empty($filters['start_date']) && (trim($filters['start_date']) != '') && (trim($filters['end_date']) != '')) {
$where[] = " (start_date BETWEEN '" . trim(strtolower($filters['start_date'])) . "' AND '" . trim(strtolower($filters['end_date'])) . "') OR (end_date BETWEEN '" . trim(strtolower($filters['start_date'])) . "' AND '" . trim(strtolower($filters['end_date'])) . "') OR ( start_date <= '" . trim(strtolower($filters['start_date'])) . "' AND end_date > '" . trim(strtolower($filters['end_date'])) . "') ";
}

if (empty($where) === false) {
$where_clause = ' AND ' . implode(' AND ', $where);
$where_clause_data = implode(' AND ', $where);
} else {
$where_clause = '';
$where_clause_data = '';
}

} else {
unset($_SESSION['task_manager_filter']);
}

// records per page
$recordPerPage = !empty($_GET['perpage']) ? $_GET['perpage'] : (!empty($_SESSION['task_manager_perpage']) ? $_SESSION['task_manager_perpage'] : 10);
$_SESSION['task_manager_perpage'] = $recordPerPage;
$limit = ($page - 1) * $recordPerPage . ',' . $recordPerPage;

// records order by
$orderField = !empty($_GET['orderfield']) ? $_GET['orderfield'] : (!empty($_SESSION['task_manager_orderfield']) ? $_SESSION['task_manager_orderfield'] : 'id');
$orderType = !empty($_GET['ordertype']) ? $_GET['ordertype'] : (!empty($_SESSION['task_manager_ordertype']) ? $_SESSION['task_manager_ordertype'] : 'DESC');
$_SESSION['task_manager_orderfield'] = $orderField;
$_SESSION['task_manager_ordertype'] = $orderType;
$orderby = $orderField . ' ' . $orderType;

//fetch records
$sql = 'SELECT t.id, task_name, description, assigned_to_id, developer_id, status_id, start_date, end_date, tsm.name as STATUS_NAME, tu.full_name AS ASSIGNED_TO, tud.full_name AS DEVELOPER FROM tbl_tasks t INNER JOIN tbl_task_status_master tsm ON tsm.id = t.status_id INNER JOIN tbl_users tu on t.assigned_to_id = tu.id INNER JOIN tbl_users tud on t.developer_id = tud.id WHERE 1=1 ' . $where_clause . ' ORDER BY ' . $orderby . ' LIMIT ' . $limit;
// print_r($sql);
$responseData = query($conn_task_manager, $sql);
// echo "<pre>" ;print_r($responseData); echo "</pre>";
$allRecords = selectAll($conn_task_manager, 'tbl_tasks', '*', $where_clause_data, $orderby);
if (isset($allRecords['row_count'])) {
$allRecordsCount = $allRecords['row_count'];
} else {
$allRecordsCount = 0;
}
?>


<section class="task-section">
<div class="container" style="min-width:95%;">
<div class="row">
<div class="col-sm-12" id="taskid" style="margin-top: 34px;">
<h3 class="companiesh3">Task Manager <i class="fa fa-caret-down"></i> <br><span><?php echo !empty($allRecordsCount) ? $allRecordsCount : 0; ?> record</span></h3>
</div>
</div>
<form name="task_search_form" method="post" action="task_manager.php">
<h5>Search</h5>
<div class="row">
<div class="col-sm-2">
<div class="form-group">
<label for="exampleInputPassword1">Title</label>
<input type="text" class="form-control" name="filter[task_name]" placeholder="Search Title" value="<?php echo (!empty($filters) && !empty($filters['task_name'])) ? $filters['task_name'] : '' ?>">
</div>
</div>
<div class="col-sm-2">
<div class="form-group">
<label for="exampleInputPassword1">Assigned To</label>
<select name="filter[assigned_to_id]" id="assigned_id_search" class="form-control ">
<?php
$tbl_users = selectAll($conn_task_manager, 'tbl_users', 'id,full_name');
?>
<option value='0'>Select</option>
<?php
while ($tbl_users_data = selectAllFetch($tbl_users['data'])) {
if ((isset($filters['assigned_to_id'])) && ($tbl_users_data['id'] == $filters['assigned_to_id'])) {
?>
<option value="<?= $tbl_users_data['id'] ?>" selected='selected'> <?= $tbl_users_data['full_name'] ?></option>
<?php
} else {
?>
<option value="<?= $tbl_users_data['id'] ?>"> <?= $tbl_users_data['full_name'] ?></option>
<?php
}
}
?>
</select>
</div>
</div>
<div class="col-sm-2">
<div class="form-group">
<label for="exampleInputPassword1">Developer</label>
<select name="filter[developer_id]" id="developer_id_search" class="form-control">
<?php
$tbl_users = selectAll($conn_task_manager, 'tbl_users', 'id,full_name');
?>
<option value='0'>Select</option>
<?php
while ($tbl_users_data = selectAllFetch($tbl_users['data'])) {
if ((isset($filters['developer_id'])) && ($tbl_users_data['id'] == $filters['developer_id'])) {
?>
<option value="<?= $tbl_users_data['id'] ?>" selected='selected'> <?= $tbl_users_data['full_name'] ?></option>
<?php
} else {
?>
<option value="<?= $tbl_users_data['id'] ?>"> <?= $tbl_users_data['full_name'] ?></option>
<?php
}
}
?>
</select>
</div>
</div>
<div class="col-sm-2">
<div class="form-group">
<label for="exampleInputPassword1">Status</label>
<select class="form-control" name="filter[status_id]">
<?php
$tbl_users = selectAll($conn_task_manager, 'tbl_task_status_master', 'id,name');
?>
<option value='0'>Select</option>
<?php
while ($tbl_users_data = selectAllFetch($tbl_users['data'])) {
if ((isset($filters['status_id'])) && ($tbl_users_data['id'] == $filters['status_id'])) {
?>
<option value="<?= $tbl_users_data['id'] ?>" selected='selected'> <?= $tbl_users_data['name'] ?></option>
<?php
} else {
?>
<option value="<?= $tbl_users_data['id'] ?>"> <?= $tbl_users_data['name'] ?></option>
<?php
}
}
?>
</select>
</div>
</div>
<div class="col-sm-2">
<div class="form-group">
<label for="exampleInputPassword1">Start Date</label>
<input type="date" class="form-control start_search_datepicker" name="filter[start_date]" onchange="handler(event);" id="start_date_search" placeholder="" value="<?php echo (!empty($filters) && !empty($filters['start_date'])) ? $filters['start_date'] : '' ?>" maxlength="10">
</div>
</div>
<div class="col-sm-2">
<div class="form-group">
<label for="exampleInputPassword1">End Date</label>
<input type="date" class="form-control end_search_datepicker" name="filter[end_date]" onchange="handler(event);" id="end_date_search" placeholder="" value="<?php echo (!empty($filters) && !empty($filters['end_date'])) ? $filters['end_date'] : '' ?>" maxlength="10">
</div>
</div>
<div class="col-sm-2" style="margin-top: 5px;">
<button type="submit" class="btn btn-primary">Search</button>
<a type="button" class="btn btn-outline-secondary" style="text-decoration: none;" href="task_manager.php">Clear</a>
</div>
<div class="col-sm-2" style="margin-top: 5px;">
</div>
</form>
<div class="col-sm-8" style="margin-bottom:10px;">
<div class="pull-right">
<div class="container">
<button type="button" class="btn btn-outline-secondary" data-toggle="modal" data-target="#myModal" style="text-decoration: none;">Add Task</button>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 table-responsive">
<table id="example" class="table table-striped table-bordered" style="width:100%; table-layout: fixed;">
<thead>
<tr>
<th style="width: 95px;"><a href="task_manager.php?orderfield=id&ordertype=<?php echo $orderType == 'ASC' ? 'DESC' : 'ASC ' ?>"> ID
<span style="float:right;"><i class="fa <?php echo ($orderField == 'id') ? ($orderType == 'ASC' ? 'fa-caret-down' : 'fa-caret-up') : ''; ?>"></i></span></a>
</th>
<th style="width: 95px;">Title</th>
<th style="width: 95px;">Assigned To</th>
<th style="width: 80px;">Developer</th>
<th style="width: 80px;">Status</th>
<th style="width: 95px;">Start Date</th>
<th style="width: 95px;">End Date</th>
</tr>
</thead>
<tbody>
<?php if (($responseData['msg_code'] == 0) && ($allRecordsCount > 0)) {
while ($row = selectAllFetch($responseData['data'])) {
$start_Date = substr($row['start_date'], 0, 10);
$new_start_Date = date("d-m-Y", strtotime($start_Date));
$end_Date = substr($row['end_date'], 0, 10);
$new_end_date = date("d-m-Y", strtotime($end_Date)); ?>
<tr>
<td><?php echo $row['id']; ?></td>
<td class="show_description_name" id="show_description_name" style="color:#72AFD2; cursor:pointer" data-id="<?php echo $row['id']; ?>"><?php echo $row['task_name']; ?></td>
<td><?php echo $row['ASSIGNED_TO']; ?></td>
<td><?php echo $row['DEVELOPER']; ?></td>
<td><?php echo $row['STATUS_NAME']; ?></td>
<td><?php echo $new_start_Date; ?></td>
<td><?php echo $new_end_date; ?></td>
</tr>
<?php }
} else {
?>
<tr>
<td colspan="7">
<center>No record found</center>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<?php if ($allRecordsCount > 0) { ?>
<div class="row">
<div class="col-sm-3">
<select class="form-control-sm" id="record-per-page" style="width: 80px;">
<option value="" disabled>Per Page</option>
<option value="10" <?php echo $recordPerPage == 10 ? 'selected=selected' : '' ?>>10</option>
<option value="20" <?php echo $recordPerPage == 20 ? 'selected=selected' : '' ?>>20</option>
<option value="25" <?php echo $recordPerPage == 25 ? 'selected=selected' : '' ?>>25</option>
<option value="50" <?php echo $recordPerPage == 50 ? 'selected=selected' : '' ?>>50</option>
</select>
</div>
<div class="col-sm-4">&nbsp</div>
<div class="col-sm-5">
<nav aria-label="" style="float:right;">
<?php echo getPaginationLinks($allRecordsCount, $recordPerPage, $page); ?>
</nav>
</div>
</div>
<?php } ?>
</div>
</section>

<!-- Modal For Add Task -->
<div class="modal fade" id="myModal" role="dialog" data-keyboard="false" data-backdrop="static">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Add Task</h4>
</div>
<div class="show_hide_message_error" id="show_hide_message_error" style="display: none;"></div>
<div class="modal-body">
<form name="add_task_form" id="add_task_form">
<div class="row form-group">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="form-group">
<label for="exampleInputPassword1">
<h6>Title</h6>
</label>
<input type="text" class="form-control" name="title" id="title" value="">
</div>
</div>
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="form-group">
<label for="exampleInputPassword1">
<h6>Description</h6>
</label>
<textarea class="form-control" name="description" id="description" maxlength="2000" value=""></textarea>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="form-group">
<label for="exampleInputPassword1">
<h6>Assigned To</h6>
</label>
<select name="assigned_id" id="assigned_id" class="form-control " required="">
<?php
$tbl_users = selectAll($conn_task_manager, 'tbl_users', 'id,full_name');
$str = "<option>Select</option>";
while ($tbl_users_data = selectAllFetch($tbl_users['data'])) {
$str = $str . "<option value=" . $tbl_users_data['id'] . ">" . $tbl_users_data['full_name'] . "</option>";
}
echo $str;
?>
</select>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="form-group">
<label for="exampleInputPassword1">
<h6>Developer</h6>
</label>
<select name="developer_id" id="developer_id" class="form-control " required="">
<?php
$tbl_users = selectAll($conn_task_manager, 'tbl_users', 'id,full_name');
$str = "<option>Select</option>";
while ($tbl_users_data = selectAllFetch($tbl_users['data'])) {
$str = $str . "<option value=" . $tbl_users_data['id'] . ">" . $tbl_users_data['full_name'] . "</option>";
}
echo $str;
?>
</select>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="form-group">
<label for="exampleInputPassword1">
<h6>Start Date</h6>
</label>
<input type="date" class="form-control start_datepicker" name="start_date" onchange="handler(event);" id="start_date" placeholder="" value="<?php ?>" maxlength="10">
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6">
<div class="form-group">
<label for="exampleInputPassword1">
<h6>End Date</h6>
</label>
<input type="date" class="form-control end_datepicker" name="end_date" data-date-start-date="" id="end_date" placeholder="" value="" maxlength="10">
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-info pull-left" id="changetype_submit">Submit</button>
<button type="submit" class="btn btn-primary" data-dismiss="modal">Close</button>
</div>
</form>
</div>
</div>
</div>


<!--MODAL FOR TITLE-->

<div class="modal fade" id="description_myModal" data-keyboard="false" data-backdrop="static">
<div class="modal-dialog modal-lg" style="max-width: 80%;">
<div class="modal-content">

<!-- Modal Header -->
<div class="modal-header">
<h4 class="modal-title" id="show_task_name"></h4>
<button type="button" class="close" data-dismiss="modal" id="modal_close">&times;</button>
</div>
<div class="" id="show_hide_comment_error" style="display: none;"></div>
<div class="add_comment_message alert alert-success" id="developer_comment_message" style="display: none;">Developer has been changed successfully!!</div>
<div class="add_comment_message alert alert-success" id="assigned_comment_message" style="display: none;">Assigned To has been changed successfully!!</div>
<div class="add_comment_message alert alert-success" id="status_comment_message" style="display: none;">Status has been changed successfully!!</div>

<!-- Modal body -->
<div class="modal-body" id="modal_body">
<div class="row">
<div class="col-lg-9 col-md-9 col-sm-12 border_right_1px">
<h5>Description</h5>
<p class="data_word_break" id="show_description"></p>
<hr>
<h4 id="comment_heading_h4">Comments</h4>

<div id="comment_div">
<ul class="timeline" id="comment_data_show">
</ul>
</div>
<hr>
<div class="row ">
<div class="col">
<form name="add_comment_form" id="add_comment_form" method="" action="">
<input type="hidden" name="task_id" id="task_id" value="">
<input type="hidden" name="full_name" id="full_name" value="<?php echo $_SESSION[LOGGED_IN_USER_SESSION_NAME]['user_id']; ?>">
<label for="comment">
<h5>Comment</h5>
</label>
<textarea class="form-control" name="comment" id="comment" rows="5"></textarea>
<p>
<span>characters remaining: <span id="rem_comment" title="2000"></span></span>
</p>
<button type="submit" class="btn btn-info" id="add_comment_submit">Post comment</button>
</form>
</div>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-12">
<div class="row form-group">
<div class="col-lg-6 col-md-6 col-sm-6">
<label for="comment" style="font-size: 16px !important;">Start Date:</label>
<div class="tooltip24" id="last_modified_start" style="font-size: 16px !important;">
<span class="tooltiptext24" id="last_modified_start_tooltip"></span>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6" style="padding-left: 0px;">
<div class="col-lg-12 col-md-6 col-sm-6">
<label for="comment" style="font-size: 16px !important;">End Date:</label>
</div>
<div class="col-lg-12 col-md-6 col-sm-6">
<span data-toggle="tooltip" id="last_modified_end" style="font-size: 16px !important;"></span>
</div>
</div>
</div>

<div class="row form-group">
<div class="col-lg-6 col-md-6 col-sm-6">
<label for="comment" style="font-size: 16px !important;">Assigned To:</label>
<select name="assigned_id_show" id="assigned_id_show" class="form-control " required="">
<?php
$tbl_users = selectAll($conn_task_manager, 'tbl_users', 'id,full_name');
$str = "<option>Select</option>";
while ($tbl_users_data = selectAllFetch($tbl_users['data'])) {
$str = $str . "<option value=" . $tbl_users_data['id'] . ">" . $tbl_users_data['full_name'] . "</option>";
}
echo $str;
?>
</select>
</div>
<div class="col-lg-6 col-md-6 col-sm-6">
<label for="comment" style="font-size: 16px !important;">Developer:</label>
<select name="developer_id_show" id="developer_id_show" class="form-control " required="">
<?php
$tbl_users = selectAll($conn_task_manager, 'tbl_users', 'id,full_name');
$str = "<option>Select</option>";
while ($tbl_users_data = selectAllFetch($tbl_users['data'])) {
$str = $str . "<option value=" . $tbl_users_data['id'] . ">" . $tbl_users_data['full_name'] . "</option>";
}
echo $str;
?>
</select>
</div>
</div>
<div class="row form-group">
<div class="col-lg-6 col-md-6 col-sm-6">
<label for="comment" style="font-size: 16px !important;">Status:</label>
<select class="form-control" id="status_show">
<?php
$tbl_task_status_master = selectAll($conn_task_manager, 'tbl_task_status_master', 'id,name');
$str = "<option>Select</option>";
while ($tbl_task_status_master_data = selectAllFetch($tbl_task_status_master['data'])) {
$str = $str . "<option value=" . $tbl_task_status_master_data['id'] . ">" . $tbl_task_status_master_data['name'] . "</option>";
}
echo $str;
?>
</select>
</div>
</div>
<h4 style="color: #5E99F7;font-weight: 600;">Activities</h4>
<div id="comment_div">
<ul class="timeline" id="activity_data_show">
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
function handler(e) {
var start_date = e.target.value;
var result = new Date(start_date);
result.setDate(result.getDate() + 1)
var end_date = result.getFullYear() + "-" + result.getMonth() + 1 + "-" + result.getDate();
$("#end_date").attr('min', end_date);
}
var comment = document.querySelector("#comment");
var remainingCount = document.querySelector("#rem_comment");
remainingCount.innerText = 2000
comment.addEventListener('keyup', (e) => {
var string = $("#comment").val();
var strLen = string.length;
remainingCount.innerText = 2000 - strLen
})
</script>

<?php
include COMMON . 'footer.php';
?>
<script>
$('#modal_close').on('click', function() {
setTimeout("window.location = 'task_manager.php'", 200);
});

function show_hide_message_error(type, message) {
if (type == "success") {
$("#show_hide_message_error").addClass("add_comment_message alert alert-success");
$("show_hide_comment_error").addClass("add_comment_message alert alert-success");
} else {
console.log(1);
$("#show_hide_message_error").addClass("add_comment_message alert alert-danger");
$("#show_hide_comment_error").addClass("add_comment_message alert alert-danger");
}
$("#show_hide_message_error").text(message);
$("#show_hide_comment_error").text(message);
$("#show_hide_message_error").css('display', 'block');
setTimeout("$('#show_hide_message_error').css('display', 'none');", 2000);
$("#show_hide_comment_error").css('display', 'block');
setTimeout("$('#show_hide_comment_error').css('display', 'none');", 2000);
}

function comment_data(task_id) {
$.ajax({
url: "task_manager_ajax.php",
method: "POST",
data: {
task_id: task_id,
tab: "task_id_modal"
},
success: function(data) {
$('#comment_data_show').html(data);
},
});
}

function activity_data(activity) {
$.ajax({
url: "task_manager_ajax.php",
method: "POST",
data: {
activity: activity,
tab: "activity_modal"
},
success: function(data) {
console.log(data);
$('#activity_data_show').html(data);
}
});
}

$(document).ready(function() {
$('#add_task_form').on('submit', function(e) {
e.preventDefault();
$.ajax({
url: "task_manager_ajax.php",
method: "POST",
data: $(this).serialize() + "&tab=add_task_modal",
success: function(data) {
var obj = $.parseJSON(data);
if (obj.msg_code == 0) {
setTimeout("window.location = 'task_manager.php'", 200);
} else {
show_hide_message_error('error', obj.msg);
}
}
});
});


$('#record-per-page').on('change', function() {
var perpage = $(this).val();
if (perpage != "") {
window.location = 'task_manager.php?perpage=' + perpage;
}
});


$('#add_comment_form').on('submit', function(e) {
var task_id = $('#task_id').attr("value");
e.preventDefault();
$.ajax({
url: "task_manager_ajax.php",
method: "POST",
data: $(this).serialize() + "&tab=comment_modal",
success: function(data) {
var obj = $.parseJSON(data);
if (obj.msg_code == 0) {
$("#add_comment_form")[0].reset();
comment_data(obj.task_id);
} else {
show_hide_message_error('error', obj.msg);
}
},
});
});

var old_status_id;
var old_assigned_id;
var old_developer_id;
$('.show_description_name').on('click', function() {
var id = $(this).data('id');
$('#task_id').val(id);
$.ajax({
url: "task_manager_ajax.php",
method: "POST",
data: {
id: id,
tab: "open_modal"
},
success: function(data) {
var obj = $.parseJSON(data);
$('#last_modified_start').text(obj.start_date + "");
$('#last_modified_start_tooltip').text(obj.start_date + "");
$('#last_modified_end').text(obj.end_date + "");
$('#status_show').val(obj.status_id + "");
old_status_id = obj.status_id + "";
$('#assigned_id_show').val(obj.assigned_to_id + "");
old_assigned_id = obj.assigned_to_id + ""
$('#show_task_name').text(obj.task_name + "");
$('#show_description').text(obj.description + "");
$("#developer_id_show").val(obj.developer_id + "");
old_developer_id = obj.developer_id + ""
},
});
comment_data(id);
activity_data(id);
$('#description_myModal').modal('show');
});

$('#status_show').on('change', function() {
var id = $('#task_id').attr("value");
var status_id = $(this).val();
let text = "Please confirm! you want to change status.";
if (confirm(text) == true) {
$.ajax({
url: "task_manager_ajax.php",
method: "POST",
data: {
status_id: status_id,
old_status_id: old_status_id,
id: id,
tab: "status_modal"
},
success: function(data) {
var final_data = $.parseJSON(data);
activity_data(final_data);
$('#status_comment_message').css('display', 'block');
setTimeout("$('#status_comment_message').css('display', 'none');", 2000);
},
});
} else {
$('#status_show').val(old_status_id + "");
}
});

$('#assigned_id_show').on('change', function() {
var id = $('#task_id').attr("value");
var assigned_id = $(this).val();
let text = "Please confirm! you want to change assigned to.";
if (confirm(text) == true) {
$.ajax({
url: "task_manager_ajax.php",
method: "POST",
data: {
assigned_id: assigned_id,
id: id,
old_assigned_id: old_assigned_id,
tab: "assigned_modal"
},
success: function(data) {
var final_data = $.parseJSON(data);
activity_data(final_data);
$('#assigned_comment_message').css('display', 'block');
setTimeout("$('#assigned_comment_message').css('display', 'none');", 2000);
},
});
} else {
$('#assigned_id_show').val(old_assigned_id + "");
}
});



$('#developer_id_show').on('change', function() {
var id = $('#task_id').attr("value");
var developer_id = $(this).val();
let text = "Please confirm! you want to change Developer.";
if (confirm(text) == true) {
$.ajax({
url: "task_manager_ajax.php",
method: "POST",
data: {
developer_id: developer_id,
id: id,
old_developer_id: old_developer_id,
tab: "developer_modal"
},
success: function(data) {
var final_data = $.parseJSON(data);
activity_data(final_data);
$('#developer_comment_message').css('display', 'block');
setTimeout("$('#developer_comment_message').css('display', 'none');", 2000);
},
});
} else {
$("#developer_id_show").val(old_developer_id + "");
}
});
});
</script>
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.