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 7b8d8c8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/validators/intersection-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ 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?.get("id") || null) !==
(content.customer?.get("id") || null);

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

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

Expand Down

0 comments on commit 7b8d8c8

Please sign in to comment.