From 7fa516b99b3485cacc186a2b5bb4e3efee684df6 Mon Sep 17 00:00:00 2001 From: kshitige Date: Mon, 3 Jun 2024 13:41:23 +0530 Subject: [PATCH 1/5] fix changes --- app/Http/Controllers/AuthController.php | 8 ++++---- resources/views/Admin/view-sub-admin.blade.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php index 62dd725..cc62e3d 100644 --- a/app/Http/Controllers/AuthController.php +++ b/app/Http/Controllers/AuthController.php @@ -761,7 +761,8 @@ class AuthController extends Controller 'title' => 'Mail from ItSolutionStuff.com', 'body' => 'This is for testing email using smtp.' ]; - + Mail::to($validated['email2'])->send(new OtpMail($mailData, $otp)); + $insertOtp = RegistrationOtp::insertGetId([ 'contact_number'=>$request->contact_number2, // 'contact_otp'=>$mobile_otp, @@ -770,7 +771,6 @@ class AuthController extends Controller 'email_otp'=>$otp, 'email_expire_at'=>Carbon::now()->addMinutes('2'), ]); - Mail::to($validated['email2'])->send(new OtpMail($mailData, $otp)); // $this->thirdPartyOTP($validated['contact_number2'], $mobile_otp); // Mail::to('yadavritikesh29@gmail.com')->send(new OtpMail($mailData, $otp)); return response()->json(['status' => 200, 'message' => 'OTP has been sent to your email']); @@ -818,7 +818,7 @@ class AuthController extends Controller if ($userEmailOtpData) { $otp = rand(1000,9999); $this->thirdPartyOTP($userEmailOtpData->contact_number, $otp); - RegistrationOtp::where('email', $emailToAdd)->update(['contact_otp'=>$otp,'contact_expire_at'=>Carbon::now()->addMinutes(2)]); + RegistrationOtp::where('email', $emailToAdd)->update(['contact_otp'=>$ ,'contact_expire_at'=>Carbon::now()->addMinutes(2)]); return response()->json(['status' => 200, 'message' => 'Email OTP verified Successfully']); } } @@ -883,7 +883,7 @@ class AuthController extends Controller if ($userEmailOtpData) { $otp = rand(1000,9999); $this->thirdPartyOTP($userEmailOtpData->contact_number, $otp); - RegistrationOtp::where('email', $emailToAdd)->update(['contact_otp'=>rand(1000,9999),'contact_expire_at'=>Carbon::now()->addMinutes(2)]); + RegistrationOtp::where('email', $emailToAdd)->update(['contact_otp'=>$otp,'contact_expire_at'=>Carbon::now()->addMinutes(2)]); return response()->json(['status' => 200, 'message' => 'Email OTP verified Successfully']); } } diff --git a/resources/views/Admin/view-sub-admin.blade.php b/resources/views/Admin/view-sub-admin.blade.php index 4503e22..57c1e2d 100644 --- a/resources/views/Admin/view-sub-admin.blade.php +++ b/resources/views/Admin/view-sub-admin.blade.php @@ -343,7 +343,7 @@ {{-- --}} -
From 3a14397bca8d4bbf155202a1d67ab9a9a717c5a3 Mon Sep 17 00:00:00 2001 From: Ritikesh yadav Date: Mon, 3 Jun 2024 17:25:36 +0530 Subject: [PATCH 2/5] fixed product name issue in user commission --- .../Admin/ManageCommissionController.php | 47 ++-- public/assets/css/style.css | 19 +- .../Pages/manage_leads/edit-lead.blade.php | 252 ++++++++++-------- .../Pages/manage_leads/view-lead.blade.php | 43 +-- 4 files changed, 193 insertions(+), 168 deletions(-) diff --git a/app/Http/Controllers/Admin/ManageCommissionController.php b/app/Http/Controllers/Admin/ManageCommissionController.php index 69983bd..5702db4 100644 --- a/app/Http/Controllers/Admin/ManageCommissionController.php +++ b/app/Http/Controllers/Admin/ManageCommissionController.php @@ -58,30 +58,24 @@ class ManageCommissionController extends Controller // ->orderBy('products.created_at') ->latest('products.created_at') ->get(); - // dd($products); - $products->each(function($value){ - $monthlyData = MonthlyUpdateMaster::where('products_id',$value->id)->get(); + // dd($products); + $products->each(function ($value) { + $monthlyData = MonthlyUpdateMaster::where('products_id', $value->id)->get(); $totalCommission = 0; $totalInvestment = 0; - if($monthlyData->isNotEmpty()) - { - foreach($monthlyData as $monthlyDataRow) - { - if(MonthlyUpdateFractionalRealEstate::where('custom_id',$monthlyDataRow->custom_id)->exists()) - { - $freData = MonthlyUpdateFractionalRealEstate::where('custom_id',$monthlyDataRow->custom_id)->first(); + if ($monthlyData->isNotEmpty()) { + foreach ($monthlyData as $monthlyDataRow) { + if (MonthlyUpdateFractionalRealEstate::where('custom_id', $monthlyDataRow->custom_id)->exists()) { + $freData = MonthlyUpdateFractionalRealEstate::where('custom_id', $monthlyDataRow->custom_id)->first(); $totalInvestment += floatval($freData->getRawOriginal()['investment_value']); } - if(MonthlyUpdateAlternativeInvestmentFund::where('custom_id',$monthlyDataRow->custom_id)->exists()) - { - $aifData = MonthlyUpdateAlternativeInvestmentFund::where('custom_id',$monthlyDataRow->custom_id)->first(); + if (MonthlyUpdateAlternativeInvestmentFund::where('custom_id', $monthlyDataRow->custom_id)->exists()) { + $aifData = MonthlyUpdateAlternativeInvestmentFund::where('custom_id', $monthlyDataRow->custom_id)->first(); $totalInvestment += floatval($aifData->getRawOriginal()['commitment_amount']); } - $data = MonthlyUpdateMasterCommission::where('monthly_id',$monthlyDataRow->id)->get(); - if($data->isNotEmpty()) - { - foreach($data as $dataRow) - { + $data = MonthlyUpdateMasterCommission::where('monthly_id', $monthlyDataRow->id)->get(); + if ($data->isNotEmpty()) { + foreach ($data as $dataRow) { $totalCommission += floatval($dataRow->getRawOriginal()['gross_commissioned_earned_inr']); } } @@ -193,6 +187,12 @@ class ManageCommissionController extends Controller if (!$check) { abort(404); } + // $data = MonthlyUpdateMasterCommission::query() + // ->with('monthlyUpdate.products.fractional_real_estate') + // ->latest() + // ->get(); + // // ->select('*'); + // dd($data->toArray()); return view('Admin.Pages.manage_commission.user_commission'); } @@ -262,7 +262,7 @@ class ManageCommissionController extends Controller return '
' . $row->monthlyUpdate->investor_name . '
'; }) ->editColumn('product_sold', function ($row) { - return '
' . 'ABC' . '
'; + return '
' . $row->monthlyUpdate->product_name . '
'; }) ->editColumn('month', function ($row) { return '
' . $row->created_at->format('M') . '
'; @@ -283,11 +283,11 @@ class ManageCommissionController extends Controller - - -
"; + // + // + // return $btn; }) ->rawColumns(['investor_name', 'product_sold', 'month', 'total_investment', 'applicable_rate', 'commission_type', 'created_at', 'action']) @@ -298,8 +298,7 @@ class ManageCommissionController extends Controller public function trailCommission() { $check = checkSidebarAccess('trail-commission'); - if(!$check) - { + if (!$check) { abort(404); } return view('Admin.Pages.manage_commission.trail_commission', [ diff --git a/public/assets/css/style.css b/public/assets/css/style.css index 9d44456..21b0d5f 100644 --- a/public/assets/css/style.css +++ b/public/assets/css/style.css @@ -1306,7 +1306,7 @@ table th, table td, .align-top { vertical-align: middle !important; - width: auto !important; + /* width: auto !important; */ } .card-body.py-4 { @@ -1352,20 +1352,29 @@ button.btn.btn-light-primary.me-3 { justify-content: flex-start !important; margin: 0 auto 0 0; } -.table.gy-5 td, .table.gy-5 th { +.table.gy-5 td, +.table.gy-5 th { padding: 1.25rem !important; } -.tabdiv input, .tabdiv select { +.tabdiv input, +.tabdiv select { border: 1px solid #e0dddd; padding: 10px !important; height: 40px; border-radius: 5px; width: 50%; } -.tabdiv input[type="checkbox"] {border: 1px solid #e0dddd !important;display: flex;width: 20px;height: 20px;justify-content: flex-start !important;margin: 0 auto 0 0;} +.tabdiv input[type="checkbox"] { + border: 1px solid #e0dddd !important; + display: flex; + width: 20px; + height: 20px; + justify-content: flex-start !important; + margin: 0 auto 0 0; +} .card { padding: 20px; } .index-box .card { min-height: 230px !important; -} \ No newline at end of file +} diff --git a/resources/views/Admin/Pages/manage_leads/edit-lead.blade.php b/resources/views/Admin/Pages/manage_leads/edit-lead.blade.php index 6645d7f..a5a4ed9 100644 --- a/resources/views/Admin/Pages/manage_leads/edit-lead.blade.php +++ b/resources/views/Admin/Pages/manage_leads/edit-lead.blade.php @@ -3,7 +3,7 @@ @section('style') - + + .dt-buttons { + display: none; + } + @endsection @section('content') -
-
-
-
-
- -
-
-
+
+
+
+
+
+ +
+
+
+
+ {{ $investingUserCount }} +
+
+ + + + + + +
+
- {{$investingUserCount}} -
-
- - - - - - + Total Investors
+  
-
- Total Investors
 
-
-
-
-
- -
-
-
+ +
+
+ +
+
+
+
+ {{ $userCount }} +
+
+ + + + + + +
+
- {{$userCount}} -
-
- - - - - - + Total Registered Users +
 
-
- Total Registered Users
 
-
-
-
-
- -
-
-
+ +
+
+ +
+
+
+
+ {{ $companyCount }} +
+
+ + + + + + +
+
- {{$companyCount}} -
-
- - - - - - + Total Manufactures + (Investment Companies)
-
- Total Manufactures (Investment Companies) -
-
-
-
- -
- -
-
-
-

Commission earned

-
-
-
- ₹ 0.0 - Gross Earn -
-
-
-
- ₹ 0.0 - Net Received -
-
-
+
+
+
+

Commission earned

+
- From - + ₹ 0.0 + Gross Earn
- To - + ₹ 0.0 + Net Received
-
- +
+
+
+ From + +
+
+
+
+ To + +
+
+
+ +
-
-
-
- +
+
+ +
-
-
-
-
-

₹ 0.0

+
+
+
+

₹ 0.0

+
+

Total Investment

-

Total Investment

-
@endsection @section('scripts') - - - + + - + + today = yyyy + '-' + mm + '-' + dd; -@endsection \ No newline at end of file + // Set max attribute for both inputs to prevent selecting future dates + document.getElementById("from-date").setAttribute("max", today); + document.getElementById("to-date").setAttribute("max", today); + + +@endsection diff --git a/resources/views/Frontend/Pages/profile/dashboard.blade.php b/resources/views/Frontend/Pages/profile/dashboard.blade.php index 01f18b7..cd12c0b 100644 --- a/resources/views/Frontend/Pages/profile/dashboard.blade.php +++ b/resources/views/Frontend/Pages/profile/dashboard.blade.php @@ -385,7 +385,7 @@ - + @endforeach