빌드에러수정

This commit is contained in:
YangJinSoo94
2025-07-21 15:29:08 +09:00
parent 7a24c10f3d
commit baabc72f58
4 changed files with 13 additions and 16 deletions
@@ -123,7 +123,7 @@ export default function ModalSimilarPage({ sply = 0, usageCd = '', money = 0 }:
className={`${head.align === 'right' ? 'text-right' : head.align === 'center' ? 'text-center' : typeof el[head.id as keyof SimilarCaseType] === 'number' ? 'text-right' : 'text-center'} cursor-pointer`}
key={`similar-case-cell-${head.id}-${index}-${el.ruseBizNm}`}
rowSpan={(head.id === 'businessName' || head.id ==='businessDuration' || head.id === 'money') ? rowSpans[index] : undefined}
style={(head.id === 'businessName' || head.id === 'businessDuration' || head.id === 'money') && index > 0 && similarCaseList[index - 1]?.businessName === el.businessName ? { display: 'none' } : undefined}
style={(head.id === 'businessName' || head.id === 'businessDuration' || head.id === 'money') && index > 0 && similarCaseList[index - 1]?.ruseBizNm === el.ruseBizNm ? { display: 'none' } : undefined}
onClick={() => handleCellClick(index, head.id)}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
@@ -185,7 +185,8 @@ function SdmInfoInsertContent() {
dmdAplyPswd: "",
index: 0,
reqDt: "",
dmdInfoSn: 0
dmdInfoSn: 0,
status : '',
};
await insertSdmInfoData(apiData);
+4 -2
View File
@@ -41,9 +41,11 @@ export default function MyForm() {
}, [getDemandCompList]);
const handleInsertSdmData = useCallback((data: import('@common/business_components/ui/sdmInsertForm/form').DemandCompType) => {
const convertedData: import('@/app/store/sdmMng').DemandCompType = {
const convertedData: DemandCompType = {
...data,
dmdInfoSn: ''
dmdInfoSn: '',
dmdInfoFk: '',
status: '',
};
formDataRef.current = convertedData;
insertSdmData(convertedData).catch(error => {
@@ -1,11 +1,10 @@
import * as React from "react";
import type { ReactNode } from "react";
import type { ControllerRenderProps, FieldError, FieldValues } from "react-hook-form";
import { FormUi } from "@common/business_components/ui";
import type { ReactNode } from "react";
import type { ControllerRenderProps, FieldError, FieldValues, Path } from "react-hook-form";
interface AccessibleFormFieldProps<T extends FieldValues> {
field: ControllerRenderProps<T, any>;
field: ControllerRenderProps<T, Path<T>>;
label: string;
required?: boolean;
error?: FieldError;
@@ -19,15 +18,10 @@ export function AccessibleFormField<T extends FieldValues>({
error,
inputComponent,
}: AccessibleFormFieldProps<T>) {
const labelText = required ? `${label} *` : label;
return (
<FormUi
label={
<span>
<span className="text-black">{label}</span>
{required && <span className="text-red-500">&nbsp;*</span>}
</span>
}
>
<FormUi label={labelText}>
<div>
{inputComponent}
{error?.message && Array.from(new Set(error.message.split('\n'))).map((msg, idx) => (