Commit Graph

82 Commits

Author SHA1 Message Date
Jissin Mathew 435426c435 Merged PR 968: UserStory EMP011 View Payslip History
Related work items: #956
2026-04-16 14:55:33 +05:30
joelthomastrenser f29e8e2e90 Merge branch 'feature-employee-management' into feature-employee-management-emp011 2026-04-16 14:53:53 +05:30
Jissin Sam Mathew 0af64c140b Implement Review Fixes
<UserStory> EMP011 : View Payslip History </UserStory>

<Changes>
 - Removed getPayslips() method from ZenvyController and PayslipManagementService as part of review cleanup.
 - Reformatted Enums::getMonthString() and Enums::getMonth() functions for consistent indentation and readability.
 - Ensured switch-case blocks in Enums.h follow proper alignment and coding standards.
</Changes>

<Review>
  Smitha Mohan
</Review>
2026-04-16 14:31:35 +05:30
Princy Jerin a5b95d29b5 Merged PR 966: UserStory EMP010 View Payslip
Related work items: #955
2026-04-16 14:11:46 +05:30
Princy Jerin 04ef7744f7 Fix payslip lookup logic and enable view option for finance executive
<UserStory> EMP010 : View Payslip </UserStory>

<Changes>
 - Refactored getPayslipForMonth() to fetch payroll and payslips via employee data
 - Added validation for invalid employee ID
 - Simplified payslip search using employee-specific payslip records
 - Enabled “View Payslip” option in Finance Executive menu
 - Minor UI cleanup in payslip view (spacing and screen clear)
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-16 14:09:28 +05:30
Princy Jerin 47ca953eac Implement Review Fixes 2026-04-16 12:41:53 +05:30
Jissin Sam Mathew a1c9edce31 Implement View Payslip History
<UserStory> EMP011 : View Payslip History </UserStory>

<Changes>
 - Implemented Enums::Month enum and helper functions getMonth() and getMonthString() for month formatting.
 - Created viewPayslipHistory() helper in MenuHelper.h to display payslip history in aligned tabular format.
 - Integrated viewPayslipHistory() option into EmployeeMenu, FinanceExecutiveMenu, HRManagerMenu, ITExecutiveMenu, TalentExecutiveMenu, TeamExecutiveMenu, and TeamLeadMenu.
</Changes>

<Review>
  Smitha Mohan
</Review>
2026-04-16 12:36:13 +05:30
Princy Jerin b9b83ad429 Add View Payslip feature for employees
<UserStory> EMP010 : View Payslip </UserStory>

<Changes>
- Added Timestamp support to Payroll and Payslip models
- Implemented getPayslipForMonth flow from Controller to Service
- Enabled payslip retrieval based on year and month
- Updated menus to allow payslip viewing
- Enhanced MenuHelper with a unified viewPayslip helper
- Added date-based filtering using Timestamp utilities
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-16 12:34:18 +05:30
Ajmal Jalaludeen 5318b9eed6 Merged PR 963: UserStory EMP012 Add Shortlisted Candidates As Employee
Related work items: #957
2026-04-16 10:29:21 +05:30
joelthomastrenser 72e7db04a5 Fix HR Manager menu option ordering and switch mapping
<UserStory> EMP012 : Employee Management </UserStory>

<Changes>
 - Updated HR Manager menu text to remove obsolete options
 - Reordered menu items to match current functionality
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-16 10:26:54 +05:30
joelthomastrenser 7351186baf Refactor shortlisted candidates access and fix index check
<UserStory> EMP0012 : Employee Management </UserStory>

<Changes>
 - Changed getShorlistedCandidates() to return by value instead of reference
 - Updated controller and service method signatures accordingly
 - Fixed off-by-one error when selecting shortlisted candidate
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-16 10:16:16 +05:30
Ajmal Jalaludeen f15d5b7f1d Updates based on comments
<UserStory> EMP012 : Add Shorlisted Candidates As Employee </UserStory>

<Changes>
- Added clear method to clear console before displaying candidate details in MenuHelper.cpp
- Removed spaces in MenuHelper.h
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-16 10:15:16 +05:30
Ajmal Jalaludeen 1836be1234 To Add Shortlisted Candidates As Employee
<UserStory> EMP012 : Add Shorlisted Candidates As Employee </UserStory>

