v0.11 U1: Kanalmanager mit eigener Webseite und neuen Prozessparametern
- Eigene Webseite als Kanal eigener Art (channels.kind = website), nur zur Konfiguration: Webseiten-Anfragen bleiben direkt (A1) ohne Kanalbezug; der Eintrag nimmt an Sync, Export, Überwachung und Sperraufgaben nicht teil (active()/Property::channels() nur Portale, Feed nur für Portale). - Neue Einstellungen im bestehenden ProcessSetting: Klärungsreservierung automatisch/Freigabe (15/180 min, 0 = keine), Rückfragemodus, Erinnerungen, Folgefragen, Erinnerungsabstand, Linkgültigkeit, Anschrift im Webformular verlangen (Standard: nein). - „Kanäle“ in der einfachen Ansicht: Webseite und Portale an einer Stelle, Verweis auf „Ihre Standards“; „Wirksame Einstellungen“ mit Spalte „Eigene Webseite“ und Herkunft „Webseite“. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bfccfe7eed
commit
799869c6a4
27 files changed
+559
-106
No files matched your search
@@ -6,6 +6,7 @@
|
||||
use App\Actions\ConfigureChannel;
|
||||
use App\Channels\ChannelSyncException;
|
||||
use App\Filament\Resources\Channels\ChannelResource;
|
||||
use App\Models\Channel;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
@@ -18,8 +19,8 @@ class EditChannel extends EditRecord
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Action::make('rules')->label('Regeln & Exportfelder')->url(fn (): string => ChannelResource::getUrl('rules', ['record' => $this->record])),
|
||||
Action::make('analyze')->label('Kalender analysieren')->action(function (AnalyzeChannelCalendar $analyze): void {
|
||||
Action::make('rules')->label('Regeln & Exportfelder')->url(fn (): string => ChannelResource::getUrl('rules', ['record' => $this->record]))->visible(fn (): bool => $this->record->isPortal()),
|
||||
Action::make('analyze')->label('Kalender analysieren')->visible(fn (): bool => $this->record->isPortal())->action(function (AnalyzeChannelCalendar $analyze): void {
|
||||
try {
|
||||
$analyze->handle($this->record);
|
||||
$this->redirect(ChannelResource::getUrl('rules', ['record' => $this->record]));
|
||||
@@ -37,6 +38,13 @@ protected function mutateFormDataBeforeFill(array $data): array
|
||||
|
||||
protected function handleRecordUpdate(Model $record, array $data): Model
|
||||
{
|
||||
// The own website's entry only keeps its settings; there is no connection to configure.
|
||||
if ($record instanceof Channel && $record->isWebsite()) {
|
||||
$record->update(['process_overrides' => $data['process_overrides'] ?? []]);
|
||||
|
||||
return $record;
|
||||
}
|
||||
|
||||
return app(ConfigureChannel::class)->handle($record->property, $data, $record);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,20 +3,44 @@
|
||||
namespace App\Filament\Resources\Channels\Pages;
|
||||
|
||||
use App\Filament\Concerns\ListsCurrentProperty;
|
||||
use App\Filament\Pages\HandlingSettings;
|
||||
use App\Filament\Resources\Channels\ChannelResource;
|
||||
use App\Models\Channel;
|
||||
use App\Models\Property;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
|
||||
/**
|
||||
* The channel manager (v0.11, E-037): the own website and every portal of the landlord in one list. The landlord's
|
||||
* defaults for all channels stay on "So arbeite ich"; each channel only keeps its deviations.
|
||||
*/
|
||||
class ListChannels extends ListRecords
|
||||
{
|
||||
use ListsCurrentProperty;
|
||||
|
||||
protected static string $resource = ChannelResource::class;
|
||||
|
||||
public function mount(): void
|
||||
{
|
||||
parent::mount();
|
||||
|
||||
// Every property has its website entry (created by the migration; new properties get it here).
|
||||
Property::query()->get()->each(fn (Property $property): Channel => Channel::websiteOf($property));
|
||||
}
|
||||
|
||||
public function getSubheading(): ?string
|
||||
{
|
||||
return 'Alle Eingangskanäle an einer Stelle: Ihre eigene Webseite und die Portale. Was für alle Kanäle gilt, stellen Sie unter „Ihre Standards“ ein; hier steht nur, was ein Kanal anders macht.';
|
||||
}
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
CreateAction::make()->label('iCal-Verbindung anlegen'),
|
||||
Action::make('defaults')->label('Ihre Standards (alle Kanäle)')->icon(Heroicon::OutlinedAdjustmentsHorizontal)->color('gray')
|
||||
->url(fn (): string => HandlingSettings::getUrl()),
|
||||
CreateAction::make()->label('Portal (iCal-Verbindung) anlegen'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user