From b20b7c9ef3e99cd7a1d5a60f0719723b0761b5b2 Mon Sep 17 00:00:00 2001 From: marina Date: Tue, 3 Jun 2025 16:24:55 +0300 Subject: [PATCH] ERP-417 --- erp24/web/js/validate/validateForm.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erp24/web/js/validate/validateForm.js b/erp24/web/js/validate/validateForm.js index fe4b6add..8dfa5d86 100755 --- a/erp24/web/js/validate/validateForm.js +++ b/erp24/web/js/validate/validateForm.js @@ -4,7 +4,7 @@ function updateCommentReadonly() { const currentUser = $('.admin-name').text().trim(); const selectedStoreId = $('#writeoffserp-store_id').val(); const specialStoreIds = ['1', '9', '28']; - const allowedCommentUsers = ['Емельянова Ольга', 'Яшенкова Алена', 'Цветкова Ольга']; + const allowedCommentUsers = ['Емельянова Ольга', 'Яшенкова Алёна', 'Ольга Цветкова']; const isReadonly = specialStoreIds.includes(selectedStoreId) && !allowedCommentUsers.includes(currentUser); $('#writeoffserp-comment').prop('readonly', isReadonly); @@ -73,7 +73,7 @@ $(".form-validate button").click(function (e) { if (!errors['__common']) errors['__common'] = []; errors['__common'].push('Пожалуйста, добавьте хотя бы одно фото к каждому списанию перед сохранением.'); } -console.log(currentUser, allowedCommentUsers.includes(currentUser)) + if (!allowedCommentUsers.includes(currentUser) && commentValue !== initialCommentValue) { if (!errors['__common']) errors['__common'] = []; errors['__common'].push('Вы не можете редактировать комментарий для данного магазина.'); -- 2.39.5