dateTimeFormat function commented
This commit is contained in:
73
app/Filament/Exports/InvoiceValidationExporter.php
Normal file
73
app/Filament/Exports/InvoiceValidationExporter.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Exports;
|
||||
|
||||
use App\Models\InvoiceValidation;
|
||||
use Filament\Actions\Exports\ExportColumn;
|
||||
use Filament\Actions\Exports\Exporter;
|
||||
use Filament\Actions\Exports\Models\Export;
|
||||
|
||||
class InvoiceValidationExporter extends Exporter
|
||||
{
|
||||
protected static ?string $model = InvoiceValidation::class;
|
||||
|
||||
public static function getColumns(): array
|
||||
{
|
||||
return [
|
||||
ExportColumn::make('id')
|
||||
->label('ID'),
|
||||
ExportColumn::make('stickerMaster.item.code')
|
||||
->label('Item Code'),
|
||||
ExportColumn::make('plant.name')
|
||||
->label('Plant'),
|
||||
ExportColumn::make('invoice_number')
|
||||
->label('Invoice Number'),
|
||||
ExportColumn::make('serial_number')
|
||||
->label('Serial Number'),
|
||||
ExportColumn::make('motor_scanned_status')
|
||||
->label('Motor Scanned Status'),
|
||||
ExportColumn::make('pump_scanned_status')
|
||||
->label('Pump Scanned Status'),
|
||||
ExportColumn::make('capacitor_scanned_status')
|
||||
->label('Capacitor Scanned Status'),
|
||||
ExportColumn::make('scanned_status_set')
|
||||
->label('Scanned Status Set'),
|
||||
ExportColumn::make('scanned_status')
|
||||
->label('Scanned Status'),
|
||||
ExportColumn::make('panel_box_supplier')
|
||||
->label('Panel Box Supplier'),
|
||||
ExportColumn::make('panel_box_serial_number')
|
||||
->label('Panel Box Serial Number'),
|
||||
ExportColumn::make('load_rate')
|
||||
->label('Load Rate'),
|
||||
ExportColumn::make('upload_status')
|
||||
->label('Upload Status'),
|
||||
ExportColumn::make('batch_number')
|
||||
->label('Batch Number'),
|
||||
ExportColumn::make('quantity')
|
||||
->label('Quantity'),
|
||||
ExportColumn::make('created_at')
|
||||
->label('Created At'),
|
||||
//->dateTimeFormat('d-m-Y H:i:s'),
|
||||
ExportColumn::make('updated_at')
|
||||
->label('Updated At'),
|
||||
//->dateTimeFormat('d-m-Y H:i:s'),
|
||||
ExportColumn::make('deleted_at')
|
||||
->label('Deleted At'),
|
||||
//->dateTimeFormat('d-m-Y H:i:s'),
|
||||
ExportColumn::make('operator_id')
|
||||
->label('Operator ID'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function getCompletedNotificationBody(Export $export): string
|
||||
{
|
||||
$body = 'Your invoice validation 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user