260320:1131 Refactor Overrall #01
Build and Deploy / deploy (push) Has been cancelled

This commit is contained in:
admin
2026-03-20 11:31:27 +07:00
parent f1b81a7d0d
commit 1d3479770b
147 changed files with 1745 additions and 1567 deletions
@@ -29,16 +29,16 @@ const formSchema = z.object({
type VoidReplaceFormData = z.infer<typeof formSchema>;
export function VoidReplaceForm({ projectId = 1 }: { projectId?: number }) {
export function VoidReplaceForm({ projectId = 1 }: { projectId?: number | string }) {
const [loading, setLoading] = useState(false);
const form = useForm<VoidReplaceFormData>({
resolver: zodResolver(formSchema) as any,
resolver: zodResolver(formSchema) as any, // eslint-disable-line @typescript-eslint/no-explicit-any -- zod 4 + @hookform/resolvers compat
defaultValues: {
documentNumber: "",
reason: "",
replace: false,
projectId: projectId
projectId: Number(projectId)
},
});
@@ -53,7 +53,6 @@ export function VoidReplaceForm({ projectId = 1 }: { projectId?: number }) {
form.reset();
} catch (error) {
toast.error("Failed to void number. Check if it exists.");
console.error(error);
} finally {
setLoading(false);
}