MCPcopy Index your code
hub / github.com/geekcomputers/Python / admin_login_menu_page

Function admin_login_menu_page

bank_managment_system/QTFrontend.py:1119–1136  ·  view source on GitHub ↗
(name, password)

Source from the content-addressed store, hash-verified

1117 QtWidgets.QApplication.quit()
1118
1119 def admin_login_menu_page(name, password):
1120 try:
1121 # Ideally, here you'd call a backend authentication check
1122 success = backend.check_admin(name, password)
1123 if success:
1124 QtWidgets.QMessageBox.information(
1125 stacked_widget, "Login Successful", f"Welcome, {name}!"
1126 )
1127 stacked_widget.setCurrentIndex(ADMIN_MENU_PAGE)
1128 else:
1129 QtWidgets.QMessageBox.warning(
1130 stacked_widget, "Login Failed", "Incorrect name or password."
1131 )
1132 except Exception as e:
1133 QtWidgets.QMessageBox.critical(
1134 stacked_widget, "Error", f"An error occurred during login: {str(e)}"
1135 )
1136 # show_popup_message(stacked_widget,"Invalid admin credentials",0)
1137
1138 def add_employee_form_submit(name, password, salary, position):
1139 if (

Callers 1

setup_main_windowFunction · 0.85

Calls 2

check_adminMethod · 0.80
warningMethod · 0.80

Tested by

no test coverage detected