Pakete 7 und 9: Auskunft und Buchungswunsch, Aufenthalt und Abschluss (Zwischenstand)
- Haltefrist 0: unverbindliche Auskunft mit signiertem Link "Buchung anfragen", erneute Prüfung unter Sperre, automatische oder manuelle Bestätigung, Absage bei vergebenem Zeitraum, Ablauf unbeantworteter Auskünfte - Aufenthalt: Anreisedaten, Aufgaben je Wohnung, gebuchte Leistungen, Abweichungen und Folgeaufgaben als Aufgaben am Vorgang - Abschluss getrennt: Aufenthalt abgeschlossen / kaufmännisch abgeschlossen, Nachläufer (Forderung, Auszahlung) bleiben sichtbar - Zahlungsstatus nur aus Geld auf unserem Konto; Altbestand per Vorschau-Befehl - Verlauf weist Testzustellungen als solche aus - Abnahmetests T16-T25, T23 über isolierten SMTP-Empfänger Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3bcfc09417
commit
40d20cb7d1
52 files changed
+3196
-89
No files matched your search
@@ -13,6 +13,7 @@
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* A rentable holiday apartment. All money amounts are stored in euro cents.
|
||||
@@ -47,6 +48,8 @@
|
||||
'min_stay_absolute',
|
||||
'is_active',
|
||||
'process_overrides',
|
||||
'stay_tasks',
|
||||
'asks_arrival_time',
|
||||
])]
|
||||
class Property extends Model
|
||||
{
|
||||
@@ -85,6 +88,8 @@ protected function casts(): array
|
||||
'free_cancellation_days' => 'integer',
|
||||
'contract_data' => 'array',
|
||||
'process_overrides' => 'array',
|
||||
'stay_tasks' => 'array',
|
||||
'asks_arrival_time' => 'boolean',
|
||||
'min_stay_fill_gaps' => 'boolean',
|
||||
'min_stay_until_changeover' => 'boolean',
|
||||
'changeover_weekday' => 'integer',
|
||||
@@ -188,4 +193,31 @@ public function extras(): HasMany
|
||||
{
|
||||
return $this->hasMany(Extra::class)->orderBy('sort_order');
|
||||
}
|
||||
|
||||
/**
|
||||
* The stay tasks of this property (package 9): local services and provider jobs such as cleaning, linen or the key
|
||||
* handover, each with when it is due and for which kinds of stays it applies. No staff planning – a task per case.
|
||||
*
|
||||
* @return list<array{key: string, title: string, when: string, days: int, responsible: ?string, applies_to: list<string>}>
|
||||
*/
|
||||
public function stayTaskDefinitions(): array
|
||||
{
|
||||
$definitions = [];
|
||||
foreach ((array) ($this->stay_tasks ?? []) as $task) {
|
||||
$title = trim((string) ($task['title'] ?? ''));
|
||||
if ($title === '') {
|
||||
continue;
|
||||
}
|
||||
$definitions[] = [
|
||||
'key' => 'stay:'.mb_substr(Str::slug($title), 0, 70),
|
||||
'title' => $title,
|
||||
'when' => in_array($task['when'] ?? null, ['before_arrival', 'on_arrival', 'after_departure'], true) ? $task['when'] : 'before_arrival',
|
||||
'days' => max(0, (int) ($task['days'] ?? 1)),
|
||||
'responsible' => filled($task['responsible'] ?? null) ? trim((string) $task['responsible']) : null,
|
||||
'applies_to' => array_values(array_filter((array) ($task['applies_to'] ?? ['rental']))) ?: ['rental'],
|
||||
];
|
||||
}
|
||||
|
||||
return $definitions;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user