fixing changes
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
<i class="fa-solid fs-4 fa-square-check"></i>
|
||||
</a>
|
||||
|
||||
<a class="action_icon" data-bs-toggle="tooltip" data-bs-custom-class="tooltip-inverse" data-bs-placement="top" title="Reject" onclick="listingStatus({{$data->id}},'Rejected','{{$table}}')">
|
||||
<a class="action_icon" data-bs-toggle="tooltip" data-bs-custom-class="tooltip-inverse" data-bs-placement="top" title="Reject" onclick="listingStatus({{$data->id}},'Rejected','{{$table}}','{{$data->seller->email}}')">
|
||||
<i class="fa-solid fs-4 fa-square-xmark"></i>
|
||||
</a>
|
||||
@endif
|
||||
|
||||
@@ -252,6 +252,82 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{{-- reply mail popup start --}}
|
||||
<div class="modal fade" tabindex="-1" id="send_mail_reply">
|
||||
<div class="modal-dialog modal-dialog-centered mw-750px">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h2 class="fw-bold fs-2 mb-0">Email Reply</h2>
|
||||
<div class="btn btn-icon btn-sm btn-active-icon-primary" data-bs-dismiss="modal"
|
||||
aria-label="Close">
|
||||
<span class="svg-icon svg-icon-1">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<rect opacity="0.5" x="6" y="17.3137" width="16" height="2" rx="1"
|
||||
transform="rotate(-45 6 17.3137)" fill="currentColor" />
|
||||
<rect x="7.41422" y="6" width="16" height="2" rx="1"
|
||||
transform="rotate(45 7.41422 6)" fill="currentColor" />
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="reply_mail_form">
|
||||
@csrf
|
||||
<input type="hidden" name="contact_us_id" id="contact_us_id">
|
||||
<div class="d-flex flex-column scroll-y me-n7 pe-7" id="kt_modal_update_role_scroll"
|
||||
data-kt-scroll="true">
|
||||
<div class="fv-row row p-5 modal-rounded">
|
||||
<div class="col-md-12 mb-8">
|
||||
<div class="row">
|
||||
<div class="col-md-3 d-flex justify-content-start align-items-center">
|
||||
<label class="fs-5 fw-bold form-label mb-0 d-block">To</label>
|
||||
</div>
|
||||
<input type="text" hidden class="form-control" id="email_send"
|
||||
name="email_send" value="" placeholder="Enter subject here">
|
||||
<div class="col-md-9">
|
||||
<label class="fs-5 fw-bold form-label mb-0 d-block" id="to_email">Email
|
||||
Address of Lead</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 mb-8">
|
||||
<div class="row">
|
||||
<div class="col-md-3 d-flex justify-content-start align-items-center">
|
||||
<label class="fs-5 fw-bold form-label mb-0 d-block">Subject</label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{-- <label class="fs-5 fw-bold form-label mb-0 d-block" id="subject">Email Address of Lead</label> --}}
|
||||
<input type="text" class="form-control" name="subject" id="subject"
|
||||
placeholder="Enter subject here">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-md-3 d-flex justify-content-start align-items-start">
|
||||
<label class="fs-5 fw-bold form-label mb-0 d-block">Reply</label>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<textarea class="form-control form-control-solid resize-none" name="reply" placeholder="Enter your reply...."
|
||||
cols="30" rows="5"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="submit" id="send_mail" class="btn btn-primary btn-hove-rise">Send</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{-- reply mail popup end --}}
|
||||
<!-- </div> -->
|
||||
@endsection
|
||||
@section('scripts')
|
||||
@@ -268,8 +344,46 @@
|
||||
// $('#rejected_table').DataTable({
|
||||
// dom: "Bfrtip",
|
||||
// });
|
||||
$('#reply_mail_form').validate({
|
||||
ignore: [],
|
||||
debug: false,
|
||||
rules: {
|
||||
subject: 'required',
|
||||
reply: 'required',
|
||||
},
|
||||
message: {
|
||||
subject: "Please enter subject field",
|
||||
reply: "Please enter reply field",
|
||||
},
|
||||
submitHandler: function(form) {
|
||||
var formData = new FormData(form)
|
||||
$.ajax({
|
||||
url: "{{ route('reply-investor-mail') }}",
|
||||
type: "POST",
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
dataType: "json",
|
||||
success: function(result) {
|
||||
if (result.status == 200) {
|
||||
$('#send_mail_reply').modal('hide');
|
||||
toastr.success(result.message);
|
||||
window.location.reload();
|
||||
}
|
||||
if (result.status == 201) {
|
||||
toastr.warning(result.message);
|
||||
}
|
||||
},
|
||||
// error: function(jqXHR) {
|
||||
// $("#request_callback_btn").removeClass("d-none");
|
||||
// $("#loaderContactBtn").addClass("d-none");
|
||||
// warning(jqXHR.responseJSON);
|
||||
// },
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
function listingStatus(id, status, table) {
|
||||
function listingStatus(id, status, table, email = null) {
|
||||
Swal.fire({
|
||||
title: `Do you want to move this investment listing to ${status} section?`,
|
||||
showDenyButton: false,
|
||||
@@ -291,7 +405,16 @@
|
||||
success: function(result) {
|
||||
if (result.status == 200) {
|
||||
toastr.success(result.message);
|
||||
location.reload();
|
||||
if(status != 'Rejected')
|
||||
{
|
||||
location.reload();
|
||||
}else{
|
||||
// alert(email);
|
||||
$('#to_email').html(email);
|
||||
$('#email_send').val(email);
|
||||
$('#send_mail_reply').modal('show');
|
||||
}
|
||||
|
||||
}
|
||||
if (result.status == 400) {
|
||||
toastr.warning(result.message);
|
||||
|
||||
Reference in New Issue
Block a user