feat(Category): add category
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
@extends('admin.layouts.app')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
@include('admin.layouts.errors')
|
||||
<div class="col-lg-8">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">افزودن دستهبندی رأی وحدت رویه</h4>
|
||||
<div>
|
||||
<form action="{{ route('judicial-precedent-category.store') }}" method="post">
|
||||
@csrf
|
||||
<div class="mb-4">
|
||||
<label for="name">نام دستهبندی</label>
|
||||
<input class="form-control" name="name" type="text" placeholder="نام دستهبندی" required>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary" type="submit">ذخیره</button>
|
||||
<a href="{{ route('judicial-precedent-category.index') }}" class="btn btn-secondary">بازگشت</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,44 @@
|
||||
@extends('admin.layouts.app')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
@include('admin.partial.list-filter', ['filterRoute' => 'judicial-precedent-category.index'])
|
||||
<div id="datatable_wrapper" class="dataTables_wrapper dt-bootstrap4 no-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<table id="datatable" class="table table-bordered dt-responsive nowrap dataTable no-footer dtr-inline" style="border-collapse: collapse; border-spacing: 0px; width: 100%;" role="grid" aria-describedby="datatable_info">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th>نام دستهبندی</th>
|
||||
<th>عملیات</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($categories as $category)
|
||||
<tr>
|
||||
<td>{{ $category->name }}</td>
|
||||
<td>
|
||||
<form action="{{ route('judicial-precedent-category.destroy', $category->id) }}" method="POST" style="display: inline;">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn btn-danger waves-effect waves-light" onclick="return confirm('آیا مطمئنید که میخواهید این دستهبندی را حذف کنید؟')">حذف</button>
|
||||
</form>
|
||||
<a href="{{route('judicial-precedent-category.edit',$category->id)}}" type="button" class="btn btn-primary waves-effect waves-light">ویرایش</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center mt-3">
|
||||
{{ $categories->withQueryString()->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,26 @@
|
||||
@extends('admin.layouts.app')
|
||||
@section('content')
|
||||
<div class="row">
|
||||
@include('admin.layouts.errors')
|
||||
<div class="col-lg-8">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">ویرایش دستهبندی رأی وحدت رویه</h4>
|
||||
<div>
|
||||
<form action="{{ route('judicial-precedent-category.update', $judicialPrecedentCategory->id) }}" method="post">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
<div class="mb-4">
|
||||
<label for="name">نام دستهبندی</label>
|
||||
<input class="form-control" name="name" type="text" value="{{ $judicialPrecedentCategory->name }}" placeholder="نام دستهبندی" required>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary" type="submit">بروزرسانی</button>
|
||||
<a href="{{ route('judicial-precedent-category.index') }}" class="btn btn-secondary">بازگشت</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -34,6 +34,16 @@
|
||||
<input class="form-control" name="issuing_authority" type="text" value="هیأت عمومی دیوان عالی کشور" placeholder="مرجع صادر کننده">
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="category_id">دستهبندی</label>
|
||||
<select class="form-control" name="category_id" id="category_id">
|
||||
<option value="">انتخاب دستهبندی</option>
|
||||
@foreach ($categories as $category)
|
||||
<option value="{{$category->id}}">{{$category->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="art_ids">مواد مرتبط</label>
|
||||
<select class="form-control" name="art_ids[]" id="art_ids" multiple size="10">
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<th>شماره رأی</th>
|
||||
<th>تاریخ صدور</th>
|
||||
<th>موضوع</th>
|
||||
<th>دستهبندی</th>
|
||||
<th>مرجع صادر کننده</th>
|
||||
<th>عملیات</th>
|
||||
</tr>
|
||||
@@ -24,6 +25,7 @@
|
||||
<td>{{ $precedent->ruling_number }}</td>
|
||||
<td>{{ $precedent->ruling_date }}</td>
|
||||
<td>{{ $precedent->subject }}</td>
|
||||
<td>{{ $precedent->category?->name }}</td>
|
||||
<td>{{ $precedent->issuing_authority }}</td>
|
||||
<td>
|
||||
<form action="{{ route('judicial-precedent.destroy', $precedent->id) }}" method="POST" style="display: inline;">
|
||||
|
||||
@@ -35,6 +35,16 @@
|
||||
<input class="form-control" name="issuing_authority" type="text" value="{{ $judicialPrecedent->issuing_authority }}" placeholder="مرجع صادر کننده">
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="category_id">دستهبندی</label>
|
||||
<select class="form-control" name="category_id" id="category_id">
|
||||
<option value="">انتخاب دستهبندی</option>
|
||||
@foreach ($categories as $category)
|
||||
<option value="{{$category->id}}" {{ $judicialPrecedent->category_id == $category->id ? 'selected' : '' }}>{{$category->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="art_ids">مواد مرتبط</label>
|
||||
<select class="form-control" name="art_ids[]" id="art_ids" multiple size="10">
|
||||
|
||||
Reference in New Issue
Block a user