feat: 운송장 번호 자동 정리 + 날짜에 요일 표시
- 운송장 번호 입력 시 공백/하이픈 실시간 제거 - 택배 카드 날짜에 요일 추가 (월, 화, ...) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
428cb99423
commit
9d2055fa7c
2 changed files with 4 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { useQuery } from "@tanstack/react-query";
|
||||
import dayjs from "dayjs";
|
||||
import "dayjs/locale/ko";
|
||||
import StatusBadge from "./StatusBadge";
|
||||
import { fetchCarriers } from "@/api/parcels";
|
||||
|
||||
|
|
@ -34,7 +35,7 @@ function ParcelCard({ parcel, onClick }) {
|
|||
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="text-xs lg:text-sm text-gray-400">
|
||||
{dayjs(parcel.created_at).format("YYYY.MM.DD")}
|
||||
{dayjs(parcel.created_at).locale("ko").format("YYYY.MM.DD (dd)")}
|
||||
</span>
|
||||
<StatusBadge status={parcel.status} />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ function ParcelForm({ onClose }) {
|
|||
setError("");
|
||||
mutation.mutate({
|
||||
carrierId,
|
||||
trackingNumber: trackingNumber.replace(/\s/g, ""),
|
||||
trackingNumber: trackingNumber.replace(/[\s\-]/g, ""),
|
||||
label: label || undefined,
|
||||
});
|
||||
};
|
||||
|
|
@ -69,7 +69,7 @@ function ParcelForm({ onClose }) {
|
|||
<input
|
||||
type="text"
|
||||
value={trackingNumber}
|
||||
onChange={(e) => setTrackingNumber(e.target.value)}
|
||||
onChange={(e) => setTrackingNumber(e.target.value.replace(/[\s\-]/g, ""))}
|
||||
placeholder="운송장 번호 입력"
|
||||
className="w-full border border-gray-300 rounded-lg px-3 lg:px-4 py-2 lg:py-2.5 text-sm lg:text-base focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary"
|
||||
required
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue