Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
746d17e182 | ||
|
|
e96e51598a |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "app-ts",
|
||||
"version": "1.5.7",
|
||||
"version": "1.5.9",
|
||||
"description": "",
|
||||
"main": "dist/server.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -391,6 +391,10 @@ export default function AuditLog() {
|
||||
>
|
||||
<div className="admin-card-body">
|
||||
<div className="admin-table-responsive">
|
||||
<Skeleton
|
||||
name="audit-log-rows"
|
||||
loading={isPending}
|
||||
fixture={
|
||||
<table className="admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -403,20 +407,9 @@ export default function AuditLog() {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<Skeleton
|
||||
name="audit-log-rows"
|
||||
loading={isPending}
|
||||
fixture={
|
||||
<div style={{ padding: "1rem" }}>
|
||||
{Array.from({ length: 10 }, (_, i) => (
|
||||
<div
|
||||
key={i}
|
||||
style={{
|
||||
display: "flex",
|
||||
gap: "1rem",
|
||||
marginBottom: "0.75rem",
|
||||
}}
|
||||
>
|
||||
<tr key={i}>
|
||||
<td>
|
||||
<div
|
||||
style={{
|
||||
width: 110,
|
||||
@@ -425,6 +418,8 @@ export default function AuditLog() {
|
||||
borderRadius: 4,
|
||||
}}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
<div
|
||||
style={{
|
||||
width: 80,
|
||||
@@ -433,6 +428,8 @@ export default function AuditLog() {
|
||||
borderRadius: 4,
|
||||
}}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
<div
|
||||
style={{
|
||||
width: 70,
|
||||
@@ -441,6 +438,8 @@ export default function AuditLog() {
|
||||
borderRadius: 10,
|
||||
}}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
<div
|
||||
style={{
|
||||
width: 80,
|
||||
@@ -449,14 +448,18 @@ export default function AuditLog() {
|
||||
borderRadius: 4,
|
||||
}}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
<div
|
||||
style={{
|
||||
flex: 1,
|
||||
width: "100%",
|
||||
height: 14,
|
||||
background: "var(--bg-tertiary)",
|
||||
borderRadius: 4,
|
||||
}}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
<div
|
||||
style={{
|
||||
width: 90,
|
||||
@@ -465,12 +468,25 @@ export default function AuditLog() {
|
||||
borderRadius: 4,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</div>
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
>
|
||||
<>
|
||||
<table className="admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Čas</th>
|
||||
<th>Uživatel</th>
|
||||
<th>Akce</th>
|
||||
<th>Typ entity</th>
|
||||
<th>Popis</th>
|
||||
<th>IP</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{logs.length === 0 && (
|
||||
<tr>
|
||||
<td colSpan={6}>
|
||||
@@ -518,10 +534,9 @@ export default function AuditLog() {
|
||||
<td className="admin-mono">{log.user_ip || "-"}</td>
|
||||
</tr>
|
||||
))}
|
||||
</>
|
||||
</Skeleton>
|
||||
</tbody>
|
||||
</table>
|
||||
</Skeleton>
|
||||
</div>
|
||||
|
||||
<Pagination
|
||||
|
||||
@@ -220,8 +220,14 @@ export default async function attendanceRoutes(
|
||||
userId,
|
||||
isAdmin,
|
||||
authUserId: authData.userId,
|
||||
month: query.month ? Number(query.month) : undefined,
|
||||
year: query.year ? Number(query.year) : undefined,
|
||||
month: query.month
|
||||
? Number(String(query.month).split("-")[1])
|
||||
: undefined,
|
||||
year: query.month
|
||||
? Number(String(query.month).split("-")[0])
|
||||
: query.year
|
||||
? Number(query.year)
|
||||
: undefined,
|
||||
});
|
||||
|
||||
return reply.send({
|
||||
|
||||
Reference in New Issue
Block a user