Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
746d17e182 | ||
|
|
e96e51598a | ||
|
|
9abec36f07 | ||
|
|
ecd8e3679f |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "app-ts",
|
"name": "app-ts",
|
||||||
"version": "1.5.6",
|
"version": "1.5.9",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "dist/server.js",
|
"main": "dist/server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -391,6 +391,10 @@ export default function AuditLog() {
|
|||||||
>
|
>
|
||||||
<div className="admin-card-body">
|
<div className="admin-card-body">
|
||||||
<div className="admin-table-responsive">
|
<div className="admin-table-responsive">
|
||||||
|
<Skeleton
|
||||||
|
name="audit-log-rows"
|
||||||
|
loading={isPending}
|
||||||
|
fixture={
|
||||||
<table className="admin-table">
|
<table className="admin-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -403,20 +407,9 @@ export default function AuditLog() {
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<Skeleton
|
|
||||||
name="audit-log-rows"
|
|
||||||
loading={isPending}
|
|
||||||
fixture={
|
|
||||||
<div style={{ padding: "1rem" }}>
|
|
||||||
{Array.from({ length: 10 }, (_, i) => (
|
{Array.from({ length: 10 }, (_, i) => (
|
||||||
<div
|
<tr key={i}>
|
||||||
key={i}
|
<td>
|
||||||
style={{
|
|
||||||
display: "flex",
|
|
||||||
gap: "1rem",
|
|
||||||
marginBottom: "0.75rem",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
width: 110,
|
width: 110,
|
||||||
@@ -425,6 +418,8 @@ export default function AuditLog() {
|
|||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
width: 80,
|
width: 80,
|
||||||
@@ -433,6 +428,8 @@ export default function AuditLog() {
|
|||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
width: 70,
|
width: 70,
|
||||||
@@ -441,6 +438,8 @@ export default function AuditLog() {
|
|||||||
borderRadius: 10,
|
borderRadius: 10,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
width: 80,
|
width: 80,
|
||||||
@@ -449,14 +448,18 @@ export default function AuditLog() {
|
|||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
flex: 1,
|
width: "100%",
|
||||||
height: 14,
|
height: 14,
|
||||||
background: "var(--bg-tertiary)",
|
background: "var(--bg-tertiary)",
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
width: 90,
|
width: 90,
|
||||||
@@ -465,12 +468,25 @@ export default function AuditLog() {
|
|||||||
borderRadius: 4,
|
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 && (
|
{logs.length === 0 && (
|
||||||
<tr>
|
<tr>
|
||||||
<td colSpan={6}>
|
<td colSpan={6}>
|
||||||
@@ -518,10 +534,9 @@ export default function AuditLog() {
|
|||||||
<td className="admin-mono">{log.user_ip || "-"}</td>
|
<td className="admin-mono">{log.user_ip || "-"}</td>
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
</>
|
|
||||||
</Skeleton>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</Skeleton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Pagination
|
<Pagination
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export default function OffersTemplates() {
|
|||||||
</div>
|
</div>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|
||||||
<div className="admin-tabs">
|
<div className="admin-tabs mb-4">
|
||||||
<button
|
<button
|
||||||
className={`admin-tab ${activeTab === "items" ? "active" : ""}`}
|
className={`admin-tab ${activeTab === "items" ? "active" : ""}`}
|
||||||
onClick={() => setActiveTab("items")}
|
onClick={() => setActiveTab("items")}
|
||||||
|
|||||||
@@ -1546,15 +1546,31 @@ export default function Settings() {
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
) : (
|
) : (
|
||||||
<Skeleton
|
<div
|
||||||
name="settings-permissions"
|
style={{
|
||||||
loading={
|
padding: "1rem",
|
||||||
!role.permissions || role.permissions.length === 0
|
display: "flex",
|
||||||
}
|
flexDirection: "column",
|
||||||
fixture={<span>...</span>}
|
gap: "0.5rem",
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<span>{role.permissions?.length || 0} oprávnění</span>
|
<div
|
||||||
</Skeleton>
|
style={{
|
||||||
|
height: "0.75rem",
|
||||||
|
background: "#e0e0e0",
|
||||||
|
borderRadius: "4px",
|
||||||
|
width: "60%",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
height: "0.75rem",
|
||||||
|
background: "#e0e0e0",
|
||||||
|
borderRadius: "4px",
|
||||||
|
width: "40%",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|||||||
@@ -220,8 +220,14 @@ export default async function attendanceRoutes(
|
|||||||
userId,
|
userId,
|
||||||
isAdmin,
|
isAdmin,
|
||||||
authUserId: authData.userId,
|
authUserId: authData.userId,
|
||||||
month: query.month ? Number(query.month) : undefined,
|
month: query.month
|
||||||
year: query.year ? Number(query.year) : undefined,
|
? 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({
|
return reply.send({
|
||||||
|
|||||||
Reference in New Issue
Block a user