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:
Fringg
2026-06-19 12:57:27 +03:00
parent ecc2d45562
commit ff0b119ebc
3 changed files with 73 additions and 1 deletions

View File

@@ -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={