Display empty state for soa control assessment
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
committed by
Bryan Frimin
parent
f33a1fe149
commit
c63a0b7ded
@@ -306,7 +306,7 @@ type (
|
||||
Name string
|
||||
Applicability *bool
|
||||
Justification *string
|
||||
BestPractice bool
|
||||
BestPractice *bool
|
||||
Regulatory *bool
|
||||
Contractual *bool
|
||||
RiskAssessment *bool
|
||||
|
||||
@@ -333,19 +333,7 @@
|
||||
</td>
|
||||
<td>{{boolToYesNoDash .Regulatory}}</td>
|
||||
<td>{{boolToYesNoDash .Contractual}}</td>
|
||||
<td>
|
||||
{{- if .Applicability}}
|
||||
{{- if and .Applicability .BestPractice}}
|
||||
Yes
|
||||
{{- else if .Applicability}}
|
||||
No
|
||||
{{- else}}
|
||||
-
|
||||
{{- end}}
|
||||
{{- else}}
|
||||
-
|
||||
{{- end}}
|
||||
</td>
|
||||
<td>{{boolToYesNoDash .BestPractice}}</td>
|
||||
<td>{{boolToYesNoDash .RiskAssessment}}</td>
|
||||
</tr>
|
||||
{{- end}}
|
||||
|
||||
@@ -543,6 +543,7 @@ func (s StateOfApplicabilityService) ExportPDF(
|
||||
|
||||
var regulatory *bool
|
||||
var contractual *bool
|
||||
var bestPractice *bool
|
||||
var riskAssessment *bool
|
||||
|
||||
if stmt.Applicability {
|
||||
@@ -562,6 +563,8 @@ func (s StateOfApplicabilityService) ExportPDF(
|
||||
if hasRisk {
|
||||
riskAssessment = &trueVal
|
||||
}
|
||||
|
||||
bestPractice = &control.BestPractice
|
||||
}
|
||||
|
||||
applicability := stmt.Applicability
|
||||
@@ -574,7 +577,7 @@ func (s StateOfApplicabilityService) ExportPDF(
|
||||
Name: control.Name,
|
||||
Applicability: &applicability,
|
||||
Justification: stmt.Justification,
|
||||
BestPractice: control.BestPractice,
|
||||
BestPractice: bestPractice,
|
||||
Regulatory: regulatory,
|
||||
Contractual: contractual,
|
||||
RiskAssessment: riskAssessment,
|
||||
|
||||
Reference in New Issue
Block a user