Merge remote-tracking branch 'origin/iipbs/wr/hasuReg' into iipbs/wr/gis
This commit is contained in:
@@ -3,7 +3,7 @@ import { CloudUpload, Paperclip } from "lucide-react";
|
||||
import { FileInput, FileUploader, FileUploaderContent, FileUploaderItem } from "./lib/file_upload";
|
||||
const dropZoneConfig = {
|
||||
maxFiles: 5,
|
||||
maxSize: 1024 * 1024 * 4,
|
||||
maxSize: 1024 * 1024 * 100,
|
||||
multiple: true,
|
||||
};
|
||||
|
||||
@@ -12,12 +12,18 @@ const dropZoneConfig = {
|
||||
files: File[]; // 파일 배열
|
||||
setFiles: (files: File[] | null) => void; // 파일 배열 세터
|
||||
fileTypes?: string; // 옵션 (파일 확장자 문자열)
|
||||
onFileClick?:(index:number)=> void; // 파일 클릭 핸들러
|
||||
onFileClick?:(index:number)=> void;
|
||||
maxFiles?: number; // 파일 클릭 핸들러
|
||||
|
||||
}
|
||||
|
||||
export const FileUpload =
|
||||
({ files, setFiles, fileTypes ,onFileClick}: FileUploadProps) => {
|
||||
({ files, setFiles, fileTypes ,onFileClick, maxFiles}: FileUploadProps) => {
|
||||
if(maxFiles){
|
||||
dropZoneConfig.maxFiles = maxFiles;
|
||||
if(maxFiles===1)
|
||||
dropZoneConfig.multiple = false;
|
||||
}
|
||||
return (
|
||||
<FileUploader
|
||||
value={files}
|
||||
|
||||
@@ -19,4 +19,5 @@ export * from "./tab";
|
||||
export * from "./table";
|
||||
export * from "./table_div";
|
||||
export * from "./title";
|
||||
export * from "./sdmInsertForm";
|
||||
export * from "./sdmInsertForm";
|
||||
export * from "./popover_ui"
|
||||
@@ -263,4 +263,4 @@ function Gis({
|
||||
);
|
||||
}
|
||||
|
||||
export default React.memo(Gis);
|
||||
export default React.memo(Gis);
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
import { Popover, PopoverContent, PopoverTrigger } from "@common/components/ui";
|
||||
|
||||
export default function PopoverUi({
|
||||
childrenTriger,
|
||||
childrenBody,
|
||||
bodyClassName
|
||||
}: {
|
||||
childrenTriger: React.ReactNode;
|
||||
childrenBody: React.ReactNode;
|
||||
bodyClassName:string
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<Popover>
|
||||
<PopoverTrigger>{childrenTriger}</PopoverTrigger>
|
||||
<PopoverContent className={bodyClassName}>
|
||||
{childrenBody}
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ const defaultValues: FormSchema = {
|
||||
bznmTotNo: '',
|
||||
daddr: '',
|
||||
telno: '',
|
||||
rgtr: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
||||
rgtr: '',
|
||||
dmdAplyPswd: '',
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user