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

@@ -40,43 +40,50 @@ const DEFAULT_BACKGROUNDS: Array<{
{
value: "default",
label: "Neutre",
preview: "linear-gradient(135deg, oklch(0.985 0 0) 0%, oklch(0.97 0.005 260) 50%, oklch(0.985 0 0) 100%)",
preview:
"linear-gradient(135deg, oklch(0.985 0 0) 0%, oklch(0.97 0.005 260) 50%, oklch(0.985 0 0) 100%)",
description: "Fond neutre et élégant",
},
{
value: "gradient-blue",
label: "Océan",
preview: "linear-gradient(135deg, oklch(0.95 0.03 230) 0%, oklch(0.88 0.08 225) 50%, oklch(0.78 0.12 220) 100%)",
preview:
"linear-gradient(135deg, oklch(0.95 0.03 230) 0%, oklch(0.88 0.08 225) 50%, oklch(0.78 0.12 220) 100%)",
description: "Dégradé bleu apaisant",
},
{
value: "gradient-purple",
label: "Améthyste",
preview: "linear-gradient(135deg, oklch(0.95 0.04 300) 0%, oklch(0.88 0.1 295) 50%, oklch(0.78 0.15 290) 100%)",
preview:
"linear-gradient(135deg, oklch(0.95 0.04 300) 0%, oklch(0.88 0.1 295) 50%, oklch(0.78 0.15 290) 100%)",
description: "Dégradé violet sophistiqué",
},
{
value: "gradient-green",
label: "Forêt",
preview: "linear-gradient(135deg, oklch(0.95 0.04 160) 0%, oklch(0.88 0.1 155) 50%, oklch(0.78 0.14 150) 100%)",
preview:
"linear-gradient(135deg, oklch(0.95 0.04 160) 0%, oklch(0.88 0.1 155) 50%, oklch(0.78 0.14 150) 100%)",
description: "Dégradé vert naturel",
},
{
value: "gradient-orange",
label: "Aurore",
preview: "linear-gradient(135deg, oklch(0.97 0.03 80) 0%, oklch(0.92 0.08 60) 50%, oklch(0.85 0.14 45) 100%)",
preview:
"linear-gradient(135deg, oklch(0.97 0.03 80) 0%, oklch(0.92 0.08 60) 50%, oklch(0.85 0.14 45) 100%)",
description: "Dégradé orange chaleureux",
},
{
value: "solid-light",
label: "Lumineux",
preview: "linear-gradient(135deg, oklch(1 0 0) 0%, oklch(0.98 0.005 260) 100%)",
preview:
"linear-gradient(135deg, oklch(1 0 0) 0%, oklch(0.98 0.005 260) 100%)",
description: "Fond blanc épuré",
},
{
value: "solid-dark",
label: "Minuit",
preview: "linear-gradient(135deg, oklch(0.18 0.02 260) 0%, oklch(0.08 0.015 250) 100%)",
preview:
"linear-gradient(135deg, oklch(0.18 0.02 260) 0%, oklch(0.08 0.015 250) 100%)",
description: "Fond sombre immersif",
},
];
@@ -89,14 +96,14 @@ export function BackgroundCard() {
const currentSettings = useMemo<BackgroundSettings>(
() => backgroundSettings || { type: "default" },
[backgroundSettings]
[backgroundSettings],
);
const [customImageUrl, setCustomImageUrl] = useState(
currentSettings.customImageUrl || ""
currentSettings.customImageUrl || "",
);
const [showCustomInput, setShowCustomInput] = useState(
currentSettings.type === "custom-image"
currentSettings.type === "custom-image",
);
// Synchroniser customImageUrl avec les settings
@@ -112,7 +119,7 @@ export function BackgroundCard() {
const applyBackground = (settings: BackgroundSettings) => {
const root = document.documentElement;
const pageBackground = document.querySelector(
".page-background"
".page-background",
) as HTMLElement;
if (!pageBackground) return;
@@ -126,14 +133,14 @@ export function BackgroundCard() {
"bg-gradient-orange",
"bg-solid-light",
"bg-solid-dark",
"bg-custom-image"
"bg-custom-image",
);
if (settings.type === "custom-image" && settings.customImageUrl) {
pageBackground.classList.add("bg-custom-image");
root.style.setProperty(
"--custom-background-image",
`url(${settings.customImageUrl})`
`url(${settings.customImageUrl})`,
);
} else {
pageBackground.classList.add(`bg-${settings.type || "default"}`);
@@ -142,7 +149,7 @@ export function BackgroundCard() {
// Déclencher un événement personnalisé pour notifier les autres composants
window.dispatchEvent(
new CustomEvent("background-changed", { detail: settings })
new CustomEvent("background-changed", { detail: settings }),
);
};
@@ -222,7 +229,7 @@ export function BackgroundCard() {
"relative flex flex-col items-center justify-center p-4 rounded-lg border-2 cursor-pointer transition-all",
currentSettings.type === bg.value
? "border-primary bg-primary/5"
: "border-border hover:border-primary/50"
: "border-border hover:border-primary/50",
)}
>
<RadioGroupItem
@@ -245,7 +252,7 @@ export function BackgroundCard() {
"relative flex flex-col items-center justify-center p-4 rounded-lg border-2 cursor-pointer transition-all",
currentSettings.type === "custom-image"
? "border-primary bg-primary/5"
: "border-border hover:border-primary/50"
: "border-border hover:border-primary/50",
)}
>
<RadioGroupItem

View File

@@ -46,7 +46,7 @@ export function DangerZoneCard({
const result = await onDeduplicate();
if (result.deletedCount > 0) {
alert(
`${result.deletedCount} transaction${result.deletedCount > 1 ? "s" : ""} en double supprimée${result.deletedCount > 1 ? "s" : ""}`
`${result.deletedCount} transaction${result.deletedCount > 1 ? "s" : ""} en double supprimée${result.deletedCount > 1 ? "s" : ""}`,
);
} else {
alert("Aucun doublon trouvé");

View File

@@ -45,11 +45,12 @@ export function ReconcileDateRangeCard() {
setIsReconciling(true);
try {
const endDateStr = format(endDate, "yyyy-MM-dd");
const body: { endDate: string; startDate?: string; reconciled: boolean } = {
endDate: endDateStr,
reconciled: true,
};
const body: { endDate: string; startDate?: string; reconciled: boolean } =
{
endDate: endDateStr,
reconciled: true,
};
if (startDate) {
body.startDate = format(startDate, "yyyy-MM-dd");
}
@@ -69,7 +70,7 @@ export function ReconcileDateRangeCard() {
}
const result = await response.json();
// Invalider toutes les requêtes de transactions pour rafraîchir les données
invalidateAllTransactionQueries(queryClient);
@@ -118,7 +119,7 @@ export function ReconcileDateRangeCard() {
<>
{startDate ? (
<>
{format(startDate, "PPP", { locale: fr})} -{" "}
{format(startDate, "PPP", { locale: fr })} -{" "}
{format(endDate, "PPP", { locale: fr })}
</>
) : (
@@ -134,7 +135,10 @@ export function ReconcileDateRangeCard() {
<div className="p-3 flex gap-4">
<div className="space-y-2">
<label className="text-sm font-medium">
Date de début <span className="text-xs text-muted-foreground">(optionnel)</span>
Date de début{" "}
<span className="text-xs text-muted-foreground">
(optionnel)
</span>
</label>
<div className="scale-90 origin-top-left">
<CalendarComponent
@@ -233,8 +237,8 @@ export function ReconcileDateRangeCard() {
) : (
<>jusqu'au {format(endDate, "PPP", { locale: fr })}</>
)}{" "}
comme pointées. Seules les opérations non encore pointées seront
modifiées.
comme pointées. Seules les opérations non encore pointées
seront modifiées.
</>
)}
</AlertDialogDescription>
@@ -257,4 +261,3 @@ export function ReconcileDateRangeCard() {
</Card>
);
}

View File

@@ -70,7 +70,7 @@ export function ThemeCard() {
"relative flex flex-col items-center justify-center p-4 rounded-lg border-2 cursor-pointer transition-all",
currentTheme === themeOption.value
? "border-primary bg-primary/5"
: "border-border hover:border-primary/50"
: "border-border hover:border-primary/50",
)}
>
<RadioGroupItem