From cbd0ce1f3ff11a97b05cc8b6cdd35bd07db5c7e4 Mon Sep 17 00:00:00 2001 From: Mitan Omar Date: Wed, 10 Jan 2024 14:30:44 +0100 Subject: [PATCH 1/2] fix: verify rejected reports --- app/analysis/edit/controller.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/analysis/edit/controller.js b/app/analysis/edit/controller.js index 1154f1483..5de568495 100644 --- a/app/analysis/edit/controller.js +++ b/app/analysis/edit/controller.js @@ -134,6 +134,9 @@ export default class AnalysisEditController extends Controller { } get canVerify() { + if (this.intersection.lastSuccessful.value.model.rejected !== false) { + return false; + } return ( allQueryParams(this).reviewer === this.session.data.user.id || this.isSuperuser From 192c8a868ce053b7058a838bc1232adcece97808 Mon Sep 17 00:00:00 2001 From: Mitan Omar Date: Wed, 10 Jan 2024 15:55:10 +0100 Subject: [PATCH 2/2] fix: the default value of `rejected` attribute in `ReportIntersection` is false --- app/models/report-intersection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/report-intersection.js b/app/models/report-intersection.js index 8dc9e8f07..8a6ce4202 100644 --- a/app/models/report-intersection.js +++ b/app/models/report-intersection.js @@ -3,7 +3,7 @@ import Model, { attr, belongsTo } from "@ember-data/model"; export default class ReportIntersection extends Model { @attr("string") comment; @attr("boolean", { allowNull: true, defaultValue: null }) notBillable; - @attr("boolean", { allowNull: true, defaultValue: null }) rejected; + @attr("boolean", { allowNull: true, defaultValue: false }) rejected; @attr("boolean", { allowNull: true, defaultValue: null }) review; @attr("boolean", { allowNull: true, defaultValue: null }) billed; @attr("boolean", { allowNull: true, defaultValue: null }) verified;