From: fomichev Date: Thu, 3 Jul 2025 06:51:31 +0000 (+0300) Subject: Правки в логике запрорсов статусов X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=d8493acc13283a473eecac76f24ff0230f0c09f2;p=erp24_rep%2Fyii-erp24%2F.git Правки в логике запрорсов статусов --- diff --git a/erp24/controllers/CategoryPlanController.php b/erp24/controllers/CategoryPlanController.php index a88d549c..275fcf75 100644 --- a/erp24/controllers/CategoryPlanController.php +++ b/erp24/controllers/CategoryPlanController.php @@ -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']); } diff --git a/erp24/web/js/category-plan/index.js b/erp24/web/js/category-plan/index.js index 651ddbc3..a613d116 100644 --- a/erp24/web/js/category-plan/index.js +++ b/erp24/web/js/category-plan/index.js @@ -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;