Skip to content

Commit

Permalink
Merge pull request #2998 from AtlasOfLivingAustralia/feature/issue2997
Browse files Browse the repository at this point in the history
add RDP declarations #2997
  • Loading branch information
chrisala authored Oct 13, 2023
2 parents 7f8a146 + b02b387 commit 72ff9b7
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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, declarationTemplate:config.getDeclarationTemplate()]
if (reportingTab.visible) {
reportingTab.reportOrder = config?.projectReports?.collect{
[category:it.category, description:it.description, banner:it.banner, rejectionReasonCategoryOptions:it.rejectionReasonCategoryOptions?:[]]}?.unique({it.category}) ?: []
Expand Down
3 changes: 2 additions & 1 deletion grails-app/views/project/_projectReporting.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@
</div>
</g:elseif>
</div>
<g:set var="declarationTemplate" value="${declarationTemplate}"/>
<g:render template="/shared/categorizedReporting"></g:render>
<g:render template="/shared/declaration" model="${[declarationType:au.org.ala.merit.SettingPageType.RLP_REPORT_DECLARATION]}"/>
<g:render template="/shared/declaration" model="${[declarationType:declarationTemplate]}"/>
<g:render template="/shared/reportRejectionModal"/>
<script type="text/html" id="adjustment-instructions">
<fc:getSettingContent settingType="${au.org.ala.merit.SettingPageType.REPORT_ADJUSTMENT_INSTRUCTIONS}"/>
Expand Down
2 changes: 1 addition & 1 deletion grails-app/views/project/meriPlan/_attachmentFooter.gsp
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<h4>${heading}</h4>
<p>${attachmentText}</p>
<p>${attachmentText}</p>
2 changes: 2 additions & 0 deletions src/main/groovy/au/org/ala/merit/SettingPageType.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,15 @@ enum SettingPageType {
LOCK_STOLEN_EMAIL_SUBJECT('lockStolenSubject', 'Subject line when someone overrides a lock', 'fielddata.lock.subject'),
LOCK_STOLEN_EMAIL('lockStolenEmail', 'Email content when someone overrides a lock', 'fielddata.lock.body'),
RLP_MERI_DECLARATION('rlpMeriDeclaration', 'Declaration when submitting RLP reports or MERI Plan', 'fielddata.rlp.meri.declaration'),
RDP_MERI_DECLARATION('rdpMeriDeclaration', 'Declaration when submitting RDP reports or MERI Plan', 'fielddata.rdp.meri.declaration'),
RLP_PLAN_SUBMITTED_EMAIL('rlpMeriPlanSubmitted', 'Project plan has been submitted email body text', 'fielddata.rlp.meriPlanSubmitted.emailText'),
RLP_PLAN_APPROVED_EMAIL('rlpMeriPlanApproved', 'Project plan has been approved email body text', 'fielddata.rlp.meriPlanApproved.emailText'),
RLP_PLAN_REJECTED_EMAIL('rlpMeriPlanRejected', 'Project plan has been rejected email body text', 'fielddata.rlp.meriPlanRejected.emailText'),
RLP_PLAN_SUBMITTED_EMAIL_SUBJECT_LINE('rlpMeriPlanSubmittedSubject', 'Subject line for the \'Project plan has been submitted\' email', 'fielddata.rlp.meriPlanSubmitted.emailSubject'),
RLP_PLAN_APPROVED_EMAIL_SUBJECT_LINE('rlpMeriPlanApprovedSubject', 'Subject line for the \'Project plan has been approved\' email', 'fielddata.rlp.meriPlanApproved.emailSubject'),
RLP_PLAN_REJECTED_EMAIL_SUBJECT_LINE('rlpMeriPlanRejectedSubject', 'Subject line for the \'Project plan has been rejected\' email', 'fielddata.rlp.meriPlanRejected.emailSubject'),
RLP_REPORT_DECLARATION('rlpReportDeclaration', 'Declaration when submitting RLP reports or MERI Plan', 'fielddata.rlp.report.declaration'),
RDP_REPORT_DECLARATION('rdpReportDeclaration', 'Declaration when submitting RDP reports or MERI Plan', 'fielddata.rdp.report.declaration'),
RLP_REPORT_SUBMITTED_EMAIL_SUBJECT('rlpReportSubmittedEmailSubject', 'RLP Report submitted email subject line text', 'fielddata.rlp.report.submitted.emailSubject'),
RLP_REPORT_SUBMITTED_EMAIL_BODY('rlpReportSubmittedEmailBody', 'RLP Report submitted email subject body text', 'fielddata.rlp.report.submitted.emailBody'),
RLP_REPORT_APPROVED_EMAIL_SUBJECT('rlpReportApprovedEmailSubject', 'RLP Report approved email subject line text', 'fielddata.rlp.report.approved.emailSubject'),
Expand Down
7 changes: 6 additions & 1 deletion src/main/groovy/au/org/ala/merit/config/ProgramConfig.groovy
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package au.org.ala.merit.config


import au.org.ala.merit.SettingPageType
import groovy.util.logging.Slf4j

/**
Expand Down Expand Up @@ -96,6 +96,10 @@ class ProgramConfig implements Map {
emailTemplate
}

SettingPageType getDeclarationTemplate() {
return SettingPageType.getForName(config.declarationPageType ?: 'rlpReportDeclaration')
}



boolean projectsMustStartAndEndOnContractDates
Expand Down Expand Up @@ -141,6 +145,7 @@ class ProgramConfig implements Map {

/** This flag controls whether the project is using the new meri plan template(2023) */
boolean supportsMeriPlanComparison = false

}


Expand Down
25 changes: 25 additions & 0 deletions src/main/scripts/releases/3.1/insertRdpDeclarationText.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
var rdpDeclarationText = [
{
"key":"meritfielddata.rdp.report.declaration",
"value":'1. I declare that I am legally authorised to submit this report on behalf of the Regional Delivery Partner pursuant to the Deed of Standing Offer (Deed) between the Regional Delivery Partner and the Commonwealth. \r\n' +
'2. I understand that, under the Deed, all information I submit may constitute Contract Material.\r\n' +
'3. I understand that, through the Deed, the Commonwealth is licensed to use, reproduce, modify, adapt, communicate, publish, broadcast and distribute the Contract Material on the terms set out in the Deed.\r\n' +
'4. I declare that the information I submit is complete and correct and not false or misleading. I understand that it is an offence under the Criminal Code Act 1995 (Cth) to provide false or misleading information.'
}
]

for (var i=0; i<rdpDeclarationText.length; i++) {
var setting = {
key: rdpDeclarationText[i].key,
value: rdpDeclarationText[i].value,
dateCreated: ISODate(),
lastUpdated: ISODate()
};
if (db.setting.findOne({key: setting.key})) {
print("Inserting " + setting.key)
db.setting.replaceOne({key: setting.key}, setting);
} else {
print("Updating " + setting.key)
db.setting.insertOne(setting);
}
}
2 changes: 1 addition & 1 deletion src/main/scripts/releases/3.1/updateNhtProgramConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ subProgram.config = {
"activityPeriodDescriptor": "Outputs report #",
"supportsParatoo": true,
"supportsMeriPlanComparison": true,
"declarationPageType": "rdpReportDeclaration",
"emailTemplates": {
"reportSubmittedEmailTemplate": "RLP_REPORT_SUBMITTED_EMAIL_TEMPLATE",
"reportReturnedEmailTemplate": "RLP_REPORT_RETURNED_EMAIL_TEMPLATE",
Expand Down Expand Up @@ -506,7 +507,6 @@ 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"
}

}
],
keyThreatCodes: [
Expand Down

0 comments on commit 72ff9b7

Please sign in to comment.