Added default '-' for characteristic_name, current_value, update_value on quantity request type
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user