Wire manage-events/new with host picker and create flow against the new admin create API, including entry points from the events list and user detail.
95 lines
4.8 KiB
TypeScript
95 lines
4.8 KiB
TypeScript
export const APP_ROUTES = {
|
|
DASHBOARD: '/dashboard',
|
|
USERS: '/users',
|
|
USER_DETAIL: (id: string) => `/users/${id}`,
|
|
MANAGE_EVENTS: '/manage-events',
|
|
MANAGE_EVENT_NEW: '/manage-events/new',
|
|
MANAGE_EVENT_NEW_FOR_HOST: (organizerId: string) => `/manage-events/new?organizerId=${encodeURIComponent(organizerId)}`,
|
|
MANAGE_EVENT_DETAIL: (id: string) => `/manage-events/${encodeURIComponent(id)}`,
|
|
MANAGE_EVENT_DISCOUNTS: (id: string) => `/manage-events/${encodeURIComponent(id)}?tab=discounts`,
|
|
MANAGE_EVENT_EDIT: (id: string) => `/manage-events/${encodeURIComponent(id)}/edit`,
|
|
EVENT_CATEGORIES: '/event-categories',
|
|
BLOG_ARTICLES: '/blog-articles',
|
|
IDENTITY_VERIFICATIONS: '/identity-verifications',
|
|
USER_REPORTS: '/user-reports',
|
|
CONTACT_MESSAGES: '/contact-messages',
|
|
SUPPORT_TICKETS: '/support-tickets',
|
|
SUPPORT_TICKET_DETAIL: (id: string) => `/support-tickets/${id}`,
|
|
CHAT_OVERSIGHT: '/chat-oversight',
|
|
CHAT_OVERSIGHT_DETAIL: (id: string) => `/chat-oversight/${id}`,
|
|
SETTLEMENTS: '/settlements',
|
|
NOTIFICATIONS: '/notifications',
|
|
NOTIFICATIONS_PUSH: '/notifications?tab=push',
|
|
NOTIFICATIONS_SMS: '/notifications?tab=sms',
|
|
NOTIFICATIONS_SETTINGS: '/notifications?tab=settings',
|
|
SMS_MESSAGES: '/notifications?tab=sms',
|
|
NOTIFICATION_RULES: '/notifications?tab=settings',
|
|
MANUAL_NOTIFICATIONS: '/notifications',
|
|
PUSH_DELIVERIES: '/notifications?tab=push',
|
|
WITHDRAWAL_REQUESTS: '/withdrawal-requests',
|
|
BANK_ACCOUNTS: '/bank-accounts',
|
|
BOOKINGS: '/bookings',
|
|
PAYMENTS: '/payments',
|
|
WALLET_DEPOSITS: '/wallet-deposits',
|
|
GUEST_LISTS: '/guest-lists',
|
|
DISCOUNT_CODES: '/discount-codes',
|
|
} as const
|
|
|
|
export const CONSUMER_ROUTES = {
|
|
HOME: '/',
|
|
CHATS: '/chats',
|
|
CHAT_DETAIL: (id: string) => `/chats/${id}`,
|
|
/** Filter tabs on `/chats` (`?tab=`). Default (`direct`) omits the query. */
|
|
CHATS_TAB: (tab: 'direct' | 'event_group') => (tab === 'direct' ? '/chats' : `/chats?tab=${tab}`),
|
|
MY_EVENTS: '/my-events',
|
|
/** Main tabs on `/my-events` (`?tab=`). Default (`registered`) omits the query. */
|
|
MY_EVENTS_TAB: (tab: 'created' | 'registered') => (tab === 'registered' ? '/my-events' : `/my-events?tab=${tab}`),
|
|
PROFILE: '/profile',
|
|
PROFILE_WALLET: '/profile/wallet',
|
|
IDENTITY: '/identity',
|
|
EVENT_DETAIL: (identifier: string) => `/e/${encodeURIComponent(identifier)}`,
|
|
EVENT_PAYMENT: (eventIdentifier: string, bookingId: string) =>
|
|
`/e/${encodeURIComponent(eventIdentifier)}?payment=checkout&bookingId=${encodeURIComponent(bookingId)}`,
|
|
EVENT_EDIT: (id: string) => `/my-events/${encodeURIComponent(id)}/manage/edit`,
|
|
EVENT_MANAGE: (id: string) => `/my-events/${encodeURIComponent(id)}/manage`,
|
|
EVENT_MANAGE_TAB: (id: string, tab: 'overview' | 'attendance' | 'waitlist' | 'discounts' | 'financial' | 'details') =>
|
|
`/my-events/${encodeURIComponent(id)}/manage?tab=${tab}`,
|
|
EVENT_ATTENDANCE: (id: string) => `/my-events/${encodeURIComponent(id)}/manage?tab=attendance`,
|
|
EVENT_DISCOUNTS: (id: string) => `/my-events/${encodeURIComponent(id)}/manage?tab=discounts`,
|
|
EVENT_FINANCIAL: (id: string) => `/my-events/${encodeURIComponent(id)}/manage?tab=financial`,
|
|
EVENT_DETAILS_TAB: (id: string) => `/my-events/${encodeURIComponent(id)}/manage?tab=details`,
|
|
EVENT_NEW: '/my-events/new',
|
|
/** Create wizard prefilled from an existing hosted event (`?cloneFrom=`). */
|
|
EVENT_NEW_FROM_CLONE: (eventId: string) => `/my-events/new?cloneFrom=${encodeURIComponent(eventId)}`,
|
|
BOOKINGS: '/bookings',
|
|
BOOKING_PAY: (id: string) => `/bookings/${id}/pay`,
|
|
PAYMENT_RETURN: '/payments/return',
|
|
PROFILE_FOLLOWING: '/profile/following',
|
|
PROFILE_NOTIFICATIONS: '/profile/notifications',
|
|
PROFILE_BOOKMARKS: '/profile/bookmarks',
|
|
SUPPORT: '/support',
|
|
SUPPORT_DETAIL: (id: string) => `/support/${id}`,
|
|
} as const
|
|
|
|
/**
|
|
* Public SEO landing routes — Phase 3 (docs/workflows/fa/seo-landing-pages.md).
|
|
* Segment names are plain English (`/category`, `/city`) rather than Finglish
|
|
* (Persian transliterated into Latin, e.g. the earlier `dastebandi`/`shahr`) —
|
|
* the transliteration didn't actually buy Persian-query keyword matching
|
|
* (that only happens on true Persian-script text, which the on-page
|
|
* title/description/h1 already carry) and just added a "neither English nor
|
|
* Persian" URL. `/category`/`/city` keep the public landing routes concise.
|
|
*/
|
|
export const SEO_ROUTES = {
|
|
CITY_HUB: '/city',
|
|
CITY_LANDING: (citySlug: string) => `/city/${citySlug}`,
|
|
CATEGORY_CITY_COMBO: (categorySlug: string, citySlug: string) => `/category/${categorySlug}/city/${citySlug}`,
|
|
CATEGORY_HUB: '/category',
|
|
CATEGORY_LANDING: (categorySlug: string) => `/category/${categorySlug}`,
|
|
EVENT_LANDING: (eventSlug: string) => `/e/${encodeURIComponent(eventSlug)}`,
|
|
ORGANIZER: (organizerId: string) => `/u/${organizerId}`,
|
|
USER: (userId: string) => `/u/${userId}`,
|
|
BLOG: '/blog',
|
|
ARTICLE: (slug: string) => `/blog/${slug}`,
|
|
} as const
|