Added view rights against plant on import and export
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s

This commit is contained in:
dhanabalan
2026-01-13 16:05:25 +05:30
parent 4705b3aebb
commit ae954e2d7d
2 changed files with 55 additions and 51 deletions

View File

@@ -14,6 +14,7 @@ class GrMasterExporter extends Exporter
public static function getColumns(): array
{
static $rowNumber = 0;
return [
ExportColumn::make('no')
->label('NO')
@@ -21,36 +22,36 @@ class GrMasterExporter 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('item.code')
->label('ITEM'),
->label('ITEM CODE'),
ExportColumn::make('serial_number')
->label('SERIAL NUMBER'),
->label('SERIAL NUMBER'),
ExportColumn::make('gr_number')
->label('GR NUMBER'),
->label('GR NUMBER'),
ExportColumn::make('status')
->label('STATUS'),
->label('STATUS'),
ExportColumn::make('created_at')
->label('CREATED AT'),
->label('CREATED AT'),
ExportColumn::make('updated_at')
->label('UPDATED AT'),
->label('UPDATED AT'),
ExportColumn::make('created_by')
->label('CREATED BY'),
->label('CREATED BY'),
ExportColumn::make('updated_by')
->label('UPDATED BY'),
->label('UPDATED BY'),
ExportColumn::make('deleted_at')
->label('DELETED AT')
->enabledByDefault(false),
->label('DELETED AT')
->enabledByDefault(false),
];
}
public static function getCompletedNotificationBody(Export $export): string
{
$body = 'Your gr master export has completed and ' . number_format($export->successful_rows) . ' ' . str('row')->plural($export->successful_rows) . ' exported.';
$body = 'Your gr master 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;