This commit is contained in:
Henry Jordan
2021-01-28 19:15:14 +00:00
4 changed files with 21 additions and 17 deletions

View File

@@ -160,8 +160,8 @@ export default {
<style> <style>
.debugger-container { .debugger-container {
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
max-width: 25%; max-width: 25%;
min-width: 25%; min-width: 25%;
padding: 0.1rem; padding: 0.1rem;
@@ -192,9 +192,9 @@ export default {
} }
} }
.tabs-component-tab { .debugger-container .tabs-component-tab {
color: #999; color: #999;
font-size: 14px; font-size: 0.6rem;
font-weight: 600; font-weight: 600;
margin-right: 0; margin-right: 0;
list-style: none; list-style: none;
@@ -284,7 +284,7 @@ input[type="radio"] {
} }
.debugger-container .VueTables.VueTables--client > * { .debugger-container .VueTables.VueTables--client > * {
font-size: smaller; font-size: 10px;
} }
.debugger-container .VueTables.VueTables--client .table td, .debugger-container .VueTables.VueTables--client .table td,
@@ -299,7 +299,7 @@ input[type="radio"] {
width: 100%; width: 100%;
height: 30px; height: 30px;
padding: 0.5rem 0.5rem; padding: 0.5rem 0.5rem;
font-size: 1rem; font-size: 0.6rem;
font-weight: 400; font-weight: 400;
line-height: 1.5; line-height: 1.5;
color: #495057; color: #495057;
@@ -317,11 +317,10 @@ input[type="radio"] {
padding-left: 0; padding-left: 0;
} }
.debugger-container .btn-group-sm > .btn, .debugger-container .btn-group-sm>.btn, .btn-sm {
.btn-sm { padding: .25rem .5rem;
padding: 0.25rem 0.5rem; font-size: .6rem;
font-size: 0.6rem; line-height: 1.5;
line-height: 1.5; border-radius: .2rem;
border-radius: 0.2rem;
} }
</style> </style>

View File

@@ -577,7 +577,7 @@ class Ajax
$noteContent = addslashes($_POST['NOTE_REASON']); $noteContent = addslashes($_POST['NOTE_REASON']);
// Define the Case for register a case note // Define the Case for register a case note
$cases = new BmCases(); $cases = new BmCases();
$response = $cases->addNote($appUid, $usrUid, $noteContent); $response = $cases->addNote($appUid, $usrUid, $noteContent, $_POST['NOTIFY_CANCEL']);
} }
} else { } else {
$result->status = false; $result->status = false;

View File

@@ -1098,10 +1098,12 @@ class AbstractCases implements CasesInterface
* *
* @param string $pendingJson * @param string $pendingJson
* @param bool $onlyTask * @param bool $onlyTask
* @param string $statusThread
* @param string $dateToCompare
* *
* @return int * @return int
*/ */
public function prepareTaskPending($pendingJson, $onlyTask = true) public function prepareTaskPending($pendingJson, $onlyTask = true, $statusThread = '', $dateToCompare = '')
{ {
$taskPending = json_decode($pendingJson, true); $taskPending = json_decode($pendingJson, true);
$result = []; $result = [];
@@ -1118,9 +1120,11 @@ class AbstractCases implements CasesInterface
} }
if ($key === 'due_date') { if ($key === 'due_date') {
$threadTasks[$i][$key] = $row; $threadTasks[$i][$key] = $row;
$threadTasks[$i]['delay'] = getDiffBetweenDates($row, date("Y-m-d H:i:s")); // Get the end date for calculate the delay
$endDate = ($dateToCompare !== 'now') ? $endDate = $dateToCompare : date("Y-m-d H:i:s");
$threadTasks[$i]['delay'] = getDiffBetweenDates($row, $endDate);
// Get task color label // Get task color label
$threadTasks[$i]['tas_color'] = (!empty($row)) ? $this->getTaskColor($row) : ''; $threadTasks[$i]['tas_color'] = (!empty($row)) ? $this->getTaskColor($row, $statusThread, $dateToCompare) : '';
$threadTasks[$i]['tas_color_label'] = (!empty($row)) ? self::TASK_COLORS[$threadTasks[$i]['tas_color']] : ''; $threadTasks[$i]['tas_color_label'] = (!empty($row)) ? self::TASK_COLORS[$threadTasks[$i]['tas_color']] : '';
$threadTasks[$i]['tas_status'] = self::TASK_STATUS[$threadTasks[$i]['tas_color']]; $threadTasks[$i]['tas_status'] = self::TASK_STATUS[$threadTasks[$i]['tas_color']];
} }

View File

@@ -181,12 +181,13 @@ class Search extends AbstractCases
// Calculate duration // Calculate duration
$startDate = (string)$item['APP_CREATE_DATE']; $startDate = (string)$item['APP_CREATE_DATE'];
$endDate = !empty($item['APP_FINISH_DATE']) ? $item['APP_FINISH_DATE'] : date("Y-m-d H:i:s"); $endDate = !empty($item['APP_FINISH_DATE']) ? $item['APP_FINISH_DATE'] : date("Y-m-d H:i:s");
$dateToCompare = !empty($item['APP_FINISH_DATE']) ? $item['APP_FINISH_DATE'] : 'now';
$item['DURATION'] = getDiffBetweenDates($startDate, $endDate); $item['DURATION'] = getDiffBetweenDates($startDate, $endDate);
// Get total case notes // Get total case notes
$item['CASE_NOTES_COUNT'] = AppNotes::total($item['APP_NUMBER']); $item['CASE_NOTES_COUNT'] = AppNotes::total($item['APP_NUMBER']);
// Get the detail related to the open thread // Get the detail related to the open thread
if (!empty($item['THREADS'])) { if (!empty($item['THREADS'])) {
$result = $this->prepareTaskPending($item['THREADS'], false); $result = $this->prepareTaskPending($item['THREADS'], false, $item['APP_STATUS'], $dateToCompare);
$item['THREAD_TASKS'] = !empty($result['THREAD_TASKS']) ? $result['THREAD_TASKS'] : []; $item['THREAD_TASKS'] = !empty($result['THREAD_TASKS']) ? $result['THREAD_TASKS'] : [];
$item['THREAD_USERS'] = !empty($result['THREAD_USERS']) ? $result['THREAD_USERS'] : []; $item['THREAD_USERS'] = !empty($result['THREAD_USERS']) ? $result['THREAD_USERS'] : [];
$item['THREAD_TITLES'] = !empty($result['THREAD_TITLES']) ? $result['THREAD_TITLES'] : []; $item['THREAD_TITLES'] = !empty($result['THREAD_TITLES']) ? $result['THREAD_TITLES'] : [];