Skip to content

Commit

Permalink
Default to recipient org relationship #3340
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Oct 4, 2024
1 parent 9388c91 commit 8f6b7f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
2 changes: 1 addition & 1 deletion grails-app/assets/components/template/associated-orgs.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ <h4 class="modal-title" id="title">Organisation relationship</h4>
<div class="form-group">
<label class="required" for="relationship-description">Relationship</label>
<!-- ko if:$parent.relationshipTypes -->
<select id="relationship-description" name="description" class="form-control form-control-sm" data-bind="enable:organisationId(), optionsCaption:'Please select...', options:$parent.relationshipTypes, value:description"></select>
<select id="relationship-description" name="description" class="form-control form-control-sm" data-bind="enable:organisationId(), options:$parent.relationshipTypes, value:description"></select>
<!-- /ko -->
<!-- ko if:!$parent.relationshipTypes -->
<input type="text" id="relationship-description" name="description" class="form-control form-control-sm" data-bind="enable:organisationId(), value:description"></input>
Expand Down
21 changes: 3 additions & 18 deletions src/main/groovy/au/org/ala/merit/GmsMapper.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -312,25 +312,10 @@ class GmsMapper {
}
}
if (!error) {
// Find the organisation relationship to use based on the program
String description = 'Service provider'
if (program?.fundingType) {
switch (program.fundingType) {
case 'SPP':
description = 'Recipient'
break
case 'Grant':
description = 'Grantee'
break
case 'Procurement':
description = 'Service provider'

}
} else if (program?.config && program.config.organisationRelationship) {
description = program.config.organisationRelationship
}
// We are standardising on "Recipient" as the default organisation relationship
String description = 'Recipient'
project.associatedOrgs = [
[organisationId:organisation.organisationId, name: contractName ?: organisation.name, organisationName:organisation.name, description:description]] // Fix description
[organisationId:organisation.organisationId, name: contractName ?: organisation.name, organisationName:organisation.name, description:description]]
}
} else {
error = "Please supply an organisationId (ORG_ID) or ABN (ABN) for the project"
Expand Down

0 comments on commit 8f6b7f6

Please sign in to comment.