fix: oprava UI
CI / Generate TypeScript types (push) Successful in 1m21s
CI / Build server (push) Successful in 47s
CI / Build client (push) Successful in 34s
CI / Server unit tests (push) Successful in 2m54s
CI / Playwright E2E tests (push) Successful in 1m18s
CI / Build and push Docker image (push) Has been cancelled
CI / Notify (push) Has been cancelled

This commit is contained in:
2026-05-07 13:29:30 +02:00
parent f12dc7b562
commit 3e6ecd4e6a
+7 -9
View File
@@ -1,4 +1,4 @@
import { useContext, useEffect, useRef, useState } from 'react'; import { useContext, useEffect, useState } from 'react';
import { Alert, Badge, Button, Card, Form, Modal, OverlayTrigger, Table, Tooltip } from 'react-bootstrap'; import { Alert, Badge, Button, Card, Form, Modal, OverlayTrigger, Table, Tooltip } from 'react-bootstrap';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faTrashCan } from '@fortawesome/free-regular-svg-icons'; import { faTrashCan } from '@fortawesome/free-regular-svg-icons';
@@ -48,7 +48,6 @@ export default function OrderGroupsPage() {
const [feesModal, setFeesModal] = useState<OrderGroup | null>(null); const [feesModal, setFeesModal] = useState<OrderGroup | null>(null);
const [confirmOrderGroup, setConfirmOrderGroup] = useState<OrderGroup | null>(null); const [confirmOrderGroup, setConfirmOrderGroup] = useState<OrderGroup | null>(null);
const [pageError, setPageError] = useState<string | null>(null); const [pageError, setPageError] = useState<string | null>(null);
const inputRef = useRef<HTMLInputElement>(null);
const fetchData = async () => { const fetchData = async () => {
try { try {
@@ -210,7 +209,7 @@ export default function OrderGroupsPage() {
)} )}
<div className="content-wrapper"> <div className="content-wrapper">
<div className="content"> <div className="content" style={{ maxWidth: 960 }}>
{/* Vytvoření nové skupiny */} {/* Vytvoření nové skupiny */}
<div className="choice-section fade-in mb-4"> <div className="choice-section fade-in mb-4">
<h5>Vytvořit skupinu</h5> <h5>Vytvořit skupinu</h5>
@@ -320,10 +319,10 @@ export default function OrderGroupsPage() {
<thead> <thead>
<tr> <tr>
<th>Člen</th> <th>Člen</th>
<th style={{ width: 120 }}>Částka ()</th> <th style={{ width: 140 }}>Částka ()</th>
<th style={{ width: 180 }}>Příplatek</th> <th style={{ width: 220 }}>Příplatek</th>
<th>Poznámka</th> <th>Poznámka</th>
<th style={{ width: 90 }}>Celkem</th> <th style={{ width: 100 }}>Celkem</th>
<th style={{ width: 40 }}></th> <th style={{ width: 40 }}></th>
</tr> </tr>
</thead> </thead>
@@ -356,14 +355,13 @@ export default function OrderGroupsPage() {
{canEdit && editingAmount ? ( {canEdit && editingAmount ? (
<div className="d-flex gap-1"> <div className="d-flex gap-1">
<Form.Control <Form.Control
ref={memberLogin === login ? inputRef : undefined}
type="number" type="number"
size="sm" size="sm"
value={editAmounts[key]} value={editAmounts[key]}
onChange={e => setEditAmounts(prev => ({ ...prev, [key]: e.target.value }))} onChange={e => setEditAmounts(prev => ({ ...prev, [key]: e.target.value }))}
onKeyDown={e => { e.stopPropagation(); if (e.key === 'Enter') handleSaveAmount(group.id, memberLogin); if (e.key === 'Escape') setEditAmounts(prev => { const n = { ...prev }; delete n[key]; return n; }); }} onKeyDown={e => { e.stopPropagation(); if (e.key === 'Enter') handleSaveAmount(group.id, memberLogin); if (e.key === 'Escape') setEditAmounts(prev => { const n = { ...prev }; delete n[key]; return n; }); }}
style={{ width: 75 }} style={{ width: 95 }}
autoFocus={memberLogin === login} autoFocus
/> />
<Button size="sm" variant="outline-success" onClick={() => handleSaveAmount(group.id, memberLogin)}></Button> <Button size="sm" variant="outline-success" onClick={() => handleSaveAmount(group.id, memberLogin)}></Button>
</div> </div>