On master: Tower Auto-Stash: 2018-01-04 17:15:23 +0100

This commit is contained in:
Kevin Adametz 2018-01-04 17:15:23 +01:00
commit eba8a6b1ea
4 changed files with 328 additions and 271 deletions

587
trunk/composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -157,6 +157,7 @@ class AdminController extends Controller
*/
public function adminFewoEditLodgingAction(Request $request, $lodgingId)
{
$em = $this->getEntityManager();
$fewoLodgingRepo = $em->getRepository('AppBundle:FewoLodging');
@ -168,6 +169,7 @@ class AdminController extends Controller
$reservations = $calendarService->getReservations($lodging);
$paddedCalendar = $calendarService->getCalendarWithPadding($calendarService->getMinCalendarEntriesByLodging($lodging));
$calendar = $calendarService->getCalendar($lodging);
if (count($lodging->getPrices()->toArray()) != 0)
{
@ -873,8 +875,8 @@ class AdminController extends Controller
{
$form->handleRequest($request);
}
var_dump($form->isValid());
//die();
if ($request->getMethod() == 'POST' && $form->isValid())
{
$image = $form->getData();

View file

@ -204,7 +204,9 @@ class LodgingCalendarService
*/
public function getMinCalendarEntriesByLodging($lodging)
{
$latestSeason = $this->em->getRepository('AppBundle:FewoLodging')->findLatestSeasonEndForLodging($lodging);
$curMonthDate = new \DateTime();
$curMonthDate->setDate($curMonthDate->format('Y'), $curMonthDate->format('n'), 1);
$seasonMonthDate = new \DateTime($latestSeason->getToDate()->format('Y-m-d'));

View file

@ -8,7 +8,7 @@ libxml_use_internal_errors(true);
$loader = require __DIR__.'/../app/autoload.php';
include_once __DIR__.'/../var/bootstrap.php.cache';
$kernel = new AppKernel('prod', false);
$kernel = new AppKernel('dev', true);
$kernel->loadClassCache();
//$kernel = new AppCache($kernel);