(parent, title)
| 727 | |
| 728 | # -----------employees menu pages----------- |
| 729 | def create_employee_menu_page(parent, title): |
| 730 | page, main_layout = create_page_with_header(parent, title) |
| 731 | |
| 732 | button_frame = create_styled_frame(page) |
| 733 | button_frame.setSizePolicy( |
| 734 | QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding |
| 735 | ) |
| 736 | button_layout = QtWidgets.QVBoxLayout(button_frame) |
| 737 | |
| 738 | button_container = create_styled_frame( |
| 739 | button_frame, |
| 740 | min_size=(300, 0), |
| 741 | style="background-color: #ffffff; border-radius: 15px; padding: 20px;", |
| 742 | ) |
| 743 | button_container_layout = QtWidgets.QVBoxLayout(button_container) |
| 744 | button_container_layout.setSpacing(15) |
| 745 | |
| 746 | # Define button labels |
| 747 | button_labels = [ |
| 748 | "Create Account ", |
| 749 | "Show Details", |
| 750 | "Add Balance", |
| 751 | "Withdraw Money", |
| 752 | "Chack Balanace", |
| 753 | "Update Account", |
| 754 | "list of all Members", |
| 755 | "Delete Account", |
| 756 | "Back", |
| 757 | ] |
| 758 | buttons = [] |
| 759 | |
| 760 | for label in button_labels: |
| 761 | btn: QtWidgets.QPushButton = create_styled_button(button_container, label) |
| 762 | button_container_layout.addWidget(btn) |
| 763 | buttons.append(btn) |
| 764 | |
| 765 | button_layout.addWidget( |
| 766 | button_container, 0, QtCore.Qt.AlignHCenter | QtCore.Qt.AlignVCenter |
| 767 | ) |
| 768 | main_layout.addWidget(button_frame) |
| 769 | |
| 770 | return page, *buttons # Unpack as add_button, update_employee, etc. |
| 771 | |
| 772 | |
| 773 | def create_account_page(parent, title, update_btn=False): |
no test coverage detected