From 21ffd1763e459c39c5f6c480905b192247695501 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Wed, 11 Feb 2026 14:30:30 +0530 Subject: [PATCH] Added default '-' for characteristic_name, current_value, update_value on quantity request type --- .../RequestCharacteristicResource.php | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/app/Filament/Resources/RequestCharacteristicResource.php b/app/Filament/Resources/RequestCharacteristicResource.php index 2cb0915..0a1903a 100644 --- a/app/Filament/Resources/RequestCharacteristicResource.php +++ b/app/Filament/Resources/RequestCharacteristicResource.php @@ -910,6 +910,7 @@ class RequestCharacteristicResource extends Resource ->sortable(), Tables\Columns\TextColumn::make('characteristic_name') ->label('Characteristic Name') + ->default('-') ->alignCenter() ->searchable() ->formatStateUsing(fn (string $state): string => strtoupper(__($state))) @@ -917,13 +918,21 @@ class RequestCharacteristicResource extends Resource ->sortable(), Tables\Columns\TextColumn::make('current_value') ->label('Current Value') + ->default('-') ->alignCenter() ->searchable() + ->formatStateUsing(function ($record) { + return empty($record->characteristic_name) ? '-' : $record->current_value; + }) ->sortable(), Tables\Columns\TextColumn::make('update_value') ->label('Update Value') + ->default('-') ->alignCenter() ->searchable() + ->formatStateUsing(function ($record) { + return empty($record->characteristic_name) ? '-' : $record->update_value; + }) ->sortable(), Tables\Columns\TextColumn::make('characteristicApproverMaster.name1') ->label('Approver Name 1') @@ -1011,8 +1020,21 @@ class RequestCharacteristicResource extends Resource ->sortable(), Tables\Columns\TextColumn::make('mail_status') ->label('Mail Status') + ->default('-') ->alignCenter() ->searchable() + ->formatStateUsing(function ($state) { + if (! $state || $state == '' || $state == null) { + return '-'; + } + + return match ($state) { + 'Sent' => 'Sent-Mail1', + 'Sent-Mail2' => 'Sent-Mail2', + 'Sent-Mail3' => 'Sent-Mail3', + default => '-', + }; + }) ->sortable() ->toggleable(isToggledHiddenByDefault: true), Tables\Columns\TextColumn::make('trigger_at')