From fc23516c5474e8351f0ed86e381e2f38c202c900 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Mon, 29 Jan 2024 11:10:54 +0800 Subject: [PATCH] * Fix bug #45420. --- lib/zin/wg/productsbox/v1.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/zin/wg/productsbox/v1.php b/lib/zin/wg/productsbox/v1.php index 55e41905db..d20f1636bc 100644 --- a/lib/zin/wg/productsbox/v1.php +++ b/lib/zin/wg/productsbox/v1.php @@ -72,8 +72,8 @@ class productsBox extends wg global $lang, $app; list($productItems, $project, $isStage, $hasNewProduct) = $this->prop(array('productItems', 'project', 'isStage', 'hasNewProduct')); - $productsBox = array(); - $hidden = !empty($project) && empty($project->hasProduct) ? 'hidden' : ''; + $productsBox = array(); + $hidden = !empty($project) && empty($project->hasProduct) ? 'hidden' : ''; $productsBox[] = $hasNewProduct ? div ( setClass('addProductBox flex hidden'), @@ -138,7 +138,7 @@ class productsBox extends wg ) ), ), - div + ($isStage && $project->stageBy == 'product') ? null : div ( setClass('pl-2 flex self-center line-btn c-actions first-action'), btn @@ -199,7 +199,7 @@ class productsBox extends wg global $lang; list($productItems, $branchGroups, $planGroups, $productPlans) = $this->prop(array('productItems', 'branchGroups', 'planGroups', 'productPlans')); - list($linkedBranches, $currentProduct, $currentPlan, $project) = $this->prop(array('linkedBranches', 'currentProduct', 'currentPlan', 'project')); + list($linkedBranches, $currentProduct, $currentPlan, $project, $isStage) = $this->prop(array('linkedBranches', 'currentProduct', 'currentPlan', 'project', 'isStage')); $unmodifiableProducts = data('unmodifiableProducts') ? data('unmodifiableProducts') : array(); @@ -209,7 +209,7 @@ class productsBox extends wg $hasBranch = $product->type != 'normal' && isset($branchGroups[$product->id]); $branches = isset($branchGroups[$product->id]) ? $branchGroups[$product->id] : array(); - $disabledProduct = !empty($project) && in_array($product->id, $unmodifiableProducts); + $disabledProduct = !empty($project) && (in_array($product->id, $unmodifiableProducts) || ($isStage && $project->stageBy == 'product')); $branchIdList = ''; if(isset($product->branches)) $branchIdList = $product->branches;