Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/pages/booths/BoothDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { useNavigate } from 'react-router-dom';
import { useParams } from 'react-router-dom';
import { useUserStore } from '@/stores/logins/userStore';
import FestinoLogo from '@/components/icons/FestinoLogo';
import { Menu } from '@/types/booths/booth.types';

const BoothDetailPage: React.FC = () => {
const { reset, init, boothInfo, menuList, updateBoothInfo, updateMenuList } = useBoothDetail();
Expand Down Expand Up @@ -44,7 +45,7 @@ const BoothDetailPage: React.FC = () => {
scrollImage('right');
};

const handleClickSoldOut = async (menu: any) => {
const handleClickSoldOut = async (menu: Menu) => {
if (isBoothOwner) {
try {
const response = await api.put('/admin/menu/sold-out', {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/mobiles/MobileRservePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const MobileReservePage: React.FC = () => {
useEffect(() => {
const init = async () => {
await getAllBoothList();
const filtered = boothList.filter((booth: any) => booth?.isReservation);
const filtered = (boothList as Booth[]).filter((booth: Booth) => booth?.isReservation);
setReserveBoothList(filtered);

if (isAdmin) {
Expand All @@ -54,7 +54,7 @@ const MobileReservePage: React.FC = () => {
setSelectedBooth(filtered[0]);
} else {
if (userOwnBoothId) {
const found = filtered.find((booth: any) => booth.boothId === userOwnBoothId);
const found = filtered.find((booth: Booth) => booth.boothId === userOwnBoothId);
if (found) {
setSelectedBooth(found);
setBoothInfo(found);
Expand Down
6 changes: 4 additions & 2 deletions src/pages/orders/OrderRealTimePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import IconNotFound from '@/components/icons/IconNotFound';
import { cloneDeep, isEqual } from 'lodash';
import OrderCard from '@/components/orders/OrderCard';
import { useNowOrderStore } from '@/stores/orders/nowOrder';
import { WaitDepositOrder } from '@/types/orders/order.types';
import { WaitDepositOrder, CookingMenu, FinishOrder } from '@/types/orders/order.types';

const OrderRealTimePage: React.FC = () => {
const { boothId } = useTableStatusOrder();
Expand Down Expand Up @@ -58,7 +58,9 @@ const OrderRealTimePage: React.FC = () => {
};
}, [boothId, nowDate]);

const renderCardSection = (type: string, data: any[]) => {
type OrderData = WaitDepositOrder | CookingMenu | FinishOrder;

const renderCardSection = (type: string, data: OrderData[]) => {
const bgMap: Record<string, string> = {
ready: 'bg-danger-600-light-5',
cooking: 'bg-primary-600-light-5',
Expand Down
2 changes: 1 addition & 1 deletion src/types/booths/booth.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export interface BoothInfo {
openTime: string;
closeTime: string;
boothIntro: string;
boothImage: any[];
boothImage: string[];
location: string;
isCall: boolean;
isOpen: boolean;
Expand Down