3 Commits

Author SHA1 Message Date
BOHA
e96e51598a v1.5.8: fix audit log table layout (Skeleton outside tbody)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 09:08:15 +02:00
BOHA
9abec36f07 v1.5.7: fix Settings system tab crash and OffersTemplates tab gap
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 08:29:10 +02:00
BOHA
ecd8e3679f fix: replace stray role reference in system settings tab with inline placeholder
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 08:04:22 +02:00
4 changed files with 122 additions and 91 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "app-ts", "name": "app-ts",
"version": "1.5.6", "version": "1.5.8",
"description": "", "description": "",
"main": "dist/server.js", "main": "dist/server.js",
"scripts": { "scripts": {

View File

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

View File

@@ -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")}

View File

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