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

fix: updating the customer, project, task in analysis edit report page #1161

Merged
Merged
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
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") &&
MitanOmar marked this conversation as resolved.
Show resolved Hide resolved
(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") &&
MitanOmar marked this conversation as resolved.
Show resolved Hide resolved
(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
Loading