// /* eslint-disable @typescript-eslint/no-explicit-any */ // 'use client'; // /* IMPORT */ // import { Button } from '@/components/ui/button'; // import { // Card, // CardContent, // CardDescription, // CardHeader, // CardTitle, // } from '@/components/ui/card'; // import { // createRegEvalCriteriaWithDetails, // getRegEvalCriteriaWithDetails, // modifyRegEvalCriteriaWithDetails, // } from '../service'; // import { // Form, // FormControl, // FormField, // FormItem, // FormLabel, // FormMessage, // } from '@/components/ui/form'; // import { Input } from '@/components/ui/input'; // import { Plus, Trash2 } from 'lucide-react'; // import { // REG_EVAL_CRITERIA_CATEGORY, // REG_EVAL_CRITERIA_CATEGORY2, // REG_EVAL_CRITERIA_ITEM, // type RegEvalCriteriaDetails, // type RegEvalCriteriaView, // } from '@/db/schema'; // import { ScrollArea } from '@/components/ui/scroll-area'; // import { // Select, // SelectContent, // SelectItem, // SelectTrigger, // SelectValue // } from '@/components/ui/select'; // import { // Sheet, // SheetContent, // SheetDescription, // SheetHeader, // SheetTitle, // } from '@/components/ui/sheet'; // import { Textarea } from '@/components/ui/textarea'; // import { toast } from 'sonner'; // import { useForm, useFieldArray } from 'react-hook-form'; // import { useEffect, useTransition } from 'react'; // import { z } from 'zod'; // import { zodResolver } from '@hookform/resolvers/zod'; // // ---------------------------------------------------------------------------------------------------- // /* TYPES */ // const regEvalCriteriaFormSchema = z.object({ // category: z.string().min(1, '평가부문은 필수 항목입니다.'), // category2: z.string().min(1, '점수구분은 필수 항목입니다.'), // item: z.string().min(1, '항목은 필수 항목입니다.'), // classification: z.string().min(1, '구분은 필수 항목입니다.'), // range: z.string().nullable().optional(), // remarks: z.string().nullable().optional(), // criteriaDetails: z.array( // z.object({ // id: z.number().optional(), // detail: z.string().min(1, '평가내용은 필수 항목입니다.'), // scoreEquipShip: z.coerce.number().nullable().optional(), // scoreEquipMarine: z.coerce.number().nullable().optional(), // scoreBulkShip: z.coerce.number().nullable().optional(), // scoreBulkMarine: z.coerce.number().nullable().optional(), // }) // ).min(1, '최소 1개의 평가 내용이 필요합니다.'), // }); // type RegEvalCriteriaFormData = z.infer; // interface CriteriaDetailFormProps { // index: number // form: any // onRemove: () => void // canRemove: boolean // disabled?: boolean // } // interface RegEvalCriteriaFormSheetProps { // open: boolean, // onOpenChange: (open: boolean) => void, // criteriaViewData: RegEvalCriteriaView | null, // onSuccess: () => void, // }; // // ---------------------------------------------------------------------------------------------------- // /* CRITERIA DETAIL FORM COPONENT */ // function CriteriaDetailForm({ // index, // form, // onRemove, // canRemove, // disabled = false, // }: CriteriaDetailFormProps) { // return ( // // //
// Detail Item - {index + 1} // {canRemove && ( // // )} //
//
// // ( // // )} // /> // ( // // 평가내용 // //