This commit is contained in:
parent
aac63f7d0a
commit
fb6f23b374
@ -100,14 +100,20 @@
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-md-3 mb-2">
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary"
|
||||
style="width:120px;height:32px;"
|
||||
onclick="submitStatus('inprogress')">着手</button>
|
||||
<button type="submit"
|
||||
class="btn btn-sm btn-outline-secondary register"
|
||||
style="width:120px;height:32px;"
|
||||
onclick="document.getElementById('status-action').value='inprogress';">
|
||||
着手
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-3 mb-2">
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary"
|
||||
style="width:120px;height:32px;"
|
||||
onclick="submitStatus('done')">対応完了</button>
|
||||
<button type="submit"
|
||||
class="btn btn-sm btn-outline-secondary register"
|
||||
style="width:120px;height:32px;"
|
||||
onclick="document.getElementById('status-action').value='done';">
|
||||
対応完了
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-3 mb-2"></div>
|
||||
<div class="col-md-3 mb-2"></div>
|
||||
@ -255,16 +261,10 @@
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
function submitStatus(action){
|
||||
const checked = document.querySelectorAll('input[name="ids[]"]:checked');
|
||||
if(checked.length === 0){ alert('対象を選択してください。'); return; }
|
||||
document.getElementById('status-action').value = action;
|
||||
document.getElementById('status-form').submit();
|
||||
}
|
||||
// 全選択
|
||||
document.getElementById('select-all')?.addEventListener('change', function(){
|
||||
document.querySelectorAll('input[name="ids[]"]').forEach(cb => cb.checked = this.checked);
|
||||
document.getElementById('select-all')?.addEventListener('change', function () {
|
||||
document.querySelectorAll('input[name="ids[]"]').forEach(cb => cb.checked = this.checked);
|
||||
});
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
@endsection
|
||||
Loading…
Reference in New Issue
Block a user