Skip to content

Commit 1701900

Browse files
Bekka592cweitat
andauthored
feat #8887: fixing question order on the attendee overview (#8921)
* feat #8887: fixing question order on the attendee overview * removing the "return true" --------- Co-authored-by: cweitat <[email protected]>
1 parent f09d121 commit 1701900

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

app/components/forms/orders/attendee-list.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import classic from 'ember-classic-decorator';
22
import Component from '@ember/component';
33
import { action, computed } from '@ember/object';
4-
import { groupBy } from 'lodash-es';
4+
import { groupBy, orderBy } from 'lodash-es';
55
import { or } from '@ember/object/computed';
66
import { tracked } from '@glimmer/tracking';
77
import { languageForms1 } from 'open-event-frontend/utils/dictionary/language-form-1';
@@ -56,7 +56,7 @@ export default class AttendeeList extends Component {
5656
@computed('[email protected]')
5757
get allFields() {
5858
const current_locale = this.cookies.read('current_locale');
59-
return groupBy(this.fields.toArray(), field => {
59+
const customFields = orderBy(this.fields.toArray()?.map(field => {
6060
const { main_language } = field;
6161

6262
if ((main_language && main_language.split('-')[0] === current_locale) || !field.translations || !field.translations.length) {
@@ -74,8 +74,9 @@ export default class AttendeeList extends Component {
7474
field.transName = field.name;
7575
}
7676

77-
return field.form;
78-
});
77+
return field;
78+
}), ['position']);
79+
return groupBy(customFields, field => field.get('form'));
7980
}
8081

8182
@action

app/models/custom-form.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,22 +100,22 @@ export default ModelBase.extend({
100100
twitter : tn.t('Twitter'),
101101
facebook : tn.t('Facebook'),
102102
github : tn.t('GitHub'),
103-
instagram : tn.t('Instagram'),
104103
linkedin : tn.t('LinkedIn'),
104+
instagram : tn.t('Instagram'),
105105
mastodon : tn.t('Mastodon'),
106106
gender : tn.t('Which of these categories describe your gender identity? (check all that apply)'),
107-
acceptReceiveEmails : tn.t('Email consent'),
107+
ageGroup : tn.t('Age Group'),
108108
acceptVideoRecording : tn.t('Photo & video & text consent'),
109109
acceptShareDetails : tn.t('Partner contact consent'),
110-
ageGroup : tn.t('Age Group'),
110+
acceptReceiveEmails : tn.t('Email consent'),
111+
is_consent_form_field : tn.t('Consent form field'),
112+
is_consent_form_field_photo : tn.t('Wikimania photo consent'),
113+
is_consent_form_field_email : tn.t('Wikimania email updates'),
111114
isConsentOfRefundPolicy : tn.t('Consent of refund policy'),
112-
homeWiki : tn.t('What is your home wiki'),
113115
languageForm1 : tn.t('What is your native language, or what language are you most fluent in?'),
114116
languageForm2 : tn.t('Are you fluent in any other of the following languages?'),
115-
is_consent_form_field : tn.t('Consent form field'),
116-
wikiScholarship : tn.t('Have you received a Wikimania scholarship?'),
117-
is_consent_form_field_photo : tn.t('Wikimania photo consent'),
118-
is_consent_form_field_email : tn.t('Wikimania email updates')
117+
homeWiki : tn.t('What is your home wiki'),
118+
wikiScholarship : tn.t('Have you received a Wikimania scholarship?')
119119
},
120120

121121
ready() {

0 commit comments

Comments
 (0)