Files
freeu-project/resources/views/Frontend/Pages/profile/dashboard.blade.php
meghamalore c76b44795e bugs fixing
2024-07-01 19:28:27 +05:30

687 lines
50 KiB
PHP

@extends('Frontend.layouts.master')
@section('content')
<div>
<div class="dashboard">
<!--<div class="heading">-->
<!-- <div>-->
<!-- <h1>{{ $user->name }}</h1>-->
<!-- <p>Check your Investments and Secondary <br> Market Interactions</p>-->
<!-- </div>-->
<!-- <div>-->
<!-- <img src="{{ asset('public/assets/media/FrontendImages/13282.png') }}" alt="">-->
<!-- </div>-->
<!--</div>-->
<div class="form-tab dashboard-form">
<ul id="dashboard-tab" class="nav nav-pills nav-justified d-flex mb-2" role="tablist" data-tabs="tabs">
<li class="active">
<a class="active" id="user-tab" data-bs-toggle="tab" data-bs-target="#nav-invest" type="button"
role="tab" aria-controls="nav-invest" aria-selected="true">
Primary Dashboard
</a>
</li>
<li>
<a class="" id="market-tab" data-bs-toggle="tab" data-bs-target="#nav-email" type="button"
role="tab" aria-controls="nav-email" aria-selected="false" tabindex="-1">
Marketplace Dashboard
</a>
</li>
</ul>
<div class="container">
<div class="tab-content">
<div class="tab-pane fade active show" id="nav-invest" role="tabpanel" aria-labelledby="user-tab">
<!--<div class="personal-details">-->
<!-- <h3>Personal Details</h3>-->
<!-- <div class="row">-->
<!-- <div class="col-md-6 mb-3">-->
<!-- <div class="details">-->
<!-- <i class="fa-solid fa-circle-user"></i>-->
<!-- <p>{{ $user->name }}</p>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="col-md-6 mb-3">-->
<!-- <div class="details">-->
<!-- <i class="fa-solid fa-envelope"></i>-->
<!-- <p>{{ $user->email }}</p>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="col-md-6">-->
<!-- <div class="details">-->
<!-- <i class="fa-solid fa-phone-volume"></i>-->
<!-- <p>{{ $user->contact_no }}</p>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="col-md-6">-->
<!-- <div class="details">-->
<!-- <i class="fa-solid fa-location-dot"></i>-->
<!-- <p>{{ $user->address }}</p>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!--</div>-->
<div class="row">
<div class="col-md-4">
<div class="invest-card">
<p class="title">Total Investments Till Date</p>
<p>{{ $totalInvestmentTillDate }}</p>
</div>
</div>
<div class="col-md-4">
<div class="invest-card">
<p class="title">Active Investments</p>
<p>{{ $currentInvestmentProduct['totalInvestment'] }}</p>
</div>
</div>
<div class="col-md-4">
<div class="invest-card">
<p class="title">Investments Redeemed</p>
<p>{{ $reedemedInvestmentProduct['totalInvestment'] }}</p>
</div>
</div>
</div>
<h4 class="table-heading mb-3">Current Investments</h4>
<div class="dashboard-table">
<table id="current-investment" class="display custom-table w-100">
<thead>
<tr>
<th>Company</th>
<th>Product</th>
<th>Category</th>
<th>Date of Investment</th>
<th>Investment Amount</th>
<th>Latest Monthly Update</th>
<th>List on Market Place</th>
</tr>
</thead>
<tbody>
@foreach ($currentInvestmentProduct['productDetails'] as $product)
@php($customId = \Crypt::encrypt($product['custom_id']))
<tr>
<td class="company-img"><img src="{{ $product['company_logo'] }}" /></td>
<td>{{ $product['product_name'] }}</td>
<td>{{ $product['categories'] }}</td>
<td>{{ $product['date_of_investment'] }}</td>
<td>{{ $product['total_investment_amount_display'] }}</td>
<td class="view-box">
{{-- {{$product['company_name']}} --}}
<a href="{{ route('investment-detail', $customId) }}"
class="dwn">View</a>
</td>
<td>
<a href="{{ url('market-list/' . $customId) }}" class="dwn">List
Investment</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<h4 class="table-heading mt-3">Investment Redeemed</h4>
<div class="dashboard-table">
<table id="investment-redeemed" class="display custom-table w-100">
<thead>
<tr>
<th>Company</th>
<th>Product</th>
<th>Category</th>
<th>Date of Investment</th>
<th>Investment Amount</th>
<th>Action</th>
</tr>
</thead>
<tbody>
{{-- @dd($reedemedInvestmentProduct['productDetails']); --}}
@foreach ($reedemedInvestmentProduct['productDetails'] as $product)
@php($customId = \Crypt::encrypt($product['custom_id']))
<tr>
<td class="company-img"><img src="{{ $product['company_logo'] }}" /></td>
<td>{{ $product['product_name'] }}</td>
<td>{{ $product['categories'] }}</td>
<td>{{ $product['date_of_investment'] }}</td>
<td>{{ $product['total_investment_amount_display'] }}</td>
<td>
<a href="{{ route('investment-detail', $customId) }}"
class="dwn">View</a>
</td>
{{-- <td>
<a href="" class="dwn">Download</a>
</td> --}}
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<div class="tab-pane fade" id="nav-email" role="tabpanel" aria-labelledby="market-tab">
<ul id="market-block" class="nav nav-pills nav-justified d-flex mb-2" role="tablist"
data-tabs="tabs">
<li class="active">
<a class="active" id="bought-tab" data-bs-toggle="tab" data-bs-target="#nav-bought"
type="button" role="tab" aria-controls="nav-bought" aria-selected="true">
Investment Bought
</a>
</li>
<li>
<a class="" id="watchlist-tab" data-bs-toggle="tab"
data-bs-target="#nav-watchlist" type="button" role="tab"
aria-controls="nav-watchlist" aria-selected="false" tabindex="-1">
Investment Watchlist
</a>
</li>
<li>
<a class="" id="watchlist-tab" data-bs-toggle="tab" data-bs-target="#nav-sale"
type="button" role="tab" aria-controls="nav-sale" aria-selected="false"
tabindex="-1">
Investment On Sale
</a>
</li>
</ul>
<div class="tab-content">
<!--<div class="tab-pane fade active show" id="nav-bought" role="tabpanel" aria-labelledby="bought-tab">-->
<!-- <table id="investment-bought" class="display custom-table w-100">-->
<!-- <thead>-->
<!-- <tr>-->
<!-- <th>Name of the AIF Fund</th>-->
<!-- <th>Fund Category</th>-->
<!-- <th>Type of Fund</th>-->
<!-- <th>Fund Strategy</th>-->
<!-- <th>Total Capital Commitment </th>-->
<!-- <th>Uncalled Capital Commitment</th>-->
<!-- Add more columns as needed -->
<!-- </tr>-->
<!-- </thead>-->
<!-- <tbody>-->
<!-- <tr>-->
<!-- <td>lorem</td>-->
<!-- <td>lorem</td>-->
<!-- <td>lorem</td>-->
<!-- <td>lorem</td>-->
<!-- <td>lorem</td>-->
<!-- <td>lorem</td>-->
<!-- Add more rows as needed -->
<!-- </tr>-->
<!-- </tbody>-->
<!-- </table>-->
<!--</div>-->
<div class="tab-pane fade active show" id="nav-bought" role="tabpanel"
aria-labelledby="bought-tab">
<div class="watchlist-tab">
<ul class="nav nav-tabs">
<!--id="bought-tab" data-bs-toggle="tab" data-bs-target="#nav-bought"
type="button" role="tab" aria-controls="nav-bought"
aria-selected="true"-->
<li class="nav-item"><a class="nav-link active" data-bs-toggle="tab"
href="#tab-eight">Alternative Investment <br>Fund</a></li>
<li class="nav-item"><a class="nav-link" data-bs-toggle="tab"
href="#tab-nine">Fractional Real Estate</a></li>
<!--<li class="nav-item"><a class="nav-link" data-bs-toggle="tab"-->
<!-- href="#tab-tenth">Other Products</a></li>-->
</ul>
<div class="tab-content">
<div id="tab-eight" class="tab-pane fade show active">
<div class="table-responh2sive">
<table id="investment-bought"
class=" table display custom-table w-100">
<thead>
<tr>
<th style="min-width:150px;">Name of the AIF Fund</th>
<th style="min-width:150px;">Fund Category</th>
<th style="min-width:150px;">Type of Fund</th>
<th style="min-width:150px;">Fund Strategy</th>
<th style="min-width:150px;">Total Capital Commitment </th>
<th style="min-width:150px;">Uncalled Capital Commitment
</th>
</tr>
</thead>
<tbody>
@foreach ($aifSoldInvestmentWatchlist as $data)
<tr>
<td>{{ $data->name_of_the_aif_fund }}</td>
<td>{{ $data->getAttributes()['fund_category'] }}</td>
<td>{{ $data->type_of_fund }}</td>
<td class="text-align-left">{{ $data->fund_strategy }}</td>
<td>{{ $data->total_capital_commitment }}</td>
<td>{{ $data->uncalled_capital_commitment }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<div id="tab-nine" class="tab-pane fade">
<div class="table-responh2sive">
<table id="Lending" class=" table display custom-table w-100">
<thead>
<tr>
<th style="min-width:150px;">Property Name</th>
<th style="min-width:150px;">Property Address</th>
<th style="min-width:150px;">Property Grade</th>
<th style="min-width:150px;">Asset Type</th>
<th style="min-width:150px;">Fractional Real Estate
Platform</th>
<th style="min-width:150px;">Expected Selling Price</th>
</tr>
</thead>
<tbody>
@foreach ($freSoldInvestmentWatchlist as $data)
<tr>
<td>{{ $data->property_name }}</td>
<td>{{ $data->getAttributes()['property_address'] }}
</td>
<td>{{ $data->property_grade }}</td>
<td>{{ $data->asset_type }}</td>
<td>{{ $data->company_name }}</td>
<td>{{ number_format((float) $data->og_expected_selling_price, 0, '.', '') }}</td> </td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<div id="tab-tenth" class="tab-pane fade">
<div class="table-responh2sive">
<table id="Lending1" class=" table display custom-table w-100">
<thead>
<tr>
<th style="min-width:150px;">Security Name</th>
<th style="min-width:150px;">Product Category</th>
<th style="min-width:150px;">Instrument Type</th>
<th style="min-width:150px;">Instrument Issuer</th>
<th style="min-width:150px;">Credit Rating</th>
<th style="min-width:150px;">Expected Selling Price Per
Unit</th>
</tr>
</thead>
<tbody>
@foreach ($opSoldInvestmentWatchlist as $data)
<tr>
<td>{{ $data->security_name }}</td>
<td>{{ $data->getAttributes()['product_category'] }}
</td>
<td>{{ $data->instrument_type }}</td>
<td>{{ $data->instrument_issuer }}</td>
<td>{{ $data->credit_rating }}</td>
<td>{{ $data->expected_selling_price_per_unit }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="nav-watchlist" role="tabpanel"
aria-labelledby="watchlist-tab">
<!--<table id="investment-watchlist" class="display custom-table w-100">-->
<!-- <thead>-->
<!-- <tr>-->
<!-- <th>Property Name</th>-->
<!-- <th>Property Address</th>-->
<!-- <th>Property Grade</th>-->
<!-- <th>Asset type</th>-->
<!-- <th>Fractional Real Estate Platform</th>-->
<!-- <th>Expected Selling Price</th>-->
<!-- Add more columns as needed -->
<!-- </tr>-->
<!-- </thead>-->
<!-- <tbody>-->
<!-- <tr>-->
<!-- <td>lorem</td>-->
<!-- <td>lorem</td>-->
<!-- <td>lorem</td>-->
<!-- <td>lorem</td>-->
<!-- <td>lorem</td>-->
<!-- <td>lorem</td>-->
<!-- Add more rows as needed -->
<!-- </tr>-->
<!-- </tbody>-->
<!--</table>-->
<div class="watchlist-tab">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" data-bs-toggle="tab"
href="#tab-five">Alternative Investment <br>Fund</a></li>
<li class="nav-item"><a class="nav-link" data-bs-toggle="tab"
href="#tab-six">Fractional Real Estate</a></li>
<!--<li class="nav-item"><a class="nav-link" data-bs-toggle="tab"-->
<!-- href="#tab-seven">Other Products</a></li>-->
</ul>
<div class="tab-content">
<div id="tab-five" class="tab-pane fade show active">
<div class="table-responh2sive">
<table id="Estate2" class=" table display custom-table w-100">
<thead>
<tr>
<th style="min-width:150px;">Name Of The AIF Fund</th>
<th style="min-width:150px;">Fund Category</th>
<th style="min-width:150px;">Type Of Fund</th>
<th style="min-width:150px;">Fund Strategy</th>
<th style="min-width:150px;">Total Capital Commitment</th>
<th style="min-width:150px;">Uncalled Capital Commitment
</th>
<th style="min-width:150px;">Action
</th>
</tr>
</thead>
<tbody>
@foreach ($aifInvestmentWatchlist as $data)
{{-- @dd($data) --}}
<tr>
<td>{{ $data->name_of_the_aif_fund }}</td>
<td>{{ $data->getAttributes()['fund_category'] }}</td>
<td>{{ $data->type_of_fund }}</td>
<td class="text-align-left">{{ $data->fund_strategy }}</td>
<td>{{ IND_money_format($data->total_capital_commitment) }}
</td>
<td>{{ IND_money_format($data->uncalled_capital_commitment) }}
</td>
<td>
<a href="{{route('market_place_offering',$data->slug)}}" class="blue-btn"><i class="fa fa-eye" aria-hidden="true"></i></a>
<a data-id="{{$data->id}}" class="blue-btn delete_bid"><i class="fa fa-trash" aria-hidden="true"></i></a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<div id="tab-six" class="tab-pane fade">
<div class="table-responh2sive">
<table id="Lending3" class=" table display custom-table w-100">
<thead>
<tr>
<th style="min-width:80px;">Property Name</th>
<th style="min-width:150px;">Property Address</th>
<th style="min-width:150px;">Property Grade</th>
<th style="min-width:150px;">Asset Type</th>
<th style="min-width:150px;">Fractional Real Estate
Platform</th>
<th style="min-width:150px;">Expected Selling Price</th>
<th style="min-width:150px;">Action</th>
</tr>
</thead>
<tbody>
@foreach ($freInvestmentWatchlist as $data)
{{-- @dd($data) --}}
<tr>
<td>{{ $data->property_name }}</td>
<td>{{ $data->getAttributes()['property_address'] }}
</td>
<td>{{ $data->property_grade }}</td>
<td>{{ $data->asset_type }}</td>
<td>{{ $data->company_name }}</td>
<td>{{ IND_money_format($data->og_expected_selling_price) }}</td>
{{-- <td>{{ number_format((float) IND_money_format($data->og_expected_selling_price), 0, '.', '') }}</td> --}}
</td>
<td>
<a href="{{route('market_place_offering',$data->slug)}}" class="blue-btn"><i class="fa fa-eye" aria-hidden="true"></i></a>
<a data-id="{{$data->id}}" class="blue-btn delete_bid"><i class="fa fa-trash" aria-hidden="true"></i></a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<div id="tab-seven" class="tab-pane fade">
<div class="table-responh2sive">
<table id="Lending4" class=" table display custom-table w-100">
<thead>
<tr>
<th style="min-width:150px;">Security Name</th>
<th style="min-width:150px;">Product Category</th>
<th style="min-width:150px;">Instrument Type</th>
<th style="min-width:150px;">Instrument Issuer</th>
<th style="min-width:150px;">Credit Rating</th>
<th style="min-width:150px;">Expected Selling Price Per
Unit</th>
</tr>
</thead>
<tbody>
@foreach ($opInvestmentWatchlist as $data)
<tr>
<td>{{ $data->security_name }}</td>
<td>{{ $data->product_category }}</td>
<td>{{ $data->instrument_type }}</td>
<td>{{ $data->instrument_issuer }}</td>
<td>{{ $data->credit_rating }}</td>
<td>{{ $data->expected_selling_price_per_unit }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="nav-sale" role="tabpanel"
aria-labelledby="watchlist-tab">
<div class="watchlist-tab">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" data-bs-toggle="tab"
href="#tab-aif">Alternative Investment <br>Fund</a></li>
<li class="nav-item"><a class="nav-link" data-bs-toggle="tab"
href="#tab-fre">Fractional Real Estate</a></li>
<!--<li class="nav-item"><a class="nav-link" data-bs-toggle="tab"-->
<!-- href="#tab-op">Other Products</a></li>-->
</ul>
<div class="tab-content">
<div id="tab-aif" class="tab-pane fade show active">
<div class="table-responh2sive">
<table id="Estate1" class=" table display custom-table w-100">
<thead>
<tr>
<th style="min-width:150px;">Name Of The AIF Fund</th>
<th style="min-width:150px;">Fund Category</th>
<th style="min-width:150px;">Type Of Fund</th>
<th style="min-width:150px;">Fund Strategy</th>
<th style="min-width:150px;">Total Capital Commitment</th>
<th style="min-width:150px;">Uncalled Capital Commitment
</th>
</tr>
</thead>
<tbody>
@foreach ($marketPlaceAIFSellerData as $item)
<tr>
<td>{{ $item['name_of_the_aif_fund'] }}
</td>
<td>{{ $item['fund_category'] }}
</td>
<td>{{ $item['type_of_fund'] }}
</td>
<td class="text-align-left">{{ $item['fund_strategy'] }}
</td>
<td>{{ $item['total_capital_commitment'] }}
</td>
<td>{{ $item['uncalled_capital_commitment'] }}
</td>
</tr>
{{-- @empty
<h3>No data found</h3> --}}
@endforeach
</tbody>
</table>
</div>
</div>
<div id="tab-fre" class="tab-pane fade">
<div class="table-responh2sive">
<table id="Lending2" class=" table display custom-table w-100">
<thead>
<tr>
<th style="min-width:80px;">Property Name</th>
<th style="min-width:150px;">Property Address</th>
<th style="min-width:150px;">Property Grade</th>
<th style="min-width:150px;">Asset Type</th>
<th style="min-width:150px;">Fractional Real Estate
Platform</th>
<th style="min-width:150px;">Expected Selling Price</th>
</tr>
</thead>
<tbody>
@foreach ($marketPlaceFRESellerData as $item)
<tr>
<td>{{ $item['property_name'] }}
</td>
<td>{{ $item['property_address'] }}
</td>
<td>{{ $item['property_grade'] }}
</td>
<td>{{ $item['asset_type'] }}
</td>
<td>{{ $item['company_name'] }}
</td>
<td>{{ $item['expected_selling_price'] }}
</td>
</tr>
{{-- @empty
<h3>No data found</h3> --}}
@endforeach
</tbody>
</table>
</div>
</div>
<div id="tab-op" class="tab-pane fade">
<div class="table-responh2sive">
<table id="Lending3" class=" table display custom-table w-100">
<thead>
<tr>
<th style="min-width:150px;">Security Name</th>
<th style="min-width:150px;">Product Category</th>
<th style="min-width:150px;">Instrument Type</th>
<th style="min-width:150px;">Instrument Issuer</th>
<th style="min-width:150px;">Credit Rating</th>
<th style="min-width:150px;">Expected Selling Price Per
Unit</th>
</tr>
</thead>
<tbody>
@forelse ($marketPlaceOPSellerData as $item)
<tr>
<td>{{ $item->marketplace_op_sellers_data->security_name }}
</td>
<td>{{ $item->marketplace_op_sellers_data->product_category }}
</td>
<td>{{ $item->marketplace_op_sellers_data->instrument_type }}
</td>
<td>{{ $item->marketplace_op_sellers_data->instrument_issuer }}
</td>
<td>{{ $item->marketplace_op_sellers_data->credit_rating }}
</td>
<td>{{ $item->marketplace_op_sellers_data->expected_sale_price_per_unit }}
</td>
</tr>
@empty
<h3>No data found</h3>
@endforelse
</tbody>
</table>
</div>
</div>
</div>
</div>
{{-- <table id="investment-sale" class="display custom-table w-100">
<thead>
<tr>
<th style="min-width:150px;">Company</th>
<th style="min-width:150px;">Product</th>
<th style="min-width:150px;">Category</th>
<th style="min-width:150px;">Date of Investment</th>
<th style="min-width:150px;">Investment Amount</th>
<th style="min-width:150px;">Action</th>
<!-- Add more columns as needed -->
</tr>
</thead>
<tbody>
<tr>
<td>lorem</td>
<td>lorem</td>
<td>lorem</td>
<td>lorem</td>
<td>lorem</td>
<td>lorem</td>
<!-- Add more rows as needed -->
</tr>
</tbody>
</table> --}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('scripts')
<script>
$(document).ready(function() {
$('#current-investment').DataTable(); // Replace 'example' with the ID of your table
$('#investment-redeemed').DataTable(); // Replace 'example' with the ID of your table
$('#investment-bought').DataTable(); // Replace 'example' with the ID of your table
$('#investment-watchlist').DataTable(); // Replace 'example' with the ID of your table
$('#investment-sale').DataTable(); // Replace 'example' with the ID of your table
});
$('#Estate').DataTable();
$('#Estate1').DataTable();
$('#Estate2').DataTable();
$('#Lending').DataTable();
$('#Lending1').DataTable();
$('#Lending2').DataTable();
$('#Lending3').DataTable();
$('.delete_bid').on('click',function(){
id = $(this).data('id');
// $('#market-tab').addClass('active').prop('aria-selected',true);
// $('#bought-tab').addClass('active').prop('aria-selected',true);
// return ;
// alert(id);
url = "{{route('delete_bid')}}";
$.ajax({
url: url,
type: 'GET',
data: {
'id':id
},
success:function(result){
if(result.status == 200)
{
toastr.success(result.message);
setTimeout(() => {
window.location.reload();
}, 2000);
// setTimeout(() => {
// // window.location.reload();
// $('#user-tab').removeClass('active').prop('aria-selected',false);
// $('#bought-tab').removeClass('active').prop('aria-selected',false);
// $('#market-tab').addClass('active').prop('aria-selected',true);
// $('#watchlist-tab').addClass('active').prop('aria-selected',true);
// }, 4000);
}
else{
toastr.success(result.message);
setTimeout(() => {
window.location.reload();
}, 2000);
$('#market-tab').addClass('active').prop('aria-selected',true);
$('#watchlist-tab').addClass('active').prop('aria-selected',true);
}
}
})
})
</script>
@endsection