From be2b3ef1caa4cc488b8476ee63c9d7c9b0557748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Coffinon=E2=80=9D?= <“offinon@postmedia.co.kr”> Date: Wed, 11 Mar 2026 05:14:32 +0000 Subject: [PATCH] =?UTF-8?q?/events=20=EA=B4=80=EB=A0=A8=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EB=B0=8F=20=ED=8C=8C=EC=9D=BC=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{events => products}/bear-hug-thumb.jpg | Bin public/{events => products}/bear-hug.jpg | Bin public/{events => products}/bear-hug.webp | Bin .../six-fingers-thumb.jpg | Bin public/{events => products}/six-fingers.jpg | Bin public/{events => products}/six-fingers.webp | Bin .../viking-people-thumb.jpg | Bin public/{events => products}/viking-people.jpg | Bin .../{events => products}/viking-people.webp | Bin .../we-all-look-the-same-thumb.jpg | Bin .../we-all-look-the-same.jpg | Bin .../we-all-look-the-same.webp | Bin src/app/(app)/cancellation/page.tsx | 6 +- src/app/(app)/events/[id]/page.tsx | 90 -------- src/app/(app)/events/page.tsx | 87 -------- src/app/(app)/orders/[id]/page.tsx | 6 +- src/app/(app)/orders/page.tsx | 8 +- src/app/(app)/products/page.tsx | 4 +- src/app/(app)/users/[id]/page.tsx | 8 +- src/data.ts | 197 ++---------------- 20 files changed, 29 insertions(+), 377 deletions(-) rename public/{events => products}/bear-hug-thumb.jpg (100%) rename public/{events => products}/bear-hug.jpg (100%) rename public/{events => products}/bear-hug.webp (100%) rename public/{events => products}/six-fingers-thumb.jpg (100%) rename public/{events => products}/six-fingers.jpg (100%) rename public/{events => products}/six-fingers.webp (100%) rename public/{events => products}/viking-people-thumb.jpg (100%) rename public/{events => products}/viking-people.jpg (100%) rename public/{events => products}/viking-people.webp (100%) rename public/{events => products}/we-all-look-the-same-thumb.jpg (100%) rename public/{events => products}/we-all-look-the-same.jpg (100%) rename public/{events => products}/we-all-look-the-same.webp (100%) delete mode 100644 src/app/(app)/events/[id]/page.tsx delete mode 100644 src/app/(app)/events/page.tsx diff --git a/public/events/bear-hug-thumb.jpg b/public/products/bear-hug-thumb.jpg similarity index 100% rename from public/events/bear-hug-thumb.jpg rename to public/products/bear-hug-thumb.jpg diff --git a/public/events/bear-hug.jpg b/public/products/bear-hug.jpg similarity index 100% rename from public/events/bear-hug.jpg rename to public/products/bear-hug.jpg diff --git a/public/events/bear-hug.webp b/public/products/bear-hug.webp similarity index 100% rename from public/events/bear-hug.webp rename to public/products/bear-hug.webp diff --git a/public/events/six-fingers-thumb.jpg b/public/products/six-fingers-thumb.jpg similarity index 100% rename from public/events/six-fingers-thumb.jpg rename to public/products/six-fingers-thumb.jpg diff --git a/public/events/six-fingers.jpg b/public/products/six-fingers.jpg similarity index 100% rename from public/events/six-fingers.jpg rename to public/products/six-fingers.jpg diff --git a/public/events/six-fingers.webp b/public/products/six-fingers.webp similarity index 100% rename from public/events/six-fingers.webp rename to public/products/six-fingers.webp diff --git a/public/events/viking-people-thumb.jpg b/public/products/viking-people-thumb.jpg similarity index 100% rename from public/events/viking-people-thumb.jpg rename to public/products/viking-people-thumb.jpg diff --git a/public/events/viking-people.jpg b/public/products/viking-people.jpg similarity index 100% rename from public/events/viking-people.jpg rename to public/products/viking-people.jpg diff --git a/public/events/viking-people.webp b/public/products/viking-people.webp similarity index 100% rename from public/events/viking-people.webp rename to public/products/viking-people.webp diff --git a/public/events/we-all-look-the-same-thumb.jpg b/public/products/we-all-look-the-same-thumb.jpg similarity index 100% rename from public/events/we-all-look-the-same-thumb.jpg rename to public/products/we-all-look-the-same-thumb.jpg diff --git a/public/events/we-all-look-the-same.jpg b/public/products/we-all-look-the-same.jpg similarity index 100% rename from public/events/we-all-look-the-same.jpg rename to public/products/we-all-look-the-same.jpg diff --git a/public/events/we-all-look-the-same.webp b/public/products/we-all-look-the-same.webp similarity index 100% rename from public/events/we-all-look-the-same.webp rename to public/products/we-all-look-the-same.webp diff --git a/src/app/(app)/cancellation/page.tsx b/src/app/(app)/cancellation/page.tsx index 083cc3e..6b153f0 100644 --- a/src/app/(app)/cancellation/page.tsx +++ b/src/app/(app)/cancellation/page.tsx @@ -80,11 +80,11 @@ export default async function CancellationPage() { {order.customer.name} - {order.event.productType} + {order.product.productType} - - {order.event.name} + + {order.product.name} {order.amount.krw} diff --git a/src/app/(app)/events/[id]/page.tsx b/src/app/(app)/events/[id]/page.tsx deleted file mode 100644 index 07bd0ac..0000000 --- a/src/app/(app)/events/[id]/page.tsx +++ /dev/null @@ -1,90 +0,0 @@ -import { Stat } from '@/app/stat' -import { Badge } from '@/components/badge' -import { Button } from '@/components/button' -import { Heading, Subheading } from '@/components/heading' -import { Link } from '@/components/link' -import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/table' -import { getEvent, getEventOrders } from '@/data' -import { ChevronLeftIcon } from '@heroicons/react/16/solid' -import type { Metadata } from 'next' -import { notFound } from 'next/navigation' - -export async function generateMetadata({ params }: { params: Promise<{ id: string }> }): Promise { - let { id } = await params - let event = await getEvent(id) - - return { - title: event?.name, - } -} - -export default async function Event({ params }: { params: Promise<{ id: string }> }) { - let { id } = await params - let event = await getEvent(id) - let orders = await getEventOrders(id) - - if (!event) { - notFound() - } - - return ( - <> - - - - Events - - - - - - - - - - {event.name} - {event.status} - - - {event.date} at {event.time} · {event.location} - - - - - Edit - View - - - - - - - - Recent orders - - - - Order number - Purchase date - Customer - Amount - - - - {orders.map((order) => ( - - {order.id} - {order.date} - {order.customer.name} - US{order.amount.usd} - - ))} - - - > - ) -} diff --git a/src/app/(app)/events/page.tsx b/src/app/(app)/events/page.tsx deleted file mode 100644 index d1e5454..0000000 --- a/src/app/(app)/events/page.tsx +++ /dev/null @@ -1,87 +0,0 @@ -import { Badge } from '@/components/badge' -import { Button } from '@/components/button' -import { Divider } from '@/components/divider' -import { Dropdown, DropdownButton, DropdownItem, DropdownMenu } from '@/components/dropdown' -import { Heading } from '@/components/heading' -import { Input, InputGroup } from '@/components/input' -import { Link } from '@/components/link' -import { Select } from '@/components/select' -import { getEvents } from '@/data' -import { EllipsisVerticalIcon, MagnifyingGlassIcon } from '@heroicons/react/16/solid' -import type { Metadata } from 'next' - -export const metadata: Metadata = { - title: 'Events', -} - -export default async function Events() { - let events = await getEvents() - - return ( - <> - - - Events - - - - - - - - - - Sort by name - Sort by date - Sort by status - - - - - Create event - - - {events.map((event, index) => ( - - 0} /> - - - - - - - - - - {event.name} - - - {event.date} at {event.time} · {event.location} - - - {event.ticketsSold}/{event.ticketsAvailable} tickets sold - - - - - - {event.status} - - - - - - - View - Edit - Delete - - - - - - ))} - - > - ) -} diff --git a/src/app/(app)/orders/[id]/page.tsx b/src/app/(app)/orders/[id]/page.tsx index d691548..18d9be9 100644 --- a/src/app/(app)/orders/[id]/page.tsx +++ b/src/app/(app)/orders/[id]/page.tsx @@ -75,9 +75,9 @@ export default async function Order({ params }: { params: Promise<{ id: string } {order.customer.name} Product - - - {order.event.name} + + + {order.product.name} Amount diff --git a/src/app/(app)/orders/page.tsx b/src/app/(app)/orders/page.tsx index 316fa47..ceb3d5c 100644 --- a/src/app/(app)/orders/page.tsx +++ b/src/app/(app)/orders/page.tsx @@ -78,15 +78,15 @@ export default async function Orders() { {order.date} - + {order.customer.name} - {order.event.productType} + {order.product.productType} - - {order.event.name} + + {order.product.name} {order.amount.krw} diff --git a/src/app/(app)/products/page.tsx b/src/app/(app)/products/page.tsx index 9e5a875..cfeebae 100644 --- a/src/app/(app)/products/page.tsx +++ b/src/app/(app)/products/page.tsx @@ -3,10 +3,10 @@ import type { Metadata } from 'next' import ProductsClient from './ProductsClient' export const metadata: Metadata = { - title: 'Events', + title: 'Products', } -export default async function EventsPage() { +export default async function ProductsPage() { const products = await getProducts() return diff --git a/src/app/(app)/users/[id]/page.tsx b/src/app/(app)/users/[id]/page.tsx index 1cd0b43..fa236ee 100644 --- a/src/app/(app)/users/[id]/page.tsx +++ b/src/app/(app)/users/[id]/page.tsx @@ -75,11 +75,11 @@ export default async function Order({ params }: { params: Promise<{ id: string } Customer {order.customer.name} - Event + Product - - - {order.event.name} + + + {order.product.name} Amount diff --git a/src/data.ts b/src/data.ts index c59439f..630218b 100644 --- a/src/data.ts +++ b/src/data.ts @@ -24,7 +24,6 @@ export async function getOrders() { country: 'Canada', countryFlagUrl: '/flags/ca.svg', }, - event: await getEvent('1000'), product: await getProduct('1000'), // 취소 데이터 추가 isCancelled: true, @@ -49,7 +48,6 @@ export async function getOrders() { country: 'USA', countryFlagUrl: '/flags/us.svg', }, - event: await getEvent('1001'), product: await getProduct('1001'), isCancelled: true, cancellationDate: '2024년 5월 6일 09:15', @@ -74,7 +72,6 @@ export async function getOrders() { country: 'Canada', countryFlagUrl: '/flags/ca.svg', }, - event: await getEvent('1002'), product: await getProduct('1002'), isCancelled: true, cancellationDate: '2024년 4월 29일 18:40', @@ -99,7 +96,6 @@ export async function getOrders() { country: 'Canada', countryFlagUrl: '/flags/ca.svg', }, - event: await getEvent('1000'), product: await getProduct('1000'), isCancelled: false, }, @@ -119,7 +115,6 @@ export async function getOrders() { country: 'Canada', countryFlagUrl: '/flags/ca.svg', }, - event: await getEvent('1003'), product: await getProduct('1003'), isCancelled: false, }, @@ -139,7 +134,6 @@ export async function getOrders() { country: 'USA', countryFlagUrl: '/flags/us.svg', }, - event: await getEvent('1001'), product: await getProduct('1001'), isCancelled: true, cancellationDate: '2024년 4월 15일 11:30', @@ -163,7 +157,6 @@ export async function getOrders() { country: 'Canada', countryFlagUrl: '/flags/ca.svg', }, - event: await getEvent('1002'), product: await getProduct('1002'), isCancelled: false, }, @@ -183,7 +176,6 @@ export async function getOrders() { country: 'Canada', countryFlagUrl: '/flags/ca.svg', }, - event: await getEvent('1000'), product: await getProduct('1000'), isCancelled: true, cancellationDate: '2024년 4월 7일 10:05', @@ -208,7 +200,6 @@ export async function getOrders() { country: 'Canada', countryFlagUrl: '/flags/ca.svg', }, - event: await getEvent('1000'), product: await getProduct('1000'), isCancelled: false, }, @@ -228,7 +219,6 @@ export async function getOrders() { country: 'Canada', countryFlagUrl: '/flags/ca.svg', }, - event: await getEvent('1003'), product: await getProduct('1003'), isCancelled: false, }, @@ -248,7 +238,6 @@ export async function getOrders() { country: 'Canada', countryFlagUrl: '/flags/ca.svg', }, - event: await getEvent('1001'), product: await getProduct('1001'), isCancelled: false, }, @@ -268,7 +257,6 @@ export async function getOrders() { country: 'USA', countryFlagUrl: '/flags/us.svg', }, - event: await getEvent('1000'), product: await getProduct('1000'), isCancelled: false, }, @@ -288,7 +276,6 @@ export async function getOrders() { country: 'Canada', countryFlagUrl: '/flags/ca.svg', }, - event: await getEvent('1002'), product: await getProduct('1002'), isCancelled: false, }, @@ -308,7 +295,6 @@ export async function getOrders() { country: 'Canada', countryFlagUrl: '/flags/ca.svg', }, - event: await getEvent('1001'), product: await getProduct('1001'), isCancelled: false, }, @@ -328,7 +314,6 @@ export async function getOrders() { country: 'USA', countryFlagUrl: '/flags/us.svg', }, - event: await getEvent('1002'), product: await getProduct('1002'), isCancelled: false, }, @@ -348,7 +333,6 @@ export async function getOrders() { country: 'Canada', countryFlagUrl: '/flags/ca.svg', }, - event: await getEvent('1002'), product: await getProduct('1002'), isCancelled: false, }, @@ -368,7 +352,6 @@ export async function getOrders() { country: 'Canada', countryFlagUrl: '/flags/ca.svg', }, - event: await getEvent('1000'), product: await getProduct('1000'), isCancelled: false, }, @@ -388,7 +371,6 @@ export async function getOrders() { country: 'Canada', countryFlagUrl: '/flags/ca.svg', }, - event: await getEvent('1000'), product: await getProduct('1000'), isCancelled: false, }, @@ -408,7 +390,6 @@ export async function getOrders() { country: 'Canada', countryFlagUrl: '/flags/ca.svg', }, - event: await getEvent('1003'), product: await getProduct('1003'), isCancelled: false, }, @@ -428,7 +409,6 @@ export async function getOrders() { country: 'Canada', countryFlagUrl: '/flags/ca.svg', }, - event: await getEvent('1003'), product: await getProduct('1003'), isCancelled: false, }, @@ -448,7 +428,6 @@ export async function getOrders() { country: 'Canada', countryFlagUrl: '/flags/ca.svg', }, - event: await getEvent('1001'), product: await getProduct('1001'), isCancelled: false, }, @@ -468,7 +447,6 @@ export async function getOrders() { country: 'Canada', countryFlagUrl: '/flags/ca.svg', }, - event: await getEvent('1000'), product: await getProduct('1000'), isCancelled: false, }, @@ -488,7 +466,6 @@ export async function getOrders() { country: 'Canada', countryFlagUrl: '/flags/ca.svg', }, - event: await getEvent('1003'), product: await getProduct('1003'), isCancelled: false, }, @@ -508,7 +485,6 @@ export async function getOrders() { country: 'Canada', countryFlagUrl: '/flags/ca.svg', }, - event: await getEvent('1003'), product: await getProduct('1003'), isCancelled: false, }, @@ -528,7 +504,6 @@ export async function getOrders() { country: 'Canada', countryFlagUrl: '/flags/ca.svg', }, - event: await getEvent('1003'), product: await getProduct('1003'), isCancelled: false, }, @@ -548,164 +523,18 @@ export async function getOrders() { country: 'USA', countryFlagUrl: '/flags/us.svg', }, - event: await getEvent('1003'), product: await getProduct('1003'), isCancelled: false, }, ] } -export async function getEvent(id: string) { - return (await getEvents()).find((event) => event.id.toString() === id)! -} - export async function getProduct(id: string) { return (await getProducts()).find((product) => product.id.toString() === id)! } -export async function getEventOrders(id: string) { - return (await getOrders()).filter((order) => order.event.id.toString() === id) -} - export async function getProductOrders(id: string) { - return (await getOrders()).filter((order) => order.event.id.toString() === id) -} - -export async function getEvents() { - return [ - { - id: 1000, - name: 'Bear Hug: Live in Concert', - url: '/events/1000', - date: '2024년 5월 20일', - time: '오후 10시', - location: 'Harmony Theater, Winnipeg, MB', - totalRevenue: '102,552', - totalRevenueChange: '+3.2%', - ticketsAvailable: 500, - ticketsSold: 350, - ticketsSoldChange: '+8.1%', - pageViews: '24,300', - pageViewsChange: '-0.75%', - status: '판매 중', - productType: '애셋', - licenseType: '전체 변경', - itemPrice: '45,000원', - imgUrl: '/events/bear-hug.jpg', - thumbUrl: '/events/bear-hug-thumb.jpg', - thumbUser: '/users/erica.jpg', - }, - { - id: 1001, - name: 'Six Fingers — DJ Set', - url: '/events/1001', - date: '2024년 6월 2일', - time: '오후 8시', - location: 'Moonbeam Arena, Uxbridge, ON', - totalRevenue: '24,115', - totalRevenueChange: '+3.2%', - ticketsAvailable: 150, - ticketsSold: 72, - ticketsSoldChange: '+8.1%', - pageViews: '57,544', - pageViewsChange: '-2.5%', - status: '판매 중', - productType: '텍스처', - licenseType: '일반', - itemPrice: '12,000원', - imgUrl: '/events/six-fingers.jpg', - thumbUrl: '/events/six-fingers-thumb.jpg', - thumbUser: '/users/erica.jpg', - }, - { - id: 1002, - name: 'We All Look The Same', - url: '/events/1002', - date: '2024년 8월 5일', - time: '오후 4시', - location: 'Electric Coliseum, New York, NY', - totalRevenue: '40,598', - totalRevenueChange: '+3.2%', - ticketsAvailable: 275, - ticketsSold: 275, - ticketsSoldChange: '+8.1%', - pageViews: '122,122', - pageViewsChange: '-8.0%', - status: '미판매', - productType: '애셋', - licenseType: '단순 읽기', - itemPrice: 'Free', - imgUrl: '/events/we-all-look-the-same.jpg', - thumbUrl: '/events/we-all-look-the-same-thumb.jpg', - thumbUser: '/users/erica.jpg', - }, - { - id: 1003, - name: 'Viking People', - url: '/events/1003', - date: '2024년 12월 31일', - time: '오후 8시', - location: 'Tapestry Hall, Cambridge, ON', - totalRevenue: '3,552', - totalRevenueChange: '+3.2%', - ticketsAvailable: 40, - ticketsSold: 6, - ticketsSoldChange: '+8.1%', - pageViews: '9,000', - pageViewsChange: '-0.15%', - status: '판매 중', - productType: '텍스처', - licenseType: '일반', - itemPrice: '25,500원', - imgUrl: '/events/viking-people.jpg', - thumbUrl: '/events/viking-people-thumb.jpg', - thumbUser: '/users/erica.jpg', - }, - { - id: 1004, - name: 'FE1220_Assets conf set', - url: '/events/1004', - date: '2024년 5월 20일', - time: '오후 10시', - location: 'Harmony Theater, Winnipeg, MB', - totalRevenue: '102,552', - totalRevenueChange: '+3.2%', - ticketsAvailable: 500, - ticketsSold: 350, - ticketsSoldChange: '+8.1%', - pageViews: '24,300', - pageViewsChange: '-0.75%', - status: '판매 중지', - productType: '애셋', - licenseType: '전체 변경', - itemPrice: '45,000원', - imgUrl: '/events/bear-hug.jpg', - thumbUrl: '/events/bear-hug-thumb.jpg', - thumbUser: '/users/erica.jpg', - }, - { - id: 1005, - name: 'Six Fingers — DJ Set', - url: '/events/1005', - date: '2024년 6월 2일', - time: '오후 8시', - location: 'Moonbeam Arena, Uxbridge, ON', - totalRevenue: '24,115', - totalRevenueChange: '+3.2%', - ticketsAvailable: 150, - ticketsSold: 72, - ticketsSoldChange: '+8.1%', - pageViews: '57,544', - pageViewsChange: '-2.5%', - status: '판매 보류', - productType: '텍스처', - licenseType: '일반', - itemPrice: '12,000원', - imgUrl: '/events/six-fingers.jpg', - thumbUrl: '/events/six-fingers-thumb.jpg', - thumbUser: '/users/erica.jpg', - }, - ] + return (await getOrders()).filter((order) => order.product.id.toString() === id) } export function getCountries() { @@ -944,8 +773,8 @@ export async function getProducts() { productType: '애셋', licenseType: '전체 변경', itemPrice: '45,000원', - imgUrl: '/events/bear-hug.jpg', - thumbUrl: '/events/bear-hug-thumb.jpg', + imgUrl: '/products/bear-hug.jpg', + thumbUrl: '/products/bear-hug-thumb.jpg', thumbUser: '/users/erica.jpg', }, { @@ -966,8 +795,8 @@ export async function getProducts() { productType: '텍스처', licenseType: '일반', itemPrice: '12,000원', - imgUrl: '/events/six-fingers.jpg', - thumbUrl: '/events/six-fingers-thumb.jpg', + imgUrl: '/products/six-fingers.jpg', + thumbUrl: '/products/six-fingers-thumb.jpg', thumbUser: '/users/erica.jpg', }, { @@ -988,8 +817,8 @@ export async function getProducts() { productType: '애셋', licenseType: '단순 읽기', itemPrice: 'Free', - imgUrl: '/events/we-all-look-the-same.jpg', - thumbUrl: '/events/we-all-look-the-same-thumb.jpg', + imgUrl: '/products/we-all-look-the-same.jpg', + thumbUrl: '/products/we-all-look-the-same-thumb.jpg', thumbUser: '/users/erica.jpg', }, { @@ -1010,8 +839,8 @@ export async function getProducts() { productType: '텍스처', licenseType: '일반', itemPrice: '25,500원', - imgUrl: '/events/viking-people.jpg', - thumbUrl: '/events/viking-people-thumb.jpg', + imgUrl: '/products/viking-people.jpg', + thumbUrl: '/products/viking-people-thumb.jpg', thumbUser: '/users/erica.jpg', }, { @@ -1032,8 +861,8 @@ export async function getProducts() { productType: '애셋', licenseType: '전체 변경', itemPrice: '45,000원', - imgUrl: '/events/bear-hug.jpg', - thumbUrl: '/events/bear-hug-thumb.jpg', + imgUrl: '/products/bear-hug.jpg', + thumbUrl: '/products/bear-hug-thumb.jpg', thumbUser: '/users/erica.jpg', }, { @@ -1054,8 +883,8 @@ export async function getProducts() { productType: '텍스처', licenseType: '일반', itemPrice: '12,000원', - imgUrl: '/events/six-fingers.jpg', - thumbUrl: '/events/six-fingers-thumb.jpg', + imgUrl: '/products/six-fingers.jpg', + thumbUrl: '/products/six-fingers-thumb.jpg', thumbUser: '/users/erica.jpg', }, ]