index_live.html.leex 756 B

1234567891011121314151617181920212223242526
  1. <button phx-click="trigger_all">Trigger all</button>
  2. <button phx-click="toggle_form">Display/hide form</button>
  3. <%= if @display_cs do %>
  4. <%= f = form_for @location_cs, "#", [phx_submit: :add_location] %>
  5. <%= label f, :name %>
  6. <%= text_input f, :name %>
  7. <%= error_tag f, :name %>
  8. <%= label f, :booking_page %>
  9. <%= text_input f, :booking_page %>
  10. <%= error_tag f, :booking_page %>
  11. <%= label f, :raw_query %>
  12. <%= text_input f, :raw_query %>
  13. <%= error_tag f, :raw_query %>
  14. <%= submit "send" %>
  15. </form>
  16. <% end %>
  17. <ul class="locations-list">
  18. <%= for l <- assigns |> locations_by_availability do %>
  19. <li><%= live_component @socket, VaccinsWeb.LocationComponent, id: l.id, location: l %></li>
  20. <% end %>
  21. </ul>