36 lines
1.3 KiB
Markdown
36 lines
1.3 KiB
Markdown
# Inspection History - Special Modules Guide
|
|
|
|
Some modules, like `spool-area-release`, do not define their columns in the standard `$blockGroup` array within their blade file. This causes the "Get Columns" feature in Inspection History Management to return "No specific columns found".
|
|
|
|
To support these modules, we must manually define their columns in logic.
|
|
|
|
## How to Add a Special Module
|
|
|
|
1. Open `resources/views/admin/type/settings/inspection-history-management.blade.php`.
|
|
2. Locate the `getModuleColumns($slug)` function.
|
|
3. Add a check for your module slug at the beginning of the function.
|
|
4. Return an array of column names available in that module.
|
|
|
|
### Example
|
|
|
|
```php
|
|
function getModuleColumns($slug) {
|
|
if (!$slug) return [];
|
|
|
|
// Special handling for Spool Area / Release
|
|
if ($slug === 'spool-area-release') {
|
|
return [
|
|
'spool_zone',
|
|
'project',
|
|
'iso_number',
|
|
// ... add all relevant columns
|
|
];
|
|
}
|
|
|
|
// ... standard parsing logic
|
|
}
|
|
```
|
|
|
|
## Why is this necessary?
|
|
The standard parsing parser reads the `$blockGroup` array from the module's blade file (`resources/views/admin/type/{slug}.blade.php`). Specialized modules often build their grids dynamically using JavaScript or custom queries (`weld_logs` table), bypassing the standard `$blockGroup` definition.
|