Added mfm parameter exporter file
This commit is contained in:
@@ -13,20 +13,37 @@ class MfmParameterExporter extends Exporter
|
|||||||
|
|
||||||
public static function getColumns(): array
|
public static function getColumns(): array
|
||||||
{
|
{
|
||||||
|
static $rowNumber = 0;
|
||||||
return [
|
return [
|
||||||
ExportColumn::make('id')
|
ExportColumn::make('no')
|
||||||
->label('ID'),
|
->label('NO')
|
||||||
ExportColumn::make('plant.name'),
|
->state(function ($record) use (&$rowNumber) {
|
||||||
ExportColumn::make('name'),
|
// Increment and return the row number
|
||||||
ExportColumn::make('register_id'),
|
return ++$rowNumber;
|
||||||
ExportColumn::make('identifier'),
|
}),
|
||||||
ExportColumn::make('byte_to_convert'),
|
ExportColumn::make('plant.name')
|
||||||
ExportColumn::make('type_to_convert'),
|
->label('PLANT'),
|
||||||
ExportColumn::make('decimal_to_display'),
|
ExportColumn::make('name')
|
||||||
ExportColumn::make('created_at'),
|
->label('NAME'),
|
||||||
ExportColumn::make('updated_at'),
|
ExportColumn::make('mfmMeter.name')
|
||||||
ExportColumn::make('deleted_at'),
|
->label('MFM METER'),
|
||||||
ExportColumn::make('mfmMeter.name'),
|
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