first change

This commit is contained in:
2025-07-27 17:40:56 +05:45
commit f8b9a6725b
3152 changed files with 229528 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
{{ html()->form('POST')->route('projectCategory.store')->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('pms::project-category.partials.action', [
'editable' => false,
'status' => $projectCategoryStatus,
])
{{ html()->form()->close() }}

View File

@@ -0,0 +1,3 @@
{{ html()->modelForm($projectCategory, 'PUT')->route('projectCategory.update', $projectCategory->id)->class(['needs-validation'])->attributes(['novalidate'])->open() }}
@include('pms::project-category.partials.action')
{{ html()->form()->close() }}

View File

@@ -0,0 +1,128 @@
<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">Project Category</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"> </button>
</div>
<div class="modal-body">
<div class="hstack d-lfex justify-content-end mb-3 flex-wrap gap-2">
@can('projectCategory.create')
<a class="btn btn-secondary btn-sm" data-bs-toggle="collapse" href="#collapseExample" role="button"
aria-expanded="true" aria-controls="collapseExample">
Add
</a>
@endcan
</div>
<div class="collapse" id="collapseExample">
<fieldset class="rounded-1 mb-0">
<legend>Project Category Form</legend>
{{ html()->form('POST')->route('projectCategory.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('Project 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', $projectCategoryStatus)->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('Project 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">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 ($projectCategory 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('projectCategory.show', $item->id) }}" class="link-info fs-15"><i
class="ri-eye-fill"></i></a>
@can('projectCategory.edit')
<a href="javascript:void(0)" data-link="{{ route('projectCategory.edit', $item->id) }}"
class="link-success fs-15 edit-category-btn"><i class="ri-edit-2-fill"></i></a>
@endcan
@can('projectCategory.destroy')
<a href="javascript:void(0);" data-link="{{ route('projectCategory.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 Project 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

View File

@@ -0,0 +1,22 @@
<div class="row">
<div class="col-md-6">
{{ html()->label('Title')->class('form-label') }}
{{ html()->text('title')->class('form-control')->placeholder('Project 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', $projectCategoryStatus)->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('Project 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>

View File

@@ -0,0 +1,6 @@
@extends('layouts.app')
@section('content')
<div class="container-fluid">
<x-dashboard.breadcumb :title="$title" />
</div>
@endSection