Stellen: Bewerbung per E-Mail-Adresse (0.28.3)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 7m39s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 7m45s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 5m50s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 5m51s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 10m3s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 10m8s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 6m52s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 6m55s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m33s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 7m39s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 7m45s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 5m50s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 5m51s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 10m3s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 10m8s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 6m52s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 6m55s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m33s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
bd0808b1f8
commit
14e39bd9b3
125 changed files with 374 additions and 323 deletions
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('job_postings', function (Blueprint $table) {
|
||||
$table->string('apply_email', 190)->nullable()->after('apply_url');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('job_postings', function (Blueprint $table) {
|
||||
$table->dropColumn('apply_email');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
@ -38,6 +38,7 @@ const form = useForm({
|
|||
description: p?.description ?? '',
|
||||
apply_mode: p?.apply_mode ?? 'online',
|
||||
apply_url: p?.apply_url ?? '',
|
||||
apply_email: p?.apply_email ?? '',
|
||||
contact_id: p?.contact?.id ?? null,
|
||||
notify_email: p?.notify_email ?? '',
|
||||
publish: !p ? 'now' : p.status === 'draft' ? 'draft' : p.status === 'scheduled' ? 'at' : 'now',
|
||||
|
|
@ -156,6 +157,9 @@ function remove() {
|
|||
<FormField v-if="form.apply_mode === 'link'" id="job-apply-url" label="Link zur Bewerbung" :error="form.errors.apply_url">
|
||||
<Input id="job-apply-url" v-model="form.apply_url" maxlength="1000" placeholder="https://…" />
|
||||
</FormField>
|
||||
<FormField v-if="form.apply_mode === 'email'" id="job-apply-email" label="E-Mail-Adresse für Bewerbungen" :error="form.errors.apply_email">
|
||||
<Input id="job-apply-email" v-model="form.apply_email" type="email" maxlength="190" placeholder="z. B. bewerbung@firma.de" />
|
||||
</FormField>
|
||||
<FormField id="job-contact" label="Ansprechperson" :error="form.errors.contact_id" :hint="form.apply_mode === 'online' ? 'Erhält die Bewerbungen im Portal. Ohne Ansprechperson: alle mit „Bewerbungen einsehen“.' : 'Wird bei der Stelle mit E-Mail und Telefon gezeigt.'">
|
||||
<PersonPicker id="job-contact" v-model="form.contact_id" :person="p?.contact" />
|
||||
</FormField>
|
||||
|
|
|
|||
|
|
@ -87,6 +87,11 @@ function withdraw() {
|
|||
<Button class="mt-4 w-full" :disabled="!canApply" @click="applying = true"><Send /> Jetzt bewerben</Button>
|
||||
<p v-if="!canApply && posting.status !== 'open'" class="mt-2 text-xs text-muted-foreground">Bewerben ist gerade nicht möglich.</p>
|
||||
</template>
|
||||
<template v-else-if="posting.apply_mode === 'email' && posting.apply_email">
|
||||
<p class="text-sm text-muted-foreground">Bitte schicken Sie Ihre Bewerbung per E-Mail an:</p>
|
||||
<p class="mt-1 text-sm font-medium break-all select-all">{{ posting.apply_email }}</p>
|
||||
<Button class="mt-4 w-full" as-child><a :href="`mailto:${posting.apply_email}?subject=${encodeURIComponent(`Bewerbung: ${posting.title}`)}`"><Mail /> E-Mail schreiben</a></Button>
|
||||
</template>
|
||||
<template v-else-if="posting.apply_mode === 'link' && posting.apply_url">
|
||||
<Button class="w-full" as-child><a :href="posting.apply_url" target="_blank" rel="noopener"><ExternalLink /> Zur Bewerbung</a></Button>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ class JobEditorController extends Controller
|
|||
{
|
||||
return Inertia::render('stellen::Editor', [
|
||||
'posting' => $posting ? [
|
||||
...$posting->only(['id', 'title', 'department', 'location', 'employment', 'hours', 'contract', 'contract_note', 'pay_grade', 'start', 'description', 'apply_mode', 'apply_url', 'notify_email']),
|
||||
...$posting->only(['id', 'title', 'department', 'location', 'employment', 'hours', 'contract', 'contract_note', 'pay_grade', 'start', 'description', 'apply_mode', 'apply_url', 'apply_email', 'notify_email']),
|
||||
'deadline' => $posting->deadline?->toDateString(),
|
||||
'published_at' => $posting->published_at?->format('Y-m-d\TH:i'),
|
||||
'status' => $posting->status(),
|
||||
|
|
@ -161,14 +161,15 @@ class JobEditorController extends Controller
|
|||
'description' => ['nullable', 'string', 'max:200000'],
|
||||
'apply_mode' => ['required', Rule::in(array_keys(JobPosting::APPLY_MODES))],
|
||||
'apply_url' => ['nullable', 'required_if:apply_mode,link', 'string', 'max:1000'],
|
||||
'apply_email' => ['nullable', 'required_if:apply_mode,email', 'email', 'max:190'],
|
||||
'contact_id' => ['nullable', 'integer', Rule::exists('users', 'id')],
|
||||
'notify_email' => ['nullable', 'email', 'max:190'],
|
||||
'publish' => ['required', Rule::in(['draft', 'now', 'at'])],
|
||||
'published_at' => ['nullable', 'required_if:publish,at', 'date'],
|
||||
'pdf' => ['nullable', File::types(['pdf'])->max(20 * 1024)],
|
||||
'remove_pdf' => ['boolean'],
|
||||
], ['apply_url.required_if' => 'Bitte die Adresse angeben, unter der man sich bewirbt.', 'published_at.required_if' => 'Bitte Datum und Uhrzeit angeben.'], [
|
||||
'title' => 'Titel', 'deadline' => 'Bewerbungsfrist', 'apply_url' => 'Link', 'notify_email' => 'E-Mail', 'pdf' => 'PDF',
|
||||
], ['apply_url.required_if' => 'Bitte die Adresse angeben, unter der man sich bewirbt.', 'apply_email.required_if' => 'Bitte die E-Mail-Adresse für Bewerbungen angeben.', 'published_at.required_if' => 'Bitte Datum und Uhrzeit angeben.'], [
|
||||
'title' => 'Titel', 'deadline' => 'Bewerbungsfrist', 'apply_url' => 'Link', 'apply_email' => 'E-Mail-Adresse', 'notify_email' => 'E-Mail', 'pdf' => 'PDF',
|
||||
]);
|
||||
|
||||
$url = $data['apply_mode'] === 'link' ? Field::safeUrl($data['apply_url'] ?? '') : '';
|
||||
|
|
@ -182,6 +183,7 @@ class JobEditorController extends Controller
|
|||
'description' => filled($data['description'] ?? null) ? app(RichText::class)->sanitize($data['description']) : null,
|
||||
'apply_mode' => $data['apply_mode'],
|
||||
'apply_url' => $url !== '' ? $url : null,
|
||||
'apply_email' => $data['apply_mode'] === 'email' ? mb_strtolower(trim($data['apply_email'])) : null,
|
||||
'contact_id' => $data['contact_id'] ?? null,
|
||||
'notify_email' => $data['notify_email'] ?? null,
|
||||
'published_at' => match ($data['publish']) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ use Illuminate\Support\Facades\Storage;
|
|||
* Eine interne Stellenausschreibung. Sichtbar ab „published_at“ bis einschließlich zur Frist.
|
||||
*/
|
||||
#[Fillable(['title', 'department', 'location', 'employment', 'hours', 'contract', 'contract_note', 'pay_grade', 'start', 'deadline',
|
||||
'description', 'pdf_path', 'pdf_name', 'apply_mode', 'apply_url', 'contact_id', 'notify_email', 'published_at', 'created_by', 'updated_by'])]
|
||||
'description', 'pdf_path', 'pdf_name', 'apply_mode', 'apply_url', 'apply_email', 'contact_id', 'notify_email', 'published_at', 'created_by', 'updated_by'])]
|
||||
class JobPosting extends Model
|
||||
{
|
||||
public const DISK = 'local';
|
||||
|
|
@ -23,7 +23,7 @@ class JobPosting extends Model
|
|||
|
||||
public const CONTRACT = ['permanent' => 'Unbefristet', 'fixed' => 'Befristet'];
|
||||
|
||||
public const APPLY_MODES = ['online' => 'Online im Portal', 'contact' => 'Über die Ansprechperson', 'link' => 'Über einen Link'];
|
||||
public const APPLY_MODES = ['online' => 'Online im Portal', 'email' => 'Per E-Mail an eine Adresse', 'contact' => 'Über die Ansprechperson', 'link' => 'Über einen Link'];
|
||||
|
||||
protected static function booted(): void
|
||||
{
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ class Presenter
|
|||
'pdf' => $posting->pdf_path ? ['name' => $posting->pdf_name, 'url' => route('jobs.pdf', $posting)] : null,
|
||||
'apply_mode' => $posting->apply_mode,
|
||||
'apply_url' => $posting->apply_mode === 'link' ? $posting->apply_url : null,
|
||||
'apply_email' => $posting->apply_mode === 'email' ? $posting->apply_email : null,
|
||||
'contact' => $contact ? [
|
||||
'id' => $contact->id, 'name' => $contact->name, 'initials' => $contact->initials, 'job_title' => $contact->job_title,
|
||||
'email' => $contact->email, 'phone' => $contact->phone, 'avatar_url' => $contact->avatarUrl(96),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue