Rename mrp column to zmm_mrp migration, model, resource, importer and exporter pages
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 26s
Laravel Pint / pint (pull_request) Failing after 41s
Laravel Larastan / larastan (pull_request) Failing after 8m51s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 26s
Laravel Pint / pint (pull_request) Failing after 41s
Laravel Larastan / larastan (pull_request) Failing after 8m51s
This commit is contained in:
@@ -14,6 +14,7 @@ class ItemCharacteristicExporter extends Exporter
|
||||
public static function getColumns(): array
|
||||
{
|
||||
static $rowNumber = 0;
|
||||
|
||||
return [
|
||||
ExportColumn::make('no')
|
||||
->label('NO')
|
||||
@@ -289,6 +290,8 @@ class ItemCharacteristicExporter extends Exporter
|
||||
->label('ZMM OPERATING TEMPERATURE'),
|
||||
ExportColumn::make('zmm_axial_force')
|
||||
->label('ZMM AXIAL FORCE'),
|
||||
ExportColumn::make('zmm_mrp')
|
||||
->label('ZMM MRP'),
|
||||
ExportColumn::make('zmm_1')
|
||||
->label('ZMM 1')
|
||||
->enabledByDefault(false),
|
||||
@@ -350,10 +353,10 @@ class ItemCharacteristicExporter extends Exporter
|
||||
|
||||
public static function getCompletedNotificationBody(Export $export): string
|
||||
{
|
||||
$body = 'Your item characteristic export has completed and ' . number_format($export->successful_rows) . ' ' . str('row')->plural($export->successful_rows) . ' exported.';
|
||||
$body = 'Your item characteristic 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;
|
||||
|
||||
@@ -556,7 +556,10 @@ class ItemCharacteristicImporter extends Importer
|
||||
->label('ZMM AXIAL FORCE')
|
||||
->exampleHeader('ZMM AXIAL FORCE')
|
||||
->example(''),
|
||||
ImportColumn::make('mrp'),
|
||||
ImportColumn::make('zmm_mrp')
|
||||
->label('ZMM MRP')
|
||||
->exampleHeader('ZMM MRP')
|
||||
->example(''),
|
||||
ImportColumn::make('zmm_1'),
|
||||
ImportColumn::make('zmm_2'),
|
||||
ImportColumn::make('zmm_3'),
|
||||
@@ -584,15 +587,15 @@ class ItemCharacteristicImporter extends Importer
|
||||
// 'email' => $this->data['email'],
|
||||
// ]);
|
||||
|
||||
return new ItemCharacteristic();
|
||||
return new ItemCharacteristic;
|
||||
}
|
||||
|
||||
public static function getCompletedNotificationBody(Import $import): string
|
||||
{
|
||||
$body = 'Your item characteristic import has completed and ' . number_format($import->successful_rows) . ' ' . str('row')->plural($import->successful_rows) . ' imported.';
|
||||
$body = 'Your item characteristic 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;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -145,7 +145,7 @@ class ItemCharacteristic extends Model
|
||||
'zmm_logo_eac',
|
||||
'zmm_operating_temperature',
|
||||
'zmm_axial_force',
|
||||
'mrp',
|
||||
'zmm_mrp',
|
||||
'zmm_1',
|
||||
'zmm_2',
|
||||
'zmm_3',
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('item_characteristics', function (Blueprint $table) {
|
||||
$table->renameColumn('mrp', 'zmm_mrp');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
// Schema::table('item_characteristics', function (Blueprint $table) {
|
||||
// //
|
||||
// });
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user