Skip to content

Staff 0.6.0: Employment history, person files and photos, and an events feed

Staff 0.6.0 fills out a person’s profile in the PhoenixKit staff directory: a full employment history, files and images with a profile photo, a feed of what happened to the record, and skills that can carry several named level selectors.

Employment history

A person page gets an Employment tab with an Employment history timeline. Each entry records the employment type, a translatable job title, department and team, start and end dates, work location and notes. You can add, edit, end or remove an entry; End now closes the current role today. A person has at most one open entry, and it is shown as Current.

The person form gets simpler in return: the employment fields, department and job title move to the Employment tab, and the form keeps the status and team.

Files, images and a profile photo

New Files and Images tabs keep a person’s documents and pictures in a storage folder of their own. Images keep only images and Files only other types. Removing a file that belongs to this person alone moves it to the trash; a file shared elsewhere is only unlinked.

From the Images tab, Set as profile photo makes an image the person’s avatar, a round photo in the page header. Without one, the header shows initials. A person in the trash cannot get new media until restored.

Events

An Events tab lists the activity recorded for this person, page by page, with an Open in Activity log link to the full log.

Skills with level selectors

A skill’s levels become a list of Level selectors. Each has its own translatable name, a switch between a single choice and multiple, and its own ordered options. A driving licence skill can carry a licence category and a proficiency ladder side by side. The skill form lets you add, rename and drag selectors and levels into order. Existing skills keep working: their old flat list is read as one selector until the skill is saved again.

Fixes

Translations entered in the forms show again on the department, team and person pages, which 0.5.0 had stopped doing, and skill names and descriptions on the skills pages now follow the viewer’s language too.

Upgrading

Staff 0.6 needs PhoenixKit core 1.7.159 or later, for the employment table (core migration V136), the activity filter behind the Events tab and the media picker. Run your core migrations. The skill change needs no migration.

Full release notes: Staff 0.6.0

0.6.0 · 18 June 2026

Post-0.5.0 person-profile features — a full employment history, person media (Files / Images tabs + avatars), a read-only Events activity feed, and a reshape of skill proficiency into multiple named, translatable level selectors — plus a multilang-display restoration and soft-delete / async hardening. Merged as PR #12, with a follow-up skills-localization fix.

Requires phoenix_kit ~> 1.7 and >= 1.7.159 (raised from >= 1.7.132) for the phoenix_kit_staff_employments table (V136), the Activity.list/1 resource_uuid filter (Events tab scoping), and the MediaSelectorModal browse / filter-aware accept (Files / Images tabs). The hard dep on phoenix_kit_comments ~> 0.2 (person Comments tab) is unchanged.

Added

  • Employment history (V136). A per-person timeline of employment spans (PhoenixKitStaff.Schemas.Employment, phoenix_kit_staff_employments), surfaced as a dedicated Employment tab with add / edit / end / remove. Each span records employment_type, a translatable job_title, the org placement (primary_department_uuid + a primary_team_uuid snapshot), the date range (employment_end_date nil = the open/current span), work_location, and notes. A partial unique index enforces one open span per person; PhoenixKitStaff.Employments is the sole write path and denormalizes the current span onto Person via sync_current/1. New actions staff.person_employment_added/updated/ended/removed.
  • Files & Images tabs. Folder-scoped person media via core PhoenixKit.Modules.Storage (no module table): a per-person staff-person-<uuid> root folder with a nested Images subfolder. PhoenixKitStaff.Attachments + Web.PersonMediaComponent; per-tab type enforcement (Images keep only images, Files only non-images), non-destructive removal (soft-trash a sole owner, unlink a shared file). New actions staff.person_file_added/removed, staff.person_image_added/removed.
  • Avatars. A circular profile photo in the show header (initials fallback), backed by an image pointer in Person.metadata["avatar_uuid"], settable from the Images tab; new actions staff.person_avatar_set/removed.
  • Events tab. A read-only, paginated PhoenixKit.Activity feed scoped to the person (Web.PersonEventsComponent + ActivityLabels), with an “Open in Activity log” deep link.

Changed

  • Skill levels → multiple named selectors. A skill’s levels reshapes from a single flat option list (+ a skill-wide allow_multiple_levels flag) into an ordered list of named selectors, each with its own translatable name, single-vs-multiple toggle, and ordered translatable options (e.g. a “Driving licence” skill can carry “Licence category” B/C/D alongside a “Proficiency” ladder). JSONB-only — no migration; Skill.level_groups/1 read-wraps any legacy flat list into one default selector, so existing rows and assignments keep working until re-saved. The skill form gains a staged selector editor with per-language name inputs, per-selector single/multiple toggles, and drag-and-drop reordering.
  • Person edit form simplified. The employment fields, department picker, and job_title move to the Employment tab (the open span drives the denormalized Person mirror); only status + the single team-membership picker remain on the form.

Fixed

  • Multilang display restored and completed. The 0.5.0 reshape had silently dropped the localized_*/2 read path (per-language overrides went write-only); restored L10n.current_content_lang/0 and re-wired the department / team / person read LVs + the employment component. Extended the same wiring to the Skills list and Skill show pages, which still rendered the primary Skill.name / description even though both are translatable — so skill names now localize consistently with the person profile.
  • Soft-delete create-path guards. Employments.create/2, Attachments.set_avatar/2, and the media-attach path now refuse a trashed person, mirroring the existing skills / team-membership guards (update / remove paths stay open for cleanup).

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