Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions admin/app/components/campaigns/update.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ export default class Update extends Component {

constructor() {
super(...arguments);
this.form = this.store.createRecord('campaign-form');
this.form.name = this.args.campaign.name;
this.form.title = this.args.campaign.title;
this.form.customLandingPageText = this.args.campaign.customLandingPageText;
this.form.customResultPageText = this.args.campaign.customResultPageText;
this.form.customResultPageButtonText = this.args.campaign.customResultPageButtonText;
this.form.customResultPageButtonUrl = this.args.campaign.customResultPageButtonUrl;
this.form.multipleSendings = this.args.campaign.multipleSendings;
this.form.isForAbsoluteNovice = this.args.campaign.isForAbsoluteNovice;
this.form = this.store.createRecord('campaign-form', {
name: this.args.campaign.name,
title: this.args.campaign.title,
customLandingPageText: this.args.campaign.customLandingPageText,
customResultPageText: this.args.campaign.customResultPageText,
customResultPageButtonText: this.args.campaign.customResultPageButtonText,
customResultPageButtonUrl: this.args.campaign.customResultPageButtonUrl,
multipleSendings: this.args.campaign.multipleSendings,
isForAbsoluteNovice: this.args.campaign.isForAbsoluteNovice,
});

this.displayIsForAbsoluteNoviceWarning = this.args.campaign.isForAbsoluteNovice;
}
Expand Down
29 changes: 14 additions & 15 deletions admin/app/components/organizations/information-section-edit.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export default class OrganizationInformationSectionEditionMode extends Component

constructor() {
super(...arguments);
this.form = this.store.createRecord('organization-form');
this._initForm();
}

Expand Down Expand Up @@ -90,27 +89,27 @@ export default class OrganizationInformationSectionEditionMode extends Component
this.args.organization.set('credit', this.form.credit);
this.args.organization.set('documentationUrl', this.form.documentationUrl);
this.args.organization.set('identityProviderForCampaigns', this.form.identityProviderForCampaigns);

this.args.organization.set('features', this.form.features);

this.closeAndResetForm();
return this.args.onSubmit();
}

_initForm() {
this.form.name = this.args.organization.name;
this.form.externalId = this.args.organization.externalId;
this.form.provinceCode = this.args.organization.provinceCode;
this.form.dataProtectionOfficerFirstName = this.args.organization.dataProtectionOfficerFirstName;
this.form.dataProtectionOfficerLastName = this.args.organization.dataProtectionOfficerLastName;
this.form.dataProtectionOfficerEmail = this.args.organization.dataProtectionOfficerEmail;
this.form.email = this.args.organization.email;
this.form.credit = this.args.organization.credit;
this.form.documentationUrl = this.args.organization.documentationUrl;
this.form.identityProviderForCampaigns =
this.args.organization.identityProviderForCampaigns ?? this.noIdentityProviderOption.value;

this.form.features = structuredClone(this.args.organization.features);
this.form = this.store.createRecord('organization-form', {
name: this.args.organization.name,
externalId: this.args.organization.externalId,
provinceCode: this.args.organization.provinceCode,
dataProtectionOfficerFirstName: this.args.organization.dataProtectionOfficerFirstName,
dataProtectionOfficerLastName: this.args.organization.dataProtectionOfficerLastName,
dataProtectionOfficerEmail: this.args.organization.dataProtectionOfficerEmail,
email: this.args.organization.email,
credit: this.args.organization.credit,
documentationUrl: this.args.organization.documentationUrl,
identityProviderForCampaigns:
this.args.organization.identityProviderForCampaigns ?? this.noIdentityProviderOption.value,
features: structuredClone(this.args.organization.features),
});
}

<template>
Expand Down
1 change: 1 addition & 0 deletions admin/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ module.exports = function (defaults) {
staticAddonTestSupportTrees: true,
staticAddonTrees: true,
staticModifiers: true,
staticEmberSource: true,
packagerOptions: {
webpackConfig: {
devtool: sourceMapConfig[process.env.CI ? 'test' : (process.env.NODE_ENV ?? 'default')],
Expand Down
Loading