diff --git a/frontend/src/__mocks__/mockData.ts b/frontend/src/__mocks__/mockData.ts index bb28c703b..fbfaa317f 100644 --- a/frontend/src/__mocks__/mockData.ts +++ b/frontend/src/__mocks__/mockData.ts @@ -53,7 +53,6 @@ export const spaces: Spaces = { reservationTimeUnit: 10, reservationMinimumTimeUnit: 10, reservationMaximumTimeUnit: 1440, - priorityOrder: 0, enabledDayOfWeek: { monday: true, tuesday: true, diff --git a/frontend/src/api/setting.ts b/frontend/src/api/setting.ts deleted file mode 100644 index 467fe7b10..000000000 --- a/frontend/src/api/setting.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { QS } from '@toss/utils'; -import { MapItem, Space } from '../types/common'; -import { QuerySettingSummarySuccess } from '../types/response'; -import api from './api'; - -export interface QuerySettingSummaryParams { - mapId: MapItem['mapId']; - spaceId: Space['id']; - selectedDateTime: string | null; - settingViewType: string | null; -} - -export const querySettingSummary = ({ - mapId, - spaceId, - selectedDateTime, - settingViewType, -}: QuerySettingSummaryParams) => { - return api.get( - `/maps/${mapId}/spaces/${spaceId}/settings/summary${QS.create({ - selectedDateTime: selectedDateTime, - settingViewType: settingViewType, - })}` - ); -}; diff --git a/frontend/src/components/Modal/SummaryModal.styles.ts b/frontend/src/components/Modal/SummaryModal.styles.ts deleted file mode 100644 index 5a026617a..000000000 --- a/frontend/src/components/Modal/SummaryModal.styles.ts +++ /dev/null @@ -1,58 +0,0 @@ -import styled from 'styled-components'; -import { Z_INDEX } from 'constants/style'; - -interface Props { - open?: boolean; -} - -export const Overlay = styled.div` - display: ${({ open }) => (open ? 'flex' : 'none')}; - position: fixed; - justify-content: center; - align-items: center; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: ${({ theme }) => theme.modalOverlay}; - z-index: ${Z_INDEX.MODAL_OVERLAY}; - overflow: scroll; -`; - -export const Modal = styled.div` - width: 80%; - max-height: 70%; - min-width: 320px; - max-width: 768px; - position: absolute; - border-radius: 4px; - background-color: ${({ theme }) => theme.white}; - overflow: auto; -`; - -export const CloseButton = styled.button` - position: absolute; - padding: 0.5rem; - top: 0.5rem; - right: 1.5rem; - width: 1rem; - cursor: pointer; - border: none; - background: none; - - &:hover { - opacity: 0.7; - } -`; - -export const Inner = styled.div` - padding: 0.5rem 1rem; -`; - -export const Header = styled.h2` - font-weight: 700; - padding: 1rem; - margin-bottom: 0.5rem; -`; - -export const Content = styled.div``; diff --git a/frontend/src/components/Modal/SummaryModal.tsx b/frontend/src/components/Modal/SummaryModal.tsx deleted file mode 100644 index b27e5f8f0..000000000 --- a/frontend/src/components/Modal/SummaryModal.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import { MouseEventHandler, PropsWithChildren } from 'react'; -import { createPortal } from 'react-dom'; -import { ReactComponent as CloseIcon } from 'assets/svg/close.svg'; -import * as Styled from './SummaryModal.styles'; - -export interface Props { - open: boolean; - isClosableDimmer?: boolean; - showCloseButton?: boolean; - onClose: () => void; -} - -let modalRoot = document.getElementById('modal'); - -const SummaryModal = ({ - open, - isClosableDimmer, - showCloseButton, - onClose, - children, -}: PropsWithChildren): JSX.Element => { - if (modalRoot === null) { - modalRoot = document.createElement('div'); - modalRoot.setAttribute('id', 'modal'); - document.body.appendChild(modalRoot); - } - - const handleMouseDownOverlay: MouseEventHandler = ({ target, currentTarget }) => { - if (isClosableDimmer && target === currentTarget) { - onClose(); - } - }; - - return createPortal( - - - {open && showCloseButton && ( - - - - )} - {open && children} - - , - modalRoot - ); -}; - -SummaryModal.Inner = Styled.Inner; -SummaryModal.Header = Styled.Header; -SummaryModal.Content = Styled.Content; - -export default SummaryModal; diff --git a/frontend/src/hooks/query/useSettingSummary.ts b/frontend/src/hooks/query/useSettingSummary.ts deleted file mode 100644 index aa2b257e1..000000000 --- a/frontend/src/hooks/query/useSettingSummary.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { AxiosError, AxiosResponse } from 'axios'; -import { QueryKey, useQuery, UseQueryOptions, UseQueryResult } from 'react-query'; -import { ErrorResponse, QuerySettingSummarySuccess } from 'types/response'; -import { querySettingSummary, QuerySettingSummaryParams } from '../../api/setting'; - -const useSettingSummary = >( - params: QuerySettingSummaryParams, - options?: UseQueryOptions< - AxiosResponse, - AxiosError, - TData, - [QueryKey, QuerySettingSummaryParams] - > -): UseQueryResult> => - useQuery(['getSettingSummary', params], () => querySettingSummary(params), options); - -export default useSettingSummary; diff --git a/frontend/src/pages/GuestMap/units/ReservationForm.styled.ts b/frontend/src/pages/GuestMap/units/ReservationForm.styled.ts index 3983cc782..2c2d31f78 100644 --- a/frontend/src/pages/GuestMap/units/ReservationForm.styled.ts +++ b/frontend/src/pages/GuestMap/units/ReservationForm.styled.ts @@ -32,33 +32,23 @@ export const InputsRow = styled.div` } `; -export const SettingSummaryWrapper = styled.div` +export const TimeFormMessageWrapper = styled.div` display: flex; - flex-direction: column; gap: 0.25rem; margin-top: 0.5rem; `; -/** - * 세팅이 많아질 경우를 대비 (펼치기, 접기 용도) - */ -export const PartialSettingSummary = styled.p` - height: 80px; - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: horizontal; - white-space: pre-line; - line-height: normal; - font-size: 0.75rem; - color: ${({ theme }) => theme.gray[500]}; +export const TimeFormMessageList = styled.div` + display: flex; + flex-direction: column; + gap: 4px; `; -export const SettingSummary = styled.p<{ fontWeight?: string }>` - white-space: pre-line; - line-height: normal; +export const TimeFormMessage = styled.p<{ fontWeight?: string }>` + left: 0.75rem; + bottom: -1rem; font-size: 0.75rem; + height: 1em; color: ${({ theme }) => theme.gray[500]}; ${({ fontWeight }) => fontWeight && `font-weight: ${fontWeight}`}; `; diff --git a/frontend/src/pages/GuestMap/units/ReservationForm.tsx b/frontend/src/pages/GuestMap/units/ReservationForm.tsx index 2cc3265d7..fd998eb75 100644 --- a/frontend/src/pages/GuestMap/units/ReservationForm.tsx +++ b/frontend/src/pages/GuestMap/units/ReservationForm.tsx @@ -1,6 +1,6 @@ import { AxiosError } from 'axios'; import dayjs from 'dayjs'; -import React, { useContext, useState } from 'react'; +import React, { useContext } from 'react'; import { useMutation } from 'react-query'; import { useHistory } from 'react-router-dom'; import { @@ -23,9 +23,8 @@ import useMember from 'hooks/query/useMember'; import { AccessTokenContext } from 'providers/AccessTokenProvider'; import { MapItem } from 'types/common'; import { ErrorResponse } from 'types/response'; -import { formatTimeWithSecond, isPastDate } from 'utils/datetime'; +import { formatTimePrettier, formatTimeWithSecond, isPastDate } from 'utils/datetime'; import { isNullish } from 'utils/type'; -import useSettingSummary from '../../../hooks/query/useSettingSummary'; import { GuestMapFormContext } from '../providers/GuestMapFormProvider'; import * as Styled from './ReservationForm.styled'; @@ -65,19 +64,6 @@ const ReservationForm = ({ map }: Props) => { ); }; - const getSettingsSummary = useSettingSummary( - { - mapId: map?.mapId, - spaceId: parseInt(selectedSpaceId), - selectedDateTime: `${formValues.date}T${formatTimeWithSecond( - timePicker?.range.start ?? dayjs().tz() - )}${DATE.TIMEZONE_OFFSET}`, - settingViewType: 'FLAT', - }, - { enabled: selectedSpaceId !== null && !isNaN(parseInt(selectedSpaceId)) } - ); - const settingsSummary = getSettingsSummary.data?.data?.summary ?? ''; - const onSuccessCreateReservation = ( _: unknown, { reservation }: PostGuestReservationParams | PostMemberGuestReservationParams @@ -179,10 +165,28 @@ const ReservationForm = ({ map }: Props) => { /> )} {spacesMap?.[Number(selectedSpaceId)] && ( - - 예약 가능 시간 - {settingsSummary} - + + 예약 가능 시간 + + {spacesMap[Number(selectedSpaceId)].settings.map( + ( + { + settingStartTime, + settingEndTime, + reservationMaximumTimeUnit, + reservationMinimumTimeUnit, + }, + index + ) => ( + + {settingStartTime.slice(0, 5)} ~ {settingEndTime.slice(0, 5)} + (최소 {formatTimePrettier(reservationMinimumTimeUnit)}, 최대{' '} + {formatTimePrettier(reservationMaximumTimeUnit)}) + + ) + )}{' '} + + )} diff --git a/frontend/src/pages/GuestReservation/GuestReservation.tsx b/frontend/src/pages/GuestReservation/GuestReservation.tsx index 04cb5e756..6e736ec8a 100644 --- a/frontend/src/pages/GuestReservation/GuestReservation.tsx +++ b/frontend/src/pages/GuestReservation/GuestReservation.tsx @@ -289,8 +289,6 @@ const GuestReservation = (): JSX.Element => { { ) : ( ` - white-space: pre-line; - line-height: normal; +export const TimeFormMessage = styled.p` + left: 0.75rem; + bottom: -1rem; font-size: 0.75rem; + height: 1em; color: ${({ theme }) => theme.gray[500]}; - ${({ fontWeight }) => fontWeight && `font-weight: ${fontWeight}`}; `; export const ButtonWrapper = styled.div` diff --git a/frontend/src/pages/GuestReservation/units/GuestReservationForm.tsx b/frontend/src/pages/GuestReservation/units/GuestReservationForm.tsx index 7fce7d116..cb0a049bf 100644 --- a/frontend/src/pages/GuestReservation/units/GuestReservationForm.tsx +++ b/frontend/src/pages/GuestReservation/units/GuestReservationForm.tsx @@ -1,4 +1,3 @@ -import dayjs from 'dayjs'; import React, { ChangeEventHandler, useMemo } from 'react'; import { ReactComponent as CalendarIcon } from 'assets/svg/calendar.svg'; import Input from 'components/Input/Input'; @@ -15,17 +14,15 @@ import { Reservation, Space } from 'types/common'; import { convertSettingTimeToMinutes, convertTimeToMinutes, + formatTimePrettier, formatTimeWithSecond, isPastDate, } from 'utils/datetime'; -import useSettingSummary from '../../../hooks/query/useSettingSummary'; import { EditGuestReservationParams } from '../GuestReservation'; import * as Styled from './GuestReservationForm.styles'; interface Props { isEditMode: boolean; - mapId: number; - spaceId: number; space: Pick; reservation?: Reservation; date: string; @@ -44,8 +41,6 @@ interface Form { const GuestReservationForm = ({ isEditMode, - mapId, - spaceId, space, date, reservation, @@ -84,19 +79,6 @@ const GuestReservationForm = ({ initialEndTime: !!reservation ? new Date(reservation.endDateTime) : undefined, }); - const getSettingsSummary = useSettingSummary( - { - mapId, - spaceId, - selectedDateTime: `${date}T${formatTimeWithSecond(range.start ?? dayjs().tz())}${ - DATE.TIMEZONE_OFFSET - }`, - settingViewType: 'FLAT', - }, - {} - ); - const settingsSummary = getSettingsSummary.data?.data?.summary ?? ''; - const [{ name, description, password }, onChangeForm] = useInputs
({ name: reservation?.name ?? '', description: reservation?.description ?? '', @@ -169,10 +151,28 @@ const GuestReservationForm = ({ onChange={onChange} onCloseOptions={onCloseOptions} /> - - 예약 가능 시간 - {settingsSummary} - + + 예약 가능 시간 + {space.settings.map( + ( + { + settingStartTime, + settingEndTime, + reservationMaximumTimeUnit, + reservationMinimumTimeUnit, + }, + index + ) => { + return ( + + {settingStartTime.slice(0, 5)} ~ {settingEndTime.slice(0, 5)} + (최소 {formatTimePrettier(reservationMinimumTimeUnit)}, 최대{' '} + {formatTimePrettier(reservationMaximumTimeUnit)}) + + ); + } + )} + ; - spaceId: number; - mapId: number; reservation?: Reservation; date: string; userName: string; @@ -42,8 +39,6 @@ interface Form { const MemberGuestReservationForm = ({ isEditMode, - mapId, - spaceId, space, date, reservation, @@ -83,19 +78,6 @@ const MemberGuestReservationForm = ({ initialEndTime: !!reservation ? new Date(reservation.endDateTime) : undefined, }); - const getSettingsSummary = useSettingSummary( - { - mapId, - spaceId, - selectedDateTime: `${date}T${formatTimeWithSecond(range.start ?? dayjs().tz())}${ - DATE.TIMEZONE_OFFSET - }`, - settingViewType: 'FLAT', - }, - {} - ); - const settingsSummary = getSettingsSummary.data?.data?.summary ?? ''; - const [{ description }, onChangeForm] = useInputs({ description: reservation?.description ?? '', }); @@ -157,10 +139,26 @@ const MemberGuestReservationForm = ({ onChange={onChange} onCloseOptions={onCloseOptions} /> - - 예약 가능 시간 - {settingsSummary} - + + 예약 가능 시간 + {space.settings.map( + ( + { + settingStartTime, + settingEndTime, + reservationMaximumTimeUnit, + reservationMinimumTimeUnit, + }, + index + ) => ( + + {settingStartTime.slice(0, 5)} ~ {settingEndTime.slice(0, 5)} + (최소 {formatTimePrettier(reservationMinimumTimeUnit)}, 최대{' '} + {formatTimePrettier(reservationMaximumTimeUnit)}) + + ) + )} + diff --git a/frontend/src/pages/ManagerReservation/ManagerReservation.tsx b/frontend/src/pages/ManagerReservation/ManagerReservation.tsx index e6928382b..3ad8e947d 100644 --- a/frontend/src/pages/ManagerReservation/ManagerReservation.tsx +++ b/frontend/src/pages/ManagerReservation/ManagerReservation.tsx @@ -150,7 +150,6 @@ const ManagerReservation = (): JSX.Element => { ` - white-space: pre-line; - line-height: normal; +export const TimeFormMessage = styled.p` + left: 0.75rem; + bottom: -1rem; font-size: 0.75rem; + height: 1em; color: ${({ theme }) => theme.gray[500]}; - ${({ fontWeight }) => fontWeight && `font-weight: ${fontWeight}`}; `; diff --git a/frontend/src/pages/ManagerReservation/units/ManagerReservationForm.tsx b/frontend/src/pages/ManagerReservation/units/ManagerReservationForm.tsx index 125f8def3..8b93291aa 100644 --- a/frontend/src/pages/ManagerReservation/units/ManagerReservationForm.tsx +++ b/frontend/src/pages/ManagerReservation/units/ManagerReservationForm.tsx @@ -1,5 +1,4 @@ -import dayjs from 'dayjs'; -import React, { ChangeEventHandler, useMemo, useState } from 'react'; +import { ChangeEventHandler, useMemo } from 'react'; import { ReactComponent as CalendarIcon } from 'assets/svg/calendar.svg'; import Button from 'components/Button/Button'; import Input from 'components/Input/Input'; @@ -16,15 +15,14 @@ import { ManagerSpaceAPI, Reservation } from 'types/common'; import { convertSettingTimeToMinutes, convertTimeToMinutes, + formatTimePrettier, formatTimeWithSecond, } from 'utils/datetime'; -import useSettingSummary from '../../../hooks/query/useSettingSummary'; import { CreateReservationParams, EditReservationParams } from '../ManagerReservation'; import * as Styled from './ManagerReservationForm.styles'; interface Props { isEditMode: boolean; - mapId: number; space: ManagerSpaceAPI; reservation?: Reservation; date: string; @@ -41,7 +39,6 @@ interface Form { const ManagerReservationForm = ({ isEditMode, - mapId, space, date, reservation, @@ -81,19 +78,6 @@ const ManagerReservationForm = ({ initialEndTime: !!reservation ? new Date(reservation.endDateTime) : undefined, }); - const getSettingsSummary = useSettingSummary( - { - mapId, - spaceId: space?.id, - selectedDateTime: `${date}T${formatTimeWithSecond(range.start ?? dayjs().tz())}${ - DATE.TIMEZONE_OFFSET - }`, - settingViewType: 'FLAT', - }, - {} - ); - const settingsSummary = getSettingsSummary.data?.data?.summary ?? ''; - const [{ name, description, password }, onChangeForm] = useInputs({ name: reservation?.name ?? '', description: reservation?.description ?? '', @@ -180,10 +164,29 @@ const ManagerReservationForm = ({ onChange={onChange} onCloseOptions={onCloseOptions} /> - - 예약 가능 시간 - {settingsSummary} - + + + 예약 가능 시간 + {space.settings.map( + ( + { + settingStartTime, + settingEndTime, + reservationMaximumTimeUnit, + reservationMinimumTimeUnit, + }, + index + ) => { + return ( + + {settingStartTime.slice(0, 5)} ~ {settingEndTime.slice(0, 5)} + (최소 {formatTimePrettier(reservationMinimumTimeUnit)}, 최대{' '} + {formatTimePrettier(reservationMaximumTimeUnit)}) + + ); + } + )} + {isEditMode || ( diff --git a/frontend/src/pages/ManagerSpaceEditor/ManagerSpaceEditor.tsx b/frontend/src/pages/ManagerSpaceEditor/ManagerSpaceEditor.tsx index 63b60130b..8366ec476 100644 --- a/frontend/src/pages/ManagerSpaceEditor/ManagerSpaceEditor.tsx +++ b/frontend/src/pages/ManagerSpaceEditor/ManagerSpaceEditor.tsx @@ -109,8 +109,6 @@ const ManagerSpaceEditor = (): JSX.Element => { }, }); - // TODO: handleCreateSpace, handleUpdateSpace 시 priorityOrder 고려해서 request 발송 - // TODO: const handleCreateSpace = (data: Omit) => createSpace.mutate({ mapId: Number(mapId), ...data }); diff --git a/frontend/src/pages/ManagerSpaceEditor/data.ts b/frontend/src/pages/ManagerSpaceEditor/data.ts index 281a05a37..607dde757 100644 --- a/frontend/src/pages/ManagerSpaceEditor/data.ts +++ b/frontend/src/pages/ManagerSpaceEditor/data.ts @@ -23,7 +23,6 @@ export interface SpaceFormValue { saturday: boolean; sunday: boolean; }; - priorityOrder: number; }[]; } @@ -46,7 +45,6 @@ export const initialSpaceFormValueSetting = { reservationMinimumTimeUnit: 10, reservationMaximumTimeUnit: 120, enabledDayOfWeek: initialEnabledDayOfWeek, - priorityOrder: 0, }; export const initialSpaceFormValue: Omit = { diff --git a/frontend/src/pages/ManagerSpaceEditor/providers/SpaceFormProvider.tsx b/frontend/src/pages/ManagerSpaceEditor/providers/SpaceFormProvider.tsx index 92a51f1e6..2495e9d64 100644 --- a/frontend/src/pages/ManagerSpaceEditor/providers/SpaceFormProvider.tsx +++ b/frontend/src/pages/ManagerSpaceEditor/providers/SpaceFormProvider.tsx @@ -107,11 +107,6 @@ const SpaceFormProvider = ({ children }: Props): JSX.Element => { const getRequestValues = () => { const todayDate = formatDate(new Date()); - for (let i = 0; i < values.settings.length; i++) { - const setting = values.settings[i]; - setting['priorityOrder'] = values.settings.length - (i + 1); - } - return { space: { ...values, diff --git a/frontend/src/pages/ManagerSpaceEditor/units/Form.styles.ts b/frontend/src/pages/ManagerSpaceEditor/units/Form.styles.ts index dcfb45d30..7682a1468 100644 --- a/frontend/src/pages/ManagerSpaceEditor/units/Form.styles.ts +++ b/frontend/src/pages/ManagerSpaceEditor/units/Form.styles.ts @@ -32,26 +32,6 @@ export const TitleContainer = styled.div` margin-bottom: 1rem; `; -export const InfoMessageWrapper = styled.div` - display: flex; - flex-direction: column; - gap: 0.25rem; - margin-top: 0.5rem; - justify-content: space-between; - margin-bottom: 2rem; -`; - -export const InfoMessage = styled.p<{ fontWeight?: string }>` - left: 0.75rem; - bottom: -1.5rem; - font-size: 0.75rem; - height: 1.5em; - white-space: pre-line; - line-height: normal; - color: ${({ theme }) => theme.gray[500]}; - ${({ fontWeight }) => fontWeight && `font-weight: ${fontWeight}`}; -`; - export const ContentsContainer = styled.div` display: flex; flex-direction: column; diff --git a/frontend/src/pages/ManagerSpaceEditor/units/Form.tsx b/frontend/src/pages/ManagerSpaceEditor/units/Form.tsx index dc75c5114..58fbd748a 100644 --- a/frontend/src/pages/ManagerSpaceEditor/units/Form.tsx +++ b/frontend/src/pages/ManagerSpaceEditor/units/Form.tsx @@ -1,11 +1,4 @@ -import React, { - Dispatch, - FormEventHandler, - SetStateAction, - useEffect, - useRef, - useState, -} from 'react'; +import { Dispatch, FormEventHandler, SetStateAction, useEffect, useRef } from 'react'; import { DeleteManagerSpaceParams, PostManagerSpaceParams, @@ -30,7 +23,6 @@ import * as Styled from './Form.styles'; import FormDayOfWeekSelect from './FormDayOfWeekSelect'; import FormTimeUnitSelect from './FormTimeUnitSelect'; import Preset from './Preset'; -import SettingSummaryPopup from './SettingSummaryPopup'; interface Props { modeState: [Mode, Dispatch>]; @@ -56,7 +48,6 @@ const Form = ({ const nameInputRef = useRef(null); const [mode, setMode] = modeState; - const [settingSummaryPopupOpen, setSettingSummaryPopupOpen] = useState(false); const { values, @@ -194,31 +185,7 @@ const Form = ({ 예약 조건 - {selectedSpaceId != null && ( - - )} - - - 예약 조건이 서로 겹칠 시, 뒷 순서의 예약 조건이 앞 순서의 예약 조건을 덮어씁니다. - - - {settingSummaryPopupOpen && selectedSpaceId != null && ( - setSettingSummaryPopupOpen(false)} - mapId={Number(window.location.pathname.split('/', 3).pop())} - spaceId={selectedSpaceId} - /> - )} {values.settings.map((_, index) => ( diff --git a/frontend/src/pages/ManagerSpaceEditor/units/Preset.tsx b/frontend/src/pages/ManagerSpaceEditor/units/Preset.tsx index f26e257f3..23f18b4b6 100644 --- a/frontend/src/pages/ManagerSpaceEditor/units/Preset.tsx +++ b/frontend/src/pages/ManagerSpaceEditor/units/Preset.tsx @@ -72,7 +72,7 @@ const Preset = (): JSX.Element => { ...values, settings: values.settings.map((setting, index) => { if (index === selectedSettingIndex) { - return { ...rest, priorityOrder: 0 }; + return rest; } return setting; diff --git a/frontend/src/pages/ManagerSpaceEditor/units/SettingSummaryPopup.styles.ts b/frontend/src/pages/ManagerSpaceEditor/units/SettingSummaryPopup.styles.ts deleted file mode 100644 index 12eb86cb8..000000000 --- a/frontend/src/pages/ManagerSpaceEditor/units/SettingSummaryPopup.styles.ts +++ /dev/null @@ -1,13 +0,0 @@ -import styled from 'styled-components'; - -export const SettingSummaryPopupWrapper = styled.div` - padding: 2rem 3rem; -`; - -export const SettingSummary = styled.p<{ fontWeight?: string }>` - white-space: pre-line; - line-height: normal; - font-size: 0.75rem; - color: ${({ theme }) => theme.gray[500]}; - ${({ fontWeight }) => fontWeight && `font-weight: ${fontWeight}`}; -`; diff --git a/frontend/src/pages/ManagerSpaceEditor/units/SettingSummaryPopup.tsx b/frontend/src/pages/ManagerSpaceEditor/units/SettingSummaryPopup.tsx deleted file mode 100644 index bc3fcfabc..000000000 --- a/frontend/src/pages/ManagerSpaceEditor/units/SettingSummaryPopup.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import React from 'react'; -import Modal from '../../../components/Modal/Modal'; -import SummaryModal from '../../../components/Modal/SummaryModal'; -import useSettingSummary from '../../../hooks/query/useSettingSummary'; -import * as Styled from './SettingSummaryPopup.styles'; - -interface SettingSummaryProps { - mapId: number; - spaceId: number; - open: boolean; - onClose: () => void; -} - -const SettingSummaryPopup = ({ - mapId, - spaceId, - open, - onClose, -}: SettingSummaryProps): JSX.Element => { - const getSettingsSummary = useSettingSummary( - { - mapId, - spaceId, - selectedDateTime: null, - settingViewType: 'FLAT', - }, - {} - ); - const settingsSummary = getSettingsSummary.data?.data?.summary ?? ''; - - return ( - - - {settingsSummary} - - - ); -}; - -export default SettingSummaryPopup; diff --git a/frontend/src/types/common.ts b/frontend/src/types/common.ts index 03b622d8d..a76c21dc1 100644 --- a/frontend/src/types/common.ts +++ b/frontend/src/types/common.ts @@ -112,7 +112,6 @@ export interface SpaceSetting { saturday: boolean; sunday: boolean; }; - priorityOrder: number; } export interface Preset { diff --git a/frontend/src/types/response.ts b/frontend/src/types/response.ts index 6a5bcbdd6..41594e0ff 100644 --- a/frontend/src/types/response.ts +++ b/frontend/src/types/response.ts @@ -1,4 +1,5 @@ import { + Area, Emoji, ManagerSpaceAPI, MapItem, @@ -52,7 +53,6 @@ export interface QueryManagerMapsSuccess { export interface QueryManagerSpaceReservationsSuccess { reservations: Reservation[]; } - export interface QueryManagerMapReservationsSuccess { data: SpaceReservation[]; } @@ -91,7 +91,3 @@ export interface QueryMemberReservationsSuccess { hasNext: boolean; pageNumber: number; } - -export interface QuerySettingSummarySuccess { - summary: string; -}