mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 23:07:32 -05:00 
			
		
		
		
	Update logic for rendering task hours
This commit is contained in:
		
							parent
							
								
									3112efcded
								
							
						
					
					
						commit
						1b70f24dbc
					
				@ -236,9 +236,19 @@ trait DesignHelpers
 | 
			
		||||
            return [];
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        foreach (json_decode($task['time_log']) as $log) {
 | 
			
		||||
            info($log);
 | 
			
		||||
            $logs[] = sprintf('%s - %s', \Carbon\Carbon::createFromTimestamp($log[0])->toDateTimeString(), \Carbon\Carbon::createFromTimestamp($log[1])->toDateTimeString());
 | 
			
		||||
        $logs = [];
 | 
			
		||||
        $_logs = json_decode($task->time_log);
 | 
			
		||||
 | 
			
		||||
        if (!$_logs) {
 | 
			
		||||
            $_logs = [];
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        foreach ($_logs as $log) {
 | 
			
		||||
            $logs[] = sprintf(
 | 
			
		||||
                '%s - %s',
 | 
			
		||||
                \Carbon\Carbon::createFromTimestamp($log[0])->format($task->client->date_format() . ' h:i:s'),
 | 
			
		||||
                \Carbon\Carbon::createFromTimestamp($log[1])->format($task->client->date_format() . ' h:i:s')
 | 
			
		||||
            );
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return $logs;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user