From fe8d7cf7f7aab42611fe151241d931173321b8d3 Mon Sep 17 00:00:00 2001 From: Ritikesh yadav Date: Wed, 15 May 2024 14:39:18 +0530 Subject: [PATCH] fixing changes --- app/Http/Controllers/Admin/OverviewController.php | 1 + app/Http/Controllers/AuthController.php | 7 +++++++ app/Http/Controllers/Frontend/DashboardController.php | 1 + app/Http/Controllers/Frontend/HomeController.php | 2 +- app/Imports/AlternativeInvestmentFundImport.php | 7 +++---- app/helper.php | 11 +++++++++++ .../alternative-investment-fund.blade.php | 6 +++--- .../market-list/alternative-investment-fund.blade.php | 6 +++--- .../market-list/fractional-real-estate.blade.php | 2 +- .../components/private-credit-fund-product.blade.php | 5 +++-- routes/api.php | 1 + 11 files changed, 35 insertions(+), 14 deletions(-) diff --git a/app/Http/Controllers/Admin/OverviewController.php b/app/Http/Controllers/Admin/OverviewController.php index d5308e9..4421491 100644 --- a/app/Http/Controllers/Admin/OverviewController.php +++ b/app/Http/Controllers/Admin/OverviewController.php @@ -326,6 +326,7 @@ class OverviewController extends Controller } elseif ($table == 3) { $data = MarketplaceOtherProductsSeller::with('seller')->where('id', $id)->firstOrFail(); } + // dd($data); return view('Admin.Pages.pre_owned_investment.pending_investment_view', compact('data', 'table')); } diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php index 5dc3df4..981697a 100644 --- a/app/Http/Controllers/AuthController.php +++ b/app/Http/Controllers/AuthController.php @@ -1037,6 +1037,13 @@ class AuthController extends Controller return response()->json(['status' => 200, 'otp' => $otp, 'message' => 'OTP has been sent successfully!']); } + + public function getConvertedIntoDate(Request $request) + { + $date = $request->date; + return getConvertedDate($date); + } + public function enteredOtp(Request $request) { // dd($request->all(),Session::get('user-registration')); diff --git a/app/Http/Controllers/Frontend/DashboardController.php b/app/Http/Controllers/Frontend/DashboardController.php index a0be52b..85690fe 100644 --- a/app/Http/Controllers/Frontend/DashboardController.php +++ b/app/Http/Controllers/Frontend/DashboardController.php @@ -608,6 +608,7 @@ class DashboardController extends Controller public function marketplaceAIFForm(Request $request) { + // dd($request->all()); $validator = Validator::make($request->all(), [ 'name_of_the_aif_fund' => 'required', 'fund_category' => 'required', diff --git a/app/Http/Controllers/Frontend/HomeController.php b/app/Http/Controllers/Frontend/HomeController.php index d2cebc5..84486f2 100644 --- a/app/Http/Controllers/Frontend/HomeController.php +++ b/app/Http/Controllers/Frontend/HomeController.php @@ -49,7 +49,7 @@ class HomeController extends Controller public function getAllTopPickProducts() { - $data['data'] = Product::getAllDetails()->where('top_pick',true)->where('products.status',1)->get(); + $data['data'] = Product::getAllDetails()->where('top_pick',true)->where('products.status',1)->where('categories.status',true)->get(); // dd($data['data']); // foreach($data['data'] as $row) // { diff --git a/app/Imports/AlternativeInvestmentFundImport.php b/app/Imports/AlternativeInvestmentFundImport.php index 5a3ae89..83d155d 100644 --- a/app/Imports/AlternativeInvestmentFundImport.php +++ b/app/Imports/AlternativeInvestmentFundImport.php @@ -53,7 +53,6 @@ class AlternativeInvestmentFundImport implements ToCollection, WithHeadingRow public function collection(Collection $rows) { Validator::make($rows->toArray(), $this->rules(), $this->customValidationMessages($rows))->validate(); - // dd($rows); foreach ($rows as $row) { $product = Product::create([ 'tables_id' => Table::AlternativeInvestmentFundTable, @@ -84,9 +83,9 @@ class AlternativeInvestmentFundImport implements ToCollection, WithHeadingRow 'auditor' => $row['auditor'], 'valuer_tax_advisor' => $row['valuertax_advisor'] ?? null, 'credit_rating' => $row['credit_rating_if_any'] ?? null, - 'open_date' => $row['open_date'], - 'first_close_date' => $row['1st_close_date'], - 'final_close_date' => $row['final_close_date'], + 'open_date' => getConvertedDate($row['open_date']), + 'first_close_date' => getConvertedDate($row['1st_close_date']), + 'final_close_date' => getConvertedDate($row['final_close_date']), 'tenure_from_final_date' => $row['tenure_from_final_close'], 'commitment_period' => $row['commitment_period'], 'native_currency' => $row['native_currency'], diff --git a/app/helper.php b/app/helper.php index c51d7ea..9e7a073 100644 --- a/app/helper.php +++ b/app/helper.php @@ -41,6 +41,17 @@ function getUnreadMessage() return Chat::where(['user_id'=>auth()->guard('users')->user()->id,'is_read'=>false])->count(); } +function getConvertedDate($date) +{ + if(strlen($date) == 8) + { + $dateArray = str_split($date,4); + $newDate = str_split($dateArray[0],2); + return (string)$newDate[0].'-'.(string)$newDate[1].'-'.(string)$dateArray[1]; + } + return null; +} + function imagePath($path = null) { $finalPath = "https://staging.jerichoalternatives.in/"; diff --git a/resources/views/Admin/Pages/manage_freeu_investment/edit-product/alternative-investment-fund.blade.php b/resources/views/Admin/Pages/manage_freeu_investment/edit-product/alternative-investment-fund.blade.php index 6e9fe6a..b9b4c73 100644 --- a/resources/views/Admin/Pages/manage_freeu_investment/edit-product/alternative-investment-fund.blade.php +++ b/resources/views/Admin/Pages/manage_freeu_investment/edit-product/alternative-investment-fund.blade.php @@ -542,7 +542,7 @@ - + @@ -564,7 +564,7 @@ - + @@ -586,7 +586,7 @@ - + diff --git a/resources/views/Frontend/Pages/profile/market-list/alternative-investment-fund.blade.php b/resources/views/Frontend/Pages/profile/market-list/alternative-investment-fund.blade.php index ae0bba1..7c516e5 100644 --- a/resources/views/Frontend/Pages/profile/market-list/alternative-investment-fund.blade.php +++ b/resources/views/Frontend/Pages/profile/market-list/alternative-investment-fund.blade.php @@ -119,7 +119,7 @@

Declaration

-