feat(bot): Custom day & time goes straight to year/month/day picker
The preset day list (Today/Tomorrow/+1 week/etc.) was redundant with the top-level time-quick options (Now / Tomorrow 9 AM / Next Mon 9 AM) and added an extra step for the operator's actual use case (specific dates). Tapping "Custom day & time" now opens the year picker directly. Back from the year picker returns to the time menu (Now / Tomorrow / etc.) instead of looping into itself.
This commit is contained in:
parent
45fcc11e7b
commit
9e180b65a2
@ -372,14 +372,10 @@ export async function wizardSetTimeQuick(ctx: Context, quick: Quick): Promise<vo
|
||||
}
|
||||
|
||||
export async function wizardSetTimeCustomPrompt(ctx: Context): Promise<void> {
|
||||
await ctx.answerCallbackQuery();
|
||||
const userId = ctx.from?.id;
|
||||
if (!userId) return;
|
||||
updateWizard(userId, { step: "set_time" });
|
||||
const op = await findOperator(ctx);
|
||||
const tz = op?.defaultTimezone ?? DEFAULT_TIMEZONE;
|
||||
const { reminderPickDayMenu } = await import("./menus.js");
|
||||
await showMenu(ctx, reminderPickDayMenu(tz));
|
||||
// "Custom day & time" goes straight to the year/month/day picker now.
|
||||
// The Now / Tomorrow / Next-Mon quick options at the time menu already
|
||||
// cover the near-term shortcuts, so the preset-day list was redundant.
|
||||
await wizardPickYearStart(ctx);
|
||||
}
|
||||
|
||||
export async function wizardBackToTimeMenu(ctx: Context): Promise<void> {
|
||||
|
||||
@ -423,9 +423,11 @@ export function reminderPickYearMenu(currentYear: number): MenuView {
|
||||
}
|
||||
keyboard.row();
|
||||
}
|
||||
keyboard.text("⬅ Back", "rm_t:custom");
|
||||
// Back goes to the time menu (Now / Tomorrow / Next Mon / Custom) — not
|
||||
// back to the Custom prompt, which would just re-open this same screen.
|
||||
keyboard.text("⬅ Back", "rm_t:back");
|
||||
return {
|
||||
text: "📅 Exact date — Step A / D\n\nPick a year:",
|
||||
text: "📅 Pick a year:",
|
||||
keyboard,
|
||||
parseMode: undefined,
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user