diff --git a/gui/admin_panel.py b/gui/admin_panel.py index 616cc8f13e45431cf44dd46e1195839acb10097b..591aea89e622ee8d2caea672380835879acbee0c 100644 --- a/gui/admin_panel.py +++ b/gui/admin_panel.py @@ -1,25 +1,53 @@ import tkinter as tk from tkinter import messagebox -from gui.addremove_showtimes import open_showtime_manager_window from gui.reports import open_reports +from gui.booking_start import open_booking_start_window +from gui.cancel_booking import open_cancel_booking_window +from gui.modify_booking import open_modify_booking_window +from gui.edit_showtimes import open_manage_showtimes_window +from gui.manage_movies import open_movie_manager_window def open_admin_dashboard(): admin_win = tk.Tk() admin_win.title("Admin Dashboard") - admin_win.geometry("500x400") + admin_win.geometry("500x500") admin_win.configure(bg="#f9f9f9") admin_win.resizable(False, False) - tk.Label(admin_win, text="Admin Panel", font=("Segoe UI", 16, "bold"), bg="#f9f9f9").pack(pady=30) - tk.Button(admin_win, text="Create New Showtime", font=("Segoe UI", 11), width=25, command=open_showtime_manager_window).pack(pady=10) - tk.Button(admin_win, text="Reports", font=("Segoe UI", 11), width=25, command=open_reports).pack(pady=10) + tk.Label(admin_win, text="Admin Panel", font=("Segoe UI", 16, "bold"), bg="#f9f9f9").pack(pady=(20, 10)) + + button_font = ("Segoe UI", 10) + button_width = 20 + label_font = ("Segoe UI", 11) + + # --- Group 1: Booking Controls --- + tk.Label(admin_win, text="Booking Controls", font=label_font, bg="#f9f9f9").pack(pady=(10, 2)) + frame_booking = tk.Frame(admin_win, bg="#f9f9f9") + frame_booking.pack(pady=(0, 10)) + tk.Button(frame_booking, text="Start Booking", font=button_font, width=button_width, command=open_booking_start_window).pack(pady=2) + tk.Button(frame_booking, text="Modify Bookings", font=button_font, width=button_width, command=open_modify_booking_window).pack(pady=2) + tk.Button(frame_booking, text="Cancel Bookings", font=button_font, width=button_width, command=open_cancel_booking_window).pack(pady=2) + + # --- Group 2: Movie/Showtime Management --- + tk.Label(admin_win, text="Movie & Showtime Management", font=label_font, bg="#f9f9f9").pack(pady=(10, 2)) + frame_manage = tk.Frame(admin_win, bg="#f9f9f9") + frame_manage.pack(pady=(0, 10)) + tk.Button(frame_manage, text="Manage Movies", font=button_font, width=button_width, command=open_movie_manager_window).pack(pady=2) + tk.Button(frame_manage, text="Manage Showtimes", font=button_font, width=button_width, command=open_manage_showtimes_window).pack(pady=2) + + # --- Group 4: Reports --- + tk.Label(admin_win, text="Reports", font=label_font, bg="#f9f9f9").pack(pady=(10, 2)) + frame_reports = tk.Frame(admin_win, bg="#f9f9f9") + frame_reports.pack(pady=(0, 10)) + tk.Button(frame_reports, text="Reports", font=button_font, width=button_width, command=open_reports).pack(pady=2) def logout(current_window): current_window.destroy() from gui.login import open_login_window open_login_window() - tk.Button(admin_win, text="Logout", font=("Segoe UI", 11), width=25, command=lambda: logout(admin_win)).pack(pady=30) + tk.Button(admin_win, text="Logout", font=button_font, width=button_width, command=lambda: logout(admin_win)).pack(pady=15) admin_win.mainloop() +