+
{contents.map((content, idx) => (
- {content}
+
+ {content}
+
))}
) : (
diff --git a/src/pages/Main/index.tsx b/src/pages/Main/index.tsx
index 0ac63b8..9298ff3 100644
--- a/src/pages/Main/index.tsx
+++ b/src/pages/Main/index.tsx
@@ -1,17 +1,18 @@
-import { ReactComponent as HanaAvengers } from '@/assets/images/hanaAvengers.svg';
import { ReactComponent as StarGgonge } from '@/assets/icons/StarGgonge.svg';
+import { ReactComponent as HanaAvengers } from '@/assets/images/hanaAvengers.svg';
import Map from '@/assets/images/map.png';
-import { useNavigate } from 'react-router-dom';
-import MyCard from './MyCard';
+import LoadingBasic from '@/components/Loading';
import { Toaster } from '@/components/ui/toaster';
import useGetCustomerDetail from '@/hooks/query/customer/useGetCustomerDetail';
+import { useNavigate } from 'react-router-dom';
+import MyCard from './MyCard';
export function MainPage() {
const navigate = useNavigate();
const { data: customer, isLoading } = useGetCustomerDetail();
if (isLoading || !customer) {
- return <>Loading...>;
+ return
;
}
return (
@@ -50,12 +51,18 @@ export function MainPage() {
navigate('/register/call')}
/>
navigate('/register/inquiry')}
/>
diff --git a/src/pages/Mypage/index.tsx b/src/pages/Mypage/index.tsx
index fe9e3e8..98da66b 100644
--- a/src/pages/Mypage/index.tsx
+++ b/src/pages/Mypage/index.tsx
@@ -1,5 +1,4 @@
import { Separator } from '@/components/ui/separator';
-import { Skeleton } from '@/components/ui/skeleton';
import { MYPAGECONSTANTS } from '@/constants/mypage';
import useGetCustomerDetail from '@/hooks/query/customer/useGetCustomerDetail';
import React from 'react';
@@ -8,6 +7,7 @@ import { showToast } from '../Register/Call';
import { toast } from '@/hooks/use-toast';
import { AccessTokenNames } from '@/api/Api';
import { CUSTOMER_ROUTE } from '@/constants/route';
+import LoadingBasic from '@/components/Loading';
function Mypage() {
const navigate = useNavigate();
@@ -15,14 +15,7 @@ function Mypage() {
const { data: customerDetail, isLoading } = useGetCustomerDetail();
if (isLoading || !customerDetail) {
- return (
-
- );
+ return
;
}
const {
diff --git a/src/pages/ReservationDetail/Call/index.tsx b/src/pages/ReservationDetail/Call/index.tsx
index 77988b5..ec1151e 100644
--- a/src/pages/ReservationDetail/Call/index.tsx
+++ b/src/pages/ReservationDetail/Call/index.tsx
@@ -1,5 +1,6 @@
import Modalbutton from '@/components/Direction/Modal';
import ReservationDetailHeader from '@/components/Header/ReservationDetailHeader';
+import LoadingBasic from '@/components/Loading';
import Nav from '@/components/Nav/Nav';
import { Separator } from '@/components/ui/separator';
import useDeleteCall from '@/hooks/query/customer/useDeleteCall';
@@ -7,7 +8,6 @@ import useGetCallDetail from '@/hooks/query/customer/useGetCallDetail';
import '@/index.css';
import { useParams } from 'react-router-dom';
import ReservationDetailInquiryTags from '../ReservationDetailInquiryTags';
-import { Skeleton } from '@/components/ui/skeleton';
export function ReservationDetailCallPage() {
const { callId } = useParams<{ callId: string }>();
@@ -18,15 +18,7 @@ export function ReservationDetailCallPage() {
const { mutate: deleteCall } = useDeleteCall();
if (isLoading || !call) {
- return (
-
- );
+ return
;
}
const {
@@ -59,9 +51,9 @@ export function ReservationDetailCallPage() {
return (
<>
-
-
-
+
+
+
@@ -93,7 +85,7 @@ export function ReservationDetailCallPage() {
-
+
@@ -109,7 +101,7 @@ export function ReservationDetailCallPage() {
-
+
{status === '대기중' && (
-
-
-
-
-
-
- );
+ return
;
}
- const { inquiry_num, customer_name, content, tags, category, status } =
- inquiry;
+ const {
+ inquiry_num,
+ // customer_name,
+ content,
+ tags,
+ category,
+ status,
+ waiting_amount,
+ } = inquiry;
return (
<>
-
-
-
-
-
-
-
- {inquiry_num}
- 번
-
-
-
-
-
이름
-
- {customer_name}
-
-
-
-
-
- 상담 종류
-
-
- {category}
-
-
-
-
+
+
+
+
+
+ 현재 대기 중인 인원은{' '}
+
+ {waiting_amount}
+
+ 명 입니다.
+
+
+ {inquiry_num}
+ 번
+
+
+
-
-
- {/*
- {date} {time}
-
*/}
-
- {content}
-
+
{category}
+
+
+
+
+ {content}
+
-
- {status === '답변 대기중' && (
-
- deleteInquiry({ inquiry_id: +(inquiryId ?? -1) })
- }
- />
- )}
-
-
-
+ />
+ )}
+
+
diff --git a/src/pages/ReservationDetail/InquiryDetail/index.tsx b/src/pages/ReservationDetail/InquiryDetail/index.tsx
index 2c30335..7a9b690 100644
--- a/src/pages/ReservationDetail/InquiryDetail/index.tsx
+++ b/src/pages/ReservationDetail/InquiryDetail/index.tsx
@@ -1,11 +1,11 @@
-import { useParams } from 'react-router-dom';
+import waitingAnswer from '@/assets/images/waitingAnswer.svg';
import Header from '@/components/Header/Header';
+import LoadingBasic from '@/components/Loading';
import Nav from '@/components/Nav/Nav';
-import waitingAnswer from '@/assets/images/waitingAnswer.svg';
-import ReservationDetailInquiryTags from '../ReservationDetailInquiryTags';
import { Separator } from '@/components/ui/separator';
import useGetInquiryReply from '@/hooks/query/customer/useGetInquiryReply';
-import { Skeleton } from '@/components/ui/skeleton';
+import { useParams } from 'react-router-dom';
+import ReservationDetailInquiryTags from '../ReservationDetailInquiryTags';
export function InquiryDetailPage() {
const { id: inquiryId } = useParams<{ id: string }>();
@@ -14,15 +14,7 @@ export function InquiryDetailPage() {
});
if (isLoading || !response) {
- return (
-
- );
+ return
;
}
const { content, status, reply } = response;
@@ -32,19 +24,22 @@ export function InquiryDetailPage() {
<>
-
-
+
+
+
문의 내용
-
{content}
+
{content}
{status === '답변완료' ? (
-
-
-
{reply}
+
) : (
-
+
상담사가 고객님의 문의를 처리 중입니다.
diff --git a/src/pages/ReservationDetail/Visit/index.tsx b/src/pages/ReservationDetail/Visit/index.tsx
index 98ec29d..bad093b 100644
--- a/src/pages/ReservationDetail/Visit/index.tsx
+++ b/src/pages/ReservationDetail/Visit/index.tsx
@@ -2,9 +2,10 @@ import { ReactComponent as Check } from '@/assets/icons/reservation/check.svg';
import AnimationCheck from '@/assets/images/animationCheck.gif';
import Modalbutton from '@/components/Direction/Modal';
import ReservationDetailHeader from '@/components/Header/ReservationDetailHeader';
+import LoadingBasic from '@/components/Loading';
import Nav from '@/components/Nav/Nav';
import { DirectionButton } from '@/components/ui/direction';
-import { Skeleton } from '@/components/ui/skeleton';
+import { Toaster } from '@/components/ui/toaster';
import useDeleteVisit from '@/hooks/query/customer/useDeleteVisit';
import useGetVisitDetail from '@/hooks/query/customer/useGetVisitDetail';
import { useToast } from '@/hooks/use-toast';
@@ -12,7 +13,7 @@ import getMyLocation from '@/hooks/useMyLocation';
import '@/index.css';
import { showToast } from '@/pages/Register/Call';
import { Coord } from '@/stores';
-import { useState } from 'react';
+import { useEffect, useState } from 'react';
import { useNavigate, useParams } from 'react-router-dom';
export function ReservationDetailVisitPage() {
const { toast } = useToast();
@@ -33,16 +34,14 @@ export function ReservationDetailVisitPage() {
const { mutate: deleteVisit } = useDeleteVisit();
+ useEffect(() => {
+ if (visit?.waiting_amount === 1) {
+ showToast(toast, '곧 고객님의 상담이 시작됩니다. 대기해주세요');
+ }
+ }, []);
+
if (isLoading || !visit) {
- return (
-
- );
+ return
;
}
const {
@@ -73,9 +72,9 @@ export function ReservationDetailVisitPage() {
}, 1000);
return (
<>
-
-
-
+
+
+
{load ? (
@@ -92,17 +91,33 @@ export function ReservationDetailVisitPage() {
번호표 발급 완료
- 1시간 이내 미방문 시
- 예약이 취소될 수 있습니다.
+ 순번이 지나가면 예약이 취소됩니다.
-
- 현재 대기 번호는{' '}
-
- {currentNum}
-
- 번 입니다.
-
+ {waitAmount > 0 ? (
+
+ 현재 대기 번호는{' '}
+
+ {currentNum}
+
+ 번 입니다.
+
+ ) : (
+
+
고객님의 상담 차례입니다.
+
+
+ 상담 차례가 지나가버렸다면?
+
+ navigate('/register/visit/' + branchId)}
+ >
+ 재예약하기
+
+
+
+ )}
{visitNum}
번
@@ -113,7 +128,7 @@ export function ReservationDetailVisitPage() {
-
+
대기정보
@@ -134,7 +149,7 @@ export function ReservationDetailVisitPage() {
-
+
+
>
);
}
diff --git a/src/pages/Signin/index.tsx b/src/pages/Signin/index.tsx
index 0c62ea4..8fc37f0 100644
--- a/src/pages/Signin/index.tsx
+++ b/src/pages/Signin/index.tsx
@@ -69,7 +69,7 @@ function SignInPage() {