* - changed homeoffice icon color * - improved list of request on dashboard * - hide holidays if no data * - fix to holidays * - fix * - made forms looks better * - hide chart when user has no vacation limit * - linter fix * - fix to pdf attachment for vacation request
		
			
				
	
	
		
			25 lines
		
	
	
		
			581 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			581 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
declare(strict_types=1);
 | 
						|
 | 
						|
namespace Toby\Infrastructure\Http\Resources;
 | 
						|
 | 
						|
use Illuminate\Http\Resources\Json\JsonResource;
 | 
						|
 | 
						|
class HolidayResource extends JsonResource
 | 
						|
{
 | 
						|
    public static $wrap = null;
 | 
						|
 | 
						|
    public function toArray($request): array
 | 
						|
    {
 | 
						|
        return [
 | 
						|
            "id" => $this->id,
 | 
						|
            "name" => $this->name,
 | 
						|
            "date" => $this->date->toDateString(),
 | 
						|
            "isPast" => $this->date->endOfDay()->isPast(),
 | 
						|
            "displayDate" => $this->date->toDisplayString(),
 | 
						|
            "dayOfWeek" => $this->date->dayName,
 | 
						|
        ];
 | 
						|
    }
 | 
						|
}
 |