diff --git a/business-registry-dashboard/app/stores/affiliations.ts b/business-registry-dashboard/app/stores/affiliations.ts index 1b54703..65f1fb3 100644 --- a/business-registry-dashboard/app/stores/affiliations.ts +++ b/business-registry-dashboard/app/stores/affiliations.ts @@ -42,10 +42,15 @@ export const useAffiliationsStore = defineStore('brd-affiliations-store', () => } async function removeBusiness (payload: RemoveBusinessPayload) { - // If the business is a new registration then remove the business filing from legal-db - if (payload.business.corpType.code === CorpTypes.INCORPORATION_APPLICATION) { + // If the business is a new IA, amalgamation, or registration then remove the business filing from legal-db + // TODO: Add continuation in to the list of filings to remove (for MVP) + if ([ + CorpTypes.INCORPORATION_APPLICATION, + CorpTypes.AMALGAMATION_APPLICATION, + CorpTypes.REGISTRATION + ].includes(payload.business.corpType.code)) { const filingResponse = await getFilings(payload.business.businessIdentifier) - if (filingResponse && filingResponse.status === 200) { // TODO: fix typing + if (filingResponse) { const filingId = filingResponse.filing?.header?.filingId // TODO: fix typing // If there is a filing delete it which will delete the affiliation, else delete the affiliation if (filingId) { diff --git a/business-registry-dashboard/package.json b/business-registry-dashboard/package.json index 261dcc5..e2c36a9 100644 --- a/business-registry-dashboard/package.json +++ b/business-registry-dashboard/package.json @@ -2,7 +2,7 @@ "name": "business-registry-dashboard", "private": true, "type": "module", - "version": "0.0.10", + "version": "0.0.11", "scripts": { "build-check": "nuxt build", "build": "nuxt generate",