AP0.6b: Jinkendo UX/PWA Remediation — App Shell, Design-Tokens, responsive Nav, PWA-Manifest
Deploy Development / deploy (push) Successful in 43s
Test Suite / pytest-backend (push) Successful in 29s
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 19s
Deploy Development / deploy (push) Successful in 43s
Test Suite / pytest-backend (push) Successful in 29s
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 19s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
0e7184a59e
commit
48a599e76c
34 files changed
+1895
-681
No files matched your search
@@ -66,14 +66,16 @@ export function AuthPanel() {
|
||||
const registrationOpen = setup?.registration_open === true
|
||||
|
||||
return (
|
||||
<main className="shell auth-shell">
|
||||
<header className="hero">
|
||||
<h1>Jinkendo Kairo</h1>
|
||||
<p>Operativer Program Director — AP0.6 Workspace</p>
|
||||
<main className="auth-shell">
|
||||
<header className="auth-hero">
|
||||
<h1>Kairo</h1>
|
||||
<p>Jinkendo Program Director — Vorhaben & Maßnahmen</p>
|
||||
</header>
|
||||
|
||||
<section className="card auth-card">
|
||||
<h2>{registrationOpen ? 'Ersteinrichtung' : 'Anmelden'}</h2>
|
||||
<h2 className="card-title card-title--lg">
|
||||
{registrationOpen ? 'Ersteinrichtung' : 'Anmelden'}
|
||||
</h2>
|
||||
|
||||
{setupLoading && <p className="muted">Prüfe Ersteinrichtung …</p>}
|
||||
{setupError && <p className="error">{setupError}</p>}
|
||||
@@ -102,13 +104,13 @@ export function AuthPanel() {
|
||||
<form className="form" onSubmit={handleLogin}>
|
||||
<label>
|
||||
E-Mail
|
||||
<input type="email" value={email} onChange={(e) => setEmail(e.target.value)} required />
|
||||
<input type="email" autoComplete="username" value={email} onChange={(e) => setEmail(e.target.value)} required />
|
||||
</label>
|
||||
<label>
|
||||
Passwort
|
||||
<input type="password" value={password} onChange={(e) => setPassword(e.target.value)} minLength={8} required />
|
||||
<input type="password" autoComplete="current-password" value={password} onChange={(e) => setPassword(e.target.value)} minLength={8} required />
|
||||
</label>
|
||||
<button type="submit" disabled={authBusy}>
|
||||
<button type="submit" className="btn btn-primary btn-block-mobile" disabled={authBusy}>
|
||||
{authBusy ? 'Anmelden …' : 'Anmelden'}
|
||||
</button>
|
||||
</form>
|
||||
@@ -126,17 +128,17 @@ export function AuthPanel() {
|
||||
</label>
|
||||
<label>
|
||||
E-Mail
|
||||
<input type="email" value={email} onChange={(e) => setEmail(e.target.value)} required />
|
||||
<input type="email" autoComplete="email" value={email} onChange={(e) => setEmail(e.target.value)} required />
|
||||
</label>
|
||||
<label>
|
||||
Passwort
|
||||
<input type="password" value={password} onChange={(e) => setPassword(e.target.value)} minLength={8} required />
|
||||
<input type="password" autoComplete="new-password" value={password} onChange={(e) => setPassword(e.target.value)} minLength={8} required />
|
||||
</label>
|
||||
<label>
|
||||
Passwort bestätigen
|
||||
<input type="password" value={passwordConfirm} onChange={(e) => setPasswordConfirm(e.target.value)} minLength={8} required />
|
||||
<input type="password" autoComplete="new-password" value={passwordConfirm} onChange={(e) => setPasswordConfirm(e.target.value)} minLength={8} required />
|
||||
</label>
|
||||
<button type="submit" disabled={authBusy}>
|
||||
<button type="submit" className="btn btn-primary btn-block-mobile" disabled={authBusy}>
|
||||
{authBusy ? 'Registrieren …' : 'Systemadmin anlegen'}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
@@ -106,12 +106,30 @@ export function InitiativeDetailPage() {
|
||||
}
|
||||
}
|
||||
|
||||
if (loading) return <LoadingState message="Lade Vorhaben …" />
|
||||
if (error && !initiative) return <ErrorState message={error} onRetry={load} />
|
||||
if (!initiative) return <ErrorState message="Vorhaben nicht gefunden." />
|
||||
if (loading) {
|
||||
return (
|
||||
<div className="app-page">
|
||||
<LoadingState message="Lade Vorhaben …" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
if (error && !initiative) {
|
||||
return (
|
||||
<div className="app-page">
|
||||
<ErrorState message={error} onRetry={load} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
if (!initiative) {
|
||||
return (
|
||||
<div className="app-page">
|
||||
<ErrorState message="Vorhaben nicht gefunden." />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="page">
|
||||
<div className="app-page">
|
||||
<nav className="breadcrumb">
|
||||
<Link to="/initiatives">Vorhaben</Link>
|
||||
<span aria-hidden="true"> / </span>
|
||||
@@ -144,7 +162,11 @@ export function InitiativeDetailPage() {
|
||||
Erledigte ausblenden
|
||||
</label>
|
||||
{hasCapability('kairo.action.manage') && (
|
||||
<button type="button" onClick={() => { setShowActionForm((v) => !v); setEditingAction(null) }}>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-primary btn-block-mobile"
|
||||
onClick={() => { setShowActionForm((v) => !v); setEditingAction(null) }}
|
||||
>
|
||||
{showActionForm ? 'Abbrechen' : 'Maßnahme anlegen'}
|
||||
</button>
|
||||
)}
|
||||
@@ -211,7 +233,7 @@ export function InitiativeDetailPage() {
|
||||
</select>
|
||||
<button
|
||||
type="button"
|
||||
className="secondary"
|
||||
className="btn btn-secondary"
|
||||
onClick={() => {
|
||||
setEditingAction(action.id)
|
||||
setShowActionForm(false)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useCallback, useEffect, useState } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { listInitiatives, listInitiativeActions } from '../api/initiatives.js'
|
||||
import { listInitiatives, listInitiativeActions, createInitiative } from '../api/initiatives.js'
|
||||
import { countOpenActions } from '../api/actions.js'
|
||||
import { StatusBadge } from '../components/StatusBadge.jsx'
|
||||
import { PriorityBadge } from '../components/PriorityBadge.jsx'
|
||||
@@ -10,7 +10,6 @@ import { ErrorState } from '../components/ErrorState.jsx'
|
||||
import { LoadingState } from '../components/LoadingState.jsx'
|
||||
import { useCapabilities } from '../hooks/useCapabilities.js'
|
||||
import { useSession } from '../context/SessionContext.jsx'
|
||||
import { createInitiative } from '../api/initiatives.js'
|
||||
|
||||
export function InitiativesPage() {
|
||||
const { context } = useSession()
|
||||
@@ -67,14 +66,18 @@ export function InitiativesPage() {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="page">
|
||||
<div className="app-page">
|
||||
<header className="page-header">
|
||||
<div>
|
||||
<h1>Vorhaben</h1>
|
||||
<p className="muted">Aktive und pausierte Vorhaben im Tenant.</p>
|
||||
<p className="page-lead">Aktive und pausierte Vorhaben im Tenant.</p>
|
||||
</div>
|
||||
{hasCapability('kairo.initiative.manage') && (
|
||||
<button type="button" onClick={() => setShowForm((v) => !v)}>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-primary btn-block-mobile"
|
||||
onClick={() => setShowForm((v) => !v)}
|
||||
>
|
||||
{showForm ? 'Abbrechen' : 'Vorhaben anlegen'}
|
||||
</button>
|
||||
)}
|
||||
@@ -82,7 +85,7 @@ export function InitiativesPage() {
|
||||
|
||||
{showForm && (
|
||||
<section className="card inline-form-card">
|
||||
<h2>Neues Vorhaben</h2>
|
||||
<h2 className="card-title card-title--lg">Neues Vorhaben</h2>
|
||||
<InitiativeForm
|
||||
onSubmit={handleCreate}
|
||||
onCancel={() => setShowForm(false)}
|
||||
@@ -102,7 +105,7 @@ export function InitiativesPage() {
|
||||
{initiatives.map((item) => (
|
||||
<li key={item.id} className="list-item card-list-item">
|
||||
<div className="list-item-main">
|
||||
<Link to={`/initiatives/${item.id}`}>
|
||||
<Link to={`/initiatives/${item.id}`} className="list-item-link">
|
||||
<strong>{item.title}</strong>
|
||||
</Link>
|
||||
{item.goal && <p className="list-item-desc">{item.goal}</p>}
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
import { useCallback, useEffect, useState } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { listMyOpenActions } from '../api/actions.js'
|
||||
import { ActionList } from '../components/ActionList.jsx'
|
||||
import { EmptyState } from '../components/EmptyState.jsx'
|
||||
import { ErrorState } from '../components/ErrorState.jsx'
|
||||
import { LoadingState } from '../components/LoadingState.jsx'
|
||||
import { WidgetCard } from '../components/WidgetCard.jsx'
|
||||
|
||||
export function MyActionsPage() {
|
||||
const [actions, setActions] = useState([])
|
||||
const [loading, setLoading] = useState(true)
|
||||
const [error, setError] = useState(null)
|
||||
const [hideDone, setHideDone] = useState(true)
|
||||
|
||||
const load = useCallback(async () => {
|
||||
setLoading(true)
|
||||
setError(null)
|
||||
try {
|
||||
const data = await listMyOpenActions()
|
||||
setActions(data)
|
||||
} catch (err) {
|
||||
setError(err.message)
|
||||
} finally {
|
||||
setLoading(false)
|
||||
}
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
load()
|
||||
}, [load])
|
||||
|
||||
const visible = hideDone
|
||||
? actions.filter((a) => a.status !== 'done' && a.status !== 'discarded')
|
||||
: actions
|
||||
|
||||
return (
|
||||
<div className="app-page">
|
||||
<header className="page-header">
|
||||
<div>
|
||||
<h1>Meine Maßnahmen</h1>
|
||||
<p className="page-lead">Dir zugewiesene offene und blockierte Maßnahmen.</p>
|
||||
</div>
|
||||
<label className="checkbox-label">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={hideDone}
|
||||
onChange={(e) => setHideDone(e.target.checked)}
|
||||
/>
|
||||
Erledigte ausblenden
|
||||
</label>
|
||||
</header>
|
||||
|
||||
<WidgetCard
|
||||
title="Zugewiesene Maßnahmen"
|
||||
actions={
|
||||
<button type="button" className="btn btn-ghost" onClick={load} disabled={loading}>
|
||||
Aktualisieren
|
||||
</button>
|
||||
}
|
||||
>
|
||||
{loading && <LoadingState />}
|
||||
{!loading && error && <ErrorState message={error} onRetry={load} />}
|
||||
{!loading && !error && (
|
||||
<ActionList
|
||||
actions={visible}
|
||||
showInitiative
|
||||
getManageLink={(a) => `/initiatives/${a.initiative_id}`}
|
||||
empty={
|
||||
<EmptyState message="Keine offenen Maßnahmen. Du kannst eine neue Maßnahme in einem Vorhaben anlegen." />
|
||||
}
|
||||
/>
|
||||
)}
|
||||
</WidgetCard>
|
||||
|
||||
<p className="page-footer-link">
|
||||
<Link to="/initiatives" className="link-inline">
|
||||
Zu den Vorhaben →
|
||||
</Link>
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Link } from 'react-router-dom'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
import { useState } from 'react'
|
||||
import { useCapabilities } from '../hooks/useCapabilities.js'
|
||||
import { getWidgetsForArea } from '../registry/widgetRegistry.js'
|
||||
import { useSession } from '../context/SessionContext.jsx'
|
||||
import { InitiativeForm } from '../components/InitiativeForm.jsx'
|
||||
import { createInitiative } from '../api/initiatives.js'
|
||||
import { useState } from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
|
||||
export function WorkspacePage() {
|
||||
const navigate = useNavigate()
|
||||
@@ -34,14 +34,18 @@ export function WorkspacePage() {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="page workspace-page">
|
||||
<div className="app-page">
|
||||
<header className="page-header">
|
||||
<div>
|
||||
<h1>Workspace</h1>
|
||||
<p className="muted">Dein Überblick über Vorhaben und Maßnahmen.</p>
|
||||
<p className="page-lead">Dein Überblick über Vorhaben und Maßnahmen.</p>
|
||||
</div>
|
||||
{hasCapability('kairo.initiative.manage') && (
|
||||
<button type="button" onClick={() => setShowForm((v) => !v)}>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-primary btn-block-mobile"
|
||||
onClick={() => setShowForm((v) => !v)}
|
||||
>
|
||||
{showForm ? 'Abbrechen' : 'Vorhaben anlegen'}
|
||||
</button>
|
||||
)}
|
||||
@@ -49,7 +53,7 @@ export function WorkspacePage() {
|
||||
|
||||
{showForm && (
|
||||
<section className="card inline-form-card">
|
||||
<h2>Neues Vorhaben</h2>
|
||||
<h2 className="card-title card-title--lg">Neues Vorhaben</h2>
|
||||
{formError && <p className="error">{formError}</p>}
|
||||
<InitiativeForm
|
||||
onSubmit={handleCreateInitiative}
|
||||
@@ -69,7 +73,9 @@ export function WorkspacePage() {
|
||||
|
||||
{hasCapability('kairo.initiative.read') && (
|
||||
<p className="page-footer-link">
|
||||
<Link to="/initiatives">Zur Vorhabenliste →</Link>
|
||||
<Link to="/initiatives" className="link-inline">
|
||||
Zur Vorhabenliste →
|
||||
</Link>
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user