fixing changes
This commit is contained in:
@@ -16,9 +16,16 @@ use App\Models\MonthlyUpdateFractionalRealEstate;
|
||||
use App\Notifications\UserAdmin;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use App\Services\Admin\ContactUsService;
|
||||
|
||||
class ManageInvestorController extends Controller
|
||||
{
|
||||
protected $contact;
|
||||
public function __construct(ContactUsService $contact)
|
||||
{
|
||||
$this->contact = $contact;
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$check = checkSidebarAccess('manage-investors');
|
||||
@@ -30,6 +37,17 @@ class ManageInvestorController extends Controller
|
||||
return view('Admin.Pages.manage_investors.manage_investors', compact('users', 'investingUserCount'));
|
||||
}
|
||||
|
||||
public function replyInvestorMail(Request $request){
|
||||
// dd($request->all());
|
||||
$email = $request->email_send;
|
||||
// $email = "ritikesh.yadav@wdimails.com";
|
||||
$subject = $request->subject;
|
||||
$reply = $request->reply;
|
||||
$investorMail = True;
|
||||
$success = $this->contact->sendMail($email, $subject, $reply, $investorMail);
|
||||
return response()->json(['status'=>200,'message'=>'success']);
|
||||
}
|
||||
|
||||
public function manage_investor_kyc()
|
||||
{
|
||||
$check = checkSidebarAccess('manage-investors-kyc');
|
||||
@@ -310,6 +328,9 @@ 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">
|
||||
<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>
|
||||
';
|
||||
} else {
|
||||
$btn = '<a href="' . route("manage_investor_view", $row->id) . '" class="action_icon" data-bs-toggle="tooltip" data-bs-custom-class="tooltip-inverse" data-bs-placement="top" title="View Detail">
|
||||
|
||||
@@ -322,14 +322,17 @@ class OverviewController extends Controller
|
||||
|
||||
if ($table == 1) {
|
||||
$data = MarketplaceFractionalRealEstateSeller::with('seller', 'company')->where('id', $id)->firstOrFail();
|
||||
$tableName = 'marketplace_fre_sellers';
|
||||
} elseif ($table == 2) {
|
||||
$data = MarketplaceAlternativeInvestmentFundSeller::with('seller')->where('id', $id)->firstOrFail();
|
||||
$tableName = 'marketplace_aif_sellers';
|
||||
} elseif ($table == 3) {
|
||||
$data = MarketplaceOtherProductsSeller::with('seller')->where('id', $id)->firstOrFail();
|
||||
}
|
||||
$anyOneBuyed = MarketplaceBuyerForm::where(['associated_id'=>$id,'table'=>$tableName])->exists();
|
||||
// dd($data);
|
||||
|
||||
return view('Admin.Pages.pre_owned_investment.pending_investment_view', compact('data', 'table'));
|
||||
return view('Admin.Pages.pre_owned_investment.pending_investment_view', compact('data', 'table','anyOneBuyed'));
|
||||
}
|
||||
|
||||
public function listingStatus(Request $request)
|
||||
|
||||
39
app/Mail/ReplyInvestorMail.php
Normal file
39
app/Mail/ReplyInvestorMail.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class ReplyInvestorMail extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected $data;
|
||||
public function __construct($data)
|
||||
{
|
||||
//
|
||||
$this->data = $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
$data=$this->data;
|
||||
|
||||
return $this->subject('Reply From Jericho Alternatives')->view('Admin.email.reply-mail-investor',compact('data'));
|
||||
|
||||
// return $this->view('view.name');
|
||||
}
|
||||
}
|
||||
@@ -90,7 +90,8 @@ class MarketplaceAlternativeInvestmentFundSeller extends Model
|
||||
public function getSoldStatusAttribute($id)
|
||||
{
|
||||
// return MarketplaceBuyerForm::where('associated_id', $id)->where('status', 'Sold')->exists() ? 'SOLD' : 'OPEN';
|
||||
$checkBIDExist = MarketplaceBuyerForm::where('associated_id', $id)->where('status', 'Sold')->exists();
|
||||
$id = $this->id;
|
||||
$checkBIDExist = MarketplaceBuyerForm::where('associated_id', $id)->exists();
|
||||
if($checkBIDExist)
|
||||
{
|
||||
$buyerData = MarketplaceBuyerForm::where('associated_id', $id)->where('status', 'Sold')->get();
|
||||
@@ -104,7 +105,7 @@ class MarketplaceAlternativeInvestmentFundSeller extends Model
|
||||
$getAIFData = MarketplaceAlternativeInvestmentFundSeller::where('id',$buyerData[0]->associated_id)->first();
|
||||
$aifData = (int)$getAIFData->no_of_units_you_wish_to_sell;
|
||||
$remainUnits = $aifData - $totalSellUnits;
|
||||
if($remainUnits <= 0)
|
||||
if($remainUnits == 0 || $remainUnits < 0)
|
||||
{
|
||||
return 'SOLD';
|
||||
}else{
|
||||
@@ -112,7 +113,7 @@ class MarketplaceAlternativeInvestmentFundSeller extends Model
|
||||
}
|
||||
}
|
||||
}else{
|
||||
return 'OPEN';
|
||||
return 'OPEN end';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ use Mail;
|
||||
use App\Models\ContactUs;
|
||||
use App\Models\ContactUsAdvanced;
|
||||
use App\Mail\ReplyContactUsMail;
|
||||
use App\Mail\ReplyInvestorMail;
|
||||
|
||||
class ContactUsService
|
||||
{
|
||||
@@ -15,10 +16,14 @@ class ContactUsService
|
||||
return ContactUs::latest()->get();
|
||||
}
|
||||
|
||||
public function sendMail($email, $subject, $reply)
|
||||
public function sendMail($email, $subject, $reply, $investorMail = null)
|
||||
{
|
||||
$data['subject'] = $subject;
|
||||
$data['message'] = $reply;
|
||||
if($investorMail)
|
||||
{
|
||||
return Mail::to($email)->send(new ReplyInvestorMail($data));
|
||||
}
|
||||
return Mail::to($email)->send(new ReplyContactUsMail($data));
|
||||
}
|
||||
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
|
||||
<div class="btn_area d-flex my-15 justify-content-center ">
|
||||
<div class="submit_btn d-flex justify-content-center me-10">
|
||||
<a href="{{route('edit_investment_product',$fund->id)}}" class="btn btn-dark">Edit Product</a>
|
||||
<a href="{{route('edit_fund_product',$fund->id)}}" class="btn btn-dark">Edit Product</a>
|
||||
</div>
|
||||
<div class="submit_btn d-flex justify-content-center">
|
||||
<a href="{{ route('manage_freeu_investment') }}" class="btn btn-dark">Close</a>
|
||||
|
||||
@@ -232,11 +232,136 @@
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Content wrapper-->
|
||||
|
||||
{{-- 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>
|
||||
<!--end:::Main-->
|
||||
@endsection
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
function hello(email)
|
||||
{
|
||||
// console.log('email',email);
|
||||
$('#to_email').html(email);
|
||||
$('#email_send').val(email);
|
||||
// $('#subject').val(subject);
|
||||
// $('#contact_us_id').val(contactUsId);
|
||||
$('#send_mail_reply').modal('show');
|
||||
// alert('hello');
|
||||
}
|
||||
$('#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);
|
||||
// },
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
// $('.manage_investor_kyc_view').on('click',function (){
|
||||
function returnRedirect(page){
|
||||
|
||||
@@ -69,12 +69,12 @@
|
||||
</div>
|
||||
<div class="col-md-6 my-3">
|
||||
<div class="veiw_detials_area">
|
||||
<label> <b class='fw-bold'>Current Market Value of the Property</b>: {{$data->current_market_value_of_the_property}}</label>
|
||||
<label> <b class='fw-bold'>Current Market Value of the Property</b>: {{$data->og_current_market_value_of_the_property}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 my-3">
|
||||
<div class="veiw_detials_area">
|
||||
<label> <b class='fw-bold'>Expected Selling Price</b>: {{$data->expected_selling_price}}</label>
|
||||
<label> <b class='fw-bold'>Expected Selling Price</b>: {{$data->og_expected_selling_price}}</label>
|
||||
</div>
|
||||
</div>
|
||||
{{--<div class="show_document_area d-flex align-items-center justify-content-between my-6" >
|
||||
@@ -180,7 +180,7 @@
|
||||
</div>
|
||||
<div class="col-md-6 my-3">
|
||||
<div class="veiw_detials_area">
|
||||
<label> <b class='fw-bold'>No of Units you wish to Sell</b>: {{$data->no_of_units_you_wish_to_sell}}</label>
|
||||
<label> <b class='fw-bold'>No of Units you wish to Sell</b>: {{$data->or_no_of_units_you_wish_to_sell}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 my-3">
|
||||
@@ -282,6 +282,7 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(!$anyOneBuyed)
|
||||
@if($data->status == 'Pending')
|
||||
<div class="btn_area d-flex my-15 justify-content-center ">
|
||||
<div class="submit_btn d-flex justify-content-center me-10">
|
||||
@@ -308,6 +309,7 @@
|
||||
<a onclick="listingStatus({{$data->id}},'Pending','{{$tableName}}')" href="javascript:void(0)" class="btn btn-dark">Pending</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
<!--end::Card body-->
|
||||
|
||||
107
resources/views/Admin/email/reply-mail-investor.blade.php
Normal file
107
resources/views/Admin/email/reply-mail-investor.blade.php
Normal file
@@ -0,0 +1,107 @@
|
||||
<!doctype html>
|
||||
|
||||
<html lang="en-US">
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<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.
|
||||
|
||||
</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;">
|
||||
|
||||
© 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>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
|
||||
|
||||
</html>
|
||||
@@ -334,7 +334,7 @@
|
||||
function fetch_data(page, query, categories, assetType, geographicFocus) {
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: "/primary-investment/fetch_data?page=" +
|
||||
url: "http://localhost/jericho_28_march/primary-investment/fetch_data?page=" +
|
||||
page +
|
||||
"&query=" + query + "&categories=" + categories + "&assetType=" +
|
||||
assetType +
|
||||
|
||||
@@ -570,7 +570,9 @@ Route::middleware([BackendAccess::class])->group(function () {
|
||||
|
||||
// Manage Investors
|
||||
Route::controller(ManageInvestorController::class)->group(function () {
|
||||
|
||||
Route::get("manage_investors", 'index')->name('manage_investors');
|
||||
Route::post("reply-investor-mail", 'replyInvestorMail')->name('reply-investor-mail');
|
||||
Route::get("view_investors_details/{id}", 'view_investors_details')->name('view_investors_details');
|
||||
Route::get("manage-investor-kyc", 'manage_investor_kyc')->name('manage_investor_kyc');
|
||||
Route::get("manage-investor-kyc-view/{id}", 'manageInvestorKYCIndividual')->name('manage_investor_view');
|
||||
|
||||
Reference in New Issue
Block a user