Skip to content

Feat/backend implement vendor contract management module #295#333

Merged
yusuftomilola merged 3 commits intoDistinctCodes:mainfrom
OlufunbiIK:feat/BACKEND-Implement-Vendor-Contract-Management-Module-#295
Oct 2, 2025
Merged

Feat/backend implement vendor contract management module #295#333
yusuftomilola merged 3 commits intoDistinctCodes:mainfrom
OlufunbiIK:feat/BACKEND-Implement-Vendor-Contract-Management-Module-#295

Conversation

@OlufunbiIK
Copy link
Contributor

@OlufunbiIK OlufunbiIK commented Oct 2, 2025

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.

@vercel
Copy link

vercel bot commented Oct 2, 2025

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 yusuftomilola merged commit 931a109 into DistinctCodes:main Oct 2, 2025
4 of 5 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

Development

Successfully merging this pull request may close these issues.

2 participants