Skip to content

Commit

Permalink
chore: code tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
jfmcquade committed Jan 15, 2024
1 parent 0ca3a76 commit a488e54
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ interface ITaskCardParams {
*/
task_id: string;
/**
* The ID of a task group, used to track whether it is the highlighted task group.
* The ID of a task group, within the config-level list app_config.TASKS.taskGroupsListName.
* Used to track whether it is the highlighted task group.
* If provided, the task card will display a progress bar for the task group
* **/
task_group_id: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class TmplTaskProgressBarComponent
}

private checkAndSetUseDynamicData() {
this.useDynamicData = this.dataRows[0].hasOwnProperty(this.params.completedColumnName);
this.useDynamicData = this.dataRows?.[0]?.hasOwnProperty(this.params.completedColumnName);
}

private async evaluateTaskGroupData() {
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/services/task/task.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export class TaskService extends AsyncServiceBase {
if (subtasksCompleted === subtasksTotal) {
progressStatus = "completed";
// Check whether task group has already been completed
if (this.templateFieldService.getField(completedField) !== true) {
if (!this.templateFieldService.getField(completedField)) {
// If not, set completed field to "true"
await this.setTaskGroupCompletedStatus(completedField, true);
newlyCompleted = true;
Expand Down

0 comments on commit a488e54

Please sign in to comment.