Added plant code instead of plant name on import and export
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s

This commit is contained in:
dhanabalan
2026-01-13 16:19:20 +05:30
parent 1e57326e8e
commit 5a218d688d
2 changed files with 31 additions and 24 deletions

View File

@@ -24,26 +24,27 @@ class BlockExporter extends Exporter
// Increment and return the row number
return ++$rowNumber;
}),
ExportColumn::make('plant.name')
->label('PLANT'),
ExportColumn::make('plant.code')
->label('PLANT CODE'),
ExportColumn::make('name')
->label('NAME'),
->label('BLOCK NAME'),
ExportColumn::make('created_at')
->label('CREATED AT'),
ExportColumn::make('updated_at')
->label('UPDATED AT'),
->label('UPDATED AT')
->enabledByDefault(true),
ExportColumn::make('deleted_at')
->enabledByDefault(false)
->label('DELETED AT'),
->label('DELETED AT')
->enabledByDefault(false),
];
}
public static function getCompletedNotificationBody(Export $export): string
{
$body = 'Your block export has completed and ' . number_format($export->successful_rows) . ' ' . str('row')->plural($export->successful_rows) . ' exported.';
$body = 'Your block export has completed and '.number_format($export->successful_rows).' '.str('row')->plural($export->successful_rows).' exported.';
if ($failedRowsCount = $export->getFailedRowsCount()) {
$body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to export.';
$body .= ' '.number_format($failedRowsCount).' '.str('row')->plural($failedRowsCount).' failed to export.';
}
return $body;