<Changes>
- Added getShorlistedCandidates method in ZenvyController
- Added candidateMap to store candidate data in DataStore.h
- Added addShortlistedCandidatesAsEmployee method in EmployeeManagementService.h and implemented the logic.
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-16 10:14:43 +05:30
Tinu Johnson 508f043228 Merged PR 964: UserStory EMP005 Update Designation
Related work items: #949
2026-04-16 09:42:01 +05:30
Tinu Johnson ce86b7f59e Update Update Designation functionality based on review
<UserStory> EMP005 : Update Designation </UserStory>

<Changes>
 - Refactor GeneralEmployee constructors clean.
 - update Designation logic.
 - Improve menu display messages.
</Changes>

<Review>
  Smitha Mohan
</Review>
2026-04-16 09:31:22 +05:30
Tinu Johnson 55f94f4d45 Update Update Designation functionality
<UserStory> EMP005 : Update Designation </UserStory>

<Changes>
 - Enabled HR Manager menu option to update employee designation
</Changes>

<Review>
  Smitha Mohan
</Review>
2026-04-16 09:31:16 +05:30
Tinu Johnson 5398f5a0ee Add Update Designation functionality for General Employees
<UserStory> EMP005 : Update Designation </UserStory>

<Changes>
 - Added updateDesignation method in ZenvyController and EmployeeManagementService.
 - Implemented update designation logic with authorization checks.
 - Enabled Admin menu option to update employee designation
 - Display employee designation in employee selection list
 - Extended GeneralEmployee to expose and update designation
 - Integrated role selection flow in MenuHelper.
</Changes>

<Review>
  Smitha Mohan
</Review>
2026-04-16 09:28:38 +05:30
joelthomastrenser a8ca6be135 Merged PR 965: UserStory EMP009 Generate Payslips
Related work items: #954
2026-04-14 17:32:19 +05:30
joelthomastrenser 454cd2d342 Implement Payslip Generation Feature
<UserStory> EMP009 : Generate Payslips </UserStory>

<Changes>
 - Updated Payslip model to store employee, salary, and date details
 - Added payslip storage to DataStore and file load/save support
 - Added logic to generate payslips once per month per employee
 - Restricted payslip generation to finance role
 - Linked payslips to employees during load and creation
 - Added month, year, and day helpers to Timestamp
 - Added payslip generation option to Finance Executive menu
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-14 17:31:27 +05:30
Jissin Mathew be01a05937 Merged PR 962: Implement View Employee Profile
Related work items: #947
2026-04-14 17:12:30 +05:30
joelthomastrenser 06d3760663 Implement Review Fixes
<UserStory> EMP003 : View Profile </UserStory>

<Changes>
- Avoid unecessary copies.
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-14 17:09:29 +05:30
Jissin Sam Mathew f5adcdea30 Implement View Employee Profile
<UserStory>EMP003: View Employee Profile</UserStory>

<Changes>

- Added `viewProfile` method in MenuHelper to display employee details including ID, name, role, email, phone, team, and payroll.
- Integrated `viewProfile(m_zenvyController)` into all role-specific menus (Employee, Finance Executive, HR Manager, IT Executive, Talent Executive, Team Lead).
- Implemented safe downcasting for `GeneralEmployee` to access designation details.
- Enhanced output formatting with section headers and null checks for team ID and payroll.
- Improved error handling with runtime exception when employee record is missing.

</Changes>

<Review>

Smitha Mohan

</Review>
2026-04-14 13:41:50 +05:30
joelthomastrenser 8447935fe4 Refactor employee fetch with type filter and login check
<SRS> SRS02 : Employee Management </SRS>

<Changes>
 - Removed old getEmployees() implementation
 - Added templated getEmployees(...) for filtering by employee type
 - Default now skips admin and returns only active employees
 - Blocked login for inactive employees with proper error
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-13 22:43:48 +05:30
joelthomastrenser 07f547dce7 Minor fixes in employee listing and menus
<SRS> SRS02 : Employee Management </SRS>

<Changes>
- Sorted active employees by ID when listing
- Handled empty employee lists in menus
- Stopped deactivation when no employee is selected
- Showed "NULL" when team ID is missing
- Removed unnecessary error throw in payroll menu
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-13 18:28:22 +05:30
Ajmal Jalaludeen cac8dbfc35 Merged PR 935: UserStory EMP006 Search Employee
Related work items: #951
2026-04-13 17:24:07 +05:30
Ajmal Jalaludeen 7ffaae3752 Updated Menu Helper
<UserStory> EMP006 : Search Employee </UserStory>

