Per-project labels (Phase C): registry CRUD (managed in the project's
Modules panel) + assignment tagging through the V7 join table. Rides
the labels feature flag at the CALLER layer, like every context here.
Summary
Functions
Creates a label in a project.
Deletes a label (join rows cascade).
Label lists per assignment uuid for a displayed set (one query).
A project's labels, position-then-name ordered.
Replaces an assignment's labels with label_uuids — whitelisted to the
ASSIGNMENT'S OWN project's registry (a cross-project label uuid is
silently dropped, not an error: stale panel state must not block a save).
Functions
@spec create(map(), map(), keyword()) :: {:ok, PhoenixKitProjects.Schemas.Label.t()} | {:error, Ecto.Changeset.t()}
Creates a label in a project.
@spec delete( PhoenixKitProjects.Schemas.Label.t(), keyword() ) :: :ok | {:error, term()}
Deletes a label (join rows cascade).
@spec labels_for_assignments([binary()]) :: %{ required(binary()) => [PhoenixKitProjects.Schemas.Label.t()] }
Label lists per assignment uuid for a displayed set (one query).
@spec list_for_project(binary()) :: [PhoenixKitProjects.Schemas.Label.t()]
A project's labels, position-then-name ordered.
Replaces an assignment's labels with label_uuids — whitelisted to the
ASSIGNMENT'S OWN project's registry (a cross-project label uuid is
silently dropped, not an error: stale panel state must not block a save).