260728_02_ENH: SID String으로 교체

This commit is contained in:
2026-07-28 11:47:33 +09:00
parent d97015741a
commit d9f53c0c3d
18 changed files with 151 additions and 54 deletions

View File

@@ -15,7 +15,7 @@ export function usePagination({ currentPage, totalPages, paginationItemsToDispla
const visibleCount = Math.max(1, paginationItemsToDisplay)
const half = Math.floor(visibleCount / 2)
let startPage = Math.max(1, currentPage - half)
let endPage = Math.min(totalPages, startPage + visibleCount - 1)
const endPage = Math.min(totalPages, startPage + visibleCount - 1)
if (endPage - startPage + 1 < visibleCount) {
startPage = Math.max(1, endPage - visibleCount + 1)

View File

@@ -15,7 +15,7 @@ export type ReservationListDialogProps = {
}
// 오늘과 가장 가까운(과거/미래 무관) 예약의 sid를 찾는다.
export const findClosestReservationSid = (reservations: ListReserve[], now: Date = new Date()): number | null => {
export const findClosestReservationSid = (reservations: ListReserve[], now: Date = new Date()): string | null => {
if (reservations.length === 0) return null
return reservations.reduce((closest, current) => {
@@ -45,8 +45,8 @@ const ReservationListDialog = ({
hideDialog(dialogId)
}
const handleSelect = (sid: number) => {
onSelectReservation(String(sid))
const handleSelect = (sid: string) => {
onSelectReservation(sid)
handleOpenChange(false)
}

View File

@@ -123,7 +123,7 @@ const SingleMessageSendDialog = ({
tmplatIdx: templateIdx,
resve: scheduleType === 'reserve',
sendDt: scheduleType === 'reserve' ? new Date(reserveAt).toISOString() : undefined,
sid: Number(sid),
sid,
destHeaderIds: [destHeaderId],
})

View File

@@ -124,7 +124,7 @@ const ContactEventSection = ({
const isContactType = resultCodeType === ResultCodeType.CONTACT
const historyQuery = useListEventHistoryQuery(prjctIdx, sid, true)
const ctiLastCallHistId = useCtiLastCallHistId(prjctIdx, Number(sid))
const ctiLastCallHistId = useCtiLastCallHistId(prjctIdx, sid)
const listCallHistIdx = isContactType ? ctiLastCallHistId : null
const handleResultCdChange = (next: string) => {
@@ -309,7 +309,7 @@ const ListContactEventPanel = ({
await addListEventMutation.mutateAsync({
prjctIdx,
sid: Number(sid),
sid,
resultCodeType,
resultCd,
listCallHistIdx,
@@ -321,7 +321,7 @@ const ListContactEventPanel = ({
})
if (resveDt) {
await reserveMutation.mutateAsync({ prjctIdx, sid: Number(sid), userId, resveDt })
await reserveMutation.mutateAsync({ prjctIdx, sid, userId, resveDt })
}
alert('등록되었습니다.')

View File

@@ -156,7 +156,7 @@ const ListContactInfoPanel = ({
}
if (!telNum) return
ctiClient.makeCall({ dialNumber: telNum, prjctIdx, sid: Number(sid), listHderId, aniNumber: callerTelNum ?? '' })
ctiClient.makeCall({ dialNumber: telNum, prjctIdx, sid, listHderId, aniNumber: callerTelNum ?? '' })
}
const handlePickFile = (listHderId: number) => {