Merge commit 'baabc72f5840bc882c1d7178129707a9ca1ea2ae'

This commit is contained in:
truthwing
2025-07-22 10:15:36 +09:00
5 changed files with 14 additions and 17 deletions
@@ -99,7 +99,7 @@ export default function ModalSimilarPage({ sply = 0, usageCd = '', money = 0 }:
selectArray={searchUseTypeList}
value={searchUseType.value}
onSelectValue={(val) => {
setSearchUseType({text: searchUseTypeList.find(item => item.val === val)?.text ?? '', value: val});
setSearchUseType({text: searchUseTypeList.find(item => item.val === val)?.text ?? '', value: val.toString()});
}}
className="w-[140px] ml-20"
label=""
@@ -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) => (
Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 169 KiB