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(),
|
->sortable(),
|
||||||
Tables\Columns\TextColumn::make('characteristic_name')
|
Tables\Columns\TextColumn::make('characteristic_name')
|
||||||
->label('Characteristic Name')
|
->label('Characteristic Name')
|
||||||
|
->default('-')
|
||||||
->alignCenter()
|
->alignCenter()
|
||||||
->searchable()
|
->searchable()
|
||||||
->formatStateUsing(fn (string $state): string => strtoupper(__($state)))
|
->formatStateUsing(fn (string $state): string => strtoupper(__($state)))
|
||||||
@@ -917,13 +918,21 @@ class RequestCharacteristicResource extends Resource
|
|||||||
->sortable(),
|
->sortable(),
|
||||||
Tables\Columns\TextColumn::make('current_value')
|
Tables\Columns\TextColumn::make('current_value')
|
||||||
->label('Current Value')
|
->label('Current Value')
|
||||||
|
->default('-')
|
||||||
->alignCenter()
|
->alignCenter()
|
||||||
->searchable()
|
->searchable()
|
||||||
|
->formatStateUsing(function ($record) {
|
||||||
|
return empty($record->characteristic_name) ? '-' : $record->current_value;
|
||||||
|
})
|
||||||
->sortable(),
|
->sortable(),
|
||||||
Tables\Columns\TextColumn::make('update_value')
|
Tables\Columns\TextColumn::make('update_value')
|
||||||
->label('Update Value')
|
->label('Update Value')
|
||||||
|
->default('-')
|
||||||
->alignCenter()
|
->alignCenter()
|
||||||
->searchable()
|
->searchable()
|
||||||
|
->formatStateUsing(function ($record) {
|
||||||
|
return empty($record->characteristic_name) ? '-' : $record->update_value;
|
||||||
|
})
|
||||||
->sortable(),
|
->sortable(),
|
||||||
Tables\Columns\TextColumn::make('characteristicApproverMaster.name1')
|
Tables\Columns\TextColumn::make('characteristicApproverMaster.name1')
|
||||||
->label('Approver Name 1')
|
->label('Approver Name 1')
|
||||||
@@ -1011,8 +1020,21 @@ class RequestCharacteristicResource extends Resource
|
|||||||
->sortable(),
|
->sortable(),
|
||||||
Tables\Columns\TextColumn::make('mail_status')
|
Tables\Columns\TextColumn::make('mail_status')
|
||||||
->label('Mail Status')
|
->label('Mail Status')
|
||||||
|
->default('-')
|
||||||
->alignCenter()
|
->alignCenter()
|
||||||
->searchable()
|
->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()
|
->sortable()
|
||||||
->toggleable(isToggledHiddenByDefault: true),
|
->toggleable(isToggledHiddenByDefault: true),
|
||||||
Tables\Columns\TextColumn::make('trigger_at')
|
Tables\Columns\TextColumn::make('trigger_at')
|
||||||
|
|||||||
Reference in New Issue
Block a user