Commit Graph

53 Commits

Author SHA1 Message Date
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
Jissin Sam Mathew 0290467528 Implement Review Suggestion
<UserStory>EMP008: Update Salary Details</UserStory>

    <Changes>
  - Refactored salary update and employee selection:
  • Removed unnecessary const qualifiers from double parameters
  • Renamed variables
  • Replaced count() with find() for map lookups
  • Excluded ADMIN employees from salary updates and selection lists
  • Applied util::enforceAuthorization for access control
- Improved readability and consistency:
  • Enhanced tabular output using setw() with left alignment
    Implement Update Salary
    </Changes>

    <Review>
    Smitha Mohan
    </Review>
2026-04-08 10:18:23 +05:30
Jissin Sam Mathew 63627075ef Implement Update Salary
<UserStory>EMP08: Update Salary Details</UserStory>

<Changes>
- Added `updateSalary` method in ZenvyController to connect payroll updates with PayslipManagementService
- Implemented `PayslipManagementService::updateSalary` with employee existence and Finance-role authorization checks
- Extended Payroll model with setter methods for salary components
- Improved error handling with clear runtime exceptions for invalid index selection, unauthorized access, and missing employees
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-08 10:17:16 +05:30
Tinu Johnson c27ca5240a Added MenuHelper feature for ViewEmployee
<UserStory> EMP007 : View Employees </UserStory>

<Changes>
 - Added MenuHelper.cpp and MenuHelper.h to project configuration
 - Moved viewEmployees() implementation from individual menu classes into MenuHelper
 - Added inline viewEmployees(shared_ptr<ZenvyController>) helper with formatted output
 - Added enumToString() to MenuHelper for employee role display
 - Updated AdminMenu, EmployeeMenu, FinanceExecutiveMenu, HRManagerMenu,
   ITExecutiveMenu, TalentExecutiveMenu, TeamExecutiveMenu, and TeamLeadMenu
   to use viewEmployees(m_zenvyController) instead of per‑menu implementations
 - Removed old viewEmployees() method from EmployeeMenu
 - Updated menu options to reflect new centralized viewEmployees() function
</Changes>

<Review>
  Smitha Mohan
</Review>
2026-04-07 20:32:30 +05:30
Tinu Johnson f75bbaaae8 Merged PR 933: UserStory EMP004 Update Personal Details
Related work items: #948
2026-04-07 20:31:25 +05:30
Tinu Johnson b3b9299c70 Added Profile Update Feature for all menu
<UserStory> EMP004 : Update Personal Details </UserStory>

<Changes>
 - Added MenuHelper.cpp and MenuHelper.h and integrated them into project
 - Moved updateProfile() logic from individual menus into MenuHelper
 - Added inline updateProfile(shared_ptr<ZenvyController>) to MenuHelper
 - Updated AdminMenu, EmployeeMenu, HRManagerMenu, FinanceExecutiveMenu,
   ITExecutiveMenu, TalentExecutiveMenu, TeamExecutiveMenu, and TeamLeadMenu
   to use centralized updateProfile()
 - Added getCurrentEmployee() and updateProfile() to ZenvyController
 - Added corresponding implementations in EmployeeManagementService
 - Minor layout and option text improvements across all menus
</Changes>

<Review>
  Smitha Mohan
</Review>
2026-04-07 20:25:33 +05:30
Tinu Johnson 6256b9ea82 Implement Review fixes
<UserStory> EMP007 : View All Employees  </UserStory>

<Changes>
 - Added check for empty employee map
 - Filtered only ACTIVE employees
 - Added formatted table using <iomanip> in EmplopyeeMenu::viewEmployee()
 - Added check for empty employee list
</Changes>

<Review>
  Smitha Mohan
</Review>
2026-04-07 19:19:08 +05:30
Tinu Johnson 1785660e94 Add Employee Listing Feature
<UserStory> EMP007 : View All Employees  </UserStory>

<Changes>
 - Implemented getEmployees() in ZenvyController to return list of employees
 - Added working getEmployees() implementation in EmployeeManagementService
 - Fixed iterator usage to correctly extract map values into Employees vector
 - Added viewEmployees() UI flow in EmployeeMenu
 - Integrated employee listing into EmployeeMenu option flow
 - Added enumToString() helper for printing employee roles
 - Improved formatting and filtering of ACTIVE employees in employee listing
 - Performed minor code cleanup and consistency adjustments in controller and menu
</Changes>

<Review>
  Smitha Mohan
</Review>
2026-04-07 17:38:53 +05:30
joelthomastrenser 247e5dc6f6 Merged PR 920: UserStory EMP001 Create Employee
Related work items: #943
2026-04-07 17:36:30 +05:30
joelthomastrenser ef5ac42a92 Implement employee creation
<UserStory>EMP001 Create Employee</UserStory>

<Changes>
- Updated employee creation flow to support different employee types and designations
- Set a default initial password for new employees
- Added basic authorization check utility
- Cleaned up employee model constructors for better consistency
Minor code cleanup and refactoring
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-07 15:07:44 +05:30
joelthomastrenser 07bd979685 Set up employee management codebase
<SRS>SRS02 : Employee Management </SRS>

<Changes>
- Renamed EmployeeManagememtService to EmployeeManagementService
- Added basic employee management service structure
- Connected employee management into controller and datastore
- Updated project config files
- Added auto ID generation across models
- Added payroll-related config constants
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-07 10:51:38 +05:30
joelthomastrenser fcc612f081 Merged PR 910: Refactor authentication: replace tuple with DTO, namespace config
Refactor authentication: replace tuple with DTO, namespace config
2026-04-07 09:02:51 +05:30
joelthomastrenser e7332af1e7 Refactor authentication: replace tuple with DTO, namespace config 2026-04-07 00:55:44 +05:30
joelthomastrenser fb35ee6098 Merged PR 899: SRS01 Authentication
Related work items: #930, #932, #933, #935, #936
2026-04-06 17:50:32 +05:30
Tinu Johnson 18afdc4189 Error fixes and added main method function and objects
<SRS> SRS01 : Authentication </SRS>

 <Changes>
  - Fixed polymorphism errors in Employee base class by adding virtual destructor.
  - Corrected constructor mismatch in GeneralEmployee to properly call Employee constructor with EmployeeType.
  - Created UserInterface object in main() and invoked run() to start role-based menus.
 </Changes>

 <Review>
   Smitha Mohan
 </Review>
2026-04-06 17:39:09 +05:30
Tinu Johnson 719bf5e7b3 Setup basic UI and controller for authentication
<SRS> SRS01 : Authentication </SRS>

<Changes>
- Added basic UI structure with UserInterface and role-based menus (Admin, HR, IT, Finance, Talent, Team, TeamLead, Employee).
- Created menu classes for different roles, each with run() and handleOperation() methods.
</Changes>

<Review>
 Smitha Mohan
</Review>
2026-04-06 16:46:41 +05:30
Princy Jerin f61d4259aa Merged PR 897: UserStory AUTH002 Reset Initial Password
Related work items: #933
2026-04-06 16:02:55 +05:30
Princy Jerin 1c22c14f32 Add reset initial password
<UserStory> AUTH002 : Reset Initial Password </UserStory>

    <Changes>
    - Added logic for resetting initial password
    - Code Cleanup
    </Changes>

    <Review>
    Smitha Mohan
    </Review>
2026-04-06 15:57:23 +05:30
Jissin Mathew fdd90636ed Merged PR 896: UserStory AUTH003 Logout
Related work items: #932, #935, #936
2026-04-06 13:59:44 +05:30
Jissin Sam Mathew 45d00d8964 Add logout functionality in controller and datastore access
<UserStory> AUTH003: Logout User </UserStory>

<Changes>
- Added logout() method in ZenvyController and AuthenticationManagementService
- Implemented logout handling in AuthenticationManagementService
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-06 13:52:50 +05:30
Ajmal Jalaludeen 8a76a5b6a8 Merged PR 895: UserStory AUTH004 Change Password
Related work items: #936
2026-04-06 13:41:37 +05:30
Ajmal Jalaludeen c2fbfa2d03 Add changePassword method in controller and authenticated user accessor
<UserStory> AUTH004 : Change Password </UserStory>

    <Changes>
    - Added changePassword method in ZenvyController to move to AuthenticationManagementService
    - Declared changePassword in ZenvyController.h
    - Introduced getAuthenticatedUser() in DataStore for accessing authenticated employee
    - Updated DataStore.h with getAuthenticatedUser() method
    - Prepared AuthenticationManagementService.cpp for password change implementation
    </Changes>

    <Review>
    Smitha Mohan
    </Review>
2026-04-06 13:29:56 +05:30
joelthomastrenser dc3a30c448 Merged PR 894: UserStory AUTH001 Login
Related work items: #932
2026-04-06 12:19:25 +05:30
joelthomastrenser d76def42e9 Add authentication flow, UI menu routing, and application config
<UserStory>AUTH001 : Login </UserStory>

<Changes>
- Introduced ApplicationConfig for default configuration values
- Implemented authentication flow in AuthenticationManagementService
- Added login and logout handling in ZenvyController
- Updated enums to include INVALID values and TEAM employee type
- Implemented login UI flow with role-based menu routing
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-06 11:49:57 +05:30
joelthomastrenser 02c4f1a954 Add EmployeeType and LoginStatus enums, extend Employee model
<SRS> SRS01 : Authentication </SRS>

<Changes>
- Added EmployeeType and LoginStatus enums
- Extended Employee model to store employee type
- Updated Employee constructors to initialize employee type
- Added getter for employee type in Employee model
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-06 09:39:14 +05:30
Ajmal Jalaludeen 676c5ce132 Setup basic UI and controller for authentication
<SRS> SRS01 : Authentication </SRS>

<Changes>
- Added basic UI structure with UserInterface and role-based menus
- Created menu classes for different roles (Admin, HR, IT, etc.)
- Connected ZenvyController with all required services
- Updated AuthenticationManagementService
- Added FAQ model
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-02 20:11:27 +05:30
joelthomastrenser a925fe63fb Add logging service and datastore setup, refactor inputHelper
<SRS> SRS01 : Authentication </SRS>

<Changes>
- Set up DataStore singleton and added basic employee + log storage
- Added LogService
- Refactor InputHelper
- Updated include paths in project config
</Changes>

<Review>
Smitha Mohan
</Review>
2026-04-02 19:58:59 +05:30
joelthomastrenser 11b47d38c1 Set up codebase
- Define models, factory classes, data store,
utility classes (timestamp, io helpers, enums, validator)
- Define Model Class Structures
- Add new model Log
- Add new service LogService
- Add Factory class
- Add Utilities like Timestamp, Validator, Input/Output Helpers..

Co-authored-by: Tinu Johnson <tinu.johnson@trenser.com>
Co-authored-by: Princy Jerin <princy.jerin@trenser.com>
Co-authored-by: Ajmal Jalaludeen <ajmal.jalaludeen@trenser.com>
Co-authored-by: Jissin Sam Mathew <jissin.mathew@trenser.com>
2026-04-01 13:26:58 +05:30
joelthomastrenser 045ea2d743 Add Models Structure 2026-03-31 10:36:43 +05:30