#1352 - bisheriger aktueller Stand, vor CalenderDayState
git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3354 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
1716662ac5
commit
a2d4159c88
10 changed files with 48 additions and 27 deletions
|
|
@ -548,8 +548,6 @@ class AdminController extends Controller
|
|||
*/
|
||||
public function adminFewoNewReservationWithStartingDayAction(Request $request, $lodgingId, $fromDate)
|
||||
{
|
||||
//todo price -> season
|
||||
//todo season.minimumStay
|
||||
$em = $this->getEntityManager();
|
||||
$fewoLodgingRepo = $em->getRepository('AppBundle:FewoLodging');
|
||||
$lodging = $fewoLodgingRepo->find($lodgingId);
|
||||
|
|
@ -608,6 +606,7 @@ class AdminController extends Controller
|
|||
$fewoReservationRepo = $em->getRepository('AppBundle:FewoReservation');
|
||||
$lodging = $fewoLodgingRepo->find($lodgingId);
|
||||
$reservation = $fewoReservationRepo->find($reservationId);
|
||||
$reservation->setType(1);
|
||||
$fromDate = $reservation->getFromDate()->format('d.m.Y');
|
||||
|
||||
$form = $this->createForm(FewoReservationType::class, $reservation, [
|
||||
|
|
@ -623,6 +622,7 @@ class AdminController extends Controller
|
|||
|
||||
if ($request->getMethod() == 'POST' && $form->isValid())
|
||||
{
|
||||
$reservation->setType(1); // 0 = Buchung; 1 = Händisch
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect('/admin/fewo/lodgings/'.$lodgingId);
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ class FewoLodging
|
|||
/**
|
||||
* @var integer
|
||||
*
|
||||
* @ORM\Column(name="only_weekday", type="integer", nullable=false)
|
||||
* @ORM\Column(name="only_weekday", type="integer", nullable=true)
|
||||
*/
|
||||
private $onlyWeekday;
|
||||
|
||||
|
|
@ -142,7 +142,7 @@ class FewoLodging
|
|||
/**
|
||||
* @var boolean
|
||||
*
|
||||
* @ORM\Column(name="calendar_visible", type="boolean", nullable=false)
|
||||
* @ORM\Column(name="calendar_visible", type="boolean", nullable=true)
|
||||
*/
|
||||
private $calendarVisible;
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class FewoReservation
|
|||
/**
|
||||
* @var integer
|
||||
*
|
||||
* @ORM\Column(name="type", type="integer", nullable=false)
|
||||
* @ORM\Column(name="type", type="integer", nullable=true)
|
||||
*/
|
||||
private $type;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,24 +40,40 @@ class FewoLodgingType extends AbstractType
|
|||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder
|
||||
->add('name')
|
||||
->add('description')
|
||||
->add('equipment')
|
||||
->add('adress1')
|
||||
->add('adress2')
|
||||
->add('zipCode')
|
||||
->add('city')
|
||||
->add('maximumPersons', TextType::class, [
|
||||
|
||||
->add('name', null, [
|
||||
'required' => true,
|
||||
])
|
||||
->add('deposit')
|
||||
->add('description', null, [
|
||||
'required' => true,
|
||||
])
|
||||
->add('equipment', null, [
|
||||
'required' => true,
|
||||
])
|
||||
->add('adress1', null, [
|
||||
'required' => true,
|
||||
])
|
||||
->add('adress2')
|
||||
->add('zipCode', null, [
|
||||
'required' => true,
|
||||
])
|
||||
->add('city', null, [
|
||||
'required' => true,
|
||||
])
|
||||
->add('maximumPersons', TextType::class, [
|
||||
'required' => true,
|
||||
])
|
||||
->add('deposit', null, [
|
||||
'required' => true,
|
||||
])
|
||||
/*
|
||||
->add('onlyWeekday', ChoiceType::class, [
|
||||
'choices' => self::$WEEKDAY_CHOICES,
|
||||
'constraints' => [
|
||||
new Choice(['choices' => self::$WEEKDAY_CHOICES])
|
||||
]
|
||||
])
|
||||
->add('calendarVisible')
|
||||
*/
|
||||
//->add('calendarVisible')
|
||||
->add('type', EntityType::class, [
|
||||
'placeholder' => '(Bitte wählen) *',
|
||||
'class' => 'AppBundle\Entity\FewoLodgingType',
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ class FewoReservationType extends AbstractType
|
|||
],
|
||||
'required' => true,
|
||||
])
|
||||
/*
|
||||
->add('type', ChoiceType::class, [
|
||||
'placeholder' => 'Buchungstyp (Bitte wählen) *',
|
||||
'choices' => self::$TYPE_CHOICES,
|
||||
|
|
@ -65,6 +66,7 @@ class FewoReservationType extends AbstractType
|
|||
],
|
||||
'required' => true,
|
||||
])
|
||||
*/
|
||||
//->add('lodging') // wird händisch gesetzt
|
||||
;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue