Skip to content

Feat/assets management audit errors#869

Merged
yusuftomilola merged 5 commits into
DistinctCodes:mainfrom
lynaDev2:feat/assets-management-audit-errors
Jun 1, 2026
Merged

Feat/assets management audit errors#869
yusuftomilola merged 5 commits into
DistinctCodes:mainfrom
lynaDev2:feat/assets-management-audit-errors

Conversation

@lynaDev2
Copy link
Copy Markdown
Contributor

@lynaDev2 lynaDev2 commented Jun 1, 2026

Summary

This PR implements core asset management capabilities and platform-wide error handling improvements for the OPSCE module:

Changes

#741 AssetsModule CRUD

  • Created AssetsModule controller and service
  • Added POST /api/assets endpoint
  • Added GET /api/assets paginated listing
  • Added GET /api/assets/:id endpoint with related department, location, and assignee data
  • Added PATCH /api/assets/:id update endpoint
  • Added DELETE /api/assets/:id soft-delete endpoint
  • Added role-based authorization for write operations
  • Integrated AuditService logging for all write actions
  • Added CreateAssetDto validation
  • Added UpdateAssetDto validation
  • Added unit and integration coverage

#744 Asset Transfer Workflow

  • Added POST /api/assets/:id/transfer endpoint
  • Added TransferAssetDto with validation decorators
  • Added ownership and assignment transfer support
  • Added department reassignment support
  • Added location reassignment support
  • Added authorization checks for ADMIN and MANAGER roles
  • Added ASSET_TRANSFER audit log entries
  • Recorded previous and updated values in audit history
  • Added error handling for missing assets

#745 Global HTTP Exception Filter

  • Added global HttpException filter
  • Standardized error response shape:
{
  "statusCode": 400,
  "message": "Validation failed",
  "error": "Bad Request",
  "timestamp": "2026-06-01T12:00:00.000Z",
  "path": "/api/assets"
}
  • Added handling for unexpected exceptions
  • Prevented stack trace exposure in production
  • Added ISO 8601 timestamps
  • Added request path reporting
  • Registered filter globally using APP_FILTER
  • Added unit tests validating BadRequestException responses

Validation

  • Asset CRUD endpoints tested
  • Asset transfer scenarios tested
  • Audit logging verified
  • Exception filter unit tests pass
  • Backend build passes
  • Existing functionality remains unaffected

Closes #741
Closes #744
Closes #745
Closes #737

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

@lynaDev2 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
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@lynaDev2 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 merged commit 82067b4 into DistinctCodes:main Jun 1, 2026
1 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants