Reorganize into monorepo layout, move mitarbeiter-app to legacy reference
Consolidates the previously separate omsorgapp and omsorgCore repos (each had their own nested .git with GitHub history) plus the old root-level website/mitarbeiter-app into a single monorepo, matching the structure already documented in the root CLAUDE.md. Also moves the PHP employee app aside as omsorgWeb/mitarbeiter-app-legacy/ to serve as a template for a ground-up rewrite. Fixes .gitignore in the same pass: the config-secrets/uploads/data patterns were unanchored (relative to repo root, not depth-agnostic), so they silently stopped matching once the app moved under omsorgWeb/. Patterns are now **/-prefixed and cover both mitarbeiter-app and mitarbeiter-app-legacy, keeping DB/SMTP credentials and uploaded employee documents out of version control. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
8beb0fcf52
commit
b6c1389c55
@@ -0,0 +1,72 @@
|
||||
import { useState } from "react";
|
||||
import { Mail } from "lucide-react";
|
||||
import OmsorgCard from "../../components/OmsorgCard";
|
||||
import OmsorgButton from "../../components/ui/OmsorgButton";
|
||||
|
||||
export default function ForgotPasswordUsernamePage({ onNext, onBackToLogin }) {
|
||||
const [username, setUsername] = useState("");
|
||||
const [error, setError] = useState(null);
|
||||
const [cannotReset, setCannotReset] = useState(false);
|
||||
const [isSubmitting, setIsSubmitting] = useState(false);
|
||||
|
||||
async function handleSubmit(event) {
|
||||
event.preventDefault();
|
||||
setError(null);
|
||||
setCannotReset(false);
|
||||
setIsSubmitting(true);
|
||||
const result = await window.omsorg.auth.requestPasswordReset(username);
|
||||
setIsSubmitting(false);
|
||||
|
||||
if (!result.success) {
|
||||
setError("Server nicht erreichbar. Bitte Verbindung prüfen und erneut versuchen.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (result.status === "sent") {
|
||||
onNext(username);
|
||||
} else {
|
||||
setCannotReset(true);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="login-screen">
|
||||
<OmsorgCard>
|
||||
<h2>
|
||||
Passwort
|
||||
<span className="accent"> vergessen</span>
|
||||
</h2>
|
||||
|
||||
<form onSubmit={handleSubmit} className="login-form">
|
||||
<label>
|
||||
Benutzername
|
||||
<input
|
||||
type="text"
|
||||
value={username}
|
||||
onChange={(e) => setUsername(e.target.value)}
|
||||
autoFocus
|
||||
required
|
||||
/>
|
||||
</label>
|
||||
|
||||
{error && <p className="login-error">{error}</p>}
|
||||
{cannotReset && (
|
||||
<p className="login-error">
|
||||
Für diesen Account ist kein Passwort-Reset per E-Mail möglich. Bitte wende dich an einen Administrator.
|
||||
</p>
|
||||
)}
|
||||
|
||||
<OmsorgButton type="submit" icon={Mail} disabled={isSubmitting}>
|
||||
{isSubmitting ? "Wird gesendet..." : "Code anfordern"}
|
||||
</OmsorgButton>
|
||||
|
||||
<div className="login-form-links">
|
||||
<button type="button" onClick={onBackToLogin}>
|
||||
Zurück zum Login
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</OmsorgCard>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user