Update plant column references in ConfigurationExporter and ConfigurationImporter to use 'code' instead of 'name'
This commit is contained in:
@@ -22,7 +22,7 @@ class ConfigurationExporter extends Exporter
|
|||||||
// Increment and return the row number
|
// Increment and return the row number
|
||||||
return ++$rowNumber;
|
return ++$rowNumber;
|
||||||
}),
|
}),
|
||||||
ExportColumn::make('plant.name')
|
ExportColumn::make('plant.code')
|
||||||
->label('PLANT'),
|
->label('PLANT'),
|
||||||
ExportColumn::make('line.name')
|
ExportColumn::make('line.name')
|
||||||
->label('LINE'),
|
->label('LINE'),
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ class ConfigurationImporter extends Importer
|
|||||||
->rules(['required']),
|
->rules(['required']),
|
||||||
ImportColumn::make('plant')
|
ImportColumn::make('plant')
|
||||||
->requiredMapping()
|
->requiredMapping()
|
||||||
->relationship(resolveUsing: 'name')
|
->relationship(resolveUsing: 'code')
|
||||||
->exampleHeader('Plant')
|
->exampleHeader('Plant')
|
||||||
->example(['Ransar Industries-I'])
|
->example(['1000'])
|
||||||
->label('Plant')
|
->label('Plant')
|
||||||
->rules(['required']),
|
->rules(['required']),
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user