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