label('ID'), ExportColumn::make('no') ->label('NO') ->state(function ($record) use (&$rowNumber) { // Increment and return the row number return ++$rowNumber; }), ExportColumn::make('plant.code') ->label('PLANT CODE'), ExportColumn::make('machine.work_center') ->label('WORK CENTER'), ExportColumn::make('machine_name') ->label('MACHINE NAME'), ExportColumn::make('has_stop_flow_id') ->label('HAS STOP FLOW ID'), ExportColumn::make('item.code') ->label('ITEM CODE'), ExportColumn::make('aufnr') ->label('JOB NUMBER'), ExportColumn::make('gernr') ->label('SERIAL NUMBER'), ExportColumn::make('zmm_heading') ->label('ZMM HEADING'), ExportColumn::make('winded_serial_number') ->label('WINDED SERIAL NUMBER'), ExportColumn::make('model_type') ->label('MODEL TYPE'), ExportColumn::make('characteristic_field') ->label('MASTER CHARACTERISTIC FIELD'), ExportColumn::make('samlight_logged_name') ->label('SAMLIGHT LOGGED NAME'), ExportColumn::make('stopped_at') ->label('STOPPED AT'), ExportColumn::make('stopped_by') ->label('STOPPED BY'), ExportColumn::make('has_stop_flow_id') ->label('HAS STOP FLOW ID'), ExportColumn::make('created_at') ->label('CREATED AT'), ExportColumn::make('created_by') ->label('CREATED BY'), ExportColumn::make('updated_at') ->label('UPDATED AT'), ExportColumn::make('updated_by') ->label('UPDATED BY'), ExportColumn::make('deleted_at') ->enabledByDefault(false) ->label('DELETED AT'), ]; } public static function getCompletedNotificationBody(Export $export): string { $body = 'Your temp stop characteristic resource 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.'; } return $body; } }