krgm.so-manager-dev.com/resources/views/admin/reduction_confirm/_form.blade.php
OU.ZAIKOU b22cc34379
All checks were successful
Deploy main / deploy (push) Successful in 22s
【減免確認マスタ】ページネーション追加
2026-02-01 03:02:59 +09:00

69 lines
2.9 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{-- 減免確認マスタテーブル行(各利用者分類) --}}
@php
// reduction_confirm テーブルから取得したレコード
$userCategoryId = $row->user_categoryid;
$checkType = $row->reduction_confirm_type;
// use numeric index passed from parent to avoid name collisions when duplicate user_categoryid exist
$idx = $index ?? ($userCategoryId);
$oldCheckType = old("reduction_confirm_type.$idx", $checkType);
// 学生分類かどうかを判定
$isStudent = ($row->usertype_subject1 ?? '') === '学生';
$rowClass = $isStudent ? 'table-secondary' : '';
$isDisabled = $isStudent;
@endphp
<tr class="{{ $rowClass }}">
<td class="text-center">{{ $userCategoryId }}</td>
<td>{{ $row->usertype_subject1 ?? '-' }}</td>
<td>{{ $row->usertype_subject2 ?? '-' }}</td>
<td>{{ $row->usertype_subject3 ?? '-' }}</td>
<td>
{{-- hidden mapping to know which user_categoryid this input row targets --}}
<input type="hidden" name="row_user_categoryid[{{ $idx }}]" value="{{ $userCategoryId }}">
<div class="d-flex justify-content-center gap-3">
{{-- 確認しない0 --}}
<div class="custom-control custom-radio">
<input type="radio"
id="check_type_{{ $idx }}_0"
name="reduction_confirm_type[{{ $idx }}]"
value="0"
class="custom-control-input"
@checked($oldCheckType == 0)
@disabled($isDisabled)>
<label class="custom-control-label" for="check_type_{{ $idx }}_0">
確認しない
</label>
</div>
{{-- 年1回1 --}}
<div class="custom-control custom-radio">
<input type="radio"
id="check_type_{{ $idx }}_1"
name="reduction_confirm_type[{{ $idx }}]"
value="1"
class="custom-control-input"
@checked($oldCheckType == 1)
@disabled($isDisabled)>
<label class="custom-control-label" for="check_type_{{ $idx }}_1">
年1回
</label>
</div>
{{-- 毎更新時2 --}}
<div class="custom-control custom-radio">
<input type="radio"
id="check_type_{{ $idx }}_2"
name="reduction_confirm_type[{{ $idx }}]"
value="2"
class="custom-control-input"
@checked($oldCheckType == 2)
@disabled($isDisabled)>
<label class="custom-control-label" for="check_type_{{ $idx }}_2">
毎更新時
</label>
</div>
</div>
</td>
</tr>