From 8774b0063fd71361cf2816a50a8eff99dfcbe313 Mon Sep 17 00:00:00 2001 From: fomichev Date: Mon, 14 Jul 2025 17:58:50 +0300 Subject: [PATCH] =?utf8?q?=D0=9F=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0?= =?utf8?q?=20=D1=82=D0=B5=D1=81=D1=82=D0=BE=D0=B2=D1=8B=D1=85=20=D0=B7?= =?utf8?q?=D0=B0=D0=BA=D0=B0=D0=B7=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/views/marketplace-orders/index.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/erp24/views/marketplace-orders/index.php b/erp24/views/marketplace-orders/index.php index 61d414d3..336edd78 100644 --- a/erp24/views/marketplace-orders/index.php +++ b/erp24/views/marketplace-orders/index.php @@ -87,6 +87,7 @@ YiiAsset::register($this); 'value' => function ($model) { $status = $model->status->code ?? ''; $substatus = $model->substatus->code ?? ''; + $fake = $model->fake ?? 0; $class = ''; if ($status === 'DELIVERED') { $class = 'bg-success text-white'; @@ -97,12 +98,12 @@ YiiAsset::register($this); } else { $class = 'bg-secondary text-white'; } - + $checkUrl = Url::to(['check-orders', 'id' => $model->id]); + $readyUrl = Url::to(['update-to-ready-status', 'id' => $model->id]); + $cancelUrl = Url::to(['update-to-cancelled-status', 'id' => $model->id]); $output = Html::tag('span', $status, ['class' => "badge $class"]); $output .= '
'; if ($status === 'PROCESSING' && Yii::$app->user->identity->group_id == 81) { - $readyUrl = Url::to(['update-to-ready-status', 'id' => $model->id]); - $cancelUrl = Url::to(['update-to-cancelled-status', 'id' => $model->id]); if ($substatus === 'STARTED') { $output .= '
' . Html::a('Готов', $readyUrl, [ @@ -118,6 +119,16 @@ YiiAsset::register($this); 'data-confirm' => 'Вы уверены, что хотите отменить заказ?', ]) . ' '; } + + if ($status === 'DELIVERED' && Yii::$app->user->identity->group_id == 81 && $fake == 1) { + $output .= '
' . + Html::a('Проверть заказ', $checkUrl, [ + 'class' => 'btn btn-sm btn-success', + 'data-method' => 'post', + 'data-confirm' => + 'Вы уверены, что хотите эмулировать проверку заказа?', + ]) . ' '; + } $output .= '
'; return $output; }, -- 2.39.5