feat: AfterSales CRM - SOP compliant real-estate customer care system
- Departments + cross-department transfer workflow - Role-based closing (staff→resolved, manager→closed) with proof_of_resolution - Private file storage with collection system + temporary signed URLs - Dashboard: resolved tickets table, stats, handler performance bar chart - Spatie RBAC (admin/manager/staff) - Notifications: TicketTransferred, TicketClosed (database + mail) - Pest tests: 8 tests, 21 assertions - Docker production-ready (Dockerfile + compose + entrypoint)
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Customers\RelationManagers;
|
||||
|
||||
use App\Filament\Resources\Feedback\FeedbackResource;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Filters\SelectFilter;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class FeedbacksRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'feedbacks';
|
||||
|
||||
protected static ?string $title = 'Feedback History';
|
||||
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->recordTitleAttribute('title')
|
||||
->columns([
|
||||
TextColumn::make('title')
|
||||
->searchable()
|
||||
->url(fn ($record) => FeedbackResource::getUrl('edit', ['record' => $record])),
|
||||
TextColumn::make('customerProduct.product.name')
|
||||
->label('Product')
|
||||
->placeholder('General'),
|
||||
TextColumn::make('status')
|
||||
->badge()
|
||||
->color(fn (string $state): string => match ($state) {
|
||||
'pending' => 'warning',
|
||||
'processing' => 'info',
|
||||
'resolved' => 'success',
|
||||
'closed' => 'gray',
|
||||
default => 'gray',
|
||||
}),
|
||||
TextColumn::make('tags.name')
|
||||
->badge(),
|
||||
TextColumn::make('feedbackChannel.name')
|
||||
->label('Channel'),
|
||||
TextColumn::make('interactions_count')
|
||||
->counts('interactions')
|
||||
->label('Interactions'),
|
||||
TextColumn::make('created_at')
|
||||
->dateTime('d/m/Y')
|
||||
->sortable(),
|
||||
])
|
||||
->filters([
|
||||
SelectFilter::make('status')
|
||||
->options([
|
||||
'pending' => 'Pending',
|
||||
'processing' => 'Processing',
|
||||
'resolved' => 'Resolved',
|
||||
'closed' => 'Closed',
|
||||
]),
|
||||
SelectFilter::make('tags')
|
||||
->relationship('tags', 'name'),
|
||||
])
|
||||
->defaultSort('created_at', 'desc')
|
||||
->headerActions([])
|
||||
->recordActions([]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user