On master: Tower Auto-Stash: 2018-01-04 17:15:23 +0100
This commit is contained in:
commit
eba8a6b1ea
4 changed files with 328 additions and 271 deletions
587
trunk/composer.lock
generated
587
trunk/composer.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -157,6 +157,7 @@ class AdminController extends Controller
|
|||
*/
|
||||
public function adminFewoEditLodgingAction(Request $request, $lodgingId)
|
||||
{
|
||||
|
||||
$em = $this->getEntityManager();
|
||||
$fewoLodgingRepo = $em->getRepository('AppBundle:FewoLodging');
|
||||
|
||||
|
|
@ -166,8 +167,9 @@ class AdminController extends Controller
|
|||
|
||||
$lodging = $fewoLodgingRepo->find($lodgingId);
|
||||
$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();
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue