-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat #8887: fixing question order on the attendee overview * removing the "return true" --------- Co-authored-by: cweitat <[email protected]>
- Loading branch information
Showing
2 changed files
with
13 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import classic from 'ember-classic-decorator'; | ||
import Component from '@ember/component'; | ||
import { action, computed } from '@ember/object'; | ||
import { groupBy } from 'lodash-es'; | ||
import { groupBy, orderBy } from 'lodash-es'; | ||
import { or } from '@ember/object/computed'; | ||
import { tracked } from '@glimmer/tracking'; | ||
import { languageForms1 } from 'open-event-frontend/utils/dictionary/language-form-1'; | ||
|
@@ -56,7 +56,7 @@ export default class AttendeeList extends Component { | |
@computed('[email protected]') | ||
get allFields() { | ||
const current_locale = this.cookies.read('current_locale'); | ||
return groupBy(this.fields.toArray(), field => { | ||
const customFields = orderBy(this.fields.toArray()?.map(field => { | ||
const { main_language } = field; | ||
|
||
if ((main_language && main_language.split('-')[0] === current_locale) || !field.translations || !field.translations.length) { | ||
|
@@ -74,8 +74,9 @@ export default class AttendeeList extends Component { | |
field.transName = field.name; | ||
} | ||
|
||
return field.form; | ||
}); | ||
return field; | ||
}), ['position']); | ||
return groupBy(customFields, field => field.get('form')); | ||
} | ||
|
||
@action | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1701900
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
open-event-frontend – ./
open-event-frontend-git-development-eventyay.vercel.app
open-event-frontend-eventyay.vercel.app
open-event-frontend.vercel.app