added various fields inside the dropdown

This commit is contained in:
2026-08-19 15:37:57 +05:30
parent 3914e4f304
commit 3579dcb765
10 changed files with 1685 additions and 80 deletions

View File

@@ -155,8 +155,25 @@ public class WebhookController {
}
private void handleInteractiveListSelection(String phoneNumber, String selectedListId, UserState currentState) {
if (currentState == UserState.MAIN_MENU) {
if (selectedListId.startsWith("student_")) {
// They clicked an option from the main menu
studentMenuHandler.handleMenuSelection(phoneNumber, selectedListId);
} else if (selectedListId.startsWith("sem_")) {
// They clicked an option from the semester selection list
if (currentState == UserState.AWAITING_SEMESTER_SELECTION) {
studentMenuHandler.handleSemesterSelection(phoneNumber, selectedListId);
} else {
messageService.sendMessage(phoneNumber, "This menu selection is no longer active.");
studentMenuHandler.sendMainMenu(phoneNumber);
}
} else if (selectedListId.startsWith("receipt_")) {
// They clicked a receipt download option
if (currentState == UserState.AWAITING_RECEIPT_SELECTION) {
studentMenuHandler.handleReceiptSelection(phoneNumber, selectedListId);
} else {
messageService.sendMessage(phoneNumber, "This menu selection is no longer active.");
studentMenuHandler.sendMainMenu(phoneNumber);
}
} else {
studentMenuHandler.sendMainMenu(phoneNumber);
}