From 435126502c4d2c2d5f88833ad8b41a0ed0ad45df Mon Sep 17 00:00:00 2001 From: meghamalore Date: Thu, 25 Apr 2024 10:51:37 +0530 Subject: [PATCH] new commit --- .../Controllers/Admin/DashboardController.php | 3 +- app/Http/Requests/StoreMeetingRequest.php | 3 +- ...tMontlyUpdateAlternativeInvestmentFund.php | 32 +- ...mportMontlyUpdateIndianFinancialAssets.php | 22 +- app/helper.php | 2 +- .../Pages/manage_chat/manage_chat.blade.php | 425 +++++++++--------- .../manage-partner-platform.blade.php | 11 +- .../manage_user_add.blade.php | 13 +- .../Pages/manage_leads/add_lead.blade.php | 17 +- 9 files changed, 281 insertions(+), 247 deletions(-) diff --git a/app/Http/Controllers/Admin/DashboardController.php b/app/Http/Controllers/Admin/DashboardController.php index ac799df..e1e999e 100644 --- a/app/Http/Controllers/Admin/DashboardController.php +++ b/app/Http/Controllers/Admin/DashboardController.php @@ -197,7 +197,8 @@ class DashboardController extends Controller $totalProductCount = Product::count(); $leads = Lead::with('leadSource')->where('lead_owner', auth()->user()->id)->get(); $tasks = LeadTasksMeeting::where('owner', auth()->user()->id)->tasks()->get(); - $meetings = LeadTasksMeeting::where('host', auth()->user()->id)->meetings()->get(); + $meetings = LeadTasksMeeting::where('host', (string)auth()->user()->id)->meetings()->get(); + // dd($meetings); $users = User::admins()->get(); return view('Admin.personal-dashboard', compact('companyCount', 'a', 'leads', 'tasks', 'meetings','users','userCount','investingUserCount','totalProductCount')); } diff --git a/app/Http/Requests/StoreMeetingRequest.php b/app/Http/Requests/StoreMeetingRequest.php index 9839d49..58ee288 100644 --- a/app/Http/Requests/StoreMeetingRequest.php +++ b/app/Http/Requests/StoreMeetingRequest.php @@ -44,7 +44,8 @@ class StoreMeetingRequest extends FormRequest public function validated(){ return array_merge(parent::validated(), [ 'status' => $this->status ? '1' : '0', - 'created_by' => auth()->user()->id + 'created_by' => auth()->user()->id, + 'Type' => 'Meeting', ]); } } diff --git a/app/Imports/ImportMontlyUpdateAlternativeInvestmentFund.php b/app/Imports/ImportMontlyUpdateAlternativeInvestmentFund.php index b9bdaeb..b58ab51 100644 --- a/app/Imports/ImportMontlyUpdateAlternativeInvestmentFund.php +++ b/app/Imports/ImportMontlyUpdateAlternativeInvestmentFund.php @@ -46,22 +46,22 @@ class ImportMontlyUpdateAlternativeInvestmentFund implements ToCollection, With foreach ($rows as $row) { MonthlyUpdateAlternativeInvestmentFund::create([ - 'custom_id' => $row['custom_id'], - 'commitment_amount' => $row['commitment_amount'], - 'contribution_amount' => $row['contribution_amount'], - 'contribution_called_amount' => $row['contribution_called_amount'], - 'contribution_uncalled_amount' => $row['contribution_uncalled_amount'], - 'date_of_initial_contribution' => $row['date_of_initial_contribution'], - 'face_value_nav_per_unit' => $row['face_valuenav_per_unit'], - 'principal_capital_repaid' => $row['principal_capital_repaid'], - 'gross_income' => $row['gross_income'], - 'total_fees_paid' => $row['total_fees_paid_set_up_management_operating'], - 'net_income' => $row['net_income'], - 'no_of_units_alloted' => $row['no_of_units_alloted'], - 'no_of_units_redeemed' => $row['no_of_units_redeemed'], - 'current_valuation' => $row['current_valuation'], - 'current_nav' => $row['current_nav'], - 'no_of_units_held' => $row['no_of_units_held'], + 'custom_id' => $row['custom_id'] ?? null, + 'commitment_amount' => $row['commitment_amount'] ?? 0, + 'contribution_amount' => $row['contribution_amount'] ?? 0, + 'contribution_called_amount' => $row['contribution_called_amount'] ?? 0, + 'contribution_uncalled_amount' => $row['contribution_uncalled_amount'] ?? 0, + 'date_of_initial_contribution' => $row['date_of_initial_contribution'] ?? 0, + 'face_value_nav_per_unit' => $row['face_valuenav_per_unit'] ?? 0, + 'principal_capital_repaid' => $row['principal_capital_repaid'] ?? 0, + 'gross_income' => $row['gross_income'] ?? 0, + 'total_fees_paid' => $row['total_fees_paid_set_up_management_operating'] ?? 0, + 'net_income' => $row['net_income'] ?? 0, + 'no_of_units_alloted' => $row['no_of_units_alloted'] ?? 0, + 'no_of_units_redeemed' => $row['no_of_units_redeemed'] ?? 0, + 'current_valuation' => $row['current_valuation'] ?? 0, + 'current_nav' => $row['current_nav'] ?? 0, + 'no_of_units_held' => $row['no_of_units_held'] ?? 0, ]); } } diff --git a/app/Imports/ImportMontlyUpdateIndianFinancialAssets.php b/app/Imports/ImportMontlyUpdateIndianFinancialAssets.php index 352e660..d5559b6 100644 --- a/app/Imports/ImportMontlyUpdateIndianFinancialAssets.php +++ b/app/Imports/ImportMontlyUpdateIndianFinancialAssets.php @@ -50,17 +50,17 @@ class ImportMontlyUpdateIndianFinancialAssets implements ToCollection, WithHeadi foreach ($rows as $row) { MonthlyUpdateIndianFinancialAssets::create([ - 'custom_id' => $row['custom_id'], - 'investment_date' => $row['investment_date'], - 'amount_invested' => $row['amount_invested'], - 'total_gross_repaid_amount' => $row['total_gross_repaid_amount'], - 'tenure_in_days' => $row['tenure_days'], - 'principal_payment_frequency' => $row['principal_payment_frequency'], - 'interest_payment_frequency' => $row['interest_payment_frequency'], - 'next_repayment_due_date' => $row['next_repayment_due_date'], - 'maturity_date' => $row['maturity_date'], - 'next_repayment_amount' => $row['next_repayment_amount'], - 'expected_irr' => $row['expected_irr'], + 'custom_id' => $row['custom_id'] ?? null, + 'investment_date' => $row['investment_date'] ?? null, + 'amount_invested' => $row['amount_invested'] ?? null, + 'total_gross_repaid_amount' => $row['total_gross_repaid_amount'] ?? null, + 'tenure_in_days' => $row['tenure_days'] ?? null, + 'principal_payment_frequency' => $row['principal_payment_frequency'] ?? null, + 'interest_payment_frequency' => $row['interest_payment_frequency'] ?? null, + 'next_repayment_due_date' => $row['next_repayment_due_date'] ?? null, + 'maturity_date' => $row['maturity_date'] ?? null, + 'next_repayment_amount' => $row['next_repayment_amount'] ?? null, + 'expected_irr' => $row['expected_irr'] ?? null, ]); } } diff --git a/app/helper.php b/app/helper.php index 4c0258e..e856872 100644 --- a/app/helper.php +++ b/app/helper.php @@ -45,7 +45,7 @@ function imagePath($path = null) $finalPath = "https://staging.jerichoalternatives.in/"; } if (env('APP_ENV') == 'local') { - $finalPath = "http://localhost/jericho_28_march/"; + $finalPath = "http://localhost/freeu/my-freeu/"; } return $finalPath . $path; } diff --git a/resources/views/Admin/Pages/manage_chat/manage_chat.blade.php b/resources/views/Admin/Pages/manage_chat/manage_chat.blade.php index 54e595a..bf53809 100644 --- a/resources/views/Admin/Pages/manage_chat/manage_chat.blade.php +++ b/resources/views/Admin/Pages/manage_chat/manage_chat.blade.php @@ -1,37 +1,49 @@ @extends('Admin.layouts.master') @section('style') - + @endsection -@section('title','Manage Chats') +@section('title', 'Manage Chats') @section('content') -
-
-
-
-
-
-
-
- - - - - - - -
-
-
-
- {{--@foreach($users as $user) +
+
+
+
+
+
+
+
+ + + + + + + +
+
+
+
+ {{-- @foreach ($users as $user)
- @if($user->profile_image) + @if ($user->profile_image) getAttributes()['profile_image']; ?> @@ -39,7 +51,7 @@ @php($img ='https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_960_720.png') @endif Pic - @if($user->total_count) + @if ($user->total_count) {{$user->total_count}} @endif
@@ -49,193 +61,196 @@
- @endforeach--}} + @endforeach --}} +
+
+
+
+
+
+
+
+ +
+
+
+
-
-
-
-
- -
-
-
-
-
-
-
-
@endsection @section('scripts') - -@endsection \ No newline at end of file + // sending message on click on enter + $('#message').keyup(function(event) { + if (event.keyCode === 13) { + sendMsg(); + } + }); + + + function sendMsg() { + + let msg = $('#message').val(); + + let user_id = $('#user_id').val(); + // alert(user_id); + + $.ajaxSetup({ + + headers: { + + 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') + + } + + }); + + $.ajax({ + + cache: false, + + url: "{{ route('send-admin-msg') }}", + + type: "POST", + + data: { + + message: msg, + + user_id: user_id + + }, + + dataType: "json", + + success: function(result) { + + if (result.status == 200) { + + getUser($('#user_id').val()); + + $('#message').val('') + + } + + if (result.status == 400) { + + toastr.warning(result.message); + + } + + }, + + }); + + } + + function getUser(id) { + $('.spanName').each(function() { + $(this).removeClass('active'); + }) + $(`#user_${id}`).addClass('active'); + $('#user_id').val(id); + + + $.ajax({ + + url: "{{ route('get-user-for-chat') }}", + + type: "GET", + + data: { + + id: id, + + }, + + success: function(result) { + + $('.show-user').html(''); + + $('.chat-msgs').html(''); + + $('.show-user').append(result.user); + + $('.chat-msgs').append(result.chat); + + $('#kt_drawer_chat_messenger_footer').removeClass('d-none'); + + if (result.status == 400) { + + toastr.warning(result.message); + + } + + }, + + }); + + } + + function userList() { + let search = $('#search').val(); + if (search) { + return; + } + $.ajax({ + url: "{{ route('get-user-list') }}", + type: "GET", + // dataType : 'json', + success: function(result) { + if (result) { + $('.user_Detail').html('').append(result); + } + }, + }); + } + + +@endsection diff --git a/resources/views/Admin/Pages/manage_investors/manage-partner-platform.blade.php b/resources/views/Admin/Pages/manage_investors/manage-partner-platform.blade.php index 4c0a7f7..f028639 100644 --- a/resources/views/Admin/Pages/manage_investors/manage-partner-platform.blade.php +++ b/resources/views/Admin/Pages/manage_investors/manage-partner-platform.blade.php @@ -24,10 +24,10 @@
- + @foreach( $users as $userdata) - @endforeach
@@ -37,7 +37,8 @@
- + @foreach($company as $companydata) @endforeach @@ -171,8 +172,8 @@ }, messages: { - user_name: "Please enter your name", - partner_name: "Please enter your designation/company name", + user_name: "Please select user", + partner_name: "Please select partner", login: "This field is required", password: "This field is required", diff --git a/resources/views/Admin/Pages/manage_investors/manage_user_product/manage_user_add.blade.php b/resources/views/Admin/Pages/manage_investors/manage_user_product/manage_user_add.blade.php index eee3e0c..a285c7a 100644 --- a/resources/views/Admin/Pages/manage_investors/manage_user_product/manage_user_add.blade.php +++ b/resources/views/Admin/Pages/manage_investors/manage_user_product/manage_user_add.blade.php @@ -204,7 +204,7 @@ Date of Initial Contribution - +