Skip to content

Commit

Permalink
fix EventRequestResponseFormComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerrialn committed Jun 9, 2024
1 parent eb66b2b commit e6ecfb0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
use Symfony\UX\LiveComponent\Attribute\LiveProp;
use Symfony\UX\LiveComponent\DefaultActionTrait;

#[AsLiveComponent('event_request_response_form')]
class EventReqestResponseFormComponent extends AbstractController
#[AsLiveComponent('EventRequestResponseFormComponent', template: 'components/event_request_response_form_component.html.twig')]
class EventRequestResponseFormComponent extends AbstractController
{
use DefaultActionTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,18 @@
</div>
</div>
<div class="d-flex justify-content-between align-items-center">
<a href="#" data-action="live#action" data-action-name="prevent|submit(isAttending=false)" class="me-5">
<a href="#"
data-action="live#action:prevent"
data-live-action-param="submit"
data-live-is-attending-param="true"
class="me-5">
<div class="bi bi-check-circle fs-1 text-primary"></div>
</a>
<a href="#" data-action="live#action" data-action-name="prevent|submit(isAttending=false)">
<a href="#"
data-action="live#action:prevent"
data-live-action-param="submit"
data-live-is-attending-param="false"
>
<div class="bi bi-x-circle fs-1 text-danger"></div>
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/events/show.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@
{% endif %}
{% if app.user and event.isOrganiser(app.user) %}
{% for request in event.eventRequests %}
{{ component('event_request_response_form', {
{{ component('EventRequestResponseFormComponent', {
eventRequest: request
}) }}
{% else %}
Expand Down

0 comments on commit e6ecfb0

Please sign in to comment.