-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix: Attendee form questions order in order-form #5880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Attendee form questions order in order-form #5880
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/eventyay/open-event-frontend/o2spaf0ds |
Codecov Report
@@ Coverage Diff @@
## development #5880 +/- ##
===============================================
- Coverage 23.46% 23.12% -0.35%
===============================================
Files 511 511
Lines 5471 5474 +3
Branches 65 65
===============================================
- Hits 1284 1266 -18
- Misses 4171 4191 +20
- Partials 16 17 +1
Continue to review full report at Codecov.
|
allFields: computed('fields', function() { | ||
return groupBy(this.fields.toArray(), field => field.get('form')); | ||
const requiredFixed = this.fields.toArray().slice(0, 3); | ||
const customFields = orderBy(this.fields.toArray().slice(3), ['isComplex', 'name'], ['asc', 'asc']); |
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.
by default all values are sorted in ascending order
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.
no they are not in a way in attendee form.
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.
I mean orderBy funtion by default I think sort all values in ascending order so no need to pass ['asc', 'asc']
|
||
allFields: computed('fields', function() { | ||
return groupBy(this.fields.toArray(), field => field.get('form')); | ||
const requiredFixed = this.fields.toArray().slice(0, 3); |
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.
There is no guarantee that only first three fields are fixed fields, the logic is flawed
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.
this is for firstName, lastName and email. They are always at top?
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.
But they'll not always be 3
Test is failing |
I am not understanding why test are failing and why they are failing in that particular test. I mean they don't seem even related 😕 |
It's issue with heroku server used to test integration tests. Fixing |
Fixes #5853
Checklist
development
branch.