From fa7322a8a904c233eddb68789ea055606177fcc9 Mon Sep 17 00:00:00 2001 From: marina Date: Tue, 10 Jun 2025 15:34:20 +0300 Subject: [PATCH] =?utf8?q?ERP-426=20=D0=A0=D0=B0=D1=81=D1=88=D0=B8=D1=80?= =?utf8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=82=D0=B5=D1=81=D1=82=D0=BE=D0=B2?= =?utf8?q?=D0=BE=D0=B9=20=D0=B3=D1=80=D1=83=D0=BF=D0=BF=D1=8B=20=D0=BC?= =?utf8?q?=D0=B0=D0=B3=D0=B0=D0=B7=D0=B8=D0=BD=D0=BE=D0=B2=20=D0=BF=D1=80?= =?utf8?q?=D0=B8=20=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D0=B8=D1=80=D0=BE?= =?utf8?q?=D0=B2=D0=B0=D0=BD=D0=B8=D0=B8=20=D1=81=D0=BF=D0=B8=D1=81=D0=B0?= =?utf8?q?=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/controllers/WriteOffsErpController.php | 2 +- erp24/views/write_offs_erp/view.php | 2 +- erp24/web/js/validate/validateForm.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/erp24/controllers/WriteOffsErpController.php b/erp24/controllers/WriteOffsErpController.php index 655f8545..9ba70fd5 100644 --- a/erp24/controllers/WriteOffsErpController.php +++ b/erp24/controllers/WriteOffsErpController.php @@ -933,7 +933,7 @@ class WriteOffsErpController extends Controller ->one(); - if (in_array($model->store_id, [1, 9, 28]) && !in_array(Yii::$app->user->id, [785, 1463, 1070, 826, 1036])) { + if (in_array($model->store_id, [1, 9, 28, 30, 15, 44, 8]) && !in_array(Yii::$app->user->id, [785, 1463, 1070, 826, 1036])) { return 'У вас нет прав для согласования списаний!'; } diff --git a/erp24/views/write_offs_erp/view.php b/erp24/views/write_offs_erp/view.php index 06e80e7a..30b8e06f 100644 --- a/erp24/views/write_offs_erp/view.php +++ b/erp24/views/write_offs_erp/view.php @@ -193,7 +193,7 @@ $this->registerCssFile('/css/write-offs-erp.css', ['position' => \yii\web\View:: store_id, [1, 9, 28]) && !in_array(Yii::$app->user->id, [785, 1463, 1070, 826, 1036])) { + if (in_array($model->store_id, [1, 9, 28, 30, 15, 44, 8]) && !in_array(Yii::$app->user->id, [785, 1463, 1070, 826, 1036])) { $class .= ' disabled'; } echo Html::tag('span', diff --git a/erp24/web/js/validate/validateForm.js b/erp24/web/js/validate/validateForm.js index 8dfa5d86..8798e542 100755 --- a/erp24/web/js/validate/validateForm.js +++ b/erp24/web/js/validate/validateForm.js @@ -3,7 +3,7 @@ let initialCommentValue = ''; function updateCommentReadonly() { const currentUser = $('.admin-name').text().trim(); const selectedStoreId = $('#writeoffserp-store_id').val(); - const specialStoreIds = ['1', '9', '28']; + const specialStoreIds = ['1', '9', '28', '30', '15', '44', '8']; const allowedCommentUsers = ['Емельянова Ольга', 'Яшенкова Алёна', 'Ольга Цветкова']; const isReadonly = specialStoreIds.includes(selectedStoreId) && !allowedCommentUsers.includes(currentUser); @@ -65,7 +65,7 @@ $(".form-validate button").click(function (e) { const selectedStoreId = $('#writeoffserp-store_id').val(); const commentValue = $('#writeoffserp-comment').val().trim(); - const specialStoreIds = ['1', '9', '28']; + const specialStoreIds = ['1', '9', '28', '30', '15', '44', '8']; const allowedCommentUsers = ['Емельянова Ольга', 'Яшенкова Алёна', 'Ольга Цветкова']; if (specialStoreIds.includes(selectedStoreId)) { -- 2.39.5