update
parent
c17e738fbb
commit
9ec2b222f7
|
|
@ -1,42 +1,38 @@
|
|||
@extends('layouts.master')
|
||||
@section('content')
|
||||
<div class="flex flex-col gap-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="flex justify-between items-center">
|
||||
<h4 class="card-title">Data {{$title}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-1 overflow-y-auto p-8 custom-scrollbar">
|
||||
<div class="bg-white p-8 rounded-3xl border border-slate-200 shadow-sm overflow-hidden">
|
||||
<div class="overflow-x-auto">
|
||||
<form action="{{route($route.'.store')}}" method="POST" class="">
|
||||
{{csrf_field()}}
|
||||
<div class="p-6">
|
||||
<table class="gridjs-table"
|
||||
|
||||
<table class="w-full text-left border-collapse"
|
||||
data-toggle="table"
|
||||
data-search="false"
|
||||
data-show-refresh ="false"
|
||||
data-page-size="700">
|
||||
<thead class="gridjs-thead">
|
||||
<tr class="gridjs-tr bg-primary-light">
|
||||
<th width="20">#</th>
|
||||
<th>Menu</th>
|
||||
<th width="100"><label><input type="checkbox" class="checkread"> Read</label></th>
|
||||
<th width="100"><label><input type="checkbox" class="checkadd"> Create</label></th>
|
||||
<th width="100"><label><input type="checkbox" class="checkedit"> Update</label></th>
|
||||
<th width="100"><label><input type="checkbox" class="checkdel"> Delete</label></th>
|
||||
<th width="100"><label><input type="checkbox" class="checkdownload"> Download</label></th>
|
||||
<thead class="bg-slate-50/50 border-b border-slate-100">
|
||||
<tr>
|
||||
<th class="px-6 py-4 text-[10px] font-bold text-slate-400 uppercase tracking-widest" width="20">#</th>
|
||||
<th class="px-6 py-4 text-[10px] font-bold text-slate-400 uppercase tracking-widest" >Menu</th>
|
||||
<th class="px-6 py-4 text-[10px] font-bold text-slate-400 uppercase tracking-widest" width="100"><label><input type="checkbox" class="checkread"> Read</label></th>
|
||||
<th class="px-6 py-4 text-[10px] font-bold text-slate-400 uppercase tracking-widest" width="100"><label><input type="checkbox" class="checkadd"> Create</label></th>
|
||||
<th class="px-6 py-4 text-[10px] font-bold text-slate-400 uppercase tracking-widest" width="100"><label><input type="checkbox" class="checkedit"> Update</label></th>
|
||||
<th class="px-6 py-4 text-[10px] font-bold text-slate-400 uppercase tracking-widest" width="100"><label><input type="checkbox" class="checkdel"> Delete</label></th>
|
||||
<th class="px-6 py-4 text-[10px] font-bold text-slate-400 uppercase tracking-widest" width="100"><label><input type="checkbox" class="checkdownload"> Download</label></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($menu as $key1 => $parent)
|
||||
<tr>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500">
|
||||
<td class="px-6 py-4 text-[10px] font-bold text-slate-400 uppercase tracking-widest">
|
||||
@if(count($parent['level1']) > 0)
|
||||
<a href="javascript:;" class="show_detail" data-id="{{$parent['id']}}" data-status="1">
|
||||
<i id="parent{{$parent['id']}}" class="ri-subtract-line"></i>
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500">{{$parent['title']}}</td>
|
||||
<td class="px-6 py-4 text-[10px] font-bold text-slate-400 uppercase tracking-widest">{{$parent['title']}}</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_read[]"
|
||||
value="is_read+{{$parent['id']}}" @if($parent['checked']['is_read'] == 1) {{'checked'}} @endif>
|
||||
|
|
@ -62,7 +58,7 @@
|
|||
@if($parent['level1'])
|
||||
@foreach($parent['level1'] as $key2 => $level1)
|
||||
<tr class="parent_{{$parent['id']}} hide_child">
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500">
|
||||
<td class="px-6 py-4 text-[10px] font-bold text-slate-400 uppercase tracking-widest">
|
||||
@if(count($level1['level2']) > 0)<a href="javascript:;"
|
||||
class="show_detail"
|
||||
data-id="{{$level1['id']}}"
|
||||
|
|
@ -70,7 +66,7 @@
|
|||
id="parent{{$level1['id']}}"
|
||||
class="ri-subtract-line"></i></a>@endif
|
||||
</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500" style="text-indent:30px;">--- {{$level1['title']}}</td>
|
||||
<td class="px-6 py-4 text-[10px] font-bold text-slate-400 uppercase tracking-widest" style="text-indent:30px;">--- {{$level1['title']}}</td>
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500 text-center">
|
||||
<input type="checkbox" name="is_read[]" value="is_read+{{$level1['id']}}" @if($level1['checked']['is_read'] == 1) {{'checked'}} @endif>
|
||||
</td>
|
||||
|
|
@ -92,7 +88,7 @@
|
|||
@if($level1['level2'])
|
||||
@foreach($level1['level2'] as $key3 => $level2)
|
||||
<tr class="parent_{{$level1['id']}} hide_child">
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500">
|
||||
<td class="px-6 py-4 text-[10px] font-bold text-slate-400 uppercase tracking-widest">
|
||||
@if(count($level2['level3']) > 0)<a href="javascript:;"
|
||||
class="show_detail"
|
||||
data-id="{{$level2['id']}}"
|
||||
|
|
@ -120,7 +116,7 @@
|
|||
@if($level2['level3'])
|
||||
@foreach($level2['level3'] as $key4 => $level3)
|
||||
<tr class="parent_{{$level2['id']}} hide_child">
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500">
|
||||
<td class="px-6 py-4 text-[10px] font-bold text-slate-400 uppercase tracking-widest">
|
||||
@if(count($level3['level4']) > 0)<a href="javascript:;"
|
||||
class="show_detail"
|
||||
data-id="{{$level3['id']}}"
|
||||
|
|
@ -148,7 +144,7 @@
|
|||
@if($level3['level4'])
|
||||
@foreach($level3['level4'] as $key5 => $level4)
|
||||
<tr class="parent_{{$level3['id']}} hide_child">
|
||||
<td class="gridjs-td gridjs-th text-sm text-gray-500">
|
||||
<td class="px-6 py-4 text-[10px] font-bold text-slate-400 uppercase tracking-widest">
|
||||
<span style="color: #7F8FA4">{{$level4['id']}}</span>
|
||||
</td>
|
||||
<td style="text-indent: 130px">------------ {{$level4['title']}}</td>
|
||||
|
|
@ -180,14 +176,14 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" name="group_id" value="{{encode_id(@$id)}}">
|
||||
</div>
|
||||
<div class="p-6">
|
||||
<div class="flex justify-center justify-items-center mt-2">
|
||||
<a href="{{route('modules.management.role.index')}}" class="btn text-white bg-danger"><i class="ri-close-line"></i> Batal</a>
|
||||
<button class="btn text-white bg-success"><i class="ri-save-line"></i> Simpan</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@section('js')
|
||||
<script type="text/javascript">
|
||||
|
|
|
|||
Loading…
Reference in New Issue