From: fomichev Date: Tue, 15 Jul 2025 14:14:35 +0000 (+0300) Subject: Скрываем удаление и редирект после сохранения X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=7739e6b876fb840b7350f42bd88d40a6c9ead327;p=erp24_rep%2Fyii-erp24%2F.git Скрываем удаление и редирект после сохранения --- diff --git a/erp24/controllers/crud/MarketplaceOrder1cStatusesController.php b/erp24/controllers/crud/MarketplaceOrder1cStatusesController.php index 91f937d8..a75c5970 100644 --- a/erp24/controllers/crud/MarketplaceOrder1cStatusesController.php +++ b/erp24/controllers/crud/MarketplaceOrder1cStatusesController.php @@ -220,7 +220,7 @@ class MarketplaceOrder1cStatusesController extends Controller } $transaction->commit(); - return $this->redirect(['view', 'id' => $model->id]); + return $this->redirect(['index']); } catch (\Exception $e) { $transaction->rollBack(); diff --git a/erp24/views/crud/marketplace-order1c-statuses/index.php b/erp24/views/crud/marketplace-order1c-statuses/index.php index cdb0f56a..76a5149b 100644 --- a/erp24/views/crud/marketplace-order1c-statuses/index.php +++ b/erp24/views/crud/marketplace-order1c-statuses/index.php @@ -64,7 +64,12 @@ $this->params['breadcrumbs'][] = $this->title; 'class' => ActionColumn::class, 'urlCreator' => function ($action, MarketplaceOrder1cStatuses $model, $key, $index, $column) { return Url::toRoute([$action, 'id' => $model->id]); - } + }, + 'visibleButtons' => [ + 'delete' => function ($model, $key, $index) { + return Yii::$app->user->identity->group_id == 81; + }, + ], ], [ 'label' => 'Связанные статусы',