an updated and hopefully faster version of the ST Toolbox
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

48 lines
960 B

package cli
import (
"marmic/servicetrade-toolbox/internal/api"
"marmic/servicetrade-toolbox/internal/ui"
"marmic/servicetrade-toolbox/internal/utils"
)
func HandleAdmin(session *api.Session) {
for {
ui.ClearScreen()
ui.DisplayMenu([]string{
"User Management",
"System Settings",
"Back to Main Menu",
}, "Admin Menu")
choice, err := utils.GetUserChoice(3)
if err != nil {
ui.DisplayError("Invalid input:", err)
utils.PressEnterToContinue()
continue
}
switch choice {
case 1:
userManagement(session)
case 2:
systemSettings(session)
case 3:
return
}
}
}
func userManagement(session *api.Session) {
ui.ClearScreen()
ui.DisplayMessage("User Management")
// TODO: Implement user management logic
utils.PressEnterToContinue()
}
func systemSettings(session *api.Session) {
ui.ClearScreen()
ui.DisplayMessage("System Settings")
// TODO: Implement system settings logic
utils.PressEnterToContinue()
}