Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TASK 3702: Add demographic info text, release 1.1.1 #79

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/application/js/application.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function () {
const src =
'https://cdn.jsdelivr.net/gh/bcgov/nr-af-pods@dev/powerpod/releases/powerpod-1.1.0.min.js';
'https://cdn.jsdelivr.net/gh/bcgov/nr-af-pods@dev/powerpod/releases/powerpod-1.1.1.min.js';
const script = document.createElement('script');
script.setAttribute('async', '');
script.src = src;
Expand Down
2 changes: 1 addition & 1 deletion powerpod/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "powerpod",
"type": "module",
"version": "1.1.0",
"version": "1.1.1",
"description": "Powerpod is a jQuery plugin that enhances functionality of Power Pages components.",
"main": "dist/powerpod",
"scripts": {
Expand Down
479 changes: 479 additions & 0 deletions powerpod/releases/powerpod-1.1.1.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion powerpod/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import typescript from '@rollup/plugin-typescript';
import css from 'rollup-plugin-import-css';

const licenseContent = `/*!
* powerpod 1.1.0
* powerpod 1.1.1
* https://github.com/bcgov/nr-af-pods/powerpod
*
* @license GPLv3 for open source use only
Expand Down
22 changes: 14 additions & 8 deletions powerpod/src/js/application/steps/demographicInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ import {
} from '../../common/html.js';
import { Logger } from '../../common/logger.js';
import { configureFields } from '../../common/fieldConfiguration.js';
import {
setFieldReadOnly,
} from '../../common/fieldValidation.js';
import {
validateDemographicInfoRequiredFields,
} from '../validation.js';
import { setFieldReadOnly } from '../../common/fieldValidation.js';
import { validateDemographicInfoRequiredFields } from '../validation.js';
import { getProgramEmailAddress } from '../../common/program.js';

const logger = Logger('application/steps/demographicInfo');

Expand All @@ -23,6 +20,8 @@ export function customizeDemographicInfoStep(programData) {
});
configureFields();
if (programData?.quartech_disabledchefsdemographicinfo) {
addDemographicDataDescriptionOldVersionForABPP();

addViewExampleTo_Q1a();

initOnChange_Question1_SoleProprietorshipOrGeneralPartnership();
Expand All @@ -40,8 +39,15 @@ export function customizeDemographicInfoStep(programData) {
}
}

function setDemographicInfoRequiredFields() {
configureFields();
function addDemographicDataDescriptionOldVersionForABPP() {
let div = document.createElement('div');
const programEmailAddress = getProgramEmailAddress();
div.innerHTML =
'<p>The Province of British Columbia supports inclusive and increased representation of underrepresented groups. By providing the information below, you are helping to improve the delivery of programming. At this time, the questions focus on three identity groups, and do not cover all potential groups who are underrepresented in the agriculture sector. We plan to expand the focus to other underrepresented groups in future.</p>' +
`<p>Your personal information is collected under section 26(c) and 26(e) of the Freedom of Information and Protection of Privacy Act for the purposes of evaluating applications and for the planning and evaluating of the S-CAP Ministry Program. The demographic information you provide is voluntary and will not be used to assess your eligibility for this program. Each individual understands the purposes of the collection, use, and disclosure of their demographic personal information. The information you provide will be shared with the federal government to fulfill the provincial obligations under the Sustainable Canadian Agricultural Partnership (S-CAP) bilateral agreement. It may be combined with other survey or administrative data sources and used for statistical, research and evaluation purposes. If any information is published, your responses will be combined with the responses of others so that you cannot be identified. If you have any questions about the collection of your information, please contact the program manager at <a href = "mailto: ${programEmailAddress}">${programEmailAddress}</a>.</p>` +
'<p><span>Required Field </span><span style="color:red">*</span></p>';

$("[data-name='DemographicData_Tab1']").parent().prepend(div);
}

function addViewExampleTo_Q1a() {
Expand Down
2 changes: 1 addition & 1 deletion powerpod/src/js/powerpod.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function setAPI() {
};
};
// @ts-ignore
POWERPOD.version = '1.1.0';
POWERPOD.version = '1.1.1';
// @ts-ignore
win.powerpod = POWERPOD;
}