]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Правки в логике запрорсов статусов
authorfomichev <vladimir.fomichev@erp-flowers.ru>
Thu, 3 Jul 2025 06:51:31 +0000 (09:51 +0300)
committerfomichev <vladimir.fomichev@erp-flowers.ru>
Thu, 3 Jul 2025 06:51:31 +0000 (09:51 +0300)
erp24/controllers/CategoryPlanController.php
erp24/web/js/category-plan/index.js

index a88d549c2921a84c4484f9372a8e121a3ddc5b2a..275fcf753c6b6cfa1b392c3b879922aeb04d08ef 100644 (file)
@@ -655,7 +655,7 @@ class CategoryPlanController extends Controller {
             ->limit(1)
             ->one();
         $task = json_decode($scriptLauncherLog->context, true );
-        if (!$task) {
+        if (!$task || $scriptLauncherLog->active == 0) {
             return $this->asJson(['status' => 'not_found']);
         }
 
index 651ddbc3e139933123f47c75cc9603de80a971b4..a613d1161e34ef3b4adc310f4fff53408acfe70c 100644 (file)
@@ -274,6 +274,10 @@ function startTaskPolling() {
                     $('#changes-count').hide();
                     $('#categoryPlan').addClass('block_table');
                 }
+                if (data.status === 'not_found') {
+                    clearInterval(taskPollInterval);
+                    taskPollInterval = null;
+                }
                 if (data.status === 'done') {
                     clearInterval(taskPollInterval);
                     taskPollInterval = null;