added kyc reject mail template and fixed api

This commit is contained in:
Ritikesh yadav
2024-06-18 19:28:36 +05:30
parent 2762da2573
commit f23768397e
10 changed files with 384 additions and 193 deletions

View File

@@ -34,7 +34,7 @@ class ContactFormLeadsController extends Controller
// dd($request->all());
$updateStatus = ContactUs::where('id', $request->contact_us_id)->update(['status' => 'Ongoing']);
$replySent = $this->contact->store($request);
$this->contact->sendMail($request->email_send, $request->subject, $request->reply);
$this->contact->sendMail($request->email_send, $request->subject, $request->reply, $request->username);
return $replySent ?
$this->response('Mail send successfully', 200) :
$this->response('Mail Not send, Error!', 400);

View File

@@ -41,6 +41,7 @@ class ManageInvestorController extends Controller
// dd($request->all());
$email = $request->email_send;
// $email = "ritikesh.yadav@wdimails.com";
$email = $request->username;
$subject = $request->subject;
$reply = $request->reply;
$investorMail = True;
@@ -330,7 +331,7 @@ class ManageInvestorController extends Controller
<a class="action_icon" data-bs-toggle="tooltip" onclick="kycApproveStatus(' . $row->id . ')" data-bs-custom-class="tooltip-inverse" data-bs-placement="top" title="Approved">
<i class="fa-solid fa-square-check"></i>
</a>
<a class="action_icon send-mail reply_mail" onclick="hello(\'' . $row->email . '\')" data-email="he" data-subject="he" data-contact-us-id="he" title="Reply">
<a class="action_icon send-mail reply_mail" onclick="hello(\'' . $row->email . '\',\'' . $row->user->name . '\')" data-email="he" data-subject="he" data-contact-us-id="he" title="Reply">
<svg class="svg-inline--fa fa-reply" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="reply" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" data-fa-i2svg=""><path fill="currentColor" d="M205 34.8c11.5 5.1 19 16.6 19 29.2v64H336c97.2 0 176 78.8 176 176c0 113.3-81.5 163.9-100.2 174.1c-2.5 1.4-5.3 1.9-8.1 1.9c-10.9 0-19.7-8.9-19.7-19.7c0-7.5 4.3-14.4 9.8-19.5c9.4-8.8 22.2-26.4 22.2-56.7c0-53-43-96-96-96H224v64c0 12.6-7.4 24.1-19 29.2s-25 3-34.4-5.4l-160-144C3.9 225.7 0 217.1 0 208s3.9-17.7 10.6-23.8l160-144c9.4-8.5 22.9-10.6 34.4-5.4z"></path></svg><!-- <i class="fa-solid fa-reply"></i> Font Awesome fontawesome.com -->
</a>
';

View File

@@ -26,6 +26,7 @@ class StoreContactUsReplyRequest extends FormRequest
return [
'subject' => 'required',
'reply' => 'required',
'username' => 'required',
'contact_us_id' => 'required',
];
}

View File

@@ -15,6 +15,7 @@ class FundForDistressedAssetResource extends JsonResource
*/
public function toArray($request)
{
// dd($this);
$images = ProductImage::where('product_xid', $this->products_id)->get();
$imagePaths = [];
if (!empty($images)) {
@@ -72,5 +73,7 @@ class FundForDistressedAssetResource extends JsonResource
'valuation_per_security_nav' => $this->valuation_per_security_nav,
'trading_strategy_used' => $this->trading_strategy_used,
'involved_in_short_selling' => $this->involved_in_short_selling,
'rera_complied_property' => $this->rera_complied_property,
'regions_covered' => $this->regions_covered,
]; }
}

View File

@@ -16,10 +16,11 @@ class ContactUsService
return ContactUs::latest()->get();
}
public function sendMail($email, $subject, $reply, $investorMail = null)
public function sendMail($email, $subject, $reply, $username, $investorMail = null)
{
$data['subject'] = $subject;
$data['message'] = $reply;
$data['username'] = $username;
if($investorMail)
{
return Mail::to($email)->send(new ReplyInvestorMail($data));

View File

@@ -266,6 +266,7 @@
</div>
<input type="text" hidden class="form-control" id="email_send"
name="email_send" value="" placeholder="Enter subject here">
<input type="hidden" id="username" name="username">
<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>
@@ -313,12 +314,13 @@
@endsection
@section('scripts')
<script type="text/javascript">
function hello(email)
function hello(email,username)
{
// alert()
// console.log('email',email);
$('#to_email').html(email);
$('#email_send').val(email);
// $('#subject').val(subject);
$('#username').val(username);
// $('#contact_us_id').val(contactUsId);
$('#send_mail_reply').modal('show');
// alert('hello');

View File

@@ -0,0 +1,131 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="/images/icon.png">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous" />
<title>Mail</title>
</head>
<body>
<style>
a {
cursor: pointer;
}
.content {
padding: 20px;
margin-top: 20px;
}
.footer {
background-color: #f1f1f1;
color: #333333;
text-align: center;
padding: 10px;
font-size: 12px;
}
</style>
<!--header -->
<div style="margin: 0; padding: 0; width: 100% !important;">
<table border="0" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse;">
<tbody>
<tr>
<td style="border-collapse: collapse; padding: 0; background-color: #f9f6f3;">
<table style="border-collapse: collapse; width: 100%; max-width: 800px;" border="0" width="100%"
cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td style="border-collapse: collapse; padding: 0;">
<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="white"
style="border-collapse: collapse; background-color: white;">
<tbody>
<tr>
<td style="padding: 0px; border-bottom: 1px solid #cdb8a2;">
<table border="0" width="100%" cellspacing="0" cellpadding="0"
style="border-collapse: collapse;">
<tbody>
<tr>
<td style="padding: 30px 50px;" align="center">
<div
style="width: 168px; height: 48px; display: none;">
&nbsp;
</div>
<a target="_blank"> <img
style="display: block; width: 100%; max-width: 100px;"
src="https://jerichoalternatives.in/public/assets/media/FrontendImages/menu-logo.png"
alt="logo">
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0"
style="border-collapse: collapse; background-color: white;">
<tbody>
<tr>
<td style="border-collapse: collapse; padding: 40px 50px 0px 50px;">
<table border="0" width="100%" cellspacing="0" cellpadding="0"
style="border-collapse: collapse;">
<tbody>
<tr>
<td
style="border-collapse: collapse; padding: 0; font: 30px Times,TimesNewRoman,serif; color: #281e41; line-height: 60px; text-align: center;">
KYC Verification Failed: Action
Required</td>
</tr>
<tr>
<td>
<div class="content">
<p>Dear {{$data['username']}},</p>
<p>We regret to inform you that your recent
KYC (Know Your Customer) submission has
been rejected. Please find the details
below:</p>
<p>{{$data['message']}}</p>
<p>If you have any questions or need further
assistance, please do not hesitate to
contact our support team.</p>
<p>Best regards,<br>Jericho Alternatives</p>
</div>
<div class="footer">
<p>&copy; 2024 Jericho Alternatives. All
rights reserved.</p>
<p>This is an automated message, please do
not reply.</p>
<a style="color: #468071;" href="{{imagePath()}}"
target="_blank"><strong>Contact
us</strong></a>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous">
</script>
</body>
</html>

View File

@@ -1,107 +1,131 @@
<!doctype html>
<html lang="en-US">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="x-apple-disable-message-reformatting">
<title>Jerichoalternatives Reply</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="/images/icon.png">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous" />
<title>Mail</title>
</head>
<body>
<style>
a {
cursor: pointer;
}
.content {
padding: 20px;
margin-top: 20px;
}
<body style="margin:0; padding:0; background:#eeeeee;">
<div
style="display: none; font-size: 1px; line-height: 1px; max-height: 0px; max-width: 0px; opacity: 0; overflow: hidden; mso-hide: all; font-family: sans-serif;">
Contact Us Reply Email.
.footer {
background-color: #f1f1f1;
color: #333333;
text-align: center;
padding: 10px;
font-size: 12px;
}
</style>
<!--header -->
<div style="margin: 0; padding: 0; width: 100% !important;">
<table border="0" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse;">
<tbody>
<tr>
<td style="border-collapse: collapse; padding: 0; background-color: #f9f6f3;">
<table style="border-collapse: collapse; width: 100%; max-width: 800px;" border="0" width="100%"
cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td style="border-collapse: collapse; padding: 0;">
<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="white"
style="border-collapse: collapse; background-color: white;">
<tbody>
<tr>
<td style="padding: 0px; border-bottom: 1px solid #cdb8a2;">
<table border="0" width="100%" cellspacing="0" cellpadding="0"
style="border-collapse: collapse;">
<tbody>
<tr>
<td style="padding: 30px 50px;" align="center">
<div
style="width: 168px; height: 48px; display: none;">
&nbsp;
</div>
<a target="_blank"> <img
style="display: block; width: 100%; max-width: 100px;"
src="https://jerichoalternatives.in/public/assets/media/FrontendImages/menu-logo.png"
alt="logo">
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0"
style="border-collapse: collapse; background-color: white;">
<tbody>
<tr>
<td style="border-collapse: collapse; padding: 40px 50px 0px 50px;">
<table border="0" width="100%" cellspacing="0" cellpadding="0"
style="border-collapse: collapse;">
<tbody>
<tr>
<td
style="border-collapse: collapse; padding: 0; font: 30px Times,TimesNewRoman,serif; color: #281e41; line-height: 60px; text-align: center;">
KYC Verification Failed: Action
Required</td>
</tr>
<tr>
<td>
<div class="content">
<p>Dear {{$data['username']}},</p>
<p>We regret to inform you that your recent
KYC (Know Your Customer) submission has
been rejected. Please find the details
below:</p>
<p>{{$data['message']}}</p>
<p>If you have any questions or need further
assistance, please do not hesitate to
contact our support team.</p>
<p>Best regards,<br>Jericho Alternatives</p>
</div>
<div class="footer">
<p>&copy; 2024 Jericho Alternatives. All
rights reserved.</p>
<p>This is an automated message, please do
not reply.</p>
<a style="color: #468071;" href="{{imagePath()}}"
target="_blank"><strong>Contact
us</strong></a>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<center>
<div
style="width:100%; max-width:600px; background:#ffffff; padding:30px 20px; text-align:left; font-family: 'Arial', sans-serif;">
<h1 style="font-size:16px; line-height:22px; font-weight:normal; color:#333333;">
{{$data['subject']}}
<!--<h>hello</h>-->
</h1>
<p style="font-size:16px; line-height:24px; color:#666666; margin-bottom:30px;">
{{$data['message']}}
<!--<h>hello</h>-->
</p>
<hr style="border:none; height:1px; color:#dddddd; background:#dddddd; width:100%; margin-bottom:20px;">
<p style="font-size:12px; line-height:18px; color:#999999; margin-bottom:10px;">
&copy; Copyright {{date('Y')}}
<a href="{{imagePath()}}"
style="font-size:12px; line-height:18px; color:#666666; font-weight:bold;">
Jerichoalternatives</a>, All Rights Reserved.
</p>
</div>
</center>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous">
</script>
</body>
</html>

View File

@@ -1,107 +1,131 @@
<!doctype html>
<html lang="en-US">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="x-apple-disable-message-reformatting">
<title>Jerichoalternatives Reply</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="/images/icon.png">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous" />
<title>Mail</title>
</head>
<body>
<style>
a {
cursor: pointer;
}
.content {
padding: 20px;
margin-top: 20px;
}
<body style="margin:0; padding:0; background:#eeeeee;">
<div
style="display: none; font-size: 1px; line-height: 1px; max-height: 0px; max-width: 0px; opacity: 0; overflow: hidden; mso-hide: all; font-family: sans-serif;">
Investor Reply Email.
.footer {
background-color: #f1f1f1;
color: #333333;
text-align: center;
padding: 10px;
font-size: 12px;
}
</style>
<!--header -->
<div style="margin: 0; padding: 0; width: 100% !important;">
<table border="0" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse;">
<tbody>
<tr>
<td style="border-collapse: collapse; padding: 0; background-color: #f9f6f3;">
<table style="border-collapse: collapse; width: 100%; max-width: 800px;" border="0" width="100%"
cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr>
<td style="border-collapse: collapse; padding: 0;">
<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="white"
style="border-collapse: collapse; background-color: white;">
<tbody>
<tr>
<td style="padding: 0px; border-bottom: 1px solid #cdb8a2;">
<table border="0" width="100%" cellspacing="0" cellpadding="0"
style="border-collapse: collapse;">
<tbody>
<tr>
<td style="padding: 30px 50px;" align="center">
<div
style="width: 168px; height: 48px; display: none;">
&nbsp;
</div>
<a target="_blank"> <img
style="display: block; width: 100%; max-width: 100px;"
src="https://jerichoalternatives.in/public/assets/media/FrontendImages/menu-logo.png"
alt="logo">
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0"
style="border-collapse: collapse; background-color: white;">
<tbody>
<tr>
<td style="border-collapse: collapse; padding: 40px 50px 0px 50px;">
<table border="0" width="100%" cellspacing="0" cellpadding="0"
style="border-collapse: collapse;">
<tbody>
<tr>
<td
style="border-collapse: collapse; padding: 0; font: 30px Times,TimesNewRoman,serif; color: #281e41; line-height: 60px; text-align: center;">
KYC Verification Failed: Action
Required</td>
</tr>
<tr>
<td>
<div class="content">
<p>Dear {{$data['username']}},</p>
<p>We regret to inform you that your recent
KYC (Know Your Customer) submission has
been rejected. Please find the details
below:</p>
<p>{{$data['message']}}</p>
<p>If you have any questions or need further
assistance, please do not hesitate to
contact our support team.</p>
<p>Best regards,<br>Jericho Alternatives</p>
</div>
<div class="footer">
<p>&copy; 2024 Jericho Alternatives. All
rights reserved.</p>
<p>This is an automated message, please do
not reply.</p>
<a style="color: #468071;" href="{{imagePath()}}"
target="_blank"><strong>Contact
us</strong></a>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<center>
<div
style="width:100%; max-width:600px; background:#ffffff; padding:30px 20px; text-align:left; font-family: 'Arial', sans-serif;">
<h1 style="font-size:16px; line-height:22px; font-weight:normal; color:#333333;">
{{$data['subject']}}
<!--<h>hello</h>-->
</h1>
<p style="font-size:16px; line-height:24px; color:#666666; margin-bottom:30px;">
{{$data['message']}}
<!--<h>hello</h>-->
</p>
<hr style="border:none; height:1px; color:#dddddd; background:#dddddd; width:100%; margin-bottom:20px;">
<p style="font-size:12px; line-height:18px; color:#999999; margin-bottom:10px;">
&copy; Copyright {{date('Y')}}
<a href="{{imagePath()}}"
style="font-size:12px; line-height:18px; color:#666666; font-weight:bold;">
Jerichoalternatives</a>, All Rights Reserved.
</p>
</div>
</center>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous">
</script>
</body>
</html>

View File

@@ -458,6 +458,10 @@ Route::get('revenue', function () {
return view('Frontend.Pages.Invest_assets.revenue');
})->name('revenue');
Route::get('new-mail-template',function(){
return view('Admin.email.new-mail-template');
});
//User Routes
Route::middleware([FrontendAccess::class])->group(function () {
Route::get("market-list/{custom_id?}", [FrontendDashboardController::class, 'viewDetailMarketPlace'])->name('market-list');