Skip to content

Commit

Permalink
Merge branch 'main' into NDT-517-Add-email-recipients-to-intake-5-sub…
Browse files Browse the repository at this point in the history
…mission-notifications
  • Loading branch information
RRanath committed Sep 26, 2024
2 parents 8de5aac + 4097673 commit a898db0
Show file tree
Hide file tree
Showing 12 changed files with 279 additions and 73 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/release-process.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ jobs:
yarn
git checkout "${GITHUB_HEAD_REF}"
yarn run release-it --ci --branch="${GITHUB_HEAD_REF}" --git.commitArgs=-n
- name: Enable Auto-Merge
if: steps.checkbox.outputs.result == 'true' && steps.up_to_date.outputs.result == 'true' && steps.pr_approval.outputs.result == 'true' && !github.event.pull_request.draft
run: |
PR_URL="${{ github.event.pull_request.html_url }}"
gh pr merge --auto --merge "$PR_URL"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Uncheck the checkbox
if: steps.checkbox.outputs.result == 'true' && steps.up_to_date.outputs.result == 'true' && steps.pr_approval.outputs.result == 'true' && !github.event.pull_request.draft
uses: actions/github-script@v7
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Self-hosted Renovate
uses: renovatebot/github-action@v40.2.9
uses: renovatebot/github-action@v40.2.10
with:
configurationFile: ./.github/renovate.json
token: ${{ secrets.RENOVATE_GITHUB_TOKEN }}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## [1.193.3](https://github.com/bcgov/CONN-CCBC-portal/compare/v1.193.2...v1.193.3) (2024-09-26)

### Bug Fixes

- format for Federal requested for history ([5ec38ba](https://github.com/bcgov/CONN-CCBC-portal/commit/5ec38ba9b7c308b22fbf1a24e6c26561e0c64902))
- update PR to enable automerge after realease setup ([f16a726](https://github.com/bcgov/CONN-CCBC-portal/commit/f16a726bc967a192e13394ac227afee9f4304ea5))

## [1.193.2](https://github.com/bcgov/CONN-CCBC-portal/compare/v1.193.1...v1.193.2) (2024-09-26)

## [1.193.1](https://github.com/bcgov/CONN-CCBC-portal/compare/v1.193.0...v1.193.1) (2024-09-18)

### Bug Fixes
Expand Down
36 changes: 35 additions & 1 deletion app/backend/lib/sow_import/tab_7.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const readBudget = async (sow_id, wb, sheet_name) => {
fundingFromAllOtherSources: '',
amountRequestedFromProvince: '',
totalInfrastructureBankFunding: '',
totalFNHAFunding: '',
totalFundingRequestedCCBC: '',
},
detailedBudget: {
Expand Down Expand Up @@ -126,6 +127,13 @@ const readBudget = async (sow_id, wb, sheet_name) => {
2627: '',
total: '',
},
fnhaFunding: {
2324: '',
2425: '',
2526: '',
2627: '',
total: '',
},
otherFundingPartners: [],
totalFinancialContribution: {
2324: '',
Expand Down Expand Up @@ -472,6 +480,7 @@ const readBudget = async (sow_id, wb, sheet_name) => {
budget[row]['K'];
row++;
// next 7 are possible other
let fnhaFundingRow = {};
for (let otherRow = row; otherRow < row + 7; otherRow++) {
const otherSuspect = budget[otherRow]['B'];
let otherValue;
Expand All @@ -483,8 +492,14 @@ const readBudget = async (sow_id, wb, sheet_name) => {
}
// if we don't have the predefined phrase, we have a custom other
if (
otherValue.indexOf('Identify other source of funding by name') === -1
otherValue.indexOf('Identify other source of funding by name') > -1
) {
continue;
} else if (
otherValue.indexOf('First Nations Health Authority (FNHA)') > -1
) {
fnhaFundingRow = budget[otherRow];
} else {
detailedBudget.summaryOfEstimatedProjectFunding.otherFundingPartners.push(
{
fundingPartnersName: budget[otherRow]['B'],
Expand All @@ -497,6 +512,19 @@ const readBudget = async (sow_id, wb, sheet_name) => {
);
}
}

// FNHA Funding
detailedBudget.summaryOfEstimatedProjectFunding.fnhaFunding[2324] =
fnhaFundingRow['G'] ?? 0;
detailedBudget.summaryOfEstimatedProjectFunding.fnhaFunding[2425] =
fnhaFundingRow['H'] ?? 0;
detailedBudget.summaryOfEstimatedProjectFunding.fnhaFunding[2526] =
fnhaFundingRow['I'] ?? 0;
detailedBudget.summaryOfEstimatedProjectFunding.fnhaFunding[2627] =
fnhaFundingRow['J'] ?? 0;
detailedBudget.summaryOfEstimatedProjectFunding.fnhaFunding.total =
fnhaFundingRow['K'] ?? 0;
detailedBudget.summaryTable.totalFNHAFunding = fnhaFundingRow['K'] ?? 0;
}
// get totals
if (value.indexOf('Total Financial Contributions') > -1) {
Expand Down Expand Up @@ -632,6 +660,12 @@ const ValidateData = (data) => {
error: 'Invalid data: Amount CIB will contribute',
});
}
if (typeof data.totalFNHAFunding !== 'number') {
errors.push({
level: 'cell',
error: 'Invalid data: First Nations Health Authority (FNHA)',
});
}
if (typeof data.fundingFromAllOtherSources !== 'number') {
errors.push({
level: 'cell',
Expand Down
1 change: 1 addition & 0 deletions app/formSchema/uiSchema/history/conditionalApproval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const conditionalApprovalSchema = {
title: 'ISED announcement',
},
federalRequested: {
type: 'number',
title: 'Federal requested',
},
letterOfApprovalUpload: {
Expand Down
5 changes: 4 additions & 1 deletion app/lib/helpers/ccbcSummaryGenerateFormData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ const getSowData = (sowData, baseSowData) => {
cibFunding:
sowData?.nodes[0]?.sowTab7SBySowId?.nodes[0]?.jsonData?.summaryTable
?.totalInfrastructureBankFunding,
fhnaFunding: null,
fhnaFunding:
sowData?.nodes[0]?.sowTab7SBySowId?.nodes[0]?.jsonData?.summaryTable
?.totalFNHAFunding,
otherFunding:
sowData?.nodes[0]?.sowTab7SBySowId?.nodes[0]?.jsonData?.summaryTable
?.fundingFromAllOtherSources,
Expand Down Expand Up @@ -203,6 +205,7 @@ const getSowData = (sowData, baseSowData) => {
fundingRequestedCcbc: 'SOW',
applicantAmount: 'SOW',
cibFunding: 'SOW',
fhnaFunding: 'SOW',
otherFunding: 'SOW',
totalProjectBudget: 'SOW',
effectiveStartDate: 'SOW',
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@emotion/styled": "^11.11.5",
"@fortawesome/fontawesome-svg-core": "^6.2.0",
"@fortawesome/free-solid-svg-icons": "^6.2.0",
"@fortawesome/react-fontawesome": "^0.2.0",
"@fortawesome/react-fontawesome": "^0.2.2",
"@graphile-contrib/pg-many-to-many": "^1.0.1",
"@graphile/persisted-operations": "^0.1.1",
"@growthbook/growthbook-react": "^0.9.0",
Expand Down
Loading

0 comments on commit a898db0

Please sign in to comment.