feat: Add detail pages for Companies and Tokens

- Created CompanyDetail page with stats, info, and tokens list
- Created TokenDetail page with click history and full tracking info
- Added routes for /companies/:id and /tokens/:id
- Made table rows clickable to navigate to detail pages
- Added edit, delete, and mail resend functionality
- Shows IP addresses, GeoIP location, device and browser info in click logs
This commit is contained in:
salvacybersec
2025-11-10 17:13:05 +03:00
parent 0e5dffb7fc
commit dc16d0c549
4 changed files with 681 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
import { useState, useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
import {
Box,
Button,
@@ -26,6 +27,7 @@ import { templateService } from '../services/templateService';
import { format } from 'date-fns';
function Tokens() {
const navigate = useNavigate();
const [tokens, setTokens] = useState([]);
const [companies, setCompanies] = useState([]);
const [templates, setTemplates] = useState([]);
@@ -107,7 +109,12 @@ function Tokens() {
</TableHead>
<TableBody>
{tokens.map((token) => (
<TableRow key={token.id} hover sx={{ cursor: 'pointer' }}>
<TableRow
key={token.id}
hover
sx={{ cursor: 'pointer' }}
onClick={() => navigate(`/tokens/${token.id}`)}
>
<TableCell>{token.target_email}</TableCell>
<TableCell>{token.company?.name}</TableCell>
<TableCell>{token.employee_name || '-'}</TableCell>