]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Скрываем удаление и редирект после сохранения
authorfomichev <vladimir.fomichev@erp-flowers.ru>
Tue, 15 Jul 2025 14:14:35 +0000 (17:14 +0300)
committerfomichev <vladimir.fomichev@erp-flowers.ru>
Tue, 15 Jul 2025 14:14:35 +0000 (17:14 +0300)
erp24/controllers/crud/MarketplaceOrder1cStatusesController.php
erp24/views/crud/marketplace-order1c-statuses/index.php

index 91f937d87f0e973100ec73a8512e04d9ec46e78c..a75c5970dcf7e1d55b3fb064264e8460ef2bf471 100644 (file)
@@ -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();
index cdb0f56a35756d8f668272b0ec19c4ae2acb663f..76a5149bb85cf58846883ab337993c19255c2d7c 100644 (file)
@@ -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' => 'Связанные статусы',