Skip to content

Commit e6ecfb0

Browse files
committed
fix EventRequestResponseFormComponent
1 parent eb66b2b commit e6ecfb0

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

src/Twig/Component/EventReqestResponseFormComponent.php src/Twig/Component/EventRequestResponseFormComponent.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
use Symfony\UX\LiveComponent\Attribute\LiveProp;
1717
use Symfony\UX\LiveComponent\DefaultActionTrait;
1818

19-
#[AsLiveComponent('event_request_response_form')]
20-
class EventReqestResponseFormComponent extends AbstractController
19+
#[AsLiveComponent('EventRequestResponseFormComponent', template: 'components/event_request_response_form_component.html.twig')]
20+
class EventRequestResponseFormComponent extends AbstractController
2121
{
2222
use DefaultActionTrait;
2323

templates/components/event_request_response_form.html.twig templates/components/event_request_response_form_component.html.twig

+10-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,18 @@
1616
</div>
1717
</div>
1818
<div class="d-flex justify-content-between align-items-center">
19-
<a href="#" data-action="live#action" data-action-name="prevent|submit(isAttending=false)" class="me-5">
19+
<a href="#"
20+
data-action="live#action:prevent"
21+
data-live-action-param="submit"
22+
data-live-is-attending-param="true"
23+
class="me-5">
2024
<div class="bi bi-check-circle fs-1 text-primary"></div>
2125
</a>
22-
<a href="#" data-action="live#action" data-action-name="prevent|submit(isAttending=false)">
26+
<a href="#"
27+
data-action="live#action:prevent"
28+
data-live-action-param="submit"
29+
data-live-is-attending-param="false"
30+
>
2331
<div class="bi bi-x-circle fs-1 text-danger"></div>
2432
</a>
2533
</div>

templates/events/show.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@
402402
{% endif %}
403403
{% if app.user and event.isOrganiser(app.user) %}
404404
{% for request in event.eventRequests %}
405-
{{ component('event_request_response_form', {
405+
{{ component('EventRequestResponseFormComponent', {
406406
eventRequest: request
407407
}) }}
408408
{% else %}

0 commit comments

Comments
 (0)