feat(cli): add new schedule member by name feature
This commit is contained in:
@@ -177,7 +177,7 @@ def display_schedules_menu():
|
||||
print(f" {Colors.CYAN}2.{Colors.RESET} {Colors.GREEN}Accept a schedule{Colors.RESET}")
|
||||
print(f" {Colors.CYAN}3.{Colors.RESET} {Colors.RED}Decline a schedule{Colors.RESET}")
|
||||
print(f" {Colors.CYAN}4.{Colors.RESET} {Colors.ERROR}Remove scheduled members{Colors.RESET}")
|
||||
print(f" {Colors.CYAN}5.{Colors.RESET} {Colors.YELLOW}Schedule next member for service{Colors.RESET}")
|
||||
print(f" {Colors.CYAN}5.{Colors.RESET} {Colors.YELLOW}Schedule member for service{Colors.RESET}")
|
||||
print(f" {Colors.CYAN}6.{Colors.RESET} {Colors.DIM}Back to main menu{Colors.RESET}")
|
||||
print()
|
||||
|
||||
@@ -417,7 +417,27 @@ def handle_schedules_menu(cli: "NimbusFlowCLI"):
|
||||
date = get_date_input("Enter date to schedule for")
|
||||
if date:
|
||||
clear_screen()
|
||||
cmd_schedules_schedule(cli, MockArgs(service_id=None, date=date, classifications=None))
|
||||
|
||||
# Ask if they want to schedule by name or use round-robin
|
||||
print(f"\n{Colors.HEADER}Scheduling Options{Colors.RESET}")
|
||||
print(f"{Colors.GREY}─" * 50 + f"{Colors.RESET}")
|
||||
print()
|
||||
print(f" {Colors.CYAN}1.{Colors.RESET} {Colors.YELLOW}Round-robin scheduling{Colors.RESET} (choose next available member)")
|
||||
print(f" {Colors.CYAN}2.{Colors.RESET} {Colors.GREEN}Schedule by name{Colors.RESET} (choose specific member)")
|
||||
print()
|
||||
|
||||
schedule_choice = get_user_choice(2)
|
||||
clear_screen()
|
||||
|
||||
if schedule_choice == 1:
|
||||
# Round-robin scheduling
|
||||
cmd_schedules_schedule(cli, MockArgs(service_id=None, date=date, classifications=None, member_name=None))
|
||||
else:
|
||||
# Name-based scheduling
|
||||
member_name = get_text_input("Enter member name to search for (first, last, or both)", True)
|
||||
if member_name:
|
||||
clear_screen()
|
||||
cmd_schedules_schedule(cli, MockArgs(service_id=None, date=date, classifications=None, member_name=member_name))
|
||||
input(f"\n{Colors.DIM}Press Enter to continue...{Colors.RESET}")
|
||||
|
||||
elif choice == 6: # Back to main menu
|
||||
|
||||
Reference in New Issue
Block a user