VoileWeb.Dashboard.Catalog.CollectionLive.FormCollectionHelper (Voile v0.1.27)

Copy Markdown View Source

Summary

Functions

add_item_to_form(socket)

add_property_to_form(prop_id, socket)

assign_selected_creator(id, socket)

clear_selected_creator(socket)

confirm_field_deletion(id, socket)

confirm_item_deletion(id, socket)

create_or_select_creator(creator_name, socket)

delete_existing_field(id, socket)

delete_existing_item(id, socket)

delete_unsaved_field_at(index_str, socket)

delete_unsaved_item_at(index_str, socket)

ensure_unique_collection_uuid(collection_params, atom)

Ensures the collection has a unique UUID that won't cause barcode collisions.

For new collections, this checks if the current UUID's barcode prefix (last 12 chars) collides with any existing collection. If so, it generates a new unique UUID.

For existing collections (edit mode), this returns the params unchanged since the collection ID should not be changed.

Parameters

  • collection_params: The collection parameters map containing "id" key
  • action: :new or :edit

Returns

  • - Params with unique UUID
  • - If unable to find unique UUID

handle_add_thumbnail_from_url(url, socket)

handle_delete_thumbnail(map, socket)

handle_thumbnail_progress(atom, entry, socket)

save_collection(socket, atom, collection_params)

save_collection_as_draft(socket, atom, collection_params)

search_properties(query, socket)