فهرست منبع

feat: use checkin dialog instead of page refresh

M1Screw 1 سال پیش
والد
کامیت
60e6fb6ff8
38فایلهای تغییر یافته به همراه83 افزوده شده و 68 حذف شده
  1. 4 3
      app/routes.php
  2. 3 3
      composer.json
  3. 19 19
      composer.lock
  4. 1 1
      resources/views/tabler/admin/coupon.tpl
  5. 1 1
      resources/views/tabler/admin/detect.tpl
  6. 1 1
      resources/views/tabler/admin/giftcard.tpl
  7. 1 1
      resources/views/tabler/admin/invoice/index.tpl
  8. 1 1
      resources/views/tabler/admin/log/detect.tpl
  9. 1 1
      resources/views/tabler/admin/log/detect_ban.tpl
  10. 1 1
      resources/views/tabler/admin/log/gateway.tpl
  11. 1 1
      resources/views/tabler/admin/log/invite.tpl
  12. 1 1
      resources/views/tabler/admin/log/login.tpl
  13. 1 1
      resources/views/tabler/admin/log/money.tpl
  14. 1 1
      resources/views/tabler/admin/log/online.tpl
  15. 1 1
      resources/views/tabler/admin/log/subscribe.tpl
  16. 1 1
      resources/views/tabler/admin/log/traffic.tpl
  17. 1 1
      resources/views/tabler/admin/node/create.tpl
  18. 2 2
      resources/views/tabler/admin/node/edit.tpl
  19. 1 1
      resources/views/tabler/admin/node/index.tpl
  20. 1 1
      resources/views/tabler/admin/order/index.tpl
  21. 1 1
      resources/views/tabler/admin/product/create.tpl
  22. 1 1
      resources/views/tabler/admin/product/edit.tpl
  23. 1 1
      resources/views/tabler/admin/product/index.tpl
  24. 1 1
      resources/views/tabler/admin/ticket/index.tpl
  25. 1 1
      resources/views/tabler/admin/user/index.tpl
  26. 1 1
      resources/views/tabler/auth/login.tpl
  27. 1 1
      resources/views/tabler/auth/register.tpl
  28. 2 2
      resources/views/tabler/gateway/f2f.tpl
  29. 12 11
      resources/views/tabler/live_chat.tpl
  30. 1 1
      resources/views/tabler/password/reset.tpl
  31. 2 0
      resources/views/tabler/user/edit.tpl
  32. 5 0
      resources/views/tabler/user/footer.tpl
  33. 0 1
      resources/views/tabler/user/header.tpl
  34. 1 1
      resources/views/tabler/user/index.tpl
  35. 2 0
      resources/views/tabler/user/invoice/view.tpl
  36. 2 0
      resources/views/tabler/user/order/create.tpl
  37. 1 1
      resources/views/tabler/user/rate.tpl
  38. 4 1
      src/Controllers/UserController.php

+ 4 - 3
app/routes.php

