Feat/backend implement vendor contract management module #295#333
Merged
yusuftomilola merged 3 commits intoDistinctCodes:mainfrom Oct 2, 2025
Conversation
|
Someone is attempting to deploy a commit to the naijabuz's projects Team on Vercel. A member of the Team first needs to authorize it. |
yusuftomilola
approved these changes
Oct 2, 2025
…ement-Module-#295
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title: Add Vendor Contracts Module with CRUD and Expiry Notifications
Description:
This PR introduces a new vendor-contracts module to manage long-term contracts with vendors who supply assets or maintenance services.
Key Features Implemented
Database Layer
Created vendor_contracts table with fields: supplierId, contractName, startDate, endDate, fileUrl, isActive, timestamps.
Added indexes on supplierId and endDate for efficient lookups.
Entity & DTOs
Defined VendorContract entity with validation rules.
Created DTOs for Create, Update, and Query operations.
CRUD Operations
Implemented service methods for create, read, update, and delete contracts.
Built REST controller with endpoints for managing vendor contracts.
Added pagination and search capabilities.
Expiry Management
Added method to retrieve contracts expiring within a configurable number of days.
Implemented scheduled task to check for expiring contracts daily.
Integrated notification service for near-expiry alerts (currently logs to console; pluggable for email/other channels).
Next Steps
Integrate with a real notification service (e.g., email, Slack, or push).
Add role-based access control to secure contract management.
Extend with supplier relationship (FK to suppliers table) once supplier module is available.