fix: cart email/phone capture form was never rendered
recordOrder() and autoSubmitPurchase() read userEmail()/userPhone() signals and submitEmail() was fully implemented (validation, error handling), but the success screen's template never rendered the inputs - so the form was unreachable and the fallback auto-submit always sent blank email/phone. - Added the email/phone form to the payment-success screen, wired to the existing signals/handlers. - autoSubmitPurchase() (the 5s fallback if the user doesn't submit manually) no longer navigates home via an unconditional setTimeout(0) fired before the submission result is known - it now waits for submitPurchaseEmail() to settle, same as the manual path, and skips entirely if the user already submitted (new purchaseSubmitted flag). - It also now sends whatever the user has typed instead of hardcoded-blank fields, and shows a toast instead of only logging to console when no Telegram user id is available. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -123,6 +123,9 @@ export const ru: Translations = {
|
||||
emailNeedsAt: 'Email должен содержать @',
|
||||
emailNeedsDomain: 'Email должен содержать домен (.com, .ru и т.д.)',
|
||||
emailInvalid: 'Некорректный формат email',
|
||||
telegramIdMissing: 'Не удалось определить ваш Telegram-аккаунт, поэтому контактные данные не сохранены. Оплата прошла успешно.',
|
||||
emailPlaceholder: 'you@example.com',
|
||||
phonePlaceholder: '+7 (___) ___-__-__',
|
||||
loginRequired: 'Войдите для оформления',
|
||||
loginRequiredDesc: 'Для оформления заказа войдите через Telegram',
|
||||
loginWithTelegram: 'Войти через Telegram',
|
||||
|
||||
Reference in New Issue
Block a user