sigd/storage/framework/views/de98d42af76f5717ce473ea3163...

79 lines
5.0 KiB
PHP

<form action="<?php echo e(route('form.save', ['sector' => $form->sector, 'code' => $form->code])); ?>" method="POST">
<?php echo csrf_field(); ?>
<input type="hidden" name="inventoryYear" value="<?php echo e($inventoryYear); ?>">
<input type="hidden" name="instansi" value="<?php echo e($instansi); ?>">
<div class="table-responsive" style="overflow-x: auto;">
<table class="table table-bordered table-detail" style="min-width: 1095px;">
<thead class="bg-header text-white">
<tr>
<th style="width: 50px;">No.</th>
<th style="width: 100px;">Tahun</th>
<?php $__currentLoopData = $formDetails; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $detail): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php
$unitCode = $detail->unit_code;
$unitCategory = $unitsMap[$unitCode]->category ?? null;
?>
<th style="min-width: 150px;">
<?php echo e($detail->activity ? $detail->activity->name : 'N/A'); ?>
<br /><br />
<?php if($unitCategory): ?>
<select name="unit_code[<?php echo e($detail->activity_code); ?>]" class="form-control unit-code"
data-activity-code="<?php echo e($detail->activity_code); ?>"
data-current-unit="<?php echo e($unitCode); ?>">
<?php $__currentLoopData = $unitsByCategory[$unitCategory]; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $unit): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($unit->code); ?>"
<?php echo e($unit->code == $unitCode ? 'selected' : ''); ?>>
<?php echo e($unit->code); ?>
</option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<?php else: ?>
<?php echo e($unitCode); ?>
<?php endif; ?>
</th>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tr>
</thead>
<tbody>
<?php
$counter = 1;
$years = activityYearRange($inventoryYear);
?>
<?php $__currentLoopData = $years; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $year): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><?php echo e($counter); ?></td>
<td><?php echo e($year); ?></td>
<?php $__currentLoopData = $formDetails; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $detail): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php
$activity_value = isset($activityFormDetails[$year])
? $activityFormDetails[$year]
->where('activity_code', $detail->activity_code)
->where('activity_unit_code', $detail->unit_code)
->first()->activity_value ?? ''
: '';
?>
<td>
<input type="text"
name="data[<?php echo e($year); ?>][<?php echo e($detail->activity_code); ?>-<?php echo e($detail->unit_code); ?>]"
value="<?php echo e(getFormattedValue($activity_value) ?? ''); ?>"
class="form-control text-right" oninput="numberFormat(this)"
style="min-width: 80px;" <?php echo e($isLocked || $instansi === 'all' || $limitInternal ? 'readonly' : ''); ?>>
</td>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tr>
<?php
$counter++;
?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
<br />
<button type="submit" class="btn btn-primary" <?php echo e($isLocked || $instansi === 'all' || $limitInternal ? 'disabled' : ''); ?>>Simpan</button>
</form>
<?php /**PATH /var/www/sigd/resources/views/form/table.blade.php ENDPATH**/ ?>