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

Commit

Permalink
fix: updating the customer, project, task in analysis edit report page
Browse files Browse the repository at this point in the history
  • Loading branch information
MitanOmar committed Jan 9, 2024
1 parent c182cd9 commit b216856
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/validators/intersection-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ export default function validateIntersectionTask() {
return (key, newValue, oldValue, changes, content) => {
const customerChanged =
Object.keys(changes).includes("customer") &&
(changes.customer.id || null) !== (content.customer.id || null);
changes.customer &&
content.customer &&
(changes.customer.id || null) !== (content.customer.get("id") || null);

const projectChanged =
Object.keys(changes).includes("project") &&
(changes.project.id || null) !== (content.project.id || null);
changes.project &&
content.project &&
(changes.project.id || null) !== (content.project.get("id") || null);

const hasTask = !!(newValue && newValue.id);

Expand Down

0 comments on commit b216856

Please sign in to comment.