Add some variables to the scss files

Use the period API call for the program schema
This commit is contained in:
Jorit Tijsen
2024-03-20 17:54:10 +01:00
parent 25b3d41bf1
commit 1d94e7da7f
28 changed files with 114 additions and 159 deletions

View File

@@ -9,9 +9,9 @@ class RadioController extends Controller
{
public function schedule(Request $request, $date = '')
{
$apiResult = $this->API('programma/schema/week/0');
$start = self::JsonToDateTime($apiResult->startdate);
$end = self::JsonToDateTime($apiResult->enddate);
$start = $date ? (new \DateTime($date))->format('Y-m-d') : (new \DateTime("-2 day"))->format('Y-m-d');
$end = $date ? (new \DateTime($date))->modify('+1 day')->format('Y-m-d') : (new \DateTime("+3 day"))->format('Y-m-d');
$apiResult = $this->API('programma/schema/periode/' . $start . '/' . $end);
$schedule = [];
foreach($apiResult->schedule as $program)
{