Skip to content
Snippets Groups Projects
Commit 155f1bbb authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Refactor data for sending

parent f5be7af9
No related branches found
No related tags found
1 merge request!78Resolve "Rewrite registration wizard"
Pipeline #195968 canceled
......@@ -736,12 +736,18 @@ import SecondaryActionButton from "aleksis.core/components/generic/buttons/Secon
dataForSubmit() {
const { confirmEmail, confirmPassword, ...filteredUserData } = this.data.user;
return {
const data = {
...this.data,
additionalFields: JSON.stringify(this.data.additionalFields),
terms: JSON.stringify(this.data.terms),
user: filteredUserData,
};
if (this.event.cost == 0 && this.event.maxCost == 0) {
const { payment, ...filteredData } = data;
return filteredData;
}
return data;
},
steps() {
return [
......@@ -831,7 +837,7 @@ import SecondaryActionButton from "aleksis.core/components/generic/buttons/Secon
comment: "",
additionalFields: {},
terms: {},
retractionConsent: null,
retractionConsent: false,
},
};
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment