diff --git a/app/Export/CSV/BaseExport.php b/app/Export/CSV/BaseExport.php index 4ea22fe974ee..0fdee8ad6394 100644 --- a/app/Export/CSV/BaseExport.php +++ b/app/Export/CSV/BaseExport.php @@ -451,6 +451,7 @@ class BaseExport 'project' => 'task.project_id', 'billable' => 'task.billable', 'item_notes' => 'task.item_notes', + 'time_log' => 'task.time_log', ]; protected array $forced_client_fields = [ diff --git a/app/Export/CSV/TaskExport.php b/app/Export/CSV/TaskExport.php index 155d61a88f48..3d48b845a240 100644 --- a/app/Export/CSV/TaskExport.php +++ b/app/Export/CSV/TaskExport.php @@ -156,7 +156,7 @@ class TaskExport extends BaseExport $entity[$key] = $transformed_entity[$parts[1]]; } elseif (array_key_exists($key, $transformed_entity)) { $entity[$key] = $transformed_entity[$key]; - } elseif (in_array($key, ['task.start_date', 'task.end_date', 'task.duration', 'task.billable', 'task.item_notes'])) { + } elseif (in_array($key, ['task.start_date', 'task.end_date', 'task.duration', 'task.billable', 'task.item_notes', 'task.time_log'])) { $entity[$key] = ''; } else { $entity[$key] = $this->decorator->transform($key, $task); @@ -207,6 +207,9 @@ class TaskExport extends BaseExport $seconds = $task->calcDuration(); $entity['task.duration'] = $seconds; $entity['task.duration_words'] = $seconds > 86400 ? CarbonInterval::seconds($seconds)->locale($this->company->locale())->cascade()->forHumans() : now()->startOfDay()->addSeconds($seconds)->format('H:i:s'); + + $entity['task.time_log'] = (isset($item[1]) && $item[1] != 0) ? $item[1] - $item[0] : ctrans('texts.is_running'); + } if (in_array('task.billable', $this->input['report_keys']) || in_array('billable', $this->input['report_keys'])) { diff --git a/app/Http/Requests/Task/UpdateTaskRequest.php b/app/Http/Requests/Task/UpdateTaskRequest.php index 0944fb4eee1e..7e9752d29c20 100644 --- a/app/Http/Requests/Task/UpdateTaskRequest.php +++ b/app/Http/Requests/Task/UpdateTaskRequest.php @@ -67,7 +67,7 @@ class UpdateTaskRequest extends Request if(is_string($values)) { $values = json_decode($values, true); } - + if(!is_array($values)) { $fail('The '.$attribute.' must be a valid array.'); return; @@ -133,7 +133,7 @@ class UpdateTaskRequest extends Request } - if(!isset($input['time_log']) || empty($input['time_log']) || $input['time_log'] == '{}') { + if(!isset($input['time_log']) || empty($input['time_log']) || $input['time_log'] == '{}' || $input['time_log'] == '[""]') { $input['time_log'] = json_encode([]); } diff --git a/app/Jobs/Ninja/AdjustEmailQuota.php b/app/Jobs/Ninja/AdjustEmailQuota.php index 31a9dc1f2777..62ef46f490b2 100644 --- a/app/Jobs/Ninja/AdjustEmailQuota.php +++ b/app/Jobs/Ninja/AdjustEmailQuota.php @@ -79,7 +79,7 @@ class AdjustEmailQuota implements ShouldQueue /** Use redis pipelines to execute bulk deletes efficiently */ $redis = Redis::connection('sentinel-cache'); - $prefix = config('cache.prefix'). ":email_quota*"; + $prefix = config('cache.prefix'). "email_quota*"; $keys = $redis->keys($prefix); @@ -92,7 +92,7 @@ class AdjustEmailQuota implements ShouldQueue } $keys = null; - $prefix = config('cache.prefix'). ":throttle_notified*"; + $prefix = config('cache.prefix'). "throttle_notified*"; $keys = $redis->keys($prefix); diff --git a/resources/views/portal/ninja2020/dashboard/index.blade.php b/resources/views/portal/ninja2020/dashboard/index.blade.php index 8bd9314ca76e..21d8919bfd76 100644 --- a/resources/views/portal/ninja2020/dashboard/index.blade.php +++ b/resources/views/portal/ninja2020/dashboard/index.blade.php @@ -2,6 +2,13 @@ @section('meta_title', ctrans('texts.dashboard')) @section('body') + + @if($client->getSetting('custom_message_dashboard')) + @component('portal.ninja2020.components.message') +
{{ $client->getSetting('custom_message_dashboard') }}+ @endcomponent + @endif +