diff --git a/frontend/src/components/form/Step1Phone.tsx b/frontend/src/components/form/Step1Phone.tsx index 3fed8f5..f3dda4d 100644 --- a/frontend/src/components/form/Step1Phone.tsx +++ b/frontend/src/components/form/Step1Phone.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; -import { Form, Input, Button, message, Space } from 'antd'; -import { PhoneOutlined, SafetyOutlined } from '@ant-design/icons'; +import { Form, Input, Button, message, Space, Modal } from 'antd'; +import { PhoneOutlined, SafetyOutlined, CopyOutlined } from '@ant-design/icons'; interface Props { formData: any; @@ -23,6 +23,8 @@ export default function Step1Phone({ const [codeSent, setCodeSent] = useState(false); const [loading, setLoading] = useState(false); const [verifyLoading, setVerifyLoading] = useState(false); + const [debugCode, setDebugCode] = useState(null); + const [showDebugModal, setShowDebugModal] = useState(false); const sendCode = async () => { try { @@ -49,7 +51,12 @@ export default function Step1Phone({ message.success('Код отправлен на ваш телефон'); setCodeSent(true); updateFormData({ phone }); - // DEBUG код не показываем в продакшене + + // 🔧 DEV MODE: показываем debug код в модалке + if (result.debug_code) { + setDebugCode(result.debug_code); + setShowDebugModal(true); + } } else { addDebugEvent?.('sms', 'error', `❌ Ошибка SMS: ${result.detail}`, { error: result.detail }); message.error(result.detail || 'Ошибка отправки кода'); @@ -334,7 +341,47 @@ export default function Step1Phone({ )} - {/* DEV MODE секция удалена для продакшена */} + {/* 🔧 DEV MODE: Модалка с SMS кодом */} + setShowDebugModal(false)} + footer={[ + , + + ]} + > +
+

+ Это DEV режим. SMS не отправляется реально. +

+
+ {debugCode} +
+
+
); }