Update main.py

This commit is contained in:
2026-03-02 22:40:18 -06:00
parent 71397f0b8a
commit 3215ad625c

17
main.py
View File

@@ -45,26 +45,29 @@ def main_menu():
print("="*40) print("="*40)
print("1. Manage Clients") print("1. Manage Clients")
print("2. Track Time") print("2. Track Time")
print("3. Create Invoice") print("3. Edit Time") # New Option
print("4. Reports") print("4. Create Invoice")
print("0. Exit") # Changed Exit option to 0 print("5. Reports")
print("0. Exit")
print("="*40) print("="*40)
choice = input("Enter your choice (1-3, or 0): ") # Updated prompt choice = input("Enter your choice (1-5, or 0): ")
if choice == '1': if choice == '1':
run_script_from_file('manage_clients.py') run_script_from_file('manage_clients.py')
elif choice == '2': elif choice == '2':
run_script_from_file('track_time.py') run_script_from_file('track_time.py')
elif choice == '3': elif choice == '3':
run_script_from_file('create_invoice.py') run_script_from_file('edit_time.py') # Call new script
elif choice == '4': elif choice == '4':
run_script_from_file('create_invoice.py')
elif choice == '5':
run_script_from_file('reports.py') run_script_from_file('reports.py')
elif choice == '0': # Updated logic for the new exit choice elif choice == '0':
print("Exiting the Time Tracker. Goodbye!") print("Exiting the Time Tracker. Goodbye!")
break break
else: else:
print("Invalid choice. Please enter a number between 1 and 3, or 0 to exit.") print("Invalid choice. Please enter a number between 1 and 5, or 0 to exit.")
if __name__ == "__main__": if __name__ == "__main__":
main_menu() main_menu()