Merge pull request 'Changed machine exporter logic' (#228) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s

Reviewed-on: #228
This commit was merged in pull request #228.
This commit is contained in:
2026-09-20 08:57:36 +00:00

View File

@@ -22,16 +22,16 @@ class MachineExporter 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('line.name')
->label('LINE'),
->label('LINE NAME'),
ExportColumn::make('name')
->label('MACHINE'),
->label('DESCRIPTION'),
ExportColumn::make('work_center')
->label('WORK CENTER'),
ExportColumn::make('workGroupMaster.name')
->label('WORK GROUP CENTER'),
->label('GROUP WORK CENTER'),
ExportColumn::make('created_at')
->label('CREATED AT'),
ExportColumn::make('updated_at')
@@ -44,10 +44,10 @@ class MachineExporter extends Exporter
public static function getCompletedNotificationBody(Export $export): string
{
$body = 'Your machine export has completed and ' . number_format($export->successful_rows) . ' ' . str('row')->plural($export->successful_rows) . ' exported.';
$body = 'Your machine 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;