first change
This commit is contained in:
16
Modules/PMS/resources/views/task-category/create.blade.php
Normal file
16
Modules/PMS/resources/views/task-category/create.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
|
||||
<x-dashboard.breadcumb :title="$title" />
|
||||
|
||||
|
||||
{{ html()->form('POST')->route('taskCategory.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
|
||||
@include('pms::task-category.partials.action')
|
||||
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
11
Modules/PMS/resources/views/task-category/edit.blade.php
Normal file
11
Modules/PMS/resources/views/task-category/edit.blade.php
Normal file
@@ -0,0 +1,11 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<x-dashboard.breadcumb :title="$title" />
|
||||
|
||||
{{ html()->modelForm($taskCategory, 'PUT')->route('taskCategory.update', $taskCategory->id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
@include('pms::task-category.partials.action')
|
||||
{{ html()->form()->close() }}
|
||||
|
||||
</div>
|
||||
@endsection
|
59
Modules/PMS/resources/views/task-category/index.blade.php
Normal file
59
Modules/PMS/resources/views/task-category/index.blade.php
Normal file
@@ -0,0 +1,59 @@
|
||||
@extends('layouts.app')
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
|
||||
<x-dashboard.breadcumb :title="$title" />
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header align-items-center d-flex">
|
||||
<h5 class="card-title flex-grow-1 mb-0">{{ $title }}</h5>
|
||||
<div class="flex-shrink-0">
|
||||
<a href="{{ route('taskCategory.create') }}" class="btn btn-success waves-effect waves-light"><i
|
||||
class="ri-add-fill me-1 align-bottom"></i> Create Task Category</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table id="buttons-datatables" class="display table-sm table-bordered table">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th class="tb-col"><span class="overline-title">S.N</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Title</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Description</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Status</span></th>
|
||||
<th class="tb-col" data-sortable="false"><span class="overline-title">Action</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($taskCategoryLists as $index => $item)
|
||||
<tr>
|
||||
<td class="tb-col">{{ $index + 1 }}</td>
|
||||
<td class="tb-col">{{ $item->title }}</td>
|
||||
<td class="tb-col">{{ $item->desc }}</td>
|
||||
<td class="tb-col">{!! $item->status_name !!}</td>
|
||||
<td class="tb-col">
|
||||
<div class="hstack flex-wrap gap-3">
|
||||
<a href="{{ route('taskCategory.show', $item->id) }}" class="link-info fs-15"><i
|
||||
class="ri-eye-fill"></i></a>
|
||||
@can('taskCategory.edit')
|
||||
<a href="{{ route('taskCategory.edit', $item->id) }}" class="link-success fs-15 edit-item-btn"><i
|
||||
class="ri-edit-2-fill"></i></a>
|
||||
@endcan
|
||||
|
||||
@can('taskCategory.destroy')
|
||||
<a href="javascript:void(0);" data-link="{{ route('taskCategory.destroy', $item->id) }}"
|
||||
data-id="{{ $item->id }}" class="link-danger fs-15 remove-item-btn"><i
|
||||
class="ri-delete-bin-fill"></i></a>
|
||||
@endcan
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
125
Modules/PMS/resources/views/task-category/modal.blade.php
Normal file
125
Modules/PMS/resources/views/task-category/modal.blade.php
Normal file
@@ -0,0 +1,125 @@
|
||||
<div id="myModal" class="modal fade" tabindex="-1" aria-labelledby="myModalLabel" aria-hidden="true"
|
||||
style="display: none;">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="myModalLabel">Task Category</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"> </button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@can('taskCategory.store')
|
||||
<div class="hstack d-lfex justify-content-end mb-3 flex-wrap gap-2">
|
||||
<a class="btn btn-secondary btn-sm" data-bs-toggle="collapse" href="#collapseExample" role="button"
|
||||
aria-expanded="true" aria-controls="collapseExample">
|
||||
Add
|
||||
</a>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
<div class="collapse" id="collapseExample">
|
||||
<fieldset class="rounded-1 mb-0">
|
||||
<legend>Task Category Form</legend>
|
||||
{{ html()->form('POST')->route('taskCategory.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Title')->class('form-label') }}
|
||||
{{ html()->text('title')->class('form-control')->placeholder('Task Category Title')->required() }}
|
||||
{{ html()->div('Please enter title')->class('invalid-feedback') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Status')->class('form-label') }}
|
||||
{{ html()->select('status', [])->class('form-control select')->placeholder('Select Status') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Description')->class('form-label') }}
|
||||
{{ html()->textarea('desc')->class('form-control')->placeholder('Task Category Description')->attributes(['rows' => 3]) }}
|
||||
</div>
|
||||
|
||||
<div class="justify-content-end d-flex mb-2">
|
||||
<button class="btn btn-sm btn-success waves-effect waves-light mt-2"> Save </button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{ html()->form()->close() }}
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table id="buttons-datatables" class="display table-sm table-bordered table">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th class="tb-col"><span class="overline-title">S.N</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Title</span></th>
|
||||
<th class="tb-col"><span class="overline-title">Status</span></th>
|
||||
<th class="tb-col" data-sortable="false"><span class="overline-title">Action</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($taskCategories as $index => $item)
|
||||
<tr>
|
||||
<td class="tb-col">{{ $index + 1 }}</td>
|
||||
<td class="tb-col">{{ $item->title }}</td>
|
||||
<td class="tb-col">{!! $item->status_name !!}</td>
|
||||
<td class="tb-col">
|
||||
<div class="hstack flex-wrap gap-3">
|
||||
<a href="{{ route('taskCategory.show', $item->id) }}" class="link-info fs-15"><i
|
||||
class="ri-eye-fill"></i></a>
|
||||
@can('taskCategory.edit')
|
||||
<a href="{{ route('taskCategory.edit', $item->id) }}"><i class="ri-edit-2-fill"></i></a>
|
||||
@endcan
|
||||
|
||||
@can('taskCategory.destroy')
|
||||
<a href="javascript:void(0);" data-link="{{ route('taskCategory.destroy', $item->id) }}"
|
||||
data-id="{{ $item->id }}" class="link-danger fs-15 remove-item-btn"><i
|
||||
class="ri-delete-bin-fill"></i></a>
|
||||
@endcan
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div>
|
||||
|
||||
<div id="editCategoryModal" class="modal fade" tabindex="-1" aria-labelledby="myModalLabel" aria-hidden="true"
|
||||
style="display: none;">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="myModalLabel">Add Task Category</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"> </button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{-- @include('pms::project-category.create') --}}
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div>
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$('body').on('click', '.edit-category-btn', function() {
|
||||
link = $(this).data('link');
|
||||
fetch(link)
|
||||
.then(response => response.text())
|
||||
.then(html => {
|
||||
$('#editCategoryModal').find('.modal-body').html(html)
|
||||
$('#editCategoryModal').modal('show')
|
||||
console.log(html);
|
||||
// document.querySelector('.comment-box').innerHTML = html;
|
||||
})
|
||||
})
|
||||
</script>
|
||||
@endpush
|
@@ -0,0 +1,48 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-9">
|
||||
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row gy-3">
|
||||
|
||||
<div class="col-md-6">
|
||||
{{ html()->label('Title')->class('form-label') }}
|
||||
{{ html()->text('title')->class('form-control')->placeholder('Task Category Title')->required() }}
|
||||
{{ html()->div('Please select Task Category Title')->class('invalid-feedback') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Description')->class('form-label') }}
|
||||
{{ html()->textarea('desc')->class('form-control')->placeholder('Task Category Description')->attributes(['rows' => 3]) }}
|
||||
</div>
|
||||
|
||||
<x-form-buttons :editable="$editable" label="Add" href="{{ route('taskCategory.index') }}" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title mb-0">Publish</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ html()->label('Status')->class('form-label') }}
|
||||
{{ html()->select('status', $status)->class('form-control select2')->placeholder('Select Status') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end card body -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
@endpush
|
44
Modules/PMS/resources/views/task-category/show.blade.php
Normal file
44
Modules/PMS/resources/views/task-category/show.blade.php
Normal file
@@ -0,0 +1,44 @@
|
||||
@extends('layouts.app')
|
||||
@inject('employeeRepository', 'Modules\Employee\Repositories\EmployeeRepository')
|
||||
@use('Carbon\Carbon')
|
||||
@section('content')
|
||||
<div class="container-fluid">
|
||||
<x-dashboard.breadcumb :title="$title" />
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="card card-body p-4">
|
||||
<div>
|
||||
<div class="table-responsive">
|
||||
<table class="table-borderless mb-0 table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><span class="fw-medium">Task Category Title</span></th>
|
||||
<td>{{ $taskCategory->title }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<th><span class="fw-medium">Status</span></th>
|
||||
<td>{!! $taskCategory->status_name !!}</td>
|
||||
</tr>
|
||||
<th><span class="fw-medium">Description</span></th>
|
||||
<td>{!! $taskCategory->desc !!}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 text-end">
|
||||
<a href="{{ route('task.index') }}" class="btn btn-secondary w-sm">Back</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script src="{{ asset('assets/js/pages/form-validation.init.js') }}"></script>
|
||||
@endpush
|
Reference in New Issue
Block a user