@@ -253,7 +253,7 @@ return static function (Slim\App $app): void {
         $group->get('/giftcard', App\Controllers\Admin\GiftCardController::class . ':index');
         $group->post('/giftcard', App\Controllers\Admin\GiftCardController::class . ':add');
         $group->post('/giftcard/ajax', App\Controllers\Admin\GiftCardController::class . ':ajax');
-        $group->delete('/giftcard/{id}', App\Controllers\Admin\GiftCardController::class . ':delete');
+        $group->delete('/giftcard/{id:[0-9]+}', App\Controllers\Admin\GiftCardController::class . ':delete');
         // 商品
         $group->get('/product', App\Controllers\Admin\ProductController::class . ':index');
         $group->get('/product/create', App\Controllers\Admin\ProductController::class . ':create');
@@ -267,7 +267,7 @@ return static function (Slim\App $app): void {
         $group->get('/order', App\Controllers\Admin\OrderController::class . ':index');
         $group->get('/order/{id:[0-9]+}/view', App\Controllers\Admin\OrderController::class . ':detail');
         $group->post('/order/{id:[0-9]+}/cancel', App\Controllers\Admin\OrderController::class . ':cancel');
-        $group->delete('/order/{id}', App\Controllers\Admin\OrderController::class . ':delete');
+        $group->delete('/order/{id:[0-9]+}', App\Controllers\Admin\OrderController::class . ':delete');
         $group->post('/order/ajax', App\Controllers\Admin\OrderController::class . ':ajax');
         // 账单
         $group->get('/invoice', App\Controllers\Admin\InvoiceController::class . ':index');
@@ -288,6 +288,7 @@ return static function (Slim\App $app): void {
 
     // WebAPI V2(Aka Node API V1)
     //$app->group('/node/api/v1', function (RouteCollectorProxy $group): void {
+    //    $group->get('/heartbeat', App\Controllers\Api\NodeApiV1Controller::class . ':getHeartbeat');
     //    $group->get('/info', App\Controllers\Api\NodeApiV1Controller::class . ':getInfo');
     //    $group->get('/user', App\Controllers\Api\NodeApiV1Controller::class . ':getUser');
     //    $group->get('/detect_rule', App\Controllers\Api\NodeApiV1Controller::class . ':getDetectRule');
@@ -299,7 +300,7 @@ return static function (Slim\App $app): void {
     // WebAPI
     $app->group('/mod_mu', static function (RouteCollectorProxy $group): void {
         // 节点
-        $group->get('/nodes/{id}/info', App\Controllers\WebAPI\NodeController::class . ':getInfo');
+        $group->get('/nodes/{id:[0-9]+}/info', App\Controllers\WebAPI\NodeController::class . ':getInfo');
         // 用户
         $group->get('/users', App\Controllers\WebAPI\UserController::class . ':index');
         $group->post('/users/traffic', App\Controllers\WebAPI\UserController::class . ':addTraffic');

+ 3 - 3
composer.json

@@ -15,7 +15,7 @@
         "ext-yaml": "*",
         "ext-zip": "*",
         "anankke/omnipay-alipay": "^3.1.3",
-        "aws/aws-sdk-php": "^3.288.1",
+        "aws/aws-sdk-php": "^3.289.0",
         "geoip2/geoip2": "^2.13",
         "guzzlehttp/guzzle": "^7.8",
         "guzzlehttp/psr7": "^2.6.1",
@@ -24,11 +24,11 @@
         "irazasyed/telegram-bot-sdk": "^3.13",
         "lcobucci/jwt": "^5.2",
         "league/omnipay": "^3.2.1",
-        "mailgun/mailgun-php": "^3.6.1",
+        "mailgun/mailgun-php": "^3.6.2",
         "nikolaposa/rate-limit": "^3.0",
         "openai-php/client": "^0.7.10",
         "ozdemir/datatables": "^2.3.7",
-        "phpmailer/phpmailer": "^6.8.1",
+        "phpmailer/phpmailer": "^6.9.1",
         "postal/postal": "^2",
         "ramsey/uuid": "^4.7.5",
         "sendgrid/sendgrid": "^8.0.1",

+ 19 - 19
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "b90c6c01b6b2836ce21293a49dfe7719",
+    "content-hash": "c5e34897c527b5b28198dd1190c9cded",
     "packages": [
         {
             "name": "anankke/omnipay-alipay",
@@ -123,16 +123,16 @@
         },
         {
             "name": "aws/aws-sdk-php",
-            "version": "3.288.1",
+            "version": "3.290.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/aws/aws-sdk-php.git",
-                "reference": "a1dfa12c7165de0b731ae8074c4ba1f3ae733f89"
+                "reference": "7726a0dc30a70f2ccf0e2fae3836d6ca6edb2881"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/a1dfa12c7165de0b731ae8074c4ba1f3ae733f89",
-                "reference": "a1dfa12c7165de0b731ae8074c4ba1f3ae733f89",
+                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/7726a0dc30a70f2ccf0e2fae3836d6ca6edb2881",
+                "reference": "7726a0dc30a70f2ccf0e2fae3836d6ca6edb2881",
                 "shasum": ""
             },
             "require": {
@@ -212,9 +212,9 @@
             "support": {
                 "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
                 "issues": "https://github.com/aws/aws-sdk-php/issues",
-                "source": "https://github.com/aws/aws-sdk-php/tree/3.288.1"
+                "source": "https://github.com/aws/aws-sdk-php/tree/3.290.0"
             },
-            "time": "2023-11-22T19:35:38+00:00"
+            "time": "2023-11-27T20:01:41+00:00"
         },
         {
             "name": "bacon/bacon-qr-code",
@@ -1962,16 +1962,16 @@
         },
         {
             "name": "mailgun/mailgun-php",
-            "version": "v3.6.1",
+            "version": "v3.6.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/mailgun/mailgun-php.git",
-                "reference": "c5162d1f569ade72aa9f80f10ba2b5e63ff2e221"
+                "reference": "888d70f20c93278ea525c448d88a9f114b5649ae"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/mailgun/mailgun-php/zipball/c5162d1f569ade72aa9f80f10ba2b5e63ff2e221",
-                "reference": "c5162d1f569ade72aa9f80f10ba2b5e63ff2e221",
+                "url": "https://api.github.com/repos/mailgun/mailgun-php/zipball/888d70f20c93278ea525c448d88a9f114b5649ae",
+                "reference": "888d70f20c93278ea525c448d88a9f114b5649ae",
                 "shasum": ""
             },
             "require": {
@@ -2017,9 +2017,9 @@
             "description": "The Mailgun SDK provides methods for all API functions.",
             "support": {
                 "issues": "https://github.com/mailgun/mailgun-php/issues",
-                "source": "https://github.com/mailgun/mailgun-php/tree/v3.6.1"
+                "source": "https://github.com/mailgun/mailgun-php/tree/v3.6.2"
             },
-            "time": "2023-10-27T12:22:03+00:00"
+            "time": "2023-11-27T10:37:06+00:00"
         },
         {
             "name": "maxmind-db/reader",
@@ -7629,16 +7629,16 @@
         },
         {
             "name": "phpstan/phpdoc-parser",
-            "version": "1.24.3",
+            "version": "1.24.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpstan/phpdoc-parser.git",
-                "reference": "12f01d214f1c73b9c91fdb3b1c415e4c70652083"
+                "reference": "6bd0c26f3786cd9b7c359675cb789e35a8e07496"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/12f01d214f1c73b9c91fdb3b1c415e4c70652083",
-                "reference": "12f01d214f1c73b9c91fdb3b1c415e4c70652083",
+                "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6bd0c26f3786cd9b7c359675cb789e35a8e07496",
+                "reference": "6bd0c26f3786cd9b7c359675cb789e35a8e07496",
                 "shasum": ""
             },
             "require": {
@@ -7670,9 +7670,9 @@
             "description": "PHPDoc parser with support for nullable, intersection and generic types",
             "support": {
                 "issues": "https://github.com/phpstan/phpdoc-parser/issues",
-                "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.3"
+                "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.4"
             },
-            "time": "2023-11-18T20:15:32+00:00"
+            "time": "2023-11-26T18:29:22+00:00"
         },
         {
             "name": "phpunit/php-code-coverage",

+ 1 - 1
resources/views/tabler/admin/coupon.tpl

@@ -120,7 +120,7 @@
             locale: "zh"
         });
 
-        var table = $('#data_table').DataTable({
+        let table = $('#data_table').DataTable({
             ajax: {
                 url: '/admin/coupon/ajax',
                 type: 'POST',

+ 1 - 1
resources/views/tabler/admin/detect.tpl

@@ -95,7 +95,7 @@
     </div>
 
     <script>
-        var table = $('#data_table').DataTable({
+        let table = $('#data_table').DataTable({
             ajax: {
                 url: '/admin/detect/ajax',
                 type: 'POST',

+ 1 - 1
resources/views/tabler/admin/giftcard.tpl

@@ -98,7 +98,7 @@
     </div>
 
     <script>
-        var table = $('#data_table').DataTable({
+        let table = $('#data_table').DataTable({
             ajax: {
                 url: '/admin/giftcard/ajax',
                 type: 'POST',

+ 1 - 1
resources/views/tabler/admin/invoice/index.tpl

@@ -40,7 +40,7 @@
     </div>
 
     <script>
-        var table = $('#data_table').DataTable({
+        let table = $('#data_table').DataTable({
             ajax: {
                 url: '/admin/invoice/ajax',
                 type: 'POST',

+ 1 - 1
resources/views/tabler/admin/log/detect.tpl

@@ -38,7 +38,7 @@
     </div>
 
     <script>
-        var table = $('#data_table').DataTable({
+        let table = $('#data_table').DataTable({
             "serverSide": true,
             "searching": false,
             "ordering": false,

+ 1 - 1
resources/views/tabler/admin/log/detect_ban.tpl

@@ -38,7 +38,7 @@
     </div>
 
     <script>
-        var table = $('#data_table').DataTable({
+        let table = $('#data_table').DataTable({
             "serverSide": true,
             "searching": false,
             "ordering": false,

+ 1 - 1
resources/views/tabler/admin/log/gateway.tpl

@@ -38,7 +38,7 @@
     </div>
 
     <script>
-        var table = $('#data_table').DataTable({
+        let table = $('#data_table').DataTable({
             ajax: {
                 url: '/admin/gateway/ajax',
                 type: 'POST',

+ 1 - 1
resources/views/tabler/admin/log/invite.tpl

@@ -149,7 +149,7 @@
     </div>
 
     <script>
-        var table = $('#data_table').DataTable({
+        let table = $('#data_table').DataTable({
             ajax: {
                 url: '/admin/invite/ajax',
                 type: 'POST',

+ 1 - 1
resources/views/tabler/admin/log/login.tpl

@@ -38,7 +38,7 @@
     </div>
 
     <script>
-        var table = $('#data_table').DataTable({
+        let table = $('#data_table').DataTable({
             "serverSide": true,
             "searching": false,
             "ordering": false,

+ 1 - 1
resources/views/tabler/admin/log/money.tpl

@@ -38,7 +38,7 @@
     </div>
 
     <script>
-        var table = $('#data_table').DataTable({
+        let table = $('#data_table').DataTable({
             ajax: {
                 url: '/admin/money/ajax',
                 type: 'POST',

+ 1 - 1
resources/views/tabler/admin/log/online.tpl

@@ -38,7 +38,7 @@
     </div>
 
     <script>
-        var table = $('#data_table').DataTable({
+        let table = $('#data_table').DataTable({
             "serverSide": true,
             "searching": false,
             "ordering": false,

+ 1 - 1
resources/views/tabler/admin/log/subscribe.tpl

@@ -38,7 +38,7 @@
     </div>
 
     <script>
-        var table = $('#data_table').DataTable({
+        let table = $('#data_table').DataTable({
             "serverSide": true,
             "searching": false,
             "ordering": false,

+ 1 - 1
resources/views/tabler/admin/log/traffic.tpl

@@ -38,7 +38,7 @@
     </div>
 
     <script>
-        var table = $('#data_table').DataTable({
+        let table = $('#data_table').DataTable({
             "serverSide": true,
             "searching": false,
             "ordering": false,

+ 1 - 1
resources/views/tabler/admin/node/create.tpl

@@ -178,7 +178,7 @@
 
 <script>
     const container = document.getElementById('custom_config');
-    var options = {
+    let options = {
         modes: ['code', 'tree'],
     };
     const editor = new JSONEditor(container, options);

+ 2 - 2
resources/views/tabler/admin/node/edit.tpl

@@ -210,14 +210,14 @@
 </div>
 
 <script>
-    var clipboard = new ClipboardJS('.copy');
+    let clipboard = new ClipboardJS('.copy');
     clipboard.on('success', function (e) {
         $('#success-noreload-message').text('已复制到剪切板');
         $('#success-noreload-dialog').modal('show');
     });
 
     const container = document.getElementById('custom_config');
-    var options = {
+    let options = {
         modes: ['code', 'tree'],
     };
     const editor = new JSONEditor(container, options);

+ 1 - 1
resources/views/tabler/admin/node/index.tpl

@@ -48,7 +48,7 @@
     </div>
 
     <script>
-        var table = $('#data_table').DataTable({
+        let table = $('#data_table').DataTable({
             ajax: {
                 url: '/admin/node/ajax',
                 type: 'POST',

+ 1 - 1
resources/views/tabler/admin/order/index.tpl

@@ -38,7 +38,7 @@
     </div>
 
     <script>
-        var table = $('#data_table').DataTable({
+        let table = $('#data_table').DataTable({
             ajax: {
                 url: '/admin/order/ajax',
                 type: 'POST',

+ 1 - 1
resources/views/tabler/admin/product/create.tpl

@@ -212,7 +212,7 @@
     });
 
     $("#create-product").click(function () {
-        var emptyFields = $('input[required]').filter(function () {
+        let emptyFields = $('input[required]').filter(function () {
             return $(this).val() === '';
         });
 

+ 1 - 1
resources/views/tabler/admin/product/edit.tpl

@@ -224,7 +224,7 @@
     });
 
     $("#save-product").click(function () {
-        var emptyFields = $('input[required]').filter(function () {
+        let emptyFields = $('input[required]').filter(function () {
             return $(this).val() === '';
         });
 

+ 1 - 1
resources/views/tabler/admin/product/index.tpl

@@ -46,7 +46,7 @@
     </div>
 
     <script>
-        var table = $('#data_table').DataTable({
+        let table = $('#data_table').DataTable({
             ajax: {
                 url: '/admin/product/ajax',
                 type: 'POST',

+ 1 - 1
resources/views/tabler/admin/ticket/index.tpl

@@ -38,7 +38,7 @@
     </div>
 
     <script>
-        var table = $('#data_table').DataTable({
+        let table = $('#data_table').DataTable({
             ajax: {
                 url: '/admin/ticket/ajax',
                 type: 'POST',

+ 1 - 1
resources/views/tabler/admin/user/index.tpl

@@ -97,7 +97,7 @@
     </div>
 
     <script>
-        var table = $('#data_table').DataTable({
+        let table = $('#data_table').DataTable({
             ajax: {
                 url: '/admin/user/ajax',
                 type: 'POST',

+ 1 - 1
resources/views/tabler/auth/login.tpl

@@ -105,7 +105,7 @@
 {if $public_setting['captcha_provider'] === 'geetest'}
     <script src="https://static.geetest.com/v4/gt4.js"></script>
     <script>
-        var geetest_result = '';
+        let geetest_result = '';
         initGeetest4({
             captchaId: '{$captcha['geetest_id']}',
             product: 'float',

+ 1 - 1
resources/views/tabler/auth/register.tpl

@@ -154,7 +154,7 @@
 {if $public_setting['captcha_provider'] === 'geetest'}
     <script src="https://static.geetest.com/v4/gt4.js"></script>
     <script>
-        var geetest_result = '';
+        let geetest_result = '';
         initGeetest4({
             captchaId: '{$captcha['geetest_id']}',
             product: 'float',

+ 2 - 2
resources/views/tabler/gateway/f2f.tpl

@@ -12,7 +12,7 @@
 </div>
 
 <script>
-    var pid = 0;
+    let pid = 0;
 
     function f2fpay() {
         $.ajax({
@@ -45,4 +45,4 @@
             }
         })
     }
-</script>
+</script>

+ 12 - 11
resources/views/tabler/live_chat.tpl

@@ -1,9 +1,9 @@
 {if $public_setting['live_chat'] === 'tawk'}
-    <script type="text/javascript">
-        var Tawk_API = Tawk_API ||{}, Tawk_LoadStart = new Date();
+    <script>
+        let Tawk_API = Tawk_API ||{}, Tawk_LoadStart = new Date();
         (function () {
-            var id = "{$public_setting['tawk_id']}";
-            var s1 = document.createElement("script"), s0 = document.getElementsByTagName("script")[0];
+            let id = "{$public_setting['tawk_id']}";
+            let s1 = document.createElement("script"), s0 = document.getElementsByTagName("script")[0];
             s1.async = true;
             s1.src = 'https://embed.tawk.to/' + id + '/default';
             s1.setAttribute('crossorigin', '*');
@@ -13,7 +13,8 @@
 {/if}
 
 {if $public_setting['live_chat'] === 'crisp'}
-    <script type="text/javascript"> window.$crisp = [];
+    <script>
+        window.$crisp = [];
         window.CRISP_WEBSITE_ID = "{$public_setting["crisp_id"]}";
         (function () {
             d = document;
@@ -70,7 +71,7 @@
                 return e._h ? e._h.apply(null, n) : e._q.push(n)
             }
 
-            var e = {
+            let e = {
                 _q: [],
                 _h: null,
                 _v: "2.0",
@@ -91,7 +92,7 @@
                     i(["call", c.call(arguments)])
                 },
                 init: function () {
-                    var n = t.createElement("script");
+                    let n = t.createElement("script");
                     n.async = !0,
                         n.type = "text/javascript",
                         n.src = "https://cdn.livechatinc.com/tracking.js",
@@ -105,13 +106,13 @@
 {/if}
 
 {if $public_setting['live_chat'] === 'mylivechat'}
-    <script type="text/javascript">
+    <script>
         (() => {
-            var hccid = "{$public_setting['mylivechat_id']}";
-            var nt = document.createElement("script");
+            let hccid = "{$public_setting['mylivechat_id']}";
+            let nt = document.createElement("script");
             nt.async = true;
             nt.src = "https://mylivechat.com/chatinline.aspx?hccid=" + hccid;
-            var ct = document.getElementsByTagName("script")[0];
+            let ct = document.getElementsByTagName("script")[0];
             ct.parentNode.insertBefore(nt, ct);
         })();
     </script>

+ 1 - 1
resources/views/tabler/password/reset.tpl

@@ -86,7 +86,7 @@
 {if $public_setting['captcha_provider'] === 'geetest'}
     <script src="https://static.geetest.com/v4/gt4.js"></script>
     <script>
-        var geetest_result = '';
+        let geetest_result = '';
         initGeetest4({
             captchaId: '{$captcha['geetest_id']}',
             product: 'float',

+ 2 - 0
resources/views/tabler/user/edit.tpl

@@ -1,5 +1,7 @@
 {include file='user/header.tpl'}
 
+<script src="//{$config['jsdelivr_url']}/npm/jquery/dist/jquery.min.js"></script>
+
 <div class="page-wrapper">
     <div class="container-xl">
         <div class="page-header d-print-none text-white">

+ 5 - 0
resources/views/tabler/user/footer.tpl

@@ -88,6 +88,11 @@
                         qrcode.makeCode(res.data[key]);
                     }
 
+                    if (key === "last-checkin-time") {
+                        document.getElementById("check-in").innerHTML = "已签到"
+                        document.getElementById("check-in").disabled = true;
+                    }
+
                     let element = document.getElementById(key);
 
                     if (element) {

+ 0 - 1
resources/views/tabler/user/header.tpl

@@ -14,7 +14,6 @@
     <!-- JS files -->
     <script src="/assets/js/fuck.min.js"></script>
     <script src="//{$config['jsdelivr_url']}/npm/qrcode_js@latest/qrcode.min.js"></script>
-    <script src="//{$config['jsdelivr_url']}/npm/jquery/dist/jquery.min.js"></script>
     <script src="//{$config['jsdelivr_url']}/npm/htmx.org@latest/dist/htmx.min.js"></script>
     <style>
         .home-subtitle {

+ 1 - 1
resources/views/tabler/user/index.tpl

@@ -542,7 +542,7 @@
                                     {/if}
                                 </p>
                                 <p>
-                                    上次签到时间:<code>{$user->lastCheckInTime()}</code>
+                                    上次签到时间:<code id="last-checkin-time">{$user->lastCheckInTime()}</code>
                                 </p>
                             </div>
                             <div class="card-footer">

+ 2 - 0
resources/views/tabler/user/invoice/view.tpl

@@ -1,5 +1,7 @@
 {include file='user/header.tpl'}
 
+<script src="//{$config['jsdelivr_url']}/npm/jquery/dist/jquery.min.js"></script>
+
 <div class="page-wrapper">
     <div class="container-xl">
         <div class="page-header d-print-none text-white">

+ 2 - 0
resources/views/tabler/user/order/create.tpl

@@ -1,5 +1,7 @@
 {include file='user/header.tpl'}
 
+<script src="//{$config['jsdelivr_url']}/npm/jquery/dist/jquery.min.js"></script>
+
 <div class="page-wrapper">
     <div class="container-xl">
         <div class="page-header d-print-none text-white">

+ 1 - 1
resources/views/tabler/user/rate.tpl

@@ -48,7 +48,7 @@
 
     <script>
         document.body.addEventListener("drawChart", function(evt) {
-            var chart = window.ApexCharts && new ApexCharts(document.getElementById('rate-chart'), {
+            let chart = window.ApexCharts && new ApexCharts(document.getElementById('rate-chart'), {
                 chart: {
                     type: "bar",
                     fontFamily: 'inherit',

+ 4 - 1
src/Controllers/UserController.php

@@ -154,9 +154,12 @@ final class UserController extends BaseController
             return ResponseHelper::error($response, (string) $checkin['msg']);
         }
 
-        return $response->withHeader('HX-Refresh', 'true')->withJson([
+        return $response->withJson([
             'ret' => 1,
             'msg' => $checkin['msg'],
+            'data' => [
+                'last-checkin-time' => $this->user->lastCheckInTime(),
+            ],
         ]);
     }