fix: 버그 수정 4건

- 한진택배 UNKNOWN 테이블 헤더 이벤트 필터링
- 다이얼로그 수정 상태 초기화 (parcelId 변경 시)
- 모바일 수정 input 오버플로우 수정 (min-w-0)
- 이벤트 시간 KST 변환 수정 (toMysqlDatetime)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
caadiq 2026-03-28 18:11:28 +09:00
parent 256014833c
commit 54a785c149
4 changed files with 33 additions and 15 deletions

View file

@ -66,8 +66,9 @@ async function trackerPlugin(fastify) {
return null;
}
// 이벤트 정리
const events = (trackInfo.events?.edges || []).map((edge) => {
// 이벤트 정리 (한진택배 테이블 헤더 필터링)
const events = (trackInfo.events?.edges || [])
.map((edge) => {
const node = edge.node;
return {
status: node.status?.code || 'UNKNOWN',
@ -76,6 +77,13 @@ async function trackerPlugin(fastify) {
location: node.location?.name || '',
time: node.time || null,
};
})
.filter((event) => {
if (event.status === 'UNKNOWN' &&
(event.description === '배송 진행상황' || event.location === '상품위치')) {
return false;
}
return true;
});
// 마지막 이벤트

View file

@ -198,7 +198,9 @@ function toMysqlDatetime(isoString) {
if (!isoString) return null;
const d = new Date(isoString);
if (isNaN(d.getTime())) return null;
return d.toISOString().slice(0, 19).replace('T', ' ');
// KST(+09:00) 기준으로 변환
const kst = new Date(d.getTime() + 9 * 60 * 60 * 1000);
return kst.toISOString().slice(0, 19).replace('T', ' ');
}
async function refreshParcel(fastify, parcelId) {

View file

@ -4,7 +4,9 @@ function toMysqlDatetime(isoString) {
if (!isoString) return null;
const d = new Date(isoString);
if (isNaN(d.getTime())) return null;
return d.toISOString().slice(0, 19).replace('T', ' ');
// KST(+09:00) 기준으로 변환
const kst = new Date(d.getTime() + 9 * 60 * 60 * 1000);
return kst.toISOString().slice(0, 19).replace('T', ' ');
}
export function startCronJobs(fastify) {

View file

@ -1,7 +1,7 @@
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
import { AnimatePresence, motion } from "framer-motion";
import { X, Trash2, RefreshCw, Pencil, Check, Loader2, Copy } from "lucide-react";
import { useState } from "react";
import { useState, useEffect } from "react";
import useToastStore from "@/stores/useToastStore";
import dayjs from "dayjs";
import {
@ -20,6 +20,12 @@ function ParcelDialog({ parcelId, onClose }) {
const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);
const showToast = useToastStore((s) => s.show);
useEffect(() => {
setEditing(false);
setEditLabel("");
setShowDeleteConfirm(false);
}, [parcelId]);
const { data: parcel, isLoading } = useQuery({
queryKey: ["parcel", parcelId],
queryFn: () => fetchParcel(parcelId),
@ -114,7 +120,7 @@ function ParcelDialog({ parcelId, onClose }) {
type="text"
value={editLabel}
onChange={(e) => setEditLabel(e.target.value)}
className="h-full border-0 border-b-2 border-primary bg-transparent px-0 text-lg lg:text-xl font-semibold text-gray-900 flex-1 focus:outline-none focus:border-primary-dark placeholder:text-gray-300"
className="h-full border-0 border-b-2 border-primary bg-transparent px-0 text-lg lg:text-xl font-semibold text-gray-900 flex-1 min-w-0 focus:outline-none focus:border-primary-dark placeholder:text-gray-300"
placeholder="별칭을 입력하세요"
autoFocus
onKeyDown={(e) =>