update
parent
072863cfa7
commit
cc2e96ef15
|
|
@ -95,6 +95,7 @@ class FormController implements HasMiddleware
|
|||
$allUnits = ReferenceUnit::rowActive()->get();
|
||||
$unitsMap = $allUnits->keyBy('code');
|
||||
$unitsByCategory = $allUnits->groupBy('category');
|
||||
dd($unitsByCategory);
|
||||
|
||||
// For Copy data feature
|
||||
// $availableYears = ActivityForm::select('inventory_year')->distinct()
|
||||
|
|
|
|||
|
|
@ -71,7 +71,12 @@
|
|||
data-current-unit="{{ $unitCode }}">
|
||||
@if (@$unitsByCategory[$unitCategory])
|
||||
@foreach (@$unitsByCategory[$unitCategory] as $unit)
|
||||
|
||||
@if($unit->code == $unitCode)
|
||||
<option value="{{ $unit->code }}"
|
||||
{{ $unit->code == $unitCode ? 'selected' : '' }}>
|
||||
{{ $unit->code }}
|
||||
</option>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue