{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":593180338,"defaultBranch":"main","name":"Bank-Management-cpp","ownerLogin":"Dharmil-Shah3","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2023-01-25T12:31:57.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/93607839?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1679055890.481567","currentOid":""},"activityList":{"items":[{"before":"37c07bae74bbf4a0f1a07a427f941d6e797e432d","after":"f2609b90bbe19e649673ca64d268e6ea3be2ca4d","ref":"refs/heads/main","pushedAt":"2023-03-17T12:24:41.574Z","pushType":"push","commitsCount":1,"pusher":{"login":"Dharmil-Shah3","name":"Dharmil Shah","path":"/Dharmil-Shah3","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/93607839?s=80&v=4"},"commit":{"message":"1) Refactoring\n2) AccountHolder::displayDetails() is functional.\n3) AccountHolder::createAccountHolder() is funcational.\n4) bugs fixed in Staff::createAccountHolder().\n5) name pattern is changed to include middle name also in utils::isNameValid.[first middle last]","shortMessageHtmlLink":"1) Refactoring"}},{"before":"3ec1d6f8db1d9dcbc5f7e1aed2b7b2eb32e181ee","after":"37c07bae74bbf4a0f1a07a427f941d6e797e432d","ref":"refs/heads/main","pushedAt":"2023-03-17T09:13:18.033Z","pushType":"push","commitsCount":1,"pusher":{"login":"Dharmil-Shah3","name":"Dharmil Shah","path":"/Dharmil-Shah3","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/93607839?s=80&v=4"},"commit":{"message":"1) added \"bool isValid()\" in class Staff and AccoundHolder which returns isUserValid(true/false).\n2) Removed userid and password verification in login() of class Staff, Admin and AccountHolder. isValid() is used for varification istead.\n3) isUserValid variable is used in login() of class Staff, Admin, AccountHolder, to verify if user is valid or not.\n4) Using unique_ptr in login() of class Staff, Admin and AccountHolder for easy memory management.\n5) Renamed bankerror::ERROR_BANK_ACCOUNT::BANK_ACC_NOT_FOUND to ACC_NOT_FOUND.\n6) Renamed string constant bankerror::errmsg::INVALID_USER_OBJECT to INVALID_USER","shortMessageHtmlLink":"1) added \"bool isValid()\" in class Staff and AccoundHolder which retu…"}},{"before":"7c6111b6a8360c0bc905225c9eb4f6a692675729","after":"3ec1d6f8db1d9dcbc5f7e1aed2b7b2eb32e181ee","ref":"refs/heads/main","pushedAt":"2023-03-17T07:04:56.158Z","pushType":"push","commitsCount":1,"pusher":{"login":"Dharmil-Shah3","name":"Dharmil Shah","path":"/Dharmil-Shah3","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/93607839?s=80&v=4"},"commit":{"message":" 1) renamed enum ERROR_STAFF to ERROR_USER which is now unified for all 3 types of users(Admin, Staff & Account holder).\n 2) removed enum ERROR_ACCOUNT_HOLDER and merged it into ERROR_USER\n 3) added attribute \"password\" into account_holder's objects into \"bankdetails.json\".\n 4) removed failed login attempt loop from handleBankLogin() in main.cpp\n 5) using unique_ptr and unique_ptr (for automatic memory management) intead of normal pointers into handleBankLogin() in main.cpp\n 6) other minor changes and refactoring\n\n ----- class Staff -----\n 7) removed static displayStaffDetails(string) since it is already present in class Admin.\n 8) constructor does not throw exception in any case (to prevent memory leak).\n 9) bool isUserValid is used to explicitely check whether the object of staff is valid or not.\n - invalid object means given staffId or password is invalid.\n - all the public non static methods first check if isUserValid is true or not.\n - if its false then all methods throw ERROR_USER::INVALID_USER_OBJECT exception to prevent unauthorised access.\n10) all the validations and verification of staff object is done in the \"static Staff* login(id, password)\" method.\n\n ----- class Admin -----\n11) static displayStaffDetails(string) is no more static method. Its normal public method.\n12) constructor does not throw exception in any case(to prevent memory leak).\n13) constructor checks if the given userid is admin or not. If not then it sets \"isUserValid\" to false.\n14) all the public non static methods first check if isUserValid is true or not. if false then throws INVALID_USER_OBJECT\n15) \"static Admin* login(id, password)\" takes care of varification and authorisations of the user.\n\n----- class AccountHolder -----\n16) data type of variable \"id\" is now \"string\" from \"long int\".\n17) constructor takes second argument as \"const string &password\".\n18) constructor also verifies the password along with id.\n19) constructor does not throw exception in any case (to prevent memory leak).\n20) bool isUserValid used to check if account holder's id and password is valid or not.\n - invalid object means given staffId or password is invalid.\n - all the public non static methods of the class first checks if isUserValid is true or not.\n - if its false then all methods throws ERROR_USER::INVALID_USER_OBJECT exception to prevent unauthorised access.\n21) all the validations and verification of staff object is done in the \"static Staff::login(id, password)\" method.\n22) return type of createAccountHolder() and getId() is now string instead of long int (since is is string).\n23) renamed displayAccountHolderPanel() to displayPanel().\n\nNOTE:\n - Constructor of class Admin, Staff and AccountHolder does not throw any exception to prevent memory leak. If it throws any exception then the object would not be created properly, and could not be deleted too. That leads to memory leak.\n\n Que. Why static login() method of Staff, Admin and AccountHolder varifies the id and pasword of user ?\n while constructor already verifies the id and password.\n\n Ans => This is repeatation of the validation and verification.\n But to display proper/specific error message (like \"no user found\" or \"invalid password\" or \"not an admin\" etc.) to the user, it is necessary, since isUserValid only indicates user is invalid and does not tell what is exact problem.\n Though, this repeatation may be removed in future release.","shortMessageHtmlLink":" 1) renamed enum ERROR_STAFF to ERROR_USER which is now unified for a…"}},{"before":"ad9687ebf183f4cded91ddc0d0b55a32dd64b613","after":"7c6111b6a8360c0bc905225c9eb4f6a692675729","ref":"refs/heads/main","pushedAt":"2023-03-11T13:18:39.024Z","pushType":"push","commitsCount":1,"pusher":{"login":"Dharmil-Shah3","name":"Dharmil Shah","path":"/Dharmil-Shah3","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/93607839?s=80&v=4"},"commit":{"message":"1) namespace \"bankerror\" is moved to bankerror.h file, and included in other header files.\n2) minor changes","shortMessageHtmlLink":"1) namespace \"bankerror\" is moved to bankerror.h file, and included i…"}},{"before":"a875ffb0b99bc3f24bfb6e5b0f80f0e37ace9ebe","after":"ad9687ebf183f4cded91ddc0d0b55a32dd64b613","ref":"refs/heads/main","pushedAt":"2023-03-11T12:54:16.704Z","pushType":"push","commitsCount":2,"pusher":{"login":"Dharmil-Shah3","name":"Dharmil Shah","path":"/Dharmil-Shah3","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/93607839?s=80&v=4"},"commit":{"message":"1) nested namespace \"errmsg\" added into namespace \"bankerror\" which holds constant erro messages.\n2) added utils::displayCustomErrorMessage() which displays given error message with function name and file name in which the error has occurred.\n3) improved exception handling.\n4) other improvements.","shortMessageHtmlLink":"1) nested namespace \"errmsg\" added into namespace \"bankerror\" which h…"}},{"before":"ea1df6424920c2f2d02b04dcb0f8725e29688e8d","after":"a875ffb0b99bc3f24bfb6e5b0f80f0e37ace9ebe","ref":"refs/heads/main","pushedAt":"2023-03-10T13:12:17.605Z","pushType":"push","commitsCount":1,"pusher":{"login":"Dharmil-Shah3","name":"Dharmil Shah","path":"/Dharmil-Shah3","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/93607839?s=80&v=4"},"commit":{"message":"1) minor changes in memory management","shortMessageHtmlLink":"1) minor changes in memory management"}},{"before":"927b760ccc957e472f1472b9624e2e66b68abe2e","after":"ea1df6424920c2f2d02b04dcb0f8725e29688e8d","ref":"refs/heads/main","pushedAt":"2023-03-10T05:30:08.952Z","pushType":"push","commitsCount":1,"pusher":{"login":"Dharmil-Shah3","name":"Dharmil Shah","path":"/Dharmil-Shah3","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/93607839?s=80&v=4"},"commit":{"message":"1) added Staff::displayAccountHolderDetails()\n2) minor changes and improvements","shortMessageHtmlLink":"1) added Staff::displayAccountHolderDetails()"}},{"before":"1289a6c0e6b4d0557f2d4e7a577833e7c7861310","after":"927b760ccc957e472f1472b9624e2e66b68abe2e","ref":"refs/heads/main","pushedAt":"2023-03-09T09:53:04.321Z","pushType":"push","commitsCount":2,"pusher":{"login":"Dharmil-Shah3","name":"Dharmil Shah","path":"/Dharmil-Shah3","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/93607839?s=80&v=4"},"commit":{"message":"1) Refactoring :\n - all the classes are moved to a seprate header files and definitions are in their source files\n - renamed class Utils to namescape utils\n - removed pure virtual function from utils since util is no more a class\n - added namespace \"bankerror\" in utils.h, which contains all the error related enums and constants\n\n2) All below mentioned functions are working\n - (private) Admin::displayWithdrawDepositLogs(),\n - Admin::displayWithdrawDepositLogsByDate(),\n - Admin::displayWithdrawDepositLogsByMonth(),\n - Admin::displayWithdrawDepositLogsByYear()\n\n3) Improved exception handling\n\n4) utils::handleBankLogin() is moved to main.cpp because of include issues","shortMessageHtmlLink":"1) Refactoring :"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAADBaZN9AA","startCursor":null,"endCursor":null}},"title":"Activity · Dharmil-Shah3/Bank-Management-cpp"}