Compare commits
No commits in common. "67a6c7d8dcb5f9dc8f080e7c44badffa7be523e0" and "8ad0280b8644a66065994ba94a0795ea54836550" have entirely different histories.
67a6c7d8dc
...
8ad0280b86
7 changed files with 15 additions and 46 deletions
|
|
@ -1,14 +0,0 @@
|
|||
import { Controller } from '@hotwired/stimulus';
|
||||
import L from 'leaflet';
|
||||
import 'leaflet/dist/leaflet.min.css';
|
||||
|
||||
export default class extends Controller {
|
||||
connect() {
|
||||
const map = L.map(this.element).setView([51.0543, 3.7174], 13);
|
||||
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© OpenStreetMap contributors',
|
||||
maxZoom: 19,
|
||||
}).addTo(map);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
body {
|
||||
background-color: skyblue;
|
||||
}
|
||||
|
||||
html, body { height: 100%; margin: 0; }
|
||||
.map-container { height: 100vh; width: 100%; }
|
||||
|
|
|
|||
|
|
@ -27,6 +27,4 @@ return [
|
|||
'@hotwired/stimulus' => ['version' => '3.2.2'],
|
||||
'@symfony/stimulus-bundle' => ['path' => './vendor/symfony/stimulus-bundle/assets/dist/loader.js'],
|
||||
'@hotwired/turbo' => ['version' => '8.0.23'],
|
||||
'leaflet' => ['version' => '1.9.4'],
|
||||
'leaflet/dist/leaflet.min.css' => ['version' => '1.9.4', 'type' => 'css'],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
|
||||
class IndexController extends AbstractController
|
||||
{
|
||||
#[Route('/')]
|
||||
public function index(): Response
|
||||
{
|
||||
return $this->render('index/page.html.twig');
|
||||
}
|
||||
}
|
||||
|
|
@ -36,8 +36,6 @@ final class RestaurantFactory extends PersistentObjectFactory
|
|||
{
|
||||
return [
|
||||
'name' => self::faker()->company(),
|
||||
'latitude' => self::faker()->latitude(),
|
||||
'longitude' => self::faker()->longitude(),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,16 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<html>
|
||||
<head>
|
||||
<title>Test</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Rater</h1>
|
||||
<div {{ stimulus_controller('map') }} class="map-container"></div>
|
||||
{% endblock %}
|
||||
{{ form(form) }}
|
||||
|
||||
<h2>Existing</h2>
|
||||
<ul>
|
||||
{% for subject in subjects %}
|
||||
<li>{{ subject.name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -33,10 +33,6 @@ class SubjectControllerTest extends WebTestCase
|
|||
$data = json_decode($client->getResponse()->getContent(), true);
|
||||
$this->assertResponseIsSuccessful();
|
||||
$this->assertCount(5, $data['payload']['subjects']);
|
||||
|
||||
$subject = $data['payload']['subjects'][0];
|
||||
$this->assertNotNull($subject['latitude']);
|
||||
$this->assertNotNull($subject['longitude']);
|
||||
}
|
||||
|
||||
public function testCreate(): void
|
||||
|
|
|
|||
Loading…
Reference in a new issue