diff --git a/apps/cs/src/entities/posting/ui/posting-dialog.tsx b/apps/cs/src/entities/posting/ui/posting-dialog.tsx index bbddf9778..b742eee28 100644 --- a/apps/cs/src/entities/posting/ui/posting-dialog.tsx +++ b/apps/cs/src/entities/posting/ui/posting-dialog.tsx @@ -97,7 +97,7 @@ function PostingDialog({ postingType, postingTargets }: PostingDialogProps) { siteList && selectedRows.length === siteList.content.length; const postingPeriod = (siteId: string) => { - const periodCode = Number(rememberPeriodCode[siteId]); + const periodCode = parseInt(rememberPeriodCode[siteId] ?? ""); if (periodCode === 99) return "상시"; @@ -175,7 +175,9 @@ function PostingDialog({ postingType, postingTargets }: PostingDialogProps) { const handlePeriodCodeChange = (siteId: string) => (value: string) => { const from = dayjs().format("YYYY-MM-DD 00:00:00"); - const to = dayjs().add(Number(value), "day").format("YYYY-MM-DD 23:59:59"); + const to = dayjs() + .add(parseInt(value), "day") + .format("YYYY-MM-DD 23:59:59"); setRememberPeriodCode((prev) => ({ ...prev, @@ -272,7 +274,7 @@ function PostingDialog({ postingType, postingTargets }: PostingDialogProps) { onValueChange={handlePeriodCodeChange(site.siteId)} disabled={!selectedRows.includes(i)} /> - {!!Number(rememberPeriodCode[site.siteId]) && ( + {!!parseInt(rememberPeriodCode[site.siteId] ?? "") && ( {postingPeriod(site.siteId)} )} - {Number(rememberPeriodCode[site.siteId]) === 0 && ( + {parseInt(rememberPeriodCode[site.siteId] ?? "") === + 0 && ( handlePeriodDateChange(site.siteId)( diff --git a/apps/cs/src/pages/banner/ui/banner-form.tsx b/apps/cs/src/pages/banner/ui/banner-form.tsx index f4af75ffe..f99742ba5 100644 --- a/apps/cs/src/pages/banner/ui/banner-form.tsx +++ b/apps/cs/src/pages/banner/ui/banner-form.tsx @@ -50,7 +50,7 @@ function BannerForm({ form, bnrSn, ...props }: BannerFormProps) { }); const handleProgress = (percentage: string) => { - setProgress(Number(percentage)); + setProgress(parseInt(percentage)); }; const handleUploadResponse = async (res: HttpResponse) => { diff --git a/apps/cs/src/pages/banner/ui/modify-page.tsx b/apps/cs/src/pages/banner/ui/modify-page.tsx index c8a53c423..515eb7dca 100644 --- a/apps/cs/src/pages/banner/ui/modify-page.tsx +++ b/apps/cs/src/pages/banner/ui/modify-page.tsx @@ -39,7 +39,7 @@ function ModifyPage({ sequential }: { sequential: string }) { const { data: postHistory } = useQuery({ queryKey: [ENDPOINT.CMS_SERVICE.POSTINGS, sequential], queryFn: () => - PostingApi.getPostingHistory({ pstgTrgtNo: Number(sequential) }), + PostingApi.getPostingHistory({ pstgTrgtNo: parseInt(sequential) }), }); const { mutateAsync: updateBanner } = useMutation({ @@ -102,7 +102,7 @@ function ModifyPage({ sequential }: { sequential: string }) { diff --git a/apps/cs/src/pages/bbs/model/table-columns.tsx b/apps/cs/src/pages/bbs/model/table-columns.tsx index 6ae60fe73..296aaf7fe 100644 --- a/apps/cs/src/pages/bbs/model/table-columns.tsx +++ b/apps/cs/src/pages/bbs/model/table-columns.tsx @@ -37,7 +37,7 @@ export const columns: ColumnDef[] = [ }, { id: "actions", - header: "관리", + header: "게시물관리", cell: ({ row }) => , }, ]; diff --git a/apps/cs/src/pages/bbs/ui/bbs-form.tsx b/apps/cs/src/pages/bbs/ui/bbs-form.tsx index ac2b5ebd5..af8ed4f91 100644 --- a/apps/cs/src/pages/bbs/ui/bbs-form.tsx +++ b/apps/cs/src/pages/bbs/ui/bbs-form.tsx @@ -166,8 +166,10 @@ function BbsForm({ form, bbsId, ...props }: BbsFormProps) { value={field.value ?? ""} onChange={(e) => { const value = e.target.value; - if (isNaN(Number(value))) return; - field.onChange(value === "" ? null : Number(value)); + if (isNaN(parseInt(value))) return; + field.onChange( + value === "" ? null : parseInt(value), + ); }} className="w-[12rem] !text-[1.3rem]" placeholder="최대 개수 입력" @@ -195,8 +197,10 @@ function BbsForm({ form, bbsId, ...props }: BbsFormProps) { value={field.value ?? ""} onChange={(e) => { const value = e.target.value; - if (isNaN(Number(value))) return; - field.onChange(value === "" ? null : Number(value)); + if (isNaN(parseInt(value))) return; + field.onChange( + value === "" ? null : parseInt(value), + ); }} className="w-[12rem] !text-[1.3rem]" placeholder="최대 크기 입력" diff --git a/apps/cs/src/pages/bbs/ui/bbs-page.tsx b/apps/cs/src/pages/bbs/ui/bbs-page.tsx index 89562cb9c..58aa0191e 100644 --- a/apps/cs/src/pages/bbs/ui/bbs-page.tsx +++ b/apps/cs/src/pages/bbs/ui/bbs-page.tsx @@ -117,7 +117,7 @@ function BbsPage() { { - setContsVer(Number(value)); + setContsVer(parseInt(value)); }} > diff --git a/apps/cs/src/pages/file/model/table-columns.tsx b/apps/cs/src/pages/file/model/table-columns.tsx index 1974808f5..35d5507eb 100644 --- a/apps/cs/src/pages/file/model/table-columns.tsx +++ b/apps/cs/src/pages/file/model/table-columns.tsx @@ -30,7 +30,7 @@ export const createColumns = ( header: "파일크기", cell: ({ row }) => { const size = row.getValue("atflFlieSz"); - return size ? formatFileSize(Number(size)) : "0 Bytes"; + return size ? formatFileSize(size as number) : "0 Bytes"; }, }, diff --git a/apps/cs/src/pages/image/ui/image-form.tsx b/apps/cs/src/pages/image/ui/image-form.tsx index b334f1858..979ff931d 100644 --- a/apps/cs/src/pages/image/ui/image-form.tsx +++ b/apps/cs/src/pages/image/ui/image-form.tsx @@ -124,8 +124,8 @@ function ImageForm({ form, imgSn, ...props }: ImageFormProps) { value={field.value ?? ""} onChange={(e) => { const value = e.target.value; - if (isNaN(Number(value))) return; - field.onChange(Number(value)); + if (isNaN(parseInt(value))) return; + field.onChange(parseInt(value)); }} className="w-[12rem] !text-[1.3rem]" placeholder="정렬순서 입력" diff --git a/apps/cs/src/pages/image/ui/modify-page.tsx b/apps/cs/src/pages/image/ui/modify-page.tsx index 16163688e..e58bace78 100644 --- a/apps/cs/src/pages/image/ui/modify-page.tsx +++ b/apps/cs/src/pages/image/ui/modify-page.tsx @@ -36,7 +36,7 @@ function ModifyPage({ sequential }: { sequential: string }) { const { data: postHistory } = useQuery({ queryKey: [ENDPOINT.CMS_SERVICE.POSTINGS, sequential], queryFn: () => - PostingApi.getPostingHistory({ pstgTrgtNo: Number(sequential) }), + PostingApi.getPostingHistory({ pstgTrgtNo: parseInt(sequential) }), }); const { mutateAsync: updateImage } = useMutation({ @@ -98,7 +98,7 @@ function ModifyPage({ sequential }: { sequential: string }) { diff --git a/apps/cs/src/pages/module/ui/modify-page.tsx b/apps/cs/src/pages/module/ui/modify-page.tsx index 8eff7f0a8..e22fd988a 100644 --- a/apps/cs/src/pages/module/ui/modify-page.tsx +++ b/apps/cs/src/pages/module/ui/modify-page.tsx @@ -40,7 +40,7 @@ function ModifyPage({ sequential }: { sequential: string }) { diff --git a/apps/cs/src/pages/module/ui/module-form.tsx b/apps/cs/src/pages/module/ui/module-form.tsx index 4c0fdafbc..8ee685407 100644 --- a/apps/cs/src/pages/module/ui/module-form.tsx +++ b/apps/cs/src/pages/module/ui/module-form.tsx @@ -115,8 +115,8 @@ function ModuleForm({ form, authorizationNo, ...props }: BannerFormProps) { value={field.value ?? ""} onChange={(e) => { const value = e.target.value; - if (isNaN(Number(value))) return; - field.onChange(Number(value)); + if (isNaN(parseInt(value))) return; + field.onChange(parseInt(value)); }} className="w-[12rem] !text-[1.3rem]" placeholder="정렬순서 입력" diff --git a/apps/cs/src/pages/organization/ui/organization-form.tsx b/apps/cs/src/pages/organization/ui/organization-form.tsx index 4ddb94a57..438ed3549 100644 --- a/apps/cs/src/pages/organization/ui/organization-form.tsx +++ b/apps/cs/src/pages/organization/ui/organization-form.tsx @@ -119,7 +119,7 @@ function OrganizationForm({ type="number" value={field.value ?? 0} onChange={(e) => - field.onChange(Number(e.target.value)) + field.onChange(parseInt(e.target.value)) } className="!text-[1.3rem]" placeholder="정렬순서를 입력해주세요" diff --git a/apps/cs/src/pages/organization/ui/user-organization-section.tsx b/apps/cs/src/pages/organization/ui/user-organization-section.tsx index a3e4c5f68..60e401562 100644 --- a/apps/cs/src/pages/organization/ui/user-organization-section.tsx +++ b/apps/cs/src/pages/organization/ui/user-organization-section.tsx @@ -335,7 +335,7 @@ const UserCells = memo( min={0} defaultValue={user.sortSeq} onChange={(e) => - updateFormValue(index, "sortSeq")(Number(e.target.value)) + updateFormValue(index, "sortSeq")(parseInt(e.target.value)) } className="w-[6rem] !text-[1.3rem]" /> diff --git a/apps/cs/src/pages/template/ui/modify-page.tsx b/apps/cs/src/pages/template/ui/modify-page.tsx index 987725c7a..9209c0943 100644 --- a/apps/cs/src/pages/template/ui/modify-page.tsx +++ b/apps/cs/src/pages/template/ui/modify-page.tsx @@ -49,7 +49,7 @@ function ModifyPage({ sequential }: { sequential: string }) { diff --git a/apps/cs/src/pages/terms/ui/modify-page.tsx b/apps/cs/src/pages/terms/ui/modify-page.tsx index 61522c2eb..bdfd176a4 100644 --- a/apps/cs/src/pages/terms/ui/modify-page.tsx +++ b/apps/cs/src/pages/terms/ui/modify-page.tsx @@ -45,7 +45,7 @@ function ModifyPage({ sequential }: { sequential: string }) { diff --git a/apps/cs/src/shared/lib/use-tus.ts b/apps/cs/src/shared/lib/use-tus.ts index fdaeb1f65..30976c23b 100644 --- a/apps/cs/src/shared/lib/use-tus.ts +++ b/apps/cs/src/shared/lib/use-tus.ts @@ -34,7 +34,7 @@ export const useTus = () => { }, onProgress(bytesUploaded, bytesTotal) { const percentage = ((bytesUploaded / bytesTotal) * 100).toFixed(2); - setProgress(Number(percentage)); + setProgress(parseInt(percentage)); }, onAfterResponse(req, res) { const fileInfo = res.getHeader("X-File-Info");