From 1926d53da62813978309b70ac7694334b561a78f Mon Sep 17 00:00:00 2001 From: truthwing Date: Mon, 14 Jul 2025 14:31:32 +0900 Subject: [PATCH] =?UTF-8?q?lib=20=ED=8F=B4=EB=8D=94=20=EB=B9=8C=EB=93=9C?= =?UTF-8?q?=20=EC=98=A4=EB=A5=98=20=ED=95=B4=EA=B2=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/components/lib/api/index.ts | 2 +- apps/wr/components/lib/func/TableData.tsx | 1 - apps/wr/components/lib/func/commom.tsx | 4 ++-- apps/wr/components/lib/useTus_wr/useTusWr.tsx | 21 ++++++++----------- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/apps/wr/components/lib/api/index.ts b/apps/wr/components/lib/api/index.ts index bf2c01683..8772959e1 100644 --- a/apps/wr/components/lib/api/index.ts +++ b/apps/wr/components/lib/api/index.ts @@ -1,6 +1,6 @@ //8880 -import { CS_URL, DEV_URL_FO, DEV_URL_WR, LOCAL_URL } from "../config/"; +import { DEV_URL_FO, DEV_URL_WR, LOCAL_URL } from "../config/"; export const fetchType = { COMMON: "common", WR: "wr", LOCAL: "LOCAL" , CS: "CS" }; diff --git a/apps/wr/components/lib/func/TableData.tsx b/apps/wr/components/lib/func/TableData.tsx index 2046bd15e..ab6aa98d6 100644 --- a/apps/wr/components/lib/func/TableData.tsx +++ b/apps/wr/components/lib/func/TableData.tsx @@ -2,7 +2,6 @@ import type { TableUpperProps } from "@/app/store/common/type/header"; import type { rainChkZodType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn"; import type { rswtChkZodType } from "@/app/store/prfmncReg/chkgdnReg/rswrtChkgdn"; import { Checkbox, Input, TableCell, TableRow } from "@common/components/ui"; -import { useEffect } from "react"; export const rainChkTableData = (chkData: rainChkZodType[]) => { // 1. chkgdnFk + utztnUsgCd 기준 누계 정보 만들기 diff --git a/apps/wr/components/lib/func/commom.tsx b/apps/wr/components/lib/func/commom.tsx index 6d96b3540..5c2ce97ff 100644 --- a/apps/wr/components/lib/func/commom.tsx +++ b/apps/wr/components/lib/func/commom.tsx @@ -1,9 +1,9 @@ import type { comCodeState } from "@/app/store/common/code"; import { filePickedBlob, - type SelectDataType, - type ReturnType, filePickedBlobArray, + type ReturnType, + type SelectDataType, type SheetParameter, } from "@common/business_components/ui"; import { Button } from "@common/components/ui"; diff --git a/apps/wr/components/lib/useTus_wr/useTusWr.tsx b/apps/wr/components/lib/useTus_wr/useTusWr.tsx index aca2b1fb6..c7580f84f 100644 --- a/apps/wr/components/lib/useTus_wr/useTusWr.tsx +++ b/apps/wr/components/lib/useTus_wr/useTusWr.tsx @@ -1,15 +1,14 @@ +import type { FilesType } from "@/components/ui/form/fcltReg/pbnstReg/mngReg/mngRegForm"; +import toast from "react-hot-toast"; import { Upload, + type DetailedError, type HttpRequest, type HttpResponse, type OnSuccessPayload, - type DetailedError, } from "tus-js-client"; -import { CS_TUS_UPLOAD, CS_URL } from "../config"; -import type { FilesType } from "@/components/ui/form/fcltReg/pbnstReg/mngReg/mngRegForm"; import { fetchType, putFectch } from "../api"; -import { error } from "console"; -import toast from "react-hot-toast"; +import { CS_TUS_UPLOAD } from "../config"; type UploadOptions = { handleUploadStart?: (upload: Upload) => void; @@ -26,16 +25,14 @@ export type ReturnFileType = { lnkgDmnId: string | null; lnkgDmnNm: string | null; regDt: Date | null; - atflCd: String; + atflCd: string; atflSn: number; - atflId: String; - physFileNm: String; + atflId: string; + physFileNm: string; }; export const TusClientUpload = (oFile: FilesType, options?: UploadOptions) => new Promise((resolve, reject) => { try { - const Authorization = "Authorization"; - const AUTH_USER_ID = "token-id"; let fileInfo: string | undefined; //CS_URL const uploader = new Upload(oFile.file, { @@ -77,10 +74,10 @@ export const TusClientUpload = (oFile: FilesType, options?: UploadOptions) => WrTableInfo, fetchType.CS ) - .then((res) => { + .then(() => { resolve(fileParse); }) - .catch((error) => { + .catch(() => { reject({ causingError: { cause: "파일 업로드 업데이트 실패",