Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions apps/pbv-co/src/app/form-base/form-base.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,19 @@ <h3 class="panel-title">{{'company.rep'|translate}}
controlId="certifyPrivacy" label="consent.privacy"></control-messages>
</label>
</div>

<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<label for="certifyPrivacyOnEmail" class="required">
<input type="checkbox" id="certifyPrivacyOnEmail" [formControlName]="'certifyPrivacyOnEmail'" (blur)="processErrors()" required/>
<strong> {{'consent.privacy.OnEmail'|translate}}</strong>
<strong class="required">{{ 'commmon.required.bracket'|translate }}</strong>
<control-messages *ngIf="coForm.controls['certifyPrivacyOnEmail'].invalid" [showError]="showErrors" [attr.aria-live]="showErrors? null: 'assertive'"
parentId="coForm" [control]="coForm.controls['certifyPrivacyOnEmail'] | formControl"
controlId="certifyPrivacyOnEmail" label="consent.privacy.OnEmail"></control-messages>
</label>
</div>


</div>
</div>

Expand Down
17 changes: 5 additions & 12 deletions apps/pbv-co/src/app/form-base/form-base.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,18 +146,11 @@ export class FormBaseComponent implements OnInit, AfterViewInit {
}

private _updateErrorList(errorObjs) {
let consentPrivacyTempError = [];
if (errorObjs) {
errorObjs.forEach(
error => {
if (error.label === 'consent.privacy') {
consentPrivacyTempError.push(error);
}
}
);
}

this._consentPrivacyError = consentPrivacyTempError;
this._consentPrivacyError = errorObjs
.filter(e =>
e.controlId === 'certifyPrivacy' ||
e.controlId === 'certifyPrivacyOnEmail'
);
}

processErrors() {
Expand Down
17 changes: 9 additions & 8 deletions apps/pbv-co/src/app/form-base/form-base.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import { ProductLineService } from '../product-line/product-line.service';
export class FormBaseService {

constructor(
private _entityBaseService: EntityBaseService,
private _utilsService: UtilsService,
private _entityBaseService: EntityBaseService,
private _utilsService: UtilsService,
private _globalService: GlobalService,
private _companyEnrolmentService: CompanyEnrolmentService,
private _productLineService: ProductLineService,
Expand All @@ -39,14 +39,15 @@ export class FormBaseService {
}
return fb.group({
certifyPrivacy: [false, Validators.required],
certifyPrivacyOnEmail: [false, Validators.required],
});
}

public getEmptyEnrol(): Company{
const enrollment: Company = {
COMPANY_ENROL: this.getEmptyCompanyEnrol()
};

return enrollment;
}

Expand All @@ -65,7 +66,7 @@ export class FormBaseService {
contact_record: this.getEmptyContactRecordList(),
product_line_checkbox: this.getEmptyProductLine()
};

return companyEnrol;
}

Expand All @@ -83,7 +84,7 @@ export class FormBaseService {
public getEmptyContactRecordList(): ContactRecord[] {
return [];
}

public getEmptyContactRecord(): ContactRecord {
const contactRecord : ContactRecord = {
manufacturer: '',
Expand Down Expand Up @@ -123,7 +124,7 @@ export class FormBaseService {


let addressModelList = [];

if (addressFormArray) {
for (let i = 0; i < addressFormArray.length; i++) {
let addressModel: AddressRecord = this.getEmptyAddressRecord();
Expand All @@ -136,13 +137,13 @@ export class FormBaseService {

companyEnrol.address_record = addressModelList;
}

public mapContactsFormToOutput(companyEnrol: CompanyEnrol, contactsFormArray) {
const lang = this._globalService.currLanguage;
const languageList = this._globalService.languageList;

let contactModelList = [];

if (contactsFormArray) {
for (let i = 0; i < contactsFormArray.length; i++) {
let contactModel: ContactRecord = this.getEmptyContactRecord();
Expand Down
3 changes: 2 additions & 1 deletion apps/pbv-co/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@
"mailto.07": "Body: The draft CO XML file is attached.",
"mailto.08": "Attachment: The draft CO XML.",

"consent.privacy": "By submitting your personal information, you are consenting to its collection, use and disclosure in accordance with the privacy notice statement.",
"consent.privacy": "By providing your personal information, you consent to its collection, use, and disclosure in accordance with the privacy notice statement.",
"consent.privacy.OnEmail": "By providing the email addresses in this CO XML, you understand and acknowledge that this company will be enrolled in Health Canda’s electronic billing (e-Billing) system. Health Canada does not accept any liability for any errors or omissions in the email addresses provided by the company. Health Canada does not accept any liability for information not delivered or delivered to or intercepted by a third party unintended recipient.",

"email.subject": "Client information",
"email.to": "(client.information@hc-sc.gc.ca)",
Expand Down
4 changes: 2 additions & 2 deletions apps/pbv-co/src/assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@
"mailto.06": "Objet : Ébauche de fichier CO XML – [insérer le nom de votre compagnie] [insérer votre Identifiant de la compagnie, le cas échéant]",
"mailto.07": "Corps : L’ébauche de fichier CO XML est jointe.",
"mailto.08": "Pièce jointe : Ébauche de fichier CO XML.",
"consent.privacy": "En soumettant vos renseignements personnels, vous consentez à sa collecte, à son utilisation et à sa divulgation conformément à l'énoncé de confidentialité.",

"consent.privacy": "En fournissant vos renseignements personnels, vous consentez à leur collecte, utilisation et divulgation conformément à l'énoncé de confidentialité.",
"consent.privacy.onEmail": "En fournissant les adresses courriel dans ce fichier CO XML, vous comprenez et reconnaissez que cette compagnie sera inscrite au système de facturation électronique (e-Billing) de Santé Canada. Santé Canada décline toute responsabilité pour toute erreur ou omission dans les adresses courriel fournies par la compagnie. Santé Canada n’accepte aucune responsabilité pour les renseignements non-reçues ou qui ont été livrés à ou interceptés par une tierce partie involontairement. ",
"email.subject": "Unité des renseignements sur le client",
"email.to": "(client.information@hc-sc.gc.ca)",
"email.draft": "Ébauche de fichier CO XML - ",
Expand Down