378 lines
16 KiB
PHP
378 lines
16 KiB
PHP
{{-- @extends('Frontend.layouts.master')
|
|
@section('style')
|
|
<style>
|
|
.page-item.active .page-link {
|
|
/* z-index: 3; */
|
|
color: #fff !important;
|
|
background-color: #113268 !important;
|
|
border-color: #113268 !important;
|
|
/* border-radius: 50%; */
|
|
/* padding: 6px 12px; */
|
|
}
|
|
|
|
.company-logo {
|
|
height: 25% !important;
|
|
}
|
|
</style>
|
|
@endsection
|
|
@section('content')
|
|
<div class="primary-investment">
|
|
|
|
<div class="container-fluid">
|
|
|
|
<h2 class="page-heading">Primary Investment Opportunities</h2>
|
|
<p class="page-desc">
|
|
<i>
|
|
Invest in Individual Funds and Exotic <br> Strategies. Personalized way of finding the <br> right
|
|
investments for
|
|
you.
|
|
</i>
|
|
</p>
|
|
<!--<d
|
|
<div class="opportunities w-100 mx-auto">
|
|
<div class="primary-tabs explore-assets">
|
|
<p class="sub-heading mb-2">Asset type</p>
|
|
<div class="d-flex gap-3 btn-group mb-3">
|
|
<button class="inactive parent-filter category-checkbox" id="financial-assets">Financial <br>
|
|
Assets</button>
|
|
<button class="inactive parent-filter category-checkbox" id="real-assets">Real <br> Assets</button>
|
|
</div>
|
|
<p class="sub-heading mb-2">Geographic Focus</p>
|
|
<div class="d-flex gap-3 btn-group mb-3">
|
|
<button class="inactive parent-filter category-checkbox" id="india"><img
|
|
src="{{ asset('public/assets/media/FrontendImages/india-map-country.svg') }}"
|
|
alt="">India</button>
|
|
<button class="inactive parent-filter category-checkbox" id="global"><img
|
|
src="{{ asset('public/assets/media/FrontendImages/login-img/global-map.png') }}"
|
|
alt="">Global</button>
|
|
</div>
|
|
<div id="categories_list">
|
|
|
|
<?php
|
|
// $checked = in_array($category->id, $urlCategories) ? 'checked' : '';
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="primary-cards display-products">iv class="parimay-card mt-4 mb-5 display-products">-->
|
|
@include('Frontend.Pages.handpicked-investment.pagination')
|
|
|
|
<!--</div>-->
|
|
</div>
|
|
<input type="hidden" name="hidden_page" id="hidden_page" value="1" />
|
|
<input type="hidden" name="asset_type" id="asset_type" />
|
|
<input type="hidden" name="geographic_focus" id="geographic_focus" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
@section('scripts')
|
|
<script>
|
|
var firstTime = true;
|
|
$(document).ready(function() {
|
|
$(`#financial-assets`).addClass('active');
|
|
listCategories();
|
|
// $('.category-checkbox').on('click', filter);
|
|
});
|
|
// $(document).ready(function() {
|
|
// $('.category-checkbox').click(filter);
|
|
// });
|
|
|
|
// Call listCategories function when Asset type or Geographic Focus changes
|
|
$('#financial-assets, #real-assets, #india, #global').on('click', function() {
|
|
listCategories();
|
|
});
|
|
|
|
|
|
function listCategories() {
|
|
// Clear the existing content only if no checkbox is selected
|
|
if ($("input[type='checkbox'][name='categories']:checked").length === 0) {
|
|
$('#categories_list').empty();
|
|
}
|
|
|
|
// Append new checkboxes if no checkbox is selected or it's the first time
|
|
if (firstTime || true) {
|
|
if ($('#financial-assets, #real-assets').hasClass('active') || $('#india, #global').hasClass('active') ||
|
|
firstTime) {
|
|
if (!$('input[type=checkbox]').is(':checked') || $('#financial-assets, #real-assets').hasClass(
|
|
'active') || $('#india, #global').hasClass('active')) {
|
|
// Append only unchecked checkboxes
|
|
$('#categories_new_list .inp-oppt').each(function() {
|
|
var checkboxValue = $(this).find("input[type='checkbox']").val();
|
|
if (!$('#categories_list').find("input[type='checkbox'][value='" + checkboxValue + "']")
|
|
.length) {
|
|
$('#categories_list').append($(this).clone());
|
|
}
|
|
});
|
|
|
|
firstTime = false;
|
|
}
|
|
}
|
|
} else {
|
|
// Uncheck selected category checkboxes when changing Asset type or Geographic Focus
|
|
$('#categories_list input[type="checkbox"]').prop('checked', false);
|
|
}
|
|
}
|
|
|
|
$('.parent-filter').click(function() {
|
|
let id = this.id;
|
|
// $('#categories_list').html('').html($('#categories_new_list').html());
|
|
// $('#categories_list').addClass('d-none');
|
|
|
|
$('#categories_list input[type="checkbox"]').prop('checked', false);
|
|
|
|
listCategories();
|
|
if (id == 'financial-assets' || id == 'real-assets') {
|
|
$(`#financial-assets , #real-assets`).removeClass('active');
|
|
$('#asset_type').val(id);
|
|
}
|
|
|
|
if (id == 'india' || id == 'global') {
|
|
$(`#india , #global`).removeClass('active');
|
|
$('#geographic_focus').val(id);
|
|
}
|
|
|
|
$(`#${id}`).addClass('active');
|
|
|
|
// console.log("parent filter called");
|
|
})
|
|
|
|
$(function() {
|
|
// var categories = "{{ $categories }}";
|
|
// var location = JSON.parse('[' + categories.slice(0,-1) + ']');
|
|
// console.log(JSON.parse(categories));
|
|
const urlParams = new URLSearchParams(window.location.search);
|
|
$('#serach').val(urlParams.get('search'));
|
|
|
|
function fetch_data(page, query, categories, assetType, geographicFocus) {
|
|
$.ajax({
|
|
type: 'get',
|
|
url: "/primary-investment/fetch_data?page=" +
|
|
page +
|
|
"&query=" + query + "&categories=" + categories + "&assetType=" +
|
|
assetType +
|
|
"&geographicFocus=" + geographicFocus,
|
|
success: function(data) {
|
|
// console.log(data);
|
|
// $('.pagination').html('');
|
|
$('.display-products').html('').html(data);
|
|
listCategories();
|
|
}
|
|
});
|
|
}
|
|
|
|
$('#serach').on('keyup', filter);
|
|
// $('.category-checkbox').on('click', filter);
|
|
$(document.body).on('click', '.category-checkbox', filter);
|
|
|
|
function filter() {
|
|
|
|
console.log("fileter is xcalled");
|
|
var query = $('#serach').val();
|
|
var categories = [];
|
|
$("input:checkbox[name=categories]:checked").each(function() {
|
|
categories.push($(this).val());
|
|
|
|
});
|
|
// alert(categories);
|
|
var page = $('#hidden_page').val();
|
|
var assetType = $('#asset_type').val();
|
|
var geographicFocus = $('#geographic_focus').val();
|
|
//fetch_data(page, query, categories);
|
|
fetch_data(page, query = '', categories, assetType, geographicFocus);
|
|
}
|
|
});
|
|
</script>
|
|
@endsection --}}
|
|
|
|
|
|
{{-- adarsh codes start --}}
|
|
@extends('Frontend.layouts.master')
|
|
@section('style')
|
|
<style>
|
|
.page-item.active .page-link {
|
|
/ z-index: 3; /
|
|
color: #fff !important;
|
|
background-color: #113268 !important;
|
|
border-color: #113268 !important;
|
|
/ border-radius: 50%; /
|
|
/ padding: 6px 12px; /
|
|
}
|
|
|
|
.company-logo {
|
|
height: 25% !important;
|
|
}
|
|
</style>
|
|
@endsection
|
|
@section('content')
|
|
<div class="primary-investment">
|
|
|
|
<div class="container-fluid">
|
|
<h2 class="page-heading">Primary Investment Opportunities</h2>
|
|
<p class="page-desc">
|
|
<i>
|
|
Invest in Individual Funds and Exotic <br> Strategies. Personalized way of finding the <br> right
|
|
investments for
|
|
you.
|
|
</i>
|
|
</p>
|
|
<div class="opportunities w-100 mx-auto">
|
|
<div class="primary-tabs explore-assets">
|
|
<p class="sub-heading mb-2">Asset type</p>
|
|
<div class="d-flex gap-3 btn-group mb-3">
|
|
<button class="inactive parent-filter category-checkbox" id="financial-assets">Financial <br>
|
|
Assets</button>
|
|
<button class="inactive parent-filter category-checkbox" id="real-assets">Real <br> Assets</button>
|
|
</div>
|
|
<p class="sub-heading mb-2">Geographic Focus</p>
|
|
<div class="d-flex gap-3 btn-group mb-3">
|
|
<button class="inactive parent-filter category-checkbox" id="india"><img
|
|
src="{{ asset('public/assets/media/FrontendImages/india-map-country.svg') }}"
|
|
alt="">India</button>
|
|
<button class="inactive parent-filter category-checkbox" id="global"><img
|
|
src="{{ asset('public/assets/media/FrontendImages/login-img/global-map.png') }}"
|
|
alt="">Global</button>
|
|
</div>
|
|
<div id="categories_list">
|
|
|
|
<?php
|
|
// $checked = in_array($category->id, $urlCategories) ? 'checked' : '';
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="primary-cards display-products">
|
|
<!--<div class="parimay-card mt-4 mb-5 display-products">-->
|
|
@include('Frontend.Pages.handpicked-investment.pagination')
|
|
|
|
<!--</div>-->
|
|
</div>
|
|
<input type="hidden" name="hidden_page" id="hidden_page" value="1" />
|
|
<input type="hidden" name="asset_type" id="asset_type" />
|
|
<input type="hidden" name="geographic_focus" id="geographic_focus" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
@section('scripts')
|
|
<script>
|
|
var firstTime = true;
|
|
$(document).ready(function() {
|
|
$(`#financial-assets`).addClass('active');
|
|
listCategories();
|
|
// $('.category-checkbox').on('click', filter);
|
|
});
|
|
// $(document).ready(function() {
|
|
// $('.category-checkbox').click(filter);
|
|
// });
|
|
|
|
// Call listCategories function when Asset type or Geographic Focus changes
|
|
$('#financial-assets, #real-assets, #india, #global').on('click', function() {
|
|
listCategories();
|
|
});
|
|
|
|
|
|
function listCategories() {
|
|
// Clear the existing content only if no checkbox is selected
|
|
if ($("input[type='checkbox'][name='categories']:checked").length === 0) {
|
|
$('#categories_list').empty();
|
|
}
|
|
|
|
// Append new checkboxes if no checkbox is selected or it's the first time
|
|
if (firstTime || true) {
|
|
if ($('#financial-assets, #real-assets').hasClass('active') || $('#india, #global').hasClass('active') ||
|
|
firstTime) {
|
|
if (!$('input[type=checkbox]').is(':checked') || $('#financial-assets, #real-assets').hasClass(
|
|
'active') || $('#india, #global').hasClass('active')) {
|
|
// Append only unchecked checkboxes
|
|
$('#categories_new_list .inp-oppt').each(function() {
|
|
var checkboxValue = $(this).find("input[type='checkbox']").val();
|
|
if (!$('#categories_list').find("input[type='checkbox'][value='" + checkboxValue + "']")
|
|
.length) {
|
|
$('#categories_list').append($(this).clone());
|
|
}
|
|
});
|
|
|
|
firstTime = false;
|
|
}
|
|
}
|
|
} else {
|
|
// Uncheck selected category checkboxes when changing Asset type or Geographic Focus
|
|
$('#categories_list input[type="checkbox"]').prop('checked', false);
|
|
}
|
|
}
|
|
|
|
$('.parent-filter').click(function() {
|
|
let id = this.id;
|
|
// $('#categories_list').html('').html($('#categories_new_list').html());
|
|
// $('#categories_list').addClass('d-none');
|
|
|
|
$('#categories_list input[type="checkbox"]').prop('checked', false);
|
|
|
|
listCategories();
|
|
if (id == 'financial-assets' || id == 'real-assets') {
|
|
$(`#financial-assets , #real-assets`).removeClass('active');
|
|
$('#asset_type').val(id);
|
|
}
|
|
|
|
if (id == 'india' || id == 'global') {
|
|
$(`#india , #global`).removeClass('active');
|
|
$('#geographic_focus').val(id);
|
|
}
|
|
|
|
$(`#${id}`).addClass('active');
|
|
|
|
// console.log("parent filter called");
|
|
})
|
|
|
|
$(function() {
|
|
// var categories = "{{ $categories }}";
|
|
// var location = JSON.parse('[' + categories.slice(0,-1) + ']');
|
|
// console.log(JSON.parse(categories));
|
|
const urlParams = new URLSearchParams(window.location.search);
|
|
$('#serach').val(urlParams.get('search'));
|
|
|
|
function fetch_data(page, query, categories, assetType, geographicFocus) {
|
|
$.ajax({
|
|
type: 'get',
|
|
url: "/primary-investment/fetch_data?page=" +
|
|
page +
|
|
"&query=" + query + "&categories=" + categories + "&assetType=" +
|
|
assetType +
|
|
"&geographicFocus=" + geographicFocus,
|
|
success: function(data) {
|
|
// console.log(data);
|
|
// $('.pagination').html('');
|
|
$('.display-products').html('').html(data);
|
|
listCategories();
|
|
}
|
|
});
|
|
}
|
|
|
|
$('#serach').on('keyup', filter);
|
|
// $('.category-checkbox').on('click', filter);
|
|
$(document.body).on('click', '.category-checkbox', filter);
|
|
|
|
function filter() {
|
|
|
|
console.log("fileter is xcalled");
|
|
var query = $('#serach').val();
|
|
var categories = [];
|
|
$("input:checkbox[name=categories]:checked").each(function() {
|
|
categories.push($(this).val());
|
|
|
|
});
|
|
// alert(categories);
|
|
var page = $('#hidden_page').val();
|
|
var assetType = $('#asset_type').val();
|
|
var geographicFocus = $('#geographic_focus').val();
|
|
//fetch_data(page, query, categories);
|
|
fetch_data(page, query = '', categories, assetType, geographicFocus);
|
|
}
|
|
});
|
|
</script>
|
|
@endsection
|
|
|
|
{{-- adarsh codes ends --}}
|