lol
This commit is contained in:
parent
9e804c6113
commit
3d6809830c
7 changed files with 41 additions and 11 deletions
|
@ -33,6 +33,9 @@
|
||||||
<Configuration>
|
<Configuration>
|
||||||
<option name="path" value="$PROJECT_DIR$/tests" />
|
<option name="path" value="$PROJECT_DIR$/tests" />
|
||||||
</Configuration>
|
</Configuration>
|
||||||
|
<Configuration>
|
||||||
|
<option name="path" value="$PROJECT_DIR$/tests" />
|
||||||
|
</Configuration>
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" packagePrefix="App\" />
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" packagePrefix="App\" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" packagePrefix="App\Tests\" />
|
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" packagePrefix="App\Tests\" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/dealerdirect/phpcodesniffer-composer-installer" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/dealerdirect/phpcodesniffer-composer-installer" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/lubiana/code-quality" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/lubiana/code-quality" />
|
||||||
|
|
|
@ -32,6 +32,9 @@
|
||||||
<PhpSpecSuiteConfiguration>
|
<PhpSpecSuiteConfiguration>
|
||||||
<option name="myPath" value="$PROJECT_DIR$" />
|
<option name="myPath" value="$PROJECT_DIR$" />
|
||||||
</PhpSpecSuiteConfiguration>
|
</PhpSpecSuiteConfiguration>
|
||||||
|
<PhpSpecSuiteConfiguration>
|
||||||
|
<option name="myPath" value="$PROJECT_DIR$" />
|
||||||
|
</PhpSpecSuiteConfiguration>
|
||||||
</suites>
|
</suites>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -88,7 +88,6 @@ class FoodOrderController extends AbstractController
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return $this->render('food_order/orderitem.html.twig', [
|
return $this->render('food_order/orderitem.html.twig', [
|
||||||
'form' => $form,
|
'form' => $form,
|
||||||
'extras' => $extraRepository->getUniqueNames(),
|
'extras' => $extraRepository->getUniqueNames(),
|
||||||
|
|
33
src/Form/MenuItemExtraType.php
Normal file
33
src/Form/MenuItemExtraType.php
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Form;
|
||||||
|
|
||||||
|
use App\Entity\ItemExtra;
|
||||||
|
use App\Entity\MenuItem;
|
||||||
|
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
|
||||||
|
class MenuItemExtraType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||||
|
{
|
||||||
|
$builder
|
||||||
|
->add('name');
|
||||||
|
$builder->add('customextra', TextType::class, [
|
||||||
|
'label' => 'Add a new extra option',
|
||||||
|
'mapped' => false,
|
||||||
|
'required' => false,
|
||||||
|
'attr' => ['list' => 'item-extra-list'],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function configureOptions(OptionsResolver $resolver): void
|
||||||
|
{
|
||||||
|
$resolver->setDefaults([
|
||||||
|
'data_class' => ItemExtra::class,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
|
@ -32,11 +32,6 @@ class OrderItemType extends AbstractType
|
||||||
'expanded' => true,
|
'expanded' => true,
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
$builder->add('customextra', TextType::class, [
|
|
||||||
'label' => 'Not yet know extras, seperated by comma',
|
|
||||||
'mapped' => false,
|
|
||||||
'attr' => ['datalist' => 'item-extra-list'],
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[Override]
|
#[Override]
|
||||||
|
|
|
@ -5,11 +5,6 @@
|
||||||
<title>{% block title %}Welcome!{% endblock %}</title>
|
<title>{% block title %}Welcome!{% endblock %}</title>
|
||||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
|
||||||
<link rel="stylesheet" href="/css/water.css">
|
<link rel="stylesheet" href="/css/water.css">
|
||||||
{% block stylesheets %}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block javascripts %}
|
|
||||||
{% endblock %}
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
|
|
Loading…
Reference in a new issue