Widget Categories Management

The Widget Categories management page allows you to create, edit, and organize categories for the widget system. Categories provide visual grouping and styling for widgets throughout the application, with customizable colors, icons, and display properties. This interface manages the Global.Widget_Categories table and requires administrator access.

Quick Start

Click Add to create a new widget category. Enter a unique category name (no spaces), display label, colors, and optional Bootstrap icon. Use the drag handles to reorder categories, then click Save POS Order to save positions. Categories can be deactivated instead of deleted to preserve data integrity.


Toolbar Functions

Button Function
Add Opens the Add Widget Category modal to create a new category
Back Returns to the previous page in browser history
Close Closes the page and returns to Control Panel
ð??? Refreshes the page to reload current data
Search Box Sticky search that filters by category name or display label. Press Enter or click search icon to filter
Show All Clears all search filters and shows all active categories
Show Inactive Switches view to show deactivated categories
Resequence Renumbers position values by the specified increment (default 100)
Save POS Order Saves all position changes made through drag-and-drop or manual editing
Deactivate Selected Soft-deletes checked categories (appears when viewing active categories)
Reactivate Selected Restores checked categories (appears when viewing inactive categories)
Permanently Delete Hard-deletes checked inactive categories (cannot be undone)

Data Table Columns

Column Description
Checkbox Select categories for bulk operations. Header checkbox selects/deselects all visible rows
Drag Handle Grip icon for drag-and-drop reordering. Click and hold to drag rows to new positions
Category Name Internal identifier used in database relationships. Must be unique, no spaces recommended
Display Label User-friendly name shown in the interface
Color Background color swatch showing the category's primary color
Text Text color swatch for category labels and badges
Icon Bootstrap icon class and preview. Shows the icon used in category displays
Widgets Count badge showing how many active widgets use this category
POS Position value for ordering. Lower numbers appear first. Can be edited inline
Actions Edit and Delete buttons for individual category management
Status PLHA status flags (Private, Locked, Hidden, Active) - clickable to toggle
ID Unique database identifier for the category record

Creating Widget Categories

To add a new widget category:

  1. Click the Add button in the toolbar to open the Add Widget Category modal
  2. Enter Category Name: Internal identifier (no spaces, alphanumeric recommended)
  3. Enter Display Label: User-friendly name shown in the interface
  4. Select Colors: Use color pickers or enter hex values for background and text colors
  5. Choose Icon: Enter Bootstrap icon class (e.g., "bi-tag", "bi-star") - preview updates automatically
  6. Set Position: Numeric value determining sort order (default 500)
  7. Click Add to create the category

Category Naming Tips

Use descriptive, unique category names without spaces. Good examples: "ProductManagement", "UserInterface", "DataAnalysis". The display label can contain spaces and special characters for user presentation.


Editing Categories

Widget categories can be edited through several methods:

Full Edit Modal

  1. Click Edit in the Actions column for any category
  2. Modify fields as needed in the edit modal
  3. Preview updates automatically as you change colors and icons
  4. Click Save to apply changes

Inline Position Editing

  1. Edit POS values directly in the Position column
  2. Use drag handles to reorder rows visually
  3. Click Save POS Order to commit position changes
  4. Use Resequence to renumber positions by increments

Status Flag Toggling

Click individual PLHA letters in the Status column to toggle:

  • P (Private): Restricts category visibility
  • L (Locked): Prevents modifications
  • H (Hidden): Hides from normal displays
  • A (Active): Enables/disables the category

Category Organization

Position Management

Categories are ordered by their POS (position) values:

  • Lower numbers appear first in category lists
  • Default increment is 100 to allow easy insertion of new categories
  • Drag and drop automatically updates positions
  • Resequence function renumbers all visible categories by the specified increment

Drag and Drop Reordering

  1. Click and hold the grip icon (��) in any row
  2. Drag the row to its new position
  3. Release to drop the row in place
  4. Positions update automatically based on new order
  5. Click Save POS Order to persist changes

Category Deletion Workflow

The system uses a three-tier deletion approach to protect data integrity:

Soft Delete (Deactivation)

  1. Select categories using checkboxes
  2. Click Deactivate Selected in the toolbar
  3. Categories become inactive but remain in database
  4. Associated widgets retain their category assignments
  5. Switch to "Show Inactive" to manage deactivated categories

Reactivation

  1. Switch to inactive view using "Show Inactive" button
  2. Select deactivated categories to restore
  3. Click Reactivate Selected to restore them
  4. Categories return to active status immediately

Permanent Deletion

  1. Categories must be inactive before permanent deletion
  2. Select inactive categories in the inactive view
  3. Click Permanently Delete (cannot be undone)
  4. Records are removed from the database completely

Deletion Warning

Permanent deletion cannot be undone. Categories with associated widgets should be deactivated rather than permanently deleted to maintain data relationships and system integrity.


Search and Filtering

The search function provides persistent filtering:

  • Search persists across page reloads and navigation
  • Filters by category name and display label
  • Case-insensitive partial matching supported
  • Clear search using the X button or "Show All"

Active/Inactive Filtering

  • Default view shows active categories only
  • "Show Inactive" reveals deactivated categories
  • "Back to Active" returns to normal view
  • Badge indicates current filter mode

DataTable Features

  • Sortable columns for easy organization
  • Pagination controls for large datasets
  • Page size options: 25, 50, 100, or All
  • State saving remembers your preferences

Permissions and Access

Widget Category management has strict access controls:

  • Administrator access only - restricted to Client.ID = 1
  • Valid session required - must be logged in
  • Global database access - modifies system-wide settings
  • No delegation possible - cannot be granted to other users

Color and Styling System

Color Selection

Categories support comprehensive color customization:

  • Background Color: Primary color for category badges and displays
  • Text Color: Contrasting color for readable text
  • Color Picker Integration: Visual color selection tools
  • Hex Value Support: Direct entry of color codes
  • Named Color Support: CSS color names like "white", "black"

Icon System

Bootstrap Icons provide visual category identification:

  • Bootstrap Icons library fully supported
  • Live preview in add/edit modals
  • Common examples: bi-tag, bi-star, bi-gear, bi-folder
  • Optional field - categories work without icons

Widget Relationships

Categories are linked to widgets through the widget system:

  • Widget Count column shows active widgets per category
  • Categories with widgets should be deactivated rather than deleted
  • Category changes affect all associated widgets immediately
  • Color and icon updates propagate to widget displays

Impact Consideration

Changes to category colors, icons, or labels immediately affect all widgets using that category. Test changes in development environments when possible, especially for categories with many associated widgets.


Summary

The Widget Categories management interface provides comprehensive tools for organizing and styling the widget system. Use the Add button to create new categories with custom colors and icons. Organize categories using drag-and-drop reordering or manual position editing. The three-tier deletion system (deactivate, reactivate, permanent delete) protects data integrity while allowing flexible category management. Search and filtering tools help manage large category sets, while the PLHA status system provides granular control over category visibility and behavior. Remember that category changes immediately affect all associated widgets throughout the system.