Showing 10 of 10 total issues
File CreateScheduleExceptionSheet.tsx
has 299 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { zodResolver } from "@hookform/resolvers/zod";import { useMutation, useQueryClient } from "@tanstack/react-query";import { isAfter, isBefore, parse } from "date-fns";import { useQueryParams } from "raviger";import { useEffect } from "react";
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
<FormField control={form.control} name="valid_from" render={({ field }) => ( <FormItem>
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
<FormField control={form.control} name="valid_to" render={({ field }) => ( <FormItem>
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
<FormField control={form.control} name="end_time" render={({ field }) => ( <FormItem>
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
<FormField control={form.control} name="start_time" render={({ field }) => ( <FormItem>
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 14 locations. Consider refactoring. Open
<SheetHeader> <SheetTitle>{t("add_schedule_exceptions")}</SheetTitle> <SheetDescription> {t("add_schedule_exceptions_description")} </SheetDescription>
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
useEffect(() => { if (qParams.valid_to) { form.setValue("valid_to", new Date(qParams.valid_to)); } }, [qParams.valid_to, form]);
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 2 locations. Consider refactoring. Open
useEffect(() => { if (qParams.valid_from) { form.setValue("valid_from", new Date(qParams.valid_from)); } }, [qParams.valid_from, form]);
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 8 locations. Consider refactoring. Open
end_time: z .string() .min(1, t("field_required")) as unknown as z.ZodType<Time>,
- Read upRead up
- Create a ticketCreate a ticket
Similar blocks of code found in 8 locations. Consider refactoring. Open
start_time: z .string() .min(1, t("field_required")) as unknown as z.ZodType<Time>,
- Read upRead up
- Create a ticketCreate a ticket