Skip to content

Conversation

maze-runnar
Copy link
Contributor

Fixes #5853

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the Upstream development branch.
  • The acceptance, integration, unit tests and linter pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@vercel
Copy link

vercel bot commented Dec 3, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/eventyay/open-event-frontend/o2spaf0ds
✅ Preview: https://open-event-frontend-git-order-form-order.eventyay.now.sh

@codecov
Copy link

codecov bot commented Dec 3, 2020

Codecov Report

Merging #5880 (1aea926) into development (cfc845f) will decrease coverage by 0.34%.
The diff coverage is 0.00%.

Impacted file tree graph

@@               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     
Impacted Files Coverage Δ
app/components/forms/orders/order-form.js 0.00% <0.00%> (ø)
app/models/social-link.js 0.00% <0.00%> (ø)
app/utils/string.js 33.33% <0.00%> (-66.67%) ⬇️
app/utils/internal.js 25.00% <0.00%> (-50.00%) ⬇️
app/mixins/custom-primary-key.js 0.00% <0.00%> (-50.00%) ⬇️
app/models/event.js 18.75% <0.00%> (-31.25%) ⬇️
app/components/event-card.js 60.00% <0.00%> (-10.00%) ⬇️
app/services/cache.ts 61.40% <0.00%> (-5.27%) ⬇️
app/controllers/admin/users/list.js 0.00% <0.00%> (ø)
app/controllers/admin/sessions/list.js 0.00% <0.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cfc845f...1aea926. Read the comment docs.

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']);
Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Member

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);
Copy link
Member

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

Copy link
Contributor Author

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?

Copy link
Member

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

@iamareebjamal
Copy link
Member

Test is failing

@maze-runnar
Copy link
Contributor Author

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 😕

@iamareebjamal
Copy link
Member

It's issue with heroku server used to test integration tests. Fixing

@iamareebjamal iamareebjamal merged commit 1d21ff8 into fossasia:development Dec 11, 2020
@maze-runnar maze-runnar deleted the order-form-order branch December 11, 2020 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attendee form questions have different order on wizard and live page
3 participants