Subversion Repositories SmartDukaan

Rev

Rev 34425 | Rev 34818 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34425 Rev 34813
Line 730... Line 730...
730
$(document).on('click', '.dashboard-view', function () {
730
$(document).on('click', '.dashboard-view', function () {
731
	var fofoId = $(this).data('fofoid');
731
	var fofoId = $(this).data('fofoid');
732
 
732
 
733
	window.open(context + "/analysisDashboard?fofoId=" + fofoId, '_blank');
733
	window.open(context + "/analysisDashboard?fofoId=" + fofoId, '_blank');
734
});
734
});
-
 
735
 
-
 
736
$('#partnerTasks').modal({
-
 
737
	backdrop: 'static',   // Prevent close on outside click
-
 
738
	keyboard: false       // Prevent close on ESC key
-
 
739
});
-
 
740
 
-
 
741
const emailId = getCookie('emailId');
-
 
742
console.log("Email ID:", emailId);
-
 
743
 
-
 
744
$(document).ready(function () {
-
 
745
	$(this).removeAttr('aria-hidden');
-
 
746
	$(this).focus();
-
 
747
	$('#partnerTasks').modal('show');
-
 
748
 
-
 
749
	if (!emailId || !emailId.endsWith('@smartdukaan.com')) {
-
 
750
		// Show loader manually before AJAX call
-
 
751
		$('#chartData').html('<div class="loader text-center " style=" height: 30px;\n' +
-
 
752
			'    display: flex;\n' +
-
 
753
			'    justify-content: center;\n' +
-
 
754
			'    align-items: center;\n' +
-
 
755
			'    font-size: 1.5rem;\n' +
-
 
756
			'    font-weight: 200;\n' +
-
 
757
			'    color: #555;" >Loading...</div>');
-
 
758
 
-
 
759
		doGetAjaxRequestHandler(context + "/dashboardModal", function (response) {
-
 
760
			$('#chartData').html(response);
-
 
761
		});
-
 
762
	} else {
-
 
763
		// Show some default content or empty state
-
 
764
		$('#chartData').html('<p>No data to load</p>');
-
 
765
	}
-
 
766
});
-
 
767
$(document).on('click', '.partner-tasks-btn', function () {
-
 
768
	doGetAjaxRequestHandler(context + "/dashboardModal", function (response) {
-
 
769
		$('#chartData').html(response);
-
 
770
		$('#partnerTasks').modal('show');
-
 
771
	});
-
 
772
});
-
 
773
 
-
 
774
$('#partnerTasks').on('hidden.bs.modal', function () {
-
 
775
	$(this).data('modal', null);
-
 
776
	$('.modal-backdrop').remove();
-
 
777
	const bootstrapCss = document.getElementById('modal-bootstrap-css');
-
 
778
	if (bootstrapCss) {
-
 
779
		bootstrapCss.remove();
-
 
780
	}
-
 
781
 
-
 
782
});
-
 
783
$('#partnerTasks').css('zoom', '125%').modal('show');
735
784