update deps
Some checks failed
continuous-integration/drone/tag Build is failing
continuous-integration/drone/push Build is failing

This commit is contained in:
2025-04-05 00:13:01 +00:00
parent 449a92e4b7
commit 37d101a71e
130 changed files with 1748 additions and 12180 deletions

View File

@ -1,6 +1,6 @@
<div>
<h2 class="mb-8 text-center title text-xl text-primary-600">
<%= @title %>
{@title}
</h2>
<.form
@ -16,11 +16,11 @@
:if={@changeset.action && not @changeset.valid?}
class="invalid-feedback col-span-3 text-center"
>
<%= changeset_errors(@changeset) %>
{changeset_errors(@changeset)}
</div>
<%= label(f, :class, gettext("Class"), class: "title text-lg text-primary-600") %>
<%= select(
{label(f, :class, gettext("Class"), class: "title text-lg text-primary-600")}
{select(
f,
:class,
[
@ -31,86 +31,86 @@
],
class: "text-center col-span-2 input input-primary",
value: @class
) %>
<%= error_tag(f, :class, "col-span-3 text-center") %>
)}
{error_tag(f, :class, "col-span-3 text-center")}
<%= label(f, :type_id, gettext("Type"), class: "title text-lg text-primary-600") %>
<%= select(f, :type_id, type_options(@types, @class),
{label(f, :type_id, gettext("Type"), class: "title text-lg text-primary-600")}
{select(f, :type_id, type_options(@types, @class),
class: "text-center col-span-2 input input-primary",
id: "pack-form-type-select",
phx_hook: "SlimSelect"
) %>
<%= error_tag(f, :type_id, "col-span-3 text-center") %>
)}
{error_tag(f, :type_id, "col-span-3 text-center")}
<%= label(f, :count, gettext("Count"), class: "title text-lg text-primary-600") %>
<%= number_input(f, :count,
{label(f, :count, gettext("Count"), class: "title text-lg text-primary-600")}
{number_input(f, :count,
class: "text-center col-span-2 input input-primary",
min: 0
) %>
<%= error_tag(f, :count, "col-span-3 text-center") %>
)}
{error_tag(f, :count, "col-span-3 text-center")}
<%= label(f, :price_paid, gettext("Price paid"), class: "title text-lg text-primary-600") %>
<%= number_input(f, :price_paid,
{label(f, :price_paid, gettext("Price paid"), class: "title text-lg text-primary-600")}
{number_input(f, :price_paid,
step: 0.01,
class: "text-center col-span-2 input input-primary"
) %>
<%= error_tag(f, :price_paid, "col-span-3 text-center") %>
)}
{error_tag(f, :price_paid, "col-span-3 text-center")}
<%= label(f, :lot_number, gettext("Lot number"), class: "title text-lg text-primary-600") %>
<%= text_input(f, :lot_number,
{label(f, :lot_number, gettext("Lot number"), class: "title text-lg text-primary-600")}
{text_input(f, :lot_number,
class: "text-center col-span-2 input input-primary",
maxlength: 255,
phx_debounce: 300
) %>
<%= error_tag(f, :price_paid, "col-span-3 text-center") %>
)}
{error_tag(f, :price_paid, "col-span-3 text-center")}
<%= label(f, :purchased_on, gettext("Purchased on"), class: "title text-lg text-primary-600") %>
<%= date_input(f, :purchased_on,
{label(f, :purchased_on, gettext("Purchased on"), class: "title text-lg text-primary-600")}
{date_input(f, :purchased_on,
class: "input input-primary col-span-2",
phx_update: "ignore",
value: @changeset |> Changeset.get_field(:purchased_on) || Date.utc_today()
) %>
<%= error_tag(f, :purchased_on, "col-span-3 text-center") %>
)}
{error_tag(f, :purchased_on, "col-span-3 text-center")}
<%= label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600") %>
<%= textarea(f, :notes,
{label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600")}
{textarea(f, :notes,
class: "text-center col-span-2 input input-primary",
id: "pack-form-notes",
phx_debounce: 300,
phx_update: "ignore"
) %>
<%= error_tag(f, :notes, "col-span-3 text-center") %>
)}
{error_tag(f, :notes, "col-span-3 text-center")}
<%= label(f, :container, gettext("Container"), class: "title text-lg text-primary-600") %>
<%= select(f, :container_id, container_options(@containers),
{label(f, :container, gettext("Container"), class: "title text-lg text-primary-600")}
{select(f, :container_id, container_options(@containers),
class: "text-center col-span-2 input input-primary",
id: "pack-form-container-select",
phx_hook: "SlimSelect"
) %>
<%= error_tag(f, :container_id, "col-span-3 text-center") %>
)}
{error_tag(f, :container_id, "col-span-3 text-center")}
<%= case @action do %>
<% action when action in [:new, :clone] -> %>
<hr class="hr col-span-3" />
<%= label(f, :multiplier, gettext("Copies"), class: "title text-lg text-primary-600") %>
<%= number_input(f, :multiplier,
{label(f, :multiplier, gettext("Copies"), class: "title text-lg text-primary-600")}
{number_input(f, :multiplier,
class: "text-center input input-primary",
value: 1,
phx_update: "ignore"
) %>
)}
<%= submit(dgettext("actions", "Create"),
{submit(dgettext("actions", "Create"),
phx_disable_with: dgettext("prompts", "Creating..."),
class: "mx-auto btn btn-primary"
) %>
)}
<%= error_tag(f, :multiplier, "col-span-3 text-center") %>
{error_tag(f, :multiplier, "col-span-3 text-center")}
<% :edit -> %>
<%= submit(dgettext("actions", "Save"),
{submit(dgettext("actions", "Save"),
phx_disable_with: dgettext("prompts", "Saving..."),
class: "mx-auto col-span-3 btn btn-primary"
) %>
)}
<% end %>
</.form>
</div>