You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

217 lines
9.5 KiB

<!DOCTYPE html>
<html lang="en" dir="">
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/modules/base/head :: head}"></head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="wrapper">
<!-- header top menu Start -->
<header th:replace="~{fragments/modules/base/header :: header}"></header>
<!-- header top menu end -->
<div class="page-wrap">
<!--=============== Left Menu side Start ================-->
<div th:replace="~{fragments/modules/base/menu :: menu}"></div>
<!--=============== Left side End ================-->
<div class="main-content">
<div class="container-fluid">
<div class="page-header">
<div class="row align-items-end">
<div class="col-lg-8">
<div class="page-header-title">
<i class="ik ik-user bg-blue"></i>
<div class="d-inline">
<h5>User</h5>
<span>Details</span>
</div>
</div>
</div>
<div class="col-lg-4">
<nav class="breadcrumb-container" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="/election"><i class="ik ik-home"></i></a>
</li>
<li class="breadcrumb-item active" aria-current="page">Dashboard</li>
</ol>
</nav>
</div>
</div>
</div>
<!-- <div class="row">
<div class="col-lg-3 col-md-6 col-sm-12">
<div class="widget">
<div class="widget-header">
<h3 class="widget-title">My Details</h3>
<div class="widget-tools pull-right">
</div>
</div>
<div class="widget-body" style="" id="basicUserProfile">
The body of the widget
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="widget">
<div class="widget-header">
<h3 class="widget-title">தினம் ஒரு திருக்குறள்:</h3>
<div class="widget-tools pull-right text-right">
<img src="/gcc/files/app_uploads/icons/thiruvalluvar.jpeg" width="15%" class="rounded-circle">
</div>
</div>
<div class="widget-body">
<table>
<tr>
<td clas="text-center" width="20%"><img src="/gcc/files/app_uploads/icons/thiruvalluvar.jpeg" width="90%" class="rounded"></td>
<td>
<div class="mb-0" style="font-size:20px;">அகர முதல எழுத்தெல்லாம</div>
<div class="mb-0" style="font-size:20px;">ஆதி பகவன் முதற்றே உலக</div>
<div class="mb-0 text-right">( குறள் எண் : 6 ) | <a href="javascript:void(0);" class="link"> விளக்கம்</a>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 col-sm-12">
<div class="widget">
<div class="widget-header">
<h3 class="widget-title">Your Info</h3>
<div class="widget-tools pull-right"></div>
</div>
<div class="widget-body" id="">
</div>
</div>
</div>
</div> -->
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h3>User Profile</h3>
</div>
<div class="card-body">
<div class="col-sm-12" id="userProfile"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
</div>
</div>
<div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
<script th:replace="~{fragments/modules/base/script :: script}"></script>
<script th:inline="javascript">
var loading_text_msg = getLoadingMessage(); // get Random loading message from base/script
var createdBy = /*[[${LoginUserId}]]*/'';
//alert(createdBy);
// Loading Div id
const loading = $("#userProfile");
function call_loading(){
loading.html(searchinfo("<b>"+loading_text_msg+"</b>"));
}
function remove_loading(){
loading.html("");
}
/* Get Complaints Data */
function get_user_basic_data(){
var apiUrl = '/election/api/getUserProfileBasic?userId='+createdBy;
//alert(apiUrl);
// Return a Promise
return new Promise(function(resolve, reject) {
$.ajax({
url: apiUrl,
type: 'GET',
/*dataType: 'json',*/
success: function(jsonResponse) {
// Resolve the Promise with the department list
resolve(jsonResponse);
},
error: function(xhr, status, error) {
// Reject the Promise with the error message
reject(error);
}
});
});
}
/* Get Complaints List */
function get_user_basic_info(){
get_user_basic_data().then(function(userProfile) {
// Handle the userProfile
$("#basicUserProfile").html(userProfile);
}).catch(function(error) {
// Handle errors
if (error && error.message) {
console.error('Error fetching User Profile:', error.message);
} else {
console.error('An error occurred while fetching user profile:', error);
}
});
}
/* Get Complaints Data */
function get_user_data(){
var apiUrl = '/election/api/getUserProfile?userId='+createdBy;
//alert(apiUrl);
// Return a Promise
return new Promise(function(resolve, reject) {
$.ajax({
url: apiUrl,
type: 'GET',
/*dataType: 'json',*/
success: function(jsonResponse) {
// Resolve the Promise with the department list
resolve(jsonResponse);
},
error: function(xhr, status, error) {
// Reject the Promise with the error message
reject(error);
}
});
});
}
/* Get Complaints List */
function get_user_info(){
get_user_data().then(function(userProfile) {
// Handle the userProfile
$("#userProfile").html(userProfile);
}).catch(function(error) {
// Handle errors
if (error && error.message) {
console.error('Error fetching User Profile:', error.message);
} else {
console.error('An error occurred while fetching user profile:', error);
}
});
}
$(document).ready(function() {
call_loading();
get_user_info();
get_user_basic_info();
});
</script>
</body>
</html>