Skip to content

Instantly share code, notes, and snippets.

@kalda341
Last active November 28, 2020 03:36
Show Gist options
  • Save kalda341/4f331f83adba6faf322dada03158d94a to your computer and use it in GitHub Desktop.
Save kalda341/4f331f83adba6faf322dada03158d94a to your computer and use it in GitHub Desktop.
export function getFieldById(id: AssessmentFieldId): AssessmentField {
switch (id.type) {
case 'checklist-comment':
return checklistCommentField(id.key);
case 'document-environmental-effects':
return documentEnvironmentalEffectsAssessment(id.documentId);
case 'document-objectives-and-policies':
return documentObjectivesAndPoliciesAssessment(id.documentId);
case 'document-standard':
return documentStandardAssessment(id.standardId);
case 'document-provision':
return documentProvisionAssessment(id.rulePath, id.provisionId);
case 'notification-step':
return notificationStepAssessment(id);
case 'part2':
return part2Assessment(id.sectionId);
case 'site-description':
return siteDescription;
case 'description-of-proposal':
return descriptionOfProposal;
case 'application-history':
return applicationHistory;
case 'permitted-baseline':
return permittedBaseline;
case 'other-relevant-statutory-documents':
return otherRelevantStatutoryDocuments;
case 'positive-effects':
return positiveEffects;
case 'section104-conclusion':
return section104Conclusion;
case 'other-matters':
return otherMatters;
case 'threshold-test':
return thresholdTest;
case 'subdivision-assessment':
return subdivisionAssessment;
case 'consent-conditions':
return consentConditions;
case 'conclusion':
return conclusion;
case 'notes':
return notes;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment