65 lines
2.7 KiB
PHP
65 lines
2.7 KiB
PHP
{{-- 減免確認マスタテーブル行(各利用者分類) --}}
|
||
@php
|
||
// reduction_confirm テーブルから取得したレコード
|
||
$userCategoryId = $row->user_categoryid;
|
||
$checkType = $row->reduction_confirm_type;
|
||
$oldCheckType = old("reduction_confirm_type.$userCategoryId", $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>
|
||
<div class="d-flex justify-content-center gap-3">
|
||
{{-- 確認しない(0) --}}
|
||
<div class="custom-control custom-radio">
|
||
<input type="radio"
|
||
id="check_type_{{ $userCategoryId }}_0"
|
||
name="reduction_confirm_type[{{ $userCategoryId }}]"
|
||
value="0"
|
||
class="custom-control-input"
|
||
@checked($oldCheckType == 0)
|
||
@disabled($isDisabled)>
|
||
<label class="custom-control-label" for="check_type_{{ $userCategoryId }}_0">
|
||
確認しない
|
||
</label>
|
||
</div>
|
||
|
||
{{-- 年1回(1) --}}
|
||
<div class="custom-control custom-radio">
|
||
<input type="radio"
|
||
id="check_type_{{ $userCategoryId }}_1"
|
||
name="reduction_confirm_type[{{ $userCategoryId }}]"
|
||
value="1"
|
||
class="custom-control-input"
|
||
@checked($oldCheckType == 1)
|
||
@disabled($isDisabled)>
|
||
<label class="custom-control-label" for="check_type_{{ $userCategoryId }}_1">
|
||
年1回
|
||
</label>
|
||
</div>
|
||
|
||
{{-- 毎更新時(2) --}}
|
||
<div class="custom-control custom-radio">
|
||
<input type="radio"
|
||
id="check_type_{{ $userCategoryId }}_2"
|
||
name="reduction_confirm_type[{{ $userCategoryId }}]"
|
||
value="2"
|
||
class="custom-control-input"
|
||
@checked($oldCheckType == 2)
|
||
@disabled($isDisabled)>
|
||
<label class="custom-control-label" for="check_type_{{ $userCategoryId }}_2">
|
||
毎更新時
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</td>
|
||
</tr>
|