From: Vladimir Fomichev Date: Fri, 5 Sep 2025 15:31:14 +0000 (+0300) Subject: Удаление X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=35554c785fbe0ca408cb3e88f0be6505a3fe6656;p=erp24_rep%2Fyii-erp24%2F.git Удаление --- diff --git a/erp24/records/MatrixTypeSearch.php b/erp24/records/MatrixTypeSearch.php index d235f8fb..0aaffb53 100644 --- a/erp24/records/MatrixTypeSearch.php +++ b/erp24/records/MatrixTypeSearch.php @@ -52,6 +52,7 @@ class MatrixTypeSearch extends MatrixType 'allModels' => $filtered, 'pagination' => false, 'sort' => false, + 'key' => 'id', ]); } } \ No newline at end of file diff --git a/erp24/views/matrix-type/index.php b/erp24/views/matrix-type/index.php index cbfd577b..dd9e95c0 100644 --- a/erp24/views/matrix-type/index.php +++ b/erp24/views/matrix-type/index.php @@ -192,6 +192,12 @@ $this->registerJsFile('/js/matrix-type/index.js', ['position' => \yii\web\View:: ['class' => 'yii\grid\ActionColumn', 'template' => '{delete}', 'contentOptions' => ['class' => 'text-center', 'style' => 'width:80px; min-width:50px; '], + 'urlCreator' => function ($action, $model, $key, $index) { + if ($action === 'delete') { + return Url::to(['delete', 'id' => $model->id]); + } + return '#'; + }, 'buttons' => [ 'delete' => function ($url, $model, $key) {