pravkiend cart

This commit is contained in:
egortriston
2025-06-29 12:36:49 +03:00
parent 7f91da525f
commit e8f1fecb47
9 changed files with 299 additions and 90 deletions

View File

@ -667,10 +667,10 @@ const CartSummary: React.FC = () => {
<button
className="submit-button fill w-button"
onClick={handleProceedToStep2}
disabled={summary.totalItems === 0}
disabled={summary.totalItems === 0 || !consent}
style={{
opacity: summary.totalItems === 0 ? 0.5 : 1,
cursor: summary.totalItems === 0 ? 'not-allowed' : 'pointer'
opacity: summary.totalItems === 0 || !consent ? 0.5 : 1,
cursor: summary.totalItems === 0 || !consent ? 'not-allowed' : 'pointer'
}}
>
Оформить заказ
@ -722,10 +722,9 @@ const CartSummary: React.FC = () => {
style={{
width: '100%',
padding: '8px 12px',
border: '1px solid #D0D0D0',
borderRadius: '4px',
fontSize: '14px',
fontFamily: 'inherit'
border: 'none',
outline: 'none',
boxShadow: 'none',
}}
/>
</div>
@ -738,10 +737,9 @@ const CartSummary: React.FC = () => {
style={{
width: '100%',
padding: '8px 12px',
border: '1px solid #D0D0D0',
borderRadius: '4px',
fontSize: '14px',
fontFamily: 'inherit'
border: 'none',
outline: 'none',
boxShadow: 'none',
}}
/>
</div>
@ -882,10 +880,10 @@ const CartSummary: React.FC = () => {
<button
className="submit-button fill w-button"
onClick={handleSubmit}
disabled={summary.totalItems === 0 || isProcessing || !recipientName.trim() || !recipientPhone.trim()}
disabled={summary.totalItems === 0 || isProcessing || !recipientName.trim() || !recipientPhone.trim() || !consent}
style={{
opacity: (summary.totalItems === 0 || isProcessing || !recipientName.trim() || !recipientPhone.trim()) ? 0.5 : 1,
cursor: (summary.totalItems === 0 || isProcessing || !recipientName.trim() || !recipientPhone.trim()) ? 'not-allowed' : 'pointer'
opacity: (summary.totalItems === 0 || isProcessing || !recipientName.trim() || !recipientPhone.trim() || !consent) ? 0.5 : 1,
cursor: (summary.totalItems === 0 || isProcessing || !recipientName.trim() || !recipientPhone.trim() || !consent) ? 'not-allowed' : 'pointer'
}}
>
{isProcessing ? 'Оформляем заказ...' :
@ -896,7 +894,7 @@ const CartSummary: React.FC = () => {
{error && <div style={{ color: 'red', marginTop: 10 }}>{error}</div>}
{/* Кнопка "Назад" */}
<button
{/* <button
onClick={handleBackToStep1}
style={{
background: 'none',
@ -910,7 +908,7 @@ const CartSummary: React.FC = () => {
}}
>
← Назад к настройкам доставки
</button>
</button> */}
<div className="w-layout-hflex privacy-consent" style={{ cursor: 'pointer' }} onClick={() => setConsent((v) => !v)}>
<div