<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
#[Route('/calendar', name: 'calendar_')]
class CalendarController extends AbstractController
{
#[Route('/summary', name: 'summary')]
public function summary(): Response
{
return $this->render('calendar/summary.html.twig', [
]);
}
#[Route('/tapList', name: 'taplist')]
public function tapList(): JsonResponse
{
$jsonResponse = json_decode('[{"title": "Event 1","start": "2022-03-05T09:00:00","end": "2022-03-05T18:00:00", "color": "#009900", "textColor": "#990000"},{"title": "Event 2","start": "2022-03-08","end": "2019-03-10", "backgroundColor": "#000099", "textColor": "#999999"}]');
$response = new JsonResponse($jsonResponse);
return $response;
}
#[Route('/add-record', name: 'addrecord')]
public function addRecord(): JsonResponse
{
$response = new JsonResponse($_POST);
return $response;
}
#[Route('/{record}/edit', name: 'editrecord')]
public function editRecord(): Response
{
return $this->render('members/dominant.html.twig', [
]);
}
#[Route('/{record}/remove', name: 'removerecord')]
public function removeRecord(): Response
{
return $this->render('members/dominant.html.twig', [
]);
}
}