Added mfm parameter exporter file
This commit is contained in:
@@ -13,20 +13,37 @@ class MfmParameterExporter extends Exporter
|
||||
|
||||
public static function getColumns(): array
|
||||
{
|
||||
static $rowNumber = 0;
|
||||
return [
|
||||
ExportColumn::make('id')
|
||||
->label('ID'),
|
||||
ExportColumn::make('plant.name'),
|
||||
ExportColumn::make('name'),
|
||||
ExportColumn::make('register_id'),
|
||||
ExportColumn::make('identifier'),
|
||||
ExportColumn::make('byte_to_convert'),
|
||||
ExportColumn::make('type_to_convert'),
|
||||
ExportColumn::make('decimal_to_display'),
|
||||
ExportColumn::make('created_at'),
|
||||
ExportColumn::make('updated_at'),
|
||||
ExportColumn::make('deleted_at'),
|
||||
ExportColumn::make('mfmMeter.name'),
|
||||
ExportColumn::make('no')
|
||||
->label('NO')
|
||||
->state(function ($record) use (&$rowNumber) {
|
||||
// Increment and return the row number
|
||||
return ++$rowNumber;
|
||||
}),
|
||||
ExportColumn::make('plant.name')
|
||||
->label('PLANT'),
|
||||
ExportColumn::make('name')
|
||||
->label('NAME'),
|
||||
ExportColumn::make('mfmMeter.name')
|
||||
->label('MFM METER'),
|
||||
ExportColumn::make('register_id')
|
||||
->label('REGISTER ID'),
|
||||
ExportColumn::make('identifier')
|
||||
->label('IDENTIFIER'),
|
||||
ExportColumn::make('byte_to_convert')
|
||||
->label('BYTE TO CONVERT'),
|
||||
ExportColumn::make('type_to_convert')
|
||||
->label('TYPE TO CONVERT'),
|
||||
ExportColumn::make('decimal_to_display')
|
||||
->label('DECIMAL TO DISPLAY'),
|
||||
ExportColumn::make('created_at')
|
||||
->label('CREATED AT'),
|
||||
ExportColumn::make('updated_at')
|
||||
->label('UPDATED AT'),
|
||||
ExportColumn::make('deleted_at')
|
||||
->label('DELETED AT'),
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user