diff --git a/resources/views/Admin/Pages/pre_owned_investment/partial/overview-row.blade.php b/resources/views/Admin/Pages/pre_owned_investment/partial/overview-row.blade.php index 745b6c4..e00ff55 100644 --- a/resources/views/Admin/Pages/pre_owned_investment/partial/overview-row.blade.php +++ b/resources/views/Admin/Pages/pre_owned_investment/partial/overview-row.blade.php @@ -39,7 +39,7 @@ - + @endif diff --git a/resources/views/Admin/Pages/pre_owned_investment/pre_owned_investmentV2.blade.php b/resources/views/Admin/Pages/pre_owned_investment/pre_owned_investmentV2.blade.php index b67ac90..aaa4a22 100644 --- a/resources/views/Admin/Pages/pre_owned_investment/pre_owned_investmentV2.blade.php +++ b/resources/views/Admin/Pages/pre_owned_investment/pre_owned_investmentV2.blade.php @@ -252,6 +252,82 @@ + + +{{-- reply mail popup start --}} + +{{-- reply mail popup end --}} @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);