Minimum Wage Management
Author(s)
- Abhishak Kumar Roy
Last Updated Date
2024-11-28
SRS References
(Not yet defined)
Version History
| Version | Date | Changes | Author |
|---|---|---|---|
| 1.0 | 2024-11-28 | Initial draft | Abhishak Kumar Roy |
Feature Overview
Objective:
To provide a centralized system for managing and viewing historical minimum wage data based on skill level, division, and department, including effective start and expiry dates for compliance with labor laws. Additionally, the system will allow scheduling of future minimum wages, ensuring only one combination is active at any time.
Scope:
This feature allows users to:
- View historical minimum wage data categorized by skill level, division, and department.
- Add and edit minimum wage records with effective start and expiry dates.
- Schedule future minimum wages, with the system auto-applying them and deactivating previous entries.
- Upload and store official documents, such as government notifications.
Dependencies:
- Database for storing wage data.
- Document storage service for uploading notifications.
- User roles and permissions for access control.
Requirements
-
Functional Requirements:
- Ability to view minimum wage records categorized by:
- Skill level (e.g., unskilled, semi-skilled, skilled, highly skilled).
- Division (e.g., region, site, or unit).
- Department (e.g., operations, HR, finance).
- Add, edit, or delete minimum wage entries with:
- Effective start date.
- Expiry date.
- Ensure only one combination of skill level, division, and department is active at any given time.
- Support scheduling of future minimum wages. The system will:
- Automatically activate the future minimum wage on its effective start date.
- Automatically deactivate the previous active combination upon activation of the new one.
- Upload and download government notifications or other related documents.
- Filter and search functionality for wage records by:
- Skill level
- Division
- Department
- Effective date
- Audit trail for tracking changes.
- Ability to view minimum wage records categorized by:
-
Non-Functional Requirements:
- The system must be responsive and accessible across devices.
- Secure storage for documents to prevent unauthorized access.
Design Specifications
UI/UX Design
The interface will include:
- A searchable data table for wage records.
- Forms for adding and editing entries with effective start and expiry dates.
- Options for scheduling future minimum wages with clear indications of active and scheduled entries.
- File upload functionality for documents.
- Filters for skill level, division, department, and date.
Data Models
The minimum wage data structure:
public enum SkillLevel
{
Unskilled,
SemiSkilled,
Skilled,
HighlySkilled
}
public class MinimumWage
{
public int Id { get; set; }
public SkillLevel SkillLevel { get; set; }
public string Division { get; set; }
public string Department { get; set; }
public decimal MinimumWageAmount { get; set; }
public DateTime EffectiveStartDate { get; set; }
public DateTime ExpiryDate { get; set; }
public bool IsActive { get; set; } // Indicates if the record is currently active
public string DocumentUrl { get; set; }
public string CreatedBy { get; set; }
public DateTime CreatedDate { get; set; }
}
API Interfaces
| Endpoint | Method | Parameters | Response | Response Status Codes |
|---|---|---|---|---|
/api/v1/minimum-wages | GET | skillLevel, division, department, date (optional) | List of MinimumWage | 200, 500 |
/api/v1/minimum-wages | POST | MinimumWage | 200 OK, 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 500 Internal Server Error | 201, 400, 500 |
/api/v1/minimum-wages/{id} | GET | id, | MinimumWage | 200, 400, 404, 500 |
/api/v1/minimum-wages/{id} | DELETE | id | id | 200, 404, 500 |
Workflow
-
Adding a New Entry:
- Admin fills out the form with skill level, division, department, wage details, effective start date, and expiry date.
- Optionally uploads a supporting document.
- Saves the entry, which is validated and stored in the database.
- The system checks for existing active entries with the same combination (skill level, division, department). If a future record is scheduled:
- Marks the new entry as inactive until its start date.
-
Activating Scheduled Entries:
- The system automatically checks scheduled entries daily.
- Activates the scheduled entry if its effective start date matches the current date.
- Deactivates the previously active record.
-
Viewing Records:
- Users search and filter wage records using criteria such as skill level, division, and department.
- Results are displayed in a paginated table, with active and scheduled entries clearly marked.
-
Editing Records:
- Admin selects a record, makes changes, including updating start or expiry dates, and saves updates.
- Changes are logged in the audit trail.
-
Document Management:
- Users can upload and download documents linked to each wage record.
Development Tasks & Estimates
| No | Task Name | Estimate (Hours) | Dependencies | Notes |
|---|---|---|---|---|
| 1 | CURD APIs for Minimum wage | 06 hours | None | - |
| 2 | Set up document storage & upload API | 04 hours | Storage service | - |
| 3 | Testing and QA | 06 hours | All tasks | - |
| Total | 16 hours | - | - |
Testing & Quality Assurance
-
Unit Tests:
- Validate API endpoints for correctness.
- Test form validations for adding/editing entries.
-
Integration Tests:
- Ensure UI interacts correctly with backend APIs.
- Test document upload and download functionality.
- Test scheduling and activation logic.
-
Acceptance Criteria:
- All functionalities should work as intended across different devices and browsers.
- Scheduled entries activate and deactivate correctly without user intervention.
- Data retrieval and operations must meet performance requirements.
-
Testing Tools:
- Postman for API testing.
Deployment Considerations
-
Configuration Changes:
- Add environment variables for scheduling service (e.g., cron jobs).
-
Rollout Plan:
- Feature toggle for limited rollout to test users.
- Full deployment upon successful testing.
Risks & Mitigations
| Risk | Impact | Likelihood | Mitigation Strategy |
|---|---|---|---|
Review & Approval
-
Reviewer:
Abhishak Kumar Roy -
Approval Date:
2024-11-28
Notes
Additional notes or considerations can be added here.