Deploy FeWo mit PipelineManager / deploy (push) Successful in 3m36s
- Zahlungen werden nicht mehr automatisch angemahnt: faellige Anzahlung/Restzahlung werden Aufgaben (Zahlungen & Wuensche, Tages-/Wochenuebersicht); Mail nur per Klick; je Portal und Buchungstyp abschaltbar - Freigabe-Link in der Eingangsbestaetigung, Storno-Link in der Buchungsbestaetigung; je Wohnung Wunsch / sofort / sofort bis Frist; Stornowuensche und Kosten bleiben Aufgabe des Gastgebers - Vertragsvorlagen mit Versionen (je Angebot, Portal oder Wohnung waehlbar), benutzte Versionen gesperrt; Angebot und finaler Vertrag als unveraenderliche PDF mit SHA-256, Vertrag wird nie neu geschrieben - Anreise-Mail je Wohnung einstellbar (Standard 3 Tage), neue Textfelder Schluessel/Parken/Ankunftstag Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
68 lines
2.0 KiB
PHP
68 lines
2.0 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\ContractTemplates;
|
|
|
|
use App\Filament\Concerns\FollowsAdminMode;
|
|
use App\Filament\Resources\ContractTemplates\Pages\CreateContractTemplate;
|
|
use App\Filament\Resources\ContractTemplates\Pages\EditContractTemplate;
|
|
use App\Filament\Resources\ContractTemplates\Pages\ListContractTemplates;
|
|
use App\Filament\Resources\ContractTemplates\Schemas\ContractTemplateForm;
|
|
use App\Filament\Resources\ContractTemplates\Tables\ContractTemplatesTable;
|
|
use App\Models\ContractTemplate;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Support\Icons\Heroicon;
|
|
use Filament\Tables\Table;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use UnitEnum;
|
|
|
|
class ContractTemplateResource extends Resource
|
|
{
|
|
use FollowsAdminMode;
|
|
|
|
protected static ?string $model = ContractTemplate::class;
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedDocumentDuplicate;
|
|
|
|
protected static string|UnitEnum|null $navigationGroup = 'Vermietung';
|
|
|
|
protected static ?string $modelLabel = 'Vertragsvorlage';
|
|
|
|
protected static ?string $pluralModelLabel = 'Vertragsvorlagen';
|
|
|
|
protected static ?int $navigationSort = 6;
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return ContractTemplateForm::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return ContractTemplatesTable::configure($table);
|
|
}
|
|
|
|
/**
|
|
* A version used in an offer is a document of record and is never edited; a new version is made instead.
|
|
*/
|
|
public static function canEdit(Model $record): bool
|
|
{
|
|
return ! $record->isUsed();
|
|
}
|
|
|
|
public static function canDelete(Model $record): bool
|
|
{
|
|
return ! $record->isUsed();
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListContractTemplates::route('/'),
|
|
'create' => CreateContractTemplate::route('/create'),
|
|
'edit' => EditContractTemplate::route('/{record}/edit'),
|
|
];
|
|
}
|
|
}
|