Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

fix: verify rejected reports #1163

Merged
merged 2 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/analysis/edit/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/models/report-intersection.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading