fix build
All checks were successful
Build and Push Docker Image / build (push) Successful in 19s

This commit is contained in:
2026-03-29 14:12:09 -05:00
parent 7528b36c48
commit ba9f74afd5
3 changed files with 6 additions and 4 deletions

View File

@@ -33,6 +33,7 @@ export function Btn({
children,
variant = "primary",
type = "button",
size,
disabled,
onClick,
style,
@@ -40,6 +41,7 @@ export function Btn({
children: React.ReactNode;
variant?: "primary" | "danger" | "ghost";
type?: "button" | "submit" | "reset";
size?: "sm";
disabled?: boolean;
onClick?: () => void;
style?: React.CSSProperties;
@@ -47,9 +49,9 @@ export function Btn({
const base: React.CSSProperties = {
border: "none",
borderRadius: "var(--radius)",
padding: "8px 16px",
padding: size === "sm" ? "4px 10px" : "8px 16px",
fontWeight: 600,
fontSize: 13,
fontSize: size === "sm" ? 12 : 13,
cursor: disabled ? "not-allowed" : "pointer",
opacity: disabled ? 0.6 : 1,
};

View File

@@ -301,7 +301,7 @@ function emptyProduct() {
return { name: "", sku: "", price: "", categoryId: "", taxId: "", description: "" };
}
function f(key: string, set: React.Dispatch<React.SetStateAction<Record<string, string>>>) {
function f<T extends Record<string, string>>(key: keyof T, set: React.Dispatch<React.SetStateAction<T>>) {
return (e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>) =>
set((prev) => ({ ...prev, [key]: e.target.value }));
}

View File

@@ -61,7 +61,7 @@ export default function UsersPage() {
const openEdit = (user: User) => {
setSelected(user);
setForm({ name: user.name, email: user.email, password: "", roleId: user.role.id });
setForm({ name: user.name, email: user.email, password: "", roleId: user.role.id, vendorId: user.vendor?.id ?? "" });
setError("");
setModal("edit");
};