chore: update
This commit is contained in:
@@ -11,6 +11,7 @@ import './Checkout.css';
|
||||
// ============================================
|
||||
interface ConfirmationData {
|
||||
command_id: number;
|
||||
client_order_number?: number;
|
||||
assigned_to?: {
|
||||
username: string;
|
||||
distance_km?: number;
|
||||
@@ -267,6 +268,7 @@ function Checkout() {
|
||||
if (response.success && response.payment_method === 'crypto') {
|
||||
setCryptoPaymentData({
|
||||
command_id: response.command_id!,
|
||||
client_order_number: (response as any).client_order_number,
|
||||
payment_status: response.payment_status!,
|
||||
pay_address: response.pay_address!,
|
||||
pay_amount: response.pay_amount!,
|
||||
@@ -325,6 +327,7 @@ function Checkout() {
|
||||
// ✅ Préparer les données pour le modal
|
||||
setConfirmationData({
|
||||
command_id,
|
||||
client_order_number: (response as any).client_order_number,
|
||||
assigned_to,
|
||||
queue_info,
|
||||
delivery_address: delivery_address || address,
|
||||
@@ -537,6 +540,17 @@ function Checkout() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="checkout-telegram-note">
|
||||
<i className="fab fa-telegram" />
|
||||
<div>
|
||||
<strong>Compte Telegram requis</strong>
|
||||
<p>
|
||||
Votre commande ne pourra être validée que si votre compte Telegram est lié.
|
||||
Rendez-vous dans votre <a href="/user/profil">profil</a> pour le lier avant de confirmer.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="form-actions">
|
||||
<button
|
||||
type="button"
|
||||
@@ -565,14 +579,14 @@ function Checkout() {
|
||||
{showCryptoModal && cryptoPaymentData && (
|
||||
<div className="confirmation-modal-overlay">
|
||||
<div className="confirmation-modal">
|
||||
<div className="confirmation-modal-header" style={{ background: 'linear-gradient(135deg, #f7931a, #c2620a)' }}>
|
||||
<div className="confirmation-modal-header confirmation-modal-header--crypto">
|
||||
<i className="fas fa-coins confirmation-icon" />
|
||||
<h2>Paiement Crypto</h2>
|
||||
</div>
|
||||
<div className="confirmation-modal-body">
|
||||
<div className="confirmation-section">
|
||||
<div className="confirmation-section-title">
|
||||
<i className="fas fa-receipt icon" /> Commande #{cryptoPaymentData.command_id}
|
||||
<i className="fas fa-receipt icon" /> Commande #{cryptoPaymentData.client_order_number ?? cryptoPaymentData.command_id}
|
||||
</div>
|
||||
<div className="confirmation-detail">
|
||||
<strong>Statut :</strong>{' '}
|
||||
@@ -627,7 +641,7 @@ function Checkout() {
|
||||
)}
|
||||
</div>
|
||||
<div className="confirmation-modal-actions">
|
||||
<button className="confirmation-button" style={{ background: '#374151' }} onClick={handleCryptoModalClose}>
|
||||
<button className="confirmation-button confirmation-button--neutral" onClick={handleCryptoModalClose}>
|
||||
<i className="fas fa-location-arrow" /> Suivre ma commande
|
||||
</button>
|
||||
</div>
|
||||
@@ -641,22 +655,22 @@ function Checkout() {
|
||||
{showZoneModal && (
|
||||
<div className="confirmation-modal-overlay" onClick={() => setShowZoneModal(false)}>
|
||||
<div className="confirmation-modal" onClick={(e) => e.stopPropagation()}>
|
||||
<div className="confirmation-modal-header" style={{ background: 'linear-gradient(135deg, #dc2626, #991b1b)' }}>
|
||||
<div className="confirmation-modal-header confirmation-modal-header--error">
|
||||
<i className="fas fa-map-marker-alt confirmation-icon"></i>
|
||||
<h2>Zone non desservie</h2>
|
||||
</div>
|
||||
<div className="confirmation-modal-body">
|
||||
<div className="confirmation-section">
|
||||
<div className="confirmation-detail" style={{ textAlign: 'center', padding: '1rem 0' }}>
|
||||
<p style={{ fontSize: '1rem', marginBottom: '0.75rem' }}>{zoneErrorMsg}</p>
|
||||
<p style={{ color: '#9ca3af', fontSize: '0.875rem' }}>
|
||||
<div className="confirmation-detail confirmation-detail--centered">
|
||||
<p style={{ marginBottom: '0.75rem' }}>{zoneErrorMsg}</p>
|
||||
<p className="confirmation-detail--muted">
|
||||
Vérifiez l'adresse saisie ou contactez-nous pour connaître les zones de livraison disponibles.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="confirmation-modal-actions">
|
||||
<button className="confirmation-button" style={{ background: '#374151' }} onClick={() => setShowZoneModal(false)}>
|
||||
<button className="confirmation-button confirmation-button--neutral" onClick={() => setShowZoneModal(false)}>
|
||||
<i className="fas fa-arrow-left"></i> Modifier l'adresse
|
||||
</button>
|
||||
</div>
|
||||
@@ -685,7 +699,7 @@ function Checkout() {
|
||||
Détails de la commande
|
||||
</div>
|
||||
<div className="confirmation-detail">
|
||||
<strong>Numéro:</strong> #{confirmationData.command_id}
|
||||
<strong>Numéro:</strong> #{confirmationData.client_order_number ?? confirmationData.command_id}
|
||||
</div>
|
||||
<div className="confirmation-detail">
|
||||
<strong>Date:</strong> {new Date().toLocaleString('fr-FR')}
|
||||
|
||||
Reference in New Issue
Block a user