Skip to content

Feat/asset badges#580

Open
Cedarich wants to merge 2 commits intoDistinctCodes:mainfrom
Cedarich:feat/asset-badges
Open

Feat/asset badges#580
Cedarich wants to merge 2 commits intoDistinctCodes:mainfrom
Cedarich:feat/asset-badges

Conversation

@Cedarich
Copy link
Contributor

@Cedarich Cedarich commented Feb 26, 2026

Closes #frontend

Title: feat: Add asset status and condition badge components

Description: This PR introduces two new UI components, StatusBadge and ConditionBadge , designed to visually communicate asset states in tables and detail pages.

Key Changes:

  • Enums: Defined AssetStatus (ACTIVE, ASSIGNED, MAINTENANCE, RETIRED) and AssetCondition (NEW, GOOD, FAIR, POOR) in frontend/types/asset.ts .
  • StatusBadge: Renders a colored pill based on asset status (Green/Blue/Yellow/Gray).
  • ConditionBadge: Renders a colored pill based on asset condition (Emerald/Green/Yellow/Red).
  • Styling: Components use Tailwind CSS for consistent pill shaping and subtle background tints.
  • Robustness: Both components include fallback handling for unknown enum values.
    Usage:
<StatusBadge status={AssetStatus.
ACTIVE} />
<ConditionBadge condition=
{AssetCondition.GOOD} />

Testing:

  • Verify that all enum values render with the correct colors.
  • Verify that passing an invalid value defaults to the gray style.

#451

@vercel
Copy link

vercel bot commented Feb 26, 2026

@Big-cedar is attempting to deploy a commit to the naijabuz's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link

drips-wave bot commented Feb 26, 2026

Hey @Cedarich! 👋 It looks like this PR isn't linked to any issue.

If this PR is for one of the issues assigned to you as part of a Wave, please link it to ensure your contribution is tracked properly. You can do this by adding a keyword to the PR description (e.g., Closes #123), or by clicking a button below:

Issue Title
#545 Implement unified SearchModule using PostgreSQL tsvector GIN indexes with a plug-in entity registration pattern Link to this issue

ℹ️ Learn more about linking PRs to issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants