1d94f1680c
<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>
21 lines
707 B
C++
21 lines
707 B
C++
#pragma once
|
|
#include<string>
|
|
#include<map>
|
|
#include<memory>
|
|
#include<vector>
|
|
#include<algorithm>
|
|
#include<cctype>
|
|
#include "Enums.h"
|
|
|
|
class Employee;
|
|
|
|
namespace util
|
|
{
|
|
bool isPhoneNumberValid(const std::string&);
|
|
bool isEmailValid(const std::string&);
|
|
bool isPasswordValid(const std::string&);
|
|
bool hasActiveEmployeeOfType(Enums::EmployeeType, const std::map<std::string, std::shared_ptr<Employee>>&);
|
|
bool isEmailDuplicate(const std::string&, const std::map<std::string, std::shared_ptr<Employee>>&);
|
|
bool isPhoneDuplicate(const std::string&, const std::map<std::string, std::shared_ptr<Employee>>&);
|
|
bool isPhoneDuplicate(const std::string&, const std::vector<std::shared_ptr<const Employee>>&);
|
|
} |