This portal only for GCC Officers. Based on there roles and Group ID they can view there module`s Like PGR, QR Public Asset Feedback, Makkalai Thedi Mayor,etc...
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.

359 lines
16 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns:th="http://www.thymeleaf.org">
  3. <head th:replace="~{fragments/modules/base/head :: head}"></head>
  4. <body>
  5. <!--[if lt IE 8]>
  6. <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>
  7. <![endif]-->
  8. <div class="wrapper">
  9. <!-- header top menu Start -->
  10. <header th:replace="~{fragments/modules/base/header :: header}"></header>
  11. <!-- header top menu end -->
  12. <div class="page-wrap">
  13. <!--=============== Left Menu side Start ================-->
  14. <div th:replace="~{fragments/modules/base/menu :: menu}"></div>
  15. <!--=============== Left side End ================-->
  16. <div class="main-content">
  17. <div class="container-fluid">
  18. <div class="page-header">
  19. <div class="row align-items-end">
  20. <div class="col-lg-8">
  21. <div class="page-header-title">
  22. <i class="ik ik-bar-chart-2 bg-blue"></i>
  23. <div class="d-inline">
  24. <h5>Dashboard</h5>
  25. <span>Main Dashboard of GCC App</span>
  26. </div>
  27. </div>
  28. </div>
  29. <div class="col-lg-4">
  30. <nav class="breadcrumb-container" aria-label="breadcrumb">
  31. <ol class="breadcrumb">
  32. <li class="breadcrumb-item">
  33. <a href="index"><i class="ik ik-home"></i></a>
  34. </li>
  35. <li class="breadcrumb-item active" aria-current="page">Dashboard</li>
  36. </ol>
  37. </nav>
  38. </div>
  39. </div>
  40. </div>
  41. <div class="row">
  42. <div class="col-lg-6 col-md-6 col-sm-12">
  43. <div class="widget">
  44. <div class="widget-header">
  45. <h3 class="widget-title">My Details</h3>
  46. <div class="widget-tools pull-right">
  47. </div>
  48. </div>
  49. <div class="widget-body" style="" id="basicUserProfile">
  50. The body of the widget
  51. </div>
  52. </div>
  53. </div>
  54. <div class="col-lg-6 col-md-6 col-sm-12">
  55. <div class="widget">
  56. <div class="widget-header">
  57. <h3 class="widget-title">தினம் ஒரு திருக்குறள்:</h3>
  58. <div class="widget-tools pull-right text-right">
  59. <img src="/gcc/files/app_uploads/icons/thiruvalluvar.jpeg" width="15%" class="rounded-circle">
  60. </div>
  61. </div>
  62. <div class="widget-body" id="kural_dashboard">
  63. <table>
  64. <tr>
  65. <td class="text-center" width="20%"><img src="/gcc/files/app_uploads/icons/thiruvalluvar.jpeg" width="90%" class="rounded"></td>
  66. <td>
  67. <div class="mb-0" style="font-size:20px;">அகர முதல எழுத்தெல்லாம</div>
  68. <div class="mb-0" style="font-size:20px;">ஆதி பகவன் முதற்றே உலக</div>
  69. <div class="mb-0 text-right">( குறள் எண் : 6 ) | <a href="javascript:void(0);" class="link"> விளக்கம்</a></div>
  70. </td>
  71. </tr>
  72. </table>
  73. </div>
  74. </div>
  75. </div>
  76. <!--
  77. <div class="col-lg-3 col-md-6 col-sm-12">
  78. <div class="widget">
  79. <div class="widget-header">
  80. <h3 class="widget-title">Your Info</h3>
  81. <div class="widget-tools pull-right"></div>
  82. </div>
  83. <div class="widget-body" id="">
  84. </div>
  85. </div>
  86. </div>
  87. -->
  88. </div>
  89. <!--
  90. <div class="row">
  91. <div class="col-md-12">
  92. <div class="card">
  93. <div class="card-header">
  94. <h3>User Profile</h3>
  95. </div>
  96. <div class="card-body">
  97. <div class="col-sm-12" id="userProfile"></div>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. -->
  103. </div>
  104. </div>
  105. <footer th:replace="~{fragments/modules/base/footer :: footer}"></footer>
  106. </div>
  107. </div>
  108. <div th:replace="~{fragments/modules/base/app_module_menu_box :: div}"></div>
  109. <script th:replace="~{fragments/modules/base/script :: script}"></script>
  110. <script th:inline="javascript">
  111. var loading_text_msg = getLoadingMessage(); // get Random loading message from base/script
  112. var createdBy = /*[[${LoginUserId}]]*/'';
  113. //alert(createdBy);
  114. // Loading Div id
  115. const loading = $("#userProfile");
  116. function call_loading(){
  117. loading.html(searchinfo("<b>"+loading_text_msg+"</b>"));
  118. }
  119. function remove_loading(){
  120. loading.html("");
  121. }
  122. /* Get Complaints Data */
  123. function get_user_basic_data(){
  124. var apiUrl = '/gcc/api/getUserProfileBasic?userId='+createdBy;
  125. //alert(apiUrl);
  126. // Return a Promise
  127. return new Promise(function(resolve, reject) {
  128. $.ajax({
  129. url: apiUrl,
  130. type: 'GET',
  131. /*dataType: 'json',*/
  132. success: function(jsonResponse) {
  133. // Resolve the Promise with the department list
  134. resolve(jsonResponse);
  135. },
  136. error: function(xhr, status, error) {
  137. // Reject the Promise with the error message
  138. reject(error);
  139. }
  140. });
  141. });
  142. }
  143. /* Get Complaints List */
  144. function get_user_basic_info(){
  145. get_user_basic_data().then(function(userProfile) {
  146. // Handle the userProfile
  147. //$("#basicUserProfile").html(userProfile);
  148. $("#basicUserProfile").html("<br><br><center>Welecome Back!</center><br><br>");
  149. }).catch(function(error) {
  150. // Handle errors
  151. if (error && error.message) {
  152. console.error('Error fetching User Profile:', error.message);
  153. } else {
  154. console.error('An error occurred while fetching user profile:', error);
  155. }
  156. });
  157. }
  158. /* Get Complaints Data */
  159. function get_user_data(){
  160. var apiUrl = '/gcc/api/getUserProfile?userId='+createdBy;
  161. //alert(apiUrl);
  162. // Return a Promise
  163. return new Promise(function(resolve, reject) {
  164. $.ajax({
  165. url: apiUrl,
  166. type: 'GET',
  167. /*dataType: 'json',*/
  168. success: function(jsonResponse) {
  169. // Resolve the Promise with the department list
  170. resolve(jsonResponse);
  171. },
  172. error: function(xhr, status, error) {
  173. // Reject the Promise with the error message
  174. reject(error);
  175. }
  176. });
  177. });
  178. }
  179. /* Get Complaints List */
  180. function get_user_info(){
  181. get_user_data().then(function(userProfile) {
  182. // Handle the userProfile
  183. $("#userProfile").html(userProfile);
  184. }).catch(function(error) {
  185. // Handle errors
  186. if (error && error.message) {
  187. console.error('Error fetching User Profile:', error.message);
  188. } else {
  189. console.error('An error occurred while fetching user profile:', error);
  190. }
  191. });
  192. }
  193. function getDailyContent_kural(){
  194. get_kural_data().then(function(data) {
  195. var kural_html =``;
  196. $.each(data, function(index, row) {
  197. kural_html =`<table>
  198. <tr>
  199. <td class="text-center" width="20%"><img src="/gcc/files/app_uploads/icons/thiruvalluvar.jpeg" width="90%" class="rounded"></td>
  200. <td>
  201. <div class="mb-0" style="font-size:20px;">${row['Line1']}</div>
  202. <div class="mb-0" style="font-size:20px;">${row['Line2']}</div>
  203. <div class="mb-0 text-right">( குறள் எண் : ${row['Number']} ) | <a href="#" onclick="return openKural(${row['Number']});" class="link"> விளக்கம் </a></div>
  204. </td>
  205. </tr>
  206. </table>`;
  207. });
  208. $("#kural_dashboard").html(kural_html);
  209. }).catch(function(error) {
  210. // Handle errors
  211. if (error && error.message) {
  212. console.error('Error fetching Kural:', error.message);
  213. } else {
  214. console.error('An error occurred while fetching Kural:', error);
  215. }
  216. });
  217. }
  218. function get_kural_data(){
  219. var apiUrl = '/gcc/api/getDailyKural';
  220. // Return a Promise
  221. return new Promise(function(resolve, reject) {
  222. $.ajax({
  223. url: apiUrl,
  224. type: 'GET',
  225. success: function(jsonResponse) {
  226. // Resolve the Promise with the department list
  227. resolve(jsonResponse);
  228. },
  229. error: function(xhr, status, error) {
  230. // Reject the Promise with the error message
  231. reject(error);
  232. }
  233. });
  234. });
  235. }
  236. function openKural(number){
  237. //alert(number);
  238. get_kural_data().then(function(data) {
  239. var kural_html =``;
  240. $.each(data, function(index, row) {
  241. kural_html =`<table class="table bg-warning" style="color:#fff">
  242. <tr>
  243. <td>
  244. <div class="mb-0" style="font-size:18px;">குறள் எண் : ${row['Number']}</div>
  245. </td>
  246. <td>
  247. <div class="mb-0" style="font-size:18px;">${row['Line1']}</div>
  248. <div class="mb-0" style="font-size:18px;">${row['Line2']}</div>
  249. </td>
  250. <td>
  251. <div class="mb-0" style="font-size:18px;">${row['transliteration1']}</div>
  252. <div class="mb-0" style="font-size:18px;">${row['transliteration2']}</div>
  253. </td>
  254. </tr>
  255. </table>
  256. <div class="row pt-10">
  257. <div class="col-md-6">
  258. <div class="card" style="min-height: 100px;margin-bottom: 10px;">
  259. <div class="card-header" style="background:#cdd6a0;padding:5px;">
  260. <h3>மு.வ விளக்கம்:</h3>
  261. <div class="card-header-right">
  262. </div>
  263. </div>
  264. <div class="card-body timeline" style="font-size:15px;">
  265. ${row['mv']}
  266. </div>
  267. </div>
  268. </div>
  269. <div class="col-md-6">
  270. <div class="card" style="min-height: 100px;margin-bottom: 10px;">
  271. <div class="card-header" style="background:#cdd6a0;padding:5px;">
  272. <h3>சாலமன் பாப்பையா விளக்கம்:</h3>
  273. <div class="card-header-right">
  274. </div>
  275. </div>
  276. <div class="card-body timeline" style="font-size:15px;">
  277. ${row['sp']}
  278. </div>
  279. </div>
  280. </div>
  281. <div class="col-md-6">
  282. <div class="card" style="min-height: 100px;margin-bottom: 10px;">
  283. <div class="card-header" style="background:#cdd6a0;padding:5px;">
  284. <h3>கலைஞர் விளக்கம்:</h3>
  285. <div class="card-header-right">
  286. </div>
  287. </div>
  288. <div class="card-body timeline" style="font-size:15px;">
  289. ${row['mk']}
  290. </div>
  291. </div>
  292. </div>
  293. <div class="col-md-6">
  294. <div class="card" style="min-height: 100px;">
  295. <div class="card-header" style="background:#cdd6a0;padding:5px;">
  296. <h3>Explanation:</h3>
  297. <div class="card-header-right">
  298. </div>
  299. </div>
  300. <div class="card-body timeline" style="font-size:15px;">
  301. ${row['explanation']}
  302. </div>
  303. </div>
  304. </div>
  305. </div>
  306. `;
  307. });
  308. $("#kuralBody").html(kural_html);
  309. $("#kuralModal").modal({
  310. backdrop: 'static',
  311. keyboard: false
  312. }); // Show Modal Box
  313. }).catch(function(error) {
  314. // Handle errors
  315. if (error && error.message) {
  316. console.error('Error fetching Kural:', error.message);
  317. } else {
  318. console.error('An error occurred while fetching Kural:', error);
  319. }
  320. });
  321. return false;
  322. }
  323. $(document).ready(function() {
  324. call_loading();
  325. //get_user_info();
  326. get_user_basic_info();
  327. getDailyContent_kural();
  328. });
  329. </script>
  330. </body>
  331. </html>