feat(backend): add ability to schedule member in cli

This commit is contained in:
2025-08-27 23:55:29 -04:00
parent 1379998e5b
commit 6763a31a41
7 changed files with 285 additions and 13 deletions

View File

@@ -11,7 +11,7 @@ if TYPE_CHECKING:
from .commands import (
cmd_members_list, cmd_members_show,
cmd_schedules_list, cmd_schedules_show, cmd_schedules_accept, cmd_schedules_decline,
cmd_schedules_list, cmd_schedules_show, cmd_schedules_accept, cmd_schedules_decline, cmd_schedules_schedule,
cmd_services_list,
)
@@ -100,7 +100,8 @@ def display_schedules_menu():
print(" 5⃣ 👤 Show schedule details")
print(" 6⃣ ✨ Accept a schedule (interactive)")
print(" 7⃣ 🚫 Decline a schedule (interactive)")
print(" 8🔙 Back to main menu")
print(" 8📅 Schedule next member for service")
print(" 9⃣ 🔙 Back to main menu")
print()
@@ -215,7 +216,7 @@ def handle_schedules_menu(cli: "NimbusFlowCLI"):
"""Handle schedules menu interactions."""
while True:
display_schedules_menu()
choice = get_user_choice(8)
choice = get_user_choice(9)
if choice == 1: # List all schedules
print("\n🔍 Listing all schedules...")
@@ -261,7 +262,14 @@ def handle_schedules_menu(cli: "NimbusFlowCLI"):
cmd_schedules_decline(cli, MockArgs(date=date, schedule_id=None, reason=reason))
input("\n⏸️ Press Enter to continue...")
elif choice == 8: # Back to main menu
elif choice == 8: # Schedule next member
date = get_date_input("Enter date to schedule for")
if date:
print(f"\n📅 Starting scheduling for {date}...")
cmd_schedules_schedule(cli, MockArgs(service_id=None, date=date, classifications=None))
input("\n⏸️ Press Enter to continue...")
elif choice == 9: # Back to main menu
break