diff --git a/src/config/formSources.config.js b/src/config/formSources.config.js index bb90d28..c7ddec9 100644 --- a/src/config/formSources.config.js +++ b/src/config/formSources.config.js @@ -20,3 +20,17 @@ export const formSources = { }, ], }; + +export const excludedForms = { + greaterBostonLegalService: [ + 'docassemble.Collection:data/questions/validationOrDoNotCallLetterForAdvocates.yml', + 'docassemble.MAAffidavitofIndigency:data/questions/affidavit.yml', + 'docassemble.MAAffidavitofIndigency:data/questions/affidavit_advocate.yml', + 'docassemble.docsign:data/questions/upload_template.yml', + 'docassemble.Collection:data/questions/exemptOrNotQuestions.yml', + 'docassemble.docsign:data/questions/fill_generic_template.yml', + 'docassemble.startOfCaseDocs:data/questions/caseStartDocs.yml', + 'docassemble.HousingCodeChecklist:data/questions/housing_code_interview.yml', + 'docassemble.HousingCodeChecklist:data/questions/feedback.yml', + ], +}; diff --git a/src/config/topics.config.ts b/src/config/topics.config.ts index c3faee4..090e9b8 100644 --- a/src/config/topics.config.ts +++ b/src/config/topics.config.ts @@ -49,7 +49,7 @@ export const legalTopics: Topic[] = [ priority: 1, }, { - codes: ['CO-00-00-00-00'], + codes: ['CO-00-00-00-00', 'CO-07-06-01-00'], name: 'courts', long_name: 'Court and hearings', icon: 'gavel', diff --git a/src/data/fetchInterviewData.ts b/src/data/fetchInterviewData.ts index def8202..811d4d5 100644 --- a/src/data/fetchInterviewData.ts +++ b/src/data/fetchInterviewData.ts @@ -1,5 +1,6 @@ import { formSources, pathToServerConfig } from '../config/formSources.config'; import { legalTopics } from '../config/topics.config'; +import { excludedForms } from '../config/formSources.config'; import { findClosestTopic } from './helpers'; export const fetchInterviews = async (path) => { @@ -22,6 +23,16 @@ export const fetchInterviews = async (path) => { if (data && data.interviews) { const taggedInterviews = data.interviews .filter((interview) => !interview.metadata.unlisted) // exclude unlisted interviews + // exclude interviews with titles that are in the excludedForms list relative to this server + .filter((interview) => { + // Check if an exclusion list exists for the server, and use it if available + const exclusions = excludedForms[server.key]; + if (exclusions) { + return !exclusions.includes(interview.filename); + } else { + return true; + } + }) .map((interview) => ({ ...interview, serverUrl: server.url,