← All changes
|
includes/chat-sessions/reports/view/reporting-highlights.php
+2
-65
8.6.6
→
8.8.1
View file →
| @@ -1,11 +1,6 @@ | ||
| 1 | 1 | <?php if ( ! defined( 'ABSPATH' ) ) { exit; } ?> |
| 2 | -<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous"> | |
| 3 | 2 | |
| 4 | -<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css" integrity="sha384-4LISF5TTJX/fLmGSxO53rV4miRxdg84mZsxmO8Rx5jGtp/LbrixFETvWa5a6sESd" crossorigin="anonymous"> | |
| 5 | - | |
| 6 | -<link href="<?php echo esc_url( QCLD_wpCHATBOT_HISTORY_PLUGIN_URL . '/reports/view/assets/style.css' ); ?>" rel="stylesheet"> | |
| 7 | - | |
| 8 | 3 | <main id="main" class="main clearfix wpbot-reports-dashboard"> |
| 9 | 4 | |
| 10 | 5 | <div class="pagetitle"> |
| 11 | 6 | <h1><?php echo esc_html__( 'Bot - Reporting Dashboard', 'chatbot' ); ?></h1> |
| @@ -250,9 +245,9 @@ | ||
| 250 | 245 | <a href="<?php echo esc_url( admin_url( "admin.php?page=wbcs-botsessions-page&userid={$result->user_id}" ) ); ?>"> |
| 251 | 246 | <?php echo esc_html( $counter ); ?> |
| 252 | 247 | </a> |
| 253 | 248 | </th> |
| 254 | - <td><?php echo esc_html( date( 'd M, Y g:i A', strtotime( $result->date ) ) ); ?></td> | |
| 249 | + <td><?php echo esc_html( gmdate( 'd M, Y g:i A', strtotime( $result->date ) ) ); ?></td> | |
| 255 | 250 | <td><?php echo esc_html( $result->session_id ); ?></td> |
| 256 | 251 | <td><?php echo intval( get_user_interaction_count( $result->conversation ) ); ?></td> |
| 257 | 252 | <td> |
| 258 | 253 | <a href="<?php echo esc_url( admin_url( "admin.php?page=wbcs-botsessions-page&userid={$result->user_id}" ) ); ?>" class="btn btn-primary"> |
| @@ -374,63 +369,5 @@ | ||
| 374 | 369 | |
| 375 | 370 | </div> |
| 376 | 371 | </section> |
| 377 | 372 | |
| 378 | - </main><!-- End #main --> | |
| 379 | - | |
| 380 | - <script src="<?php echo esc_url( QCLD_wpCHATBOT_HISTORY_PLUGIN_URL . '/reports/view/assets/apexcharts.min.js' ); ?>"></script> | |
| 381 | - <script> | |
| 382 | - jQuery(document).ready(function($) { | |
| 383 | - $(".feedback-card").on("click", function() { | |
| 384 | - let type = $(this).data("type"); | |
| 385 | - $("#feedback-results").html("<p>Loading...</p>"); | |
| 386 | - | |
| 387 | - $.post(ajaxurl, { | |
| 388 | - action: "wpbot_get_feedback_ajax", | |
| 389 | - feedback_type: type | |
| 390 | - }, function(response) { | |
| 391 | - if (response.success) { | |
| 392 | - $("#feedback-results").html(response.data.html); | |
| 393 | - } else { | |
| 394 | - $("#feedback-results").html("<p>No results found.</p>"); | |
| 395 | - } | |
| 396 | - }); | |
| 397 | - }); | |
| 398 | -}); | |
| 399 | -jQuery(document).on("click", ".wpbot-page-link", function(e) { | |
| 400 | - e.preventDefault(); | |
| 401 | - | |
| 402 | - let page = jQuery(this).data("page"); | |
| 403 | - let type = jQuery(this).data("type"); | |
| 404 | - | |
| 405 | - jQuery.post(ajaxurl, { | |
| 406 | - action: "wpbot_get_feedback_ajax", | |
| 407 | - feedback_type: type, | |
| 408 | - page: page | |
| 409 | - }, function(response) { | |
| 410 | - if (response.success) { | |
| 411 | - jQuery("#feedback-results").html(response.data.html); | |
| 412 | - } | |
| 413 | - }); | |
| 414 | -}); | |
| 415 | -jQuery(document).on("click", "#wpbot-clear-feedback", function (e) { | |
| 416 | - console.log('kardi'); | |
| 417 | - e.preventDefault(); | |
| 418 | - | |
| 419 | - if (!confirm("Are you sure you want to delete all feedback?")) { | |
| 420 | - return; | |
| 421 | - } | |
| 422 | - | |
| 423 | - jQuery.post(ajaxurl, { | |
| 424 | - action: "wpbot_clear_all_feedback" | |
| 425 | - }, function (response) { | |
| 426 | - if (response.success) { | |
| 427 | - jQuery("#wpbot-clear-feedback-msg").text(response.data.message).css("color", "green"); | |
| 428 | - // Optionally reload counters | |
| 429 | - location.reload(); | |
| 430 | - } else { | |
| 431 | - jQuery("#wpbot-clear-feedback-msg").text(response.data.message).css("color", "red"); | |
| 432 | - } | |
| 433 | - }); | |
| 434 | -}); | |
| 435 | - | |
| 436 | -</script> | |
| 373 | + </main><!-- End #main --> | |