This commit is contained in:
parent
0a5e21cd9a
commit
b22cc34379
@ -31,7 +31,7 @@
|
|||||||
{{-- ▼ ボタンエリア(上部) --}}
|
{{-- ▼ ボタンエリア(上部) --}}
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<button type="button" class="btn btn-default mt-2 btn-submit">登録</button>
|
<button type="button" class="btn btn-default mt-2 btn-submit">登録</button>
|
||||||
<a href="{{ route('reduction_confirm.index', ['park_id' => $park->park_id]) }}" class="btn btn-default mt-2">
|
<a href="{{ route('reduction_confirm.list', ['park_id' => $park->park_id]) }}" class="btn btn-default mt-2">
|
||||||
減免確認編集
|
減免確認編集
|
||||||
</a>
|
</a>
|
||||||
<a href="javascript:void(0)" class="btn btn-default mt-2">駐輪状況編集</a>
|
<a href="javascript:void(0)" class="btn btn-default mt-2">駐輪状況編集</a>
|
||||||
|
|||||||
@ -3,10 +3,12 @@
|
|||||||
// reduction_confirm テーブルから取得したレコード
|
// reduction_confirm テーブルから取得したレコード
|
||||||
$userCategoryId = $row->user_categoryid;
|
$userCategoryId = $row->user_categoryid;
|
||||||
$checkType = $row->reduction_confirm_type;
|
$checkType = $row->reduction_confirm_type;
|
||||||
$oldCheckType = old("reduction_confirm_type.$userCategoryId", $checkType);
|
// 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 === '学生';
|
$isStudent = ($row->usertype_subject1 ?? '') === '学生';
|
||||||
$rowClass = $isStudent ? 'table-secondary' : '';
|
$rowClass = $isStudent ? 'table-secondary' : '';
|
||||||
$isDisabled = $isStudent;
|
$isDisabled = $isStudent;
|
||||||
@endphp
|
@endphp
|
||||||
@ -17,17 +19,19 @@
|
|||||||
<td>{{ $row->usertype_subject2 ?? '-' }}</td>
|
<td>{{ $row->usertype_subject2 ?? '-' }}</td>
|
||||||
<td>{{ $row->usertype_subject3 ?? '-' }}</td>
|
<td>{{ $row->usertype_subject3 ?? '-' }}</td>
|
||||||
<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">
|
<div class="d-flex justify-content-center gap-3">
|
||||||
{{-- 確認しない(0) --}}
|
{{-- 確認しない(0) --}}
|
||||||
<div class="custom-control custom-radio">
|
<div class="custom-control custom-radio">
|
||||||
<input type="radio"
|
<input type="radio"
|
||||||
id="check_type_{{ $userCategoryId }}_0"
|
id="check_type_{{ $idx }}_0"
|
||||||
name="reduction_confirm_type[{{ $userCategoryId }}]"
|
name="reduction_confirm_type[{{ $idx }}]"
|
||||||
value="0"
|
value="0"
|
||||||
class="custom-control-input"
|
class="custom-control-input"
|
||||||
@checked($oldCheckType == 0)
|
@checked($oldCheckType == 0)
|
||||||
@disabled($isDisabled)>
|
@disabled($isDisabled)>
|
||||||
<label class="custom-control-label" for="check_type_{{ $userCategoryId }}_0">
|
<label class="custom-control-label" for="check_type_{{ $idx }}_0">
|
||||||
確認しない
|
確認しない
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@ -35,13 +39,13 @@
|
|||||||
{{-- 年1回(1) --}}
|
{{-- 年1回(1) --}}
|
||||||
<div class="custom-control custom-radio">
|
<div class="custom-control custom-radio">
|
||||||
<input type="radio"
|
<input type="radio"
|
||||||
id="check_type_{{ $userCategoryId }}_1"
|
id="check_type_{{ $idx }}_1"
|
||||||
name="reduction_confirm_type[{{ $userCategoryId }}]"
|
name="reduction_confirm_type[{{ $idx }}]"
|
||||||
value="1"
|
value="1"
|
||||||
class="custom-control-input"
|
class="custom-control-input"
|
||||||
@checked($oldCheckType == 1)
|
@checked($oldCheckType == 1)
|
||||||
@disabled($isDisabled)>
|
@disabled($isDisabled)>
|
||||||
<label class="custom-control-label" for="check_type_{{ $userCategoryId }}_1">
|
<label class="custom-control-label" for="check_type_{{ $idx }}_1">
|
||||||
年1回
|
年1回
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@ -49,13 +53,13 @@
|
|||||||
{{-- 毎更新時(2) --}}
|
{{-- 毎更新時(2) --}}
|
||||||
<div class="custom-control custom-radio">
|
<div class="custom-control custom-radio">
|
||||||
<input type="radio"
|
<input type="radio"
|
||||||
id="check_type_{{ $userCategoryId }}_2"
|
id="check_type_{{ $idx }}_2"
|
||||||
name="reduction_confirm_type[{{ $userCategoryId }}]"
|
name="reduction_confirm_type[{{ $idx }}]"
|
||||||
value="2"
|
value="2"
|
||||||
class="custom-control-input"
|
class="custom-control-input"
|
||||||
@checked($oldCheckType == 2)
|
@checked($oldCheckType == 2)
|
||||||
@disabled($isDisabled)>
|
@disabled($isDisabled)>
|
||||||
<label class="custom-control-label" for="check_type_{{ $userCategoryId }}_2">
|
<label class="custom-control-label" for="check_type_{{ $idx }}_2">
|
||||||
毎更新時
|
毎更新時
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -69,29 +69,28 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{{--
|
|
||||||
<div class="text-right mb-2">
|
|
||||||
全 {{ $list->total() }} 件中 {{ $list->firstItem() }}〜{{ $list->lastItem() }} 件を表示
|
|
||||||
</div>
|
|
||||||
<div class="ml-auto">
|
|
||||||
{{ $list->appends(keepUserListQuery())->links('pagination') }}
|
|
||||||
</div>
|
|
||||||
--}}
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 減免確認マスタ テーブル -->
|
<!-- 減免確認マスタ テーブル -->
|
||||||
|
|
||||||
<div class="col-lg-12 px-0 ">
|
<div class="col-lg-12 px-0 ">
|
||||||
<form action="{{ route('reduction_confirm.store') }}" method="POST" id="reduction-form">
|
<form action="{{ route('reduction_confirm.store') }}" method="POST" id="reduction-form">
|
||||||
{{-- 登録ボタン --}}
|
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||||
<div class="container-fluid mb20">
|
{{-- 左側:登録ボタン --}}
|
||||||
<button type="submit" class="btn btn-primary mt-2 btn-submit">登録</button>
|
<button type="submit" class="btn btn-primary btn-submit">登録</button>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
{{-- 右側:件数 + ページネーション --}}
|
||||||
|
<div class="text-right">
|
||||||
|
<div>
|
||||||
|
全 {{ $reductionData->total() }} 件中
|
||||||
|
{{ $reductionData->firstItem() }}〜{{ $reductionData->lastItem() }} 件を表示
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{{ $reductionData->appends(keepUserListQuery())->links('pagination') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@csrf
|
@csrf
|
||||||
<input type="hidden" name="park_id" value="{{ $parkId }}">
|
<input type="hidden" name="park_id" value="{{ $parkId }}">
|
||||||
|
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<thead class="thead-light">
|
<thead class="thead-light">
|
||||||
@ -105,7 +104,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@forelse ($reductionData as $row)
|
@forelse ($reductionData as $row)
|
||||||
@include('admin.reduction_confirm._form', ['row' => $row])
|
@include('admin.reduction_confirm._form', ['row' => $row, 'index' => $loop->index])
|
||||||
@empty
|
@empty
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="5" class="text-center text-muted">
|
<td colspan="5" class="text-center text-muted">
|
||||||
@ -118,7 +117,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@ -145,6 +143,7 @@
|
|||||||
width: fit-content;
|
width: fit-content;
|
||||||
min-width: 320px;
|
min-width: 320px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sample03-wrapper {
|
.sample03-wrapper {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user