refactor: standardize quotation marks in pnpm-lock.yaml and improve code formatting across various components; enhance readability and maintain consistency in code style

This commit is contained in:
Julien Froidefond
2025-12-23 11:42:02 +01:00
parent 01c1f25de2
commit c57daa9cc8
42 changed files with 4722 additions and 2758 deletions

View File

@@ -55,7 +55,8 @@ export function AccountCard({
const isMobile = useIsMobile();
const Icon = accountTypeIcons[account.type];
const realBalance = getAccountBalance(account);
const hasBalanceDifference = calculatedBalance !== undefined &&
const hasBalanceDifference =
calculatedBalance !== undefined &&
Math.abs(account.balance - calculatedBalance) > 0.01;
const {
@@ -200,7 +201,8 @@ export function AccountCard({
</span>
{hasBalanceDifference && (
<span className="text-xs text-destructive font-semibold">
(diff: {formatCurrency(account.balance - calculatedBalance)})
(diff: {formatCurrency(account.balance - calculatedBalance)}
)
</span>
)}
</div>

View File

@@ -137,7 +137,8 @@ export function AccountEditDialog({
placeholder="0.00"
/>
<p className="text-xs text-muted-foreground">
Solde de départ pour équilibrer le compte. Le balance sera calculé automatiquement (solde total - solde initial).
Solde de départ pour équilibrer le compte. Le balance sera calculé
automatiquement (solde total - solde initial).
</p>
</div>
<div className="space-y-2">

View File

@@ -54,7 +54,11 @@ export function AccountMergeSelectDialog({
}
const handleMerge = async () => {
if (!sourceAccountId || !targetAccountId || sourceAccountId === targetAccountId) {
if (
!sourceAccountId ||
!targetAccountId ||
sourceAccountId === targetAccountId
) {
return;
}
@@ -105,13 +109,20 @@ export function AccountMergeSelectDialog({
<div className="space-y-3">
<Label>Compte à conserver (destination)</Label>
<RadioGroup value={targetAccountId} onValueChange={setTargetAccountId}>
<RadioGroup
value={targetAccountId}
onValueChange={setTargetAccountId}
>
{selectedAccounts.map((account) => (
<div
key={account.id}
className="flex items-start space-x-3 rounded-lg border p-3 hover:bg-accent"
>
<RadioGroupItem value={account.id} id={account.id} className="mt-1" />
<RadioGroupItem
value={account.id}
id={account.id}
className="mt-1"
/>
<Label
htmlFor={account.id}
className="flex-1 cursor-pointer space-y-1"
@@ -120,7 +131,9 @@ export function AccountMergeSelectDialog({
<div className="text-xs text-muted-foreground space-y-0.5">
<div>Numéro: {account.accountNumber}</div>
<div>Bank ID: {account.bankId}</div>
<div>Solde: {formatCurrency(getAccountBalance(account))}</div>
<div>
Solde: {formatCurrency(getAccountBalance(account))}
</div>
</div>
</Label>
</div>
@@ -133,9 +146,9 @@ export function AccountMergeSelectDialog({
<AlertTriangle className="h-4 w-4" />
<AlertDescription>
<strong>Attention :</strong> Toutes les transactions du compte "
{sourceAccount.name}" seront déplacées vers "{targetAccount.name}". Le
compte "{sourceAccount.name}" sera supprimé après la fusion. Cette
action est irréversible.
{sourceAccount.name}" seront déplacées vers "
{targetAccount.name}". Le compte "{sourceAccount.name}" sera
supprimé après la fusion. Cette action est irréversible.
</AlertDescription>
</Alert>
)}
@@ -153,4 +166,3 @@ export function AccountMergeSelectDialog({
</Dialog>
);
}