Skip to content

Staff 0.5.0: A skills catalogue, a trash for people and person comments

Staff 0.5.0 gives the PhoenixKit staff directory a real skills catalogue with levels, a trash so people can be removed and restored, comments on each person, and Estonian and Russian translations of the module.

A skills catalogue

Skills used to be a free-text field on each person. They are now records of their own under a new Skills tab, each with a translatable name and description and, optionally, its own Proficiency levels. With Allow selecting multiple levels on, a person can hold several levels at once, such as licence categories.

You can assign a skill from either side. On a skill’s page, Add staff picks people and the level chips save as you click them. On the person form, Add a skill searches the catalogue and the choices are saved with the form. The core migration that comes with it moves the old free-text skills over and drops that field.

A trash for people

Move to trash takes a person off the active roster without deleting anything; their user account stays. The people list gets a Trashed filter, bulk selection and a menu on each row, and a trashed person’s page shows a banner with Restore and Delete permanently. Only a trashed person can be deleted for good. Row actions on the departments, teams, people and overview pages now sit in the same per-row menu, and empty lists use core’s empty-state block.

Comments on a person

A person’s page gets a Comments tab, provided by the Comments module.

Translations

The module now has its own translation catalogue, with Estonian and Russian included and shipped in the package. Strings core already translates stay with core.

Upgrading

Staff 0.5 needs PhoenixKit core 1.7.132 or later and now also depends on phoenix_kit_comments ~> 0.2, which your app installs with it. Run core’s migrations: V131 adds the field that stores a trashed person’s previous status, and V135 creates the skills tables and migrates the old free-text skills. The people list search now waits briefly while you type before it searches.

Full release notes: Staff 0.5.0

0.5.0 · 15 June 2026

Structured skills taxonomy with per-skill dynamic proficiency levels, soft-delete for people, a Comments tab on the person profile, and an admin-UI quality sweep (kebab row menus + core empty-states). Merged as PR #10.

Requires phoenix_kit ~> 1.7 and >= 1.7.132 for the metadata JSONB column (V131, soft-delete stash) and the phoenix_kit_staff_skills / phoenix_kit_staff_person_skills tables (V135). Adds a hard dep on phoenix_kit_comments ~> 0.2 for the person Comments tab.

Added

  • Structured skills. A first-class, translatable Skill taxonomy (phoenix_kit_staff_skills, globally unique lower(name)) replacing the old free-text Person.skills (V135 migrates + drops it). Each skill defines its own proficiency levels — a levels JSONB array of translatable %{"id", "name", "translations"} maps with stable ids plus an allow_multiple_levels boolean. New context PhoenixKitStaff.Skills (skill CRUD + person↔skill assignment), new schemas Skill + PersonSkill (join carrying a proficiency_levels array of selected level ids), and thin Staff delegators.
  • Skills admin subtab with SkillsLive / SkillFormLive / SkillShowLive. Assignment works from two directions: the skill show (skill → people, event-driven level toggle chips persisted immediately) and the person edit form (person → skills, staged multi-select reconciled to the DB on save).
  • Soft-delete (people). trash_person / restore_person (sentinel status = "trashed", prior status stashed in metadata["trashed_from_status"]), permanent delete_person (Trash view only), and set-based bulk_trash / bulk_restore / bulk_delete. list_people/1 excludes trashed by default; count_trashed/0 is separate. PeopleLive gains a “Trashed (N)” filter, core bulk-select, and a per-row kebab; PersonShowLive shows a trashed banner with Restore / Delete-permanently.
  • Comments tab on PersonShowLive via the phoenix_kit_comments embed (use PhoenixKitComments.Embed for Leaf-event forwarding).
  • New activity actions: staff.person_trashed/restored, staff.people_bulk_trashed/restored/deleted, staff.skill_created/updated/deleted, staff.person_skill_added/removed/updated.

Changed

  • Admin-UI sweep. Row actions across Departments / Teams / People / team-show / overview moved to the core <.table_row_menu> kebab; the seven hand-rolled empty-state blocks now use the core <.empty_state> component. staff.person_deleted now means the permanent delete.
  • Staff context split: team-membership and org-tree logic extracted to PhoenixKitStaff.Staff.Memberships and PhoenixKitStaff.Staff.Org.
  • mix.exs: phoenix_kit constraint widened to ~> 1.7 and >= 1.7.132; added phoenix_kit_comments ~> 0.2; deps now resolve through the pk_dep/3 <APP>_PATH cross-repo override helper.
  • People-list search input is now debounced (phx-debounce="300"), and the soft-delete handlers no longer reload the list twice per action (the PubSub broadcast already drives a single reload).
  • Refreshed the dependency lock: phoenix_kit 1.7.146, phoenix_live_view 1.2.1, phoenix_kit_comments 0.2.8 (plus transitives — phoenix 1.8.8, bandit 1.12, req 0.6.1, tesla 1.20, tessera 0.3.1, credo 1.7.19). mix.exs re-adds priv to the package files: list (ships the priv/gettext catalogs) and re-wires .dialyzer_ignore.exs via ignore_warnings:.

Staff 0.5.0. Install or update: {:phoenix_kit_staff, "~> 0.5"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.