Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT: Knowledge Center > Facility-Specific Visibility Controls for Libraries (Dept. Admin Controls) #717

Open
6 tasks
chrissantillan opened this issue Jan 31, 2025 · 2 comments
Labels
feature - addition New feature or request for a new feature

Comments

@chrissantillan
Copy link
Collaborator

chrissantillan commented Jan 31, 2025

User Story

As a Department Admin, I want to control the visibility of Knowledge Center Libraries at a facility level, so that I can manage content access across multiple facilities.

Description

Currently, Libraries are either Visible or Hidden department-wide. There is no facility-specific visibility control, meaning:

  • When an admin marks a resource as Visible, it becomes available to all facilities.
  • When an admin hides a resource, it disappears for all facilities.

This issue introduces facility-level visibility controls so that Department Admins can:

  • Select specific facilities where a Library should be visible.
  • Apply visibility changes department-wide with a “Select All” option.
  • Override facility-specific settings when needed.

Tasks

Backend Updates

  • Modify the database schema to support facility-specific visibility settings.
  • Update API endpoints to:
    • Accept facility-specific visibility changes.
    • Store which facilities a LIbrary is visible in.
    • Ensure department-wide changes apply to all facilities.

Department Admin UI Updates

Since libraries cannot be individually edited, the visibility selection must happen directly on the library card.

  • Replace the current "Visible/Hidden" toggle with:
    • A dropdown button labeled “Visibility” at the bottom of each Library card.
    • Clicking the button opens a modal with checkboxes for each facility.
    • A "Select All" option to make content visible across all facilities.
    • A visibility summary (e.g., “Visible in 3 Facilities,” "Visible in All Facilities") displayed on the card. Add tooltip when admin hovers on summary to show which facilities are visible.
  • Ensure selections dynamically update the UI and API.

Resident View Updates

  • Modify Resident queries to ensure only content marked "Visible" for their facility is displayed.
  • Ensure “Hidden” content is invisible to residents, regardless of facility.

User Flow

For Department Admins

  1. Logs into UnlockEd → Goes to the Knowledge Center.
  2. Scrolls through the list of libraries.
  3. Clicks the “Visibility” dropdown on a Library card.
  4. A modal appears listing all facilities with checkboxes + a “Select All” option.
  5. Selects Facility A and Facility B → Library is now only visible at those facilities.
  6. Saves changes → Visibility settings update immediately.

Acceptance Criteria

  • Department Admins can set visibility for all facilities or specific ones.
  • Residents only see content marked "Visible" for their facility.
  • API correctly stores facility-specific visibility settings.
  • UI dynamically updates based on facility selection.

Outstanding Questions

  • If a Library is “Visible to All Facilities,” should Facility Admins be able to hide it for their facility?
@chrissantillan chrissantillan added the feature - addition New feature or request for a new feature label Jan 31, 2025
@jtucholski
Copy link
Contributor

@chrissantillan

From a functional perspective I think that Department-level settings should take precedence.

From a technical standpoint it's easier to implement it without a precedence and the last person who sets it controls the visibility, regardless of their role.

@chrissantillan
Copy link
Collaborator Author

chrissantillan commented Feb 2, 2025

@jtucholski my initial thought was that Department-admin decisions about visibility shouldn't be overridden by Facility-level admins, so yes, the Dept.-level settings should take precedence. This should also address the comment in #718

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature - addition New feature or request for a new feature
Projects
None yet
Development

No branches or pull requests

2 participants