From: fomichev Date: Mon, 14 Jul 2025 14:58:50 +0000 (+0300) Subject: Проверка тестовых заказов X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=8774b0063fd71361cf2816a50a8eff99dfcbe313;p=erp24_rep%2Fyii-erp24%2F.git Проверка тестовых заказов --- 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; },