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:
Felix Kemmler
2026-08-07 14:21:37 +02:00
co-authored by Claude Sonnet 5
parent 8beb0fcf52
commit b6c1389c55
355 changed files with 24348 additions and 361 deletions
@@ -0,0 +1,73 @@
<?php
require_once __DIR__ . '/../lib/auth.php';
require_once __DIR__ . '/../lib/upload.php';
require_once __DIR__ . '/../lib/mail.php';
require_login();
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
header('Location: ../pages/fortbildungsantrag.php');
exit;
}
$back = '../pages/fortbildungsantrag.php';
$anliegen = trim($_POST['anliegen'] ?? '');
$thema = trim($_POST['thema'] ?? '');
$nachricht = trim($_POST['nachricht'] ?? '');
$allowed_anliegen = ['wbl_pdl', 'fortbildung', 'pflichtschulung'];
if (!in_array($anliegen, $allowed_anliegen, true)) {
redirect_error($back, 'Bitte ein Anliegen auswählen.');
}
if ($thema === '') {
redirect_error($back, 'Bitte ein Thema angeben.');
}
$up = handle_upload($_FILES['datei'] ?? [], [
'allowed' => UPLOAD_TYPES_DOCS,
'dir' => dirname(__DIR__) . '/uploads/',
'prefix' => 'fortbildung',
'required' => false,
]);
if (!$up['ok']) {
redirect_error($back, $up['error']);
}
$filename = $up['filename'] ?? '';
$original_name = $up['original_name'] ?? '';
$mime = $up['mime'] ?? null;
$user_id = current_user()['id'];
$now = date('c');
db()->prepare(
'INSERT INTO requests_fortbildungsantrag
(user_id, status, admin_note, anliegen, thema, nachricht, filename, original_name, created_at, updated_at)
VALUES (?, \'pending\', \'\', ?, ?, ?, ?, ?, ?, ?)'
)->execute([$user_id, $anliegen, $thema, $nachricht, $filename, $original_name, $now, $now]);
$anliegen_labels = [
'wbl_pdl' => 'WBL / PDL',
'fortbildung' => 'Fortbildung',
'pflichtschulung' => 'Pflichtschulung',
];
$config = require __DIR__ . '/../lib/config.php';
$attach = ($filename !== '')
? ['path' => dirname(__DIR__) . '/uploads/' . $filename, 'name' => $original_name, 'mime' => $mime]
: [];
smtp_send(
$config,
$config['mail_info'],
'Neuer Fortbildungsantrag: ' . current_name(),
"Ein Fortbildungsantrag wurde eingereicht.\n\n"
. 'Mitarbeiter: ' . current_name() . "\n"
. 'Anliegen: ' . ($anliegen_labels[$anliegen] ?? $anliegen) . "\n"
. 'Thema: ' . $thema . "\n"
. 'Nachricht: ' . ($nachricht ?: '—') . "\n\n"
. "---\nGesendet über OMSORG Connect",
$attach
);
redirect_ok($back);