This commit is contained in:
meghamalore
2024-04-25 10:51:50 +05:30
100 changed files with 8806 additions and 8325 deletions

View File

@@ -282,7 +282,7 @@ class AdminProfileController extends Controller
abort(404);
}
$users = User::where(['role' => 0, 'status' => '1'])->get();
$users = User::where(['role' => false, 'status' => true])->get();
return view('Admin.Pages.manage_sub_admin.update_user_password', compact('users'));
}

View File

@@ -195,7 +195,7 @@ class DashboardController extends Controller
$userCount = User::users()->count();
$investingUserCount = MonthlyUpdateMaster::distinct('users_id')->count('users_id');
$totalProductCount = Product::count();
$leads = Lead::with('leadSource')->where('lead_owner', auth()->user()->id)->get();
$leads = Lead::with('leadSource')->where('lead_owner', auth()->user()->id)->latest()->get();
$tasks = LeadTasksMeeting::where('owner', auth()->user()->id)->tasks()->get();
$meetings = LeadTasksMeeting::where('host', (string)auth()->user()->id)->meetings()->get();
// dd($meetings);

View File

@@ -289,7 +289,7 @@ class ManageFreeUInvestmentController extends Controller
]);
$category_type = $request->category_id;
Excel::import(new BondImport($category_type), $request->file('productFile'));
return back()->with('success', 'Bonds Imported Successfully.');
return redirect()->route('manage.products')->with('success', 'Bonds Imported Successfully.');
}
public function viewBond($id)
@@ -432,7 +432,7 @@ class ManageFreeUInvestmentController extends Controller
]);
$category_type = $request->category_id;
Excel::import(new FundImport($category_type), $request->file('productFile'));
return back()->with('success', 'Funds Imported Successfully.');
return redirect()->route('manage.products')->with('success', 'Funds Imported Successfully.');
}
public function viewFund($id)
@@ -614,7 +614,7 @@ class ManageFreeUInvestmentController extends Controller
]);
$category_type = $request->category_id;
Excel::import(new StockFundsRealEstateExchangeImport($category_type), $request->file('productFile'));
return back()->with('success', 'Exchange Imported Successfully.');
return redirect()->route('manage.products')->with('success', 'Exchange Imported Successfully.');
}
public function viewExchange($id)
@@ -770,7 +770,7 @@ class ManageFreeUInvestmentController extends Controller
]);
$category_type = $request->category_id;
Excel::import(new RealEstateImport($category_type), $request->file('productFile'));
return back()->with('success', 'Real Estate Imported Successfully.');
return redirect()->route('manage.products')->with('success', 'Real Estate Imported Successfully.');
}
public function viewRealEstate($id)

View File

@@ -58,7 +58,7 @@ class FractionalRealEstateController extends Controller
$category = Category::find($request->category_id);
Excel::import(new FractionalRealEstateImport($category_type), $request->file('productFile'));
// return back()->with('success', 'Product Imported Successfully.');
return back()->with('success', "$category->category_name Imported Successfully.");
return redirect()->route('manage.products')->with('success', "$category->category_name Imported Successfully.");
}
/**

View File

@@ -57,7 +57,7 @@ class VentureCapitalFundController extends Controller
$category = Category::find($request->category_id);
Excel::import(new AlternativeInvestmentFundImport($category_type), $request->file('productFile'));
// return back()->with('success', "$category->category_name Imported Successfully.");
return back()->with('success', "$category->category_name Imported Successfully.");
return redirect()->route('manage.products')->with('success', "$category->category_name Imported Successfully.");
}
/**

View File

@@ -272,11 +272,11 @@ class ManageInvestorController extends Controller
if ($request->dropdownValue == 'Individual' || $request->dropdownValue == 'HUF' || $request->dropdownValue == 'NRI' || $request->dropdownValue == 'Company' || $request->dropdownValue == 'Partnership' || $request->dropdownValue == 'Others') {
$data->where('kyc_type', $request->dropdownValue);
};
$data->latest()->select('*');
$data->orderBy('updated_at','desc')->select('*');
return Datatables::of($data)->addIndexColumn()
// return Datatables::of($data)
->editColumn('created_at', function ($row) {
$formattedDate = $row->created_at->format('d/m/Y');
$formattedDate = $row->updated_at->format('d/m/Y');
return '<div class="badge badge-light fw-bold">' . $formattedDate . '</div>';
})
->editColumn('name', function ($row) {
@@ -293,7 +293,7 @@ class ManageInvestorController extends Controller
$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">
<i class="fa-regular fa-eye"></i>
</a>
<a href="' . route("view_investors_details", $row->users_id) . '" class="action_icon" data-bs-toggle="tooltip" data-bs-custom-class="tooltip-inverse" data-bs-placement="top" title="View Invetsor Profile">
<a href="' . route("view_investors_details", $row->users_id) . '" onclick=returnRedirect("manage_investor_kyc") class="action_icon" data-bs-toggle="tooltip" data-bs-custom-class="tooltip-inverse" data-bs-placement="top" title="View Invetsor Profile">
<i class="fa-solid fa-user"></i>
</a>
<a class="action_icon" data-bs-toggle="tooltip" onclick="kycRejectStatus(' . $row->id . ')" data-bs-custom-class="tooltip-inverse" data-bs-placement="top" title="Rejected">
@@ -304,7 +304,7 @@ class ManageInvestorController extends Controller
$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">
<i class="fa-regular fa-eye"></i>
</a>
<a href="' . route("view_investors_details", $row->users_id) . '" class="action_icon" data-bs-toggle="tooltip" data-bs-custom-class="tooltip-inverse" data-bs-placement="top" title="View Invetsor Profile">
<a href="' . route("view_investors_details", $row->users_id) . '" onclick=returnRedirect("manage_investor_kyc") class="action_icon" data-bs-toggle="tooltip" data-bs-custom-class="tooltip-inverse" data-bs-placement="top" title="View Invetsor Profile">
<i class="fa-solid fa-user"></i>
</a>
<a class="action_icon" data-bs-toggle="tooltip" onclick="kycApproveStatus(' . $row->id . ')" data-bs-custom-class="tooltip-inverse" data-bs-placement="top" title="Approved">
@@ -315,7 +315,7 @@ class ManageInvestorController extends Controller
$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">
<i class="fa-regular fa-eye"></i>
</a>
<a href="' . route("view_investors_details", $row->users_id) . '" class="action_icon" data-bs-toggle="tooltip" data-bs-custom-class="tooltip-inverse" data-bs-placement="top" title="View Invetsor Profile">
<a href="' . route("view_investors_details", $row->users_id) . '" onclick=returnRedirect("manage_investor_kyc") class="action_icon" data-bs-toggle="tooltip" data-bs-custom-class="tooltip-inverse" data-bs-placement="top" title="View Invetsor Profile">
<i class="fa-solid fa-user"></i>
</a>
<a class="action_icon" data-bs-toggle="tooltip" onclick="kycApproveStatus(' . $row->id . ')" data-bs-custom-class="tooltip-inverse" data-bs-placement="top" title="Approved">

View File

@@ -113,9 +113,12 @@ class ManageLeadController extends Controller
]);
}
public function downloadFile($file_name)
public function downloadFile(Request $request )
{
return $this->lead->download($file_name);
// dd($file_name);
$path = $request->query('path');
// dd("hello",$request->query('path'),$path['path']);
return $this->lead->download($path['path']);
}
public function editLead($id)

View File

@@ -58,7 +58,7 @@ class ManageSubAdminController extends Controller
if (!$check) {
abort(404);
}
$subAdmin = User::where(['role' => 2, 'status' => 1])->whereNotIn('id', [auth()->user()->id])->latest()->get();
$subAdmin = User::where(['role' => 2, 'status' => 1])->whereNotIn('id', [auth()->user()->id])->orderBy('last_login','desc')->get();
// $subAdmin = User::where('status', 1)->whereIn('role', ['1', '2'])->whereNotIn('id', [auth()->user()->id])->latest()->get();
// dd($subAdmin);
return view('Admin.sub_admin_list', ['subAdmin' => $subAdmin]);

View File

@@ -16,6 +16,8 @@ use Illuminate\Support\Facades\Validator;
use App\Models\MarketplaceOtherProductsSeller;
use App\Models\MarketplaceFractionalRealEstateSeller;
use App\Models\MarketplaceAlternativeInvestmentFundSeller;
use App\Exports\InvestmentExport;
use Excel;
class OverviewController extends Controller
{
@@ -31,7 +33,82 @@ class OverviewController extends Controller
$aifMarketPlace = MarketplaceAlternativeInvestmentFundSeller::where('status', 'Approved')->latest()->get();
$freMarketPlace = MarketplaceFractionalRealEstateSeller::where('status', 'Approved')->latest()->get();
$opMarketPlace = MarketplaceOtherProductsSeller::where('status', 'Approved')->latest()->get();
return view('Admin.Pages.pre_owned_investment.pre_owned_investment', compact('aifMarketPlace', 'freMarketPlace', 'opMarketPlace', 'totalSellerProfile', 'completedTransactions', 'totalInvestmentListed'));
$allMarketPlace = collect();
foreach($aifMarketPlace as $data)
{
$data->table = 'marketplace_aif_sellers';
$allMarketPlace->push($data);
}
foreach($freMarketPlace as $data)
{
$data->table = 'marketplace_fre_sellers';
$allMarketPlace->push($data);
}
$allMarketPlace = $allMarketPlace->sortByDesc('created_at');
// dd($allMarketPlace);
return view('Admin.Pages.pre_owned_investment.pre_owned_investment', compact('aifMarketPlace', 'freMarketPlace', 'opMarketPlace', 'totalSellerProfile', 'completedTransactions', 'totalInvestmentListed','allMarketPlace'));
}
public function downloadInvestment()
{
// $aifMarketPlace = MarketplaceAlternativeInvestmentFundSeller::with(['seller' => function($query){$query->select('name as SellerName','email as Email','contact_number as Contact')->get();}])->where('status', 'Approved')->latest()->select('name_of_the_aif_fund as Product','expected_sale_per_unit as ExpectedSellingPrice','listing_status as ListingStatus')->get();
$aifMarketPlace = MarketplaceAlternativeInvestmentFundSeller::with('seller')->where('status', 'Approved')->latest()->get();
$freMarketPlace = MarketplaceFractionalRealEstateSeller::with('seller')->where('status', 'Approved')->latest()->get();
// $aifMarketPlace = MarketplaceAlternativeInvestmentFundSeller::with('seller')->where('status', 'Approved')->latest()->get();
// $freMarketPlace = MarketplaceFractionalRealEstateSeller::with('seller')->where('status', 'Approved')->latest()->get();
$allMarketPlace = collect();
$newData = [];
$count = 0;
foreach($aifMarketPlace as $data)
{
// $data['table'] = 'marketplace_aif_sellers';
// $newData[$count]['Product'] = $data->name_of_the_aif_fund;
// $newData[$count]['ExpectedSellingPrice'] = $data->expected_sale_per_unit ;
// $newData[$count]['SellerName'] = $data->seller->name;
// $newData[$count]['Email'] = $data->seller->email;
// $newData[$count]['Contact'] = $data->seller->contact_number;
// $newData[$count]['ListingStatus'] = $data->listing_status;
// $newData[$count]['CreatedAt'] = $data->created_at->format('F d, o');
$newData = array(
"Product" => $data->name_of_the_aif_fund,
"ExpectedSellingPrice" => $data->expected_sale_per_unit,
"SellerName" => $data->seller->name,
"Email" => $data->seller->email,
"Contact" => $data->seller->contact_number,
"ListingStatus" => $data->listing_status,
"CreatedAt" => $data->created_at->format('F d, o')
);
$allMarketPlace->push($newData);
$count++;
}
foreach($freMarketPlace as $data)
{
// $newData[$count]['Product'] = $data->property_name;
// $newData[$count]['ExpectedSellingPrice'] = $data->expected_selling_price ;
// $newData[$count]['SellerName'] = $data->seller->name;
// $newData[$count]['Email'] = $data->seller->email;
// $newData[$count]['Contact'] = $data->seller->contact_number;
// $newData[$count]['ListingStatus'] = $data->listing_status;
// $newData[$count]['CreatedAt'] = $data->created_at->format('F d, o');
$newData = array(
"Product" => $data->property_name,
"ExpectedSellingPrice" => $data->expected_selling_price ,
"SellerName" => $data->seller->name,
"Email" => $data->seller->email,
"Contact" => $data->seller->contact_number,
"ListingStatus" => $data->listing_status,
"CreatedAt" => $data->created_at->format('F d, o')
);
$allMarketPlace->push($newData);
$count++;
}
// dd($allMarketPlace->sortByDesc('created_at'));
// return $allMarketPlace->sortByDesc('created_at');
// dd($allMarketPlace);
return Excel::download(new InvestmentExport($allMarketPlace), 'investmentExport.xlsx');
}
public function interestedBuyers($id, $table)