diff --git a/resources/views/components/incident.blade.php b/resources/views/components/incident.blade.php
index 33f731db..b9bbbba5 100644
--- a/resources/views/components/incident.blade.php
+++ b/resources/views/components/incident.blade.php
@@ -69,8 +69,12 @@
@empty
-
- {{ __('No incidents reported.') }}
+
+
+
+ {{ __('No incidents reported.') }}
+
+
@endforelse
diff --git a/src/Filament/Resources/ComponentGroupResource.php b/src/Filament/Resources/ComponentGroupResource.php
index 7371185e..4203cee5 100644
--- a/src/Filament/Resources/ComponentGroupResource.php
+++ b/src/Filament/Resources/ComponentGroupResource.php
@@ -25,16 +25,19 @@ public static function form(Form $form): Form
->schema([
Forms\Components\Section::make()->columns(2)->schema([
Forms\Components\TextInput::make('name')
+ ->label(__('Name'))
->required()
->maxLength(255)
->columnSpanFull(),
Forms\Components\ToggleButtons::make('visible')
+ ->label(__('Visible'))
->inline()
->options(ResourceVisibilityEnum::class)
->default(ResourceVisibilityEnum::guest)
->required()
->columnSpanFull(),
Forms\Components\ToggleButtons::make('collapsed')
+ ->label(__('Collapsed'))
->required()
->inline()
->options(ComponentGroupVisibilityEnum::class)
@@ -49,17 +52,22 @@ public static function table(Table $table): Table
return $table
->columns([
Tables\Columns\TextColumn::make('name')
+ ->label(__('Name'))
->searchable(),
Tables\Columns\TextColumn::make('visible')
+ ->label(__('Visible'))
->badge()
->sortable(),
Tables\Columns\TextColumn::make('collapsed')
+ ->label(__('Collapsed'))
->sortable(),
Tables\Columns\TextColumn::make('created_at')
+ ->label(__('Created at'))
->dateTime()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('updated_at')
+ ->label(__('Updated at'))
->dateTime()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
@@ -97,4 +105,9 @@ public static function getLabel(): ?string
{
return __('Component Group');
}
+
+ public static function getPluralLabel(): ?string
+ {
+ return __('Component Groups');
+ }
}
diff --git a/src/Filament/Resources/ComponentResource.php b/src/Filament/Resources/ComponentResource.php
index 3aa4e8ec..48202841 100644
--- a/src/Filament/Resources/ComponentResource.php
+++ b/src/Filament/Resources/ComponentResource.php
@@ -23,14 +23,17 @@ public static function form(Form $form): Form
->schema([
Forms\Components\Section::make()->columns(2)->schema([
Forms\Components\TextInput::make('name')
+ ->label(__('Name'))
->required()
->maxLength(255),
Forms\Components\ToggleButtons::make('status')
+ ->label(__('Status'))
->inline()
->columnSpanFull()
->options(ComponentStatusEnum::class)
->required(),
Forms\Components\MarkdownEditor::make('description')
+ ->label(__('Description'))
->maxLength(255)
->columnSpanFull(),
Forms\Components\Select::make('component_group_id')
@@ -39,6 +42,7 @@ public static function form(Form $form): Form
->preload()
->label(__('Component Group')),
Forms\Components\TextInput::make('link')
+ ->label(__('Link'))
->url()
->hint(__('An optional link to the component.')),
]),
@@ -57,28 +61,36 @@ public static function table(Table $table): Table
return $table
->columns([
Tables\Columns\TextColumn::make('name')
+ ->label(__('Name'))
->searchable(),
Tables\Columns\TextColumn::make('status')
+ ->label(__('Status'))
->badge()
->sortable(),
Tables\Columns\TextColumn::make('order')
+ ->label(__('Order'))
->numeric()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('group.name')
+ ->label(__('Group'))
->sortable(),
Tables\Columns\IconColumn::make('enabled')
+ ->label(__('Enabled'))
->boolean()
->toggleable(isToggledHiddenByDefault: false),
Tables\Columns\TextColumn::make('created_at')
+ ->label(__('Created at'))
->dateTime()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('updated_at')
+ ->label(__('Updated at'))
->dateTime()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('deleted_at')
+ ->label(__('Deleted at'))
->dateTime()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
@@ -118,6 +130,11 @@ public static function getLabel(): ?string
return __('Component');
}
+ public static function getPluralLabel(): ?string
+ {
+ return __('Components');
+ }
+
public static function getNavigationBadge(): ?string
{
return static::getModel()::outage()->count();
diff --git a/src/Filament/Resources/ComponentResource/RelationManagers/ComponentsRelationManager.php b/src/Filament/Resources/ComponentResource/RelationManagers/ComponentsRelationManager.php
index e1a613a9..dc8cd001 100644
--- a/src/Filament/Resources/ComponentResource/RelationManagers/ComponentsRelationManager.php
+++ b/src/Filament/Resources/ComponentResource/RelationManagers/ComponentsRelationManager.php
@@ -8,27 +8,37 @@
use Filament\Resources\RelationManagers\RelationManager;
use Filament\Tables;
use Filament\Tables\Table;
+use Illuminate\Database\Eloquent\Model;
class ComponentsRelationManager extends RelationManager
{
protected static string $relationship = 'components';
+ public static function getTitle(Model $ownerRecord, string $pageClass): string
+ {
+ return __('Components');
+ }
+
public function form(Form $form): Form
{
return $form
->schema([
Forms\Components\TextInput::make('name')
+ ->label(__('Name'))
->required()
->maxLength(255),
Forms\Components\ToggleButtons::make('status')
+ ->label(__('Status'))
->inline()
->columnSpanFull()
->options(ComponentStatusEnum::class)
->required(),
Forms\Components\MarkdownEditor::make('description')
+ ->label(__('Description'))
->maxLength(255)
->columnSpanFull(),
Forms\Components\TextInput::make('link')
+ ->label(__('Link'))
->url()
->hint(__('An optional link to the component.')),
]);
@@ -38,12 +48,17 @@ public function table(Table $table): Table
{
return $table
->recordTitleAttribute('name')
+ ->modelLabel(__('Component'))
+ ->pluralModelLabel(__('Components'))
->columns([
- Tables\Columns\TextColumn::make('name'),
+ Tables\Columns\TextColumn::make('name')
+ ->label(__('Name')),
Tables\Columns\TextColumn::make('status')
+ ->label(__('Status'))
->badge()
->sortable(),
Tables\Columns\IconColumn::make('enabled')
+ ->label(__('Enabled'))
->boolean()
->toggleable(isToggledHiddenByDefault: false),
])
diff --git a/src/Filament/Resources/IncidentResource.php b/src/Filament/Resources/IncidentResource.php
index 6f599b59..b8a0d9cd 100644
--- a/src/Filament/Resources/IncidentResource.php
+++ b/src/Filament/Resources/IncidentResource.php
@@ -30,19 +30,24 @@ public static function form(Form $form): Form
->schema([
Section::make()->schema([
Forms\Components\TextInput::make('name')
+ ->label(__('Name'))
->required()
->maxLength(255),
Forms\Components\ToggleButtons::make('status')
+ ->label(__('Status'))
->inline()
->columnSpanFull()
->options(IncidentStatusEnum::class)
->required(),
Forms\Components\MarkdownEditor::make('message')
+ ->label(__('Message'))
->required()
->columnSpanFull(),
Forms\Components\DateTimePicker::make('occurred_at')
+ ->label(__('Occurred at'))
->helperText(__('The incident\'s created timestamp will be used if left empty.')),
Forms\Components\ToggleButtons::make('visible')
+ ->label(__('Visible'))
->inline()
->options(ResourceVisibilityEnum::class)
->default(ResourceVisibilityEnum::guest)
@@ -85,17 +90,22 @@ public static function table(Table $table): Table
return $table
->columns([
Tables\Columns\TextColumn::make('name')
+ ->label(__('Name'))
->searchable(),
Tables\Columns\TextColumn::make('status')
+ ->label(__('Status'))
->sortable()
->badge(),
Tables\Columns\TextColumn::make('visible')
+ ->label(__('Visible'))
->sortable()
->badge(),
Tables\Columns\IconColumn::make('stickied')
+ ->label(__('Stickied'))
->toggleable(isToggledHiddenByDefault: true)
->boolean(),
Tables\Columns\TextColumn::make('occurred_at')
+ ->label(__('Occurred at'))
->dateTime()
->sortable(),
Tables\Columns\IconColumn::make('notifications')
@@ -103,14 +113,17 @@ public static function table(Table $table): Table
->boolean()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('created_at')
+ ->label(__('Created at'))
->dateTime()
->sortable()
->toggleable(isToggledHiddenByDefault: false),
Tables\Columns\TextColumn::make('updated_at')
+ ->label(__('Updated at'))
->dateTime()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('deleted_at')
+ ->label(__('Deleted at'))
->dateTime()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
@@ -118,6 +131,7 @@ public static function table(Table $table): Table
->filters([
Tables\Filters\TrashedFilter::make(),
Tables\Filters\SelectFilter::make('status')
+ ->label(__('Status'))
->options(IncidentStatusEnum::class),
])
->actions([
@@ -135,8 +149,11 @@ public static function table(Table $table): Table
->send();
})
->form([
- Forms\Components\MarkdownEditor::make('message')->required(),
+ Forms\Components\MarkdownEditor::make('message')
+ ->label(__('Message'))
+ ->required(),
Forms\Components\ToggleButtons::make('status')
+ ->label(__('Status'))
->options(IncidentStatusEnum::class)
->inline()
->required(),
@@ -177,6 +194,11 @@ public static function getLabel(): ?string
return __('Incident');
}
+ public static function getPluralLabel(): ?string
+ {
+ return __('Incidents');
+ }
+
public static function getNavigationBadge(): ?string
{
return static::getModel()::unresolved()->count();
diff --git a/src/Filament/Resources/IncidentResource/RelationManagers/ComponentsRelationManager.php b/src/Filament/Resources/IncidentResource/RelationManagers/ComponentsRelationManager.php
index cfa83f47..eb1cc85b 100644
--- a/src/Filament/Resources/IncidentResource/RelationManagers/ComponentsRelationManager.php
+++ b/src/Filament/Resources/IncidentResource/RelationManagers/ComponentsRelationManager.php
@@ -9,18 +9,26 @@
use Filament\Resources\RelationManagers\RelationManager;
use Filament\Tables;
use Filament\Tables\Table;
+use Illuminate\Database\Eloquent\Model;
class ComponentsRelationManager extends RelationManager
{
protected static string $relationship = 'components';
+ public static function getTitle(Model $ownerRecord, string $pageClass): string
+ {
+ return __('Components');
+ }
+
public function form(Form $form): Form
{
return $form
->schema([
Forms\Components\TextInput::make('name')
+ ->label(__('Name'))
->searchable(),
Forms\Components\ToggleButtons::make('status')
+ ->label(__('Status'))
->inline()
->options(ComponentStatusEnum::class)
->required(),
@@ -31,9 +39,13 @@ public function table(Table $table): Table
{
return $table
->recordTitleAttribute('name')
+ ->modelLabel(__('Component'))
+ ->pluralModelLabel(__('Components'))
->columns([
- Tables\Columns\TextColumn::make('name'),
+ Tables\Columns\TextColumn::make('name')
+ ->label(__('Name')),
Tables\Columns\TextColumn::make('status')
+ ->label(__('Status'))
->badge()
->sortable(),
])
@@ -45,6 +57,7 @@ public function table(Table $table): Table
->form(fn (Tables\Actions\AttachAction $action): array => [
$action->getRecordSelect(),
Forms\Components\ToggleButtons::make('status')
+ ->label(__('Status'))
->inline()
->columnSpanFull()
->options(ComponentStatusEnum::class)
diff --git a/src/Filament/Resources/IncidentResource/RelationManagers/IncidentUpdatesRelationManager.php b/src/Filament/Resources/IncidentResource/RelationManagers/IncidentUpdatesRelationManager.php
index 0ecf4155..6d360df2 100644
--- a/src/Filament/Resources/IncidentResource/RelationManagers/IncidentUpdatesRelationManager.php
+++ b/src/Filament/Resources/IncidentResource/RelationManagers/IncidentUpdatesRelationManager.php
@@ -8,38 +8,50 @@
use Filament\Resources\RelationManagers\RelationManager;
use Filament\Tables;
use Filament\Tables\Table;
+use Illuminate\Database\Eloquent\Model;
class IncidentUpdatesRelationManager extends RelationManager
{
protected static string $relationship = 'incidentUpdates';
+ public static function getTitle(Model $ownerRecord, string $pageClass): string
+ {
+ return __('Incident Updates');
+ }
+
public function form(Form $form): Form
{
return $form
->schema([
Forms\Components\MarkdownEditor::make('message')
+ ->label(__('Message'))
->required()
->columnSpanFull(),
Forms\Components\Select::make('user_id')
+ ->label(__('User'))
->hint(__('The user who reported the incident.'))
->relationship('user', 'name')
->searchable()
->preload()
->createOptionForm([
Forms\Components\TextInput::make('name')
+ ->label(__('Name'))
->required()
->maxLength(255),
Forms\Components\TextInput::make('email')
+ ->label(__('Email'))
->required()
->email()
->maxLength(255),
Forms\Components\TextInput::make('password')
+ ->label(__('Password'))
->required()
->password()
->confirmed()
->minLength(8),
]),
Forms\Components\ToggleButtons::make('status')
+ ->label(__('Status'))
->inline()
->columnSpanFull()
->options(IncidentStatusEnum::class)
@@ -51,26 +63,34 @@ public function table(Table $table): Table
{
return $table
->recordTitleAttribute('title')
+ ->modelLabel(__('Incident Update'))
+ ->pluralModelLabel(__('Incident Updates'))
->columns([
Tables\Columns\TextColumn::make('incident.name')
+ ->label(__('Incident'))
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('status')
+ ->label(__('Status'))
->badge()
->sortable(),
Tables\Columns\TextColumn::make('user.name')
+ ->label(__('User'))
->sortable(),
Tables\Columns\TextColumn::make('created_at')
+ ->label(__('Created at'))
->dateTime()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('updated_at')
+ ->label(__('Updated at'))
->dateTime()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
])
->filters([
Tables\Filters\SelectFilter::make('status')
+ ->label(__('Status'))
->options(IncidentStatusEnum::class),
])
->headerActions([
diff --git a/src/Filament/Resources/IncidentTemplateResource.php b/src/Filament/Resources/IncidentTemplateResource.php
index aca82950..b2bfe7d7 100644
--- a/src/Filament/Resources/IncidentTemplateResource.php
+++ b/src/Filament/Resources/IncidentTemplateResource.php
@@ -28,12 +28,15 @@ public static function form(Form $form): Form
->schema([
Forms\Components\Section::make()->columns(2)->schema([
Forms\Components\TextInput::make('name')
+ ->label(__('Name'))
->required()
->live(debounce: 250)
->afterStateUpdated(fn (Set $set, ?string $state) => $set('slug', Str::slug($state))),
Forms\Components\TextInput::make('slug')
+ ->label(__('Slug'))
->required(),
Forms\Components\Textarea::make('template')
+ ->label(__('Template'))
->hint(fn (Get $get) => new HtmlString(Blade::render(match ($get('engine')) {
IncidentTemplateEngineEnum::twig => '