Expand usage of structured_modal/1

This commit is contained in:
Claudio Ortolina
2025-08-27 09:11:11 +03:00
parent e6955568e3
commit cd9176e397
8 changed files with 22 additions and 54 deletions
@@ -75,12 +75,9 @@
/>
</.structured_modal>
<.modal
<.structured_modal
:if={@live_action == :import}
id="record-modal"
class="md:min-w-2xl max-w-sm md:max-w-3xl mt-8"
placement="top"
open
on_close={JS.patch(back_path(@record_list_params))}
>
<.live_component
@@ -93,14 +90,11 @@
initial_query=""
icon_name="hero-plus"
/>
</.modal>
</.structured_modal>
<.modal
<.structured_modal
:if={@live_action == :barcode_scan}
id="barcode-scanner-modal"
class="md:min-w-2xl max-w-sm md:max-w-3xl mt-8"
placement="top"
open
on_close={JS.patch(back_path(@record_list_params))}
>
<.live_component
@@ -110,6 +104,6 @@
action={@live_action}
patch={back_path(@record_list_params)}
/>
</.modal>
</.structured_modal>
<.pagination id={:bottom_pagination} pagination_params={@record_list_params} />
@@ -321,12 +321,9 @@
record={@record}
/>
<.modal
<.structured_modal
:if={@live_action == :edit}
id="record-modal"
class="md:min-w-2xl max-w-sm md:max-w-3xl mt-8"
placement="top"
open
on_close={JS.patch(~p"/collection/#{@record}")}
>
<.live_component
@@ -337,4 +334,4 @@
record={@record}
patch={~p"/collection/#{@record}"}
/>
</.modal>
</.structured_modal>