229 lines
11 KiB
PHP
229 lines
11 KiB
PHP
@extends('Admin.layouts.master')
|
|
|
|
@section('content')
|
|
|
|
@php
|
|
$currentPage = 'manage_feedback';
|
|
@endphp
|
|
<!--begin::Wrapper-->
|
|
<!--<div class="app-wrapper flex-column flex-row-fluid" id="kt_app_wrapper">-->
|
|
|
|
<!--begin::Main-->
|
|
<div class="app-main flex-column flex-row-fluid" id="kt_app_main">
|
|
<!--begin::Content wrapper-->
|
|
<div class="d-flex flex-column flex-column-fluid">
|
|
<!--begin::Toolbar-->
|
|
<div id="kt_app_toolbar" class="app-toolbar py-3 py-lg-6">
|
|
<!--begin::Toolbar container-->
|
|
<div id="kt_app_toolbar_container" class="app-container container-xxl d-flex flex-stack">
|
|
<!--begin::Page title-->
|
|
<div class="page-title d-flex flex-column justify-content-center flex-wrap me-3">
|
|
<!--begin::Title-->
|
|
<h1
|
|
class="page-heading d-flex text-dark fw-bold fs-3 flex-column justify-content-center my-0">
|
|
Manage Feedback</h1>
|
|
<!--end::Title-->
|
|
|
|
</div>
|
|
<!--end::Page title-->
|
|
<!--begin::Actions-->
|
|
<!--<div class="d-flex align-items-center gap-2 gap-lg-3">-->
|
|
<!--begin::Filter menu-->
|
|
|
|
<!--end::Filter menu-->
|
|
<!-- <a href="#" class="btn btn-sm fw-bold btn-primary">Export-->
|
|
<!-- </a>-->
|
|
<!--end::Primary button-->
|
|
|
|
<!--</div>-->
|
|
<!--end::Actions-->
|
|
</div>
|
|
<!--end::Toolbar container-->
|
|
</div>
|
|
<!--end::Toolbar-->
|
|
<!--begin::Content-->
|
|
<div id="kt_app_content" class="app-content flex-column-fluid">
|
|
<!--begin::Content container-->
|
|
<div id="kt_app_content_container" class="app-container container-xxl">
|
|
|
|
<!--begin::Tables Widget 13-->
|
|
<div class="card mb-5 mb-xl-8">
|
|
|
|
<!--begin::Body-->
|
|
<div class="card-body py-3">
|
|
<!--begin::Table container-->
|
|
<div class="table-responsive">
|
|
<!--begin::Table-->
|
|
<table id="mng-sings"
|
|
class="table table-row-bordered table-row-gray-100 align-middle gs-0 gy-3">
|
|
<!--begin::Table head-->
|
|
<thead>
|
|
<tr class="fw-bold text-muted">
|
|
|
|
<th class="">Sr. No.</th>
|
|
<th class="">Name</th>
|
|
<th class="">Message</th>
|
|
<th class="">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<!--end::Table head-->
|
|
<!--begin::Table body-->
|
|
<tbody>
|
|
|
|
@foreach($feedback as $data)
|
|
|
|
<tr>
|
|
|
|
<td class="text-white fs-6">{{$loop->index+1}}</td>
|
|
<td class="text-white fs-6">
|
|
<!--@if($data->user_detail->profile_picture)-->
|
|
<!-- <img src="{{$data->user_detail->profile_picture}}">-->
|
|
<!--@else-->
|
|
<!-- <img src="{{ asset('assets/uploads/download (2).jpg') }}">-->
|
|
<!--@endif -->
|
|
<!--<img src="assets/media/images/Girls-Profile.png" alt="user">-->
|
|
{{$data->user->full_name}}
|
|
</td>
|
|
|
|
<td class="text-white fs-6 overflow-auto">{{$data->message}}</td>
|
|
<td class="text-white fs-6">
|
|
|
|
<a href="" data-toggle="modal" data-target="#delete_opt"
|
|
class="btn btn-icon btn-bg-light btn-active-color-red btn-sm delete_feedback" data-id="{{$data->id}}" >
|
|
<!--begin::Svg Icon | path: icons/duotune/general/gen027.svg-->
|
|
<span class="svg-icon svg-icon-3">
|
|
<svg width="24" height="24" viewBox="0 0 24 24"
|
|
fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<path
|
|
d="M5 9C5 8.44772 5.44772 8 6 8H18C18.5523 8 19 8.44772 19 9V18C19 19.6569 17.6569 21 16 21H8C6.34315 21 5 19.6569 5 18V9Z"
|
|
fill="currentColor" />
|
|
<path opacity="0.5"
|
|
d="M5 5C5 4.44772 5.44772 4 6 4H18C18.5523 4 19 4.44772 19 5V5C19 5.55228 18.5523 6 18 6H6C5.44772 6 5 5.55228 5 5V5Z"
|
|
fill="currentColor" />
|
|
<path opacity="0.5"
|
|
d="M9 4C9 3.44772 9.44772 3 10 3H14C14.5523 3 15 3.44772 15 4V4H9V4Z"
|
|
fill="currentColor" />
|
|
</svg>
|
|
</span>
|
|
<!--end::Svg Icon-->
|
|
</a>
|
|
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
<!--end::Table body-->
|
|
</table>
|
|
<!--end::Table-->
|
|
</div>
|
|
<!--end::Table container-->
|
|
</div>
|
|
<!--begin::Body-->
|
|
|
|
</div>
|
|
<!--end::Tables Widget 13-->
|
|
|
|
</div>
|
|
<!--end::Content container-->
|
|
</div>
|
|
<!--end::Content-->
|
|
</div>
|
|
<!--end::Content wrapper-->
|
|
|
|
</div>
|
|
<!--end:::Main-->
|
|
<!--</div>-->
|
|
|
|
|
|
<!--begin::Delete Modals-->
|
|
<div class="modal fade" id="delete_opt" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle"
|
|
aria-hidden="true">
|
|
<div class="modal-dialog modal-dialog-centered" role="document">
|
|
<div class="modal-content Delete_pop">
|
|
|
|
<div class="modal-body">
|
|
<svg style="color: red;margin-bottom: 20px;" xmlns="http://www.w3.org/2000/svg" width="50" height="50" fill="currentColor" class="bi bi-x-circle" viewBox="0 0 16 16"> <path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" fill="red"></path> <path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z" fill="red"></path> </svg>
|
|
<input type="hidden" id="delete_feedback_id">
|
|
<h2>Are you sure you want to delete?</h2>
|
|
<!--<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor</p>-->
|
|
<div class="modal-footer logout_footer">
|
|
<button class="log-close" type="button" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">Cancel</span>
|
|
</button>
|
|
<a href=""><button type="button" class="btn btn-primary delete_feedback_button">Delete</button></a>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!--end:: DeleteModals-->
|
|
|
|
<!--begin::Notification Modals-->
|
|
<div class="modal fade" id="reply_popup" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle"
|
|
aria-hidden="true">
|
|
<div class="modal-dialog modal-dialog-centered" role="document">
|
|
<div class="modal-content usered-mod">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<h1>User Details</h1>
|
|
<div class="name-users">
|
|
<label>Name</label>
|
|
<input type="text" placeholder="Priyanka">
|
|
</div>
|
|
<div class="name-users">
|
|
<label>Message</label>
|
|
<input type="text" placeholder="Lorem Ipsum">
|
|
</div>
|
|
<div class="users-form">
|
|
<label></label>
|
|
<textarea placeholder="Reply or Post"></textarea>
|
|
</div>
|
|
<div class="modal-footer f-a-input">
|
|
<a href="manage-feedback.php"><button type="button" class="btn btn-primary">Reply to member</button></a>
|
|
<input type="file" placeholder="">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.5/jquery.validate.min.js" integrity="sha512-rstIgDs0xPgmG6RX1Aba4KV5cWJbAMcvRCVmglpam9SoHZiUCyQVDdH2LPlxoHtrv17XWblE/V/PP+Tr04hbtA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
|
|
<script>
|
|
$(document).on("click", ".delete_feedback", function () {
|
|
var delete_id = $(this).data('id');
|
|
// alert(delete_id);
|
|
$('#delete_feedback_id').val(delete_id);
|
|
$('#delete_opt').modal('show');
|
|
});
|
|
|
|
$(document).on("click", ".delete_feedback_button", function (e) {
|
|
e.preventDefault();
|
|
var delete_id = $('#delete_feedback_id').val();
|
|
// alert(delete_id);
|
|
$.ajaxSetup({
|
|
headers: {
|
|
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
|
|
},
|
|
});
|
|
$.ajax({
|
|
type: "DELETE",
|
|
url: "/admin/delete_feedback/" + delete_id,
|
|
// url:"/delete_short_clips/"+delete_id,
|
|
success: function (response) {
|
|
console.log(response);
|
|
toastr.info("Feedback Deleted successfully");
|
|
$('#delete_opt').modal('hide');
|
|
window.location.reload();
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
|
|
@endsection |