<commit_before>import Component from '@ember/component';
import { inject as service } from '@ember/service';
import { computed, observer } from '@ember/object';
import { task } from 'ember-concurrency';
import { on } from '@ember/object/evented';
import { translationMacro as t } from 'ember-i18n';
import ENV from 'irene/config/environment';
import triggerAnalytics from 'irene/utils/trigger-analytics';

export default Component.extend({
  i18n: service(),
  realtime: service(),
  me: service(),
  notify: service('notification-messages-service'),

  tagName: ['tr'],
  showRemoveProjectConfirm: false,
  isRemovingProject: false,

  tProjectRemoved: t('projectRemoved'),
  tPleaseTryAgain: t('pleaseTryAgain'),
  tPermissionChanged: t('permissionChanged'),


  /* Fetch project for the given id */
  teamProject: computed('project,id', function() {
    const id = this.get('project.id');
    return this.get('store').queryRecord('project', {id});
  }),


  /* Watch for allowEdit input */
  watchProjectWrite: observer('project.write', function(){
    this.get('changeProjectWrite').perform();
  }),


  /* Save project-write value */
  changeProjectWrite: task(function * () {<commit_msg>Team projects list api fix<commit_after>import Component from '@ember/component';
import { inject as service } from '@ember/service';
import { computed, observer } from '@ember/object';
import { task } from 'ember-concurrency';
import { on } from '@ember/object/evented';
import { translationMacro as t } from 'ember-i18n';
import ENV from 'irene/config/environment';
import triggerAnalytics from 'irene/utils/trigger-analytics';

export default Component.extend({
  i18n: service(),
  realtime: service(),
  me: service(),
  notify: service('notification-messages-service'),

  tagName: ['tr'],
  showRemoveProjectConfirm: false,
  isRemovingProject: false,

  tProjectRemoved: t('projectRemoved'),
  tPleaseTryAgain: t('pleaseTryAgain'),
  tPermissionChanged: t('permissionChanged'),


  /* Fetch project for the given id */
  teamProject: computed('project.id', function() {
    return this.get('store').findRecord('project', this.get('project.id'));
  }),


  /* Watch for allowEdit input */
  watchProjectWrite: observer('project.write', function(){
    this.get('changeProjectWrite').perform();
  }),


  /* Save project-write value */
  changeProjectWrite: task(function * () {
{'fraction_non_alphanumeric': 0.1489272191838452, 'fraction_numerical': 0.0033655868742111907, 'mean_word_length': 5.097435897435897, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3429727', 'n_tokens_mistral': 695, 'n_tokens_neox': 668, 'n_words': 177}