#186 preventing double POST while moderating corrections

This commit is contained in:
Hamid Reza Mohammadi 2021-08-15 16:10:10 +04:30
parent a38ca7dd38
commit bba5513674
3 changed files with 16 additions and 0 deletions

View File

@ -200,6 +200,10 @@ else
</td>
</tr>
<tr>
<td colspan="2"><p id="saving">&nbsp;</p></td>
</tr>
<tr>
<td>
تعداد کل:

View File

@ -324,6 +324,10 @@
function moderatePoemCorrections(verseCount, correctionId) {
$('#moderatecorrections').hide();
$('#saving').text('در حال بررسی ...');
var titleReviewResult = 'DontCare';
if ($('#title_review_result_Approved').length > 0) { //has title
titleReviewResult = $('input[name=title_review_result]:checked').val()
@ -370,6 +374,8 @@
alert(e);
else
alert(e.responseText);
$('#moderatecorrections').show();
$('#saving').text('');
}
});

View File

@ -1698,6 +1698,12 @@ namespace RMuseum.Services.Implementation
_context.GanjoorPoemCorrections.Update(dbCorrection);
await _context.SaveChangesAsync();
await _notificationService.PushNotification(dbCorrection.UserId,
"بررسی ویرایش پیشنهادی شما",
$"با سپاس از زحمت و همت شما ویرایش پیشنهادیتان برای <a href=\"{dbPoem.FullUrl}\" target=\"_blank\">{dbPoem.FullTitle}</a> بررسی شد.{Environment.NewLine}" +
$"جهت مشاهدهٔ نتیجهٔ بررسی در میز کاربری خود بخش «ویرایش‌های من» را مشاهده بفرمایید.{Environment.NewLine}"
);
return new RServiceResult<GanjoorPoemCorrectionViewModel>(moderation);
}