This commit is contained in:
Arthur Belleville 2025-10-10 11:30:13 +02:00
parent 374a1ec4b8
commit b3a7ced5c7
No known key found for this signature in database
18 changed files with 37 additions and 31 deletions

View file

@ -21,7 +21,13 @@ export const ClickOutside: React.FC<ClickOutsideProps> = ({
className,
disabled = false,
}) => {
const ref = useClickOutside<HTMLDivElement>(disabled ? () => {} : onClickOutside);
const ref = useClickOutside<HTMLDivElement>(
disabled
? () => {
// Do nothing
}
: onClickOutside
);
return (
<div ref={ref} className={className}>

View file

@ -4,10 +4,6 @@ import { Navigate, Outlet } from "react-router-dom";
import { match } from "ts-pattern";
import { LoadingSpinner } from "./LoadingSpinner";
interface ProtectedRouteProps {
fallback?: string;
}
interface ProtectedRouteProps {
fallback?: string;
shouldRedirectToCurrentPage?: boolean;

View file

@ -63,7 +63,9 @@ const tutorialSteps: TutorialStep[] = [
"Vous êtes maintenant prêt à utiliser XTablo ! Créez votre premier Tablo pour démarrer votre projet.",
target: "create-tablo-button",
position: "bottom",
action: () => {}, // Will be set by the parent component
action: () => {
// Do nothing
}, // Will be set by the parent component
},
];

View file

@ -15,7 +15,9 @@ export const useCreateFeedback = () => {
});
if (error) throw error;
},
onSuccess: () => {},
onSuccess: () => {
// Do nothing
},
});
return { createFeedback: mutate, isSuccess, isPending };

View file

@ -23,7 +23,9 @@ export const useCreateSupportTicket = () => {
});
if (error) throw error;
},
onSuccess: () => {},
onSuccess: () => {
// Do nothing
},
});
return { createSupportTicket: mutate, isSuccess, isPending };

View file

