POLISH-1: move stray UI strings to de.ts (pageNav/moreData), gitignore Playwright artefacts, wire 'Abgabe abschliessen' -> /vertraege/neu?tiere= (FEAT-13b)
This commit is contained in:
4
gerbil-manager-web/.gitignore
vendored
4
gerbil-manager-web/.gitignore
vendored
@@ -25,4 +25,6 @@ dist-ssr
|
|||||||
|
|
||||||
# QA-1: Playwright-Artefakte
|
# QA-1: Playwright-Artefakte
|
||||||
test-results/
|
test-results/
|
||||||
playwright-report/
|
playwright-report/
|
||||||
|
blob-report/
|
||||||
|
playwright/.cache/
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { useMemo, useState } from 'react'
|
import { useMemo, useState } from 'react'
|
||||||
|
import { useNavigate } from 'react-router-dom'
|
||||||
import JSZip from 'jszip'
|
import JSZip from 'jszip'
|
||||||
import { de } from '../strings/de'
|
import { de } from '../strings/de'
|
||||||
import type { Gerbil } from '../api/types'
|
import type { Gerbil } from '../api/types'
|
||||||
@@ -29,6 +30,7 @@ function groupGender(animals: Gerbil[]): string {
|
|||||||
|
|
||||||
export default function GroupComposer({ groupNumber, animals, farbschlagOf }: GroupComposerProps) {
|
export default function GroupComposer({ groupNumber, animals, farbschlagOf }: GroupComposerProps) {
|
||||||
const t = de.pages.abgabe
|
const t = de.pages.abgabe
|
||||||
|
const navigate = useNavigate()
|
||||||
const [status, setStatus] = useState<SaleStatus>('free')
|
const [status, setStatus] = useState<SaleStatus>('free')
|
||||||
const [reservedName, setReservedName] = useState('')
|
const [reservedName, setReservedName] = useState('')
|
||||||
const [tagline, setTagline] = useState('')
|
const [tagline, setTagline] = useState('')
|
||||||
@@ -244,7 +246,13 @@ export default function GroupComposer({ groupNumber, animals, farbschlagOf }: Gr
|
|||||||
<button type="button" className="btn" disabled={ai.pending} onClick={improveWithAi}>
|
<button type="button" className="btn" disabled={ai.pending} onClick={improveWithAi}>
|
||||||
{ai.pending ? t.ai.generating : t.ai.improve}
|
{ai.pending ? t.ai.generating : t.ai.improve}
|
||||||
</button>
|
</button>
|
||||||
<button type="button" className="btn" title={t.export.finishHint} disabled>
|
<button
|
||||||
|
type="button"
|
||||||
|
className="btn"
|
||||||
|
onClick={() =>
|
||||||
|
navigate(`/vertraege/neu?tiere=${animals.map((a) => a.id).join(',')}`)
|
||||||
|
}
|
||||||
|
>
|
||||||
{t.export.finish}
|
{t.export.finish}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ export default function GerbilDetailPage() {
|
|||||||
<p className="muted">{t.detail.genotypeNotSet}</p>
|
<p className="muted">{t.detail.genotypeNotSet}</p>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<h3 className="visually-hidden">Weitere Daten</h3>
|
<h3 className="visually-hidden">{t.detail.moreData}</h3>
|
||||||
<div className="tabs" role="tablist">
|
<div className="tabs" role="tablist">
|
||||||
{(['photos', 'health', 'weight'] as const).map((key) => (
|
{(['photos', 'health', 'weight'] as const).map((key) => (
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ export default function GerbilsPage() {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{totalPages > 1 && (
|
{totalPages > 1 && (
|
||||||
<nav className="pager" aria-label="Seitennavigation">
|
<nav className="pager" aria-label={de.common.pageNav}>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="btn"
|
className="btn"
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ export default function WuerfeListPage() {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{totalPages > 1 && (
|
{totalPages > 1 && (
|
||||||
<nav className="pager" aria-label="Seitennavigation">
|
<nav className="pager" aria-label={de.common.pageNav}>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="btn"
|
className="btn"
|
||||||
|
|||||||
Reference in New Issue
Block a user