generated from pricelees/issue-pr-template
[#34] 회원 / 인증 도메인 재정의 #43
@ -1 +1,2 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88"
|
||||
height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.4 KiB |
@ -1,4 +1,4 @@
|
||||
import { Route, BrowserRouter as Router, Routes } from 'react-router-dom';
|
||||
import {BrowserRouter as Router, Route, Routes} from 'react-router-dom';
|
||||
import AdminRoute from './components/AdminRoute';
|
||||
import Layout from './components/Layout';
|
||||
import {AuthProvider} from './context/AuthContext';
|
||||
|
||||
@ -5,7 +5,7 @@ import type {
|
||||
PendingReservationCreateResponse,
|
||||
ReservationDetailRetrieveResponse,
|
||||
ReservationSummaryRetrieveListResponse
|
||||
} from './reservationTypesV2';
|
||||
} from './reservationTypes';
|
||||
|
||||
export const createPendingReservation = async (request: PendingReservationCreateRequest): Promise<PendingReservationCreateResponse> => {
|
||||
return await apiClient.post<PendingReservationCreateResponse>('/reservations/pending', request);
|
||||
@ -1,7 +1,7 @@
|
||||
import type {PaymentRetrieveResponse} from "@_api/payment/PaymentTypes";
|
||||
import type {UserContactRetrieveResponse} from "@_api/user/userTypes";
|
||||
|
||||
export const ReservationStatusV2 = {
|
||||
export const ReservationStatus = {
|
||||
PENDING: 'PENDING',
|
||||
CONFIRMED: 'CONFIRMED',
|
||||
CANCELED: 'CANCELED',
|
||||
@ -9,12 +9,12 @@ export const ReservationStatusV2 = {
|
||||
EXPIRED: 'EXPIRED'
|
||||
} as const;
|
||||
|
||||
export type ReservationStatusV2 =
|
||||
| typeof ReservationStatusV2.PENDING
|
||||
| typeof ReservationStatusV2.CONFIRMED
|
||||
| typeof ReservationStatusV2.CANCELED
|
||||
| typeof ReservationStatusV2.FAILED
|
||||
| typeof ReservationStatusV2.EXPIRED;
|
||||
export type ReservationStatus =
|
||||
| typeof ReservationStatus.PENDING
|
||||
| typeof ReservationStatus.CONFIRMED
|
||||
| typeof ReservationStatus.CANCELED
|
||||
| typeof ReservationStatus.FAILED
|
||||
| typeof ReservationStatus.EXPIRED;
|
||||
|
||||
export interface PendingReservationCreateRequest {
|
||||
scheduleId: string,
|
||||
@ -33,7 +33,7 @@ export interface ReservationSummaryRetrieveResponse {
|
||||
themeName: string;
|
||||
date: string;
|
||||
startAt: string;
|
||||
status: ReservationStatusV2;
|
||||
status: ReservationStatus;
|
||||
}
|
||||
|
||||
export interface ReservationSummaryRetrieveListResponse {
|
||||
@ -54,7 +54,7 @@ export interface ReservationDetail {
|
||||
startAt: string;
|
||||
user: UserContactRetrieveResponse;
|
||||
applicationDateTime: string;
|
||||
payment: PaymentRetrieveResponse;
|
||||
payment?: PaymentRetrieveResponse;
|
||||
}
|
||||
|
||||
export interface MostReservedThemeIdListResponse {
|
||||
@ -2,7 +2,8 @@ import apiClient from '../apiClient';
|
||||
import type {
|
||||
AvailableThemeIdListResponse,
|
||||
ScheduleCreateRequest,
|
||||
ScheduleCreateResponse, ScheduleDetailRetrieveResponse,
|
||||
ScheduleCreateResponse,
|
||||
ScheduleDetailRetrieveResponse,
|
||||
ScheduleRetrieveListResponse,
|
||||
ScheduleUpdateRequest
|
||||
} from './scheduleTypes';
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
export enum ScheduleStatus {
|
||||
AVAILABLE = 'AVAILABLE',
|
||||
HOLD = 'HOLD',
|
||||
RESERVED = 'RESERVED',
|
||||
BLOCKED = 'BLOCKED',
|
||||
}
|
||||
export type ScheduleStatus = 'AVAILABLE' | 'HOLD' | 'RESERVED' | 'BLOCKED';
|
||||
|
||||
export const ScheduleStatus = {
|
||||
AVAILABLE: 'AVAILABLE' as ScheduleStatus,
|
||||
HOLD: 'HOLD' as ScheduleStatus,
|
||||
RESERVED: 'RESERVED' as ScheduleStatus,
|
||||
BLOCKED: 'BLOCKED' as ScheduleStatus,
|
||||
};
|
||||
|
||||
export interface AvailableThemeIdListResponse {
|
||||
themeIds: string[];
|
||||
|
||||
@ -3,29 +3,12 @@ import type {
|
||||
AdminThemeDetailRetrieveResponse,
|
||||
AdminThemeSummaryRetrieveListResponse,
|
||||
ThemeCreateRequest,
|
||||
ThemeCreateRequestV2, ThemeCreateResponse,
|
||||
ThemeCreateResponseV2, ThemeListRetrieveRequest, ThemeRetrieveListResponse,
|
||||
ThemeRetrieveListResponseV2,
|
||||
ThemeUpdateRequest,
|
||||
UserThemeRetrieveListResponse
|
||||
ThemeCreateResponse,
|
||||
ThemeIdListResponse,
|
||||
ThemeInfoListResponse,
|
||||
ThemeUpdateRequest
|
||||
} from './themeTypes';
|
||||
|
||||
export const createTheme = async (data: ThemeCreateRequest): Promise<ThemeCreateResponse> => {
|
||||
return await apiClient.post<ThemeCreateResponse>('/themes', data, true);
|
||||
};
|
||||
|
||||
export const fetchThemes = async (): Promise<ThemeRetrieveListResponse> => {
|
||||
return await apiClient.get<ThemeRetrieveListResponse>('/themes', true);
|
||||
};
|
||||
|
||||
export const mostReservedThemes = async (count: number = 10): Promise<ThemeRetrieveListResponse> => {
|
||||
return await apiClient.get<ThemeRetrieveListResponse>(`/themes/most-reserved-last-week?count=${count}`, false);
|
||||
};
|
||||
|
||||
export const delTheme = async (id: string): Promise<void> => {
|
||||
return await apiClient.del(`/themes/${id}`, true);
|
||||
};
|
||||
|
||||
export const fetchAdminThemes = async (): Promise<AdminThemeSummaryRetrieveListResponse> => {
|
||||
return await apiClient.get<AdminThemeSummaryRetrieveListResponse>('/admin/themes');
|
||||
};
|
||||
@ -34,8 +17,8 @@ export const fetchAdminThemeDetail = async (id: string): Promise<AdminThemeDetai
|
||||
return await apiClient.get<AdminThemeDetailRetrieveResponse>(`/admin/themes/${id}`);
|
||||
};
|
||||
|
||||
export const createThemeV2 = async (themeData: ThemeCreateRequestV2): Promise<ThemeCreateResponseV2> => {
|
||||
return await apiClient.post<ThemeCreateResponseV2>('/admin/themes', themeData);
|
||||
export const createTheme = async (themeData: ThemeCreateRequest): Promise<ThemeCreateResponse> => {
|
||||
return await apiClient.post<ThemeCreateResponse>('/admin/themes', themeData);
|
||||
};
|
||||
|
||||
export const updateTheme = async (id: string, themeData: ThemeUpdateRequest): Promise<void> => {
|
||||
@ -46,10 +29,10 @@ export const deleteTheme = async (id: string): Promise<void> => {
|
||||
await apiClient.del<any>(`/admin/themes/${id}`);
|
||||
};
|
||||
|
||||
export const fetchUserThemes = async (): Promise<UserThemeRetrieveListResponse> => {
|
||||
return await apiClient.get<UserThemeRetrieveListResponse>('/v2/themes');
|
||||
export const fetchUserThemes = async (): Promise<ThemeInfoListResponse> => {
|
||||
return await apiClient.get<ThemeInfoListResponse>('/themes');
|
||||
};
|
||||
|
||||
export const findThemesByIds = async (request: ThemeListRetrieveRequest): Promise<ThemeRetrieveListResponseV2> => {
|
||||
return await apiClient.post<ThemeRetrieveListResponseV2>('/themes/retrieve', request);
|
||||
export const findThemesByIds = async (request: ThemeIdListResponse): Promise<ThemeInfoListResponse> => {
|
||||
return await apiClient.post<ThemeInfoListResponse>('/themes/retrieve', request);
|
||||
};
|
||||
|
||||
@ -1,29 +1,4 @@
|
||||
export interface ThemeCreateRequest {
|
||||
name: string;
|
||||
description: string;
|
||||
thumbnail: string;
|
||||
}
|
||||
|
||||
export interface ThemeCreateResponse {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
thumbnail: string;
|
||||
}
|
||||
|
||||
export interface ThemeRetrieveResponse {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
thumbnail: string;
|
||||
}
|
||||
|
||||
export interface ThemeRetrieveListResponse {
|
||||
themes: ThemeRetrieveResponse[];
|
||||
}
|
||||
|
||||
|
||||
export interface ThemeV2 {
|
||||
export interface AdminThemeDetailResponse {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
@ -42,7 +17,7 @@ export interface ThemeV2 {
|
||||
updatedBy: string;
|
||||
}
|
||||
|
||||
export interface ThemeCreateRequestV2 {
|
||||
export interface ThemeCreateRequest {
|
||||
name: string;
|
||||
description: string;
|
||||
thumbnailUrl: string;
|
||||
@ -56,7 +31,7 @@ export interface ThemeCreateRequestV2 {
|
||||
isOpen: boolean;
|
||||
}
|
||||
|
||||
export interface ThemeCreateResponseV2 {
|
||||
export interface ThemeCreateResponse {
|
||||
id: string;
|
||||
}
|
||||
|
||||
@ -105,7 +80,7 @@ export interface AdminThemeDetailRetrieveResponse {
|
||||
updatedBy: string;
|
||||
}
|
||||
|
||||
export interface UserThemeRetrieveResponse {
|
||||
export interface ThemeInfoResponse {
|
||||
id: string;
|
||||
name: string;
|
||||
thumbnailUrl: string;
|
||||
@ -119,32 +94,14 @@ export interface UserThemeRetrieveResponse {
|
||||
expectedMinutesTo: number;
|
||||
}
|
||||
|
||||
export interface UserThemeRetrieveListResponse {
|
||||
themes: UserThemeRetrieveResponse[];
|
||||
export interface ThemeInfoListResponse {
|
||||
themes: ThemeInfoResponse[];
|
||||
}
|
||||
|
||||
export interface ThemeListRetrieveRequest {
|
||||
export interface ThemeIdListResponse {
|
||||
themeIds: string[];
|
||||
}
|
||||
|
||||
export interface ThemeRetrieveResponseV2 {
|
||||
id: string;
|
||||
name: string;
|
||||
thumbnailUrl: string;
|
||||
description: string;
|
||||
difficulty: Difficulty;
|
||||
price: number;
|
||||
minParticipants: number;
|
||||
maxParticipants: number;
|
||||
availableMinutes: number;
|
||||
expectedMinutesFrom: number;
|
||||
expectedMinutesTo: number;
|
||||
}
|
||||
|
||||
export interface ThemeRetrieveListResponseV2 {
|
||||
themes: ThemeRetrieveResponseV2[];
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
export enum Difficulty {
|
||||
VERY_EASY = '매우 쉬움',
|
||||
@ -154,7 +111,7 @@ export enum Difficulty {
|
||||
VERY_HARD = '매우 어려움',
|
||||
}
|
||||
|
||||
export function mapThemeResponse(res: any): UserThemeRetrieveResponse {
|
||||
export function mapThemeResponse(res: any): ThemeInfoResponse {
|
||||
return {
|
||||
...res,
|
||||
difficulty: Difficulty[res.difficulty as keyof typeof Difficulty],
|
||||
|
||||
@ -1 +1,2 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93"
|
||||
height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
|
||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
@ -1,6 +1,6 @@
|
||||
import {checkLogin as apiCheckLogin, login as apiLogin, logout as apiLogout} from '@_api/auth/authAPI';
|
||||
import { PrincipalType, type LoginRequest, type LoginSuccessResponse } from '@_api/auth/authTypes';
|
||||
import React, { createContext, useContext, useEffect, useState, type ReactNode } from 'react';
|
||||
import {type LoginRequest, type LoginSuccessResponse, PrincipalType} from '@_api/auth/authTypes';
|
||||
import React, {createContext, type ReactNode, useContext, useEffect, useState} from 'react';
|
||||
|
||||
interface AuthContextType {
|
||||
loggedIn: boolean;
|
||||
|
||||
@ -1,120 +0,0 @@
|
||||
/* /src/css/admin-time-page.css */
|
||||
.admin-time-container {
|
||||
max-width: 800px;
|
||||
margin: 40px auto;
|
||||
padding: 40px;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
background-color: #f4f6f8;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.admin-time-container .page-title {
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
color: #333d4b;
|
||||
margin-bottom: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.section-card {
|
||||
background-color: #ffffff;
|
||||
border-radius: 12px;
|
||||
padding: 24px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
.table-header {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.table-container table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.table-container th,
|
||||
.table-container td {
|
||||
padding: 12px 16px;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid #e5e8eb;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.table-container th {
|
||||
background-color: #f9fafb;
|
||||
color: #505a67;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.table-container tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.table-container tr:hover {
|
||||
background-color: #f4f6f8;
|
||||
}
|
||||
|
||||
.form-input {
|
||||
width: 100%;
|
||||
padding: 10px 12px;
|
||||
font-size: 15px;
|
||||
border: 1px solid #E5E8EB;
|
||||
border-radius: 8px;
|
||||
box-sizing: border-box;
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.form-input:focus {
|
||||
outline: none;
|
||||
border-color: #3182F6;
|
||||
box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.2);
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 8px 16px;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
border-radius: 8px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #3182F6;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: #1B64DA;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background-color: #F2F4F6;
|
||||
color: #4E5968;
|
||||
}
|
||||
|
||||
.btn-secondary:hover {
|
||||
background-color: #E5E8EB;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
background-color: #e53e3e;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-danger:hover {
|
||||
background-color: #c53030;
|
||||
}
|
||||
|
||||
.editing-row td {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.editing-row .btn {
|
||||
margin-right: 8px;
|
||||
}
|
||||
@ -1,81 +0,0 @@
|
||||
/* /src/css/admin-waiting-page.css */
|
||||
.admin-waiting-container {
|
||||
max-width: 1200px;
|
||||
margin: 40px auto;
|
||||
padding: 40px;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
background-color: #f4f6f8;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.admin-waiting-container .page-title {
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
color: #333d4b;
|
||||
margin-bottom: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.section-card {
|
||||
background-color: #ffffff;
|
||||
border-radius: 12px;
|
||||
padding: 24px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
.table-container table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.table-container th,
|
||||
.table-container td {
|
||||
padding: 12px 16px;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid #e5e8eb;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.table-container th {
|
||||
background-color: #f9fafb;
|
||||
color: #505a67;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.table-container tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.table-container tr:hover {
|
||||
background-color: #f4f6f8;
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 8px 16px;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
border-radius: 8px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #3182F6;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: #1B64DA;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
background-color: #e53e3e;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-danger:hover {
|
||||
background-color: #c53030;
|
||||
}
|
||||
@ -327,13 +327,13 @@
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background-color: #ffffff;
|
||||
padding: 32px;
|
||||
border-radius: 16px;
|
||||
width: 90%;
|
||||
max-width: 500px;
|
||||
position: relative;
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
|
||||
background-color: #ffffff !important;
|
||||
padding: 32px !important;
|
||||
border-radius: 16px !important;
|
||||
width: 90% !important;
|
||||
max-width: 500px !important;
|
||||
position: relative !important;
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
|
||||
}
|
||||
|
||||
.modal-close-button {
|
||||
|
||||
@ -1,175 +0,0 @@
|
||||
#root .flatpickr-input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#root .modal-backdrop {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1050;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: rgba(0, 0, 0, 0.5) !important;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#root .modal-dialog {
|
||||
max-width: 500px;
|
||||
width: 90%;
|
||||
margin: 1.75rem auto;
|
||||
}
|
||||
|
||||
/* Toss-style Modal */
|
||||
#root .modal-content {
|
||||
background-color: #fff !important;
|
||||
border-radius: 16px;
|
||||
border: none;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
padding: 1.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
pointer-events: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#root .modal-header {
|
||||
border-bottom: none;
|
||||
padding: 0 0 1rem 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#root .modal-title {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
#root .btn-close {
|
||||
background: transparent;
|
||||
border: 0;
|
||||
font-size: 1.5rem;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
#root .modal-body {
|
||||
padding: 1rem 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#root .modal-body p {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
#root .modal-footer {
|
||||
border-top: none;
|
||||
padding: 1rem 0 0 0;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
/* --- Generic Button Styles --- */
|
||||
#root .btn-primary,
|
||||
#root .modal-footer .btn-primary,
|
||||
#root .btn-wrapper .btn-primary,
|
||||
#root .button-group .btn-primary,
|
||||
#root .success-page-actions .btn-primary {
|
||||
background-color: #007bff;
|
||||
border-color: #007bff;
|
||||
color: #fff;
|
||||
transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
|
||||
padding: 0.75rem 1.5rem;
|
||||
border-radius: 8px;
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
#root .btn-secondary,
|
||||
#root .modal-footer .btn-secondary,
|
||||
#root .success-page-actions .btn-secondary {
|
||||
background-color: #f0f2f5;
|
||||
border-color: #f0f2f5;
|
||||
color: #333;
|
||||
padding: 0.75rem 1.5rem;
|
||||
border-radius: 8px;
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
transition: background-color 0.15s ease-in-out;
|
||||
}
|
||||
|
||||
#root .btn-primary:hover,
|
||||
#root .modal-footer .btn-primary:hover,
|
||||
#root .btn-wrapper .btn-primary:hover,
|
||||
#root .button-group .btn-primary:hover,
|
||||
#root .success-page-actions .btn-primary:hover {
|
||||
background-color: #0069d9;
|
||||
border-color: #0062cc;
|
||||
}
|
||||
|
||||
#root .btn-secondary:hover,
|
||||
#root .modal-footer .btn-secondary:hover,
|
||||
#root .success-page-actions .btn-secondary:hover {
|
||||
background-color: #e2e6ea;
|
||||
}
|
||||
|
||||
|
||||
/* --- Reservation Success Page Styles --- */
|
||||
.reservation-success-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 3rem 1rem;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.reservation-success-page .content-container-title {
|
||||
font-size: 2rem;
|
||||
font-weight: 600;
|
||||
margin-bottom: 1.5rem;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.reservation-info-box {
|
||||
border: 1px solid #e9ecef;
|
||||
border-radius: 12px;
|
||||
padding: 2rem;
|
||||
background-color: #fff;
|
||||
min-width: 380px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.reservation-info-box h3 {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
margin-bottom: 1.5rem;
|
||||
padding-bottom: 1rem;
|
||||
border-bottom: 1px solid #e9ecef;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.reservation-info-box .info-item {
|
||||
font-size: 1.1rem;
|
||||
margin-bottom: 1rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.reservation-info-box .info-item strong {
|
||||
font-weight: 500;
|
||||
color: #495057;
|
||||
width: 70px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.success-page-actions {
|
||||
margin-top: 2.5rem;
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
.disabled {
|
||||
pointer-events: none;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
#theme-slots .theme-slot.active, #time-slots .time-slot.active {
|
||||
background-color: #0a3711 !important;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#time-slots .time-slot.disabled {
|
||||
background-color: #cccccc;
|
||||
color: #666666;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
@ -3,9 +3,8 @@ import ReactDOM from 'react-dom/client';
|
||||
import App from './App';
|
||||
import 'bootstrap/dist/css/bootstrap.min.css';
|
||||
import 'bootstrap/dist/js/bootstrap.bundle.min.js';
|
||||
import './css/style.css';
|
||||
import './css/reservation.css';
|
||||
import './css/toss-style.css';
|
||||
import '@_css/style.css';
|
||||
import '@_css/toss-style.css';
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root')!).render(
|
||||
<React.StrictMode>
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
import {fetchMostReservedThemeIds} from '@_api/reservation/reservationAPIV2';
|
||||
import {fetchMostReservedThemeIds} from '@_api/reservation/reservationAPI';
|
||||
import '@_css/home-page-v2.css';
|
||||
import React, {useEffect, useState} from 'react';
|
||||
import {useNavigate} from 'react-router-dom';
|
||||
import {findThemesByIds} from '@_api/theme/themeAPI';
|
||||
import {type UserThemeRetrieveResponse} from '@_api/theme/themeTypes';
|
||||
import {mapThemeResponse, type ThemeInfoResponse} from '@_api/theme/themeTypes';
|
||||
|
||||
const HomePage: React.FC = () => {
|
||||
const [ranking, setRanking] = useState<UserThemeRetrieveResponse[]>([]);
|
||||
const [selectedTheme, setSelectedTheme] = useState<UserThemeRetrieveResponse | null>(null);
|
||||
const [ranking, setRanking] = useState<ThemeInfoResponse[]>([]);
|
||||
const [selectedTheme, setSelectedTheme] = useState<ThemeInfoResponse | null>(null);
|
||||
const navigate = useNavigate();
|
||||
|
||||
useEffect(() => {
|
||||
@ -26,7 +26,7 @@ const HomePage: React.FC = () => {
|
||||
if (themeIds.length === 0) return;
|
||||
|
||||
const response = await findThemesByIds({ themeIds: themeIds });
|
||||
setRanking(response.themes);
|
||||
setRanking(response.themes.map(mapThemeResponse));
|
||||
} catch (err) {
|
||||
console.error('Error fetching ranking:', err);
|
||||
}
|
||||
@ -35,7 +35,7 @@ const HomePage: React.FC = () => {
|
||||
fetchData();
|
||||
}, []);
|
||||
|
||||
const handleThemeClick = (theme: UserThemeRetrieveResponse) => {
|
||||
const handleThemeClick = (theme: ThemeInfoResponse) => {
|
||||
setSelectedTheme(theme);
|
||||
};
|
||||
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
import {cancelPayment} from '@_api/payment/paymentAPI';
|
||||
import type {PaymentRetrieveResponse} from '@_api/payment/PaymentTypes';
|
||||
import { cancelReservation, fetchDetailById, fetchSummaryByMember } from '@_api/reservation/reservationAPIV2';
|
||||
import { ReservationStatusV2, type ReservationDetail, type ReservationSummaryRetrieveResponse } from '@_api/reservation/reservationTypesV2';
|
||||
import {cancelReservation, fetchDetailById, fetchSummaryByMember} from '@_api/reservation/reservationAPI';
|
||||
import {
|
||||
type ReservationDetail,
|
||||
ReservationStatus,
|
||||
type ReservationSummaryRetrieveResponse
|
||||
} from '@_api/reservation/reservationTypes';
|
||||
import React, {useEffect, useState} from 'react';
|
||||
import '@_css/my-reservation-v2.css';
|
||||
|
||||
@ -10,14 +14,14 @@ const getReservationStatus = (reservation: ReservationSummaryRetrieveResponse):
|
||||
const reservationDateTime = new Date(`${reservation.date}T${reservation.startAt}`);
|
||||
|
||||
switch (reservation.status) {
|
||||
case ReservationStatusV2.CANCELED:
|
||||
case ReservationStatus.CANCELED:
|
||||
return { className: 'status-canceled', text: '취소됨' };
|
||||
case ReservationStatusV2.CONFIRMED:
|
||||
case ReservationStatus.CONFIRMED:
|
||||
if (reservationDateTime < now) {
|
||||
return { className: 'status-completed', text: '이용완료' };
|
||||
}
|
||||
return { className: 'status-confirmed', text: '예약확정' };
|
||||
case ReservationStatusV2.PENDING:
|
||||
case ReservationStatus.PENDING:
|
||||
return { className: 'status-pending', text: '입금대기' };
|
||||
default:
|
||||
return { className: `status-${reservation.status.toLowerCase()}`, text: reservation.status };
|
||||
@ -116,7 +120,7 @@ const CancellationView: React.FC<{
|
||||
<div className="cancellation-summary-v2">
|
||||
<p><strong>테마:</strong> {reservation.themeName}</p>
|
||||
<p><strong>신청 일시:</strong> {formatDisplayDateTime(reservation.applicationDateTime)}</p>
|
||||
<p><strong>결제 금액:</strong> {reservation.payment.totalAmount.toLocaleString()}원</p>
|
||||
{reservation.payment && <p><strong>결제 금액:</strong> {reservation.payment.totalAmount.toLocaleString()}원</p>}
|
||||
</div>
|
||||
<textarea
|
||||
value={reason}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import {isLoginRequiredError} from '@_api/apiClient';
|
||||
import { createPendingReservation } from '@_api/reservation/reservationAPIV2';
|
||||
import {createPendingReservation} from '@_api/reservation/reservationAPI';
|
||||
import {fetchContact} from '@_api/user/userAPI';
|
||||
import '@_css/reservation-v2-1.css';
|
||||
import React, {useEffect, useState} from 'react';
|
||||
|
||||
@ -1,20 +1,19 @@
|
||||
import {isLoginRequiredError} from '@_api/apiClient';
|
||||
import {findAvailableThemesByDate, findSchedules, holdSchedule} from '@_api/schedule/scheduleAPI';
|
||||
import { ScheduleStatus, type ScheduleRetrieveResponse } from '@_api/schedule/scheduleTypes';
|
||||
import {type ScheduleRetrieveResponse, ScheduleStatus} from '@_api/schedule/scheduleTypes';
|
||||
import {findThemesByIds} from '@_api/theme/themeAPI';
|
||||
import { mapThemeResponse, type UserThemeRetrieveResponse } from '@_api/theme/themeTypes';
|
||||
import {mapThemeResponse, type ThemeInfoResponse} from '@_api/theme/themeTypes';
|
||||
import '@_css/reservation-v2-1.css';
|
||||
import React, {useEffect, useState} from 'react';
|
||||
import {useLocation, useNavigate} from 'react-router-dom';
|
||||
import {formatDate, formatTime} from 'src/util/DateTimeFormatter';
|
||||
|
||||
|
||||
|
||||
const ReservationStep1Page: React.FC = () => {
|
||||
const [selectedDate, setSelectedDate] = useState<Date>(new Date());
|
||||
const [viewDate, setViewDate] = useState<Date>(new Date()); // For carousel
|
||||
const [themes, setThemes] = useState<UserThemeRetrieveResponse[]>([]);
|
||||
const [selectedTheme, setSelectedTheme] = useState<UserThemeRetrieveResponse | null>(null);
|
||||
const [themes, setThemes] = useState<ThemeInfoResponse[]>([]);
|
||||
const [selectedTheme, setSelectedTheme] = useState<ThemeInfoResponse | null>(null);
|
||||
const [schedules, setSchedules] = useState<ScheduleRetrieveResponse[]>([]);
|
||||
const [selectedSchedule, setSelectedSchedule] = useState<ScheduleRetrieveResponse | null>(null);
|
||||
const [isThemeModalOpen, setIsThemeModalOpen] = useState(false);
|
||||
@ -185,7 +184,7 @@ const ReservationStep1Page: React.FC = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const openThemeModal = (theme: UserThemeRetrieveResponse) => {
|
||||
const openThemeModal = (theme: ThemeInfoResponse) => {
|
||||
setSelectedTheme(theme);
|
||||
setIsThemeModalOpen(true);
|
||||
};
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import {isLoginRequiredError} from '@_api/apiClient';
|
||||
import {confirmPayment} from '@_api/payment/paymentAPI';
|
||||
import { PaymentType, type PaymentConfirmRequest } from '@_api/payment/PaymentTypes';
|
||||
import { confirmReservation } from '@_api/reservation/reservationAPIV2';
|
||||
import {type PaymentConfirmRequest, PaymentType} from '@_api/payment/PaymentTypes';
|
||||
import {confirmReservation} from '@_api/reservation/reservationAPI';
|
||||
import '@_css/reservation-v2-1.css';
|
||||
import React, {useEffect, useRef} from 'react';
|
||||
import {useLocation, useNavigate} from 'react-router-dom';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import {signup} from '@_api/user/userAPI';
|
||||
import type {UserCreateRequest, UserCreateResponse} from '@_api/user/userTypes';
|
||||
import '@_css/signup-page-v2.css';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import React, {useEffect, useState} from 'react';
|
||||
import {useNavigate} from 'react-router-dom';
|
||||
|
||||
const MIN_PASSWORD_LENGTH = 8;
|
||||
|
||||
@ -1,6 +1,16 @@
|
||||
import {isLoginRequiredError} from '@_api/apiClient';
|
||||
import { createSchedule, deleteSchedule, findScheduleById, findSchedules, updateSchedule } from '@_api/schedule/scheduleAPI';
|
||||
import { ScheduleStatus, type ScheduleDetailRetrieveResponse, type ScheduleRetrieveResponse } from '@_api/schedule/scheduleTypes';
|
||||
import {
|
||||
createSchedule,
|
||||
deleteSchedule,
|
||||
findScheduleById,
|
||||
findSchedules,
|
||||
updateSchedule
|
||||
} from '@_api/schedule/scheduleAPI';
|
||||
import {
|
||||
type ScheduleDetailRetrieveResponse,
|
||||
type ScheduleRetrieveResponse,
|
||||
ScheduleStatus
|
||||
} from '@_api/schedule/scheduleTypes';
|
||||
import {fetchAdminThemes} from '@_api/theme/themeAPI';
|
||||
import type {AdminThemeSummaryRetrieveResponse} from '@_api/theme/themeTypes';
|
||||
import '@_css/admin-schedule-page.css';
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import {isLoginRequiredError} from '@_api/apiClient';
|
||||
import {createTheme, deleteTheme, fetchAdminThemeDetail, updateTheme} from '@_api/theme/themeAPI';
|
||||
import {
|
||||
createThemeV2,
|
||||
deleteTheme,
|
||||
fetchAdminThemeDetail,
|
||||
updateTheme
|
||||
} from '@_api/theme/themeAPI';
|
||||
import { Difficulty, type ThemeCreateRequestV2, type ThemeUpdateRequest, type ThemeV2 } from '@_api/theme/themeTypes';
|
||||
type AdminThemeDetailResponse,
|
||||
Difficulty,
|
||||
type ThemeCreateRequest,
|
||||
type ThemeUpdateRequest
|
||||
} from '@_api/theme/themeTypes';
|
||||
import React, {useEffect, useState} from 'react';
|
||||
import {useLocation, useNavigate, useParams} from 'react-router-dom';
|
||||
import '@_css/admin-theme-edit-page.css';
|
||||
@ -17,8 +17,8 @@ const AdminThemeEditPage: React.FC = () => {
|
||||
|
||||
const isNew = themeId === 'new';
|
||||
|
||||
const [theme, setTheme] = useState<ThemeV2 | ThemeCreateRequestV2 | null>(null);
|
||||
const [originalTheme, setOriginalTheme] = useState<ThemeV2 | ThemeCreateRequestV2 | null>(null);
|
||||
const [theme, setTheme] = useState<AdminThemeDetailResponse | ThemeCreateRequest | null>(null);
|
||||
const [originalTheme, setOriginalTheme] = useState<AdminThemeDetailResponse | ThemeCreateRequest | null>(null);
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
const [isEditing, setIsEditing] = useState(isNew);
|
||||
|
||||
@ -35,7 +35,7 @@ const AdminThemeEditPage: React.FC = () => {
|
||||
|
||||
useEffect(() => {
|
||||
if (isNew) {
|
||||
const newTheme: ThemeCreateRequestV2 = {
|
||||
const newTheme: ThemeCreateRequest = {
|
||||
name: '',
|
||||
description: '',
|
||||
thumbnailUrl: '',
|
||||
@ -55,7 +55,7 @@ const AdminThemeEditPage: React.FC = () => {
|
||||
fetchAdminThemeDetail(themeId)
|
||||
.then(data => {
|
||||
// Map AdminThemeDetailRetrieveResponse to ThemeV2
|
||||
const fetchedTheme: ThemeV2 = {
|
||||
const fetchedTheme: AdminThemeDetailResponse = {
|
||||
id: data.id,
|
||||
name: data.name,
|
||||
description: data.description,
|
||||
@ -112,7 +112,7 @@ const AdminThemeEditPage: React.FC = () => {
|
||||
|
||||
try {
|
||||
if (isNew) {
|
||||
await createThemeV2(theme as ThemeCreateRequestV2);
|
||||
await createTheme(theme as ThemeCreateRequest);
|
||||
alert('테마가 성공적으로 생성되었습니다.');
|
||||
navigate(`/admin/theme`);
|
||||
} else {
|
||||
|
||||
@ -4,6 +4,7 @@ import jakarta.validation.Valid
|
||||
import org.springframework.http.ResponseEntity
|
||||
import org.springframework.web.bind.annotation.PostMapping
|
||||
import org.springframework.web.bind.annotation.RequestBody
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RequestParam
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
import roomescape.auth.web.support.CurrentUser
|
||||
@ -13,11 +14,12 @@ import roomescape.payment.business.PaymentService
|
||||
import roomescape.payment.docs.PaymentAPI
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/payments")
|
||||
class PaymentController(
|
||||
private val paymentService: PaymentService
|
||||
) : PaymentAPI {
|
||||
|
||||
@PostMapping("/payments")
|
||||
@PostMapping
|
||||
override fun confirmPayment(
|
||||
@RequestParam(required = true) reservationId: Long,
|
||||
@Valid @RequestBody request: PaymentConfirmRequest
|
||||
@ -27,7 +29,7 @@ class PaymentController(
|
||||
return ResponseEntity.ok(CommonApiResponse(response))
|
||||
}
|
||||
|
||||
@PostMapping("/payments/cancel")
|
||||
@PostMapping("/cancel")
|
||||
override fun cancelPayment(
|
||||
@CurrentUser user: CurrentUserContext,
|
||||
@Valid @RequestBody request: PaymentCancelRequest
|
||||
|
||||
@ -45,7 +45,7 @@ interface ReservationAPI {
|
||||
@ApiResponses(ApiResponse(responseCode = "200", description = "성공", useReturnTypeSchema = true))
|
||||
fun cancelReservation(
|
||||
@CurrentUser user: CurrentUserContext,
|
||||
@PathVariable reservationId: Long,
|
||||
@PathVariable id: Long,
|
||||
@Valid @RequestBody request: ReservationCancelRequest
|
||||
): ResponseEntity<CommonApiResponse<Unit>>
|
||||
|
||||
|
||||
@ -10,11 +10,12 @@ import roomescape.reservation.business.ReservationService
|
||||
import roomescape.reservation.docs.ReservationAPI
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/reservations")
|
||||
class ReservationController(
|
||||
private val reservationService: ReservationService
|
||||
) : ReservationAPI {
|
||||
|
||||
@GetMapping("/reservations/popular-themes")
|
||||
@GetMapping("/popular-themes")
|
||||
override fun findMostReservedThemeIds(
|
||||
@RequestParam count: Int
|
||||
): ResponseEntity<CommonApiResponse<MostReservedThemeIdListResponse>> {
|
||||
@ -23,7 +24,7 @@ class ReservationController(
|
||||
return ResponseEntity.ok(CommonApiResponse(response))
|
||||
}
|
||||
|
||||
@PostMapping("/reservations/pending")
|
||||
@PostMapping("/pending")
|
||||
override fun createPendingReservation(
|
||||
@CurrentUser user: CurrentUserContext,
|
||||
@Valid @RequestBody request: PendingReservationCreateRequest
|
||||
@ -33,7 +34,7 @@ class ReservationController(
|
||||
return ResponseEntity.ok(CommonApiResponse(response))
|
||||
}
|
||||
|
||||
@PostMapping("/reservations/{id}/confirm")
|
||||
@PostMapping("/{id}/confirm")
|
||||
override fun confirmReservation(
|
||||
@PathVariable("id") id: Long
|
||||
): ResponseEntity<CommonApiResponse<Unit>> {
|
||||
@ -42,18 +43,18 @@ class ReservationController(
|
||||
return ResponseEntity.ok().body(CommonApiResponse())
|
||||
}
|
||||
|
||||
@PostMapping("/reservations/{reservationId}/cancel")
|
||||
@PostMapping("/{id}/cancel")
|
||||
override fun cancelReservation(
|
||||
@CurrentUser user: CurrentUserContext,
|
||||
@PathVariable reservationId: Long,
|
||||
@PathVariable id: Long,
|
||||
@Valid @RequestBody request: ReservationCancelRequest
|
||||
): ResponseEntity<CommonApiResponse<Unit>> {
|
||||
reservationService.cancelReservation(user, reservationId, request)
|
||||
reservationService.cancelReservation(user, id, request)
|
||||
|
||||
return ResponseEntity.ok().body(CommonApiResponse())
|
||||
}
|
||||
|
||||
@GetMapping("/reservations/summary")
|
||||
@GetMapping("/summary")
|
||||
override fun findSummaryByMemberId(
|
||||
@CurrentUser user: CurrentUserContext,
|
||||
): ResponseEntity<CommonApiResponse<ReservationSummaryListResponse>> {
|
||||
@ -62,7 +63,7 @@ class ReservationController(
|
||||
return ResponseEntity.ok(CommonApiResponse(response))
|
||||
}
|
||||
|
||||
@GetMapping("/reservations/{id}/detail")
|
||||
@GetMapping("/{id}/detail")
|
||||
override fun findDetailById(
|
||||
@PathVariable("id") id: Long
|
||||
): ResponseEntity<CommonApiResponse<ReservationDetailResponse>> {
|
||||
|
||||
@ -10,10 +10,11 @@ import roomescape.schedule.docs.ScheduleAPI
|
||||
import java.time.LocalDate
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/schedules")
|
||||
class ScheduleController(
|
||||
private val scheduleService: ScheduleService
|
||||
) : ScheduleAPI {
|
||||
@GetMapping("/schedules/themes")
|
||||
@GetMapping("/themes")
|
||||
override fun findAvailableThemes(
|
||||
@RequestParam("date") @DateTimeFormat(pattern = "yyyy-MM-dd") date: LocalDate
|
||||
): ResponseEntity<CommonApiResponse<AvailableThemeIdListResponse>> {
|
||||
@ -22,7 +23,7 @@ class ScheduleController(
|
||||
return ResponseEntity.ok(CommonApiResponse(response))
|
||||
}
|
||||
|
||||
@GetMapping("/schedules")
|
||||
@GetMapping
|
||||
override fun findAllTime(
|
||||
@RequestParam("date") @DateTimeFormat(pattern = "yyyy-MM-dd") date: LocalDate,
|
||||
@RequestParam("themeId") themeId: Long
|
||||
@ -32,7 +33,7 @@ class ScheduleController(
|
||||
return ResponseEntity.ok(CommonApiResponse(response))
|
||||
}
|
||||
|
||||
@GetMapping("/schedules/{id}")
|
||||
@GetMapping("/{id}")
|
||||
override fun findScheduleDetail(
|
||||
@PathVariable("id") id: Long
|
||||
): ResponseEntity<CommonApiResponse<ScheduleDetailResponse>> {
|
||||
@ -41,7 +42,7 @@ class ScheduleController(
|
||||
return ResponseEntity.ok(CommonApiResponse(response))
|
||||
}
|
||||
|
||||
@PostMapping("/schedules")
|
||||
@PostMapping
|
||||
override fun createSchedule(
|
||||
@Valid @RequestBody request: ScheduleCreateRequest
|
||||
): ResponseEntity<CommonApiResponse<ScheduleCreateResponse>> {
|
||||
@ -50,7 +51,7 @@ class ScheduleController(
|
||||
return ResponseEntity.ok(CommonApiResponse(response))
|
||||
}
|
||||
|
||||
@PatchMapping("/schedules/{id}/hold")
|
||||
@PatchMapping("/{id}/hold")
|
||||
override fun holdSchedule(
|
||||
@PathVariable("id") id: Long
|
||||
): ResponseEntity<CommonApiResponse<Unit>> {
|
||||
@ -59,7 +60,7 @@ class ScheduleController(
|
||||
return ResponseEntity.ok(CommonApiResponse())
|
||||
}
|
||||
|
||||
@PatchMapping("/schedules/{id}")
|
||||
@PatchMapping("/{id}")
|
||||
override fun updateSchedule(
|
||||
@PathVariable("id") id: Long,
|
||||
@Valid @RequestBody request: ScheduleUpdateRequest
|
||||
@ -69,7 +70,7 @@ class ScheduleController(
|
||||
return ResponseEntity.ok(CommonApiResponse(Unit))
|
||||
}
|
||||
|
||||
@DeleteMapping("/schedules/{id}")
|
||||
@DeleteMapping("/{id}")
|
||||
override fun deleteSchedule(
|
||||
@PathVariable("id") id: Long
|
||||
): ResponseEntity<CommonApiResponse<Unit>> {
|
||||
|
||||
@ -21,7 +21,7 @@ class ThemeController(
|
||||
return ResponseEntity.ok(CommonApiResponse(response))
|
||||
}
|
||||
|
||||
@GetMapping("/v2/themes")
|
||||
@GetMapping("/themes")
|
||||
override fun findUserThemes(): ResponseEntity<CommonApiResponse<ThemeInfoListResponse>> {
|
||||
val response = themeService.findThemesForReservation()
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import org.springframework.http.ResponseEntity
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
import org.springframework.web.bind.annotation.PostMapping
|
||||
import org.springframework.web.bind.annotation.RequestBody
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
import roomescape.auth.web.support.CurrentUser
|
||||
import roomescape.common.dto.CurrentUserContext
|
||||
@ -13,11 +14,12 @@ import roomescape.user.business.UserService
|
||||
import roomescape.user.docs.UserAPI
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/users")
|
||||
class UserController(
|
||||
private val userService: UserService
|
||||
) : UserAPI {
|
||||
|
||||
@PostMapping("/users")
|
||||
@PostMapping
|
||||
override fun signup(
|
||||
@Valid @RequestBody request: UserCreateRequest
|
||||
): ResponseEntity<CommonApiResponse<UserCreateResponse>> {
|
||||
@ -26,7 +28,7 @@ class UserController(
|
||||
return ResponseEntity.ok(CommonApiResponse(response))
|
||||
}
|
||||
|
||||
@GetMapping("/users/contact")
|
||||
@GetMapping("/contact")
|
||||
override fun findContact(
|
||||
@CurrentUser user: CurrentUserContext
|
||||
): ResponseEntity<CommonApiResponse<UserContactResponse>> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user