@ -123,7 +123,7 @@ export function PublicBookingPage() {
// Create first day of month and get its day of week in CET
const firstDayStr = `${year}-${String(month + 1).padStart(2, "0")}-01`;
const firstDay = new Date(firstDayStr + "T12:00:00");
const firstDay = new Date(`${firstDayStr}T12:00:00`);
const firstDayOfWeekInCET = new Date(
firstDay.toLocaleString("en-US", { timeZone: "Europe/Paris" })
).getDay();
@ -148,7 +148,7 @@ export function PublicBookingPage() {
2,
"0"
)}`;
days.push(new Date(dayStr + "T12:00:00"));
days.push(new Date(`${dayStr}T12:00:00`));
}
return days;

View file

@ -130,7 +130,7 @@ export const DevisPage = () => {
headerName: "TVA",
valueFormatter: (params) => {
if (params.value == null) return "";
return params.value.toFixed(2) + " €";
return `${params.value.toFixed(2)}`;
},
flex: 1,
},
@ -138,7 +138,7 @@ export const DevisPage = () => {
field: "total",
headerName: "Montant",
valueFormatter: (params) => {
return params.value.toFixed(2) + " €";
return `${params.value.toFixed(2)}`;
},
},
{

View file

@ -184,7 +184,7 @@ const createMockKanbanBoard = (tabloId: string, tabloName: string): KanbanBoardT
];
return {
id: "kanban-" + tabloId,
id: `kanban-${tabloId}`,
name: `${tabloName} Kanban Board`,
description: "Project task management board",
tablo_id: tabloId,

View file

@ -683,13 +683,10 @@ export const PlanningPage = () => {
<button
onClick={() => {
if (selectedTabloId === "all") {
navigate("/planning/create?date=" + currentDate.toISOString());
navigate(`/planning/create?date=${currentDate.toISOString()}`);
} else {
navigate(
"/planning/create?tablo_id=" +
selectedTabloId +
"&date=" +
currentDate.toISOString()
`/planning/create?tablo_id=${selectedTabloId}&date=${currentDate.toISOString()}`
);
}
}}

View file

@ -143,7 +143,6 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonWithAsChildProps
}
const {
asChild,
tooltip,
allowTooltipOnDisabled,
children,

View file

@ -14,7 +14,7 @@ export function useCopyToClipboard({ timeout = 2000 } = {}) {
setCopied(value);
};
const copy = (valueToCopy: any) => {
const copy = (valueToCopy: string) => {
if ("clipboard" in navigator) {
navigator.clipboard
.writeText(valueToCopy)

View file

@ -31,7 +31,7 @@ export const Link = React.forwardRef<HTMLAnchorElement, LinkWithAsChild>(functio
return <Slot className={linkStyle}>{props.children}</Slot>;
}
const { asChild, tooltip, ...rest } = props;
const { tooltip, ...rest } = props;
const link = (
<RACLink

View file

@ -50,13 +50,13 @@ export function Meter({
<path d="M12 17h.01" />
</svg>
)}
{" " + valueText}
{` ${valueText}`}
</span>
</div>
<div className="relative h-2 w-64 rounded-full bg-gray-300 outline outline-1 -outline-offset-1 outline-transparent dark:bg-zinc-800">
<div
className={`absolute left-0 top-0 h-full rounded-full ${getColor(percentage, { positive, informative })}`}
style={{ width: percentage + "%" }}
style={{ width: `${percentage}%` }}
/>
</div>
</>

View file

@ -20,7 +20,7 @@ export function NotificationBadge({
...props
}: NotificationBadgeProps) {
if (props.variant === "dot") {
const { variant, inline, ...rest } = props;
const { inline, ...rest } = props;
return (
<>
@ -41,7 +41,7 @@ export function NotificationBadge({
);
}
const { value, variant, inline, ...rest } = props;
const { inline, ...rest } = props;
return (
<>

View file

@ -24,7 +24,7 @@ export function ProgressBar({ label, ...props }: ProgressBarProps) {
<div className="relative h-2 w-64 overflow-hidden rounded-full bg-gray-300 outline outline-1 -outline-offset-1 outline-transparent dark:bg-zinc-700">
<div
className={`absolute top-0 h-full rounded-full bg-accent ${isIndeterminate ? "left-full duration-1000 ease-out animate-in slide-in-from-left-[20rem] repeat-infinite" : "left-0"}`}
style={{ width: (isIndeterminate ? 40 : percentage) + "%" }}
style={{ width: `${isIndeterminate ? 40 : percentage}%` }}
/>
</div>
</>

View file

@ -92,9 +92,9 @@ function getTrackHighlightStyle(
) {
const hasTwoThumbs = state.values.length == 2;
const highlightPercentage = hasTwoThumbs
? (state.getThumbPercent(1) - state.getThumbPercent(0)) * 100 + "%"
: state.getThumbPercent(0) * 100 + "%";
const highlightStartPosition = hasTwoThumbs ? state.getThumbPercent(0) * 100 + "%" : "0";
? `${(state.getThumbPercent(1) - state.getThumbPercent(0)) * 100}%`
: `${state.getThumbPercent(0) * 100}%`;
const highlightStartPosition = hasTwoThumbs ? `${state.getThumbPercent(0) * 100}%` : "0";
return orientation === "horizontal"
? {

View file

@ -81,7 +81,7 @@ export const generateICSFromEvents = (
const formatDate = (date: string, time: string) => {
// Combine date (YYYY-MM-DD) and time (HH:MM:SS) into ISO format then convert to UTC
const dateTime = new Date(`${date}T${time}`);
return dateTime.toISOString().replace(/[-:]/g, "").split(".")[0] + "Z";
return `${dateTime.toISOString().replace(/[-:]/g, "").split(".")[0]}Z`;
};
const escapeICSText = (text: string) => {
@ -131,7 +131,7 @@ export const generateICSFromEvents = (
"END:VEVENT",
].filter((line) => line !== ""); // Remove empty lines
icsContent += "\r\n" + eventLines.join("\r\n");
icsContent += `\r\n${eventLines.join("\r\n")}`;
});
icsContent += "\r\n" + "END:VCALENDAR";

View file

@ -1,4 +1,6 @@
/* eslint-disable */
// biome-ignore-all lint: workerd types
// Generated by Wrangler by running `wrangler types` (hash: 4c3222f3b88c589a38d89502fb4b6d06)
// Runtime types generated with workerd@1.20250709.0 2025-07-11
declare namespace Cloudflare {