Update FamilyDetail.tsx

This commit is contained in:
2026-01-10 00:13:43 +01:00
committed by GitHub
parent c3f034d9de
commit ffdfcddf4a

View File

@@ -3,7 +3,7 @@ import React, { useEffect, useState, useMemo } from 'react';
import { useParams, useNavigate } from 'react-router-dom'; import { useParams, useNavigate } from 'react-router-dom';
import { CondoService } from '../services/mockDb'; import { CondoService } from '../services/mockDb';
import { Family, Payment, AppSettings, MonthStatus, PaymentStatus, Condo } from '../types'; import { Family, Payment, AppSettings, MonthStatus, PaymentStatus, Condo } from '../types';
import { ArrowLeft, CheckCircle2, AlertCircle, Plus, Calendar, CreditCard, TrendingUp } from 'lucide-react'; import { ArrowLeft, CheckCircle2, AlertCircle, Plus, Calendar, CreditCard, TrendingUp, Euro, Building as BuildingIcon } from 'lucide-react';
import { PayPalScriptProvider, PayPalButtons } from "@paypal/react-paypal-js"; import { PayPalScriptProvider, PayPalButtons } from "@paypal/react-paypal-js";
const MONTH_NAMES = [ const MONTH_NAMES = [
@@ -471,15 +471,18 @@ export const FamilyDetail: React.FC = () => {
<div> <div>
<label className="block text-sm font-semibold text-slate-700 mb-1.5">Importo (€)</label> <label className="block text-sm font-semibold text-slate-700 mb-1.5">Importo (€)</label>
<div className="relative">
<Euro className="absolute left-3 top-3.5 w-5 h-5 text-slate-400" />
<input <input
type="number" type="number"
step="0.01" step="0.01"
required required
value={newPaymentAmount} value={newPaymentAmount}
onChange={(e) => setNewPaymentAmount(parseFloat(e.target.value))} onChange={(e) => setNewPaymentAmount(parseFloat(e.target.value))}
className="w-full border border-slate-300 rounded-xl p-3 focus:ring-2 focus:ring-blue-500 outline-none text-lg font-medium" className="w-full border border-slate-300 rounded-xl p-3 pl-10 focus:ring-2 focus:ring-blue-500 outline-none text-lg font-medium"
/> />
</div> </div>
</div>
<div className="pt-2 flex gap-3"> <div className="pt-2 flex gap-3">
<button <button
@@ -563,6 +566,3 @@ export const FamilyDetail: React.FC = () => {
); );
}; };
const BuildingIcon = ({className}:{className?:string}) => (
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className={className}><rect width="16" height="20" x="4" y="2" rx="2" ry="2"/><path d="M9 22v-4h6v4"/><path d="M8 6h.01"/><path d="M16 6h.01"/><path d="M8 10h.01"/><path d="M16 10h.01"/><path d="M8 14h.01"/><path d="M16 14h.01"/></svg>
);