-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add RDP declarations #2997 #2998
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The copy/paste to create the _rdpProjectReporting should be unnecessary. Instead of creating a variable for the reporting gsp, create a variable configured in the program as to the declaration setting type. Make the default the RLP one so we don't need to configure all the existing programs. The declaration page template already accepts the setting page type as a variable. Including it in the footer and the projectreporting.gsp means it's included twice so best to undo those changes unless I'm missing something.
@@ -225,7 +225,10 @@ class ProjectController { | |||
model.details.visible = model.details.visible && userHasViewAccess | |||
|
|||
boolean reportsVisible = config.includesContent(ProgramConfig.ProjectContent.REPORTING) && userHasViewAccess | |||
Map reportingTab = [label: 'Reporting', visible:reportsVisible, type:'tab', template:'projectReporting', reports:project.reports, stopBinding:true, services: config.services, scores:scores, hideDueDate:true, isAdmin:user?.isAdmin, isGrantManager:user?.isCaseManager] | |||
//temp using showMeriPlanComparison flag to identify that it's using the new program, will create a new flag otherwise | |||
String projectReportingTemplate = (showMeriPlanComparison) ? 'rdpProjectReporting' : 'projectReporting' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a method to the ProgramConfig class getDeclarationTemplate(). This method should default to the SettingPageType.RLP_REPORT_DECLARATION but should try and do a SettingPageType.getFormName(declarationPageType) where declarationPage type is a new setting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @chrisala, where is the value of the declarationPageType argument will come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The program config
//temp using showMeriPlanComparison flag to identify that it's using the new program, will create a new flag otherwise | ||
String projectReportingTemplate = (showMeriPlanComparison) ? 'rdpProjectReporting' : 'projectReporting' | ||
|
||
Map reportingTab = [label: 'Reporting', visible:reportsVisible, type:'tab', template:projectReportingTemplate, reports:project.reports, stopBinding:true, services: config.services, scores:scores, hideDueDate:true, isAdmin:user?.isAdmin, isGrantManager:user?.isCaseManager, isRdpReport:showMeriPlanComparison] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include the declarationTemplate:config.getDeclarationTemplate() here
@@ -0,0 +1,62 @@ | |||
<div id="generate-report" class="validationEngineContainer"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete this - it's unnecessary code duplication.
@@ -0,0 +1,5 @@ | |||
<h4>${heading}</h4> | |||
<p>${attachmentText}</p> | |||
<g:render template="/shared/declaration" model="[divId:'meriSubmissionDeclaration', declarationType:au.org.ala.merit.SettingPageType.RDP_MERI_DECLARATION]"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This results in a double inclusion of the declaration template. Delete this.
@@ -1,2 +1,3 @@ | |||
<h4>${heading}</h4> | |||
<p>${attachmentText}</p> | |||
<g:render template="/shared/declaration" model="[divId:'meriSubmissionDeclaration', declarationType:au.org.ala.merit.SettingPageType.RLP_MERI_DECLARATION]"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This results in a double inclusion of the declaration template. Delete this.
</g:elseif> | ||
</div> | ||
<g:render template="/shared/categorizedReporting"></g:render> | ||
<g:render template="/shared/declaration" model="${[declarationType:au.org.ala.merit.SettingPageType.RDP_REPORT_DECLARATION]}"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of a hard coded SettingPateType.RDP/RLP_REPORT_DECLARATION use the model variable added by the ProjectController.
@@ -96,6 +96,10 @@ class ProgramConfig implements Map { | |||
emailTemplate | |||
} | |||
|
|||
SettingPageType getDeclarationTemplate(declarationPageType) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter "declarationPageType" is unnecessary here as it is managed by this class.
@@ -506,7 +506,13 @@ subProgram.config = { | |||
"model": { | |||
"titleHelpText":"Service and Target measure fields pre-populated through the Project Service/Target Measure/s to address threats field and Monitoring methodology sections" | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still have an attachmentRdpFooter? Should this be removed?
"model": { | ||
"heading": "MERI Attachments", | ||
"attachmentText": "Please attach Project logic to your MERI plan using the documents function on the Admin tab. A \"Document type\" of \"Project Logic\" should be selected when uploading the document." | ||
} | ||
} | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script needs to be updated to set the declarationPageType for the new program to the new setting page type.
@@ -225,7 +225,8 @@ class ProjectController { | |||
model.details.visible = model.details.visible && userHasViewAccess | |||
|
|||
boolean reportsVisible = config.includesContent(ProgramConfig.ProjectContent.REPORTING) && userHasViewAccess | |||
Map reportingTab = [label: 'Reporting', visible:reportsVisible, type:'tab', template:'projectReporting', reports:project.reports, stopBinding:true, services: config.services, scores:scores, hideDueDate:true, isAdmin:user?.isAdmin, isGrantManager:user?.isCaseManager] | |||
|
|||
Map reportingTab = [label: 'Reporting', visible:reportsVisible, type:'tab', template:'projectReporting', reports:project.reports, stopBinding:true, services: config.services, scores:scores, hideDueDate:true, isAdmin:user?.isAdmin, isGrantManager:user?.isCaseManager, isRdpReport:showMeriPlanComparison, declarationTemplate:config.getDeclarationTemplate()] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the model variable "isRdpReport" used for (I can't see it used in this PR)? Can it be deleted?
No description provided.