From: marina Date: Tue, 3 Jun 2025 13:24:55 +0000 (+0300) Subject: ERP-417 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=b20b7c9ef3e99cd7a1d5a60f0719723b0761b5b2;p=erp24_rep%2Fyii-erp24%2F.git ERP-417 --- 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('Вы не можете редактировать комментарий для данного магазина.');