Update main.py
This commit is contained in:
19
main.py
19
main.py
@@ -45,26 +45,29 @@ def main_menu():
|
||||
print("="*40)
|
||||
print("1. Manage Clients")
|
||||
print("2. Track Time")
|
||||
print("3. Create Invoice")
|
||||
print("4. Reports")
|
||||
print("0. Exit") # Changed Exit option to 0
|
||||
print("3. Edit Time") # New Option
|
||||
print("4. Create Invoice")
|
||||
print("5. Reports")
|
||||
print("0. Exit")
|
||||
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':
|
||||
run_script_from_file('manage_clients.py')
|
||||
elif choice == '2':
|
||||
run_script_from_file('track_time.py')
|
||||
elif choice == '3':
|
||||
run_script_from_file('create_invoice.py')
|
||||
run_script_from_file('edit_time.py') # Call new script
|
||||
elif choice == '4':
|
||||
run_script_from_file('create_invoice.py')
|
||||
elif choice == '5':
|
||||
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!")
|
||||
break
|
||||
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__":
|
||||
main_menu()
|
||||
main_menu()
|
||||
Reference in New Issue
Block a user