diff --git a/Web/Models/Entities/BugReportComment.php b/Web/Models/Entities/BugReportComment.php index 6c777b4d..281cfcfc 100644 --- a/Web/Models/Entities/BugReportComment.php +++ b/Web/Models/Entities/BugReportComment.php @@ -38,4 +38,9 @@ class BugReportComment extends RowModel { return $this->getRecord()->label; } + + function getBalanceChanges(): ?int + { + return $this->getRecord()->point_actions; + } } \ No newline at end of file diff --git a/Web/Presenters/BugtrackerPresenter.php b/Web/Presenters/BugtrackerPresenter.php index c6c19f38..ac915e71 100644 --- a/Web/Presenters/BugtrackerPresenter.php +++ b/Web/Presenters/BugtrackerPresenter.php @@ -90,7 +90,7 @@ final class BugtrackerPresenter extends OpenVKPresenter $report->save(); - $this->createComment($report, $comment, tr("bug_tracker_new_report_status") . " — $list[$status]", TRUE); + $this->createComment($report, $comment, tr("bug_tracker_new_report_status") . " — $list[$status]", TRUE, FALSE, $points); $this->flashFail("succ", tr("changes_saved"), tr("bug_tracker_new_report_status") . " — $list[$status]"); } @@ -119,11 +119,11 @@ final class BugtrackerPresenter extends OpenVKPresenter $report->save(); - $this->createComment($report, $comment, tr("bug_tracker_new_report_priority") . " — $list[$priority]", TRUE); + $this->createComment($report, $comment, tr("bug_tracker_new_report_priority") . " — $list[$priority]", TRUE, FALSE, $points); $this->flashFail("succ", tr("changes_saved"), tr("bug_tracker_new_report_priority") . " — $list[$priority]"); } - function createComment(?BugReport $report, string $text, string $label = "", bool $is_moder = FALSE, bool $is_hidden = FALSE) + function createComment(?BugReport $report, string $text, string $label = "", bool $is_moder = FALSE, bool $is_hidden = FALSE, string $point_actions = NULL) { $moder = $this->user->identity->getChandlerUser()->can("admin")->model('openvk\Web\Models\Repositories\BugtrackerReports')->whichBelongsTo(NULL); @@ -138,6 +138,7 @@ final class BugtrackerPresenter extends OpenVKPresenter "author" => $this->user->identity->getId(), "is_moder" => $moder === $is_moder, "is_hidden" => $moder === $is_hidden, + "point_actions" => $point_actions, "text" => $text, "label" => $label ]); diff --git a/Web/Presenters/templates/Bugtracker/View.xml b/Web/Presenters/templates/Bugtracker/View.xml index af49fd11..6c462370 100644 --- a/Web/Presenters/templates/Bugtracker/View.xml +++ b/Web/Presenters/templates/Bugtracker/View.xml @@ -39,11 +39,11 @@ {_status}: - {$bug->getStatus()} + {$bug->getStatus()} {_bug_tracker_priority}: - {$bug->getPriority()} + {$bug->getPriority()} {_bug_tracker_device}: @@ -52,8 +52,8 @@
- - + + {_bug_tracker_reproduced} ({$bug->getReproducedCount()}) @@ -80,6 +80,7 @@
{$comment->getText()}
+ (действия с балансом: {$comment->getBalanceChanges() > 0 ? "+" : false}{$comment->getBalanceChanges()})
diff --git a/Web/static/js/openvk.cls.js b/Web/static/js/openvk.cls.js index 21591354..2282b266 100755 --- a/Web/static/js/openvk.cls.js +++ b/Web/static/js/openvk.cls.js @@ -440,7 +440,7 @@ $(document).on("scroll", () => { } }) -function showBtStatusChangeDialog(report, hash) { +function showBtStatusChangeDialog(report, currentBalance, hash) { MessageBox("Изменить статус", `
@@ -482,10 +482,13 @@ function showBtStatusChangeDialog(report, hash) {

Вы можете прокомментировать изменение статуса



-
- Начислить + У тестировщика сейчас ${currentBalance} голосов. +
+
+ Вы можете начислить   - голосов +  голосов + (отрицательные значения поддерживаются)
@@ -497,7 +500,7 @@ function showBtStatusChangeDialog(report, hash) { ]); } -function showBtPriorityChangeDialog(report, hash) { +function showBtPriorityChangeDialog(report, currentBalance, hash) { MessageBox("Изменить приоритет", `
@@ -531,10 +534,13 @@ function showBtPriorityChangeDialog(report, hash) {

Вы можете прокомментировать изменение приоритета



-
- Начислить + У тестировщика сейчас ${currentBalance} голосов. +
+
+ Вы можете начислить   - голосов +  голосов + (отрицательные значения поддерживаются)