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

Commit

Permalink
fix(activities): check for active tracking state (#912)
Browse files Browse the repository at this point in the history
  • Loading branch information
MitanOmar authored Apr 20, 2023
1 parent 45e5942 commit 134b435
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/services/tracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,17 @@ export default class TrackingService extends Service {
}

get activeCustomer() {
return this.activity?.task?.get("project.customer");
return (
this.hasActiveActivity && this.activity?.task?.get("project.customer")
);
}

get activeProject() {
return this.activity?.task?.get("project");
return this.hasActiveActivity && this.activity?.task?.get("project");
}

get activeTask() {
return this.activity?.get("task");
return this.hasActiveActivity && this.activity?.get("task");
}

/**
Expand Down

0 comments on commit 134b435

Please sign in to comment.