<Changes>
- Updated searchEmployee method logic in MenuHelper.h helper file.
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-13 17:08:47 +05:30
joelthomastrenser a294dc57c4 Merge branch 'feature-employee-management' into feature-employee-management-emp006 2026-04-13 16:05:56 +05:30
Tinu Johnson 21657b9b89 Merged PR 924: UserStory EMP007 View Employees
Related work items: #952
2026-04-13 13:27:22 +05:30
joelthomastrenser ed1cf4e306 Minor fixes and formatting updates in payroll, enums, and menus
<SRS> SRS02 : Employee Management </SRS>

<Changes>
- Fixed variable naming issue in Payroll deserialization
- Added braces for consistency in enum string-to-value helpers
- Improved readability in validation logic
- Corrected typo in Finance Executive payroll menu text
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-13 11:46:55 +05:30
joelthomastrenser 7fc468ac4b Merge branch 'feature-employee-management' into feature-employee-management-emp007 2026-04-13 11:37:24 +05:30
joelthomastrenser 8668a615ea Merged PR 957: Employee system updates
- Cleaned up employee menus and selection flow
- Fixed payroll ID issues and update logic
- Added saving/loading for employees and payroll
- Improved and centralized validation checks
- Added FileManager for file handling and cleanup
2026-04-13 10:44:14 +05:30
joelthomastrenser 282ab721b5 Improved employee view formatting and menu text
<SRS> SRS02 : Employee Management </SRS>

<Changes>
 - Updated "View Employee" to "View Employees" in Admin Menu
 - Added clear screen and header for employee list display
 - Improved column spacing and alignment for better readability
 - Reordered fields for a cleaner layout
 - Added pressEnter prompt after viewing employees
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-11 17:54:20 +05:30
joelthomastrenser 2c9740e776 Merge branch 'feature-employee-management' into feature-employee-management-emp007 2026-04-11 17:41:57 +05:30
joelthomastrenser aa21853a65 Refactored employee selection and cleaned up menu logic
<SRS> SRS02 : Employee Management </SRS>

<Changes>
 - Removed getSelectedUserId() from FinanceExecutiveMenu
 - Added reusable selectEmployeeId() in MenuHelper
 - Simplified deactivateEmployee() using common selection logic
 - Fixed missing break in HRManagerMenu
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-11 14:59:41 +05:30
joelthomastrenser 66c80fd055 Fixed payroll ID handling and improved payroll update flow
<SRS> SRS02 : Employee Management </SRS>

<Changes>
 - Fixed Payroll constructor to use given ID during deserialization
 - Cleaned up salary update logic in PayslipManagementService
 - Improved employee selection display in Finance menu
 - Added employee type column in selection list
 - Fixed typo in Employee menu (Ticket)
 - Added confirmation message after payroll update
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-11 12:58:09 +05:30
joelthomastrenser 47b44ccaa0 Added payroll persistance and updated Talent Acquisition role
<SRS> SRS02 : Employee Management </SRS>

<Changes>
 - Added Payroll  getHeaders, serialize and deserialize functions
 - Stored payrolls in DataStore
 - Loaded and saved payrolls along with employees
 - Linked payroll to employees during creation and load
 - Added employeeId to Payroll
- Renamed TAG role to TALENT_ACQUISITION across the project
 - Added missing TalentExecutive case in Employee deserialization
 - Added constructor to TalentExecutive for FileManager integration
 - Renamed ID counters to m_uid for consistency
 - Updated salary values in ApplicationConfig
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-11 12:13:23 +05:30
joelthomastrenser 1d94f1680c Refactored validation logic and centralized employee validators
<SRS> SRS02 : Employee Management </SRS>

<Changes>
 - Moved employee validation logic (active type check, email and phone duplication) to Validator utility
 - Updated service to use util::hasActiveEmployeeOfType, util::isEmailDuplicate, and util::isPhoneDuplicate
 - Integrated validator usage in MenuHelper for input validation
 - Cleaned up formatting and minor inconsistencies
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-10 20:29:55 +05:30
joelthomastrenser c50700e70c Added CSV header support and persistence for employees
<SRS> SRS02 : Employee Management </SRS>

<Changes>
 - Added header handling in FileManager load by skipping first line during deserialization
 - Added support for writing headers using T::getHeaders() in FileManager save
 - Implemented getHeaders() for Employee and GeneralEmployee models
 - Added saveEmployees functionality in EmployeeManagementService
 - Added persistStates method in ZenvyController
 - Added deserialization failure check with exception handling
 - Minor formatting cleanup in FileIO
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-10 19:41:08 +05:30
joelthomastrenser eac6fa72df Added validation checks for employee creation
<SRS> SRS02 : Employee Management </SRS>

<Changes>
 - Added helper function to check for existing active employee of a given type
 - Enforced business rule to allow only one active employee per non-general type
 - Added duplicate email validation before employee creation
 - Added duplicate phone number validation before employee creation
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-10 16:43:28 +05:30
joelthomastrenser 03be8f81d2 Refactored employee creation menu and centralized helper logic
<SRS> SRS02 : Employee Management </SRS>

<Changes>
 - Removed duplicate employee creation helper functions from AdminMenu and HRManagerMenu
 - Centralized employee creation flow into MenuHelper.cpp
 - Updated createEmployee to use current employee type for access control
 - Fixed parameter order bug in createEmployee (email, name, phone)
 - Improved menu titles for all roles (removed generic system header)
 - Added util::pressEnter() for better UX on invalid input across menus
 - Added newline before pause in InputHelper::pressEnter
 - Cleaned up minor formatting issues
</Changes>
2026-04-10 13:33:41 +05:30
joelthomastrenser 451ed4fec2 Added employee persistence, serialization, and file loading support
<SRS>SRS02 : Employee Management </SRS>

<Changes>
 - Implemented serialization and deserialization for Employee and GeneralEmployee models
 - Added FileManager integration to load employees from CSV files
 - Introduced ApplicationConfig entries for employee file paths
 - Updated Employee ID handling (getEmployeeId → getId) across project
 - Modified FileIO to auto-create file if not found instead of throwing exception
 - Added constructors for all employee types to support deserialization
 - Implemented loadEmployees in service and loadStates in controller
 - Ensured default admin creation if none exists during load
 - Added StringHelper utility for extracting numeric IDs
 - Extended Enums with string conversion and parsing utilities
 - Added initial CSV files for Employee and GeneralEmployee data
 - Improved login error message formatting and minor cleanup
 - Setup gitignore to not track csv files
</Changes>
2026-04-10 13:17:50 +05:30
joelthomastrenser d29e38ef75 Added FileManager DLL and cleanup code
<SRS> SRS02 : Employee Management </SRS>

<Changes>
 - Created FileIO for reading and writing files
 - Created FileManager to use FileIO
 - Set up Trenser.FileManager as a DLL
 - Linked DLL with Trenser.Zenvy project
 - Fixed duplicate function issue by marking deactivateEmployee as inline
 - Cleaned up unused methods in controller and service
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-09 20:32:48 +05:30
Princy Jerin 2031f510d5 Merged PR 932: UserStory EMP002 Deactivate Employee
Related work items: #946
2026-04-08 11:50:23 +05:30
joelthomastrenser 4d4974efd7 Protect Admin account from deactivation
<UserStory> EMP002 : Deactivate Employee </UserStory>

<Changes>
- Ensure admin account cannot be deactivated
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-08 11:47:00 +05:30
joelthomastrenser a955b64462 Ensure Role based access
<UserStory> EMP002 : Deactivate Employee </UserStory>

<Changes>
- Ensure Role based access
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-08 11:41:31 +05:30
Princy Jerin daf33e1aab Implement Review Fixes
<UserStory> EMP002 : Deactivate Employee </UserStory>

<Changes>
- Updated employee listing to display in a tabular format with headers
- Renamed helper function from listActiveEmployees to listEmployees
- Updated error messages
- Removed blank spaces
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-08 11:41:25 +05:30
Princy Jerin f85614ecc5 Implement Deactive Employee functionality
<UserStory>
EMP002 : Deactivate Employee
</UserStory>

<Changes>
- Added deactivateEmployee logic to set employee status to INACTIVE
- Enabled Deactivate Employee option in AdminMenu
- Implemented listing of active employees for selection
- Connected UI flow for employee deactivation
- Fix minor syntax issues
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-08 11:36:50 +05:30
Tinu Johnson e470dbc791 Updated MenuHelper.h
<UserStory> EMP007 : View Employees </UserStory>

<Changes>
 - Updated logic in viewEmployees() method.
</Changes>

<Review>
  Smitha Mohan
</Review>
2026-04-08 11:04:09 +05:30
Jissin Mathew a001b7d159 Merged PR 921: UserStory EMP008 Update Salary Details
Related work items: #953
2026-04-08 10:24:42 +05:30
Ajmal Jalaludeen a3e622ff8e Updated Menu Helper and all User Menu
<UserStory> EMP006 : Search Employee </UserStory>

<Changes>
- Updated MenuHelper.h helper file for input validation
- Updated search employee logic in employee management service
- Removed comments in Enums.h and EmployeeManagementService.h
- Included MenuHelper.h in all User Menu files
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-08 10:19:21 +05:30