API Reference PhoenixKitStaff v#0.6.0

Copy Markdown View Source

Modules

Staff module for PhoenixKit.

Thin wrapper around PhoenixKit.Activity.log/1 so callers don't need to duplicate the Code.ensure_loaded?/1 guard and rescue clause everywhere. Safe to call from any LiveView — never crashes the caller.

Maps staff activity action strings (e.g. "staff.person_employment_added") to a {heroicon, human_label} pair for the person profile's Events tab. Domain labels go through PhoenixKitStaff.Gettext. Unknown actions fall back to a humanized form of the action string so a newly-added action still renders sensibly without a code change here.

Folder-scoped media attachments for a staff person, backed by core PhoenixKit.Modules.Storage (the same per-resource-folder convention phoenix_kit_catalogue/phoenix_kit_locations use — no module-owned table, no migration).

CRUD for departments.

Employment history for staff people (core V136) — the sole write path for PhoenixKitStaff.Schemas.Employment spans.

Atom → translated-string dispatcher for Staff context errors.

Gettext backend for staff-module-specific UI strings.

Tiny locale-aware date/time formatting helpers used by the staff UI.

Centralized path helpers for the Staff module.

Real-time updates for the staff module, backed by PhoenixKit.PubSub.Manager (the shared in-process PubSub server).

Top-level organizational unit containing teams.

One span in a staff person's employment history (core V136).

A person on staff. Always linked to a PhoenixKit user (decision A for MVP); the user_uuid FK is required.

Join between Person and Skill — a person's assignment of a skill, carrying zero or more of the skill's own proficiency levels.

A skill that can be assigned to staff people.

A team inside a department.

Join between Team and Person — represents a person's membership on a team.

Skills: CRUD for the Skill taxonomy plus person↔skill assignment (with proficiency level).

Context for staff (people) and team memberships.

Team membership management — the person ↔ team join.

Read-model / reporting over the staff org: the upcoming-birthdays widget and the full department → team → people org tree.

CRUD for teams.

daisyUI boxed tab switcher for staff detail pages.

Create or edit a department.

Show a department with its teams.

Cross-LV helpers shared by the staff admin LiveViews.

Staff org overview — departments, teams, and people.

List staff, with soft-delete (trash / restore / permanent delete) + bulk actions.

The Employment tab of a staff person's profile — a timeline of employment spans with add / edit / end / remove, persisted immediately via PhoenixKitStaff.Employments.

The Events tab of a staff person's profile — a read-only, paginated feed of the activity logged for this person (PhoenixKit.Activity entries scoped to resource_type: "staff_person" + the person's uuid). Staff already logs ~all person mutations (create/update/trash/restore, employment, skills, file/ image add+remove), so this is the person's audit timeline.

Create or edit a staff person.

The Files and Images tabs of a staff person's profile (one component, parameterized by :kind). Media is folder-scoped via core PhoenixKit.Modules.Storage (see PhoenixKitStaff.Attachments): the person's root staff-person-<uuid> folder for :files, the nested Images subfolder for :images.

Show a staff person's full profile and team memberships.

Create or edit a skill, including its level selectors.

Show a skill and manage which people have it, at which of the skill's own proficiency levels.

Create or edit a team.

Show a team and manage its memberships.

List teams across all departments.