diff --git a/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.spec.data.ts b/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.spec.data.ts index 563bae08a52eedc9aeed029f29f4ae152af50570..bb5eabfea9519d637c1840a3c1af784a1b8a5108 100644 --- a/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.spec.data.ts +++ b/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.spec.data.ts @@ -55,6 +55,7 @@ export let mockData = { { _id: "5f34ec17585244939f89f90d", isRubricDriven: true, + criteriaLevelReport:true, externalId: "cbd074fa-dd11-11ea-a3bf-000d3af02677-OBSERVATION-TEMPLATE-1597303831612", name: "MH01-Mantra4Change-APSWREIS School Leader Feedback", @@ -66,6 +67,7 @@ export let mockData = { _id: "5fbb75537380505718640436", type: "improvementproject", isRubricDriven: false, + criteriaLevelReport:false, subType: "", externalId: "7146aa30-2d67-11eb-b70e-55ade5205c81", name: "Health Awareness Project", @@ -75,6 +77,7 @@ export let mockData = { _id: "5fbb75537380505718640437", type: "improvementproject", isRubricDriven: false, + criteriaLevelReport:false, subType: "", externalId: "71471f60-2d67-11eb-b70e-55ade5205c81", name: "Safe School Project", @@ -84,6 +87,7 @@ export let mockData = { _id: "5fbb75537380505718640438", type: "survey", isRubricDriven: false, + criteriaLevelReport:false, subType: "", externalId: "71471f60-2d67-11eb-b70e-55ade5205c82", name: "Safe School survey", @@ -105,20 +109,6 @@ export let mockData = { datasetId: "ml-improvementproject-status-report", roles: ["PM"], }, - ], - observation: [ - { - name: "Question Report", - encrypt: true, - datasetId: "ml-observation-question-report", - roles: ["PM"], - }, - { - name: "Status Report", - encrypt: false, - datasetId: "ml-observation-status-report", - roles: ["PM"], - }, { name: "Filtered task detail report", encrypt: true, @@ -145,7 +135,21 @@ export let mockData = { defaultValue: 1, }, ], + } + ], + observation: [ + { + name: "Question Report", + encrypt: true, + datasetId: "ml-observation-question-report", + roles: ["PM"], }, + { + name: "Status Report", + encrypt: false, + datasetId: "ml-observation-status-report", + roles: ["PM"], + } ], observation_with_rubric: [ { diff --git a/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.ts b/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.ts index 39d60af958976a6d8577b8fd58c25a0e368b5bf6..f1136e6894d22efe2aef859d5bd1750ca5e4bfe0 100644 --- a/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.ts +++ b/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.ts @@ -291,8 +291,8 @@ export class DatasetsComponent implements OnInit, OnDestroy { this.reportForm.controls.solution.setValue($event.value); this.reportForm.controls.programName.setValue(program); this.displayFilters['Resource'] = [$event?.source?.triggerValue] - if (solution[0].isRubricDriven == true && solution[0].type == 'observation') { - const type = solution[0].type + '_with_rubric'; + if (solution[0].isRubricDriven === true && solution[0].type === 'observation') { + const type = solution[0].criteriaLevelReport ? solution[0].type + '_with_rubric' : solution[0].type + '_with_rubric_no_criteria_level_report' this.getReportTypes(this.programSelected, type); } else { this.getReportTypes(this.programSelected, solution[0].type);