Skip to content

Commit

Permalink
including cset version from db in ISE Merit export
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrwins committed Oct 4, 2023
1 parent 3fa9a0a commit 9086e5e
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
//
////////////////////////////////
using CSETWebCore.Business.Acet;
using CSETWebCore.Business.Aggregation;
using CSETWebCore.Business.Maturity;
using CSETWebCore.Business.Question;
using CSETWebCore.Business.Sal;
Expand Down Expand Up @@ -1726,8 +1727,14 @@ on a.Mat_Question_Id equals q.Mat_Question_Id

}



public string GetCsetVersion()
{
return _context.CSET_VERSION.Select(x => x.Cset_Version1).FirstOrDefault();
}
public string GetAssessmentGuid(int assessmentId)
{
return _context.ASSESSMENTS.Where(x => x.Assessment_Id == assessmentId).Select(x => x.Assessment_GUID).FirstOrDefault().ToString();
}

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public interface IReportsDataBusiness
List<MatAnsweredQuestionDomain> GetIseAllQuestionList();

List<SourceFiles> GetIseSourceFiles();
string GetCsetVersion();
string GetAssessmentGuid(int assessmentId);
List<string> GetDomains();

void BuildSubGroupings(MaturityGrouping g, int? parentID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class MaturityBasicReportData
public List<MatRelevantAnswers> QuestionsList { get; set; }
public List<MatAnsweredQuestionDomain> MatAnsweredQuestions { get; set; }
public string AssessmentGuid { get; set; }
public string CsetVersion { get; set; }

/// <summary>
/// Gets the parent questions missing from the given list. Requires the QuestionsList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ public IActionResult GetIseAllQuestions()
data.MatAnsweredQuestions = _report.GetIseAllQuestionList();
data.Information = _report.GetInformation();

var assessInfo = _context.ASSESSMENTS.Where(x => x.Assessment_Id == assessmentId).FirstOrDefault();
data.AssessmentGuid = assessInfo.Assessment_GUID.ToString();
data.AssessmentGuid = _report.GetAssessmentGuid(assessmentId);
data.CsetVersion = _report.GetCsetVersion();
return Ok(data);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,18 +310,6 @@ <h4>{{ t('acet.acet reports') }}</h4>
</div>

<div *ngIf="assessSvc.isISE() && !isMobile" class="d-flex flex-column justify-content-start align-items-start mb-4">
<h4>ISE Reports</h4>

<!-- Don't submit to MERIT without a Credit Union name or asset value above $0 -->
<div *ngIf="ncuaSvc.creditUnionName == '' || ncuaSvc.creditUnionName === null || ncuaSvc.assetsAsNumber == 0">
<div class="alert-warning mt-2 mb-2 d-flex flex-row justify-content-center align-items-center flex-11a ng-star-inserted">
<span class="p-md-3 p-2 fs-medium cset-icons-exclamation-triangle"></span>
<div class="fs-base-2 p-2 d-flex flex-column justify-content-center flex-11a">
"Submit" button is disabled until all required fields on the 'Assessment Configuration' page have been specified.
</div>
</div>
</div>

<div *ngIf="assessSvc.isISE() && !isMobile"
class="d-flex flex-column justify-content-start align-items-start mb-4">
<h4>ISE Reports</h4>
Expand Down
12 changes: 8 additions & 4 deletions CSETWebNg/src/app/services/ncua.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ let headers = {
"examLevel": '',
"region": 0,
"guid": '',
"version": ''
"acet_version": '',
"db_version": ''
},
"issuesTotal": {
"dors": 0,
Expand Down Expand Up @@ -461,7 +462,7 @@ let headers = {
this.questions = r;
this.information = this.questions.information;
this.examLevel = this.getExamLevel();

// goes through domains
for (let i = 0; i < this.questions?.matAnsweredQuestions[0]?.assessmentFactors?.length; i++) {
let domain = this.questions?.matAnsweredQuestions[0]?.assessmentFactors[i];
Expand Down Expand Up @@ -587,7 +588,8 @@ let headers = {
"examLevel": this.examLevel,
"region": this.assessmentSvc.assessment.regionCode,
"guid": this.questions.assessmentGuid,
"version": environment.visibleVersion
"acet_version": environment.visibleVersion,
"db_version": this.questions.csetVersion
};

this.jsonString.metaData = metaDataInfo;
Expand Down Expand Up @@ -725,7 +727,9 @@ let headers = {
"examLevel": '',
"region": 0,
"stateLed": false,
"guid": ''
"guid": '',
"acet_version": '',
"db_version": ''
},
"issuesTotal": {
"dors": 0,
Expand Down

0 comments on commit 9086e5e

Please sign in to comment.