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 13s

This commit is contained in:
dhanabalan
2026-01-13 16:13:00 +05:30
parent 79a09e3a59
commit 49ab5b14ed
2 changed files with 64 additions and 62 deletions

View File

@@ -16,10 +16,10 @@ class EbReadingImporter extends Importer
return [
ImportColumn::make('plant')
->requiredMapping()
->exampleHeader('Plant Name')
->example('Ransar Industries-I')
->label('Plant Name')
->relationship(resolveUsing:'name')
->exampleHeader('Plant Code')
->example('1000')
->label('Plant Code')
->relationship(resolveUsing: 'code')
->rules(['required']),
ImportColumn::make('lcd_segment_check')
->label('LCD Segment Check')
@@ -227,15 +227,15 @@ class EbReadingImporter extends Importer
// 'email' => $this->data['email'],
// ]);
return new EbReading();
return new EbReading;
}
public static function getCompletedNotificationBody(Import $import): string
{
$body = 'Your eb reading import has completed and ' . number_format($import->successful_rows) . ' ' . str('row')->plural($import->successful_rows) . ' imported.';
$body = 'Your eb reading import has completed and '.number_format($import->successful_rows).' '.str('row')->plural($import->successful_rows).' imported.';
if ($failedRowsCount = $import->getFailedRowsCount()) {
$body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to import.';
$body .= ' '.number_format($failedRowsCount).' '.str('row')->plural($failedRowsCount).' failed to import.';
}
return $body;