Tickets: Abschlussfixes P2 - Termin ohne Umbruch in der Zeitspanne, Art in der Liste, Laden statt Leerzustand, Unterstuetzung entsperrt bei Fehler, Aufraeumen
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
504571c0ce
commit
ed8bdba015
8 files changed
+38
-23
No files matched your search
@@ -54,7 +54,7 @@ export default function TicketPage() {
|
||||
if (error || !ticket) {
|
||||
return (
|
||||
<div className="page">
|
||||
<p className="msg err" role="alert">Fehler: {error || 'Das Ticket konnte nicht geladen werden.'}</p>
|
||||
<p className="msg err" role="alert">Fehler: {error}</p>
|
||||
<div className="mt-2">{back}</div>
|
||||
</div>
|
||||
)
|
||||
@@ -63,6 +63,18 @@ export default function TicketPage() {
|
||||
return <TicketView key={ticket.$id} ticket={ticket} updateWorkorder={updateWorkorder} tab={activeTab} />
|
||||
}
|
||||
|
||||
// Datum und Uhrzeitspanne bleiben je in einer Zeile: umbrechen darf nur das Komma dazwischen.
|
||||
// Rohtext ohne ", " (unlesbare Altwerte) bricht weiter frei um.
|
||||
function AppointmentText({ text }) {
|
||||
const at = text.indexOf(', ')
|
||||
if (at === -1) return text
|
||||
return (
|
||||
<>
|
||||
<span className="nowrap">{text.slice(0, at)}</span>, <span className="nowrap">{text.slice(at + 2)}</span>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
function TicketView({ ticket, updateWorkorder, tab }) {
|
||||
const location = useLocation()
|
||||
const navigate = useNavigate()
|
||||
@@ -204,7 +216,7 @@ function TicketView({ ticket, updateWorkorder, tab }) {
|
||||
</div>
|
||||
<div className="fact">
|
||||
<div className="k">Termin</div>
|
||||
<div className="v">{appointment || <span className="faint">Kein Termin</span>}</div>
|
||||
<div className="v">{appointment ? <AppointmentText text={appointment} /> : <span className="faint">Kein Termin</span>}</div>
|
||||
</div>
|
||||
<div className="fact">
|
||||
<div className="k">Fällig</div>
|
||||
|
||||
Reference in new issue
Block a user