Skip to content

feat: roles admin, custom fields, developers settings, my assets, QR scan - #1362

Merged
yusuftomilola merged 1 commit into
DistinctCodes:mainfrom
brightMedina5050:feature/roles-customfields-developers-myassets-qr
Aug 26, 2026
Merged

feat: roles admin, custom fields, developers settings, my assets, QR scan#1362
yusuftomilola merged 1 commit into
DistinctCodes:mainfrom
brightMedina5050:feature/roles-customfields-developers-myassets-qr

Conversation

@brightMedina5050

@brightMedina5050 brightMedina5050 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR implements five features: roles admin UI, custom fields builder, developer settings, employee self-service portal, and QR scan landing page.

Changes

[FE-10] Roles & Permissions Admin UI

  • Extended users page (/users) with activate/deactivate toggle per user
  • Invite-user modal with email, name, and role selection
  • Static role capabilities reference panel (Admin/Manager/Staff permissions)
  • New API methods: toggleActive, inviteUser

[FE-11] Custom Fields Builder

  • New /settings/custom-fields page with per-category field definitions
  • Field types: text, number, date, select (with options), boolean
  • Required flag, activate/deactivate (soft-delete), and hard delete
  • Category sidebar for switching between asset categories

[FE-12] Developer Settings

  • New /settings/developers page with API keys and webhooks panels
  • API keys: create with name and scopes, show secret once with copy, revoke
  • Webhooks: CRUD, signing secret display, test delivery button, delivery history
  • Admin-only section

[FE-13] My Assets Employee Self-Service Portal

  • New /my-assets page (default for STAFF role)
  • Assigned assets list with photo, name, asset ID, condition, status
  • Quick actions: Report Issue (creates maintenance request), Request Transfer
  • My Requests tab showing transfer and maintenance request statuses

[FE-14] QR Scan Landing Page

  • New /scan/[assetId] route (outside dashboard shell, mobile-first)
  • Unauthenticated view: minimal safe info (name, photo, category, status, org)
  • Authenticated view: quick actions (login, report issue)
  • Unknown asset ID: branded not-found state

Verification

  • All pages follow existing patterns (TanStack Query, typed API clients)
  • Custom fields and developers settings integrate with existing settings page
  • QR scan page is mobile-first and works outside the dashboard layout

Closes #1098
Closes #1099
Closes #1097
Closes #1096

…ortal, QR scan page

- FE-10: Extended users page with activate/deactivate toggle, invite-user
  modal with role selection, and role capabilities reference panel
- FE-11: Custom fields builder at /settings/custom-fields with per-category
  field definitions (text/number/date/select/boolean), required flag,
  activate/deactivate, and delete
- FE-12: Developer settings at /settings/developers with API key management
  (create with scopes, show secret once, revoke) and webhook management
  (CRUD, signing secret, test delivery, delivery history)
- FE-13: My Assets employee self-service portal at /my-assets with assigned
  assets list, report-issue and request-transfer actions, and requests tab
- FE-14: QR-scan landing page at /scan/[assetId] with public minimal view
  (name, photo, category, status) and authenticated quick actions

Closes DistinctCodes#1098
Closes DistinctCodes#1099
Closes DistinctCodes#1100
Closes DistinctCodes#1101
Closes DistinctCodes#1102
@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

@brightMedina5050 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

drips-wave Bot commented Aug 25, 2026

Copy link
Copy Markdown

@brightMedina5050 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@yusuftomilola yusuftomilola left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed. Solid additions:

  • Users & Roles page: real invite-user flow and activate/deactivate with confirmation dialogs, admin-gated in the UI. I checked the current backend and confirmed PATCH /users/:id/active and POST /users/invite don't exist yet — these calls will 404 until the backend catches up, but that fails visibly (error surfaced in the modal), not silently, consistent with how search/reports in #1359 handle a not-yet-wired backend.
  • QR scan landing page (/scan/:assetId): sensibly minimal public view (name, category, status, org contact) rather than leaking full asset details to an unauthenticated scanner — good privacy instinct.
  • My Assets, Custom Fields, and Developer Settings (API keys/webhooks) pages are honestly local-state-only for now — no persistence and no fake success claims, so nothing here misleads a user about what's real.

Approving.

@yusuftomilola
yusuftomilola merged commit d24dc15 into DistinctCodes:main Aug 26, 2026
6 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment