mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-29 18:13:47 +00:00
Merge pull request #172 from BEDOLAGA-DEV/feat/ticket-user-profile-link
feat: user profile link in ticket detail
This commit is contained in:
@@ -1278,6 +1278,7 @@
|
|||||||
"reminderCooldownDesc": "Minimum time between reminders (1-120 minutes)",
|
"reminderCooldownDesc": "Minimum time between reminders (1-120 minutes)",
|
||||||
"settingsUpdateError": "Error saving settings",
|
"settingsUpdateError": "Error saving settings",
|
||||||
"copyTelegramId": "Click to copy Telegram ID",
|
"copyTelegramId": "Click to copy Telegram ID",
|
||||||
|
"viewUser": "Profile",
|
||||||
"cabinetNotifications": "Cabinet Notifications",
|
"cabinetNotifications": "Cabinet Notifications",
|
||||||
"userNotificationsEnabled": "User Notifications",
|
"userNotificationsEnabled": "User Notifications",
|
||||||
"userNotificationsEnabledDesc": "Send notifications to users about admin replies",
|
"userNotificationsEnabledDesc": "Send notifications to users about admin replies",
|
||||||
|
|||||||
@@ -990,6 +990,7 @@
|
|||||||
"adminNotificationsEnabledDesc": "ارسال اعلان به مدیران درباره تیکتها و پاسخهای جدید",
|
"adminNotificationsEnabledDesc": "ارسال اعلان به مدیران درباره تیکتها و پاسخهای جدید",
|
||||||
"cabinetNotifications": "اعلانهای پنل",
|
"cabinetNotifications": "اعلانهای پنل",
|
||||||
"copyTelegramId": "برای کپی شناسه تلگرام کلیک کنید",
|
"copyTelegramId": "برای کپی شناسه تلگرام کلیک کنید",
|
||||||
|
"viewUser": "کاربر",
|
||||||
"userNotificationsEnabled": "اعلانهای کاربر",
|
"userNotificationsEnabled": "اعلانهای کاربر",
|
||||||
"userNotificationsEnabledDesc": "ارسال اعلان به کاربران درباره پاسخهای مدیر"
|
"userNotificationsEnabledDesc": "ارسال اعلان به کاربران درباره پاسخهای مدیر"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1793,6 +1793,7 @@
|
|||||||
"reminderCooldownDesc": "Минимальное время между напоминаниями (1-120 минут)",
|
"reminderCooldownDesc": "Минимальное время между напоминаниями (1-120 минут)",
|
||||||
"settingsUpdateError": "Ошибка сохранения настроек",
|
"settingsUpdateError": "Ошибка сохранения настроек",
|
||||||
"copyTelegramId": "Нажмите чтобы скопировать Telegram ID",
|
"copyTelegramId": "Нажмите чтобы скопировать Telegram ID",
|
||||||
|
"viewUser": "Карточка",
|
||||||
"cabinetNotifications": "Уведомления в кабинете",
|
"cabinetNotifications": "Уведомления в кабинете",
|
||||||
"userNotificationsEnabled": "Уведомления для пользователей",
|
"userNotificationsEnabled": "Уведомления для пользователей",
|
||||||
"userNotificationsEnabledDesc": "Отправлять уведомления пользователям об ответах админа",
|
"userNotificationsEnabledDesc": "Отправлять уведомления пользователям об ответах админа",
|
||||||
|
|||||||
@@ -1028,6 +1028,7 @@
|
|||||||
"adminNotificationsEnabledDesc": "向管理员发送新工单和回复通知",
|
"adminNotificationsEnabledDesc": "向管理员发送新工单和回复通知",
|
||||||
"cabinetNotifications": "面板通知",
|
"cabinetNotifications": "面板通知",
|
||||||
"copyTelegramId": "点击复制Telegram ID",
|
"copyTelegramId": "点击复制Telegram ID",
|
||||||
|
"viewUser": "用户",
|
||||||
"userNotificationsEnabled": "用户通知",
|
"userNotificationsEnabled": "用户通知",
|
||||||
"userNotificationsEnabledDesc": "向用户发送管理员回复通知"
|
"userNotificationsEnabledDesc": "向用户发送管理员回复通知"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -434,19 +434,29 @@ export default function AdminTickets() {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="mb-4 text-sm text-dark-500">
|
<div className="mb-4 flex items-center gap-2 text-sm text-dark-500">
|
||||||
{t('admin.tickets.from')}: {formatUser(selectedTicket)}
|
<span>
|
||||||
{selectedTicket.user?.telegram_id && (
|
{t('admin.tickets.from')}: {formatUser(selectedTicket)}
|
||||||
|
{selectedTicket.user?.telegram_id && (
|
||||||
|
<button
|
||||||
|
onClick={() => copyToClipboard(String(selectedTicket.user!.telegram_id))}
|
||||||
|
className="ml-1 rounded bg-dark-700 px-2 py-0.5 text-xs transition-colors hover:bg-dark-600"
|
||||||
|
title={t('admin.tickets.copyTelegramId')}
|
||||||
|
>
|
||||||
|
TG: {selectedTicket.user!.telegram_id}
|
||||||
|
</button>
|
||||||
|
)}{' '}
|
||||||
|
| {t('admin.tickets.created')}:{' '}
|
||||||
|
{new Date(selectedTicket.created_at).toLocaleString()}
|
||||||
|
</span>
|
||||||
|
{selectedTicket.user && (
|
||||||
<button
|
<button
|
||||||
onClick={() => copyToClipboard(String(selectedTicket.user!.telegram_id))}
|
onClick={() => navigate(`/admin/users/${selectedTicket.user!.id}`)}
|
||||||
className="ml-1 rounded bg-dark-700 px-2 py-0.5 text-xs transition-colors hover:bg-dark-600"
|
className="shrink-0 rounded-lg border border-accent-500/30 bg-accent-500/10 px-2 py-0.5 text-xs text-accent-400 transition-colors hover:bg-accent-500/20"
|
||||||
title={t('admin.tickets.copyTelegramId')}
|
|
||||||
>
|
>
|
||||||
TG: {selectedTicket.user!.telegram_id}
|
{t('admin.tickets.viewUser')}
|
||||||
</button>
|
</button>
|
||||||
)}{' '}
|
)}
|
||||||
| {t('admin.tickets.created')}:{' '}
|
|
||||||
{new Date(selectedTicket.created_at).toLocaleString()}
|
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-wrap gap-2">
|
<div className="flex flex-wrap gap-2">
|
||||||
{['open', 'pending', 'answered', 'closed'].map((s) => (
|
{['open', 'pending', 'answered', 'closed'].map((s) => (
|
||||||
|
|||||||
Reference in New Issue
Block a user