mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-29 18:13:47 +00:00
feat(admin-tickets): deep-link to a specific ticket from notifications
Add an /admin/tickets/:ticketId route that pre-selects the ticket, and a StartParamNavigator that maps a Telegram Mini App start param (admin_ticket_<id>, delivered by a group-chat t.me/<bot>/<app>?startapp deep link) to that route. This lets the bot's admin ticket notification buttons open the cabinet straight on the ticket — web_app buttons for private chats, the startapp deep link for groups where web_app is unavailable. Selection mirrors the URL param (cleared on the bare /admin/tickets list). The static /admin/tickets/settings route still out-ranks the new dynamic segment. Pairs with bot feature BEDOLAGA-DEV/remnawave-bedolaga-telegram-bot#2988.
This commit is contained in:
13
src/App.tsx
13
src/App.tsx
@@ -632,6 +632,19 @@ function App() {
|
||||
</PermissionRoute>
|
||||
}
|
||||
/>
|
||||
{/* Deep-link target for admin ticket notification buttons (bot issue #2988):
|
||||
opens a specific ticket directly. Static "/settings" above out-ranks
|
||||
this dynamic segment in react-router, so there is no conflict. */}
|
||||
<Route
|
||||
path="/admin/tickets/:ticketId"
|
||||
element={
|
||||
<PermissionRoute permission="tickets:read">
|
||||
<LazyPage>
|
||||
<AdminTickets />
|
||||
</LazyPage>
|
||||
</PermissionRoute>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/admin/settings"
|
||||
element={
|
||||
|
||||
Reference in New Issue
Block a user