VoileWeb.Dashboard.Catalog.CollectionLive.FormCollectionHelper
(Voile v0.1.27)
Copy Markdown
View Source
Summary
Functions
Ensures the collection has a unique UUID that won't cause barcode collisions.
Functions
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