Skip to content

Commit

Permalink
Daily end monthly view fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lucatacconi committed Apr 26, 2024
1 parent c3bed2e commit 2914fbf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
6 changes: 3 additions & 3 deletions app/sections/dailyCalendar/DailyCalendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,9 @@ module.exports = {
let event_color = self.stringToColor(response.data[i].task_path);
r = parseInt(event_color.substr(1,2),16);
g = parseInt(event_color.substr(3,2),16);
b = parseInt(event_color.substr(4,2),16);
r = parseInt(event_color.substring(1,2),16);
g = parseInt(event_color.substring(3,2),16);
b = parseInt(event_color.substring(4,2),16);
yiq = ( (r * 299) + (g * 587) + (b * 114)) / 1000;
let event_color_text = "#FFFFFF";
Expand Down
6 changes: 3 additions & 3 deletions app/sections/monthlyCalendar/MonthlyCalendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ module.exports = {
let event_color = self.stringToColor(response.data[i].task_path);
r = parseInt(event_color.substr(1,2),16);
g = parseInt(event_color.substr(3,2),16);
b = parseInt(event_color.substr(4,2),16);
r = parseInt(event_color.substring(1,2),16);
g = parseInt(event_color.substring(3,2),16);
b = parseInt(event_color.substring(4,2),16);
yiq = ( (r * 299) + (g * 587) + (b * 114)) / 1000;
let event_color_text = "#FFFFFF";
Expand Down
14 changes: 9 additions & 5 deletions routes/api/task.php
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,10 @@ static function (array $file) {
continue;
}

if($calc_run_ref > $event_interval_to_orig){
break;
}

$row["planned_in_interval"]++;

if($calc_run_ref < $date_now && $past_planned_tasks != "Y"){
Expand Down Expand Up @@ -820,7 +824,7 @@ static function (array $file) {

while($nincrement < $round_limit){ //Use the maximum number of minutes in the given range

$aDATEREF = explode(' ', $event_interval_from_orig);
$aDATEREF = explode(' ', $calc_run_ref);

if(!empty($life_time_from) && date('Y-m-d H:i:s', strtotime($calc_run_ref)) < date('Y-m-d H:i:s', strtotime($aDATEREF[0].' '.$life_time_from))){
$calc_run_ref = date('Y-m-d H:i', strtotime($aDATEREF[0].' '.$life_time_from));
Expand Down Expand Up @@ -856,12 +860,12 @@ static function (array $file) {
continue;
}

if($calc_run_ref < $event_interval_from_orig){
continue;
}

$step = 1;

if($calc_run_ref > $event_interval_to_orig){
break;
}

if($calc_run_ref < $date_now && $past_planned_tasks != "Y"){
if(array_key_exists($calc_run_ref, $row["executed_task_lst"])){
if($calc_run_ref == $row["executed_task_lst"][$calc_run_ref]){
Expand Down

0 comments on commit 2914fbf

Please sign in to comment.