<commit_before>import Component from '@ember/component';
import { sort, filterBy } from '@ember/object/computed';
import { task, timeout } from 'ember-concurrency';

export default Component.extend({
  autosave: task(function* (property, value){
    this.get('model').set(property, value);
    yield timeout(1000);
    try {
      yield this.get('model').save();
      this.get('flashMessages').success("Saved");
    } catch(e) {
      e.errors.forEach((error) => {
        this.get('flashMessages').danger(error.detail);
      })
    }
  }).restartable(),
  sortedCompetitorsProperties: [
    'totPoints:desc',
  ],
  sortedCompetitors: sort(
    'model.session.competitors',
    'sortedCompetitorsProperties',
  ),
  sortedContestantsProperties: [
    'contestAwardName',
  ],
  filteredContestants: filterBy(
    'model.entry.contestants',
    'status',
    'Included',
  ),
  sortedContestants: sort(
    'filteredContestants',
    'sortedContestantsProperties',
  ),
});
<commit_msg>Align competitor sorts<commit_after>import Component from '@ember/component';
import { sort, filterBy } from '@ember/object/computed';
import { task, timeout } from 'ember-concurrency';

export default Component.extend({
  autosave: task(function* (property, value){
    this.get('model').set(property, value);
    yield timeout(1000);
    try {
      yield this.get('model').save();
      this.get('flashMessages').success("Saved");
    } catch(e) {
      e.errors.forEach((error) => {
        this.get('flashMessages').danger(error.detail);
      })
    }
  }).restartable(),
  sortedCompetitorsProperties: [
    'statusSort',
    'totPoints:desc',
    'groupName',
  ],
  sortedCompetitors: sort(
    'model.session.competitors',
    'sortedCompetitorsProperties'
  ),
  sortedContestantsProperties: [
    'contestAwardName',
  ],
  filteredContestants: filterBy(
    'model.entry.contestants',
    'status',
    'Included',
  ),
  sortedContestants: sort(
    'filteredContestants',
    'sortedContestantsProperties',
  ),
});

{'fraction_non_alphanumeric': 0.15502724120851907, 'fraction_numerical': 0.00396235760277365, 'mean_word_length': 3.821002386634845, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2535703', 'n_tokens_mistral': 644, 'n_tokens_neox': 641, 'n_words': 104}